@skybridge/devtools 0.0.0-next.e5bbb6a → 0.0.0-next.ec9ea08

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,277 @@
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 re(e){return{current:e}}function R(e){0>ne||(e.current=te[ne],te[ne]=null,ne--)}function z(e,t){ne++,te[ne]=e.current,e.current=t}var ie=re(null),ae=re(null),oe=re(null),se=re(null);function ce(e,t){switch(z(oe,t),z(ae,e),z(ie,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}}R(ie),z(ie,e)}function le(){R(ie),R(ae),R(oe)}function ue(e){e.memoizedState!==null&&z(se,e);var t=ie.current,n=Qd(t,e.type);t!==n&&(z(ae,e),z(ie,n))}function de(e){ae.current===e&&(R(ie),R(ae)),se.current===e&&(R(se),sp._currentValue=ee)}var fe,pe;function me(e){if(fe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);fe=t&&t[1]||``,pe=-1<e.stack.indexOf(`
2
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
+ `+fe+e+pe}var he=!1;function ge(e,t){if(!e||he)return``;he=!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{he=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?me(n):``}function _e(e,t){switch(e.tag){case 26:case 27:case 5:return me(e.type);case 16:return me(`Lazy`);case 13:return e.child!==t&&t!==null?me(`Suspense Fallback`):me(`Suspense`);case 19:return me(`SuspenseList`);case 0:case 15:return ge(e.type,!1);case 11:return ge(e.type.render,!1);case 1:return ge(e.type,!0);case 31:return me(`Activity`);default:return``}}function ve(e){try{var t=``,n=null;do t+=_e(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
+ Error generating stack: `+e.message+`
8
+ `+e.stack}}var ye=Object.prototype.hasOwnProperty,be=t.unstable_scheduleCallback,xe=t.unstable_cancelCallback,Se=t.unstable_shouldYield,Ce=t.unstable_requestPaint,we=t.unstable_now,Te=t.unstable_getCurrentPriorityLevel,Ee=t.unstable_ImmediatePriority,De=t.unstable_UserBlockingPriority,Oe=t.unstable_NormalPriority,ke=t.unstable_LowPriority,Ae=t.unstable_IdlePriority,je=t.log,Me=t.unstable_setDisableYieldValue,Ne=null,Pe=null;function Fe(e){if(typeof je==`function`&&Me(e),Pe&&typeof Pe.setStrictMode==`function`)try{Pe.setStrictMode(Ne,e)}catch{}}var Ie=Math.clz32?Math.clz32:ze,Le=Math.log,Re=Math.LN2;function ze(e){return e>>>=0,e===0?32:31-(Le(e)/Re|0)|0}var Be=256,Ve=262144,He=4194304;function Ue(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 We(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=Ue(n))):i=Ue(o):i=Ue(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ue(n))):i=Ue(o)):i=Ue(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 Ge(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function B(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 Ke(){var e=He;return He<<=1,!(He&62914560)&&(He=4194304),e}function qe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Je(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ye(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-Ie(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&&Xe(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Xe(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ie(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Ze(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ie(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Qe(e,t){var n=t&-t;return n=n&42?1:$e(n),(n&(e.suspendedLanes|t))===0?n:0}function $e(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 et(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function tt(){var e=L.p;return e===0?(e=window.event,e===void 0?32:Cp(e.type)):e}function nt(e,t){var n=L.p;try{return L.p=e,t()}finally{L.p=n}}var rt=Math.random().toString(36).slice(2),it=`__reactFiber$`+rt,at=`__reactProps$`+rt,ot=`__reactContainer$`+rt,st=`__reactEvents$`+rt,ct=`__reactListeners$`+rt,lt=`__reactHandles$`+rt,ut=`__reactResources$`+rt,dt=`__reactMarker$`+rt;function ft(e){delete e[it],delete e[at],delete e[st],delete e[ct],delete e[lt]}function pt(e){var t=e[it];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ot]||n[it]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=xf(e);e!==null;){if(n=e[it])return n;e=xf(e)}return t}e=n,n=e.parentNode}return null}function mt(e){if(e=e[it]||e[ot]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ht(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function gt(e){var t=e[ut];return t||=e[ut]={hoistableStyles:new Map,hoistableScripts:new Map},t}function _t(e){e[dt]=!0}var vt=new Set,yt={};function bt(e,t){xt(e,t),xt(e+`Capture`,t)}function xt(e,t){for(yt[e]=t,e=0;e<t.length;e++)vt.add(t[e])}var St=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]*$`),Ct={},wt={};function Tt(e){return ye.call(wt,e)?!0:ye.call(Ct,e)?!1:St.test(e)?wt[e]=!0:(Ct[e]=!0,!1)}function Et(e,t,n){if(Tt(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 Dt(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 Ot(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 kt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function At(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function jt(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 Mt(e){if(!e._valueTracker){var t=At(e)?`checked`:`value`;e._valueTracker=jt(e,t,``+e[t])}}function Nt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=At(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Pt(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 Ft=/[\n"\\]/g;function It(e){return e.replace(Ft,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Lt(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=``+kt(t)):e.value!==``+kt(t)&&(e.value=``+kt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):zt(e,o,kt(n)):zt(e,o,kt(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=``+kt(s):e.removeAttribute(`name`)}function Rt(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)){Mt(e);return}n=n==null?``:``+kt(n),t=t==null?n:``+kt(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),Mt(e)}function zt(e,t,n){t===`number`&&Pt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Bt(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=``+kt(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 Vt(e,t,n){if(t!=null&&(t=``+kt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+kt(n)}function Ht(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=kt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Mt(e)}function Ut(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Wt=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 Gt(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||Wt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Kt(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&&Gt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Gt(e,o,t[o])}function qt(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 Jt=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`]]),Yt=/^[\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 Xt(e){return Yt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Zt(){}var Qt=null;function $t(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var en=null,tn=null;function nn(e){var t=mt(e);if(t&&(e=t.stateNode)){var n=e[at]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Lt(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="`+It(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[at]||null;if(!a)throw Error(i(90));Lt(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&&Nt(r)}break a;case`textarea`:Vt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Bt(e,!!n.multiple,t,!1)}}}var rn=!1;function an(e,t,n){if(rn)return e(t,n);rn=!0;try{return e(t)}finally{if(rn=!1,(en!==null||tn!==null)&&(Du(),en&&(t=en,e=tn,tn=en=null,nn(t),e)))for(t=0;t<e.length;t++)nn(e[t])}}function on(e,t){var n=e.stateNode;if(n===null)return null;var r=n[at]||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 sn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),cn=!1;if(sn)try{var ln={};Object.defineProperty(ln,"passive",{get:function(){cn=!0}}),window.addEventListener(`test`,ln,ln),window.removeEventListener(`test`,ln,ln)}catch{cn=!1}var un=null,dn=null,fn=null;function pn(){if(fn)return fn;var e,t=dn,n=t.length,r,i=`value`in un?un.value:un.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 fn=i.slice(e,1<r?1-r:void 0)}function mn(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 hn(){return!0}function gn(){return!1}function _n(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)?hn:gn,this.isPropagationStopped=gn,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=hn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=hn)},persist:function(){},isPersistent:hn}),t}var vn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yn=_n(vn),bn=f({},vn,{view:0,detail:0}),xn=_n(bn),Sn,Cn,wn,Tn=f({},bn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:In,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!==wn&&(wn&&e.type===`mousemove`?(Sn=e.screenX-wn.screenX,Cn=e.screenY-wn.screenY):Cn=Sn=0,wn=e),Sn)},movementY:function(e){return`movementY`in e?e.movementY:Cn}}),En=_n(Tn),Dn=_n(f({},Tn,{dataTransfer:0})),On=_n(f({},bn,{relatedTarget:0})),kn=_n(f({},vn,{animationName:0,elapsedTime:0,pseudoElement:0})),An=_n(f({},vn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),jn=_n(f({},vn,{data:0})),Mn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Nn={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`},Pn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Fn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Pn[e])?!!t[e]:!1}function In(){return Fn}var Ln=_n(f({},bn,{key:function(e){if(e.key){var t=Mn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=mn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Nn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:In,charCode:function(e){return e.type===`keypress`?mn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?mn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Rn=_n(f({},Tn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),zn=_n(f({},bn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:In})),Bn=_n(f({},vn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Vn=_n(f({},Tn,{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})),Hn=_n(f({},vn,{newState:0,oldState:0})),Un=[9,13,27,32],Wn=sn&&`CompositionEvent`in window,Gn=null;sn&&`documentMode`in document&&(Gn=document.documentMode);var Kn=sn&&`TextEvent`in window&&!Gn,qn=sn&&(!Wn||Gn&&8<Gn&&11>=Gn),Jn=` `,Yn=!1;function Xn(e,t){switch(e){case`keyup`:return Un.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Zn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Qn=!1;function $n(e,t){switch(e){case`compositionend`:return Zn(t);case`keypress`:return t.which===32?(Yn=!0,Jn):null;case`textInput`:return e=t.data,e===Jn&&Yn?null:e;default:return null}}function er(e,t){if(Qn)return e===`compositionend`||!Wn&&Xn(e,t)?(e=pn(),fn=dn=un=null,Qn=!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 qn&&t.locale!==`ko`?null:t.data;default:return null}}var tr={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 nr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!tr[e.type]:t===`textarea`}function rr(e,t,n,r){en?tn?tn.push(r):tn=[r]:en=r,t=Fd(t,`onChange`),0<t.length&&(n=new yn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var ir=null,ar=null;function or(e){Dd(e,0)}function V(e){if(Nt(ht(e)))return e}function sr(e,t){if(e===`change`)return t}var cr=!1;if(sn){var lr;if(sn){var ur=`oninput`in document;if(!ur){var dr=document.createElement(`div`);dr.setAttribute(`oninput`,`return;`),ur=typeof dr.oninput==`function`}lr=ur}else lr=!1;cr=lr&&(!document.documentMode||9<document.documentMode)}function fr(){ir&&(ir.detachEvent(`onpropertychange`,pr),ar=ir=null)}function pr(e){if(e.propertyName===`value`&&V(ar)){var t=[];rr(t,ar,e,$t(e)),an(or,t)}}function H(e,t,n){e===`focusin`?(fr(),ir=t,ar=n,ir.attachEvent(`onpropertychange`,pr)):e===`focusout`&&fr()}function mr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return V(ar)}function hr(e,t){if(e===`click`)return V(t)}function gr(e,t){if(e===`input`||e===`change`)return V(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(!ye.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=Pt(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=Pt(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=sn&&`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!==Pt(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 yn(`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={};sn&&(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),bt(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-Ie(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=Qf(e,n,ie.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:ve(t)},pi.set(e,t),t):n}return{value:e,source:t,stack:ve(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-Ie(r)-1;r&=~(1<<i),n+=1;var a=32-Ie(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Si=1<<32-Ie(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[it]=e,t[at]=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),Rt(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),Ht(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=Zt),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=re(null),Ui=null,Wi=null;function Gi(e,t,n){z(Hi,t._currentValue),t._currentValue=n}function Ki(e){e._currentValue=Hi.current,R(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===se.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[sp]:e.push(sp))}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=we(),typeof t==`object`&&t&&typeof t.then==`function`&&da(e,t),ma!==null&&ma(e,t)};var ha=re(null);function ga(){var e=ha.current;return e===null?Hl.pooledCache:e}function _a(e,t){t===null?z(ha,ha.current):z(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(Zt,Zt),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(Zt,Zt);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,Ze(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=re(null),Xa=re(0);function Za(e,t){e=Xl,z(Xa,e),z(Ya,t),Xl=e|t.baseLanes}function Qa(){z(Xa,Xl),z(Ya,Ya.current)}function $a(){Xl=Xa.current,R(Ya),R(Xa)}var eo=re(null),to=null;function no(e){var t=e.alternate;z(so,so.current&1),z(eo,e),to===null&&(t===null||Ya.current!==null||t.memoizedState!==null)&&(to=e)}function ro(e){z(so,so.current),z(eo,e),to===null&&(to=e)}function io(e){e.tag===22?(z(so,so.current),z(eo,e),to===null&&(to=e)):ao(e)}function ao(){z(so,so.current),z(eo,eo.current)}function oo(e){R(eo),to===e&&(to=null),R(so)}var so=re(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){Fe(!0);try{n()}finally{Fe(!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 U(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){Fe(!0);try{e()}finally{Fe(!1)}}return n.memoizedState=[r,t],r}function bs(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 xs(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=bs(e,n,r),vr(e,t)||(rc=!0),e)}function Ss(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 Cs(){}function ws(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ts(e).queue;Ss(e,a,t,ee,n===null?Cs:function(){return Es(e),n(r)})}function Ts(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 Es(e){var t=Ts(e);t.next===null&&(t=e.alternate.memoizedState),Ns(e,t.next.queue,{},bu())}function Ds(){return Qi(sp)}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,Ze(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){Fe(!0);try{e()}finally{Fe(!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){Fe(!0);try{n(t)}finally{Fe(!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 bs(Ao(),e,t)},useTransition:function(){var e=Ko(!1);return e=Ss.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-Ie(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:Ds,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:U,useReducer:Lo,useRef:ss,useState:function(){return Lo(Io)},useDebugValue:vs,useDeferredValue:function(e,t){return xs(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:Ds,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:U,useReducer:zo,useRef:ss,useState:function(){return zo(Io)},useDebugValue:vs,useDeferredValue:function(e,t){var n=jo();return fo===null?bs(n,e,t):xs(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:Ds,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=Qe(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=Qe(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,z(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:ce(t,t.stateNode.containerInfo),Gi(t,ia,e.memoizedState.cache),zi();break;case 27:case 5:ue(t);break;case 4:ce(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),z(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(ce(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(oe.current).createElement(n),r[it]=t,r[at]=e,Wd(r,n,e),_t(r),t.stateNode=r):t.memoizedState=zf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ue(t),e===null&&ji&&(r=t.stateNode=Sf(t.type,t.pendingProps,oe.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)),ue(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),sp._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 ce(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,!$f(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:Ke(),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),le(),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(de(t),n=oe.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=ie.current,Ri(t)?Ii(t,e):(e=Sf(a,r,n),t.stateNode=e,Nc(t))}return Rc(t),null;case 5:if(de(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=ie.current,Ri(t))Ii(t,o);else{var s=Xd(oe.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[it]=t,o[at]=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=oe.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[it]=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[it]=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[it]=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[it]=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 le(),e===null&&jd(t.stateNode.containerInfo),Rc(t),null;case 10:return Ki(t.type),Rc(t),null;case 19:if(R(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 z(so,so.current&1|2),ji&&wi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&we()>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*we()-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=we(),e.sibling=null,n=so.current,z(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&&R(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),le(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return de(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 R(so),null;case 4:return le(),null;case 10:return Ki(t.type),null;case 22:case 23:return oo(t),$a(),e!==null&&R(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),le();break;case 26:case 27:case 5:de(t);break;case 4:le();break;case 31:t.memoizedState!==null&&oo(t);break;case 13:oo(t);break;case 19:R(so);break;case 10:Ki(t.type);break;case 22:case 23:oo(t),$a(),e!==null&&R(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[at]=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=Zt));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[it]=e,t[at]=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=gp,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},gp=!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&&ft(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(Pe&&typeof Pe.onCommitFiberUnmount==`function`)try{Pe.onCommitFiberUnmount(Ne,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),Bp(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{Bp(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{Bp(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[dt]||o[it]||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[it]=e,_t(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[it]=e,_t(o),r=o}e.stateNode=r}else W(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?W(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{Ut(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{Bp(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=we()),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&&(Ut(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&&ep(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?tt():yd()}function xu(){if(tu===0)if(!(Wl&536870912)||ji){var e=Ve;Ve<<=1,!(Ve&3932160)&&(Ve=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)),Je(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||Ge(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-we(),10<a)){if(Eu(r,t,tu,!ql),We(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:Zt},Nl(t,a,d);var m=(a&62914560)===a?ou-we():(a&4194048)===a?su-we():0;if(m=np(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-Ie(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Xe(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=Ge(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-Ie(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=we()+500,ku(e,t)):Jl=Ge(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?$f(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&&!Se();)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,Ye(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(Oe,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}}gp=!!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,Ce();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),et(n),t=t.stateNode,Pe&&typeof Pe.onCommitFiberRoot==`function`)try{Pe.onCommitFiberRoot(Ne,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=et(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),Pe&&typeof Pe.onPostCommitFiberRoot==`function`)try{Pe.onPostCommitFiberRoot(Ne,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&&(Je(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),Je(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>we()-ou?!(Vl&2)&&ku(e,0):eu|=n,nu===Wl&&(nu=0)),dd(e)}function td(e,t){t===0&&(t=Ke()),e=$r(e,t),e!==null&&(Je(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 be(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-Ie(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=We(r,r===Hl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ge(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=we(),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-Ie(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=B(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Hl,n=Wl,n=We(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&&xe(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ge(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&xe(r),et(n)){case 2:case 8:n=De;break;case 32:n=Oe;break;case 268435456:n=Ae;break;default:n=Oe}return r=gd.bind(null,e),n=be(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&xe(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=We(e,e===Hl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Cu(e,r,t),hd(e,we()),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?be(Ee,pd):md()})}function yd(){if(ud===0){var e=la;e===0&&(e=Be,Be<<=1,!(Be&261888)&&(Be=256)),ud=e}return ud}function bd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Xt(``+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[at]||null).action),o=r.submitter;o&&(t=(t=o[at]||null)?bd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new yn(`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);ws(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),ws(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`),xt(`onMouseEnter`,[`mouseout`,`mouseover`]),xt(`onMouseLeave`,[`mouseout`,`mouseover`]),xt(`onPointerEnter`,[`pointerout`,`pointerover`]),xt(`onPointerLeave`,[`pointerout`,`pointerover`]),bt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),bt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),bt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),bt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),bt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),bt(`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[st];n===void 0&&(n=t[st]=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,vt.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(Cp(t)){case 2:var i=_p;break;case 8:i=vp;break;default:i=yp}n=i.bind(null,t,n,e),i=void 0,!cn||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=pt(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}an(function(){var r=a,i=$t(n),s=[];a:{var c=Ur.get(e);if(c!==void 0){var l=yn,u=e;switch(e){case`keypress`:if(mn(n)===0)break a;case`keydown`:case`keyup`:l=Ln;break;case`focusin`:u=`focus`,l=On;break;case`focusout`:u=`blur`,l=On;break;case`beforeblur`:case`afterblur`:l=On;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=En;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Dn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=zn;break;case Ir:case Lr:case Rr:l=kn;break;case Hr:l=Bn;break;case`scroll`:case`scrollend`:l=xn;break;case`wheel`:l=Vn;break;case`copy`:case`cut`:case`paste`:l=An;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Rn;break;case`toggle`:case`beforetoggle`:l=Hn}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=on(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!==Qt&&(u=n.relatedTarget||n.fromElement)&&(pt(u)||u[ot]))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?pt(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=En,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Rn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:ht(l),h=u==null?c:ht(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,pt(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?ht(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=sr;else if(nr(c))if(cr)v=gr;else{v=mr;var y=H}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&qt(r.elementType)&&(v=sr):v=hr;if(v&&=v(e,r)){rr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&zt(c,`number`,c.value)}switch(y=r?ht(r):window,e){case`focusin`:(nr(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(Wn)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 Qn?Xn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(qn&&n.locale!==`ko`&&(Qn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Qn&&(b=pn()):(un=i,dn=`value`in un?un.value:un.textContent,Qn=!0)),y=Fd(r,x),0<y.length&&(x=new jn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Zn(n),b!==null&&(x.data=b)))),(b=Kn?$n(e,n):er(e,n))&&(x=Fd(r,`onBeforeInput`),0<x.length&&(y=new jn(`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=on(e,n),i!=null&&r.unshift(Pd(e,i,a)),i=on(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=on(n,a),l!=null&&o.unshift(Pd(n,l,c))):i||(l=on(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===``||Ut(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Ut(e,``+r);break;case`className`:Dt(e,`class`,r);break;case`tabIndex`:Dt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Dt(e,n,r);break;case`style`:Kt(e,r,o);break;case`data`:if(t!==`object`){Dt(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=Xt(``+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=Xt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Zt);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=Xt(``+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),Et(e,`popover`,r);break;case`xlinkActuate`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ot(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ot(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ot(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Et(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=Jt.get(n)||n,Et(e,n,r))}}function Ud(e,t,n,r,a,o){switch(n){case`style`:Kt(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`?Ut(e,r):(typeof r==`number`||typeof r==`bigint`)&&Ut(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=Zt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!yt.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[at]||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,``):Et(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)}}Rt(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&&Bt(e,!!r,n,!0):Bt(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)}Ht(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(qt(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)}}Lt(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?Bt(e,!!n,n?[]:``,!1):Bt(e,!!n,t,!0)):Bt(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)}Vt(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(qt(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),Bp(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[dt]||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);Bp(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),ft(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[dt])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]);ft(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=mt(e);t!==null&&t.tag===5&&t.type===`form`?Es(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=It(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),_t(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="`+It(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+It(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+It(n.imageSizes)+`"]`)):i+=`[href="`+It(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),_t(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="`+It(r)+`"][href="`+It(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),_t(r),n.head.appendChild(r)}}}function If(e,t,n){Df.S(e,t,n);var r=Af;if(r&&e){var i=gt(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`);_t(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=gt(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`),_t(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=gt(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`),_t(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=oe.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=gt(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=gt(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=gt(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="`+It(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),_t(t),e.head.appendChild(t))}function Wf(e){return`[src="`+It(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~="`+It(n.href)+`"]`);if(r)return t.instance=r,_t(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`),_t(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,_t(o),o;r=Hf(n),(a=wf.get(a))&&Jf(r,a),o=(e.ownerDocument||e).createElement(`link`),_t(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,_t(a),a):(r=n,(a=wf.get(o))&&(r=f({},n),Yf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),_t(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[dt]||a[it]||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 W(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Qf(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 $f(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function ep(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=rp.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,_t(a);return}a=t.ownerDocument||t,r=Hf(r),(i=wf.get(i))&&Jf(r,i),a=a.createElement(`link`),_t(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=rp.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var tp=0;function np(e,t){return e.stylesheets&&e.count===0&&ap(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ap(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&tp===0&&(tp=62500*qd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ap(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>tp?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function rp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ap(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ip=null;function ap(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ip=new Map,t.forEach(op,e),ip=null,rp.call(e))}function op(e,t){if(!(t.state.loading&4)){var n=ip.get(e);if(n)var r=n.get(null);else{n=new Map,ip.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=rp.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 sp={$$typeof:C,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function cp(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=qe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qe(0),this.hiddenUpdates=qe(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 lp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new cp(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 up(e){return e?(e=ni,e):ni}function dp(e,t,n,r,i,a){i=up(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 fp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function pp(e,t){fp(e,t),(e=e.alternate)&&fp(e,t)}function mp(e){if(e.tag===13||e.tag===31){var t=$r(e,67108864);t!==null&&Su(t,e,67108864),pp(e,67108864)}}function hp(e){if(e.tag===13||e.tag===31){var t=bu();t=$e(t);var n=$r(e,t);n!==null&&Su(n,e,t),pp(e,t)}}var gp=!0;function _p(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=2,yp(e,t,n,r)}finally{L.p=a,I.T=i}}function vp(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=8,yp(e,t,n,r)}finally{L.p=a,I.T=i}}function yp(e,t,n,r){if(gp){var i=bp(r);if(i===null)Nd(e,t,r,xp,n),Mp(e,r);else if(G(i,e,t,n,r))r.stopPropagation();else if(Mp(e,r),t&4&&-1<jp.indexOf(e)){for(;i!==null;){var a=mt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ue(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ie(o);s.entanglements[1]|=c,o&=~c}dd(a),!(Vl&6)&&(cu=we()+500,fd(0,!1))}}break;case 31:case 13:s=$r(a,2),s!==null&&Su(s,a,2),Du(),pp(a,2)}if(a=bp(r),a===null&&Nd(e,t,r,xp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Nd(e,t,r,null,n)}}function bp(e){return e=$t(e),Sp(e)}var xp=null;function Sp(e){if(xp=null,e=pt(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 xp=e,null}function Cp(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(Te()){case Ee:return 2;case De:return 8;case Oe:case ke:return 32;case Ae:return 268435456;default:return 32}default:return 32}}var wp=!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=mt(t),t!==null&&mp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function G(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 Pp(e){var t=pt(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,nt(e.priority,function(){hp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,nt(e.priority,function(){hp(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 K(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Qt=r,n.target.dispatchEvent(r),Qt=null}else return t=mt(n),t!==null&&mp(t),e.blockedOn=n,!1;t.shift()}return!0}function Fp(e,t,n){K(e)&&n.delete(t)}function Ip(){wp=!1,Tp!==null&&K(Tp)&&(Tp=null),Ep!==null&&K(Ep)&&(Ep=null),Dp!==null&&K(Dp)&&(Dp=null),Op.forEach(Fp),kp.forEach(Fp)}function Lp(e,n){e.blockedOn===n&&(e.blockedOn=null,wp||(wp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Ip)))}var Rp=null;function zp(e){Rp!==e&&(Rp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Rp===e&&(Rp=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(Sp(r||n)===null)continue;break}var a=mt(n);a!==null&&(e.splice(t,3),t-=3,ws(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Bp(e){function t(t){return Lp(t,e)}Tp!==null&&Lp(Tp,e),Ep!==null&&Lp(Ep,e),Dp!==null&&Lp(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);)Pp(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[at]||null;if(typeof a==`function`)o||zp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[at]||null)s=o.formAction;else if(Sp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),zp(n)}}}function Vp(){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 Hp(e){this._internalRoot=e}Up.prototype.render=Hp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;dp(n,bu(),e,t,null,null)},Up.prototype.unmount=Hp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;dp(e.current,2,null,e,null,null),Du(),t[ot]=null}};function Up(e){this._internalRoot=e}Up.prototype.unstable_scheduleHydration=function(e){if(e){var t=tt();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&&Pp(e)}};var Wp=n.version;if(Wp!==`19.2.7`)throw Error(i(527,Wp,`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 Gp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:I,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Kp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Kp.isDisabled&&Kp.supportsFiber)try{Ne=Kp.inject(Gp),Pe=Kp}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=lp(e,1,!1,null,null,n,r,null,o,s,c,Vp),e[ot]=t.current,jd(e),new Hp(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)=>z(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=R(e)&&R(t);if(!r&&!(z(e)&&z(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 re(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 R(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function z(e){if(!ie(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!ie(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function ie(e){return Object.prototype.toString.call(e)===`[object Object]`}function ae(e){return new Promise(t=>{T.setTimeout(t,e)})}function oe(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:ne(e,t)}function se(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function ce(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var le=Symbol();function ue(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===le?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function de(e,t){return typeof e==`function`?e(...t):!!e}function fe(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 pe=(()=>{let e=()=>D;return{isServer(){return e()},setIsServer(t){e=t}}})();function me(){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 he=E;function ge(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=he,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 _e=ge(),ve=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 ye(e){return Math.min(1e3*2**e,3e4)}function be(e){return(e??`online`)!==`online`||ve.isOnline()}var xe=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function Se(e){let t=!1,n=0,r,i=me(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new xe(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>C.isFocused()&&(e.networkMode===`always`||ve.isOnline())&&e.canRun(),u=()=>be(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??(pe.isServer()?0:3),o=e.retryDelay??ye,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),ae(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 Ce=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??(pe.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(T.clearTimeout(this.#e),this.#e=void 0)}};function we(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=>{fe(e,()=>t.signal,()=>n=!0)},u=ue(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?ce:se;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?Ee:Te,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:Te(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 Te(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 Ee(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var De=class extends Ce{#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=Ae(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=Ae(this.options);e.data!==void 0&&(this.setState(ke(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=oe(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===le||!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=ue(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`?we(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=Se({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof xe&&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 xe){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,...Oe(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...ke(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),_e.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function Oe(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:be(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function ke(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Ae(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 je=class extends S{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=me(),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),Ne(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Pe(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Pe(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&&!re(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Fe(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 Le(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(pe.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,!(pe.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&&Ne(e,t),o=i&&Fe(e,n,t,r);(a||o)&&(l={...l,...Oe(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=oe(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=oe(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:Ie(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=me();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),!re(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){_e.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function Me(e,t){return N(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&N(t.retryOnMount,e)===!1)}function Ne(e,t){return Me(e,t)||e.state.data!==void 0&&Pe(e,t,t.refetchOnMount)}function Pe(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&&Ie(e,t)}return!1}function Fe(e,t,n,r){return(e!==t||N(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Ie(e,n)}function Ie(e,t){return N(t.enabled,e)!==!1&&e.isStaleByTime(M(t.staleTime,e))}function Le(e,t){return!re(e.getCurrentResult(),t)}var Re=class extends Ce{#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||ze(),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=Se({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),_e.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function ze(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Be=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 Re({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=Ve(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=Ve(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=Ve(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=Ve(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){_e.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){_e.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return _e.batch(()=>Promise.all(e.map(e=>e.continue().catch(O))))}};function Ve(e){return e.options.scope?.id}var He=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),re(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??ze();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){_e.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)})})}},Ue=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 De({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(){_e.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){_e.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){_e.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){_e.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},We=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Ue,this.#t=e.mutationCache||new Be,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=ve.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 _e.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;_e.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return _e.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=_e.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(O).catch(O)}invalidateQueries(e,t={}){return _e.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=_e.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 ve.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===le&&(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()}},Ge=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})),B=s(((e,t)=>{t.exports=Ge()}))(),Ke=b.createContext(void 0),qe=e=>{let t=b.useContext(Ke);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},Je=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,B.jsx)(Ke.Provider,{value:e,children:t})),Ye=b.createContext(!1),Xe=()=>b.useContext(Ye);Ye.Provider;function Ze(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Qe=b.createContext(Ze()),$e=()=>b.useContext(Qe),et=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?de(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},tt=e=>{b.useEffect(()=>{e.clearReset()},[e])},nt=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||de(n,[e.error,r])),rt=(e,t)=>t.state.data===void 0,it=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))}},at=(e,t)=>e.isLoading&&e.isFetching&&!t,ot=(e,t)=>e?.suspense&&t.isPending,st=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function ct(e,t,n){let r=Xe(),i=$e(),a=qe(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,it(o),et(o,i,s),tt(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(_e.batchCalls(e)):O;return u.updateResult(),t},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),b.useEffect(()=>{u.setOptions(o)},[o,u]),ot(o,d))throw st(o,u,i);if(nt({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&&!pe.isServer()&&at(d,r)&&(l?st(o,u,i):s?.promise)?.catch(O).finally(()=>{u.updateResult()}),o.notifyOnChangeProps?d:u.trackResult(d)}function lt(e,t){return ct({...e,enabled:!0,suspense:!0,throwOnError:rt,placeholderData:void 0},je,t)}function ut(e,t){let n=qe(t),[r]=b.useState(()=>new He(n,e));b.useEffect(()=>{r.setOptions(e)},[r,e]);let i=b.useSyncExternalStore(b.useCallback(e=>r.subscribe(_e.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=b.useCallback((e,t)=>{r.mutate(e,t).catch(O)},[r]);if(i.error&&de(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var dt=null;function ft(e,...t){dt?.(e,t)}function pt(e,...t){dt?.(e,t,!0)}var mt={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 ht(e){return`[nuqs] ${mt[e]}
10
+ See https://nuqs.dev/NUQS-${e}`}function gt(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}=${_t(r)}`)}return`?`+t.join(`&`)}function _t(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 vt=`2.9.1`,yt={};function bt(e,t){let n=Symbol.for(`nuqs.${vt}.${e}`),r=globalThis;if(r[n]!=null)return r[n];let i=Object.isExtensible(r)?r:yt;return i[n]??=t()}function xt(e,t,n){let r=bt(e,()=>new WeakMap);return r.has(t)||r.set(t,n()),r.get(t)}var St=xt(`adapter-context`,b.createContext,()=>{let e=(0,b.createContext)({useAdapter(){throw Error(ht(404))}});return e.displayName=`NuqsAdapterContext`,e});typeof window<`u`&&(window.__NuqsAdapterContext&&window.__NuqsAdapterContext!==St&&console.error(ht(303)),window.__NuqsAdapterContext=St);function Ct(e){return({children:t,defaultOptions:n,processUrlSearchParams:r,...i})=>(0,b.createElement)(St.Provider,{...i,value:{useAdapter:e,defaultOptions:n,processUrlSearchParams:r}},t)}function wt(e){let t=(0,b.useContext)(St);if(!(`useAdapter`in t))throw Error(ht(404));return t.useAdapter(e)}var Tt=()=>(0,b.useContext)(St).defaultOptions,Et=()=>(0,b.useContext)(St).processUrlSearchParams;function Dt(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 Ot(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 kt(){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 At(e){return{method:`throttle`,timeMs:e}}var jt=At(kt());function Mt(e){return e===null||Array.isArray(e)&&e.length===0}function Nt(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 Pt(){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 Ft(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 It(){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 Lt(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 Rt(){return new URLSearchParams(location.search)}var zt=class{updateMap=new Map;options={history:`replace`,scroll:!1,shallow:!0};timeMs=jt.timeMs;transitions=new Set;resolvers=null;controller=null;lastFlushedAt=0;resetQueueOnNextPush=!1;push({key:e,query:t,options:n},r=jt.timeMs){this.resetQueueOnNextPush&&=(this.reset(),!1),ft(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=Rt}){return this.resolvers?.promise??Promise.resolve(e())}flush({getSearchParamsSnapshot:e=Rt,rateLimitFactor:t=1,...n},r){if(this.controller??=new AbortController,!Number.isFinite(this.timeMs))return ft(8),Promise.resolve(e());if(this.resolvers)return this.resolvers.promise;this.resolvers=It();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 Ft(()=>{let e=performance.now()-this.lastFlushedAt,n=this.timeMs,r=t*Math.max(0,n-e);ft(9,r,n,t),r===0?i():Ft(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 ft(10,JSON.stringify(Object.fromEntries(this.updateMap))),this.updateMap.clear(),this.transitions.clear(),this.options={history:`replace`,scroll:!1,shallow:!0},this.timeMs=jt.timeMs,e}applyPendingUpdates(e,t){let{updateUrl:n,getSearchParamsSnapshot:r}=e,i=r();if(ft(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(),ft(12,a,o);for(let[e,t]of a)t===null?i.delete(e):i=Nt(i,e,t);t&&(i=t(i));try{return Lt(s,()=>n(i,o)),[i,null]}catch(e){return console.error(ht(429),a.map(([e])=>e).join(),e),[i,e]}}},Bt=bt(`throttle-queue`,()=>new zt);function Vt(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 Ht=class{callback;resolvers=It();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,Ft(()=>{let t=this.resolvers;try{ft(13,e);let n=this.callback(e);ft(14,this.queuedValue),this.queuedValue=void 0,this.resolvers=It(),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}},Ut=class{throttleQueue;queues=new Map;queuedQuerySync=Pt();constructor(e=new zt){this.throttleQueue=e}push(e,t,n,r){if(!Number.isFinite(t)){let e=n.getSearchParamsSnapshot??Rt;return Promise.resolve(e())}let i=e.key;if(!this.queues.has(i)){ft(15,i);let e=new Ht(e=>(this.throttleQueue.push(e),this.throttleQueue.flush(n,r).finally(()=>{this.queues.get(e.key)?.queuedValue===void 0&&(ft(16,e.key),this.queues.delete(e.key)),this.queuedQuerySync.emit(e.key)})));this.queues.set(i,e)}ft(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?(ft(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())ft(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}},Wt=bt(`debounce-controller`,()=>new Ut(Bt));function Gt(e){return Vt(e,(e,t)=>Wt.queuedQuerySync.on(e,t),e=>Wt.getQueuedQuery(e))}function Kt(e){return bt(`history-emitter.${e}`,()=>Pt())}var qt=`__nuqs__`,Jt=Kt(`react`);function Yt(e){return function(t,n){let r=new URL(location.href);r.search=gt(t),ft(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,qt,r),Jt.emit(`update`,t),n.scroll===!0&&window.scrollTo({top:0})}}var Xt=(0,b.createContext)({fullPageNavigationOnShallowFalseUpdates:!1}),Zt=new URLSearchParams;function Qt(){return Zt}function $t(e){return Jt.on(`update`,e),window.addEventListener(`popstate`,e),()=>{Jt.off(`update`,e),window.removeEventListener(`popstate`,e)}}function en(e){let{fullPageNavigationOnShallowFalseUpdates:t}=(0,b.useContext)(Xt),n=(0,b.useRef)(null);return{searchParams:(0,b.useSyncExternalStore)($t,()=>{let t=Ot(new URLSearchParams(location.search),e,!1),r=t.toString();return n.current?.key===r?n.current.search:(n.current={key:r,search:t},t)},Qt),updateUrl:(0,b.useMemo)(()=>Yt(t),[t])}}var tn=Ct(en);function nn({children:e,fullPageNavigationOnShallowFalseUpdates:t=!1,...n}){return(0,b.createElement)(Xt.Provider,{value:{fullPageNavigationOnShallowFalseUpdates:t}},(0,b.createElement)(tn,{...n,children:e}))}function rn(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=rn(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function an(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=rn(e))&&(r&&(r+=` `),r+=t);return r}var on=(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},sn=(e,t)=>({classGroupId:e,validator:t}),cn=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ln=`-`,un=[],dn=`arbitrary..`,fn=e=>{let t=hn(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return mn(e);let n=e.split(ln);return pn(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?on(i,t):t:i||un}return n[e]||un}}},pn=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=pn(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(ln):e.slice(t).join(ln),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},mn=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?dn+r:void 0})(),hn=e=>{let{theme:t,classGroups:n}=e;return gn(n,t)},gn=(e,t)=>{let n=cn();for(let r in e){let i=e[r];_n(i,n,r,t)}return n},_n=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];vn(i,t,n,r)}},vn=(e,t,n,r)=>{if(typeof e==`string`){yn(e,t,n);return}if(typeof e==`function`){bn(e,t,n,r);return}xn(e,t,n,r)},yn=(e,t,n)=>{let r=e===``?t:Sn(t,e);r.classGroupId=n},bn=(e,t,n,r)=>{if(Cn(e)){_n(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(sn(n,e))},xn=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];_n(o,Sn(t,a),n,r)}},Sn=(e,t)=>{let n=e,r=t.split(ln),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=cn(),n.nextPart.set(t,i)),n=i}return n},Cn=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,wn=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)}}},Tn=`!`,En=`:`,Dn=[],On=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),kn=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===En){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(Tn)?(c=s.slice(0,-1),l=!0):s.startsWith(Tn)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return On(t,l,c,u)};if(t){let e=t+En,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):On(Dn,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},An=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}},jn=e=>({cache:wn(e.cacheSize),parseClassName:kn(e),sortModifiers:An(e),postfixLookupClassGroupIds:Mn(e),...fn(e)}),Mn=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},Nn=/\s+/,Pn=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(Nn),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?_+Tn:_,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},Fn=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=In(n))&&(i&&(i+=` `),i+=r);return i},In=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=In(e[r]))&&(n&&(n+=` `),n+=t);return n},Ln=(e,...t)=>{let n,r,i,a,o=o=>(n=jn(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=Pn(e,n);return i(e,a),a};return a=o,(...e)=>a(Fn(...e))},Rn=[],zn=e=>{let t=t=>t[e]||Rn;return t.isThemeGetter=!0,t},Bn=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Vn=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Hn=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Un=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Wn=/\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$/,Gn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Kn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,qn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Jn=e=>Hn.test(e),Yn=e=>!!e&&!Number.isNaN(Number(e)),Xn=e=>!!e&&Number.isInteger(Number(e)),Zn=e=>e.endsWith(`%`)&&Yn(e.slice(0,-1)),Qn=e=>Un.test(e),$n=()=>!0,er=e=>Wn.test(e)&&!Gn.test(e),tr=()=>!1,nr=e=>Kn.test(e),rr=e=>qn.test(e),ir=e=>!V(e)&&!H(e),ar=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)),or=e=>xr(e,Tr,tr),V=e=>Bn.test(e),sr=e=>xr(e,Er,er),cr=e=>xr(e,Dr,Yn),lr=e=>xr(e,kr,$n),ur=e=>xr(e,Or,tr),dr=e=>xr(e,Cr,tr),fr=e=>xr(e,wr,rr),pr=e=>xr(e,Ar,nr),H=e=>Vn.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=Bn.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Sr=(e,t,n=!1)=>{let r=Vn.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=Ln(()=>{let e=zn(`color`),t=zn(`font`),n=zn(`text`),r=zn(`font-weight`),i=zn(`tracking`),a=zn(`leading`),o=zn(`breakpoint`),s=zn(`container`),c=zn(`spacing`),l=zn(`radius`),u=zn(`shadow`),d=zn(`inset-shadow`),f=zn(`text-shadow`),p=zn(`drop-shadow`),m=zn(`blur`),h=zn(`perspective`),g=zn(`aspect`),_=zn(`ease`),v=zn(`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(),H,V],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[H,V,c],T=()=>[Jn,`full`,`auto`,...w()],E=()=>[Xn,`none`,`subgrid`,H,V],D=()=>[`auto`,{span:[`full`,Xn,H,V]},Xn,H,V],O=()=>[Xn,`auto`,H,V],k=()=>[`auto`,`min`,`max`,`fr`,H,V],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=()=>[Jn,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[Jn,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],F=()=>[Jn,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],I=()=>[e,H,V],L=()=>[...b(),gr,dr,{position:[H,V]}],ee=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],te=()=>[`auto`,`cover`,`contain`,_r,or,{size:[H,V]}],ne=()=>[Zn,mr,sr],re=()=>[``,`none`,`full`,l,H,V],R=()=>[``,Yn,mr,sr],z=()=>[`solid`,`dashed`,`dotted`,`double`],ie=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],ae=()=>[Yn,Zn,gr,dr],oe=()=>[``,`none`,m,H,V],se=()=>[`none`,Yn,H,V],ce=()=>[`none`,Yn,H,V],le=()=>[Yn,H,V],ue=()=>[Jn,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Qn],breakpoint:[Qn],color:[$n],container:[Qn],"drop-shadow":[Qn],ease:[`in`,`out`,`in-out`],font:[ir],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Qn],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Qn],shadow:[Qn],spacing:[`px`,Yn],text:[Qn],"text-shadow":[Qn],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Jn,V,H,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,H,V]}],"container-named":[ar],columns:[{columns:[Yn,V,H,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:[Xn,`auto`,H,V]}],basis:[{basis:[Jn,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Yn,Jn,`auto`,`initial`,`none`,V]}],grow:[{grow:[``,Yn,H,V]}],shrink:[{shrink:[``,Yn,H,V]}],order:[{order:[Xn,`first`,`last`,`none`,H,V]}],"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,sr]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,br,lr]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Zn,V]}],"font-family":[{font:[hr,ur,t]}],"font-features":[{"font-features":[V]}],"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,H,V]}],"line-clamp":[{"line-clamp":[Yn,`none`,H,cr]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,H,V]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,H,V]}],"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:[...z(),`wavy`]}],"text-decoration-thickness":[{decoration:[Yn,`from-font`,`auto`,H,sr]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[Yn,`auto`,H,V]}],"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:[Xn,H,V]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,H,V]}],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`,H,V]}],"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`]},Xn,H,V],radial:[``,H,V],conic:[Xn,H,V]},vr,fr]}],"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:re()}],"rounded-s":[{"rounded-s":re()}],"rounded-e":[{"rounded-e":re()}],"rounded-t":[{"rounded-t":re()}],"rounded-r":[{"rounded-r":re()}],"rounded-b":[{"rounded-b":re()}],"rounded-l":[{"rounded-l":re()}],"rounded-ss":[{"rounded-ss":re()}],"rounded-se":[{"rounded-se":re()}],"rounded-ee":[{"rounded-ee":re()}],"rounded-es":[{"rounded-es":re()}],"rounded-tl":[{"rounded-tl":re()}],"rounded-tr":[{"rounded-tr":re()}],"rounded-br":[{"rounded-br":re()}],"rounded-bl":[{"rounded-bl":re()}],"border-w":[{border:R()}],"border-w-x":[{"border-x":R()}],"border-w-y":[{"border-y":R()}],"border-w-s":[{"border-s":R()}],"border-w-e":[{"border-e":R()}],"border-w-bs":[{"border-bs":R()}],"border-w-be":[{"border-be":R()}],"border-w-t":[{"border-t":R()}],"border-w-r":[{"border-r":R()}],"border-w-b":[{"border-b":R()}],"border-w-l":[{"border-l":R()}],"divide-x":[{"divide-x":R()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":R()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...z(),`hidden`,`none`]}],"divide-style":[{divide:[...z(),`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:[...z(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Yn,H,V]}],"outline-w":[{outline:[``,Yn,mr,sr]}],"outline-color":[{outline:I()}],shadow:[{shadow:[``,`none`,u,yr,pr]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":[`none`,d,yr,pr]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:R()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[Yn,sr]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":R()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":[`none`,f,yr,pr]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[Yn,H,V]}],"mix-blend":[{"mix-blend":[...ie(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ie()}],"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":[Yn]}],"mask-image-linear-from-pos":[{"mask-linear-from":ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":ae()}],"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":ae()}],"mask-image-t-to-pos":[{"mask-t-to":ae()}],"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":ae()}],"mask-image-r-to-pos":[{"mask-r-to":ae()}],"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":ae()}],"mask-image-b-to-pos":[{"mask-b-to":ae()}],"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":ae()}],"mask-image-l-to-pos":[{"mask-l-to":ae()}],"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":ae()}],"mask-image-x-to-pos":[{"mask-x-to":ae()}],"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":ae()}],"mask-image-y-to-pos":[{"mask-y-to":ae()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[H,V]}],"mask-image-radial-from-pos":[{"mask-radial-from":ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":ae()}],"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":[Yn]}],"mask-image-conic-from-pos":[{"mask-conic-from":ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":ae()}],"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`,H,V]}],filter:[{filter:[``,`none`,H,V]}],blur:[{blur:oe()}],brightness:[{brightness:[Yn,H,V]}],contrast:[{contrast:[Yn,H,V]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,yr,pr]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:[``,Yn,H,V]}],"hue-rotate":[{"hue-rotate":[Yn,H,V]}],invert:[{invert:[``,Yn,H,V]}],saturate:[{saturate:[Yn,H,V]}],sepia:[{sepia:[``,Yn,H,V]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,H,V]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[Yn,H,V]}],"backdrop-contrast":[{"backdrop-contrast":[Yn,H,V]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Yn,H,V]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Yn,H,V]}],"backdrop-invert":[{"backdrop-invert":[``,Yn,H,V]}],"backdrop-opacity":[{"backdrop-opacity":[Yn,H,V]}],"backdrop-saturate":[{"backdrop-saturate":[Yn,H,V]}],"backdrop-sepia":[{"backdrop-sepia":[``,Yn,H,V]}],"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`,H,V]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Yn,`initial`,H,V]}],ease:[{ease:[`linear`,`initial`,_,H,V]}],delay:[{delay:[Yn,H,V]}],animate:[{animate:[`none`,v,H,V]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,H,V]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:se()}],"rotate-x":[{"rotate-x":se()}],"rotate-y":[{"rotate-y":se()}],"rotate-z":[{"rotate-z":se()}],scale:[{scale:ce()}],"scale-x":[{"scale-x":ce()}],"scale-y":[{"scale-y":ce()}],"scale-z":[{"scale-z":ce()}],"scale-3d":[`scale-3d`],skew:[{skew:le()}],"skew-x":[{"skew-x":le()}],"skew-y":[{"skew-y":le()}],transform:[{transform:[H,V,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ue()}],"translate-x":[{"translate-x":ue()}],"translate-y":[{"translate-y":ue()}],"translate-z":[{"translate-z":ue()}],"translate-none":[`translate-none`],zoom:[{zoom:[Xn,H,V]}],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`,H,V]}],"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`,H,V]}],fill:[{fill:[`none`,...I()]}],"stroke-w":[{stroke:[Yn,mr,sr,cr]}],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(an(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(`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`}]]),Gr=Hr(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),Kr=Hr(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),qr=Hr(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),Jr=Hr(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),Yr=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`}]]),Xr=Hr(`circle-plus`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}],[`path`,{d:`M12 8v8`,key:`napkw2`}]]),Zr=Hr(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),Qr=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`}]]),$r=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`}]]),ei=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`}]]),ti=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`}]]),ni=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`}]]),ri=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`}]]),ii=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`}]]),ai=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`}]]),oi=Hr(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),si=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`}]]),ci=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`}]]),li=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`}]]),ui=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`}]]),di=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`}]]),fi=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`}]]),pi=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`}]]),mi=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`}]]),hi=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`}]]),gi=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`}]]),_i=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`}]]),vi=Hr(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),yi=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`}]]),bi=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`}]]),xi=Hr(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Si=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`}]]),Ci=Hr(`smartphone`,[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]),wi=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`}]]),Ti=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`}]]),Ei=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`}]]),Di=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`}]]),Oi=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`}]]),ki=Hr(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Ai=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,ji=an,Mi=(e,t)=>n=>{if(t?.variants==null)return ji(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=Ai(t)||Ai(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 ji(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 Ni(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Pi(...e){return t=>{let n=!1,r=e.map(e=>{let r=Ni(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():Ni(e[t],null)}}}}function Fi(...e){return b.useCallback(Pi(...e),e)}function Ii(e){let t=b.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];Ki(r)&&typeof Xi==`function`&&(r=Xi(r._payload)),b.Children.forEach(r,e=>{if(Wi(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;Ki(n)&&typeof Xi==`function`&&(n=Xi(n._payload)),a=Vi(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?Ui(a):void 0,l=Fi(n,c);if(!a){if(r||r===0)throw Error(o?Yi(e):Ji(e));return r}let u=Hi(i,a.props??{});return a.type!==b.Fragment&&(u.ref=n?l:c),b.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}var Li=Ii(`Slot`),Ri=Symbol.for(`radix.slottable`);function zi(e){let t=e=>`child`in e?e.children(e.child):e.children;return t.displayName=`${e}.Slottable`,t.__radixId=Ri,t}var Bi=zi(`Slottable`),Vi=(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 Hi(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 Ui(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 Wi(e){return b.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Ri}var Gi=Symbol.for(`react.lazy`);function Ki(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Gi&&`_payload`in e&&qi(e._payload)}function qi(e){return typeof e==`object`&&!!e&&`then`in e}var Ji=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,Yi=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,Xi=b.use,Zi=Mi([`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 Qi({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,B.jsxs)(i?Li:`button`,{"data-slot":`button`,className:Mr(Zi({variant:t,size:n}),e),type:r,disabled:c||a,"aria-busy":a||void 0,...u,children:[a?(0,B.jsx)(oi,{className:`motion-safe:animate-spin`}):o,i?(0,B.jsx)(Bi,{children:l}):l,!a&&s?(0,B.jsx)(`span`,{"data-cta-icon-trailing":!0,children:s}):null]})}function $i(e,t){let n=getComputedStyle(e);return t*parseFloat(n.fontSize)}function ea(e,t){let n=getComputedStyle(e.ownerDocument.documentElement);return t*parseFloat(n.fontSize)}function ta(e){return e/100*window.innerHeight}function na(e){return e/100*window.innerWidth}function ra(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 ia({groupSize:e,panelElement:t,styleProp:n}){let r,[i,a]=ra(n);switch(a){case`%`:r=i/100*e;break;case`px`:r=i;break;case`rem`:r=ea(t,i);break;case`em`:r=$i(t,i);break;case`vh`:r=ta(i);break;case`vw`:r=na(i);break}return r}function aa(e){return parseFloat(e.toFixed(3))}function oa({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 sa(e){let{panels:t}=e,n=oa({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=aa(ia({groupSize:n,panelElement:t,styleProp:r.collapsedSize})/n*100));let a;r.defaultSize!==void 0&&(a=aa(ia({groupSize:n,panelElement:t,styleProp:r.defaultSize})/n*100));let o=0;r.minSize!==void 0&&(o=aa(ia({groupSize:n,panelElement:t,styleProp:r.minSize})/n*100));let s=100;return r.maxSize!==void 0&&(s=aa(ia({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 ca(e,t=`Assertion error`){if(!e)throw Error(t)}function la(e,t){return Array.from(t).sort(e===`horizontal`?ua:da)}function ua(e,t){let n=e.element.offsetLeft-t.element.offsetLeft;return n===0?e.element.offsetWidth-t.element.offsetWidth:n}function da(e,t){let n=e.element.offsetTop-t.element.offsetTop;return n===0?e.element.offsetHeight-t.element.offsetHeight:n}function fa(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.ELEMENT_NODE}function pa(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 ma({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}=pa(r,n),s=e===`horizontal`?t:o;s<a&&(a=s,i=n)}return ca(i,`No rect found`),i}var ha;function ga(){return ha===void 0&&(ha=typeof matchMedia==`function`&&!!matchMedia(`(pointer:coarse)`).matches),ha}function _a(e){let{element:t,orientation:n,panels:r,separators:i}=e,a=la(n,Array.from(t.children).filter(fa).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,ma({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=ga()?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:oa({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 va=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)}}},ya={cursorFlags:0,state:`inactive`},ba=new va;function xa(){return ya}function Sa(e){return ba.addListener(`change`,e)}function Ca(e){let t=ya,n={...ya};n.cursorFlags=e,ya=n,ba.emit(`change`,{prev:t,next:n})}function wa(e){let t=ya;ya=e,ba.emit(`change`,{prev:t,next:e})}var Ta=e=>e,Ea=()=>{},Da=1,Oa=2,ka=4,Aa=8,ja=3,Ma=12,Na;function Pa(){return Na===void 0&&(Na=!1,typeof window<`u`&&(window.navigator.userAgent.includes(`Chrome`)||window.navigator.userAgent.includes(`Firefox`))&&(Na=!0)),Na}function Fa({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&&Pa()){let t=(e&Da)!==0,n=(e&Oa)!==0,r=(e&ka)!==0,i=(e&Aa)!==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 Pa()?r>0&&i>0?`move`:r>0?`ew-resize`:`ns-resize`:r>0&&i>0?`grab`:r>0?`col-resize`:`row-resize`}}var Ia=new WeakMap;function La(e){if(e.defaultView===null||e.defaultView===void 0)return;let{prevStyle:t,styleSheet:n}=Ia.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=xa();switch(r.state){case`active`:case`hover`:{let e=Fa({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}Ia.set(e,{prevStyle:t,styleSheet:n})}var Ra=new Map,za=new va;function Ba(e){Ra=new Map(Ra),Ra.delete(e)}function Va(e,t){for(let[t]of Ra)if(t.id===e)return t}function Ha(e,t){for(let[t,n]of Ra)if(t.id===e)return n;if(t)throw Error(`Could not find data for Group with id ${e}`)}function Ua(){return Ra}function Wa(e,t){return za.addListener(`groupChange`,n=>{n.group.id===e&&t(n)})}function Ga(e,t,n){let r=Ra.get(e);Ra=new Map(Ra),Ra.set(e,t),za.emit(`groupChange`,{group:e,isUserInteraction:n?.isUserInteraction===!0,prev:r,next:t})}function Ka(e){let t=xa(),n=!1;switch(t.state){case`active`:wa({cursorFlags:0,state:`inactive`}),t.hitRegions.length>0&&(La(e),n=!0,t.hitRegions.forEach(e=>{let t=Ha(e.group.id,!0);Ga(e.group,t,{isUserInteraction:!0})}))}return n}function qa(e){e.defaultPrevented||Ka(e.currentTarget)}function Ja(e,t,n){let r,i={x:1/0,y:1/0};for(let a of t){let t=pa(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 Ya(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function Xa(e,t){if(e===t)throw Error(`Cannot compare node with itself`);let n={a:no(e),b:no(t)},r;for(;n.a.at(-1)===n.b.at(-1);)r=n.a.pop(),n.b.pop();ca(r,`Stacking order can only be calculated for elements with a common ancestor`);let i={a:to(eo(n.a)),b:to(eo(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 Za=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Qa(e){let t=getComputedStyle(ro(e)??e).display;return t===`flex`||t===`inline-flex`}function $a(e){let t=getComputedStyle(e);return!!(t.position===`fixed`||t.zIndex!==`auto`&&(t.position!==`static`||Qa(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`||Za.test(t.willChange)||t.webkitOverflowScrolling===`touch`)}function eo(e){let t=e.length;for(;t--;){let n=e[t];if(ca(n,`Missing node`),$a(n))return n}return null}function to(e){return e&&Number(getComputedStyle(e).zIndex)||0}function no(e){let t=[];for(;e;)t.push(e),e=ro(e);return t}function ro(e){let{parentNode:t}=e;return Ya(t)?t.host:t}function io(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 ao({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!fa(n)||n.contains(e)||e.contains(n))return!0;if(Xa(n,e)>0){let r=n;for(;r;){if(r.contains(e))return!0;if(io(r.getBoundingClientRect(),t))return!1;r=r.parentElement}}return!0}function oo(e,t){let n=[];return t.forEach((t,r)=>{if(r.disabled)return;let i=_a(r),a=Ja(r.orientation,i,{x:e.clientX,y:e.clientY});a&&a.distance.x<=0&&a.distance.y<=0&&ao({groupElement:r.element,hitRegion:a.hitRegion.rect,pointerEventTarget:e.target})&&n.push(a.hitRegion)}),n}function so(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 co(e,t,n=0){return Math.abs(aa(e)-aa(t))<=n}function lo(e,t){return co(e,t)?0:e>t?1:-1}function uo({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(lo(r,c)<0)if(a){let e=(i+c)/2;r=lo(r,e)<0?i:c}else r=c;return r=Math.min(s,r),r=aa(r),r}function fo({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:a}){if(co(e,0))return t;let o=a===`imperative-api`,s=Object.values(t),c=Object.values(i),l=[...s],[u,d]=r;ca(u!=null,`Invalid first pivot index`),ca(d!=null,`Invalid second pivot index`);let f=0;switch(a){case`keyboard`:{let t=e<0?d:u,r=n[t];ca(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(ca(n!=null,`Previous layout not found for panel index ${t}`),co(n,i)){let t=o-n;lo(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}{let t=e<0?u:d,r=n[t];ca(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(ca(n!=null,`Previous layout not found for panel index ${t}`),co(n,o)){let t=n-i;lo(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}break;default:{let t=e<0?d:u,r=n[t];ca(r,`Panel constraints not found for index ${t}`);let i=s[t],{collapsible:a,collapsedSize:o,minSize:c}=r;if(a&&lo(i,c)<0)if(e>0){let t=c-o,n=t/2;lo(i+e,c)<0&&(e=lo(e,n)<=0?0:t)}else{let t=c-o,n=100-t/2;lo(i-e,c)<0&&(e=lo(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];ca(e!=null,`Previous layout not found for panel index ${r}`);let a=uo({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];ca(i!=null,`Previous layout not found for panel index ${t}`);let a=i-r,c=uo({overrideDisabledPanels:o,panelConstraints:n[t],prevSize:i,size:a});if(!co(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(so(c,l))return i;{let t=e<0?d:u,r=s[t];ca(r!=null,`Previous layout not found for panel index ${t}`);let i=r+f,a=uo({overrideDisabledPanels:o,panelConstraints:n[t],prevSize:r,size:i});if(l[t]=a,!co(a,i)){let t=i-a,r=e<0?d:u;for(;r>=0&&r<n.length;){let i=l[r];ca(i!=null,`Previous layout not found for panel index ${r}`);let a=i+t,s=uo({overrideDisabledPanels:o,panelConstraints:n[r],prevSize:i,size:a});if(co(i,s)||(t-=s-i,l[r]=s),co(t,0))break;e>0?r--:r++}}}if(!co(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 po(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(t[n]===void 0||lo(e[n],t[n])!==0)return!1;return!0}function mo({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(!co(i,100)&&r.length>0)for(let e=0;e<t.length;e++){let t=r[e];ca(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];ca(i!=null,`No layout data found for index ${e}`);let o=r[e];ca(o!=null,`No layout data found for index ${e}`);let s=uo({overrideDisabledPanels:!0,panelConstraints:t[e],prevSize:i,size:o});o!=s&&(a+=o-s,r[e]=s)}if(!co(a,0))for(let e=0;e<t.length;e++){let n=r[e];ca(n!=null,`No layout data found for index ${e}`);let i=n+a,o=uo({overrideDisabledPanels:!0,panelConstraints:t[e],prevSize:n,size:i});if(n!==o&&(a-=o-n,r[e]=o,co(a,0)))break}let o=Object.keys(e);return r.reduce((e,t,n)=>(e[o[n]]=t,e),{})}function ho({groupId:e,panelId:t}){let n=()=>{let t=Ua();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&&co(n.collapsedSize,r[n.panelId])}))){let e=n.slice(0,s).reduce((e,t)=>e+r[t.id],0);return{...r,[t]:aa(100-e)}}return fo({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=mo({layout:o({nextSize:e,panels:i.panels,prevLayout:c,derivedPanelConstraints:r}),panelConstraints:r});po(c,u)||Ga(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&&co(t,n)},resize:e=>{let{group:t}=n(),{element:r}=i(),a=oa({group:t}),o=aa(ia({groupSize:a,panelElement:r,styleProp:e})/a*100);s(o)}}}function go(e){e.defaultPrevented||oo(e,Ua()).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=ho({groupId:t.group.id,panelId:n.id});i&&r!==void 0&&(i.resize(r),e.preventDefault())}}})}function _o(e){let t=Ua();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 vo({groupId:e}){let t=()=>{let t=Ua();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=mo({layout:e,panelConstraints:r});return n?o:(po(o,c)||Ga(i,{defaultLayoutDeferred:n,derivedPanelConstraints:r,groupSize:a,layout:c,separatorToPanels:s}),c)}}}function yo(e,t){let n=_o(e),r=Ha(n.id,!0),i=n.separators.find(t=>t.element===e);ca(i,`Matching separator not found`);let a=r.separatorToPanels.get(i);ca(a,`Matching panels not found`);let o=a.map(e=>n.panels.indexOf(e)),s=vo({groupId:n.id}).getLayout(),c=mo({layout:fo({delta:t,initialLayout:s,panelConstraints:r.derivedPanelConstraints,pivotIndices:o,prevLayout:s,trigger:`keyboard`}),panelConstraints:r.derivedPanelConstraints});po(s,c)||Ga(n,{defaultLayoutDeferred:r.defaultLayoutDeferred,derivedPanelConstraints:r.derivedPanelConstraints,groupSize:r.groupSize,layout:c,separatorToPanels:r.separatorToPanels},{isUserInteraction:!0})}function bo(e){if(e.defaultPrevented)return;let t=e.currentTarget,n=_o(t);if(!n.disabled)switch(e.key){case`ArrowDown`:e.preventDefault(),n.orientation===`vertical`&&yo(t,5);break;case`ArrowLeft`:e.preventDefault(),n.orientation===`horizontal`&&yo(t,-5);break;case`ArrowRight`:e.preventDefault(),n.orientation===`horizontal`&&yo(t,5);break;case`ArrowUp`:e.preventDefault(),n.orientation===`vertical`&&yo(t,-5);break;case`End`:e.preventDefault(),yo(t,100);break;case`Enter`:{e.preventDefault();let n=_o(t),{derivedPanelConstraints:r,layout:i,separatorToPanels:a}=Ha(n.id,!0),o=n.separators.find(e=>e.element===t);ca(o,`Matching separator not found`);let s=a.get(o);ca(s,`Matching panels not found`);let c=s[0],l=r.find(e=>e.panelId===c.id);if(ca(l,`Panel metadata not found`),l.collapsible){let e=i[c.id];yo(t,(l.collapsedSize===e?n.mutableState.expandedPanelSizes[c.id]??l.minSize:l.collapsedSize)-e)}break}case`F6`:{e.preventDefault();let n=_o(t).separators.map(e=>e.element),r=Array.from(n).findIndex(t=>t===e.currentTarget);ca(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(),yo(t,-100);break}}function xo(e){if(e.defaultPrevented||e.pointerType===`mouse`&&e.button>0)return;let t=Ua(),n=oo(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)}),wa({cursorFlags:0,hitRegions:n,initialLayoutMap:r,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:`active`}),n.length&&e.preventDefault()}function So({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=fo({delta:d,initialLayout:f,panelConstraints:h,pivotIndices:e.panels.map(e=>l.indexOf(e)),prevLayout:_,trigger:`mouse-or-touch`});if(po(t,_)){if(d!==0&&!u)switch(c){case`horizontal`:s|=d<0?Da:Oa;break;case`vertical`:s|=d<0?ka:Aa;break}}else Ga(e.group,{defaultLayoutDeferred:m,derivedPanelConstraints:h,groupSize:g,layout:t,separatorToPanels:v})}});let c=0;t.movementX===0?c|=o&ja:c|=s&ja,t.movementY===0?c|=o&Ma:c|=s&Ma,Ca(c),La(e)}function Co(e){let t=Ua(),n=xa();switch(n.state){case`active`:So({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:t,prevCursorFlags:n.cursorFlags})}}function wo(e){if(e.defaultPrevented)return;let t=xa(),n=Ua();switch(t.state){case`active`:if(e.buttons===0){wa({cursorFlags:0,state:`inactive`}),t.hitRegions.forEach(e=>{let t=Ha(e.group.id,!0);Ga(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)}So({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n,pointerDownAtPoint:t.pointerDownAtPoint,prevCursorFlags:t.cursorFlags});break;default:{let r=oo(e,n);r.length===0?t.state!==`inactive`&&wa({cursorFlags:0,state:`inactive`}):wa({cursorFlags:0,hitRegions:r,state:`hover`}),La(e.currentTarget);break}}}function To(e){if(e.relatedTarget instanceof HTMLIFrameElement)switch(xa().state){case`hover`:wa({cursorFlags:0,state:`inactive`})}}function Eo(e){e.defaultPrevented||e.pointerType===`mouse`&&e.button>0||Ka(e.currentTarget)&&e.preventDefault()}function Do(e){let t=0,n=0,r={};for(let i of e)if(i.defaultSize!==void 0){t++;let e=aa(i.defaultSize);n+=e,r[i.panelId]=e}else r[i.panelId]=void 0;let i=e.length-t;if(i!==0){let t=aa((100-n)/i);for(let n of e)n.defaultSize===void 0&&(r[n.panelId]=t)}return r}function Oo(e,t,n){if(!n[0])return;let r=e.panels.find(e=>e.element===t);if(!r||!r.onResize)return;let i=oa({group:e}),a=e.orientation===`horizontal`?r.element.offsetWidth:r.element.offsetHeight,o=r.mutableValues.prevSize,s={asPercentage:aa(a/i*100),inPixels:a};r.mutableValues.prevSize=s,r.onResize(s,r.id,o)}function ko(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 Ao({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=aa(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]=aa((r[e]??0)/a*l);else{let e=aa(l/c.length);for(let t of c)u[t]=e}return u}function jo(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 Mo=new Map;function No(e){let t=!0;ca(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=oa({group:e});if(t===0)return;let n=Ha(e.id);if(!n)return;let r=sa(e),i=n.defaultLayoutDeferred?Do(r):n.layout,a=mo({layout:Ao({group:e,nextGroupSize:t,prevGroupSize:n.groupSize,prevLayout:i}),panelConstraints:r});if(!n.defaultLayoutDeferred&&po(n.layout,a)&&ko(n.derivedPanelConstraints,r)&&n.groupSize===t)return;Ga(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:r,groupSize:t,layout:a,separatorToPanels:n.separatorToPanels})}}else Oo(e,i,n)}});a.observe(e.element),e.panels.forEach(e=>{ca(!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=oa({group:e}),s=sa(e),c=e.panels.map(({id:e})=>e).join(`,`),l=e.mutableState.defaultLayout;l&&(jo(e.panels,l)||(l=void 0));let u=mo({layout:e.mutableState.layouts[c]??l??Do(s),panelConstraints:s}),d=e.element.ownerDocument;Mo.set(d,(Mo.get(d)??0)+1);let f=new Map;return _a(e).forEach(e=>{e.separator&&f.set(e.separator,e.panels)}),Ga(e,{defaultLayoutDeferred:o===0,derivedPanelConstraints:s,groupSize:o,layout:u,separatorToPanels:f}),e.separators.forEach(e=>{ca(!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`,bo)}),Mo.get(d)===1&&(d.addEventListener(`contextmenu`,qa,!0),d.addEventListener(`dblclick`,go,!0),d.addEventListener(`pointerdown`,xo,!0),d.addEventListener(`pointerleave`,Co),d.addEventListener(`pointermove`,wo),d.addEventListener(`pointerout`,To),d.addEventListener(`pointerup`,Eo,!0)),function(){t=!1,Mo.set(d,Math.max(0,(Mo.get(d)??0)-1)),Ba(e),e.separators.forEach(e=>{e.element.removeEventListener(`keydown`,bo)}),Mo.get(d)||(d.removeEventListener(`contextmenu`,qa,!0),d.removeEventListener(`dblclick`,go,!0),d.removeEventListener(`pointerdown`,xo,!0),d.removeEventListener(`pointerleave`,Co),d.removeEventListener(`pointermove`,wo),d.removeEventListener(`pointerout`,To),d.removeEventListener(`pointerup`,Eo,!0)),a.disconnect()}}function Po(){let[e,t]=(0,b.useState)({});return[e,(0,b.useCallback)(()=>t({}),[])]}function Fo(e){let t=(0,b.useId)();return`${e??t}`}var Io=typeof window<`u`?b.useLayoutEffect:b.useEffect;function Lo(e){let t=(0,b.useRef)(e);return Io(()=>{t.current=e},[e]),(0,b.useCallback)((...e)=>t.current?.(...e),[t])}function Ro(...e){return Lo(t=>{e.forEach(e=>{if(e)switch(typeof e){case`function`:e(t);break;case`object`:e.current=t;break}})})}function zo(e){let t=(0,b.useRef)({...e});return Io(()=>{for(let n in e)t.current[n]=e[n]},[e]),t.current}var Bo=(0,b.createContext)(null);function Vo(e,t){let n=(0,b.useRef)({getLayout:()=>({}),setLayout:Ta});(0,b.useImperativeHandle)(t,()=>n.current,[]),Io(()=>{Object.assign(n.current,vo({groupId:e}))})}function Ho({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=Lo(e=>{po(m.current.onLayoutChange,e)||(m.current.onLayoutChange=e,c?.(e))}),g=Lo((e,t)=>{po(m.current.onLayoutChanged,e)||(m.current.onLayoutChanged=e,l?.(e,{isUserInteraction:t}))}),_=Fo(s),v=(0,b.useRef)(null),[y,x]=Po(),S=(0,b.useRef)({lastExpandedPanelSizes:{},layouts:{},panels:[],resizeTargetMinimumSize:d,separators:[]}),C=Ro(v,a);Vo(_,o);let w=Lo((e,t)=>{let r=xa(),i=Va(e),a=Ha(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=zo({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=la(u,[...t.panels,e]),x(),()=>{t.panels=t.panels.filter(t=>t!==e),x()}},registerSeparator:e=>{let t=S.current;return t.separators=la(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=Va(_),i=Ha(_);r&&i&&Ga(r,{...i,derivedPanelConstraints:sa(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 Io(()=>{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=No(r),{defaultLayoutDeferred:o,derivedPanelConstraints:s,layout:c}=Ha(r.id,!0);!o&&s.length>0&&(h(c),g(c,!1));let l=Wa(_,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=co(t.collapsedSize,i[t.panelId]),a=co(t.collapsedSize,n[t.panelId]);e&&!a&&(r.mutableState.expandedPanelSizes[t.panelId]=n[t.panelId])}}});let o=xa().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,B.jsx)(Bo.Provider,{value:E,children:(0,B.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})})}Ho.displayName=`Group`;function Uo(e,t){return`react-resizable-panels:${[e,...t].join(`:`)}`}function Wo({id:e,panelIds:t,storage:n}){let r=Uo(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 Go({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=Uo(o,n??[]),c=(0,b.useSyncExternalStore)(Ko,()=>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 Wo({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?Uo(o,Object.keys(e)):Uo(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 Ko(){return function(){}}function qo(){let e=(0,b.useContext)(Bo);return ca(e,`Group Context not found; did you render a Panel or Separator outside of a Group?`),e}function Jo(e,t){let{id:n}=qo(),r=(0,b.useRef)({collapse:Ea,expand:Ea,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:Ea});(0,b.useImperativeHandle)(t,()=>r.current,[]),Io(()=>{Object.assign(r.current,ho({groupId:n,panelId:e}))})}function Yo({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=Fo(c),_=zo({disabled:a}),v=(0,b.useRef)(null),y=Ro(v,o),{getPanelStyles:x,id:S,orientation:C,registerPanel:w,updatePanelProps:T}=qo(),E=d!==null,D=Lo((e,t,n)=>{d?.(e,c,n)});Io(()=>{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]),Jo(g,f);let O=()=>{let e=x(S,g);if(e)return JSON.stringify(e)},k=(0,b.useSyncExternalStore)(e=>Wa(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,B.jsx)(`div`,{...m,"data-disabled":a||void 0,"data-panel":!0,"data-testid":g,id:g,ref:y,style:{...Xo,display:`flex`,flexBasis:0,flexShrink:1,overflow:`visible`,...A},children:(0,B.jsx)(`div`,{className:t,style:{maxHeight:`100%`,maxWidth:`100%`,flexGrow:1,overflow:`auto`,...p,touchAction:C===`horizontal`?`pan-y`:`pan-x`},children:e})})}Yo.displayName=`Panel`;var Xo={minHeight:0,maxHeight:`100%`,height:`auto`,minWidth:0,maxWidth:`100%`,width:`auto`,border:`none`,borderWidth:0,padding:0,margin:0};function Zo({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=mo({layout:fo({delta:l-o,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e}),panelConstraints:t})[n],i=mo({layout:fo({delta:c-o,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e}),panelConstraints:t})[n]}return{valueControls:n,valueMax:i,valueMin:a,valueNow:o}}function Qo({children:e,className:t,disabled:n,disableDoubleClick:r,elementRef:i,id:a,style:o,...s}){let c=Fo(a),l=zo({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),_=Ro(g,i),{disableCursor:v,id:y,orientation:x,registerSeparator:S,updateSeparatorProps:C}=qo(),w=x===`horizontal`?`vertical`:`horizontal`;Io(()=>{let e=g.current;if(e!==null){let t={disabled:l.disabled,disableDoubleClick:l.disableDoubleClick,element:e,id:c},n=S(t),r=Sa(e=>{p(e.next.state!==`inactive`&&e.next.hitRegions.some(e=>e.separator===t)?e.next.state:`inactive`)}),i=Wa(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(Zo({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,B.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})}Qo.displayName=`Separator`;var $o=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},es=(e=>e?$o(e):$o),ts=e=>e;function ns(e,t=ts){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 rs=e=>{let t=es(e),n=e=>ns(t,e);return Object.assign(n,t),n},is=(e=>e?rs(e):rs),as=is()(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 os(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 ss=e=>t=>{try{let n=e(t);return n instanceof Promise?n:{then(e){return ss(e)(n)},catch(e){return this}}}catch(e){return{then(e){return this},catch(t){return ss(t)(e)}}}},cs=(e,t)=>(n,r,i)=>{let a={storage:os(()=>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 ss(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},ls={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}}},us=is()(cs(e=>({...ls,previewClient:null,setPreference:(t,n)=>e({[t]:n}),setPreviewClient:t=>e({previewClient:t})}),{name:`skybridge-devtools-inspector-preferences`,version:1,partialize:({previewClient:e,setPreference:t,setPreviewClient:n,...r})=>r})),ds=()=>{let{setPreference:e,setPreviewClient:t,previewClient:n,...r}=us.getState();return r},fs=globalThis.crypto;async function ps(e){return(await fs).getRandomValues(new Uint8Array(e))}async function ms(e){let t=``;for(;t.length<e;){let n=await ps(e-t.length);for(let e of n)e<198&&(t+=`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~`[e%66])}return t}async function hs(e){return await ms(e)}async function gs(e){let t=await(await fs).subtle.digest(`SHA-256`,new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,`_`).replace(/\+/g,`-`).replace(/=/g,``)}async function _s(e){if(e||=43,e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;let t=await hs(e);return{code_verifier:t,code_challenge:await gs(t)}}var vs,ys=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 bs=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},xs=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(vs=globalThis).__zod_globalConfig??(vs.__zod_globalConfig={});var Ss=globalThis.__zod_globalConfig;function Cs(e){return e&&Object.assign(Ss,e),Ss}function ws(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 Ts(e,t){return typeof t==`bigint`?t.toString():t}function Es(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error(`cached value already set`)}}}function Ds(e){return e==null}function Os(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function ks(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 As=Symbol(`evaluating`);function js(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==As)return r===void 0&&(r=As,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Ms(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Ns(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Ps(e){return JSON.stringify(e)}function Fs(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var Is=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Ls(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Rs=Es(()=>{if(Ss.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function zs(e){if(Ls(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(Ls(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function Bs(e){return zs(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var Vs=new Set([`string`,`number`,`symbol`]);function Hs(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Us(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Ws(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 Gs(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var Ks={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function qs(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 Us(e,Ns(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 Ms(this,`shape`,e),e},checks:[]}))}function Js(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 Us(e,Ns(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 Ms(this,`shape`,r),r},checks:[]}))}function Ys(e,t){if(!zs(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 Us(e,Ns(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Ms(this,`shape`,n),n}}))}function Xs(e,t){if(!zs(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return Us(e,Ns(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Ms(this,`shape`,n),n}}))}function Zs(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return Us(e,Ns(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return Ms(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Qs(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 Us(t,Ns(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 Ms(this,`shape`,i),i},checks:[]}))}function $s(e,t,n){return Us(t,Ns(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 Ms(this,`shape`,i),i}}))}function ec(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 tc(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 nc(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function rc(e){return typeof e==`string`?e:e?.message}function ic(e,t,n){let r=e.message?e.message:rc(e.inst?._zod.def?.error?.(e))??rc(t?.error?.(e))??rc(n.customError?.(e))??rc(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 ac(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function oc(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var sc=(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,Ts,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},cc=U(`$ZodError`,sc),lc=U(`$ZodError`,sc,{Parent:Error});function uc(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 dc(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 fc=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 bs;if(o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>ic(e,a,Cs())));throw Is(t,i?.callee),t}return o.value},pc=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=>ic(e,a,Cs())));throw Is(t,i?.callee),t}return o.value},mc=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 bs;return a.issues.length?{success:!1,error:new(e??cc)(a.issues.map(e=>ic(e,i,Cs())))}:{success:!0,data:a.value}},hc=mc(lc),gc=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=>ic(e,i,Cs())))}:{success:!0,data:a.value}},_c=gc(lc),vc=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return fc(e)(t,n,i)},yc=e=>(t,n,r)=>fc(e)(t,n,r),bc=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return pc(e)(t,n,i)},xc=e=>async(t,n,r)=>pc(e)(t,n,r),Sc=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return mc(e)(t,n,i)},Cc=e=>(t,n,r)=>mc(e)(t,n,r),wc=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return gc(e)(t,n,i)},Tc=e=>async(t,n,r)=>gc(e)(t,n,r),Ec=/^[cC][0-9a-z]{6,}$/,Dc=/^[0-9a-z]+$/,Oc=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,kc=/^[0-9a-vA-V]{20}$/,Ac=/^[A-Za-z0-9]{27}$/,jc=/^[a-zA-Z0-9_-]{21}$/,Mc=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Nc=/^([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})$/,Pc=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)$/,Fc=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Ic=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function Lc(){return new RegExp(Ic,`u`)}var Rc=/^(?:(?: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])$/,zc=/^(([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}|:))$/,Bc=/^((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])$/,Vc=/^(([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])$/,Hc=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Uc=/^[A-Za-z0-9_-]*$/,Wc=/^https?$/,Gc=/^\+[1-9]\d{6,14}$/,Kc=`(?:(?:\\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])))`,qc=RegExp(`^${Kc}$`);function Jc(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 Yc(e){return RegExp(`^${Jc(e)}$`)}function Xc(e){let t=Jc({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(`^${Kc}T(?:${r})$`)}var Zc=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},Qc=/^-?\d+$/,$c=/^-?\d+(?:\.\d+)?$/,el=/^(?:true|false)$/i,tl=/^null$/i,nl=/^[^A-Z]*$/,rl=/^[^a-z]*$/,il=U(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),al={number:`number`,bigint:`bigint`,object:`date`},ol=U(`$ZodCheckLessThan`,(e,t)=>{il.init(e,t);let n=al[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})}}),sl=U(`$ZodCheckGreaterThan`,(e,t)=>{il.init(e,t);let n=al[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})}}),cl=U(`$ZodCheckMultipleOf`,(e,t)=>{il.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):ks(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})}}),ll=U(`$ZodCheckNumberFormat`,(e,t)=>{il.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Ks[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=Qc)}),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})}}),ul=U(`$ZodCheckMaxLength`,(e,t)=>{var n;il.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Ds(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=ac(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),dl=U(`$ZodCheckMinLength`,(e,t)=>{var n;il.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Ds(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=ac(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),fl=U(`$ZodCheckLengthEquals`,(e,t)=>{var n;il.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Ds(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=ac(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})}}),pl=U(`$ZodCheckStringFormat`,(e,t)=>{var n,r;il.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=()=>{})}),ml=U(`$ZodCheckRegex`,(e,t)=>{pl.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})}}),hl=U(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=nl,pl.init(e,t)}),gl=U(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=rl,pl.init(e,t)}),_l=U(`$ZodCheckIncludes`,(e,t)=>{il.init(e,t);let n=Hs(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})}}),vl=U(`$ZodCheckStartsWith`,(e,t)=>{il.init(e,t);let n=RegExp(`^${Hs(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})}}),yl=U(`$ZodCheckEndsWith`,(e,t)=>{il.init(e,t);let n=RegExp(`.*${Hs(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})}}),bl=U(`$ZodCheckOverwrite`,(e,t)=>{il.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),xl=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
+ `))}},Sl={major:4,minor:4,patch:3},Cl=U(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Sl;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=ec(e),i;for(let a of t){if(a._zod.def.when){if(tc(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 bs;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=ec(e,t))});else{if(e.issues.length===t)continue;r||=ec(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(ec(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new bs;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 bs;return o.then(e=>t(e,r,a))}return t(o,r,a)}}js(e,`~standard`,()=>({validate:t=>{try{let n=hc(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return _c(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),wl=U(`$ZodString`,(e,t)=>{Cl.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Zc(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}}),Tl=U(`$ZodStringFormat`,(e,t)=>{pl.init(e,t),wl.init(e,t)}),El=U(`$ZodGUID`,(e,t)=>{t.pattern??=Nc,Tl.init(e,t)}),Dl=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??=Pc(e)}else t.pattern??=Pc();Tl.init(e,t)}),Ol=U(`$ZodEmail`,(e,t)=>{t.pattern??=Fc,Tl.init(e,t)}),kl=U(`$ZodURL`,(e,t)=>{Tl.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===Wc.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})}}}),Al=U(`$ZodEmoji`,(e,t)=>{t.pattern??=Lc(),Tl.init(e,t)}),jl=U(`$ZodNanoID`,(e,t)=>{t.pattern??=jc,Tl.init(e,t)}),Ml=U(`$ZodCUID`,(e,t)=>{t.pattern??=Ec,Tl.init(e,t)}),Nl=U(`$ZodCUID2`,(e,t)=>{t.pattern??=Dc,Tl.init(e,t)}),Pl=U(`$ZodULID`,(e,t)=>{t.pattern??=Oc,Tl.init(e,t)}),Fl=U(`$ZodXID`,(e,t)=>{t.pattern??=kc,Tl.init(e,t)}),Il=U(`$ZodKSUID`,(e,t)=>{t.pattern??=Ac,Tl.init(e,t)}),Ll=U(`$ZodISODateTime`,(e,t)=>{t.pattern??=Xc(t),Tl.init(e,t)}),Rl=U(`$ZodISODate`,(e,t)=>{t.pattern??=qc,Tl.init(e,t)}),zl=U(`$ZodISOTime`,(e,t)=>{t.pattern??=Yc(t),Tl.init(e,t)}),Bl=U(`$ZodISODuration`,(e,t)=>{t.pattern??=Mc,Tl.init(e,t)}),Vl=U(`$ZodIPv4`,(e,t)=>{t.pattern??=Rc,Tl.init(e,t),e._zod.bag.format=`ipv4`}),Hl=U(`$ZodIPv6`,(e,t)=>{t.pattern??=zc,Tl.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})}}}),Ul=U(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Bc,Tl.init(e,t)}),Wl=U(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Vc,Tl.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 Gl(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Kl=U(`$ZodBase64`,(e,t)=>{t.pattern??=Hc,Tl.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{Gl(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function ql(e){if(!Uc.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Gl(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Jl=U(`$ZodBase64URL`,(e,t)=>{t.pattern??=Uc,Tl.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{ql(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Yl=U(`$ZodE164`,(e,t)=>{t.pattern??=Gc,Tl.init(e,t)});function Xl(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 Zl=U(`$ZodJWT`,(e,t)=>{Tl.init(e,t),e._zod.check=n=>{Xl(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Ql=U(`$ZodNumber`,(e,t)=>{Cl.init(e,t),e._zod.pattern=e._zod.bag.pattern??$c,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}}),$l=U(`$ZodNumberFormat`,(e,t)=>{ll.init(e,t),Ql.init(e,t)}),eu=U(`$ZodBoolean`,(e,t)=>{Cl.init(e,t),e._zod.pattern=el,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}}),tu=U(`$ZodNull`,(e,t)=>{Cl.init(e,t),e._zod.pattern=tl,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}}),nu=U(`$ZodAny`,(e,t)=>{Cl.init(e,t),e._zod.parse=e=>e}),ru=U(`$ZodUnknown`,(e,t)=>{Cl.init(e,t),e._zod.parse=e=>e}),iu=U(`$ZodNever`,(e,t)=>{Cl.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function au(e,t,n){e.issues.length&&t.issues.push(...nc(n,e.issues)),t.value[n]=e.value}var ou=U(`$ZodArray`,(e,t)=>{Cl.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=>au(t,n,e))):au(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function su(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...nc(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 cu(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=Gs(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function lu(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=>su(e,n,i,t,u,d))):su(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 uu=U(`$ZodObject`,(e,t)=>{if(Cl.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=Es(()=>cu(t));js(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=Ls,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=>su(n,t,e,s,r,i))):su(a,t,e,s,r,i)}return i?lu(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),du=U(`$ZodObjectJIT`,(e,t)=>{uu.init(e,t);let n=e._zod.parse,r=Es(()=>cu(t)),i=e=>{let t=new xl([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=Ps(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=Ps(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=Ls,s=!Ss.jitless,c=s&&Rs.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?lu([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function fu(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=>!ec(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=>ic(e,r,Cs())))}),t)}var pu=U(`$ZodUnion`,(e,t)=>{Cl.init(e,t),js(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),js(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),js(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),js(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=>Os(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=>fu(t,r,e,i)):fu(o,r,e,i)}}),mu=U(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,pu.init(e,t);let n=e._zod.parse;js(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=Es(()=>{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(!Ls(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)}}),hu=U(`$ZodIntersection`,(e,t)=>{Cl.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])=>_u(e,t,n)):_u(e,i,a)}});function gu(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(zs(e)&&zs(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=gu(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=gu(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 _u(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}),ec(e))return e;let o=gu(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var vu=U(`$ZodRecord`,(e,t)=>{Cl.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!zs(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=>ic(e,r,Cs())),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(...nc(c,e.issues)),n.value[l]=e.value})):(u.issues.length&&n.issues.push(...nc(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`&&$c.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=>ic(e,r,Cs())),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(...nc(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...nc(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),yu=U(`$ZodEnum`,(e,t)=>{Cl.init(e,t);let n=ws(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>Vs.has(typeof e)).map(e=>typeof e==`string`?Hs(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}}),bu=U(`$ZodLiteral`,(e,t)=>{if(Cl.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`?Hs(e):e?Hs(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}}),xu=U(`$ZodTransform`,(e,t)=>{Cl.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new xs(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 bs;return n.value=i,n.fallback=!0,n}});function Su(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var Cu=U(`$ZodOptional`,(e,t)=>{Cl.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,js(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),js(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Os(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=>Su(e,r)):Su(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),wu=U(`$ZodExactOptional`,(e,t)=>{Cu.init(e,t),js(e._zod,`values`,()=>t.innerType._zod.values),js(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Tu=U(`$ZodNullable`,(e,t)=>{Cl.init(e,t),js(e._zod,`optin`,()=>t.innerType._zod.optin),js(e._zod,`optout`,()=>t.innerType._zod.optout),js(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Os(e.source)}|null)$`):void 0}),js(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)}),Eu=U(`$ZodDefault`,(e,t)=>{Cl.init(e,t),e._zod.optin=`optional`,js(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=>Du(e,t)):Du(r,t)}});function Du(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Ou=U(`$ZodPrefault`,(e,t)=>{Cl.init(e,t),e._zod.optin=`optional`,js(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))}),ku=U(`$ZodNonOptional`,(e,t)=>{Cl.init(e,t),js(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=>Au(t,e)):Au(i,e)}});function Au(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 ju=U(`$ZodCatch`,(e,t)=>{Cl.init(e,t),e._zod.optin=`optional`,js(e._zod,`optout`,()=>t.innerType._zod.optout),js(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=>ic(e,n,Cs()))},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=>ic(e,n,Cs()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),Mu=U(`$ZodPipe`,(e,t)=>{Cl.init(e,t),js(e._zod,`values`,()=>t.in._zod.values),js(e._zod,`optin`,()=>t.in._zod.optin),js(e._zod,`optout`,()=>t.out._zod.optout),js(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=>Nu(e,t.in,n)):Nu(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Nu(e,t.out,n)):Nu(r,t.out,n)}});function Nu(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 Pu=U(`$ZodPreprocess`,(e,t)=>{Mu.init(e,t)}),Fu=U(`$ZodReadonly`,(e,t)=>{Cl.init(e,t),js(e._zod,`propValues`,()=>t.innerType._zod.propValues),js(e._zod,`values`,()=>t.innerType._zod.values),js(e._zod,`optin`,()=>t.innerType?._zod?.optin),js(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(Iu):Iu(r)}});function Iu(e){return e.value=Object.freeze(e.value),e}var Lu=U(`$ZodCustom`,(e,t)=>{il.init(e,t),Cl.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=>Ru(t,n,r,e));Ru(i,n,r,e)}});function Ru(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(oc(e))}}var zu,Bu=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 Vu(){return new Bu}(zu=globalThis).__zod_globalRegistry??(zu.__zod_globalRegistry=Vu());var Hu=globalThis.__zod_globalRegistry;function Uu(e,t){return new e({type:`string`,...Ws(t)})}function Wu(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...Ws(t)})}function Gu(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...Ws(t)})}function Ku(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...Ws(t)})}function qu(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...Ws(t)})}function Ju(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...Ws(t)})}function Yu(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...Ws(t)})}function Xu(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...Ws(t)})}function Zu(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...Ws(t)})}function Qu(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...Ws(t)})}function $u(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...Ws(t)})}function ed(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...Ws(t)})}function td(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...Ws(t)})}function nd(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...Ws(t)})}function rd(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...Ws(t)})}function id(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...Ws(t)})}function ad(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...Ws(t)})}function od(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...Ws(t)})}function sd(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...Ws(t)})}function cd(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...Ws(t)})}function ld(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...Ws(t)})}function ud(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...Ws(t)})}function dd(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...Ws(t)})}function fd(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...Ws(t)})}function pd(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...Ws(t)})}function md(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...Ws(t)})}function hd(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...Ws(t)})}function gd(e,t){return new e({type:`number`,checks:[],...Ws(t)})}function _d(e,t){return new e({type:`number`,coerce:!0,checks:[],...Ws(t)})}function vd(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...Ws(t)})}function yd(e,t){return new e({type:`boolean`,...Ws(t)})}function bd(e,t){return new e({type:`null`,...Ws(t)})}function xd(e){return new e({type:`any`})}function Sd(e){return new e({type:`unknown`})}function Cd(e,t){return new e({type:`never`,...Ws(t)})}function wd(e,t){return new ol({check:`less_than`,...Ws(t),value:e,inclusive:!1})}function Td(e,t){return new ol({check:`less_than`,...Ws(t),value:e,inclusive:!0})}function Ed(e,t){return new sl({check:`greater_than`,...Ws(t),value:e,inclusive:!1})}function Dd(e,t){return new sl({check:`greater_than`,...Ws(t),value:e,inclusive:!0})}function Od(e,t){return new cl({check:`multiple_of`,...Ws(t),value:e})}function kd(e,t){return new ul({check:`max_length`,...Ws(t),maximum:e})}function Ad(e,t){return new dl({check:`min_length`,...Ws(t),minimum:e})}function jd(e,t){return new fl({check:`length_equals`,...Ws(t),length:e})}function Md(e,t){return new ml({check:`string_format`,format:`regex`,...Ws(t),pattern:e})}function Nd(e){return new hl({check:`string_format`,format:`lowercase`,...Ws(e)})}function Pd(e){return new gl({check:`string_format`,format:`uppercase`,...Ws(e)})}function Fd(e,t){return new _l({check:`string_format`,format:`includes`,...Ws(t),includes:e})}function Id(e,t){return new vl({check:`string_format`,format:`starts_with`,...Ws(t),prefix:e})}function Ld(e,t){return new yl({check:`string_format`,format:`ends_with`,...Ws(t),suffix:e})}function Rd(e){return new bl({check:`overwrite`,tx:e})}function zd(e){return Rd(t=>t.normalize(e))}function Bd(){return Rd(e=>e.trim())}function Vd(){return Rd(e=>e.toLowerCase())}function Hd(){return Rd(e=>e.toUpperCase())}function Ud(){return Rd(e=>Fs(e))}function Wd(e,t,n){return new e({type:`array`,element:t,...Ws(n)})}function Gd(e,t,n){let r=Ws(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function Kd(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...Ws(n)})}function qd(e,t){let n=Jd(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(oc(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(oc(r))}},e(t.value,t)),t);return n}function Jd(e,t){let n=new il({check:`custom`,...Ws(t)});return n._zod.check=e,n}function Yd(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??Hu,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 Xd(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,Xd(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`&&$d(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 Zd(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 Qd(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:tf(t,`input`,e.processors),output:tf(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function $d(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 $d(r.element,n);if(r.type===`set`)return $d(r.valueType,n);if(r.type===`lazy`)return $d(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 $d(r.innerType,n);if(r.type===`intersection`)return $d(r.left,n)||$d(r.right,n);if(r.type===`record`||r.type===`map`)return $d(r.keyType,n)||$d(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:$d(r.in,n)||$d(r.out,n);if(r.type===`object`){for(let e in r.shape)if($d(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if($d(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if($d(e,n))return!0;return!!(r.rest&&$d(r.rest,n))}return!1}var ef=(e,t={})=>n=>{let r=Yd({...n,processors:t});return Xd(e,r),Zd(r,e),Qd(r,e)},tf=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Yd({...i??{},target:a,io:t,processors:n});return Xd(e,o),Zd(o,e),Qd(o,e)},nf={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},rf=(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=nf[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}))])}},af=(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)},of=(e,t,n,r)=>{n.type=`boolean`},sf=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},cf=(e,t,n,r)=>{n.not={}},lf=(e,t,n,r)=>{let i=e._zod.def,a=ws(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},uf=(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},df=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},ff=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},pf=(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=Xd(a.element,t,{...r,path:[...r.path,`items`]})},mf=(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]=Xd(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=Xd(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},hf=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>Xd(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},gf=(e,t,n,r)=>{let i=e._zod.def,a=Xd(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=Xd(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]]},_f=(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=Xd(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=Xd(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=Xd(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=Xd(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`}]},yf=(e,t,n,r)=>{let i=e._zod.def;Xd(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},bf=(e,t,n,r)=>{let i=e._zod.def;Xd(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},xf=(e,t,n,r)=>{let i=e._zod.def;Xd(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)))},Sf=(e,t,n,r)=>{let i=e._zod.def;Xd(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},Cf=(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;Xd(o,t,r);let s=t.seen.get(e);s.ref=o},wf=(e,t,n,r)=>{let i=e._zod.def;Xd(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Tf=(e,t,n,r)=>{let i=e._zod.def;Xd(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Ef=U(`ZodISODateTime`,(e,t)=>{Ll.init(e,t),Qf.init(e,t)});function Df(e){return fd(Ef,e)}var Of=U(`ZodISODate`,(e,t)=>{Rl.init(e,t),Qf.init(e,t)});function kf(e){return pd(Of,e)}var Af=U(`ZodISOTime`,(e,t)=>{zl.init(e,t),Qf.init(e,t)});function jf(e){return md(Af,e)}var Mf=U(`ZodISODuration`,(e,t)=>{Bl.init(e,t),Qf.init(e,t)});function Nf(e){return hd(Mf,e)}var Pf=U(`ZodError`,(e,t)=>{cc.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>dc(e,t)},flatten:{value:t=>uc(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Ts,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Ts,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),Ff=fc(Pf),If=pc(Pf),Lf=mc(Pf),Rf=gc(Pf),zf=vc(Pf),Bf=yc(Pf),Vf=bc(Pf),Hf=xc(Pf),Uf=Sc(Pf),Wf=Cc(Pf),Gf=wc(Pf),Kf=Tc(Pf),qf=new WeakMap;function Jf(e,t,n){let r=Object.getPrototypeOf(e),i=qf.get(r);if(i||(i=new Set,qf.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 Yf=U(`ZodType`,(e,t)=>(Cl.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:tf(e,`input`),output:tf(e,`output`)}}),e.toJSONSchema=ef(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>Ff(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Lf(e,t,n),e.parseAsync=async(t,n)=>If(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Rf(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>zf(e,t,n),e.decode=(t,n)=>Bf(e,t,n),e.encodeAsync=async(t,n)=>Vf(e,t,n),e.decodeAsync=async(t,n)=>Hf(e,t,n),e.safeEncode=(t,n)=>Uf(e,t,n),e.safeDecode=(t,n)=>Wf(e,t,n),e.safeEncodeAsync=async(t,n)=>Gf(e,t,n),e.safeDecodeAsync=async(t,n)=>Kf(e,t,n),Jf(e,`ZodType`,{check(...e){let t=this.def;return this.clone(Ns(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 Us(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(dm(e,t))},superRefine(e,t){return this.check(fm(e,t))},overwrite(e){return this.check(Rd(e))},optional(){return Xp(this)},exactOptional(){return eee(this)},nullable(){return Qp(this)},nullish(){return Xp(Qp(this))},nonoptional(e){return im(this,e)},array(){return G(this)},or(e){return Lp([this,e])},and(e){return Vp(this,e)},transform(e){return om(this,Jp(e))},default(e){return em(this,e)},prefault(e){return nm(this,e)},catch(e){return ree(this,e)},pipe(e){return om(this,e)},readonly(){return cm(this)},describe(e){let t=this.clone();return Hu.add(t,{description:e}),t},meta(...e){if(e.length===0)return Hu.get(this);let t=this.clone();return Hu.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 Hu.get(e)?.description},configurable:!0}),e)),Xf=U(`_ZodString`,(e,t)=>{wl.init(e,t),Yf.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rf(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Jf(e,`_ZodString`,{regex(...e){return this.check(Md(...e))},includes(...e){return this.check(Fd(...e))},startsWith(...e){return this.check(Id(...e))},endsWith(...e){return this.check(Ld(...e))},min(...e){return this.check(Ad(...e))},max(...e){return this.check(kd(...e))},length(...e){return this.check(jd(...e))},nonempty(...e){return this.check(Ad(1,...e))},lowercase(e){return this.check(Nd(e))},uppercase(e){return this.check(Pd(e))},trim(){return this.check(Bd())},normalize(...e){return this.check(zd(...e))},toLowerCase(){return this.check(Vd())},toUpperCase(){return this.check(Hd())},slugify(){return this.check(Ud())}})}),Zf=U(`ZodString`,(e,t)=>{wl.init(e,t),Xf.init(e,t),e.email=t=>e.check(Wu($f,t)),e.url=t=>e.check(Xu(np,t)),e.jwt=t=>e.check(dd(vp,t)),e.emoji=t=>e.check(Zu(ip,t)),e.guid=t=>e.check(Gu(ep,t)),e.uuid=t=>e.check(Ku(tp,t)),e.uuidv4=t=>e.check(qu(tp,t)),e.uuidv6=t=>e.check(Ju(tp,t)),e.uuidv7=t=>e.check(Yu(tp,t)),e.nanoid=t=>e.check(Qu(ap,t)),e.guid=t=>e.check(Gu(ep,t)),e.cuid=t=>e.check($u(op,t)),e.cuid2=t=>e.check(ed(sp,t)),e.ulid=t=>e.check(td(cp,t)),e.base64=t=>e.check(cd(hp,t)),e.base64url=t=>e.check(ld(gp,t)),e.xid=t=>e.check(nd(lp,t)),e.ksuid=t=>e.check(rd(up,t)),e.ipv4=t=>e.check(id(dp,t)),e.ipv6=t=>e.check(ad(fp,t)),e.cidrv4=t=>e.check(od(pp,t)),e.cidrv6=t=>e.check(sd(mp,t)),e.e164=t=>e.check(ud(_p,t)),e.datetime=t=>e.check(Df(t)),e.date=t=>e.check(kf(t)),e.time=t=>e.check(jf(t)),e.duration=t=>e.check(Nf(t))});function W(e){return Uu(Zf,e)}var Qf=U(`ZodStringFormat`,(e,t)=>{Tl.init(e,t),Xf.init(e,t)}),$f=U(`ZodEmail`,(e,t)=>{Ol.init(e,t),Qf.init(e,t)}),ep=U(`ZodGUID`,(e,t)=>{El.init(e,t),Qf.init(e,t)}),tp=U(`ZodUUID`,(e,t)=>{Dl.init(e,t),Qf.init(e,t)}),np=U(`ZodURL`,(e,t)=>{kl.init(e,t),Qf.init(e,t)});function rp(e){return Xu(np,e)}var ip=U(`ZodEmoji`,(e,t)=>{Al.init(e,t),Qf.init(e,t)}),ap=U(`ZodNanoID`,(e,t)=>{jl.init(e,t),Qf.init(e,t)}),op=U(`ZodCUID`,(e,t)=>{Ml.init(e,t),Qf.init(e,t)}),sp=U(`ZodCUID2`,(e,t)=>{Nl.init(e,t),Qf.init(e,t)}),cp=U(`ZodULID`,(e,t)=>{Pl.init(e,t),Qf.init(e,t)}),lp=U(`ZodXID`,(e,t)=>{Fl.init(e,t),Qf.init(e,t)}),up=U(`ZodKSUID`,(e,t)=>{Il.init(e,t),Qf.init(e,t)}),dp=U(`ZodIPv4`,(e,t)=>{Vl.init(e,t),Qf.init(e,t)}),fp=U(`ZodIPv6`,(e,t)=>{Hl.init(e,t),Qf.init(e,t)}),pp=U(`ZodCIDRv4`,(e,t)=>{Ul.init(e,t),Qf.init(e,t)}),mp=U(`ZodCIDRv6`,(e,t)=>{Wl.init(e,t),Qf.init(e,t)}),hp=U(`ZodBase64`,(e,t)=>{Kl.init(e,t),Qf.init(e,t)}),gp=U(`ZodBase64URL`,(e,t)=>{Jl.init(e,t),Qf.init(e,t)}),_p=U(`ZodE164`,(e,t)=>{Yl.init(e,t),Qf.init(e,t)}),vp=U(`ZodJWT`,(e,t)=>{Zl.init(e,t),Qf.init(e,t)}),yp=U(`ZodNumber`,(e,t)=>{Ql.init(e,t),Yf.init(e,t),e._zod.processJSONSchema=(t,n,r)=>af(e,t,n,r),Jf(e,`ZodNumber`,{gt(e,t){return this.check(Ed(e,t))},gte(e,t){return this.check(Dd(e,t))},min(e,t){return this.check(Dd(e,t))},lt(e,t){return this.check(wd(e,t))},lte(e,t){return this.check(Td(e,t))},max(e,t){return this.check(Td(e,t))},int(e){return this.check(Sp(e))},safe(e){return this.check(Sp(e))},positive(e){return this.check(Ed(0,e))},nonnegative(e){return this.check(Dd(0,e))},negative(e){return this.check(wd(0,e))},nonpositive(e){return this.check(Td(0,e))},multipleOf(e,t){return this.check(Od(e,t))},step(e,t){return this.check(Od(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 bp(e){return gd(yp,e)}var xp=U(`ZodNumberFormat`,(e,t)=>{$l.init(e,t),yp.init(e,t)});function Sp(e){return vd(xp,e)}var Cp=U(`ZodBoolean`,(e,t)=>{eu.init(e,t),Yf.init(e,t),e._zod.processJSONSchema=(t,n,r)=>of(e,t,n,r)});function wp(e){return yd(Cp,e)}var Tp=U(`ZodNull`,(e,t)=>{tu.init(e,t),Yf.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sf(e,t,n,r)});function Ep(e){return bd(Tp,e)}var Dp=U(`ZodAny`,(e,t)=>{nu.init(e,t),Yf.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Op(){return xd(Dp)}var kp=U(`ZodUnknown`,(e,t)=>{ru.init(e,t),Yf.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Ap(){return Sd(kp)}var jp=U(`ZodNever`,(e,t)=>{iu.init(e,t),Yf.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cf(e,t,n,r)});function Mp(e){return Cd(jp,e)}var Np=U(`ZodArray`,(e,t)=>{ou.init(e,t),Yf.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pf(e,t,n,r),e.element=t.element,Jf(e,`ZodArray`,{min(e,t){return this.check(Ad(e,t))},nonempty(e){return this.check(Ad(1,e))},max(e,t){return this.check(kd(e,t))},length(e,t){return this.check(jd(e,t))},unwrap(){return this.element}})});function G(e,t){return Wd(Np,e,t)}var Pp=U(`ZodObject`,(e,t)=>{du.init(e,t),Yf.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mf(e,t,n,r),js(e,`shape`,()=>t.shape),Jf(e,`ZodObject`,{keyof(){return Gp(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:Ap()})},loose(){return this.clone({...this._zod.def,catchall:Ap()})},strict(){return this.clone({...this._zod.def,catchall:Mp()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return Ys(this,e)},safeExtend(e){return Xs(this,e)},merge(e){return Zs(this,e)},pick(e){return qs(this,e)},omit(e){return Js(this,e)},partial(...e){return Qs(Yp,this,e[0])},required(...e){return $s(rm,this,e[0])}})});function K(e,t){return new Pp({type:`object`,shape:e??{},...Ws(t)})}function Fp(e,t){return new Pp({type:`object`,shape:e,catchall:Ap(),...Ws(t)})}var Ip=U(`ZodUnion`,(e,t)=>{pu.init(e,t),Yf.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hf(e,t,n,r),e.options=t.options});function Lp(e,t){return new Ip({type:`union`,options:e,...Ws(t)})}var Rp=U(`ZodDiscriminatedUnion`,(e,t)=>{Ip.init(e,t),mu.init(e,t)});function zp(e,t,n){return new Rp({type:`union`,options:t,discriminator:e,...Ws(n)})}var Bp=U(`ZodIntersection`,(e,t)=>{hu.init(e,t),Yf.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gf(e,t,n,r)});function Vp(e,t){return new Bp({type:`intersection`,left:e,right:t})}var Hp=U(`ZodRecord`,(e,t)=>{vu.init(e,t),Yf.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_f(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function Up(e,t,n){return!t||!t._zod?new Hp({type:`record`,keyType:W(),valueType:e,...Ws(t)}):new Hp({type:`record`,keyType:e,valueType:t,...Ws(n)})}var Wp=U(`ZodEnum`,(e,t)=>{yu.init(e,t),Yf.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lf(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 Wp({...t,checks:[],...Ws(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 Wp({...t,checks:[],...Ws(r),entries:i})}});function Gp(e,t){return new Wp({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...Ws(t)})}var Kp=U(`ZodLiteral`,(e,t)=>{bu.init(e,t),Yf.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uf(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 q(e,t){return new Kp({type:`literal`,values:Array.isArray(e)?e:[e],...Ws(t)})}var qp=U(`ZodTransform`,(e,t)=>{xu.init(e,t),Yf.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ff(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new xs(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(oc(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(oc(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 Jp(e){return new qp({type:`transform`,transform:e})}var Yp=U(`ZodOptional`,(e,t)=>{Cu.init(e,t),Yf.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Tf(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Xp(e){return new Yp({type:`optional`,innerType:e})}var Zp=U(`ZodExactOptional`,(e,t)=>{wu.init(e,t),Yf.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Tf(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function eee(e){return new Zp({type:`optional`,innerType:e})}var tee=U(`ZodNullable`,(e,t)=>{Tu.init(e,t),Yf.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vf(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Qp(e){return new tee({type:`nullable`,innerType:e})}var $p=U(`ZodDefault`,(e,t)=>{Eu.init(e,t),Yf.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bf(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function em(e,t){return new $p({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Bs(t)}})}var tm=U(`ZodPrefault`,(e,t)=>{Ou.init(e,t),Yf.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xf(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function nm(e,t){return new tm({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Bs(t)}})}var rm=U(`ZodNonOptional`,(e,t)=>{ku.init(e,t),Yf.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yf(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function im(e,t){return new rm({type:`nonoptional`,innerType:e,...Ws(t)})}var nee=U(`ZodCatch`,(e,t)=>{ju.init(e,t),Yf.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Sf(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function ree(e,t){return new nee({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var am=U(`ZodPipe`,(e,t)=>{Mu.init(e,t),Yf.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Cf(e,t,n,r),e.in=t.in,e.out=t.out});function om(e,t){return new am({type:`pipe`,in:e,out:t})}var iee=U(`ZodPreprocess`,(e,t)=>{am.init(e,t),Pu.init(e,t)}),sm=U(`ZodReadonly`,(e,t)=>{Fu.init(e,t),Yf.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wf(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function cm(e){return new sm({type:`readonly`,innerType:e})}var lm=U(`ZodCustom`,(e,t)=>{Lu.init(e,t),Yf.init(e,t),e._zod.processJSONSchema=(t,n,r)=>df(e,t,n,r)});function um(e,t){return Gd(lm,e??(()=>!0),t)}function dm(e,t={}){return Kd(lm,e,t)}function fm(e,t){return qd(e,t)}function pm(e,t){return new iee({type:`pipe`,in:Jp(e),out:t})}var mm={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`},hm;hm||={};function gm(e){return _d(yp,e)}var _m=`2025-11-25`,vm=[_m,`2025-06-18`,`2025-03-26`,`2024-11-05`,`2024-10-07`],ym=`io.modelcontextprotocol/related-task`,bm=um(e=>e!==null&&(typeof e==`object`||typeof e==`function`)),xm=Lp([W(),bp().int()]),Sm=W();Fp({ttl:bp().optional(),pollInterval:bp().optional()});var aee=K({ttl:bp().optional()}),oee=K({taskId:W()}),Cm=Fp({progressToken:xm.optional(),[ym]:oee.optional()}),wm=K({_meta:Cm.optional()}),Tm=wm.extend({task:aee.optional()}),see=e=>Tm.safeParse(e).success,Em=K({method:W(),params:wm.loose().optional()}),Dm=K({_meta:Cm.optional()}),Om=K({method:W(),params:Dm.loose().optional()}),km=Fp({_meta:Cm.optional()}),Am=Lp([W(),bp().int()]),jm=K({jsonrpc:q(`2.0`),id:Am,...Em.shape}).strict(),Mm=e=>jm.safeParse(e).success,Nm=K({jsonrpc:q(`2.0`),...Om.shape}).strict(),Pm=e=>Nm.safeParse(e).success,Fm=K({jsonrpc:q(`2.0`),id:Am,result:km}).strict(),Im=e=>Fm.safeParse(e).success,Lm;(function(e){e[e.ConnectionClosed=-32e3]=`ConnectionClosed`,e[e.RequestTimeout=-32001]=`RequestTimeout`,e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`})(Lm||={});var Rm=K({jsonrpc:q(`2.0`),id:Am.optional(),error:K({code:bp().int(),message:W(),data:Ap().optional()})}).strict(),zm=e=>Rm.safeParse(e).success,Bm=Lp([jm,Nm,Fm,Rm]);Lp([Fm,Rm]);var Vm=km.strict(),Hm=Dm.extend({requestId:Am.optional(),reason:W().optional()}),Um=Om.extend({method:q(`notifications/cancelled`),params:Hm}),Wm=K({icons:G(K({src:W(),mimeType:W().optional(),sizes:G(W()).optional(),theme:Gp([`light`,`dark`]).optional()})).optional()}),Gm=K({name:W(),title:W().optional()}),Km=Gm.extend({...Gm.shape,...Wm.shape,version:W(),websiteUrl:W().optional(),description:W().optional()}),qm=pm(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Vp(K({form:Vp(K({applyDefaults:wp().optional()}),Up(W(),Ap())).optional(),url:bm.optional()}),Up(W(),Ap()).optional())),Jm=Fp({list:bm.optional(),cancel:bm.optional(),requests:Fp({sampling:Fp({createMessage:bm.optional()}).optional(),elicitation:Fp({create:bm.optional()}).optional()}).optional()}),Ym=Fp({list:bm.optional(),cancel:bm.optional(),requests:Fp({tools:Fp({call:bm.optional()}).optional()}).optional()}),Xm=K({experimental:Up(W(),bm).optional(),sampling:K({context:bm.optional(),tools:bm.optional()}).optional(),elicitation:qm.optional(),roots:K({listChanged:wp().optional()}).optional(),tasks:Jm.optional(),extensions:Up(W(),bm).optional()}),Zm=wm.extend({protocolVersion:W(),capabilities:Xm,clientInfo:Km}),Qm=Em.extend({method:q(`initialize`),params:Zm}),$m=K({experimental:Up(W(),bm).optional(),logging:bm.optional(),completions:bm.optional(),prompts:K({listChanged:wp().optional()}).optional(),resources:K({subscribe:wp().optional(),listChanged:wp().optional()}).optional(),tools:K({listChanged:wp().optional()}).optional(),tasks:Ym.optional(),extensions:Up(W(),bm).optional()}),eh=km.extend({protocolVersion:W(),capabilities:$m,serverInfo:Km,instructions:W().optional()}),th=Om.extend({method:q(`notifications/initialized`),params:Dm.optional()}),cee=e=>th.safeParse(e).success,nh=Em.extend({method:q(`ping`),params:wm.optional()}),lee=K({progress:bp(),total:Xp(bp()),message:Xp(W())}),uee=K({...Dm.shape,...lee.shape,progressToken:xm}),rh=Om.extend({method:q(`notifications/progress`),params:uee}),dee=wm.extend({cursor:Sm.optional()}),ih=Em.extend({params:dee.optional()}),ah=km.extend({nextCursor:Sm.optional()}),fee=Gp([`working`,`input_required`,`completed`,`failed`,`cancelled`]),oh=K({taskId:W(),status:fee,ttl:Lp([bp(),Ep()]),createdAt:W(),lastUpdatedAt:W(),pollInterval:Xp(bp()),statusMessage:Xp(W())}),sh=km.extend({task:oh}),pee=Dm.merge(oh),ch=Om.extend({method:q(`notifications/tasks/status`),params:pee}),lh=Em.extend({method:q(`tasks/get`),params:wm.extend({taskId:W()})}),uh=km.merge(oh),dh=Em.extend({method:q(`tasks/result`),params:wm.extend({taskId:W()})});km.loose();var fh=ih.extend({method:q(`tasks/list`)}),ph=ah.extend({tasks:G(oh)}),mh=Em.extend({method:q(`tasks/cancel`),params:wm.extend({taskId:W()})}),hh=km.merge(oh),gh=K({uri:W(),mimeType:Xp(W()),_meta:Up(W(),Ap()).optional()}),_h=gh.extend({text:W()}),vh=W().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),yh=gh.extend({blob:vh}),bh=Gp([`user`,`assistant`]),xh=K({audience:G(bh).optional(),priority:bp().min(0).max(1).optional(),lastModified:Df({offset:!0}).optional()}),Sh=K({...Gm.shape,...Wm.shape,uri:W(),description:Xp(W()),mimeType:Xp(W()),size:Xp(bp()),annotations:xh.optional(),_meta:Xp(Fp({}))}),Ch=K({...Gm.shape,...Wm.shape,uriTemplate:W(),description:Xp(W()),mimeType:Xp(W()),annotations:xh.optional(),_meta:Xp(Fp({}))}),wh=ih.extend({method:q(`resources/list`)}),Th=ah.extend({resources:G(Sh)}),Eh=ih.extend({method:q(`resources/templates/list`)}),Dh=ah.extend({resourceTemplates:G(Ch)}),Oh=wm.extend({uri:W()}),kh=Oh,Ah=Em.extend({method:q(`resources/read`),params:kh}),jh=km.extend({contents:G(Lp([_h,yh]))}),Mh=Om.extend({method:q(`notifications/resources/list_changed`),params:Dm.optional()}),Nh=Oh,Ph=Em.extend({method:q(`resources/subscribe`),params:Nh}),Fh=Oh,Ih=Em.extend({method:q(`resources/unsubscribe`),params:Fh}),Lh=Dm.extend({uri:W()}),Rh=Om.extend({method:q(`notifications/resources/updated`),params:Lh}),zh=K({name:W(),description:Xp(W()),required:Xp(wp())}),Bh=K({...Gm.shape,...Wm.shape,description:Xp(W()),arguments:Xp(G(zh)),_meta:Xp(Fp({}))}),Vh=ih.extend({method:q(`prompts/list`)}),Hh=ah.extend({prompts:G(Bh)}),Uh=wm.extend({name:W(),arguments:Up(W(),W()).optional()}),Wh=Em.extend({method:q(`prompts/get`),params:Uh}),Gh=K({type:q(`text`),text:W(),annotations:xh.optional(),_meta:Up(W(),Ap()).optional()}),Kh=K({type:q(`image`),data:vh,mimeType:W(),annotations:xh.optional(),_meta:Up(W(),Ap()).optional()}),qh=K({type:q(`audio`),data:vh,mimeType:W(),annotations:xh.optional(),_meta:Up(W(),Ap()).optional()}),Jh=K({type:q(`tool_use`),name:W(),id:W(),input:Up(W(),Ap()),_meta:Up(W(),Ap()).optional()}),Yh=K({type:q(`resource`),resource:Lp([_h,yh]),annotations:xh.optional(),_meta:Up(W(),Ap()).optional()}),Xh=Lp([Gh,Kh,qh,Sh.extend({type:q(`resource_link`)}),Yh]),Zh=K({role:bh,content:Xh}),Qh=km.extend({description:W().optional(),messages:G(Zh)}),$h=Om.extend({method:q(`notifications/prompts/list_changed`),params:Dm.optional()}),eg=K({title:W().optional(),readOnlyHint:wp().optional(),destructiveHint:wp().optional(),idempotentHint:wp().optional(),openWorldHint:wp().optional()}),tg=K({taskSupport:Gp([`required`,`optional`,`forbidden`]).optional()}),ng=K({...Gm.shape,...Wm.shape,description:W().optional(),inputSchema:K({type:q(`object`),properties:Up(W(),bm).optional(),required:G(W()).optional()}).catchall(Ap()),outputSchema:K({type:q(`object`),properties:Up(W(),bm).optional(),required:G(W()).optional()}).catchall(Ap()).optional(),annotations:eg.optional(),execution:tg.optional(),_meta:Up(W(),Ap()).optional()}),mee=ih.extend({method:q(`tools/list`)}),rg=ah.extend({tools:G(ng)}),ig=km.extend({content:G(Xh).default([]),structuredContent:Up(W(),Ap()).optional(),isError:wp().optional()});ig.or(km.extend({toolResult:Ap()}));var hee=Tm.extend({name:W(),arguments:Up(W(),Ap()).optional()}),gee=Em.extend({method:q(`tools/call`),params:hee}),ag=Om.extend({method:q(`notifications/tools/list_changed`),params:Dm.optional()}),_ee=K({autoRefresh:wp().default(!0),debounceMs:bp().int().nonnegative().default(300)}),og=Gp([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),vee=wm.extend({level:og}),yee=Em.extend({method:q(`logging/setLevel`),params:vee}),bee=Dm.extend({level:og,logger:W().optional(),data:Ap()}),xee=Om.extend({method:q(`notifications/message`),params:bee}),See=K({hints:G(K({name:W().optional()})).optional(),costPriority:bp().min(0).max(1).optional(),speedPriority:bp().min(0).max(1).optional(),intelligencePriority:bp().min(0).max(1).optional()}),Cee=K({mode:Gp([`auto`,`required`,`none`]).optional()}),wee=K({type:q(`tool_result`),toolUseId:W().describe(`The unique identifier for the corresponding tool call.`),content:G(Xh).default([]),structuredContent:K({}).loose().optional(),isError:wp().optional(),_meta:Up(W(),Ap()).optional()}),Tee=zp(`type`,[Gh,Kh,qh]),sg=zp(`type`,[Gh,Kh,qh,Jh,wee]),Eee=K({role:bh,content:Lp([sg,G(sg)]),_meta:Up(W(),Ap()).optional()}),Dee=Tm.extend({messages:G(Eee),modelPreferences:See.optional(),systemPrompt:W().optional(),includeContext:Gp([`none`,`thisServer`,`allServers`]).optional(),temperature:bp().optional(),maxTokens:bp().int(),stopSequences:G(W()).optional(),metadata:bm.optional(),tools:G(ng).optional(),toolChoice:Cee.optional()}),cg=Em.extend({method:q(`sampling/createMessage`),params:Dee}),lg=km.extend({model:W(),stopReason:Xp(Gp([`endTurn`,`stopSequence`,`maxTokens`]).or(W())),role:bh,content:Tee}),ug=km.extend({model:W(),stopReason:Xp(Gp([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(W())),role:bh,content:Lp([sg,G(sg)])}),Oee=K({type:q(`boolean`),title:W().optional(),description:W().optional(),default:wp().optional()}),kee=K({type:q(`string`),title:W().optional(),description:W().optional(),minLength:bp().optional(),maxLength:bp().optional(),format:Gp([`email`,`uri`,`date`,`date-time`]).optional(),default:W().optional()}),Aee=K({type:Gp([`number`,`integer`]),title:W().optional(),description:W().optional(),minimum:bp().optional(),maximum:bp().optional(),default:bp().optional()}),jee=K({type:q(`string`),title:W().optional(),description:W().optional(),enum:G(W()),default:W().optional()}),Mee=K({type:q(`string`),title:W().optional(),description:W().optional(),oneOf:G(K({const:W(),title:W()})),default:W().optional()}),Nee=Lp([Lp([K({type:q(`string`),title:W().optional(),description:W().optional(),enum:G(W()),enumNames:G(W()).optional(),default:W().optional()}),Lp([jee,Mee]),Lp([K({type:q(`array`),title:W().optional(),description:W().optional(),minItems:bp().optional(),maxItems:bp().optional(),items:K({type:q(`string`),enum:G(W())}),default:G(W()).optional()}),K({type:q(`array`),title:W().optional(),description:W().optional(),minItems:bp().optional(),maxItems:bp().optional(),items:K({anyOf:G(K({const:W(),title:W()}))}),default:G(W()).optional()})])]),Oee,kee,Aee]),Pee=Lp([Tm.extend({mode:q(`form`).optional(),message:W(),requestedSchema:K({type:q(`object`),properties:Up(W(),Nee),required:G(W()).optional()})}),Tm.extend({mode:q(`url`),message:W(),elicitationId:W(),url:W().url()})]),dg=Em.extend({method:q(`elicitation/create`),params:Pee}),Fee=Dm.extend({elicitationId:W()}),Iee=Om.extend({method:q(`notifications/elicitation/complete`),params:Fee}),fg=km.extend({action:Gp([`accept`,`decline`,`cancel`]),content:pm(e=>e===null?void 0:e,Up(W(),Lp([W(),bp(),wp(),G(W())])).optional())}),Lee=K({type:q(`ref/resource`),uri:W()}),Ree=K({type:q(`ref/prompt`),name:W()}),zee=wm.extend({ref:Lp([Ree,Lee]),argument:K({name:W(),value:W()}),context:K({arguments:Up(W(),W()).optional()}).optional()}),Bee=Em.extend({method:q(`completion/complete`),params:zee}),pg=km.extend({completion:Fp({values:G(W()).max(100),total:Xp(bp().int()),hasMore:Xp(wp())})}),Vee=K({uri:W().startsWith(`file://`),name:W().optional(),_meta:Up(W(),Ap()).optional()}),Hee=Em.extend({method:q(`roots/list`),params:wm.optional()}),Uee=km.extend({roots:G(Vee)}),Wee=Om.extend({method:q(`notifications/roots/list_changed`),params:Dm.optional()});Lp([nh,Qm,Bee,yee,Wh,Vh,wh,Eh,Ah,Ph,Ih,gee,mee,lh,dh,fh,mh]),Lp([Um,rh,th,Wee,ch]),Lp([Vm,lg,ug,fg,Uee,uh,ph,sh]),Lp([nh,cg,dg,Hee,lh,dh,fh,mh]),Lp([Um,rh,xee,Rh,Mh,ag,$h,ch,Iee]),Lp([Vm,eh,pg,Qh,Hh,Th,Dh,jh,ig,rg,uh,ph,sh]);var mg=class e extends Error{constructor(e,t,n){super(`MCP error ${e}: ${t}`),this.code=e,this.data=n,this.name=`McpError`}static fromError(t,n,r){if(t===Lm.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new Gee(e.elicitations,n)}return new e(t,n,r)}},Gee=class extends mg{constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(Lm.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},hg=rp().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:mm.custom,message:`URL must be parseable`,fatal:!0}),ys}).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`}),gg=Fp({resource:W().url(),authorization_servers:G(hg).optional(),jwks_uri:W().url().optional(),scopes_supported:G(W()).optional(),bearer_methods_supported:G(W()).optional(),resource_signing_alg_values_supported:G(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:wp().optional(),authorization_details_types_supported:G(W()).optional(),dpop_signing_alg_values_supported:G(W()).optional(),dpop_bound_access_tokens_required:wp().optional()}),_g=Fp({issuer:W(),authorization_endpoint:hg,token_endpoint:hg,registration_endpoint:hg.optional(),scopes_supported:G(W()).optional(),response_types_supported:G(W()),response_modes_supported:G(W()).optional(),grant_types_supported:G(W()).optional(),token_endpoint_auth_methods_supported:G(W()).optional(),token_endpoint_auth_signing_alg_values_supported:G(W()).optional(),service_documentation:hg.optional(),revocation_endpoint:hg.optional(),revocation_endpoint_auth_methods_supported:G(W()).optional(),revocation_endpoint_auth_signing_alg_values_supported:G(W()).optional(),introspection_endpoint:W().optional(),introspection_endpoint_auth_methods_supported:G(W()).optional(),introspection_endpoint_auth_signing_alg_values_supported:G(W()).optional(),code_challenge_methods_supported:G(W()).optional(),client_id_metadata_document_supported:wp().optional()}),vg=K({...Fp({issuer:W(),authorization_endpoint:hg,token_endpoint:hg,userinfo_endpoint:hg.optional(),jwks_uri:hg,registration_endpoint:hg.optional(),scopes_supported:G(W()).optional(),response_types_supported:G(W()),response_modes_supported:G(W()).optional(),grant_types_supported:G(W()).optional(),acr_values_supported:G(W()).optional(),subject_types_supported:G(W()),id_token_signing_alg_values_supported:G(W()),id_token_encryption_alg_values_supported:G(W()).optional(),id_token_encryption_enc_values_supported:G(W()).optional(),userinfo_signing_alg_values_supported:G(W()).optional(),userinfo_encryption_alg_values_supported:G(W()).optional(),userinfo_encryption_enc_values_supported:G(W()).optional(),request_object_signing_alg_values_supported:G(W()).optional(),request_object_encryption_alg_values_supported:G(W()).optional(),request_object_encryption_enc_values_supported:G(W()).optional(),token_endpoint_auth_methods_supported:G(W()).optional(),token_endpoint_auth_signing_alg_values_supported:G(W()).optional(),display_values_supported:G(W()).optional(),claim_types_supported:G(W()).optional(),claims_supported:G(W()).optional(),service_documentation:W().optional(),claims_locales_supported:G(W()).optional(),ui_locales_supported:G(W()).optional(),claims_parameter_supported:wp().optional(),request_parameter_supported:wp().optional(),request_uri_parameter_supported:wp().optional(),require_request_uri_registration:wp().optional(),op_policy_uri:hg.optional(),op_tos_uri:hg.optional(),client_id_metadata_document_supported:wp().optional()}).shape,..._g.pick({code_challenge_methods_supported:!0}).shape}),yg=K({access_token:W(),id_token:W().optional(),token_type:W(),expires_in:gm().optional(),scope:W().optional(),refresh_token:W().optional()}).strip(),bg=K({error:W(),error_description:W().optional(),error_uri:W().optional()}),xg=hg.optional().or(q(``).transform(()=>void 0)),Sg=K({redirect_uris:G(hg),token_endpoint_auth_method:W().optional(),grant_types:G(W()).optional(),response_types:G(W()).optional(),client_name:W().optional(),client_uri:hg.optional(),logo_uri:xg,scope:W().optional(),contacts:G(W()).optional(),tos_uri:xg,policy_uri:W().optional(),jwks_uri:hg.optional(),jwks:Op().optional(),software_id:W().optional(),software_version:W().optional(),software_statement:W().optional()}).strip(),Cg=K({client_id:W(),client_secret:W().optional(),client_id_issued_at:bp().optional(),client_secret_expires_at:bp().optional()}).strip(),wg=Sg.merge(Cg);K({error:W(),error_description:W().optional()}).strip(),K({token:W(),token_type_hint:W().optional()}).strip();function Tg(e){let t=typeof e==`string`?new URL(e):new URL(e.href);return t.hash=``,t}function Eg({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 Dg=class extends Error{constructor(e,t){super(e),this.errorUri=t,this.name=this.constructor.name}toResponseObject(){let e={error:this.errorCode,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}get errorCode(){return this.constructor.errorCode}},Og=class extends Dg{};Og.errorCode=`invalid_request`;var kg=class extends Dg{};kg.errorCode=`invalid_client`;var Ag=class extends Dg{};Ag.errorCode=`invalid_grant`;var jg=class extends Dg{};jg.errorCode=`unauthorized_client`;var Mg=class extends Dg{};Mg.errorCode=`unsupported_grant_type`;var Ng=class extends Dg{};Ng.errorCode=`invalid_scope`;var Pg=class extends Dg{};Pg.errorCode=`access_denied`;var Fg=class extends Dg{};Fg.errorCode=`server_error`;var Ig=class extends Dg{};Ig.errorCode=`temporarily_unavailable`;var Lg=class extends Dg{};Lg.errorCode=`unsupported_response_type`;var Rg=class extends Dg{};Rg.errorCode=`unsupported_token_type`;var zg=class extends Dg{};zg.errorCode=`invalid_token`;var Bg=class extends Dg{};Bg.errorCode=`method_not_allowed`;var Vg=class extends Dg{};Vg.errorCode=`too_many_requests`;var Hg=class extends Dg{};Hg.errorCode=`invalid_client_metadata`;var Ug=class extends Dg{};Ug.errorCode=`insufficient_scope`;var Wg=class extends Dg{};Wg.errorCode=`invalid_target`;var Gg={[Og.errorCode]:Og,[kg.errorCode]:kg,[Ag.errorCode]:Ag,[jg.errorCode]:jg,[Mg.errorCode]:Mg,[Ng.errorCode]:Ng,[Pg.errorCode]:Pg,[Fg.errorCode]:Fg,[Ig.errorCode]:Ig,[Lg.errorCode]:Lg,[Rg.errorCode]:Rg,[zg.errorCode]:zg,[Bg.errorCode]:Bg,[Vg.errorCode]:Vg,[Hg.errorCode]:Hg,[Ug.errorCode]:Ug,[Wg.errorCode]:Wg},Kg=class extends Error{constructor(e){super(e??`Unauthorized`)}};function qg(e){return[`client_secret_basic`,`client_secret_post`,`none`].includes(e)}var Jg=`code`,Yg=`S256`;function Xg(e,t){let n=e.client_secret!==void 0;return`token_endpoint_auth_method`in e&&e.token_endpoint_auth_method&&qg(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 Zg(e,t,n,r){let{client_id:i,client_secret:a}=t;switch(e){case`client_secret_basic`:Qg(i,a,n);return;case`client_secret_post`:$g(i,a,r);return;case`none`:e_(i,r);return;default:throw Error(`Unsupported client authentication method: ${e}`)}}function Qg(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 $g(e,t,n){n.set(`client_id`,e),t&&n.set(`client_secret`,t)}function e_(e,t){t.set(`client_id`,e)}async function t_(e){let t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{let{error:e,error_description:t,error_uri:r}=bg.parse(JSON.parse(n));return new(Gg[e]||Fg)(t||``,r)}catch(e){return new Fg(`${t?`HTTP ${t}: `:``}Invalid OAuth error response: ${e}. Raw body: ${n}`)}}async function n_(e,t){try{return await r_(e,t)}catch(n){if(n instanceof kg||n instanceof jg)return await e.invalidateCredentials?.(`all`),await r_(e,t);if(n instanceof Ag)return await e.invalidateCredentials?.(`tokens`),await r_(e,t);throw n}}async function r_(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:i,fetchFn:a}){let o=await e.discoveryState?.(),s,c,l,u=i;if(!u&&o?.resourceMetadataUrl&&(u=new URL(o.resourceMetadataUrl)),o?.authorizationServerUrl){if(c=o.authorizationServerUrl,s=o.resourceMetadata,l=o.authorizationServerMetadata??await h_(c,{fetchFn:a}),!s)try{s=await c_(t,{resourceMetadataUrl:u},a)}catch{}(l!==o.authorizationServerMetadata||s!==o.resourceMetadata)&&await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:u?.toString(),resourceMetadata:s,authorizationServerMetadata:l})}else{let n=await g_(t,{resourceMetadataUrl:u,fetchFn:a});c=n.authorizationServerUrl,l=n.authorizationServerMetadata,s=n.resourceMetadata,await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:u?.toString(),resourceMetadata:s,authorizationServerMetadata:l})}let d=await a_(t,e,s),f=r||s?.scopes_supported?.join(` `)||e.clientMetadata.scope,p=await Promise.resolve(e.clientInformation());if(!p){if(n!==void 0)throw Error(`Existing OAuth client information is required when exchanging an authorization code`);let t=l?.client_id_metadata_document_supported===!0,r=e.clientMetadataUrl;if(r&&!i_(r))throw new Hg(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${r}`);if(t&&r)p={client_id:r},await e.saveClientInformation?.(p);else{if(!e.saveClientInformation)throw Error(`OAuth client information must be saveable for dynamic registration`);let t=await S_(c,{metadata:l,clientMetadata:e.clientMetadata,scope:f,fetchFn:a});await e.saveClientInformation(t),p=t}}let m=!e.redirectUrl;if(n!==void 0||m){let t=await x_(e,c,{metadata:l,resource:d,authorizationCode:n,fetchFn:a});return await e.saveTokens(t),`AUTHORIZED`}let h=await e.tokens();if(h?.refresh_token)try{let t=await b_(c,{metadata:l,clientInformation:p,refreshToken:h.refresh_token,resource:d,addClientAuthentication:e.addClientAuthentication,fetchFn:a});return await e.saveTokens(t),`AUTHORIZED`}catch(e){if(!(!(e instanceof Dg)||e instanceof Fg))throw e}let g=e.state?await e.state():void 0,{authorizationUrl:_,codeVerifier:v}=await __(c,{metadata:l,clientInformation:p,state:g,redirectUrl:e.redirectUrl,scope:f,resource:d});return await e.saveCodeVerifier(v),await e.redirectToAuthorization(_),`REDIRECT`}function i_(e){if(!e)return!1;try{let t=new URL(e);return t.protocol===`https:`&&t.pathname!==`/`}catch{return!1}}async function a_(e,t,n){let r=Tg(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!Eg({requestedResource:r,configuredResource:n.resource}))throw Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function o_(e){let t=e.headers.get(`WWW-Authenticate`);if(!t)return{};let[n,r]=t.split(` `);if(n.toLowerCase()!==`bearer`||!r)return{};let i=s_(e,`resource_metadata`)||void 0,a;if(i)try{a=new URL(i)}catch{}let o=s_(e,`scope`)||void 0,s=s_(e,`error`)||void 0;return{resourceMetadataUrl:a,scope:o,error:s}}function s_(e,t){let n=e.headers.get(`WWW-Authenticate`);if(!n)return null;let r=RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),i=n.match(r);return i?i[1]||i[2]:null}async function c_(e,t,n=fetch){let r=await p_(e,`oauth-protected-resource`,n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.body?.cancel(),Error(`Resource server does not implement OAuth 2.0 Protected Resource Metadata.`);if(!r.ok)throw await r.body?.cancel(),Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return gg.parse(await r.json())}async function l_(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?l_(e,void 0,n):void 0;throw r}}function u_(e,t=``,n={}){return t.endsWith(`/`)&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function d_(e,t,n=fetch){return await l_(e,{"MCP-Protocol-Version":t},n)}function f_(e,t){return!e||e.status>=400&&e.status<500&&t!==`/`}async function p_(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=u_(t,i.pathname);o=new URL(e,r?.metadataServerUrl??i),o.search=i.search}let s=await d_(o,a,n);return!r?.metadataUrl&&f_(s,i.pathname)&&(s=await d_(new URL(`/.well-known/${t}`,i),a,n)),s}function m_(e){let t=typeof e==`string`?new URL(e):e,n=t.pathname!==`/`,r=[];if(!n)return r.push({url:new URL(`/.well-known/oauth-authorization-server`,t.origin),type:`oauth`}),r.push({url:new URL(`/.well-known/openid-configuration`,t.origin),type:`oidc`}),r;let i=t.pathname;return i.endsWith(`/`)&&(i=i.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${i}`,t.origin),type:`oauth`}),r.push({url:new URL(`/.well-known/openid-configuration${i}`,t.origin),type:`oidc`}),r.push({url:new URL(`${i}/.well-known/openid-configuration`,t.origin),type:`oidc`}),r}async function h_(e,{fetchFn:t=fetch,protocolVersion:n=_m}={}){let r={"MCP-Protocol-Version":n,Accept:`application/json`},i=m_(e);for(let{url:e,type:n}of i){let i=await l_(e,r,t);if(i){if(!i.ok){if(await i.body?.cancel(),i.status>=400&&i.status<500)continue;throw Error(`HTTP ${i.status} trying to load ${n===`oauth`?`OAuth`:`OpenID provider`} metadata from ${e}`)}return n===`oauth`?_g.parse(await i.json()):vg.parse(await i.json())}}}async function g_(e,t){let n,r;try{n=await c_(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),n.authorization_servers&&n.authorization_servers.length>0&&(r=n.authorization_servers[0])}catch{}r||=String(new URL(`/`,e));let i=await h_(r,{fetchFn:t?.fetchFn});return{authorizationServerUrl:r,authorizationServerMetadata:i,resourceMetadata:n}}async function __(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(Jg))throw Error(`Incompatible auth server: does not support response type ${Jg}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(Yg))throw Error(`Incompatible auth server: does not support code challenge method ${Yg}`)}else s=new URL(`/authorize`,e);let c=await _s(),l=c.code_verifier,u=c.code_challenge;return s.searchParams.set(`response_type`,Jg),s.searchParams.set(`client_id`,n.client_id),s.searchParams.set(`code_challenge`,u),s.searchParams.set(`code_challenge_method`,Yg),s.searchParams.set(`redirect_uri`,String(r)),a&&s.searchParams.set(`state`,a),i&&s.searchParams.set(`scope`,i),i?.includes(`offline_access`)&&s.searchParams.append(`prompt`,`consent`),o&&s.searchParams.set(`resource`,o.href),{authorizationUrl:s,codeVerifier:l}}function v_(e,t,n){return new URLSearchParams({grant_type:`authorization_code`,code:e,code_verifier:t,redirect_uri:String(n)})}async function y_(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:i,resource:a,fetchFn:o}){let s=t?.token_endpoint?new URL(t.token_endpoint):new URL(`/token`,e),c=new Headers({"Content-Type":`application/x-www-form-urlencoded`,Accept:`application/json`});a&&n.set(`resource`,a.href),i?await i(c,n,s,t):r&&Zg(Xg(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 t_(l);return yg.parse(await l.json())}async function b_(e,{metadata:t,clientInformation:n,refreshToken:r,resource:i,addClientAuthentication:a,fetchFn:o}){return{refresh_token:r,...await y_(e,{metadata:t,tokenRequestParams:new URLSearchParams({grant_type:`refresh_token`,refresh_token:r}),clientInformation:n,addClientAuthentication:a,resource:i,fetchFn:o})}}async function x_(e,t,{metadata:n,resource:r,authorizationCode:i,fetchFn:a}={}){let o=e.clientMetadata.scope,s;if(e.prepareTokenRequest&&(s=await e.prepareTokenRequest(o)),!s){if(!i)throw Error(`Either provider.prepareTokenRequest() or authorizationCode is required`);if(!e.redirectUrl)throw Error(`redirectUrl is required for authorization_code flow`);s=v_(i,await e.codeVerifier(),e.redirectUrl)}let c=await e.clientInformation();return y_(t,{metadata:n,tokenRequestParams:s,clientInformation:c??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:a})}async function S_(e,{metadata:t,clientMetadata:n,scope:r,fetchFn:i}){let a;if(t){if(!t.registration_endpoint)throw Error(`Incompatible auth server: does not support dynamic client registration`);a=new URL(t.registration_endpoint)}else a=new URL(`/register`,e);let o=await(i??fetch)(a,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({...n,...r===void 0?{}:{scope:r}})});if(!o.ok)throw await t_(o);return wg.parse(await o.json())}function C_(e){return e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):{...e}:{}}function w_(e=fetch,t){return t?async(n,r)=>e(n,{...t,...r,headers:r?.headers?{...C_(t.headers),...C_(r.headers)}:t.headers}):e}var T_=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 E_(e){}function D_(e){if(typeof e==`function`)throw TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:t=E_,onError:n=E_,onRetry:r=E_,onComment:i}=e,a=``,o=!0,s,c=``,l=``;function u(e){let t=o?e.replace(/^\xEF\xBB\xBF/,``):e,[n,r]=O_(`${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}
74
+ `;break;case`id`:s=t.includes(`\0`)?void 0:t;break;case`retry`:/^\d+$/.test(t)?r(parseInt(t,10)):n(new T_(`Invalid \`retry\` value: "${t}"`,{type:`invalid-retry`,value:t,line:i}));break;default:n(new T_(`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(`
75
+ `)?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 O_(e){let t=[],n=``,r=0;for(;r<e.length;){let i=e.indexOf(`\r`,r),a=e.indexOf(`
76
+ `,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]===`
77
+ `&&r++}}return[t,n]}var k_=class extends TransformStream{constructor({onError:e,onRetry:t,onComment:n}={}){let r;super({start(i){r=D_({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)}})}},A_={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2},j_=class extends Error{constructor(e,t){super(`Streamable HTTP error: ${t}`),this.code=e}},M_=class{constructor(e,t){this._hasCompletedAuthFlow=!1,this._url=e,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=t?.requestInit,this._authProvider=t?.authProvider,this._fetch=t?.fetch,this._fetchWithInit=w_(t?.fetch,t?.requestInit),this._sessionId=t?.sessionId,this._reconnectionOptions=t?.reconnectionOptions??A_}async _authThenStart(){if(!this._authProvider)throw new Kg(`No auth provider`);let e;try{e=await n_(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(e){throw this.onerror?.(e),e}if(e!==`AUTHORIZED`)throw new Kg;return await this._startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){let e={};if(this._authProvider){let t=await this._authProvider.tokens();t&&(e.Authorization=`Bearer ${t.access_token}`)}this._sessionId&&(e[`mcp-session-id`]=this._sessionId),this._protocolVersion&&(e[`mcp-protocol-version`]=this._protocolVersion);let t=C_(this._requestInit?.headers);return new Headers({...e,...t})}async _startOrAuthSse(e){let{resumptionToken:t}=e;try{let n=await this._commonHeaders();n.set(`Accept`,`text/event-stream`),t&&n.set(`last-event-id`,t);let r=await(this._fetch??fetch)(this._url,{method:`GET`,headers:n,signal:this._abortController?.signal});if(!r.ok){if(await r.body?.cancel(),r.status===401&&this._authProvider)return await this._authThenStart();if(r.status===405)return;throw new j_(r.status,`Failed to open SSE stream: ${r.statusText}`)}this._handleSseStream(r.body,e,!0)}catch(e){throw this.onerror?.(e),e}}_getNextReconnectionDelay(e){if(this._serverRetryMs!==void 0)return this._serverRetryMs;let t=this._reconnectionOptions.initialReconnectionDelay,n=this._reconnectionOptions.reconnectionDelayGrowFactor,r=this._reconnectionOptions.maxReconnectionDelay;return Math.min(t*n**+e,r)}_scheduleReconnection(e,t=0){let n=this._reconnectionOptions.maxRetries;if(t>=n){this.onerror?.(Error(`Maximum reconnection attempts (${n}) exceeded.`));return}let r=this._getNextReconnectionDelay(t);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse(e).catch(n=>{this.onerror?.(Error(`Failed to reconnect SSE stream: ${n instanceof Error?n.message:String(n)}`)),this._scheduleReconnection(e,t+1)})},r)}_handleSseStream(e,t,n){if(!e)return;let{onresumptiontoken:r,replayMessageId:i}=t,a,o=!1,s=!1;(async()=>{try{let t=e.pipeThrough(new TextDecoderStream).pipeThrough(new k_({onRetry:e=>{this._serverRetryMs=e}})).getReader();for(;;){let{value:e,done:n}=await t.read();if(n)break;if(e.id&&(a=e.id,o=!0,r?.(e.id)),e.data&&(!e.event||e.event===`message`))try{let t=Bm.parse(JSON.parse(e.data));Im(t)&&(s=!0,i!==void 0&&(t.id=i)),this.onmessage?.(t)}catch(e){this.onerror?.(e)}}(n||o)&&!s&&this._abortController&&!this._abortController.signal.aborted&&this._scheduleReconnection({resumptionToken:a,onresumptiontoken:r,replayMessageId:i},0)}catch(e){if(this.onerror?.(Error(`SSE stream disconnected: ${e}`)),(n||o)&&!s&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:a,onresumptiontoken:r,replayMessageId:i},0)}catch(e){this.onerror?.(Error(`Failed to reconnect: ${e instanceof Error?e.message:String(e)}`))}}})()}async start(){if(this._abortController)throw Error(`StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.`);this._abortController=new AbortController}async finishAuth(e){if(!this._authProvider)throw new Kg(`No auth provider`);if(await n_(this._authProvider,{serverUrl:this._url,authorizationCode:e,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!==`AUTHORIZED`)throw new Kg(`Failed to authorize`)}async close(){this._reconnectionTimeout&&=(clearTimeout(this._reconnectionTimeout),void 0),this._abortController?.abort(),this.onclose?.()}async send(e,t){try{let{resumptionToken:n,onresumptiontoken:r}=t||{};if(n){this._startOrAuthSse({resumptionToken:n,replayMessageId:Mm(e)?e.id:void 0}).catch(e=>this.onerror?.(e));return}let i=await this._commonHeaders();i.set(`content-type`,`application/json`),i.set(`accept`,`application/json, text/event-stream`);let a={...this._requestInit,method:`POST`,headers:i,body:JSON.stringify(e),signal:this._abortController?.signal},o=await(this._fetch??fetch)(this._url,a),s=o.headers.get(`mcp-session-id`);if(s&&(this._sessionId=s),!o.ok){let t=await o.text().catch(()=>null);if(o.status===401&&this._authProvider){if(this._hasCompletedAuthFlow)throw new j_(401,`Server returned 401 after successful authentication`);let{resourceMetadataUrl:t,scope:n}=o_(o);if(this._resourceMetadataUrl=t,this._scope=n,await n_(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!==`AUTHORIZED`)throw new Kg;return this._hasCompletedAuthFlow=!0,this.send(e)}if(o.status===403&&this._authProvider){let{resourceMetadataUrl:t,scope:n,error:r}=o_(o);if(r===`insufficient_scope`){let r=o.headers.get(`WWW-Authenticate`);if(this._lastUpscopingHeader===r)throw new j_(403,`Server returned 403 after trying upscoping`);if(n&&(this._scope=n),t&&(this._resourceMetadataUrl=t),this._lastUpscopingHeader=r??void 0,await n_(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!==`AUTHORIZED`)throw new Kg;return this.send(e)}}throw new j_(o.status,`Error POSTing to endpoint: ${t}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,o.status===202){await o.body?.cancel(),cee(e)&&this._startOrAuthSse({resumptionToken:void 0}).catch(e=>this.onerror?.(e));return}let c=(Array.isArray(e)?e:[e]).filter(e=>`method`in e&&`id`in e&&e.id!==void 0).length>0,l=o.headers.get(`content-type`);if(c)if(l?.includes(`text/event-stream`))this._handleSseStream(o.body,{onresumptiontoken:r},!1);else if(l?.includes(`application/json`)){let e=await o.json(),t=Array.isArray(e)?e.map(e=>Bm.parse(e)):[Bm.parse(e)];for(let e of t)this.onmessage?.(e)}else throw await o.body?.cancel(),new j_(-1,`Unexpected content type: ${l}`);else await o.body?.cancel()}catch(e){throw this.onerror?.(e),e}}get sessionId(){return this._sessionId}async terminateSession(){if(this._sessionId)try{let e=await this._commonHeaders(),t={...this._requestInit,method:`DELETE`,headers:e,signal:this._abortController?.signal},n=await(this._fetch??fetch)(this._url,t);if(await n.body?.cancel(),!n.ok&&n.status!==405)throw new j_(n.status,`Failed to terminate session: ${n.statusText}`);this._sessionId=void 0}catch(e){throw this.onerror?.(e),e}}setProtocolVersion(e){this._protocolVersion=e}get protocolVersion(){return this._protocolVersion}async resumeStream(e,t){await this._startOrAuthSse({resumptionToken:e,onresumptiontoken:t?.onresumptiontoken})}},N_=5e3,P_=2e4;function F_(e){try{let t=JSON.stringify(e);return t?Math.ceil(new TextEncoder().encode(t).length/4):0}catch{return 0}}function I_(e){let{meta:t,...n}=e;return F_(n)}function L_(e){return F_(e?.modelContent)}function R_(e,t){let n=I_(e);n>=5e3&&console.warn(`[skybridge] Tool "${t}" returned ${n} estimated model-visible tokens; this reaches the ${N_}-token warning threshold and may overload model context. Content and structured content are included in this estimate.`)}function z_(e,t){let n=F_(e);n>=2e4&&console.warn(`[skybridge] ${t} is persisting ${n} estimated tokens in model-visible view state; this reaches the ${P_}-token warning threshold and may overload model context. Persisted view state and data-llm context are included in this estimate.`)}function B_(e,t){if(e instanceof Promise)throw Error(t)}function V_(e,t){let n={},r=[];for(let i in e){let a=e[i][`~standard`].validate(t[i]);if(B_(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 H_(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)??V_(o,t);B_(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 U_=H_({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}),W_=u(_(),1),G_=typeof global==`object`&&global&&global.Object===Object&&global,K_=typeof self==`object`&&self&&self.Object===Object&&self,q_=G_||K_||Function(`return this`)(),J_=q_.Symbol,Y_=Object.prototype,X_=Y_.hasOwnProperty,Z_=Y_.toString,Q_=J_?J_.toStringTag:void 0;function Kee(e){var t=X_.call(e,Q_),n=e[Q_];try{e[Q_]=void 0;var r=!0}catch{}var i=Z_.call(e);return r&&(t?e[Q_]=n:delete e[Q_]),i}var qee=Object.prototype.toString;function Jee(e){return qee.call(e)}var Yee=`[object Null]`,Xee=`[object Undefined]`,$_=J_?J_.toStringTag:void 0;function ev(e){return e==null?e===void 0?Xee:Yee:$_&&$_ in Object(e)?Kee(e):Jee(e)}function tv(e){return typeof e==`object`&&!!e}var Zee=`[object Symbol]`;function nv(e){return typeof e==`symbol`||tv(e)&&ev(e)==Zee}function rv(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 iv=Array.isArray,Qee=1/0,av=J_?J_.prototype:void 0,ov=av?av.toString:void 0;function sv(e){if(typeof e==`string`)return e;if(iv(e))return rv(e,sv)+``;if(nv(e))return ov?ov.call(e):``;var t=e+``;return t==`0`&&1/e==-Qee?`-0`:t}var $ee=/\s/;function ete(e){for(var t=e.length;t--&&$ee.test(e.charAt(t)););return t}var tte=/^\s+/;function nte(e){return e&&e.slice(0,ete(e)+1).replace(tte,``)}function cv(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}var lv=NaN,rte=/^[-+]0x[0-9a-f]+$/i,ite=/^0b[01]+$/i,ate=/^0o[0-7]+$/i,ote=parseInt;function ste(e){if(typeof e==`number`)return e;if(nv(e))return lv;if(cv(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=cv(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=nte(e);var n=ite.test(e);return n||ate.test(e)?ote(e.slice(2),n?2:8):rte.test(e)?lv:+e}var uv=1/0,cte=17976931348623157e292;function lte(e){return e?(e=ste(e),e===uv||e===-uv?(e<0?-1:1)*cte:e===e?e:0):e===0?e:0}function dv(e){var t=lte(e),n=t%1;return t===t?n?t-n:t:0}function fv(e){return e}var ute=`[object AsyncFunction]`,dte=`[object Function]`,fte=`[object GeneratorFunction]`,pte=`[object Proxy]`;function pv(e){if(!cv(e))return!1;var t=ev(e);return t==dte||t==fte||t==ute||t==pte}var mv=q_[`__core-js_shared__`],hv=function(){var e=/[^.]+$/.exec(mv&&mv.keys&&mv.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function mte(e){return!!hv&&hv in e}var hte=Function.prototype.toString;function gv(e){if(e!=null){try{return hte.call(e)}catch{}try{return e+``}catch{}}return``}var gte=/[\\^$.*+?()[\]{}|]/g,_te=/^\[object .+?Constructor\]$/,vte=Function.prototype,yte=Object.prototype,bte=vte.toString,xte=yte.hasOwnProperty,Ste=RegExp(`^`+bte.call(xte).replace(gte,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function Cte(e){return!cv(e)||mte(e)?!1:(pv(e)?Ste:_te).test(gv(e))}function wte(e,t){return e?.[t]}function _v(e,t){var n=wte(e,t);return Cte(n)?n:void 0}var vv=_v(q_,`WeakMap`),yv=Object.create,bv=function(){function e(){}return function(t){if(!cv(t))return{};if(yv)return yv(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Tte(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 xv(){}function Sv(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}var Ete=800,Dte=16,Ote=Date.now;function kte(e){var t=0,n=0;return function(){var r=Ote(),i=Dte-(r-n);if(n=r,i>0){if(++t>=Ete)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Ate(e){return function(){return e}}var Cv=function(){try{var e=_v(Object,`defineProperty`);return e({},``,{}),e}catch{}}(),wv=kte(Cv?function(e,t){return Cv(e,`toString`,{configurable:!0,enumerable:!1,value:Ate(t),writable:!0})}:fv);function Tv(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function jte(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 Mte(e){return e!==e}function Nte(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function Ev(e,t,n){return t===t?Nte(e,t,n):jte(e,Mte,n)}function Dv(e,t){return!!(e!=null&&e.length)&&Ev(e,t,0)>-1}var Pte=9007199254740991,Fte=/^(?:0|[1-9]\d*)$/;function Ov(e,t){var n=typeof e;return t??=Pte,!!t&&(n==`number`||n!=`symbol`&&Fte.test(e))&&e>-1&&e%1==0&&e<t}function kv(e,t,n){t==`__proto__`&&Cv?Cv(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Av(e,t){return e===t||e!==e&&t!==t}var Ite=Object.prototype.hasOwnProperty;function jv(e,t,n){var r=e[t];(!(Ite.call(e,t)&&Av(r,n))||n===void 0&&!(t in e))&&kv(e,t,n)}function Mv(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?kv(n,s,c):jv(n,s,c)}return n}var Nv=Math.max;function Pv(e,t,n){return t=Nv(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=Nv(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),Tte(e,this,s)}}function Fv(e,t){return wv(Pv(e,t,fv),e+``)}var Lte=9007199254740991;function Iv(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=Lte}function Lv(e){return e!=null&&Iv(e.length)&&!pv(e)}function Rte(e,t,n){if(!cv(n))return!1;var r=typeof t;return(r==`number`?Lv(n)&&Ov(t,n.length):r==`string`&&t in n)?Av(n[t],e):!1}function Rv(e){return Fv(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&&Rte(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 zte=Object.prototype;function zv(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||zte)}function Bv(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var Bte=`[object Arguments]`;function Vv(e){return tv(e)&&ev(e)==Bte}var Hv=Object.prototype,Vte=Hv.hasOwnProperty,Hte=Hv.propertyIsEnumerable,Uv=Vv(function(){return arguments}())?Vv:function(e){return tv(e)&&Vte.call(e,`callee`)&&!Hte.call(e,`callee`)};function Ute(){return!1}var Wv=typeof exports==`object`&&exports&&!exports.nodeType&&exports,Gv=Wv&&typeof module==`object`&&module&&!module.nodeType&&module,Kv=Gv&&Gv.exports===Wv?q_.Buffer:void 0,qv=(Kv?Kv.isBuffer:void 0)||Ute,Jv=`[object Arguments]`,Yv=`[object Array]`,Xv=`[object Boolean]`,Zv=`[object Date]`,Qv=`[object Error]`,$v=`[object Function]`,ey=`[object Map]`,ty=`[object Number]`,ny=`[object Object]`,ry=`[object RegExp]`,iy=`[object Set]`,ay=`[object String]`,oy=`[object WeakMap]`,sy=`[object ArrayBuffer]`,cy=`[object DataView]`,ly=`[object Float32Array]`,uy=`[object Float64Array]`,dy=`[object Int8Array]`,fy=`[object Int16Array]`,py=`[object Int32Array]`,my=`[object Uint8Array]`,hy=`[object Uint8ClampedArray]`,gy=`[object Uint16Array]`,_y=`[object Uint32Array]`,vy={};vy[ly]=vy[uy]=vy[dy]=vy[fy]=vy[py]=vy[my]=vy[hy]=vy[gy]=vy[_y]=!0,vy[Jv]=vy[Yv]=vy[sy]=vy[Xv]=vy[cy]=vy[Zv]=vy[Qv]=vy[$v]=vy[ey]=vy[ty]=vy[ny]=vy[ry]=vy[iy]=vy[ay]=vy[oy]=!1;function yy(e){return tv(e)&&Iv(e.length)&&!!vy[ev(e)]}function by(e){return function(t){return e(t)}}var xy=typeof exports==`object`&&exports&&!exports.nodeType&&exports,Sy=xy&&typeof module==`object`&&module&&!module.nodeType&&module,Cy=Sy&&Sy.exports===xy&&G_.process,wy=function(){try{return Sy&&Sy.require&&Sy.require(`util`).types||Cy&&Cy.binding&&Cy.binding(`util`)}catch{}}(),Ty=wy&&wy.isTypedArray,Ey=Ty?by(Ty):yy,Dy=Object.prototype.hasOwnProperty;function Oy(e,t){var n=iv(e),r=!n&&Uv(e),i=!n&&!r&&qv(e),a=!n&&!r&&!i&&Ey(e),o=n||r||i||a,s=o?Bv(e.length,String):[],c=s.length;for(var l in e)(t||Dy.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||Ov(l,c)))&&s.push(l);return s}function ky(e,t){return function(n){return e(t(n))}}var Ay=ky(Object.keys,Object),jy=Object.prototype.hasOwnProperty;function My(e){if(!zv(e))return Ay(e);var t=[];for(var n in Object(e))jy.call(e,n)&&n!=`constructor`&&t.push(n);return t}function Ny(e){return Lv(e)?Oy(e):My(e)}var Py=Object.prototype.hasOwnProperty,Fy=Rv(function(e,t){if(zv(t)||Lv(t)){Mv(t,Ny(t),e);return}for(var n in t)Py.call(t,n)&&jv(e,n,t[n])});function Iy(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Ly=Object.prototype.hasOwnProperty;function Ry(e){if(!cv(e))return Iy(e);var t=zv(e),n=[];for(var r in e)r==`constructor`&&(t||!Ly.call(e,r))||n.push(r);return n}function zy(e){return Lv(e)?Oy(e,!0):Ry(e)}var By=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Vy=/^\w*$/;function Hy(e,t){if(iv(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||nv(e)?!0:Vy.test(e)||!By.test(e)||t!=null&&e in Object(t)}var Uy=_v(Object,`create`);function Wy(){this.__data__=Uy?Uy(null):{},this.size=0}function Gy(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}var Ky=`__lodash_hash_undefined__`,qy=Object.prototype.hasOwnProperty;function Jy(e){var t=this.__data__;if(Uy){var n=t[e];return n===Ky?void 0:n}return qy.call(t,e)?t[e]:void 0}var Yy=Object.prototype.hasOwnProperty;function Xy(e){var t=this.__data__;return Uy?t[e]!==void 0:Yy.call(t,e)}var Zy=`__lodash_hash_undefined__`;function Qy(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=Uy&&t===void 0?Zy:t,this}function $y(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])}}$y.prototype.clear=Wy,$y.prototype.delete=Gy,$y.prototype.get=Jy,$y.prototype.has=Xy,$y.prototype.set=Qy;function eb(){this.__data__=[],this.size=0}function tb(e,t){for(var n=e.length;n--;)if(Av(e[n][0],t))return n;return-1}var nb=Array.prototype.splice;function rb(e){var t=this.__data__,n=tb(t,e);return n<0?!1:(n==t.length-1?t.pop():nb.call(t,n,1),--this.size,!0)}function ib(e){var t=this.__data__,n=tb(t,e);return n<0?void 0:t[n][1]}function ab(e){return tb(this.__data__,e)>-1}function ob(e,t){var n=this.__data__,r=tb(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function sb(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])}}sb.prototype.clear=eb,sb.prototype.delete=rb,sb.prototype.get=ib,sb.prototype.has=ab,sb.prototype.set=ob;var cb=_v(q_,`Map`);function lb(){this.size=0,this.__data__={hash:new $y,map:new(cb||sb),string:new $y}}function ub(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function db(e,t){var n=e.__data__;return ub(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function fb(e){var t=db(this,e).delete(e);return this.size-=+!!t,t}function pb(e){return db(this,e).get(e)}function mb(e){return db(this,e).has(e)}function hb(e,t){var n=db(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function gb(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])}}gb.prototype.clear=lb,gb.prototype.delete=fb,gb.prototype.get=pb,gb.prototype.has=mb,gb.prototype.set=hb;var _b=`Expected a function`;function vb(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(_b);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(vb.Cache||gb),n}vb.Cache=gb;var yb=500;function bb(e){var t=vb(e,function(e){return n.size===yb&&n.clear(),e}),n=t.cache;return t}var xb=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Sb=/\\(\\)?/g,Cb=bb(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(xb,function(e,n,r,i){t.push(r?i.replace(Sb,`$1`):n||e)}),t});function wb(e){return e==null?``:sv(e)}function Tb(e,t){return iv(e)?e:Hy(e,t)?[e]:Cb(wb(e))}var Eb=1/0;function Db(e){if(typeof e==`string`||nv(e))return e;var t=e+``;return t==`0`&&1/e==-Eb?`-0`:t}function Ob(e,t){t=Tb(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Db(t[n++])];return n&&n==r?e:void 0}function J(e,t,n){var r=e==null?void 0:Ob(e,t);return r===void 0?n:r}function kb(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var Ab=J_?J_.isConcatSpreadable:void 0;function jb(e){return iv(e)||Uv(e)||!!(Ab&&e&&e[Ab])}function Mb(e,t,n,r,i){var a=-1,o=e.length;for(n||=jb,i||=[];++a<o;){var s=e[a];t>0&&n(s)?t>1?Mb(s,t-1,n,r,i):kb(i,s):r||(i[i.length]=s)}return i}function Nb(e){return e!=null&&e.length?Mb(e,1):[]}function Pb(e){return wv(Pv(e,void 0,Nb),e+``)}var Fb=ky(Object.getPrototypeOf,Object),Ib=`[object Object]`,Lb=Function.prototype,Rb=Object.prototype,zb=Lb.toString,Bb=Rb.hasOwnProperty,Vb=zb.call(Object);function Hb(e){if(!tv(e)||ev(e)!=Ib)return!1;var t=Fb(e);if(t===null)return!0;var n=Bb.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&zb.call(n)==Vb}function Ub(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 Wb(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 Gb(){this.__data__=new sb,this.size=0}function Kb(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function qb(e){return this.__data__.get(e)}function Jb(e){return this.__data__.has(e)}var Yb=200;function Xb(e,t){var n=this.__data__;if(n instanceof sb){var r=n.__data__;if(!cb||r.length<Yb-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new gb(r)}return n.set(e,t),this.size=n.size,this}function Zb(e){var t=this.__data__=new sb(e);this.size=t.size}Zb.prototype.clear=Gb,Zb.prototype.delete=Kb,Zb.prototype.get=qb,Zb.prototype.has=Jb,Zb.prototype.set=Xb;function Qb(e,t){return e&&Mv(t,Ny(t),e)}function $b(e,t){return e&&Mv(t,zy(t),e)}var ex=typeof exports==`object`&&exports&&!exports.nodeType&&exports,tx=ex&&typeof module==`object`&&module&&!module.nodeType&&module,nx=tx&&tx.exports===ex?q_.Buffer:void 0,rx=nx?nx.allocUnsafe:void 0;function ix(e,t){if(t)return e.slice();var n=e.length,r=rx?rx(n):new e.constructor(n);return e.copy(r),r}function ax(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 ox(){return[]}var sx=Object.prototype.propertyIsEnumerable,cx=Object.getOwnPropertySymbols,lx=cx?function(e){return e==null?[]:(e=Object(e),ax(cx(e),function(t){return sx.call(e,t)}))}:ox;function ux(e,t){return Mv(e,lx(e),t)}var dx=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)kb(t,lx(e)),e=Fb(e);return t}:ox;function fx(e,t){return Mv(e,dx(e),t)}function px(e,t,n){var r=t(e);return iv(e)?r:kb(r,n(e))}function mx(e){return px(e,Ny,lx)}function hx(e){return px(e,zy,dx)}var gx=_v(q_,`DataView`),_x=_v(q_,`Promise`),vx=_v(q_,`Set`),yx=`[object Map]`,bx=`[object Object]`,xx=`[object Promise]`,Sx=`[object Set]`,Cx=`[object WeakMap]`,wx=`[object DataView]`,Tx=gv(gx),Ex=gv(cb),Dx=gv(_x),Ox=gv(vx),kx=gv(vv),Ax=ev;(gx&&Ax(new gx(new ArrayBuffer(1)))!=wx||cb&&Ax(new cb)!=yx||_x&&Ax(_x.resolve())!=xx||vx&&Ax(new vx)!=Sx||vv&&Ax(new vv)!=Cx)&&(Ax=function(e){var t=ev(e),n=t==bx?e.constructor:void 0,r=n?gv(n):``;if(r)switch(r){case Tx:return wx;case Ex:return yx;case Dx:return xx;case Ox:return Sx;case kx:return Cx}return t});var jx=Ax,Mx=Object.prototype.hasOwnProperty;function Nx(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&Mx.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}var Px=q_.Uint8Array;function Fx(e){var t=new e.constructor(e.byteLength);return new Px(t).set(new Px(e)),t}function Ix(e,t){var n=t?Fx(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var Lx=/\w*$/;function Rx(e){var t=new e.constructor(e.source,Lx.exec(e));return t.lastIndex=e.lastIndex,t}var zx=J_?J_.prototype:void 0,Bx=zx?zx.valueOf:void 0;function Vx(e){return Bx?Object(Bx.call(e)):{}}function Hx(e,t){var n=t?Fx(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var Ux=`[object Boolean]`,Wx=`[object Date]`,Gx=`[object Map]`,Kx=`[object Number]`,qx=`[object RegExp]`,Jx=`[object Set]`,Yx=`[object String]`,Xx=`[object Symbol]`,Zx=`[object ArrayBuffer]`,Qx=`[object DataView]`,$x=`[object Float32Array]`,eS=`[object Float64Array]`,tS=`[object Int8Array]`,nS=`[object Int16Array]`,rS=`[object Int32Array]`,iS=`[object Uint8Array]`,aS=`[object Uint8ClampedArray]`,oS=`[object Uint16Array]`,sS=`[object Uint32Array]`;function cS(e,t,n){var r=e.constructor;switch(t){case Zx:return Fx(e);case Ux:case Wx:return new r(+e);case Qx:return Ix(e,n);case $x:case eS:case tS:case nS:case rS:case iS:case aS:case oS:case sS:return Hx(e,n);case Gx:return new r;case Kx:case Yx:return new r(e);case qx:return Rx(e);case Jx:return new r;case Xx:return Vx(e)}}function lS(e){return typeof e.constructor==`function`&&!zv(e)?bv(Fb(e)):{}}var uS=`[object Map]`;function dS(e){return tv(e)&&jx(e)==uS}var fS=wy&&wy.isMap,pS=fS?by(fS):dS,mS=`[object Set]`;function hS(e){return tv(e)&&jx(e)==mS}var gS=wy&&wy.isSet,_S=gS?by(gS):hS,vS=1,yS=2,bS=4,xS=`[object Arguments]`,SS=`[object Array]`,CS=`[object Boolean]`,wS=`[object Date]`,TS=`[object Error]`,ES=`[object Function]`,DS=`[object GeneratorFunction]`,OS=`[object Map]`,kS=`[object Number]`,AS=`[object Object]`,jS=`[object RegExp]`,MS=`[object Set]`,NS=`[object String]`,PS=`[object Symbol]`,FS=`[object WeakMap]`,IS=`[object ArrayBuffer]`,LS=`[object DataView]`,RS=`[object Float32Array]`,zS=`[object Float64Array]`,BS=`[object Int8Array]`,VS=`[object Int16Array]`,HS=`[object Int32Array]`,US=`[object Uint8Array]`,WS=`[object Uint8ClampedArray]`,GS=`[object Uint16Array]`,KS=`[object Uint32Array]`,qS={};qS[xS]=qS[SS]=qS[IS]=qS[LS]=qS[CS]=qS[wS]=qS[RS]=qS[zS]=qS[BS]=qS[VS]=qS[HS]=qS[OS]=qS[kS]=qS[AS]=qS[jS]=qS[MS]=qS[NS]=qS[PS]=qS[US]=qS[WS]=qS[GS]=qS[KS]=!0,qS[TS]=qS[ES]=qS[FS]=!1;function JS(e,t,n,r,i,a){var o,s=t&vS,c=t&yS,l=t&bS;if(n&&(o=i?n(e,r,i,a):n(e)),o!==void 0)return o;if(!cv(e))return e;var u=iv(e);if(u){if(o=Nx(e),!s)return Sv(e,o)}else{var d=jx(e),f=d==ES||d==DS;if(qv(e))return ix(e,s);if(d==AS||d==xS||f&&!i){if(o=c||f?{}:lS(e),!s)return c?fx(e,$b(o,e)):ux(e,Qb(o,e))}else{if(!qS[d])return i?e:{};o=cS(e,d,s)}}a||=new Zb;var p=a.get(e);if(p)return p;a.set(e,o),_S(e)?e.forEach(function(r){o.add(JS(r,t,n,r,e,a))}):pS(e)&&e.forEach(function(r,i){o.set(i,JS(r,t,n,i,e,a))});var m=u?void 0:(l?c?hx:mx:c?zy:Ny)(e);return Tv(m||e,function(r,i){m&&(i=r,r=e[i]),jv(o,i,JS(r,t,n,i,e,a))}),o}var YS=1,XS=4;function ZS(e){return JS(e,YS|XS)}var QS=`__lodash_hash_undefined__`;function $S(e){return this.__data__.set(e,QS),this}function eC(e){return this.__data__.has(e)}function tC(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new gb;++t<n;)this.add(e[t])}tC.prototype.add=tC.prototype.push=$S,tC.prototype.has=eC;function nC(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 rC(e,t){return e.has(t)}var iC=1,aC=2;function oC(e,t,n,r,i,a){var o=n&iC,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&aC?new tC: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(!nC(t,function(e,t){if(!rC(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 sC(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function cC(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var lC=1,uC=2,dC=`[object Boolean]`,fC=`[object Date]`,pC=`[object Error]`,mC=`[object Map]`,hC=`[object Number]`,gC=`[object RegExp]`,_C=`[object Set]`,vC=`[object String]`,yC=`[object Symbol]`,bC=`[object ArrayBuffer]`,xC=`[object DataView]`,SC=J_?J_.prototype:void 0,CC=SC?SC.valueOf:void 0;function wC(e,t,n,r,i,a,o){switch(n){case xC:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case bC:return!(e.byteLength!=t.byteLength||!a(new Px(e),new Px(t)));case dC:case fC:case hC:return Av(+e,+t);case pC:return e.name==t.name&&e.message==t.message;case gC:case vC:return e==t+``;case mC:var s=sC;case _C:var c=r&lC;if(s||=cC,e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=uC,o.set(e,t);var u=oC(s(e),s(t),r,i,a,o);return o.delete(e),u;case yC:if(CC)return CC.call(e)==CC.call(t)}return!1}var TC=1,EC=Object.prototype.hasOwnProperty;function DC(e,t,n,r,i,a){var o=n&TC,s=mx(e),c=s.length;if(c!=mx(t).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in t:EC.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 OC=1,kC=`[object Arguments]`,AC=`[object Array]`,jC=`[object Object]`,MC=Object.prototype.hasOwnProperty;function NC(e,t,n,r,i,a){var o=iv(e),s=iv(t),c=o?AC:jx(e),l=s?AC:jx(t);c=c==kC?jC:c,l=l==kC?jC:l;var u=c==jC,d=l==jC,f=c==l;if(f&&qv(e)){if(!qv(t))return!1;o=!0,u=!1}if(f&&!u)return a||=new Zb,o||Ey(e)?oC(e,t,n,r,i,a):wC(e,t,c,n,r,i,a);if(!(n&OC)){var p=u&&MC.call(e,`__wrapped__`),m=d&&MC.call(t,`__wrapped__`);if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||=new Zb,i(h,g,n,r,a)}}return f?(a||=new Zb,DC(e,t,n,r,i,a)):!1}function PC(e,t,n,r,i){return e===t?!0:e==null||t==null||!tv(e)&&!tv(t)?e!==e&&t!==t:NC(e,t,n,r,PC,i)}var FC=1,IC=2;function LC(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 Zb;if(r)var f=r(l,u,c,e,t,d);if(!(f===void 0?PC(u,l,FC|IC,r,d):f))return!1}}return!0}function RC(e){return e===e&&!cv(e)}function zC(e){for(var t=Ny(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,RC(i)]}return t}function BC(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}}function Wte(e){var t=zC(e);return t.length==1&&t[0][2]?BC(t[0][0],t[0][1]):function(n){return n===e||LC(n,e,t)}}function Gte(e,t){return e!=null&&t in Object(e)}function VC(e,t,n){t=Tb(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=Db(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&&Iv(i)&&Ov(o,i)&&(iv(e)||Uv(e)))}function HC(e,t){return e!=null&&VC(e,t,Gte)}var Kte=1,qte=2;function Jte(e,t){return Hy(e)&&RC(t)?BC(Db(e),t):function(n){var r=J(n,e);return r===void 0&&r===t?HC(n,e):PC(t,r,Kte|qte)}}function Yte(e){return function(t){return t?.[e]}}function Xte(e){return function(t){return Ob(t,e)}}function Zte(e){return Hy(e)?Yte(Db(e)):Xte(e)}function UC(e){return typeof e==`function`?e:e==null?fv:typeof e==`object`?iv(e)?Jte(e[0],e[1]):Wte(e):Zte(e)}function Qte(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 WC=Qte();function GC(e,t){return e&&WC(e,t,Ny)}function $te(e,t){return function(n,r){if(n==null)return n;if(!Lv(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 KC=$te(GC);function qC(e,t,n){(n!==void 0&&!Av(e[t],n)||n===void 0&&!(t in e))&&kv(e,t,n)}function JC(e){return tv(e)&&Lv(e)}function YC(e,t){if(!(t===`constructor`&&typeof e[t]==`function`)&&t!=`__proto__`)return e[t]}function ene(e){return Mv(e,zy(e))}function tne(e,t,n,r,i,a,o){var s=YC(e,n),c=YC(t,n),l=o.get(c);if(l){qC(e,n,l);return}var u=a?a(s,c,n+``,e,t,o):void 0,d=u===void 0;if(d){var f=iv(c),p=!f&&qv(c),m=!f&&!p&&Ey(c);u=c,f||p||m?iv(s)?u=s:JC(s)?u=Sv(s):p?(d=!1,u=ix(c,!0)):m?(d=!1,u=Hx(c,!0)):u=[]:Hb(c)||Uv(c)?(u=s,Uv(s)?u=ene(s):(!cv(s)||pv(s))&&(u=lS(c))):d=!1}d&&(o.set(c,u),i(u,c,r,a,o),o.delete(c)),qC(e,n,u)}function XC(e,t,n,r,i){e!==t&&WC(t,function(a,o){if(i||=new Zb,cv(a))tne(e,t,o,n,XC,r,i);else{var s=r?r(YC(e,o),a,o+``,e,t,i):void 0;s===void 0&&(s=a),qC(e,o,s)}},zy)}function ZC(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 nne=200;function rne(e,t,n,r){var i=-1,a=Dv,o=!0,s=e.length,c=[],l=t.length;if(!s)return c;n&&(t=rv(t,by(n))),r?(a=ZC,o=!1):t.length>=nne&&(a=rC,o=!1,t=new tC(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 ine=Fv(function(e,t){return JC(e)?rne(e,Mb(t,1,JC,!0)):[]});function QC(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function $C(e){return typeof e==`function`?e:fv}function ane(e,t){return(iv(e)?Tv:KC)(e,$C(t))}var one=1/0;function sne(e){return e!=null&&e.length?Mb(e,one):[]}var cne=Object.prototype.hasOwnProperty;function lne(e,t){return e!=null&&cne.call(e,t)}function ew(e,t){return e!=null&&VC(e,t,lne)}var une=`[object String]`;function tw(e){return typeof e==`string`||!iv(e)&&tv(e)&&ev(e)==une}function dne(e,t){return rv(t,function(t){return e[t]})}function fne(e){return e==null?[]:dne(e,Ny(e))}var pne=Math.max;function mne(e,t,n,r){e=Lv(e)?e:fne(e),n=n&&!r?dv(n):0;var i=e.length;return n<0&&(n=pne(i+n,0)),tw(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Ev(e,t,n)>-1}var hne=Math.min;function gne(e,t,n){for(var r=n?ZC:Dv,i=e[0].length,a=e.length,o=a,s=Array(a),c=1/0,l=[];o--;){var u=e[o];o&&t&&(u=rv(u,by(t))),c=hne(u.length,c),s[o]=!n&&(t||i>=120&&u.length>=120)?new tC(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?rC(f,m):r(l,m,n))){for(o=a;--o;){var h=s[o];if(!(h?rC(h,m):r(e[o],m,n)))continue outer}f&&f.push(m),l.push(p)}}return l}function _ne(e){return JC(e)?e:[]}var nw=Fv(function(e){var t=rv(e,_ne);return t.length&&t[0]===e[0]?gne(t):[]});function vne(e,t){return t.length<2?e:Ob(e,Ub(t,0,-1))}var yne=`[object Map]`,bne=`[object Set]`,xne=Object.prototype.hasOwnProperty;function rw(e){if(e==null)return!0;if(Lv(e)&&(iv(e)||typeof e==`string`||typeof e.splice==`function`||qv(e)||Ey(e)||Uv(e)))return!e.length;var t=jx(e);if(t==yne||t==bne)return!e.size;if(zv(e))return!My(e).length;for(var n in e)if(xne.call(e,n))return!1;return!0}function iw(e,t){return PC(e,t)}var Sne=`[object Number]`;function aw(e){return typeof e==`number`||tv(e)&&ev(e)==Sne}function ow(e){return e==null}function sw(e){return e===void 0}var Cne=Rv(function(e,t,n){XC(e,t,n)}),wne=Object.prototype.hasOwnProperty;function cw(e,t){t=Tb(t,e);var n=-1,r=t.length;if(!r)return!0;for(;++n<r;){var i=Db(t[n]);if(i===`__proto__`&&!wne.call(e,`__proto__`)||(i===`constructor`||i===`prototype`)&&n<r-1)return!1}var a=vne(e,t);return a==null||delete a[Db(QC(t))]}function Tne(e){return Hb(e)?void 0:e}var Ene=1,Dne=2,One=4,lw=Pb(function(e,t){var n={};if(e==null)return n;var r=!1;t=rv(t,function(t){return t=Tb(t,e),r||=t.length>1,t}),Mv(e,hx(e),n),r&&(n=JS(n,Ene|Dne|One,Tne));for(var i=t.length;i--;)cw(n,t[i]);return n});function uw(e,t,n,r){if(!cv(e))return e;t=Tb(t,e);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++i<a;){var c=Db(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=cv(u)?u:Ov(t[i+1])?[]:{})}jv(s,c,l),s=s[c]}return e}function dw(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],s=Ob(e,o);n(s,o)&&uw(a,Tb(o,e),s)}return a}function kne(e,t){if(e==null)return{};var n=rv(hx(e),function(e){return[e]});return t=UC(t),dw(e,n,function(e,n){return t(e,n[0])})}function Ane(e,t){return dw(e,t,function(t,n){return HC(e,n)})}var fw=Pb(function(e,t){return e==null?{}:Ane(e,t)});function jne(e,t,n,r,i){return i(e,function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)}),n}function Mne(e,t,n){var r=iv(e)?Wb:jne,i=arguments.length<3;return r(e,UC(t,4),n,i,KC)}function pw(e,t,n){return e==null?e:uw(e,t,n)}function Nne(e,t,n,r){return r=typeof r==`function`?r:void 0,e==null?e:uw(e,t,n,r)}var Pne=9007199254740991,mw=4294967295,Fne=Math.min;function hw(e,t){if(e=dv(e),e<1||e>Pne)return[];var n=mw,r=Fne(e,mw);t=$C(t),e-=mw;for(var i=Bv(r,t);++n<e;)t(n);return i}function gw(e){return iv(e)?rv(e,Db):nv(e)?[e]:Sv(Cb(wb(e)))}function Ine(e,t,n){var r=iv(e),i=r||qv(e)||Ey(e);if(t=UC(t,4),n==null){var a=e&&e.constructor;n=i?r?new a:[]:cv(e)&&pv(a)?bv(Fb(e)):{}}return(i?Tv:GC)(e,function(e,r,i){return t(n,e,r,i)}),n}var Lne=vx&&1/cC(new vx([,-0]))[1]==1/0?function(e){return new vx(e)}:xv,Rne=200;function _w(e,t,n){var r=-1,i=Dv,a=e.length,o=!0,s=[],c=s;if(n)o=!1,i=ZC;else if(a>=Rne){var l=t?null:Lne(e);if(l)return cC(l);o=!1,i=rC,c=new tC}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 zne=Fv(function(e){return _w(Mb(e,1,JC,!0))});function vw(e){return e&&e.length?_w(e):[]}var Bne=0;function yw(e){var t=++Bne;return wb(e)+t}function Vne(e,t){return e==null||cw(e,t)}var bw=is()(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 Sw(e,`tools.${t}`,{...r??{},...n})}),updateOpenaiObject:(t,n,r)=>e(e=>e.tools[t]?.openaiObject?Sw(e,`tools.${t}.openaiObject.${n}`,r):e),pushOpenAiLog:(t,n)=>e(e=>{let r=e.tools[t]?.openaiLogs||[];return Sw(e,`tools.${t}.openaiLogs`,[...r,{...n,id:crypto.randomUUID()}])}),clearOpenAiLogs:t=>e(e=>e.tools[t]?.openaiLogs?.length?Sw(e,`tools.${t}.openaiLogs`,[]):e),setOpenInAppUrl:(t,n)=>e(e=>e.tools[t]?.openInAppUrl===n?e:Sw(e,`tools.${t}.openInAppUrl`,n))})),xw=e=>{let{tools:t}=bw();return t[e]},Sw=(e,t,n)=>{let r=ZS(e);return pw(r,t,n),r};function Cw(e,t,n){try{return e(t)}catch(e){return n?pt(25,t,e,n):pt(24,t,e),null}}function ww(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),Cw(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 Hne=ww({parse:e=>e,serialize:String});ww({parse:e=>{let t=parseInt(e);return t==t?t:null},serialize:e=>``+Math.round(e)}),ww({parse:e=>{let t=parseInt(e);return t==t?t-1:null},serialize:e=>``+Math.round(e+1)}),ww({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}}),ww({parse:e=>{let t=parseFloat(e);return t==t?t:null},serialize:String}),ww({parse:e=>e.toLowerCase()===`true`,serialize:String});function Tw(e,t){return e.valueOf()===t.valueOf()}ww({parse:e=>{let t=parseInt(e);return t==t?new Date(t):null},serialize:e=>``+e.valueOf(),eq:Tw}),ww({parse:e=>{let t=new Date(e);return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString(),eq:Tw}),ww({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:Tw});var Ew=bt(`sync-emitter`,()=>Pt()),Une={};function Wne(e,t={}){let n=(0,b.useId)(),r=Tt(),i=Et(),{history:a=r?.history??`replace`,scroll:o=r?.scroll??!1,shallow:s=r?.shallow??!0,throttleMs:c=jt.timeMs,limitUrlUpdates:l=r?.limitUrlUpdates,clearOnDefault:u=r?.clearOnDefault??!0,startTransition:d,urlKeys:f=Une}=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=wt(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=Gt(Object.values(m)),[C,w]=(0,b.useState)(()=>Dw(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}=Dw(e,f,g,S,_.current,T.current);r&&(ft(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)?(ft(2,n,p,s,t,o,T.current),a):(T.current={...T.current,[r]:c},_.current[s]=i,ft(3,n,p,s,t,o,T.current),T.current)})},t),{});for(let r of Object.keys(e)){let e=m[r];ft(4,n,e,p),Ew.on(e,t[r])}return()=>{for(let r of Object.keys(e)){let e=m[r];ft(5,n,e,p),Ew.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(Ow(T.current,x))??f:t??f;ft(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);Ew.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??jt.timeMs,t=Wt.push(x,e,h,i);v<e&&(_=t,v=e)}else{let e=S?.timeMs??r.throttleMs??f.throttleMs??c;b.push(Wt.abort(p)),Bt.push(x,e),y=!0}}let S=b.reduce((e,t)=>t(e),y?Bt.flush(h,i):Bt.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)(()=>Ow(C,x),[C,x]),A]}function Dw(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&&Dt(i[l]??d,f)?(e[s]=a[s]??null,e):(o=!0,e[s]=(Mt(f)?null:Cw(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 Ow(e,t){return Object.fromEntries(Object.keys(e).map(n=>[n,e[n]??t[n]??null]))}function Gne(e,t={}){let{parse:n,type:r,serialize:i,eq:a,defaultValue:o,...s}=t,[{[e]:c},l]=Wne({[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 kw(){return Gne(`tool`,Hne)}var Aw=new We,jw=`skybridge-devtools-oauth`,Mw={clientInfo:`${jw}:client-info`,tokens:`${jw}:tokens`,codeVerifier:`${jw}:code-verifier`,state:`${jw}:state`},Nw=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(Mw.clientInfo);return e?JSON.parse(e):void 0}saveClientInformation(e){localStorage.setItem(Mw.clientInfo,JSON.stringify(e))}tokens(){let e=localStorage.getItem(Mw.tokens);return e?JSON.parse(e):void 0}saveTokens(e){localStorage.setItem(Mw.tokens,JSON.stringify(e))}state(){let e=localStorage.getItem(Mw.state);if(e)return e;let t=crypto.randomUUID();return localStorage.setItem(Mw.state,t),t}redirectToAuthorization(e){window.location.href=e.toString()}saveCodeVerifier(e){localStorage.setItem(Mw.codeVerifier,e)}codeVerifier(){return localStorage.getItem(Mw.codeVerifier)??``}invalidateCredentials(e){(e===`all`||e===`tokens`)&&localStorage.removeItem(Mw.tokens),(e===`all`||e===`client`)&&localStorage.removeItem(Mw.clientInfo),(e===`all`||e===`verifier`)&&(localStorage.removeItem(Mw.codeVerifier),localStorage.removeItem(Mw.state))}};function Pw(e){return!!e._zod}function Fw(e,t){return Pw(e)?hc(e,t):e.safeParse(t)}function Iw(e){if(!e)return;let t;if(t=Pw(e)?e._zod?.def?.shape:e.shape,t){if(typeof t==`function`)try{return t()}catch{return}return t}}function Kne(e){if(Pw(e)){let t=e._zod?.def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}}let t=e._def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}let n=e.value;if(n!==void 0)return n}function Lw(e){return e===`completed`||e===`failed`||e===`cancelled`}function Rw(e){let t=Iw(e)?.method;if(!t)throw Error(`Schema is missing a method literal`);let n=Kne(t);if(typeof n!=`string`)throw Error(`Schema method literal must be a string`);return n}function zw(e,t){let n=Fw(e,t);if(!n.success)throw n.error;return n.data}var qne=class{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(Um,e=>{this._oncancel(e)}),this.setNotificationHandler(rh,e=>{this._onprogress(e)}),this.setRequestHandler(nh,e=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(lh,async(e,t)=>{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new mg(Lm.InvalidParams,`Failed to retrieve task: Task not found`);return{...n}}),this.setRequestHandler(dh,async(e,t)=>{let n=async()=>{let r=e.params.taskId;if(this._taskMessageQueue){let e;for(;e=await this._taskMessageQueue.dequeue(r,t.sessionId);){if(e.type===`response`||e.type===`error`){let t=e.message,n=t.id,r=this._requestResolvers.get(n);if(r)if(this._requestResolvers.delete(n),e.type===`response`)r(t);else{let e=t;r(new mg(e.error.code,e.error.message,e.error.data))}else{let t=e.type===`response`?`Response`:`Error`;this._onerror(Error(`${t} handler missing for request ${n}`))}continue}await this._transport?.send(e.message,{relatedRequestId:t.requestId})}}let i=await this._taskStore.getTask(r,t.sessionId);if(!i)throw new mg(Lm.InvalidParams,`Task not found: ${r}`);if(!Lw(i.status))return await this._waitForTaskUpdate(r,t.signal),await n();if(Lw(i.status)){let e=await this._taskStore.getTaskResult(r,t.sessionId);return this._clearTaskQueue(r),{...e,_meta:{...e._meta,[ym]:{taskId:r}}}}return await n()};return await n()}),this.setRequestHandler(fh,async(e,t)=>{try{let{tasks:n,nextCursor:r}=await this._taskStore.listTasks(e.params?.cursor,t.sessionId);return{tasks:n,nextCursor:r,_meta:{}}}catch(e){throw new mg(Lm.InvalidParams,`Failed to list tasks: ${e instanceof Error?e.message:String(e)}`)}}),this.setRequestHandler(mh,async(e,t)=>{try{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new mg(Lm.InvalidParams,`Task not found: ${e.params.taskId}`);if(Lw(n.status))throw new mg(Lm.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(e.params.taskId,`cancelled`,`Client cancelled task execution.`,t.sessionId),this._clearTaskQueue(e.params.taskId);let r=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!r)throw new mg(Lm.InvalidParams,`Task not found after cancellation: ${e.params.taskId}`);return{_meta:{},...r}}catch(e){throw e instanceof mg?e:new mg(Lm.InvalidRequest,`Failed to cancel task: ${e instanceof Error?e.message:String(e)}`)}}))}async _oncancel(e){e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),mg.fromError(Lm.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw Error(`Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.`);this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),Im(e)||zm(e)?this._onresponse(e):Mm(e)?this._onrequest(e,t):Pm(e)?this._onnotification(e):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();for(let e of this._requestHandlerAbortControllers.values())e.abort();this._requestHandlerAbortControllers.clear();let t=mg.fromError(Lm.ConnectionClosed,`Connection closed`);this._transport=void 0,this.onclose?.();for(let n of e.values())n(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){let t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;t!==void 0&&Promise.resolve().then(()=>t(e)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,r=this._transport,i=e.params?._meta?.[ym]?.taskId;if(n===void 0){let t={jsonrpc:`2.0`,id:e.id,error:{code:Lm.MethodNotFound,message:`Method not found`}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:`error`,message:t,timestamp:Date.now()},r?.sessionId).catch(e=>this._onerror(Error(`Failed to enqueue error response: ${e}`))):r?.send(t).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)));return}let a=new AbortController;this._requestHandlerAbortControllers.set(e.id,a);let o=see(e.params)?e.params.task:void 0,s=this._taskStore?this.requestTaskStore(e,r?.sessionId):void 0,c={signal:a.signal,sessionId:r?.sessionId,_meta:e.params?._meta,sendNotification:async t=>{if(a.signal.aborted)return;let n={relatedRequestId:e.id};i&&(n.relatedTask={taskId:i}),await this.notification(t,n)},sendRequest:async(t,n,r)=>{if(a.signal.aborted)throw new mg(Lm.ConnectionClosed,`Request was cancelled`);let o={...r,relatedRequestId:e.id};i&&!o.relatedTask&&(o.relatedTask={taskId:i});let c=o.relatedTask?.taskId??i;return c&&s&&await s.updateTaskStatus(c,`input_required`),await this.request(t,n,o)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:i,taskStore:s,taskRequestedTtl:o?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{o&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,c)).then(async t=>{if(a.signal.aborted)return;let n={result:t,jsonrpc:`2.0`,id:e.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`response`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)},async t=>{if(a.signal.aborted)return;let n={jsonrpc:`2.0`,id:e.id,error:{code:Number.isSafeInteger(t.code)?t.code:Lm.InternalError,message:t.message??`Internal error`,...t.data!==void 0&&{data:t.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`error`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===a&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._requestResolvers.get(t);if(n){this._requestResolvers.delete(t),Im(e)?n(e):n(new mg(e.error.code,e.error.message,e.error.data));return}let r=this._responseHandlers.get(t);if(r===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t);let i=!1;if(Im(e)&&e.result&&typeof e.result==`object`){let n=e.result;if(n.task&&typeof n.task==`object`){let e=n.task;typeof e.taskId==`string`&&(i=!0,this._taskProgressTokens.set(e.taskId,t))}}i||this._progressHandlers.delete(t),Im(e)?r(e):r(mg.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,t,n){let{task:r}=n??{};if(!r){try{yield{type:`result`,result:await this.request(e,t,n)}}catch(e){yield{type:`error`,error:e instanceof mg?e:new mg(Lm.InternalError,String(e))}}return}let i;try{let r=await this.request(e,sh,n);if(r.task)i=r.task.taskId,yield{type:`taskCreated`,task:r.task};else throw new mg(Lm.InternalError,`Task creation did not return a task`);for(;;){let e=await this.getTask({taskId:i},n);if(yield{type:`taskStatus`,task:e},Lw(e.status)){e.status===`completed`?yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)}:e.status===`failed`?yield{type:`error`,error:new mg(Lm.InternalError,`Task ${i} failed`)}:e.status===`cancelled`&&(yield{type:`error`,error:new mg(Lm.InternalError,`Task ${i} was cancelled`)});return}if(e.status===`input_required`){yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)};return}let r=e.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(e=>setTimeout(e,r)),n?.signal?.throwIfAborted()}}catch(e){yield{type:`error`,error:e instanceof mg?e:new mg(Lm.InternalError,String(e))}}}request(e,t,n){let{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a,task:o,relatedTask:s}=n??{};return new Promise((c,l)=>{let u=e=>{l(e)};if(!this._transport){u(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),o&&this.assertTaskCapability(e.method)}catch(e){u(e);return}n?.signal?.throwIfAborted();let d=this._requestMessageId++,f={...e,jsonrpc:`2.0`,id:d};n?.onprogress&&(this._progressHandlers.set(d,n.onprogress),f.params={...e.params,_meta:{...e.params?._meta||{},progressToken:d}}),o&&(f.params={...f.params,task:o}),s&&(f.params={...f.params,_meta:{...f.params?._meta||{},[ym]:s}});let p=e=>{this._responseHandlers.delete(d),this._progressHandlers.delete(d),this._cleanupTimeout(d),this._transport?.send({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:d,reason:String(e)}},{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))),l(e instanceof mg?e:new mg(Lm.RequestTimeout,String(e)))};this._responseHandlers.set(d,e=>{if(!n?.signal?.aborted){if(e instanceof Error)return l(e);try{let n=Fw(t,e.result);n.success?c(n.data):l(n.error)}catch(e){l(e)}}}),n?.signal?.addEventListener(`abort`,()=>{p(n?.signal?.reason)});let m=n?.timeout??6e4;this._setupTimeout(d,m,n?.maxTotalTimeout,()=>p(mg.fromError(Lm.RequestTimeout,`Request timed out`,{timeout:m})),n?.resetTimeoutOnProgress??!1);let h=s?.taskId;h?(this._requestResolvers.set(d,e=>{let t=this._responseHandlers.get(d);t?t(e):this._onerror(Error(`Response handler missing for side-channeled request ${d}`))}),this._enqueueTaskMessage(h,{type:`request`,message:f,timestamp:Date.now()}).catch(e=>{this._cleanupTimeout(d),l(e)})):this._transport.send(f,{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>{this._cleanupTimeout(d),l(e)})})}async getTask(e,t){return this.request({method:`tasks/get`,params:e},uh,t)}async getTaskResult(e,t,n){return this.request({method:`tasks/result`,params:e},t,n)}async listTasks(e,t){return this.request({method:`tasks/list`,params:e},ph,t)}async cancelTask(e,t){return this.request({method:`tasks/cancel`,params:e},hh,t)}async notification(e,t){if(!this._transport)throw Error(`Not connected`);this.assertNotificationCapability(e.method);let n=t?.relatedTask?.taskId;if(n){let r={...e,jsonrpc:`2.0`,params:{...e.params,_meta:{...e.params?._meta||{},[ym]:t.relatedTask}}};await this._enqueueTaskMessage(n,{type:`notification`,message:r,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let n={...e,jsonrpc:`2.0`};t?.relatedTask&&(n={...n,params:{...n.params,_meta:{...n.params?._meta||{},[ym]:t.relatedTask}}}),this._transport?.send(n,t).catch(e=>this._onerror(e))});return}let r={...e,jsonrpc:`2.0`};t?.relatedTask&&(r={...r,params:{...r.params,_meta:{...r.params?._meta||{},[ym]:t.relatedTask}}}),await this._transport.send(r,t)}setRequestHandler(e,t){let n=Rw(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(n,r)=>{let i=zw(e,n);return Promise.resolve(t(i,r))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){let n=Rw(e);this._notificationHandlers.set(n,n=>{let r=zw(e,n);return Promise.resolve(t(r))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let t=this._taskProgressTokens.get(e);t!==void 0&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,n){if(!this._taskStore||!this._taskMessageQueue)throw Error(`Cannot enqueue task message: taskStore and taskMessageQueue are not configured`);let r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,n,r)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(e,t);for(let t of n)if(t.type===`request`&&Mm(t.message)){let n=t.message.id,r=this._requestResolvers.get(n);r?(r(new mg(Lm.InternalError,`Task cancelled or completed`)),this._requestResolvers.delete(n)):this._onerror(Error(`Resolver missing for request ${n} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){let n=this._options?.defaultTaskPollInterval??1e3;try{let t=await this._taskStore?.getTask(e);t?.pollInterval&&(n=t.pollInterval)}catch{}return new Promise((e,r)=>{if(t.aborted){r(new mg(Lm.InvalidRequest,`Request cancelled`));return}let i=setTimeout(e,n);t.addEventListener(`abort`,()=>{clearTimeout(i),r(new mg(Lm.InvalidRequest,`Request cancelled`))},{once:!0})})}requestTaskStore(e,t){let n=this._taskStore;if(!n)throw Error(`No task store configured`);return{createTask:async r=>{if(!e)throw Error(`No request provided`);return await n.createTask(r,e.id,{method:e.method,params:e.params},t)},getTask:async e=>{let r=await n.getTask(e,t);if(!r)throw new mg(Lm.InvalidParams,`Failed to retrieve task: Task not found`);return r},storeTaskResult:async(e,r,i)=>{await n.storeTaskResult(e,r,i,t);let a=await n.getTask(e,t);if(a){let t=ch.parse({method:`notifications/tasks/status`,params:a});await this.notification(t),Lw(a.status)&&this._cleanupTaskProgressHandler(e)}},getTaskResult:e=>n.getTaskResult(e,t),updateTaskStatus:async(e,r,i)=>{let a=await n.getTask(e,t);if(!a)throw new mg(Lm.InvalidParams,`Task "${e}" not found - it may have been cleaned up`);if(Lw(a.status))throw new mg(Lm.InvalidParams,`Cannot update task "${e}" from terminal status "${a.status}" to "${r}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(e,r,i,t);let o=await n.getTask(e,t);if(o){let t=ch.parse({method:`notifications/tasks/status`,params:o});await this.notification(t),Lw(o.status)&&this._cleanupTaskProgressHandler(e)}},listTasks:e=>n.listTasks(e,t)}}};function Bw(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Jne(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];Bw(a)&&Bw(i)?n[r]={...a,...i}:n[r]=i}return n}var Vw=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})),Hw=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;var t=Vw(),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}}})),Uw=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=Vw(),n=Hw(),r=Vw();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=Hw();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?`
78
+ `:``},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})`}})),Ww=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=Uw(),n=Vw();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})),Gw=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Uw();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`)}})),Kw=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=Uw(),n=Ww(),r=Gw();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])}})),Yne=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;var t=Kw(),n=Uw(),r=Gw(),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)}})),qw=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})),Jw=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})),Yw=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=qw(),n=Jw(),r=Kw(),i=Uw(),a=Ww(),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
79
+ || (${s} == "string" && ${a} && ${a} == +${a})`).assign(c,(0,i._)`+${a}`);return;case`integer`:r.elseIf((0,i._)`${s} === "boolean" || ${a} === null
80
+ || (${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"
81
+ || ${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}}})),Xne=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assignDefaults=void 0;var t=Uw(),n=Ww();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)}`)}})),Xw=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=Uw(),n=Ww(),r=Gw(),i=Ww();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})),Zne=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;var t=Uw(),n=Gw(),r=Xw(),i=Kw();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})),Qne=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;var t=Uw(),n=Ww();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})),Zw=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}})),Qw=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`)}})),$w=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;var t=Ww(),n=Zw(),r=Qw(),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})),eT=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;var t=Yne(),n=Yw(),r=Jw(),i=Yw(),a=Xne(),o=Zne(),s=Qne(),c=Uw(),l=Gw(),u=$w(),d=Ww(),f=Kw();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(()=>ie(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)&&ie(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)||R(e,`type "${t}" not allowed by context "${e.dataTypes.join(`,`)}"`)}),re(e,t)}}function L(e,t){t.length>1&&!(t.length===2&&t.includes(`null`))&&R(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))&&R(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 re(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 R(e,t){let n=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${n}" (strictTypes)`,(0,d.checkStrictMode)(e,t,e.opts.strictTypes)}var z=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`,se(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=z;function ie(e,t,n,r){let i=new z(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 ae=/^\/(?:[^~]|~0|~1)*$/,oe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function se(e,{dataLevel:t,dataNames:n,dataPathArr:r}){let i,a;if(e===``)return l.default.rootData;if(e[0]===`/`){if(!ae.test(e))throw Error(`Invalid JSON-pointer: ${e}`);i=e,a=l.default.rootData}else{let o=oe.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=se})),tT=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}}})),nT=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=$w();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))}}})),rT=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;var t=Uw(),n=tT(),r=Gw(),i=$w(),a=Ww(),o=eT(),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}})),$ne=c({$id:()=>iT,additionalProperties:()=>!1,default:()=>lT,description:()=>aT,properties:()=>cT,required:()=>sT,type:()=>oT}),iT,aT,oT,sT,cT,lT,ere=o((()=>{iT=`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`,aT=`Meta-schema for $data reference (JSON AnySchema extension proposal)`,oT=`object`,sT=[`$data`],cT={$data:{type:`string`,anyOf:[{format:`relative-json-pointer`},{format:`json-pointer`}]}},lT={$id:iT,description:aT,type:oT,required:sT,properties:cT,additionalProperties:!1}})),uT=s(((e,t)=>{var n=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),r=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function i(e){let t=``,n=0,r=0;for(r=0;r<e.length;r++)if(n=e[r].charCodeAt(0),n!==48){if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r];break}for(r+=1;r<e.length;r++){if(n=e[r].charCodeAt(0),!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r]}return t}var a=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function o(e){return e.length=0,!0}function s(e,t,n){if(e.length){let r=i(e);if(r!==``)t.push(r);else return n.error=!0,!1;e.length=0}return!0}function c(e){let t=0,n={error:!1,address:``,zone:``},r=[],a=[],c=!1,l=!1,u=s;for(let i=0;i<e.length;i++){let s=e[i];if(!(s===`[`||s===`]`))if(s===`:`){if(c===!0&&(l=!0),!u(a,r,n))break;if(++t>7){n.error=!0;break}i>0&&e[i-1]===`:`&&(c=!0),r.push(`:`);continue}else if(s===`%`){if(!u(a,r,n))break;u=o}else{a.push(s);continue}}return a.length&&(u===o?n.zone=a.join(``):l?r.push(a.join(``)):r.push(i(a))),n.address=r.join(``),n}function l(e){if(u(e,`:`)<2)return{host:e,isIPV6:!1};let t=c(e);if(t.error)return{host:e,isIPV6:!1};{let e=t.address,n=t.address;return t.zone&&(e+=`%`+t.zone,n+=`%25`+t.zone),{host:e,isIPV6:!0,escapedHost:n}}}function u(e,t){let n=0;for(let r=0;r<e.length;r++)e[r]===t&&n++;return n}function d(e){let t=e,n=[],r=-1,i=0;for(;i=t.length;){if(i===1){if(t===`.`)break;if(t===`/`){n.push(`/`);break}else{n.push(t);break}}else if(i===2){if(t[0]===`.`){if(t[1]===`.`)break;if(t[1]===`/`){t=t.slice(2);continue}}else if(t[0]===`/`&&(t[1]===`.`||t[1]===`/`)){n.push(`/`);break}}else if(i===3&&t===`/..`){n.length!==0&&n.pop(),n.push(`/`);break}if(t[0]===`.`){if(t[1]===`.`){if(t[2]===`/`){t=t.slice(3);continue}}else if(t[1]===`/`){t=t.slice(2);continue}}else if(t[0]===`/`&&t[1]===`.`){if(t[2]===`/`){t=t.slice(2);continue}else if(t[2]===`.`&&t[3]===`/`){t=t.slice(3),n.length!==0&&n.pop();continue}}if((r=t.indexOf(`/`,1))===-1){n.push(t);break}else n.push(t.slice(0,r)),t=t.slice(r)}return n.join(``)}function f(e,t){let n=t===!0?unescape:escape;return e.scheme!==void 0&&(e.scheme=n(e.scheme)),e.userinfo!==void 0&&(e.userinfo=n(e.userinfo)),e.host!==void 0&&(e.host=n(e.host)),e.path!==void 0&&(e.path=n(e.path)),e.query!==void 0&&(e.query=n(e.query)),e.fragment!==void 0&&(e.fragment=n(e.fragment)),e}function p(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push(`@`)),e.host!==void 0){let n=unescape(e.host);if(!r(n)){let t=l(n);n=t.isIPV6===!0?`[${t.escapedHost}]`:e.host}t.push(n)}return(typeof e.port==`number`||typeof e.port==`string`)&&(t.push(`:`),t.push(String(e.port))),t.length?t.join(``):void 0}t.exports={nonSimpleDomain:a,recomposeAuthority:p,normalizeComponentEncoding:f,removeDotSegments:d,isIPv4:r,isUUID:n,normalizeIPv6:l,stringArrayToHexStripped:i}})),tre=s(((e,t)=>{var{isUUID:n}=uT(),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}})),nre=s(((e,t)=>{var{normalizeIPv6:n,removeDotSegments:r,recomposeAuthority:i,normalizeComponentEncoding:a,isIPv4:o,nonSimpleDomain:s}=uT(),{SCHEMES:c,getSchemeHandler:l}=tre();function u(e,t){return typeof e==`string`?e=m(g(e,t),t):typeof e==`object`&&(e=g(m(e,t),t)),e}function d(e,t,n){let r=n?Object.assign({scheme:`null`},n):{scheme:`null`},i=f(g(e,r),g(t,r),r,!0);return r.skipEscape=!0,m(i,r)}function f(e,t,n,i){let a={};return i||(e=g(m(e,n),n),t=g(m(t,n),n)),n||={},!n.tolerant&&t.scheme?(a.scheme=t.scheme,a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=r(t.path||``),a.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=r(t.path||``),a.query=t.query):(t.path?(t.path[0]===`/`?a.path=r(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?a.path=`/`+t.path:e.path?a.path=e.path.slice(0,e.path.lastIndexOf(`/`)+1)+t.path:a.path=t.path,a.path=r(a.path)),a.query=t.query):(a.path=e.path,t.query===void 0?a.query=e.query:a.query=t.query),a.userinfo=e.userinfo,a.host=e.host,a.port=e.port),a.scheme=e.scheme),a.fragment=t.fragment,a}function p(e,t,n){return typeof e==`string`?(e=unescape(e),e=m(a(g(e,n),!0),{...n,skipEscape:!0})):typeof e==`object`&&(e=m(a(e,!0),{...n,skipEscape:!0})),typeof t==`string`?(t=unescape(t),t=m(a(g(t,n),!0),{...n,skipEscape:!0})):typeof t==`object`&&(t=m(a(t,!0),{...n,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()}function m(e,t){let n={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:``},a=Object.assign({},t),o=[],s=l(a.scheme||n.scheme);s&&s.serialize&&s.serialize(n,a),n.path!==void 0&&(a.skipEscape?n.path=unescape(n.path):(n.path=escape(n.path),n.scheme!==void 0&&(n.path=n.path.split(`%3A`).join(`:`)))),a.reference!==`suffix`&&n.scheme&&o.push(n.scheme,`:`);let c=i(n);if(c!==void 0&&(a.reference!==`suffix`&&o.push(`//`),o.push(c),n.path&&n.path[0]!==`/`&&o.push(`/`)),n.path!==void 0){let e=n.path;!a.absolutePath&&(!s||!s.absolutePath)&&(e=r(e)),c===void 0&&e[0]===`/`&&e[1]===`/`&&(e=`/%2F`+e.slice(2)),o.push(e)}return n.query!==void 0&&o.push(`?`,n.query),n.fragment!==void 0&&o.push(`#`,n.fragment),o.join(``)}var h=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function g(e,t){let r=Object.assign({},t),i={scheme:void 0,userinfo:void 0,host:``,port:void 0,path:``,query:void 0,fragment:void 0},a=!1;r.reference===`suffix`&&(e=r.scheme?r.scheme+`:`+e:`//`+e);let c=e.match(h);if(c){if(i.scheme=c[1],i.userinfo=c[3],i.host=c[4],i.port=parseInt(c[5],10),i.path=c[6]||``,i.query=c[7],i.fragment=c[8],isNaN(i.port)&&(i.port=c[5]),i.host)if(o(i.host)===!1){let e=n(i.host);i.host=e.host.toLowerCase(),a=e.isIPV6}else a=!0;i.scheme===void 0&&i.userinfo===void 0&&i.host===void 0&&i.port===void 0&&i.query===void 0&&!i.path?i.reference=`same-document`:i.scheme===void 0?i.reference=`relative`:i.fragment===void 0?i.reference=`absolute`:i.reference=`uri`,r.reference&&r.reference!==`suffix`&&r.reference!==i.reference&&(i.error=i.error||`URI is not a `+r.reference+` reference.`);let t=l(r.scheme||i.scheme);if(!r.unicodeSupport&&(!t||!t.unicodeSupport)&&i.host&&(r.domainHost||t&&t.domainHost)&&a===!1&&s(i.host))try{i.host=URL.domainToASCII(i.host.toLowerCase())}catch(e){i.error=i.error||`Host's domain name can not be converted to ASCII: `+e}(!t||t&&!t.skipNormalize)&&(e.indexOf(`%`)!==-1&&(i.scheme!==void 0&&(i.scheme=unescape(i.scheme)),i.host!==void 0&&(i.host=unescape(i.host))),i.path&&=escape(unescape(i.path)),i.fragment&&=encodeURI(decodeURIComponent(i.fragment))),t&&t.parse&&t.parse(i,r)}else i.error=i.error||`URI can not be parsed.`;return i}var _={SCHEMES:c,normalize:u,resolve:d,resolveComponent:f,equal:p,serialize:m,parse:g};t.exports=_,t.exports.default=_,t.exports.fastUri=_})),rre=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=nre();t.code=`require("ajv/dist/runtime/uri").default`,e.default=t})),ire=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=eT();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=Uw();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=tT(),i=nT(),a=qw(),o=rT(),s=Uw(),c=$w(),l=Yw(),u=Ww(),f=(ere(),d($ne).default),p=rre(),m=(e,t)=>new RegExp(e,t);m.code=`new RegExp`;var h=[`removeAdditional`,`useDefaults`,`coerceTypes`],g=new Set([`validate`,`serialize`,`parse`,`wrapper`,`root`,`schema`,`keyword`,`pattern`,`formats`,`validate$data`,`func`,`obj`,`Error`]),_={errorDataPath:``,format:"`validateFormats: false` can be used instead.",nullable:`"nullable" keyword is supported by default.`,jsonPointers:`Deprecated jsPropertySyntax can be used instead.`,extendRefs:`Deprecated ignoreKeywordsWithRef can be used instead.`,missingRefs:`Pass empty schema with $id that should be ignored to ajv.addSchema.`,processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:`"uniqueItems" keyword is always validated.`,unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:`Map is used as cache, schema object as key.`,serialize:`Map is used as cache, schema object as key.`,ajvErrors:`It is default now.`},v={ignoreKeywordsWithRef:``,jsPropertySyntax:``,unicode:`"minLength"/"maxLength" account for unicode characters by default.`},y=200;function b(e){let t=e.strict,n=e.code?.optimize,r=n===!0||n===void 0?1:n||0,i=e.code?.regExp??m,a=e.uriResolver??p.default;return{strictSchema:e.strictSchema??t??!0,strictNumbers:e.strictNumbers??t??!0,strictTypes:e.strictTypes??t??`log`,strictTuples:e.strictTuples??t??`log`,strictRequired:e.strictRequired??t??!1,code:e.code?{...e.code,optimize:r,regExp:i}:{optimize:r,regExp:i},loopRequired:e.loopRequired??y,loopEnum:e.loopEnum??y,meta:e.meta??!0,messages:e.messages??!0,inlineRefs:e.inlineRefs??!0,schemaId:e.schemaId??`$id`,addUsedSchema:e.addUsedSchema??!0,validateSchema:e.validateSchema??!0,validateFormats:e.validateFormats??!0,unicodeRegExp:e.unicodeRegExp??!0,int32range:e.int32range??!0,uriResolver:a}}var x=class{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...b(e)};let{es5:t,lines:n}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:g,es5:t,lines:n}),this.logger=k(e.logger);let r=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),S.call(this,_,e,`NOT SUPPORTED`),S.call(this,v,e,`DEPRECATED`,`warn`),this._metaOpts=D.call(this),e.formats&&T.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&E.call(this,e.keywords),typeof e.meta==`object`&&this.addMetaSchema(e.meta),w.call(this),e.validateFormats=r}_addVocabularies(){this.addKeyword(`$async`)}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:n}=this.opts,r=f;n===`id`&&(r={...f},r.id=r.$id,delete r.$id),t&&e&&this.addMetaSchema(r,r[n],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e==`object`?e[t]||e:void 0}validate(e,t){let n;if(typeof e==`string`){if(n=this.getSchema(e),!n)throw Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let r=n(t);return`$async`in n||(this.errors=n.errors),r}compile(e,t){let n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if(typeof this.opts.loadSchema!=`function`)throw Error(`options.loadSchema should be a function`);let{loadSchema:n}=this.opts;return r.call(this,e,t);async function r(e,t){await a.call(this,e.$schema);let n=this._addSchema(e,t);return n.validate||o.call(this,n)}async function a(e){e&&!this.getSchema(e)&&await r.call(this,{$ref:e},!0)}async function o(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof i.default))throw t;return s.call(this,t),await c.call(this,t.missingSchema),o.call(this,e)}}function s({missingSchema:e,missingRef:t}){if(this.refs[e])throw Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){let n=await l.call(this,e);this.refs[e]||await a.call(this,n.$schema),this.refs[e]||this.addSchema(n,e,t)}async function l(e){let t=this._loading[e];if(t)return t;try{return await(this._loading[e]=n(e))}finally{delete this._loading[e]}}}addSchema(e,t,n,r=this.opts.validateSchema){if(Array.isArray(e)){for(let t of e)this.addSchema(t,void 0,n,r);return this}let i;if(typeof e==`object`){let{schemaId:t}=this.opts;if(i=e[t],i!==void 0&&typeof i!=`string`)throw Error(`schema ${t} must be string`)}return t=(0,c.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,r,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if(typeof e==`boolean`)return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!=`string`)throw Error(`$schema must be a string`);if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn(`meta-schema not available`),this.errors=null,!0;let r=this.validate(n,e);if(!r&&t){let e=`schema is invalid: `+this.errorsText();if(this.opts.validateSchema===`log`)this.logger.error(e);else throw Error(e)}return r}getSchema(e){let t;for(;typeof(t=C.call(this,e))==`string`;)e=t;if(t===void 0){let{schemaId:n}=this.opts,r=new o.SchemaEnv({schema:{},schemaId:n});if(t=o.resolveSchema.call(this,r,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case`undefined`:return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case`string`:{let t=C.call(this,e);return typeof t==`object`&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case`object`:{let t=e;this._cache.delete(t);let n=e[this.opts.schemaId];return n&&(n=(0,c.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw Error(`ajv.removeSchema: invalid parameter`)}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if(typeof e==`string`)n=e,typeof t==`object`&&(this.logger.warn(`these parameters are deprecated, see docs for addKeyword`),t.keyword=n);else if(typeof e==`object`&&t===void 0){if(t=e,n=t.keyword,Array.isArray(n)&&!n.length)throw Error(`addKeywords: keyword must be string or non-empty array`)}else throw Error(`invalid addKeywords parameters`);if(j.call(this,n,t),!t)return(0,u.eachItem)(n,e=>M.call(this,e)),this;P.call(this,t);let r={...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)};return(0,u.eachItem)(n,r.type.length===0?e=>M.call(this,e,r):e=>r.type.forEach(t=>M.call(this,e,r,t))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t==`object`?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let n of t.rules){let t=n.rules.findIndex(t=>t.keyword===e);t>=0&&n.rules.splice(t,1)}return this}addFormat(e,t){return typeof t==`string`&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=`, `,dataVar:n=`data`}={}){return!e||e.length===0?`No errors`:e.map(e=>`${n}${e.instancePath} ${e.message}`).reduce((e,n)=>e+t+n)}$dataMetaSchema(e,t){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let r of t){let t=r.split(`/`).slice(1),i=e;for(let e of t)i=i[e];for(let e in n){let t=n[e];if(typeof t!=`object`)continue;let{$data:r}=t.definition,a=i[e];r&&a&&(i[e]=I(a))}}return e}_removeAllSchemas(e,t){for(let n in e){let r=e[n];(!t||t.test(n))&&(typeof r==`string`?delete e[n]:r&&!r.meta&&(this._cache.delete(r.schema),delete e[n]))}}_addSchema(e,t,n,r=this.opts.validateSchema,i=this.opts.addUsedSchema){let a,{schemaId:s}=this.opts;if(typeof e==`object`)a=e[s];else if(this.opts.jtd)throw Error(`schema must be object`);else if(typeof e!=`boolean`)throw Error(`schema must be object or boolean`);let l=this._cache.get(e);if(l!==void 0)return l;n=(0,c.normalizeId)(a||n);let u=c.getSchemaRefs.call(this,e,n);return l=new o.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:n,localRefs:u}),this._cache.set(l.schema,l),i&&!n.startsWith(`#`)&&(n&&this._checkUnique(n),this.refs[n]=l),r&&this.validateSchema(e,!0),l}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):o.compileSchema.call(this,e),!e.validate)throw Error(`ajv implementation error`);return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,e)}finally{this.opts=t}}};x.ValidationError=r.default,x.MissingRefError=i.default,e.default=x;function S(e,t,n,r=`error`){for(let i in e){let a=i;a in t&&this.logger[r](`${n}: option ${i}. ${e[a]}`)}}function C(e){return e=(0,c.normalizeId)(e),this.schemas[e]||this.refs[e]}function w(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function T(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function E(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn(`keywords option as map is deprecated, pass array`);for(let t in e){let n=e[t];n.keyword||=t,this.addKeyword(n)}}function D(){let e={...this.opts};for(let t of h)delete e[t];return e}var O={log(){},warn(){},error(){}};function k(e){if(e===!1)return O;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw Error(`logger must implement log, warn and error methods`)}var A=/^[a-z_$][a-z0-9_$:-]*$/i;function j(e,t){let{RULES:n}=this;if((0,u.eachItem)(e,e=>{if(n.keywords[e])throw Error(`Keyword ${e} is already defined`);if(!A.test(e))throw Error(`Keyword ${e} has invalid name`)}),t&&t.$data&&!(`code`in t||`validate`in t))throw Error(`$data keyword must have "code" or "validate" function`)}function M(e,t,n){var r;let i=t?.post;if(n&&i)throw Error(`keyword with "post" flag cannot have "type"`);let{RULES:a}=this,o=i?a.post:a.rules.find(({type:e})=>e===n);if(o||(o={type:n,rules:[]},a.rules.push(o)),a.keywords[e]=!0,!t)return;let s={keyword:e,definition:{...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)}};t.before?N.call(this,o,s,t.before):o.rules.push(s),a.all[e]=s,(r=t.implements)==null||r.forEach(e=>this.addKeyword(e))}function N(e,t,n){let r=e.rules.findIndex(e=>e.keyword===n);r>=0?e.rules.splice(r,0,t):(e.rules.push(t),this.logger.warn(`rule ${n} is not defined`))}function P(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=I(t)),e.validateSchema=this.compile(t,!0))}var F={$ref:`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`};function I(e){return{anyOf:[e,F]}}})),are=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:`id`,code(){throw Error(`NOT SUPPORTED: keyword "id", use "$id" for schema ID`)}}})),ore=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.callRef=e.getValidate=void 0;var t=nT(),n=Xw(),r=Uw(),i=Gw(),a=rT(),o=Ww(),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})),sre=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=are(),n=ore();e.default=[`$schema`,`$id`,`$defs`,`$vocabulary`,{keyword:`$comment`},`definitions`,t.default,n.default]})),cre=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Uw(),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})`)}}})),lre=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Uw();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}))`)}}})),ure=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`})),dre=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Uw(),n=Ww(),r=ure();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}`)}}})),fre=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Xw(),n=Ww(),r=Uw();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})`)}}}})),pre=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Uw();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}`)}}})),mre=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Xw(),n=Uw(),r=Ww();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)}}}})),hre=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Uw();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}`)}}})),dT=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Zw();t.code=`require("ajv/dist/runtime/equal").default`,e.default=t})),gre=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Yw(),n=Uw(),r=Ww(),i=dT();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)})))}}}})),_re=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Uw(),n=Ww(),r=dT();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}`)}}})),vre=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Uw(),n=Ww(),r=dT();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}`}}}})),yre=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=cre(),n=lre(),r=dre(),i=fre(),a=pre(),o=mre(),s=hre(),c=gre(),l=_re(),u=vre();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]})),fT=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateAdditionalItems=void 0;var t=Uw(),n=Ww(),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})),pT=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateTuple=void 0;var t=Uw(),n=Ww(),r=Xw(),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})),bre=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=pT();e.default={keyword:`prefixItems`,type:`array`,schemaType:[`array`],before:`uniqueItems`,code:e=>(0,t.validateTuple)(e,`items`)}})),xre=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Uw(),n=Ww(),r=Xw(),i=fT();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)))}}})),Sre=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Uw(),n=Ww();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)))}}}})),Cre=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;var t=Uw(),n=Ww(),r=Xw();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},
82
+ missingProperty: ${i},
83
+ depsCount: ${n},
84
+ 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})),wre=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Uw(),n=Ww();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)}}})),mT=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Xw(),n=Uw(),r=Gw(),i=Ww();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)}}}})),Tre=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=eT(),n=Xw(),r=Ww(),i=mT();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)}}}})),Ere=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Xw(),n=Uw(),r=Ww(),i=Ww();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())})})}}}})),Dre=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Ww();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`}}})),Ore=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:`anyOf`,schemaType:`array`,trackErrors:!0,code:Xw().validateUnion,error:{message:`must match a schema in anyOf`}}})),kre=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Uw(),n=Ww();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)})})}}}})),Are=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Ww();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)})}}})),jre=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Uw(),n=Ww(),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})),Mre=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Ww();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`)}}})),Nre=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=fT(),n=bre(),r=pT(),i=xre(),a=Sre(),o=Cre(),s=wre(),c=mT(),l=Tre(),u=Ere(),d=Dre(),f=Ore(),p=kre(),m=Are(),h=jre(),g=Mre();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=_})),Pre=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Uw();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})`}}}}})),Fre=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=[Pre().default]})),Ire=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`]})),Lre=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=sre(),n=yre(),r=Nre(),i=Fre(),a=Ire();e.default=[t.default,n.default,(0,r.default)(),i.default,a.metadataVocabulary,a.contentVocabulary]})),Rre=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={}))})),zre=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Uw(),n=Rre(),r=rT(),i=nT(),a=Ww();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}}}}})),Bre=c({$id:()=>gT,$schema:()=>hT,default:()=>xT,definitions:()=>vT,properties:()=>bT,title:()=>_T,type:()=>yT}),hT,gT,_T,vT,yT,bT,xT,Vre=o((()=>{hT=`http://json-schema.org/draft-07/schema#`,gT=`http://json-schema.org/draft-07/schema#`,_T=`Core schema meta-schema`,vT={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:[]}},yT=[`object`,`boolean`],bT={$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:`#`}},xT={$schema:hT,$id:gT,title:_T,definitions:vT,type:yT,properties:bT,default:!0}})),ST=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=ire(),r=Lre(),i=zre(),a=(Vre(),d(Bre).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=eT();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var u=Uw();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=tT();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return f.default}});var p=nT();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return p.default}})})),Hre=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(e,t){return{validate:e,compare:t}}e.fullFormats={date:t(a,o),time:t(c(!0),l),"date-time":t(f(!0),p),"iso-time":t(c(),u),"iso-date-time":t(f(),m),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:_,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:E,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:y,int32:{type:`number`,validate:S},int64:{type:`number`,validate:C},float:{type:`number`,validate:w},double:{type:`number`,validate:w},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,o),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,l),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,p),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,u),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,m),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function n(e){return e%4==0&&(e%100!=0||e%400==0)}var r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function a(e){let t=r.exec(e);if(!t)return!1;let a=+t[1],o=+t[2],s=+t[3];return o>=1&&o<=12&&s>=1&&s<=(o===2&&n(a)?29:i[o])}function o(e,t){if(e&&t)return e>t?1:e<t?-1:0}var s=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function c(e){return function(t){let n=s.exec(t);if(!n)return!1;let r=+n[1],i=+n[2],a=+n[3],o=n[4],c=n[5]===`-`?-1:1,l=+(n[6]||0),u=+(n[7]||0);if(l>23||u>59||e&&!o)return!1;if(r<=23&&i<=59&&a<60)return!0;let d=i-u*c,f=r-l*c-+(d<0);return(f===23||f===-1)&&(d===59||d===-1)&&a<61}}function l(e,t){if(!(e&&t))return;let n=new Date(`2020-01-01T`+e).valueOf(),r=new Date(`2020-01-01T`+t).valueOf();if(n&&r)return n-r}function u(e,t){if(!(e&&t))return;let n=s.exec(e),r=s.exec(t);if(n&&r)return e=n[1]+n[2]+n[3],t=r[1]+r[2]+r[3],e>t?1:e<t?-1:0}var d=/t|\s/i;function f(e){let t=c(e);return function(e){let n=e.split(d);return n.length===2&&a(n[0])&&t(n[1])}}function p(e,t){if(!(e&&t))return;let n=new Date(e).valueOf(),r=new Date(t).valueOf();if(n&&r)return n-r}function m(e,t){if(!(e&&t))return;let[n,r]=e.split(d),[i,a]=t.split(d),s=o(n,i);if(s!==void 0)return s||l(r,a)}var h=/\/|:/,g=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function _(e){return h.test(e)&&g.test(e)}var v=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function y(e){return v.lastIndex=0,v.test(e)}var b=-(2**31),x=2**31-1;function S(e){return Number.isInteger(e)&&e<=x&&e>=b}function C(e){return Number.isInteger(e)}function w(){return!0}var T=/[^\\]\\Z/;function E(e){if(T.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}})),Ure=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;var t=ST(),n=Uw(),r=n.operators,i={formatMaximum:{okStr:`<=`,ok:r.LTE,fail:r.GT},formatMinimum:{okStr:`>=`,ok:r.GTE,fail:r.LT},formatExclusiveMaximum:{okStr:`<`,ok:r.LT,fail:r.GTE},formatExclusiveMinimum:{okStr:`>`,ok:r.GT,fail:r.LTE}};e.formatLimitDefinition={keyword:Object.keys(i),type:`string`,schemaType:`string`,$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,n.str)`should be ${i[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,n._)`{comparison: ${i[e].okStr}, limit: ${t}}`},code(e){let{gen:r,data:a,schemaCode:o,keyword:s,it:c}=e,{opts:l,self:u}=c;if(!l.validateFormats)return;let d=new t.KeywordCxt(c,u.RULES.all.format.definition,`format`);d.$data?f():p();function f(){let t=r.scopeValue(`formats`,{ref:u.formats,code:l.code.formats}),i=r.const(`fmt`,(0,n._)`${t}[${d.schemaCode}]`);e.fail$data((0,n.or)((0,n._)`typeof ${i} != "object"`,(0,n._)`${i} instanceof RegExp`,(0,n._)`typeof ${i}.compare != "function"`,m(i)))}function p(){let t=d.schema,i=u.formats[t];if(!i||i===!0)return;if(typeof i!=`object`||i instanceof RegExp||typeof i.compare!=`function`)throw Error(`"${s}": format "${t}" does not define "compare" function`);let a=r.scopeValue(`formats`,{key:t,ref:i,code:l.code.formats?(0,n._)`${l.code.formats}${(0,n.getProperty)(t)}`:void 0});e.fail$data(m(a))}function m(e){return(0,n._)`${e}.compare(${a}, ${o}) ${i[s].fail} 0`}},dependencies:[`format`]},e.default=t=>(t.addKeyword(e.formatLimitDefinition),t)})),Wre=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});var n=Hre(),r=Ure(),i=Uw(),a=new i.Name(`fullFormats`),o=new i.Name(`fastFormats`),s=(e,t={keywords:!0})=>{if(Array.isArray(t))return c(e,t,n.fullFormats,a),e;let[i,s]=t.mode===`fast`?[n.fastFormats,o]:[n.fullFormats,a];return c(e,t.formats||n.formatNames,i,s),t.keywords&&(0,r.default)(e),e};s.get=(e,t=`full`)=>{let r=(t===`fast`?n.fastFormats:n.fullFormats)[e];if(!r)throw Error(`Unknown format "${e}"`);return r};function c(e,t,n,r){var a;(a=e.opts.code).formats??(a.formats=(0,i._)`require("ajv-formats/dist/formats").${r}`);for(let r of t)e.addFormat(r,n[r])}t.exports=e=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s})),Gre=u(ST(),1),Kre=u(Wre(),1);function qre(){let e=new Gre.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,Kre.default)(e),e}var Jre=class{constructor(e){this._ajv=e??qre()}getValidator(e){let t=`$id`in e&&typeof e.$id==`string`?this._ajv.getSchema(e.$id)??this._ajv.compile(e):this._ajv.compile(e);return e=>t(e)?{valid:!0,data:e,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(t.errors)}}},Yre=class{constructor(e){this._client=e}async*callToolStream(e,t=ig,n){let r=this._client,i={...n,task:n?.task??(r.isToolTask(e.name)?{}:void 0)},a=r.requestStream({method:`tools/call`,params:e},t,i),o=r.getToolOutputValidator(e.name);for await(let t of a){if(t.type===`result`&&o){let n=t.result;if(!n.structuredContent&&!n.isError){yield{type:`error`,error:new mg(Lm.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`)};return}if(n.structuredContent)try{let e=o(n.structuredContent);if(!e.valid){yield{type:`error`,error:new mg(Lm.InvalidParams,`Structured content does not match the tool's output schema: ${e.errorMessage}`)};return}}catch(e){if(e instanceof mg){yield{type:`error`,error:e};return}yield{type:`error`,error:new mg(Lm.InvalidParams,`Failed to validate structured content: ${e instanceof Error?e.message:String(e)}`)};return}}yield t}}async getTask(e,t){return this._client.getTask({taskId:e},t)}async getTaskResult(e,t,n){return this._client.getTaskResult({taskId:e},t,n)}async listTasks(e,t){return this._client.listTasks(e?{cursor:e}:void 0,t)}async cancelTask(e,t){return this._client.cancelTask({taskId:e},t)}requestStream(e,t,n){return this._client.requestStream(e,t,n)}};function Xre(e,t,n){if(!e)throw Error(`${n} does not support task creation (required for ${t})`);switch(t){case`tools/call`:if(!e.tools?.call)throw Error(`${n} does not support task creation for tools/call (required for ${t})`);break;default:break}}function Zre(e,t,n){if(!e)throw Error(`${n} does not support task creation (required for ${t})`);switch(t){case`sampling/createMessage`:if(!e.sampling?.createMessage)throw Error(`${n} does not support task creation for sampling/createMessage (required for ${t})`);break;case`elicitation/create`:if(!e.elicitation?.create)throw Error(`${n} does not support task creation for elicitation/create (required for ${t})`);break;default:break}}function CT(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&&CT(t,n[e])}}if(Array.isArray(e.anyOf))for(let n of e.anyOf)typeof n!=`boolean`&&CT(n,t);if(Array.isArray(e.oneOf))for(let n of e.oneOf)typeof n!=`boolean`&&CT(n,t)}}function Qre(e){if(!e)return{supportsFormMode:!1,supportsUrlMode:!1};let t=e.form!==void 0,n=e.url!==void 0;return{supportsFormMode:t||!t&&!n,supportsUrlMode:n}}var $re=class extends qne{constructor(e,t){super(t),this._clientInfo=e,this._cachedToolOutputValidators=new Map,this._cachedKnownTaskTools=new Set,this._cachedRequiredTaskTools=new Set,this._listChangedDebounceTimers=new Map,this._capabilities=t?.capabilities??{},this._jsonSchemaValidator=t?.jsonSchemaValidator??new Jre,t?.listChanged&&(this._pendingListChangedConfig=t.listChanged)}_setupListChangedHandlers(e){e.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler(`tools`,ag,e.tools,async()=>(await this.listTools()).tools),e.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler(`prompts`,$h,e.prompts,async()=>(await this.listPrompts()).prompts),e.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler(`resources`,Mh,e.resources,async()=>(await this.listResources()).resources)}get experimental(){return this._experimental||={tasks:new Yre(this)},this._experimental}registerCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after connecting to transport`);this._capabilities=Jne(this._capabilities,e)}setRequestHandler(e,t){let n=Iw(e)?.method;if(!n)throw Error(`Schema is missing a method literal`);let r;if(Pw(n)){let e=n;r=e._zod?.def?.value??e.value}else{let e=n;r=e._def?.value??e.value}if(typeof r!=`string`)throw Error(`Schema method literal must be a string`);let i=r;return i===`elicitation/create`?super.setRequestHandler(e,async(e,n)=>{let r=Fw(dg,e);if(!r.success){let e=r.error instanceof Error?r.error.message:String(r.error);throw new mg(Lm.InvalidParams,`Invalid elicitation request: ${e}`)}let{params:i}=r.data;i.mode=i.mode??`form`;let{supportsFormMode:a,supportsUrlMode:o}=Qre(this._capabilities.elicitation);if(i.mode===`form`&&!a)throw new mg(Lm.InvalidParams,`Client does not support form-mode elicitation requests`);if(i.mode===`url`&&!o)throw new mg(Lm.InvalidParams,`Client does not support URL-mode elicitation requests`);let s=await Promise.resolve(t(e,n));if(i.task){let e=Fw(sh,s);if(!e.success){let t=e.error instanceof Error?e.error.message:String(e.error);throw new mg(Lm.InvalidParams,`Invalid task creation result: ${t}`)}return e.data}let c=Fw(fg,s);if(!c.success){let e=c.error instanceof Error?c.error.message:String(c.error);throw new mg(Lm.InvalidParams,`Invalid elicitation result: ${e}`)}let l=c.data,u=i.mode===`form`?i.requestedSchema:void 0;if(i.mode===`form`&&l.action===`accept`&&l.content&&u&&this._capabilities.elicitation?.form?.applyDefaults)try{CT(u,l.content)}catch{}return l}):i===`sampling/createMessage`?super.setRequestHandler(e,async(e,n)=>{let r=Fw(cg,e);if(!r.success){let e=r.error instanceof Error?r.error.message:String(r.error);throw new mg(Lm.InvalidParams,`Invalid sampling request: ${e}`)}let{params:i}=r.data,a=await Promise.resolve(t(e,n));if(i.task){let e=Fw(sh,a);if(!e.success){let t=e.error instanceof Error?e.error.message:String(e.error);throw new mg(Lm.InvalidParams,`Invalid task creation result: ${t}`)}return e.data}let o=Fw(i.tools||i.toolChoice?ug:lg,a);if(!o.success){let e=o.error instanceof Error?o.error.message:String(o.error);throw new mg(Lm.InvalidParams,`Invalid sampling result: ${e}`)}return o.data}):super.setRequestHandler(e,t)}assertCapability(e,t){if(!this._serverCapabilities?.[e])throw Error(`Server does not support ${e} (required for ${t})`)}async connect(e,t){if(await super.connect(e),e.sessionId===void 0)try{let n=await this.request({method:`initialize`,params:{protocolVersion:_m,capabilities:this._capabilities,clientInfo:this._clientInfo}},eh,t);if(n===void 0)throw Error(`Server sent invalid initialize result: ${n}`);if(!vm.includes(n.protocolVersion))throw Error(`Server's protocol version is not supported: ${n.protocolVersion}`);this._serverCapabilities=n.capabilities,this._serverVersion=n.serverInfo,e.setProtocolVersion&&e.setProtocolVersion(n.protocolVersion),this._instructions=n.instructions,await this.notification({method:`notifications/initialized`}),this._pendingListChangedConfig&&=(this._setupListChangedHandlers(this._pendingListChangedConfig),void 0)}catch(e){throw this.close(),e}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(e){switch(e){case`logging/setLevel`:if(!this._serverCapabilities?.logging)throw Error(`Server does not support logging (required for ${e})`);break;case`prompts/get`:case`prompts/list`:if(!this._serverCapabilities?.prompts)throw Error(`Server does not support prompts (required for ${e})`);break;case`resources/list`:case`resources/templates/list`:case`resources/read`:case`resources/subscribe`:case`resources/unsubscribe`:if(!this._serverCapabilities?.resources)throw Error(`Server does not support resources (required for ${e})`);if(e===`resources/subscribe`&&!this._serverCapabilities.resources.subscribe)throw Error(`Server does not support resource subscriptions (required for ${e})`);break;case`tools/call`:case`tools/list`:if(!this._serverCapabilities?.tools)throw Error(`Server does not support tools (required for ${e})`);break;case`completion/complete`:if(!this._serverCapabilities?.completions)throw Error(`Server does not support completions (required for ${e})`);break;case`initialize`:break;case`ping`:break}}assertNotificationCapability(e){switch(e){case`notifications/roots/list_changed`:if(!this._capabilities.roots?.listChanged)throw Error(`Client does not support roots list changed notifications (required for ${e})`);break;case`notifications/initialized`:break;case`notifications/cancelled`:break;case`notifications/progress`:break}}assertRequestHandlerCapability(e){if(this._capabilities)switch(e){case`sampling/createMessage`:if(!this._capabilities.sampling)throw Error(`Client does not support sampling capability (required for ${e})`);break;case`elicitation/create`:if(!this._capabilities.elicitation)throw Error(`Client does not support elicitation capability (required for ${e})`);break;case`roots/list`:if(!this._capabilities.roots)throw Error(`Client does not support roots capability (required for ${e})`);break;case`tasks/get`:case`tasks/list`:case`tasks/result`:case`tasks/cancel`:if(!this._capabilities.tasks)throw Error(`Client does not support tasks capability (required for ${e})`);break;case`ping`:break}}assertTaskCapability(e){Xre(this._serverCapabilities?.tasks?.requests,e,`Server`)}assertTaskHandlerCapability(e){this._capabilities&&Zre(this._capabilities.tasks?.requests,e,`Client`)}async ping(e){return this.request({method:`ping`},Vm,e)}async complete(e,t){return this.request({method:`completion/complete`,params:e},pg,t)}async setLoggingLevel(e,t){return this.request({method:`logging/setLevel`,params:{level:e}},Vm,t)}async getPrompt(e,t){return this.request({method:`prompts/get`,params:e},Qh,t)}async listPrompts(e,t){return this.request({method:`prompts/list`,params:e},Hh,t)}async listResources(e,t){return this.request({method:`resources/list`,params:e},Th,t)}async listResourceTemplates(e,t){return this.request({method:`resources/templates/list`,params:e},Dh,t)}async readResource(e,t){return this.request({method:`resources/read`,params:e},jh,t)}async subscribeResource(e,t){return this.request({method:`resources/subscribe`,params:e},Vm,t)}async unsubscribeResource(e,t){return this.request({method:`resources/unsubscribe`,params:e},Vm,t)}async callTool(e,t=ig,n){if(this.isToolTaskRequired(e.name))throw new mg(Lm.InvalidRequest,`Tool "${e.name}" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`);let r=await this.request({method:`tools/call`,params:e},t,n),i=this.getToolOutputValidator(e.name);if(i){if(!r.structuredContent&&!r.isError)throw new mg(Lm.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(r.structuredContent)try{let e=i(r.structuredContent);if(!e.valid)throw new mg(Lm.InvalidParams,`Structured content does not match the tool's output schema: ${e.errorMessage}`)}catch(e){throw e instanceof mg?e:new mg(Lm.InvalidParams,`Failed to validate structured content: ${e instanceof Error?e.message:String(e)}`)}}return r}isToolTask(e){return this._serverCapabilities?.tasks?.requests?.tools?.call?this._cachedKnownTaskTools.has(e):!1}isToolTaskRequired(e){return this._cachedRequiredTaskTools.has(e)}cacheToolMetadata(e){this._cachedToolOutputValidators.clear(),this._cachedKnownTaskTools.clear(),this._cachedRequiredTaskTools.clear();for(let t of e){if(t.outputSchema){let e=this._jsonSchemaValidator.getValidator(t.outputSchema);this._cachedToolOutputValidators.set(t.name,e)}let e=t.execution?.taskSupport;(e===`required`||e===`optional`)&&this._cachedKnownTaskTools.add(t.name),e===`required`&&this._cachedRequiredTaskTools.add(t.name)}}getToolOutputValidator(e){return this._cachedToolOutputValidators.get(e)}async listTools(e,t){let n=await this.request({method:`tools/list`,params:e},rg,t);return this.cacheToolMetadata(n.tools),n}_setupListChangedHandler(e,t,n,r){let i=_ee.safeParse(n);if(!i.success)throw Error(`Invalid ${e} listChanged options: ${i.error.message}`);if(typeof n.onChanged!=`function`)throw Error(`Invalid ${e} listChanged options: onChanged must be a function`);let{autoRefresh:a,debounceMs:o}=i.data,{onChanged:s}=n,c=async()=>{if(!a){s(null,null);return}try{let e=await r();s(null,e)}catch(e){let t=e instanceof Error?e:Error(String(e));s(t,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`})}},wT=new class{client=null;transport=null;async connect(e,t){let n=typeof e==`string`?new URL(e):e;this.transport=new M_(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 $re({name:`mcp-client`,version:`1.0.0`},{capabilities:{experimental:{tools:{},resources:{},prompts:{}}}}),await this.client.connect(this.transport)}async listTools(){if(!this.client)throw Error(`Client not connected. Call connect() first.`);try{return(await this.client.listTools()).tools}catch(e){if(e instanceof Error&&e.message.includes(`MCP error -32601: Method not found`))return[];throw e}}async callTool(e,t){if(!this.client)throw Error(`Client not connected. Call connect() first.`);let{_meta:n,...r}=await this.client.callTool({name:e,arguments:t??{}});return{...r,meta:n}}async listResources(){if(!this.client)throw Error(`Client not connected. Call connect() first.`);return(await this.client.listResources()).resources}async readResource(e){if(!this.client)throw Error(`Client not connected. Call connect() first.`);return await this.client.readResource({uri:e})}async listPrompts(){if(!this.client)throw Error(`Client not connected. Call connect() first.`);return(await this.client.listPrompts()).prompts}async getPrompt(e,t){if(!this.client)throw Error(`Client not connected. Call connect() first.`);return await this.client.getPrompt({name:e,...t&&{arguments:t}})}getServerInfo(){if(!this.client)throw Error(`Client not connected. Call connect() first.`);return this.client._serverVersion}async finishAuth(e){if(!this.transport)throw Error(`Transport not available. Call connect() first.`);await this.transport.finishAuth(e)}async close(){this.client&&=(await this.client.close(),null),this.transport&&=null}},TT=null,ET=()=>U_.VITE_MCP_SERVER_URL;function DT(e){let t=e._meta?.securitySchemes;return!!t?.length&&t.every(e=>e?.type!==`noauth`)}function OT(e){return e instanceof Kg||e instanceof j_&&e.code===401}async function kT(){let e=ET(),{setStatus:t,setRequiresAuth:n,setHasAuthRequiredTools:r,setIsSignedIn:i,setError:a}=as.getState();t(`connecting`),a(null),await wT.close();let o=!1;try{(await c_(e))?.authorization_servers?.length&&(o=!0)}catch{}n(o);let s=o?new Nw:null,c=!!s?.tokens();TT=s;let l=(e,n)=>{i(!1),r(!1),t(n),n===`error`&&a(e instanceof Error?e.message:`Connection failed`)};try{await wT.connect(e,c&&s?s:void 0)}catch(t){if(!OT(t)||!s){l(t,`error`);return}try{await wT.close(),await wT.connect(e,s)}catch(e){l(e,OT(e)?`unauthenticated`:`error`);return}}let u=null;try{u=await wT.listTools()}catch{}i(!!s?.tokens()),r((u??[]).some(DT)),t(`authenticated`),u?Aw.setQueryData([`list-tools`],u):Aw.invalidateQueries({queryKey:[`list-tools`]})}async function eie(){let e=ET(),t=TT??new Nw;TT=t,t.invalidateCredentials(`all`),await n_(t,{serverUrl:e})}async function tie(e){let t=ET();await n_(new Nw,{serverUrl:t,authorizationCode:e}),await kT()}async function nie(){TT?.invalidateCredentials(`all`),TT=null,await wT.close(),as.getState().reset(),Aw.invalidateQueries({queryKey:[`list-tools`]})}var rie=()=>{let e=ds();return{...e,view:{mode:e.displayMode},toolInput:{},toolOutput:null,toolResponseMetadata:null,widgetState:null}},AT=()=>{let{data:e}=lt({queryKey:[`list-tools`],queryFn:()=>wT.listTools()});return e},jT=()=>{if(as(e=>e.status)===`authenticated`)return wT.getServerInfo()},MT=()=>{let{setToolData:e}=bw();return ut({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 wT.callTool(t,n);R_(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:{...rie(),toolInput:n??{},toolOutput:i.structuredContent,toolResponseMetadata:i.meta??null,widgetState:null},openInAppUrl:null}),i}})},NT=()=>{let[e]=kw();return AT().find(t=>t.name===e)??null},PT=()=>{let e=NT();if(!e)throw Error(`No tool is currently selected`);return e},FT=e=>lt({queryKey:[`resource`,e],queryFn:async()=>{if(!e)throw Error(`Resource URI is required`);return await wT.readResource(e)}}),IT=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Ii(`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,B.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function LT(e,t){e&&W_.flushSync(()=>e.dispatchEvent(t))}var RT=`Separator`,zT=`horizontal`,BT=[`horizontal`,`vertical`],VT=b.forwardRef((e,t)=>{let{decorative:n,orientation:r=zT,...i}=e,a=HT(r)?r:zT,o=n?{role:`none`}:{"aria-orientation":a===`vertical`?a:void 0,role:`separator`};return(0,B.jsx)(IT.div,{"data-orientation":a,...o,...i,ref:t})});VT.displayName=RT;function HT(e){return BT.includes(e)}var UT=VT;function WT({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return(0,B.jsx)(UT,{"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 GT={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 KT({status:e}){let t=GT[e];return(0,B.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,B.jsx)(`span`,{className:`h-2 w-2 rounded-full ${t.dot} mr-1 inline-block`}),t.label]})}var qT=Mi([`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 JT({className:e,variant:t,...n}){return(0,B.jsx)(`div`,{role:`alert`,className:Mr(qT({variant:t}),e),...n})}function YT({className:e,...t}){return(0,B.jsx)(`p`,{className:Mr(`type-text-sm font-semibold leading-snug`,e),...t})}function XT({className:e,...t}){return(0,B.jsx)(`div`,{className:Mr(`type-text-sm text-muted-foreground [&_p]:leading-relaxed`,e),...t})}function ZT({title:e,description:t,className:n}){return(0,B.jsxs)(JT,{variant:`warning`,className:n,children:[(0,B.jsx)(Di,{}),(0,B.jsx)(YT,{children:e}),(0,B.jsx)(XT,{children:t})]})}var QT=Object.defineProperty,$T=(e,t)=>QT(e,`name`,{value:t,configurable:!0}),eE=!!(typeof window<`u`&&window.document&&window.document.createElement);function tE(e,t,{checkForDefaultPrevented:n=!0}={}){return $T(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}$T(tE,`composeEventHandlers`);function nE(e){if(!eE)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}$T(nE,`getOwnerWindow`);function rE(e){if(!eE)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}$T(rE,`getOwnerDocument`);function iE(e,t=!1){let{activeElement:n}=rE(e);if(!n?.nodeName)return null;if(aE(n)&&n.contentDocument)return iE(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=rE(n).getElementById(e);if(t)return t}}return n}$T(iE,`getActiveElement`);function aE(e){return e.tagName===`IFRAME`}$T(aE,`isFrame`);function oE(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,B.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,sE(i,...t)]}function sE(...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 cE(e){let t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>((...e)=>t.current?.(...e)),[])}var lE=Object.defineProperty,uE=(e,t)=>lE(e,`name`,{value:t,configurable:!0}),dE=`dismissableLayer.update`,fE=`dismissableLayer.pointerDownOutside`,pE=`dismissableLayer.focusOutside`,mE,hE=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),gE=b.forwardRef(uE(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(hE),[d,f]=b.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=b.useState({}),h=Fi(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=yE(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=bE(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=cE(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&&(mE=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),xE(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=mE))}},[d,p,n,u]),b.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),xE())},[d,u]),b.useEffect(()=>{let e=uE(()=>m({}),`handleUpdate`);return document.addEventListener(dE,e),()=>document.removeEventListener(dE,e)},[]),(0,B.jsx)(IT.div,{...l,ref:h,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:tE(e.onFocusCapture,T.onFocusCapture),onBlurCapture:tE(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:tE(e.onPointerDownCapture,w.onPointerDownCapture)})},`DismissableLayer`));function _E(){let e=b.useContext(hE),[t,n]=b.useState(null);return b.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}uE(_E,`useDismissableLayerSurface`);var vE=uE(()=>!0,`IS_TRUE`);function yE(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=vE}=t,s=cE(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()}uE(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}uE(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)}uE(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}uE(p,`handleInteractionBubble`);let m=uE(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||SE(fE,s,p,{discrete:!0})};if(uE(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:uE(()=>c.current=!0,`onPointerDownCapture`)}}uE(yE,`usePointerDownOutside`);function bE(e,t=globalThis?.document){let n=cE(e),r=b.useRef(!1);return b.useEffect(()=>{let e=uE(e=>{e.target&&!r.current&&SE(pE,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:uE(()=>r.current=!0,`onFocusCapture`),onBlurCapture:uE(()=>r.current=!1,`onBlurCapture`)}}uE(bE,`useFocusOutside`);function xE(){let e=new CustomEvent(dE);document.dispatchEvent(e)}uE(xE,`dispatchUpdate`);function SE(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?LT(i,a):i.dispatchEvent(a)}uE(SE,`handleAndDispatchCustomEvent`);var CE=0,wE=null;function TE(){b.useEffect(()=>{wE||={start:EE(),end:EE()};let{start:e,end:t}=wE;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),CE++,()=>{CE===1&&(wE?.start.remove(),wE?.end.remove(),wE=null),CE=Math.max(0,CE-1)}},[])}function EE(){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 DE=Object.defineProperty,OE=(e,t)=>DE(e,`name`,{value:t,configurable:!0}),kE=`focusScope.autoFocusOnMount`,AE=`focusScope.autoFocusOnUnmount`,jE={bubbles:!1,cancelable:!0},ME=b.forwardRef(OE(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=b.useState(null),l=cE(i),u=cE(a),d=b.useRef(null),f=Fi(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:zE(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||zE(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&zE(s)};OE(e,`handleFocusIn`),OE(t,`handleFocusOut`),OE(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){BE.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(kE,jE);s.addEventListener(kE,l),s.dispatchEvent(t),t.defaultPrevented||(NE(UE(FE(s)),{select:!0}),document.activeElement===e&&zE(s))}return()=>{s.removeEventListener(kE,l),setTimeout(()=>{let t=new CustomEvent(AE,jE);s.addEventListener(AE,u),s.dispatchEvent(t),t.defaultPrevented||zE(e??document.body,{select:!0}),s.removeEventListener(AE,u),BE.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]=PE(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&zE(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&zE(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,B.jsx)(IT.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})},`FocusScope`));function NE(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(zE(r,{select:t}),document.activeElement!==n)return}OE(NE,`focusFirst`);function PE(e){let t=FE(e);return[IE(t,e),IE(t.reverse(),e)]}OE(PE,`getTabbableEdges`);function FE(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:OE(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}OE(FE,`getTabbableCandidates`);function IE(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):LE(r,{upTo:t})))return r}OE(IE,`findVisible`);function LE(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}OE(LE,`isHidden`);function RE(e){return e instanceof HTMLInputElement&&`select`in e}OE(RE,`isSelectableInput`);function zE(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&RE(e)&&t&&e.select()}}OE(zE,`focus`);var BE=VE();function VE(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=HE(e,t),e.unshift(t)},remove(t){e=HE(e,t),e[0]?.resume()}}}OE(VE,`createFocusScopesStack`);function HE(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}OE(HE,`arrayRemove`);function UE(e){return e.filter(e=>e.tagName!==`A`)}OE(UE,`removeLinks`);var WE=globalThis?.document?b.useLayoutEffect:()=>{},GE=b.useId||(()=>void 0),KE=0;function qE(e){let[t,n]=b.useState(GE());return WE(()=>{e||n(e=>e??String(KE++))},[e]),e||(t?`radix-${t}`:``)}var JE=[`top`,`right`,`bottom`,`left`],YE=Math.min,XE=Math.max,ZE=Math.round,QE=Math.floor,$E=e=>({x:e,y:e}),eD={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function tD(e,t,n){return XE(e,YE(t,n))}function nD(e,t){return typeof e==`function`?e(t):e}function rD(e){return e.split(`-`)[0]}function iD(e){return e.split(`-`)[1]}function aD(e){return e===`x`?`y`:`x`}function oD(e){return e===`y`?`height`:`width`}function sD(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function cD(e){return aD(sD(e))}function lD(e,t,n){n===void 0&&(n=!1);let r=iD(e),i=cD(e),a=oD(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=vD(o)),[o,vD(o)]}function uD(e){let t=vD(e);return[dD(e),t,dD(t)]}function dD(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var fD=[`left`,`right`],pD=[`right`,`left`],mD=[`top`,`bottom`],hD=[`bottom`,`top`];function gD(e,t,n){switch(e){case`top`:case`bottom`:return n?t?pD:fD:t?fD:pD;case`left`:case`right`:return t?mD:hD;default:return[]}}function _D(e,t,n,r){let i=iD(e),a=gD(rD(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(dD)))),a}function vD(e){let t=rD(e);return eD[t]+e.slice(t.length)}function yD(e){return{top:0,right:0,bottom:0,left:0,...e}}function bD(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:yD(e)}function xD(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 SD(e,t,n){let{reference:r,floating:i}=e,a=sD(t),o=cD(t),s=oD(o),c=rD(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(iD(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 CD(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}=nD(t,e),p=bD(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=xD(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=xD(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 wD=50,TD=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:CD},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=SD(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<wD&&(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}=SD(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},ED=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}=nD(e,t)||{};if(l==null)return{};let d=bD(u),f={x:n,y:r},p=cD(i),m=oD(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=YE(d[_],T),D=YE(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=tD(O,A,k),M=!c.arrow&&iD(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}}}),DD=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}=nD(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=rD(r),_=sD(o),v=rD(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[vD(o)]:uD(o)),x=p!==`none`;!d&&x&&b.push(..._D(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=lD(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`&&_!==sD(t))||T.every(e=>sD(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=sD(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 OD(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function kD(e){return JE.some(t=>e[t]>=0)}var AD=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=nD(e,t);switch(i){case`referenceHidden`:{let e=OD(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:kD(e)}}}case`escaped`:{let e=OD(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:kD(e)}}}default:return{}}}}},jD=new Set([`left`,`top`]);async function MD(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=rD(n),s=iD(n),c=sD(n)===`y`,l=jD.has(o)?-1:1,u=a&&c?-1:1,d=nD(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 ND=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 MD(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}}}}},PD=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}=nD(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=sD(rD(i)),p=aD(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=tD(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=tD(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}}}}}},FD=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}=nD(e,t),u={x:n,y:r},d=sD(i),f=aD(d),p=u[f],m=u[d],h=nD(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=jD.has(rD(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}}}},ID=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}=nD(e,t),u=await o.detectOverflow(t,l),d=rD(i),f=iD(i),p=sD(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=YE(h-u[g],v),x=YE(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=XE(u.left,0),t=XE(u.right,0),n=XE(u.top,0),r=XE(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:XE(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:XE(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 LD(){return typeof window<`u`}function RD(e){return VD(e)?(e.nodeName||``).toLowerCase():`#document`}function zD(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function BD(e){return((VD(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function VD(e){return LD()?e instanceof Node||e instanceof zD(e).Node:!1}function HD(e){return LD()?e instanceof Element||e instanceof zD(e).Element:!1}function UD(e){return LD()?e instanceof HTMLElement||e instanceof zD(e).HTMLElement:!1}function WD(e){return!LD()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof zD(e).ShadowRoot}function GD(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=nO(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function KD(e){return/^(table|td|th)$/.test(RD(e))}function qD(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var JD=/transform|translate|scale|rotate|perspective|filter/,YD=/paint|layout|strict|content/,XD=e=>!!e&&e!==`none`,ZD;function QD(e){let t=HD(e)?nO(e):e;return XD(t.transform)||XD(t.translate)||XD(t.scale)||XD(t.rotate)||XD(t.perspective)||!eO()&&(XD(t.backdropFilter)||XD(t.filter))||JD.test(t.willChange||``)||YD.test(t.contain||``)}function $D(e){let t=iO(e);for(;UD(t)&&!tO(t);){if(QD(t))return t;if(qD(t))return null;t=iO(t)}return null}function eO(){return ZD??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),ZD}function tO(e){return/^(html|body|#document)$/.test(RD(e))}function nO(e){return zD(e).getComputedStyle(e)}function rO(e){return HD(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function iO(e){if(RD(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||WD(e)&&e.host||BD(e);return WD(t)?t.host:t}function aO(e){let t=iO(e);return tO(t)?e.ownerDocument?e.ownerDocument.body:e.body:UD(t)&&GD(t)?t:aO(t)}function oO(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=aO(e),i=r===e.ownerDocument?.body,a=zD(r);if(i){let e=sO(a);return t.concat(a,a.visualViewport||[],GD(r)?r:[],e&&n?oO(e):[])}else return t.concat(r,oO(r,[],n))}function sO(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function cO(e){let t=nO(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=UD(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=ZE(n)!==a||ZE(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function lO(e){return HD(e)?e:e.contextElement}function uO(e){let t=lO(e);if(!UD(t))return $E(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=cO(t),o=(a?ZE(n.width):n.width)/r,s=(a?ZE(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var dO=$E(0);function fO(e){let t=zD(e);return!eO()||!t.visualViewport?dO:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function pO(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==zD(e)?!1:t}function mO(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=lO(e),o=$E(1);t&&(r?HD(r)&&(o=uO(r)):o=uO(e));let s=pO(a,n,r)?fO(a):$E(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=zD(a),t=r&&HD(r)?zD(r):r,n=e,i=sO(n);for(;i&&r&&t!==n;){let e=uO(i),t=i.getBoundingClientRect(),r=nO(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=zD(i),i=sO(n)}}return xD({width:u,height:d,x:c,y:l})}function hO(e,t){let n=rO(e).scrollLeft;return t?t.left+n:mO(BD(e)).left+n}function gO(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-hO(e,n),y:n.top+t.scrollTop}}function _O(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=BD(r),s=t?qD(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=$E(1),u=$E(0),d=UD(r);if((d||!d&&!a)&&((RD(r)!==`body`||GD(o))&&(c=rO(r)),d)){let e=mO(r);l=uO(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?gO(o,c):$E(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 vO(e){return Array.from(e.getClientRects())}function yO(e){let t=BD(e),n=rO(e),r=e.ownerDocument.body,i=XE(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=XE(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+hO(e),s=-n.scrollTop;return nO(r).direction===`rtl`&&(o+=XE(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var bO=25;function xO(e,t){let n=zD(e),r=BD(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=eO();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=hO(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<=bO&&(a-=o)}else l<=bO&&(a+=l);return{width:a,height:o,x:s,y:c}}function SO(e,t){let n=mO(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=UD(e)?uO(e):$E(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function CO(e,t,n){let r;if(t===`viewport`)r=xO(e,n);else if(t===`document`)r=yO(BD(e));else if(HD(t))r=SO(t,n);else{let n=fO(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return xD(r)}function wO(e,t){let n=iO(e);return n===t||!HD(n)||tO(n)?!1:nO(n).position===`fixed`||wO(n,t)}function TO(e,t){let n=t.get(e);if(n)return n;let r=oO(e,[],!1).filter(e=>HD(e)&&RD(e)!==`body`),i=null,a=nO(e).position===`fixed`,o=a?iO(e):e;for(;HD(o)&&!tO(o);){let t=nO(o),n=QD(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||GD(o)&&!n&&wO(e,o))?r=r.filter(e=>e!==o):i=t,o=iO(o)}return t.set(e,r),r}function EO(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?qD(t)?[]:TO(t,this._c):[].concat(n),r],o=CO(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=CO(t,a[e],i);s=XE(n.top,s),c=YE(n.right,c),l=YE(n.bottom,l),u=XE(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function DO(e){let{width:t,height:n}=cO(e);return{width:t,height:n}}function OO(e,t,n){let r=UD(t),i=BD(t),a=n===`fixed`,o=mO(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=$E(0);function l(){c.x=hO(i)}if(r||!r&&!a)if((RD(t)!==`body`||GD(i))&&(s=rO(t)),r){let e=mO(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?gO(i,s):$E(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 kO(e){return nO(e).position===`static`}function AO(e,t){if(!UD(e)||nO(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return BD(e)===n&&(n=n.ownerDocument.body),n}function jO(e,t){let n=zD(e);if(qD(e))return n;if(!UD(e)){let t=iO(e);for(;t&&!tO(t);){if(HD(t)&&!kO(t))return t;t=iO(t)}return n}let r=AO(e,t);for(;r&&KD(r)&&kO(r);)r=AO(r,t);return r&&tO(r)&&kO(r)&&!QD(r)?n:r||$D(e)||n}var MO=async function(e){let t=this.getOffsetParent||jO,n=this.getDimensions,r=await n(e.floating);return{reference:OO(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function NO(e){return nO(e).direction===`rtl`}var PO={convertOffsetParentRelativeRectToViewportRelativeRect:_O,getDocumentElement:BD,getClippingRect:EO,getOffsetParent:jO,getElementRects:MO,getClientRects:vO,getDimensions:DO,getScale:uO,isElement:HD,isRTL:NO};function FO(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function IO(e,t){let n=null,r,i=BD(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=QE(d),h=QE(i.clientWidth-(u+f)),g=QE(i.clientHeight-(d+p)),_=QE(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:XE(0,YE(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&&!FO(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 LO(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=lO(e),u=i||a?[...l?oO(l):[],...t?oO(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?IO(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?mO(e):null;c&&g();function g(){let t=mO(e);h&&!FO(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 RO=ND,zO=PD,BO=DD,VO=ID,HO=AD,UO=ED,WO=FD,GO=(e,t,n)=>{let r=new Map,i={platform:PO,...n},a={...i.platform,_c:r};return TD(e,t,{...i,platform:a})},KO=typeof document<`u`?b.useLayoutEffect:function(){};function qO(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(!qO(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)&&!qO(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function JO(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function YO(e,t){let n=JO(e);return Math.round(t*n)/n}function XO(e){let t=b.useRef(e);return KO(()=>{t.current=e}),t}function ZO(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);qO(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=XO(c),O=XO(i),k=XO(l),A=b.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),GO(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!qO(T.current,t)&&(T.current=t,W_.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);KO(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=b.useRef(!1);KO(()=>(j.current=!0,()=>{j.current=!1}),[]),KO(()=>{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=YO(N.floating,u.x),r=YO(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...JO(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 QO=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?{}:UO({element:r.current,padding:i}).fn(n):r?UO({element:r,padding:i}).fn(n):{}}}},$O=(e,t)=>{let n=RO(e);return{name:n.name,fn:n.fn,options:[e,t]}},ek=(e,t)=>{let n=zO(e);return{name:n.name,fn:n.fn,options:[e,t]}},tk=(e,t)=>({fn:WO(e).fn,options:[e,t]}),nk=(e,t)=>{let n=BO(e);return{name:n.name,fn:n.fn,options:[e,t]}},rk=(e,t)=>{let n=VO(e);return{name:n.name,fn:n.fn,options:[e,t]}},ik=(e,t)=>{let n=HO(e);return{name:n.name,fn:n.fn,options:[e,t]}},ak=(e,t)=>{let n=QO(e);return{name:n.name,fn:n.fn,options:[e,t]}};function ok(e){let[t,n]=b.useState(void 0);return WE(()=>{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 sk=Object.defineProperty,ck=(e,t)=>sk(e,`name`,{value:t,configurable:!0}),lk=`Popper`,[uk,dk]=oE(lk),[fk,pk]=uk(lk),mk=ck(e=>{let{__scopePopper:t,children:n}=e,[r,i]=b.useState(null),[a,o]=b.useState(void 0);return(0,B.jsx)(fk,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),hk=`PopperAnchor`,gk=b.forwardRef(ck(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=pk(hk,n),o=b.useRef(null),s=a.onAnchorChange,c=Fi(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&&Sk(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,B.jsx)(IT.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),_k=`PopperContent`,[vk,iie]=uk(_k),yk=b.forwardRef(ck(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=pk(_k,n),[_,v]=b.useState(null),y=Fi(t,v),[x,S]=b.useState(null),C=ok(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(bk),altBoundary:k},{refs:j,floatingStyles:M,placement:N,isPositioned:P,middlewareData:F}=ZO({strategy:`fixed`,placement:E,whileElementsMounted:ck((...e)=>LO(...e,{animationFrame:p===`always`}),`whileElementsMounted`),elements:{reference:g.anchor},middleware:[$O({mainAxis:i+T,alignmentAxis:o}),c&&ek({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?tk():void 0,...A}),c&&nk({...A}),rk({...A,apply:ck(({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&&ak({element:x,padding:s}),xk({arrowWidth:w,arrowHeight:T}),f&&ik({strategy:`referenceHidden`,...A,boundary:k?A.boundary:void 0})]}),I=g.setPlacementState;WE(()=>(I(N),()=>{I(void 0)}),[N,I]);let[L,ee]=Sk(N),te=cE(m);WE(()=>{P&&te?.()},[P,te]);let ne=F.arrow?.x,re=F.arrow?.y,R=F.arrow?.centerOffset!==0,[z,ie]=b.useState();return WE(()=>{_&&ie(window.getComputedStyle(_).zIndex)},[_]),(0,B.jsx)(`div`,{ref:j.setFloating,"data-radix-popper-content-wrapper":``,style:{...M,transform:P?M.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:z,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(` `),...F.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,B.jsx)(vk,{scope:n,placedSide:L,placedAlign:ee,onArrowChange:S,arrowX:ne,arrowY:re,shouldHideArrow:R,children:(0,B.jsx)(IT.div,{"data-side":L,"data-align":ee,...h,ref:y,style:{...h.style,animation:P?h.style?.animation:`none`}})})})},`PopperContent`));function bk(e){return e!==null}ck(bk,`isNotNull`);var xk=ck(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]=Sk(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 Sk(e){let[t,n=`center`]=e.split(`-`);return[t,n]}ck(Sk,`getSideAndAlignFromPlacement`);var Ck=mk,wk=gk,Tk=yk,Ek=Object.defineProperty,Dk=b.forwardRef(((e,t)=>Ek(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=b.useState(!1);WE(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?W_.createPortal((0,B.jsx)(IT.div,{...r,ref:t}),o):null},`Portal`)),Ok=Object.defineProperty,kk=(e,t)=>Ok(e,`name`,{value:t,configurable:!0});function Ak(e,t){return b.useReducer((e,n)=>t[e][n]??e,e)}kk(Ak,`useStateMachine`);var jk=kk(e=>{let{present:t,children:n}=e,r=Mk(t),i=typeof n==`function`?n({present:r.isPresent}):b.Children.only(n),a=Pk(r.ref,Ik(i));return typeof n==`function`||r.isPresent?b.cloneElement(i,{ref:a}):null},`Presence`);function Mk(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]=Ak(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??Fk(r.current),o.current=void 0):a.current=`none`},[s]),WE(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=Fk(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]),WE(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=kk(a=>{let o=Fk(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=kk(e=>{e.target===t&&(a.current=Fk(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=Fk(t)}else r.current=null;n(e)},[])}}kk(Mk,`usePresence`);function Nk(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}kk(Nk,`setRef`);function Pk(...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=Nk(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():Nk(n[e],null)}}},[])}kk(Pk,`useStableComposedRefs`);function Fk(e){return e?.animationName||`none`}kk(Fk,`getAnimationName`);function Ik(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)}kk(Ik,`getElementRef`);var Lk=b.useEffectEvent,Rk=b.useInsertionEffect;function zk(e){if(typeof Lk==`function`)return Lk(e);let t=b.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof Rk==`function`?Rk(()=>{t.current=e}):WE(()=>{t.current=e}),b.useMemo(()=>((...e)=>t.current?.(...e)),[])}var Bk=Object.defineProperty,Vk=(e,t)=>Bk(e,`name`,{value:t,configurable:!0}),Hk=b.useInsertionEffect||WE;function Uk({prop:e,defaultProp:t,onChange:n=Vk(()=>{},`onChange`),caller:r}){let[i,a,o]=Wk({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,b.useCallback(t=>{if(s){let n=Gk(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}Vk(Uk,`useControllableState`);function Wk({defaultProp:e,onChange:t}){let[n,r]=b.useState(e),i=b.useRef(n),a=b.useRef(t);return Hk(()=>{a.current=t},[t]),b.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}Vk(Wk,`useUncontrolledState`);function Gk(e){return typeof e==`function`}Vk(Gk,`isFunction`);var Kk=Symbol(`RADIX:SYNC_STATE`);function qk(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=zk(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=b.useReducer((t,n)=>{if(n.type===Kk)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:Kk,state:i})},[i,d.state,c]),[h,f]}Vk(qk,`useControllableStateReducer`);var Jk=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Yk=new WeakMap,Xk=new WeakMap,Zk={},Qk=0,$k=function(e){return e&&(e.host||$k(e.parentNode))},eA=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=$k(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})},tA=function(e,t,n,r){var i=eA(t,Array.isArray(e)?e:[e]);Zk[n]||(Zk[n]=new WeakMap);var a=Zk[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=(Yk.get(e)||0)+1,l=(a.get(e)||0)+1;Yk.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Xk.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(),Qk++,function(){o.forEach(function(e){var t=Yk.get(e)-1,i=a.get(e)-1;Yk.set(e,t),a.set(e,i),t||(Xk.has(e)||e.removeAttribute(r),Xk.delete(e)),i||e.removeAttribute(n)}),Qk--,Qk||(Yk=new WeakMap,Yk=new WeakMap,Xk=new WeakMap,Zk={})}},nA=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Jk(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),tA(r,i,n,`aria-hidden`)):function(){return null}},rA=function(){return rA=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},rA.apply(this,arguments)};function iA(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 aA(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 oA(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 sA(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 cA=`right-scroll-bar-position`,lA=`width-before-scroll-bar`,uA=`with-scroll-bars-hidden`,dA=`--removed-body-scroll-bar-size`;function fA(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function pA(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 mA=typeof window<`u`?b.useLayoutEffect:b.useEffect,hA=new WeakMap;function gA(e,t){var n=pA(t||null,function(t){return e.forEach(function(e){return fA(e,t)})});return mA(function(){var t=hA.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||fA(e,null)}),i.forEach(function(e){r.has(e)||fA(e,a)})}hA.set(n,e)},[e]),n}function _A(e){return e}function vA(e,t){t===void 0&&(t=_A);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 yA(e){e===void 0&&(e={});var t=vA(null);return t.options=rA({async:!0,ssr:!1},e),t}var bA=function(e){var t=e.sideCar,n=iA(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,rA({},n))};bA.isSideCarExport=!0;function xA(e,t){return e.useMedium(t),bA}var SA=yA(),CA=function(){},wA=b.forwardRef(function(e,t){var n=b.useRef(null),r=b.useState({onScrollCapture:CA,onWheelCapture:CA,onTouchMoveCapture:CA}),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=iA(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=gA([n,t]),w=rA(rA({},x),i);return b.createElement(b.Fragment,null,u&&b.createElement(S,{sideCar:SA,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),rA(rA({},w),{ref:C})):b.createElement(v,rA({},w,{className:c,ref:C}),s))});wA.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},wA.classNames={fullWidth:lA,zeroRight:cA};var TA,EA=function(){if(TA)return TA;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function DA(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=EA();return t&&e.setAttribute(`nonce`,t),e}function OA(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function kA(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var AA=function(){var e=0,t=null;return{add:function(n){e==0&&(t=DA())&&(OA(t,n),kA(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},jA=function(){var e=AA();return function(t,n){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},MA=function(){var e=jA();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},NA={left:0,top:0,right:0,gap:0},PA=function(e){return parseInt(e||``,10)||0},FA=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[PA(n),PA(r),PA(i)]},IA=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return NA;var t=FA(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])}},LA=MA(),RA=`data-scroll-locked`,zA=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
85
+ .${uA} {
86
+ overflow: hidden ${r};
87
+ padding-right: ${s}px ${r};
88
+ }
89
+ body[${RA}] {
90
+ overflow: hidden ${r};
91
+ overscroll-behavior: contain;
92
+ ${[t&&`position: relative ${r};`,n===`margin`&&`
93
+ padding-left: ${i}px;
94
+ padding-top: ${a}px;
95
+ padding-right: ${o}px;
96
+ margin-left:0;
97
+ margin-top:0;
98
+ margin-right: ${s}px ${r};
99
+ `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
100
+ }
101
+
102
+ .${cA} {
103
+ right: ${s}px ${r};
104
+ }
105
+
106
+ .${lA} {
107
+ margin-right: ${s}px ${r};
108
+ }
109
+
110
+ .${cA} .${cA} {
111
+ right: 0 ${r};
112
+ }
113
+
114
+ .${lA} .${lA} {
115
+ margin-right: 0 ${r};
116
+ }
117
+
118
+ body[${RA}] {
119
+ ${dA}: ${s}px;
120
+ }
121
+ `},BA=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},VA=function(){b.useEffect(function(){return document.body.setAttribute(RA,(BA()+1).toString()),function(){var e=BA()-1;e<=0?document.body.removeAttribute(RA):document.body.setAttribute(RA,e.toString())}},[])},HA=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;VA();var a=b.useMemo(function(){return IA(i)},[i]);return b.createElement(LA,{styles:zA(a,!t,i,n?``:`!important`)})},UA=!1;if(typeof window<`u`)try{var WA=Object.defineProperty({},"passive",{get:function(){return UA=!0,!0}});window.addEventListener(`test`,WA,WA),window.removeEventListener(`test`,WA,WA)}catch{UA=!1}var GA=UA?{passive:!1}:!1,KA=function(e){return e.tagName===`TEXTAREA`},qA=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!KA(e)&&n[t]===`visible`)},JA=function(e){return qA(e,`overflowY`)},YA=function(e){return qA(e,`overflowX`)},XA=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),$A(e,r)){var i=ej(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ZA=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},QA=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},$A=function(e,t){return e===`v`?JA(t):YA(t)},ej=function(e,t){return e===`v`?ZA(t):QA(t)},tj=function(e,t){return e===`h`&&t===`rtl`?-1:1},nj=function(e,t,n,r,i){var a=tj(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=ej(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&$A(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},rj=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ij=function(e){return[e.deltaX,e.deltaY]},aj=function(e){return e&&`current`in e?e.current:e},oj=function(e,t){return e[0]===t[0]&&e[1]===t[1]},sj=function(e){return`
122
+ .block-interactivity-${e} {pointer-events: none;}
123
+ .allow-interactivity-${e} {pointer-events: all;}
124
+ `},cj=0,lj=[];function uj(e){var t=b.useRef([]),n=b.useRef([0,0]),r=b.useRef(),i=b.useState(cj++)[0],a=b.useState(MA)[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=sA([e.lockRef.current],(e.shards||[]).map(aj),!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=rj(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=XA(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=XA(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 nj(h,t,e,h===`h`?s:c,!0)},[]),c=b.useCallback(function(e){var n=e;if(!(!lj.length||lj[lj.length-1]!==a)){var r=`deltaY`in n?ij(n):rj(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&oj(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(aj).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:dj(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=rj(e),r.current=void 0},[]),d=b.useCallback(function(t){l(t.type,ij(t),t.target,s(t,e.lockRef.current))},[]),f=b.useCallback(function(t){l(t.type,rj(t),t.target,s(t,e.lockRef.current))},[]);b.useEffect(function(){return lj.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,GA),document.addEventListener(`touchmove`,c,GA),document.addEventListener(`touchstart`,u,GA),function(){lj=lj.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,GA),document.removeEventListener(`touchmove`,c,GA),document.removeEventListener(`touchstart`,u,GA)}},[]);var p=e.removeScrollBar,m=e.inert;return b.createElement(b.Fragment,null,m?b.createElement(a,{styles:sj(i)}):null,p?b.createElement(HA,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function dj(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var fj=xA(SA,uj),pj=b.forwardRef(function(e,t){return b.createElement(wA,rA({},e,{ref:t,sideCar:fj}))});pj.classNames=wA.classNames;var mj=Object.defineProperty,hj=(e,t)=>mj(e,`name`,{value:t,configurable:!0}),gj=`Popover`,[_j,aie]=oE(gj,[dk]),vj=dk(),[yj,bj]=_j(gj),xj=hj(e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=vj(t),c=b.useRef(null),[l,u]=b.useState(!1),[d,f]=Uk({prop:r,defaultProp:i??!1,onChange:a,caller:gj});return(0,B.jsx)(Ck,{...s,children:(0,B.jsx)(yj,{scope:t,contentId:qE(),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`),Sj=`PopoverAnchor`,Cj=b.forwardRef(hj(function(e,t){let{__scopePopover:n,...r}=e,i=bj(Sj,n),a=vj(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return b.useEffect(()=>(o(),()=>s()),[o,s]),(0,B.jsx)(wk,{...a,...r,ref:t})},`PopoverAnchor`)),wj=`PopoverTrigger`,Tj=b.forwardRef(hj(function(e,t){let{__scopePopover:n,...r}=e,i=bj(wj,n),a=vj(n),o=Fi(t,i.triggerRef),s=(0,B.jsx)(IT.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Ij(i.open),...r,ref:o,onClick:tE(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,B.jsx)(wk,{asChild:!0,...a,children:s})},`PopoverTrigger`)),Ej=`PopoverPortal`,[Dj,Oj]=_j(Ej,{forceMount:void 0}),kj=hj(e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=bj(Ej,t);return(0,B.jsx)(Dj,{scope:t,forceMount:n,children:(0,B.jsx)(jk,{present:n||a.open,children:(0,B.jsx)(Dk,{asChild:!0,container:i,children:r})})})},`PopoverPortal`),Aj=`PopoverContent`,jj=b.forwardRef(hj(function(e,t){let n=Oj(Aj,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=bj(Aj,e.__scopePopover);return(0,B.jsx)(jk,{present:r||a.open,children:a.modal?(0,B.jsx)(Nj,{...i,ref:t}):(0,B.jsx)(Pj,{...i,ref:t})})},`PopoverContent`)),Mj=Ii(`PopoverContent.RemoveScroll`),Nj=b.forwardRef(hj(function(e,t){let n=bj(Aj,e.__scopePopover),r=b.useRef(null),i=Fi(t,r),a=b.useRef(!1);return b.useEffect(()=>{let e=r.current;if(e)return nA(e)},[]),(0,B.jsx)(pj,{as:Mj,allowPinchZoom:!0,children:(0,B.jsx)(Fj,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:tE(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:tE(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:tE(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})},`PopoverContentModal`)),Pj=b.forwardRef(hj(function(e,t){let n=bj(Aj,e.__scopePopover),r=b.useRef(!1),i=b.useRef(!1);return(0,B.jsx)(Fj,{...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`)),Fj=b.forwardRef(hj(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=bj(Aj,n),p=vj(n);return TE(),(0,B.jsx)(ME,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,B.jsx)(gE,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,B.jsx)(Tk,{"data-state":Ij(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 Ij(e){return e?`open`:`closed`}hj(Ij,`getState`);var Lj=xj,Rj=Cj,zj=Tj,Bj=kj,Vj=jj;function Hj({...e}){return(0,B.jsx)(Lj,{"data-slot":`popover`,...e})}function Uj({...e}){return(0,B.jsx)(zj,{"data-slot":`popover-trigger`,...e})}function Wj({...e}){return(0,B.jsx)(Rj,{"data-slot":`popover-anchor`,...e})}function Gj({className:e,align:t=`center`,sideOffset:n=4,...r}){return(0,B.jsx)(Bj,{children:(0,B.jsx)(Vj,{"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 Kj=Mi(`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 qj({className:e,variant:t,size:n,...r}){return(0,B.jsx)(si,{role:`status`,"aria-label":`Loading`,className:Mr(Kj({variant:t,size:n}),e),...r})}var Jj=Mi(`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 Yj({className:e,variant:t,pulse:n,...r}){return(0,B.jsx)(`div`,{className:Mr(Jj({variant:t,pulse:n}),e),...r})}function Y(...e){return jr(an(e))}function Xj(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=`
125
+
126
+ const waitForOpenAI = () => new Promise((resolve, reject) => {
127
+ if (typeof window === "undefined") { reject(new Error("window is not available")); return; }
128
+ if ("openai" in window && window.openai != null) { resolve(); return; }
129
+ Object.defineProperty(window, "openai", {
130
+ configurable: true,
131
+ enumerable: true,
132
+ get() { return undefined; },
133
+ set(value) {
134
+ Object.defineProperty(window, "openai", {
135
+ configurable: true,
136
+ enumerable: true,
137
+ writable: true,
138
+ value,
139
+ });
140
+ resolve();
141
+ },
142
+ });
143
+ });
144
+
145
+ await waitForOpenAI();
146
+ ${n.textContent}
147
+ `,t.head.innerHTML+t.body.innerHTML}var Zj=e=>typeof e==`string`?e:void 0,Qj=(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 $j(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 eM=1500;function tM(){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),eM)}catch(e){console.error(`Clipboard write failed`,e)}},[])}}function nM({value:e,label:t,className:n,stopPropagation:r}){let{copied:i,copy:a}=tM();return(0,B.jsx)(`button`,{type:`button`,"aria-label":t,onClick:t=>{r&&t.stopPropagation(),a(e)},className:Y(`text-quaternary-foreground hover:text-foreground`,n),children:i?(0,B.jsx)(Gr,{className:`size-3.5`}):(0,B.jsx)(ei,{className:`size-3.5`})})}var rM=K({id:W(),name:W()}),iM=zp(`state`,[K({state:q(`signedOut`)}),K({state:q(`noTeam`)}),K({state:q(`needsProject`),teams:G(rM),defaultTeamId:W(),staleConfig:wp().optional()}),K({state:q(`ready`),lastDeployGit:K({ref:W().nullable(),commitMessage:W().nullable(),author:W().nullable()}).nullable().optional(),lastDeployStatus:Gp([`ongoing`,`deployed`,`failed`,`canceled`]).optional(),lastDeployStartedAt:bp().optional(),mcpServerUrl:W().optional(),deploymentPageUrl:W().nullable().optional()}),K({state:q(`error`),message:W()})]),aM=zp(`status`,[K({status:q(`idle`)}),K({status:q(`deploying`),startedAt:bp(),deploymentPageUrl:W().nullable()}),K({status:q(`deployed`),mcpServerUrl:W(),deploymentPageUrl:W().nullable()}),K({status:q(`failed`),message:W(),deploymentPageUrl:W().nullable()})]),oM=`/__skybridge/deploy`;async function sM(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 cM=()=>({status:`deploying`,startedAt:Date.now(),deploymentPageUrl:null}),lM=is()((e,t)=>({status:{state:`loading`},progress:{status:`idle`},async refreshStatus(){try{let t=await fetch(`${oM}/status`),n=iM.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 sM(`${oM}/login`,void 0,`Sign-in failed`),await t().refreshStatus()},async createAndDeploy(t,n,r){e({progress:cM()});try{await sM(`${oM}/project`,{name:t,teamId:n,teamName:r},`Failed to create project`)}catch(t){throw e({progress:{status:`idle`}}),t}},async redeploy(){e({progress:cM()});try{await sM(oM,void 0,`Failed to deploy`)}catch(t){throw e({progress:{status:`idle`}}),t}},connect(){let n=new EventSource(`${oM}/events`);return n.addEventListener(`state`,n=>{try{let r=aM.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 uM(){let e=lM(e=>e.connect),t=lM(e=>e.refreshStatus),n=lM(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 dM=zp(`status`,[K({status:q(`idle`)}),K({status:q(`starting`),message:W()}),K({status:q(`connected`),url:W()}),K({status:q(`error`),message:W()})]),fM=`/__skybridge/tunnel`,pM=is()((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(fM,{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(fM,{method:`DELETE`})}catch{}},connect(){let t=new EventSource(`${fM}/events`);return t.addEventListener(`state`,t=>{if(t instanceof MessageEvent)try{let n=dM.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 mM(){let e=pM(e=>e.connect);(0,b.useEffect)(()=>e(),[e])}var hM=Object.defineProperty,gM=(e,t)=>hM(e,`name`,{value:t,configurable:!0}),_M=`Dialog`,[vM,oie]=oE(_M),[yM,bM]=vM(_M),xM=gM(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]=Uk({prop:r,defaultProp:i??!1,onChange:a,caller:_M}),[d,f]=b.useState(0),[p,m]=b.useState(0);return(0,B.jsx)(yM,{scope:t,triggerRef:s,contentRef:c,contentId:qE(),titleId:qE(),descriptionId:qE(),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`),SM=`DialogPortal`,[CM,wM]=vM(SM,{forceMount:void 0}),TM=gM(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=bM(SM,t);return(0,B.jsx)(CM,{scope:t,forceMount:n,children:b.Children.map(r,e=>(0,B.jsx)(jk,{present:n||a.open,children:(0,B.jsx)(Dk,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),EM=`DialogOverlay`,DM=b.forwardRef(gM(function(e,t){let n=wM(EM,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=bM(EM,e.__scopeDialog);return a.modal?(0,B.jsx)(jk,{present:r||a.open,children:(0,B.jsx)(kM,{...i,ref:t})}):null},`DialogOverlay`)),OM=Ii(`DialogOverlay.RemoveScroll`),kM=b.forwardRef(gM(function(e,t){let{__scopeDialog:n,...r}=e,i=bM(EM,n),a=Fi(t,_E());return(0,B.jsx)(pj,{as:OM,allowPinchZoom:!0,shards:[i.contentRef],children:(0,B.jsx)(IT.div,{"data-state":VM(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),AM=`DialogContent`,jM=b.forwardRef(gM(function(e,t){let n=wM(AM,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=bM(AM,e.__scopeDialog);return(0,B.jsx)(jk,{present:r||a.open,children:a.modal?(0,B.jsx)(MM,{...i,ref:t}):(0,B.jsx)(NM,{...i,ref:t})})},`DialogContent`)),MM=b.forwardRef(gM(function(e,t){let n=bM(AM,e.__scopeDialog),r=b.useRef(null),i=Fi(t,n.contentRef,r);return b.useEffect(()=>{let e=r.current;if(e)return nA(e)},[]),(0,B.jsx)(PM,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:tE(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:tE(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:tE(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),NM=b.forwardRef(gM(function(e,t){let n=bM(AM,e.__scopeDialog),r=b.useRef(!1),i=b.useRef(!1);return(0,B.jsx)(PM,{...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`)),PM=b.forwardRef(gM(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=bM(AM,n);return TE(),(0,B.jsx)(B.Fragment,{children:(0,B.jsx)(ME,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,B.jsx)(gE,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionPresent?s.descriptionId:void 0,"aria-labelledby":s.titlePresent?s.titleId:void 0,"data-state":VM(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})},`DialogContentImpl`)),FM=`DialogTitle`,IM=b.forwardRef(gM(function(e,t){let{__scopeDialog:n,...r}=e,i=bM(FM,n),{setTitleCount:a}=i;return WE(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,B.jsx)(IT.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),LM=`DialogDescription`,RM=b.forwardRef(gM(function(e,t){let{__scopeDialog:n,...r}=e,i=bM(LM,n),{setDescriptionCount:a}=i;return WE(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,B.jsx)(IT.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),zM=`DialogClose`,BM=b.forwardRef(gM(function(e,t){let{__scopeDialog:n,...r}=e,i=bM(zM,n);return(0,B.jsx)(IT.button,{type:`button`,...r,ref:t,onClick:tE(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function VM(e){return e?`open`:`closed`}gM(VM,`getState`);function HM({...e}){return(0,B.jsx)(xM,{"data-slot":`dialog`,...e})}function UM({...e}){return(0,B.jsx)(TM,{"data-slot":`dialog-portal`,...e})}function WM({className:e,...t}){return(0,B.jsx)(DM,{"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 GM=Mi([`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 KM({className:e,children:t,size:n,showCloseButton:r=!0,...i}){return(0,B.jsxs)(UM,{children:[(0,B.jsx)(WM,{}),(0,B.jsxs)(jM,{"data-slot":`dialog-content`,className:Mr(GM({size:n}),e),...i,children:[t,r&&(0,B.jsxs)(BM,{"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,B.jsx)(ki,{className:`size-4`}),(0,B.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function qM({className:e,...t}){return(0,B.jsx)(`div`,{"data-slot":`dialog-header`,className:Mr(`flex flex-col gap-0.5 py-6 pr-10`,e),...t})}var JM=Mi(`pb-6 pt-6`,{variants:{layout:{horizontal:`flex gap-3 [&>*]:flex-1`,vertical:`flex flex-col gap-3`}},defaultVariants:{layout:`horizontal`}});function YM({className:e,layout:t,...n}){return(0,B.jsx)(`div`,{"data-slot":`dialog-footer`,className:Mr(JM({layout:t}),e),...n})}function XM({className:e,...t}){return(0,B.jsx)(IM,{"data-slot":`dialog-title`,className:Mr(`type-text-md font-semibold text-foreground`,e),...t})}function ZM({className:e,...t}){return(0,B.jsx)(RM,{"data-slot":`dialog-description`,className:Mr(`type-text-sm text-subtle-foreground`,e),...t})}var QM=Object.defineProperty,$M=(e,t)=>QM(e,`name`,{value:t,configurable:!0}),eN=!!(typeof window<`u`&&window.document&&window.document.createElement);function tN(e,t,{checkForDefaultPrevented:n=!0}={}){return $M(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}$M(tN,`composeEventHandlers`);function nN(e){if(!eN)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}$M(nN,`getOwnerWindow`);function rN(e){if(!eN)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}$M(rN,`getOwnerDocument`);function iN(e,t=!1){let{activeElement:n}=rN(e);if(!n?.nodeName)return null;if(aN(n)&&n.contentDocument)return iN(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=rN(n).getElementById(e);if(t)return t}}return n}$M(iN,`getActiveElement`);function aN(e){return e.tagName===`IFRAME`}$M(aN,`isFrame`);var oN=Object.defineProperty,sN=(e,t)=>oN(e,`name`,{value:t,configurable:!0});function cN(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}sN(cN,`setRef`);function lN(...e){return t=>{let n=!1,r=e.map(e=>{let r=cN(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():cN(e[t],null)}}}}sN(lN,`composeRefs`);function uN(...e){return b.useCallback(lN(...e),e)}sN(uN,`useComposedRefs`);var dN=Object.defineProperty,fN=(e,t)=>dN(e,`name`,{value:t,configurable:!0});function pN(e,t){let n=b.createContext(t);n.displayName=e+`Context`;let r=fN(e=>{let{children:t,...r}=e,i=b.useMemo(()=>r,Object.values(r));return(0,B.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 fN(i,`useContext`),[r,i]}fN(pN,`createContext`);function mN(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=fN(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=b.useMemo(()=>o,Object.values(o));return(0,B.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 fN(s,`useContext`),[o,s]}fN(r,`createContext`);let i=fN(()=>{let t=n.map(e=>b.createContext(e));return fN(function(n){let r=n?.[e]||t;return b.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,hN(i,...t)]}fN(mN,`createContextScope`);function hN(...e){let t=e[0];if(e.length===1)return t;let n=fN(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return fN(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}fN(hN,`composeContextScopes`);var gN=Object.defineProperty,_N=(e,t)=>gN(e,`name`,{value:t,configurable:!0}),vN=_N(((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]=yN(a,i))}return{...e,...n}}),`mergeProps`);function yN(...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}_N(yN,`concatAriaDescribedby`);var bN=b.createContext(vN);bN.displayName=`SlotContext`;function xN(e){let t=b.forwardRef((t,n)=>{let r=b.useContext(bN),{children:i,mergeProps:a=r,...o}=t,s=null,c=!1,l=[];ON(i)&&typeof MN==`function`&&(i=MN(i._payload)),b.Children.forEach(i,e=>{if(EN(e)){c=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;ON(n)&&typeof MN==`function`&&(n=MN(n._payload)),s=wN(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?TN(s):void 0,d=uN(n,u);if(!s){if(i||i===0)throw Error(c?jN(e):AN(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}_N(xN,`createSlot`);var SN=Symbol.for(`radix.slottable`);function CN(e){let t=_N(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=SN,t}_N(CN,`createSlottable`);var wN=_N((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 TN(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)}_N(TN,`getElementRef`);function EN(e){return b.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===SN}_N(EN,`isSlottable`);var DN=Symbol.for(`react.lazy`);function ON(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===DN&&`_payload`in e&&kN(e._payload)}_N(ON,`isLazyComponent`);function kN(e){return typeof e==`object`&&!!e&&`then`in e}_N(kN,`isPromiseLike`);var AN=_N(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),jN=_N(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),MN=b.use,NN=Object.defineProperty,PN=(e,t)=>NN(e,`name`,{value:t,configurable:!0}),FN=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=xN(`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,B.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function IN(e,t){e&&W_.flushSync(()=>e.dispatchEvent(t))}PN(IN,`dispatchDiscreteCustomEvent`);var LN=Object.defineProperty,RN=(e,t)=>LN(e,`name`,{value:t,configurable:!0});function zN(e){let t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>((...e)=>t.current?.(...e)),[])}RN(zN,`useCallbackRef`);var BN=Object.defineProperty,VN=(e,t)=>BN(e,`name`,{value:t,configurable:!0}),HN=`dismissableLayer.update`,UN=`dismissableLayer.pointerDownOutside`,WN=`dismissableLayer.focusOutside`,GN,KN=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),qN=b.forwardRef(VN(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(KN),[d,f]=b.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=b.useState({}),h=uN(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=XN(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=ZN(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=zN(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&&(GN=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),QN(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=GN))}},[d,p,n,u]),b.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),QN())},[d,u]),b.useEffect(()=>{let e=VN(()=>m({}),`handleUpdate`);return document.addEventListener(HN,e),()=>document.removeEventListener(HN,e)},[]),(0,B.jsx)(FN.div,{...l,ref:h,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:tN(e.onFocusCapture,T.onFocusCapture),onBlurCapture:tN(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:tN(e.onPointerDownCapture,w.onPointerDownCapture)})},`DismissableLayer`));function JN(){let e=b.useContext(KN),[t,n]=b.useState(null);return b.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}VN(JN,`useDismissableLayerSurface`);var YN=VN(()=>!0,`IS_TRUE`);function XN(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=YN}=t,s=zN(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()}VN(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}VN(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)}VN(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}VN(p,`handleInteractionBubble`);let m=VN(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||$N(UN,s,p,{discrete:!0})};if(VN(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:VN(()=>c.current=!0,`onPointerDownCapture`)}}VN(XN,`usePointerDownOutside`);function ZN(e,t=globalThis?.document){let n=zN(e),r=b.useRef(!1);return b.useEffect(()=>{let e=VN(e=>{e.target&&!r.current&&$N(WN,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:VN(()=>r.current=!0,`onFocusCapture`),onBlurCapture:VN(()=>r.current=!1,`onBlurCapture`)}}VN(ZN,`useFocusOutside`);function QN(){let e=new CustomEvent(HN);document.dispatchEvent(e)}VN(QN,`dispatchUpdate`);function $N(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?IN(i,a):i.dispatchEvent(a)}VN($N,`handleAndDispatchCustomEvent`);var eP=globalThis?.document?b.useLayoutEffect:()=>{},tP=Object.defineProperty,nP=(e,t)=>tP(e,`name`,{value:t,configurable:!0}),rP=b.useId||(()=>void 0),iP=0;function aP(e){let[t,n]=b.useState(rP());return eP(()=>{e||n(e=>e??String(iP++))},[e]),e||(t?`radix-${t}`:``)}nP(aP,`useId`);var oP=Object.defineProperty,sP=b.forwardRef(((e,t)=>oP(e,`name`,{value:t,configurable:!0}))(function(e,t){let{children:n,width:r=10,height:i=5,...a}=e;return(0,B.jsx)(FN.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,B.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})},`Arrow`)),cP=Object.defineProperty,lP=(e,t)=>cP(e,`name`,{value:t,configurable:!0});function uP(e){let[t,n]=b.useState(void 0);return eP(()=>{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}lP(uP,`useSize`);var dP=Object.defineProperty,fP=(e,t)=>dP(e,`name`,{value:t,configurable:!0}),pP=`Popper`,[mP,hP]=mN(pP),[gP,_P]=mP(pP),vP=fP(e=>{let{__scopePopper:t,children:n}=e,[r,i]=b.useState(null),[a,o]=b.useState(void 0);return(0,B.jsx)(gP,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),yP=`PopperAnchor`,bP=b.forwardRef(fP(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=_P(yP,n),o=b.useRef(null),s=a.onAnchorChange,c=uN(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&&EP(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,B.jsx)(FN.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),xP=`PopperContent`,[SP,CP]=mP(xP),wP=b.forwardRef(fP(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=_P(xP,n),[_,v]=b.useState(null),y=uN(t,v),[x,S]=b.useState(null),C=uP(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(TP),altBoundary:k},{refs:j,floatingStyles:M,placement:N,isPositioned:P,middlewareData:F}=ZO({strategy:`fixed`,placement:E,whileElementsMounted:fP((...e)=>LO(...e,{animationFrame:p===`always`}),`whileElementsMounted`),elements:{reference:g.anchor},middleware:[$O({mainAxis:i+T,alignmentAxis:o}),c&&ek({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?tk():void 0,...A}),c&&nk({...A}),rk({...A,apply:fP(({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&&ak({element:x,padding:s}),uie({arrowWidth:w,arrowHeight:T}),f&&ik({strategy:`referenceHidden`,...A,boundary:k?A.boundary:void 0})]}),I=g.setPlacementState;eP(()=>(I(N),()=>{I(void 0)}),[N,I]);let[L,ee]=EP(N),te=zN(m);eP(()=>{P&&te?.()},[P,te]);let ne=F.arrow?.x,re=F.arrow?.y,R=F.arrow?.centerOffset!==0,[z,ie]=b.useState();return eP(()=>{_&&ie(window.getComputedStyle(_).zIndex)},[_]),(0,B.jsx)(`div`,{ref:j.setFloating,"data-radix-popper-content-wrapper":``,style:{...M,transform:P?M.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:z,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(` `),...F.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,B.jsx)(SP,{scope:n,placedSide:L,placedAlign:ee,onArrowChange:S,arrowX:ne,arrowY:re,shouldHideArrow:R,children:(0,B.jsx)(FN.div,{"data-side":L,"data-align":ee,...h,ref:y,style:{...h.style,animation:P?h.style?.animation:`none`}})})})},`PopperContent`)),sie=`PopperArrow`,cie={top:`bottom`,right:`left`,bottom:`top`,left:`right`},lie=b.forwardRef(fP(function(e,t){let{__scopePopper:n,...r}=e,i=CP(sie,n),a=cie[i.placedSide];return(0,B.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,B.jsx)(sP,{...r,ref:t,style:{...r.style,display:`block`}})})},`PopperArrow`));function TP(e){return e!==null}fP(TP,`isNotNull`);var uie=fP(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]=EP(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 EP(e){let[t,n=`center`]=e.split(`-`);return[t,n]}fP(EP,`getSideAndAlignFromPlacement`);var die=Object.defineProperty,fie=b.forwardRef(((e,t)=>die(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=b.useState(!1);eP(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?W_.createPortal((0,B.jsx)(FN.div,{...r,ref:t}),o):null},`Portal`)),pie=Object.defineProperty,DP=(e,t)=>pie(e,`name`,{value:t,configurable:!0});function OP(e,t){return b.useReducer((e,n)=>t[e][n]??e,e)}DP(OP,`useStateMachine`);var kP=DP(e=>{let{present:t,children:n}=e,r=AP(t),i=typeof n==`function`?n({present:r.isPresent}):b.Children.only(n),a=MP(r.ref,PP(i));return typeof n==`function`||r.isPresent?b.cloneElement(i,{ref:a}):null},`Presence`);function AP(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]=OP(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??NP(r.current),o.current=void 0):a.current=`none`},[s]),eP(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=NP(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]),eP(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=DP(a=>{let o=NP(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=DP(e=>{e.target===t&&(a.current=NP(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=NP(t)}else r.current=null;n(e)},[])}}DP(AP,`usePresence`);function jP(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}DP(jP,`setRef`);function MP(...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=jP(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():jP(n[e],null)}}},[])}DP(MP,`useStableComposedRefs`);function NP(e){return e?.animationName||`none`}DP(NP,`getAnimationName`);function PP(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)}DP(PP,`getElementRef`);var mie=Object.defineProperty,hie=(e,t)=>mie(e,`name`,{value:t,configurable:!0}),FP=b.useEffectEvent,IP=b.useInsertionEffect;function LP(e){if(typeof FP==`function`)return FP(e);let t=b.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof IP==`function`?IP(()=>{t.current=e}):eP(()=>{t.current=e}),b.useMemo(()=>((...e)=>t.current?.(...e)),[])}hie(LP,`useEffectEvent`);var gie=Object.defineProperty,RP=(e,t)=>gie(e,`name`,{value:t,configurable:!0}),_ie=b.useInsertionEffect||eP;function zP({prop:e,defaultProp:t,onChange:n=RP(()=>{},`onChange`),caller:r}){let[i,a,o]=BP({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,b.useCallback(t=>{if(s){let n=VP(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}RP(zP,`useControllableState`);function BP({defaultProp:e,onChange:t}){let[n,r]=b.useState(e),i=b.useRef(n),a=b.useRef(t);return _ie(()=>{a.current=t},[t]),b.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}RP(BP,`useUncontrolledState`);function VP(e){return typeof e==`function`}RP(VP,`isFunction`);var HP=Symbol(`RADIX:SYNC_STATE`);function vie(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=LP(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=b.useReducer((t,n)=>{if(n.type===HP)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:HP,state:i})},[i,d.state,c]),[h,f]}RP(vie,`useControllableStateReducer`);var yie=Object.defineProperty,bie=(e,t)=>yie(e,`name`,{value:t,configurable:!0}),xie=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`}),Sie=b.forwardRef(bie(function(e,t){return(0,B.jsx)(FN.span,{...e,ref:t,style:{...xie,...e.style}})},`VisuallyHidden`)),Cie=Object.defineProperty,UP=(e,t)=>Cie(e,`name`,{value:t,configurable:!0}),[WP,wie]=mN(`Tooltip`,[hP]),GP=hP(),Tie=`TooltipProvider`,Eie=700,KP=`tooltip.open`,[Die,qP]=WP(Tie),Oie=UP(e=>{let{__scopeTooltip:t,delayDuration:n=Eie,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,B.jsx)(Die,{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`),JP=`Tooltip`,[kie,YP]=WP(JP),Aie=UP(e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=qP(JP,e.__scopeTooltip),l=GP(t),[u,d]=b.useState(null),[f,p]=b.useState(void 0),m=aP(),h=b.useRef(0),g=o??c.disableHoverableContent,_=s??c.delayDuration,v=b.useRef(!1),[y,x]=zP({prop:r,defaultProp:i??!1,onChange:UP(e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(KP))):c.onClose(),a?.(e)},`onChange`),caller:JP}),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,B.jsx)(vP,{...l,children:(0,B.jsx)(kie,{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`),XP=`TooltipTrigger`,jie=b.forwardRef(UP(function(e,t){let{__scopeTooltip:n,"aria-describedby":r,...i}=e,a=YP(XP,n),o=qP(XP,n),s=GP(n),c=uN(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,B.jsx)(bP,{asChild:!0,...s,children:(0,B.jsx)(FN.button,{"aria-describedby":a.open?lF(r,a.contentId):r,"data-state":a.stateAttribute,...i,ref:c,onPointerMove:tN(e.onPointerMove,e=>{e.pointerType!==`touch`&&!u.current&&!o.isPointerInTransitRef.current&&(a.onTriggerEnter(),u.current=!0)}),onPointerLeave:tN(e.onPointerLeave,()=>{a.onTriggerLeave(),u.current=!1}),onPointerDown:tN(e.onPointerDown,()=>{a.open&&a.onClose(),l.current=!0,document.addEventListener(`pointerup`,d,{once:!0})}),onFocus:tN(e.onFocus,()=>{l.current||a.onOpen()}),onBlur:tN(e.onBlur,a.onClose),onClick:tN(e.onClick,a.onClose)})})},`TooltipTrigger`)),ZP=`TooltipPortal`,[Mie,Nie]=WP(ZP,{forceMount:void 0}),QP=UP(e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=YP(ZP,t);return(0,B.jsx)(Mie,{scope:t,forceMount:n,children:(0,B.jsx)(kP,{present:n||a.open,children:(0,B.jsx)(fie,{asChild:!0,container:i,children:r})})})},`TooltipPortal`),$P=`TooltipContent`,eF=b.forwardRef(UP(function(e,t){let n=Nie($P,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=YP($P,e.__scopeTooltip);return(0,B.jsx)(kP,{present:r||o.open,children:o.disableHoverableContent?(0,B.jsx)(tF,{side:i,...a,ref:t}):(0,B.jsx)(Pie,{side:i,...a,ref:t})})},`TooltipContent`)),Pie=b.forwardRef(UP(function(e,t){let n=YP($P,e.__scopeTooltip),r=qP($P,e.__scopeTooltip),i=b.useRef(null),a=uN(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=iF(r,rF(r,n.getBoundingClientRect())),a=aF(t.getBoundingClientRect()),o=sF([...i,...a]);s(o),d(!0)},[d]);return b.useEffect(()=>()=>f(),[f]),b.useEffect(()=>{if(c&&u){let e=UP(e=>p(e,u),`handleTriggerLeave`),t=UP(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=UP(e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!oF(n,o);r?f():i&&(f(),l())},`handleTrackPointerGrace`);return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,B.jsx)(tF,{...e,ref:a})},`TooltipContentHoverable`)),Fie=CN(`TooltipContent`),tF=b.forwardRef(UP(function(e,t){let{__scopeTooltip:n,children:r,"aria-label":i,id:a,onEscapeKeyDown:o,onPointerDownOutside:s,...c}=e,l=YP($P,n),u=GP(n),{onClose:d}=l;b.useEffect(()=>(document.addEventListener(KP,d),()=>document.removeEventListener(KP,d)),[d]),b.useEffect(()=>{if(l.trigger){let e=UP(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 eP(()=>(f(a),()=>{f(void 0)}),[a,f]),(0,B.jsx)(qN,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:(0,B.jsxs)(wP,{"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,B.jsx)(Fie,{children:r}),i?(0,B.jsx)(Sie,{id:l.contentId,role:`tooltip`,children:i}):null]})})},`TooltipContentImpl`)),nF=b.forwardRef(UP(function(e,t){let{__scopeTooltip:n,...r}=e,i=GP(n);return(0,B.jsx)(lie,{...i,...r,ref:t})},`TooltipArrow`));function rF(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`)}}UP(rF,`getExitSideFromRect`);function iF(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}UP(iF,`getPaddedExitPoints`);function aF(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}]}UP(aF,`getPointsFromRect`);function oF(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}UP(oF,`isPointInPolygon`);function sF(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)),cF(t)}UP(sF,`getHull`);function cF(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)}UP(cF,`getHullPresorted`);function lF(...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}UP(lF,`concatAriaDescribedby`);function Iie({delayDuration:e=0,...t}){return(0,B.jsx)(Oie,{"data-slot":`tooltip-provider`,delayDuration:e,...t})}function uF({...e}){return(0,B.jsx)(Iie,{children:(0,B.jsx)(Aie,{"data-slot":`tooltip`,...e})})}function dF({...e}){return(0,B.jsx)(jie,{"data-slot":`tooltip-trigger`,...e})}function fF({className:e,sideOffset:t=6,children:n,...r}){return(0,B.jsx)(QP,{children:(0,B.jsxs)(eF,{"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,B.jsx)(nF,{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 Lie=`Label`,pF=b.forwardRef((e,t)=>(0,B.jsx)(IT.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));pF.displayName=Lie;var mF=pF;function hF({className:e,...t}){return(0,B.jsx)(mF,{"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 Rie({fieldId:e,label:t,required:n,hint:r,error:i,tooltip:a,children:o}){return(0,B.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[t&&(0,B.jsxs)(`div`,{className:`flex items-center gap-0.5`,children:[(0,B.jsx)(hF,{htmlFor:e,className:`type-text-sm font-medium text-muted-foreground`,children:t}),n&&(0,B.jsx)(`span`,{"aria-hidden":!0,className:`type-text-sm font-medium text-required`,children:`*`}),a&&(0,B.jsxs)(uF,{children:[(0,B.jsx)(dF,{asChild:!0,children:(0,B.jsx)(ii,{className:`size-4 text-muted-foreground`})}),(0,B.jsx)(fF,{children:a})]})]}),o,(r||i)&&(0,B.jsx)(`p`,{id:e?`${e}-description`:void 0,className:Mr(`type-text-sm`,i?`text-destructive`:`text-subtle-foreground`),children:i??r})]})}var zie={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 gF({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=zie[l],h=(0,B.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,B.jsx)(Rie,{fieldId:f,label:n,required:r,hint:i,error:a,tooltip:o,children:p?(0,B.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,B.jsx)(`span`,{className:Mr(`flex items-center text-subtle-foreground [&_svg]:shrink-0`,m.leadingIcon),children:c}),s&&(0,B.jsx)(`span`,{className:Mr(`flex items-center text-subtle-foreground whitespace-nowrap border-r border-border self-stretch`,m.leadingText),children:s}),(0,B.jsx)(`div`,{className:Mr(`flex flex-1 items-center min-w-0`,m.inner),children:h})]}):h})}var _F=Mi([`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 vF(e,[t,n]){return Math.min(n,Math.max(t,e))}function yF(e){let t=e+`CollectionProvider`,[n,r]=oE(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,B.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=Ii(s),l=b.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=Fi(t,a(s,n).collectionRef);return(0,B.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=Ii(u),p=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=b.useRef(null),s=Fi(t,o),c=a(u,n);return b.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,B.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 Bie=b.createContext(void 0);function bF(e){let t=b.useContext(Bie);return e||t||`ltr`}function xF(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 Vie=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`}),Hie=Object.defineProperty,SF=(e,t)=>Hie(e,`name`,{value:t,configurable:!0}),Uie=[` `,`Enter`,`ArrowUp`,`ArrowDown`],Wie=[` `,`Enter`],CF=`Select`,[wF,TF,Gie]=yF(CF),[EF,Kie]=oE(CF,[Gie,dk]),DF=dk(),[qie,OF]=EF(CF),[Jie,Yie]=EF(CF);function kF(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=DF(t),[_,v]=b.useState(null),[y,x]=b.useState(null),[S,C]=b.useState(!1),w=bF(l),[T,E]=Uk({prop:r,defaultProp:i??!1,onChange:a,caller:CF}),[D,O]=Uk({prop:o,defaultProp:s,onChange:c,caller:CF}),k=b.useRef(null),A=b.useRef(D);b.useEffect(()=>{let e=m?_?.ownerDocument.getElementById(m):_?.form;if(e instanceof HTMLFormElement){let t=SF(()=>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=qE(),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,B.jsx)(Ck,{...g,children:(0,B.jsx)(qie,{scope:t,...ee,children:(0,B.jsx)(wF.Provider,{scope:t,children:(0,B.jsx)(Jie,{scope:t,onNativeOptionAdd:I,onNativeOptionRemove:L,children:zF(h)?h(ee):n})})})})}SF(kF,`SelectProvider`);var Xie=SF(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,B.jsx)(kF,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,B.jsxs)(B.Fragment,{children:[n,e?(0,B.jsx)(xae,{__scopeSelect:t}):null]})})},`Select`),Zie=`SelectTrigger`,Qie=b.forwardRef(SF(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=DF(n),o=OF(Zie,n),s=o.disabled||r,c=Fi(t,o.onTriggerChange),l=TF(n),u=b.useRef(`touch`),[d,f,p]=VF(e=>{let t=l().filter(e=>!e.disabled),n=HF(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=SF(e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},`handleOpen`);return(0,B.jsx)(wk,{asChild:!0,...a,children:(0,B.jsx)(IT.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":BF(o.value)?``:void 0,...i,ref:c,onClick:tE(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:tE(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:tE(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&Uie.includes(e.key)&&(m(),e.preventDefault())})})})},`SelectTrigger`)),$ie=`SelectValue`,eae=b.forwardRef(SF(function(e,t){let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=OF($ie,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=Fi(t,c.onValueNodeChange);WE(()=>{l(u)},[l,u]);let f=BF(c.value);return(0,B.jsx)(IT.span,{...s,asChild:!f&&s.asChild,ref:d,style:{pointerEvents:`none`},children:(0,B.jsx)(b.Fragment,{children:f?o:a},f?`placeholder`:`value`)})},`SelectValue`)),tae=b.forwardRef(SF(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return(0,B.jsx)(IT.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[nae,rae]=EF(`SelectPortal`,{forceMount:void 0}),iae=SF(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,B.jsx)(nae,{scope:e.__scopeSelect,forceMount:n,children:(0,B.jsx)(Dk,{asChild:!0,...r})})},`SelectPortal`),AF=`SelectContent`,aae=b.forwardRef(SF(function(e,t){let n=rae(AF,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=OF(AF,e.__scopeSelect),[o,s]=b.useState();return WE(()=>{s(new DocumentFragment)},[]),(0,B.jsx)(jk,{present:r||a.open,children:({present:e})=>e?(0,B.jsx)(cae,{...i,ref:t}):(0,B.jsx)(oae,{...i,fragment:o})})},`SelectContent`)),oae=b.forwardRef(SF(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?W_.createPortal((0,B.jsx)(MF,{scope:n,children:(0,B.jsx)(wF.Slot,{scope:n,children:(0,B.jsx)(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),jF=10,[MF,NF]=EF(AF),sae=Ii(`SelectContent.RemoveScroll`),cae=b.forwardRef(SF(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=OF(AF,n),[y,x]=b.useState(null),[S,C]=b.useState(null),w=Fi(t,x),[T,E]=b.useState(null),[D,O]=b.useState(null),k=TF(n),[A,j]=b.useState(!1),M=b.useRef(!1);b.useEffect(()=>{if(y)return nA(y)},[y]),TE();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=SF(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=SF(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=SF(()=>F(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[F]);let[L,ee]=VF(e=>{let t=k().filter(e=>!e.disabled),n=HF(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]),re=b.useCallback((e,t,n)=>{let r=!M.current&&!n;(v.value!==void 0&&v.value===t||r)&&O(e)},[v.value]),R=r===`popper`?PF:lae,z=R===PF?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,B.jsx)(MF,{scope:n,content:y,viewport:S,onViewportChange:C,itemRefCallback:te,selectedItem:T,onItemLeave:ne,itemTextRefCallback:re,focusSelectedItem:P,selectedItemText:D,position:r,isPositioned:A,searchRef:L,children:(0,B.jsx)(pj,{as:sae,allowPinchZoom:!0,children:(0,B.jsx)(ME,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:tE(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,B.jsx)(gE,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,B.jsx)(R,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...z,onPlaced:()=>j(!0),ref:w,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:tE(_.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`)),lae=b.forwardRef(SF(function(e,t){let{__scopeSelect:n,onPlaced:r,...i}=e,a=OF(AF,n),o=NF(AF,n),[s,c]=b.useState(null),[l,u]=b.useState(null),d=Fi(t,u),f=TF(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-jF,d=vF(a,[jF,Math.max(jF,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-jF,d=vF(a,[jF,Math.max(jF,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-jF*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-jF,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=`${jF}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]);WE(()=>y(),[y]);let[x,S]=b.useState();return WE(()=>{l&&S(window.getComputedStyle(l).zIndex)},[l]),(0,B.jsx)(uae,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:b.useCallback(e=>{e&&m.current===!0&&(y(),v?.(),m.current=!1)},[y,v]),children:(0,B.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:x},children:(0,B.jsx)(IT.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})},`SelectItemAlignedPosition`)),PF=b.forwardRef(SF(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=jF,...a}=e,o=DF(n);return(0,B.jsx)(Tk,{...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`)),[uae,dae]=EF(AF,{}),FF=`SelectViewport`,fae=b.forwardRef(SF(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=NF(FF,n),o=dae(FF,n),s=Fi(t,a.onViewportChange),c=b.useRef(0);return(0,B.jsxs)(B.Fragment,{children:[(0,B.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,B.jsx)(wF.Slot,{scope:n,children:(0,B.jsx)(IT.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:tE(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-jF*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`)),[pae,mae]=EF(`SelectGroup`),IF=`SelectItem`,[hae,LF]=EF(IF),gae=b.forwardRef(SF(function(e,t){let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=OF(IF,n),c=NF(IF,n),l=s.value===r,[u,d]=b.useState(a??``),[f,p]=b.useState(!1),m=Fi(t,cE(e=>c.itemRefCallback?.(e,r,i))),h=qE(),g=b.useRef(`touch`),_=SF(()=>{i||(s.onValueChange(r),s.onOpenChange(!1))},`handleSelect`);return(0,B.jsx)(hae,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:b.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,B.jsx)(wF.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,B.jsx)(IT.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:tE(o.onFocus,()=>p(!0)),onBlur:tE(o.onBlur,()=>p(!1)),onClick:tE(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:tE(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:tE(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:tE(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:tE(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:tE(o.onKeyDown,e=>{i||e.target!==e.currentTarget||c.searchRef?.current!==``&&e.key===` `||(Wie.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),RF=`SelectItemText`,_ae=b.forwardRef(SF(function(e,t){let{__scopeSelect:n,className:r,style:i,...a}=e,o=OF(RF,n),s=NF(RF,n),c=LF(RF,n),l=Yie(RF,n),[u,d]=b.useState(null),f=cE(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=Fi(t,d,c.onItemTextChange,f),m=u?.textContent,h=b.useMemo(()=>(0,B.jsx)(`option`,{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:_}=l;return WE(()=>(g(h),()=>_(h)),[g,_,h]),(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(IT.span,{id:c.textId,...a,ref:p}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!BF(o.value)?W_.createPortal(a.children,o.valueNode):null]})},`SelectItemText`)),vae=`SelectItemIndicator`,yae=b.forwardRef(SF(function(e,t){let{__scopeSelect:n,...r}=e;return LF(vae,n).isSelected?(0,B.jsx)(IT.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),bae=`SelectBubbleInput`,xae=b.forwardRef(SF(function({__scopeSelect:e,...t},n){let r=OF(bae,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=Fi(n,p),h=i??``,g=xF(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,B.jsxs)(IT.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>a(e.target.value),...t,style:{...Vie,...t.style},ref:m,defaultValue:h,children:[BF(i)&&!_?(0,B.jsx)(`option`,{value:``}):null,Array.from(d)]},f)},`SelectBubbleInput`));function zF(e){return typeof e==`function`}SF(zF,`isFunction`);function BF(e){return e===``||e===void 0}SF(BF,`shouldShowPlaceholder`);function VF(e){let t=cE(e),n=b.useRef(``),r=b.useRef(0),i=b.useCallback(e=>{let i=n.current+e;t(i),SF((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]}SF(VF,`useTypeaheadSearch`);function HF(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=UF(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}SF(HF,`findNextItem`);function UF(e,t){return e.map((n,r)=>e[(t+r)%e.length])}SF(UF,`wrapArray`);function WF({...e}){return(0,B.jsx)(Xie,{"data-slot":`select`,...e})}function GF({...e}){return(0,B.jsx)(eae,{"data-slot":`select-value`,...e})}function KF({className:e,size:t=`md`,children:n,...r}){return(0,B.jsxs)(Qie,{"data-slot":`select-trigger`,className:Mr(_F({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,B.jsx)(tae,{asChild:!0,children:(0,B.jsx)(Kr,{className:`size-5 shrink-0 text-muted-foreground`})})]})}function qF({className:e,children:t,position:n=`popper`,...r}){return(0,B.jsx)(iae,{children:(0,B.jsx)(aae,{"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,B.jsx)(fae,{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 JF({className:e,children:t,...n}){return(0,B.jsxs)(gae,{"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,B.jsx)(`span`,{className:`absolute right-2 flex size-4 items-center justify-center`,children:(0,B.jsx)(yae,{children:(0,B.jsx)(Gr,{className:`size-4 text-primary`})})}),(0,B.jsx)(_ae,{children:t})]})}function Sae({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,B.jsx)(HM,{open:e,onOpenChange:t,children:(0,B.jsxs)(KM,{children:[(0,B.jsxs)(qM,{children:[(0,B.jsx)(XM,{children:`Deploy to Alpic`}),(0,B.jsx)(ZM,{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,B.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,B.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,B.jsx)(hF,{htmlFor:s,children:`Project name`}),(0,B.jsx)(gF,{id:s,value:c,onChange:e=>l(e.target.value),placeholder:`my-mcp-app`,autoFocus:!0}),r.length>1?(0,B.jsxs)(`div`,{className:`flex items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,B.jsx)(`span`,{children:`Team:`}),(0,B.jsxs)(WF,{value:u,onValueChange:d,children:[(0,B.jsx)(KF,{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,B.jsx)(GF,{})}),(0,B.jsx)(qF,{align:`start`,className:`min-w-48`,children:r.map(e=>(0,B.jsx)(JF,{value:e.id,className:`cursor-pointer text-xs`,children:e.name},e.id))})]})]}):(0,B.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Team: `,(0,B.jsx)(`span`,{className:`font-medium`,children:_?.name})]}),f&&(0,B.jsx)(`p`,{className:`text-destructive text-xs`,children:f})]}),(0,B.jsxs)(YM,{children:[(0,B.jsx)(Qi,{type:`button`,variant:`secondary`,onClick:()=>t(!1),children:`Cancel`}),(0,B.jsx)(Qi,{type:`submit`,variant:`primary`,disabled:!g||m,children:m?`Creating…`:`Create & deploy`})]})]})]})})}var Cae={idle:{variant:`muted`,pulse:!1},starting:{variant:`warning`,pulse:!0},connected:{variant:`success`,pulse:!1},error:{variant:`destructive`,pulse:!1}},wae=120,YF=`max-w-[200px]`;function Tae(){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),wae)},[])}}function XF({trigger:e,className:t,children:n}){let{open:r,setOpen:i,onEnter:a,onLeave:o}=Tae(),s=(0,b.useId)();return(0,B.jsxs)(Hj,{open:r,onOpenChange:i,children:[(0,B.jsx)(Wj,{asChild:!0,children:(0,b.cloneElement)(e,{onMouseEnter:a,onMouseLeave:o,"data-popover-anchor":s})}),(0,B.jsx)(Gj,{align:`end`,sideOffset:0,className:Y(`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 ZF({label:e,icon:t,buildUrl:n,description:r}){let i=pM(e=>e.state),a=pM(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,B.jsx)(XF,{className:`w-72`,trigger:(0,B.jsx)(Qi,{variant:`secondary`,"aria-disabled":d,className:Y(d&&`opacity-50 cursor-not-allowed`),icon:u?(0,B.jsx)(qj,{size:`sm`,className:`text-current`}):t,onClick:d?void 0:l,children:e}),children:c?(0,B.jsx)(`p`,{className:Y(`text-sm text-muted-foreground text-center mx-auto`,YF),children:r}):(0,B.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 Eae(){return(0,B.jsx)(ZF,{label:`Playground`,icon:(0,B.jsx)(fi,{className:`size-3.5`}),buildUrl:e=>`${e}/try`,description:`Chat with your MCP server with a real LLM and share it`})}function Dae(){return(0,B.jsx)(ZF,{label:`Audit`,icon:(0,B.jsx)(Qr,{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 Oae=`https://app.alpic.ai`;function kae(){let e=lM(e=>e.status.state===`ready`&&e.status.mcpServerUrl?e.status.mcpServerUrl:e.progress.status===`deployed`?e.progress.mcpServerUrl:null),{copied:t,copy:n}=tM();if(!e)return null;let r=e.replace(/^https?:\/\//,``);return(0,B.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,B.jsx)(ri,{className:`size-3.5 text-quaternary-foreground`,"aria-hidden":!0}),(0,B.jsx)(`span`,{className:`max-w-48 truncate font-mono text-xs`,children:r}),(0,B.jsx)(`span`,{className:`text-quaternary-foreground`,children:t?(0,B.jsx)(Gr,{className:`size-3.5`}):(0,B.jsx)(ei,{className:`size-3.5`})})]})}function Aae(){let{status:e,progress:t,redeploy:n,createAndDeploy:r,signIn:i}=lM(),a=jT(),[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,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(XF,{className:`w-72`,trigger:(0,B.jsx)(Qi,{variant:`cta`,className:Y(`h-8 px-2 gap-1`,m&&`opacity-50 cursor-not-allowed`),"aria-disabled":m,icon:c?(0,B.jsx)(qj,{size:`sm`,className:`text-current`}):(0,B.jsx)(Yj,{className:`size-2`,...Nae(e,t),"aria-hidden":!0}),onClick:m?void 0:_,children:`Deploy`}),children:(0,B.jsx)(jae,{status:e,progress:t,signingIn:c,actionError:u,onRedeploy:g,onSignIn:h})}),e.state===`needsProject`&&(0,B.jsx)(Sae,{open:o,onOpenChange:s,defaultName:a?.name??`my-mcp-app`,teams:e.teams,defaultTeamId:e.defaultTeamId,staleConfig:e.staleConfig,onCreate:r})]})}function jae({status:e,progress:t,signingIn:n,actionError:r,onRedeploy:i,onSignIn:a}){if(t.status===`deploying`)return(0,B.jsx)(QF,{startedAt:t.startedAt,deploymentPageUrl:t.deploymentPageUrl});let o=e.state===`ready`&&!!e.lastDeployGit;if(t.status===`deployed`&&!o)return(0,B.jsxs)(`div`,{className:`space-y-3`,children:[(0,B.jsx)(`p`,{className:`text-sm font-medium`,children:`Deployed`}),(0,B.jsx)($F,{url:t.mcpServerUrl}),t.deploymentPageUrl&&(0,B.jsx)(eI,{href:t.deploymentPageUrl})]});if(t.status===`failed`&&!o)return(0,B.jsxs)(`div`,{className:`space-y-2`,children:[(0,B.jsx)(`p`,{className:`text-sm font-medium text-destructive`,children:`Deployment failed`}),(0,B.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:t.message}),t.deploymentPageUrl&&(0,B.jsx)(tI,{href:t.deploymentPageUrl,label:`Go to logs`})]});switch(e.state){case`loading`:return(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Checking Alpic…`});case`signedOut`:return(0,B.jsxs)(`div`,{className:`space-y-2`,children:[(0,B.jsx)(`p`,{className:`text-sm font-medium`,children:`Sign in to Alpic to deploy`}),(0,B.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Connect your Alpic account to deploy this server.`}),(0,B.jsx)(Qi,{variant:`primary`,className:`h-7 w-full`,disabled:n,onClick:a,children:n?`Signing in…`:`Sign in to Alpic`}),r&&(0,B.jsx)(`p`,{className:`text-xs text-destructive`,children:r})]});case`noTeam`:return(0,B.jsxs)(`div`,{className:`space-y-2`,children:[(0,B.jsx)(`p`,{className:`text-sm font-medium`,children:`No team yet`}),(0,B.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Create a team on Alpic before deploying.`}),(0,B.jsx)(tI,{href:Oae,label:`Open Alpic`})]});case`needsProject`:return(0,B.jsx)(`p`,{className:`text-sm`,children:`Click to deploy to Alpic`});case`ready`:return e.lastDeployStatus===`ongoing`?(0,B.jsx)(QF,{startedAt:e.lastDeployStartedAt??null,deploymentPageUrl:e.deploymentPageUrl??null}):(0,B.jsxs)(`div`,{className:`space-y-2`,children:[!e.lastDeployGit&&(0,B.jsx)(`p`,{className:`text-sm`,children:`Click to deploy to Alpic`}),e.mcpServerUrl&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`p`,{className:`text-xs font-medium text-muted-foreground`,children:`Last Deployment:`}),(0,B.jsx)($F,{url:e.mcpServerUrl})]}),e.deploymentPageUrl&&(0,B.jsx)(eI,{href:e.deploymentPageUrl}),e.lastDeployGit&&(0,B.jsx)(ZT,{className:`px-3 py-2`,title:`Last deployed from Git`,description:(0,B.jsxs)(`div`,{className:`space-y-2`,children:[(0,B.jsx)(Pae,{git:e.lastDeployGit}),(0,B.jsx)(Qi,{variant:`primary`,className:`h-7 w-full`,onClick:i,children:`Deploy anyway`})]})}),r&&(0,B.jsx)(`p`,{className:`text-xs text-destructive`,children:r})]});case`error`:return(0,B.jsx)(`p`,{className:`text-xs text-destructive`,children:e.message})}}function Mae(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 QF({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,B.jsxs)(`div`,{className:`space-y-2`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,B.jsx)(qj,{size:`sm`,className:`shrink-0 text-current`}),(0,B.jsx)(`p`,{className:`text-sm`,children:`Deploying…`}),e!=null&&(0,B.jsx)(`span`,{className:`ml-auto font-mono text-xs text-muted-foreground`,children:Mae(n)})]}),t&&(0,B.jsx)(tI,{href:t,label:`Go to logs`})]})}function Nae(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 $F({url:e}){let{copied:t,copy:n}=tM();return(0,B.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,B.jsx)(`span`,{className:`flex-1 truncate font-mono text-xs`,children:e}),(0,B.jsx)(`span`,{className:`text-quaternary-foreground`,children:t?(0,B.jsx)(Gr,{className:`size-3.5`}):(0,B.jsx)(ei,{className:`size-3.5`})})]})}function eI({href:e}){return(0,B.jsx)(Qi,{asChild:!0,variant:`tertiary`,className:`w-full`,children:(0,B.jsxs)(`a`,{href:e,target:`_blank`,rel:`noreferrer noopener`,children:[(0,B.jsx)(ti,{className:`size-3.5`}),`Go to deployment page`]})})}function Pae({git:e}){return!e.ref&&!e.commitMessage&&!e.author?null:(0,B.jsxs)(`div`,{className:`space-y-0.5 text-xs`,children:[e.ref&&(0,B.jsxs)(`p`,{children:[`Branch `,(0,B.jsx)(`span`,{className:`font-mono`,children:e.ref}),e.author&&(0,B.jsxs)(B.Fragment,{children:[` · by `,e.author]})]}),e.commitMessage&&(0,B.jsxs)(`p`,{className:`truncate`,children:[`“`,e.commitMessage,`”`]})]})}function tI({href:e,label:t}){return(0,B.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,B.jsx)(ti,{className:`size-3.5`}),t]})}function Fae(){let{state:e,start:t,stop:n}=pM(),{copied:r,copy:i}=tM(),a=e.status===`connected`?`${e.url}/mcp`:null,o=a?()=>i(a):e.status===`starting`?n:t;return(0,B.jsxs)(XF,{className:Y(`w-60 text-center`,e.status===`starting`&&`animate-pulse w-60`),trigger:(0,B.jsxs)(Qi,{variant:`secondary`,onClick:o,children:[(0,B.jsx)(Yj,{className:`size-2`,...Cae[e.status],"aria-hidden":!0}),a?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`span`,{className:`mx-2 font-mono text-xs`,children:a.replace(/^https?:\/\//,``)}),r?(0,B.jsx)(Gr,{className:`size-3.5`}):(0,B.jsx)(ei,{className:`size-3.5`})]}):`Tunnel`]}),children:[e.status===`idle`&&(0,B.jsx)(Iae,{}),e.status===`error`&&(0,B.jsx)(Lae,{message:e.message,onRetry:t}),e.status===`starting`&&(0,B.jsx)(Rae,{message:e.message}),e.status===`connected`&&(0,B.jsx)(zae,{onStop:n})]})}function Iae(){return(0,B.jsx)(`div`,{className:`space-y-3`,children:(0,B.jsx)(`p`,{className:Y(`text-sm text-muted-foreground mx-auto`,YF),children:`Get a public URL that you can use in Claude or ChatGPT.`})})}function Lae({message:e,onRetry:t}){return(0,B.jsxs)(`div`,{className:`space-y-3 text-left`,children:[(0,B.jsx)(`p`,{className:`text-sm text-destructive`,children:e}),(0,B.jsx)(Qi,{variant:`primary`,className:`w-full`,onClick:t,children:`Retry`})]})}function Rae({message:e}){return(0,B.jsx)(`div`,{className:`space-y-3`,children:(0,B.jsxs)(`div`,{className:`flex items-center justify-center gap-2`,children:[(0,B.jsx)(Yj,{className:`size-2`,variant:`warning`,pulse:!0,"aria-hidden":!0}),(0,B.jsx)(`p`,{className:Y(`text-sm text-muted-foreground`,YF),children:e}),(0,B.jsx)(qj,{size:`sm`,className:`text-current`})]})})}function zae({onStop:e}){return(0,B.jsxs)(`div`,{className:`space-y-3 text-left`,children:[(0,B.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Click to copy the tunnel URL to use in Claude or ChatGPT`})}),(0,B.jsx)(WT,{}),(0,B.jsx)(Qi,{variant:`tertiary`,className:`w-full`,onClick:e,icon:(0,B.jsx)(Oi,{}),children:`Stop tunnel`})]})}var Bae=[{label:`discord`,href:`https://discord.gg/awV4gu74wK`},{label:`docs`,href:`https://docs.skybridge.tech/`},{label:`github`,href:`https://github.com/alpic-ai/skybridge`}];function Vae({children:e}){return(0,B.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 Hae(){let e=jT(),t=e?.name??`skybridge`,n=e?.version;return(0,B.jsxs)(Vae,{children:[(0,B.jsx)(`img`,{src:`/skybridge.svg`,alt:``,"aria-hidden":!0,className:`size-3.5`}),(0,B.jsx)(`span`,{children:t}),(0,B.jsx)(WT,{orientation:`vertical`,className:`h-4 self-center!`}),n&&(0,B.jsx)(`span`,{className:`font-mono text-xs text-quaternary-foreground`,children:n})]})}var Uae=()=>{let{status:e,requiresAuth:t,hasAuthRequiredTools:n,isSignedIn:r,error:i}=as();return(0,B.jsxs)(`header`,{className:`flex h-13 items-center justify-between gap-3 border-b border-border px-4`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,B.jsx)(Hae,{}),(0,B.jsx)(kae,{})]}),(0,B.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,B.jsx)(Fae,{}),(0,B.jsx)(Eae,{}),(0,B.jsx)(Dae,{}),(0,B.jsx)(Aae,{})]}),(0,B.jsxs)(`div`,{className:`flex items-center gap-3`,children:[i&&(0,B.jsx)(`span`,{className:`max-w-48 truncate text-xs text-destructive`,children:i}),t&&(0,B.jsx)(KT,{status:e}),t&&e===`authenticated`&&n&&!r&&(0,B.jsxs)(Qi,{variant:`tertiary`,onClick:()=>eie(),children:[(0,B.jsx)(ci,{className:`size-3.5`}),`Sign in`]}),t&&e===`authenticated`&&r&&(0,B.jsxs)(Qi,{variant:`tertiary`,onClick:()=>nie(),children:[(0,B.jsx)(li,{className:`size-3.5`}),`Sign out`]}),(0,B.jsx)(`nav`,{className:`flex items-center gap-1 text-xs`,children:Bae.map((e,t)=>(0,B.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[t>0&&(0,B.jsx)(`span`,{"aria-hidden":!0,children:`·`}),(0,B.jsx)(Qi,{asChild:!0,variant:`tertiary`,children:(0,B.jsx)(`a`,{href:e.href,target:`_blank`,rel:`noreferrer noopener`,children:e.label})})]},e.label))})]})]})},nI=1,Wae=.9,Gae=.8,Kae=.17,rI=.1,iI=.999,qae=.9999,Jae=.99,Yae=/[\\\/_+.#"@\[\(\{&]/,Xae=/[\\\/_+.#"@\[\(\{&]/g,Zae=/[\s-]/,aI=/[\s-]/g;function oI(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?nI:Jae;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=oI(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=nI:Yae.test(e.charAt(l-1))?(d*=Gae,p=e.slice(i,l-1).match(Xae),p&&i>0&&(d*=iI**+p.length)):Zae.test(e.charAt(l-1))?(d*=Wae,m=e.slice(i,l-1).match(aI),m&&i>0&&(d*=iI**+m.length)):(d*=Kae,i>0&&(d*=iI**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=qae)),(d<rI&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=oI(e,t,n,r,l+1,a+2,o),f*rI>d&&(d=f*rI)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function sI(e){return e.toLowerCase().replace(aI,` `)}function Qae(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,oI(e,t,sI(e),sI(t),0,0,{})}typeof window<`u`&&window.document&&window.document.createElement;function cI(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function lI(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function uI(...e){return t=>{let n=!1,r=e.map(e=>{let r=lI(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():lI(e[t],null)}}}}function dI(...e){return b.useCallback(uI(...e),e)}function $ae(e,t){let n=b.createContext(t),r=e=>{let{children:t,...r}=e,i=b.useMemo(()=>r,Object.values(r));return(0,B.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 fI(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,B.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,eoe(i,...t)]}function eoe(...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 pI=globalThis?.document?b.useLayoutEffect:()=>{},toe=b.useId||(()=>void 0),noe=0;function mI(e){let[t,n]=b.useState(toe());return pI(()=>{e||n(e=>e??String(noe++))},[e]),e||(t?`radix-${t}`:``)}var roe=b.useInsertionEffect||pI;function hI({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=ioe({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=aoe(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function ioe({defaultProp:e,onChange:t}){let[n,r]=b.useState(e),i=b.useRef(n),a=b.useRef(t);return roe(()=>{a.current=t},[t]),b.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function aoe(e){return typeof e==`function`}function gI(e){let t=ooe(e),n=b.forwardRef((e,n)=>{let{children:r,...i}=e,a=b.Children.toArray(r),o=a.find(coe);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,B.jsx)(t,{...i,ref:n,children:b.isValidElement(e)?b.cloneElement(e,void 0,r):null})}return(0,B.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function ooe(e){let t=b.forwardRef((e,t)=>{let{children:n,...r}=e;if(b.isValidElement(n)){let e=uoe(n),i=loe(r,n.props);return n.type!==b.Fragment&&(i.ref=t?uI(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 soe=Symbol(`radix.slottable`);function coe(e){return b.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===soe}function loe(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 uoe(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 _I=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=gI(`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,B.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function doe(e,t){e&&W_.flushSync(()=>e.dispatchEvent(t))}function vI(e){let t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...e)=>t.current?.(...e),[])}function foe(e,t=globalThis?.document){let n=vI(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 poe=`DismissableLayer`,yI=`dismissableLayer.update`,moe=`dismissableLayer.pointerDownOutside`,hoe=`dismissableLayer.focusOutside`,bI,xI=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),SI=b.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=b.useContext(xI),[u,d]=b.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=b.useState({}),m=dI(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=voe(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!x||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),C=yoe(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return foe(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&&(bI=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),CI(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=bI)}},[u,f,n,l]),b.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),CI())},[u,l]),b.useEffect(()=>{let e=()=>p({});return document.addEventListener(yI,e),()=>document.removeEventListener(yI,e)},[]),(0,B.jsx)(_I.div,{...c,ref:m,style:{pointerEvents:y?x?`auto`:`none`:void 0,...e.style},onFocusCapture:cI(e.onFocusCapture,C.onFocusCapture),onBlurCapture:cI(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:cI(e.onPointerDownCapture,S.onPointerDownCapture)})});SI.displayName=poe;var goe=`DismissableLayerBranch`,_oe=b.forwardRef((e,t)=>{let n=b.useContext(xI),r=b.useRef(null),i=dI(t,r);return b.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,B.jsx)(_I.div,{...e,ref:i})});_oe.displayName=goe;function voe(e,t=globalThis?.document){let n=vI(e),r=b.useRef(!1),i=b.useRef(()=>{});return b.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){wI(moe,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 yoe(e,t=globalThis?.document){let n=vI(e),r=b.useRef(!1);return b.useEffect(()=>{let e=e=>{e.target&&!r.current&&wI(hoe,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 CI(){let e=new CustomEvent(yI);document.dispatchEvent(e)}function wI(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?doe(i,a):i.dispatchEvent(a)}var TI=`focusScope.autoFocusOnMount`,EI=`focusScope.autoFocusOnUnmount`,DI={bubbles:!1,cancelable:!0},boe=`FocusScope`,OI=b.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=b.useState(null),l=vI(i),u=vI(a),d=b.useRef(null),f=dI(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:jI(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||jI(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&jI(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){MI.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(TI,DI);s.addEventListener(TI,l),s.dispatchEvent(t),t.defaultPrevented||(xoe(Eoe(kI(s)),{select:!0}),document.activeElement===e&&jI(s))}return()=>{s.removeEventListener(TI,l),setTimeout(()=>{let t=new CustomEvent(EI,DI);s.addEventListener(EI,u),s.dispatchEvent(t),t.defaultPrevented||jI(e??document.body,{select:!0}),s.removeEventListener(EI,u),MI.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]=Soe(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&jI(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&jI(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,B.jsx)(_I.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});OI.displayName=boe;function xoe(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(jI(r,{select:t}),document.activeElement!==n)return}function Soe(e){let t=kI(e);return[AI(t,e),AI(t.reverse(),e)]}function kI(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 AI(e,t){for(let n of e)if(!Coe(n,{upTo:t}))return n}function Coe(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 woe(e){return e instanceof HTMLInputElement&&`select`in e}function jI(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&woe(e)&&t&&e.select()}}var MI=Toe();function Toe(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=NI(e,t),e.unshift(t)},remove(t){e=NI(e,t),e[0]?.resume()}}}function NI(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Eoe(e){return e.filter(e=>e.tagName!==`A`)}var Doe=`Portal`,PI=b.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=b.useState(!1);pI(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?W_.createPortal((0,B.jsx)(_I.div,{...r,ref:t}),o):null});PI.displayName=Doe;function Ooe(e,t){return b.useReducer((e,n)=>t[e][n]??e,e)}var FI=e=>{let{present:t,children:n}=e,r=koe(t),i=typeof n==`function`?n({present:r.isPresent}):b.Children.only(n),a=dI(r.ref,Aoe(i));return typeof n==`function`||r.isPresent?b.cloneElement(i,{ref:a}):null};FI.displayName=`Presence`;function koe(e){let[t,n]=b.useState(),r=b.useRef(null),i=b.useRef(e),a=b.useRef(`none`),[o,s]=Ooe(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return b.useEffect(()=>{let e=II(r.current);a.current=o===`mounted`?e:`none`},[o]),pI(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=II(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),pI(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=II(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=II(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 II(e){return e?.animationName||`none`}function Aoe(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 LI=0;function joe(){b.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??RI()),document.body.insertAdjacentElement(`beforeend`,e[1]??RI()),LI++,()=>{LI===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),LI--}},[])}function RI(){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 zI=`Dialog`,[BI,Moe]=fI(zI),[Noe,VI]=BI(zI),HI=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]=hI({prop:r,defaultProp:i??!1,onChange:a,caller:zI});return(0,B.jsx)(Noe,{scope:t,triggerRef:s,contentRef:c,contentId:mI(),titleId:mI(),descriptionId:mI(),open:l,onOpenChange:u,onOpenToggle:b.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};HI.displayName=zI;var UI=`DialogTrigger`,Poe=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=VI(UI,n),a=dI(t,i.triggerRef);return(0,B.jsx)(_I.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":tL(i.open),...r,ref:a,onClick:cI(e.onClick,i.onOpenToggle)})});Poe.displayName=UI;var WI=`DialogPortal`,[Foe,GI]=BI(WI,{forceMount:void 0}),KI=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=VI(WI,t);return(0,B.jsx)(Foe,{scope:t,forceMount:n,children:b.Children.map(r,e=>(0,B.jsx)(FI,{present:n||a.open,children:(0,B.jsx)(PI,{asChild:!0,container:i,children:e})}))})};KI.displayName=WI;var qI=`DialogOverlay`,JI=b.forwardRef((e,t)=>{let n=GI(qI,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=VI(qI,e.__scopeDialog);return a.modal?(0,B.jsx)(FI,{present:r||a.open,children:(0,B.jsx)(Loe,{...i,ref:t})}):null});JI.displayName=qI;var Ioe=gI(`DialogOverlay.RemoveScroll`),Loe=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=VI(qI,n);return(0,B.jsx)(pj,{as:Ioe,allowPinchZoom:!0,shards:[i.contentRef],children:(0,B.jsx)(_I.div,{"data-state":tL(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),YI=`DialogContent`,XI=b.forwardRef((e,t)=>{let n=GI(YI,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=VI(YI,e.__scopeDialog);return(0,B.jsx)(FI,{present:r||a.open,children:a.modal?(0,B.jsx)(Roe,{...i,ref:t}):(0,B.jsx)(zoe,{...i,ref:t})})});XI.displayName=YI;var Roe=b.forwardRef((e,t)=>{let n=VI(YI,e.__scopeDialog),r=b.useRef(null),i=dI(t,n.contentRef,r);return b.useEffect(()=>{let e=r.current;if(e)return nA(e)},[]),(0,B.jsx)(ZI,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:cI(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:cI(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:cI(e.onFocusOutside,e=>e.preventDefault())})}),zoe=b.forwardRef((e,t)=>{let n=VI(YI,e.__scopeDialog),r=b.useRef(!1),i=b.useRef(!1);return(0,B.jsx)(ZI,{...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()}})}),ZI=b.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=VI(YI,n),c=b.useRef(null),l=dI(t,c);return joe(),(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(OI,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,B.jsx)(SI,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":tL(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(Woe,{titleId:s.titleId}),(0,B.jsx)(Koe,{contentRef:c,descriptionId:s.descriptionId})]})]})}),QI=`DialogTitle`,Boe=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=VI(QI,n);return(0,B.jsx)(_I.h2,{id:i.titleId,...r,ref:t})});Boe.displayName=QI;var $I=`DialogDescription`,Voe=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=VI($I,n);return(0,B.jsx)(_I.p,{id:i.descriptionId,...r,ref:t})});Voe.displayName=$I;var eL=`DialogClose`,Hoe=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=VI(eL,n);return(0,B.jsx)(_I.button,{type:`button`,...r,ref:t,onClick:cI(e.onClick,()=>i.onOpenChange(!1))})});Hoe.displayName=eL;function tL(e){return e?`open`:`closed`}var nL=`DialogTitleWarning`,[Uoe,rL]=$ae(nL,{contentName:YI,titleName:QI,docsSlug:`dialog`}),Woe=({titleId:e})=>{let t=rL(nL),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
148
+
149
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
150
+
151
+ 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},Goe=`DialogDescriptionWarning`,Koe=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${rL(Goe).contentName}}.`;return b.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},qoe=HI,Joe=KI,Yoe=JI,Xoe=XI,Zoe=Symbol.for(`react.lazy`),iL=b.use;function Qoe(e){return typeof e==`object`&&!!e&&`then`in e}function aL(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Zoe&&`_payload`in e&&Qoe(e._payload)}function $oe(e){let t=ese(e),n=b.forwardRef((e,n)=>{let{children:r,...i}=e;aL(r)&&typeof iL==`function`&&(r=iL(r._payload));let a=b.Children.toArray(r),o=a.find(nse);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,B.jsx)(t,{...i,ref:n,children:b.isValidElement(e)?b.cloneElement(e,void 0,r):null})}return(0,B.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function ese(e){let t=b.forwardRef((e,t)=>{let{children:n,...r}=e;if(aL(n)&&typeof iL==`function`&&(n=iL(n._payload)),b.isValidElement(n)){let e=ise(n),i=rse(r,n.props);return n.type!==b.Fragment&&(i.ref=t?uI(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 tse=Symbol(`radix.slottable`);function nse(e){return b.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===tse}function rse(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 ise(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 oL=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=$oe(`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,B.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),sL=`[cmdk-group=""]`,cL=`[cmdk-group-items=""]`,ase=`[cmdk-group-heading=""]`,lL=`[cmdk-item=""]`,uL=`${lL}:not([aria-disabled="true"])`,dL=`cmdk-item-select`,fL=`data-value`,ose=(e,t,n)=>Qae(e,t,n),pL=b.createContext(void 0),mL=()=>b.useContext(pL),hL=b.createContext(void 0),gL=()=>b.useContext(hL),_L=b.createContext(void 0),vL=b.forwardRef((e,t)=>{let n=SL(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=SL(()=>new Set),i=SL(()=>new Map),a=SL(()=>new Map),o=SL(()=>new Set),s=bL(e),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:g=!0,..._}=e,v=mI(),y=mI(),x=mI(),S=b.useRef(null),C=_se();xL(()=>{if(u!==void 0){let e=u.trim();n.current.value=e,w.emit()}},[u]),xL(()=>{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??ose;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(cL);t?t.appendChild(e.parentElement===t?e:e.closest(`${cL} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${cL} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=S.current?.querySelector(`${sL}[${fL}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function O(){let e=M().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(fL);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(sL)?.querySelector(ase))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function j(){return S.current?.querySelector(`${lL}[aria-selected="true"]`)}function M(){return Array.from(S.current?.querySelectorAll(uL)||[])}function N(e){let t=M()[e];t&&w.setState(`value`,t.getAttribute(fL))}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(fL))}function F(e){let t=j()?.closest(sL),n;for(;t&&!n;)t=e>0?hse(t,sL):gse(t,sL),n=t?.querySelector(uL);n?w.setState(`value`,n.getAttribute(fL)):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(oL.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(dL);t.dispatchEvent(e)}}}}},b.createElement(`label`,{"cmdk-label":``,htmlFor:T.inputId,id:T.labelId,style:yse},c),TL(e,e=>b.createElement(hL.Provider,{value:w},b.createElement(pL.Provider,{value:T},e))))}),sse=b.forwardRef((e,t)=>{let n=mI(),r=b.useRef(null),i=b.useContext(_L),a=mL(),o=bL(e),s=o.current?.forceMount??i?.forceMount;xL(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=wL(n,r,[e.value,e.children,r],e.keywords),l=gL(),u=CL(e=>e.value&&e.value===c.current),d=CL(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(dL,f),()=>t.removeEventListener(dL,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(oL.div,{ref:uI(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)}),cse=b.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=mI(),s=b.useRef(null),c=b.useRef(null),l=mI(),u=mL(),d=CL(e=>i||u.filter()===!1?!0:!e.search||e.filtered.groups.has(o));xL(()=>u.group(o),[]),wL(o,s,[e.value,e.heading,c]);let f=b.useMemo(()=>({id:o,forceMount:i}),[i]);return b.createElement(oL.div,{ref:uI(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),TL(e,e=>b.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?l:void 0},b.createElement(_L.Provider,{value:f},e))))}),lse=b.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=b.useRef(null),a=CL(e=>!e.search);return!n&&!a?null:b.createElement(oL.div,{ref:uI(i,t),...r,"cmdk-separator":``,role:`separator`})}),use=b.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=gL(),o=CL(e=>e.search),s=CL(e=>e.selectedItemId),c=mL();return b.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),b.createElement(oL.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)}})}),dse=b.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=b.useRef(null),o=b.useRef(null),s=CL(e=>e.selectedItemId),c=mL();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(oL.div,{ref:uI(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},TL(e,e=>b.createElement(`div`,{ref:uI(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),fse=b.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return b.createElement(qoe,{open:n,onOpenChange:r},b.createElement(Joe,{container:o},b.createElement(Yoe,{"cmdk-overlay":``,className:i}),b.createElement(Xoe,{"aria-label":e.label,"cmdk-dialog":``,className:a},b.createElement(vL,{ref:t,...s}))))}),pse=b.forwardRef((e,t)=>CL(e=>e.filtered.count===0)?b.createElement(oL.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),mse=b.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return b.createElement(oL.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},TL(e,e=>b.createElement(`div`,{"aria-hidden":!0},e)))}),yL=Object.assign(vL,{List:dse,Item:sse,Input:use,Group:cse,Separator:lse,Dialog:fse,Empty:pse,Loading:mse});function hse(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function gse(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function bL(e){let t=b.useRef(e);return xL(()=>{t.current=e}),t}var xL=typeof window>`u`?b.useEffect:b.useLayoutEffect;function SL(e){let t=b.useRef();return t.current===void 0&&(t.current=e()),t}function CL(e){let t=gL(),n=()=>e(t.snapshot());return b.useSyncExternalStore(t.subscribe,n,n)}function wL(e,t,n,r=[]){let i=b.useRef(),a=mL();return xL(()=>{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(fL,s),i.current=s}),i}var _se=()=>{let[e,t]=b.useState(),n=SL(()=>new Map);return xL(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function vse(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function TL({asChild:e,children:t},n){return e&&b.isValidElement(t)?b.cloneElement(vse(t),{ref:t.ref},n(t.props.children)):n(t)}var yse={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`};function bse({className:e,...t}){return(0,B.jsx)(yL,{"data-slot":`command`,className:Mr(`bg-popover text-foreground flex h-full w-full flex-col overflow-hidden rounded-md`,e),...t})}function xse({className:e,...t}){return(0,B.jsxs)(`div`,{"data-slot":`command-input-wrapper`,className:`flex h-14 items-center gap-2 border-b p-3`,children:[(0,B.jsx)(xi,{className:`size-5 shrink-0 text-muted-foreground`}),(0,B.jsx)(yL.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 Sse({className:e,...t}){return(0,B.jsx)(yL.List,{"data-slot":`command-list`,className:Mr(`max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto`,e),...t})}function Cse({...e}){return(0,B.jsx)(yL.Empty,{"data-slot":`command-empty`,className:`py-6 text-center type-text-sm text-muted-foreground`,...e})}function wse({className:e,...t}){return(0,B.jsx)(yL.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 Tse({className:e,...t}){return(0,B.jsx)(yL.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 EL=[{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 DL(e,t){return typeof e==`string`&&t.includes(e)}var OL=[{mode:`fullscreen`,icon:di},{mode:`pip`,icon:hi},{mode:`inline`,icon:wi}];function Ese(e,t){let{userAgent:n,setPreference:r}=us.getState(),i=e.get(`displayMode`);DL(i,OL.map(e=>e.mode))&&r(`displayMode`,i),r(`theme`,e.has(`darkTheme`)?`dark`:`light`),t===`panel`&&r(`userAgent`,{...n,device:{...n?.device,type:e.has(`mobileDevice`)?`mobile`:`desktop`}});let a=e.get(`locale`);DL(a,EL.map(e=>e.code))&&r(`locale`,a);let o=us.getState();return`View preview options: displayMode=${o.displayMode}, theme=${o.theme}, locale=${o.locale}, device=${o.userAgent?.device?.type??`desktop`}.`}function Dse({name:e,description:t,value:n,options:r}){return(0,B.jsx)(`select`,{name:e,toolparamdescription:t,value:n,tabIndex:-1,onChange:e=>e.currentTarget.form?.requestSubmit(),children:r.map(e=>(0,B.jsx)(`option`,{value:e,children:e},e))})}var kL=`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`,AL=`text-light-gray-foreground hover:bg-light-gray hover:text-foreground`,jL=`bg-muted text-foreground`;function ML({icon:e,label:t,selected:n,onClick:r,className:i}){return(0,B.jsxs)(`button`,{type:`button`,onClick:r,"aria-pressed":n,className:Y(kL,`border border-border bg-background`,n?jL:AL,i),children:[(0,B.jsx)(e,{className:`size-3.5`}),(0,B.jsx)(`span`,{children:t})]})}function NL({icon:e,label:t,name:n,description:r,checked:i}){return(0,B.jsxs)(`label`,{className:Y(kL,`border border-border bg-background`,AL,`has-focus-visible:ring-1 has-focus-visible:ring-ring`),children:[(0,B.jsx)(`input`,{type:`checkbox`,name:n,toolparamdescription:r,checked:i,onChange:e=>e.currentTarget.form?.requestSubmit(),className:`sr-only`}),(0,B.jsx)(e,{className:`size-3.5`}),(0,B.jsx)(`span`,{children:t})]})}var PL=({variant:e=`panel`,logsOpen:t,onOpenLogs:n})=>{let r=us(e=>e.displayMode),i=us(e=>e.theme),a=us(e=>e.locale),o=us(e=>e.userAgent),s=us(e=>e.previewClient),c=us(e=>e.setPreviewClient),l=us(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=EL.find(e=>e.code===a)?.englishName??a;return(0,B.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: display mode, theme, locale, and device type.`:`Set the Skybridge devtools preview options: theme.`,toolautosubmit:``,onSubmit:t=>{t.preventDefault();let n=Ese(new FormData(t.currentTarget),e),r=t.nativeEvent;r instanceof SubmitEvent&&r.agentInvoked&&typeof r.respondWith==`function`&&r.respondWith(Promise.resolve({content:[{type:`text`,text:n}]}))},className:Y(`flex w-full shrink-0 items-center gap-1.5`,e===`panel`?`mt-3 px-3`:`justify-end`),children:[e===`panel`&&(0,B.jsxs)(`fieldset`,{className:`inline-flex h-7 items-center rounded-md border border-border bg-background p-0.5`,children:[(0,B.jsx)(`legend`,{className:`sr-only`,children:`Display mode`}),OL.map(({mode:e,icon:t})=>{let n=r===e;return(0,B.jsxs)(`label`,{className:Y(`inline-flex h-full cursor-pointer items-center gap-1.5 rounded px-2 text-xs font-medium transition-colors`,`has-focus-visible:ring-1 has-focus-visible:ring-ring`,n?jL:AL),children:[(0,B.jsx)(`input`,{type:`radio`,name:`displayMode`,value:e,checked:n,onChange:e=>e.currentTarget.form?.requestSubmit(),toolparamdescription:`How the host lays out the rendered view.`,className:`sr-only`}),(0,B.jsx)(t,{className:`size-3.5`}),(0,B.jsx)(`span`,{children:e})]},e)})]}),(0,B.jsx)(NL,{icon:m?mi:Ti,label:m?`dark`:`light`,name:`darkTheme`,description:`Preview the view in dark theme (true) or light theme (false).`,checked:m}),e===`panel`&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(Hj,{open:d,onOpenChange:f,children:[(0,B.jsx)(Uj,{asChild:!0,children:(0,B.jsxs)(`button`,{type:`button`,"aria-label":`Locale`,className:Y(kL,`border border-border bg-background`,AL,`aria-expanded:bg-muted aria-expanded:text-foreground`),children:[(0,B.jsx)(ai,{className:`size-3.5`}),(0,B.jsx)(`span`,{children:g})]})}),(0,B.jsx)(Gj,{className:`w-[260px] p-0`,align:`start`,children:(0,B.jsxs)(bse,{children:[(0,B.jsx)(xse,{placeholder:`Search locale...`}),(0,B.jsxs)(Sse,{children:[(0,B.jsx)(Cse,{children:`No locale found.`}),(0,B.jsx)(wse,{children:EL.map(e=>(0,B.jsxs)(Tse,{value:e.code,keywords:[e.englishName,e.localeName],onSelect:e=>{p(e),f(!1)},children:[(0,B.jsxs)(`span`,{className:`truncate`,children:[e.englishName,e.localeName===e.englishName?null:(0,B.jsx)(`span`,{className:`ml-1.5 text-muted-foreground`,children:e.localeName})]}),(0,B.jsx)(Gr,{className:Y(`ml-auto h-4 w-4`,a===e.code?`opacity-100`:`opacity-0`)})]},e.code))})]})]})})]}),(0,B.jsx)(`div`,{className:`sr-only`,"aria-hidden":!0,children:(0,B.jsx)(Dse,{name:`locale`,description:`The BCP 47 locale code to preview the view in.`,value:a,options:EL.map(e=>e.code)})})]}),e===`panel`&&(0,B.jsx)(NL,{icon:h?Ci:pi,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,B.jsxs)(`div`,{className:`ml-auto flex items-center gap-1.5`,children:[(0,B.jsx)(ML,{icon:ni,label:`preview`,onClick:()=>c(`chatgpt`)}),!t&&(0,B.jsx)(ML,{icon:ui,label:`logs`,onClick:n})]}),e===`preview`&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(ML,{icon:Ur,label:s===`claude`?`switch to ChatGPT`:`switch to Claude`,onClick:()=>{c(s===`claude`?`chatgpt`:`claude`),l(`displayMode`,`inline`)}}),(0,B.jsx)(ML,{icon:ki,label:`quit preview`,onClick:()=>{c(null),l(`displayMode`,`inline`)}})]})]})},Ose=({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=Qj(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])},kse=({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},FL={"--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)`},Ase={"--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 IL(e){return e===`dark`?{...FL,...Ase}:FL}function jse(e){return{styles:{variables:IL(e)},containerDimensions:{maxWidth:768},availableDisplayModes:[`inline`,`fullscreen`,`pip`],userAgent:`chatgpt`,timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone}}var LL={"--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)`},RL=`
152
+ @font-face {
153
+ font-family: "Anthropic Sans";
154
+ src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-Regular-Static.otf") format("opentype");
155
+ font-weight: 400;
156
+ font-style: normal;
157
+ font-display: swap;
158
+ }
159
+ @font-face {
160
+ font-family: "Anthropic Sans";
161
+ src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-RegularItalic-Static.otf") format("opentype");
162
+ font-weight: 400;
163
+ font-style: italic;
164
+ font-display: swap;
165
+ }
166
+ @font-face {
167
+ font-family: "Anthropic Sans";
168
+ src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-Medium-Static.otf") format("opentype");
169
+ font-weight: 500;
170
+ font-style: normal;
171
+ font-display: swap;
172
+ }
173
+ @font-face {
174
+ font-family: "Anthropic Sans";
175
+ src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-MediumItalic-Static.otf") format("opentype");
176
+ font-weight: 500;
177
+ font-style: italic;
178
+ font-display: swap;
179
+ }
180
+ @font-face {
181
+ font-family: "Anthropic Sans";
182
+ src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-Semibold-Static.otf") format("opentype");
183
+ font-weight: 600;
184
+ font-style: normal;
185
+ font-display: swap;
186
+ }
187
+ @font-face {
188
+ font-family: "Anthropic Sans";
189
+ src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-SemiboldItalic-Static.otf") format("opentype");
190
+ font-weight: 600;
191
+ font-style: italic;
192
+ font-display: swap;
193
+ }
194
+ @font-face {
195
+ font-family: "Anthropic Sans";
196
+ src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-Bold-Static.otf") format("opentype");
197
+ font-weight: 700;
198
+ font-style: normal;
199
+ font-display: swap;
200
+ }
201
+ @font-face {
202
+ font-family: "Anthropic Sans";
203
+ src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-BoldItalic-Static.otf") format("opentype");
204
+ font-weight: 700;
205
+ font-style: italic;
206
+ font-display: swap;
207
+ }
208
+ `;function Mse(){return{styles:{variables:LL,css:{fonts:RL}},containerDimensions:{width:720,maxHeight:5e3},availableDisplayModes:[`inline`,`fullscreen`],userAgent:navigator.userAgent,timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone}}function Nse(e,t){e.contentWindow?.postMessage(t,`*`)}function zL(e,t,n){e({jsonrpc:`2.0`,id:t,result:n})}function BL(e,t,n,r){e({jsonrpc:`2.0`,id:t,error:{code:n,message:r}})}function VL(e,t){switch(e){case`chatgpt`:return jse(t);case`claude`:return Mse();case null:return{}}}function Pse(){let e=us.getState();return{...VL(e.previewClient,e.theme),theme:e.theme,locale:e.locale,displayMode:e.displayMode,safeAreaInsets:e.safeArea?.insets??{top:0,right:0,bottom:0,left:0},platform:e.previewClient===null&&e.userAgent?.device?.type===`mobile`?`mobile`:`web`,deviceCapabilities:e.userAgent?.capabilities}}function Fse(e,t,n,r){let i=t=>Nse(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`:{zL(i,s,{protocolVersion:`2025-06-18`,hostInfo:{name:`skybridge-devtools`,version:`0.0.1`},hostCapabilities:{openLinks:{},serverTools:{}},hostContext:Pse()});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??{}),zL(i,s,{});break;case`ui/request-display-mode`:{let e=l?.mode??`inline`,t=us.getState(),n=t.previewClient===`claude`&&e===`pip`?t.displayMode===`modal`?`inline`:t.displayMode:e;t.setPreference(`displayMode`,n),zL(i,s,{mode:n});break}case`ui/open-link`:{let e=l?.url;e&&window.open(e,`_blank`,`noopener,noreferrer`),zL(i,s,{});break}case`ui/download-file`:BL(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`),zL(i,s,a)}catch(e){let t=e instanceof Error?e.message:String(e);BL(i,s,-32603,t)}break}default:s!==void 0&&BL(i,s,-32601,`Method not found: ${c}`)}};window.addEventListener(`message`,a);let o=us.subscribe((e,t)=>{let n={};e.theme!==t.theme&&(n.theme=e.theme,e.previewClient===`chatgpt`&&(n.styles={variables:IL(e.theme)})),e.previewClient!==t.previewClient&&Object.assign(n,VL(e.previewClient,e.theme)),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 Ise(e,t){e.contentWindow?.postMessage({jsonrpc:`2.0`,method:`ui/notifications/tool-input`,params:{arguments:t}},`*`)}function Lse(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 HL=`openai:set_globals`,Rse=class extends CustomEvent{type=HL};function zse(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=us.getState(),a=i.previewClient===`claude`&&r.mode===`pip`?i.displayMode===`modal`?`inline`:i.displayMode:r.mode;return e.displayMode=a,n(`displayMode`,a),i.setPreference(`displayMode`,a),{mode:a}},setWidgetState:async r=>{z_(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 Bse(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 Rse(HL,{detail:{globals:{[r]:i}}});t.dispatchEvent(e)}return o}})}function Vse(e,t,n,r,i,a){let o=Bse(ZS(t),e);Fy(o,zse(o,n,r,i,a)),e.openai=o}var UL=`__host-fonts`,Hse=({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`?IL(t):LL,c=Object.entries(s);for(let[e,t]of c)o.style.setProperty(e,t);if(n===`claude`&&!a.getElementById(UL)){let e=a.createElement(`style`);e.id=UL,e.textContent=RL,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])},Use=({iframeRef:e,toolName:t,displayMode:n,updateOpenaiObject:r})=>{(0,b.useEffect)(()=>{let i=e.current?.contentWindow;!i?.openai||i.openai.displayMode===n||(i.openai.displayMode=n,r(t,`displayMode`,n))},[e,n,t,r])},Wse=({iframeRef:e,toolName:t,locale:n,updateOpenaiObject:r})=>{(0,b.useEffect)(()=>{let i=e.current?.contentWindow;i?.openai&&(i.openai.locale=n,r(t,`locale`,n))},[e,n,t,r])},Gse=({iframeRef:e,toolName:t,theme:n,updateOpenaiObject:r})=>{(0,b.useEffect)(()=>{let i=e.current?.contentWindow;i?.openai&&(i.openai.theme=n,r(t,`theme`,n))},[e,n,t,r])},Kse=345,qse=770,WL=420,GL=()=>{let e=PT(),{openaiObject:t}=xw(e.name)??{},{data:n}=FT(e._meta?.ui?.resourceUri),{setToolData:r,pushOpenAiLog:i,updateOpenaiObject:a,setOpenInAppUrl:o}=bw(),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=us(e=>e.previewClient),p=f!==null,m=us(e=>e.userAgent?.device?.type??`desktop`)===`mobile`&&!p,h=(0,b.useRef)(m);(0,b.useEffect)(()=>{h.current!==m&&(h.current=m,d(null))},[m]);let g=us(e=>e.displayMode),_=g===`fullscreen`,v=g===`pip`,y=_&&!m,x=y||p?`100%`:`${m?Kse:qse}px`,S=us(e=>e.theme),C=us(e=>e.locale),w=n.contents[0],T=w.text,E=Zj(w._meta?.ui?.domain??w._meta?.[`openai/widgetDomain`]);(0,b.useEffect)(()=>{let t=s.current;if(!t?.contentWindow||!t.contentDocument)return;E&&o(e.name,E);let n=(t,n,r=`default`)=>{i(e.name,{timestamp:Date.now(),source:`view`,command:t,args:n,type:r})};Vse(t.contentWindow,l.current,n,(t,n)=>{a(e.name,t,n)},(e,t)=>wT.callTool(e,t),t=>{o(e.name,t)});let c=Fse(t,(e,t)=>wT.callTool(e,t),n,()=>({toolInput:l.current?.toolInput,toolOutput:l.current?.toolOutput,toolResponseMetadata:l.current?.toolResponseMetadata}));return t.contentDocument.open(),t.contentDocument.write(Xj(T)),t.contentDocument.close(),r(e.name,{openaiRef:s}),c},[T,E,e.name,i,r,a,o]),Ose({iframeRef:s,containerRef:c,enabled:!!T&&!y,onHeightChange:d,documentKey:T,clampToContainer:!p});let D=kse({iframeRef:s,documentKey:T});return Gse({iframeRef:s,toolName:e.name,theme:S,updateOpenaiObject:a}),Wse({iframeRef:s,toolName:e.name,locale:C,updateOpenaiObject:a}),Use({iframeRef:s,toolName:e.name,displayMode:g,updateOpenaiObject:a}),Hse({iframeRef:s,theme:S,previewClient:f,documentKey:T}),(0,b.useEffect)(()=>{let e=s.current;!e||!t||(t.toolInput!=null&&Ise(e,t.toolInput),(t.toolOutput!=null||t.toolResponseMetadata!=null)&&Lse(e,{content:[],structuredContent:t.toolOutput,isError:!1,_meta:t.toolResponseMetadata}))},[t]),(0,B.jsx)(`div`,{ref:c,className:Y(`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,WL):u}px`,opacity:+!!D},children:(0,B.jsx)(`iframe`,{ref:s,src:`about:blank`,style:{width:`100%`,height:y||u==null?`100%`:`${v&&!p?Math.min(u,WL):u}px`,border:`none`,display:`block`},sandbox:`allow-scripts allow-same-origin allow-forms`,title:`html-preview`})})};function KL(e){return(0,B.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,B.jsxs)(`g`,{children:[(0,B.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,B.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 Jse(e){return(0,B.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,...e,children:(0,B.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 Yse(e){return(0,B.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,B.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 qL(e){return(0,B.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,...e,children:(0,B.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 Xse(e){return(0,B.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,...e,children:(0,B.jsxs)(`g`,{strokeLinecap:`round`,strokeWidth:`1.33`,children:[(0,B.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,B.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 Zse(e){return(0,B.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,B.jsxs)(`g`,{children:[(0,B.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,B.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 Qse(e){return(0,B.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,B.jsxs)(`g`,{children:[(0,B.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,B.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 $se(e){return(0,B.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,B.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 JL(e){return(0,B.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,...e,children:(0,B.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 ece(e){return(0,B.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,B.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 tce(e){return(0,B.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,B.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 nce(e){return(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,B.jsxs)(`g`,{children:[(0,B.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,B.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 rce(e){return(0,B.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,B.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 YL(e){return(0,B.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,B.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 ice(e){return(0,B.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,B.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 ace(e){return(0,B.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,B.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`})})}var oce=`ui-sans-serif, -apple-system, system-ui, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif`,sce={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 XL({className:e}){return(0,B.jsx)(`div`,{className:Y(`rounded-md bg-[color-mix(in_oklab,var(--text-primary)_10%,transparent)] motion-safe:animate-pulse`,e)})}var cce=[{icon:KL,label:`New chat`},{icon:Jse,label:`Projects`},{icon:Yse,label:`Tasks`},{icon:qL,label:`Library`},{icon:Xse,label:`Plugins`},{icon:Zse,label:`Agents`},{icon:Qse,label:`Codex`},{icon:$se,label:`GPTs`}],lce=[`w-[85%]`,`w-[70%]`,`w-[78%]`,`w-[62%]`,`w-[82%]`,`w-[68%]`,`w-[75%]`,`w-[60%]`];function ZL({className:e}){return(0,B.jsx)(`div`,{className:Y(`h-11 w-2/5 self-end rounded-3xl bg-(--message-surface) motion-safe:animate-pulse`,e)})}function uce({children:e}){let t=us(e=>e.theme),n=us(e=>e.displayMode),r=us(e=>e.setPreference),i=n===`pip`,a=n===`fullscreen`,o=(0,b.useRef)(null),s=(0,b.useRef)(null);return(0,b.useEffect)(()=>{let e=o.current,t=s.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,B.jsxs)(`div`,{className:`@container/shell relative isolate flex h-full w-full overflow-hidden bg-(--main-surface-primary) text-(--text-primary)`,style:{fontFamily:oce,...sce[t]},children:[(0,B.jsxs)(`aside`,{"aria-hidden":!0,className:Y(`h-full shrink-0 cursor-not-allowed border-(--border-default) border-r bg-(--sidebar-surface) @max-[640px]/shell:hidden`,a?`w-[52px]`:`w-[260px]`),children:[(0,B.jsxs)(`div`,{className:Y(`h-full flex-col px-1.5 pb-2`,a?`hidden`:`flex`),children:[(0,B.jsxs)(`div`,{className:`flex h-[52px] shrink-0 items-center justify-between pr-2.5 pl-3`,children:[(0,B.jsx)(`span`,{className:`font-semibold text-base`,children:`ChatGPT`}),(0,B.jsxs)(`div`,{className:`flex items-center gap-4 text-(--text-secondary)`,children:[(0,B.jsx)(JL,{className:`size-5`}),(0,B.jsx)(ece,{className:`size-5`})]})]}),cce.map(({icon:e,label:t})=>(0,B.jsxs)(`div`,{className:`flex h-9 shrink-0 items-center gap-1.5 rounded-[10px] px-2.5 text-sm leading-5`,children:[(0,B.jsx)(e,{className:`size-5 shrink-0`}),(0,B.jsx)(`span`,{children:t})]},t)),(0,B.jsx)(XL,{className:`mt-6 mb-2 ml-2 h-3 w-14`}),lce.map(e=>(0,B.jsx)(`div`,{className:`px-2 py-2`,children:(0,B.jsx)(XL,{className:Y(`h-3.5`,e)})},e)),(0,B.jsxs)(`div`,{className:`mt-auto flex items-center gap-2 px-2 py-2`,children:[(0,B.jsx)(XL,{className:`size-8 rounded-full`}),(0,B.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,B.jsx)(XL,{className:`h-3 w-24`}),(0,B.jsx)(XL,{className:`h-2.5 w-16`})]})]})]}),(0,B.jsxs)(`div`,{className:Y(`h-full flex-col items-center gap-5 py-4`,a?`flex`:`hidden`),children:[(0,B.jsx)(ice,{className:`size-6`}),(0,B.jsx)(KL,{className:`mt-4 size-5`}),(0,B.jsx)(JL,{className:`size-5`}),(0,B.jsx)(ace,{className:`size-5`}),(0,B.jsx)(qL,{className:`size-5`}),(0,B.jsx)(XL,{className:`mt-auto size-8 rounded-full`})]})]}),(0,B.jsxs)(`div`,{className:`relative flex h-full min-w-0 flex-1 flex-col`,children:[(0,B.jsxs)(`div`,{className:Y(`h-[52px] shrink-0 items-center px-4`,a?`flex`:`hidden`),children:[(0,B.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,B.jsx)(YL,{className:`size-5`})}),(0,B.jsxs)(`div`,{"aria-hidden":!0,className:`flex flex-1 items-center justify-center gap-2`,children:[(0,B.jsx)(XL,{className:`size-5 rounded-md`}),(0,B.jsx)(XL,{className:`h-4 w-28`})]}),(0,B.jsx)(`div`,{className:`w-5`})]}),(0,B.jsx)(`div`,{ref:o,className:`min-h-0 flex-1 overflow-y-auto [container-type:size]`,children:(0,B.jsxs)(`div`,{ref:s,className:Y(`mx-auto flex w-full max-w-[768px] flex-col px-4 py-6`,a&&`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,B.jsxs)(`div`,{className:Y(`flex flex-col`,a&&`hidden`,t>0&&`mt-10`),children:[(0,B.jsx)(ZL,{}),(0,B.jsx)(`div`,{className:`mt-6 flex flex-col gap-3`,children:e.map(e=>(0,B.jsx)(XL,{className:Y(`h-4`,e)},e))})]},e[0])),(0,B.jsx)(ZL,{className:Y(`mt-10`,a&&`hidden`)}),(0,B.jsx)(XL,{className:Y(`mt-6 h-4 w-40`,a&&`hidden`)}),(0,B.jsxs)(`div`,{className:Y(`mt-6 flex items-center gap-2`,a&&`hidden`),children:[(0,B.jsx)(XL,{className:`size-5 rounded-md`}),(0,B.jsx)(XL,{className:`h-4 w-[110px]`})]}),(0,B.jsxs)(`div`,{className:Y(`relative mt-3 w-full`,!i&&!a&&`-mx-4 w-[calc(100%+2rem)]`,i&&`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)]`,a&&`mt-0 min-h-0 flex-1`),children:[i?(0,B.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,B.jsx)(YL,{className:`size-4.5`})}):null,(0,B.jsx)(`div`,{className:Y(`w-full`,i&&`max-h-[80cqh] overflow-y-auto rounded-3xl`,a&&`h-full min-h-0`),children:e??(0,B.jsx)(XL,{className:`h-96 w-full rounded-2xl`})})]}),(0,B.jsx)(`div`,{className:Y(`mt-6 border-(--border-default) border-t`,a&&`hidden`)}),(0,B.jsxs)(`div`,{className:Y(`mt-6 flex flex-col gap-3`,a&&`hidden`),children:[(0,B.jsx)(XL,{className:`h-4 w-[95%]`}),(0,B.jsx)(XL,{className:`h-4 w-[88%]`}),(0,B.jsx)(XL,{className:`h-4 w-[60%]`})]}),(0,B.jsxs)(`div`,{className:Y(`mt-4 flex items-center gap-3 pb-4`,a&&`hidden`),children:[(0,B.jsx)(XL,{className:`size-4 rounded-full`}),(0,B.jsx)(XL,{className:`size-4 rounded-full`}),(0,B.jsx)(XL,{className:`size-4 rounded-full`}),(0,B.jsx)(XL,{className:`size-4 rounded-full`})]})]})}),(0,B.jsx)(`div`,{"aria-hidden":!0,className:Y(`w-full shrink-0 cursor-not-allowed px-4 pb-6`,a&&`hidden`),children:(0,B.jsx)(`div`,{className:`mx-auto w-full max-w-[768px]`,children:(0,B.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,B.jsx)(tce,{className:`size-5 shrink-0`}),(0,B.jsx)(`span`,{className:`flex-1 text-(--text-tertiary)`,children:`Ask ChatGPT`}),(0,B.jsx)(nce,{className:`size-6 shrink-0`}),(0,B.jsx)(`div`,{className:`flex size-9.5 shrink-0 items-center justify-center rounded-full bg-(--text-primary) text-(--main-surface-primary)`,children:(0,B.jsx)(rce,{className:`size-5.5`})})]})})})]})]})}function dce(e){return(0,B.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,B.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 QL(e){return(0,B.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,B.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 fce(e){return(0,B.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,B.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 $L(e){return(0,B.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,B.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 eR(e){return(0,B.jsxs)(`svg`,{viewBox:`0 0 21.2 21.2`,fill:`none`,"aria-hidden":`true`,...e,children:[(0,B.jsx)(`rect`,{x:`0`,y:`7.6`,height:`6`,width:`1.2`,rx:`0.6`,fill:`currentColor`}),(0,B.jsx)(`rect`,{x:`4`,y:`5.6`,height:`10`,width:`1.2`,rx:`0.6`,fill:`currentColor`}),(0,B.jsx)(`rect`,{x:`8`,y:`2.6`,height:`16`,width:`1.2`,rx:`0.6`,fill:`currentColor`}),(0,B.jsx)(`rect`,{x:`12`,y:`5.6`,height:`10`,width:`1.2`,rx:`0.6`,fill:`currentColor`}),(0,B.jsx)(`rect`,{x:`16`,y:`2.6`,height:`16`,width:`1.2`,rx:`0.6`,fill:`currentColor`}),(0,B.jsx)(`rect`,{x:`20`,y:`7.6`,height:`6`,width:`1.2`,rx:`0.6`,fill:`currentColor`})]})}function pce(e){return(0,B.jsx)(`svg`,{viewBox:`30 0 82 24`,height:`20`,fill:`currentColor`,"aria-hidden":`true`,shapeRendering:`geometricPrecision`,...e,children:(0,B.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 mce(e){return(0,B.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,B.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 hce(e){return(0,B.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,B.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 gce(e){return(0,B.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,B.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 _ce(e){return(0,B.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,B.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 tR(e){return(0,B.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,B.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 nR(e){return(0,B.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,B.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 vce(e){return(0,B.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,B.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 yce(e){return(0,B.jsxs)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,...e,children:[(0,B.jsx)(`circle`,{cx:`8`,cy:`8`,r:`5.5`}),(0,B.jsx)(`line`,{x1:`8`,y1:`8`,x2:`10`,y2:`9`}),(0,B.jsx)(`line`,{x1:`8`,y1:`8`,x2:`8`,y2:`5.5`})]})}function bce(e){return(0,B.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,B.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 rR(e){return(0,B.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,B.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 xce=`"Anthropic Sans", ui-sans-serif, system-ui, sans-serif`,Sce={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 iR({className:e}){return(0,B.jsx)(`div`,{className:Y(`rounded-md bg-[color-mix(in_oklab,var(--shell-text)_10%,transparent)] motion-safe:animate-pulse`,e)})}var Cce=[`w-[80%]`,`w-[65%]`,`w-[74%]`,`w-[58%]`,`w-[70%]`,`w-[62%]`];function wce({children:e}){let t=us(e=>e.theme),n=us(e=>e.displayMode),r=us(e=>e.setPreference),i=n===`fullscreen`,[a,o]=(0,b.useState)(!1),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,B.jsxs)(`div`,{className:`@container/shell relative isolate flex h-full w-full overflow-hidden bg-(--shell-surface) text-(--shell-text)`,style:{fontFamily:xce,...Sce[t]},children:[(0,B.jsx)(`style`,{children:RL}),(0,B.jsx)(`aside`,{"aria-hidden":!0,className:Y(`h-full w-[288px] shrink-0 cursor-not-allowed border-(--shell-border) border-r bg-(--shell-sidebar) @max-[640px]/shell:hidden`,a&&`hidden`),children:(0,B.jsxs)(`div`,{className:`flex h-full flex-col px-2 pb-2`,children:[(0,B.jsxs)(`div`,{className:`flex h-11 shrink-0 items-center justify-between px-2`,children:[(0,B.jsx)(pce,{className:`h-5`}),(0,B.jsxs)(`div`,{className:`flex items-center gap-1 text-[#7b7974]`,children:[(0,B.jsx)(`button`,{type:`button`,"aria-label":`Collapse sidebar`,onClick:()=>o(!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,B.jsx)(rR,{className:`size-4`})}),(0,B.jsx)(`div`,{className:`flex size-7 items-center justify-center`,children:(0,B.jsx)(bce,{className:`size-4`})})]})]}),(0,B.jsxs)(`div`,{className:`mb-2 flex h-8 shrink-0 rounded-lg bg-(--shell-segment-bg) p-px`,children:[(0,B.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,B.jsx)(_ce,{className:`size-4`}),(0,B.jsx)(`span`,{children:`Home`})]}),(0,B.jsxs)(`div`,{className:`flex flex-1 items-center justify-center gap-1.5 text-(--shell-text-tertiary) text-sm`,children:[(0,B.jsx)(mce,{className:`size-4`}),(0,B.jsx)(`span`,{children:`Code`})]})]}),(0,B.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,B.jsx)(nR,{className:`size-4`}),(0,B.jsx)(`span`,{children:`New`})]}),[{icon:fce,label:`Chats and tasks`},{icon:vce,label:`Projects`},{icon:dce,label:`Artifacts`},{icon:yce,label:`Scheduled`},{icon:hce,label:`Customize`}].map(({icon:e,label:t})=>(0,B.jsxs)(`div`,{className:`flex h-8 shrink-0 items-center gap-2 px-1.5 text-(--shell-nav-text) text-sm`,children:[(0,B.jsx)(e,{className:`size-5`}),(0,B.jsx)(`span`,{children:t})]},t)),(0,B.jsx)(`div`,{className:`mt-5 mb-1 px-1.5 text-(--shell-text-tertiary) text-xs`,children:`Pinned`}),(0,B.jsxs)(`div`,{className:`flex h-8 shrink-0 items-center gap-2 px-1.5`,children:[(0,B.jsx)(QL,{className:`size-5 shrink-0 text-(--shell-icon-muted)`}),(0,B.jsx)(iR,{className:`h-3.5 w-32`})]}),(0,B.jsxs)(`div`,{className:`mt-5 mb-1 flex items-center justify-between px-1.5`,children:[(0,B.jsx)(`span`,{className:`text-(--shell-text-tertiary) text-xs`,children:`Recents`}),(0,B.jsx)(Si,{className:`size-3.5 text-(--shell-text-tertiary)`})]}),Cce.map(e=>(0,B.jsxs)(`div`,{className:`flex h-8 shrink-0 items-center gap-2 px-1.5`,children:[(0,B.jsx)(QL,{className:`size-5 shrink-0 text-(--shell-icon-muted)`}),(0,B.jsx)(iR,{className:Y(`h-3.5`,e)})]},e)),(0,B.jsxs)(`div`,{className:`mt-auto flex shrink-0 flex-col`,children:[(0,B.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,B.jsx)(gce,{className:`size-5`}),(0,B.jsx)(`span`,{children:`Design`})]}),(0,B.jsxs)(`div`,{className:`flex h-11 items-center gap-2.5 border-(--shell-border) border-t px-1.5`,children:[(0,B.jsx)(iR,{className:`size-7 rounded-full`}),(0,B.jsx)(iR,{className:`h-3.5 w-24`})]})]})]})}),(0,B.jsxs)(`div`,{className:`relative flex h-full min-w-0 flex-1 flex-col`,children:[a&&(0,B.jsx)(`button`,{type:`button`,"aria-label":`Expand sidebar`,onClick:()=>o(!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,B.jsx)(rR,{className:`size-4`})}),(0,B.jsx)(`div`,{ref:s,className:`min-h-0 flex-1 overflow-y-auto [container-type:size]`,children:(0,B.jsxs)(`div`,{ref:c,className:Y(`mx-auto flex w-full max-w-[720px] flex-col px-4 pt-6 pb-24`,i&&`h-full max-w-none px-5 pt-2 pb-4`,i&&a&&`pl-12`),children:[[[`w-[92%]`,`w-[80%]`,`w-[55%]`],[`w-[88%]`,`w-[76%]`,`w-[50%]`]].map((e,t)=>(0,B.jsxs)(`div`,{className:Y(`flex flex-col`,i&&`hidden`,t>0&&`mt-10`),children:[(0,B.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,B.jsx)(`div`,{className:`mt-6 flex flex-col gap-3`,children:e.map(e=>(0,B.jsx)(iR,{className:Y(`h-4`,e)},e))})]},e[0])),(0,B.jsx)(`div`,{className:Y(`mt-10 h-12 w-[45%] self-end rounded-xl bg-[color-mix(in_oklab,var(--shell-text)_5%,transparent)] motion-safe:animate-pulse`,i&&`hidden`)}),(0,B.jsx)(iR,{className:Y(`mt-6 h-4 w-40`,i&&`hidden`)}),(0,B.jsxs)(`div`,{className:Y(`relative mt-3 w-full`,!i&&`-mx-4 w-[calc(100%+2rem)]`,i&&`mt-0 flex min-h-0 flex-1 flex-col overflow-hidden rounded-2xl border border-(--shell-border) bg-(--shell-panel)`),children:[i?(0,B.jsxs)(`div`,{className:`flex h-14 shrink-0 items-center gap-2.5 border-(--shell-border) border-b px-4`,children:[(0,B.jsx)(`div`,{className:`flex size-7 items-center justify-center rounded-lg border border-(--shell-border) bg-(--shell-segment-active)`,children:(0,B.jsx)(iR,{className:`size-3.5 rounded`})}),(0,B.jsx)(iR,{className:`h-4 w-44`}),(0,B.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,B.jsx)(YL,{className:`size-4.5`})})]}):null,(0,B.jsx)(`div`,{className:Y(`w-full`,i&&`min-h-0 flex-1`),children:e??(0,B.jsx)(iR,{className:`h-96 w-full rounded-2xl`})}),i?(0,B.jsx)(`div`,{className:`pointer-events-none absolute inset-x-0 bottom-4 mx-auto w-[min(680px,85%)]`,children:(0,B.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,B.jsx)(`span`,{className:`text-(--shell-text-tertiary)`,children:`Write a message...`}),(0,B.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,B.jsx)(nR,{className:`size-5 text-(--shell-text-secondary)`}),(0,B.jsxs)(`div`,{className:`flex items-center gap-4 text-(--shell-text-secondary)`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,B.jsx)(iR,{className:`h-3.5 w-14`}),(0,B.jsx)(iR,{className:`h-3.5 w-9`}),(0,B.jsx)($L,{className:`size-3`})]}),(0,B.jsx)(tR,{className:`size-5`}),(0,B.jsx)(eR,{className:`size-5`})]})]})]})}):null]}),(0,B.jsxs)(`div`,{className:Y(`mt-6 flex flex-col gap-3`,i&&`hidden`),children:[(0,B.jsx)(iR,{className:`h-4 w-[95%]`}),(0,B.jsx)(iR,{className:`h-4 w-[60%]`})]})]})}),(0,B.jsx)(`div`,{className:Y(`w-full shrink-0 cursor-not-allowed px-4 pb-5`,i&&`hidden`),children:(0,B.jsx)(`div`,{className:`mx-auto w-full max-w-[768px]`,children:(0,B.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,B.jsx)(`span`,{className:`text-(--shell-text-tertiary)`,children:`Reply to Claude...`}),(0,B.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,B.jsx)(nR,{className:`size-5 text-(--shell-text-secondary)`}),(0,B.jsxs)(`div`,{className:`flex items-center gap-4 text-(--shell-text-secondary)`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,B.jsx)(iR,{className:`h-3.5 w-14`}),(0,B.jsx)(iR,{className:`h-3.5 w-9`}),(0,B.jsx)($L,{className:`size-3`})]}),(0,B.jsx)(tR,{className:`size-5`}),(0,B.jsx)(eR,{className:`size-5`})]})]})]})})})]})]})}var Tce=()=>{let e=NT(),t=xw(e?.name??``),n=us(e=>e.previewClient),r=e?._meta?.ui?.resourceUri,i=!!(e&&t?.response&&r);return(0,B.jsxs)(`div`,{className:`flex h-full min-h-0 w-full flex-col`,children:[(0,B.jsxs)(`div`,{className:`flex h-11 shrink-0 items-center gap-3 bg-primary px-3 text-primary-foreground`,children:[(0,B.jsx)(`span`,{className:`font-medium text-xs`,children:`Preview mode`}),(0,B.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,B.jsx)(PL,{variant:`preview`})})]}),(0,B.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,B.jsx)(n===`claude`?wce:uce,{children:i?(0,B.jsx)(b.Suspense,{fallback:null,children:(0,B.jsx)(GL,{})}):null})})]})},Ece=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)}},aR=function(e){return typeof e==`function`},Dce=function(e){return typeof e==`string`},oR=function(e){return typeof e==`number`},Oce=function(e){return e===void 0},sR=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},kce=Ece(b.useEffect);function cR(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 lR(e){var t=(0,b.useRef)(e);return t.current=e,t}var Ace=function(e){var t=lR(e);(0,b.useEffect)(function(){return function(){t.current()}},[])},uR=!!(typeof window<`u`&&window.document&&window.document.createElement);function dR(e,t){if(uR)return e?aR(e)?e():`current`in e?e.current:e:t}var fR=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 dR(e)});if(!i.current){i.current=!0,a.current=c,o.current=n,s.current=t();return}(c.length!==a.current.length||!cR(a.current,c)||!cR(o.current,n))&&((e=s.current)==null||e.call(s),a.current=c,o.current=n,s.current=t())}),Ace(function(){var e;(e=s.current)==null||e.call(s),i.current=!1})}}(b.useEffect),jce=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}}}))()),Mce=function(e,t){return e===void 0&&(e=[]),t===void 0&&(t=[]),(0,jce.default)(e,t)};function pR(e,t,n){n===void 0&&(n={});var r=n.enable,i=r===void 0||r,a=lR(t);fR(function(){if(i){var t=dR(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 Nce=function(e,t,n){var r=(0,b.useRef)(void 0),i=(0,b.useRef)(0);Mce(t,r.current)||(i.current+=1),r.current=t,fR(e,[i.current],n)},mR={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},hR={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`?mR.meta.includes(e.keyCode):e.metaKey}};function gR(e){return Dce(e)||oR(e)}function Pce(e){var t=Object.keys(hR).reduce(function(t,n){return hR[n](e)?t+1:t},0);return[16,17,18,91,92].includes(e.keyCode)?t:t+1}function _R(e,t,n){var r,i;if(!e.key)return!1;if(oR(t))return e.keyCode===t&&t;var a=t.split(`.`),o=0;try{for(var s=aA(a),c=s.next();!c.done;c=s.next()){var l=c.value,u=hR[l],d=mR[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&&Pce(e)===a.length&&t:o===a.length&&t}function Fce(e,t){return aR(e)?e:gR(e)?function(n){return _R(n,e,t)}:Array.isArray(e)?function(n){return e.find(function(e){return _R(n,e,t)})}:function(){return!!e}}var Ice=[`keydown`];function vR(e,t,n){var r=n||{},i=r.events,a=i===void 0?Ice:i,o=r.target,s=r.exactMatch,c=s!==void 0&&s,l=r.useCapture,u=l!==void 0&&l,d=lR(t),f=lR(e);Nce(function(){var e,t,n,r=dR(o,window);if(r){var i=function(e){var t=e,n=Fce(f.current,c)(t),r=gR(n)?n:t.key;if(n)return d.current?.call(d,t,r)};try{for(var s=aA(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=aA(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 yR=`AHOOKS_SYNC_STORAGE_EVENT_NAME`,bR=function(e){return function(t,n){n===void 0&&(n={});var r,i=n.listenStorageChange,a=i!==void 0&&i,o=aR(n.serializer)?n.serializer:JSON.stringify,s=aR(n.deserializer)?n.deserializer:JSON.parse,c=aR(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 aR(n.defaultValue)?n.defaultValue():n.defaultValue},u=oA((0,b.useState)(l),2),d=u[0],f=u[1],p=(0,b.useRef)(d);p.current=d,kce(function(){var e=l();Object.is(e,p.current)||(p.current=e,f(e))},[t]);var m=function(e){var n=p.current,i=aR(e)?e(n):e;if(!Object.is(i,n)){a||(p.current=i,f(i));try{var s=void 0,l=r?.getItem(t);Oce(i)?(s=null,r?.removeItem(t)):(s=o(i),r?.setItem(t,s)),dispatchEvent(new CustomEvent(yR,{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 pR(`storage`,h,{enable:a}),pR(yR,function(e){h(e.detail)},{enable:a}),[d,sR(m)]}}(function(){return uR?localStorage:void 0}),Lce=function(e,t){var n=sR(e),r=(0,b.useRef)(null),i=(0,b.useCallback)(function(){r.current&&clearTimeout(r.current)},[]);return(0,b.useEffect)(function(){if(!(!oR(t)||t<0))return r.current=setTimeout(n,t),i},[t]),i},Rce=Mi(`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 xR({className:e,variant:t,size:n,children:r,...i}){return(0,B.jsx)(`span`,{className:Mr(Rce({variant:t,size:n}),e),...i,children:r})}var zce=new Intl.NumberFormat(`en`,{notation:`compact`,maximumFractionDigits:1}),SR=e=>`skybridge-devtools-dismissed-${e}-warning`,CR={"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 wR({kind:e}){return(0,B.jsx)(xR,{size:`sm`,variant:`warning`,children:CR[e].badge})}function TR({kind:e,tokenCount:t}){let n=CR[e],[r,i]=(0,b.useState)(()=>sessionStorage.getItem(SR(e))===`true`);return r?null:(0,B.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,B.jsx)(ZT,{className:`rounded-none border-x-0 border-t-0 py-2 pl-3 pr-10`,title:`${n.title} (~${zce.format(t)} tokens)`,description:n.description}),(0,B.jsx)(`button`,{type:`button`,"aria-label":`Dismiss ${n.badge.toLowerCase()} warning for this session`,onClick:()=>{sessionStorage.setItem(SR(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,B.jsx)(ki,{className:`size-3.5`})})]})}function Bce(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 Vce(e,t){if(e==null)return{};var n,r,i=Bce(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 ER(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 Hce(e){if(Array.isArray(e))return ER(e)}function Uce(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Wce(e,t){if(e){if(typeof e==`string`)return ER(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)?ER(e,t):void 0}}function Gce(){throw TypeError(`Invalid attempt to spread non-iterable instance.
209
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DR(e){return Hce(e)||Uce(e)||Wce(e)||Gce()}function OR(e){"@babel/helpers - typeof";return OR=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},OR(e)}function Kce(e,t){if(OR(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(OR(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function kR(e){var t=Kce(e,`string`);return OR(t)==`symbol`?t:t+``}function AR(e,t,n){return(t=kR(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jR(){return jR=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},jR.apply(null,arguments)}function MR(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 NR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?MR(Object(n),!0).forEach(function(t){AR(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MR(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function PR(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 FR={};function IR(e){if(e.length===0||e.length===1)return e;var t=e.join(`.`);return FR[t]||(FR[t]=PR(e)),FR[t]}function LR(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return IR(e.filter(function(e){return e!==`token`})).reduce(function(e,t){return NR(NR({},e),n[t])},t)}function RR(e){return e.join(` `)}function zR(e,t){var n=0;return function(r){return n+=1,r.map(function(r,i){return BR({node:r,stylesheet:e,useInlineStyles:t,key:`code-segment-${n}-${i}`})})}}function BR(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=zR(n,a),f;if(!a)f=NR(NR({},s),{},{className:RR(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=NR(NR({},s),{},{className:RR(h)||void 0,style:LR(s.className,Object.assign({},s.style,i),n)})}var g=d(t.children);return b.createElement(l,jR({key:o},f),g)}}var VR=(function(e,t){return e.listLanguages().indexOf(t)!==-1}),HR=[`language`,`children`,`style`,`customStyle`,`codeTagProps`,`useInlineStyles`,`showLineNumbers`,`showInlineLineNumbers`,`startingLineNumber`,`lineNumberContainerStyle`,`lineNumberStyle`,`wrapLines`,`wrapLongLines`,`lineProps`,`renderer`,`PreTag`,`CodeTag`,`code`,`astGenerator`];function UR(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 WR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?UR(Object(n),!0).forEach(function(t){AR(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UR(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var GR=/\n/g;function KR(e){return e.match(GR)}function qR(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}
210
+ `)})}function JR(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)},qR({lines:t.replace(/\n$/,``).split(`
211
+ `),style:o,startingLineNumber:s}))}function YR(e){return`${e.toString().length}.25em`}function XR(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 ZR(e,t,n){var r={display:`inline-block`,minWidth:YR(n),paddingRight:`1em`,textAlign:`right`,userSelect:`none`},i=typeof e==`function`?e(t):e;return WR(WR({},r),i)}function QR(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?WR({},typeof s==`function`?s(n):s):{};if(p.className=p.className?[].concat(DR(p.className.trim().split(/\s+/)),DR(l)):l,n&&a){var m=ZR(r,n,i);t.unshift(XR(n,m))}return d&u&&(p.style=WR({display:`flex`},p.style)),{type:`element`,tagName:`span`,properties:p,children:t}}function $R(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(QR({children:[i],className:DR(new Set(t))}));else if(i.children){var a=t.concat(i.properties?.className||[]);$R(i.children,a).forEach(function(e){return n.push(e)})}}return n}function ez(e,t,n,r,i,a,o,s,c){var l,u=$R(e.value),d=[],f=-1,p=0;function m(e,a){return QR({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=ZR(s,t,o);e.unshift(XR(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(KR(t)){var n=t.split(`
212
+ `);n.forEach(function(t,i){var o=r&&d.length+a,s={type:`text`,value:`${t}
213
+ `};if(i===0){var c=g(u.slice(f+1,p).concat(QR({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=QR({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 tz(e){var t=e.rows,n=e.stylesheet,r=e.useInlineStyles;return t.map(function(e,t){return BR({node:e,stylesheet:n,useInlineStyles:r,key:`code-segment-${t}`})})}function nz(e){return e&&e.highlightAuto!==void 0}function rz(e){var t=e.astGenerator,n=e.language,r=e.code,i=e.defaultCodeValue;if(nz(t)){var a=VR(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 iz(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:WR(WR({},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=Vce(n,HR);F||=e;var L=m?b.createElement(JR,{containerStyle:y,codeStyle:u.style||{},numberStyle:S,startingLineNumber:v,codeString:P}):null,ee=o.hljs||o[`pre[class*="language-"]`]||{backgroundColor:`#fff`},te=nz(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=WR({whiteSpace:`pre-wrap`},u.style):u.style=WR({whiteSpace:`pre`},u.style),!F)return b.createElement(A,ne,L,b.createElement(M,u,P));(C===void 0&&O||T)&&(C=!0),O||=tz;var re=[{type:`text`,value:P}],R=rz({astGenerator:F,language:r,code:P,defaultCodeValue:re});R.language===null&&(R.value=re);var z=v+(P.match(/\n/g)?.length??0),ie=ez(R,C,D,m,g,v,z,S,T);return b.createElement(A,ne,b.createElement(M,u,!g&&L,O({rows:ie,stylesheet:o,useInlineStyles:f})))}}var az=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};az.prototype.normal={},az.prototype.property={},az.prototype.space=void 0;function oz(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new az(n,r,t)}function sz(e){return e.toLowerCase()}var cz=class{constructor(e,t){this.attribute=t,this.property=e}};cz.prototype.attribute=``,cz.prototype.booleanish=!1,cz.prototype.boolean=!1,cz.prototype.commaOrSpaceSeparated=!1,cz.prototype.commaSeparated=!1,cz.prototype.defined=!1,cz.prototype.mustUseProperty=!1,cz.prototype.number=!1,cz.prototype.overloadedBoolean=!1,cz.prototype.property=``,cz.prototype.spaceSeparated=!1,cz.prototype.space=void 0;var lz=c({boolean:()=>dz,booleanish:()=>fz,commaOrSpaceSeparated:()=>gz,commaSeparated:()=>hz,number:()=>X,overloadedBoolean:()=>pz,spaceSeparated:()=>mz}),uz=0,dz=_z(),fz=_z(),pz=_z(),X=_z(),mz=_z(),hz=_z(),gz=_z();function _z(){return 2**++uz}var vz=Object.keys(lz),yz=class extends cz{constructor(e,t,n,r){let i=-1;if(super(e,t),bz(this,`space`,r),typeof n==`number`)for(;++i<vz.length;){let e=vz[i];bz(this,vz[i],(n&lz[e])===lz[e])}}};yz.prototype.defined=!0;function bz(e,t,n){n&&(e[t]=n)}function xz(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new yz(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[sz(r)]=r,n[sz(a.attribute)]=r}return new az(t,n,e.space)}var Sz=xz({properties:{ariaActiveDescendant:null,ariaAtomic:fz,ariaAutoComplete:null,ariaBusy:fz,ariaChecked:fz,ariaColCount:X,ariaColIndex:X,ariaColSpan:X,ariaControls:mz,ariaCurrent:null,ariaDescribedBy:mz,ariaDetails:null,ariaDisabled:fz,ariaDropEffect:mz,ariaErrorMessage:null,ariaExpanded:fz,ariaFlowTo:mz,ariaGrabbed:fz,ariaHasPopup:null,ariaHidden:fz,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:mz,ariaLevel:X,ariaLive:null,ariaModal:fz,ariaMultiLine:fz,ariaMultiSelectable:fz,ariaOrientation:null,ariaOwns:mz,ariaPlaceholder:null,ariaPosInSet:X,ariaPressed:fz,ariaReadOnly:fz,ariaRelevant:null,ariaRequired:fz,ariaRoleDescription:mz,ariaRowCount:X,ariaRowIndex:X,ariaRowSpan:X,ariaSelected:fz,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 Cz(e,t){return t in e?e[t]:t}function wz(e,t){return Cz(e,t.toLowerCase())}var Tz=xz({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:hz,acceptCharset:mz,accessKey:mz,action:null,allow:null,allowFullScreen:dz,allowPaymentRequest:dz,allowUserMedia:dz,alt:null,as:null,async:dz,autoCapitalize:null,autoComplete:mz,autoFocus:dz,autoPlay:dz,blocking:mz,capture:null,charSet:null,checked:dz,cite:null,className:mz,cols:X,colSpan:null,content:null,contentEditable:fz,controls:dz,controlsList:mz,coords:X|hz,crossOrigin:null,data:null,dateTime:null,decoding:null,default:dz,defer:dz,dir:null,dirName:null,disabled:dz,download:pz,draggable:fz,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:dz,formTarget:null,headers:mz,height:X,hidden:pz,high:X,href:null,hrefLang:null,htmlFor:mz,httpEquiv:mz,id:null,imageSizes:null,imageSrcSet:null,inert:dz,inputMode:null,integrity:null,is:null,isMap:dz,itemId:null,itemProp:mz,itemRef:mz,itemScope:dz,itemType:mz,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:dz,low:X,manifest:null,max:null,maxLength:X,media:null,method:null,min:null,minLength:X,multiple:dz,muted:dz,name:null,nonce:null,noModule:dz,noValidate:dz,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:dz,optimum:X,pattern:null,ping:mz,placeholder:null,playsInline:dz,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:dz,referrerPolicy:null,rel:mz,required:dz,reversed:dz,rows:X,rowSpan:X,sandbox:mz,scope:null,scoped:dz,seamless:dz,selected:dz,shadowRootClonable:dz,shadowRootDelegatesFocus:dz,shadowRootMode:null,shape:null,size:X,sizes:null,slot:null,span:X,spellCheck:fz,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:dz,useMap:null,value:fz,width:X,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:mz,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:dz,declare:dz,event:null,face:null,frame:null,frameBorder:null,hSpace:X,leftMargin:X,link:null,longDesc:null,lowSrc:null,marginHeight:X,marginWidth:X,noResize:dz,noHref:dz,noShade:dz,noWrap:dz,object:null,profile:null,prompt:null,rev:null,rightMargin:X,rules:null,scheme:null,scrolling:fz,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:dz,disableRemotePlayback:dz,prefix:null,property:null,results:X,security:null,unselectable:null},space:`html`,transform:wz}),Ez=xz({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:gz,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:mz,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:dz,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:hz,g2:hz,glyphName:hz,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:gz,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:mz,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:X,pointsAtY:X,pointsAtZ:X,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:gz,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:gz,rev:gz,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:gz,requiredFeatures:gz,requiredFonts:gz,requiredFormats:gz,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:gz,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:gz,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:gz,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:Cz}),Dz=xz({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()}}),Oz=xz({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:wz}),kz=xz({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Az=/[A-Z]/g,jz=/-[a-z]/g,Mz=/^data[-\w.:]+$/i;function Nz(e,t){let n=sz(t),r=t,i=cz;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Mz.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(jz,Fz);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!jz.test(e)){let n=e.replace(Az,Pz);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=yz}return new i(r,t)}function Pz(e){return`-`+e.toLowerCase()}function Fz(e){return e.charAt(1).toUpperCase()}var Iz=oz([Sz,Tz,Dz,Oz,kz],`html`),Lz=oz([Sz,Ez,Dz,Oz,kz],`svg`);function Rz(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 zz=/[#.]/g;function Bz(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){zz.lastIndex=i;let e=zz.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 Vz(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Hz(e,t,n){let r=n?Jz(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=Bz(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,Uz(i))a.unshift(i);else for(let[t,n]of Object.entries(i))Wz(e,o.properties,t,n)}for(let e of a)Gz(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function Uz(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 Wz(e,t,n,r){let i=Nz(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?Vz(r):i.commaSeparated?Rz(r):i.commaOrSpaceSeparated?Vz(Rz(r).join(` `)):Kz(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?qz(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(Kz(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Gz(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)Gz(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?Gz(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}function Kz(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||sz(n)===sz(t)))return!0}return n}function qz(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function Jz(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var Yz=`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(`.`),Xz=Hz(Iz,`div`);Hz(Lz,`g`,Yz);var Zz=`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(`.`),Qz={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 $z(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=48&&t<=57}function eB(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function tB(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function nB(e){return tB(e)||$z(e)}var rB=document.createElement(`i`);function iB(e){let t=`&`+e+`;`;rB.innerHTML=t;let n=rB.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}var aB=[``,`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 oB(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`?nB:u===`decimal`?$z:eB;for(l--;++l<=e.length;){let t=e.charCodeAt(l);if(!b(t))break;y+=String.fromCharCode(t),u===`named`&&Zz.includes(y)&&(_=y,v=iB(y))}let x=e.charCodeAt(l)===59;if(x){l++;let e=u===`named`&&iB(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=``):nB(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(sB(e))h(7,S),C=`�`;else if(e in Qz)h(6,S),C=Qz[e];else{let t=``;cB(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,aB[e],r,e))}function g(){s&&=(i.push(s),n.text&&n.text.call(n.textContext||void 0,s,{start:f,end:m()}),``)}}function sB(e){return e>=55296&&e<=57343||e>1114111}function cB(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 lB=0,uB={},dB={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++lB}),e.__id},clone:function e(t,n){n||={};var r,i;switch(dB.util.type(t)){case`Object`:if(i=dB.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=dB.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:uB,plaintext:uB,text:uB,txt:uB,extend:function(e,t){var n=dB.util.clone(dB.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){r||=dB.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,dB.languages.DFS(dB.languages,function(t,n){n===c&&t!=e&&(this[t]=a)}),a},DFS:function e(t,n,r,i){i||={};var a=dB.util.objId;for(var o in t)if(t.hasOwnProperty(o)){n.call(t,o,t[o],r||o);var s=t[o],c=dB.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(dB.hooks.run(`before-tokenize`,r),!r.grammar)throw Error(`The language "`+r.language+`" has no grammar.`);return r.tokens=dB.tokenize(r.code,r.grammar),dB.hooks.run(`after-tokenize`,r),fB.stringify(dB.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 hB;return gB(i,i.head,e),mB(e,i,t,i.head,0),vB(i)},hooks:{all:{},add:function(e,t){var n=dB.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=dB.hooks.all[e];if(!(!n||!n.length))for(var r=0,i;i=n[r++];)i(t)}},Token:fB};function fB(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=(r||``).length|0}function pB(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 mB(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 fB)){var y=1,b;if(f){if(b=pB(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 fB)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=pB(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=gB(t,k,E),_+=E.length),_B(t,k,y);var A=new fB(o,u?dB.tokenize(T,u):T,p,T);if(g=gB(t,k,A),D&&gB(t,g,D),y>1){var j={cause:o+`,`+c,reach:O};mB(e,t,n,g.prev,_,j),a&&j.reach>a.reach&&(a.reach=j.reach)}}}}}}function hB(){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 gB(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 _B(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 vB(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}var yB=dB;function bB(){}bB.prototype=yB;var xB=new bB;xB.highlight=SB,xB.register=CB,xB.alias=wB,xB.registered=TB,xB.listLanguages=EB,xB.util.encode=OB,xB.Token.stringify=DB;function SB(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(xB.languages,r))n=xB.languages[r];else throw Error("Unknown language: `"+r+"` is not registered")}return{type:`root`,children:yB.highlight.call(xB,e,n,r)}}function CB(e){if(typeof e!=`function`||!e.displayName)throw Error("Expected `function` for `syntax`, got `"+e+"`");Object.hasOwn(xB.languages,e.displayName)||e(xB)}function wB(e,t){let n=xB.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 TB(e){if(typeof e!=`string`)throw TypeError("Expected `string` for `aliasOrLanguage`, got `"+e+"`");return Object.hasOwn(xB.languages,e)}function EB(){let e=xB.languages,t=[],n;for(n in e)Object.hasOwn(e,n)&&typeof e[n]==`object`&&t.push(n);return t}function DB(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(DB(e[r],t));return n}let n={attributes:{},classes:[`token`,e.type],content:DB(e.content,t),language:t,tag:`span`,type:e.type};return e.alias&&n.classes.push(...typeof e.alias==`string`?[e.alias]:e.alias),xB.hooks.run(`wrap`,n),Xz(n.tag+`.`+n.classes.join(`.`),kB(n.attributes),n.content)}function OB(e){return e}function kB(e){let t;for(t in e)Object.hasOwn(e,t)&&(e[t]=oB(e[t]));return e}var AB=iz(xB,{});AB.registerLanguage=function(e,t){return xB.register(t)},AB.alias=function(e,t){return xB.alias(e,t)},jB.displayName=`json`,jB.aliases=[`webmanifest`];function jB(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 MB=jB,NB={'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%)`}},PB=`#121212`,FB=`#3d6b69`,IB=`#c55a44`,LB=`#707070`,RB=`transparent`,zB=`"JetBrains Mono Variable", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,BB={...NB,'code[class*="language-"]':{...NB[`code[class*="language-"]`],background:RB,color:PB,fontFamily:zB},'pre[class*="language-"]':{...NB[`pre[class*="language-"]`],background:RB,color:PB,fontFamily:zB,padding:0,margin:0,overflow:`visible`},property:{color:PB},string:{color:FB},number:{color:IB},boolean:{color:IB},punctuation:{color:LB},operator:{color:LB},".language-json .token.operator":{color:LB},".language-json .token.null.keyword":{color:LB}};AB.registerLanguage(`json`,MB);function VB({code:e}){return(0,B.jsx)(AB,{language:`json`,style:BB,customStyle:{margin:0,padding:0,background:`transparent`,fontSize:`0.75rem`},codeTagProps:{className:`font-mono whitespace-pre`},showLineNumbers:!1,wrapLongLines:!0,children:e})}var HB=(0,b.createContext)({});function UB(e){let t=(0,b.useRef)(null);return t.current===null&&(t.current=e()),t.current}var WB=typeof window<`u`?b.useLayoutEffect:b.useEffect,GB=(0,b.createContext)(null);function KB(e,t){e.indexOf(t)===-1&&e.push(t)}function qB(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var JB=(e,t,n)=>n>t?t:n<e?e:n,YB={},XB=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),ZB=e=>typeof e==`object`&&!!e,QB=e=>/^0[^.\s]+$/u.test(e);function $B(e){let t;return()=>(t===void 0&&(t=e()),t)}var eV=e=>e,tV=(...e)=>e.reduce((e,t)=>n=>t(e(n))),nV=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},rV=class{constructor(){this.subscriptions=[]}add(e){return KB(this.subscriptions,e),()=>qB(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}},iV=e=>e*1e3,aV=e=>e/1e3,oV=(e,t)=>t?1e3/t*e:0,sV=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,cV=1e-7,lV=12;function uV(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=sV(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>cV&&++s<lV);return o}function dV(e,t,n,r){if(e===t&&n===r)return eV;let i=t=>uV(t,0,1,e,n);return e=>e===0||e===1?e:sV(i(e),t,r)}var fV=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,pV=e=>t=>1-e(1-t),mV=dV(.33,1.53,.69,.99),hV=pV(mV),gV=fV(hV),_V=e=>e>=1?1:(e*=2)<1?.5*hV(e):.5*(2-2**(-10*(e-1))),vV=e=>1-Math.sin(Math.acos(e)),yV=pV(vV),bV=fV(vV),xV=dV(.42,0,1,1),SV=dV(0,0,.58,1),CV=dV(.42,0,.58,1),wV=e=>Array.isArray(e)&&typeof e[0]!=`number`,TV=e=>Array.isArray(e)&&typeof e[0]==`number`,EV={linear:eV,easeIn:xV,easeInOut:CV,easeOut:SV,circIn:vV,circInOut:bV,circOut:yV,backIn:hV,backInOut:gV,backOut:mV,anticipate:_V},DV=e=>typeof e==`string`,OV=e=>{if(TV(e)){e.length;let[t,n,r,i]=e;return dV(t,n,r,i)}else if(DV(e))return EV[e],`${e}`,EV[e];return e},kV=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function AV(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 jV=40;function MV(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=kV.reduce((e,t)=>(e[t]=AV(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=YB.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,jV),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:kV.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<kV.length;t++)o[kV[t]].cancel(e)},state:i,steps:o}}var{schedule:NV,cancel:PV,state:FV,steps:IV}=MV(typeof requestAnimationFrame<`u`?requestAnimationFrame:eV,!0),LV;function RV(){LV=void 0}var zV={now:()=>(LV===void 0&&zV.set(FV.isProcessing||YB.useManualTiming?FV.timestamp:performance.now()),LV),set:e=>{LV=e,queueMicrotask(RV)}},BV=e=>t=>typeof t==`string`&&t.startsWith(e),VV=BV(`--`),HV=BV(`var(--`),UV=e=>HV(e)?WV.test(e.split(`/*`)[0].trim()):!1,WV=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function GV(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var KV={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},qV={...KV,transform:e=>JB(0,1,e)},JV={...KV,default:1},YV=e=>Math.round(e*1e5)/1e5,XV=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ZV(e){return e==null}var QV=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,$V=(e,t)=>n=>!!(typeof n==`string`&&QV.test(n)&&n.startsWith(e)||t&&!ZV(n)&&Object.prototype.hasOwnProperty.call(n,t)),eH=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(XV);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},tH=e=>JB(0,255,e),nH={...KV,transform:e=>Math.round(tH(e))},rH={test:$V(`rgb`,`red`),parse:eH(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+nH.transform(e)+`, `+nH.transform(t)+`, `+nH.transform(n)+`, `+YV(qV.transform(r))+`)`};function iH(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 aH={test:$V(`#`),parse:iH,transform:rH.transform},oH=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),sH=oH(`deg`),cH=oH(`%`),lH=oH(`px`),uH=oH(`vh`),dH=oH(`vw`),fH={...cH,parse:e=>cH.parse(e)/100,transform:e=>cH.transform(e*100)},pH={test:$V(`hsl`,`hue`),parse:eH(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+cH.transform(YV(t))+`, `+cH.transform(YV(n))+`, `+YV(qV.transform(r))+`)`},mH={test:e=>rH.test(e)||aH.test(e)||pH.test(e),parse:e=>rH.test(e)?rH.parse(e):pH.test(e)?pH.parse(e):aH.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?rH.transform(e):pH.transform(e),getAnimatableNone:e=>{let t=mH.parse(e);return t.alpha=0,mH.transform(t)}},hH=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function gH(e){return isNaN(e)&&typeof e==`string`&&(e.match(XV)?.length||0)+(e.match(hH)?.length||0)>0}var _H=`number`,vH=`color`,yH=`var`,bH=`var(`,xH="${}",SH=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function CH(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(SH,e=>(mH.test(e)?(r.color.push(a),i.push(vH),n.push(mH.parse(e))):e.startsWith(bH)?(r.var.push(a),i.push(yH),n.push(e)):(r.number.push(a),i.push(_H),n.push(parseFloat(e))),++a,xH)).split(xH),indexes:r,types:i}}function wH(e){return CH(e).values}function TH({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===_H?i+=YV(r[a]):e===vH?i+=mH.transform(r[a]):i+=r[a]}return i}}function EH(e){return TH(CH(e))}var DH=e=>typeof e==`number`?0:mH.test(e)?mH.getAnimatableNone(e):e,OH=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:DH(e);function kH(e){let t=CH(e);return TH(t)(t.values.map((e,n)=>OH(e,t.split[n])))}var AH={test:gH,parse:wH,createTransformer:EH,getAnimatableNone:kH};function jH(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 MH({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=jH(s,r,e+1/3),a=jH(s,r,e),o=jH(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function NH(e,t){return n=>n>0?t:e}var PH=(e,t,n)=>e+(t-e)*n,FH=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},IH=[aH,rH,pH],LH=e=>IH.find(t=>t.test(e));function RH(e){let t=LH(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===pH&&(n=MH(n)),n}var zH=(e,t)=>{let n=RH(e),r=RH(t);if(!n||!r)return NH(e,t);let i={...n};return e=>(i.red=FH(n.red,r.red,e),i.green=FH(n.green,r.green,e),i.blue=FH(n.blue,r.blue,e),i.alpha=PH(n.alpha,r.alpha,e),rH.transform(i))},BH=new Set([`none`,`hidden`]);function VH(e,t){return BH.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function HH(e,t){return n=>PH(e,t,n)}function UH(e){return typeof e==`number`?HH:typeof e==`string`?UV(e)?NH:mH.test(e)?zH:qH:Array.isArray(e)?WH:typeof e==`object`?mH.test(e)?zH:GH:NH}function WH(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>UH(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function GH(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=UH(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function KH(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 qH=(e,t)=>{let n=AH.createTransformer(t),r=CH(e),i=CH(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?BH.has(e)&&!i.values.length||BH.has(t)&&!r.values.length?VH(e,t):tV(WH(KH(r,i),i.values),n):(`${e}${t}`,NH(e,t))};function JH(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?PH(e,t,n):UH(e)(e,t)}var YH=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>NV.update(t,e),stop:()=>PV(t),now:()=>FV.isProcessing?FV.timestamp:zV.now()}},XH=(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)})`},ZH=2e4;function QH(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 $H(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(QH(r),ZH);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:aV(i)}}var eU={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 tU(e,t){return e*Math.sqrt(1-t*t)}var nU=12;function rU(e,t,n){let r=n;for(let n=1;n<nU;n++)r-=e(r)/t(r);return r}var iU=.001;function aU({duration:e=eU.duration,bounce:t=eU.bounce,velocity:n=eU.velocity,mass:r=eU.mass}){let i,a;eU.maxDuration;let o=1-t;o=JB(eU.minDamping,eU.maxDamping,o),e=JB(eU.minDuration,eU.maxDuration,aV(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=tU(t,o),c=Math.exp(-i);return iU-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=tU(t**2,o);return(-i(t)+iU>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=rU(i,a,s);if(e=iV(e),isNaN(c))return{stiffness:eU.stiffness,damping:eU.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var oU=[`duration`,`bounce`],sU=[`stiffness`,`damping`,`mass`];function cU(e,t){return t.some(t=>e[t]!==void 0)}function lU(e){let t={velocity:eU.velocity,stiffness:eU.stiffness,damping:eU.damping,mass:eU.mass,isResolvedFromDuration:!1,...e};if(!cU(e,sU)&&cU(e,oU))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*JB(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:eU.mass,stiffness:i,damping:a}}else{let n=aU({...e,velocity:0});t={...t,...n,mass:eU.mass},t.isResolvedFromDuration=!0}return t}function uU(e=eU.visualDuration,t=eU.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}=lU({...n,velocity:-aV(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=aV(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?eU.restSpeed.granular:eU.restSpeed.default,i||=v?eU.restDelta.granular:eU.restDelta.default;let y,b,x,S,C,w;if(h<1)x=tU(_,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=>iV(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=iV(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=iV(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(QH(T),ZH),t=XH(t=>T.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return T}uU.applyToOptions=e=>{let t=$H(e,100,uU);return e.ease=t.ease,e.duration=iV(t.duration),e.type=`keyframes`,e};var dU=5;function fU(e,t,n){let r=Math.max(t-dU,0);return oV(n-e(r),t-r)}function pU({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=uU({keyframes:[f.value,m(f.value)],velocity:fU(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 mU(e,t,n){let r=[],i=n||YB.mix||JH,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=tV(Array.isArray(t)?t[n]||eV:t,a)),r.push(a)}return r}function hU(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=mU(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=nV(e[r],e[r+1],n);return s[r](i)};return n?t=>l(JB(e[0],e[a-1],t)):l}function gU(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=nV(0,t,r);e.push(PH(n,1,i))}}function _U(e){let t=[0];return gU(t,e.length-1),t}function vU(e,t){return e.map(e=>e*t)}function yU(e,t){return e.map(()=>t||CV).splice(0,e.length-1)}function bU({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=wV(r)?r.map(OV):OV(r),a={done:!1,value:t[0]},o=hU(vU(n&&n.length===t.length?n:_U(t),e),t,{ease:Array.isArray(i)?i:yU(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var xU=e=>e!==null;function SU(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(xU),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var CU={decay:pU,inertia:pU,tween:bU,keyframes:bU,spring:uU};function wU(e){typeof e.type==`string`&&(e.type=CU[e.type])}var TU=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)}},EU=e=>e/100,DU=class extends TU{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!==zV.now()&&this.tick(zV.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;wU(e);let{type:t=bU,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||bU;s!==bU&&typeof o[0]!=`number`&&(this.mixKeyframes=tV(EU,JH(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=QH(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=JB(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!==pU&&(b.value=SU(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 aV(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+aV(e)}get time(){return aV(this.currentTime)}set time(e){e=iV(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 fU(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(zV.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=aV(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=YH,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(zV.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 OU(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var kU=e=>e*180/Math.PI,AU=e=>MU(kU(Math.atan2(e[1],e[0]))),jU={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:AU,rotateZ:AU,skewX:e=>kU(Math.atan(e[1])),skewY:e=>kU(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},MU=e=>(e%=360,e<0&&(e+=360),e),NU=AU,PU=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),FU=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),IU={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:PU,scaleY:FU,scale:e=>(PU(e)+FU(e))/2,rotateX:e=>MU(kU(Math.atan2(e[6],e[5]))),rotateY:e=>MU(kU(Math.atan2(-e[2],e[0]))),rotateZ:NU,rotate:NU,skewX:e=>kU(Math.atan(e[4])),skewY:e=>kU(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function LU(e){return+!!e.includes(`scale`)}function RU(e,t){if(!e||e===`none`)return LU(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=IU,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=jU,i=t}if(!i)return LU(t);let a=r[t],o=i[1].split(`,`).map(BU);return typeof a==`function`?a(o):o[a]}var zU=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return RU(n,t)};function BU(e){return parseFloat(e.trim())}var VU=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],HU=new Set([...VU,`pathRotation`]),UU=e=>e===KV||e===lH,WU=new Set([`x`,`y`,`z`]),GU=VU.filter(e=>!WU.has(e));function KU(e){let t=[];return GU.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var qU={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})=>RU(t,`x`),y:(e,{transform:t})=>RU(t,`y`)};qU.translateX=qU.x,qU.translateY=qU.y;var JU=new Set,YU=!1,XU=!1,ZU=!1;function QU(){if(XU){let e=Array.from(JU).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=KU(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)})}XU=!1,YU=!1,JU.forEach(e=>e.complete(ZU)),JU.clear()}function $U(){JU.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(XU=!0)})}function eW(){ZU=!0,$U(),QU(),ZU=!1}var tW=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?(JU.add(this),YU||(YU=!0,NV.read($U),NV.resolveKeyframes(QU))):(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])}OU(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),JU.delete(this)}cancel(){this.state===`scheduled`&&(JU.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},nW=e=>e.startsWith(`--`);function rW(e,t,n){nW(t)?e.style.setProperty(t,n):e.style[t]=n}var iW={};function aW(e,t){let n=$B(e);return()=>iW[t]??n()}var oW=aW(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),sW=aW(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),cW=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,lW={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:cW([0,.65,.55,1]),circOut:cW([.55,0,1,.45]),backIn:cW([.31,.01,.66,-.59]),backOut:cW([.33,1.53,.69,.99])};function uW(e,t){if(e)return typeof e==`function`?sW()?XH(e,t):`ease-out`:TV(e)?cW(e):Array.isArray(e)?e.map(e=>uW(e,t)||lW.easeOut):lW[e]}function dW(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=uW(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 fW(e){return typeof e==`function`&&`applyToOptions`in e}function pW({type:e,...t}){return fW(e)&&sW()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var mW=class extends TU{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=pW(e);this.animation=dW(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=SU(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),rW(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 aV(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+aV(e)}get time(){return aV(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=iV(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&&oW()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),eV):r(this)}},hW={anticipate:_V,backInOut:gV,circInOut:bV};function gW(e){return e in hW}function _W(e){typeof e.ease==`string`&&gW(e.ease)&&(e.ease=hW[e.ease])}var vW=10,yW=class extends mW{constructor(e){_W(e),wU(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 DU({...a,autoplay:!1}),s=Math.max(vW,zV.now()-this.startTime),c=JB(0,vW,s-vW),l=o.sample(s).value,{name:u}=this.options;i&&u&&rW(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},bW=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(AH.test(e)||e===`0`)&&!e.startsWith(`url(`));function xW(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 SW(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=bW(i,t),s=bW(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:xW(e)||(n===`spring`||fW(n))&&r}function CW(e){e.duration=0,e.type=`keyframes`}var wW=new Set([`opacity`,`clipPath`,`filter`,`transform`]),TW=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function EW(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&TW.test(e[t]))return!0;return!1}var DW=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),OW=$B(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function kW(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 OW()&&n&&(wW.has(n)||DW.has(n)&&EW(s))&&(n!==`transform`||!l)&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var AW=40,jW=class extends TU{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=zV.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||tW;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=zV.now();let u=!0;SW(e,i,a,o)||(u=!1,(YB.instantAnimations||!s)&&l?.(SU(e,n,t)),e[0]=e[e.length-1],CW(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>AW?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&kW(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new yW({...d,element:p})}catch{m=new DU(d)}else m=new DU(d);m.finished.then(()=>{this.notifyFinished()}).catch(eV),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(),eW()),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 MW(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 NW=30,PW=e=>!isNaN(parseFloat(e)),FW={current:void 0},IW=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=zV.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=zV.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=PW(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 rV);let n=this.events[e].add(t);return e===`change`?()=>{n(),NV.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 FW.current&&FW.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=zV.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>NW)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,NW);return oV(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 LW(e,t){return new IW(e,t)}function RW(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function zW(e,t){let n=e?.[t]??e?.default??e;return n===e?n:RW(n,e)}var BW={type:`spring`,stiffness:500,damping:25,restSpeed:10},VW=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),HW={type:`keyframes`,duration:.8},UW={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},WW=(e,{keyframes:t})=>t.length>2?HW:HU.has(e)?e.startsWith(`scale`)?VW(t[1]):BW:UW,GW=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function KW(e){for(let t in e)if(!GW.has(t))return!0;return!1}var qW=(e,t,n,r={},i,a)=>o=>{let s=zW(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=iV(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};KW(s)||Object.assign(u,WW(e,u)),u.duration&&=iV(u.duration),u.repeatDelay&&=iV(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(CW(u),u.delay===0&&(d=!0)),(YB.instantAnimations||YB.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,CW(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=SU(u.keyframes,s);if(e!==void 0){NV.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new DU(u):new jW(u)},JW=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function YW(e){let t=JW.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function XW(e,t,n=1){`${e}`;let[r,i]=YW(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return XB(e)?parseFloat(e):e}return UV(i)?XW(i,t,n+1):i}function ZW(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function QW(e,t,n,r){if(typeof t==`function`){let[i,a]=ZW(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]=ZW(r);t=t(n===void 0?e.custom:n,i,a)}return t}function $W(e,t,n){let r=e.getProps();return QW(r,t,n===void 0?r.custom:n,e)}var eG=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...VU]),tG=e=>Array.isArray(e);function nG(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,LW(n))}function rG(e){return tG(e)?e[e.length-1]||0:e}function iG(e,t){let{transitionEnd:n={},transition:r={},...i}=$W(e,t)||{};i={...i,...n};for(let t in i)nG(e,t,rG(i[t]))}var aG=e=>!!(e&&e.getVelocity);function oG(e){return!!(aG(e)&&e.add)}function sG(e,t){let n=e.getValue(`willChange`);if(oG(n))return n.add(t);if(!n&&YB.WillChange){let n=new YB.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function cG(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var lG=`data-`+cG(`framerAppearId`);function uG(e){return e.props[lG]}function dG({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function fG(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?RW(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&&dG(f,t))continue;let o={delay:n,...zW(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){NV.update(()=>r.set(i));continue}let p=!1;if(window.MotionHandoffAnimation){let n=uG(e);if(n){let e=window.MotionHandoffAnimation(n,t,NV);e!==null&&(o.startTime=e,p=!0)}}sG(e,t);let m=l??e.shouldReduceMotion;r.start(qW(t,r,i,m&&eG.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>NV.update(()=>{o&&iG(e,o)});d.length?Promise.all(d).then(t):t()}return d}function pG(e,t,n={}){let r=$W(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(fG(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return mG(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 mG(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(pG(c,t,{...o,delay:n+(typeof r==`function`?0:r)+MW(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function hG(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>pG(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=pG(e,t,n);else{let i=typeof t==`function`?$W(e,t,n.custom):t;r=Promise.all(fG(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var gG={test:e=>e===`auto`,parse:e=>e},_G=e=>t=>t.test(e),vG=[KV,lH,cH,sH,dH,uH,gG],yG=e=>vG.find(_G(e));function bG(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||QB(e)}var xG=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function SG(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(XV)||[];if(!r)return e;let i=n.replace(r,``),a=+!!xG.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var CG=/\b([a-z-]*)\(.*?\)/gu,wG={...AH,getAnimatableNone:e=>{let t=e.match(CG);return t?t.map(SG).join(` `):e}},TG={...AH,getAnimatableNone:e=>{let t=AH.parse(e);return AH.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},EG={...KV,transform:Math.round},DG={borderWidth:lH,borderTopWidth:lH,borderRightWidth:lH,borderBottomWidth:lH,borderLeftWidth:lH,borderRadius:lH,borderTopLeftRadius:lH,borderTopRightRadius:lH,borderBottomRightRadius:lH,borderBottomLeftRadius:lH,width:lH,maxWidth:lH,height:lH,maxHeight:lH,top:lH,right:lH,bottom:lH,left:lH,inset:lH,insetBlock:lH,insetBlockStart:lH,insetBlockEnd:lH,insetInline:lH,insetInlineStart:lH,insetInlineEnd:lH,padding:lH,paddingTop:lH,paddingRight:lH,paddingBottom:lH,paddingLeft:lH,paddingBlock:lH,paddingBlockStart:lH,paddingBlockEnd:lH,paddingInline:lH,paddingInlineStart:lH,paddingInlineEnd:lH,margin:lH,marginTop:lH,marginRight:lH,marginBottom:lH,marginLeft:lH,marginBlock:lH,marginBlockStart:lH,marginBlockEnd:lH,marginInline:lH,marginInlineStart:lH,marginInlineEnd:lH,fontSize:lH,backgroundPositionX:lH,backgroundPositionY:lH,rotate:sH,pathRotation:sH,rotateX:sH,rotateY:sH,rotateZ:sH,scale:JV,scaleX:JV,scaleY:JV,scaleZ:JV,skew:sH,skewX:sH,skewY:sH,distance:lH,translateX:lH,translateY:lH,translateZ:lH,x:lH,y:lH,z:lH,perspective:lH,transformPerspective:lH,opacity:qV,originX:fH,originY:fH,originZ:lH,zIndex:EG,fillOpacity:qV,strokeOpacity:qV,numOctaves:EG},OG={...DG,color:mH,backgroundColor:mH,outlineColor:mH,fill:mH,stroke:mH,borderColor:mH,borderTopColor:mH,borderRightColor:mH,borderBottomColor:mH,borderLeftColor:mH,filter:wG,WebkitFilter:wG,mask:TG,WebkitMask:TG},kG=e=>OG[e],AG=new Set([wG,TG]);function jG(e,t){let n=kG(e);return AG.has(n)||(n=AH),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var MG=new Set([`auto`,`none`,`0`]);function NG(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!MG.has(t)&&CH(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=jG(n,i)}var PG=class extends tW{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(),UV(r))){let i=XW(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!eG.has(n)||e.length!==2)return;let[r,i]=e,a=yG(r),o=yG(i);if(GV(r)!==GV(i)&&qU[n]){this.needsMeasurement=!0;return}if(a!==o)if(UU(a)&&UU(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else qU[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||bG(e[t]))&&n.push(t);n.length&&NG(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=qU[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]=qU[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()}},FG=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`];function IG(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 LG=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function RG(e){return ZB(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:zG,cancel:qce}=MV(queueMicrotask,!1),BG={x:!1,y:!1};function VG(){return BG.x||BG.y}function HG(e){return e===`x`||e===`y`?BG[e]?null:(BG[e]=!0,()=>{BG[e]=!1}):BG.x||BG.y?null:(BG.x=BG.y=!0,()=>{BG.x=BG.y=!1})}function UG(e,t){let n=IG(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function WG(e){return!(e.pointerType===`touch`||VG())}function GG(e,t,n={}){let[r,i,a]=UG(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(!WG(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 KG=(e,t)=>t?e===t||KG(e,t.parentElement):!1,qG=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,JG=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function YG(e){return JG.has(e.tagName)||e.isContentEditable===!0}var XG=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function ZG(e){return XG.has(e.tagName)||e.isContentEditable===!0}var QG=new WeakSet;function $G(e){return t=>{t.key===`Enter`&&e(t)}}function eK(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var tK=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=$G(()=>{if(QG.has(n))return;eK(n,`down`);let e=$G(()=>{eK(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>eK(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function nK(e){return qG(e)&&!VG()}var rK=new WeakSet;function iK(e,t,n={}){let[r,i,a]=UG(e,n),o=e=>{let r=e.currentTarget;if(!nK(e)||rK.has(e))return;QG.add(r),n.stopPropagation&&rK.add(e);let a=t(r,e),o={...i,capture:!0},s=(e,t)=>{window.removeEventListener(`pointerup`,c,o),window.removeEventListener(`pointercancel`,l,o),QG.has(r)&&QG.delete(r),nK(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{s(e,r===window||r===document||n.useGlobalTarget||KG(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),RG(e)&&(e.addEventListener(`focus`,e=>tK(e,i)),!YG(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function aK(e){return ZB(e)&&`ownerSVGElement`in e}var oK=new WeakMap,sK,cK=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:aK(r)&&`getBBox`in r?r.getBBox()[t]:r[n],lK=cK(`inline`,`width`,`offsetWidth`),uK=cK(`block`,`height`,`offsetHeight`);function dK({target:e,borderBoxSize:t}){oK.get(e)?.forEach(n=>{n(e,{get width(){return lK(e,t)},get height(){return uK(e,t)}})})}function fK(e){e.forEach(dK)}function pK(){typeof ResizeObserver>`u`||(sK=new ResizeObserver(fK))}function mK(e,t){sK||pK();let n=IG(e);return n.forEach(e=>{let n=oK.get(e);n||(n=new Set,oK.set(e,n)),n.add(t),sK?.observe(e)}),()=>{n.forEach(e=>{let n=oK.get(e);n?.delete(t),n?.size||sK?.unobserve(e)})}}var hK=new Set,gK;function _K(){gK=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};hK.forEach(t=>t(e))},window.addEventListener(`resize`,gK)}function vK(e){return hK.add(e),gK||_K(),()=>{hK.delete(e),!hK.size&&typeof gK==`function`&&(window.removeEventListener(`resize`,gK),gK=void 0)}}function yK(e,t){return typeof e==`function`?vK(e):mK(e,t)}var bK={value:null,addProjectionMetrics:null};function xK(e){return aK(e)&&e.tagName===`svg`}var SK=[...vG,mH,AH],CK=e=>SK.find(_G(e)),wK=()=>({translate:0,scale:1,origin:0,originPoint:0}),TK=()=>({x:wK(),y:wK()}),EK=()=>({min:0,max:0}),DK=()=>({x:EK(),y:EK()}),OK=new WeakMap;function kK(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function AK(e){return typeof e==`string`||Array.isArray(e)}var jK=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],MK=[`initial`,...jK];function NK(e){return kK(e.animate)||MK.some(t=>AK(e[t]))}function PK(e){return!!(NK(e)||e.variants)}function FK(e,t,n){for(let r in t){let i=t[r],a=n[r];if(aG(i))e.addValue(r,i);else if(aG(a))e.addValue(r,LW(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,LW(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var IK={current:null},LK={current:!1},RK=typeof window<`u`;function zK(){if(LK.current=!0,RK)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>IK.current=e.matches;e.addEventListener(`change`,t),t()}else IK.current=!1}var BK=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],VK={};function HK(e){VK=e}function UK(){return VK}var WK=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=tW,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=zV.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,NV.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=NK(t),this.isVariantNode=PK(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&&aG(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,OK.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:(LK.current||zK(),this.shouldReduceMotion=IK.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(),PV(this.notifyUpdate),PV(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&&wW.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new mW({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:iV(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=HU.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&NV.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 VK){let t=VK[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):DK()}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<BK.length;t++){let n=BK[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=FK(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=LW(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`&&(XB(n)||QB(n))?n=parseFloat(n):!CK(n)&&AH.test(t)&&(n=jG(e,t)),this.setBaseTarget(e,aG(n)?n.get():n)),aG(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=QW(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&&!aG(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 rV),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){zG.render(this.render)}},GK=class extends WK{constructor(){super(...arguments),this.KeyframeResolver=PG}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;aG(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},KK=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function qK({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function JK({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function YK(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 XK(e){return e===void 0||e===1}function ZK({scale:e,scaleX:t,scaleY:n}){return!XK(e)||!XK(t)||!XK(n)}function QK(e){return ZK(e)||$K(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function $K(e){return eq(e.x)||eq(e.y)}function eq(e){return e&&e!==`0%`}function tq(e,t,n){return n+t*(e-n)}function nq(e,t,n,r,i){return i!==void 0&&(e=tq(e,i,r)),tq(e,n,r)+t}function rq(e,t=0,n=1,r,i){e.min=nq(e.min,t,n,r,i),e.max=nq(e.max,t,n,r,i)}function iq(e,{x:t,y:n}){rq(e.x,t.translate,t.scale,t.originPoint),rq(e.y,n.translate,n.scale,n.originPoint)}var aq=.999999999999,oq=1.0000000000001;function sq(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&&(cq(e.x,-a.scroll.offset.x),cq(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,iq(e,o)),r&&QK(a.latestValues)&&dq(e,a.latestValues,a.layout?.layoutBox))}t.x<oq&&t.x>aq&&(t.x=1),t.y<oq&&t.y>aq&&(t.y=1)}function cq(e,t){e.min+=t,e.max+=t}function lq(e,t,n,r,i=.5){rq(e,t,n,PH(e.min,e.max,i),r)}function uq(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function dq(e,t,n){let r=n??e;lq(e.x,uq(t.x,r.x),t.scaleX,t.scale,t.originX),lq(e.y,uq(t.y,r.y),t.scaleY,t.scale,t.originY)}function fq(e,t){return qK(YK(e.getBoundingClientRect(),t))}function pq(e,t,n){let r=fq(e,n),{scroll:i}=t;return i&&(cq(r.x,i.offset.x),cq(r.y,i.offset.y)),r}var mq={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},hq=VU.length;function gq(e,t,n){let r=``,i=!0;for(let a=0;a<hq;a++){let o=VU[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=LG(s,DG[o]);if(!c){i=!1;let t=mq[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}let a=e.pathRotation;return a&&(i=!1,r+=`rotate(${LG(a,DG.pathRotation)}) `),r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function _q(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(HU.has(e)){o=!0;continue}else if(VV(e)){i[e]=n;continue}else{let t=LG(n,DG[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=gq(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 vq(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 yq(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var bq={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(lH.test(e))e=parseFloat(e);else return e;return`${yq(e,t.target.x)}% ${yq(e,t.target.y)}%`}},xq={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=AH.parse(e);if(i.length>5)return r;let a=AH.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=PH(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},Sq={borderRadius:{...bq,applyTo:[...FG]},borderTopLeftRadius:bq,borderTopRightRadius:bq,borderBottomLeftRadius:bq,borderBottomRightRadius:bq,boxShadow:xq};function Cq(e,{layout:t,layoutId:n}){return HU.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!Sq[e]||e===`opacity`)}function wq(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(aG(r[t])||i&&aG(i[t])||Cq(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function Tq(e){return window.getComputedStyle(e)}var Eq=class extends GK{constructor(){super(...arguments),this.type=`html`,this.renderInstance=vq}readValueFromInstance(e,t){if(HU.has(t))return this.projection?.isProjecting?LU(t):zU(e,t);{let n=Tq(e),r=(VV(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return fq(e,t)}build(e,t,n){_q(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return wq(e,t,n)}},Dq={offset:`stroke-dashoffset`,array:`stroke-dasharray`},Oq={offset:`strokeDashoffset`,array:`strokeDasharray`};function kq(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?Dq:Oq;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var Aq=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function jq(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(_q(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 Aq)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&&kq(d,i,a,o,!1)}var Mq=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`]),Nq=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function Pq(e,t,n,r){vq(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(Mq.has(n)?n:cG(n),t.attrs[n])}function Fq(e,t,n){let r=wq(e,t,n);for(let n in e)if(aG(e[n])||aG(t[n])){let t=VU.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var Iq=class extends GK{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=DK}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(HU.has(t)){let e=kG(t);return e&&e.default||0}return t=Mq.has(t)?t:cG(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Fq(e,t,n)}build(e,t,n){jq(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){Pq(e,t,n,r)}mount(e){this.isSVGTag=Nq(e.tagName),super.mount(e)}},Lq=MK.length;function Rq(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&Rq(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<Lq;n++){let r=MK[n],i=e.props[r];(AK(i)||i===!1)&&(t[r]=i)}return t}function zq(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 Bq=[...jK].reverse(),Vq=jK.length;function Hq(e){return t=>Promise.all(t.map(({animation:t,options:n})=>hG(e,t,n)))}function Uq(e){let t=Hq(e),n=Kq(),r=!0,i=!1,a=t=>(n,r)=>{let i=$W(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=Rq(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<Vq;t++){let p=Bq[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=AK(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||kK(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=Wq(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=tG(t)&&tG(n)?!zq(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=$W(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=MW(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=$W(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=Kq(),i=!0}}}function Wq(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!zq(t,e):!1}function Gq(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Kq(){return{animate:Gq(!0),whileInView:Gq(),whileHover:Gq(),whileTap:Gq(),whileDrag:Gq(),whileFocus:Gq(),exit:Gq()}}function qq(e,t){e.min=t.min,e.max=t.max}function Jq(e,t){qq(e.x,t.x),qq(e.y,t.y)}function Yq(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Xq=.9999,Zq=1.0001,Qq=-.01,$q=.01;function eJ(e){return e.max-e.min}function tJ(e,t,n){return Math.abs(e-t)<=n}function nJ(e,t,n,r=.5){e.origin=r,e.originPoint=PH(t.min,t.max,e.origin),e.scale=eJ(n)/eJ(t),e.translate=PH(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Xq&&e.scale<=Zq||isNaN(e.scale))&&(e.scale=1),(e.translate>=Qq&&e.translate<=$q||isNaN(e.translate))&&(e.translate=0)}function rJ(e,t,n,r){nJ(e.x,t.x,n.x,r?r.originX:void 0),nJ(e.y,t.y,n.y,r?r.originY:void 0)}function iJ(e,t,n,r=0){e.min=(r?PH(n.min,n.max,r):n.min)+t.min,e.max=e.min+eJ(t)}function aJ(e,t,n,r){iJ(e.x,t.x,n.x,r?.x),iJ(e.y,t.y,n.y,r?.y)}function oJ(e,t,n,r=0){let i=r?PH(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+eJ(t)}function sJ(e,t,n,r){oJ(e.x,t.x,n.x,r?.x),oJ(e.y,t.y,n.y,r?.y)}function cJ(e,t,n,r,i){return e-=t,e=tq(e,1/n,r),i!==void 0&&(e=tq(e,1/i,r)),e}function lJ(e,t=0,n=1,r=.5,i,a=e,o=e){if(cH.test(t)&&(t=parseFloat(t),t=PH(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=PH(a.min,a.max,r);e===a&&(s-=t),e.min=cJ(e.min,t,n,s,i),e.max=cJ(e.max,t,n,s,i)}function uJ(e,t,[n,r,i],a,o){lJ(e,t[n],t[r],t[i],t.scale,a,o)}var dJ=[`x`,`scaleX`,`originX`],fJ=[`y`,`scaleY`,`originY`];function pJ(e,t,n,r){uJ(e.x,t,dJ,n?n.x:void 0,r?r.x:void 0),uJ(e.y,t,fJ,n?n.y:void 0,r?r.y:void 0)}function mJ(e){return e.translate===0&&e.scale===1}function hJ(e){return mJ(e.x)&&mJ(e.y)}function gJ(e,t){return e.min===t.min&&e.max===t.max}function _J(e,t){return gJ(e.x,t.x)&&gJ(e.y,t.y)}function vJ(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function yJ(e,t){return vJ(e.x,t.x)&&vJ(e.y,t.y)}function bJ(e){return eJ(e.x)/eJ(e.y)}function xJ(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function SJ(e){return[e(`x`),e(`y`)]}function CJ(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 wJ=FG.length,TJ=e=>typeof e==`string`?parseFloat(e):e,EJ=e=>typeof e==`number`||lH.test(e);function DJ(e,t,n,r,i,a){i?(e.opacity=PH(0,n.opacity??1,kJ(r)),e.opacityExit=PH(t.opacity??1,0,AJ(r))):a&&(e.opacity=PH(t.opacity??1,n.opacity??1,r));for(let i=0;i<wJ;i++){let a=FG[i],o=OJ(t,a),s=OJ(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||EJ(o)===EJ(s)?(e[a]=Math.max(PH(TJ(o),TJ(s),r),0),(cH.test(s)||cH.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=PH(t.rotate||0,n.rotate||0,r))}function OJ(e,t){return e[t]===void 0?e.borderRadius:e[t]}var kJ=jJ(0,.5,yV),AJ=jJ(.5,.95,eV);function jJ(e,t,n){return r=>r<e?0:r>t?1:n(nV(e,t,r))}function MJ(e,t,n){let r=aG(e)?e:LW(e);return r.start(qW(``,r,t,n)),r.animation}function NJ(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var PJ=(e,t)=>e.depth-t.depth,FJ=class{constructor(){this.children=[],this.isDirty=!1}add(e){KB(this.children,e),this.isDirty=!0}remove(e){qB(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(PJ),this.isDirty=!1,this.children.forEach(e)}};function IJ(e,t){let n=zV.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(PV(r),e(a-t))};return NV.setup(r,!0),()=>PV(r)}function LJ(e){return aG(e)?e.get():e}var RJ=class{constructor(){this.members=[]}add(e){KB(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&&(qB(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(qB(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)}},zJ={hasAnimatedSinceResize:!0,hasEverUpdated:!1},BJ={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},VJ=[``,`X`,`Y`,`Z`],HJ=1e3,UJ=0;function WJ(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function GJ(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=uG(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,NV,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&GJ(r)}function KJ({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=UJ++,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,bK.value&&(BJ.nodes=BJ.calculatedTargetDeltas=BJ.calculatedProjections=0),this.nodes.forEach(YJ),this.nodes.forEach(iY),this.nodes.forEach(aY),this.nodes.forEach(XJ),bK.addProjectionMetrics&&bK.addProjectionMetrics(BJ)},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 FJ)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new rV),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=aK(t)&&!xK(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;NV.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=IJ(i,250),zJ.hasAnimatedSinceResize&&(zJ.hasAnimatedSinceResize=!1,this.nodes.forEach(rY)))})}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()||fY,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!yJ(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={...zW(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||rY(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(),PV(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(oY),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&&GJ(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($J),this.nodes.forEach(QJ);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(eY);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(tY),this.nodes.forEach(nY),this.nodes.forEach(qJ),this.nodes.forEach(JJ)):this.nodes.forEach(eY),this.clearAllSnapshots();let e=zV.now();FV.delta=JB(0,1e3/60,e-FV.timestamp),FV.timestamp=e,FV.isProcessing=!0,IV.update.process(FV),IV.preRender.process(FV),IV.render.process(FV),FV.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,zG.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ZJ),this.sharedNodes.forEach(sY)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,NV.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){NV.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!eJ(this.snapshot.measuredBox.x)&&!eJ(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||=DK(),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&&!hJ(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||QK(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)),gY(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return DK();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(vY))){let{scroll:e}=this.root;e&&(cq(t.x,e.offset.x),cq(t.y,e.offset.y))}return t}removeElementScroll(e){let t=DK();if(Jq(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&&Jq(t,e),cq(t.x,i.offset.x),cq(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||DK();Jq(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&&(cq(r.x,-n.scroll.offset.x),cq(r.y,-n.scroll.offset.y)),QK(n.latestValues)&&dq(r,n.latestValues,n.layout?.layoutBox)}return QK(this.latestValues)&&dq(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=DK();Jq(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!QK(n.latestValues))continue;let r;n.instance&&(ZK(n.latestValues)&&n.updateSnapshot(),r=DK(),Jq(r,n.measurePageBox())),pJ(t,n.latestValues,n.snapshot?.layoutBox,r)}return QK(this.latestValues)&&pJ(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!==FV.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=FV.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=DK(),this.targetWithTransforms=DK()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),aJ(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Jq(this.target,this.layout.layoutBox),iq(this.target,this.targetDelta)):Jq(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),bK.value&&BJ.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||ZK(this.parent.latestValues)||$K(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=DK(),this.relativeTargetOrigin=DK(),sJ(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),Jq(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===FV.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;Jq(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;sq(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=DK());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Yq(this.prevProjectionDelta.x,this.projectionDelta.x),Yq(this.prevProjectionDelta.y,this.projectionDelta.y)),rJ(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!xJ(this.projectionDelta.x,this.prevProjectionDelta.x)||!xJ(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),bK.value&&BJ.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=TK(),this.projectionDelta=TK(),this.projectionDeltaWithTransform=TK()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=TK();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=DK(),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(dY));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=PH(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=PH(e.y.scale,1,n),o.y.origin=e.y.origin,o.y.originPoint=e.y.originPoint):(cY(o.x,e.x,n),cY(o.y,e.y,n)),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(sJ(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),uY(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&_J(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=DK(),Jq(f,this.relativeTarget)),c&&(this.animationValues=a,DJ(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&&=(PV(this.pendingAnimation),void 0),this.pendingAnimation=NV.update(()=>{zJ.hasAnimatedSinceResize=!0,this.motionValue||=LW(0),this.motionValue.jump(0,!1),this.currentAnimation=MJ(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(HJ),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&&_Y(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||DK();let t=eJ(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=eJ(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Jq(t,n),dq(t,i),rJ(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new RJ),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&&WJ(`z`,e,r,this.animationValues);for(let t=0;t<VJ.length;t++)WJ(`rotate${VJ[t]}`,e,r,this.animationValues),WJ(`skew${VJ[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=LJ(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=LJ(t?.pointerEvents)||``),this.hasProjected&&!QK(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=CJ(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 Sq){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=Sq[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?LJ(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(QJ),this.root.sharedNodes.clear()}}}function qJ(e){e.updateLayout()}function JJ(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`)SJ(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=eJ(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;qq(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else _Y(i,t.layoutBox,n)&&SJ(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=eJ(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=TK();rJ(o,n,t.layoutBox);let s=TK();a?rJ(s,e.applyTransform(r,!0),t.measuredBox):rJ(s,n,t.layoutBox);let c=!hJ(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=DK();sJ(s,t.layoutBox,i.layoutBox,o);let c=DK();sJ(c,n,a.layoutBox,o),yJ(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 YJ(e){bK.value&&BJ.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 XJ(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function ZJ(e){e.clearSnapshot()}function QJ(e){e.clearMeasurements()}function $J(e){e.isLayoutDirty=!0,e.updateLayout()}function eY(e){e.isLayoutDirty=!1}function tY(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function nY(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function rY(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function iY(e){e.resolveTargetDelta()}function aY(e){e.calcProjection()}function oY(e){e.resetSkewAndRotation()}function sY(e){e.removeLeadSnapshot()}function cY(e,t,n){e.translate=PH(t.translate,0,n),e.scale=PH(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function lY(e,t,n,r){e.min=PH(t.min,n.min,r),e.max=PH(t.max,n.max,r)}function uY(e,t,n,r){lY(e.x,t.x,n.x,r),lY(e.y,t.y,n.y,r)}function dY(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var fY={duration:.45,ease:[.4,0,.1,1]},pY=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),mY=pY(`applewebkit/`)&&!pY(`chrome/`)?Math.round:eV;function hY(e){e.min=mY(e.min),e.max=mY(e.max)}function gY(e){hY(e.x),hY(e.y)}function _Y(e,t,n){return e===`position`||e===`preserve-aspect`&&!tJ(bJ(t),bJ(n),.2)}function vY(e){return e!==e.root&&e.scroll?.wasRoot}var yY=KJ({attachResizeListener:(e,t)=>NJ(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),bY={current:void 0},xY=KJ({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!bY.current){let e=new yY({});e.mount(window),e.setOptions({layoutScroll:!0}),bY.current=e}return bY.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),SY=(0,b.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function CY(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function wY(...e){return t=>{let n=!1,r=e.map(e=>{let r=CY(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():CY(e[t],null)}}}}function TY(...e){return b.useCallback(wY(...e),e)}var EY=class extends b.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(RG(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=RG(e)&&e.offsetWidth||0,r=RG(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 DY({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)(SY),u=TY(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(`
214
+ [data-motion-pop-id="${o}"] {
215
+ position: absolute !important;
216
+ width: ${e}px !important;
217
+ height: ${u}px !important;
218
+ ${_}px !important;
219
+ ${v}px !important;
220
+ }
221
+ `),()=>{s.current?.removeAttribute(`data-motion-pop-id`),b.contains(y)&&b.removeChild(y)}},[t]),(0,B.jsx)(EY,{isPresent:t,childRef:s,sizeRef:c,pop:a,children:a===!1?e:b.cloneElement(e,{ref:u})})}var OY=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=UB(kY),d=(0,b.useId)(),f=(0,b.useRef)(n),p=(0,b.useRef)(r);WB(()=>{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,B.jsx)(DY,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,children:e}),(0,B.jsx)(GB.Provider,{value:h,children:e})};function kY(){return new Map}function AY(e=!0){let t=(0,b.useContext)(GB);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 jY=e=>e.key||``;function MY(e){let t=[];return b.Children.forEach(e,e=>{(0,b.isValidElement)(e)&&t.push(e)}),t}var NY=({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]=AY(o),f=(0,b.useMemo)(()=>MY(e),[e]),p=o&&!u?[]:f.map(jY),m=(0,b.useRef)(!0),h=(0,b.useRef)(f),g=UB(()=>new Map),_=(0,b.useRef)(new Set),[v,y]=(0,b.useState)(f),[x,S]=(0,b.useState)(f);WB(()=>{m.current=!1,h.current=f;for(let e=0;e<x.length;e++){let t=jY(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=jY(n);p.includes(r)||(e.splice(t,0,n),C.push(n))}return a===`wait`&&C.length&&(e=C),S(MY(e)),y(f),null}let{forceRender:w}=(0,b.useContext)(HB);return(0,B.jsx)(B.Fragment,{children:x.map(e=>{let v=jY(e),y=o&&!u?!1:f===x||p.includes(v);return(0,B.jsx)(OY,{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)})})},PY=(0,b.createContext)({strict:!1}),FY={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`]},IY=!1;function LY(){if(IY)return;let e={};for(let t in FY)e[t]={isEnabled:e=>FY[t].some(t=>!!e[t])};HK(e),IY=!0}function RY(){return LY(),UK()}function zY(e){let t=RY();for(let n in e)t[n]={...t[n],...e[n]};HK(t)}var BY=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 VY(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||BY.has(e)}var HY=c({default:()=>UY}),UY,WY=o((()=>{throw UY={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),GY=e=>!VY(e);function KY(e){typeof e==`function`&&(GY=t=>t.startsWith(`on`)?!VY(t):e(t))}try{KY((WY(),d(HY)).default)}catch{}function qY(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||aG(e[i])||(GY(i)||n===!0&&VY(i)||!t&&!VY(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var JY=(0,b.createContext)({});function YY(e,t){if(NK(e)){let{initial:t,animate:n}=e;return{initial:t===!1||AK(t)?t:void 0,animate:AK(n)?n:void 0}}return e.inherit===!1?{}:t}function XY(e){let{initial:t,animate:n}=YY(e,(0,b.useContext)(JY));return(0,b.useMemo)(()=>({initial:t,animate:n}),[ZY(t),ZY(n)])}function ZY(e){return Array.isArray(e)?e.join(` `):e}var QY=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function $Y(e,t,n){for(let r in t)!aG(t[r])&&!Cq(r,n)&&(e[r]=t[r])}function eX({transformTemplate:e},t){return(0,b.useMemo)(()=>{let n=QY();return _q(n,t,e),Object.assign({},n.vars,n.style)},[t])}function tX(e,t){let n=e.style||{},r={};return $Y(r,n,e),Object.assign(r,eX(e,t)),r}function nX(e,t){let n={},r=tX(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 rX=()=>({...QY(),attrs:{}});function iX(e,t,n,r){let i=(0,b.useMemo)(()=>{let n=rX();return jq(n,t,Nq(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};$Y(t,e.style,e),i.style={...t,...i.style}}return i}var aX=[`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 oX(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(aX.indexOf(e)>-1||/[A-Z]/u.test(e))}function sX(e,t,n,{latestValues:r},i,a=!1,o){let s=(o??oX(e)?iX:nX)(t,r,i,e),c=qY(t,typeof e==`string`,a),l=e===b.Fragment?{}:{...c,...s,ref:n},{children:u}=t,d=(0,b.useMemo)(()=>aG(u)?u.get():u,[u]);return(0,b.createElement)(e,{...l,children:d})}function cX({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:lX(n,r,i,e),renderState:t()}}function lX(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=LJ(a[e]);let{initial:o,animate:s}=e,c=NK(e),l=PK(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`&&!kK(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=QW(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 uX=e=>(t,n)=>{let r=(0,b.useContext)(JY),i=(0,b.useContext)(GB),a=()=>cX(e,t,r,i);return n?a():UB(a)},dX=uX({scrapeMotionValuesFromProps:wq,createRenderState:QY}),fX=uX({scrapeMotionValuesFromProps:Fq,createRenderState:rX}),pX=Symbol.for(`motionComponentSymbol`);function mX(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 hX=(0,b.createContext)({});function gX(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function _X(e,t,n,r,i,a){let{visualElement:o}=(0,b.useContext)(JY),s=(0,b.useContext)(PY),c=(0,b.useContext)(GB),l=(0,b.useContext)(SY),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)(hX);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&vX(f.current,n,i,h);let g=(0,b.useRef)(!1);(0,b.useInsertionEffect)(()=>{m&&g.current&&m.update(n,c)});let _=n[lG],v=(0,b.useRef)(!!_&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(_)&&window.MotionHasOptimisedAnimation?.(_));return WB(()=>{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 vX(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:yX(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&gX(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function yX(e){if(e)return e.options.allowProjection===!1?yX(e.parent):e.projection}function bX(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&zY(r);let a=n?n===`svg`:oX(e),o=a?fX:dX;function s(n,s){let c,l={...(0,b.useContext)(SY),...n,layoutId:xX(n)},{isStatic:u}=l,d=XY(n),f=o(n,u);if(!u&&typeof window<`u`){SX(l,r);let t=CX(l);c=t.MeasureLayout,d.visualElement=_X(e,f,l,i,t.ProjectionNode,a)}return(0,B.jsxs)(JY.Provider,{value:d,children:[c&&d.visualElement?(0,B.jsx)(c,{visualElement:d.visualElement,...l}):null,sX(e,n,mX(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[pX]=e,c}function xX({layoutId:e}){let t=(0,b.useContext)(HB).id;return t&&e!==void 0?t+`-`+e:e}function SX(e,t){(0,b.useContext)(PY).strict}function CX(e){let{drag:t,layout:n}=RY();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function wX(e,t){if(typeof Proxy>`u`)return bX;let n=new Map,r=(n,r)=>bX(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,bX(a,void 0,e,t)),n.get(a))})}var TX=(e,t)=>t.isSVG??oX(e)?new Iq(t):new Eq(t,{allowProjection:e!==b.Fragment}),EX=class extends KK{constructor(e){super(e),e.animationState||=Uq(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();kK(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?.()}},DX=0,OX={animation:{Feature:EX},exit:{Feature:class extends KK{constructor(){super(...arguments),this.id=DX++,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=$W(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 kX(e){return{point:{x:e.pageX,y:e.pageY}}}var AX=e=>t=>qG(t)&&e(t,kX(t));function jX(e,t,n,r){return NJ(e,t,AX(n),r)}var MX=({current:e})=>e?e.ownerDocument.defaultView:null,NX=(e,t)=>Math.abs(e-t);function PX(e,t){let n=NX(e.x,t.x),r=NX(e.y,t.y);return Math.sqrt(n**2+r**2)}var FX=new Set([`auto`,`scroll`]),IX=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=LX(this.lastRawMoveEventInfo,this.transformPagePoint));let e=zX(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=PX(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=FV;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=LX(t,this.transformPagePoint),NV.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=zX(e.type===`pointercancel`?this.lastMoveEventInfo:LX(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!qG(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=LX(kX(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=FV;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,zX(s,this.history));let d={passive:!0,capture:!0};this.removeListeners=tV(jX(this.contextWindow,`pointermove`,this.handlePointerMove,d),jX(this.contextWindow,`pointerup`,this.handlePointerUp,d),jX(this.contextWindow,`pointercancel`,this.handlePointerUp,d)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(FX.has(e.overflowX)||FX.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),NV.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),PV(this.updatePoint)}};function LX(e,t){return t?{point:t(e.point)}:e}function RX(e,t){return{x:e.x-t.x,y:e.y-t.y}}function zX({point:e},t){return{point:e,delta:RX(e,VX(t)),offset:RX(e,BX(t)),velocity:HX(t,.1)}}function BX(e){return e[0]}function VX(e){return e[e.length-1]}function HX(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=VX(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>iV(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>iV(t)*2&&(r=e[1]);let a=aV(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 UX(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?PH(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?PH(n,e,r.max):Math.min(e,n)),e}function WX(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 GX(e,{top:t,left:n,bottom:r,right:i}){return{x:WX(e.x,n,i),y:WX(e.y,t,r)}}function KX(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 qX(e,t){return{x:KX(e.x,t.x),y:KX(e.y,t.y)}}function JX(e,t){let n=.5,r=eJ(e),i=eJ(t);return i>r?n=nV(t.min,t.max-r,e.min):r>i&&(n=nV(e.min,e.max-i,t.min)),JB(0,1,n)}function YX(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 XX=.35;function ZX(e=XX){return e===!1?e=0:e===!0&&(e=XX),{x:QX(e,`left`,`right`),y:QX(e,`top`,`bottom`)}}function QX(e,t,n){return{min:$X(e,t),max:$X(e,n)}}function $X(e,t){return typeof e==`number`?e:e[t]||0}var eZ=new WeakMap,tZ=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=DK(),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(kX(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=HG(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),SJ(e=>{let t=this.getAxisMotionValue(e).get()||0;if(cH.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=eJ(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&NV.update(()=>i(e,t),!1,!0),sG(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=aZ(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&&NV.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 IX(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:MX(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&&NV.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||!iZ(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=UX(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&&gX(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=GX(n.layoutBox,e):this.constraints=!1,this.elastic=ZX(t),r!==this.constraints&&!gX(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&SJ(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=YX(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!gX(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=pq(n,r.root,this.visualElement.getTransformPagePoint()),a=qX(r.layout.layoutBox,i);if(t){let e=t(JK(a));this.hasMutatedConstraints=!!e,e&&(a=qK(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=SJ(o=>{if(!iZ(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 sG(this.visualElement,e),n.start(qW(e,n,0,t,this.visualElement,!1))}stopAnimation(){SJ(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){SJ(t=>{let{drag:n}=this.getProps();if(!iZ(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]-PH(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!gX(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};SJ(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=JX({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(),SJ(t=>{if(!iZ(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(PH(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;eZ.set(this.visualElement,this);let e=this.visualElement.current,t=jX(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&ZG(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();gX(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=rZ(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),NV.read(r);let o=NJ(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(SJ(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=XX,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function nZ(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function rZ(e,t,n){let r=yK(e,nZ(n)),i=yK(t,nZ(n));return()=>{r(),i()}}function iZ(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function aZ(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var oZ=class extends KK{constructor(e){super(e),this.removeGroupControls=eV,this.removeListeners=eV,this.controls=new tZ(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||eV}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()}},sZ=e=>(t,n)=>{e&&NV.update(()=>e(t,n),!1,!0)},cZ=class extends KK{constructor(){super(...arguments),this.removePointerDownListener=eV}onPointerDown(e){this.session=new IX(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:MX(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:sZ(e),onStart:sZ(t),onMove:sZ(n),onEnd:(e,t)=>{delete this.session,r&&NV.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=jX(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},lZ=!1,uZ=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),lZ&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),zJ.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}),lZ=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||NV.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(),zG.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;lZ=!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 dZ(e){let[t,n]=AY(),r=(0,b.useContext)(HB);return(0,B.jsx)(uZ,{...e,layoutGroup:r,switchLayoutGroup:(0,b.useContext)(hX),isPresent:t,safeToRemove:n})}var fZ={pan:{Feature:cZ},drag:{Feature:oZ,ProjectionNode:xY,MeasureLayout:dZ}};function pZ(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&NV.postRender(()=>i(t,kX(t)))}var mZ=class extends KK{mount(){let{current:e}=this.node;e&&(this.unmount=GG(e,(e,t)=>(pZ(this.node,t,`Start`),e=>pZ(this.node,e,`End`))))}unmount(){}},hZ=class extends KK{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=tV(NJ(this.node.current,`focus`,()=>this.onFocus()),NJ(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function gZ(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&&NV.postRender(()=>i(t,kX(t)))}var _Z=class extends KK{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=iK(e,(e,t)=>(gZ(this.node,t,`Start`),(e,{success:t})=>gZ(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},vZ=new WeakMap,yZ=new WeakMap,bZ=e=>{let t=vZ.get(e.target);t&&t(e)},xZ=e=>{e.forEach(bZ)};function SZ({root:e,...t}){let n=e||document;yZ.has(n)||yZ.set(n,{});let r=yZ.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(xZ,{root:e,...t})),r[i]}function CZ(e,t,n){let r=SZ(t);return vZ.set(e,n),r.observe(e),()=>{vZ.delete(e),r.unobserve(e)}}var wZ={some:0,all:1},TZ=class extends KK{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:wZ[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=CZ(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(EZ(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function EZ({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var DZ={inView:{Feature:TZ},tap:{Feature:_Z},focus:{Feature:hZ},hover:{Feature:mZ}},OZ={layout:{ProjectionNode:xY,MeasureLayout:dZ}},kZ=wX({...OX,...DZ,...fZ,...OZ},TX),AZ=e=>new Date(e).toLocaleTimeString(`en-US`,{hour12:!1,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,fractionalSecondDigits:3}),jZ=e=>e.source===`view`?`view`:e.type===`response`?`res`:`req`,MZ={duration:.2,ease:[.4,0,.2,1]},NZ={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`}},PZ=({log:e,expanded:t,onToggle:n})=>{let r=Object.keys(e.args).length>0,i=NZ[jZ(e)];return(0,B.jsxs)(`div`,{children:[(0,B.jsxs)(`button`,{type:`button`,onClick:()=>r&&n(),disabled:!r,className:Y(`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,B.jsx)(qr,{className:Y(`size-3 shrink-0 text-muted-foreground transition-transform duration-200 ease-in-out`,!r&&`invisible`,t&&`rotate-90`)}),(0,B.jsx)(`span`,{className:`min-w-[80px] shrink-0 text-muted-foreground`,children:AZ(e.timestamp)}),(0,B.jsx)(`span`,{className:Y(`shrink-0 rounded px-1 text-[10px] font-medium uppercase tracking-wide`,i.badge),children:i.label}),(0,B.jsx)(`span`,{className:Y(`min-w-[120px] shrink-0 font-semibold`,i.command),children:e.command})]}),(0,B.jsx)(NY,{initial:!1,children:t&&r?(0,B.jsx)(kZ.div,{initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:MZ,className:`overflow-hidden border-b border-border bg-muted/40`,children:(0,B.jsx)(`div`,{className:`px-2 py-2`,children:(0,B.jsx)(`div`,{className:`overflow-x-auto`,children:(0,B.jsx)(VB,{code:JSON.stringify(e.args,null,2)})})})},`args`):null})]})},FZ=({onClose:e})=>{let t=NT(),n=xw(t?.name??``)?.openaiLogs??[],r=bw(e=>e.clearOpenAiLogs),[i,a]=(0,b.useState)(new Set);return(0,B.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col overflow-hidden border-l-2 border-border bg-background`,children:[(0,B.jsxs)(`div`,{className:`flex h-10 shrink-0 items-center justify-between border-b border-border px-3`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,B.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:`Logs`}),(0,B.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,B.jsx)(Ei,{className:`size-3.5`})}),(0,B.jsx)(nM,{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,B.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,B.jsx)(ki,{className:`size-3.5`})}):null]}),(0,B.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto bg-light-gray`,children:n.map(e=>(0,B.jsx)(PZ,{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))})]})},IZ=({expanded:e,onToggle:t})=>{let n=NT(),r=xw(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=I_(i),u=L_(a?.widgetState),d=l>=N_,f=u>=P_,p=i.isError===!0;return(0,B.jsxs)(`button`,{type:`button`,"aria-expanded":e,onClick:t,className:Y(`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,B.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,B.jsxs)(`div`,{className:`flex items-center gap-2 font-medium`,children:[`Tool output`,d&&(0,B.jsx)(wR,{kind:`tool-output`})]}),(0,B.jsxs)(`div`,{className:`text-xs text-light-gray-foreground flex items-center ml-auto gap-2 font-mono`,children:[(0,B.jsx)(`span`,{className:p?`text-destructive`:`text-success`,children:p?`Error`:`OK`}),o==null?null:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`span`,{children:`·`}),(0,B.jsxs)(`span`,{children:[o,`ms`]})]}),(0,B.jsx)(`span`,{children:`·`}),(0,B.jsx)(`span`,{children:$j(c)})]})]}),(0,B.jsxs)(`div`,{className:`text-sm text-muted-foreground flex-1 px-3 h-full flex items-center`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-2 font-medium`,children:[`View state`,f&&(0,B.jsx)(wR,{kind:`view-state`})]}),(0,B.jsx)(`div`,{className:`text-xs text-light-gray-foreground flex items-center ml-auto gap-2 font-mono`,children:(0,B.jsxs)(`span`,{children:[u,` token`,u>1?`s`:``]})})]})]})},LZ=()=>{let e=NT(),t=xw(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=I_(n),s=L_(r?.widgetState);return(0,B.jsxs)(`div`,{className:`flex h-full min-h-0 w-full flex-row overflow-hidden bg-light-gray`,children:[(0,B.jsxs)(`section`,{className:`flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden`,children:[o>=5e3&&(0,B.jsx)(TR,{kind:`tool-output`,tokenCount:o}),(0,B.jsxs)(`div`,{className:`relative min-h-0 flex-1 overflow-auto p-3`,children:[(0,B.jsx)(nM,{value:i,label:`Copy tool output`,className:`absolute right-2 top-2 z-10`}),(0,B.jsx)(VB,{code:i})]})]}),(0,B.jsxs)(`section`,{className:`flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden border-l border-border`,children:[s>=2e4&&(0,B.jsx)(TR,{kind:`view-state`,tokenCount:s}),(0,B.jsxs)(`div`,{className:`relative min-h-0 flex-1 overflow-auto p-3`,children:[(0,B.jsx)(nM,{value:a,label:`Copy view state`,className:`absolute right-2 top-2 z-10`}),(0,B.jsx)(VB,{code:a})]})]})]})},RZ=({text:e})=>(0,B.jsx)(`div`,{className:`flex h-full items-center justify-center`,children:(0,B.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e})}),zZ=`devtools-tool-panel-view-logs`,BZ=`view`,VZ=`logs`,HZ=`devtools-tool-panel-output-logs`,UZ=`output`,WZ=`devtools-tool-panel-header-output`,GZ=`header-output`,KZ=`header-view`,qZ=()=>{let e=NT(),t=xw(e?.name??``),[n,r]=bR(`devtools-tool-panel-logs-open`,{defaultValue:!1}),[i,a]=bR(`devtools-tool-panel-header-expanded`,{defaultValue:!1}),{defaultLayout:o,onLayoutChanged:s}=Go({id:zZ,panelIds:[BZ,VZ],storage:localStorage}),{defaultLayout:c,onLayoutChanged:l}=Go({id:WZ,panelIds:[GZ,KZ],storage:localStorage}),{defaultLayout:u,onLayoutChanged:d}=Go({id:HZ,panelIds:[UZ,VZ],storage:localStorage}),f=us(e=>e.displayMode),p=us(e=>e.theme),m=us(e=>e.setPreference),h=us(e=>e.userAgent?.device?.type??`desktop`)===`mobile`,g=f===`fullscreen`,_=g&&!h;vR(`esc`,e=>{e.defaultPrevented||g&&m(`displayMode`,`inline`)});let v=e?._meta?.ui?.resourceUri,y=!!(e&&t?.response),x=!!v;if(!e)return(0,B.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,B.jsx)(RZ,{text:`Choose a tool from the sidebar to begin`})});if(!y)return(0,B.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=I_(n),o=a>=N_,s=n?.isError===!0,c=t?.durationMs;return(0,B.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,B.jsxs)(Ho,{orientation:`horizontal`,id:HZ,className:`flex min-h-0 min-w-0 flex-1 overflow-hidden`,defaultLayout:u,onLayoutChanged:d,children:[(0,B.jsx)(Yo,{id:UZ,minSize:320,className:`min-h-0 min-w-0`,children:(0,B.jsxs)(`div`,{className:`flex h-full min-h-0 min-w-0 flex-col overflow-hidden`,children:[(0,B.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,B.jsxs)(`div`,{className:`flex items-center gap-2 font-medium`,children:[`Tool output`,o&&(0,B.jsx)(wR,{kind:`tool-output`})]}),(0,B.jsxs)(`div`,{className:`ml-auto flex items-center gap-2 font-mono text-xs text-light-gray-foreground`,children:[(0,B.jsx)(`span`,{className:s?`text-destructive`:`text-success`,children:s?`Error`:`OK`}),c==null?null:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`span`,{children:`·`}),(0,B.jsxs)(`span`,{children:[c,`ms`]})]}),(0,B.jsx)(`span`,{children:`·`}),(0,B.jsx)(`span`,{children:$j(i)})]})]}),(0,B.jsxs)(`section`,{className:`flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-light-gray`,children:[o&&(0,B.jsx)(TR,{kind:`tool-output`,tokenCount:a}),(0,B.jsxs)(`div`,{className:`relative min-h-0 flex-1 overflow-auto p-3`,children:[(0,B.jsx)(nM,{value:r,label:`Copy tool output`,className:`absolute right-2 top-2 z-10`}),(0,B.jsx)(VB,{code:r})]})]})]})}),(0,B.jsx)(Qo,{className:`w-px shrink-0 bg-border transition-colors hover:bg-ring data-separator-active:bg-ring`}),(0,B.jsx)(Yo,{id:VZ,defaultSize:360,minSize:240,maxSize:640,className:`min-h-0`,children:(0,B.jsx)(FZ,{},e.name)})]})})}return(0,B.jsxs)(`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,B.jsx)(IZ,{expanded:i??!1,onToggle:()=>a(!i)}),(0,B.jsxs)(Ho,{orientation:`vertical`,id:WZ,className:`flex min-h-0 min-w-0 flex-1 overflow-hidden`,defaultLayout:c,onLayoutChanged:l,children:[i&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(Yo,{id:GZ,defaultSize:200,minSize:80,maxSize:500,className:`min-h-0`,children:(0,B.jsx)(LZ,{})}),(0,B.jsx)(Qo,{className:`h-px shrink-0 bg-border transition-colors hover:bg-ring data-separator-active:bg-ring`})]}),(0,B.jsx)(Yo,{id:KZ,minSize:200,className:`min-h-0 min-w-0`,children:(0,B.jsxs)(Ho,{orientation:`horizontal`,id:zZ,className:`flex h-full min-h-0 min-w-0 overflow-hidden`,defaultLayout:o,onLayoutChanged:s,children:[(0,B.jsx)(Yo,{id:BZ,minSize:320,className:`min-h-0 min-w-0`,children:(0,B.jsxs)(`div`,{className:Y(`flex flex-col overflow-hidden`,g?`absolute inset-0 z-50 bg-background`:`relative h-full min-h-0`),children:[(0,B.jsx)(PL,{logsOpen:n??!1,onOpenLogs:()=>r(!0)}),(0,B.jsx)(`div`,{className:Y(`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,B.jsx)(b.Suspense,{fallback:(0,B.jsx)(RZ,{text:`Loading view…`}),children:(0,B.jsx)(GL,{})})}),g&&(0,B.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,B.jsx)(ki,{className:`size-4`})})]})}),n&&!g&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(Qo,{className:`w-px shrink-0 bg-border transition-colors hover:bg-ring data-separator-active:bg-ring`}),(0,B.jsx)(Yo,{id:VZ,defaultSize:360,minSize:240,maxSize:640,className:`min-h-0`,children:(0,B.jsx)(FZ,{onClose:()=>r(!1)},e.name)})]})]})})]})]})},JZ=Object.defineProperty,YZ=(e,t)=>JZ(e,`name`,{value:t,configurable:!0});function XZ(e){let t=e+`CollectionProvider`,[n,r]=mN(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=YZ(e=>{let{scope:t,children:n}=e,r=b.useRef(null),a=b.useRef(new Map).current;return(0,B.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);o.displayName=t;let s=e+`CollectionSlot`,c=xN(s),l=b.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=uN(t,a(s,n).collectionRef);return(0,B.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=xN(u),p=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=b.useRef(null),s=uN(t,o),c=a(u,n);return b.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,B.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 YZ(m,`useCollection`),[{Provider:o,Slot:l,ItemSlot:p},m,r]}YZ(XZ,`createCollection`);var ZZ=new WeakMap,QZ=class e extends Map{static{YZ(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],ZZ.set(this,!0)}set(e,t){return ZZ.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=tQ(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=$Z(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=$Z(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return $Z(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 $Z(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=eQ(e,t);return n===-1?void 0:e[n]}YZ($Z,`at`);function eQ(e,t){let n=e.length,r=tQ(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}YZ(eQ,`toSafeIndex`);function tQ(e){return e!==e||e===0?0:Math.trunc(e)}YZ(tQ,`toSafeInteger`);function nQ(e){let t=e+`CollectionProvider`,[n,r]=mN(t),[i,a]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new QZ,setItemMap:YZ(()=>void 0,`setItemMap`)}),o=YZ(({state:e,...t})=>e?(0,B.jsx)(c,{...t,state:e}):(0,B.jsx)(s,{...t}),`CollectionProvider`);o.displayName=t;let s=YZ(e=>{let t=h();return(0,B.jsx)(c,{...e,state:t})},`CollectionInit`);s.displayName=t+`Init`;let c=YZ(e=>{let{scope:t,children:n,state:r}=e,a=b.useRef(null),[o,s]=b.useState(null),c=uN(a,s),[l,u]=r;return b.useEffect(()=>{if(!o)return;let e=oQ(()=>{});return e.observe(o,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[o]),(0,B.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=xN(l),d=b.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=uN(t,a(l,n).collectionRef);return(0,B.jsx)(u,{ref:i,children:r})});d.displayName=l;let f=e+`CollectionItemSlot`,p=xN(f),m=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=b.useRef(null),[s,c]=b.useState(null),l=uN(t,o,c),{setItemMap:u}=a(f,n),d=b.useRef(i);rQ(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(aQ):(t.set(s,{...e,element:s}),t.toSorted(aQ)):t),()=>{u(e=>!s||!e.has(s)?e:(e.delete(s),new QZ(e)))}},[s,m,u]),(0,B.jsx)(p,{"data-radix-collection-item":``,ref:l,children:r})});m.displayName=f;function h(){return b.useState(new QZ)}YZ(h,`useInitCollection`);function g(t){let{itemMap:n}=a(e+`CollectionConsumer`,t);return n}return YZ(g,`useCollection`),[{Provider:o,Slot:d,ItemSlot:m},{createCollectionScope:r,useCollection:g,useInitCollection:h}]}YZ(nQ,`createCollection`);function rQ(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}YZ(rQ,`shallowEqual`);function iQ(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}YZ(iQ,`isElementPreceding`);function aQ(e,t){return!e[1].element||!t[1].element?0:iQ(e[1].element,t[1].element)?-1:1}YZ(aQ,`sortByDocumentPosition`);function oQ(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}YZ(oQ,`getChildListObserver`);var sQ=Object.defineProperty,cQ=(e,t)=>sQ(e,`name`,{value:t,configurable:!0}),lQ=`Collapsible`,[uQ,dQ]=mN(lQ),[fQ,pQ]=uQ(lQ),mQ=b.forwardRef(cQ(function(e,t){let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[c,l]=zP({prop:r,defaultProp:i??!1,onChange:o,caller:lQ});return(0,B.jsx)(fQ,{scope:n,disabled:a,contentId:aP(),open:c,onOpenToggle:b.useCallback(()=>l(e=>!e),[l]),children:(0,B.jsx)(FN.div,{"data-state":bQ(c),"data-disabled":a?``:void 0,...s,ref:t})})},`Collapsible`)),hQ=`CollapsibleTrigger`,gQ=b.forwardRef(cQ(function(e,t){let{__scopeCollapsible:n,...r}=e,i=pQ(hQ,n);return(0,B.jsx)(FN.button,{type:`button`,"aria-controls":i.open?i.contentId:void 0,"aria-expanded":i.open||!1,"data-state":bQ(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:tN(e.onClick,i.onOpenToggle)})},`CollapsibleTrigger`)),_Q=`CollapsibleContent`,vQ=b.forwardRef(cQ(function(e,t){let{forceMount:n,...r}=e,i=pQ(_Q,e.__scopeCollapsible);return(0,B.jsx)(kP,{present:n||i.open,children:({present:e})=>(0,B.jsx)(yQ,{...r,ref:t,present:e})})},`CollapsibleContent`)),yQ=b.forwardRef(cQ(function(e,t){let{__scopeCollapsible:n,present:r,children:i,...a}=e,o=pQ(_Q,n),[s,c]=b.useState(r),l=b.useRef(null),u=uN(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)},[]),eP(()=>{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,B.jsx)(FN.div,{"data-state":bQ(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 bQ(e){return e?`open`:`closed`}cQ(bQ,`getState`);var xQ=Object.defineProperty,SQ=(e,t)=>xQ(e,`name`,{value:t,configurable:!0}),CQ=b.createContext(void 0);function wQ(e){let t=b.useContext(CQ);return e||t||`ltr`}SQ(wQ,`useDirection`);var TQ=Object.defineProperty,EQ=(e,t)=>TQ(e,`name`,{value:t,configurable:!0}),DQ=`Accordion`,OQ=[`Home`,`End`,`ArrowDown`,`ArrowUp`,`ArrowLeft`,`ArrowRight`],[kQ,AQ,jQ]=XZ(DQ),[MQ,Jce]=mN(DQ,[jQ,dQ]),NQ=dQ(),PQ=b.forwardRef(EQ(function(e,t){let{type:n,...r}=e,i=r,a=r;return(0,B.jsx)(kQ.Provider,{scope:e.__scopeAccordion,children:n===`multiple`?(0,B.jsx)(BQ,{...a,ref:t}):(0,B.jsx)(zQ,{...i,ref:t})})},`Accordion`)),[FQ,IQ]=MQ(DQ),[LQ,RQ]=MQ(DQ,{collapsible:!1}),zQ=b.forwardRef(EQ(function(e,t){let{value:n,defaultValue:r,onValueChange:i=EQ(()=>{},`onValueChange`),collapsible:a=!1,...o}=e,[s,c]=zP({prop:n,defaultProp:r??``,onChange:i,caller:DQ});return(0,B.jsx)(FQ,{scope:e.__scopeAccordion,value:b.useMemo(()=>s?[s]:[],[s]),onItemOpen:c,onItemClose:b.useCallback(()=>a&&c(``),[a,c]),children:(0,B.jsx)(LQ,{scope:e.__scopeAccordion,collapsible:a,children:(0,B.jsx)(UQ,{...o,ref:t})})})},`AccordionImplSingle`)),BQ=b.forwardRef(EQ(function(e,t){let{value:n,defaultValue:r,onValueChange:i=EQ(()=>{},`onValueChange`),...a}=e,[o,s]=zP({prop:n,defaultProp:r??[],onChange:i,caller:DQ}),c=b.useCallback(e=>s((t=[])=>[...t,e]),[s]),l=b.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return(0,B.jsx)(FQ,{scope:e.__scopeAccordion,value:o,onItemOpen:c,onItemClose:l,children:(0,B.jsx)(LQ,{scope:e.__scopeAccordion,collapsible:!0,children:(0,B.jsx)(UQ,{...a,ref:t})})})},`AccordionImplMultiple`)),[VQ,HQ]=MQ(DQ),UQ=b.forwardRef(EQ(function(e,t){let{__scopeAccordion:n,disabled:r,dir:i,orientation:a=`vertical`,...o}=e,s=uN(b.useRef(null),t),c=AQ(n),l=wQ(i)===`ltr`,u=tN(e.onKeyDown,e=>{if(!OQ.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=EQ(()=>{o=r+1,o>s&&(o=0)},`moveNext`),d=EQ(()=>{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,B.jsx)(VQ,{scope:n,disabled:r,direction:i,orientation:a,children:(0,B.jsx)(kQ.Slot,{scope:n,children:(0,B.jsx)(FN.div,{...o,"data-orientation":a,ref:s,onKeyDown:r?void 0:u})})})},`AccordionImpl`)),WQ=`AccordionItem`,[GQ,KQ]=MQ(WQ),qQ=b.forwardRef(EQ(function(e,t){let{__scopeAccordion:n,value:r,...i}=e,a=HQ(WQ,n),o=IQ(WQ,n),s=NQ(n),c=aP(),l=r&&o.value.includes(r)||!1,u=a.disabled||e.disabled;return(0,B.jsx)(GQ,{scope:n,open:l,disabled:u,triggerId:c,children:(0,B.jsx)(mQ,{"data-orientation":a.orientation,"data-state":e$(l),...s,...i,ref:t,disabled:u,open:l,onOpenChange:e=>{e?o.onItemOpen(r):o.onItemClose(r)}})})},`AccordionItem`)),JQ=`AccordionHeader`,YQ=b.forwardRef(EQ(function(e,t){let{__scopeAccordion:n,...r}=e,i=HQ(DQ,n),a=KQ(JQ,n);return(0,B.jsx)(FN.h3,{"data-orientation":i.orientation,"data-state":e$(a.open),"data-disabled":a.disabled?``:void 0,...r,ref:t})},`AccordionHeader`)),XQ=`AccordionTrigger`,ZQ=b.forwardRef(EQ(function(e,t){let{__scopeAccordion:n,...r}=e,i=HQ(DQ,n),a=KQ(XQ,n),o=RQ(XQ,n),s=NQ(n);return(0,B.jsx)(kQ.ItemSlot,{scope:n,children:(0,B.jsx)(gQ,{"aria-disabled":a.open&&!o.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId,...s,...r,ref:t})})},`AccordionTrigger`)),QQ=`AccordionContent`,$Q=b.forwardRef(EQ(function(e,t){let{__scopeAccordion:n,...r}=e,i=HQ(DQ,n),a=KQ(QQ,n),o=NQ(n);return(0,B.jsx)(vQ,{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 e$(e){return e?`open`:`closed`}EQ(e$,`getState`);function t$({...e}){return(0,B.jsx)(PQ,{"data-slot":`accordion`,...e})}function n$({className:e,...t}){return(0,B.jsx)(qQ,{"data-slot":`accordion-item`,className:Mr(`border-b border-border-secondary`,e),...t})}function r$({className:e,children:t,...n}){return(0,B.jsx)($Q,{"data-slot":`accordion-content`,className:`overflow-hidden data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down`,...n,children:(0,B.jsx)(`div`,{className:Mr(`pb-4 type-text-sm text-muted-foreground`,e),children:t})})}var i$=!1;function a$(){let[e,t]=b.useState(i$);return b.useEffect(()=>{i$||(i$=!0,t(!0))},[]),e}var o$=b.useSyncExternalStore;function s$(){return()=>{}}function c$(){return o$(s$,()=>!0,()=>!1)}var l$=typeof o$==`function`?c$:a$,u$=Object.defineProperty,d$=(e,t)=>u$(e,`name`,{value:t,configurable:!0}),f$=`rovingFocusGroup.onEntryFocus`,p$={bubbles:!1,cancelable:!0},m$=`RovingFocusGroup`,[h$,g$,_$]=yF(m$),[v$,y$]=oE(m$,[_$]),[b$,x$]=v$(m$),S$=b.forwardRef(d$(function(e,t){return(0,B.jsx)(h$.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,B.jsx)(h$.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,B.jsx)(C$,{...e,ref:t})})})},`RovingFocusGroup`)),C$=b.forwardRef(d$(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=Fi(t,f),m=bF(a),[h,g]=Uk({prop:o,defaultProp:s??null,onChange:c,caller:m$}),[_,v]=b.useState(!1),y=cE(l),x=g$(n),S=b.useRef(!1),[C,w]=b.useState(0);return b.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(f$,y),()=>e.removeEventListener(f$,y)},[y]),(0,B.jsx)(b$,{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,B.jsx)(IT.div,{tabIndex:_||C===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:tE(e.onMouseDown,()=>{S.current=!0}),onFocus:tE(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(f$,p$);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>e.focusable);k$([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}S.current=!1}),onBlur:tE(e.onBlur,()=>v(!1))})})},`RovingFocusGroupImpl`)),w$=`RovingFocusGroupItem`,T$=b.forwardRef(d$(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=qE(),l=a||c,u=x$(w$,n),d=u.currentTabStopId===l,f=g$(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u,g=l$();return WE(()=>{if(!(!g||!r))return p(),()=>m()},[g,r,p,m]),b.useEffect(()=>{if(!(g||!r))return p(),()=>m()},[g,r,p,m]),(0,B.jsx)(h$.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,B.jsx)(IT.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:tE(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:tE(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:tE(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=O$(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?A$(n,r+1):n.slice(r+1)}setTimeout(()=>k$(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})},`RovingFocusGroupItem`)),E$={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function D$(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}d$(D$,`getDirectionAwareKey`);function O$(e,t,n){let r=D$(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return E$[r]}d$(O$,`getFocusIntent`);function k$(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}d$(k$,`focusFirst`);function A$(e,t){return e.map((n,r)=>e[(t+r)%e.length])}d$(A$,`wrapArray`);var j$=S$,M$=T$,N$=Object.defineProperty,P$=(e,t)=>N$(e,`name`,{value:t,configurable:!0}),F$=`Tabs`,[I$,Yce]=oE(F$,[y$]);y$();var[L$,R$]=I$(F$),z$=b.forwardRef(P$(function(e,t){let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=bF(s),[d,f]=Uk({prop:r,onChange:i,defaultProp:a??``,caller:F$});return(0,B.jsx)(L$,{scope:n,baseId:qE(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,B.jsx)(IT.div,{dir:u,"data-orientation":o,...l,ref:t})})},`Tabs`)),B$=`TabsContent`,V$=b.forwardRef(P$(function(e,t){let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=R$(B$,n),c=H$(s.baseId,r),l=U$(s.baseId,r),u=r===s.value,d=b.useRef(u);return b.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,B.jsx)(jk,{present:i||u,children:({present:n})=>(0,B.jsx)(IT.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 H$(e,t){return`${e}-trigger-${t}`}P$(H$,`makeTriggerId`);function U$(e,t){return`${e}-content-${t}`}P$(U$,`makeContentId`);var W$=z$,G$=V$;function K$({className:e,orientation:t=`horizontal`,...n}){return(0,B.jsx)(W$,{"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 q$({className:e,...t}){return(0,B.jsx)(G$,{"data-slot":`tabs-content`,className:Mr(`flex-1 outline-none`,e),...t})}(0,b.createContext)({orientation:`horizontal`,variant:`line`});function J$(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 Y$(e){return e.additionalItems===!0&&console.warn(`additionalItems=true is currently not supported`),J$(e.additionalItems)}function X$(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 Z$=Symbol(`__additional_property`),Q$=`additionalProperties`,$$=`allOf`,e1=`anyOf`,t1=`const`,n1=`default`,r1=`__errors`,i1=`items`,a1=`_$junk_option_schema_id$_`,o1=`$name`,s1=`oneOf`,c1=`properties`,l1=`readonly`,u1=`required`,d1=`submitButtonOptions`,f1=`$ref`,p1=Symbol(`__rjsf_ref`),m1=Symbol(`__rjsf_ref_cycle`),h1=`root`,g1=[`discriminator`,`propertyName`],_1=`formContext`,v1=`layoutGridLookupMap`,y1=`__rjsf`,b1=`${y1}_additionalProperties`,x1=`${y1}_rootSchema`,S1=`ui:options`,C1=`ui:globalOptions`;function w1(e={},t={}){return e?Object.keys(e).filter(e=>e.startsWith(`ui:`)).reduce((t,n)=>{let r=e[n];return n===`ui:widget`&&J$(r)?(console.error(`Setting options via ui:widget object is no longer supported, use ui:options instead`),t):n===`ui:options`&&J$(r)?{...t,...r}:{...t,[n.substring(3)]:r}},{...t}):{...t}}function T1(e,t={},n){if(!(e.additionalProperties||e.patternProperties))return!1;let{expandable:r=!0}=w1(t);return r===!1?r:e.maxProperties!==void 0&&n?Object.keys(n).length<e.maxProperties:!0}function E1(e){let t={[r1]:[],addError(e){this[r1].push(e)}};if(Array.isArray(e))return e.reduce((e,t,n)=>({...e,[n]:E1(t)}),t);if(Hb(e)){let n=e;return Object.keys(n).reduce((e,t)=>({...e,[t]:E1(n[t])}),t)}return t}var{getOwnPropertyNames:D1,getOwnPropertySymbols:O1}=Object,{hasOwnProperty:k1}=Object.prototype;function A1(e,t){return function(n,r,i){return e(n,r,i)&&t(n,r,i)}}function j1(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 M1(e){return D1(e).concat(O1(e))}var N1=Object.hasOwn||((e,t)=>k1.call(e,t)),P1=`__v`,F1=`__o`,I1=`_owner`,{getOwnPropertyDescriptor:L1,keys:R1}=Object,z1=Object.is||function(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t};function B1(e,t){return e===t}function V1(e,t){return e.byteLength===t.byteLength&&Q1(new Uint8Array(e),new Uint8Array(t))}function H1(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 U1(e,t){return e.byteLength===t.byteLength&&Q1(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function W1(e,t){return z1(e.getTime(),t.getTime())}function G1(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function K1(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 q1(e,t,n){let r=R1(e),i=r.length;if(R1(t).length!==i)return!1;for(;i-->0;)if(!e0(e,t,n,r[i]))return!1;return!0}function J1(e,t,n){let r=M1(e),i=r.length;if(M1(t).length!==i)return!1;let a,o,s;for(;i-->0;)if(a=r[i],!e0(e,t,n,a)||(o=L1(e,a),s=L1(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function Y1(e,t){return z1(e.valueOf(),t.valueOf())}function X1(e,t){return e.source===t.source&&e.flags===t.flags}function Z1(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 Q1(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 $1(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 e0(e,t,n,r){return(r===I1||r===F1||r===P1)&&(e.$$typeof||t.$$typeof)?!0:N1(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var t0=Object.prototype.toString;function n0(e){let t=o0(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=t0.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 r0({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:V1,areArraysEqual:n?J1:H1,areDataViewsEqual:U1,areDatesEqual:W1,areErrorsEqual:G1,areFunctionsEqual:B1,areMapsEqual:n?A1(K1,J1):K1,areNumbersEqual:z1,areObjectsEqual:n?J1:q1,arePrimitiveWrappersEqual:Y1,areRegExpsEqual:X1,areSetsEqual:n?A1(Z1,J1):Z1,areTypedArraysEqual:n?A1(Q1,J1):Q1,areUrlsEqual:$1,getUnsupportedCustomComparator:void 0};if(t&&(r=Object.assign({},r,t(r))),e){let e=j1(r.areArraysEqual),t=j1(r.areMapsEqual),n=j1(r.areObjectsEqual),i=j1(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:e,areMapsEqual:t,areObjectsEqual:n,areSetsEqual:i})}return r}function i0(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function a0({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 o0({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}}s0(),s0({strict:!0}),s0({circular:!0}),s0({circular:!0,strict:!0}),s0({createInternalComparator:()=>z1}),s0({strict:!0,createInternalComparator:()=>z1}),s0({circular:!0,createInternalComparator:()=>z1}),s0({circular:!0,createInternalComparator:()=>z1,strict:!0});function s0(e={}){let{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,a=n0(r0(e));return a0({circular:t,comparator:a,createState:r,equals:n?n(a):i0(a),strict:i})}var c0=s0({circular:!0,createCustomConfig:()=>({areFunctionsEqual(e,t){return typeof t==`function`}})}),l0=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}})),u0=s(((e,t)=>{var{isUUID:n}=l0(),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}})),d0=s(((e,t)=>{var{normalizeIPv6:n,removeDotSegments:r,recomposeAuthority:i,normalizePercentEncoding:a,normalizePathEncoding:o,normalizeQueryFragmentEncoding:s,escapePreservingEscapes:c,reescapeHostDelimiters:l,isIPv4:u,nonSimpleDomain:d}=l0(),{SCHEMES:f,getSchemeHandler:p}=u0();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})),f0=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})),p0=u(d0(),1),m0=u(f0(),1);function h0(e,t){if(`$id`in e&&p0.default.equal(e.$id,t))return e;for(let n of Object.values(e))if(Array.isArray(n)){for(let e of n)if(cv(e)){let n=h0(e,t);if(n!==void 0)return n}}else if(cv(n)){let e=h0(n,t);if(e!==void 0)return e}}function g0(e,t){let n=J(e,`$id`,t),r=e;`$ref`in r&&(r={...r,[f1]:p0.default.resolve(n,r[f1])});for(let[e,t]of Object.entries(r))Array.isArray(t)?r={...r,[e]:t.map(e=>cv(e)?g0(e,n):e)}:cv(t)&&(r={...r,[e]:g0(t,n)});return r}function _0(e,t){let n=t[e];return[lw(t,[e]),n]}function v0(e,t={},n=[],r=J(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=m0.get(t,e):t.$schema===`https://json-schema.org/draft/2020-12/schema`&&(a=h0(t,o.replace(/\/$/,``)),a!==void 0&&(a=m0.get(a,e)))}else if(t.$schema===`https://json-schema.org/draft/2020-12/schema`){let[e,...n]=(o?p0.default.resolve(o,i):i).replace(/#\/?$/,``).split(`#`);a=h0(t,e.replace(/\/$/,``)),a!==void 0&&(o=a.$id,rw(n)||(a=m0.get(a,decodeURIComponent(n.join(`#`)))))}if(a===void 0)throw Error(`Could not find a definition for ${e}.`);let s=a[f1];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]=_0(f1,a),l=v0(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`?{[$$]:[r,l]}:{...r,...l}:l}return a}function y0(e,t={},n=J(t,[`$id`])){return v0(e,t,[],n)}function b0(e){let t,n=J(e,g1);return tw(n)?t=n:n!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof n}" instead`),t}function x0(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 S0(e){let{type:t}=e;return!t&&e.const?x0(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 C0(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&&J$(a)?n[r]=C0(i,a):e&&t&&(S0(e)===`object`||S0(t)===`object`)&&r===`required`&&Array.isArray(i)&&Array.isArray(a)?n[r]=zne(i,a):n[r]=a,n},n);for(let e of Object.getOwnPropertySymbols(t))r[e]=t[e];return r}function w0(e,t,n){if(e&&n){let r=J(e,n);if(r===void 0)return;for(let e=0;e<t.length;e+=1){let i=t[e],a=J(i,[c1,n],{});if(a.type!==`object`&&a.type!==`array`&&(a.const===r||a.enum?.includes(r)))return e}}}function T0(e,t,n,r,i){if(t===void 0)return 0;let a=w0(t,n,i);if(aw(a))return a;for(let a=0;a<n.length;a+=1){let o=n[a];if(i&&ew(o,[`properties`,i])){let n=J(t,i),s=J(o,[c1,i],{});if(e.isValid(s,n,r))return a}else if(o.properties){let n={anyOf:Object.keys(o[c1]).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 Xce=Object.prototype;function E0(e){for(let t in e)if(Xce.hasOwnProperty.call(e,t))return!1;return!0}var D0=[`$defs`,`definitions`,`properties`,`patternProperties`,`dependencies`];new Set(D0);var O0=[`items`,`allOf`,`oneOf`,`anyOf`];new Set(O0);var k0=[`items`,`additionalItems`,`additionalProperties`,`propertyNames`,`contains`,`if`,`then`,`else`,`not`];new Set(k0),[...D0,...O0,...k0];function A0(e){return typeof e==`object`}function j0(e){return A0(e)?E0(e):e===!0}function M0(e,t){return e<t?-1:+(e>t)}function N0(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 Zce(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 P0(e){return e.length===0}function F0(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 I0(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 Qce(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 $ce(e,t){return n=>{if(e.has(n))return e.get(n);let r=t(n);return e.set(n,r),r}}var L0=$ce,R0=()=>0,ele=e=>e===void 0,tle=e=>typeof e!=`object`,z0={boolean:0,number:1,string:2};function nle(e,t){let n=typeof e,r=typeof t;return n===r?M0(e,t):z0[n]-z0[r]}function rle(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 B0(e,t,n=R0){return(r,i)=>e(r)?e(i)?n(r,i):-1:e(i)?1:t(r,i)}function V0(e){return B0(ele,e)}function H0(e,t){return B0(t=>t===void 0||e(t),t)}function U0(e,t){return B0(Array.isArray,e,t)}var W0=V0(M0),G0=H0(e=>e===0,(e,t)=>e-t);function ile({deduplicationCache:e=new WeakMap,sortedKeysCache:t=new WeakMap}={}){let n=L0(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=M0(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=F0(t),r=L0(e,I0(t,{threshold:0}));return(e,t)=>n(r(e),r(t))}let a=i(M0);function o(e,t){if(A0(e)){if(A0(t)){let n=rle(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&&E0(e)?0:1}return A0(t)?e===!0&&E0(t)?0:-1:M0(e,t)}let s=V0(l),c=B0(tle,U0(r(s),F0(l)),nle);function l(e,t){return e===null?-1:t===null?1:c(e,t)}let u=V0(o),d=H0(E0,r(u)),f=V0(i(o)),p=H0(j0,o),m={$id:W0,$comment:W0,$defs:d,$ref:W0,$schema:W0,const:s,contains:u,contentEncoding:W0,contentMediaType:W0,default:s,definitions:d,description:W0,else:u,examples:s,exclusiveMaximum:W0,exclusiveMinimum:W0,format:W0,if:u,maximum:W0,maxItems:W0,maxLength:W0,maxProperties:W0,minimum:W0,multipleOf:W0,not:u,pattern:W0,propertyNames:u,readOnly:W0,then:u,title:W0,writeOnly:W0,uniqueItems:H0(e=>e===!1,R0),minLength:G0,minItems:G0,minProperties:G0,required:H0(P0,a),enum:H0(P0,i(l)),type:V0((e,t)=>{let n=Array.isArray(e),r=Array.isArray(t);return!n&&!r?M0(e,t):a(n?e:[e],r?t:[t])}),items:H0(e=>!Array.isArray(e)&&j0(e),U0(o,F0(o))),anyOf:f,allOf:f,oneOf:f,properties:d,patternProperties:d,additionalProperties:p,additionalItems:p,dependencies:H0(E0,r(V0(U0(o,a))))};return{compareSchemaValues:l,compareSchemaDefinitions:o}}function K0(e){return e}var q0=(e,t)=>e?q0(t%e,e):t,ale=(e,t)=>Math.abs(e*t)/q0(e,t);function ole(e,t){return e===t?e:`^(?=.*(?:${e}))(?=.*(?:${t})).*$`}function J0(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 Y0(e,t){return e||t}function X0(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 sle(e){let t=new Map;for(let n of e)for(let e of n[0])t.set(e,n[1]);return t}function Z0(e,t,n){n===void 0||j0(n)?delete e[t]:e[t]=n}var cle=[`properties`,`patternProperties`,`additionalProperties`];function Q0(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 $0=[[],[]];function e2(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 lle=[`items`,`additionalItems`],ule=[`if`,`then`,`else`];function t2(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 n2(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 r2(e,t,n){return[e,t,n]}function dle(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 fle=[r2(`minimum`,`maximum`,e=>e.maximum>=e.minimum),r2(`exclusiveMinimum`,`maximum`,e=>e.maximum>e.exclusiveMinimum),r2(`minimum`,`exclusiveMaximum`,e=>e.exclusiveMaximum>e.minimum),r2(`exclusiveMinimum`,`exclusiveMaximum`,e=>e.exclusiveMaximum>e.exclusiveMinimum),r2(`minLength`,`maxLength`,e=>e.maxLength>=e.minLength),r2(`minItems`,`maxItems`,e=>e.maxItems>=e.minItems),r2(`minProperties`,`maxProperties`,e=>e.maxProperties>=e.minProperties)];function ple({mergePatterns:e=ole,isSubRegExp:t=Object.is,intersectJson:n=Zce,deduplicateJsonSchemaDef:r=K0,defaultMerger:i=K0,assigners:a=[],checks:o=fle,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;j0(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(e2(e,t,a))return!1;let s=e.length<2;if(o===!1){if(s)return;if(e2(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=j0(a),f=j0(c);if(d&&f)return Z0(n,`properties`,v(r,o)),Z0(n,`patternProperties`,i&&s?v(i,s):i??s),delete n.additionalProperties,n;Z0(n,`additionalProperties`,_(a,c));let p={},m=Object.keys(r),h=m.length,[g,y]=i?Q0(i):$0,[b,x]=s?Q0(s):$0,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)}Z0(n,`properties`,p);let O={},k=new Set;return y.length>0&&x.length>0&&J0(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),Z0(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||j0(o);for(;l<c.length;l++)s.push(t?c[l]:_(c[l],o));Z0(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];Z0(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)=>{t2(e,t);let r=t2({},n);return e.allOf===void 0?e.allOf=[r]:e.allOf=e.allOf.concat(r),e};function m(e,t){let n=[];if(J0(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=sle([[cle,d],[lle,f],[ule,p],...a]),g=dle(o);function _(e,t){if(e===!1||t===!1)return!1;if(j0(e))return j0(t)?!0:t;if(j0(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=X0(_),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=n2(e,t);if(n!==void 0)return n}else if(n||r){let i=new Set;if(n&&r)J0(e,t,(e,t)=>{let n=n2(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=n2(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:Y0,writeOnly:Y0,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:X0((e,t)=>Array.isArray(e)?Array.isArray(t)?N0(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 N0(e,t)},multipleOf:(e,t)=>{let n=1;for(;!Number.isInteger(e)||!Number.isInteger(t);)n*=10,e*=10,t*=10;return ale(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:Y0,required:N0,...s};return{mergeSchemaDefinitions:_,mergeArrayOfSchemaDefinitions:c}}function mle(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 hle(e){return t=>e(mle(t))}var{compareSchemaDefinitions:gle,compareSchemaValues:_le}=ile(),{mergeArrayOfSchemaDefinitions:vle}=ple({intersectJson:Qce(_le),deduplicateJsonSchemaDef:I0(gle)}),i2=hle(vle);function a2(e,t,n={},r,i,a=!1){return d2(e,t,n,r,void 0,void 0,i,a)[0]}function o2(e){return typeof e==`boolean`?e?{}:{not:{}}:e}function yle(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(d2(e,t,n,a,r,i,o))}if(l&&typeof l!=`boolean`){let t=l;p=p.concat(d2(e,t,n,a,r,i,o))}}else{let t=d?c:l;if(t!==void 0){let s=o2(t);p=p.concat(d2(e,s,n,a,r,i,o))}}return p.length&&(f=p.map(e=>C0(u,e))),f.flatMap(t=>d2(e,t,n,a,r,i,o))}function s2(e){return e.reduce((e,t)=>t.length>1?t.flatMap(t=>hw(e.length,n=>[...e[n]].concat(t))):(e.forEach(e=>e.push(t[0])),e),[[]])}function c2(e,t){return Object.keys(e.patternProperties).filter(e=>RegExp(e).test(t)).reduce((t,n)=>(pw(t,[n],e.patternProperties[n]),t),{})}function ble(e,t,n,r,i,a,o,s){let c=l2(e,t,n,r,i,a,o,s);return c.length>1||c[0]!==t?c:`dependencies`in t?p2(e,t,n,r,i,a,o).flatMap(t=>d2(e,t,n,a,r,i,o)):`allOf`in t&&Array.isArray(t.allOf)?s2(t.allOf.map(t=>d2(e,t,n,a,r,i,o))).map(e=>({...t,allOf:e})):[t]}function l2(e,t,n,r,i,a,o,s){let c=u2(t,n,i,void 0,s);return c===t?[t]:d2(e,c,n,a,r,i,o,s)}function u2(e,t,n,r,i,a=!1){if(!J$(e))return e;let o=e,s=r;if(`$ref`in o){let{$ref:e,...r}=o;if(n.includes(e))return a?{...o,[m1]:!0}:o;n.push(e),o={...y0(e,t,s),...r,[p1]:e},`$id`in o&&(s=o.$id)}if(`properties`in o){let e=[],r=Ine(o[c1],(r,a,o)=>{let c=[...n];r[o]=u2(a,t,c,s,i,!i),e.push(c)},{});Cne(n,vw(sne(e))),o={...o,[c1]:r}}if(`items`in o&&!Array.isArray(o.items)&&typeof o.items!=`boolean`&&(o={...o,items:u2(o.items,t,n,s,i)}),i){let r,a;`anyOf`in e&&Array.isArray(e.anyOf)?(r=e1,a=o[e1]):`oneOf`in e&&Array.isArray(e.oneOf)&&(r=s1,a=o[s1]),r&&a&&(o={...o,[r]:a.map(e=>u2(e,t,n,s,i))})}return c0(e,o)?e:o}function xle(e,t,n,r,i){let a={...t,properties:{...t.properties}},o=r&&J$(r)?r:{};return Object.keys(o).forEach(t=>{if(!(t in a.properties)){if(`patternProperties`in a){let r=c2(a,t);if(!rw(r)){a.properties[t]=a2(e,{[$$]:Object.values(r)},n,J(o,[t]),i),a.properties[t][Z$]=!0;return}}if(`additionalProperties`in a&&a.additionalProperties!==!1){let r;r=typeof a.additionalProperties==`boolean`?{type:x0(J(o,[t]))}:`$ref`in a.additionalProperties?a2(e,{[f1]:J(a.additionalProperties,[f1])},n,J(o,[t]),i):`type`in a.additionalProperties?{...a.additionalProperties}:`anyOf`in a.additionalProperties||`oneOf`in a.additionalProperties?{type:`object`,...a.additionalProperties}:{type:x0(J(o,[t]))},a.properties[t]=r,a.properties[t][Z$]=!0}else a.properties[t]={type:`null`},a.properties[t][Z$]=!0}}),a}function Sle(e){return i2(e)}function d2(e,t,n,r,i=!1,a=[],o,s){return J$(t)?ble(e,t,n,i,a,r,o,s).flatMap(t=>{var s;let c=t;if(`if`in c)return yle(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):Sle(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:
222
+ `,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=c2(t,i);return rw(a)||(t.properties[i]=a2(e,{allOf:[t.properties[i],...Object.values(a)]},n,J(r,[i]),o)),t},{...c,properties:{...c.properties}})),`patternProperties`in c||`additionalProperties`in c&&c.additionalProperties!==!1?xle(e,c,n,r,o):c}):[{}]}function Cle(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=b0(t);a=a.map(e=>u2(e,n,[]));let l=T0(e,o,a,n,s);return r?(T0(e,o,f2(a,!1,n),n,s),a.map(e=>C0(c,e))):[C0(c,a[l])]}return[t]}function f2(e,t=!1,n){return e.map(e=>{if(!J$(e))return o2(e);let r=t&&n?u2(e,n,[]):e;return r.additionalProperties===!1?{...r,additionalProperties:!0}:r})}function p2(e,t,n,r,i,a,o){let{dependencies:s,...c}=t;return Cle(e,c,n,r,a).flatMap(t=>m2(e,s,t,n,r,i,a,o))}function m2(e,t,n,r,i,a,o,s){let c=[n];for(let l in t)if((i||J(o,[l])!==void 0)&&(!n.properties||l in n.properties)){let[u,d]=_0(l,t);return Array.isArray(d)?c[0]=wle(n,d):J$(d)&&(c=Tle(e,n,r,l,d,i,a,o,s)),c.flatMap(t=>m2(e,u,t,r,i,a,o,s))}return c}function wle(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 Tle(e,t,n,r,i,a,o,s,c){return d2(e,i,n,s,a,o,c).flatMap(i=>{let{oneOf:l,...u}=i,d=C0(t,u);return l===void 0?d:s2(l.map(t=>typeof t==`boolean`||!(`$ref`in t)?[t]:l2(e,t,n,a,o,s))).flatMap(t=>Ele(e,d,n,r,t,a,o,s,c))})}function Ele(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]=_0(r,l.properties);return d2(e,{...l,properties:u},n,s,a,o,c).map(e=>C0(t,e))})}function h2(e,t,n,r,i,a={},o){if(Array.isArray(n[i])){let s=b0(n)||r,c=n[i].map(n=>a2(e,n,t,a,o)),l=J(a,s);if(l!==void 0)return c.find(e=>c0(J(e,[c1,s,n1],J(e,[c1,s,t1])),l))}}function g2(e,t,n,r,i){let a=n;if(ew(n,`$ref`)&&(a=a2(e,n,t,void 0,i)),rw(r))return a;let[o,...s]=Array.isArray(r)?[...r]:r.split(`.`);if(o!==void 0&&o!==``&&ew(a,o))return a=J(a,o),g2(e,t,a,s,i)}function _2(e,t,n,r,i,a){let o=g2(e,t,n,r,a);return o===void 0?i:o}var v2={title:`!@#$_UNKNOWN_$#@!`};function Dle(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=_2(e,t,s,[c1,n],{},a),ew(s,`oneOf`)?s=h2(e,t,s,l,s1,J(i,n),a):ew(s,`anyOf`)&&(s=h2(e,t,s,l,e1,J(i,n),a))}),ew(s,`oneOf`)?s=h2(e,t,s,l,s1,i,a):ew(s,`anyOf`)&&(s=h2(e,t,s,l,e1,i,a));let u=_2(e,t,s,[c1,c],v2,a);u===v2&&(u=void 0);let d=_2(e,t,s,u1,[],a),f;return u&&Array.isArray(d)&&(f=d.includes(l)),{field:u,isRequired:f}}var Ole={type:`object`,$id:a1,properties:{__not_really_there__:{type:`number`}}};function y2(e,t,n,r,i){let a=0;return n&&(cv(n.properties)?a+=Mne(n.properties,(n,a,o)=>{let s=J(r,o);if(typeof a==`boolean`)return n;if(ew(a,`$ref`))return n+y2(e,t,a2(e,a,t,s,i),s||{},i);if((ew(a,`oneOf`)||ew(a,`anyOf`))&&s){let r=ew(a,`oneOf`)?s1:e1,o=b0(a);return n+b2(e,t,s,J(a,r),-1,o,i)}if(a.type===`object`)return n+ +!!cv(s)+y2(e,t,a,s,i);if(a.type===x0(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):tw(n.type)&&n.type===x0(r)&&(a+=1)),a}function b2(e,t,n,r,i=-1,a,o){let s=r.map(e=>u2(e,t,[])),c=w0(n,r,a);if(aw(c))return c;let l=s.reduce((r,i,o)=>(T0(e,n,[Ole,i],t,a)===1&&r.push(o),r),[]);if(l.length===1)return l[0];l.length||hw(s.length,e=>l.push(e));let u=new Set,{bestIndex:d}=l.reduce((r,i)=>{let{bestScore:a}=r,c=s[i],l=y2(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 x2(e){let t=e[t1],n=S0(e);return J$(t)&&tw(t?.$data)&&n!==`object`&&n!==`array`}function S2(e){return Array.isArray(e.enum)&&e.enum.length===1||`const`in e}function C2(e){return Array.isArray(e.items)&&e.items.every(e=>J$(e))}function w2(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:w2(a[o],t[o],n,r,i));return(n||i)&&c.length<s.length&&c.push(...s.slice(c.length)),c}if(J$(t)){let a=Object.assign({},e);return Object.keys(t).reduce((o,s)=>{let c=J(t,s),l=J$(e)&&s in e,u=s in t,d=J(e,s)??{},f=l&&J$(d)&&Object.values(d).some(e=>J$(e)),p=l&&J$(J(e,s)),m=u&&J$(c);return p&&m&&!f?(o[s]={...J(e,s),...c},o):(o[s]=w2(J(e,s),c,n,r,i&&(l||!u)),a)},a)}return r&&(e!==void 0&&ow(t)||typeof t==`number`&&Number.isNaN(t))||i&&!ow(t)?e:t}function T2(e,t,n=!1){return Object.keys(t).reduce((r,i)=>{let a=e?e[i]:{},o=t[i];if(e&&i in e&&J$(o))r[i]=T2(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 kle(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 Ale(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 E2(e,t){if(e.enum){let n,r;if(t){let{enumNames:e,enumOrder:i}=w1(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=Ale(i,r)),i}let n,r;e.anyOf?(n=e.anyOf,r=t?.anyOf):e.oneOf&&(n=e.oneOf,r=t?.oneOf);let i=b0(e);if(t){let{optionsSchemaSelector:e=i}=w1(t);i=e}return n?.map((e,t)=>{let{title:n}=w1(r?.[t]),a=e,o,s=n;if(i){let e=J(a,[c1,i],{});o=J(e,n1,J(e,t1)),s=s??e?.title??a.title??String(o)}else o=kle(a),s=s??a.title??String(o);return{schema:a,label:s,value:o}})}function D2(e,t,n={},r){let i=a2(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`&&S2(e)):!1}function O2(e,t,n,r){return!t.uniqueItems||!t.items||typeof t.items==`boolean`?!1:D2(e,t.items,n,r)}var jle=[`string`,`number`,`integer`,`boolean`,`null`],k2;(function(e){e[e.Ignore=0]=`Ignore`,e[e.Invert=1]=`Invert`,e[e.Fallback=2]=`Fallback`})(k2||={});function A2(e,t=k2.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!==k2.Ignore&&J$(e.additionalItems)?e.additionalItems:{}}function j2(e,t){let{default:n,type:r}=e;return Array.isArray(r)&&r.includes(`null`)&&rw(t)&&n===null?null:t}function M2(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||!J$(n)||!rw(n))&&(e[t]=n);else if(l!==`skipDefaults`){let r=i===void 0?a.includes(t):i;J$(n)?l===`skipEmptyDefaults`?rw(n)||(e[t]=n):(!rw(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 N2(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=J$(i)?i:{},m=J$(t)?t:{},h=r,g=h&&c?.nestedDefaultsPrecedence===`ancestorWins`,_=null,v=c,y=s;if(m.const!==void 0&&c?.constAsDefaults!==`never`&&!x2(m))h=m[t1];else if(J$(h)&&J$(m.default)&&!m.anyOf&&!m.oneOf&&!m.$ref)h=g?T2(m.default,h):T2(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[f1];s.includes(e)||(y=s.concat(e),_=y0(e,a));let t=i===void 0||J$(i)&&rw(i);_&&!h&&t&&(h=m.default),d&&_&&!J$(i)&&(p=i)}else if(`dependencies`in m){let t=p2(e,m,a,!1,[],{...F2(e,m,n,h),...p},l);[_]=t}else if(C2(m)&&!g)h=m.items.map((t,n)=>N2(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=b0(m),{type:o=`null`}=n;!Array.isArray(o)&&jle.includes(o)&&v?.constAsDefaults===`skipOneOf`&&(v={...v,constAsDefaults:`never`}),_=t[b2(e,a,i??m.default,t,0,r,l)],_=C0(n,_)}else if(`anyOf`in m){let{anyOf:t,...n}=m;if(t.length===0)return;let r=b0(m);_=t[b2(e,a,i??m.default,t,0,r,l)],_=C0(n,_)}if(_)return N2(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=F2(e,m,n,h)??h;if(d){let{arrayMinItems:t={}}=c||{},{mergeExtraDefaults:n}=t,r=P2(e,m,a,i,c,l);(!J$(i)||`allOf`in m)&&(b=w2(b,r,n,!0))}return b}function P2(e,t,n,r,i,a){let o=i?.allOf===`populateDefaults`&&`allOf`in t,s=o?a2(e,t,n,r,a):t,c=!S2(s)&&D2(e,s,n,a),l=r;return c&&(l=E2(s)?.some(e=>c0(e.value,r))?r:void 0),s.const&&i?.constAsDefaults===`always`?l=s.const:J$(l)&&J$(s.properties)&&(l=Object.keys(s.properties).reduce((t,r)=>{let c=J(s,[c1,r],{});return r in t&&(o||J$(c)&&`allOf`in c)&&(t[r]=P2(e,c,n,J(t,r),i,a)),t},{...l})),l}function Mle(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=J$(n)?n:{},p=t,m=o?.allOf===`populateDefaults`&&`allOf`in p||o?.emptyObjectFields!==`skipEmptyDefaults`&&`if`in p?a2(e,p,r,f,s):p,h=m[t1],g=Object.keys(m.properties||{}).reduce((t,n)=>{let p=J(m,[c1,n],{}),g=J$(h)&&h[n]!==void 0,_=(J$(p)&&`const`in p||g)&&o?.constAsDefaults!==`never`&&!x2(p);return M2(t,n,N2(e,p,{rootSchema:r,_recurseList:a,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:s,includeUndefinedValues:i===!0,parentDefaults:J(d,[n]),rawFormData:J(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=J$(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)}),J$(d)&&p.length===0&&Object.keys(d).filter(e=>!m.properties||!m.properties[e]).forEach(e=>n.add(e)),n.forEach(n=>{let h=N2(e,t,{rootSchema:r,_recurseList:a,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:s,includeUndefinedValues:i===!0,parentDefaults:J(d,[n]),rawFormData:J(f,[n]),required:m.required?.includes(n),shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u});M2(g,n,h,i,c,p)})}return j2(t,g)}}function Nle(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)=>N2(e,A2(p,k2.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=A2(p);if(_)f=n;else{let c=n.map((n,c)=>N2(e,t,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,rawFormData:n,parentDefaults:J(f,[c]),required:s,shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}));f=w2(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||O2(e,p,r,o)||b(e,p,r)||p.minItems<=S)C=f||!s&&!c?f:x;else{let t=f||[],n=A2(p,k2.Invert),c=n.default,u=Array.from({length:p.minItems-S},()=>N2(e,n,{parentDefaults:c,rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,required:s,shouldMergeDefaultsIntoFormData:l}));C=t.concat(u)}return j2(t,C)}function F2(e,t,n={},r){switch(S0(t)){case`object`:return Mle(e,t,n,r);case`array`:return Nle(e,t,n,r);default:return}}function I2(e,t,n,r,i=!1,a,o,s){if(!J$(t))throw Error(`Invalid schema: ${t}`);let c=a2(e,t,r,n,o),l=N2(e,c,{rootSchema:r,includeUndefinedValues:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,rawFormData:n,shouldMergeDefaultsIntoFormData:!0,initialDefaultsGenerated:s,requiredAsRoot:!0});if(c.type!==`object`&&J$(c.default))return{...l,...n};if(J$(n)||Array.isArray(n)){let{mergeDefaultsIntoFormData:t}=a||{},i=t===`useDefaultIfFormDataUndefined`;return w2(l,P2(e,c,r??c,n,a,o),!0,i,!0)}return l}function L2(e={}){return`widget`in w1(e)&&w1(e).widget!==`hidden`}function R2(e,t,n={},r,i){if(n[`ui:widget`]===`files`)return!0;if(t.items){let n=a2(e,t.items,r,void 0,i);return n.type===`string`&&n.format===`data-url`}return!1}function Ple(e,t,n={},r,i,a){let{label:o=!0}=w1(n,i),s=!!o;if(s){let i=S0(t),o=!!t[Z$];i===`array`&&(s=o||O2(e,t,r,a)||R2(e,t,n,r,a)||L2(n)),i===`object`&&(s=o),i===`boolean`&&n&&!n[`ui:widget`]&&(s=!1),n?.[`ui:field`]&&(s=!1)}return s}function Fle(e,t){if(t.length===0&&typeof e!=`object`)return e;let n=fw(e,t);return Array.isArray(e)?Object.keys(n).map(e=>n[e]):n}function Ile(e,t){let n=(e,t)=>typeof e!=`object`||rw(e)||t&&!rw(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[b1]&&c.$name!==``?i.push(c[o1]):r(c,i,e)}else s===`$name`&&c!==``&&a.forEach(e=>{let r=J(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 z2(e){return ow(e)||e===``?!0:Array.isArray(e)?e.length===0:J$(e)?Object.values(e).every(z2):!1}function Lle(e,t){return t?t(e):i2(e)}function Rle(e,t,n={},r,i){function a(e){return J$(e)}function o(e){return J$(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&&J$(s)){let e=o(t)?t:{};e.$ref!==void 0&&(e=y0(e.$ref,n));let r=new Set(e.required??[]);if(Object.entries(s).every(([e,t])=>!r.has(e)&&z2(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)||D2(e,r,n,i))return o;let s=f2(t,!0,n),c=b2(e,n,a,s,0,b0(r),i),l=t[c];return p(J$(l)?u2(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||J$(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||rw(e))return t;let o=e,{$ref:m,allOf:h}=o;if(m!==void 0)return p(y0(m,n),t,r);if(h){o=Lle(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)),_=S0(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 B2=Symbol(`no Value`);function V2(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[t1]:Array.isArray(e.enum)&&e.enum.length===1?e.enum[0]:B2).filter(e=>e!==B2);return n.length>0?n:void 0}function zle(e,t){let n=V2(e);if(!n||n.some(e=>c0(e,t)))return B2;let r=J(e,n1,B2);return r!==B2&&n.some(e=>c0(e,r))?r:n.length===1?n[0]:void 0}function H2(e,t,n,r,i={},a){let o;if(ew(n,`properties`)){let s={};if(ew(r,`properties`)){let e=J(r,c1,{});Object.keys(e).forEach(e=>{ew(i,e)&&(s[e]=void 0)})}let c=Object.keys(J(n,c1,{})),l={};c.forEach(o=>{let c=J(i,o),u=J(r,[c1,o],{}),d=J(n,[c1,o],{});ew(u,`$ref`)&&(u=a2(e,u,t,c,a)),ew(d,`$ref`)&&(d=a2(e,d,t,c,a));let f=J(u,`type`),p=J(d,`type`);if(!f||f===p)if(ew(s,o)&&delete s[o],p===`object`||p===`array`&&Array.isArray(c)){let n=H2(e,t,d,u,c,a);(n!==void 0||p===`array`)&&(l[o]=n)}else{let e=J(d,n1,B2),t=J(u,n1,B2);e!==B2&&e!==c&&(t===c?s[o]=e:J(d,`readOnly`)===!0&&(s[o]=void 0));let n=J(d,t1,B2),r=J(u,t1,B2);if(n!==B2&&n!==c&&(s[o]=r===c?n:void 0),ew(i,o)){let e=zle(d,c);e!==B2&&(s[o]=e)}}}),o={...typeof i==`string`||Array.isArray(i)?void 0:i,...s,...l}}else if(J(r,`type`)===`array`&&J(n,`type`)===`array`&&Array.isArray(i)){let s=J(r,`items`),c=J(n,`items`);if(typeof s==`object`&&typeof c==`object`&&!Array.isArray(s)&&!Array.isArray(c)){ew(s,`$ref`)&&(s=a2(e,s,t,i,a)),ew(c,`$ref`)&&(c=a2(e,c,t,i,a));let r=J(s,`type`),l=J(c,`type`);if(!r||r===l){let r=J(n,`maxItems`,-1);if(l===`object`)o=i.reduce((n,i)=>{let o=H2(e,t,c,s,i,a);return o!==void 0&&(r<0||n.length<r)&&n.push(o),n},[]);else{let e=V2(c),t=e?i.filter(t=>e.some(e=>c0(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 U2(e,t,n,r,i,a=[],o){if(`$ref`in t||`dependencies`in t||`allOf`in t||`if`in t){let s=a2(e,t,r,i,o);if(a.findIndex(e=>c0(e,s))===-1)return U2(e,s,n,r,i,a.concat(s),o)}let s={[o1]:n.replace(/^\./,``)};if(`oneOf`in t||`anyOf`in t){let c=`oneOf`in t?t.oneOf:t.anyOf,l=c[b2(e,r,i,c,0,b0(t),o)];s={...s,...U2(e,l,n,r,i,a,o)}}if(`additionalProperties`in t&&t.additionalProperties!==!1){pw(s,b1,!0);let c=cv(t.additionalProperties)?t[Q$]:{},l=J(t,c1,{});for(let t of Object.keys(i??{}))t in l||(s[t]=U2(e,c,`${n}.${t}`,r,J(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]=U2(e,c[i],`${n}.${i}`,r,t,a,o):l?s[i]=U2(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]=U2(e,c,`${n}.${i}`,r,t,a,o)})}else if(`properties`in t)for(let c in t.properties){let l=J(t,[c1,c],{});s[c]=U2(e,l,`${n}.${c}`,r,J(i,[c]),a,o)}return s}function Ble(e,t,n=``,r,i,a){return U2(e,t,n,r,i,void 0,a)}var Vle=class{constructor(e,t,n,r){t?.$schema===`https://json-schema.org/draft/2020-12/schema`?this.rootSchema=g0(t,J(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||!c0(this.rootSchema,t)||!c0(this.experimental_defaultFormStateBehavior,n)||this.experimental_customMergeAllOf!==r}findFieldInSchema(e,t,n){return Dle(this.validator,this.rootSchema,e,t,n,this.experimental_customMergeAllOf)}findSelectedOptionInXxxOf(e,t,n,r){return h2(this.validator,this.rootSchema,e,t,n,r,this.experimental_customMergeAllOf)}getDefaultFormState(e,t,n=!1,r){return I2(this.validator,e,t,this.rootSchema,n,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf,r)}getDisplayLabel(e,t,n){return Ple(this.validator,e,t,this.rootSchema,n,this.experimental_customMergeAllOf)}getClosestMatchingOption(e,t,n,r){return b2(this.validator,this.rootSchema,e,t,n,r,this.experimental_customMergeAllOf)}getFirstMatchingOption(e,t,n){return T0(this.validator,e,t,this.rootSchema,n)}getFromSchema(e,t,n){return _2(this.validator,this.rootSchema,e,t,n,this.experimental_customMergeAllOf)}isFilesArray(e,t){return R2(this.validator,e,t,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(e){return O2(this.validator,e,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(e){return D2(this.validator,e,this.rootSchema,this.experimental_customMergeAllOf)}omitExtraData(e,t){return Rle(this.validator,e,this.rootSchema,t)}retrieveSchema(e,t,n){return a2(this.validator,e,this.rootSchema,t,this.experimental_customMergeAllOf,n)}sanitizeDataForNewSchema(e,t,n){return H2(this.validator,this.rootSchema,e,t,n,this.experimental_customMergeAllOf)}toPathSchema(e,t,n){return Ble(this.validator,e,t,this.rootSchema,n,this.experimental_customMergeAllOf)}};function Hle(e,t,n={},r){return new Vle(e,t,n,r)}function Ule(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 W2(e,t){let n=String(e);for(;n.length<t;)n=`0${n}`;return n}function G2(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 G2(t,e).reverse();let o=[];for(let e=i;e<=a;e+=1)o.push({value:e,label:W2(e,2)});return o}function Wle(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 Gle(e,t){return Wle(e,t)}function K2(e,t=[],n){if(Array.isArray(e))return e.map(e=>K2(e,t)).filter(e=>e!==void 0);let r=t[e===``||e===null?-1:Number(e)];return r?r.value:n}function q2(e,t,n=[]){let r=K2(e,n);return Array.isArray(t)?t.filter(e=>!c0(e,r)):c0(r,t)?void 0:t}function J2(e,t){return Array.isArray(t)?t.some(t=>c0(t,e)):c0(t,e)}function Y2(e,t=[],n=!1){let r=t.map((t,n)=>J2(t.value,e)?String(n):void 0).filter(e=>e!==void 0);return n?r:r[0]}function X2(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=Y2(e,t,n);return a===void 0?i:a}function Z2(e,t,n=[]){let r=K2(e,n);if(!ow(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 Q2(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 $2(e,t,n=`indexed`,r){return n===`realValue`?Array.isArray(e)?e.map(e=>Q2(e,t,r)):Q2(e,t,r):K2(e,t,r)}function e4(e,t,n=`indexed`){return n===`realValue`?ow(e)?``:String(typeof e==`object`?t:e):String(t)}var t4=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`?J(this.errorSchema,e):this.errorSchema;return!t&&e&&(t={},Nne(this.errorSchema,e,t,Object)),t}resetAllErrors(e){return this.errorSchema=e?ZS(e):{},this}addErrors(e,t){let n=this.getOrCreateErrorBlock(t),r=J(n,r1);return Array.isArray(r)||(r=[],n[r1]=r),Array.isArray(e)?pw(n,r1,[...new Set([...r,...e])]):pw(n,r1,[...new Set([...r,e])]),this}setErrors(e,t){return pw(this.getOrCreateErrorBlock(t),r1,Array.isArray(e)?[...new Set([...e])]:[e]),this}clearErrors(e){return pw(this.getOrCreateErrorBlock(e),r1,[]),this}};function n4(e,t){let n=Hb(e),r=Hb(t);if(e===t||!n&&!r)return[];if(n&&!r)return Ny(e);if(!n&&r)return Ny(t);let i=Ny(kne(e,(e,n)=>!c0(e,J(t,n)))),a=ine(Ny(t),Ny(e));return[...i,...a]}function Kle(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 r4(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 i4(e,t,n={},r=!0){let i={type:t||`text`,...r4(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 a4(e){return e?.optionValueFormat??`indexed`}var o4={props:{disabled:!1},submitText:`Submit`,norender:!1};function s4(e={}){let t=w1(e);if(t?.submitButtonOptions){let e=t[d1];return{...o4,...e}}return o4}function c4(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 l4(){if(J(globalThis,`process.env.NODE_ENV`)!==`test`)return{};let e=new Map;return new Proxy({},{get(t,n){return e.has(n)||e.set(n,yw(`test-id-`)),e.get(n)}})}var qle=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}})),u4=u(s(((e,t)=>{t.exports=qle()}))(),1),d4={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 Jle(e){let t=J(e,`MergedWidget`);if(!t){let n=e.defaultProps?.options||{};t=({options:t,...r})=>(0,B.jsx)(e,{options:{...n,...t},...r}),pw(e,`MergedWidget`,t)}return t}function f4(e,t,n={}){let r=S0(e);if(typeof t==`function`||t&&u4.isForwardRef((0,b.createElement)(t))||u4.isMemo(t))return Jle(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 f4(e,r,n)}if(typeof r==`string`){if(!(r in d4))throw Error(`No widget for type '${r}' in schema: ${JSON.stringify(e)}`);if(t in d4[r]){let i=n[d4[r][t]];return f4(e,i,n)}}throw Error(`No widget '${t}' for type '${r}' in schema: ${JSON.stringify(e)}`)}function p4(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 m4(e){let t=new Set;return JSON.stringify(e,(e,n)=>(t.add(e),n)),JSON.stringify(e,Array.from(t).sort())}function h4(e){return p4(m4(e))}function Yle(e){return p4(m4(e))}function Xle(e,t,n={}){try{return f4(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 g4(e,t){return`${tw(e)?e:e.$id}__${t}`}function _4(e){return g4(e,`description`)}function v4(e){return g4(e,`error`)}function y4(e){return g4(e,`examples`)}function b4(e){return g4(e,`help`)}function x4(e){return g4(e,`title`)}function S4(e,t=!1){let n=t?` ${y4(e)}`:``;return`${v4(e)} ${_4(e)} ${b4(e)}${n}`}function C4(e,t){return`${e}-${t}`}function w4(e,t){return g4(e,t)}function T4(e,t){return g4(e,`optional${t}`)}function E4(e){return!ow(e)&&(!cv(e)||Array.isArray(e)||!rw(e))}function Zle(e,t){let{rootSchema:n,schemaUtils:r}=e;return c0(t,n)?!0:`$ref`in n&&c0(t,r.retrieveSchema(n))}function D4(e,t,n){return t?n:e}function Qle(e){return e?new Date(e).toJSON():void 0}function O4(e,t,n,r=!1){!r&&Array.isArray(n)&&t.default!==void 0&&Y2(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 k4(e,t,n){let r=[v1];return ew(e,`formContext`)&&r.unshift(_1),J(e,[...r,t],n)}function $le(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 A4(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 eue(e,t,n){let r=e[p1]??e[f1],i=n.uiSchemaDefinitions,a=r&&i?i[r]:void 0,o;if(o=a?!t||rw(t)?{...a}:T2(a,t):t||{},i){let t=e;if(r&&e.$ref&&!e[p1])try{t=y0(r,n.rootSchema)}catch(e){return console.warn(`could not resolve $ref in resolveUiSchema:
223
+ `,e),o}for(let e of[s1,e1]){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?.[p1]??t?.[f1];if(o&&o in i){let t=r[e]||{};r[e]=T2(i[o],t),a=!0}}a&&(o[e]=r)}}}return o}function j4(e){return e.const||e.enum?.length===1&&e.enum[0]===!0?!0:e.anyOf?.length===1?j4(e.anyOf[0]):e.oneOf?.length===1?j4(e.oneOf[0]):e.allOf?e.allOf.some(e=>j4(e)):!1}function M4({hideLabel:e,id:t,multiple:n,options:r,registry:i,uiSchema:a,value:o}){if(n||e)return null;let{label:s=!0}=w1(a,i.globalUiOptions);if(!s)return null;let c=r.enumOptions?.find(({value:e})=>J2(e,o)),l=c?.schema?.description;return l?(0,B.jsx)(c4(`DescriptionFieldTemplate`,i,r),{id:_4(t),description:l,schema:c.schema,uiSchema:a,registry:i}):null}function N4(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 tue(e,t,n,r=`customDeep`){if(r===`always`)return!0;if(r===`shallow`){let{props:r,state:i}=e;return!N4(r,t)||!N4(i,n)}let{props:i,state:a}=e;return!c0(i,t)||!c0(a,n)}function P4(e){let t=vw(e.map(e=>cv(e)?S0(e):void 0).flat().filter(e=>e!==void 0));return t.length===1?t[0]:t}function F4(e,t,n,r){let{enableOptionalDataFieldForType:i=[]}=w1(r,e.globalUiOptions),a;return a=`anyOf`in t&&Array.isArray(t.anyOf)?P4(t[e1]):`oneOf`in t&&Array.isArray(t.oneOf)?P4(t[s1]):S0(t),!Zle(e,t)&&!n&&!!a&&!Array.isArray(a)&&!!i.find(e=>e===a)}function I4(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 L4(e,t=[]){if(!e)return[];let n=[];return`__errors`in e&&(n=n.concat(e[r1].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(Hb(i))return n.concat(L4(i,[...t,r]))}return n},n)}function nue(e){let t=new t4;return e.length&&e.forEach(e=>{let{property:n,message:r}=e,i=n===`.`?[]:gw(n);i.length>0&&i[0]===``&&i.splice(0,1),r&&t.addErrors(r,i)}),t.ErrorSchema}function R4(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 z4(e){return Object.keys(e).reduce((t,n)=>{if(n===`addError`)return t;let r=e[n];return Hb(r)?{...t,[n]:z4(r)}:{...t,[n]:r}},{})}function rue(e){return Object.values(e).every(e=>e!==-1)}function iue(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,B.jsx)(h,{schema:{type:`integer`},id:m,name:s,className:t,options:{enumOptions:G2(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":S4(o)})}function aue(e){let{time:t=!1,disabled:n=!1,readonly:r=!1,options:i,onChange:a,value:o}=e,[s,c]=(0,b.useState)(A4(o,t));(0,b.useEffect)(()=>{c(A4(o,t))},[t,o]);let l=(0,b.useCallback)((e,n)=>{let r={...s,[e]:n===void 0?-1:n};rue(r)?a(I4(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=A4(new Date().toJSON(),t);a(I4(i,t))},[n,r,t,a]);return{elements:(0,b.useMemo)(()=>Kle(s,t,i.yearsRange,i.format),[s,t,i.yearsRange,i.format]),handleChange:l,handleClear:u,handleSetNow:d}}function B4(e){let t=(0,b.useRef)(e);return c0(e,t.current)||(t.current=e),t.current}function oue(e,t){return e.replace(`;base64`,`;name=${encodeURIComponent(t)};base64`)}async function sue(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:oue(e.target.result,t),name:t,size:n,type:r}):i({dataURL:null,name:t,size:n,type:r})},o.readAsDataURL(e)})}async function cue(e){return Promise.all(Array.from(e).map(sue))}function lue(e){return e.reduce((e,t)=>{if(!t)return e;try{let{blob:n,name:r}=Ule(t);return[...e,{dataURL:t,name:r,size:n.size,type:n.type}]}catch{return e}},[])}function uue(e,t,n=!1){let r=(0,b.useMemo)(()=>n&&e?Array.isArray(e)?e:[e]:[],[e,n]);return{filesInfo:(0,b.useMemo)(()=>lue(Array.isArray(e)?e:[e||``]),[e]),handleChange:(0,b.useCallback)(async e=>{let i=(await cue(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 due(e){if(!e)return``;let t=new Date(e);return`${W2(t.getFullYear(),4)}-${W2(t.getMonth()+1,2)}-${W2(t.getDate(),2)}T${W2(t.getHours(),2)}:${W2(t.getMinutes(),2)}:${W2(t.getSeconds(),2)}.${W2(t.getMilliseconds(),3)}`}function V4(e,t,n=!1){if(!t)return e;let{errors:r,errorSchema:i}=e,a=L4(t),o=t;return rw(i)||(o=T2(i,t,!n||`preventDuplicates`),a=[...r].concat(a)),{errorSchema:o,errors:a}}function fue(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]=x1+n:t[e]=H4(n)}return e}function pue(e){return e.map(e=>H4(e))}function H4(e){return Array.isArray(e)?pue([...e]):cv(e)?fue({...e}):e}var U4;(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)`})(U4||={});function W4(){return yw(`rjsf-array-item-`)}function G4(e){return Array.isArray(e)?e.map(e=>({key:W4(),item:e})):[]}function K4(e){return Array.isArray(e)?e.map(e=>e.item):[]}function mue(e){return Array.isArray(e.type)?!e.type.includes(`null`):e.type!==`null`}function q4(e,t,n,r){let{addable:i}=w1(r,e.globalUiOptions);return i!==!1&&(i=t.maxItems===void 0||n.length<t.maxItems),i}function J4(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 hue(e,t){let{schemaUtils:n,globalFormOptions:r}=e,i=t.items;return r.useFallbackUiForUnsupportedType&&!i?i={}:C2(t)&&Y$(t)&&(i=t.additionalItems),n.getDefaultFormState(i)}function gue(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=E2(_.retrieveSchema(t.items,i),r?.items??r),{widget:x=`select`,title:S,...C}=w1(r,y),w=f4(t,x,g),T=S??t.title??m,E=_.getDisplayLabel(t,r,y),D=B4(R4(``,v,n,!0));return(0,B.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 _ue(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}=w1(r,b),w=f4(t,x,_),T=S??t.title??h,E=v.getDisplayLabel(t,r,b),D=B4(R4(``,y,n,!0));return(0,B.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 vue(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}=w1(n,v),S=f4(t,y,h),C=b??t.title??i,w=g.getDisplayLabel(t,n,v),T=B4(R4(``,_,r,!0));return(0,B.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 yue(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)(()=>R4(n,F,_),[n,F,_]),ee=M||N,te=c4(`ArrayFieldItemTemplate`,s,c),ne=j.getDisplayLabel(I,g,P),{description:re}=w1(g),R=!!re||!!I.description,{orderable:z=!0,removable:ie=!0,copyable:ae=!1}=c,oe={moveUp:z&&f,moveDown:z&&p,copy:ae&&u,remove:ie&&d,toolbar:!1};oe.toolbar=Object.keys(oe).some(e=>oe[e]);let se=(0,b.useCallback)(e=>{D(e,n+1)},[D,n]),ce=(0,b.useCallback)(e=>{O(e,n)},[O,n]),le=(0,b.useCallback)(e=>{k(e,n)},[k,n]),ue=(0,b.useCallback)(e=>{A(e,n,n-1)},[A,n]),de=(0,b.useCallback)(e=>{A(e,n,n+1)},[A,n]);return(0,B.jsx)(te,{children:(0,B.jsx)(ee,{name:r,title:E,index:n,schema:I,uiSchema:g,formData:h,errorSchema:v,fieldPathId:L,required:mue(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:oe.copy,hasMoveUp:oe.moveUp,hasMoveDown:oe.moveDown,hasRemove:oe.remove,index:n,totalItems:T,onAddItem:se,onCopyItem:ce,onRemoveItem:le,onMoveUpItem:ue,onMoveDownItem:de,registry:s,schema:I,uiSchema:g},itemKey:t,className:`rjsf-array-item`,disabled:i,hasToolbar:oe.toolbar,index:n,totalItems:T,readonly:o,registry:s,schema:I,uiSchema:g,parentUiSchema:l,displayLabel:ne,hasDescription:R})}var Y4=(0,b.memo)(yue);function bue(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)(()=>w1(n,O),[n,O]),j=(0,b.useMemo)(()=>cv(t.items)?t.items:{},[t.items]),M=(0,b.useMemo)(()=>T.retrieveSchema(j),[T,j]),N=(0,b.useMemo)(()=>K4(v),[v]),P=F4(p,t,d,n),F=E4(a),I=(0,b.useMemo)(()=>q4(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,B.jsx)(k,{...e,fieldPathId:te}):void 0,re={canAdd:I,items:L.map((e,t)=>{let{key:i,item:a}=e,s=a,b=r?r[t]:void 0,T=J4(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,B.jsx)(Y4,{...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,B.jsx)(c4(`ArrayFieldTemplate`,p,A),{...re})}function xue(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)(()=>w1(n,O),[n,O]),{OptionalDataControlsField:A}=E,j=F4(p,t,d,n),M=E4(r),N=(0,b.useMemo)(()=>cv(t.items)?t.items:[],[t.items]),P=cv(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,B.jsx)(A,{...e,fieldPathId:F}):void 0,te=q4(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&&cv(t.additionalItems)?t.additionalItems:N[r])||{},A;A=E?n.additionalItems:Array.isArray(n.items)?n.items[r]:J4(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,B.jsx)(Y4,{...M},a)}),onAddClick:y,readonly:l,required:d,registry:p,schema:t,uiSchema:n,title:T,errorSchema:i,rawErrors:g,optionalDataControl:ee};return(0,B.jsx)(c4(`ArrayFieldTemplate`,p,k),{...ne})}function Sue(e=[]){let t=(0,b.useMemo)(()=>h4(e),[e]),[n,r]=(0,b.useState)(()=>({formDataHash:t,keyedFormData:G4(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]})):G4(n),a=t,r({formDataHash:a,keyedFormData:i})}let o=(0,b.useCallback)(e=>{let t=K4(e),n=h4(t);return r({formDataHash:n,keyedFormData:e}),t},[]);return{keyedFormData:i,updateKeyedFormData:o}}function Cue(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}=Sue(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?pw(r,[t],m.current[t]):t>=n&&pw(r,[t+1],m.current[t])}}let i={key:W4(),item:hue(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?pw(n,[r],m.current[r]):r>t&&pw(n,[r+1],m.current[r])}}let r={key:W4(),item:ZS(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?pw(n,[r],m.current[r]):r>t&&pw(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?pw(r,[n],m.current[t]):i===n?pw(r,[t],m.current[n]):pw(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,B.jsx)(c4(`UnsupportedFieldTemplate`,a,w1(n)),{schema:t,fieldPathId:i,reason:u(U4.MissingItems),registry:a});let e={...t,[i1]:{type:void 0}};C.schema=e,w.schema=e}return l.isMultiSelect(C.schema)?(0,B.jsx)(gue,{...C}):L2(n)?(0,B.jsx)(_ue,{...C}):C2(C.schema)?(0,B.jsx)(xue,{...w}):l.isFilesArray(C.schema,n)?(0,B.jsx)(vue,{...C}):(0,B.jsx)(bue,{...w})}function wue(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}=w1(r,x),D=f4(t,S,v),O=y(U4.YesLabel),k=y(U4.NoLabel),A,j=C??_??f??n;if(Array.isArray(t.oneOf))A=E2({oneOf:t.oneOf.map(e=>{if(cv(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}]:E2({enum:e},r)}let M=(0,b.useCallback)((e,t,n)=>p(e,i.path,t,n),[p,i]);return(0,B.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 Tue(e){let[t,n]=(0,b.useState)(!1),{name:r,registry:i,schema:a,uiSchema:o,fieldPathId:s}=e,{globalUiOptions:c}=i,l=c4(`CyclicSchemaExpandTemplate`,i,w1(o,c));if(!t)return(0,B.jsx)(l,{registry:i,schema:a,uiSchema:o,name:r,fieldPathId:s,onExpand:()=>n(!0)});let{fields:u}=i,{SchemaField:d}=u;return(0,B.jsx)(d,{...e,schema:{...a,[m1]:!1}})}function Eue(e){return{type:`string`,enum:[`string`,`number`,`boolean`,`object`,`array`],default:`string`,title:e}}function Due(e){let t=typeof e;return t===`string`||t===`number`||t===`boolean`?t:t===`object`?Array.isArray(e)?`array`:`object`:`string`}function Oue(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 kue(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)(Due(n)),S=w1(o),C=B4(R4(`__internal_type_selector`,v,p)),w=g(U4.Type),T=(0,b.useMemo)(()=>Eue(w),[w]),E=e=>{e!=null&&(x(e),m(Oue(n,e),p.path,h,t))};if(!v.useFallbackUiForUnsupportedType){let{reason:t=g(U4.UnknownFieldType,[String(i.type)])}=e;return(0,B.jsx)(c4(`UnsupportedFieldTemplate`,f,S),{schema:i,fieldPathId:p,reason:t,registry:f})}let D=c4(`FallbackFieldTemplate`,f,S),{SchemaField:O}=_;return(0,B.jsx)(D,{schema:i,registry:f,typeSelector:(0,B.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?h4(n):`__empty__`),schemaField:(0,B.jsx)(O,{...e,schema:{type:y,title:g(U4.Value),...y===`object`&&{additionalProperties:!0}}})})}var X4;(function(e){e.ROW=`ui:row`,e.COLUMN=`ui:col`,e.COLUMNS=`ui:columns`,e.CONDITION=`ui:condition`})(X4||={});var Z4;(function(e){e.ALL=`all`,e.SOME=`some`,e.NONE=`none`})(Z4||={});var Aue=/^\$lookup=(.+)/,Q4=`layoutGrid`;`${Q4}`;function $4(e,t){return e??t}function jue(e){return/^\d+?$/.test(e)}var e3=l4();function Mue(e,t,n,r,i){let a=J(n,[C1],{}),o=J(n,e),s={...J(o,[S1],{}),...t,...a},c={...o};rw(s)||pw(c,[S1],s),rw(a)||pw(c,[C1],a);let{readonly:l}=w1(c);return(i===!0||sw(l)&&r===!0)&&(l=!0,ew(s,`readonly`)?pw(c,[S1,l1],!0):pw(c,`ui:${l1}`,!0)),{fieldUiSchema:c,uiReadonly:l}}function Nue(e,t,n=`$0m3tH1nG Un3xP3cT3d`){let r=Nb([t]).sort(),i=Nb([n]).sort();switch(e){case Z4.ALL:return iw(r,i);case Z4.SOME:return nw(r,i).length>0;case Z4.NONE:return nw(r,i).length===0;default:return!1}}function t3(e,t,n){let r={},i=e[t];if(Hb(i)){let{children:e,className:t,...a}=i;if(i=e,t){let e=t.split(` `).map(e=>k4(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 n3(e,t,n){let r,i=t;if(jue(n)&&e&&e?.type===`array`&&ew(e,`items`)){let a=Number(n),o=e[i1];r=Array.isArray(o)?a>o.length?QC(o):o[a]:o,i={$id:t.$id,path:[...t.path.slice(0,t.path.length-1),a]}}return{rawSchema:r,fieldPathId:i}}function Pue(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=R4(e,o,c),ew(d,`properties`))s=J(d,[c1,e],{});else if(d&&(ew(d,`oneOf`)||ew(d,`anyOf`))){let t=ew(d,`oneOf`)?s1:e1;s=J(a.findSelectedOptionInXxxOf(d,e,t,f),[c1,e],{})}else{let t=n3(d,c,e);s=t.rawSchema??{},c=t.fieldPathId}f=J(f,e,{}),d=a.retrieveSchema(s,f),p=$4(d.readOnly,p)});let m,h=!1;if(rw(d)&&(d=void 0),d&&u){if(d&&(ew(d,`oneOf`)||ew(d,`anyOf`))){let e=ew(d,`oneOf`)?s1:e1;d=a.findSelectedOptionInXxxOf(d,u,e,f)}c=R4(u,o,c),h=d!==void 0&&Array.isArray(d.required)&&mne(d.required,u);let e=n3(d,c,u);if(e.rawSchema?(d=e.rawSchema,c=e.fieldPathId):(d=J(d,[c1,u]),d&&=a.retrieveSchema(d)),p=$4(d?.readOnly,p),d&&(ew(d,`oneOf`)||ew(d,`anyOf`))){let e=ew(d,`oneOf`)?s1:e1,t=b0(d);m={options:d[e],hasDiscriminator:!!t}}}return{schema:d,isRequired:h,isReadonly:p,optionsInfo:m,fieldPathId:c}}function Fue(e,t){let n=e;return tw(n)&&(n=k4(t,n)),pv(n)?n:null}function Iue(e,t){let n,r=null,i={},a;if(tw(t)||sw(t))n=t??``;else{let{name:o=``,render:s,...c}=t;n=o,i=c,rw(i)||ane(i,(t,n)=>{if(tw(t)){let r=Aue.exec(t);if(Array.isArray(r)&&r.length>1){let t=r[1];i[n]=k4(e,t,t)}}}),r=Fue(s,e),!o&&r&&(a=(0,B.jsx)(r,{...c,"data-testid":e3.uiComponent}))}return{name:n,UIComponent:r,uiProps:i,rendered:a}}function r3(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)(i3,{...n,key:`layoutGrid-${h4(e)}`,schema:s,layoutGridSchema:e}))}function Lue(e){let{layoutGridSchema:t,...n}=e,{formData:r,registry:i}=n,{children:a,gridProps:o}=t3(t,X4.CONDITION,i),{operator:s,field:c=``,value:l}=o;return Nue(s,J(r,c,null),l)?(0,B.jsx)(r3,{...n,childrenLayoutGridSchemaId:a}):null}function Rue(e){let{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:a,gridProps:o}=t3(t,X4.COLUMN,r);return(0,B.jsx)(c4(`GridTemplate`,r,w1(i)),{column:!0,"data-testid":e3.col,...o,children:(0,B.jsx)(r3,{...n,childrenLayoutGridSchemaId:a})})}function zue(e){let{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:a,gridProps:o}=t3(t,X4.COLUMNS,r),s=c4(`GridTemplate`,r,w1(i));return a.map(e=>(0,B.jsx)(s,{column:!0,"data-testid":e3.col,...o,children:(0,B.jsx)(r3,{...n,childrenLayoutGridSchemaId:[e]})},`column-${h4(e)}`))}function Bue(e){let{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:a,gridProps:o}=t3(t,X4.ROW,r);return(0,B.jsx)(c4(`GridTemplate`,r,w1(i)),{...o,"data-testid":e3.row,children:(0,B.jsx)(r3,{...n,childrenLayoutGridSchemaId:a})})}function Vue(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,_=Iue(u,t),{name:v,UIComponent:y,uiProps:b}=_,{schema:x,isRequired:S,isReadonly:C,optionsInfo:w,fieldPathId:T}=Pue(u,v,n,c,a),E=B4(T);if(_.rendered)return _.rendered;if(x){let e=w?.hasDiscriminator?g:h,{fieldUiSchema:t,uiReadonly:n}=Mue(v,b,r,C,l);return(0,B.jsx)(e,{"data-testid":w?.hasDiscriminator?e3.layoutMultiSchemaField:e3.field,...f,name:v,required:S,readonly:n,schema:x,uiSchema:t,errorSchema:J(i,v),fieldPathId:E,formData:J(c,v),onChange:p,onBlur:o,onFocus:s,options:w?.options,registry:u})}return y?(0,B.jsx)(y,{"data-testid":e3.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 i3(e){let{uiSchema:t}=e,{layoutGridSchema:n}=e,r=w1(t);if(!n&&`layoutGrid`in r&&cv(r.layoutGrid)&&(n=r[Q4]),cv(n)){if(X4.ROW in n)return(0,B.jsx)(Bue,{...e,layoutGridSchema:n});if(X4.COLUMN in n)return(0,B.jsx)(Rue,{...e,layoutGridSchema:n});if(X4.COLUMNS in n)return(0,B.jsx)(zue,{...e,layoutGridSchema:n});if(X4.CONDITION in n)return(0,B.jsx)(Lue,{...e,layoutGridSchema:n})}return(0,B.jsx)(Vue,{...e,gridSchema:n})}i3.TEST_IDS=e3;function Hue(e){let{fieldPathId:t,title:n,schema:r,uiSchema:i,required:a,registry:o,name:s}=e,c=w1(i,o.globalUiOptions),{title:l}=c,{title:u}=r,d=l||n||u||s;return d?(0,B.jsx)(c4(`TitleFieldTemplate`,o,c),{id:x4(t),title:d,required:a,schema:r,uiSchema:i,registry:o}):null}function a3(e,t,n){return e.map(({schema:e})=>e).find(e=>{let r=J(e,[c1,t]);return J(r,n1,J(r,t1,`!@#!@$@#$!@$#`))===n})}function o3(e,t,n,r,i){let a=t.map(e=>n.retrieveSchema(e,i)),o=e;ew(e,`oneOf`)?o={...e,[s1]:a}:ew(e,`anyOf`)&&(o={...e,[e1]:a});let s=E2(o,r);if(!s)throw Error(`No enumOptions were computed from the schema ${JSON.stringify(o)}`);return s}function Uue(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)(o3(f,c,y,d,i)),w=J(a,`$id`),T=b0(f),E=c4(`FieldErrorTemplate`,u,c),D=c4(`FieldTemplate`,u,c);(0,b.useEffect)(()=>{C(o3(f,c,y,d,i))},[h4(f),h4(c),y,d?h4(d):``,i?h4(i):``]);let{widget:O=T?`radio`:`select`,title:k=``,placeholder:A=``,optionsSchemaSelector:j=T,hideError:M,...N}=w1(d);if(!j)throw Error(`No selector field provided for the LayoutMultiSchemaField`);let P=J(i,j),F=J(S[0]?.schema,[c1,j],{}),I=a3(S,j,P);F=F?.type?F:{...F,type:I?.type||n};let L=f4(F,O,v),ee=M===void 0?_:!!M,te=J(g,[r1],[]),ne=lw(g,[r1]),re=y.getDisplayLabel(f,d,x),R=e=>{if(r||m)return;let t=a3(S,j,e),n=a3(S,j,P),o=y.sanitizeDataForNewSchema(t,n,i);o&&t&&(o=y.getDefaultFormState(t,o,`excludeObjectChildren`)),o&&pw(o,j,e),s(o,a.path,void 0,w)},z={enumOptions:S,...N},ie=!ee&&te.length>0?(0,B.jsx)(E,{fieldPathId:a,schema:f,errors:te,registry:u}):void 0;return(0,B.jsx)(D,{fieldPathId:a,id:w,schema:f,label:(k||f.title)??``,disabled:r||Array.isArray(S)&&rw(S),uiSchema:d,required:h,readonly:!!m,registry:u,displayLabel:re,errors:ie,onChange:s,onKeyRename:xv,onKeyRenameBlur:xv,onRemoveProperty:xv,children:(0,B.jsx)(L,{id:w,name:t,schema:f,label:(k||f.title)??``,disabled:r||Array.isArray(S)&&rw(S),uiSchema:d,autofocus:p,readonly:m,required:h,registry:u,multiple:!1,rawErrors:te,hideError:ee,hideLabel:!re,errorSchema:ne,placeholder:A,onChange:R,onBlur:o,onFocus:l,value:P,options:z,htmlName:a.name})})}function s3(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,h4(i??null)]),[_,v]=(0,b.useState)(()=>{let e=b0(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,!c0(i,e)&&a.$id===t){if(y.current){y.current=!1;return}let e=b0(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=c4(`MultiSchemaFieldTemplate`,d,O),j=F4(d,p,f,m),M=E4(i),{widget:N=`select`,placeholder:P,autofocus:F,autocomplete:I,title:L=p.title,...ee}=w1(m,O),te=f4({type:`number`},N,T),ne=J(r,r1,[]),re=lw(r,[r1]),R=h.getDisplayLabel(p,m,O),z=_>=0&&g[_]||null,ie;if(z){let{required:e,type:t}=p,n={};e&&(n.required=e),t!==void 0&&!(`type`in z)&&(n.type=t),ie=Object.keys(n).length>0?C0(n,z):z}let ae=[];`oneOf`in p&&m&&`oneOf`in m?Array.isArray(m.oneOf)?ae=m[s1]:console.warn(`uiSchema.oneOf is not an array for "${L||t}"`):`anyOf`in p&&m&&`anyOf`in m&&(Array.isArray(m.anyOf)?ae=m[e1]:console.warn(`uiSchema.anyOf is not an array for "${L||t}"`));let oe=m;_>=0&&ae.length>_&&(oe=ae[_]);let se=L?U4.TitleOptionPrefix:U4.OptionPrefix,ce=L?[L]:[],le=g.map((e,t)=>{let{title:n=e.title}=w1(ae[t]);return{label:n||D(se,ce.concat(String(t+1))),value:t}});return(0,B.jsx)(A,{schema:p,registry:d,uiSchema:m,selector:!j||M?(0,B.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||rw(le),multiple:!1,rawErrors:ne,errorSchema:re,value:_>=0?_:void 0,options:{enumOptions:le,...ee},registry:d,placeholder:P,autocomplete:I,autofocus:F,label:L??t,hideLabel:!R,readonly:u}):void 0,optionSchemaField:ie&&ie.type!==`null`&&(0,B.jsx)(k,{...e,schema:ie,uiSchema:oe})||null})}function Wue(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 Gue=/\.([0-9]*0)*$/,Kue=/[0.]0*$/;function que(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`&&Gue.exec(a)?X$(a.replace(Kue,``)):X$(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,B.jsx)(s,{...e,formData:c,onChange:l})}var c3;function Jue(e){if(!c3)if(typeof document<`u`)c3=document.createElement(`textarea`);else return;var t=`&`+e+`;`;c3.innerHTML=t;var n=c3.value;return n===t?void 0:n}var Z=32,Q=9,l3=13,u3=10,d3=96,f3=126,p3=91,m3=94,h3=62,g3=35,_3=37,v3=45,y3=61,b3=92,x3=42,S3=95,C3=60,w3=64,T3=93,E3=33,D3=38,O3=58,k3=70,A3=102,j3=104,M3=119,N3=116,P3=112,F3=115,Yue=160,Xue=12,Zue=44,I3=59,L3=63,R3=46,z3=47,B3=39,V3=34,H3=43,U3=124,W3=123,G3=125,K3=40,q3=41,Que=120,$ue=88,J3=30,Y3=48,X3=57,Z3=65,Q3=90,$3=97,e6=122,t6=128,n6=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 ede(e){if(!d6(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]!==`
224
+ `)return null;t++;let n=!1;for(;t<e.length;){let r=t;for(;t<e.length&&e[t]!==`
225
+ `&&e[t]!==`\r`;)t++;if(t>=e.length)break;let i=t;if(e[t]===`\r`&&t++,t<e.length&&e[t]===`
226
+ `&&t++,d6(e,`---`,r))return{endPos:t,hasValidYaml:n};if(!n){let t=ude(e,r,i);if(t<i){let r=e.charCodeAt(t);if(r>=$3&&r<=e6||r>=Z3&&r<=Q3||r>=Y3&&r<=X3||r===S3){for(t++;t<i&&(r=e.charCodeAt(t),r>=$3&&r<=e6||r>=Z3&&r<=Q3||r>=Y3&&r<=X3||r===S3||r===v3||r===R3);)t++;t<i&&e.charCodeAt(t)===O3&&(t++,t>=i?n=!0:(r=e.charCodeAt(t),(r===Z||r===Q)&&(n=!0)))}}}}return null}var tde=/&([a-zA-Z0-9]+|#[0-9]{1,7}|#x[0-9a-fA-F]{1,6});/gi,nde={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`},rde={};function r6(e){if(!e)return rde;var t={};for(var n in e){var r=nde[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 ide=/(\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 i6(e){return e.indexOf(`&`)===-1?e:e.replace(tde,(e,t)=>{var n=Jue(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 a6=/(javascript|vbscript|data(?!:image)):/i;function o6(e){if(a6.test(e))return null;if(e.indexOf(`%`)===-1)return e;try{let t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,``);if(a6.test(t))return null}catch{return null}return e}var s6={},c6,l6;for(c6=[192,193,194,195,196,197,224,225,226,227,228,229,230,198],l6=0;l6<c6.length;l6++)s6[c6[l6]]=`a`;for(s6[231]=s6[199]=`c`,s6[240]=s6[208]=`d`,c6=[200,201,202,203,233,232,234,235],l6=0;l6<c6.length;l6++)s6[c6[l6]]=`e`;for(c6=[207,239,206,238,205,237,204,236],l6=0;l6<c6.length;l6++)s6[c6[l6]]=`i`;for(s6[209]=s6[241]=`n`,c6=[248,216,339,338,213,245,212,244,211,243,210,242],l6=0;l6<c6.length;l6++)s6[c6[l6]]=`o`;for(c6=[220,252,219,251,218,250,217,249],l6=0;l6<c6.length;l6++)s6[c6[l6]]=`u`;s6[376]=s6[255]=s6[221]=s6[253]=`y`;function u6(e){for(var t=``,n=-1,r=e.length,i=0;i<r;i++){var a=e.charCodeAt(i);if(a>=$3&&a<=e6||a>=Y3&&a<=X3){n<0&&(n=i);continue}if(a>=Z3&&a<=Q3){n>=0&&(t+=e.slice(n,i),n=-1),t+=String.fromCharCode(a+n6);continue}if(a===Z||a===v3){n>=0&&(t+=e.slice(n,i),n=-1),t+=`-`;continue}n>=0&&(t+=e.slice(n,i),n=-1);var o=s6[a];o&&(t+=o)}return n>=0&&(t+=e.slice(n)),t}function d6(e,t,n){return e.startsWith(t,n)}var f6=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 p6(e){let t=e.toLowerCase();if(f6.has(t))return!0;let n=t.indexOf(`:`);return n===-1?!1:(t=t.slice(n+1),f6.has(t))}var m6=1,h6=2,g6=4,_6=8,ade=16,v6=32,y6=64,ode=(function(){var e=new Uint8Array(128),t;for(e[Q]=m6,e[u3]=m6|h6,e[Xue]=m6,e[l3]=m6|h6,e[Z]=m6,t=E3;t<=z3;t++)e[t]=g6;for(t=O3;t<=w3;t++)e[t]=g6;for(t=p3;t<=d3;t++)e[t]=g6;for(t=W3;t<=f3;t++)e[t]=g6;for(t=Y3;t<=X3;t++)e[t]=ade;for(t=Z3;t<=Q3;t++)e[t]=_6;for(t=$3;t<=e6;t++)e[t]=_6;return e})(),sde=/[\p{P}\p{S}]/u,cde=/\p{Zs}/u,b6=[];function lde(e){var t=e.indexOf(`\r`),n=e.indexOf(`\0`);if(t===-1&&n===-1)return e;var r=e.length;b6.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===l3?(i<a&&b6.push(e.slice(i,a)),a+1<r&&e.charCodeAt(a+1)===u3&&a++,b6.push(`
227
+ `),i=a+1):o===0&&(i<a&&b6.push(e.slice(i,a)),b6.push(`�`),i=a+1)}return i<r&&b6.push(e.slice(i)),b6.join(``)}function ude(e,t,n){let r=n??e.length;for(;t<r&&(e[t]===` `||e[t]===` `);)t++;return t}function x6(e){if(!e)return!1;for(var t in e)return!0;return!1}function dde(e){return{attrs:{},children:[{type:$.text,text:e}],d:!0,type:$.htmlBlock,tag:`header`}}var fde=/^\n+/;function pde(e){for(var t=e.length;t>0&&(e[t-1]===`
228
+ `||e[t-1]===`\r`);)t--;return e.slice(0,t).replace(fde,``)+`
229
+
230
+ `}function S6(e){if((e.type===$.htmlSelfClosing||e.type===$.htmlBlock)&&e.b)return[];if(e.type===$.paragraph){var t=e.children;return t?t.flatMap(S6):[]}return e.type===$.text?e.text?.trim()?[e]:[]:e.type===$.htmlBlock&&e.children?[{...e,children:e.children?.flatMap(S6)}]:[e]}function C6(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&&C6(e[t].children)}}function mde(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 hde(e,t,n){var r=e.replace(RegExp(`\\s*</`+t+`>\\s*$`,`i`),``);return n?O6(r):r}function w6(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 gde(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 T6(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 _de(e){for(var t=!1,n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r<=Z||r===V3||r===_3||r===C3||r===h3||r===p3||r===b3||r===T3||r===m3||r===d3||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===_3&&n+2<e.length){var a=e.charCodeAt(n+1),o=e.charCodeAt(n+2);if((a>=Y3&&a<=X3||a>=Z3&&a<=k3||a>=$3&&a<=A3)&&(o>=Y3&&o<=X3||o>=Z3&&o<=k3||o>=$3&&o<=A3)){i+=e[n]+e[n+1]+e[n+2],n+=2;continue}}i+=encodeURI(e[n])}return i}function vde(...e){return e.filter(Boolean).join(` `)}var yde=new Set([`title`,`textarea`,`style`,`xmp`,`iframe`,`noembed`,`noframes`,`script`,`plaintext`]),E6=/<(\/?)(title|textarea|style|xmp|iframe|noembed|noframes|script|plaintext)(\s|>|\/)/gi;function D6(e){return yde.has(e.toLowerCase())}function bde(e){return E6.lastIndex=0,E6.test(e)}function O6(e){return E6.lastIndex=0,e.replace(E6,function(e,t,n,r){return`&lt;`+t+n+r})}var xde=/^<([a-zA-Z][a-zA-Z0-9-]*)\s[^>]*>/,Sde=/^<[A-Z]/,k6=[`script`,`pre`,`style`,`textarea`],A6=new Set(k6),Cde=/<(?:pre|script|style|textarea)\b/i,j6=/<(?:pre|script|style|textarea)\b/iy,M6=/^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m,N6=/^<([a-z][^ >/\n\r]*) ?([^>]*?)>/im,P6=new Uint8Array(128);(function(){for(var e=[d3,x3,S3,f3,y3,p3,E3,C3,b3,D3,u3,j3,M3,A3],t=0;t<e.length;t++)P6[e[t]]=1})();var F6=/([a-zA-Z_][a-zA-Z0-9_-]*)=(?:"([^"]*)"|'([^']*)')/g;function wde(e){return A6.has(e)}function Tde(e){return Cde.test(e)}function I6(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)===U3&&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)===U3&&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)===O3&&r++,r>=i||e.charCodeAt(r)!==v3)return!1;for(;r<i&&e.charCodeAt(r)===v3;)r++;for(r<i&&e.charCodeAt(r)===O3&&r++,a++;r<i&&(e.charCodeAt(r)===Z||e.charCodeAt(r)===Q);)r++;if(r<i)if(e.charCodeAt(r)===U3)r++;else return!1}return a>0}function L6(e,t){if(e.charCodeAt(t)!==C3)return null;let n=t+1,r=e.length,i=!1;e.charCodeAt(n)===z3&&(n++,i=!0);let a=n,o=e.charCodeAt(n);if(!(o>=$3&&o<=e6||o>=Z3&&o<=Q3))return null;for(;n<r&&(e.charCodeAt(n)>=$3&&e.charCodeAt(n)<=e6||e.charCodeAt(n)>=Z3&&e.charCodeAt(n)<=Q3||e.charCodeAt(n)>=Y3&&e.charCodeAt(n)<=X3||e.charCodeAt(n)===v3);)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)===u3);)n++;let l=e.slice(c,n);if(n===c&&n<r){var u=e.charCodeAt(n);if(u!==h3&&u!==z3)return null}let d=n,f={},p=!1;for(;n<r;){let t=e.charCodeAt(n);if(t===h3){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===u3){n++;continue}if(t===z3&&n+1<r&&e.charCodeAt(n+1)===h3){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>=$3&&h<=e6||h>=Z3&&h<=Q3||h===S3||h===O3))return null;for(n++;n<r;){var g=e.charCodeAt(n);if(g>=$3&&g<=e6||g>=Z3&&g<=Q3||g>=Y3&&g<=X3||g===S3||g===R3||g===O3||g===v3)n++;else break}for(var _=e.slice(m,n);n<r&&(e.charCodeAt(n)===Z||e.charCodeAt(n)===Q);)n++;if(e.charCodeAt(n)!==y3){f[_]=``;continue}for(n++;n<r&&(e.charCodeAt(n)===Z||e.charCodeAt(n)===Q);)n++;var v=e.charCodeAt(n);if(v===V3||v===B3){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!==u3&&b!==h3&&b!==z3)return null}}else if(v===W3){var x=1,y=n;for(n++;n<r&&x>0;){var g=e.charCodeAt(n);g===W3?x++:g===G3&&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===h3||S===u3||S===V3||S===B3||S===y3||S===C3||S===d3)break;n++}if(n===y)return null;f[_]=e.slice(y,n)}}return null}function Ede(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(`
231
+ `,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===d3||d===f3){for(var f=d,p=0,m=l;m<c&&e.charCodeAt(m)===f;)p++,m++;if(p>=3){var h=!0;if(f===d3){for(var g=m;g<c;g++)if(e.charCodeAt(g)===d3){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)===u3){r=v>=i?i:v+1;break}}}for(;_<i&&e.charCodeAt(_)!==u3;)_++;_<i&&_++}_>=i&&(r=i,o=!0);continue}}}}for(var S=l;S<c&&e.charCodeAt(S)===h3;){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)===p3&&!(S+1<i&&e.charCodeAt(S+1)===m3)){var w=R6(e,S,t);if(w){r=w,a=!1;continue}}var T=e.charCodeAt(l);if(T===g3&&u<4)a=!1;else if(u<4&&(T===v3||T===x3||T===S3)){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 R6(e,t,n){let r=e.length;if(e.charCodeAt(t)!==p3)return null;let i=t+1<r&&e.charCodeAt(t+1)===m3,a=t+1;for(;a<r;){var o=e.charCodeAt(a);if(o===T3){a++;break}if(o===p3)return null;o===b3&&a+1<r&&a++,a++}if(a>r||e.charCodeAt(a-1)!==T3)return null;let s=e.slice(t+1,a-1);if(s.length>999)return null;let c=H6(s);if(!c||a>=r||e.charCodeAt(a)!==O3)return null;a++;let l=!1;for(;a<r;){let t=e.charCodeAt(a);if(t===Z||t===Q)a++;else if(t===u3&&!l)l=!0,a++;else break}if(i){let t=e.indexOf(`
232
+ `,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)===C3){a++;for(var d=a;a<r&&e.charCodeAt(a)!==h3&&e.charCodeAt(a)!==u3;)e.charCodeAt(a)===b3&&a+1<r&&a++,a++;if(a>=r||e.charCodeAt(a)!==h3)return null;u=e.slice(d,a),a++;for(var f=e.indexOf(`
233
+ `,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!==V3&&h!==B3&&h!==K3)return null}}else{for(var d=a,g=0;a<r;){var o=e.charCodeAt(a);if(o===K3)g++;else if(o===q3){if(g===0)break;g--}else{if(o===Z||o===Q||o===u3)break;o===b3&&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(`
234
+ `,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===V3||C===B3||C===K3){for(var w=C===K3?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)===u3)&&(y=e.slice(E,T),b=!0,x=O<r?O+1:r);break}if(D===b3&&T+1<r){T+=2;continue}if(D===u3&&T+1<r&&e.charCodeAt(T+1)===u3)break;T++}if(!b&&S===a)return null}}if(b)return n[c]||(n[c]={target:W6(u),title:y===void 0?y:i6(W6(y))}),x;for(;a<v&&(e.charCodeAt(a)===Z||e.charCodeAt(a)===Q);)a++;return a<v?null:(n[c]||(n[c]={target:W6(u),title:y}),_<0?r:_+1)}var z6=new Uint8Array(ode);for(z6[g3]|=v6,z6[h3]|=v6,z6[v3]|=v6|y6,z6[H3]|=v6,z6[x3]|=v6|y6,z6[S3]|=v6|y6,z6[d3]|=v6|y6,z6[f3]|=v6|y6,z6[C3]|=v6|y6,z6[p3]|=y6,z6[E3]|=y6,z6[U3]|=v6,B6=Y3;B6<=X3;B6++)z6[B6]|=v6;var B6;function V6(e){if(e.indexOf(`[`)<0&&e.indexOf(`]`)<0)return!1;for(var t=0;t<e.length;t++){if(e.charCodeAt(t)===b3){t++;continue}if(e.charCodeAt(t)===p3||e.charCodeAt(t)===T3)return!0}return!1}function H6(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>=Z3&&a<=Q3){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 U6(e){return e<t6?z6[e]:e===Yue?m6:0}function W6(e){return e.indexOf(`\\`)===-1?e:e.replace(/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,`$1`)}var G6=null,K6=-1,q6=-1;function J6(e,t){if(t>=K6&&t<=q6&&e===G6)return q6;var n=e.indexOf(`
235
+ `,t),r=n<0?e.length:n;return G6=e,K6=t,q6=r,r}function Y6(e,t){let n=J6(e,t);return n<e.length?n+1:n}function X6(e,t,n){for(;t<n;){let n=e.charCodeAt(t);if(n!==Z&&n!==Q)break;t++}return t}function Z6(e,t){let n=Y6(e,t);for(;n<e.length;){let t=J6(e,n);if(n8(e,n,t))return n;n=Y6(e,n)}return e.length}function Q6(e,t,n,r){let i=0;for(;t+i<n&&e.charCodeAt(t+i)===r;)i++;return i}var $6=0,e8=0;function t8(e,t,n){for($6=0,e8=0;t+e8<n;){let n=e.charCodeAt(t+e8);if(n===Q)$6+=4-$6%4;else if(n===Z)$6++;else break;e8++}}function n8(e,t,n){return X6(e,t,n)>=n}function Dde(e,t,n,r){let i=J6(e,t);if(t8(e,t,i),$6>3)return null;let a=t+e8;if(e.charCodeAt(a)!==g3)return null;let o=Q6(e,a,i,35);if(o<1||o>6||(a+=o,a<i&&e.charCodeAt(a)!==Z&&e.charCodeAt(a)!==Q))return null;a=X6(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)===g3;)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=g8(l,!1,n,r),d=(r?.slugify||u6)(l);return{node:{type:$.heading,level:o,children:u,id:d},end:Y6(e,i)}}function Ode(e,t,n){var r=e.charCodeAt(t);if(r!==y3&&r!==v3)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 r8(e,t){let n=J6(e,t);if(t8(e,t,n),$6>3)return null;let r=t+e8,i=e.charCodeAt(r);if(i!==v3&&i!==x3&&i!==S3)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:Y6(e,n)}}function kde(e,t,n){let r=J6(e,t);if(t8(e,t,r),$6>3)return null;let i=$6,a=t+e8,o=e.charCodeAt(a);if(o!==d3&&o!==f3)return null;let s=Q6(e,a,r,o);if(s<3)return null;a+=s;let c=X6(e,a,r),l=r;if(o===d3){for(let t=c;t<r;t++)if(e.charCodeAt(t)===d3)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=W6(d);var m=void 0;if(f){F6.lastIndex=0;for(var h;(h=F6.exec(f))!==null;)m||={},m[h[1]]=h[2]===void 0?h[3]:h[2]}let g=Y6(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)===u3)){for(var w=x+s;w<e.length&&e.charCodeAt(w)===o;)w++;var T=J6(e,w);if(n8(e,w,T)){_=S,v=Y6(e,T);break}}b=x+1}var E;if(i===0)E=_>g&&e.charCodeAt(_-1)===u3?e.slice(g,_-1):e.slice(g,_);else{E=``;for(var D=g;D<_;){var O=J6(e,D);t8(e,D,O);var k=Math.min(e8,i);E+=e.slice(D+k,O)+`
236
+ `,D=Y6(e,O)}E.length>0&&E.charCodeAt(E.length-1)===u3&&(E=E.slice(0,-1))}return{node:{type:$.codeBlock,lang:d||void 0,text:E,infoString:f||void 0,attrs:m},end:v}}function Ade(e,t){if(t8(e,t,J6(e,t)),$6<4)return null;let n=``,r=t;for(;r<e.length;){let t=J6(e,r);if(t8(e,r,t),n8(e,r,t)){for(var i=0,a=Y6(e,t);a<e.length;){var o=J6(e,a);if(n8(e,a,o)){i++,a=Y6(e,o);continue}if(t8(e,a,o),$6>=4){for(var s=0;s<=i;s++)n+=`
237
+ `;r=a;break}break}if(r!==a)break;continue}if($6<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+`
238
+ `,r=Y6(e,t)}for(;n.length>0&&n.charCodeAt(n.length-1)===u3;)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 jde(e,t,n,r){if(t8(e,t,J6(e,t)),$6>3)return null;let i=t+e8;if(e.charCodeAt(i)!==h3)return null;let a=``,o=t,s,c=!1,l=!1,u=!1;for(;o<e.length;){let t=J6(e,o);t8(e,o,t);let n=o+e8;if(e.charCodeAt(n)===h3){let r=n+1;var d=$6+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=Y6(e,t);continue}}a+=m+`
239
+ `;var C=m.trimStart();C.startsWith("```")||C.startsWith(`~~~`)?u=!u:(m.startsWith(` `)||m.startsWith(` `))&&(u=!0),l=C.length>0,o=Y6(e,t)}else if(a&&!n8(e,o,t)&&l){if($6<4){var w=o+e8,T=w<t?e.charCodeAt(w):0;if(T===g3||T===h3||T===d3||T===f3||T===C3||(T===v3||T===x3||T===S3)&&r8(e,o)||(T===v3||T===x3||T===H3)&&w+1<t&&(e.charCodeAt(w+1)===Z||e.charCodeAt(w+1)===Q))break;if(T>=Y3&&T<=X3){for(var E=w;E<t&&e.charCodeAt(E)>=Y3&&e.charCodeAt(E)<=X3;)E++;if(E<t&&(e.charCodeAt(E)===R3||e.charCodeAt(E)===q3))break}}if(u)break;a+=e.slice(o,t)+`
240
+ `,c=!0,o=Y6(e,t)}else break}if(!a&&!s)return null;var{inBlockQuote:D,f:O}=n;n.inBlockQuote=!0,c&&(n.f=!0);let k=D8(a||``,n,r);return n.inBlockQuote=D,n.f=O,{node:{type:$.blockQuote,children:k,alert:s||void 0},end:o}}function i8(e,t,n){for(var r=0,i=t;i<n;i++)e.charCodeAt(i)===Q?r+=4-r%4:r++;return r}function a8(e,t,n){if(t8(e,t,n),$6>3)return null;var r=t+e8;if(r>=n)return null;var i=e.charCodeAt(r),a=$6,o=r;if(i===v3||i===x3||i===H3){if(o=r+1,o<n&&e.charCodeAt(o)!==Z&&e.charCodeAt(o)!==Q&&e.charCodeAt(o)!==u3)return null}else if(i>=Y3&&i<=X3){for(var s=r;s<n&&s-r<9;){var c=e.charCodeAt(s);if(c<Y3||c>X3)break;s++}if(s>r&&s<n){var l=e.charCodeAt(s);if(l===R3||l===q3){if(o=s+1,o<n&&e.charCodeAt(o)!==Z&&e.charCodeAt(o)!==Q&&e.charCodeAt(o)!==u3)return null}else return null}else return null}else return null;var u=o,d=i8(e,t,o),f=0,p=u,m=d;if(u>=n)return{ordered:i>=Y3&&i<=X3,marker:i>=Y3&&i<=X3?e[s]:e[r],start:i>=Y3&&i<=X3?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>=Y3&&i<=X3,marker:i>=Y3&&i<=X3?e[s]:e[r],start:i>=Y3&&i<=X3?parseInt(e.slice(r,s),10):void 0,contentStart:p,contentCol:m,markerCol:a,isEmpty:g}}var o8=0;function Mde(e,t,n,r){var i=0,a=t;for(o8=0;a<n&&i<r;){var o=e.charCodeAt(a);if(o===Q){var s=4-i%4;if(i+s>r){o8=i+s-r,a++,i=r;break}i+=s}else if(o===Z)i++;else break;a++}return a}function s8(e,t,n,r){var i=J6(e,t),a=a8(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=i8(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+`
241
+ `}else l=e.slice(a.contentStart,i)+`
242
+ `}for(s=Y6(e,i);s<e.length;){var S=J6(e,s);t8(e,s,S);var C=e.charCodeAt(s+e8);if($6<c&&(C===v3||C===x3||C===S3)&&$6<=3&&r8(e,s))break;var w=a8(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)+`
243
+ `,s=Y6(e,S);continue}if(n8(e,s,S)){l+=`
244
+ `,s=Y6(e,S);for(var T=!1,E=0;E<l.length;E++){var D=l.charCodeAt(E);if(D!==u3&&D!==l3&&D!==Z&&D!==Q){T=!0;break}}if(u&&!T)if(s<e.length){var O=J6(e,s),k=a8(e,s,O);if(!k||k.ordered!==a.ordered||k.marker!==a.marker)break;d=!0}else break;if(s<e.length){var A=J6(e,s);t8(e,s,A);var j=e.charCodeAt(s+e8);if((j===v3||j===x3||j===S3)&&$6<=3&&r8(e,s))break;var M=a8(e,s,A);if(M&&M.ordered===a.ordered&&M.marker===a.marker&&M.markerCol<c){d=!0;continue}if(!n8(e,s,A)&&$6<c)break}continue}if($6>=c){var N=Mde(e,s,S,c);if(o8>0){for(var P=``,F=c,I=0;I<o8;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+`
245
+ `}else l+=e.slice(N,S)+`
246
+ `;s=Y6(e,S);continue}for(var ne=!1,re=0;re<l.length;re++){var R=l.charCodeAt(re);if(R!==u3&&R!==l3&&R!==Z&&R!==Q){ne=!0;break}}if(!d&&ne&&!u){var z=s+e8,ie=e.charCodeAt(z);if(!(ie===g3||ie===h3||ie===C3||ie===d3||ie===f3||(ie===v3||ie===x3||ie===S3||ie===H3)&&(r8(e,s)!==null||a8(e,s,S)!==null)||ie>=Y3&&ie<=X3&&a8(e,s,S)!==null)){l+=``+e.slice(z,S)+`
247
+ `,s=Y6(e,S);continue}}break}if(o.push({contentCol:c,raw:l,hasBlankAfter:d,isEmpty:u}),o.length===0)return null;var ae=f;if(!ae)for(var oe=0;oe<o.length;oe++){if(o[oe].hasBlankAfter&&oe<o.length-1){ae=!0;break}if(!o[oe].isEmpty){for(var se=o[oe].raw,ce=se.length,le=0,ue=!1,de=!1,fe=!1,pe=!1,me=0,he=0,ge=-1;le<ce;){var _e=se.indexOf(`
248
+ `,le);if(_e<0&&(_e=ce),pe){t8(se,le,_e);for(var ve=se.slice(le+e8,_e),ye=0;ye<ve.length&&ve.charCodeAt(ye)===me;)ye++;ye>=he&&ve.slice(ye).trim()===``&&(pe=!1),le=_e<ce?_e+1:ce;continue}if(n8(se,le,_e)){ge>=0?fe=!0:ue&&(de=!0),le=_e<ce?_e+1:ce;continue}if(t8(se,le,_e),ge>=0){if($6>=ge){le=_e<ce?_e+1:ce;continue}var be=a8(se,le,_e);if(be&&be.markerCol<ge&&be.contentCol<=ge){le=_e<ce?_e+1:ce;continue}if(be){le=_e<ce?_e+1:ce;continue}ge=-1,fe&&=(de=!0,!1)}var xe=se.slice(le+e8,_e),Se=xe.charCodeAt(0);if((Se===d3||Se===f3)&&$6<=3){for(var Ce=0;Ce<xe.length&&xe.charCodeAt(Ce)===Se;)Ce++;if(Ce>=3){if(de&&ue){ae=!0;break}pe=!0,me=Se,he=Ce,ue=!0,le=_e<ce?_e+1:ce;continue}}var we=$6<=3?a8(se,le,_e):null;if(we&&ue){if(de){ae=!0;break}ge=we.contentCol,fe=!1,le=_e<ce?_e+1:ce,ue=!0;continue}if(de){ae=!0;break}ue=!0,le=_e<ce?_e+1:ce}if(ae)break}}for(var Te=[],Ee=0;Ee<o.length;Ee++){for(var De=o[Ee],Oe=De.raw,ke=Oe.length;ke>0&&Oe.charCodeAt(ke-1)===u3;)ke--;var Ae=ke<Oe.length?Oe.slice(0,ke):Oe,je=null;if(Ae.length>=3&&Ae.charCodeAt(0)===p3){var Me=Ae[1];(Me===` `||Me===`x`||Me===`X`)&&Ae.charCodeAt(2)===T3&&(je={type:$.gfmTask,completed:Me===`x`||Me===`X`},Ae=Ae.slice(3))}var Ne;if(De.isEmpty&&Ae.trim()===``)Ne=[];else if(ae){var Pe=n.inList;n.inList=!0,Ne=D8(Ae,n,r),n.inList=Pe}else{var Fe=n.inList;if(n.inList=!0,Ne=D8(Ae,n,r),n.inList=Fe,Ne.length===1&&Ne[0].type===$.paragraph)Ne=Ne[0].children;else if(n.h){var Ie=[];n.h.push({src:Ne,dest:Ie,unwrap:!0}),Ne=Ie}else{for(var Le=[],Re=0;Re<Ne.length;Re++)if(Ne[Re].type===$.paragraph)for(var ze=Ne[Re].children,Be=0;Be<ze.length;Be++)Le.push(ze[Be]);else Le.push(Ne[Re]);Ne=Le}}if(je){var Ve=[je,{type:$.text,text:` `}];if(n.h)n.h.push({src:Ne,dest:Ve,unwrap:!1});else for(var He=0;He<Ne.length;He++)Ve.push(Ne[He]);Te.push(Ve)}else Te.push(Ne)}return{node:{type:a.ordered?$.orderedList:$.unorderedList,start:a.ordered?a.start:void 0,items:Te},end:s}}var c8=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 l8(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===K3?n++:r===q3?n--:r===I3&&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)===W3&&s.charCodeAt(s.length-1)===G3){var i=s.slice(1,-1);if(i.length>0){var a=i.charCodeAt(0);if(a===p3||a===W3)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 u8(e,t,n){let r=t.length;if(r===0)return n;var i=t.charCodeAt(0);if(!(i>=Z3&&i<=Q3||i>=$3&&i<=e6)){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>=Z3&&d<=Q3&&(d+=n6),f>=Z3&&f<=Q3&&(f+=n6),d!==f){l=!1;break}}if(l)return c;s=c+1}return-1}i>=Z3&&i<=Q3&&(i+=n6);for(let a=n;a<=e.length-r;a++){var p=e.charCodeAt(a);if(p>=Z3&&p<=Q3&&(p+=n6),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>=Z3&&r<=Q3&&(r+=n6),o>=Z3&&o<=Q3&&(o+=n6),r!==o){n=!1;break}}if(n)return a}return-1}function Nde(e,t,n){let r=t.length;var i=t.charCodeAt(0);i>=Z3&&i<=Q3&&(i+=n6);for(let o=Math.min(n,e.length-r);o>=0;o--){var a=e.charCodeAt(o);if(a>=Z3&&a<=Q3&&(a+=n6),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>=Z3&&r<=Q3&&(r+=n6),a>=Z3&&a<=Q3&&(a+=n6),r!==a){n=!1;break}}if(n)return o}return-1}var d8=-1;function f8(e,t,n){let r=n.toLowerCase(),i=`<`+r,a=`</`+r,o=1,s=t,c=e.length;for(d8=-1;s<c&&o>0;){let t=u8(e,i,s),n=u8(e,a,s);if(n===-1)return-1;if(t!==-1&&t<n){let n=L6(e,t);n?(n.tag.toLowerCase()===r&&!n.isClosing&&!n.selfClosing&&!p6(n.tag)&&o++,s=n.end):s=t+1}else{var l=n+a.length,u=l<c?e.charCodeAt(l):62;if((u===h3||u===Z||u===Q||u===u3)&&(o--,o===0)){d8=n;let t=n+a.length;for(;t<c&&e.charCodeAt(t)!==h3;)t++;return t+1}s=n+1}}return-1}function p8(e,t,n,r){if(r.ignoreHTMLBlocks||r.disableParsingRawHTML)return null;var i=J6(e,t);if(t8(e,t,i),$6>3&&!n.inHTML)return null;var a=t+e8;if(e.charCodeAt(a)!==C3)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=Pde(e,a);if(c>=1&&c<=5){var l=e.length;if(c===1){for(var u=e.length,d=0;d<k6.length;d++){var f=u8(e,`</`+k6[d]+`>`,a);f>=0&&f<u&&(u=f)}if(u<e.length){var p=e.indexOf(`>`,u);l=p>=0?Y6(e,p+1):e.length}}else{var m=c===2?`-->`:c===3?`?>`:c===4?`>`:`]]>`,h=e.indexOf(m,a);h>=0&&(l=Y6(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=L6(e,a),b={},x;y&&!y.isClosing&&(b=l8(y.attrs,_,r),x=y.whitespaceBeforeAttrs+y.rawAttrs);var S=[],C=u8(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)===u3;)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)===u3&&(w=w.slice(1));w.length>0&&w.charCodeAt(w.length-1)===u3;)w=w.slice(0,-1);else for(w=g;w.length>0&&w.charCodeAt(w.length-1)===u3;)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=Z6(e,t),k=O<e.length?O:e.length,A=e.slice(a,k),j=O<e.length?Y6(e,O):e.length,M=L6(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||p6(N))return{node:{type:$.htmlBlock,tag:N,attrs:l8(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)===u3?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,re=M.end-a,R=1,z=re;z<L.length&&R>0;){var ie=u8(L,`<`+P,z),ae=u8(L,ne,z);if(ae===-1)break;if(ie!==-1&&ie<ae){var oe=ie+P.length+1;if(oe<L.length){var se=L.charCodeAt(oe);(se===Z||se===Q||se===u3||se===h3||se===z3)&&R++}z=ie+1}else{var ce=ae+ne.length;if(ce<L.length){var le=L.charCodeAt(ce);if((le===h3||le===Z||le===Q||le===u3)&&(R--,R===0)){ee=ae;for(var ue=ce;ue<L.length&&L.charCodeAt(ue)!==h3;)ue++;te=ue+1;break}}else if(R--,R===0){ee=ae,te=L.length;break}z=ae+1}}var de=!1;if(ee===-1&&c===6&&!M.isClosing){var fe=f8(e,M.end,P);if(fe!==-1){for(var pe=d8,me=M.end,he=!1,ge=!1,_e=!1,ve=0,ye=!1,be=!1,xe=me;xe<pe;){var Se=e.charCodeAt(xe);if(Se===u3)be&&(he=!0),ye||ve++,be=!0,xe++;else if(Se===Z||Se===Q)xe++;else{if(!ye&&(ye=!0,ve>=2&&Se===C3)){_e=!0;break}if(be=!1,Se===C3){var Ce=e.charCodeAt(xe+1)|32;if((Ce===P3||Ce===F3||Ce===N3)&&(j6.lastIndex=xe,j6.test(e))){ge=!0;break}}xe++}}if(he&&!_e&&!ge){var we=J6(e,fe);k=we,j=Y6(e,we),L=e.slice(a,k),A=e.slice(a,k),ee=pe-a,te=fe-a,de=!0}}}}var Te=M.rawAttrs.indexOf(`
249
+ `)!==-1||M.whitespaceBeforeAttrs.indexOf(`
250
+ `)!==-1,Ee=!1;ee!==-1&&(Ee=L.slice(te).trim().length===0);var De=!1,Oe=k,ke=j;if(ee!==-1){var Ae=a+te,je=J6(e,Ae-1);if(Ae<je){for(var Me=Ae;Me<je&&(e.charCodeAt(Me)===Z||e.charCodeAt(Me)===Q);)Me++;if(Me<je&&e.charCodeAt(Me)===C3){var Ne=L6(e,Me);Ne&&!Ne.isClosing&&(De=!0,Oe=Ae,ke=Ae,Ee=!0)}}if(!De){var Pe=Y6(e,je);if(Pe<k){for(var Fe=Pe;Fe<k&&(e.charCodeAt(Fe)===Z||e.charCodeAt(Fe)===Q);)Fe++;Fe<k&&e.charCodeAt(Fe)===C3&&L6(e,Fe)&&(De=!0,Oe=je,ke=Pe,Ee=!0)}}!De&&n.inHTML&&(De=!0,Oe=je,ke=Y6(e,je),Ee=e.slice(Ae,je).trim().length===0)}var Ie=[],Le=``;if(ee!==-1){Le=L.slice(M.end-a,ee);var Re=Le.trim();if(Re){var{inline:ze,inHTML:Be,c:Ve}=n;if(n.inHTML=!0,n.c=I+1,P===`p`)n.inline=!0,Ie=g8(Re,!1,n,r);else{var He=Le.indexOf(`
251
+
252
+ `)!==-1,Ue=M6.test(Re),We=N6.test(Re),Ge=He||Ue||n.inHTML&&We;Le.length>=2&&Le.charCodeAt(0)===u3&&Le.charCodeAt(Le.length-1)===u3&&!He&&!Ue&&!We?Ie=[{type:$.text,text:Re}]:Ge||We?(n.inline=!1,Ie=D8(Le,n,r)):(n.inline=!0,Ie=g8(Re,!1,n,r))}n.inline=ze,n.inHTML=Be,n.c=Ve}}var B=!1;if(c===6&&ee!==-1&&!n.inHTML&&!Te){var Ke=/<[a-zA-Z][^>]*>/.test(Le),qe=Le.indexOf(`
253
+
254
+ `)!==-1||M6.test(Le);Ke&&!qe&&(B=!0)}if(!de&&(n.inHTML||c===7||Te||!Ee||B)){var Je,Ye=!1;if(ee!==-1&&De){var Xe=!1;if(n.inHTML&&te<L.length){for(var Ze=te;Ze<L.length&&L.charCodeAt(Ze)!==u3;)Ze++;var Qe=L.slice(te,Ze).trim();Xe=Qe.length>1&&Qe.charCodeAt(0)===C3&&Qe.charCodeAt(1)!==z3}Je=Xe?L.slice(M.end-a):Le,Ye=!0}else(c===7||n.inHTML)&&ee!==-1?(Je=L.slice(M.end-a),Je.charCodeAt(0)===u3&&(Je=Je.slice(1))):De?Je=e.slice(a,Oe):Te?Je=A:(Je=L.slice(M.end-a),Je.charCodeAt(0)===u3&&(Je=Je.slice(1)));var $e={type:$.htmlBlock,tag:N,attrs:l8(M.attrs,N,r),i:M.whitespaceBeforeAttrs+M.rawAttrs,children:Ie,a:Je,text:Je,d:!0,b:!1};return Ye&&($e.n=!0),{node:$e,end:ke}}return{node:{type:$.htmlBlock,tag:N,attrs:l8(M.attrs,N,r),i:M.whitespaceBeforeAttrs+M.rawAttrs,children:Ie,a:de?``:Le,text:Le,d:!1,b:!1},end:ke}}var et=A.match(/^<(\/?)([a-zA-Z][a-zA-Z0-9-]*)/),tt=et?et[2]:`div`,nt=et?et[1]===`/`:!1,rt=A;if(nt){var it=A.indexOf(`>`);it!==-1&&(rt=A.slice(it+1))}return{node:{type:$.htmlBlock,tag:tt,attrs:{},children:[],a:rt,text:rt,d:!0,b:nt},end:j}}var at=L6(e,a);if(!at)return null;var ot=at.tag,st=ot.toLowerCase(),ct=ot.charCodeAt(0),lt=ct>=Z3&&ct<=Q3;if(!lt&&!c8.has(st)&&!A6.has(st)&&!st.includes(`-`))return null;if(at.isClosing)return{node:{type:$.htmlSelfClosing,tag:ot,attrs:{},a:e.slice(a,at.end),b:!0},end:at.end};var ut=f8(e,at.end,ot),dt=[];if(ut!==-1){var ft=d8,pt=e.slice(at.end,ft),mt=pt.trim();if(mt){var ht=pt.indexOf(`
255
+
256
+ `)!==-1,gt=M6.test(mt),_t=N6.test(mt),vt=n.inline,yt=n.inHTML,bt=n.c;n.inHTML=!0,n.c=(n.c||0)+1,ht||gt||_t?(n.inline=!1,dt=D8(pt,n,r)):(n.inline=!0,dt=g8(mt,!1,n,r)),n.inline=vt,n.inHTML=yt,n.c=bt}var xt=J6(e,ut),St=e.slice(ut,xt).trim()?ut:Y6(e,ut),Ct=lt?e.slice(a,ut):e.slice(a,St);return{node:{type:$.htmlBlock,tag:ot,attrs:l8(at.attrs,ot,r),i:at.whitespaceBeforeAttrs+at.rawAttrs,children:dt,a:Ct,text:lt?pt:Ct,d:!0,b:!1},end:St}}var wt=Z6(e,at.end),Tt=wt<e.length?Y6(e,wt):wt,Et=e.slice(at.end,wt);if(Et.trim()){var{inline:Dt,inHTML:Ot,c:kt}=n;n.inline=!1,n.inHTML=!0,n.c=(n.c||0)+1,dt=D8(Et,n,r),n.inline=Dt,n.inHTML=Ot,n.c=kt}var At=e.slice(at.end,wt);return{node:{type:$.htmlBlock,tag:ot,attrs:l8(at.attrs,ot,r),i:at.whitespaceBeforeAttrs+at.rawAttrs,children:dt,a:At,text:Et,d:!0,b:!1},end:Tt}}function Pde(e,t){if(e.charCodeAt(t)!==C3)return 0;var n=t+1,r=e.length;if(e.charCodeAt(n)===E3&&e.charCodeAt(n+1)===v3&&e.charCodeAt(n+2)===v3)return 2;if(e.charCodeAt(n)===L3)return 3;if(e.charCodeAt(n)===E3){var i=e.charCodeAt(n+1);if(i>=Z3&&i<=Q3)return 4;if(e.slice(n+1,n+8)===`[CDATA[`)return 5}for(var a=e.charCodeAt(n)===z3,o=a?n+1:n,s=o;s<r;){var c=e.charCodeAt(s);if(c>=Z3&&c<=Q3||c>=$3&&c<=e6||c>=Y3&&c<=X3||c===v3)s++;else break}if(s===o)return 0;var l=e.slice(o,s);if(A6.has(l.toLowerCase())){if(a)return 0;var u=e.charCodeAt(s);return+(u===Z||u===Q||u===h3||u===u3||s>=r)}if(c8.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)===h3?6:0}var f=s<r?e.charCodeAt(s):-1;return f===Z||f===Q||f===h3||f===u3||f===z3||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)===h3){var m=J6(e,t);if(e.slice(p+1,m).trim()===``)return 7}}else{var h=J6(e,t),g=L6(e,t);if(g&&g.end<=h&&e.slice(g.end,h).trim()===``)return 7}return 0}function m8(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)===U3&&r++,i>r&&e.charCodeAt(i-1)===U3&&(i-2<r||e.charCodeAt(i-2)!==b3)&&i--;for(var a=[],o=r,s=!1,c=[],l=r;l<i;){var u=e.charCodeAt(l);if(u===b3&&l+1<i){e.charCodeAt(l+1)===U3?(s||(s=!0,c=[]),c.push(e.slice(o,l)),c.push(`|`),l+=2,o=l):l+=2;continue}if(u===d3){for(var d=0;l<i&&e.charCodeAt(l)===d3;)d++,l++;for(var f=!1;l<i&&!f;){for(var p=0;l<i&&e.charCodeAt(l)===d3;)p++,l++;p===d?f=!0:p===0&&l++}continue}if(u===U3){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?g8(r,!1,t,n):[]})}function h8(e,t,n,r){let i=J6(e,t);var a=e.indexOf(`|`,t);if(a<0||a>=i)return null;let o=Y6(e,i);if(o>=e.length)return null;let s=J6(e,o);if(!I6(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)===U3&&d++;d<f;){for(;d<f&&(l.charCodeAt(d)===Z||l.charCodeAt(d)===Q);)d++;if(d>=f||l.charCodeAt(d)===U3)break;var p=l.charCodeAt(d)===O3;for(p&&d++;d<f&&l.charCodeAt(d)===v3;)d++;var m=d<f&&l.charCodeAt(d)===O3;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)===U3&&d++}let h=m8(c,n,r);if(u.length!==h.length)return null;let g=[],_=Y6(e,s);for(;_<e.length;){let t=J6(e,_),i=e.slice(_,t);if(n8(e,_,t))break;if(t8(e,_,t),$6<4){var v=e.charCodeAt(_+e8);if(v===h3||v===g3||(v===v3||v===x3||v===S3)&&r8(e,_))break;if(v===d3||v===f3){for(var y=_+e8,b=0;y<t&&e.charCodeAt(y)===v;)b++,y++;if(b>=3)break}}g.push(m8(i,n,r)),_=Y6(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 Fde(e,t,n){if(t8(e,t,J6(e,t)),$6>3)return null;var r=t+e8;if(e.charCodeAt(r)!==p3)return null;if(r+1<e.length&&e.charCodeAt(r+1)===m3)return Ide(e,r,n)||null;n.refs||={};var i=R6(e,r,n.refs);return i===null?null:{node:{type:$.refCollection},end:i}}function Ide(e,t,n){var r=e.length;if(e.charCodeAt(t)!==p3||t+1>=r||e.charCodeAt(t+1)!==m3)return null;for(var i=t+2,a=i;i<r&&e.charCodeAt(i)!==T3;){if(e.charCodeAt(i)===u3)return null;i++}if(i>=r)return null;var o=(`^`+e.slice(a,i)).toLowerCase();if(i++,i>=r||e.charCodeAt(i)!==O3)return null;for(i++;i<r&&(e.charCodeAt(i)===Z||e.charCodeAt(i)===Q);)i++;if(i<r&&e.charCodeAt(i)===u3)for(i++;i<r&&(e.charCodeAt(i)===Z||e.charCodeAt(i)===Q);)i++;var s=e.indexOf(`
257
+ `,i);s<0&&(s=r);for(var c=e.slice(i,s).trim(),l=s<r?s+1:r;l<r;){var u=J6(e,l);if(t8(e,l,u),$6>=2&&!n8(e,l,u))c+=`
258
+ `+e.slice(l,u),l=Y6(e,u);else if(n8(e,l,u)){var d=Y6(e,u);if(d<r&&(t8(e,d,J6(e,d)),$6>=2)){c+=`
259
+ `,l=Y6(e,u);continue}break}else break}return n.refs[o]||(n.refs[o]={target:c,title:void 0}),{node:{type:$.footnote},end:l}}function Lde(e,t,n,r){let i=t,a=0,o=0,s=-1;for(;i<e.length;){let t=s>=0?s:J6(e,i);if(s=-1,n8(e,i,t))break;if(t8(e,i,t),$6<4&&o>0&&!n.f){let n=e.charCodeAt(i+e8);if(n===y3||n===v3){let r=i+e8;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===y3?1:2,i=Y6(e,t);break}}}o=t;let x=Y6(e,t);if(x<e.length){if(e.charCodeAt(x)===J3){var c=J6(e,x);i=Y6(e,c),o=c;continue}let t=J6(e,x);if(s=t,t8(e,x,t),$6<4){let a=e.charCodeAt(x+e8);if(a===h3){i=x;break}if(a===g3){for(var l=x+e8,u=0;l<t&&e.charCodeAt(l)===g3&&u<=6;)u++,l++;if(u>=1&&u<=6&&(l>=t||e.charCodeAt(l)===Z||e.charCodeAt(l)===Q)){i=x;break}}if(a===d3||a===f3){for(var d=x+e8,f=0;d<t&&e.charCodeAt(d)===a;)f++,d++;if(f>=3){i=x;break}}if(a===C3){var p=x+e8+1,m=p<t?e.charCodeAt(p):0,h=m===E3||m===L3;if(!h&&m===z3){for(var g=p+1,_=g;_<t&&(e.charCodeAt(_)>=Z3&&e.charCodeAt(_)<=Q3||e.charCodeAt(_)>=$3&&e.charCodeAt(_)<=e6||e.charCodeAt(_)>=Y3&&e.charCodeAt(_)<=X3||e.charCodeAt(_)===v3);)_++;_>g&&(h=c8.has(e.slice(g,_).toLowerCase()))}else if(!h){for(var v=p;v<t&&(e.charCodeAt(v)>=Z3&&e.charCodeAt(v)<=Q3||e.charCodeAt(v)>=$3&&e.charCodeAt(v)<=e6||e.charCodeAt(v)>=Y3&&e.charCodeAt(v)<=X3||e.charCodeAt(v)===v3);)v++;if(v>p){var y=e.slice(p,v).toLowerCase();h=c8.has(y)||A6.has(y)}}if(h&&p8(e,x,n,r)){i=x;break}}if(a===v3||a===x3||a===H3){let n=x+e8+1;if(n<t&&(e.charCodeAt(n)===Z||e.charCodeAt(n)===Q)&&X6(e,n,t)<t&&!r8(e,x)){i=x;break}}if(a>=Y3&&a<=X3){let n=x+e8;for(;n<t&&e.charCodeAt(n)>=Y3&&e.charCodeAt(n)<=X3;)n++;if(n<t&&(e.charCodeAt(n)===R3||e.charCodeAt(n)===q3)&&n-(x+e8)===1&&e.charCodeAt(x+e8)===49){var b=n+1;if(b<t&&(e.charCodeAt(b)===Z||e.charCodeAt(b)===Q)&&X6(e,b,t)<t){i=x;break}}}if(a===U3){let n=Y6(e,t);if(n<e.length&&I6(e,n,J6(e,n))){i=x;break}}if((a===v3||a===x3||a===S3)&&r8(e,x)){if(a!==v3){i=x;break}let n=0,r=x+e8;for(;r<t&&e.charCodeAt(r)===v3;)n++,r++;for(;r<t&&(e.charCodeAt(r)===Z||e.charCodeAt(r)===Q);)r++;if(r<t){i=x;break}}}}i=Y6(e,t)}for(var x=a?o:i;x>t&&(e.charCodeAt(x-1)===u3||e.charCodeAt(x-1)===l3||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)===J3){C=!0;break}var T=C?e.slice(S,x).replace(/\u001E/g,``):e.slice(S,x);if(!T)return null;let E=g8(T,!0,n,r);if(a){let e=(r?.slugify||u6)(T);return{node:{type:$.heading,level:a,children:E,id:e},end:i}}return{node:{type:$.paragraph,children:E},end:i}}function g8(e,t,n,r){var i=n.k;if(!i){var a=n.e;n.e=t;var o=E8(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 Rde(e,t,n){if(e.charCodeAt(t)!==d3)return null;let r=Q6(e,t,n,96),i=t+r;for(;i<n;){let a=e.indexOf("`",i);if(a<0||a>=n)return null;let o=Q6(e,a,n,96);if(o===r){let n=e.slice(t+r,a);return n.indexOf(`
260
+ `)!==-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 _8(e,t,n){if(e.charCodeAt(t)!==d3)return t;let r=Q6(e,t,n,96),i=t+r;for(;i<n;){let a=e.indexOf("`",i);if(a<0||a>=n)return t;let o=Q6(e,a,n,96);if(o===r)return a+o;i=a+o}return t}function zde(e,t,n){if(e.charCodeAt(t)!==C3)return t;if(t+1<n&&e.charCodeAt(t+1)===z3){let r=t+2;for(;r<n&&e.charCodeAt(r)!==h3;)r++;return r<n?r+1:t}if(t+3<n&&e.charCodeAt(t+1)===E3&&e.charCodeAt(t+2)===v3&&e.charCodeAt(t+3)===v3){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>=Z3&&t<=Q3||t>=$3&&t<=e6||t>=Y3&&t<=X3||t===v3)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===h3){r++;break}if(i===z3&&r+1<n&&e.charCodeAt(r+1)===h3){r+=2,o=!0;break}if(i===V3||i===B3){var s=i;for(r++;r<n&&e.charCodeAt(r)!==s;)r++;r<n&&r++;continue}if(i===u3)return t;r++}if(o||p6(a))return r;let c=1;for(;r<n&&c>0;)if(e.charCodeAt(r)===C3)if(r+1<n&&e.charCodeAt(r+1)===z3){let t=r+2,i=t;for(;i<n&&(e.charCodeAt(i)>=Z3&&e.charCodeAt(i)<=Q3||e.charCodeAt(i)>=$3&&e.charCodeAt(i)<=e6);)i++;if(e.slice(t,i).toLowerCase()===a){for(;i<n&&e.charCodeAt(i)!==h3;)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)>=Z3&&e.charCodeAt(i)<=Q3||e.charCodeAt(i)>=$3&&e.charCodeAt(i)<=e6);)i++;e.slice(t,i).toLowerCase()===a&&c++,r++}else r++;return r}function Bde(e,t,n,r,i){if(e.charCodeAt(t)!==f3||t+1>=n||e.charCodeAt(t+1)!==f3)return null;let a=t+2;for(;a+1<n;){let o=e.charCodeAt(a);if(o===d3){let t=_8(e,a,n);if(t>a){a=t;continue}}if(o===f3&&e.charCodeAt(a+1)===f3){let n=e.slice(t+2,a),o=E8(n,0,n.length,r,i);return{node:{type:$.textFormatted,tag:`del`,children:o},end:a+2}}o===b3&&a+1<n&&a++,a++}return null}function Vde(e,t,n,r,i){if(e.charCodeAt(t)!==y3||t+1>=n||e.charCodeAt(t+1)!==y3)return null;let a=t+2;for(;a+1<n;){let o=e.charCodeAt(a);if(o===d3){let t=_8(e,a,n);if(t>a){a=t;continue}}if(o===y3&&e.charCodeAt(a+1)===y3&&a>t+2){let n=e.slice(t+2,a),o=E8(n,0,n.length,r,i);return{node:{type:$.textFormatted,tag:`mark`,children:o},end:a+2}}o===b3&&a+1<n&&a++,a++}return null}function v8(e,t,n){return e<t6?!!(U6(e)&g6):sde.test(t[n])}function y8(e,t,n){return e<t6?!!(U6(e)&m6):cde.test(t[n])}function Hde(e,t,n){var r=e.charCodeAt(t);if(r!==x3&&r!==S3)return null;var i=Q6(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=y8(a,e,t-1),c=y8(o,e,t+i),l=t>0&&v8(a,e,t-1),u=t+i<n&&v8(o,e,t+i),d=!c&&(!u||s||l),f=!s&&(!l||c||u),p,m;return r===x3?(p=d,m=f):(p=d&&(!f||l),m=f&&(!d||u)),{len:i,canOpen:p,canClose:m}}function Ude(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===x3?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 b8(e,t,n,r,i){let a=e.charCodeAt(t)===E3,o=a?t+1:t;if(e.charCodeAt(o)!==p3)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===b3&&c+1<n){c+=2;continue}if(u===d3){var d=_8(e,c,n);if(d>c){c=d;continue}}if(u===C3){var f=x8(e,c,n);if(f){c=f.end;continue}var p=zde(e,c,n);if(p>c){c=p;continue}}u===p3?l++:u===T3&&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===K3){var v=!0;for(c++;c<n&&(e.charCodeAt(c)===Z||e.charCodeAt(c)===u3);)c++;var y=``,b=c;if(c<n&&e.charCodeAt(c)===C3){for(c++,b=c;b<n&&e.charCodeAt(b)!==h3;){if(e.charCodeAt(b)===b3&&b+1<n){b+=2;continue}if(e.charCodeAt(b)===u3){v=!1;break}b++}v&&(b>=n||e.charCodeAt(b)!==h3)&&(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===b3&&b+1<n){b+=2;continue}if(C===K3)x++;else if(C===q3){if(S=!0,x===0)break;x--}else if(C===Z||C===u3)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)===u3);)c++;var w;if(c<n){var T=e.charCodeAt(c);if(T===V3||T===B3||T===K3){var E=T===K3?41:T;c++;for(var D=c;c<n&&e.charCodeAt(c)!==E;)e.charCodeAt(c)===b3&&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)===u3);)c++;(c>=n||e.charCodeAt(c)!==q3)&&(v=!1)}}if(v){c++,y=W6(y),w!==void 0&&(w=i6(W6(w)));var O=(i?.sanitizer||o6)(y,a?`img`:`a`,a?`src`:`href`)===null?null:y;if(a){var k=C8(E8(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}]:E8(h,0,h.length,r,i);return r.inAnchor=A,!r.inAnchor&&S8(j)?null:{node:{type:$.link,target:O,title:w,children:j},end:c}}}else c=m+1,_=!0}var M=``,N=c;if(!_&&g===p3){var P=c+1;N=P;for(var F=!1;N<n&&e.charCodeAt(N)!==T3;){if(e.charCodeAt(N)===b3&&N+1<n){N+=2;continue}if(e.charCodeAt(N)===p3){F=!0;break}N++}if(F||N>=n)return null;var I=e.slice(P,N);if(I.trim())M=H6(I);else{if(V6(h))return null;M=H6(h)}N+=1}else{if(V6(h))return null;M=H6(h)}var L=r.refs[M];if(!L)return null;if(a)return{node:{type:$.image,target:L.target,alt:C8(E8(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}]:E8(h,0,h.length,r,i);return r.inAnchor=ee,!r.inAnchor&&S8(j)?null:{node:{type:$.link,target:L.target,title:L.title,children:j},end:N}}function x8(e,t,n){if(e.charCodeAt(t)!==C3)return null;for(var r=t+1;r<n;){var i=e.charCodeAt(r);if(i===h3)break;if(i===Z||i===u3||i===l3||i===C3)return null;r++}if(r>=n||e.charCodeAt(r)!==h3)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 Wde(e,t,n,r){if(e.charCodeAt(t)!==p3||t+1>=n||e.charCodeAt(t+1)!==m3)return null;let i=t+2;for(;i<n&&e.charCodeAt(i)!==T3&&e.charCodeAt(i)!==u3;)i++;if(i>=n||e.charCodeAt(i)!==T3)return null;let a=e.slice(t+2,i);return a?{node:{type:$.footnoteReference,target:`#`+u6(a),text:a},end:i+1}:null}function Gde(e,t,n,r){if(r.disableBareUrls)return null;var i=``,a=!1,o=e.charCodeAt(t);if(o===j3||o===72?t+8<=n&&e.charCodeAt(t+1)===N3&&e.charCodeAt(t+2)===N3&&e.charCodeAt(t+3)===P3&&(e.charCodeAt(t+4)===F3&&e.charCodeAt(t+5)===O3&&e.charCodeAt(t+6)===z3&&e.charCodeAt(t+7)===z3?i=`https://`:e.charCodeAt(t+4)===O3&&e.charCodeAt(t+5)===z3&&e.charCodeAt(t+6)===z3&&(i=`http://`)):o===A3||o===70?t+6<=n&&e.charCodeAt(t+1)===N3&&e.charCodeAt(t+2)===P3&&e.charCodeAt(t+3)===O3&&e.charCodeAt(t+4)===z3&&e.charCodeAt(t+5)===z3&&(i=`ftp://`):(o===M3||o===87)&&t+4<=n&&e.charCodeAt(t+1)===M3&&e.charCodeAt(t+2)===M3&&e.charCodeAt(t+3)===R3&&(i=`www.`,a=!0),!i)return null;let s=t+i.length;for(;s<n;){let t=e.charCodeAt(s);if(t===Z||t===u3||t===Q||t===l3||t===C3||t===h3)break;s++}for(var c=0,l=0,u=t;u<s;u++){var d=e.charCodeAt(u);d===K3?c++:d===q3&&l++}let f=s;for(;f>t+i.length;){let n=e.charCodeAt(f-1);if(n===R3||n===Zue||n===O3||n===E3||n===L3||n===q3||n===x3||n===S3||n===f3){if(n===q3){if(c>=l)break;l--}f--}else if(n===I3){for(var p=f-2;p>t&&(e.charCodeAt(p)>=Z3&&e.charCodeAt(p)<=Q3||e.charCodeAt(p)>=$3&&e.charCodeAt(p)<=e6||e.charCodeAt(p)>=Y3&&e.charCodeAt(p)<=X3);)p--;p>=t&&e.charCodeAt(p)===D3?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)===R3)if(g<0)g=v;else{_=v;break}for(var v=_>=0?_+1:m;v<h;v++)if(e.charCodeAt(v)===S3)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 Kde(e,t,n,r){if(r.disableBareUrls)return null;for(var i=t,a=i;i<n;){var o=e.charCodeAt(i);if(o>=Z3&&o<=Q3||o>=$3&&o<=e6||o>=Y3&&o<=X3||o===R3||o===E3||o===g3||o===36||o===_3||o===D3||o===B3||o===x3||o===H3||o===z3||o===y3||o===L3||o===m3||o===S3||o===d3||o===W3||o===U3||o===G3||o===f3||o===v3)i++;else break}if(i===a||i>=n||e.charCodeAt(i)!==w3)return null;i++;for(var s=i,c=-1,l=i;i<n;){var o=e.charCodeAt(i);if(o>=Z3&&o<=Q3||o>=$3&&o<=e6||o>=Y3&&o<=X3)i++;else if((o===v3||o===S3)&&i>s)i++;else if(o===R3){if(i===s)break;var u=e.charCodeAt(i-1);if(u===v3||u===S3||i-l>63)break;if(i+1<n){var d=e.charCodeAt(i+1);if(d>=Z3&&d<=Q3||d>=$3&&d<=e6||d>=Y3&&d<=X3)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>=Z3&&f<=Q3||f>=$3&&f<=e6||f>=Y3&&f<=X3)||i<=c+1)return null;for(var p=-1,m=c-1;m>=s;m--)if(e.charCodeAt(m)===R3){p=m;break}for(var m=p>=0?p+1:s;m<i;m++)if(e.charCodeAt(m)===S3)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 S8(e){for(var t=0;t<e.length;t++)if(e[t].type===$.link||`children`in e[t]&&Array.isArray(e[t].children)&&S8(e[t].children))return!0;return!1}function C8(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+=C8(r.children):r.type===$.image&&(t+=r.alt||``)}return t}function w8(e){return{type:$.text,text:e}}function qde(e,t,n){var r=t+1;if(r>=n)return-1;if(e.charCodeAt(r)===g3){r++;var i=r<n&&(e.charCodeAt(r)===Que||e.charCodeAt(r)===$ue);i&&r++;for(var a=r,o=i?6:7;r<n&&r-a<=o;){var s=e.charCodeAt(r);if(!(s>=Y3&&s<=X3||i&&(s>=Z3&&s<=k3||s>=$3&&s<=A3)))break;r++}return r===a||r-a>o?-1:r<n&&e.charCodeAt(r)===I3?r+1:-1}for(var c=r;r<n&&r-c<48;){var l=e.charCodeAt(r);if(l>=Z3&&l<=Q3||l>=$3&&l<=e6||l>=Y3&&l<=X3){r++;continue}break}return r===c?-1:r<n&&e.charCodeAt(r)===I3?r+1:-1}function Jde(e,t,n,r,i){if(e.charCodeAt(t)!==C3)return null;var a=t+1;if(a>=n)return null;var o=e.charCodeAt(a);if(o===E3&&a+1<n&&e.charCodeAt(a+1)===v3&&a+2<n&&e.charCodeAt(a+2)===v3){var s=a+3;if(s<n&&e.charCodeAt(s)===h3)return{node:{type:$.htmlComment,text:``,l:!0},end:s+1};if(s+1<n&&e.charCodeAt(s)===v3&&e.charCodeAt(s+1)===h3)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===L3){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===E3&&a+1<n){var u=e.charCodeAt(a+1);if(u===p3&&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>=Z3&&u<=Q3){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===z3){var p=a+1;if(p>=n)return null;var m=e.charCodeAt(p);if(!(m>=Z3&&m<=Q3||m>=$3&&m<=e6))return null;for(p++;p<n;){var h=e.charCodeAt(p);if(h>=Z3&&h<=Q3||h>=$3&&h<=e6||h>=Y3&&h<=X3||h===v3)p++;else break}for(;p<n&&(e.charCodeAt(p)===Z||e.charCodeAt(p)===Q||e.charCodeAt(p)===u3);)p++;if(p<n&&e.charCodeAt(p)===h3){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>=Z3&&o<=Q3||o>=$3&&o<=e6))return null;var _=L6(e,t);if(!_)return null;var v=_.tag,y=v.toLowerCase();if(_.selfClosing||p6(v))return{node:{type:$.htmlSelfClosing,tag:v,attrs:l8(_.attrs,v,i),a:e.slice(t,_.end),b:!1},end:_.end};var b=A6.has(y),x=f8(e.slice(0,n),_.end,v);if(x===-1)return{node:{type:$.htmlSelfClosing,tag:v,attrs:l8(_.attrs,v,i),a:e.slice(t,_.end),b:!1},end:_.end};var S=Nde(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(`
261
+
262
+ `)!==-1||/^#{1,6}\s/.test(T)?(r.inline=!1,w=D8(T,r,i)):w=E8(T,0,T.length,r,i),r.inAnchor=E,r.inline=D,r.e=O}}return{node:{type:$.htmlBlock,tag:v,attrs:l8(_.attrs,v,i),i:_.rawAttrs,children:w,a:void 0,text:C,d:!1,b:!1},end:x}}var Yde=200,T8=0;function E8(e,t,n,r,i){if(T8++,T8>Yde)return T8--,[{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===p3)n++;else if(i===T3&&(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===x3?_+1<i.length&&i.charCodeAt(_+1)===x3?(s++,f=_,_++):(c++,p=_):v===S3?_+1<i.length&&i.charCodeAt(_+1)===S3?(l++,m=_,_++):(u++,h=_):v===f3&&_+1<i.length&&i.charCodeAt(_+1)===f3&&(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)===d3&&(o++,ne=e);if(o%2==1&&ne!==-1){let e=!1,t=-1,n=0;for(;n<i.length;)i.charCodeAt(n)===d3&&(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)===p3&&(O===0||i.charCodeAt(O-1)!==b3)){var k=O>0&&i.charCodeAt(O-1)===E3,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)===K3){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)===p3){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 re=i.match(/<([A-Z][A-Za-z0-9]*)(?:\s[^>]*)?>([^<]*)$/);if(re&&re.index!==void 0){var I=re[0].length-re[2].length;if(!(I>=2&&re[0].charCodeAt(I-2)===z3)){for(var L=!1,ee=0,te=0;te<re.index;te++)i.charCodeAt(te)===d3&&ee++;if(L=ee%2==1,!L){let e=re[1];u8(i,`</`+e,0)===-1&&(i=i.slice(0,re.index)+re[2])}}}i!==a&&(e=e.slice(0,t)+i,n=t+i.length)}let ne=[];var re=[];let R=t;var z=``,ie=i.disableAutoLink||i.disableBareUrls||o.inAnchor?-1:e.indexOf(`@`,t);for(ie>=n&&(ie=-1);t<n;){let r=e.charCodeAt(t),a=null;if(r===d3){if(a=Rde(e,t,n),!a){var ae=Q6(e,t,n,d3);t+=ae-1}}else if(r===x3||r===S3){var oe=Hde(e,t,n);if(oe){if(oe.canOpen||oe.canClose){(z||t>R)&&(ne.push(w8(z+e.slice(R,t))),z=``);var se=w8(e.slice(t,t+oe.len));re.push({idx:ne.length,ch:r,len:oe.len,canOpen:oe.canOpen,canClose:oe.canClose,active:!0}),ne.push(se),t+=oe.len,R=t;continue}t+=oe.len-1}}else if(r===f3)a=Bde(e,t,n,o,i);else if(r===y3)a=Vde(e,t,n,o,i);else if(r===p3)t+1<n&&e.charCodeAt(t+1)===m3&&(a=Wde(e,t,n,o)),a||=b8(e,t,n,o,i);else if(r===E3&&t+1<n&&e.charCodeAt(t+1)===p3)a=b8(e,t,n,o,i);else if(r===C3)a=x8(e,t,n),!a&&!i.disableParsingRawHTML&&!i.ignoreHTMLBlocks&&(a=Jde(e,t,n,o,i));else if(r===D3){var ce=qde(e,t,n);if(ce!==-1){var le=e.slice(t,ce),ue=i6(le);if(ue!==le){z=z+e.slice(R,t)+ue,t=ce,R=ce;continue}}}else if((r===j3||r===M3||r===A3)&&!o.inAnchor&&!i.disableAutoLink&&(t===0||e.charCodeAt(t-1)!==C3)){var de=t+1<n?e.charCodeAt(t+1):0;(r===j3&&de===N3||r===A3&&de===N3||r===M3&&de===M3)&&(a=Gde(e,t,n,i))}if(!a&&ie>=0&&ie-t<=64&&!o.inAnchor&&!i.disableAutoLink&&!i.disableBareUrls&&(r>=Z3&&r<=Q3||r>=$3&&r<=e6||r>=Y3&&r<=X3)&&(a=Kde(e,t,n,i),!a&&t>=ie&&(ie=e.indexOf(`@`,t+1),ie>=n&&(ie=-1))),r===u3&&o.e){var fe=!1,pe=0;if(t>R&&e.charCodeAt(t-1)===b3)fe=!0,pe=1;else{for(var me=0,he=t-1;he>=R&&e.charCodeAt(he)===Z;)me++,he--;me>=2&&(fe=!0,pe=me)}if(fe){for((z||t-pe>R)&&(ne.push(w8(z+e.slice(R,t-pe))),z=``),ne.push({type:$.breakLine}),t++;t<n&&e.charCodeAt(t)===Z;)t++;R=t;continue}var ge=t>R&&e.charCodeAt(t-1)===Z,_e=t+1<n&&e.charCodeAt(t+1)===Z;if(ge||_e){for(var ve=t;ve>R&&e.charCodeAt(ve-1)===Z;)ve--;for(z+=e.slice(R,ve)+`
263
+ `,t++;t<n&&e.charCodeAt(t)===Z;)t++;R=t;continue}}if(a)(z||t>R)&&(ne.push(w8(z+e.slice(R,t))),z=``),ne.push(a.node),t=a.end,R=t;else{if(r===b3&&t+1<n&&U6(e.charCodeAt(t+1))&g6){(z||t>R)&&(ne.push(w8(z+e.slice(R,t))),z=``),ne.push(w8(e[t+1])),t+=2,R=t;continue}if(t++,ie<0||ie-t>64)for(;t<n&&!(ie>=0&&ie-t<=64);){var ye=e.charCodeAt(t);if(ye<t6&&!P6[ye])t++;else break}}}return(z||n>R)&&(ne.push(w8(z+e.slice(R,n))),z=``),re.length>0&&Ude(ne,re,r,i),r.g=a,T8--,ne}var Xde=500;function D8(e,t,n){var r=t.j||0;if(r>Xde)return[{type:$.text,text:e}];if(t.j=r+1,n.optimizeForStreaming&&!t.m){var i=e.length;i>0&&e.charCodeAt(i-1)===u3&&i--;for(var a=i;a>0&&e.charCodeAt(a-1)!==u3;)a--;if(a>0&&e.charCodeAt(a)===U3){for(var o=!0,s=a;s<i;s++){var c=e.charCodeAt(s);if(c!==Z&&c!==Q&&c!==v3&&c!==O3&&c!==U3){o=!1;break}}if(o){for(var l=a-1;l>0&&e.charCodeAt(l-1)!==u3;)l--;e.charCodeAt(l)===U3&&(e=e.slice(0,l).trimEnd())}}var u=e.trim(),d=u.lastIndexOf(`
264
+ `),f=d===-1?u:u.slice(d+1);if(f.length>0&&f.charCodeAt(0)===U3){for(var p=!1,m=!1,h=1;h<f.length;h++){var g=f.charCodeAt(h);g===U3&&(p=!0),g===v3&&(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)===C3){var x=b+1<e.length?e.charCodeAt(b+1):0;if(x>=Z3&&x<=Q3||x>=$3&&x<=e6){for(var S=b+2;S<e.length;){var C=e.charCodeAt(S);if(C>=Z3&&C<=Q3||C>=$3&&C<=e6||C>=Y3&&C<=X3)S++;else break}for(var w=S;w<e.length&&e.charCodeAt(w)!==h3;)w++;if(w<e.length&&e.charCodeAt(w-1)!==z3){for(var T=!1,E=w+1;E<e.length;E++)if(e.charCodeAt(E)===C3){T=!0;break}T||(_=b,v=S,y=w+1)}}break}if(_>=0){for(var D=0,O=0;O<_;O++)e.charCodeAt(O)===d3&&D++;if(D%2==0){var k=e.slice(_+1,v);u8(e,`</`+k,0)===-1&&(e=e.slice(0,_)+e.slice(y))}}for(var A=e.length;A>0&&e.charCodeAt(A-1)===u3;)A--;if(A>0){for(var j=A;j>0&&e.charCodeAt(j-1)!==u3;)j--;for(var M=j,N=0;M<A&&e.charCodeAt(M)===Z&&N<3;)M++,N++;if(j>0&&M<A&&Ode(e,M,A)){for(var P=j-1,F=P;F>0&&e.charCodeAt(F-1)!==u3;)F--;n8(e,F,P)||(e=e.slice(0,j).trimEnd())}}var I=e.length;if(I>0){for(var L=e.lastIndexOf(`
265
+ `),ee=L===-1?0:L+1,te=I,ne=ee,re=0;ne<te&&e.charCodeAt(ne)===Z&&re<3;)ne++,re++;if(ne<te){var R=e.charCodeAt(ne),z=!1;if(R===x3||R===v3||R===H3){var ie=ne+1;if(ie>=te||e.charCodeAt(ie)===Z||e.charCodeAt(ie)===Q){for(var ae=ie;ae<te&&(e.charCodeAt(ae)===Z||e.charCodeAt(ae)===Q);)ae++;ae>=te&&(z=!0)}}else if(R>=Y3&&R<=X3){for(var oe=ne;oe<te&&e.charCodeAt(oe)>=Y3&&e.charCodeAt(oe)<=X3;)oe++;if(oe<te&&(e.charCodeAt(oe)===R3||e.charCodeAt(oe)===q3)){var se=oe+1;if(se>=te||e.charCodeAt(se)===Z||e.charCodeAt(se)===Q){for(var ce=se;ce<te&&(e.charCodeAt(ce)===Z||e.charCodeAt(ce)===Q);)ce++;ce>=te&&(z=!0)}}}z&&(e=e.slice(0,ee).trimEnd())}}}if(t.inline)return E8(e,0,e.length,t,n);let le=[],ue=0,de=e.length;if(ue===0&&!n.disableFrontmatter&&e.startsWith(`---`)){let t=ede(e);if(t&&t.hasValidYaml){if(n.preserveFrontmatter!==!1){let n=e.slice(0,t.endPos).trimEnd();le.push({type:$.frontmatter,text:n})}ue=t.endPos}}for(;ue<de;){for(var fe=e.indexOf(`
266
+ `,ue),pe=fe<0?de:fe;ue<de&&n8(e,ue,pe);)ue=pe<de?pe+1:pe,ue<de&&(fe=e.indexOf(`
267
+ `,ue),pe=fe<0?de:fe);if(ue>=de)break;var me=e.charCodeAt(ue)===J3;t8(e,ue,pe);let r=null;if(G6=e,K6=ue,q6=pe,!me&&$6>=4&&!t.inHTML)r=Ade(e,ue);else if(!me){let i=ue+e8,a=e.charCodeAt(i);a===g3?r=Dde(e,ue,t,n):a===h3?r=jde(e,ue,t,n):a===d3||a===f3?r=kde(e,ue,t):a===v3||a===x3||a===S3?(r=r8(e,ue),!r&&(r=s8(e,ue,t,n))):a===H3||a>=Y3&&a<=X3?r=s8(e,ue,t,n):a===C3?r=p8(e,ue,t,n):a===U3?r=h8(e,ue,t,n):a===p3&&(r=Fde(e,ue,t))}if(!r){for(var he=!1,ge=ue;ge<pe;ge++)if(e.charCodeAt(ge)===U3){he=!0;break}he&&(r=h8(e,ue,t,n))}if(r||=Lde(e,ue,t,n),r)r.node.type!==$.refCollection&&le.push(r.node),ue=r.end;else{var _e=e.indexOf(`
268
+ `,ue);ue=_e<0?de:_e+1}}return t.j=r,le}function Zde(e,t,n,r){var i=L6(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(`
269
+ `)||i.rawAttrs.includes(`
270
+ `),endPos:i.end}:null}function O8(e,t,n){T8=0,e=lde(e),!t.refs&&(t.refs={}),(n.optimizeForStreaming||t.inline)&&(t.m=Ede(e,t.refs,n));var r=!t.k;r&&(t.k=[],t.h=[]);let i=D8(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=E8(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 x6(t.refs)?[{type:$.refCollection,refs:t.refs},...i]:i}var k8;try{k8=b.createElement(`div`).$$typeof}catch{k8=Symbol.for(`react.transitional.element`)}function A8(e,t,n){return{$$typeof:k8,type:e,key:n==null?null:``+n,ref:null,props:t,_owner:null,_store:{},_debugStack:null,_debugTask:null}}var Qde=typeof b.createContext<`u`?b.createContext(void 0):void 0;function j8(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(),u6),e.children.unshift(dde(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?i6(e.lang):``;return r(`pre`,{key:n.key},r(`code`,{...r6(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&&D6(f.tag))return r(`span`,{key:n.key},`<`+f.tag+w6(f.attrs)+`>`);if(f.a&&f.d){let r=f.tag.toLowerCase(),p=wde(r),m=f.children&&f.children.length>0;if(p){let t=hde(f.a,r,s.tagfilter);return/<[a-z][^>]{0,100}>/i.test(f.a)?c(e.tag,{key:n.key,...r6(e.attrs),dangerouslySetInnerHTML:{__html:t}}):c(e.tag,{key:n.key,...r6(e.attrs)},t)}let h=RegExp(`^<${f.tag}(\\s|>)`,`i`);if(m&&!h.test(f.a)&&s.tagfilter&&bde(f.a))return c(e.tag,{key:n.key,...r6(e.attrs)},t(f.children,n));if(Tde(f.a)){let t=s.tagfilter?O6(f.a):f.a;return c(e.tag,{key:n.key,...r6(e.attrs),dangerouslySetInnerHTML:{__html:t}})}let g={slugify:e=>a(e,u6),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,...r6(e.attrs)},t(f.children,n)):c(e.tag,{key:n.key,...r6(e.attrs)});let v=O8(_,{inline:!1,refs:o,inHTML:!1},g);C6(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,...r6(e.attrs)},t(f.children,n));if(w)return t(v.flatMap(S6),n);var l=mde(v,y);if(l.found&&l.afterClose.length>0){var u=l.beforeClose.flatMap(S6),d=l.afterClose.flatMap(S6);return A8(b.Fragment,{children:[c(e.tag,{key:n.key,...r6(e.attrs)},t(u,n)),t(d,n)]},n.key)}return c(e.tag,{key:n.key,...r6(e.attrs)},t(v.flatMap(S6),n))}return p6(e.tag)?c(e.tag,{key:n.key,...r6(e.attrs)}):c(e.tag,{key:n.key,...r6(e.attrs)},e.children?t(e.children,n):``)}case $.htmlSelfClosing:{let t=e;return s.tagfilter&&D6(t.tag)?r(`span`,{key:n.key},`<`+t.tag+w6(t.attrs)+` />`):c(e.tag,{key:n.key,...r6(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=_de(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 $de=(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(j8.bind(null,l[h],c,u,t,n,r,i,a,o),l[h],c,u):j8(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},efe=(e,t)=>{let n=T6(t,e,void 0);return n?typeof n==`function`||typeof n==`object`&&`render`in n?n:T6(t,`${e}.component`,e):e};function tfe(e,t){let n={...t||{}};n.overrides=n.overrides||{};let r=n.slugify||u6,i=n.sanitizer||o6,a=n.createElement,o=x6(n.overrides),s=e=>M8(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)===C3&&(xde.test(n)||Sde.test(n)||Zde(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=T6(n.overrides,e+`.props`,{});s=efe(e,n.overrides),i={...i,...c,className:vde(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),A8(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,u6):u6,sanitizer:i,tagfilter:n.tagfilter!==!1},f=e[0]&&e[0].type===$.refCollection?e[0].refs:{},p=$de(n.renderRule,l,i,r,f,n,u),m=p(e,{inline:n.forceInline,refs:f}),h=gde(f);if(h.length&&m.push(l(`footer`,{key:`footer`},h.map(function(e){let t=e.identifier.charCodeAt(0)===m3?e.identifier.slice(1):e.identifier,n=O8(e.footnote,{inline:!0,refs:f},d);return l(`div`,{id:r(t,u6),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=_,A8(g,v,`outer`)}function M8(e=``,t={}){let n={...t||{}};n.overrides=n.overrides||{},n.slugify;let r=n.sanitizer||o6;function i(e){let t=n.forceInline||!n.forceBlock&&!ide.test(e),i={...n,slugify:n.slugify?e=>n.slugify(e,u6):u6,sanitizer:r,tagfilter:n.tagfilter!==!1},o=t?e:pde(e);if(n.optimizeForStreaming){var s=o.lastIndexOf(`<`);s!==-1&&o.indexOf(`>`,s)===-1&&(o=o.slice(0,s))}return tfe(O8(o,{inline:t,refs:a},i),{...i,forceInline:t})}let a={};return i(e)}function nfe(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 N8=({children:e,options:t,...n})=>{if(!(typeof b.useContext<`u`)){let r={...t,overrides:{...t?.overrides},wrapperProps:{...t?.wrapperProps,...n}};return M8(e??``,r)}let r=b.useContext(Qde),i=nfe(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(()=>M8(o,a),[o,a])},P8=Symbol(`remove-this-key`),F8=Symbol(`reset`);function rfe(e,t){return Array.isArray(e.required)&&e.required.includes(t)}function ife(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(U4.NewStringDefault)}}function afe(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=B4(R4(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,B.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 ofe=(0,b.memo)(afe);function sfe(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)(()=>w1(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=F4(m,C,s,n),j=E4(r),M=[],N=(0,b.useCallback)((e,t)=>{let{duplicateKeySuffixSeparator:r=`-`}=w1(n,y),i=0,a=e;for(;ew(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)pw(e,t,null);else{let n,i,a;if(cv(C.additionalProperties)){n=C.additionalProperties.type,i=C.additionalProperties.const,a=C.additionalProperties.default;let e=C.additionalProperties;`$ref`in e&&(e=_.retrieveSchema({[f1]:e[f1]},r),n=e.type,i=e.const,a=_.getDefaultFormState(e,a)),!n&&(`anyOf`in e||`oneOf`in e)&&(n=`object`)}pw(e,t,i??a??ife(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(P8,[...E.path,e])},[p,E]),L=(0,b.useCallback)(e=>D.current.currentKey===e?D.current.previousKey:e,[]);if(!A||j)try{M=$le(Object.keys(T),w.order)}catch(e){return(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`p`,{className:`rjsf-config-error`,style:{color:`red`},children:(0,B.jsx)(N8,{options:{disableParsingRawHTML:!0},children:v(U4.InvalidObjectField,[o||`root`,e.message])})}),(0,B.jsx)(`pre`,{children:JSON.stringify(C)})]})}let ee=c4(`ObjectFieldTemplate`,m,w),te=A?(0,B.jsx)(x,{...e,fieldPathId:E,schema:C}):void 0;return(0,B.jsx)(ee,{title:w.label===!1?``:O,description:w.label===!1?void 0:k,properties:M.map(e=>{let t=!!C.properties?.[e]?.[Z$],a=t?n.additionalProperties:n[e],o=w1(a).widget===`hidden`;return{content:(0,B.jsx)(ofe,{propertyName:e,required:rfe(C,e),schema:J(C,[c1,e],{}),uiSchema:a,errorSchema:J(i,[e]),fieldPathId:E,formData:J(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 cfe(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=c4(`OptionalDataControlsTemplate`,l,w1(n,u)),m=E4(r),h,g,_,v;return i||a?(h=T4(c,`Msg`),g=m?void 0:f(U4.OptionalObjectEmptyMsg)):(g=f(m?U4.OptionalObjectRemove:U4.OptionalObjectAdd),m?(h=T4(c,`Remove`),v=()=>o(void 0,c.path,s)):(h=T4(c,`Add`),_=()=>{let e=d.getDefaultFormState(t,r,`excludeObjectChildren`);e===void 0&&(e=S0(t)===`array`?[]:{}),o(e,c.path,s)})),g&&(0,B.jsx)(p,{id:h,registry:l,schema:t,uiSchema:n,label:g,onAddClick:_,onRemoveClick:v})}var lfe={array:`ArrayField`,boolean:`BooleanField`,integer:`NumberField`,number:`NumberField`,object:`ObjectField`,string:`StringField`,null:`NullField`};function ufe(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=S0(e),s=Array.isArray(o)?o[0]:o||``,c=e.$id,l=lfe[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 dfe(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[m1])return(0,B.jsx)(x,{...e});let w=eue(t,r,f),T=w1(w,g),E=c4(`FieldTemplate`,f,T),D=c4(`DescriptionFieldTemplate`,f,T),O=c4(`FieldHelpTemplate`,f,T),k=c4(`FieldErrorTemplate`,f,T),A=m.retrieveSchema(t,i),j=ufe(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,re,R={fieldPathId:n};if((`anyOf`in A||`oneOf`in A)&&!te&&!m.isSelect(A)){A.anyOf?(ne=v,re=A[e1].map(e=>m.retrieveSchema(cv(e)?e:{},i))):A.oneOf&&(ne=y,re=A[s1].map(e=>m.retrieveSchema(cv(e)?e:{},i)));let e=F4(f,A,d,w),t=E4(i);ee&&=!e||t,R={childFieldPathId:n,fieldPathId:R4(`XxxOf`,h,n)}}let{__errors:z,...ie}=a||{},ae=lw(w,[`ui:classNames`,`classNames`,`ui:style`]);`ui:options`in ae&&(ae[S1]=lw(ae[S1],[`classNames`,`style`]));let oe=(0,B.jsx)(j,{...e,onChange:C,...R,schema:A,uiSchema:ae,disabled:N,readonly:P,hideError:I,autofocus:L,errorSchema:ie,rawErrors:z}),se=n.$id,ce;ce=p||Z$ in A?o:T.title||e.schema.title||A.title||e.title||o,M===`label`&&(ce=f.translateString(U4.DeprecatedLabel,[ce]));let le=T.description||e.schema.description||A.description||``,{help:ue}=T,de=T.widget===`hidden`||M===`hide`,fe=[`rjsf-field`,`rjsf-field-${S0(A)}`];!I&&z&&z.length>0&&fe.push(`rjsf-field-error`),T.classNames&&fe.push(T.classNames);let pe=(0,B.jsx)(O,{help:ue,fieldPathId:n,schema:A,uiSchema:w,hasErrors:!I&&z&&z.length>0,registry:f}),me=I||ne&&!m.isSelect(A)?void 0:(0,B.jsx)(k,{errors:z,errorSchema:a,fieldPathId:n,schema:A,uiSchema:w,registry:f});return(0,B.jsx)(E,{description:(0,B.jsx)(D,{id:_4(se),description:le,schema:A,uiSchema:w,registry:f}),rawDescription:le,help:pe,rawHelp:typeof ue==`string`?ue:void 0,errors:me,rawErrors:I?void 0:z,fieldPathId:n,id:se,label:ce,hidden:de,onChange:s,onKeyRename:c,onKeyRenameBlur:l,onRemoveProperty:u,required:d,disabled:N,readonly:P,hideError:I,displayLabel:ee,classNames:fe.join(` `).trim(),style:T.style,formData:i,schema:A,uiSchema:w,registry:f,children:(0,B.jsxs)(B.Fragment,{children:[oe,ne&&(0,B.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:re,registry:f,required:d,schema:A,uiSchema:w})]})})}var ffe=(0,b.memo)(dfe,(e,t)=>{let{experimental_componentUpdateStrategy:n=`customDeep`}=t.registry.globalFormOptions;return n===`always`?!1:n===`shallow`?N4(e,t):c0(e,t)});function pfe(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)?E2(t,r):void 0,w=C?`select`:`text`;v&&Xle(t,v,y)&&(w=v);let{widget:T=w,placeholder:E=``,title:D,...O}=w1(r),k=x.getDisplayLabel(t,r,S),A=D??g??_??n,j=f4(t,T,y),M=(0,b.useCallback)((e,t,n)=>u(e,i.path,t,n),[u,i]);return(0,B.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 mfe(){return{AnyOfField:s3,ArrayField:Cue,BooleanField:wue,CyclicSchemaField:Tue,FallbackField:kue,LayoutGridField:i3,LayoutHeaderField:Hue,LayoutMultiSchemaField:Uue,NumberField:que,ObjectField:sfe,OneOfField:s3,OptionalDataControlsField:cfe,SchemaField:ffe,StringField:pfe,NullField:Wue}}function hfe(e){let{fieldPathId:t,description:n,registry:r,schema:i,uiSchema:a}=e,o=w1(a,r.globalUiOptions),{label:s=!0}=o;return!n||!s?null:(0,B.jsx)(c4(`DescriptionFieldTemplate`,r,o),{id:_4(t),description:n,schema:i,uiSchema:a,registry:r})}function gfe(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,B.jsxs)(B.Fragment,{children:[(i||r)&&(0,B.jsx)(g,{id:w4(o,`moveUp`),className:`rjsf-array-item-move-up`,disabled:t||d||!i,onClick:u,uiSchema:p,registry:f}),(i||r)&&(0,B.jsx)(h,{id:w4(o,`moveDown`),className:`rjsf-array-item-move-down`,disabled:t||d||!r,onClick:l,uiSchema:p,registry:f}),n&&(0,B.jsx)(m,{id:w4(o,`copy`),className:`rjsf-array-item-copy`,disabled:t||d,onClick:s,uiSchema:p,registry:f}),a&&(0,B.jsx)(_,{id:w4(o,`remove`),className:`rjsf-array-item-remove`,disabled:t||d,onClick:c,uiSchema:p,registry:f})]})}function _fe(e){let{children:t,className:n,buttonsProps:r,displayLabel:i,hasDescription:a,hasToolbar:o,registry:s,uiSchema:c}=e,l=c4(`ArrayFieldItemButtonsTemplate`,s,w1(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,B.jsxs)(`div`,{className:n,style:f,children:[(0,B.jsx)(`div`,{className:o?`col-xs-9 col-md-10 col-xl-11`:`col-xs-12`,children:t}),o&&(0,B.jsx)(`div`,{className:`col-xs-3 col-md-2 col-xl-1 array-item-toolbox`,children:(0,B.jsx)(`div`,{className:`btn-group`,style:p,children:(0,B.jsx)(l,{...r,style:u})})})]})}function vfe(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=w1(a),h=c4(`ArrayFieldDescriptionTemplate`,u,m),g=c4(`ArrayFieldTitleTemplate`,u,m),_=!l&&!r,{ButtonTemplates:{AddButton:v}}=u.templates;return(0,B.jsxs)(`fieldset`,{className:n,id:i.$id,children:[(0,B.jsx)(g,{fieldPathId:i,title:m.title||p,required:d,schema:f,uiSchema:a,registry:u,optionalDataControl:_?s:void 0}),(0,B.jsx)(h,{fieldPathId:i,description:m.description||f.description,schema:f,uiSchema:a,registry:u}),_?void 0:s,(0,B.jsx)(`div`,{className:`row array-item-list`,children:o}),t&&(0,B.jsx)(v,{id:w4(i,`add`),className:`rjsf-array-item-add`,onClick:c,disabled:r||l,uiSchema:a,registry:u})]})}function yfe(e){let{fieldPathId:t,title:n,schema:r,uiSchema:i,required:a,registry:o,optionalDataControl:s}=e,c=w1(i,o.globalUiOptions),{label:l=!0}=c;return!n||!l?null:(0,B.jsx)(c4(`TitleFieldTemplate`,o,c),{id:x4(t),title:n,required:a,schema:r,uiSchema:i,registry:o,optionalDataControl:s})}function I8(e){let{id:t,schema:n}=e,{examples:r,default:i}=n;return Array.isArray(r)?(0,B.jsx)(`datalist`,{id:y4(t),children:r.concat(i!==void 0&&!r.map(String).includes(String(i))?[i]:[]).map(e=>(0,B.jsx)(`option`,{value:e},String(e)))},`datalist_${t}`):null}function bfe(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,...i4(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,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`input`,{id:t,name:r||t,className:`form-control`,readOnly:a,disabled:o,autoFocus:s,value:w,...C,list:p.examples?y4(t):void 0,onChange:d||T,onBlur:E,onFocus:D,"aria-describedby":S4(t,!!p.examples)}),f.allowClearTextInputs&&!a&&!o&&w&&(0,B.jsx)(S,{registry:h,onClick:O}),(0,B.jsx)(I8,{id:t,schema:p})]})}function xfe(e){let{iconType:t=`default`,icon:n,className:r,uiSchema:i,registry:a,...o}=e;return(0,B.jsx)(`button`,{type:`button`,className:`btn btn-${t} ${r}`,...o,children:(0,B.jsx)(`i`,{className:`glyphicon glyphicon-${n}`})})}var L8=(0,b.memo)(xfe);function Sfe(e){let{registry:{translateString:t}}=e;return(0,B.jsx)(L8,{title:t(U4.CopyButton),...e,icon:`copy`})}var Cfe=(0,b.memo)(Sfe);function wfe(e){let{registry:{translateString:t}}=e;return(0,B.jsx)(L8,{title:t(U4.MoveDownButton),...e,icon:`arrow-down`})}var Tfe=(0,b.memo)(wfe);function Efe(e){let{registry:{translateString:t}}=e;return(0,B.jsx)(L8,{title:t(U4.MoveUpButton),...e,icon:`arrow-up`})}var Dfe=(0,b.memo)(Efe);function Ofe(e){let{registry:{translateString:t}}=e;return(0,B.jsx)(L8,{title:t(U4.RemoveButton),...e,iconType:`danger`,icon:`remove`})}var kfe=(0,b.memo)(Ofe);function Afe({id:e,className:t,onClick:n,disabled:r,registry:i,...a}){let{translateString:o}=i;return(0,B.jsx)(L8,{id:e,iconType:`default`,icon:`remove`,className:`btn-clear col-xs-12`,title:o(U4.ClearButton),onClick:n,disabled:r,registry:i,...a})}var jfe=(0,b.memo)(Afe);function Mfe({id:e,className:t,onClick:n,disabled:r,registry:i}){let{translateString:a}=i;return(0,B.jsx)(`div`,{className:`row`,children:(0,B.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,B.jsx)(L8,{id:e,iconType:`info`,icon:`plus`,className:`btn-add col-xs-12`,title:a(U4.AddButton),onClick:n,disabled:r,registry:i})})})}function Nfe({uiSchema:e}){let{submitText:t,norender:n,props:r={}}=s4(e);return n?null:(0,B.jsx)(`div`,{children:(0,B.jsx)(`button`,{type:`submit`,...r,className:`btn btn-info ${r.className||``}`,children:t})})}function Pfe(){return{SubmitButton:Nfe,AddButton:Mfe,CopyButton:Cfe,MoveDownButton:Tfe,MoveUpButton:Dfe,RemoveButton:kfe,ClearButton:jfe}}function Ffe(e){let{name:t,fieldPathId:n,registry:r,onExpand:i}=e,{translateString:a}=r,o=`${n.$id}-button`;return(0,B.jsxs)(`div`,{style:{marginTop:`1rem`},children:[(0,B.jsx)(`div`,{className:`text-danger`,children:a(U4.CycleDetected,[t])}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`button`,{id:o,type:`button`,className:`btn btn-sm btn-warning`,onClick:()=>i(n.$id),children:a(U4.ExpandButton)}),` `]})]})}var R8=l4();function z8({description:e,registry:t,uiSchema:n={}}){let{globalUiOptions:r}=t;return w1(n,r).enableMarkdownInDescription&&typeof e==`string`?(0,B.jsx)(N8,{options:{disableParsingRawHTML:!0},"data-testid":R8.markdown,children:e}):e}z8.TEST_IDS=R8;function Ife(e){let{id:t,description:n,registry:r,uiSchema:i}=e;return n?(0,B.jsx)(`div`,{id:t,className:`field-description`,children:(0,B.jsx)(z8,{description:n,registry:r,uiSchema:i})}):null}function Lfe({errors:e,registry:t}){let{translateString:n}=t;return(0,B.jsxs)(`div`,{className:`panel panel-danger errors`,children:[(0,B.jsx)(`div`,{className:`panel-heading`,children:(0,B.jsx)(`h3`,{className:`panel-title`,children:n(U4.ErrorsLabel)})}),(0,B.jsx)(`ul`,{className:`list-group`,children:e.map((e,t)=>(0,B.jsx)(`li`,{className:`list-group-item text-danger`,children:e.stack},t))})]})}function Rfe(e){let{schema:t,registry:n,typeSelector:r,schemaField:i}=e;return(0,B.jsx)(c4(`MultiSchemaFieldTemplate`,n),{selector:r,optionSchemaField:i,schema:t,registry:n})}function zfe(e){let{errors:t=[],fieldPathId:n}=e;return t.length===0?null:(0,B.jsx)(`div`,{children:(0,B.jsx)(`ul`,{id:v4(n),className:`error-detail bs-callout bs-callout-info`,children:t.filter(e=>!!e).map((e,t)=>(0,B.jsx)(`li`,{className:`text-danger`,children:e},t))})})}var B8=l4();function V8({help:e,registry:t,uiSchema:n={}}){let{globalUiOptions:r}=t;return w1(n,r).enableMarkdownInHelp&&typeof e==`string`?(0,B.jsx)(N8,{options:{disableParsingRawHTML:!0},"data-testid":B8.markdown,children:e}):e}V8.TEST_IDS=B8;function Bfe(e){let{fieldPathId:t,help:n,uiSchema:r,registry:i}=e;return n?(0,B.jsx)(`div`,{id:b4(t),className:`help-block`,children:(0,B.jsx)(V8,{help:n,registry:i,uiSchema:r})}):null}var Vfe=`*`;function H8(e){let{label:t,required:n,id:r}=e;return t?(0,B.jsxs)(`label`,{className:`control-label`,htmlFor:r,children:[t,n&&(0,B.jsx)(`span`,{className:`required`,children:Vfe})]}):null}function Hfe(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=w1(d),p=c4(`WrapIfAdditionalTemplate`,u,f);if(s)return(0,B.jsx)(`div`,{className:`hidden`,children:r});let m=f.widget===`checkbox`;return(0,B.jsxs)(p,{...e,children:[l&&!m&&(0,B.jsx)(H8,{label:n,required:c,id:t}),l&&o?o:null,r,i,a]})}var Ufe=Hfe;function Wfe(e){let{children:t,column:n,className:r,...i}=e;return(0,B.jsx)(`div`,{className:r,...i,children:t})}function Gfe(e){let{selector:t,optionSchemaField:n}=e;return(0,B.jsxs)(`div`,{className:`panel panel-default panel-body`,children:[(0,B.jsx)(`div`,{className:`form-group`,children:t}),n]})}function Kfe(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=w1(m),g=c4(`TitleFieldTemplate`,u,h),_=c4(`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,B.jsxs)(`fieldset`,{className:t,id:a.$id,children:[p&&(0,B.jsx)(g,{id:x4(a),title:p,required:d,schema:f,uiSchema:m,registry:u,optionalDataControl:v?s:void 0}),n&&(0,B.jsx)(_,{id:_4(a),description:n,schema:f,uiSchema:m,registry:u}),v?void 0:s,c.map(e=>e.content),T1(f,m,i)&&(0,B.jsx)(y,{id:w4(a,`add`),className:`rjsf-object-property-expand`,onClick:o,disabled:r||l,uiSchema:m,registry:u})]})}function qfe(e){let{id:t,registry:n,label:r,onAddClick:i,onRemoveClick:a}=e;return i?(0,B.jsx)(L8,{id:t,registry:n,icon:`plus`,className:`rjsf-add-optional-data btn-sm`,onClick:i,title:r}):a?(0,B.jsx)(L8,{id:t,registry:n,icon:`remove`,className:`rjsf-remove-optional-data btn-sm`,onClick:a,title:r}):(0,B.jsx)(`em`,{id:t,children:r})}var Jfe=`*`;function Yfe(e){let{id:t,title:n,required:r,optionalDataControl:i}=e;return(0,B.jsxs)(`legend`,{id:t,children:[n,r&&(0,B.jsx)(`span`,{className:`required`,children:Jfe}),i&&(0,B.jsx)(`span`,{className:`pull-right`,style:{marginBottom:`2px`},children:i})]})}function Xfe(e){let{schema:t,fieldPathId:n,reason:r,registry:i}=e,{translateString:a}=i,o=U4.UnsupportedField,s=[];return n?.$id&&(o=U4.UnsupportedFieldWithId,s.push(n.$id)),r&&(o=o===U4.UnsupportedField?U4.UnsupportedFieldWithReason:U4.UnsupportedFieldWithIdAndReason,s.push(r)),(0,B.jsxs)(`div`,{className:`unsupported-field`,children:[(0,B.jsx)(`p`,{children:(0,B.jsx)(N8,{options:{disableParsingRawHTML:!0},children:a(o,s)})}),t&&(0,B.jsx)(`pre`,{children:JSON.stringify(t,null,2)})]})}function Zfe(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(U4.KeyLabel,[o]),S=Z$ 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,B.jsx)(`div`,{className:T,style:r,children:h});let E=C?46:26;return(0,B.jsx)(`div`,{className:T,style:r,children:(0,B.jsxs)(`div`,{className:`row`,children:[(0,B.jsx)(`div`,{className:`col-xs-5 form-additional`,children:(0,B.jsxs)(`div`,{className:`form-group`,children:[a&&(0,B.jsx)(H8,{label:x,required:d,id:`${t}-key`}),a&&l&&(0,B.jsx)(`div`,{children:`\xA0`}),(0,B.jsx)(`input`,{className:`form-control`,type:`text`,id:`${t}-key`,onBlur:s,defaultValue:o},o)]})}),(0,B.jsx)(`div`,{className:`form-additional form-group col-xs-5`,children:h}),(0,B.jsx)(`div`,{className:`col-xs-2`,style:{marginTop:a?`${E}px`:void 0},children:(0,B.jsx)(b,{id:w4(t,`remove`),className:`rjsf-object-property-remove btn-block`,style:{border:`0`},disabled:i||u,onClick:c,uiSchema:g,registry:_})})]})})}function Qfe(){return{ArrayFieldDescriptionTemplate:hfe,ArrayFieldItemTemplate:_fe,ArrayFieldItemButtonsTemplate:gfe,ArrayFieldTemplate:vfe,ArrayFieldTitleTemplate:yfe,ButtonTemplates:Pfe(),BaseInputTemplate:bfe,CyclicSchemaExpandTemplate:Ffe,DescriptionFieldTemplate:Ife,ErrorListTemplate:Lfe,FallbackFieldTemplate:Rfe,FieldTemplate:Ufe,FieldErrorTemplate:zfe,FieldHelpTemplate:Bfe,GridTemplate:Wfe,MultiSchemaFieldTemplate:Gfe,ObjectFieldTemplate:Kfe,OptionalDataControlsTemplate:qfe,TitleFieldTemplate:Yfe,UnsupportedFieldTemplate:Xfe,WrapIfAdditionalTemplate:Zfe}}function $fe({time:e=!0,...t}){let{AltDateWidget:n}=t.registry.widgets;return(0,B.jsx)(n,{time:e,...t})}function epe(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}=aue(e);return(0,B.jsxs)(`ul`,{className:`list-inline`,children:[d.map((e,i)=>(0,B.jsx)(`li`,{className:`list-inline-item`,children:(0,B.jsx)(iue,{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,B.jsx)(`li`,{className:`list-inline-item`,children:(0,B.jsx)(`button`,{type:`button`,className:`btn btn-info btn-now`,onClick:m,children:u(U4.NowLabel)})}),(i.hideClearButton===`undefined`||!i.hideClearButton)&&(0,B.jsx)(`li`,{className:`list-inline-item`,children:(0,B.jsx)(`button`,{type:`button`,className:`btn btn-warning btn-clear`,onClick:p,children:u(U4.ClearLabel)})})]})}function tpe({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=a4(n),h=Array.isArray(r)?r:[r],g=(0,b.useCallback)(({target:t})=>s(e,$2(t?.value,d,m,p)),[s,e,d,p,m]),_=(0,b.useCallback)(({target:t})=>c(e,$2(t?.value,d,m,p)),[c,e,d,p,m]);return(0,B.jsx)(`div`,{className:`checkboxes`,id:e,children:Array.isArray(d)&&d.map((n,r)=>{let s=J2(n.value,h),c=Array.isArray(f)&&f.includes(n.value),p=t||c||a?`disabled`:``,v=(0,B.jsxs)(`span`,{children:[(0,B.jsx)(`input`,{type:`checkbox`,id:C4(e,r),name:l||e,checked:s,value:e4(n.value,r,m),disabled:t||c||a,autoFocus:i&&r===0,onChange:e=>{e.target.checked?o(Z2(r,h,d)):o(q2(r,h,d))},onBlur:g,onFocus:_,"aria-describedby":S4(e)}),(0,B.jsx)(`span`,{children:n.label})]});return u?(0,B.jsx)(`label`,{className:`checkbox-inline ${p}`,children:v},String(n.value)):(0,B.jsx)(`div`,{className:`checkbox ${p}`,children:(0,B.jsx)(`label`,{children:v})},String(n.value))})})}function npe({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=c4(`DescriptionFieldTemplate`,p,n),g=j4(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=w1(t).widget===`checkbox`?void 0:n.description??e.description;return(0,B.jsxs)(`div`,{className:`checkbox ${a||o?`disabled`:``}`,children:[!c&&x&&(0,B.jsx)(h,{id:_4(r),description:x,schema:e,uiSchema:t,registry:p}),(0,B.jsxs)(`label`,{children:[(0,B.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":S4(r)}),D4((0,B.jsx)(`span`,{children:s}),c)]})]})}function rpe(e){let{disabled:t,readonly:n,options:r,registry:i}=e;return(0,B.jsx)(c4(`BaseInputTemplate`,i,r),{type:`color`,...e,disabled:t||n})}function ipe(e){let{onChange:t,value:n,options:r,registry:i}=e;return(0,B.jsx)(c4(`BaseInputTemplate`,i,r),{type:`datetime-local`,...e,value:due(n),onChange:e=>t(Qle(e))})}function ape(e){let{onChange:t,options:n,registry:r}=e,i=c4(`BaseInputTemplate`,r,n),a=(0,b.useCallback)(e=>t(e||void 0),[t]);return(0,B.jsx)(i,{type:`date`,...e,onChange:a})}function ope(e){let{options:t,registry:n}=e;return(0,B.jsx)(c4(`BaseInputTemplate`,n,t),{type:`email`,...e})}function spe({fileInfo:e,registry:t}){let{translateString:n}=t,{dataURL:r,type:i,name:a}=e;if(!r)return null;let o=n(U4.PreviewLabel);return[`image/jpeg`,`image/png`].includes(i)?(0,B.jsx)(`img`,{src:r,alt:o,style:{maxWidth:`100%`},className:`file-preview`}):(0,B.jsxs)(B.Fragment,{children:[` `,(0,B.jsx)(`a`,{download:`preview-${a}`,href:r,className:`file-download`,children:o})]})}function cpe({filesInfo:e,registry:t,preview:n,onRemove:r,options:i}){if(e.length===0)return null;let{translateString:a}=t,{RemoveButton:o}=c4(`ButtonTemplates`,t,i);return(0,B.jsx)(`ul`,{className:`file-info`,children:e.map((e,i)=>{let{name:s,size:c,type:l}=e;return(0,B.jsxs)(`li`,{children:[(0,B.jsx)(N8,{children:a(U4.FilesInfo,[s,l,String(c)])}),n&&(0,B.jsx)(spe,{fileInfo:e,registry:t}),(0,B.jsx)(o,{onClick:()=>r(i),registry:t})]},i)})})}function lpe(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}=uue(o,a,i),f=c4(`BaseInputTemplate`,c,s),p=e=>{e.target.files&&u(e.target.files)};return(0,B.jsxs)(`div`,{children:[(0,B.jsx)(f,{...e,disabled:t||n,type:`file`,required:!o&&r,onChangeOverride:p,value:``,accept:s.accept?String(s.accept):void 0}),(0,B.jsx)(cpe,{filesInfo:l,onRemove:d,registry:c,preview:s.filePreview,options:s})]})}function upe({id:e,value:t,htmlName:n}){return(0,B.jsx)(`input`,{type:`hidden`,id:e,name:n||e,value:t===void 0?``:t})}function dpe(e){let{options:t,registry:n}=e;return(0,B.jsx)(c4(`BaseInputTemplate`,n,t),{type:`password`,...e})}function fpe({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=a4(e),g=(0,b.useCallback)(({target:e})=>o(l,$2(e?.value,d,h,m)),[o,d,m,l,h]),_=(0,b.useCallback)(({target:e})=>s(l,$2(e?.value,d,h,m)),[s,d,m,l,h]);return(0,B.jsx)(`div`,{className:`field-radio-group`,id:l,role:`radiogroup`,children:Array.isArray(d)&&d.map((e,o)=>{let s=J2(e.value,t),d=Array.isArray(f)&&f.includes(e.value),m=r||d||i?`disabled`:``,v=(0,B.jsxs)(`span`,{children:[(0,B.jsx)(`input`,{type:`radio`,id:C4(l,o),checked:s,name:u||l,required:n,value:e4(e.value,o,h),disabled:r||d||i,autoFocus:a&&o===0,onChange:()=>c(e.value),onBlur:g,onFocus:_,"aria-describedby":S4(l)}),(0,B.jsx)(`span`,{children:e.label})]});return p?(0,B.jsx)(`label`,{className:`radio-inline ${m}`,children:v},String(e.value)):(0,B.jsx)(`div`,{className:`radio ${m}`,children:(0,B.jsx)(`label`,{children:v})},String(e.value))})})}function ppe(e){let{value:t,registry:{templates:{BaseInputTemplate:n}}}=e;return(0,B.jsxs)(`div`,{className:`field-range-wrapper`,children:[(0,B.jsx)(n,{type:`range`,...e}),(0,B.jsx)(`span`,{className:`range-view`,children:t})]})}function mpe({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,B.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,B.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,B.jsx)(`input`,{type:`hidden`,id:e,name:d||e,value:t||``,required:n,disabled:r||i,"aria-hidden":`true`})]})}function U8(e,t){return t?Array.from(e.target.options).slice().filter(e=>e.selected).map(e=>e.value):e.target.value}function hpe({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=a4(n),S=(0,b.useCallback)(e=>d(t,$2(U8(e,s),g,x,v)),[d,t,s,g,v,x]),C=(0,b.useCallback)(e=>u(t,$2(U8(e,s),g,x,v)),[u,t,s,g,v,x]),w=(0,b.useCallback)(e=>l($2(U8(e,s),g,x,v)),[l,s,g,v,x]),T=X2(r,g,s,x,y),E=!s&&e.default===void 0;return O4(t,e,g,s),(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(M4,{id:t,multiple:s,options:n,registry:m,uiSchema:h,value:r}),(0,B.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":S4(t),children:[E&&(0,B.jsx)(`option`,{value:``,children:f}),Array.isArray(g)&&g.map(({value:e,label:t},n)=>{let r=_&&_.includes(e);return(0,B.jsx)(`option`,{value:e4(e,n,x),disabled:r,children:t},String(e))})]})]})}function gpe({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,B.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":S4(e)})}function _pe(e){let{options:t,registry:n}=e;return(0,B.jsx)(c4(`BaseInputTemplate`,n,t),{...e})}function vpe(e){let{onChange:t,options:n,registry:r}=e,i=c4(`BaseInputTemplate`,r,n),a=(0,b.useCallback)(e=>t(e?`${e}:00`:void 0),[t]);return(0,B.jsx)(i,{type:`time`,...e,onChange:a})}function ype(e){let{options:t,registry:n}=e;return(0,B.jsx)(c4(`BaseInputTemplate`,n,t),{type:`number`,...e})}function bpe(e){let{options:t,registry:n}=e;return(0,B.jsx)(c4(`BaseInputTemplate`,n,t),{type:`url`,...e})}function xpe(){return{AltDateWidget:epe,AltDateTimeWidget:$fe,CheckboxWidget:npe,CheckboxesWidget:tpe,ColorWidget:rpe,DateWidget:ape,DateTimeWidget:ipe,EmailWidget:ope,FileWidget:lpe,HiddenWidget:upe,PasswordWidget:dpe,RadioWidget:fpe,RangeWidget:ppe,RatingWidget:mpe,SelectWidget:hpe,TextWidget:_pe,TextareaWidget:gpe,TimeWidget:vpe,UpDownWidget:ype,URLWidget:bpe}}function Spe(){return{fields:mfe(),templates:Qfe(),widgets:xpe(),rootSchema:{},formContext:{},translateString:Gle,globalFormOptions:{idPrefix:h1,idSeparator:`_`,useFallbackUiForUnsupportedType:!1}}}function W8(e,t){return{...fw(e,[`schema`,`uiSchema`,`fieldPathId`,`schemaUtils`,`formData`,`edit`,`errors`,`errorSchema`]),...t!==void 0&&{status:t}}}var Cpe=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}=V4(n,e.extraErrors)),t.customErrors&&({errors:r,errorSchema:i}=V4({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&&!c0(this.state.formData,i)&&r(W8(this.state)),this.formElement=(0,b.createRef)()}getSnapshotBeforeUpdate(e,t){if(!c0(this.props,e)){let n=n4(this.props.formData,e.formData),r=n4(this.props.formData,this.state.formData),i=!c0(e.schema,this.props.schema),a=n.length>0||!c0(e.formData,this.props.formData),o=r.length>0||!c0(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:!c0(s,t)}}return{shouldUpdate:!1}}componentDidUpdate(e,t,n){if(n.shouldUpdate){let{nextState:e}=n,r=!c0(e.formData,this.props.formData),i=this.isProcessingUserChange;if(this.isProcessingUserChange=!1,i&&r)return;r&&!c0(e.formData,t.formData)&&this.props.onChange&&this.props.onChange(W8(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=Hle(u,l,g,_));let y=v.getRootSchema(),b=n;n===F8?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?h4({formData:x}):``;if(S=this.updateRetrievedSchema(r??v.retrieveSchema(y,x)),s&&!w.includes(e)&&!c0(S,c.retrievedSchema)){let t=v.sanitizeDataForNewSchema(S,c.retrievedSchema,x);if(C=!c0(t,x),C){x=t,b=t;let e=h4({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=T2(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=c0(c.registry,A)?c.registry:A,M=c.fieldPathId&&c.fieldPathId?.$id===j.globalFormOptions.idPrefix?c.fieldPathId:R4(``,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 tue(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=c4(`ErrorListTemplate`,e,w1(i));return t?.length?(0,B.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=V4(e,t);r=n.errorSchema,i=n.errors}if(n){let e=V4({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=T2(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)=>Fle(e,t);getFieldNames=(e,t)=>Ile(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=R4(``,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:ZS(p),T=J$(w)&&Object.keys(w).length>0&&Object.values(w).every(e=>e===void 0)&&p==null?void 0:w;if(J$(w)||Array.isArray(w)){let e=!1;if(t===P8)Vne(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?pw(w,n,void 0):pw(w,n,r)}let r=b&&!C&&!J$(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&&pw(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(!rw(C?_:J(_,n)))C?x=i:(x=ZS(_),pw(x,n,i));else if(y||=new t4,C){let e=J(i,r1);e&&y.setErrors(e)}else pw(y.ErrorSchema,n,i);else y&&J(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(W8({...this.state,...D}),r),this.pendingChanges.shift(),this.processPendingChange()})}updateRetrievedSchema(e){return c0(e,this.state?.retrievedSchema)?this.state.retrievedSchema:e}reset=()=>{let{formData:e,initialFormData:t=F8,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?.(W8({...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=>!c0(J(this.state,e),J(c,e)));this.setState(c,()=>{t&&l&&t(W8({...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?L4(n):[];this.setState({formData:a,errors:r,errorSchema:t,schemaValidationErrors:[],schemaValidationErrorSchema:{}},()=>{i&&i(W8({...this.state,formData:a},`submitted`),e)})}};static getGlobalFormOptions(e){let{uiSchema:t={},experimental_componentUpdateStrategy:n,idSeparator:r=`_`,idPrefix:i=h1,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}=Spe();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[C1],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=gw(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`,{[d1]:E={}}=w1(_);f&&(E={...E,props:{...E.props,disabled:!0}});let D={[S1]:{[d1]:E}};return(0,B.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,B.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,B.jsx)(C,{uiSchema:D,registry:x}),m===`bottom`&&this.renderErrors(x)]})}};function wpe(e,t=`none`){return t===`all`?e:e.reduce((e,n)=>{let{message:r,schemaPath:i}=n,a=t===`anyOf`?void 0:i?.indexOf(`/${e1}/`),o=t===`oneOf`?void 0:i?.indexOf(`/${s1}/`),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 Tpe(e=[],t,n,r){return wpe(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=w1(J(t,(u?`${u}.${e}`:e).replace(/^\./,``))).title;if(n===void 0&&(n=w1(J(t,o.replace(/\/properties\//g,`/`).split(`/`).slice(1,-1).concat([e]))).title),n===void 0&&(n=J(t,[...u.replace(/^\./,``).split(`.`).filter(Boolean),e,`title`])),n)l=l.replace(`'${e}'`,`'${n}'`),f=n;else{let t=J(s,[c1,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(c1,e);n.push(c1,e,`title`);let i=J(r,n);i&&(l=l.replace(`'${e}'`,`'${i}'`),f=i)}}}),d=l;else{let e=w1(J(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 Epe(e,t,n,r,i,a,o,s){let{validationError:c}=t,l=Tpe(t.errors,o,s,r);c&&(l=[...l,{stack:c.message}]),typeof a==`function`&&(l=a(l,o));let u=nue(l);if(c&&(u={...u,$schema:{__errors:[c.message]}}),typeof i!=`function`)return{errors:l,errorSchema:u};let d=I2(e,r,n,r,!0),f=z4(i(d,E1(d),o,u));return V4({errors:l,errorSchema:u},f)}var G8=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})),K8=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;var t=G8(),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}}})),q8=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=G8(),n=K8(),r=G8();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=K8();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?`
271
+ `:``},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})`}})),J8=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=q8(),n=G8();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})),Y8=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=q8();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`)}})),X8=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=q8(),n=J8(),r=Y8();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])}})),Dpe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;var t=X8(),n=q8(),r=Y8(),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)}})),Z8=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})),Q8=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})),$8=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=Z8(),n=Q8(),r=X8(),i=q8(),a=J8(),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
272
+ || (${s} == "string" && ${a} && ${a} == +${a})`).assign(c,(0,i._)`+${a}`);return;case`integer`:r.elseIf((0,i._)`${s} === "boolean" || ${a} === null
273
+ || (${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"
274
+ || ${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}}})),Ope=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assignDefaults=void 0;var t=q8(),n=J8();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)}`)}})),e5=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=q8(),n=J8(),r=Y8(),i=J8();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})),kpe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;var t=q8(),n=Y8(),r=e5(),i=X8();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})),Ape=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;var t=q8(),n=J8();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})),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=J8(),n=Zw(),r=Qw(),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=Dpe(),n=$8(),r=Q8(),i=$8(),a=Ope(),o=kpe(),s=Ape(),c=q8(),l=Y8(),u=t5(),d=J8(),f=X8();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(()=>ie(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)&&ie(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)||R(e,`type "${t}" not allowed by context "${e.dataTypes.join(`,`)}"`)}),re(e,t)}}function L(e,t){t.length>1&&!(t.length===2&&t.includes(`null`))&&R(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))&&R(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 re(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 R(e,t){let n=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${n}" (strictTypes)`,(0,d.checkStrictMode)(e,t,e.opts.strictTypes)}var z=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`,se(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=z;function ie(e,t,n,r){let i=new z(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 ae=/^\/(?:[^~]|~0|~1)*$/,oe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function se(e,{dataLevel:t,dataNames:n,dataPathArr:r}){let i,a;if(e===``)return l.default.rootData;if(e[0]===`/`){if(!ae.test(e))throw Error(`Invalid JSON-pointer: ${e}`);i=e,a=l.default.rootData}else{let o=oe.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=se})),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=q8(),n=r5(),r=Y8(),i=t5(),a=J8(),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}})),jpe=c({$id:()=>o5,additionalProperties:()=>!1,default:()=>d5,description:()=>s5,properties:()=>u5,required:()=>l5,type:()=>c5}),o5,s5,c5,l5,u5,d5,Mpe=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}})),Npe=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}})),Ppe=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}=Npe();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})),Fpe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Ppe();t.code=`require("ajv/dist/runtime/uri").default`,e.default=t})),Ipe=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=q8();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=Z8(),o=a5(),s=q8(),c=t5(),l=$8(),u=J8(),f=(Mpe(),d(jpe).default),p=Fpe(),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]}}})),Lpe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:`id`,code(){throw Error(`NOT SUPPORTED: keyword "id", use "$id" for schema ID`)}}})),Rpe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.callRef=e.getValidate=void 0;var t=i5(),n=e5(),r=q8(),i=Y8(),a=a5(),o=J8(),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})),zpe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Lpe(),n=Rpe();e.default=[`$schema`,`$id`,`$defs`,`$vocabulary`,{keyword:`$comment`},`definitions`,t.default,n.default]})),Bpe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=q8(),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})`)}}})),Vpe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=q8();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}))`)}}})),Hpe=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`})),Upe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=q8(),n=J8(),r=Hpe();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}`)}}})),Wpe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=e5(),n=J8(),r=q8();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})`)}}}})),Gpe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=q8();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}`)}}})),Kpe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=e5(),n=q8(),r=J8();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)}}}})),qpe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=q8();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=Zw();t.code=`require("ajv/dist/runtime/equal").default`,e.default=t})),Jpe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=$8(),n=q8(),r=J8(),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)})))}}}})),Ype=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=q8(),n=J8(),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}`)}}})),Xpe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=q8(),n=J8(),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}`}}}})),Zpe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Bpe(),n=Vpe(),r=Upe(),i=Wpe(),a=Gpe(),o=Kpe(),s=qpe(),c=Jpe(),l=Ype(),u=Xpe();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=q8(),n=J8(),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=q8(),n=J8(),r=e5(),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})),Qpe=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`)}})),$pe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=q8(),n=J8(),r=e5(),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)))}}})),eme=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=q8(),n=J8();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)))}}}})),tme=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;var t=q8(),n=J8(),r=e5();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},
275
+ missingProperty: ${i},
276
+ depsCount: ${n},
277
+ 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})),nme=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=q8(),n=J8();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=e5(),n=q8(),r=Y8(),i=J8();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)}}}})),rme=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=n5(),n=e5(),r=J8(),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)}}}})),ime=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=e5(),n=q8(),r=J8(),i=J8();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())})})}}}})),ame=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=J8();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`}}})),ome=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:`anyOf`,schemaType:`array`,trackErrors:!0,code:e5().validateUnion,error:{message:`must match a schema in anyOf`}}})),sme=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=q8(),n=J8();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)})})}}}})),cme=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=J8();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)})}}})),lme=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=q8(),n=J8(),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})),ume=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=J8();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`)}}})),dme=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=m5(),n=Qpe(),r=h5(),i=$pe(),a=eme(),o=tme(),s=nme(),c=g5(),l=rme(),u=ime(),d=ame(),f=ome(),p=sme(),m=cme(),h=lme(),g=ume();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=_})),fme=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=q8();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})`}}}}})),pme=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=[fme().default]})),mme=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`]})),hme=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=zpe(),n=Zpe(),r=dme(),i=pme(),a=mme();e.default=[t.default,n.default,(0,r.default)(),i.default,a.metadataVocabulary,a.contentVocabulary]})),gme=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={}))})),_me=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=q8(),n=gme(),r=a5(),i=i5(),a=J8();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}}}}})),vme=c({$id:()=>v5,$schema:()=>_5,default:()=>C5,definitions:()=>b5,properties:()=>S5,title:()=>y5,type:()=>x5}),_5,v5,y5,b5,x5,S5,C5,yme=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=Ipe(),r=hme(),i=_me(),a=(yme(),d(vme).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=q8();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}})})),bme=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}}})),xme=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;var t=w5(),n=q8(),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)})),Sme=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});var n=bme(),r=xme(),i=q8(),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})),Cme=u(w5(),1),T5=u(Sme(),1),wme={allErrors:!0,multipleOfPrecision:8,strict:!1,verbose:!0,discriminator:!1},Tme=/^(#?([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*\)))$/,Eme=/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/;function Dme(e,t,n={},r,i=Cme.default,a){let o=new i({...wme,...n});return r?(0,T5.default)(o,r):r!==!1&&(0,T5.default)(o),o.addFormat(`data-url`,Eme),o.addFormat(`color`,Tme),o.addKeyword(b1),Array.isArray(e)&&o.addMetaSchema(e),cv(t)&&Object.keys(t).forEach(e=>{o.addFormat(e,t[e])}),a&&(o=a(o)),o}var Ome=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=Dme(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 Epe(this,a,e,t,n,r,i,this.suppressDuplicateFiltering)}handleSchemaUpdate(e){if(this.lastSeenRootSchema===e&&this.hasRegisteredRootSchema)return;let t=e.$id??x1;this.ajv.getSchema(t)===void 0?this.ajv.addSchema(e,t):c0(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=H4(e),i=r.$id??Yle(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 kme(e={},t){return new Ome(e,t)}var E5=kme();function Ame(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,B.jsx)(Cpe,{...e,...i,fields:o,widgets:s,templates:c,ref:a})})}function D5(...e){return jr(an(e))}var jme=Mi(`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,B.jsx)(r?Li:`button`,{"data-slot":`button`,className:D5(jme({variant:t,size:n,className:e})),...i})}function Mme({uiSchema:e,registry:t,className:n,...r}){let{translateString:i}=t;return(0,B.jsx)(`div`,{className:`p-0 m-0`,children:(0,B.jsxs)(O5,{...r,className:D5(`w-fit gap-2`,n),variant:`outline`,type:`button`,children:[(0,B.jsx)(Xr,{size:16}),` `,i(U4.AddItemButton)]})})}function Nme(e){let{children:t,buttonsProps:n,displayLabel:r,hasDescription:i,hasToolbar:a,uiSchema:o,registry:s}=e,c=c4(`ArrayFieldItemButtonsTemplate`,s,w1(o)),l=i?-6:22;return(0,B.jsx)(`div`,{children:(0,B.jsxs)(`div`,{className:`mb-2 flex flex-row flex-wrap items-center`,children:[(0,B.jsx)(`div`,{className:`grow shrink`,children:t}),(0,B.jsx)(`div`,{className:`flex items-end justify-end p-0.5`,children:a&&(0,B.jsx)(`div`,{className:`flex gap-2`,style:{marginLeft:`5px`,marginTop:r?`${l}px`:void 0},children:(0,B.jsx)(c,{...n})})})]})})}function Pme(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=w1(i),m=c4(`ArrayFieldDescriptionTemplate`,l,p),h=c4(`ArrayFieldTitleTemplate`,l,p),g=!c&&!n,{ButtonTemplates:{AddButton:_}}=l.templates;return(0,B.jsx)(`div`,{children:(0,B.jsx)(`div`,{className:`m-0 flex p-0`,children:(0,B.jsxs)(`div`,{className:`m-0 w-full p-0`,children:[(0,B.jsx)(h,{fieldPathId:r,title:p.title||f,schema:d,uiSchema:i,required:u,registry:l,optionalDataControl:g?o:void 0}),(0,B.jsx)(m,{fieldPathId:r,description:p.description||d.description,schema:d,uiSchema:i,registry:l}),(0,B.jsxs)(`div`,{className:`p-0 m-0 w-full mb-2`,children:[g?void 0:o,a,t&&(0,B.jsx)(`div`,{className:`mt-2 flex justify-end`,children:(0,B.jsx)(_,{id:w4(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,B.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 Fme({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={..._,...i4(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,B.jsxs)(`div`,{className:`p-0.5`,children:[(0,B.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?y4(e):void 0,...S,value:s||s===0?s:``,onChange:l||C,onBlur:w,onFocus:T,"aria-describedby":S4(e,!!m.examples)}),p.allowClearTextInputs&&!i&&!a&&s&&(0,B.jsx)(x,{onClick:E,registry:y}),g,(0,B.jsx)(I8,{id:e,schema:m})]})}var Ime=Mi(`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,B.jsx)(`div`,{"data-slot":`alert`,role:`alert`,className:D5(Ime({variant:t}),e),...n})}function Lme({className:e,...t}){return(0,B.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,B.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 Rme(e){let{name:t,fieldPathId:n,registry:r,onExpand:i}=e,{translateString:a}=r,o=`${n.$id}-button`;return(0,B.jsxs)(`div`,{className:`mt-4`,children:[(0,B.jsxs)(A5,{variant:`default`,className:`mb-2`,children:[(0,B.jsx)(Yr,{className:`h-4 w-4`}),(0,B.jsx)(j5,{children:a(U4.CycleDetected,[t])})]}),(0,B.jsx)(O5,{id:o,type:`button`,variant:`outline`,size:`sm`,className:D5(`my-1`),onClick:()=>i(n.$id),children:a(U4.ExpandButton)})]})}function zme({id:e,description:t,registry:n,uiSchema:r}){return t?(0,B.jsx)(`div`,{children:(0,B.jsx)(`div`,{id:e,className:`text-sm text-muted-foreground`,children:(0,B.jsx)(z8,{description:t,registry:n,uiSchema:r})})}):null}function Bme({errors:e,registry:t}){let{translateString:n}=t;return(0,B.jsxs)(A5,{variant:`destructive`,className:`mb-2`,children:[(0,B.jsx)(Yr,{className:`h-4 w-4`}),(0,B.jsx)(Lme,{children:n(U4.ErrorsLabel)}),(0,B.jsx)(j5,{className:`flex flex-col gap-1`,children:e.map((e,t)=>(0,B.jsxs)(`span`,{children:[`• `,e.stack]},t))})]})}function Vme(e){let{errors:t=[],fieldPathId:n}=e;return t.length===0?null:(0,B.jsx)(`div`,{className:`flex flex-col gap-1`,id:v4(n),children:t.map((e,t)=>(0,B.jsx)(`span`,{className:`text-xs font-medium text-destructive mb-1`,children:e},t))})}function Hme(e){let{fieldPathId:t,help:n,uiSchema:r,registry:i,hasErrors:a}=e;return n?(0,B.jsx)(`span`,{className:D5(`text-xs font-medium text-muted-foreground`,{"text-destructive":a}),id:b4(t),children:(0,B.jsx)(V8,{help:n,registry:i,uiSchema:r})}):null}function Ume({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=w1(y),S=c4(`WrapIfAdditionalTemplate`,b,x);if(f)return(0,B.jsx)(`div`,{className:`hidden`,children:t});let C=x.widget===`checkbox`;return(0,B.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,B.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[n&&!C&&(0,B.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,B.jsx)(`span`,{className:D5(`text-xs font-medium text-muted-foreground`,{" text-destructive":r.length>0}),children:o}),i,a]})})}function Wme(e){let{children:t,column:n,className:r,...i}=e;return(0,B.jsx)(`div`,{className:D5(`grid gap-2`,r),...i,children:t})}function Gme(e){let{icon:t,iconType:n,className:r,uiSchema:i,registry:a,...o}=e;return(0,B.jsx)(O5,{size:`icon`,variant:`outline`,className:r,...o,type:`button`,children:t})}var M5=(0,b.memo)(Gme);function Kme(e){let{registry:{translateString:t}}=e;return(0,B.jsx)(M5,{title:t(U4.CopyButton),...e,icon:(0,B.jsx)(ei,{className:`h-4 w-4`})})}var qme=(0,b.memo)(Kme);function Jme(e){let{registry:{translateString:t}}=e;return(0,B.jsx)(M5,{title:t(U4.MoveDownButton),...e,icon:(0,B.jsx)(Kr,{className:`h-4 w-4`})})}var Yme=(0,b.memo)(Jme);function Xme(e){let{registry:{translateString:t}}=e;return(0,B.jsx)(M5,{title:t(U4.MoveUpButton),...e,icon:(0,B.jsx)(Jr,{className:`h-4 w-4`})})}var Zme=(0,b.memo)(Xme);function Qme(e){let{registry:{translateString:t}}=e;return(0,B.jsx)(M5,{title:t(U4.RemoveButton),...e,className:`border-destructive`,icon:(0,B.jsx)(Ei,{className:`h-4 w-4 stroke-destructive`})})}var N5=(0,b.memo)(Qme);function $me(e){let{registry:{translateString:t}}=e;return(0,B.jsx)(M5,{title:t(U4.ClearButton),...e,icon:(0,B.jsx)(ki,{})})}var ehe=(0,b.memo)($me);function the({selector:e,optionSchemaField:t}){return(0,B.jsxs)(`div`,{className:D5(`p-4 border rounded-md bg-background shadow-sm`),children:[(0,B.jsx)(`div`,{className:D5(`mb-4`),children:e}),t]})}function nhe({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=w1(i),m=c4(`TitleFieldTemplate`,f,p),h=c4(`DescriptionFieldTemplate`,f,p),g=!d&&!u,{ButtonTemplates:{AddButton:_}}=f.templates;return(0,B.jsxs)(B.Fragment,{children:[t&&(0,B.jsx)(m,{id:x4(a),title:t,required:r,schema:o,uiSchema:i,registry:f,optionalDataControl:g?c:void 0}),e&&(0,B.jsx)(h,{id:_4(a),description:e,schema:o,uiSchema:i,registry:f}),(0,B.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[g?void 0:c,n.map(e=>(0,B.jsx)(`div`,{className:`${e.hidden?`hidden`:``} flex`,children:(0,B.jsx)(`div`,{className:`w-full`,children:e.content})},e.name)),T1(o,i,s)?(0,B.jsx)(`div`,{className:`mt-2 flex justify-end`,children:(0,B.jsx)(_,{id:w4(a,`add`),onClick:l,disabled:u||d,className:`rjsf-object-property-expand`,uiSchema:i,registry:f})}):null]})]})}function rhe(e){let{id:t,registry:n,label:r,onAddClick:i,onRemoveClick:a}=e;return i?(0,B.jsx)(M5,{id:t,registry:n,className:`rjsf-add-optional-data`,onClick:i,title:r,icon:(0,B.jsx)(Xr,{}),size:`xs`}):a?(0,B.jsx)(N5,{id:t,registry:n,className:`rjsf-remove-optional-data`,onClick:a,title:r,size:`xs`}):(0,B.jsx)(`em`,{id:t,children:r})}function ihe(e){let{submitText:t,norender:n,props:r}=s4(e.uiSchema);return n?null:(0,B.jsx)(`div`,{children:(0,B.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,B.jsx)(UT,{"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 ahe({id:e,title:t,uiSchema:n,optionalDataControl:r}){let i=(0,B.jsx)(`h5`,{children:w1(n).title||t});return r&&(i=(0,B.jsxs)(`div`,{className:`flex flex-row`,children:[(0,B.jsx)(`div`,{className:`flex-grow`,children:i}),(0,B.jsx)(`div`,{className:`flex`,children:r})]})),(0,B.jsxs)(`div`,{id:e,className:`my-1 flex flex-col gap-0.5`,children:[i,(0,B.jsx)(P5,{dir:`horizontal`,style:{height:`1px`},className:`my-1`})]})}function ohe({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(U4.KeyLabel,[a]);if(!(Z$ in f))return(0,B.jsx)(`div`,{className:e,style:t,children:n});let y=o?22+(l?-28:0):0,b=`${i}-key`;return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`div`,{className:`grid grid-cols-12 col-span-12 items-center gap-2 ${e}`,style:t,children:[(0,B.jsx)(`div`,{className:`grid gap-2 col-span-5`,children:(0,B.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[o&&(0,B.jsx)(`label`,{htmlFor:b,className:`text-sm font-medium text-muted-foreground leading-none`,children:v}),(0,B.jsx)(`div`,{className:`pl-0.5`,children:(0,B.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,B.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:(0,B.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:`\xA0`})})]})}),(0,B.jsx)(`div`,{className:`grid gap-2 col-span-6 pr-0.5`,children:n}),(0,B.jsx)(`div`,{className:`grid gap-2 col-span-1`,style:{marginTop:`${y}px`},children:(0,B.jsx)(_,{id:w4(i,`remove`),iconType:`block`,className:`rjsf-object-property-remove w-full`,disabled:r||u,onClick:s,uiSchema:p,registry:m})})]}),(0,B.jsx)(P5,{dir:`horizontal`,className:`mt-2`})]})}function she(){return{ArrayFieldItemTemplate:Nme,ArrayFieldTemplate:Pme,BaseInputTemplate:Fme,CyclicSchemaExpandTemplate:Rme,ButtonTemplates:{AddButton:Mme,CopyButton:qme,MoveDownButton:Yme,MoveUpButton:Zme,RemoveButton:N5,SubmitButton:ihe,ClearButton:ehe},DescriptionFieldTemplate:zme,ErrorListTemplate:Bme,FieldErrorTemplate:Vme,FieldHelpTemplate:Hme,FieldTemplate:Ume,GridTemplate:Wme,MultiSchemaFieldTemplate:the,ObjectFieldTemplate:nhe,OptionalDataControlsTemplate:rhe,TitleFieldTemplate:ahe,WrapIfAdditionalTemplate:ohe}}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,B.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,che(i,...t)]}function che(...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 lhe=b.useInsertionEffect||WE;function L5({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=uhe({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=dhe(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function uhe({defaultProp:e,onChange:t}){let[n,r]=b.useState(e),i=b.useRef(n),a=b.useRef(t);return lhe(()=>{a.current=t},[t]),b.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function dhe(e){return typeof e==`function`}function fhe(e,t){return b.useReducer((e,n)=>t[e][n]??e,e)}var R5=e=>{let{present:t,children:n}=e,r=phe(t),i=typeof n==`function`?n({present:r.isPresent}):b.Children.only(n),a=mhe(r.ref,hhe(i));return typeof n==`function`||r.isPresent?b.cloneElement(i,{ref:a}):null};R5.displayName=`Presence`;function phe(e){let[t,n]=b.useState(),r=b.useRef(null),i=b.useRef(e),a=b.useRef(`none`),[o,s]=fhe(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]),WE(()=>{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]),WE(()=>{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 mhe(...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 hhe(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`,[ghe,_he]=F5(V5),[vhe,H5]=ghe(V5);function yhe(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,B.jsx)(vhe,{scope:t,...x,children:bhe(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=Fi(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,B.jsx)(IT.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,B.jsx)(yhe,{__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,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(W5,{...d,ref:t,__scopeCheckbox:n}),e&&(0,B.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,B.jsx)(R5,{present:r||X5(a.checked)||a.checked===!0,children:(0,B.jsx)(IT.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=Fi(n,p),h=xF(a),g=ok(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,B.jsx)(IT.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 bhe(e){return typeof e==`function`}function X5(e){return e===`indeterminate`}function Z5(e){return X5(e)?`indeterminate`:e?`checked`:`unchecked`}function xhe(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 She=[`color`],Che=(0,b.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=xhe(e,She);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,B.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,B.jsx)(q5,{"data-slot":`checkbox-indicator`,className:`flex items-center justify-center text-current transition-none`,children:(0,B.jsx)(Che,{className:`size-3.5`})})})}function $5({className:e,...t}){return(0,B.jsx)(mF,{"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 whe({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=a4(r),_=Array.isArray(i)?i:[i],v=({target:t})=>l(e,$2(t?.value,f,g,h)),y=({target:t})=>u(e,$2(t?.value,f,g,h));return(0,B.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=J2(r.value,_),u=Array.isArray(p)&&p.includes(r.value),m=C4(e,i);return(0,B.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,B.jsx)(Q5,{id:m,name:t||e,required:s,disabled:n||u||o,onCheckedChange:e=>{c(e?Z2(i,_,f):q2(i,_,f))},className:d,checked:l,autoFocus:a&&i===0,onBlur:v,onFocus:y,"aria-describedby":S4(e)}),(0,B.jsx)($5,{className:`leading-tight`,htmlFor:C4(e,i),children:r.label})]},m)})})}function The(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,_=j4(c),v=c4(`DescriptionFieldTemplate`,m,u),y=e=>d(e),b=()=>f(t,r),x=()=>p(t,r),S=u.description||c.description;return(0,B.jsxs)(`div`,{className:`relative ${i||a?`cursor-not-allowed opacity-50`:``}`,"aria-describedby":S4(t),children:[!s&&S&&(0,B.jsx)(v,{id:_4(t),description:S,schema:c,uiSchema:h,registry:m}),(0,B.jsxs)(`div`,{className:`flex items-center gap-2 my-2`,children:[(0,B.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,B.jsx)($5,{className:`leading-tight`,htmlFor:t,children:D4(o,s||!o)})]})]})}function Ehe(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,B.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=Ii(s),l=b.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=Fi(t,a(s,n).collectionRef);return(0,B.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=Ii(u),p=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=b.useRef(null),s=Fi(t,o),c=a(u,n);return b.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,B.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`,Dhe={bubbles:!1,cancelable:!0},t7=`RovingFocusGroup`,[n7,r7,Ohe]=Ehe(t7),[khe,i7]=F5(t7,[Ohe]),[Ahe,jhe]=khe(t7),a7=b.forwardRef((e,t)=>(0,B.jsx)(n7.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,B.jsx)(n7.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,B.jsx)(Mhe,{...e,ref:t})})}));a7.displayName=t7;var Mhe=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=Fi(t,f),m=bF(a),[h,g]=L5({prop:o,defaultProp:s??null,onChange:c,caller:t7}),[_,v]=b.useState(!1),y=cE(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,B.jsx)(Ahe,{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,B.jsx)(IT.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,Dhe);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=qE(),l=a||c,u=jhe(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,B.jsx)(n7.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,B.jsx)(IT.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=Fhe(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?Ihe(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 Nhe={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Phe(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function Fhe(e,t,n){let r=Phe(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return Nhe[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 Ihe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Lhe=a7,Rhe=s7,l7=`Radio`,[zhe,u7]=F5(l7),[Bhe,d7]=zhe(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,B.jsx)(Bhe,{scope:t,...h,children:Hhe(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=Fi(r,s);return(0,B.jsx)(IT.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 Vhe=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,B.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,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(m7,{...u,ref:t,__scopeRadio:n}),e&&(0,B.jsx)(v7,{__scopeRadio:n})]})})});Vhe.displayName=l7;var h7=`RadioIndicator`,g7=b.forwardRef((e,t)=>{let{__scopeRadio:n,forceMount:r,...i}=e,a=d7(h7,n);return(0,B.jsx)(R5,{present:r||a.checked,children:(0,B.jsx)(IT.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=Fi(n,d),m=xF(i),h=ok(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,B.jsx)(IT.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 Hhe(e){return typeof e==`function`}function y7(e){return e?`checked`:`unchecked`}var Uhe=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],b7=`RadioGroup`,[Whe,Ghe]=F5(b7,[i7,u7]),x7=i7(),S7=u7(),[Khe,qhe]=Whe(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=bF(l),[h,g]=L5({prop:a,defaultProp:i??null,onChange:d,caller:b7});return(0,B.jsx)(Khe,{scope:n,name:r,required:o,disabled:s,value:h,onValueChange:g,children:(0,B.jsx)(Lhe,{asChild:!0,...p,orientation:c,dir:m,loop:u,children:(0,B.jsx)(IT.div,{role:`radiogroup`,"aria-required":o,"aria-orientation":c,"data-disabled":s?``:void 0,dir:m,...f,ref:t})})})});C7.displayName=b7;var Jhe=`RadioGroupItem`,Yhe=`RadioGroupItemProvider`,w7=`RadioGroupItemTrigger`,Xhe=`RadioGroupItemBubbleInput`;function Zhe(e){let{__scopeRadioGroup:t,value:n,disabled:r,children:i,internal_do_not_use_render:a}=e,o=qhe(Yhe,t),s=S7(t),c=o.disabled||r;return(0,B.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=Fi(t,c),u=b.useRef(!1);return b.useEffect(()=>{let e=e=>{Uhe.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,B.jsx)(Rhe,{asChild:!0,...i,focusable:!s,active:o,children:(0,B.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,B.jsx)(Zhe,{__scopeRadioGroup:n,value:r,disabled:i,internal_do_not_use_render:({isFormControl:e})=>(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(T7,{...a,ref:t,__scopeRadioGroup:n}),e&&(0,B.jsx)(D7,{__scopeRadioGroup:n})]})})});E7.displayName=Jhe;var D7=b.forwardRef((e,t)=>{let{__scopeRadioGroup:n,...r}=e;return(0,B.jsx)(v7,{...S7(n),...r,ref:t})});D7.displayName=Xhe;var Qhe=`RadioGroupIndicator`,O7=b.forwardRef((e,t)=>{let{__scopeRadioGroup:n,...r}=e;return(0,B.jsx)(g7,{...S7(n),...r,ref:t})});O7.displayName=Qhe;function $he({className:e,...t}){return(0,B.jsx)(C7,{"data-slot":`radio-group`,className:D5(`grid gap-3`,e),...t})}function ege({className:e,...t}){return(0,B.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,B.jsx)(O7,{"data-slot":`radio-group-indicator`,className:`relative flex items-center justify-center`,children:(0,B.jsx)(Zr,{className:`fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2`})})})}function tge({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=a4(t),m=e=>o($2(e,u,p,f)),h=({target:t})=>s(e,$2(t?.value,u,p,f)),g=({target:t})=>c(e,$2(t?.value,u,p,f)),_=!!t?.inline;return(0,B.jsx)(`div`,{className:`mb-0`,children:(0,B.jsx)($he,{defaultValue:n?.toString(),required:r,disabled:i||a,onValueChange:e=>{m(e)},onBlur:h,onFocus:g,"aria-describedby":S4(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,B.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,B.jsx)(ege,{checked:J2(t.value,n),value:e4(t.value,r,p),id:C4(e,r),disabled:i}),(0,B.jsx)($5,{className:`leading-tight`,htmlFor:C4(e,r),children:t.label})]},C4(e,r))})})})}function k7(e,[t,n]){return Math.min(n,Math.max(t,e))}var A7=b.createContext(void 0);function nge(e){let t=b.useContext(A7);return e||t||`ltr`}function rge(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 ige(e){let[t,n]=b.useState(void 0);return pI(()=>{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 age(e){let t=e+`CollectionProvider`,[n,r]=fI(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,B.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=gI(s),l=b.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=dI(t,a(s,n).collectionRef);return(0,B.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=gI(u),p=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=b.useRef(null),s=dI(t,o),c=a(u,n);return b.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,B.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,oge,sge]=age(P7),[I7,cge]=fI(P7,[sge]),[lge,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`?uge:dge,[y=[],x]=hI({prop:u,defaultProp:l,onChange:e=>{[...g.current][_.current]?.focus(),d(e)}}),S=b.useRef(y);function C(e){E(e,gge(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=bge(a),s=k7(xge(Math.round((e-r)/a)*a+r,o),[r,i]);x((e=[])=>{let r=mge(e,s,t);if(yge(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,B.jsx)(lge,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:i,valueIndexToChangeRef:_,thumbs:g.current,values:y,orientation:o,form:m,children:(0,B.jsx)(F7.Provider,{scope:e.__scopeSlider,children:(0,B.jsx)(F7.Slot,{scope:e.__scopeSlider,children:(0,B.jsx)(v,{"aria-disabled":s,"data-disabled":s?``:void 0,...h,ref:t,onPointerDown:cI(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}),uge=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=dI(t,e=>f(e)),m=b.useRef(void 0),h=nge(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,B.jsx)(z7,{scope:e.__scopeSlider,startEdge:_?`left`:`right`,endEdge:_?`right`:`left`,direction:_?1:-1,size:`width`,children:(0,B.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})}})})}),dge=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=dI(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,B.jsx)(z7,{scope:e.__scopeSlider,startEdge:p?`bottom`:`top`,endEdge:p?`top`:`bottom`,size:`height`,direction:p?1:-1,children:(0,B.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,B.jsx)(_I.span,{...l,ref:t,onKeyDown:cI(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:cI(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():r(e)}),onPointerMove:cI(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:cI(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,B.jsx)(_I.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=dI(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,B.jsx)(_I.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=oge(e.__scopeSlider),[r,i]=b.useState(null),a=dI(t,e=>i(e)),o=b.useMemo(()=>r?n().findIndex(e=>e.ref.current===r):-1,[n,r]);return(0,B.jsx)(fge,{...e,ref:a,index:o})}),fge=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=dI(t,e=>l(e)),d=!c||o.form||!!c.closest(`form`),f=ige(c),p=o.values[r],m=p===void 0?0:Y7(p,o.min,o.max),h=hge(r,o.values.length),g=f?.[s.size],_=g?_ge(g,m,s.direction):0;return b.useEffect(()=>{if(c)return o.thumbs.add(c),()=>{o.thumbs.delete(c)}},[c,o.thumbs]),(0,B.jsxs)(`span`,{style:{transform:`var(--radix-slider-thumb-transform)`,position:`absolute`,[s.startEdge]:`calc(${m}% + ${_}px)`},children:[(0,B.jsx)(F7.ItemSlot,{scope:e.__scopeSlider,children:(0,B.jsx)(_I.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:cI(e.onFocus,()=>{o.valueIndexToChangeRef.current=r})})}),d&&(0,B.jsx)(J7,{name:i??(o.name?o.name+(o.values.length>1?`[]`:``):void 0),form:o.form,value:p},r)]})});q7.displayName=K7;var pge=`RadioBubbleInput`,J7=b.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{let i=b.useRef(null),a=dI(i,r),o=rge(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,B.jsx)(_I.input,{style:{display:`none`},...n,ref:a,defaultValue:t})});J7.displayName=pge;function mge(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 hge(e,t){if(t>2)return`Value ${e+1} of ${t}`;if(t===2)return[`Minimum`,`Maximum`][e]}function gge(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 _ge(e,t,n){let r=e/2;return(r-X7([0,50],[0,r])(t)*n)*n}function vge(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function yge(e,t){if(t>0){let n=vge(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 bge(e){return(String(e).split(`.`)[1]||``).length}function xge(e,t){let n=10**t;return Math.round(e*n)/n}var Sge=R7,Cge=U7,wge=G7,Tge=q7;function Ege({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,B.jsxs)(Sge,{"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,B.jsx)(Cge,{"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,B.jsx)(wge,{"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,B.jsx)(Tge,{"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 Dge=[`name`,`min`,`max`,`step`,`orientation`,`disabled`,`defaultValue`,`value`,`onValueChange`,`className`,`dir`,`inverted`,`minStepsBetweenThumbs`];function Oge({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,...r4(i)},u={id:s,...fw(r.props||{},Dge)};return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(Ege,{disabled:n||t,min:l.min,max:l.max,step:l.step,value:[e],onValueChange:c,...u,"aria-describedby":S4(s)}),e]})}var kge=Mi(`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 Age({className:e,variant:t,asChild:n=!1,...r}){return(0,B.jsx)(n?Li:`span`,{"data-slot":`badge`,className:D5(kge({variant:t}),e),...r})}var Z7=(0,b.forwardRef)(({className:e,...t},n)=>(0,B.jsx)(yL,{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})),jge=(0,b.forwardRef)(({className:e,...t},n)=>(0,B.jsxs)(`div`,{className:`flex items-center border-b px-3`,"cmdk-input-wrapper":``,children:[(0,B.jsx)(xi,{className:`mr-2 h-4 w-4 shrink-0 opacity-50`}),(0,B.jsx)(yL.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})]}));jge.displayName=yL.Input.displayName;function Q7({className:e,...t}){return(0,B.jsx)(yL.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,B.jsx)(yL.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,B.jsx)(yL.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 Mge({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=>iw(e.value,t))),[t,n]),v=(0,b.useMemo)(()=>t.filter(e=>!_.some(t=>iw(t.value,e.value))),[t,_]),y=(0,b.useCallback)(e=>{if(a)return;let t=_.filter(t=>!iw(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,B.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,B.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,B.jsxs)(`div`,{className:`flex gap-1 flex-wrap`,children:[_.map(e=>(0,B.jsxs)(Age,{variant:`secondary`,children:[e.label,(0,B.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,B.jsx)(ki,{className:D5(`h-3 w-3 text-muted-foreground hover:text-foreground`,a&&`pointer-events-none`)})})]},e.value)),(0,B.jsx)(yL.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,B.jsx)(`div`,{className:`relative mt-2`,children:(0,B.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,B.jsx)($7,{className:`h-full overflow-auto`,children:(0,B.jsx)(Q7,{children:v.map(e=>(0,B.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 Nge({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,B.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,B.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,B.jsx)(`span`,{className:D5(`flex-1 line-clamp-1`,!m&&`text-muted-foreground`),children:m?.label||o}),(0,B.jsx)(Kr,{className:`h-4 w-4 opacity-50`})]}),(0,B.jsx)(`div`,{className:`relative`,children:f&&e&&e.length>0?(0,B.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,B.jsx)($7,{className:`h-full overflow-auto`,children:(0,B.jsx)(Q7,{children:e.map(e=>(0,B.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,B.jsx)(`span`,{children:e.label}),(0,B.jsx)(`span`,{className:`flex h-3.5 w-3.5 items-center justify-center`,children:e.value===t&&(0,B.jsx)(Gr,{className:`h-4 w-4`})})]},e.value))})})}):null})]})}function Pge({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=a4(t);O4(e,o,_,s);let x=()=>{d(e,$2(a,_,b,y))},S=()=>{u(e,$2(a,_,b,y))},C=_?.map(({value:e,label:t},n)=>({value:s?e:e4(e,n,b),label:t,index:n,disabled:Array.isArray(v)&&v.includes(e)})),w=D5({"border-destructive":p.length>0},m);return(0,B.jsxs)(`div`,{className:`p-0.5`,children:[s?(0,B.jsx)(Mge,{id:e,autoFocus:c,disabled:r||i,multiple:!0,className:w,items:C,selected:a,onValueChange:e=>{l($2(e.map(String),_,b,y))},onFocus:x,onBlur:S}):(0,B.jsx)(Nge,{items:C,selected:X2(a,_,!1,b,``),onValueChange:e=>{l($2(e,_,b,y))},autoFocus:c,disabled:r||i,required:n,placeholder:f,className:w,onFocus:x,onBlur:S,ariaDescribedby:S4(e)}),(0,B.jsx)(M4,{id:e,multiple:s,options:t,registry:h,uiSchema:g,value:a})]})}function Fge({className:e,...t}){return(0,B.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 Ige({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,B.jsx)(`div`,{className:`flex p-0.5`,children:(0,B.jsx)(Fge,{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":S4(e),className:f})})}function Lge(){return{CheckboxWidget:The,CheckboxesWidget:whe,RadioWidget:tge,RangeWidget:Oge,SelectWidget:Pge,TextareaWidget:Ige}}function t9(){return{templates:she(),widgets:Lge()}}t9();function Rge(){return Ame(t9())}var zge=Rge();function Bge({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=is()(cs(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})})),Vge=(e,t)=>r9(n=>e?n.inputs[e]?.[t]??n9:n9);function Hge({className:e,children:t,action:n,...r}){return(0,B.jsxs)(YQ,{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,B.jsxs)(ZQ,{"data-slot":`accordion-trigger`,className:Y(`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,B.jsx)(qr,{className:`size-4 shrink-0 text-muted-foreground transition-transform duration-200`}),t]}),n==null?null:(0,B.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,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`div`,{className:Y(`relative`,n),children:[(0,B.jsx)(`p`,{ref:s,"aria-hidden":`true`,className:`invisible absolute inset-x-0 top-0 line-clamp-2`}),(0,B.jsx)(`p`,{children:a===null?e:(0,B.jsxs)(B.Fragment,{children:[a,`...`,` `,(0,B.jsx)(`button`,{type:`button`,onClick:()=>i(!0),className:`cursor-pointer p-0 underline underline-offset-2`,children:`more`})]})})]}),(0,B.jsx)(HM,{open:r,onOpenChange:i,children:(0,B.jsx)(KM,{size:`lg`,children:(0,B.jsxs)(qM,{children:[(0,B.jsx)(XM,{className:t?`font-mono`:`sr-only`,children:t??`Description`}),(0,B.jsx)(ZM,{className:`max-h-[60vh] overflow-y-auto whitespace-pre-wrap`,children:e})]})})})]})}var Uge=[`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(` `),Wge=[`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 Gge(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={...i4(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,B.jsx)(`input`,{id:t,name:n,toolparamdescription:c.description,className:Uge,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 Kge(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,B.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,B.jsxs)(`div`,{className:Y(`flex flex-col gap-1`,n),style:r,children:[_&&(0,B.jsxs)(`label`,{htmlFor:t,className:Y(`font-mono text-xs text-muted-foreground`,v&&`text-destructive`),children:[i,a&&(0,B.jsx)(`span`,{className:`ml-1 text-destructive`,children:`*`})]}),!g&&o?(0,B.jsx)(i9,{text:o,title:i,className:o9}):null,c,l,u]})}function qge(e){return!e.errors||e.errors.length===0?null:(0,B.jsx)(`div`,{className:`font-mono text-[11px] text-destructive`,children:e.errors.join(`, `)})}function Jge(e){return e.description?(0,B.jsx)(`p`,{id:e.id,className:o9,children:e.description}):null}function Yge(e){let{id:t,title:n,required:r}=e;return n?(0,B.jsxs)(`div`,{id:t,className:`font-mono text-xs text-muted-foreground`,children:[n,r&&(0,B.jsx)(`span`,{className:`ml-1 text-destructive`,children:`*`})]}):null}function Xge(e){let{fieldPathId:t,properties:n,description:r,disabled:i,title:a,required:o}=e,s=t.$id===`root`;return(0,B.jsxs)(`div`,{className:Y(`flex flex-col`,s?`gap-6`:`gap-5 border-l border-border pl-2.5`),children:[!s&&a&&(0,B.jsxs)(`div`,{className:`font-mono text-xs text-muted-foreground`,children:[a,o&&(0,B.jsx)(`span`,{className:`ml-1 text-destructive`,children:`*`})]}),!s&&r&&(0,B.jsx)(`p`,{className:`text-[10px] leading-snug text-muted-foreground/70`,children:r}),n.filter(e=>!e.hidden).map(e=>(0,B.jsx)(`div`,{"aria-disabled":i||void 0,children:e.content},e.name))]})}function Zge(e){let{items:t,canAdd:n,onAddClick:r,disabled:i,readonly:a,title:o,required:s,schema:c}=e,l=c.description;return(0,B.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[o&&(0,B.jsxs)(`div`,{className:`font-mono text-xs text-muted-foreground`,children:[o,s&&(0,B.jsx)(`span`,{className:`ml-1 text-destructive`,children:`*`})]}),l&&(0,B.jsx)(`p`,{className:`text-[10px] leading-snug text-muted-foreground/70`,children:l}),t,n&&(0,B.jsxs)(`button`,{type:`button`,className:Y(s9,`self-start`),onClick:r,disabled:i||a,children:[(0,B.jsx)(vi,{className:`size-3`}),`add`]})]})}function Qge(e){let{children:t,index:n,buttonsProps:r,hasToolbar:i}=e,{hasRemove:a,onRemoveItem:o,disabled:s,readonly:c}=r;return(0,B.jsxs)(`div`,{className:`flex items-start gap-1.5`,children:[(0,B.jsxs)(`span`,{className:`mt-1 select-none font-mono text-[11px] text-muted-foreground/50`,children:[`[`,n,`]`]}),(0,B.jsx)(`div`,{className:`flex-1 min-w-0`,children:t}),i&&a&&(0,B.jsx)(`button`,{type:`button`,className:Y(s9,`mt-0.5 px-1`),onClick:o,disabled:s||c,"aria-label":`Remove item ${n}`,children:(0,B.jsx)(ki,{className:`size-3`})})]})}function $ge(e){let{icon:t,iconType:n,registry:r,uiSchema:i,...a}=e;return(0,B.jsxs)(`button`,{type:`button`,className:s9,...a,children:[(0,B.jsx)(vi,{className:`size-3`}),`add`]})}function e_e(e){let{icon:t,iconType:n,registry:r,uiSchema:i,...a}=e;return(0,B.jsx)(`button`,{type:`button`,className:Y(s9,`px-1`),"aria-label":`Remove`,...a,children:(0,B.jsx)(ki,{className:`size-3`})})}function c9(){return null}var t_e={AddButton:$ge,RemoveButton:e_e,CopyButton:c9,MoveDownButton:c9,MoveUpButton:c9,ClearButton:c9},n_e=`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 r_e({className:e,icon:t,children:n,onDismiss:r,...i}){return(0,B.jsxs)(`span`,{className:Mr(n_e,`gap-[3px]`,t?`px-1`:`pl-[9px] pr-1`,e),...i,children:[(0,B.jsxs)(`span`,{className:Mr(`inline-flex items-center`,t&&`gap-[5px]`),children:[t&&(0,B.jsx)(`span`,{className:`inline-flex shrink-0`,children:t}),(0,B.jsx)(`span`,{children:n})]}),(0,B.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,B.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,B.jsx)(`path`,{d:`M18 6 6 18`}),(0,B.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 i_e(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,B.jsx)(l9.Provider,{value:E,children:(0,B.jsx)(Hj,{open:m,onOpenChange:h,children:t})})}function a_e({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,B.jsx)(Uj,{asChild:!0,children:(0,B.jsxs)(`button`,{type:`button`,"data-slot":`combobox-trigger`,role:`combobox`,"aria-expanded":c,className:Mr(_F({size:t}),e),...i,children:[(0,B.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,B.jsx)(o_e,{values:s,onDeselect:l}):r}),(0,B.jsx)(Kr,{className:`size-5 shrink-0 text-muted-foreground`})]})})}function o_e({values:e,onDeselect:t}){let{getOptionLabel:n}=u9();return(0,B.jsx)(B.Fragment,{children:e.map(e=>(0,B.jsx)(r_e,{onClick:e=>e.stopPropagation(),onDismiss:()=>t(e),children:n?n(e):e},e))})}function s_e({className:e,children:t,filter:n,...r}){let{multiple:i}=u9();return(0,B.jsx)(Gj,{className:Mr(`w-[var(--radix-popover-trigger-width)] p-0`,e),align:`start`,onOpenAutoFocus:i?e=>e.preventDefault():void 0,...r,children:(0,B.jsx)(yL,{"data-slot":`combobox-command`,filter:n,className:`flex h-full w-full flex-col overflow-hidden rounded-md bg-popover`,children:t})})}function c_e({className:e,...t}){return(0,B.jsxs)(`div`,{"data-slot":`combobox-search`,className:`flex items-center gap-2 border-b border-border-secondary px-3 py-2.5`,children:[(0,B.jsx)(xi,{className:`size-5 shrink-0 text-muted-foreground`}),(0,B.jsx)(yL.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 l_e({className:e,...t}){return(0,B.jsx)(yL.List,{"data-slot":`combobox-list`,className:Mr(`max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto py-1`,e),...t})}function u_e({className:e,...t}){return(0,B.jsx)(yL.Empty,{"data-slot":`combobox-empty`,className:Mr(`py-6 text-center type-text-sm text-muted-foreground`,e),...t})}function d_e({className:e,children:t,itemValue:n,...r}){let{onSelect:i,isSelected:a}=u9(),o=a(n);return(0,B.jsxs)(yL.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,B.jsx)(`span`,{className:`flex flex-1 items-center gap-2 truncate`,children:t}),o&&(0,B.jsx)(Gr,{className:`size-5 shrink-0 text-primary`})]})}var f_e=Object.defineProperty,d9=(e,t)=>f_e(e,`name`,{value:t,configurable:!0}),f9=`Switch`,[p_e,m_e]=oE(f9),[h_e,p9]=p_e(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]=Uk({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,B.jsx)(h_e,{scope:t,...S,children:h9(d)?d(S):r})}d9(m9,`SwitchProvider`);var g_e=`SwitchTrigger`,__e=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(g_e,e),g=Fi(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,B.jsx)(IT.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:tE(t,e=>{p(),d(e=>!e),h&&m&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})},`SwitchTrigger`)),v_e=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,B.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,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(__e,{...d,ref:t,__scopeSwitch:n}),e&&(0,B.jsx)(S_e,{__scopeSwitch:n})]})})},`Switch`)),y_e=`SwitchThumb`,b_e=b.forwardRef(d9(function(e,t){let{__scopeSwitch:n,...r}=e,i=p9(y_e,n);return(0,B.jsx)(IT.span,{"data-state":g9(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})},`SwitchThumb`)),x_e=`SwitchBubbleInput`,S_e=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(x_e,e),g=Fi(r,h),_=ok(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,B.jsx)(IT.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:tE(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 C_e({className:e,...t}){return(0,B.jsx)(v_e,{"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,B.jsx)(b_e,{"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 w_e(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,B.jsx)(`textarea`,{id:t,name:n,toolparamdescription:l.description,rows:m,className:Wge,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 T_e(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,B.jsxs)(WF,{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,B.jsx)(KF,{id:t,className:Y(a9),"aria-invalid":d||void 0,children:(0,B.jsx)(GF,{placeholder:o??`Select…`})}),(0,B.jsx)(qF,{children:u.map(e=>(0,B.jsx)(JF,{value:String(e.value),className:`font-mono text-xs`,children:e.label},String(e.value)))})]})}function E_e(e){let{id:t,value:n,required:r,disabled:i,readonly:a,onChange:o}=e;return(0,B.jsx)(C_e,{id:t,checked:n===!0,required:r,disabled:i||a,onCheckedChange:e=>o(e===!0)})}function D_e(e){let{id:t,value:n,disabled:r,readonly:i,options:a,placeholder:o,rawErrors:s,schema:c}=e,l=O_e(a,c),u=(s?.length??0)>0;return(0,B.jsx)(k_e,{id:t,value:n,disabled:r||i,placeholder:o??`Select…`,enumOptions:l,hasError:u,onChange:e.onChange})}function O_e(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 k_e({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,B.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,B.jsxs)(i_e,{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,B.jsx)(a_e,{id:e,disabled:n||c.length===0,placeholder:r,className:Y(a9),"aria-invalid":a||void 0}),(0,B.jsxs)(s_e,{children:[(0,B.jsx)(c_e,{placeholder:`Search…`}),(0,B.jsxs)(l_e,{className:`flex flex-col gap-1 py-1`,children:[(0,B.jsx)(u_e,{children:`No results.`}),c.map(e=>(0,B.jsx)(d_e,{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,B.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,B.jsx)(`li`,{children:(0,B.jsxs)(`button`,{type:`button`,onClick:()=>o(s.filter(t=>String(t)!==String(e))),disabled:n,"aria-label":`Remove ${t}`,className:Y(`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,B.jsx)(`span`,{children:t}),(0,B.jsx)(ki,{className:`size-3 text-muted-foreground group-hover:text-foreground`})]})},String(e))})})]})}var A_e={TextareaWidget:w_e,SelectWidget:T_e,CheckboxWidget:E_e,CheckboxesWidget:D_e},j_e={ArrayFieldItemTemplate:Qge,ArrayFieldTemplate:Zge,BaseInputTemplate:Gge,DescriptionFieldTemplate:Jge,FieldErrorTemplate:qge,FieldTemplate:Kge,ObjectFieldTemplate:Xge,TitleFieldTemplate:Yge,ButtonTemplates:t_e},_9={"ui:submitButtonOptions":{norender:!0}};function M_e(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(M_e(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 N_e(e){let t=v9(e);return t?{..._9,...t}:_9}function P_e({name:e,description:t}){return(0,b.useMemo)(()=>n=>(0,B.jsx)(`form`,{toolname:e,tooldescription:t,toolautosubmit:``,...n}),[e,t])}var F_e=Object.defineProperty,y9=(e,t)=>F_e(e,`name`,{value:t,configurable:!0}),b9=[`Enter`,` `],I_e=[`ArrowDown`,`PageUp`,`Home`],x9=[`ArrowUp`,`PageDown`,`End`],L_e=[...I_e,...x9];[...b9],[...b9];var S9=`Menu`,[C9,R_e,z_e]=yF(S9),[w9,T9]=oE(S9,[z_e,dk,y$]),E9=dk(),D9=y$(),[B_e,O9]=w9(S9),[V_e,k9]=w9(S9),H_e=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=cE(a),f=bF(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,B.jsx)(Ck,{...s,children:(0,B.jsx)(B_e,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,B.jsx)(V_e,{scope:t,onClose:b.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})},`Menu`),U_e=b.forwardRef(y9(function(e,t){let{__scopeMenu:n,...r}=e,i=E9(n);return(0,B.jsx)(wk,{...i,...r,ref:t})},`MenuAnchor`)),A9=`MenuPortal`,[W_e,G_e]=w9(A9,{forceMount:void 0}),K_e=y9(e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=O9(A9,t);return(0,B.jsx)(W_e,{scope:t,forceMount:n,children:(0,B.jsx)(jk,{present:n||a.open,children:(0,B.jsx)(Dk,{asChild:!0,container:i,children:r})})})},`MenuPortal`),j9=`MenuContent`,[q_e,M9]=w9(j9),J_e=b.forwardRef(y9(function(e,t){let n=G_e(j9,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=O9(j9,e.__scopeMenu),o=k9(j9,e.__scopeMenu);return(0,B.jsx)(C9.Provider,{scope:e.__scopeMenu,children:(0,B.jsx)(jk,{present:r||a.open,children:(0,B.jsx)(C9.Slot,{scope:e.__scopeMenu,children:o.modal?(0,B.jsx)(Y_e,{...i,ref:t}):(0,B.jsx)(X_e,{...i,ref:t})})})})},`MenuContent`)),Y_e=b.forwardRef(y9(function(e,t){let n=O9(j9,e.__scopeMenu),r=b.useRef(null),i=Fi(t,r);return b.useEffect(()=>{let e=r.current;if(e)return nA(e)},[]),(0,B.jsx)(N9,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:tE(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentModal`)),X_e=b.forwardRef(y9(function(e,t){let n=O9(j9,e.__scopeMenu);return(0,B.jsx)(N9,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentNonModal`)),Z_e=Ii(`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=R_e(n),[S,C]=b.useState(null),w=b.useRef(null),T=Fi(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?pj:b.Fragment,N=m?{as:Z_e,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),[]),TE();let F=b.useCallback(e=>A.current===k.current?.side&&H9(e,k.current?.area),[]);return(0,B.jsx)(q_e,{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,B.jsx)(M,{...N,children:(0,B.jsx)(ME,{asChild:!0,trapped:i,onMountAutoFocus:tE(a,e=>{e.preventDefault(),w.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,B.jsx)(gE,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,B.jsx)(j$,{asChild:!0,...y,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:S,onCurrentTabStopIdChange:C,onEntryFocus:tE(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,B.jsx)(Tk,{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:tE(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||!L_e.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:tE(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(E.current),D.current=``)}),onPointerMove:tE(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`,Q_e=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=Fi(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}),LT(e,t),t.defaultPrevented?l.current=!1:o.onClose()}},`handleSelect`);return(0,B.jsx)($_e,{...i,ref:c,disabled:n,onClick:tE(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:tE(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:tE(e.onKeyDown,e=>{n||e.target!==e.currentTarget||s.searchRef.current!==``&&e.key===` `||b9.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})},`MenuItem`)),$_e=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=Fi(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,B.jsx)(C9.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,B.jsx)(M$,{asChild:!0,...s,focusable:!r,children:(0,B.jsx)(IT.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:tE(e.onPointerMove,U9(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:tE(e.onPointerLeave,U9(e=>o.onItemLeave(e))),onFocus:tE(e.onFocus,()=>d(!0)),onBlur:tE(e.onBlur,()=>d(!1))})})})},`MenuItemImpl`)),[eve,tve]=w9(`MenuRadioGroup`,{value:void 0,onValueChange:y9(()=>{},`onValueChange`)}),[nve,rve]=w9(`MenuItemIndicator`,{checked:!1}),[ive,ave]=w9(`MenuSub`);function I9(e){return e?`open`:`closed`}y9(I9,`getOpenState`);function L9(e){return e===`indeterminate`}y9(L9,`isIndeterminate`);function ove(e){return L9(e)?`indeterminate`:e?`checked`:`unchecked`}y9(ove,`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 sve=H_e,cve=U_e,lve=K_e,uve=J_e,dve=Q_e,fve=Object.defineProperty,W9=(e,t)=>fve(e,`name`,{value:t,configurable:!0}),G9=`DropdownMenu`,[pve,mve]=oE(G9,[T9]),K9=T9(),[hve,q9]=pve(G9),gve=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]=Uk({prop:i,defaultProp:a??!1,onChange:o,caller:G9});return(0,B.jsx)(hve,{scope:t,triggerId:qE(),triggerRef:l,contentId:qE(),open:u,onOpenChange:d,onOpenToggle:b.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,B.jsx)(sve,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})},`DropdownMenu`),_ve=`DropdownMenuTrigger`,vve=b.forwardRef(W9(function(e,t){let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=q9(_ve,n),o=K9(n),s=Fi(t,a.triggerRef);return(0,B.jsx)(cve,{asChild:!0,...o,children:(0,B.jsx)(IT.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:tE(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:tE(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})},`DropdownMenuTrigger`)),yve=W9(e=>{let{__scopeDropdownMenu:t,...n}=e,r=K9(t);return(0,B.jsx)(lve,{...r,...n})},`DropdownMenuPortal`),bve=`DropdownMenuContent`,xve=b.forwardRef(W9(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=q9(bve,n),a=K9(n),o=b.useRef(!1);return(0,B.jsx)(uve,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:tE(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:tE(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`)),Sve=b.forwardRef(W9(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=K9(n);return(0,B.jsx)(dve,{...i,...r,ref:t})},`DropdownMenuItem`)),Cve=gve,wve=vve,Tve=yve,Eve=xve,Dve=Sve;function Ove({...e}){return(0,B.jsx)(Cve,{"data-slot":`dropdown-menu`,...e})}function kve({...e}){return(0,B.jsx)(wve,{"data-slot":`dropdown-menu-trigger`,...e})}function Ave({className:e,sideOffset:t=4,...n}){return(0,B.jsx)(Tve,{children:(0,B.jsx)(Eve,{"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 jve=Mi([`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,B.jsx)(Dve,{"data-slot":`dropdown-menu-item`,"data-inset":t,className:Mr(jve({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,B.jsxs)(Ove,{children:[(0,B.jsx)(kve,{asChild:!0,children:(0,B.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,B.jsx)(`span`,{children:a.length>12?`${a.slice(0,12)}…`:a}),(0,B.jsx)(Kr,{className:`size-3 shrink-0`})]})}),(0,B.jsx)(Ave,{align:`start`,className:`min-w-48`,children:e.length===0?(0,B.jsx)(J9,{disabled:!0,className:`font-mono text-xs font-normal text-muted-foreground`,children:`No saved input yet`}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(J9,{onSelect:r,className:`cursor-pointer font-mono text-xs font-normal`,disabled:e.length<=0,children:[e.length>0&&(0,B.jsx)(Gr,{className:Y(`size-3.5 shrink-0`,t===null?`opacity-100`:`opacity-0`)}),(0,B.jsx)(`span`,{className:`text-muted-foreground italic`,children:e.length>0?`none`:`no saved input yet`})]}),e.map(e=>(0,B.jsxs)(`div`,{className:`group/item relative`,children:[(0,B.jsxs)(J9,{onSelect:()=>e.key===t?r():n(e),className:`cursor-pointer pr-8 font-mono text-xs font-normal`,children:[(0,B.jsx)(Gr,{className:Y(`size-3.5 shrink-0`,e.key===t?`opacity-100`:`opacity-0`)}),(0,B.jsx)(`span`,{className:`truncate`,children:e.key})]}),(0,B.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,B.jsx)(Ei,{className:`size-3.5`})})]},e.key))]})})]})}function Mve({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,B.jsx)(HM,{open:e,onOpenChange:t,children:(0,B.jsxs)(KM,{children:[(0,B.jsxs)(qM,{children:[(0,B.jsx)(XM,{children:`Save input`}),(0,B.jsx)(ZM,{children:`Save the current values to reuse it later.`})]}),(0,B.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),c&&(i(c),t(!1))},className:`space-y-3`,children:[(0,B.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,B.jsx)(hF,{htmlFor:a,children:`Name`}),(0,B.jsx)(gF,{id:a,value:o,onChange:e=>s(e.target.value),placeholder:`e.g. happy path`,autoFocus:!0}),l&&(0,B.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`An input named "`,c,`" already exists: it will be overwritten.`]})]}),(0,B.jsxs)(YM,{children:[(0,B.jsx)(Qi,{type:`button`,variant:`secondary`,onClick:()=>t(!1),children:`Cancel`}),(0,B.jsx)(Qi,{type:`submit`,variant:`primary`,disabled:!c,children:l?`Overwrite`:`Save`})]})]})]})})}function Nve({tool:e}){let{mutateAsync:t,isPending:n}=MT(),[r,i]=kw(),a=r===e.name,o=as(e=>e.isSignedIn),s=as(e=>e.requiresAuth),c=(0,b.useRef)(null),l=xw(e.name),u=!!l?.response,{setToolData:d}=bw(),f=l?.input??{},p=t=>{d(e.name,{input:t??{}})},m=Lve(e,f),h=s&&DT(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};vR(`meta.enter`,e=>{C(e)&&S()}),vR(`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,B.jsx)(Qi,{disabled:n||h||x,variant:`primary`,className:`disabled:cursor-not-allowed disabled:pointer-events-auto disabled:opacity-100`,onClick:S,icon:n?(0,B.jsx)(oi,{className:`size-3 animate-spin`}):(0,B.jsx)(gi,{className:`size-3`}),children:`Run`});return(0,B.jsxs)(n$,{value:e.name,"data-tool-name":e.name,className:Y(`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,B.jsx)(Hge,{onClick:u?()=>i(e.name):void 0,className:Y(`font-mono text-xs font-normal text-foreground`,`no-underline`),action:(0,B.jsxs)(`div`,{className:Y(`flex items-center gap-1.5 transition-opacity hover:opacity-100`,a?`opacity-100`:`opacity-50`),children:[m.savedInputs.length>0&&(0,B.jsx)(Y9,{inputs:m.savedInputs,activeKey:m.activeKey,onSelect:m.loadInput,onClear:m.clearSelection,onDelete:m.removeInput}),w?(0,B.jsxs)(uF,{children:[(0,B.jsx)(dF,{asChild:!0,children:(0,B.jsx)(`span`,{className:`inline-flex`,children:T})}),(0,B.jsx)(fF,{children:w})]}):T]}),children:(0,B.jsx)(`div`,{className:`min-w-0 flex-1 truncate text-left text-sm font-medium`,children:e.name})}),e.description?(0,B.jsx)(`div`,{className:`px-4 pb-3 font-sans`,children:(0,B.jsx)(Ive,{name:e.name,description:e.description})}):null,(0,B.jsx)(r$,{className:`px-4 pt-0 pb-3 text-foreground`,style:{animation:`none`},children:(0,B.jsx)(Rve,{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 Pve(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 Fve(e,t){let n=t.inputSchema?.properties??{};return Object.fromEntries(Object.entries(e).filter(([e])=>e in n))}function Ive({name:e,description:t}){return(0,B.jsx)(`div`,{className:`rounded-md border border-border bg-muted/40 px-2.5 py-2`,children:(0,B.jsx)(i9,{text:t,title:e,className:`text-xs text-muted-foreground/70`})})}function Lve(e,t){let n=jT()?.name,r=Vge(n,e.name),i=r9(e=>e.saveInput),a=r9(e=>e.updateInput),o=r9(e=>e.deleteInput),s=bw(e=>e.setToolData),c=xw(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:Fve(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 Rve({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;Bge({tool:e,enabled:!d,execute:async()=>await u()??{content:[{type:`text`,text:`The tool call was not executed.`}],isError:!0}});let f=Pve(e),[p,m]=(0,b.useState)(!1),{serverName:h,savedInputs:g,activeKey:_}=c,v=(0,B.jsx)(`button`,{type:`button`,onClick:()=>m(!0),disabled:l,title:l?void 0:`Save input`,"aria-label":`Save input`,className:Y(`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,B.jsx)(bi,{className:`size-3.5`})});return(0,B.jsxs)(`div`,{className:`space-y-3`,children:[f&&(0,B.jsx)(`div`,{"data-testid":`tool-visibility`,className:`flex flex-wrap gap-1`,children:f.map(e=>(0,B.jsxs)(uF,{children:[(0,B.jsx)(dF,{asChild:!0,children:(0,B.jsx)(xR,{size:`sm`,className:X9[e].badgeClass,children:e})}),(0,B.jsx)(QP,{children:(0,B.jsxs)(eF,{sideOffset:6,className:Y(`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,B.jsx)(nF,{width:11,height:5,className:`fill-background drop-shadow-[0_1px_0_var(--color-border)]`})]})})]},e))}),d&&(0,B.jsxs)(K$,{value:i,onValueChange:e=>a(e),children:[(0,B.jsxs)(`div`,{className:`flex items-end justify-between gap-2 border-b border-border`,children:[(0,B.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1 pb-1.5`,children:[h&&(l?(0,B.jsxs)(uF,{children:[(0,B.jsx)(dF,{asChild:!0,children:(0,B.jsx)(`span`,{className:`inline-flex`,children:v})}),(0,B.jsx)(fF,{children:`Input is not valid`})]}):v),h?(0,B.jsx)(Y9,{inputs:g,activeKey:_,onSelect:c.loadInput,onClear:c.clearSelection,onDelete:c.removeInput}):(0,B.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:`Input`})]}),(0,B.jsx)(`div`,{className:`-mb-px flex`,children:[`form`,`json`].map((e,t)=>{let n=e===`form`?$r:Wr;return(0,B.jsxs)(`button`,{type:`button`,onClick:()=>a(e),className:Y(`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,B.jsx)(n,{className:`size-3.5`}),(0,B.jsx)(`span`,{children:e})]},e)})})]}),(0,B.jsx)(q$,{value:`form`,children:(0,B.jsx)(zve,{tool:e,formData:t,setFormData:n,formRef:r,onRun:u})}),(0,B.jsx)(q$,{value:`json`,className:`-mt-4`,children:(0,B.jsx)(Bve,{formData:t,setFormData:n,error:o,setError:s})})]}),d&&h&&(0,B.jsx)(Mve,{open:p,onOpenChange:m,defaultKey:_??``,existingKeys:g.map(e=>e.key),onSave:c.saveFromModal})]})}function zve({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,B.jsx)(`div`,{ref:o,children:(0,B.jsx)(zge,{ref:r,tagName:P_e(e),idPrefix:e.name,schema:a,validator:E5,uiSchema:N_e(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:A_e,templates:j_e})})}function Bve({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,B.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,B.jsxs)(`div`,{className:`relative`,children:[(0,B.jsx)(`textarea`,{className:Y(`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,B.jsx)(nM,{value:i,label:`Copy input`,className:`absolute top-2 right-2 z-10`})]}),n&&(0,B.jsx)(`div`,{className:`text-xs text-destructive`,children:`The provided JSON is invalid`})]})}function Vve(){let e=AT(),[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 Lce(()=>{i(!1),o(void 0)},a),(0,B.jsxs)(`div`,{className:`grid h-full min-h-0 grid-rows-[auto_1fr]`,children:[(0,B.jsxs)(`header`,{className:`flex h-9 items-center justify-between border-b border-border pl-4 pr-0`,children:[(0,B.jsx)(`span`,{className:`text-sm font-medium`,children:`Tools`}),(0,B.jsx)(Qi,{onClick:async()=>{o(void 0),i(!0);try{await Aw.invalidateQueries({queryKey:[`list-tools`]})}finally{o(600)}},"aria-label":`Refresh tools`,variant:`tertiary`,size:`icon`,children:(0,B.jsx)(yi,{className:Y(`size-3.5`,r&&`animate-spin`)})})]}),(0,B.jsx)(t$,{type:`multiple`,value:t,onValueChange:n,className:`min-h-0 overflow-y-auto`,children:e.map(e=>(0,B.jsx)(Nve,{tool:e},e.name))})]})}var Z9=`devtools-tools-split`,Q9=`tools-list`,$9=`tool-panel`;function Hve(){let{status:e,requiresAuth:t}=as(),n=us(e=>e.previewClient),r=e===`authenticated`,{defaultLayout:i,onLayoutChanged:a}=Go({id:Z9,panelIds:[Q9,$9],storage:localStorage});return(0,B.jsxs)(`div`,{className:`grid h-screen grid-rows-[auto_1fr] overflow-hidden bg-background text-foreground`,children:[(0,B.jsx)(Uae,{}),r&&n?(0,B.jsx)(b.Suspense,{fallback:null,children:(0,B.jsx)(Tce,{})}):r?(0,B.jsx)(`div`,{id:`devtools-card-body`,className:`relative flex min-h-0 min-w-0 flex-1`,children:(0,B.jsxs)(Ho,{orientation:`horizontal`,id:Z9,className:`flex min-h-0 min-w-0 flex-1`,defaultLayout:i,onLayoutChanged:a,children:[(0,B.jsx)(Yo,{id:Q9,defaultSize:380,minSize:250,maxSize:510,className:`min-h-0 min-w-0`,children:(0,B.jsx)(`aside`,{className:`flex h-full min-h-0 min-w-0 flex-col overflow-hidden`,children:(0,B.jsx)(b.Suspense,{fallback:null,children:(0,B.jsx)(Vve,{})})})}),(0,B.jsx)(Qo,{className:`w-px shrink-0 bg-border transition-colors hover:bg-ring data-separator-active:bg-ring`}),(0,B.jsx)(Yo,{id:$9,minSize:320,className:`min-h-0 min-w-0`,children:(0,B.jsx)(`main`,{className:`flex h-full min-h-0 min-w-0 flex-col overflow-hidden`,children:(0,B.jsx)(b.Suspense,{fallback:null,children:(0,B.jsx)(qZ,{})})})})]})}):(0,B.jsx)(`div`,{className:`flex items-center justify-center`,children:(0,B.jsxs)(`div`,{className:`space-y-4 text-center`,children:[(0,B.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,B.jsxs)(Qi,{variant:`secondary`,onClick:kT,children:[(0,B.jsx)(_i,{className:`size-3.5`}),`Connect`]})]})})]})}var Uve=()=>{let e=jT();(0,b.useEffect)(()=>{e?.name&&(document.title=`${e.name} · Skybridge`)},[e?.name])};function Wve(){return mM(),uM(),Uve(),(0,B.jsx)(Je,{client:Aw,children:(0,B.jsx)(nn,{children:(0,B.jsx)(Hve,{})})})}async function Gve(){let e=new URLSearchParams(window.location.search);if(e.get(`oauth_callback`)===`true`){let t=e.get(`code`),n=new URL(window.location.href);if(n.searchParams.delete(`oauth_callback`),n.searchParams.delete(`code`),n.searchParams.delete(`state`),window.history.replaceState({},``,n.toString()),t)try{await tie(t)}catch(e){console.error(`OAuth callback failed:`,e),as.getState().setStatus(`error`),as.getState().setError(e instanceof Error?e.message:`OAuth callback failed`)}else as.getState().setStatus(`error`),as.getState().setError(`OAuth callback missing authorization code`)}else kT().catch(e=>{console.error(`Connection failed:`,e)})}Gve(),(0,x.createRoot)(document.getElementById(`root`)).render((0,B.jsx)(b.StrictMode,{children:(0,B.jsx)(Wve,{})}));