browsentic 0.4.6 → 0.4.9

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,177 @@
1
+ import{n as e,t}from"./rolldown-runtime-Bh1tDfsg.js";(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 n=t((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 ee(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function te(e,t){return ee(e.type,t,e.props)}function E(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ne(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var re=/\/+/g;function ie(e,t){return typeof e==`object`&&e&&e.key!=null?ne(``+e.key):t.toString(36)}function ae(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 oe(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,oe(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ie(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(re,`$&/`)+`/`),oe(o,r,i,``,function(e){return e})):o!=null&&(E(o)&&(o=te(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(re,`$&/`)+`/`)+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+ie(a,u),c+=oe(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+ie(a,u++),c+=oe(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return oe(ae(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 se(e,t,n){if(e==null)return e;var r=[],i=0;return oe(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ce(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 D=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)},O={map:se,forEach:function(e,t,n){se(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return se(e,function(){t++}),t},toArray:function(e){return se(e,function(e){return e})||[]},only:function(e){if(!E(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=O,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 ee(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 ee(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=E,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ce}},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,D)}catch(e){D(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.8`})),r=t(((e,t)=>{t.exports=n()})),i=t((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,E());else{var t=n(l);t!==null&&ie(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function ee(){return g?!0:!(e.unstable_now()-T<w)}function te(){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&&ee());){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&&ie(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?E():S=!1}}}var E;if(typeof y==`function`)E=function(){y(te)};else if(typeof MessageChannel<`u`){var ne=new MessageChannel,re=ne.port2;ne.port1.onmessage=te,E=function(){re.postMessage(null)}}else E=function(){_(te,0)};function ie(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,ie(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,E()))),r},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),a=t(((e,t)=>{t.exports=i()})),o=t((e=>{var t=r();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 i(){}var a={d:{f:i,r:function(){throw Error(n(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(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=a,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 s(e,t,null,r)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.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,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,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=l(t.as,t.crossOrigin);a.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??a.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=l(n,t.crossOrigin);a.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=l(t.as,t.crossOrigin);a.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 a.d.m(e)},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.8`})),s=t(((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=o()})),c=t((e=>{var t=a(),n=r(),i=s();function o(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 c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function l(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 u(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 d(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 f(e){if(l(e)!==e)throw Error(o(188))}function p(e){var t=e.alternate;if(!t){if(t=l(e),t===null)throw Error(o(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return f(i),e;if(a===r)return f(i),t;a=a.sibling}throw Error(o(188))}if(n.return!==r.return)n=i,r=a;else{for(var s=!1,c=i.child;c;){if(c===n){s=!0,n=i,r=a;break}if(c===r){s=!0,r=i,n=a;break}c=c.sibling}if(!s){for(c=a.child;c;){if(c===n){s=!0,n=a,r=i;break}if(c===r){s=!0,r=a,n=i;break}c=c.sibling}if(!s)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(n.tag!==3)throw Error(o(188));return n.stateNode.current===n?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=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`),ee=Symbol.for(`react.suspense_list`),te=Symbol.for(`react.memo`),E=Symbol.for(`react.lazy`),ne=Symbol.for(`react.activity`),re=Symbol.for(`react.memo_cache_sentinel`),ie=Symbol.iterator;function ae(e){return typeof e!=`object`||!e?null:(e=ie&&e[ie]||e[`@@iterator`],typeof e==`function`?e:null)}var oe=Symbol.for(`react.client.reference`);function se(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===oe?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 ee:return`SuspenseList`;case ne: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 te:return t=e.displayName||null,t===null?se(e.type)||`Memo`:t;case E:t=e._payload,e=e._init;try{return se(e(t))}catch{}}return null}var ce=Array.isArray,D=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le={pending:!1,data:null,method:null,action:null},ue=[],de=-1;function fe(e){return{current:e}}function k(e){0>de||(e.current=ue[de],ue[de]=null,de--)}function A(e,t){de++,ue[de]=e.current,e.current=t}var pe=fe(null),me=fe(null),he=fe(null),ge=fe(null);function _e(e,t){switch(A(he,t),A(me,e),A(pe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Kd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Kd(t),e=qd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}k(pe),A(pe,e)}function ve(){k(pe),k(me),k(he)}function ye(e){e.memoizedState!==null&&A(ge,e);var t=pe.current,n=qd(t,e.type);t!==n&&(A(me,e),A(pe,n))}function be(e){me.current===e&&(k(pe),k(me)),ge.current===e&&(k(ge),rp._currentValue=le)}var xe,Se;function Ce(e){if(xe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);xe=t&&t[1]||``,Se=-1<e.stack.indexOf(`
2
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
+ `+xe+e+Se}var we=!1;function Te(e,t){if(!e||we)return``;we=!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{we=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ce(n):``}function Ee(e,t){switch(e.tag){case 26:case 27:case 5:return Ce(e.type);case 16:return Ce(`Lazy`);case 13:return e.child!==t&&t!==null?Ce(`Suspense Fallback`):Ce(`Suspense`);case 19:return Ce(`SuspenseList`);case 0:case 15:return Te(e.type,!1);case 11:return Te(e.type.render,!1);case 1:return Te(e.type,!0);case 31:return Ce(`Activity`);default:return``}}function De(e){try{var t=``,n=null;do t+=Ee(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
+ Error generating stack: `+e.message+`
8
+ `+e.stack}}var Oe=Object.prototype.hasOwnProperty,ke=t.unstable_scheduleCallback,Ae=t.unstable_cancelCallback,je=t.unstable_shouldYield,Me=t.unstable_requestPaint,Ne=t.unstable_now,Pe=t.unstable_getCurrentPriorityLevel,Fe=t.unstable_ImmediatePriority,Ie=t.unstable_UserBlockingPriority,Le=t.unstable_NormalPriority,Re=t.unstable_LowPriority,ze=t.unstable_IdlePriority,Be=t.log,Ve=t.unstable_setDisableYieldValue,He=null,Ue=null;function We(e){if(typeof Be==`function`&&Ve(e),Ue&&typeof Ue.setStrictMode==`function`)try{Ue.setStrictMode(He,e)}catch{}}var Ge=Math.clz32?Math.clz32:Je,Ke=Math.log,qe=Math.LN2;function Je(e){return e>>>=0,e===0?32:31-(Ke(e)/qe|0)|0}var Ye=256,Xe=262144,Ze=4194304;function j(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 Qe(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=j(n))):i=j(o):i=j(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=j(n))):i=j(o)):i=j(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 $e(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function et(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 tt(){var e=Ze;return Ze<<=1,!(Ze&62914560)&&(Ze=4194304),e}function nt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function rt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function it(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-Ge(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&&at(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function at(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ge(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function ot(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ge(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function st(e,t){var n=t&-t;return n=n&42?1:ct(n),(n&(e.suspendedLanes|t))===0?n:0}function ct(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 M(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function lt(){var e=O.p;return e===0?(e=window.event,e===void 0?32:yp(e.type)):e}function ut(e,t){var n=O.p;try{return O.p=e,t()}finally{O.p=n}}var dt=Math.random().toString(36).slice(2),ft=`__reactFiber$`+dt,pt=`__reactProps$`+dt,mt=`__reactContainer$`+dt,ht=`__reactEvents$`+dt,N=`__reactListeners$`+dt,gt=`__reactHandles$`+dt,_t=`__reactResources$`+dt,vt=`__reactMarker$`+dt;function yt(e){delete e[ft],delete e[pt],delete e[ht],delete e[N],delete e[gt]}function bt(e){var t=e[ft];if(t)return t;for(var n=e.parentNode;n;){if(t=n[mt]||n[ft]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=gf(e);e!==null;){if(n=e[ft])return n;e=gf(e)}return t}e=n,n=e.parentNode}return null}function xt(e){if(e=e[ft]||e[mt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function St(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Ct(e){var t=e[_t];return t||=e[_t]={hoistableStyles:new Map,hoistableScripts:new Map},t}function wt(e){e[vt]=!0}var Tt=new Set,Et={};function Dt(e,t){Ot(e,t),Ot(e+`Capture`,t)}function Ot(e,t){for(Et[e]=t,e=0;e<t.length;e++)Tt.add(t[e])}var kt=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]*$`),At={},jt={};function Mt(e){return Oe.call(jt,e)?!0:Oe.call(At,e)?!1:kt.test(e)?jt[e]=!0:(At[e]=!0,!1)}function Nt(e,t,n){if(Mt(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 Pt(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 Ft(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 It(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function P(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Lt(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 Rt(e){if(!e._valueTracker){var t=P(e)?`checked`:`value`;e._valueTracker=Lt(e,t,``+e[t])}}function zt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=P(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Bt(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 Vt=/[\n"\\]/g;function Ht(e){return e.replace(Vt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Ut(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=``+It(t)):e.value!==``+It(t)&&(e.value=``+It(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Gt(e,o,It(n)):Gt(e,o,It(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=``+It(s):e.removeAttribute(`name`)}function Wt(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)){Rt(e);return}n=n==null?``:``+It(n),t=t==null?n:``+It(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),Rt(e)}function Gt(e,t,n){t===`number`&&Bt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Kt(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=``+It(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 qt(e,t,n){if(t!=null&&(t=``+It(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+It(n)}function Jt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(o(92));if(ce(r)){if(1<r.length)throw Error(o(93));r=r[0]}n=r}n??=``,t=n}n=It(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Rt(e)}function Yt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Xt=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 Zt(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||Xt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Qt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(o(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 i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&Zt(e,i,r)}else for(var a in t)t.hasOwnProperty(a)&&Zt(e,a,t[a])}function $t(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 en=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`]]),tn=/^[\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 nn(e){return tn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function rn(){}var an=null;function on(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var sn=null,cn=null;function ln(e){var t=xt(e);if(t&&(e=t.stateNode)){var n=e[pt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Ut(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="`+Ht(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[pt]||null;if(!i)throw Error(o(90));Ut(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&zt(r)}break a;case`textarea`:qt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Kt(e,!!n.multiple,t,!1)}}}var un=!1;function dn(e,t,n){if(un)return e(t,n);un=!0;try{return e(t)}finally{if(un=!1,(sn!==null||cn!==null)&&(wu(),sn&&(t=sn,e=cn,cn=sn=null,ln(t),e)))for(t=0;t<e.length;t++)ln(e[t])}}function fn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[pt]||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(o(231,t,typeof n));return n}var pn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),mn=!1;if(pn)try{var hn={};Object.defineProperty(hn,"passive",{get:function(){mn=!0}}),window.addEventListener(`test`,hn,hn),window.removeEventListener(`test`,hn,hn)}catch{mn=!1}var gn=null,_n=null,vn=null;function yn(){if(vn)return vn;var e,t=_n,n=t.length,r,i=`value`in gn?gn.value:gn.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 vn=i.slice(e,1<r?1-r:void 0)}function bn(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 xn(){return!0}function Sn(){return!1}function Cn(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)?xn:Sn,this.isPropagationStopped=Sn,this}return h(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=xn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=xn)},persist:function(){},isPersistent:xn}),t}var wn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Tn=Cn(wn),En=h({},wn,{view:0,detail:0}),Dn=Cn(En),On,kn,An,jn=h({},En,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Hn,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!==An&&(An&&e.type===`mousemove`?(On=e.screenX-An.screenX,kn=e.screenY-An.screenY):kn=On=0,An=e),On)},movementY:function(e){return`movementY`in e?e.movementY:kn}}),Mn=Cn(jn),Nn=Cn(h({},jn,{dataTransfer:0})),Pn=Cn(h({},En,{relatedTarget:0})),Fn=Cn(h({},wn,{animationName:0,elapsedTime:0,pseudoElement:0})),In=Cn(h({},wn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Ln=Cn(h({},wn,{data:0})),Rn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},zn={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`},Bn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Vn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Bn[e])?!!t[e]:!1}function Hn(){return Vn}var Un=Cn(h({},En,{key:function(e){if(e.key){var t=Rn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=bn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?zn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Hn,charCode:function(e){return e.type===`keypress`?bn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?bn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Wn=Cn(h({},jn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Gn=Cn(h({},En,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Hn})),Kn=Cn(h({},wn,{propertyName:0,elapsedTime:0,pseudoElement:0})),qn=Cn(h({},jn,{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})),Jn=Cn(h({},wn,{newState:0,oldState:0})),Yn=[9,13,27,32],Xn=pn&&`CompositionEvent`in window,Zn=null;pn&&`documentMode`in document&&(Zn=document.documentMode);var Qn=pn&&`TextEvent`in window&&!Zn,$n=pn&&(!Xn||Zn&&8<Zn&&11>=Zn),er=` `,tr=!1;function nr(e,t){switch(e){case`keyup`:return Yn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function rr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var ir=!1;function ar(e,t){switch(e){case`compositionend`:return rr(t);case`keypress`:return t.which===32?(tr=!0,er):null;case`textInput`:return e=t.data,e===er&&tr?null:e;default:return null}}function or(e,t){if(ir)return e===`compositionend`||!Xn&&nr(e,t)?(e=yn(),vn=_n=gn=null,ir=!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 $n&&t.locale!==`ko`?null:t.data;default:return null}}var sr={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 cr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!sr[e.type]:t===`textarea`}function lr(e,t,n,r){sn?cn?cn.push(r):cn=[r]:sn=r,t=Ad(t,`onChange`),0<t.length&&(n=new Tn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var ur=null,dr=null;function fr(e){Cd(e,0)}function pr(e){if(zt(St(e)))return e}function mr(e,t){if(e===`change`)return t}var hr=!1;if(pn){var gr;if(pn){var _r=`oninput`in document;if(!_r){var vr=document.createElement(`div`);vr.setAttribute(`oninput`,`return;`),_r=typeof vr.oninput==`function`}gr=_r}else gr=!1;hr=gr&&(!document.documentMode||9<document.documentMode)}function yr(){ur&&(ur.detachEvent(`onpropertychange`,br),dr=ur=null)}function br(e){if(e.propertyName===`value`&&pr(dr)){var t=[];lr(t,dr,e,on(e)),dn(fr,t)}}function xr(e,t,n){e===`focusin`?(yr(),ur=t,dr=n,ur.attachEvent(`onpropertychange`,br)):e===`focusout`&&yr()}function Sr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return pr(dr)}function Cr(e,t){if(e===`click`)return pr(t)}function wr(e,t){if(e===`input`||e===`change`)return pr(t)}function Tr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Er=typeof Object.is==`function`?Object.is:Tr;function Dr(e,t){if(Er(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(!Oe.call(t,i)||!Er(e[i],t[i]))return!1}return!0}function Or(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function kr(e,t){var n=Or(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=Or(n)}}function Ar(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ar(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function jr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Bt(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=Bt(e.document)}return t}function Mr(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 Nr=pn&&`documentMode`in document&&11>=document.documentMode,Pr=null,Fr=null,Ir=null,Lr=!1;function Rr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Lr||Pr==null||Pr!==Bt(r)||(r=Pr,`selectionStart`in r&&Mr(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}),Ir&&Dr(Ir,r)||(Ir=r,r=Ad(Fr,`onSelect`),0<r.length&&(t=new Tn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Pr)))}function zr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Br={animationend:zr(`Animation`,`AnimationEnd`),animationiteration:zr(`Animation`,`AnimationIteration`),animationstart:zr(`Animation`,`AnimationStart`),transitionrun:zr(`Transition`,`TransitionRun`),transitionstart:zr(`Transition`,`TransitionStart`),transitioncancel:zr(`Transition`,`TransitionCancel`),transitionend:zr(`Transition`,`TransitionEnd`)},Vr={},Hr={};pn&&(Hr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Br.animationend.animation,delete Br.animationiteration.animation,delete Br.animationstart.animation),`TransitionEvent`in window||delete Br.transitionend.transition);function Ur(e){if(Vr[e])return Vr[e];if(!Br[e])return e;var t=Br[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Hr)return Vr[e]=t[n];return e}var Wr=Ur(`animationend`),Gr=Ur(`animationiteration`),Kr=Ur(`animationstart`),qr=Ur(`transitionrun`),Jr=Ur(`transitionstart`),Yr=Ur(`transitioncancel`),Xr=Ur(`transitionend`),Zr=new Map,Qr=`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(` `);Qr.push(`scrollEnd`);function $r(e,t){Zr.set(e,t),Dt(t,[e])}var ei=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)},ti=[],ni=0,ri=0;function ii(){for(var e=ni,t=ri=ni=0;t<e;){var n=ti[t];ti[t++]=null;var r=ti[t];ti[t++]=null;var i=ti[t];ti[t++]=null;var a=ti[t];if(ti[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&&ci(n,i,a)}}function ai(e,t,n,r){ti[ni++]=e,ti[ni++]=t,ti[ni++]=n,ti[ni++]=r,ri|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function oi(e,t,n,r){return ai(e,t,n,r),li(e)}function si(e,t){return ai(e,null,null,t),li(e)}function ci(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-Ge(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function li(e){if(50<hu)throw hu=0,gu=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ui={};function di(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 fi(e,t,n,r){return new di(e,t,n,r)}function pi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function mi(e,t){var n=e.alternate;return n===null?(n=fi(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 hi(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 gi(e,t,n,r,i,a){var s=0;if(r=e,typeof e==`function`)pi(e)&&(s=1);else if(typeof e==`string`)s=Jf(e,n,pe.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case ne:return e=fi(31,n,t,i),e.elementType=ne,e.lanes=a,e;case y:return _i(n.children,i,a,t);case b:s=8,i|=24;break;case x:return e=fi(12,n,t,i|2),e.elementType=x,e.lanes=a,e;case T:return e=fi(13,n,t,i),e.elementType=T,e.lanes=a,e;case ee:return e=fi(19,n,t,i),e.elementType=ee,e.lanes=a,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 te:s=14;break a;case E:s=16,r=null;break a}s=29,n=Error(o(130,e===null?`null`:typeof e,``)),r=null}return t=fi(s,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function _i(e,t,n,r){return e=fi(7,e,r,t),e.lanes=n,e}function vi(e,t,n){return e=fi(6,e,null,t),e.lanes=n,e}function yi(e){var t=fi(18,null,null,0);return t.stateNode=e,t}function bi(e,t,n){return t=fi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var xi=new WeakMap;function Si(e,t){if(typeof e==`object`&&e){var n=xi.get(e);return n===void 0?(t={value:e,source:t,stack:De(t)},xi.set(e,t),t):n}return{value:e,source:t,stack:De(t)}}var Ci=[],wi=0,Ti=null,Ei=0,Di=[],Oi=0,ki=null,Ai=1,ji=``;function Mi(e,t){Ci[wi++]=Ei,Ci[wi++]=Ti,Ti=e,Ei=t}function Ni(e,t,n){Di[Oi++]=Ai,Di[Oi++]=ji,Di[Oi++]=ki,ki=e;var r=Ai;e=ji;var i=32-Ge(r)-1;r&=~(1<<i),n+=1;var a=32-Ge(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ai=1<<32-Ge(t)+i|n<<i|r,ji=a+e}else Ai=1<<a|n<<i|r,ji=e}function Pi(e){e.return!==null&&(Mi(e,1),Ni(e,1,0))}function Fi(e){for(;e===Ti;)Ti=Ci[--wi],Ci[wi]=null,Ei=Ci[--wi],Ci[wi]=null;for(;e===ki;)ki=Di[--Oi],Di[Oi]=null,ji=Di[--Oi],Di[Oi]=null,Ai=Di[--Oi],Di[Oi]=null}function Ii(e,t){Di[Oi++]=Ai,Di[Oi++]=ji,Di[Oi++]=ki,Ai=t.id,ji=t.overflow,ki=e}var Li=null,F=null,I=!1,Ri=null,zi=!1,Bi=Error(o(519));function Vi(e){throw qi(Si(Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Bi}function Hi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[ft]=e,t[pt]=r,n){case`dialog`:J(`cancel`,t),J(`close`,t);break;case`iframe`:case`object`:case`embed`:J(`load`,t);break;case`video`:case`audio`:for(n=0;n<xd.length;n++)J(xd[n],t);break;case`source`:J(`error`,t);break;case`img`:case`image`:case`link`:J(`error`,t),J(`load`,t);break;case`details`:J(`toggle`,t);break;case`input`:J(`invalid`,t),Wt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:J(`invalid`,t);break;case`textarea`:J(`invalid`,t),Jt(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||Id(t.textContent,n)?(r.popover!=null&&(J(`beforetoggle`,t),J(`toggle`,t)),r.onScroll!=null&&J(`scroll`,t),r.onScrollEnd!=null&&J(`scrollend`,t),r.onClick!=null&&(t.onclick=rn),t=!0):t=!1,t||Vi(e,!0)}function Ui(e){for(Li=e.return;Li;)switch(Li.tag){case 5:case 31:case 13:zi=!1;return;case 27:case 3:zi=!0;return;default:Li=Li.return}}function Wi(e){if(e!==Li)return!1;if(!I)return Ui(e),I=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Jd(e.type,e.memoizedProps)),n=!n),n&&F&&Vi(e),Ui(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(o(317));F=hf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(o(317));F=hf(e)}else t===27?(t=F,nf(e.type)?(e=mf,mf=null,F=e):F=t):F=Li?pf(e.stateNode.nextSibling):null;return!0}function Gi(){F=Li=null,I=!1}function Ki(){var e=Ri;return e!==null&&(tu===null?tu=e:tu.push.apply(tu,e),Ri=null),e}function qi(e){Ri===null?Ri=[e]:Ri.push(e)}var Ji=fe(null),Yi=null,Xi=null;function Zi(e,t,n){A(Ji,t._currentValue),t._currentValue=n}function Qi(e){e._currentValue=Ji.current,k(Ji)}function $i(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 ea(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){var s=i.child;a=a.firstContext;a:for(;a!==null;){var c=a;a=i;for(var l=0;l<t.length;l++)if(c.context===t[l]){a.lanes|=n,c=a.alternate,c!==null&&(c.lanes|=n),$i(a.return,n,e),r||(s=null);break a}a=c.next}}else if(i.tag===18){if(s=i.return,s===null)throw Error(o(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),$i(s,n,e),s=null}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}}function ta(e,t,n,r){e=null;for(var i=t,a=!1;i!==null;){if(!a){if(i.flags&524288)a=!0;else if(i.flags&262144)break}if(i.tag===10){var s=i.alternate;if(s===null)throw Error(o(387));if(s=s.memoizedProps,s!==null){var c=i.type;Er(i.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(i===ge.current){if(s=i.alternate,s===null)throw Error(o(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e===null?e=[rp]:e.push(rp))}i=i.return}e!==null&&ea(t,e,n,r),t.flags|=262144}function na(e){for(e=e.firstContext;e!==null;){if(!Er(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ra(e){Yi=e,Xi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ia(e){return oa(Yi,e)}function aa(e,t){return Yi===null&&ra(e),oa(e,t)}function oa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Xi===null){if(e===null)throw Error(o(308));Xi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Xi=Xi.next=t;return n}var sa=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()})}},ca=t.unstable_scheduleCallback,la=t.unstable_NormalPriority,ua={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function da(){return{controller:new sa,data:new Map,refCount:0}}function fa(e){e.refCount--,e.refCount===0&&ca(la,function(){e.controller.abort()})}var pa=null,ma=0,ha=0,ga=null;function _a(e,t){if(pa===null){var n=pa=[];ma=0,ha=hd(),ga={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ma++,t.then(va,va),t}function va(){if(--ma===0&&pa!==null){ga!==null&&(ga.status=`fulfilled`);var e=pa;pa=null,ha=0,ga=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ya(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 ba=D.S;D.S=function(e,t){iu=Ne(),typeof t==`object`&&t&&typeof t.then==`function`&&_a(e,t),ba!==null&&ba(e,t)};var xa=fe(null);function Sa(){var e=xa.current;return e===null?H.pooledCache:e}function Ca(e,t){t===null?A(xa,xa.current):A(xa,t.pool)}function wa(){var e=Sa();return e===null?null:{parent:ua._currentValue,pool:e}}var Ta=Error(o(460)),Ea=Error(o(474)),Da=Error(o(542)),Oa={then:function(){}};function ka(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Aa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(rn,rn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Pa(e),e;default:if(typeof t.status==`string`)t.then(rn,rn);else{if(e=H,e!==null&&100<e.shellSuspendCounter)throw Error(o(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,Pa(e),e}throw Ma=t,Ta}}function ja(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ma=e,Ta):e}}var Ma=null;function Na(){if(Ma===null)throw Error(o(459));var e=Ma;return Ma=null,e}function Pa(e){if(e===Ta||e===Da)throw Error(o(483))}var Fa=null,Ia=0;function La(e){var t=Ia;return Ia+=1,Fa===null&&(Fa=[]),Aa(Fa,e,t)}function Ra(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function za(e,t){throw t.$$typeof===g?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ba(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 i(e,t){return e=mi(e,t),e.index=0,e.sibling=null,e}function a(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=vi(n,e.mode,r),t.return=e,t):(t=i(t,n),t.return=e,t)}function l(e,t,n,r){var a=n.type;return a===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===a||typeof a==`object`&&a&&a.$$typeof===E&&ja(a)===t.type)?(t=i(t,n.props),Ra(t,n),t.return=e,t):(t=gi(n.type,n.key,n.props,null,e.mode,r),Ra(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=bi(n,e.mode,r),t.return=e,t):(t=i(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,a){return t===null||t.tag!==7?(t=_i(n,e.mode,r,a),t.return=e,t):(t=i(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=vi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=gi(t.type,t.key,t.props,null,e.mode,n),Ra(n,t),n.return=e,n;case v:return t=bi(t,e.mode,n),t.return=e,t;case E:return t=ja(t),f(e,t,n)}if(ce(t)||ae(t))return t=_i(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,La(t),n);if(t.$$typeof===C)return f(e,aa(e,t),n);za(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 _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case E:return n=ja(n),p(e,t,n,r)}if(ce(n)||ae(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,La(n),r);if(n.$$typeof===C)return p(e,t,aa(e,n),r);za(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 _: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 E:return r=ja(r),m(e,t,n,r,i)}if(ce(r)||ae(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,La(r),i);if(r.$$typeof===C)return m(e,t,n,aa(t,r),i);za(t,r)}return null}function h(i,o,s,c){for(var l=null,u=null,d=o,h=o=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),o=a(_,o,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),I&&Mi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(o=a(d,o,h),u===null?l=d:u.sibling=d,u=d);return I&&Mi(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),o=a(g,o,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),I&&Mi(i,h),l}function g(i,s,c,l){if(c==null)throw Error(o(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(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=a(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),I&&Mi(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=a(v,s,g),d===null?u=v:d.sibling=v,d=v);return I&&Mi(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=a(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),I&&Mi(i,g),u}function b(e,r,a,c){if(typeof a==`object`&&a&&a.type===y&&a.key===null&&(a=a.props.children),typeof a==`object`&&a){switch(a.$$typeof){case _:a:{for(var l=a.key;r!==null;){if(r.key===l){if(l=a.type,l===y){if(r.tag===7){n(e,r.sibling),c=i(r,a.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===E&&ja(l)===r.type){n(e,r.sibling),c=i(r,a.props),Ra(c,a),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}a.type===y?(c=_i(a.props.children,e.mode,c,a.key),c.return=e,e=c):(c=gi(a.type,a.key,a.props,null,e.mode,c),Ra(c,a),c.return=e,e=c)}return s(e);case v:a:{for(l=a.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===a.containerInfo&&r.stateNode.implementation===a.implementation){n(e,r.sibling),c=i(r,a.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=bi(a,e.mode,c),c.return=e,e=c}return s(e);case E:return a=ja(a),b(e,r,a,c)}if(ce(a))return h(e,r,a,c);if(ae(a)){if(l=ae(a),typeof l!=`function`)throw Error(o(150));return a=l.call(a),g(e,r,a,c)}if(typeof a.then==`function`)return b(e,r,La(a),c);if(a.$$typeof===C)return b(e,r,aa(e,a),c);za(e,a)}return typeof a==`string`&&a!==``||typeof a==`number`||typeof a==`bigint`?(a=``+a,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,a),c.return=e,e=c):(n(e,r),c=vi(a,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ia=0;var i=b(e,t,n,r);return Fa=null,i}catch(t){if(t===Ta||t===Da)throw t;var a=fi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Va=Ba(!0),Ha=Ba(!1),Ua=!1;function Wa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ga(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 Ka(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function qa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,V&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=li(e),ci(e,null,n),t}return ai(e,r,t,n),li(e)}function Ja(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,ot(e,n)}}function Ya(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 Xa=!1;function Za(){if(Xa){var e=ga;if(e!==null)throw e}}function Qa(e,t,n,r){Xa=!1;var i=e.updateQueue;Ua=!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 f=s.lane&-536870913,p=f!==s.lane;if(p?(W&f)===f:(r&f)===f){f!==0&&f===ha&&(Xa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:Ua=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,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),Xl|=o,e.lanes=o,e.memoizedState=d}}function $a(e,t){if(typeof e!=`function`)throw Error(o(191,e));e.call(t)}function eo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)$a(n[e],t)}var to=fe(null),no=fe(0);function ro(e,t){e=Jl,A(no,e),A(to,t),Jl=e|t.baseLanes}function io(){A(no,Jl),A(to,to.current)}function ao(){Jl=no.current,k(to),k(no)}var oo=fe(null),so=null;function co(e){var t=e.alternate;A(mo,mo.current&1),A(oo,e),so===null&&(t===null||to.current!==null||t.memoizedState!==null)&&(so=e)}function lo(e){A(mo,mo.current),A(oo,e),so===null&&(so=e)}function uo(e){e.tag===22?(A(mo,mo.current),A(oo,e),so===null&&(so=e)):fo(e)}function fo(){A(mo,mo.current),A(oo,oo.current)}function po(e){k(oo),so===e&&(so=null),k(mo)}var mo=fe(0);function ho(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||uf(n)||df(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 go=0,L=null,_o=null,vo=null,yo=!1,bo=!1,xo=!1,So=0,Co=0,wo=null,To=0;function Eo(){throw Error(o(321))}function Do(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Er(e[n],t[n]))return!1;return!0}function Oo(e,t,n,r,i,a){return go=a,L=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?Gs:Ks,xo=!1,a=n(r,i),xo=!1,bo&&(a=Ao(t,n,r,i)),ko(e),a}function ko(e){D.H=Ws;var t=_o!==null&&_o.next!==null;if(go=0,vo=_o=L=null,yo=!1,Co=0,wo=null,t)throw Error(o(300));e===null||lc||(e=e.dependencies,e!==null&&na(e)&&(lc=!0))}function Ao(e,t,n,r){L=e;var i=0;do{if(bo&&(wo=null),Co=0,bo=!1,25<=i)throw Error(o(301));if(i+=1,vo=_o=null,e.updateQueue!=null){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,a.memoCache!=null&&(a.memoCache.index=0)}D.H=qs,a=t(n,r)}while(bo);return a}function jo(){var e=D.H,t=e.useState()[0];return t=typeof t.then==`function`?Ro(t):t,e=e.useState()[0],(_o===null?null:_o.memoizedState)!==e&&(L.flags|=1024),t}function Mo(){var e=So!==0;return So=0,e}function No(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Po(e){if(yo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}yo=!1}go=0,vo=_o=L=null,bo=!1,Co=So=0,wo=null}function Fo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return vo===null?L.memoizedState=vo=e:vo=vo.next=e,vo}function Io(){if(_o===null){var e=L.alternate;e=e===null?null:e.memoizedState}else e=_o.next;var t=vo===null?L.memoizedState:vo.next;if(t!==null)vo=t,_o=e;else{if(e===null)throw L.alternate===null?Error(o(467)):Error(o(310));_o=e,e={memoizedState:_o.memoizedState,baseState:_o.baseState,baseQueue:_o.baseQueue,queue:_o.queue,next:null},vo===null?L.memoizedState=vo=e:vo=vo.next=e}return vo}function Lo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ro(e){var t=Co;return Co+=1,wo===null&&(wo=[]),e=Aa(wo,e,t),t=L,(vo===null?t.memoizedState:vo.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?Gs:Ks),e}function zo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Ro(e);if(e.$$typeof===C)return ia(e)}throw Error(o(438,String(e)))}function Bo(e){var t=null,n=L.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=L.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=Lo(),L.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]=re;return t.index++,n}function Vo(e,t){return typeof t==`function`?t(e):t}function Ho(e){return Uo(Io(),_o,e)}function Uo(e,t,n){var r=e.queue;if(r===null)throw Error(o(311));r.lastRenderedReducer=n;var i=e.baseQueue,a=r.pending;if(a!==null){if(i!==null){var s=i.next;i.next=a.next,a.next=s}t.baseQueue=i=a,r.pending=null}if(a=e.baseState,i===null)e.memoizedState=a;else{t=i.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(go&f)===f:(W&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===ha&&(d=!0);else if((go&p)===p){u=u.next,p===ha&&(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=a):l=l.next=f,L.lanes|=p,Xl|=p;f=u.action,xo&&n(a,f),a=u.hasEagerState?u.eagerState:n(a,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=a):l=l.next=p,L.lanes|=f,Xl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=a:l.next=c,!Er(a,e.memoizedState)&&(lc=!0,d&&(n=ga,n!==null)))throw n;e.memoizedState=a,e.baseState=s,e.baseQueue=l,r.lastRenderedState=a}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Wo(e){var t=Io(),n=t.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do a=e(a,s.action),s=s.next;while(s!==i);Er(a,t.memoizedState)||(lc=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function Go(e,t,n){var r=L,i=Io(),a=I;if(a){if(n===void 0)throw Error(o(407));n=n()}else n=t();var s=!Er((_o||i).memoizedState,n);if(s&&(i.memoizedState=n,lc=!0),i=i.queue,gs(Jo.bind(null,r,i,e),[e]),i.getSnapshot!==t||s||vo!==null&&vo.memoizedState.tag&1){if(r.flags|=2048,ds(9,{destroy:void 0},qo.bind(null,r,i,n,t),null),H===null)throw Error(o(349));a||go&127||Ko(r,t,n)}return n}function Ko(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=L.updateQueue,t===null?(t=Lo(),L.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function qo(e,t,n,r){t.value=n,t.getSnapshot=r,Yo(t)&&Xo(e)}function Jo(e,t,n){return n(function(){Yo(t)&&Xo(e)})}function Yo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Er(e,n)}catch{return!0}}function Xo(e){var t=si(e,2);t!==null&&yu(t,e,2)}function Zo(e){var t=Fo();if(typeof e==`function`){var n=e;if(e=n(),xo){We(!0);try{n()}finally{We(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vo,lastRenderedState:e},t}function Qo(e,t,n,r){return e.baseState=n,Uo(e,_o,typeof r==`function`?r:Vo)}function $o(e,t,n,r,i){if(Vs(e))throw Error(o(485));if(e=t.action,e!==null){var a={payload:i,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){a.listeners.push(e)}};D.T===null?a.isTransition=!1:n(!0),r(a),n=t.pending,n===null?(a.next=t.pending=a,es(t,a)):(a.next=n.next,t.pending=n.next=a)}}function es(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=D.T,o={};D.T=o;try{var s=n(i,r),c=D.S;c!==null&&c(o,s),ts(e,t,s)}catch(n){rs(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),D.T=a}}else try{a=n(i,r),ts(e,t,a)}catch(n){rs(e,t,n)}}function ts(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ns(e,t,n)},function(n){return rs(e,t,n)}):ns(e,t,n)}function ns(e,t,n){t.status=`fulfilled`,t.value=n,is(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,es(e,n)))}function rs(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,is(t),t=t.next;while(t!==r)}e.action=null}function is(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function as(e,t){return t}function os(e,t){if(I){var n=H.formState;if(n!==null){a:{var r=L;if(I){if(F){b:{for(var i=F,a=zi;i.nodeType!==8;){if(!a){i=null;break b}if(i=pf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){F=pf(i.nextSibling),r=i.data===`F!`;break a}}Vi(r)}r=!1}r&&(t=n[0])}}return n=Fo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:as,lastRenderedState:t},n.queue=r,n=Rs.bind(null,L,r),r.dispatch=n,r=Zo(!1),a=Bs.bind(null,L,!1,r.queue),r=Fo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=$o.bind(null,L,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ss(e){return cs(Io(),_o,e)}function cs(e,t,n){if(t=Uo(e,t,as)[0],e=Ho(Vo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Ro(t)}catch(e){throw e===Ta?Da:e}else r=t;t=Io();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(L.flags|=2048,ds(9,{destroy:void 0},ls.bind(null,i,n),null)),[r,a,e]}function ls(e,t){e.action=t}function us(e){var t=Io(),n=_o;if(n!==null)return cs(t,n,e);Io(),t=t.memoizedState,n=Io();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ds(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=L.updateQueue,t===null&&(t=Lo(),L.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 fs(){return Io().memoizedState}function ps(e,t,n,r){var i=Fo();L.flags|=e,i.memoizedState=ds(1|t,{destroy:void 0},n,r===void 0?null:r)}function ms(e,t,n,r){var i=Io();r=r===void 0?null:r;var a=i.memoizedState.inst;_o!==null&&r!==null&&Do(r,_o.memoizedState.deps)?i.memoizedState=ds(t,a,n,r):(L.flags|=e,i.memoizedState=ds(1|t,a,n,r))}function hs(e,t){ps(8390656,8,e,t)}function gs(e,t){ms(2048,8,e,t)}function _s(e){L.flags|=4;var t=L.updateQueue;if(t===null)t=Lo(),L.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function vs(e){var t=Io().memoizedState;return _s({ref:t,nextImpl:e}),function(){if(V&2)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function ys(e,t){return ms(4,2,e,t)}function bs(e,t){return ms(4,4,e,t)}function xs(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 Ss(e,t,n){n=n==null?null:n.concat([e]),ms(4,4,xs.bind(null,t,e),n)}function Cs(){}function ws(e,t){var n=Io();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Do(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ts(e,t){var n=Io();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Do(t,r[1]))return r[0];if(r=e(),xo){We(!0);try{e()}finally{We(!1)}}return n.memoizedState=[r,t],r}function Es(e,t,n){return n===void 0||go&1073741824&&!(W&261930)?e.memoizedState=t:(e.memoizedState=n,e=vu(),L.lanes|=e,Xl|=e,n)}function Ds(e,t,n,r){return Er(n,t)?n:to.current===null?!(go&42)||go&1073741824&&!(W&261930)?(lc=!0,e.memoizedState=n):(e=vu(),L.lanes|=e,Xl|=e,t):(e=Es(e,n,r),Er(e,t)||(lc=!0),e)}function Os(e,t,n,r,i){var a=O.p;O.p=a!==0&&8>a?a:8;var o=D.T,s={};D.T=s,Bs(e,!1,t,n);try{var c=i(),l=D.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?zs(e,t,ya(c,r),_u(e)):zs(e,t,r,_u(e))}catch(n){zs(e,t,{then:function(){},status:`rejected`,reason:n},_u())}finally{O.p=a,o!==null&&s.types!==null&&(o.types=s.types),D.T=o}}function ks(){}function As(e,t,n,r){if(e.tag!==5)throw Error(o(476));var i=js(e).queue;Os(e,i,t,le,n===null?ks:function(){return Ms(e),n(r)})}function js(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:le,baseState:le,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vo,lastRenderedState:le},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ms(e){var t=js(e);t.next===null&&(t=e.alternate.memoizedState),zs(e,t.next.queue,{},_u())}function Ns(){return ia(rp)}function Ps(){return Io().memoizedState}function Fs(){return Io().memoizedState}function Is(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=_u();e=Ka(n);var r=qa(t,e,n);r!==null&&(yu(r,t,n),Ja(r,t,n)),t={cache:da()},e.payload=t;return}t=t.return}}function Ls(e,t,n){var r=_u();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Vs(e)?Hs(t,n):(n=oi(e,t,n,r),n!==null&&(yu(n,e,r),Us(n,t,r)))}function Rs(e,t,n){zs(e,t,n,_u())}function zs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Vs(e))Hs(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,Er(s,o))return ai(e,t,i,0),H===null&&ii(),!1}catch{}if(n=oi(e,t,i,r),n!==null)return yu(n,e,r),Us(n,t,r),!0}return!1}function Bs(e,t,n,r){if(r={lane:2,revertLane:hd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Vs(e)){if(t)throw Error(o(479))}else t=oi(e,n,r,2),t!==null&&yu(t,e,2)}function Vs(e){var t=e.alternate;return e===L||t!==null&&t===L}function Hs(e,t){bo=yo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Us(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ot(e,n)}}var Ws={readContext:ia,use:zo,useCallback:Eo,useContext:Eo,useEffect:Eo,useImperativeHandle:Eo,useLayoutEffect:Eo,useInsertionEffect:Eo,useMemo:Eo,useReducer:Eo,useRef:Eo,useState:Eo,useDebugValue:Eo,useDeferredValue:Eo,useTransition:Eo,useSyncExternalStore:Eo,useId:Eo,useHostTransitionStatus:Eo,useFormState:Eo,useActionState:Eo,useOptimistic:Eo,useMemoCache:Eo,useCacheRefresh:Eo};Ws.useEffectEvent=Eo;var Gs={readContext:ia,use:zo,useCallback:function(e,t){return Fo().memoizedState=[e,t===void 0?null:t],e},useContext:ia,useEffect:hs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ps(4194308,4,xs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ps(4194308,4,e,t)},useInsertionEffect:function(e,t){ps(4,2,e,t)},useMemo:function(e,t){var n=Fo();t=t===void 0?null:t;var r=e();if(xo){We(!0);try{e()}finally{We(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Fo();if(n!==void 0){var i=n(t);if(xo){We(!0);try{n(t)}finally{We(!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=Ls.bind(null,L,e),[r.memoizedState,e]},useRef:function(e){var t=Fo();return e={current:e},t.memoizedState=e},useState:function(e){e=Zo(e);var t=e.queue,n=Rs.bind(null,L,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Cs,useDeferredValue:function(e,t){return Es(Fo(),e,t)},useTransition:function(){var e=Zo(!1);return e=Os.bind(null,L,e.queue,!0,!1),Fo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=L,i=Fo();if(I){if(n===void 0)throw Error(o(407));n=n()}else{if(n=t(),H===null)throw Error(o(349));W&127||Ko(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,hs(Jo.bind(null,r,a,e),[e]),r.flags|=2048,ds(9,{destroy:void 0},qo.bind(null,r,a,n,t),null),n},useId:function(){var e=Fo(),t=H.identifierPrefix;if(I){var n=ji,r=Ai;n=(r&~(1<<32-Ge(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=So++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=To++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ns,useFormState:os,useActionState:os,useOptimistic:function(e){var t=Fo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Bs.bind(null,L,!0,n),n.dispatch=t,[e,t]},useMemoCache:Bo,useCacheRefresh:function(){return Fo().memoizedState=Is.bind(null,L)},useEffectEvent:function(e){var t=Fo(),n={impl:e};return t.memoizedState=n,function(){if(V&2)throw Error(o(440));return n.impl.apply(void 0,arguments)}}},Ks={readContext:ia,use:zo,useCallback:ws,useContext:ia,useEffect:gs,useImperativeHandle:Ss,useInsertionEffect:ys,useLayoutEffect:bs,useMemo:Ts,useReducer:Ho,useRef:fs,useState:function(){return Ho(Vo)},useDebugValue:Cs,useDeferredValue:function(e,t){return Ds(Io(),_o.memoizedState,e,t)},useTransition:function(){var e=Ho(Vo)[0],t=Io().memoizedState;return[typeof e==`boolean`?e:Ro(e),t]},useSyncExternalStore:Go,useId:Ps,useHostTransitionStatus:Ns,useFormState:ss,useActionState:ss,useOptimistic:function(e,t){return Qo(Io(),_o,e,t)},useMemoCache:Bo,useCacheRefresh:Fs};Ks.useEffectEvent=vs;var qs={readContext:ia,use:zo,useCallback:ws,useContext:ia,useEffect:gs,useImperativeHandle:Ss,useInsertionEffect:ys,useLayoutEffect:bs,useMemo:Ts,useReducer:Wo,useRef:fs,useState:function(){return Wo(Vo)},useDebugValue:Cs,useDeferredValue:function(e,t){var n=Io();return _o===null?Es(n,e,t):Ds(n,_o.memoizedState,e,t)},useTransition:function(){var e=Wo(Vo)[0],t=Io().memoizedState;return[typeof e==`boolean`?e:Ro(e),t]},useSyncExternalStore:Go,useId:Ps,useHostTransitionStatus:Ns,useFormState:us,useActionState:us,useOptimistic:function(e,t){var n=Io();return _o===null?(n.baseState=e,[e,n.queue.dispatch]):Qo(n,_o,e,t)},useMemoCache:Bo,useCacheRefresh:Fs};qs.useEffectEvent=vs;function Js(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:h({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ys={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=_u(),i=Ka(r);i.payload=t,n!=null&&(i.callback=n),t=qa(e,i,r),t!==null&&(yu(t,e,r),Ja(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=_u(),i=Ka(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=qa(e,i,r),t!==null&&(yu(t,e,r),Ja(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=_u(),r=Ka(n);r.tag=2,t!=null&&(r.callback=t),t=qa(e,r,n),t!==null&&(yu(t,e,n),Ja(t,e,n))}};function Xs(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?!Dr(n,r)||!Dr(i,a):!0}function Zs(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&&Ys.enqueueReplaceState(t,t.state,null)}function Qs(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=h({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function $s(e){ei(e)}function ec(e){console.error(e)}function tc(e){ei(e)}function nc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function rc(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 ic(e,t,n){return n=Ka(n),n.tag=3,n.payload={element:null},n.callback=function(){nc(e,t)},n}function ac(e){return e=Ka(e),e.tag=3,e}function oc(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(){rc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){rc(t,n,r),typeof i!=`function`&&(su===null?su=new Set([this]):su.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function sc(e,t,n,r,i){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ta(t,n,i,!0),n=oo.current,n!==null){switch(n.tag){case 31:case 13:return so===null?ju():n.alternate===null&&Yl===0&&(Yl=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===Oa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Yu(e,r,i)),!1;case 22:return n.flags|=65536,r===Oa?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)),Yu(e,r,i)),!1}throw Error(o(435,n.tag))}return Yu(e,r,i),ju(),!1}if(I)return t=oo.current,t===null?(r!==Bi&&(t=Error(o(423),{cause:r}),qi(Si(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=Si(r,n),i=ic(e.stateNode,r,i),Ya(e,i),Yl!==4&&(Yl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==Bi&&(e=Error(o(422),{cause:r}),qi(Si(e,n)))),!1;var a=Error(o(520),{cause:r});if(a=Si(a,n),eu===null?eu=[a]:eu.push(a),Yl!==4&&(Yl=2),t===null)return!0;r=Si(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=ic(n.stateNode,r,e),Ya(n,e),!1;case 1:if(t=n.type,a=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||a!==null&&typeof a.componentDidCatch==`function`&&(su===null||!su.has(a))))return n.flags|=65536,i&=-i,n.lanes|=i,i=ac(i),oc(i,e,n,r),Ya(n,i),!1}n=n.return}while(n!==null);return!1}var cc=Error(o(461)),lc=!1;function uc(e,t,n,r){t.child=e===null?Ha(t,null,n,r):Va(t,e.child,n,r)}function dc(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 ra(t),r=Oo(e,t,n,o,a,i),s=Mo(),e!==null&&!lc?(No(e,t,i),Pc(e,t,i)):(I&&s&&Pi(t),t.flags|=1,uc(e,t,r,i),t.child)}function fc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!pi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,pc(e,t,a,r,i)):(e=gi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Fc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Dr:n,n(o,r)&&e.ref===t.ref)return Pc(e,t,i)}return t.flags|=1,e=mi(a,r),e.ref=t.ref,e.return=t,t.child=e}function pc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Dr(a,r)&&e.ref===t.ref)if(lc=!1,t.pendingProps=r=a,Fc(e,i))e.flags&131072&&(lc=!0);else return t.lanes=e.lanes,Pc(e,t,i)}return bc(e,t,n,r,i)}function mc(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 gc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ca(t,a===null?null:a.cachePool),a===null?io():ro(t,a),uo(t);else return r=t.lanes=536870912,gc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ca(t,null),io(),fo(t)):(Ca(t,a.cachePool),ro(t,a),fo(t),t.memoizedState=null);return uc(e,t,i,n),t.child}function hc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function gc(e,t,n,r,i){var a=Sa();return a=a===null?null:{parent:ua._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ca(t,null),io(),uo(t),e!==null&&ta(e,t,r,!0),t.childLanes=i,null}function R(e,t){return t=kc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function _c(e,t,n){return Va(t,e.child,null,n),e=R(t,t.pendingProps),e.flags|=2,po(t),t.memoizedState=null,e}function vc(e,t,n){var r=t.pendingProps,i=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(I){if(r.mode===`hidden`)return e=R(t,r),t.lanes=536870912,hc(null,e);if(lo(t),(e=F)?(e=lf(e,zi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ki===null?null:{id:Ai,overflow:ji},retryLane:536870912,hydrationErrors:null},n=yi(e),n.return=t,t.child=n,Li=t,F=null)):e=null,e===null)throw Vi(t);return t.lanes=536870912,null}return R(t,r)}var a=e.memoizedState;if(a!==null){var s=a.dehydrated;if(lo(t),i)if(t.flags&256)t.flags&=-257,t=_c(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(lc||ta(e,t,n,!1),i=(n&e.childLanes)!==0,lc||i){if(r=H,r!==null&&(s=st(r,n),s!==0&&s!==a.retryLane))throw a.retryLane=s,si(e,s),yu(r,e,s),cc;ju(),t=_c(e,t,n)}else e=a.treeContext,F=pf(s.nextSibling),Li=t,I=!0,Ri=null,zi=!1,e!==null&&Ii(t,e),t=R(t,r),t.flags|=4096;return t}return e=mi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function yc(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(o(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function bc(e,t,n,r,i){return ra(t),n=Oo(e,t,n,r,void 0,i),r=Mo(),e!==null&&!lc?(No(e,t,i),Pc(e,t,i)):(I&&r&&Pi(t),t.flags|=1,uc(e,t,n,i),t.child)}function xc(e,t,n,r,i,a){return ra(t),t.updateQueue=null,n=Ao(t,r,n,i),ko(e),r=Mo(),e!==null&&!lc?(No(e,t,a),Pc(e,t,a)):(I&&r&&Pi(t),t.flags|=1,uc(e,t,n,a),t.child)}function Sc(e,t,n,r,i){if(ra(t),t.stateNode===null){var a=ui,o=n.contextType;typeof o==`object`&&o&&(a=ia(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Ys,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Wa(t),o=n.contextType,a.context=typeof o==`object`&&o?ia(o):ui,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Js(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&&Ys.enqueueReplaceState(a,a.state,null),Qa(t,r,a,i),Za(),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=Qs(n,s);a.props=c;var l=a.context,u=n.contextType;o=ui,typeof u==`object`&&u&&(o=ia(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)&&Zs(t,a,r,o),Ua=!1;var f=t.memoizedState;a.state=f,Qa(t,r,a,i),Za(),l=t.memoizedState,s||f!==l||Ua?(typeof d==`function`&&(Js(t,n,d,r),l=t.memoizedState),(c=Ua||Xs(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,Ga(e,t),o=t.memoizedProps,u=Qs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ui,typeof l==`object`&&l&&(c=ia(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)&&Zs(t,a,r,c),Ua=!1,f=t.memoizedState,a.state=f,Qa(t,r,a,i),Za();var p=t.memoizedState;o!==d||f!==p||Ua||e!==null&&e.dependencies!==null&&na(e.dependencies)?(typeof s==`function`&&(Js(t,n,s,r),p=t.memoizedState),(u=Ua||Xs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&na(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,yc(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=Va(t,e.child,null,i),t.child=Va(t,null,n,i)):uc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Pc(e,t,i),e}function Cc(e,t,n,r){return Gi(),t.flags|=256,uc(e,t,n,r),t.child}var wc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Tc(e){return{baseLanes:e,cachePool:wa()}}function Ec(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Ql),e}function Dc(e,t,n){var r=t.pendingProps,i=!1,a=(t.flags&128)!=0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(mo.current&2)!=0),s&&(i=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(I){if(i?co(t):fo(t),(e=F)?(e=lf(e,zi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ki===null?null:{id:Ai,overflow:ji},retryLane:536870912,hydrationErrors:null},n=yi(e),n.return=t,t.child=n,Li=t,F=null)):e=null,e===null)throw Vi(t);return df(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,i?(fo(t),i=t.mode,c=kc({mode:`hidden`,children:c},i),r=_i(r,i,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=Tc(n),r.childLanes=Ec(e,s,n),t.memoizedState=wc,hc(null,r)):(co(t),Oc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(a)t.flags&256?(co(t),t.flags&=-257,t=Ac(e,t,n)):t.memoizedState===null?(fo(t),c=r.fallback,i=t.mode,r=kc({mode:`visible`,children:r.children},i),c=_i(c,i,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Va(t,e.child,null,n),r=t.child,r.memoizedState=Tc(n),r.childLanes=Ec(e,s,n),t.memoizedState=wc,t=hc(null,r)):(fo(t),t.child=e.child,t.flags|=128,t=null);else if(co(t),df(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(o(419)),r.stack=``,r.digest=s,qi({value:r,source:null,stack:null}),t=Ac(e,t,n)}else if(lc||ta(e,t,n,!1),s=(n&e.childLanes)!==0,lc||s){if(s=H,s!==null&&(r=st(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,si(e,r),yu(s,e,r),cc;uf(c)||ju(),t=Ac(e,t,n)}else uf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,F=pf(c.nextSibling),Li=t,I=!0,Ri=null,zi=!1,e!==null&&Ii(t,e),t=Oc(t,r.children),t.flags|=4096);return t}return i?(fo(t),c=r.fallback,i=t.mode,l=e.child,u=l.sibling,r=mi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=_i(c,i,n,null),c.flags|=2):c=mi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,hc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=Tc(n):(i=c.cachePool,i===null?i=wa():(l=ua._currentValue,i=i.parent===l?i:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:i}),r.memoizedState=c,r.childLanes=Ec(e,s,n),t.memoizedState=wc,hc(e.child,r)):(co(t),n=e.child,e=n.sibling,n=mi(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 Oc(e,t){return t=kc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function kc(e,t){return e=fi(22,e,null,t),e.lanes=0,e}function Ac(e,t,n){return Va(t,e.child,null,n),e=Oc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function jc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),$i(e.return,t,n)}function Mc(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 Nc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=mo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,A(mo,o),uc(e,t,r,n),r=I?Ei:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&jc(e,n,t);else if(e.tag===19)jc(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&&ho(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Mc(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&&ho(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Mc(t,!0,n,null,a,r);break;case`together`:Mc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Pc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Xl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(ta(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,n=mi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=mi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Fc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&na(e))):!0}function Ic(e,t,n){switch(t.tag){case 3:_e(t,t.stateNode.containerInfo),Zi(t,ua,e.memoizedState.cache),Gi();break;case 27:case 5:ye(t);break;case 4:_e(t,t.stateNode.containerInfo);break;case 10:Zi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,lo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(co(t),e=Pc(e,t,n),e===null?null:e.sibling):Dc(e,t,n):(co(t),t.flags|=128,null);co(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(ta(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Nc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),A(mo,mo.current),r)break;return null;case 22:return t.lanes=0,mc(e,t,n,t.pendingProps);case 24:Zi(t,ua,e.memoizedState.cache)}return Pc(e,t,n)}function Lc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)lc=!0;else{if(!Fc(e,n)&&!(t.flags&128))return lc=!1,Ic(e,t,n);lc=!!(e.flags&131072)}else lc=!1,I&&t.flags&1048576&&Ni(t,Ei,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=ja(t.elementType),t.type=e,typeof e==`function`)pi(e)?(r=Qs(e,r),t.tag=1,t=Sc(null,t,e,r,n)):(t.tag=0,t=bc(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===w){t.tag=11,t=dc(null,t,e,r,n);break a}else if(i===te){t.tag=14,t=fc(null,t,e,r,n);break a}}throw t=se(e)||e,Error(o(306,t,``))}}return t;case 0:return bc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=Qs(r,t.pendingProps),Sc(e,t,r,i,n);case 3:a:{if(_e(t,t.stateNode.containerInfo),e===null)throw Error(o(387));r=t.pendingProps;var a=t.memoizedState;i=a.element,Ga(e,t),Qa(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Zi(t,ua,r),r!==a.cache&&ea(t,[ua],n,!0),Za(),r=s.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){t=Cc(e,t,r,n);break a}else if(r!==i){i=Si(Error(o(424)),t),qi(i),t=Cc(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(F=pf(e.firstChild),Li=t,I=!0,Ri=null,zi=!0,n=Ha(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Gi(),r===i){t=Pc(e,t,n);break a}uc(e,t,r,n)}t=t.child}return t;case 26:return yc(e,t),e===null?(n=Pf(t.type,null,t.pendingProps,null))?t.memoizedState=n:I||(n=t.type,e=t.pendingProps,r=Gd(he.current).createElement(n),r[ft]=t,r[pt]=e,zd(r,n,e),wt(r),t.stateNode=r):t.memoizedState=Pf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ye(t),e===null&&I&&(r=t.stateNode=_f(t.type,t.pendingProps,he.current),Li=t,zi=!0,i=F,nf(t.type)?(mf=i,F=pf(r.firstChild)):F=i),uc(e,t,t.pendingProps.children,n),yc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&I&&((i=r=F)&&(r=sf(r,t.type,t.pendingProps,zi),r===null?i=!1:(t.stateNode=r,Li=t,F=pf(r.firstChild),zi=!1,i=!0)),i||Vi(t)),ye(t),i=t.type,a=t.pendingProps,s=e===null?null:e.memoizedProps,r=a.children,Jd(i,a)?r=null:s!==null&&Jd(i,s)&&(t.flags|=32),t.memoizedState!==null&&(i=Oo(e,t,jo,null,null,n),rp._currentValue=i),yc(e,t),uc(e,t,r,n),t.child;case 6:return e===null&&I&&((e=n=F)&&(n=cf(n,t.pendingProps,zi),n===null?e=!1:(t.stateNode=n,Li=t,F=null,e=!0)),e||Vi(t)),null;case 13:return Dc(e,t,n);case 4:return _e(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Va(t,null,r,n):uc(e,t,r,n),t.child;case 11:return dc(e,t,t.type,t.pendingProps,n);case 7:return uc(e,t,t.pendingProps,n),t.child;case 8:return uc(e,t,t.pendingProps.children,n),t.child;case 12:return uc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Zi(t,t.type,r.value),uc(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,ra(t),i=ia(i),r=r(i),t.flags|=1,uc(e,t,r,n),t.child;case 14:return fc(e,t,t.type,t.pendingProps,n);case 15:return pc(e,t,t.type,t.pendingProps,n);case 19:return Nc(e,t,n);case 31:return vc(e,t,n);case 22:return mc(e,t,n,t.pendingProps);case 24:return ra(t),r=ia(ua),e===null?(i=Sa(),i===null&&(i=H,a=da(),i.pooledCache=a,a.refCount++,a!==null&&(i.pooledCacheLanes|=n),i=a),t.memoizedState={parent:r,cache:i},Wa(t),Zi(t,ua,i)):((e.lanes&n)!==0&&(Ga(e,t),Qa(t,null,null,n),Za()),i=e.memoizedState,a=t.memoizedState,i.parent===r?(r=a.cache,Zi(t,ua,r),r!==i.cache&&ea(t,[ua],n,!0)):(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Zi(t,ua,r))),uc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Rc(e){e.flags|=4}function zc(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(Ou())e.flags|=8192;else throw Ma=Oa,Ea}else e.flags&=-16777217}function Bc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Yf(t))if(Ou())e.flags|=8192;else throw Ma=Oa,Ea}function Vc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:tt(),e.lanes|=t,$l|=t)}function Hc(e,t){if(!I)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 z(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 Uc(e,t,n){var r=t.pendingProps;switch(Fi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return z(t),null;case 1:return z(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Qi(ua),ve(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Wi(t)?Rc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ki())),z(t),null;case 26:var i=t.type,a=t.memoizedState;return e===null?(Rc(t),a===null?(z(t),zc(t,i,null,r,n)):(z(t),Bc(t,a))):a?a===e.memoizedState?(z(t),t.flags&=-16777217):(Rc(t),z(t),Bc(t,a)):(e=e.memoizedProps,e!==r&&Rc(t),z(t),zc(t,i,e,r,n)),null;case 27:if(be(t),n=he.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Rc(t);else{if(!r){if(t.stateNode===null)throw Error(o(166));return z(t),null}e=pe.current,Wi(t)?Hi(t,e):(e=_f(i,r,n),t.stateNode=e,Rc(t))}return z(t),null;case 5:if(be(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Rc(t);else{if(!r){if(t.stateNode===null)throw Error(o(166));return z(t),null}if(a=pe.current,Wi(t))Hi(t,a);else{var s=Gd(he.current);switch(a){case 1:a=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case 2:a=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;default:switch(i){case`svg`:a=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case`math`:a=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;case`script`:a=s.createElement(`div`),a.innerHTML=`<script><\/script>`,a=a.removeChild(a.firstChild);break;case`select`:a=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?a.multiple=!0:r.size&&(a.size=r.size);break;default:a=typeof r.is==`string`?s.createElement(i,{is:r.is}):s.createElement(i)}}a[ft]=t,a[pt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)a.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=a;a:switch(zd(a,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Rc(t)}}return z(t),zc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Rc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(o(166));if(e=he.current,Wi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=Li,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[ft]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Id(e.nodeValue,n)),e||Vi(t,!0)}else e=Gd(e).createTextNode(r),e[ft]=t,t.stateNode=e}return z(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Wi(t),n!==null){if(e===null){if(!r)throw Error(o(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(o(557));e[ft]=t}else Gi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;z(t),e=!1}else n=Ki(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(po(t),t):(po(t),null);if(t.flags&128)throw Error(o(558))}return z(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Wi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(o(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(o(317));i[ft]=t}else Gi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;z(t),i=!1}else i=Ki(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(po(t),t):(po(t),null)}return po(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),a=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),a!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Vc(t,t.updateQueue),z(t),null);case 4:return ve(),e===null&&Ed(t.stateNode.containerInfo),z(t),null;case 10:return Qi(t.type),z(t),null;case 19:if(k(mo),r=t.memoizedState,r===null)return z(t),null;if(i=(t.flags&128)!=0,a=r.rendering,a===null)if(i)Hc(r,!1);else{if(Yl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=ho(e),a!==null){for(t.flags|=128,Hc(r,!1),e=a.updateQueue,t.updateQueue=e,Vc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)hi(n,e),n=n.sibling;return A(mo,mo.current&1|2),I&&Mi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ne()>au&&(t.flags|=128,i=!0,Hc(r,!1),t.lanes=4194304)}else{if(!i)if(e=ho(a),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Vc(t,e),Hc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!a.alternate&&!I)return z(t),null}else 2*Ne()-r.renderingStartTime>au&&n!==536870912&&(t.flags|=128,i=!0,Hc(r,!1),t.lanes=4194304);r.isBackwards?(a.sibling=t.child,t.child=a):(e=r.last,e===null?t.child=a:e.sibling=a,r.last=a)}return r.tail===null?(z(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ne(),e.sibling=null,n=mo.current,A(mo,i?n&1|2:n&1),I&&Mi(t,r.treeForkCount),e);case 22:case 23:return po(t),ao(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(z(t),t.subtreeFlags&6&&(t.flags|=8192)):z(t),n=t.updateQueue,n!==null&&Vc(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&&k(xa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Qi(ua),z(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function Wc(e,t){switch(Fi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qi(ua),ve(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return be(t),null;case 31:if(t.memoizedState!==null){if(po(t),t.alternate===null)throw Error(o(340));Gi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(po(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Gi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return k(mo),null;case 4:return ve(),null;case 10:return Qi(t.type),null;case 22:case 23:return po(t),ao(),e!==null&&k(xa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Qi(ua),null;case 25:return null;default:return null}}function Gc(e,t){switch(Fi(t),t.tag){case 3:Qi(ua),ve();break;case 26:case 27:case 5:be(t);break;case 4:ve();break;case 31:t.memoizedState!==null&&po(t);break;case 13:po(t);break;case 19:k(mo);break;case 10:Qi(t.type);break;case 22:case 23:po(t),ao(),e!==null&&k(xa);break;case 24:Qi(ua)}}function Kc(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){q(t,t.return,e)}}function qc(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){q(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){q(t,t.return,e)}}function Jc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{eo(t,n)}catch(t){q(e,e.return,t)}}}function Yc(e,t,n){n.props=Qs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){q(e,t,n)}}function Xc(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){q(e,t,n)}}function Zc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){q(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){q(e,t,n)}else n.current=null}function Qc(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){q(e,e.return,t)}}function $c(e,t,n){try{var r=e.stateNode;Bd(r,e.type,n,t),r[pt]=t}catch(t){q(e,e.return,t)}}function el(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&nf(e.type)||e.tag===4}function tl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||el(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&&nf(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 nl(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=rn));else if(r!==4&&(r===27&&nf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(nl(e,t,n),e=e.sibling;e!==null;)nl(e,t,n),e=e.sibling}function rl(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&&nf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(rl(e,t,n),e=e.sibling;e!==null;)rl(e,t,n),e=e.sibling}function il(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);zd(t,r,n),t[ft]=e,t[pt]=n}catch(t){q(e,e.return,t)}}var al=!1,ol=!1,sl=!1,cl=typeof WeakSet==`function`?WeakSet:Set,ll=null;function ul(e,t){if(e=e.containerInfo,Ud=fp,e=jr(e),Mr(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 i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.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||i!==0&&f.nodeType!==3||(c=s+i),f!==a||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===i&&(c=s),p===a&&++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(Wd={focusedElem:e,selectionRange:n},fp=!1,ll=t;ll!==null;)if(t=ll,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,ll=e;else for(;ll!==null;){switch(t=ll,a=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++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&a!==null){e=void 0,n=t,i=a.memoizedProps,a=a.memoizedState,r=n.stateNode;try{var h=Qs(n.type,i);e=r.getSnapshotBeforeUpdate(h,a),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){q(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)of(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:of(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(o(163))}if(e=t.sibling,e!==null){e.return=t.return,ll=e;break}ll=t.return}}function dl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:El(e,n),r&4&&Kc(5,n);break;case 1:if(El(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){q(n,n.return,e)}else{var i=Qs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){q(n,n.return,e)}}r&64&&Jc(n),r&512&&Xc(n,n.return);break;case 3:if(El(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{eo(e,t)}catch(e){q(n,n.return,e)}}break;case 27:t===null&&r&4&&il(n);case 26:case 5:El(e,n),t===null&&r&4&&Qc(n),r&512&&Xc(n,n.return);break;case 12:El(e,n);break;case 31:El(e,n),r&4&&_l(e,n);break;case 13:El(e,n),r&4&&vl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Qu.bind(null,n),ff(e,n))));break;case 22:if(r=n.memoizedState!==null||al,!r){t=t!==null&&t.memoizedState!==null||ol,i=al;var a=ol;al=r,(ol=t)&&!a?Ol(e,n,(n.subtreeFlags&8772)!=0):El(e,n),al=i,ol=a}break;case 30:break;default:El(e,n)}}function fl(e){var t=e.alternate;t!==null&&(e.alternate=null,fl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&yt(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 pl=null,ml=!1;function hl(e,t,n){for(n=n.child;n!==null;)gl(e,t,n),n=n.sibling}function gl(e,t,n){if(Ue&&typeof Ue.onCommitFiberUnmount==`function`)try{Ue.onCommitFiberUnmount(He,n)}catch{}switch(n.tag){case 26:ol||Zc(n,t),hl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ol||Zc(n,t);var r=pl,i=ml;nf(n.type)&&(pl=n.stateNode,ml=!1),hl(e,t,n),vf(n.stateNode),pl=r,ml=i;break;case 5:ol||Zc(n,t);case 6:if(r=pl,i=ml,pl=null,hl(e,t,n),pl=r,ml=i,pl!==null)if(ml)try{(pl.nodeType===9?pl.body:pl.nodeName===`HTML`?pl.ownerDocument.body:pl).removeChild(n.stateNode)}catch(e){q(n,t,e)}else try{pl.removeChild(n.stateNode)}catch(e){q(n,t,e)}break;case 18:pl!==null&&(ml?(e=pl,rf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Rp(e)):rf(pl,n.stateNode));break;case 4:r=pl,i=ml,pl=n.stateNode.containerInfo,ml=!0,hl(e,t,n),pl=r,ml=i;break;case 0:case 11:case 14:case 15:qc(2,n,t),ol||qc(4,n,t),hl(e,t,n);break;case 1:ol||(Zc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Yc(n,t,r)),hl(e,t,n);break;case 21:hl(e,t,n);break;case 22:ol=(r=ol)||n.memoizedState!==null,hl(e,t,n),ol=r;break;default:hl(e,t,n)}}function _l(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Rp(e)}catch(e){q(t,t.return,e)}}}function vl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Rp(e)}catch(e){q(t,t.return,e)}}function yl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new cl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new cl),t;default:throw Error(o(435,e.tag))}}function bl(e,t){var n=yl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=$u.bind(null,e,t);t.then(r,r)}})}function xl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r],a=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(nf(c.type)){pl=c.stateNode,ml=!1;break a}break;case 5:pl=c.stateNode,ml=!1;break a;case 3:case 4:pl=c.stateNode.containerInfo,ml=!0;break a}c=c.return}if(pl===null)throw Error(o(160));gl(a,s,i),pl=null,ml=!1,a=i.alternate,a!==null&&(a.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Cl(t,e),t=t.sibling}var Sl=null;function Cl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:xl(t,e),wl(e),r&4&&(qc(3,e,e.return),Kc(3,e),qc(5,e,e.return));break;case 1:xl(t,e),wl(e),r&512&&(ol||n===null||Zc(n,n.return)),r&64&&al&&(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 i=Sl;if(xl(t,e),wl(e),r&512&&(ol||n===null||Zc(n,n.return)),r&4){var a=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,i=i.ownerDocument||i;b:switch(r){case`title`:a=i.getElementsByTagName(`title`)[0],(!a||a[vt]||a[ft]||a.namespaceURI===`http://www.w3.org/2000/svg`||a.hasAttribute(`itemprop`))&&(a=i.createElement(r),i.head.insertBefore(a,i.querySelector(`head > title`))),zd(a,r,n),a[ft]=e,wt(a),r=a;break a;case`link`:var s=Kf(`link`,`href`,i).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(a=s[c],a.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&a.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&a.getAttribute(`title`)===(n.title==null?null:n.title)&&a.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}a=i.createElement(r),zd(a,r,n),i.head.appendChild(a);break;case`meta`:if(s=Kf(`meta`,`content`,i).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(a=s[c],a.getAttribute(`content`)===(n.content==null?null:``+n.content)&&a.getAttribute(`name`)===(n.name==null?null:n.name)&&a.getAttribute(`property`)===(n.property==null?null:n.property)&&a.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&a.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}a=i.createElement(r),zd(a,r,n),i.head.appendChild(a);break;default:throw Error(o(468,r))}a[ft]=e,wt(a),r=a}e.stateNode=r}else qf(i,e.type,e.stateNode);else e.stateNode=Vf(i,r,e.memoizedProps);else a===r?r===null&&e.stateNode!==null&&$c(e,e.memoizedProps,n.memoizedProps):(a===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):a.count--,r===null?qf(i,e.type,e.stateNode):Vf(i,r,e.memoizedProps))}break;case 27:xl(t,e),wl(e),r&512&&(ol||n===null||Zc(n,n.return)),n!==null&&r&4&&$c(e,e.memoizedProps,n.memoizedProps);break;case 5:if(xl(t,e),wl(e),r&512&&(ol||n===null||Zc(n,n.return)),e.flags&32){i=e.stateNode;try{Yt(i,``)}catch(t){q(e,e.return,t)}}r&4&&e.stateNode!=null&&(i=e.memoizedProps,$c(e,i,n===null?i:n.memoizedProps)),r&1024&&(sl=!0);break;case 6:if(xl(t,e),wl(e),r&4){if(e.stateNode===null)throw Error(o(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){q(e,e.return,t)}}break;case 3:if(Gf=null,i=Sl,Sl=xf(t.containerInfo),xl(t,e),Sl=i,wl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Rp(t.containerInfo)}catch(t){q(e,e.return,t)}sl&&(sl=!1,Tl(e));break;case 4:r=Sl,Sl=xf(e.stateNode.containerInfo),xl(t,e),wl(e),Sl=r;break;case 12:xl(t,e),wl(e);break;case 31:xl(t,e),wl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,bl(e,r)));break;case 13:xl(t,e),wl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(ru=Ne()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,bl(e,r)));break;case 22:i=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=al,d=ol;if(al=u||i,ol=d||l,xl(t,e),ol=d,al=u,wl(e),r&8192)a:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||l||al||ol||Dl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(a=l.stateNode,i)s=a.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){q(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=i?``:l.memoizedProps}catch(e){q(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;i?af(m,!0):af(l.stateNode,!1)}catch(e){q(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,bl(e,n))));break;case 19:xl(t,e),wl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,bl(e,r)));break;case 30:break;case 21:break;default:xl(t,e),wl(e)}}function wl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(el(r)){n=r;break}r=r.return}if(n==null)throw Error(o(160));switch(n.tag){case 27:var i=n.stateNode;rl(e,tl(e),i);break;case 5:var a=n.stateNode;n.flags&32&&(Yt(a,``),n.flags&=-33),rl(e,tl(e),a);break;case 3:case 4:var s=n.stateNode.containerInfo;nl(e,tl(e),s);break;default:throw Error(o(161))}}catch(t){q(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Tl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Tl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function El(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)dl(e,t.alternate,t),t=t.sibling}function Dl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:qc(4,t,t.return),Dl(t);break;case 1:Zc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Yc(t,t.return,n),Dl(t);break;case 27:vf(t.stateNode);case 26:case 5:Zc(t,t.return),Dl(t);break;case 22:t.memoizedState===null&&Dl(t);break;case 30:Dl(t);break;default:Dl(t)}e=e.sibling}}function Ol(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:Ol(i,a,n),Kc(4,a);break;case 1:if(Ol(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){q(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++)$a(c[i],s)}catch(e){q(r,r.return,e)}}n&&o&64&&Jc(a),Xc(a,a.return);break;case 27:il(a);case 26:case 5:Ol(i,a,n),n&&r===null&&o&4&&Qc(a),Xc(a,a.return);break;case 12:Ol(i,a,n);break;case 31:Ol(i,a,n),n&&o&4&&_l(i,a);break;case 13:Ol(i,a,n),n&&o&4&&vl(i,a);break;case 22:a.memoizedState===null&&Ol(i,a,n),Xc(a,a.return);break;case 30:break;default:Ol(i,a,n)}t=t.sibling}}function kl(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&&fa(n))}function Al(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&fa(e))}function jl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)B(e,t,n,r),t=t.sibling}function B(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:jl(e,t,n,r),i&2048&&Kc(9,t);break;case 1:jl(e,t,n,r);break;case 3:jl(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&&fa(e)));break;case 12:if(i&2048){jl(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){q(t,t.return,e)}}else jl(e,t,n,r);break;case 31:jl(e,t,n,r);break;case 13:jl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?jl(e,t,n,r):(a._visibility|=2,Ml(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?jl(e,t,n,r):Nl(e,t),i&2048&&kl(o,t);break;case 24:jl(e,t,n,r),i&2048&&Al(t.alternate,t);break;default:jl(e,t,n,r)}}function Ml(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:Ml(a,o,s,c,i),Kc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Ml(a,o,s,c,i)):u._visibility&2?Ml(a,o,s,c,i):Nl(a,o),i&&l&2048&&kl(o.alternate,o);break;case 24:Ml(a,o,s,c,i),i&&l&2048&&Al(o.alternate,o);break;default:Ml(a,o,s,c,i)}t=t.sibling}}function Nl(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:Nl(n,r),i&2048&&kl(r.alternate,r);break;case 24:Nl(n,r),i&2048&&Al(r.alternate,r);break;default:Nl(n,r)}t=t.sibling}}var Pl=8192;function Fl(e,t,n){if(e.subtreeFlags&Pl)for(e=e.child;e!==null;)Il(e,t,n),e=e.sibling}function Il(e,t,n){switch(e.tag){case 26:Fl(e,t,n),e.flags&Pl&&e.memoizedState!==null&&Xf(n,Sl,e.memoizedState,e.memoizedProps);break;case 5:Fl(e,t,n);break;case 3:case 4:var r=Sl;Sl=xf(e.stateNode.containerInfo),Fl(e,t,n),Sl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Pl,Pl=16777216,Fl(e,t,n),Pl=r):Fl(e,t,n));break;default:Fl(e,t,n)}}function Ll(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 Rl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ll=r,Vl(r,e)}Ll(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)zl(e),e=e.sibling}function zl(e){switch(e.tag){case 0:case 11:case 15:Rl(e),e.flags&2048&&qc(9,e,e.return);break;case 3:Rl(e);break;case 12:Rl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Bl(e)):Rl(e);break;default:Rl(e)}}function Bl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ll=r,Vl(r,e)}Ll(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:qc(8,t,t.return),Bl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Bl(t));break;default:Bl(t)}e=e.sibling}}function Vl(e,t){for(;ll!==null;){var n=ll;switch(n.tag){case 0:case 11:case 15:qc(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:fa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,ll=r;else a:for(n=e;ll!==null;){r=ll;var i=r.sibling,a=r.return;if(fl(r),r===n){ll=null;break a}if(i!==null){i.return=a,ll=i;break a}ll=a}}}var Hl={getCacheForType:function(e){var t=ia(ua),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ia(ua).controller.signal}},Ul=typeof WeakMap==`function`?WeakMap:Map,V=0,H=null,U=null,W=0,G=0,Wl=null,Gl=!1,Kl=!1,ql=!1,Jl=0,Yl=0,Xl=0,K=0,Zl=0,Ql=0,$l=0,eu=null,tu=null,nu=!1,ru=0,iu=0,au=1/0,ou=null,su=null,cu=0,lu=null,uu=null,du=0,fu=0,pu=null,mu=null,hu=0,gu=null;function _u(){return V&2&&W!==0?W&-W:D.T===null?lt():hd()}function vu(){if(Ql===0)if(!(W&536870912)||I){var e=Xe;Xe<<=1,!(Xe&3932160)&&(Xe=262144),Ql=e}else Ql=536870912;return e=oo.current,e!==null&&(e.flags|=32),Ql}function yu(e,t,n){(e===H&&(G===2||G===9)||e.cancelPendingCommit!==null)&&(Eu(e,0),Cu(e,W,Ql,!1)),rt(e,n),(!(V&2)||e!==H)&&(e===H&&(!(V&2)&&(K|=n),Yl===4&&Cu(e,W,Ql,!1)),sd(e))}function bu(e,t,n){if(V&6)throw Error(o(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||$e(e,t),i=r?Pu(e,t):Mu(e,t,!0),a=r;do{if(i===0){Kl&&!r&&Cu(e,t,0,!1);break}else{if(n=e.current.alternate,a&&!Su(n)){i=Mu(e,t,!1),a=!1;continue}if(i===2){if(a=t,e.errorRecoveryDisabledLanes&a)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;i=eu;var l=c.current.memoizedState.isDehydrated;if(l&&(Eu(c,s).flags|=256),s=Mu(c,s,!1),s!==2){if(ql&&!l){c.errorRecoveryDisabledLanes|=a,K|=a,i=4;break a}a=tu,tu=i,a!==null&&(tu===null?tu=a:tu.push.apply(tu,a))}i=s}if(a=!1,i!==2)continue}}if(i===1){Eu(e,0),Cu(e,t,0,!0);break}a:{switch(r=e,a=i,a){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Cu(r,t,Ql,!Gl);break a;case 2:tu=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(i=ru+300-Ne(),10<i)){if(Cu(r,t,Ql,!Gl),Qe(r,0,!0)!==0)break a;du=t,r.timeoutHandle=Zd(xu.bind(null,r,n,tu,ou,nu,t,Ql,K,$l,Gl,a,`Throttled`,-0,0),i);break a}xu(r,n,tu,ou,nu,t,Ql,K,$l,Gl,a,null,-0,0)}}break}while(1);sd(e)}function xu(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:rn},Il(t,a,d);var m=(a&62914560)===a?ru-Ne():(a&4194048)===a?iu-Ne():0;if(m=Qf(d,m),m!==null){du=a,e.cancelPendingCommit=m(Vu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Cu(e,a,o,!l);return}}Vu(e,t,a,n,r,i,o,s,c)}function Su(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(!Er(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 Cu(e,t,n,r){t&=~Zl,t&=~K,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ge(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&at(e,n,t)}function wu(){return V&6?!0:(cd(0,!1),!1)}function Tu(){if(U!==null){if(G===0)var e=U.return;else e=U,Xi=Yi=null,Po(e),Fa=null,Ia=0,e=U;for(;e!==null;)Gc(e.alternate,e),e=e.return;U=null}}function Eu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),du=0,Tu(),H=e,U=n=mi(e.current,null),W=t,G=0,Wl=null,Gl=!1,Kl=$e(e,t),ql=!1,$l=Ql=Zl=K=Xl=Yl=0,tu=eu=null,nu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ge(r),a=1<<i;t|=e[i],r&=~a}return Jl=t,ii(),n}function Du(e,t){L=null,D.H=Ws,t===Ta||t===Da?(t=Na(),G=3):t===Ea?(t=Na(),G=4):G=t===cc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Wl=t,U===null&&(Yl=1,nc(e,Si(t,e.current)))}function Ou(){var e=oo.current;return e===null?!0:(W&4194048)===W?so===null:(W&62914560)===W||W&536870912?e===so:!1}function ku(){var e=D.H;return D.H=Ws,e===null?Ws:e}function Au(){var e=D.A;return D.A=Hl,e}function ju(){Yl=4,Gl||(W&4194048)!==W&&oo.current!==null||(Kl=!0),!(Xl&134217727)&&!(K&134217727)||H===null||Cu(H,W,Ql,!1)}function Mu(e,t,n){var r=V;V|=2;var i=ku(),a=Au();(H!==e||W!==t)&&(ou=null,Eu(e,t)),t=!1;var o=Yl;a:do try{if(G!==0&&U!==null){var s=U,c=Wl;switch(G){case 8:Tu(),o=6;break a;case 3:case 2:case 9:case 6:oo.current===null&&(t=!0);var l=G;if(G=0,Wl=null,Ru(e,s,c,l),n&&Kl){o=0;break a}break;default:l=G,G=0,Wl=null,Ru(e,s,c,l)}}Nu(),o=Yl;break}catch(t){Du(e,t)}while(1);return t&&e.shellSuspendCounter++,Xi=Yi=null,V=r,D.H=i,D.A=a,U===null&&(H=null,W=0,ii()),o}function Nu(){for(;U!==null;)Iu(U)}function Pu(e,t){var n=V;V|=2;var r=ku(),i=Au();H!==e||W!==t?(ou=null,au=Ne()+500,Eu(e,t)):Kl=$e(e,t);a:do try{if(G!==0&&U!==null){t=U;var a=Wl;b:switch(G){case 1:G=0,Wl=null,Ru(e,t,a,1);break;case 2:case 9:if(ka(a)){G=0,Wl=null,Lu(t);break}t=function(){G!==2&&G!==9||H!==e||(G=7),sd(e)},a.then(t,t);break a;case 3:G=7;break a;case 4:G=5;break a;case 7:ka(a)?(G=0,Wl=null,Lu(t)):(G=0,Wl=null,Ru(e,t,a,7));break;case 5:var s=null;switch(U.tag){case 26:s=U.memoizedState;case 5:case 27:var c=U;if(s?Yf(s):c.stateNode.complete){G=0,Wl=null;var l=c.sibling;if(l!==null)U=l;else{var u=c.return;u===null?U=null:(U=u,zu(u))}break b}}G=0,Wl=null,Ru(e,t,a,5);break;case 6:G=0,Wl=null,Ru(e,t,a,6);break;case 8:Tu(),Yl=6;break a;default:throw Error(o(462))}}Fu();break}catch(t){Du(e,t)}while(1);return Xi=Yi=null,D.H=r,D.A=i,V=n,U===null?(H=null,W=0,ii(),Yl):0}function Fu(){for(;U!==null&&!je();)Iu(U)}function Iu(e){var t=Lc(e.alternate,e,Jl);e.memoizedProps=e.pendingProps,t===null?zu(e):U=t}function Lu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=xc(n,t,t.pendingProps,t.type,void 0,W);break;case 11:t=xc(n,t,t.pendingProps,t.type.render,t.ref,W);break;case 5:Po(t);default:Gc(n,t),t=U=hi(t,Jl),t=Lc(n,t,Jl)}e.memoizedProps=e.pendingProps,t===null?zu(e):U=t}function Ru(e,t,n,r){Xi=Yi=null,Po(t),Fa=null,Ia=0;var i=t.return;try{if(sc(e,i,t,n,W)){Yl=1,nc(e,Si(n,e.current)),U=null;return}}catch(t){if(i!==null)throw U=i,t;Yl=1,nc(e,Si(n,e.current)),U=null;return}t.flags&32768?(I||r===1?e=!0:Kl||W&536870912?e=!1:(Gl=e=!0,(r===2||r===9||r===3||r===6)&&(r=oo.current,r!==null&&r.tag===13&&(r.flags|=16384))),Bu(t,e)):zu(t)}function zu(e){var t=e;do{if(t.flags&32768){Bu(t,Gl);return}e=t.return;var n=Uc(t.alternate,t,Jl);if(n!==null){U=n;return}if(t=t.sibling,t!==null){U=t;return}U=t=e}while(t!==null);Yl===0&&(Yl=5)}function Bu(e,t){do{var n=Wc(e.alternate,e);if(n!==null){n.flags&=32767,U=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){U=e;return}U=e=n}while(e!==null);Yl=6,U=null}function Vu(e,t,n,r,i,a,s,c,l){e.cancelPendingCommit=null;do Ku();while(cu!==0);if(V&6)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(a=t.lanes|t.childLanes,a|=ri,it(e,n,a,s,c,l),e===H&&(U=H=null,W=0),uu=t,lu=e,du=n,fu=a,pu=i,mu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,ed(Le,function(){return qu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=D.T,D.T=null,i=O.p,O.p=2,s=V,V|=4;try{ul(e,t,n)}finally{V=s,O.p=i,D.T=r}}cu=1,Hu(),Uu(),Wu()}}function Hu(){if(cu===1){cu=0;var e=lu,t=uu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=D.T,D.T=null;var r=O.p;O.p=2;var i=V;V|=4;try{Cl(t,e);var a=Wd,o=jr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Ar(s.ownerDocument.documentElement,s)){if(c!==null&&Mr(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 _=kr(s,h),v=kr(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}}fp=!!Ud,Wd=Ud=null}finally{V=i,O.p=r,D.T=n}}e.current=t,cu=2}}function Uu(){if(cu===2){cu=0;var e=lu,t=uu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=D.T,D.T=null;var r=O.p;O.p=2;var i=V;V|=4;try{dl(e,t.alternate,t)}finally{V=i,O.p=r,D.T=n}}cu=3}}function Wu(){if(cu===4||cu===3){cu=0,Me();var e=lu,t=uu,n=du,r=mu;t.subtreeFlags&10256||t.flags&10256?cu=5:(cu=0,uu=lu=null,Gu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(su=null),M(n),t=t.stateNode,Ue&&typeof Ue.onCommitFiberRoot==`function`)try{Ue.onCommitFiberRoot(He,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=D.T,i=O.p,O.p=2,D.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{D.T=t,O.p=i}}du&3&&Ku(),sd(e),i=e.pendingLanes,n&261930&&i&42?e===gu?hu++:(hu=0,gu=e):hu=0,cd(0,!1)}}function Gu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,fa(t)))}function Ku(){return Hu(),Uu(),Wu(),qu()}function qu(){if(cu!==5)return!1;var e=lu,t=fu;fu=0;var n=M(du),r=D.T,i=O.p;try{O.p=32>n?32:n,D.T=null,n=pu,pu=null;var a=lu,s=du;if(cu=0,uu=lu=null,du=0,V&6)throw Error(o(331));var c=V;if(V|=4,zl(a.current),B(a,a.current,s,n),V=c,cd(0,!1),Ue&&typeof Ue.onPostCommitFiberRoot==`function`)try{Ue.onPostCommitFiberRoot(He,a)}catch{}return!0}finally{O.p=i,D.T=r,Gu(e,t)}}function Ju(e,t,n){t=Si(n,t),t=ic(e.stateNode,t,2),e=qa(e,t,2),e!==null&&(rt(e,2),sd(e))}function q(e,t,n){if(e.tag===3)Ju(e,e,n);else for(;t!==null;){if(t.tag===3){Ju(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(su===null||!su.has(r))){e=Si(n,e),n=ac(2),r=qa(t,n,2),r!==null&&(oc(n,r,t,e),rt(r,2),sd(r));break}}t=t.return}}function Yu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ul;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)||(ql=!0,i.add(n),e=Xu.bind(null,e,t,n),t.then(e,e))}function Xu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,H===e&&(W&n)===n&&(Yl===4||Yl===3&&(W&62914560)===W&&300>Ne()-ru?!(V&2)&&Eu(e,0):Zl|=n,$l===W&&($l=0)),sd(e)}function Zu(e,t){t===0&&(t=tt()),e=si(e,t),e!==null&&(rt(e,t),sd(e))}function Qu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Zu(e,n)}function $u(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(o(314))}r!==null&&r.delete(t),Zu(e,n)}function ed(e,t){return ke(e,t)}var td=null,nd=null,rd=!1,id=!1,ad=!1,od=0;function sd(e){e!==nd&&e.next===null&&(nd===null?td=nd=e:nd=nd.next=e),id=!0,rd||(rd=!0,md())}function cd(e,t){if(!ad&&id){ad=!0;do for(var n=!1,r=td;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-Ge(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,pd(r,a))}else a=W,a=Qe(r,r===H?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||$e(r,a)||(n=!0,pd(r,a));r=r.next}while(n);ad=!1}}function ld(){ud()}function ud(){id=rd=!1;var e=0;od!==0&&Xd()&&(e=od);for(var t=Ne(),n=null,r=td;r!==null;){var i=r.next,a=dd(r,t);a===0?(r.next=null,n===null?td=i:n.next=i,i===null&&(nd=n)):(n=r,(e!==0||a&3)&&(id=!0)),r=i}cu!==0&&cu!==5||cd(e,!1),od!==0&&(od=0)}function dd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ge(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=et(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=H,n=W,n=Qe(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(G===2||G===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ae(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||$e(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ae(r),M(n)){case 2:case 8:n=Ie;break;case 32:n=Le;break;case 268435456:n=ze;break;default:n=Le}return r=fd.bind(null,e),n=ke(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ae(r),e.callbackPriority=2,e.callbackNode=null,2}function fd(e,t){if(cu!==0&&cu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Ku()&&e.callbackNode!==n)return null;var r=W;return r=Qe(e,e===H?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(bu(e,r,t),dd(e,Ne()),e.callbackNode!=null&&e.callbackNode===n?fd.bind(null,e):null)}function pd(e,t){if(Ku())return null;bu(e,t,!0)}function md(){ef(function(){V&6?ke(Fe,ld):ud()})}function hd(){if(od===0){var e=ha;e===0&&(e=Ye,Ye<<=1,!(Ye&261888)&&(Ye=256)),od=e}return od}function gd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:nn(``+e)}function _d(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 vd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=gd((i[pt]||null).action),o=r.submitter;o&&(t=(t=o[pt]||null)?gd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Tn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(od!==0){var e=o?_d(i,o):new FormData(i);As(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?_d(i,o):new FormData(i),As(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var yd=0;yd<Qr.length;yd++){var bd=Qr[yd];$r(bd.toLowerCase(),`on`+(bd[0].toUpperCase()+bd.slice(1)))}$r(Wr,`onAnimationEnd`),$r(Gr,`onAnimationIteration`),$r(Kr,`onAnimationStart`),$r(`dblclick`,`onDoubleClick`),$r(`focusin`,`onFocus`),$r(`focusout`,`onBlur`),$r(qr,`onTransitionRun`),$r(Jr,`onTransitionStart`),$r(Yr,`onTransitionCancel`),$r(Xr,`onTransitionEnd`),Ot(`onMouseEnter`,[`mouseout`,`mouseover`]),Ot(`onMouseLeave`,[`mouseout`,`mouseover`]),Ot(`onPointerEnter`,[`pointerout`,`pointerover`]),Ot(`onPointerLeave`,[`pointerout`,`pointerover`]),Dt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Dt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Dt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Dt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Dt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Dt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var xd=`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(` `),Sd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(xd));function Cd(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){ei(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){ei(e)}i.currentTarget=null,a=c}}}}function J(e,t){var n=t[ht];n===void 0&&(n=t[ht]=new Set);var r=e+`__bubble`;n.has(r)||(Dd(t,e,2,!1),n.add(r))}function wd(e,t,n){var r=0;t&&(r|=4),Dd(n,e,r,t)}var Td=`_reactListening`+Math.random().toString(36).slice(2);function Ed(e){if(!e[Td]){e[Td]=!0,Tt.forEach(function(t){t!==`selectionchange`&&(Sd.has(t)||wd(t,!1,e),wd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Td]||(t[Td]=!0,wd(`selectionchange`,!1,t))}}function Dd(e,t,n,r){switch(yp(t)){case 2:var i=pp;break;case 8:i=mp;break;default:i=hp}n=i.bind(null,t,n,e),i=void 0,!mn||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 Od(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;s!==null;){if(o=bt(s),o===null)return;if(c=o.tag,c===5||c===6||c===26||c===27){r=a=o;continue a}s=s.parentNode}}r=r.return}dn(function(){var r=a,i=on(n),o=[];a:{var s=Zr.get(e);if(s!==void 0){var c=Tn,u=e;switch(e){case`keypress`:if(bn(n)===0)break a;case`keydown`:case`keyup`:c=Un;break;case`focusin`:u=`focus`,c=Pn;break;case`focusout`:u=`blur`,c=Pn;break;case`beforeblur`:case`afterblur`:c=Pn;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`:c=Mn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:c=Nn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:c=Gn;break;case Wr:case Gr:case Kr:c=Fn;break;case Xr:c=Kn;break;case`scroll`:case`scrollend`:c=Dn;break;case`wheel`:c=qn;break;case`copy`:case`cut`:case`paste`:c=In;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:c=Wn;break;case`toggle`:case`beforetoggle`:c=Jn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?s===null?null:s+`Capture`:s;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=fn(m,p),g!=null&&d.push(kd(m,g,h))),f)break;m=m.return}0<d.length&&(s=new c(s,u,null,n,i),o.push({event:s,listeners:d}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,s&&n!==an&&(u=n.relatedTarget||n.fromElement)&&(bt(u)||u[mt]))break a;if((c||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,c?(u=n.relatedTarget||n.toElement,c=r,u=u?bt(u):null,u!==null&&(f=l(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(c=null,u=r),c!==u)){if(d=Mn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Wn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?s:St(c),h=u==null?s:St(u),s=new d(g,m+`leave`,c,n,i),s.target=f,s.relatedTarget=h,g=null,bt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,c&&u)b:{for(d=jd,p=c,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;c!==null&&Md(o,s,c,d,!1),u!==null&&f!==null&&Md(o,f,u,d,!0)}}a:{if(s=r?St(r):window,c=s.nodeName&&s.nodeName.toLowerCase(),c===`select`||c===`input`&&s.type===`file`)var v=mr;else if(cr(s))if(hr)v=wr;else{v=Sr;var y=xr}else c=s.nodeName,!c||c.toLowerCase()!==`input`||s.type!==`checkbox`&&s.type!==`radio`?r&&$t(r.elementType)&&(v=mr):v=Cr;if(v&&=v(e,r)){lr(o,v,n,i);break a}y&&y(e,s,r),e===`focusout`&&r&&s.type===`number`&&r.memoizedProps.value!=null&&Gt(s,`number`,s.value)}switch(y=r?St(r):window,e){case`focusin`:(cr(y)||y.contentEditable===`true`)&&(Pr=y,Fr=r,Ir=null);break;case`focusout`:Ir=Fr=Pr=null;break;case`mousedown`:Lr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Lr=!1,Rr(o,n,i);break;case`selectionchange`:if(Nr)break;case`keydown`:case`keyup`:Rr(o,n,i)}var b;if(Xn)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 ir?nr(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&($n&&n.locale!==`ko`&&(ir||x!==`onCompositionStart`?x===`onCompositionEnd`&&ir&&(b=yn()):(gn=i,_n=`value`in gn?gn.value:gn.textContent,ir=!0)),y=Ad(r,x),0<y.length&&(x=new Ln(x,e,null,n,i),o.push({event:x,listeners:y}),b?x.data=b:(b=rr(n),b!==null&&(x.data=b)))),(b=Qn?ar(e,n):or(e,n))&&(x=Ad(r,`onBeforeInput`),0<x.length&&(y=new Ln(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:y,listeners:x}),y.data=b)),vd(o,e,r,n,i)}Cd(o,t)})}function kd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ad(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=fn(e,n),i!=null&&r.unshift(kd(e,i,a)),i=fn(e,t),i!=null&&r.push(kd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function jd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Md(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=fn(n,a),l!=null&&o.unshift(kd(n,l,c))):i||(l=fn(n,a),l!=null&&o.push(kd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Nd=/\r\n?/g,Pd=/\u0000|\uFFFD/g;function Fd(e){return(typeof e==`string`?e:``+e).replace(Nd,`
9
+ `).replace(Pd,``)}function Id(e,t){return t=Fd(t),Fd(e)===t}function Ld(e,t,n,r,i,a){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Yt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Yt(e,``+r);break;case`className`:Pt(e,`class`,r);break;case`tabIndex`:Pt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Pt(e,n,r);break;case`style`:Qt(e,r,a);break;case`data`:if(t!==`object`){Pt(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=nn(``+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 a==`function`&&(n===`formAction`?(t!==`input`&&Ld(e,t,`name`,i.name,i,null),Ld(e,t,`formEncType`,i.formEncType,i,null),Ld(e,t,`formMethod`,i.formMethod,i,null),Ld(e,t,`formTarget`,i.formTarget,i,null)):(Ld(e,t,`encType`,i.encType,i,null),Ld(e,t,`method`,i.method,i,null),Ld(e,t,`target`,i.target,i,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=nn(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=rn);break;case`onScroll`:r!=null&&J(`scroll`,e);break;case`onScrollEnd`:r!=null&&J(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(o(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(o(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=nn(``+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`:J(`beforetoggle`,e),J(`toggle`,e),Nt(e,`popover`,r);break;case`xlinkActuate`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ft(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ft(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ft(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Nt(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=en.get(n)||n,Nt(e,n,r))}}function Rd(e,t,n,r,i,a){switch(n){case`style`:Qt(e,r,a);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(o(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(o(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Yt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Yt(e,``+r);break;case`onScroll`:r!=null&&J(`scroll`,e);break;case`onScrollEnd`:r!=null&&J(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=rn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Et.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),t=n.slice(2,i?n.length-7:void 0),a=e[pt]||null,a=a==null?null:a[n],typeof a==`function`&&e.removeEventListener(t,a,i),typeof r==`function`)){typeof a!=`function`&&a!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Nt(e,n,r)}}}function zd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:J(`error`,e),J(`load`,e);var r=!1,i=!1,a;for(a in n)if(n.hasOwnProperty(a)){var s=n[a];if(s!=null)switch(a){case`src`:r=!0;break;case`srcSet`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(o(137,t));default:Ld(e,t,a,s,n,null)}}i&&Ld(e,t,`srcSet`,n.srcSet,n,null),r&&Ld(e,t,`src`,n.src,n,null);return;case`input`:J(`invalid`,e);var c=a=s=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:i=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:a=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(o(137,t));break;default:Ld(e,t,r,d,n,null)}}Wt(e,a,c,l,u,s,i,!1);return;case`select`:for(i in J(`invalid`,e),r=s=a=null,n)if(n.hasOwnProperty(i)&&(c=n[i],c!=null))switch(i){case`value`:a=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Ld(e,t,i,c,n,null)}t=a,n=s,e.multiple=!!r,t==null?n!=null&&Kt(e,!!r,n,!0):Kt(e,!!r,t,!1);return;case`textarea`:for(s in J(`invalid`,e),a=i=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:i=c;break;case`children`:a=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(o(91));break;default:Ld(e,t,s,c,n,null)}Jt(e,r,i,a);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:Ld(e,t,l,r,n,null)}return;case`dialog`:J(`beforetoggle`,e),J(`toggle`,e),J(`cancel`,e),J(`close`,e);break;case`iframe`:case`object`:J(`load`,e);break;case`video`:case`audio`:for(r=0;r<xd.length;r++)J(xd[r],e);break;case`image`:J(`error`,e),J(`load`,e);break;case`details`:J(`toggle`,e);break;case`embed`:case`source`:case`link`:J(`error`,e),J(`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(o(137,t));default:Ld(e,t,u,r,n,null)}return;default:if($t(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Rd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Ld(e,t,c,r,n,null))}function Bd(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 i=null,a=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)||Ld(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`:a=m;break;case`name`:i=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(o(137,t));break;default:m!==f&&Ld(e,t,p,m,r,f)}}Ut(e,s,c,l,u,d,a,i);return;case`select`:for(a in m=s=c=p=null,n)if(l=n[a],n.hasOwnProperty(a)&&l!=null)switch(a){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(a)||Ld(e,t,a,null,r,l)}for(i in r)if(a=r[i],l=n[i],r.hasOwnProperty(i)&&(a!=null||l!=null))switch(i){case`value`:p=a;break;case`defaultValue`:c=a;break;case`multiple`:s=a;default:a!==l&&Ld(e,t,i,a,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Kt(e,!!n,n?[]:``,!1):Kt(e,!!n,t,!0)):Kt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(i=n[c],n.hasOwnProperty(c)&&i!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Ld(e,t,c,null,r,i)}for(s in r)if(i=r[s],a=n[s],r.hasOwnProperty(s)&&(i!=null||a!=null))switch(s){case`value`:p=i;break;case`defaultValue`:m=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error(o(91));break;default:i!==a&&Ld(e,t,s,i,r,a)}qt(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:Ld(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:Ld(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)&&Ld(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(o(137,t));break;default:Ld(e,t,u,p,r,m)}return;default:if($t(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Rd(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||Rd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Ld(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||Ld(e,t,f,p,r,m)}function Vd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Hd(){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&&Vd(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&&Vd(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 Ud=null,Wd=null;function Gd(e){return e.nodeType===9?e:e.ownerDocument}function Kd(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 Jd(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 Yd=null;function Xd(){var e=window.event;return e&&e.type===`popstate`?e===Yd?!1:(Yd=e,!0):(Yd=null,!1)}var Zd=typeof setTimeout==`function`?setTimeout:void 0,Qd=typeof clearTimeout==`function`?clearTimeout:void 0,$d=typeof Promise==`function`?Promise:void 0,ef=typeof queueMicrotask==`function`?queueMicrotask:$d===void 0?Zd:function(e){return $d.resolve(null).then(e).catch(tf)};function tf(e){setTimeout(function(){throw e})}function nf(e){return e===`head`}function rf(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),Rp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)vf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,vf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[vt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&vf(e.ownerDocument.body);n=i}while(n);Rp(t)}function af(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 of(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`:of(n),yt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function sf(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[vt])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=pf(e.nextSibling),e===null)break}return null}function cf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=pf(e.nextSibling),e===null))return null;return e}function lf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=pf(e.nextSibling),e===null))return null;return e}function uf(e){return e.data===`$?`||e.data===`$~`}function df(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function ff(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 pf(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 mf=null;function hf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return pf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function gf(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 _f(e,t,n){switch(t=Gd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(o(452));return e;case`head`:if(e=t.head,!e)throw Error(o(453));return e;case`body`:if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function vf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);yt(e)}var yf=new Map,bf=new Set;function xf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Sf=O.d;O.d={f:Cf,r:wf,D:Df,C:Of,L:kf,m:Af,X:Mf,S:jf,M:Nf};function Cf(){var e=Sf.f(),t=wu();return e||t}function wf(e){var t=xt(e);t!==null&&t.tag===5&&t.type===`form`?Ms(t):Sf.r(e)}var Tf=typeof document>`u`?null:document;function Ef(e,t,n){var r=Tf;if(r&&typeof t==`string`&&t){var i=Ht(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),bf.has(i)||(bf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),zd(t,`link`,e),wt(t),r.head.appendChild(t)))}}function Df(e){Sf.D(e),Ef(`dns-prefetch`,e,null)}function Of(e,t){Sf.C(e,t),Ef(`preconnect`,e,t)}function kf(e,t,n){Sf.L(e,t,n);var r=Tf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Ht(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Ht(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Ht(n.imageSizes)+`"]`)):i+=`[href="`+Ht(e)+`"]`;var a=i;switch(t){case`style`:a=Ff(e);break;case`script`:a=zf(e)}yf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),yf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(If(a))||t===`script`&&r.querySelector(Bf(a))||(t=r.createElement(`link`),zd(t,`link`,e),wt(t),r.head.appendChild(t)))}}function Af(e,t){Sf.m(e,t);var n=Tf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Ht(r)+`"][href="`+Ht(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=zf(e)}if(!yf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),yf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Bf(a)))return}r=n.createElement(`link`),zd(r,`link`,e),wt(r),n.head.appendChild(r)}}}function jf(e,t,n){Sf.S(e,t,n);var r=Tf;if(r&&e){var i=Ct(r).hoistableStyles,a=Ff(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(If(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=yf.get(a))&&Uf(e,n);var c=o=r.createElement(`link`);wt(c),zd(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,Hf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Mf(e,t){Sf.X(e,t);var n=Tf;if(n&&e){var r=Ct(n).hoistableScripts,i=zf(e),a=r.get(i);a||(a=n.querySelector(Bf(i)),a||(e=h({src:e,async:!0},t),(t=yf.get(i))&&Wf(e,t),a=n.createElement(`script`),wt(a),zd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nf(e,t){Sf.M(e,t);var n=Tf;if(n&&e){var r=Ct(n).hoistableScripts,i=zf(e),a=r.get(i);a||(a=n.querySelector(Bf(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=yf.get(i))&&Wf(e,t),a=n.createElement(`script`),wt(a),zd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Pf(e,t,n,r){var i=(i=he.current)?xf(i):null;if(!i)throw Error(o(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Ff(n.href),n=Ct(i).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=Ff(n.href);var a=Ct(i).hoistableStyles,s=a.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},a.set(e,s),(a=i.querySelector(If(e)))&&!a._p&&(s.instance=a,s.state.loading=5),yf.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},yf.set(e,n),a||Rf(i,e,n,s.state))),t&&r===null)throw Error(o(528,``));return s}if(t&&r!==null)throw Error(o(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=zf(n),n=Ct(i).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(o(444,e))}}function Ff(e){return`href="`+Ht(e)+`"`}function If(e){return`link[rel="stylesheet"][`+e+`]`}function Lf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Rf(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}),zd(t,`link`,n),wt(t),e.head.appendChild(t))}function zf(e){return`[src="`+Ht(e)+`"]`}function Bf(e){return`script[async]`+e}function Vf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Ht(n.href)+`"]`);if(r)return t.instance=r,wt(r),r;var i=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),wt(r),zd(r,`style`,i),Hf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Ff(n.href);var a=e.querySelector(If(i));if(a)return t.state.loading|=4,t.instance=a,wt(a),a;r=Lf(n),(i=yf.get(i))&&Uf(r,i),a=(e.ownerDocument||e).createElement(`link`),wt(a);var s=a;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),zd(a,`link`,r),t.state.loading|=4,Hf(a,n.precedence,e),t.instance=a;case`script`:return a=zf(n.src),(i=e.querySelector(Bf(a)))?(t.instance=i,wt(i),i):(r=n,(i=yf.get(a))&&(r=h({},n),Wf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),wt(i),zd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(o(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Hf(r,n.precedence,e));return t.instance}function Hf(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 Uf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Wf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Gf=null;function Kf(e,t,n){if(Gf===null){var r=new Map,i=Gf=new Map;i.set(n,r)}else i=Gf,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[vt]||a[ft]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function qf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Jf(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 Yf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Xf(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=Ff(r.href),a=t.querySelector(If(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=$f.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,wt(a);return}a=t.ownerDocument||t,r=Lf(r),(i=yf.get(i))&&Uf(r,i),a=a.createElement(`link`),wt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),zd(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=$f.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Zf=0;function Qf(e,t){return e.stylesheets&&e.count===0&&tp(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&tp(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Zf===0&&(Zf=62500*Hd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&tp(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Zf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function $f(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)tp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ep=null;function tp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ep=new Map,t.forEach(np,e),ep=null,$f.call(e))}function np(e,t){if(!(t.state.loading&4)){var n=ep.get(e);if(n)var r=n.get(null);else{n=new Map,ep.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=$f.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 rp={$$typeof:C,Provider:null,Consumer:null,_currentValue:le,_currentValue2:le,_threadCount:0};function ip(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=nt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nt(0),this.hiddenUpdates=nt(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 ap(e,t,n,r,i,a,o,s,c,l,u,d){return e=new ip(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=fi(3,null,null,t),e.current=a,a.stateNode=e,t=da(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Wa(a),e}function op(e){return e?(e=ui,e):ui}function sp(e,t,n,r,i,a){i=op(i),r.context===null?r.context=i:r.pendingContext=i,r=Ka(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=qa(e,r,t),n!==null&&(yu(n,e,t),Ja(n,e,t))}function cp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function lp(e,t){cp(e,t),(e=e.alternate)&&cp(e,t)}function up(e){if(e.tag===13||e.tag===31){var t=si(e,67108864);t!==null&&yu(t,e,67108864),lp(e,67108864)}}function dp(e){if(e.tag===13||e.tag===31){var t=_u();t=ct(t);var n=si(e,t);n!==null&&yu(n,e,t),lp(e,t)}}var fp=!0;function pp(e,t,n,r){var i=D.T;D.T=null;var a=O.p;try{O.p=2,hp(e,t,n,r)}finally{O.p=a,D.T=i}}function mp(e,t,n,r){var i=D.T;D.T=null;var a=O.p;try{O.p=8,hp(e,t,n,r)}finally{O.p=a,D.T=i}}function hp(e,t,n,r){if(fp){var i=gp(r);if(i===null)Od(e,t,r,_p,n),Op(e,r);else if(Ap(i,e,t,n,r))r.stopPropagation();else if(Op(e,r),t&4&&-1<Dp.indexOf(e)){for(;i!==null;){var a=xt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=j(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ge(o);s.entanglements[1]|=c,o&=~c}sd(a),!(V&6)&&(au=Ne()+500,cd(0,!1))}}break;case 31:case 13:s=si(a,2),s!==null&&yu(s,a,2),wu(),lp(a,2)}if(a=gp(r),a===null&&Od(e,t,r,_p,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Od(e,t,r,null,n)}}function gp(e){return e=on(e),vp(e)}var _p=null;function vp(e){if(_p=null,e=bt(e),e!==null){var t=l(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=u(t),e!==null)return e;e=null}else if(n===31){if(e=d(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 _p=e,null}function yp(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(Pe()){case Fe:return 2;case Ie:return 8;case Le:case Re:return 32;case ze:return 268435456;default:return 32}default:return 32}}var bp=!1,xp=null,Sp=null,Cp=null,wp=new Map,Tp=new Map,Ep=[],Dp=`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 Op(e,t){switch(e){case`focusin`:case`focusout`:xp=null;break;case`dragenter`:case`dragleave`:Sp=null;break;case`mouseover`:case`mouseout`:Cp=null;break;case`pointerover`:case`pointerout`:wp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Tp.delete(t.pointerId)}}function kp(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=xt(t),t!==null&&up(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ap(e,t,n,r,i){switch(t){case`focusin`:return xp=kp(xp,e,t,n,r,i),!0;case`dragenter`:return Sp=kp(Sp,e,t,n,r,i),!0;case`mouseover`:return Cp=kp(Cp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return wp.set(a,kp(wp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Tp.set(a,kp(Tp.get(a)||null,e,t,n,r,i)),!0}return!1}function jp(e){var t=bt(e.target);if(t!==null){var n=l(t);if(n!==null){if(t=n.tag,t===13){if(t=u(n),t!==null){e.blockedOn=t,ut(e.priority,function(){dp(n)});return}}else if(t===31){if(t=d(n),t!==null){e.blockedOn=t,ut(e.priority,function(){dp(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 Mp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=gp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);an=r,n.target.dispatchEvent(r),an=null}else return t=xt(n),t!==null&&up(t),e.blockedOn=n,!1;t.shift()}return!0}function Np(e,t,n){Mp(e)&&n.delete(t)}function Pp(){bp=!1,xp!==null&&Mp(xp)&&(xp=null),Sp!==null&&Mp(Sp)&&(Sp=null),Cp!==null&&Mp(Cp)&&(Cp=null),wp.forEach(Np),Tp.forEach(Np)}function Fp(e,n){e.blockedOn===n&&(e.blockedOn=null,bp||(bp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Pp)))}var Ip=null;function Lp(e){Ip!==e&&(Ip=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Ip===e&&(Ip=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(vp(r||n)===null)continue;break}var a=xt(n);a!==null&&(e.splice(t,3),t-=3,As(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Rp(e){function t(t){return Fp(t,e)}xp!==null&&Fp(xp,e),Sp!==null&&Fp(Sp,e),Cp!==null&&Fp(Cp,e),wp.forEach(t),Tp.forEach(t);for(var n=0;n<Ep.length;n++){var r=Ep[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ep.length&&(n=Ep[0],n.blockedOn===null);)jp(n),n.blockedOn===null&&Ep.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[pt]||null;if(typeof a==`function`)o||Lp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[pt]||null)s=o.formAction;else if(vp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Lp(n)}}}function zp(){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 Bp(e){this._internalRoot=e}Vp.prototype.render=Bp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var n=t.current;sp(n,_u(),e,t,null,null)},Vp.prototype.unmount=Bp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;sp(e.current,2,null,e,null,null),wu(),t[mt]=null}};function Vp(e){this._internalRoot=e}Vp.prototype.unstable_scheduleHydration=function(e){if(e){var t=lt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ep.length&&t!==0&&t<Ep[n].priority;n++);Ep.splice(n,0,e),n===0&&jp(e)}};var Hp=n.version;if(Hp!==`19.2.8`)throw Error(o(527,Hp,`19.2.8`));O.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(o(188)):(e=Object.keys(e).join(`,`),Error(o(268,e)));return e=p(t),e=e===null?null:m(e),e=e===null?null:e.stateNode,e};var Up={bundleType:0,version:`19.2.8`,rendererPackageName:`react-dom`,currentDispatcherRef:D,reconcilerVersion:`19.2.8`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Wp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Wp.isDisabled&&Wp.supportsFiber)try{He=Wp.inject(Up),Ue=Wp}catch{}}e.createRoot=function(e,t){if(!c(e))throw Error(o(299));var n=!1,r=``,i=$s,a=ec,s=tc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(a=t.onCaughtError),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=ap(e,1,!1,null,null,n,r,null,i,a,s,zp),e[mt]=t.current,Ed(e),new Bp(t)}})),l=t(((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=c()})),u=e(r(),1),d=globalThis.browser?.runtime?.id?globalThis.browser:globalThis.chrome,f=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),p=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),m=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),h=e=>{let t=m(e);return t.charAt(0).toUpperCase()+t.slice(1)},g={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`},_=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},v=(0,u.createContext)({}),y=()=>(0,u.useContext)(v),b=(0,u.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:d=2,absoluteStrokeWidth:p=!1,color:m=`currentColor`,className:h=``}=y()??{},v=r??p?Number(n??d)*24/Number(t??l):n??d;return(0,u.createElement)(`svg`,{ref:c,...g,width:t??l??g.width,height:t??l??g.height,stroke:e??m,strokeWidth:v,className:f(`lucide`,h,i),...!a&&!_(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,u.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),x=(e,t)=>{let n=(0,u.forwardRef)(({className:n,...r},i)=>(0,u.createElement)(b,{ref:i,iconNode:t,className:f(`lucide-${p(h(e))}`,`lucide-${e}`,n),...r}));return n.displayName=h(e),n},S=x(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),C=x(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),w=x(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),T=x(`link-2-off`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7`,key:`10o201`}],[`path`,{d:`M15 7h2a5 5 0 0 1 4 8`,key:`1d3206`}],[`line`,{x1:`8`,x2:`12`,y1:`12`,y2:`12`,key:`rvw6j4`}],[`line`,{x1:`2`,x2:`22`,y1:`2`,y2:`22`,key:`a6p6uj`}]]),ee=x(`link-2`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]),te=x(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),E=x(`mic-off`,[[`path`,{d:`M12 19v3`,key:`npa21l`}],[`path`,{d:`M15 9.34V5a3 3 0 0 0-5.68-1.33`,key:`1gzdoj`}],[`path`,{d:`M16.95 16.95A7 7 0 0 1 5 12v-2`,key:`cqa7eg`}],[`path`,{d:`M18.89 13.23A7 7 0 0 0 19 12v-2`,key:`16hl24`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M9 9v3a3 3 0 0 0 5.12 2.12`,key:`r2i35w`}]]),ne=x(`mic`,[[`path`,{d:`M12 19v3`,key:`npa21l`}],[`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`,key:`1vc78b`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`13`,rx:`3`,key:`s6n7sd`}]]),re=x(`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`}]]),ie=x(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),ae=x(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),oe=x(`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`}]]),se=[`claude`,`codex`,`antigravity`],ce={claude:{kind:`claude`,label:`Claude Code`,vendor:`Anthropic`,bin:`claude`,install:`npm i -g @anthropic-ai/claude-code`,docs:`https://claude.com/claude-code`,models:[`claude-fable-5`,`claude-opus-5`,`claude-sonnet-5`,`claude-haiku-4-5`]},codex:{kind:`codex`,label:`Codex`,vendor:`OpenAI`,bin:`codex`,install:`npm i -g @openai/codex`,docs:`https://developers.openai.com/codex/cli`,models:[`gpt-5.6-terra`,`gpt-5.1-codex-max`,`gpt-5.1-codex`,`gpt-5.1-codex-mini`]},antigravity:{kind:`antigravity`,label:`Antigravity`,vendor:`Google`,bin:`agy`,install:`https://antigravity.google/docs/cli/install`,docs:`https://antigravity.google/docs/cli`,models:[`gemini-3-pro`,`gemini-3-flash`]}},D=se.map(e=>ce[e]);function O(e){return e?.runners.find(t=>t.kind===e.active)}function le(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=le(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function ue(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=le(e))&&(r&&(r+=` `),r+=t);return r}var de=(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},fe=(e,t)=>({classGroupId:e,validator:t}),k=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),A=`-`,pe=[],me=`arbitrary..`,he=e=>{let t=ve(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return _e(e);let n=e.split(A);return ge(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?de(i,t):t:i||pe}return n[e]||pe}}},ge=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=ge(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(A):e.slice(t).join(A),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},_e=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?me+r:void 0})(),ve=e=>{let{theme:t,classGroups:n}=e;return ye(n,t)},ye=(e,t)=>{let n=k();for(let r in e){let i=e[r];be(i,n,r,t)}return n},be=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];xe(i,t,n,r)}},xe=(e,t,n,r)=>{if(typeof e==`string`){Se(e,t,n);return}if(typeof e==`function`){Ce(e,t,n,r);return}we(e,t,n,r)},Se=(e,t,n)=>{let r=e===``?t:Te(t,e);r.classGroupId=n},Ce=(e,t,n,r)=>{if(Ee(e)){be(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(fe(n,e))},we=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];be(o,Te(t,a),n,r)}},Te=(e,t)=>{let n=e,r=t.split(A),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=k(),n.nextPart.set(t,i)),n=i}return n},Ee=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,De=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)}}},Oe=`!`,ke=`:`,Ae=[],je=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Me=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===ke){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(Oe)?(c=s.slice(0,-1),l=!0):s.startsWith(Oe)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return je(t,l,c,u)};if(t){let e=t+ke,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):je(Ae,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Ne=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}},Pe=e=>({cache:De(e.cacheSize),parseClassName:Me(e),sortModifiers:Ne(e),postfixLookupClassGroupIds:Fe(e),...he(e)}),Fe=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},Ie=/\s+/,Le=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(Ie),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?_+Oe:_,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},Re=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=ze(n))&&(i&&(i+=` `),i+=r);return i},ze=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=ze(e[r]))&&(n&&(n+=` `),n+=t);return n},Be=(e,...t)=>{let n,r,i,a,o=o=>(n=Pe(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=Le(e,n);return i(e,a),a};return a=o,(...e)=>a(Re(...e))},Ve=[],He=e=>{let t=t=>t[e]||Ve;return t.isThemeGetter=!0,t},Ue=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,We=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ge=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Ke=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,qe=/\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$/,Je=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ye=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Xe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ze=e=>Ge.test(e),j=e=>!!e&&!Number.isNaN(Number(e)),Qe=e=>!!e&&Number.isInteger(Number(e)),$e=e=>e.endsWith(`%`)&&j(e.slice(0,-1)),et=e=>Ke.test(e),tt=()=>!0,nt=e=>qe.test(e)&&!Je.test(e),rt=()=>!1,it=e=>Ye.test(e),at=e=>Xe.test(e),ot=e=>!M(e)&&!N(e),st=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)),ct=e=>Ct(e,Dt,rt),M=e=>Ue.test(e),lt=e=>Ct(e,Ot,nt),ut=e=>Ct(e,kt,j),dt=e=>Ct(e,jt,tt),ft=e=>Ct(e,At,rt),pt=e=>Ct(e,Tt,rt),mt=e=>Ct(e,Et,at),ht=e=>Ct(e,Mt,it),N=e=>We.test(e),gt=e=>wt(e,Ot),_t=e=>wt(e,At),vt=e=>wt(e,Tt),yt=e=>wt(e,Dt),bt=e=>wt(e,Et),xt=e=>wt(e,Mt,!0),St=e=>wt(e,jt,!0),Ct=(e,t,n)=>{let r=Ue.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},wt=(e,t,n=!1)=>{let r=We.exec(e);return r?r[1]?t(r[1]):n:!1},Tt=e=>e===`position`||e===`percentage`,Et=e=>e===`image`||e===`url`,Dt=e=>e===`length`||e===`size`||e===`bg-size`,Ot=e=>e===`length`,kt=e=>e===`number`,At=e=>e===`family-name`,jt=e=>e===`number`||e===`weight`,Mt=e=>e===`shadow`,Nt=Be(()=>{let e=He(`color`),t=He(`font`),n=He(`text`),r=He(`font-weight`),i=He(`tracking`),a=He(`leading`),o=He(`breakpoint`),s=He(`container`),c=He(`spacing`),l=He(`radius`),u=He(`shadow`),d=He(`inset-shadow`),f=He(`text-shadow`),p=He(`drop-shadow`),m=He(`blur`),h=He(`perspective`),g=He(`aspect`),_=He(`ease`),v=He(`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(),N,M],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[N,M,c],T=()=>[Ze,`full`,`auto`,...w()],ee=()=>[Qe,`none`,`subgrid`,N,M],te=()=>[`auto`,{span:[`full`,Qe,N,M]},Qe,N,M],E=()=>[Qe,`auto`,N,M],ne=()=>[`auto`,`min`,`max`,`fr`,N,M],re=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],ie=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],ae=()=>[`auto`,...w()],oe=()=>[Ze,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],se=()=>[Ze,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],ce=()=>[Ze,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],D=()=>[e,N,M],O=()=>[...b(),vt,pt,{position:[N,M]}],le=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ue=()=>[`auto`,`cover`,`contain`,yt,ct,{size:[N,M]}],de=()=>[$e,gt,lt],fe=()=>[``,`none`,`full`,l,N,M],k=()=>[``,j,gt,lt],A=()=>[`solid`,`dashed`,`dotted`,`double`],pe=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],me=()=>[j,$e,vt,pt],he=()=>[``,`none`,m,N,M],ge=()=>[`none`,j,N,M],_e=()=>[`none`,j,N,M],ve=()=>[j,N,M],ye=()=>[Ze,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[et],breakpoint:[et],color:[tt],container:[et],"drop-shadow":[et],ease:[`in`,`out`,`in-out`],font:[ot],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[et],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[et],shadow:[et],spacing:[`px`,j],text:[et],"text-shadow":[et],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Ze,M,N,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,N,M]}],"container-named":[st],columns:[{columns:[j,M,N,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:[Qe,`auto`,N,M]}],basis:[{basis:[Ze,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[j,Ze,`auto`,`initial`,`none`,M]}],grow:[{grow:[``,j,N,M]}],shrink:[{shrink:[``,j,N,M]}],order:[{order:[Qe,`first`,`last`,`none`,N,M]}],"grid-cols":[{"grid-cols":ee()}],"col-start-end":[{col:te()}],"col-start":[{"col-start":E()}],"col-end":[{"col-end":E()}],"grid-rows":[{"grid-rows":ee()}],"row-start-end":[{row:te()}],"row-start":[{"row-start":E()}],"row-end":[{"row-end":E()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":ne()}],"auto-rows":[{"auto-rows":ne()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...re(),`normal`]}],"justify-items":[{"justify-items":[...ie(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...ie()]}],"align-content":[{content:[`normal`,...re()]}],"align-items":[{items:[...ie(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...ie(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":re()}],"place-items":[{"place-items":[...ie(),`baseline`]}],"place-self":[{"place-self":[`auto`,...ie()]}],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:ae()}],mx:[{mx:ae()}],my:[{my:ae()}],ms:[{ms:ae()}],me:[{me:ae()}],mbs:[{mbs:ae()}],mbe:[{mbe:ae()}],mt:[{mt:ae()}],mr:[{mr:ae()}],mb:[{mb:ae()}],ml:[{ml:ae()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:oe()}],"inline-size":[{inline:[`auto`,...se()]}],"min-inline-size":[{"min-inline":[`auto`,...se()]}],"max-inline-size":[{"max-inline":[`none`,...se()]}],"block-size":[{block:[`auto`,...ce()]}],"min-block-size":[{"min-block":[`auto`,...ce()]}],"max-block-size":[{"max-block":[`none`,...ce()]}],w:[{w:[s,`screen`,...oe()]}],"min-w":[{"min-w":[s,`screen`,`none`,...oe()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...oe()]}],h:[{h:[`screen`,`lh`,...oe()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...oe()]}],"max-h":[{"max-h":[`screen`,`lh`,...oe()]}],"font-size":[{text:[`base`,n,gt,lt]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,St,dt]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,$e,M]}],"font-family":[{font:[_t,ft,t]}],"font-features":[{"font-features":[M]}],"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,N,M]}],"line-clamp":[{"line-clamp":[j,`none`,N,ut]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,N,M]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,N,M]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...A(),`wavy`]}],"text-decoration-thickness":[{decoration:[j,`from-font`,`auto`,N,lt]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[j,`auto`,N,M]}],"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:[Qe,N,M]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,N,M]}],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`,N,M]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:le()}],"bg-size":[{bg:ue()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Qe,N,M],radial:[``,N,M],conic:[Qe,N,M]},bt,mt]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:de()}],"gradient-via-pos":[{via:de()}],"gradient-to-pos":[{to:de()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:fe()}],"rounded-s":[{"rounded-s":fe()}],"rounded-e":[{"rounded-e":fe()}],"rounded-t":[{"rounded-t":fe()}],"rounded-r":[{"rounded-r":fe()}],"rounded-b":[{"rounded-b":fe()}],"rounded-l":[{"rounded-l":fe()}],"rounded-ss":[{"rounded-ss":fe()}],"rounded-se":[{"rounded-se":fe()}],"rounded-ee":[{"rounded-ee":fe()}],"rounded-es":[{"rounded-es":fe()}],"rounded-tl":[{"rounded-tl":fe()}],"rounded-tr":[{"rounded-tr":fe()}],"rounded-br":[{"rounded-br":fe()}],"rounded-bl":[{"rounded-bl":fe()}],"border-w":[{border:k()}],"border-w-x":[{"border-x":k()}],"border-w-y":[{"border-y":k()}],"border-w-s":[{"border-s":k()}],"border-w-e":[{"border-e":k()}],"border-w-bs":[{"border-bs":k()}],"border-w-be":[{"border-be":k()}],"border-w-t":[{"border-t":k()}],"border-w-r":[{"border-r":k()}],"border-w-b":[{"border-b":k()}],"border-w-l":[{"border-l":k()}],"divide-x":[{"divide-x":k()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":k()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...A(),`hidden`,`none`]}],"divide-style":[{divide:[...A(),`hidden`,`none`]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-bs":[{"border-bs":D()}],"border-color-be":[{"border-be":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...A(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[j,N,M]}],"outline-w":[{outline:[``,j,gt,lt]}],"outline-color":[{outline:D()}],shadow:[{shadow:[``,`none`,u,xt,ht]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":[`none`,d,xt,ht]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:k()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[j,lt]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":k()}],"inset-ring-color":[{"inset-ring":D()}],"text-shadow":[{"text-shadow":[`none`,f,xt,ht]}],"text-shadow-color":[{"text-shadow":D()}],opacity:[{opacity:[j,N,M]}],"mix-blend":[{"mix-blend":[...pe(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":pe()}],"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":[j]}],"mask-image-linear-from-pos":[{"mask-linear-from":me()}],"mask-image-linear-to-pos":[{"mask-linear-to":me()}],"mask-image-linear-from-color":[{"mask-linear-from":D()}],"mask-image-linear-to-color":[{"mask-linear-to":D()}],"mask-image-t-from-pos":[{"mask-t-from":me()}],"mask-image-t-to-pos":[{"mask-t-to":me()}],"mask-image-t-from-color":[{"mask-t-from":D()}],"mask-image-t-to-color":[{"mask-t-to":D()}],"mask-image-r-from-pos":[{"mask-r-from":me()}],"mask-image-r-to-pos":[{"mask-r-to":me()}],"mask-image-r-from-color":[{"mask-r-from":D()}],"mask-image-r-to-color":[{"mask-r-to":D()}],"mask-image-b-from-pos":[{"mask-b-from":me()}],"mask-image-b-to-pos":[{"mask-b-to":me()}],"mask-image-b-from-color":[{"mask-b-from":D()}],"mask-image-b-to-color":[{"mask-b-to":D()}],"mask-image-l-from-pos":[{"mask-l-from":me()}],"mask-image-l-to-pos":[{"mask-l-to":me()}],"mask-image-l-from-color":[{"mask-l-from":D()}],"mask-image-l-to-color":[{"mask-l-to":D()}],"mask-image-x-from-pos":[{"mask-x-from":me()}],"mask-image-x-to-pos":[{"mask-x-to":me()}],"mask-image-x-from-color":[{"mask-x-from":D()}],"mask-image-x-to-color":[{"mask-x-to":D()}],"mask-image-y-from-pos":[{"mask-y-from":me()}],"mask-image-y-to-pos":[{"mask-y-to":me()}],"mask-image-y-from-color":[{"mask-y-from":D()}],"mask-image-y-to-color":[{"mask-y-to":D()}],"mask-image-radial":[{"mask-radial":[N,M]}],"mask-image-radial-from-pos":[{"mask-radial-from":me()}],"mask-image-radial-to-pos":[{"mask-radial-to":me()}],"mask-image-radial-from-color":[{"mask-radial-from":D()}],"mask-image-radial-to-color":[{"mask-radial-to":D()}],"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":[j]}],"mask-image-conic-from-pos":[{"mask-conic-from":me()}],"mask-image-conic-to-pos":[{"mask-conic-to":me()}],"mask-image-conic-from-color":[{"mask-conic-from":D()}],"mask-image-conic-to-color":[{"mask-conic-to":D()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:le()}],"mask-size":[{mask:ue()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,N,M]}],filter:[{filter:[``,`none`,N,M]}],blur:[{blur:he()}],brightness:[{brightness:[j,N,M]}],contrast:[{contrast:[j,N,M]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,xt,ht]}],"drop-shadow-color":[{"drop-shadow":D()}],grayscale:[{grayscale:[``,j,N,M]}],"hue-rotate":[{"hue-rotate":[j,N,M]}],invert:[{invert:[``,j,N,M]}],saturate:[{saturate:[j,N,M]}],sepia:[{sepia:[``,j,N,M]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,N,M]}],"backdrop-blur":[{"backdrop-blur":he()}],"backdrop-brightness":[{"backdrop-brightness":[j,N,M]}],"backdrop-contrast":[{"backdrop-contrast":[j,N,M]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,j,N,M]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[j,N,M]}],"backdrop-invert":[{"backdrop-invert":[``,j,N,M]}],"backdrop-opacity":[{"backdrop-opacity":[j,N,M]}],"backdrop-saturate":[{"backdrop-saturate":[j,N,M]}],"backdrop-sepia":[{"backdrop-sepia":[``,j,N,M]}],"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`,N,M]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[j,`initial`,N,M]}],ease:[{ease:[`linear`,`initial`,_,N,M]}],delay:[{delay:[j,N,M]}],animate:[{animate:[`none`,v,N,M]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,N,M]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ge()}],"rotate-x":[{"rotate-x":ge()}],"rotate-y":[{"rotate-y":ge()}],"rotate-z":[{"rotate-z":ge()}],scale:[{scale:_e()}],"scale-x":[{"scale-x":_e()}],"scale-y":[{"scale-y":_e()}],"scale-z":[{"scale-z":_e()}],"scale-3d":[`scale-3d`],skew:[{skew:ve()}],"skew-x":[{"skew-x":ve()}],"skew-y":[{"skew-y":ve()}],transform:[{transform:[N,M,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ye()}],"translate-x":[{"translate-x":ye()}],"translate-y":[{"translate-y":ye()}],"translate-z":[{"translate-z":ye()}],"translate-none":[`translate-none`],zoom:[{zoom:[Qe,N,M]}],accent:[{accent:D()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:D()}],"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`,N,M]}],"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":D()}],"scrollbar-track-color":[{"scrollbar-track":D()}],"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`,N,M]}],fill:[{fill:[`none`,...D()]}],"stroke-w":[{stroke:[j,gt,lt,ut]}],stroke:[{stroke:[`none`,...D()]}],"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 Pt(...e){return Nt(ue(e))}var Ft=t((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})),It=t(((e,t)=>{t.exports=Ft()})),P=It();function Lt(e,{running:t,listening:n}={}){let r=O(e?.agent)?.ready!==!1,i=(e?.connected??!1)&&r;return e?.paired?e.connected?r?t?{tone:`busy`,label:`Working`,ready:i}:n?{tone:`listening`,label:`Listening`,ready:i}:{tone:`live`,label:`Online`,ready:i}:{tone:`warn`,label:`Agent blocked`,ready:i,blocker:`agent`}:{tone:`pending`,label:`Reconnecting`,ready:i,blocker:`offline`}:{tone:`off`,label:`Not paired`,ready:i,blocker:`unpaired`}}var Rt={off:`bg-ink-faint/50`,pending:`glow-dot animate-pulse bg-amber text-amber`,live:`glow-dot bg-lime text-lime`,busy:`glow-dot animate-pulse bg-brand text-brand`,listening:`glow-dot animate-pulse bg-magenta text-magenta`,warn:`glow-dot bg-ember text-ember`},zt={off:`text-ink-faint`,pending:`text-amber`,live:`text-ink-dim`,busy:`text-brand`,listening:`text-magenta`,warn:`text-ember`};function Bt({tone:e,className:t}){return(0,P.jsx)(`span`,{className:Pt(`size-1.5 shrink-0 rounded-full`,Rt[e],t)})}function Vt({tone:e,children:t,onClick:n,expanded:r,className:i}){let a=(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Bt,{tone:e}),(0,P.jsx)(`span`,{className:`min-w-0 truncate`,children:t}),n&&(0,P.jsx)(C,{className:Pt(`size-3 shrink-0 text-ink-faint transition-transform`,r&&`rotate-180`)})]}),o=Pt(`inline-flex max-w-full items-center gap-1.5 rounded-full border border-line bg-ground-2/70 px-2.5 py-1`,`font-mono text-[10px] tracking-[0.12em] uppercase`,zt[e],i);return n?(0,P.jsx)(`button`,{type:`button`,onClick:n,"aria-expanded":r,className:Pt(o,`transition-colors hover:border-brand/40 hover:bg-surface/60`),children:a}):(0,P.jsx)(`span`,{className:o,children:a})}var Ht=Object.defineProperty,Ut=(e,t)=>Ht(e,`name`,{value:t,configurable:!0});function Wt(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Ut(Wt,`setRef`);function Gt(...e){return t=>{let n=!1,r=e.map(e=>{let r=Wt(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():Wt(e[t],null)}}}}Ut(Gt,`composeRefs`);function Kt(...e){return u.useCallback(Gt(...e),e)}Ut(Kt,`useComposedRefs`);var qt=Object.defineProperty,Jt=(e,t)=>qt(e,`name`,{value:t,configurable:!0});function Yt(e){let t=u.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];an(r)&&typeof ln==`function`&&(r=ln(r._payload)),u.Children.forEach(r,e=>{if(nn(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;an(n)&&typeof ln==`function`&&(n=ln(n._payload)),a=$t(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=u.cloneElement(a,void 0,s):!o&&u.Children.count(r)===1&&u.isValidElement(r)&&(a=r);let c=a?tn(a):void 0,l=Kt(n,c);if(!a){if(r||r===0)throw Error(o?cn(e):sn(e));return r}let d=en(i,a.props??{});return a.type!==u.Fragment&&(d.ref=n?l:c),u.cloneElement(a,d)});return t.displayName=`${e}.Slot`,t}Jt(Yt,`createSlot`);var Xt=Yt(`Slot`),Zt=Symbol.for(`radix.slottable`);function Qt(e){let t=Jt(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=Zt,t}Jt(Qt,`createSlottable`);var $t=Jt((e,t)=>{if(`child`in e.props){let t=e.props.child;return u.isValidElement(t)?u.cloneElement(t,void 0,e.props.children(t.props.children)):null}return u.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function en(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}}Jt(en,`mergeProps`);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)}Jt(tn,`getElementRef`);function nn(e){return u.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Zt}Jt(nn,`isSlottable`);var rn=Symbol.for(`react.lazy`);function an(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===rn&&`_payload`in e&&on(e._payload)}Jt(an,`isLazyComponent`);function on(e){return typeof e==`object`&&!!e&&`then`in e}Jt(on,`isPromiseLike`);var sn=Jt(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),cn=Jt(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),ln=u.use,un=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,dn=ue,fn=(e,t)=>n=>{if(t?.variants==null)return dn(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=un(t)||un(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 dn(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)},pn=fn(`inline-flex shrink-0 items-center justify-center gap-2 rounded-full font-medium whitespace-nowrap outline-none transition-all duration-200 disabled:pointer-events-none disabled:opacity-45 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-offset-2 focus-visible:ring-offset-ground aria-invalid:border-destructive`,{variants:{variant:{default:`glow-brand bg-brand text-ground hover:bg-brand/90`,destructive:`glow-destructive bg-destructive text-ink hover:bg-destructive/90`,outline:`border border-line-strong bg-surface/40 text-ink hover:border-brand/45 hover:bg-surface/70`,secondary:`bg-surface text-ink hover:bg-surface-2`,ghost:`text-ink-dim hover:bg-surface/70 hover:text-ink`,subtle:`bg-brand/12 text-brand hover:bg-brand/20`,link:`text-brand underline-offset-4 hover:underline`},size:{default:`h-9 px-4 text-sm has-[>svg]:px-3.5`,sm:`h-7 gap-1.5 px-3 text-xs has-[>svg]:px-2.5`,lg:`h-10 px-6 text-sm has-[>svg]:px-5`,icon:`size-9`,"icon-sm":`size-7`}},defaultVariants:{variant:`default`,size:`default`}});function mn({className:e,variant:t,size:n,asChild:r=!1,...i}){return(0,P.jsx)(r?Xt:`button`,{"data-slot":`button`,className:Pt(pn({variant:t,size:n,className:e})),...i})}var hn=e(s(),1),gn=Object.defineProperty,_n=(e,t)=>gn(e,`name`,{value:t,configurable:!0});function vn(e,[t,n]){return Math.min(n,Math.max(t,e))}_n(vn,`clamp`);var yn=Object.defineProperty,bn=(e,t)=>yn(e,`name`,{value:t,configurable:!0}),xn=!!(typeof window<`u`&&window.document&&window.document.createElement);function Sn(e,t,{checkForDefaultPrevented:n=!0}={}){return bn(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}bn(Sn,`composeEventHandlers`);function Cn(e){if(!xn)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}bn(Cn,`getOwnerWindow`);function wn(e){if(!xn)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}bn(wn,`getOwnerDocument`);function Tn(e,t=!1){let{activeElement:n}=wn(e);if(!n?.nodeName)return null;if(En(n)&&n.contentDocument)return Tn(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=wn(n).getElementById(e);if(t)return t}}return n}bn(Tn,`getActiveElement`);function En(e){return e.tagName===`IFRAME`}bn(En,`isFrame`);var Dn=Object.defineProperty,On=(e,t)=>Dn(e,`name`,{value:t,configurable:!0});function kn(e,t){let n=u.createContext(t);n.displayName=e+`Context`;let r=On(e=>{let{children:t,...r}=e,i=u.useMemo(()=>r,Object.values(r));return(0,P.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=u.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return On(i,`useContext`),[r,i]}On(kn,`createContext`);function An(e,t=[]){let n=[];function r(t,r){let i=u.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=On(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=u.useMemo(()=>o,Object.values(o));return(0,P.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,d=u.useContext(l);if(d)return d;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return On(s,`useContext`),[o,s]}On(r,`createContext`);let i=On(()=>{let t=n.map(e=>u.createContext(e));return On(function(n){let r=n?.[e]||t;return u.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,jn(i,...t)]}On(An,`createContextScope`);function jn(...e){let t=e[0];if(e.length===1)return t;let n=On(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return On(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return u.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}On(jn,`composeContextScopes`);var Mn=Object.defineProperty,Nn=(e,t)=>Mn(e,`name`,{value:t,configurable:!0});function Pn(e){let t=e+`CollectionProvider`,[n,r]=An(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=Nn(e=>{let{scope:t,children:n}=e,r=u.useRef(null),a=u.useRef(new Map).current;return(0,P.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);o.displayName=t;let s=e+`CollectionSlot`,c=Yt(s),l=u.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=Kt(t,a(s,n).collectionRef);return(0,P.jsx)(c,{ref:i,children:r})});l.displayName=s;let d=e+`CollectionItemSlot`,f=`data-radix-collection-item`,p=Yt(d),m=u.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=u.useRef(null),s=Kt(t,o),c=a(d,n);return u.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,P.jsx)(p,{[f]:``,ref:s,children:r})});m.displayName=d;function h(t){let n=a(e+`CollectionConsumer`,t);return u.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return Nn(h,`useCollection`),[{Provider:o,Slot:l,ItemSlot:m},h,r]}Nn(Pn,`createCollection`);var Fn=new WeakMap,In=class e extends Map{static{Nn(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],Fn.set(this,!0)}set(e,t){return Fn.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=zn(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=Ln(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=Ln(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return Ln(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 Ln(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=Rn(e,t);return n===-1?void 0:e[n]}Nn(Ln,`at`);function Rn(e,t){let n=e.length,r=zn(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}Nn(Rn,`toSafeIndex`);function zn(e){return e!==e||e===0?0:Math.trunc(e)}Nn(zn,`toSafeInteger`);function Bn(e){let t=e+`CollectionProvider`,[n,r]=An(t),[i,a]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new In,setItemMap:Nn(()=>void 0,`setItemMap`)}),o=Nn(({state:e,...t})=>e?(0,P.jsx)(c,{...t,state:e}):(0,P.jsx)(s,{...t}),`CollectionProvider`);o.displayName=t;let s=Nn(e=>{let t=g();return(0,P.jsx)(c,{...e,state:t})},`CollectionInit`);s.displayName=t+`Init`;let c=Nn(e=>{let{scope:t,children:n,state:r}=e,a=u.useRef(null),[o,s]=u.useState(null),c=Kt(a,s),[l,d]=r;return u.useEffect(()=>{if(!o)return;let e=Wn(()=>{});return e.observe(o,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[o]),(0,P.jsx)(i,{scope:t,itemMap:l,setItemMap:d,collectionRef:c,collectionRefObject:a,collectionElement:o,children:n})},`CollectionProviderImpl`);c.displayName=t+`Impl`;let l=e+`CollectionSlot`,d=Yt(l),f=u.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=Kt(t,a(l,n).collectionRef);return(0,P.jsx)(d,{ref:i,children:r})});f.displayName=l;let p=e+`CollectionItemSlot`,m=Yt(p),h=u.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=u.useRef(null),[s,c]=u.useState(null),l=Kt(t,o,c),{setItemMap:d}=a(p,n),f=u.useRef(i);Vn(f.current,i)||(f.current=i);let h=f.current;return u.useEffect(()=>{let e=h;return d(t=>s?t.has(s)?t.set(s,{...e,element:s}).toSorted(Un):(t.set(s,{...e,element:s}),t.toSorted(Un)):t),()=>{d(e=>!s||!e.has(s)?e:(e.delete(s),new In(e)))}},[s,h,d]),(0,P.jsx)(m,{"data-radix-collection-item":``,ref:l,children:r})});h.displayName=p;function g(){return u.useState(new In)}Nn(g,`useInitCollection`);function _(t){let{itemMap:n}=a(e+`CollectionConsumer`,t);return n}return Nn(_,`useCollection`),[{Provider:o,Slot:f,ItemSlot:h},{createCollectionScope:r,useCollection:_,useInitCollection:g}]}Nn(Bn,`createCollection`);function Vn(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}Nn(Vn,`shallowEqual`);function Hn(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Nn(Hn,`isElementPreceding`);function Un(e,t){return!e[1].element||!t[1].element?0:Hn(e[1].element,t[1].element)?-1:1}Nn(Un,`sortByDocumentPosition`);function Wn(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}Nn(Wn,`getChildListObserver`);var Gn=Object.defineProperty,Kn=(e,t)=>Gn(e,`name`,{value:t,configurable:!0}),qn=u.createContext(void 0);function Jn(e){let t=u.useContext(qn);return e||t||`ltr`}Kn(Jn,`useDirection`);var Yn=Object.defineProperty,Xn=(e,t)=>Yn(e,`name`,{value:t,configurable:!0}),Zn=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Yt(`Primitive.${t}`),r=u.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,P.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Qn(e,t){e&&hn.flushSync(()=>e.dispatchEvent(t))}Xn(Qn,`dispatchDiscreteCustomEvent`);var $n=Object.defineProperty,er=(e,t)=>$n(e,`name`,{value:t,configurable:!0});function tr(e){let t=u.useRef(e);return u.useEffect(()=>{t.current=e}),u.useMemo(()=>((...e)=>t.current?.(...e)),[])}er(tr,`useCallbackRef`);var nr=Object.defineProperty,rr=(e,t)=>nr(e,`name`,{value:t,configurable:!0}),ir=`dismissableLayer.update`,ar=`dismissableLayer.pointerDownOutside`,or=`dismissableLayer.focusOutside`,sr,cr=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),lr=u.forwardRef(rr(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,d=u.useContext(cr),[f,p]=u.useState(null),m=f?.ownerDocument??globalThis?.document,[,h]=u.useState({}),g=Kt(t,p),_=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=v?_.indexOf(v):-1,b=f?_.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,C=u.useRef(!1),w=fr(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:m,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:C,dismissableSurfaces:d.dismissableSurfaces,shouldHandlePointerDownOutside:u.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...d.branches].some(t=>t.contains(e));return S&&!t},[d.branches,S])}),T=pr(e=>{if(r&&C.current)return;let t=e.target;[...d.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},m),ee=f?b===_.length-1:!1,te=tr(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return u.useEffect(()=>{if(ee)return m.addEventListener(`keydown`,te,{capture:!0}),()=>m.removeEventListener(`keydown`,te,{capture:!0})},[m,ee,te]),u.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(sr=m.body.style.pointerEvents,m.body.style.pointerEvents=`none`),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),mr(),()=>{n&&(d.layersWithOutsidePointerEventsDisabled.delete(f),d.layersWithOutsidePointerEventsDisabled.size===0&&(m.body.style.pointerEvents=sr))}},[f,m,n,d]),u.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),mr())},[f,d]),u.useEffect(()=>{let e=rr(()=>h({}),`handleUpdate`);return document.addEventListener(ir,e),()=>document.removeEventListener(ir,e)},[]),(0,P.jsx)(Zn.div,{...l,ref:g,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:Sn(e.onFocusCapture,T.onFocusCapture),onBlurCapture:Sn(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Sn(e.onPointerDownCapture,w.onPointerDownCapture)})},`DismissableLayer`));function ur(){let e=u.useContext(cr),[t,n]=u.useState(null);return u.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}rr(ur,`useDismissableLayerSurface`);var dr=rr(()=>!0,`IS_TRUE`);function fr(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=dr}=t,s=tr(e),c=u.useRef(!1),l=u.useRef(!1),d=u.useRef(new Map),f=u.useRef(()=>{});return u.useEffect(()=>{function e(){l.current=!1,i.current=!1,d.current.clear()}rr(e,`resetOutsideInteraction`);function t(){return Array.from(d.current.values()).some(Boolean)}rr(t,`isOutsideInteractionIntercepted`);function u(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||d.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&f.current()},0)}rr(u,`handleInteractionCapture`);function p(e){l.current&&d.current.set(e.type,!1)}rr(p,`handleInteractionBubble`);let m=rr(a=>{if(a.target&&!c.current){let u=function(){n.removeEventListener(`click`,f.current);let r=t();e(),r||hr(ar,s,p,{discrete:!0})};if(rr(u,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,f.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,d.current.clear(),!r||a.button!==0?u():(n.removeEventListener(`click`,f.current),f.current=u,n.addEventListener(`click`,f.current,{once:!0}))}else n.removeEventListener(`click`,f.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,u,!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`,f.current);for(let e of h)n.removeEventListener(e,u,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:rr(()=>c.current=!0,`onPointerDownCapture`)}}rr(fr,`usePointerDownOutside`);function pr(e,t=globalThis?.document){let n=tr(e),r=u.useRef(!1);return u.useEffect(()=>{let e=rr(e=>{e.target&&!r.current&&hr(or,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:rr(()=>r.current=!0,`onFocusCapture`),onBlurCapture:rr(()=>r.current=!1,`onBlurCapture`)}}rr(pr,`useFocusOutside`);function mr(){let e=new CustomEvent(ir);document.dispatchEvent(e)}rr(mr,`dispatchUpdate`);function hr(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?Qn(i,a):i.dispatchEvent(a)}rr(hr,`handleAndDispatchCustomEvent`);var gr=Object.defineProperty,_r=(e,t)=>gr(e,`name`,{value:t,configurable:!0}),vr=0,yr=null;function br(e){return xr(),e.children}_r(br,`FocusGuards`);function xr(){u.useEffect(()=>{yr||={start:Sr(),end:Sr()};let{start:e,end:t}=yr;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),vr++,()=>{vr===1&&(yr?.start.remove(),yr?.end.remove(),yr=null),vr=Math.max(0,vr-1)}},[])}_r(xr,`useFocusGuards`);function Sr(){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}_r(Sr,`createFocusGuard`);var Cr=Object.defineProperty,wr=(e,t)=>Cr(e,`name`,{value:t,configurable:!0}),Tr=`focusScope.autoFocusOnMount`,Er=`focusScope.autoFocusOnUnmount`,Dr={bubbles:!1,cancelable:!0},Or=u.forwardRef(wr(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=u.useState(null),l=tr(i),d=tr(a),f=u.useRef(null),p=Kt(t,c),m=u.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;u.useEffect(()=>{if(r){let e=function(e){if(m.paused||!s)return;let t=e.target;s.contains(t)?f.current=t:Fr(f.current,{select:!0})},t=function(e){if(m.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Fr(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Fr(s)};wr(e,`handleFocusIn`),wr(t,`handleFocusOut`),wr(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,m.paused]),u.useEffect(()=>{if(s){Ir.add(m);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(Tr,Dr);s.addEventListener(Tr,l),s.dispatchEvent(t),t.defaultPrevented||(kr(zr(jr(s)),{select:!0}),document.activeElement===e&&Fr(s))}return()=>{s.removeEventListener(Tr,l),setTimeout(()=>{let t=new CustomEvent(Er,Dr);s.addEventListener(Er,d),s.dispatchEvent(t),t.defaultPrevented||Fr(e??document.body,{select:!0}),s.removeEventListener(Er,d),Ir.remove(m)},0)}}},[s,l,d,m]);let h=u.useCallback(e=>{if(!n&&!r||m.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]=Ar(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Fr(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Fr(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,m.paused]);return(0,P.jsx)(Zn.div,{tabIndex:-1,...o,ref:p,onKeyDown:h})},`FocusScope`));function kr(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Fr(r,{select:t}),document.activeElement!==n)return}wr(kr,`focusFirst`);function Ar(e){let t=jr(e);return[Mr(t,e),Mr(t.reverse(),e)]}wr(Ar,`getTabbableEdges`);function jr(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:wr(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}wr(jr,`getTabbableCandidates`);function Mr(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):Nr(r,{upTo:t})))return r}wr(Mr,`findVisible`);function Nr(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}wr(Nr,`isHidden`);function Pr(e){return e instanceof HTMLInputElement&&`select`in e}wr(Pr,`isSelectableInput`);function Fr(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Pr(e)&&t&&e.select()}}wr(Fr,`focus`);var Ir=Lr();function Lr(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Rr(e,t),e.unshift(t)},remove(t){e=Rr(e,t),e[0]?.resume()}}}wr(Lr,`createFocusScopesStack`);function Rr(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}wr(Rr,`arrayRemove`);function zr(e){return e.filter(e=>e.tagName!==`A`)}wr(zr,`removeLinks`);var Br=globalThis?.document?u.useLayoutEffect:()=>{},Vr=Object.defineProperty,Hr=(e,t)=>Vr(e,`name`,{value:t,configurable:!0}),Ur=u.useId||(()=>void 0),Wr=0;function Gr(e){let[t,n]=u.useState(Ur());return Br(()=>{e||n(e=>e??String(Wr++))},[e]),e||(t?`radix-${t}`:``)}Hr(Gr,`useId`);var Kr=[`top`,`right`,`bottom`,`left`],qr=Math.min,Jr=Math.max,Yr=Math.round,Xr=Math.floor,Zr=e=>({x:e,y:e}),Qr={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function $r(e,t,n){return Jr(e,qr(t,n))}function ei(e,t){return typeof e==`function`?e(t):e}function ti(e){return e.split(`-`)[0]}function ni(e){return e.split(`-`)[1]}function ri(e){return e===`x`?`y`:`x`}function ii(e){return e===`y`?`height`:`width`}function ai(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function oi(e){return ri(ai(e))}function si(e,t,n){n===void 0&&(n=!1);let r=ni(e),i=oi(e),a=ii(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=gi(o)),[o,gi(o)]}function ci(e){let t=gi(e);return[li(e),t,li(t)]}function li(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var ui=[`left`,`right`],di=[`right`,`left`],fi=[`top`,`bottom`],pi=[`bottom`,`top`];function mi(e,t,n){switch(e){case`top`:case`bottom`:return n?t?di:ui:t?ui:di;case`left`:case`right`:return t?fi:pi;default:return[]}}function hi(e,t,n,r){let i=ni(e),a=mi(ti(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(li)))),a}function gi(e){let t=ti(e);return Qr[t]+e.slice(t.length)}function _i(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function vi(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:_i(e)}function yi(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 bi(e,t,n){let{reference:r,floating:i}=e,a=ai(t),o=oi(t),s=ii(o),c=ti(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}}let m=ni(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function xi(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}=ei(t,e),p=vi(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=yi(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=yi(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 Si=50,Ci=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:xi},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=bi(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<Si&&(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}=bi(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},wi=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}=ei(e,t)||{};if(l==null)return{};let d=vi(u),f={x:n,y:r},p=oi(i),m=ii(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,ee=qr(d[_],T),te=qr(d[v],T),E=C-h[m]-te,ne=C/2-h[m]/2+w,re=$r(ee,ne,E),ie=!c.arrow&&ni(i)!=null&&ne!==re&&a.reference[m]/2-(ne<ee?ee:te)-h[m]/2<0,ae=ie?ne<ee?ne-ee:ne-E:0;return{[p]:f[p]+ae,data:{[p]:re,centerOffset:ne-re-ae,...ie&&{alignmentOffset:ae}},reset:ie}}}),Ti=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}=ei(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=ti(r),_=ai(o),v=ti(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[gi(o)]:ci(o)),x=p!==`none`;!d&&x&&b.push(...hi(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=si(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`&&_!==ai(t))||T.every(e=>ai(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=ai(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 Ei(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Di(e){return Kr.some(t=>e[t]>=0)}var Oi=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=ei(e,t);switch(i){case`referenceHidden`:{let e=Ei(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Di(e)}}}case`escaped`:{let e=Ei(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Di(e)}}}default:return{}}}}},ki=new Set([`left`,`top`]);async function Ai(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=ti(n),s=ni(n),c=ai(n)===`y`,l=ki.has(o)?-1:1,u=a&&c?-1:1,d=ei(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 ji=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 Ai(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}}}}},Mi=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}=ei(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=ai(i),p=ri(f),m=u[p],h=u[f],g=(e,t)=>$r(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Ni=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}=ei(e,t),u={x:n,y:r},d=ai(i),f=ri(d),p=u[f],m=u[d],h=ei(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};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=ki.has(ti(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}}}},Pi=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=ei(e,t),c=await i.detectOverflow(t,s),l=ti(n),u=ni(n),d=ai(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=qr(p-c[m],g),y=qr(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*Jr(c.left,c.right):S=p-2*Jr(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function Fi(){return typeof window<`u`}function Ii(e){return I(e)?(e.nodeName||``).toLowerCase():`#document`}function Li(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function F(e){return((I(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function I(e){return Fi()?e instanceof Node||e instanceof Li(e).Node:!1}function Ri(e){return Fi()?e instanceof Element||e instanceof Li(e).Element:!1}function zi(e){return Fi()?e instanceof HTMLElement||e instanceof Li(e).HTMLElement:!1}function Bi(e){return!Fi()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Li(e).ShadowRoot}function Vi(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Qi(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Hi(e){return/^(table|td|th)$/.test(Ii(e))}function Ui(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Wi=/transform|translate|scale|rotate|perspective|filter/,Gi=/paint|layout|strict|content/,Ki=e=>!!e&&e!==`none`,qi;function Ji(e){let t=Ri(e)?Qi(e):e;return Ki(t.transform)||Ki(t.translate)||Ki(t.scale)||Ki(t.rotate)||Ki(t.perspective)||!Xi()&&(Ki(t.backdropFilter)||Ki(t.filter))||Wi.test(t.willChange||``)||Gi.test(t.contain||``)}function Yi(e){let t=ea(e);for(;zi(t)&&!Zi(t);){if(Ji(t))return t;if(Ui(t))return null;t=ea(t)}return null}function Xi(){return qi??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),qi}function Zi(e){return/^(html|body|#document)$/.test(Ii(e))}function Qi(e){return Li(e).getComputedStyle(e)}function $i(e){return Ri(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ea(e){if(Ii(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Bi(e)&&e.host||F(e);return Bi(t)?t.host:t}function ta(e){let t=ea(e);return Zi(t)?(e.ownerDocument||e).body:zi(t)&&Vi(t)?t:ta(t)}function na(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=ta(e),i=r===e.ownerDocument?.body,a=Li(r);if(i){let e=ra(a);return t.concat(a,a.visualViewport||[],Vi(r)?r:[],e&&n?na(e):[])}else return t.concat(r,na(r,[],n))}function ra(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ia(e){let t=Qi(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=zi(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Yr(n)!==a||Yr(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function aa(e){return Ri(e)?e:e.contextElement}function oa(e){let t=aa(e);if(!zi(t))return Zr(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=ia(t),o=(a?Yr(n.width):n.width)/r,s=(a?Yr(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var sa=Zr(0);function ca(e){let t=Li(e);return!Xi()||!t.visualViewport?sa:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function la(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Li(e)}function ua(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=aa(e),o=Zr(1);t&&(r?Ri(r)&&(o=oa(r)):o=oa(e));let s=la(a,n,r)?ca(a):Zr(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&&r){let e=Li(a),t=Ri(r)?Li(r):r,n=e,i=ra(n);for(;i&&t!==n;){let e=oa(i),t=i.getBoundingClientRect(),r=Qi(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=Li(i),i=ra(n)}}return yi({width:u,height:d,x:c,y:l})}function da(e,t){let n=$i(e).scrollLeft;return t?t.left+n:ua(F(e)).left+n}function fa(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-da(e,n),y:n.top+t.scrollTop}}function pa(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=F(r),s=t?Ui(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Zr(1),u=Zr(0),d=zi(r);if((d||!a)&&((Ii(r)!==`body`||Vi(o))&&(c=$i(r)),d)){let e=ua(r);l=oa(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?fa(o,c):Zr(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 ma(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function ha(e){let t=$i(e),n=e.ownerDocument.body,r=Jr(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Jr(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+da(e),o=-t.scrollTop;return Qi(n).direction===`rtl`&&(a+=Jr(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var ga=25;function _a(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Li(e),a=F(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Xi()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(da(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=ga&&(s-=o)}return{width:s,height:c,x:l,y:u}}function va(e,t){let n=ua(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=oa(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function ya(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=_a(e,n,t);else if(t===`document`)r=ha(F(e));else if(Ri(t))r=va(t,n);else{let n=ca(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return yi(r)}function ba(e,t){let n=t.get(e);if(n)return n;let r=na(e,[],!1).filter(e=>Ri(e)&&Ii(e)!==`body`),i=null,a=Qi(e).position===`fixed`,o=a?ea(e):e;for(;Ri(o)&&!Zi(o);){let e=Qi(o),t=Ji(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=ea(o)}return t.set(e,r),r}function xa(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Ui(t)?[]:ba(t,this._c):[].concat(n),r],o=ya(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=ya(t,a[e],i);s=Jr(n.top,s),c=qr(n.right,c),l=qr(n.bottom,l),u=Jr(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Sa(e){let{width:t,height:n}=ia(e);return{width:t,height:n}}function Ca(e,t,n){let r=zi(t),i=F(t),a=n===`fixed`,o=ua(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Zr(0);if((r||!a)&&((Ii(t)!==`body`||Vi(i))&&(s=$i(t)),r)){let e=ua(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=da(i));let l=i&&!r&&!a?fa(i,s):Zr(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function wa(e){return Qi(e).position===`static`}function Ta(e,t){if(!zi(e)||Qi(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return F(e)===n&&(n=n.ownerDocument.body),n}function Ea(e,t){let n=Li(e);if(Ui(e))return n;if(!zi(e)){let t=ea(e);for(;t&&!Zi(t);){if(Ri(t)&&!wa(t))return t;t=ea(t)}return n}let r=Ta(e,t);for(;r&&Hi(r)&&wa(r);)r=Ta(r,t);return r&&Zi(r)&&wa(r)&&!Ji(r)?n:r||Yi(e)||n}var Da=async function(e){let t=this.getOffsetParent||Ea,n=this.getDimensions,r=await n(e.floating);return{reference:Ca(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Oa(e){return Qi(e).direction===`rtl`}var ka={convertOffsetParentRelativeRectToViewportRelativeRect:pa,getDocumentElement:F,getClippingRect:xa,getOffsetParent:Ea,getElementRects:Da,getClientRects:ma,getDimensions:Sa,getScale:oa,isElement:Ri,isRTL:Oa};function Aa(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ja(e,t,n){let r=null,i,a=F(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=Xr(d),h=Xr(a.clientWidth-(u+f)),g=Xr(a.clientHeight-(d+p)),_=Xr(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Jr(0,qr(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Aa(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Li(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Ma(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=aa(e),u=i||a?[...l?na(l):[],...t?na(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?ja(l,n,a):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?ua(e):null;c&&g();function g(){let t=ua(e);h&&!Aa(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 Na=ji,Pa=Mi,Fa=Ti,Ia=Pi,La=Oi,Ra=wi,za=Ni,Ba=(e,t,n)=>{let r=new Map,i=n??{},a={...ka,...i.platform,_c:r};return Ci(e,t,{...i,platform:a})},Va=typeof document<`u`?u.useLayoutEffect:function(){};function Ha(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(!Ha(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)&&!Ha(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Ua(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Wa(e,t){let n=Ua(e);return Math.round(t*n)/n}function Ga(e){let t=u.useRef(e);return Va(()=>{t.current=e}),t}function Ka(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,[d,f]=u.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=u.useState(r);Ha(p,r)||m(r);let[h,g]=u.useState(null),[_,v]=u.useState(null),y=u.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),b=u.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||h,S=o||_,C=u.useRef(null),w=u.useRef(null),T=u.useRef(d),ee=c!=null,te=Ga(c),E=Ga(i),ne=Ga(l),re=u.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:p};E.current&&(e.platform=E.current),Ba(C.current,w.current,e).then(e=>{let t={...e,isPositioned:ne.current!==!1};ie.current&&!Ha(T.current,t)&&(T.current=t,hn.flushSync(()=>{f(t)}))})},[p,t,n,E,ne]);Va(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[l]);let ie=u.useRef(!1);Va(()=>(ie.current=!0,()=>{ie.current=!1}),[]),Va(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(te.current)return te.current(x,S,re);re()}},[x,S,re,te,ee]);let ae=u.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),oe=u.useMemo(()=>({reference:x,floating:S}),[x,S]),se=u.useMemo(()=>{let e={position:n,left:0,top:0};if(!oe.floating)return e;let t=Wa(oe.floating,d.x),r=Wa(oe.floating,d.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Ua(oe.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,oe.floating,d.x,d.y]);return u.useMemo(()=>({...d,update:re,refs:ae,elements:oe,floatingStyles:se}),[d,re,ae,oe,se])}var qa=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?{}:Ra({element:r.current,padding:i}).fn(n):r?Ra({element:r,padding:i}).fn(n):{}}}},Ja=(e,t)=>{let n=Na(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ya=(e,t)=>{let n=Pa(e);return{name:n.name,fn:n.fn,options:[e,t]}},Xa=(e,t)=>({fn:za(e).fn,options:[e,t]}),Za=(e,t)=>{let n=Fa(e);return{name:n.name,fn:n.fn,options:[e,t]}},Qa=(e,t)=>{let n=Ia(e);return{name:n.name,fn:n.fn,options:[e,t]}},$a=(e,t)=>{let n=La(e);return{name:n.name,fn:n.fn,options:[e,t]}},eo=(e,t)=>{let n=qa(e);return{name:n.name,fn:n.fn,options:[e,t]}},to=Object.defineProperty,no=(e,t)=>to(e,`name`,{value:t,configurable:!0});function ro(e){let[t,n]=u.useState(void 0);return Br(()=>{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}no(ro,`useSize`);var io=Object.defineProperty,ao=(e,t)=>io(e,`name`,{value:t,configurable:!0}),oo=`Popper`,[so,co]=An(oo),[lo,uo]=so(oo),fo=ao(e=>{let{__scopePopper:t,children:n}=e,[r,i]=u.useState(null),[a,o]=u.useState(void 0);return(0,P.jsx)(lo,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),po=`PopperAnchor`,mo=u.forwardRef(ao(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=uo(po,n),o=u.useRef(null),s=a.onAnchorChange,c=Kt(t,u.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=u.useRef(null);u.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let d=a.placementState&&bo(a.placementState),f=d?.[0],p=d?.[1];return r?null:(0,P.jsx)(Zn.div,{"data-radix-popper-side":f,"data-radix-popper-align":p,...i,ref:c})},`PopperAnchor`)),ho=`PopperContent`,[go,L]=so(ho),_o=u.forwardRef(ao(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:d=0,sticky:f=`partial`,hideWhenDetached:p=!1,updatePositionStrategy:m=`optimized`,onPlaced:h,...g}=e,_=uo(ho,n),[v,y]=u.useState(null),b=Kt(t,y),[x,S]=u.useState(null),C=ro(x),w=C?.width??0,T=C?.height??0,ee=r+(a===`center`?``:`-`+a),te=typeof d==`number`?d:{top:0,right:0,bottom:0,left:0,...d},E=Array.isArray(l)?l:[l],ne=E.length>0,re={padding:te,boundary:E.filter(vo),altBoundary:ne},{refs:ie,floatingStyles:ae,placement:oe,isPositioned:se,middlewareData:ce}=Ka({strategy:`fixed`,placement:ee,whileElementsMounted:ao((...e)=>Ma(...e,{animationFrame:m===`always`}),`whileElementsMounted`),elements:{reference:_.anchor},middleware:[Ja({mainAxis:i+T,alignmentAxis:o}),c&&Ya({mainAxis:!0,crossAxis:!1,limiter:f===`partial`?Xa():void 0,...re}),c&&Za({...re}),Qa({...re,apply:ao(({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&&eo({element:x,padding:s}),yo({arrowWidth:w,arrowHeight:T}),p&&$a({strategy:`referenceHidden`,...re,boundary:ne?re.boundary:void 0})]}),D=_.setPlacementState;Br(()=>(D(oe),()=>{D(void 0)}),[oe,D]);let[O,le]=bo(oe),ue=tr(h);Br(()=>{se&&ue?.()},[se,ue]);let de=ce.arrow?.x,fe=ce.arrow?.y,k=ce.arrow?.centerOffset!==0,[A,pe]=u.useState();return Br(()=>{v&&pe(window.getComputedStyle(v).zIndex)},[v]),(0,P.jsx)(`div`,{ref:ie.setFloating,"data-radix-popper-content-wrapper":``,style:{...ae,transform:se?ae.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:A,"--radix-popper-transform-origin":[ce.transformOrigin?.x,ce.transformOrigin?.y].join(` `),...ce.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,P.jsx)(go,{scope:n,placedSide:O,placedAlign:le,onArrowChange:S,arrowX:de,arrowY:fe,shouldHideArrow:k,children:(0,P.jsx)(Zn.div,{"data-side":O,"data-align":le,...g,ref:b,style:{...g.style,animation:se?g.style?.animation:`none`}})})})},`PopperContent`));function vo(e){return e!==null}ao(vo,`isNotNull`);var yo=ao(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]=bo(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 bo(e){let[t,n=`center`]=e.split(`-`);return[t,n]}ao(bo,`getSideAndAlignFromPlacement`);var xo=fo,So=mo,Co=_o,wo=Object.defineProperty,To=u.forwardRef(((e,t)=>wo(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=u.useState(!1);Br(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?hn.createPortal((0,P.jsx)(Zn.div,{...r,ref:t}),o):null},`Portal`)),Eo=Object.defineProperty,Do=(e,t)=>Eo(e,`name`,{value:t,configurable:!0});function Oo(e,t){return u.useReducer((e,n)=>t[e][n]??e,e)}Do(Oo,`useStateMachine`);var ko=Do(e=>{let{present:t,children:n}=e,r=Ao(t),i=typeof n==`function`?n({present:r.isPresent}):u.Children.only(n),a=Mo(r.ref,Po(i));return typeof n==`function`||r.isPresent?u.cloneElement(i,{ref:a}):null},`Presence`);function Ao(e){let[t,n]=u.useState(),r=u.useRef(null),i=u.useRef(e),a=u.useRef(`none`),o=u.useRef(void 0),[s,c]=Oo(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return u.useEffect(()=>{s===`mounted`?(a.current=o.current??No(r.current),o.current=void 0):a.current=`none`},[s]),Br(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=No(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]),Br(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=Do(a=>{let o=No(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=Do(e=>{e.target===t&&(a.current=No(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:u.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=No(t)}else r.current=null;n(e)},[])}}Do(Ao,`usePresence`);function jo(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Do(jo,`setRef`);function Mo(...e){let t=u.useRef(e);return t.current=e,u.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=jo(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():jo(n[e],null)}}},[])}Do(Mo,`useStableComposedRefs`);function No(e){return e?.animationName||`none`}Do(No,`getAnimationName`);function Po(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)}Do(Po,`getElementRef`);var Fo=Object.defineProperty,Io=(e,t)=>Fo(e,`name`,{value:t,configurable:!0}),Lo=u.useEffectEvent,Ro=u.useInsertionEffect;function zo(e){if(typeof Lo==`function`)return Lo(e);let t=u.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof Ro==`function`?Ro(()=>{t.current=e}):Br(()=>{t.current=e}),u.useMemo(()=>((...e)=>t.current?.(...e)),[])}Io(zo,`useEffectEvent`);var Bo=Object.defineProperty,Vo=(e,t)=>Bo(e,`name`,{value:t,configurable:!0}),Ho=u.useInsertionEffect||Br;function Uo({prop:e,defaultProp:t,onChange:n=Vo(()=>{},`onChange`),caller:r}){let[i,a,o]=Wo({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,u.useCallback(t=>{if(s){let n=Go(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}Vo(Uo,`useControllableState`);function Wo({defaultProp:e,onChange:t}){let[n,r]=u.useState(e),i=u.useRef(n),a=u.useRef(t);return Ho(()=>{a.current=t},[t]),u.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}Vo(Wo,`useUncontrolledState`);function Go(e){return typeof e==`function`}Vo(Go,`isFunction`);var Ko=Symbol(`RADIX:SYNC_STATE`);function qo(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=zo(o),d=[{...n,state:a}];r&&d.push(r);let[f,p]=u.useReducer((t,n)=>{if(n.type===Ko)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...d),m=f.state,h=u.useRef(m);u.useEffect(()=>{h.current!==m&&(h.current=m,c||l(m))},[m,h,c]);let g=u.useMemo(()=>i===void 0?f:{...f,state:i},[f,i]);return u.useEffect(()=>{c&&!Object.is(i,f.state)&&p({type:Ko,state:i})},[i,f.state,c]),[g,p]}Vo(qo,`useControllableStateReducer`);var Jo=Object.defineProperty,Yo=(e,t)=>Jo(e,`name`,{value:t,configurable:!0});function Xo(e){let t=u.useRef({value:e,previous:e});return u.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}Yo(Xo,`usePrevious`);var Zo=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`}),Qo=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},$o=new WeakMap,es=new WeakMap,ts={},ns=0,rs=function(e){return e&&(e.host||rs(e.parentNode))},is=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=rs(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})},as=function(e,t,n,r){var i=is(t,Array.isArray(e)?e:[e]);ts[n]||(ts[n]=new WeakMap);var a=ts[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=($o.get(e)||0)+1,l=(a.get(e)||0)+1;$o.set(e,c),a.set(e,l),o.push(e),c===1&&i&&es.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(),ns++,function(){o.forEach(function(e){var t=$o.get(e)-1,i=a.get(e)-1;$o.set(e,t),a.set(e,i),t||(es.has(e)||e.removeAttribute(r),es.delete(e)),i||e.removeAttribute(n)}),ns--,ns||($o=new WeakMap,$o=new WeakMap,es=new WeakMap,ts={})}},os=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Qo(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),as(r,i,n,`aria-hidden`)):function(){return null}},ss=function(){return ss=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},ss.apply(this,arguments)};function cs(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 ls(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 us=`right-scroll-bar-position`,ds=`width-before-scroll-bar`,fs=`with-scroll-bars-hidden`,ps=`--removed-body-scroll-bar-size`;function ms(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function hs(e,t){var n=(0,u.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 gs=typeof window<`u`?u.useLayoutEffect:u.useEffect,_s=new WeakMap;function vs(e,t){var n=hs(t||null,function(t){return e.forEach(function(e){return ms(e,t)})});return gs(function(){var t=_s.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||ms(e,null)}),i.forEach(function(e){r.has(e)||ms(e,a)})}_s.set(n,e)},[e]),n}function ys(e){return e}function bs(e,t){t===void 0&&(t=ys);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 xs(e){e===void 0&&(e={});var t=bs(null);return t.options=ss({async:!0,ssr:!1},e),t}var Ss=function(e){var t=e.sideCar,n=cs(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 u.createElement(r,ss({},n))};Ss.isSideCarExport=!0;function Cs(e,t){return e.useMedium(t),Ss}var ws=xs(),Ts=function(){},Es=u.forwardRef(function(e,t){var n=u.useRef(null),r=u.useState({onScrollCapture:Ts,onWheelCapture:Ts,onTouchMoveCapture:Ts}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=cs(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=p,C=vs([n,t]),w=ss(ss({},x),i);return u.createElement(u.Fragment,null,d&&u.createElement(S,{sideCar:ws,removeScrollBar:l,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),o?u.cloneElement(u.Children.only(s),ss(ss({},w),{ref:C})):u.createElement(y,ss({},w,{className:c,ref:C}),s))});Es.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Es.classNames={fullWidth:ds,zeroRight:us};var Ds,Os=function(){if(Ds)return Ds;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function ks(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Os();return t&&e.setAttribute(`nonce`,t),e}function As(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function js(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Ms=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ks())&&(As(t,n),js(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ns=function(){var e=Ms();return function(t,n){u.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ps=function(){var e=Ns();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Fs={left:0,top:0,right:0,gap:0},Is=function(e){return parseInt(e||``,10)||0},Ls=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[Is(n),Is(r),Is(i)]},Rs=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Fs;var t=Ls(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])}},zs=Ps(),Bs=`data-scroll-locked`,Vs=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
10
+ .${fs} {
11
+ overflow: hidden ${r};
12
+ padding-right: ${s}px ${r};
13
+ }
14
+ body[${Bs}] {
15
+ overflow: hidden ${r};
16
+ overscroll-behavior: contain;
17
+ ${[t&&`position: relative ${r};`,n===`margin`&&`
18
+ padding-left: ${i}px;
19
+ padding-top: ${a}px;
20
+ padding-right: ${o}px;
21
+ margin-left:0;
22
+ margin-top:0;
23
+ margin-right: ${s}px ${r};
24
+ `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
25
+ }
26
+
27
+ .${us} {
28
+ right: ${s}px ${r};
29
+ }
30
+
31
+ .${ds} {
32
+ margin-right: ${s}px ${r};
33
+ }
34
+
35
+ .${us} .${us} {
36
+ right: 0 ${r};
37
+ }
38
+
39
+ .${ds} .${ds} {
40
+ margin-right: 0 ${r};
41
+ }
42
+
43
+ body[${Bs}] {
44
+ ${ps}: ${s}px;
45
+ }
46
+ `},Hs=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Us=function(){u.useEffect(function(){return document.body.setAttribute(Bs,(Hs()+1).toString()),function(){var e=Hs()-1;e<=0?document.body.removeAttribute(Bs):document.body.setAttribute(Bs,e.toString())}},[])},Ws=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Us();var a=u.useMemo(function(){return Rs(i)},[i]);return u.createElement(zs,{styles:Vs(a,!t,i,n?``:`!important`)})},Gs=!1;if(typeof window<`u`)try{var Ks=Object.defineProperty({},"passive",{get:function(){return Gs=!0,!0}});window.addEventListener(`test`,Ks,Ks),window.removeEventListener(`test`,Ks,Ks)}catch{Gs=!1}var qs=Gs?{passive:!1}:!1,Js=function(e){return e.tagName===`TEXTAREA`},Ys=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Js(e)&&n[t]===`visible`)},Xs=function(e){return Ys(e,`overflowY`)},Zs=function(e){return Ys(e,`overflowX`)},Qs=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),tc(e,r)){var i=nc(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},$s=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},ec=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},tc=function(e,t){return e===`v`?Xs(t):Zs(t)},nc=function(e,t){return e===`v`?$s(t):ec(t)},rc=function(e,t){return e===`h`&&t===`rtl`?-1:1},ic=function(e,t,n,r,i){var a=rc(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=nc(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&tc(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},ac=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},oc=function(e){return[e.deltaX,e.deltaY]},sc=function(e){return e&&`current`in e?e.current:e},cc=function(e,t){return e[0]===t[0]&&e[1]===t[1]},lc=function(e){return`
47
+ .block-interactivity-${e} {pointer-events: none;}
48
+ .allow-interactivity-${e} {pointer-events: all;}
49
+ `},uc=0,dc=[];function fc(e){var t=u.useRef([]),n=u.useRef([0,0]),r=u.useRef(),i=u.useState(uc++)[0],a=u.useState(Ps)[0],o=u.useRef(e);u.useEffect(function(){o.current=e},[e]),u.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=ls([e.lockRef.current],(e.shards||[]).map(sc),!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=u.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=ac(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=Qs(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Qs(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 ic(h,t,e,h===`h`?s:c,!0)},[]),c=u.useCallback(function(e){var n=e;if(!(!dc.length||dc[dc.length-1]!==a)){var r=`deltaY`in n?oc(n):ac(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&cc(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(sc).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=u.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:pc(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=u.useCallback(function(e){n.current=ac(e),r.current=void 0},[]),f=u.useCallback(function(t){l(t.type,oc(t),t.target,s(t,e.lockRef.current))},[]),p=u.useCallback(function(t){l(t.type,ac(t),t.target,s(t,e.lockRef.current))},[]);u.useEffect(function(){return dc.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener(`wheel`,c,qs),document.addEventListener(`touchmove`,c,qs),document.addEventListener(`touchstart`,d,qs),function(){dc=dc.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,qs),document.removeEventListener(`touchmove`,c,qs),document.removeEventListener(`touchstart`,d,qs)}},[]);var m=e.removeScrollBar,h=e.inert;return u.createElement(u.Fragment,null,h?u.createElement(a,{styles:lc(i)}):null,m?u.createElement(Ws,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function pc(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var mc=Cs(ws,fc),hc=u.forwardRef(function(e,t){return u.createElement(Es,ss({},e,{ref:t,sideCar:mc}))});hc.classNames=Es.classNames;var gc=Object.defineProperty,R=(e,t)=>gc(e,`name`,{value:t,configurable:!0}),_c=[` `,`Enter`,`ArrowUp`,`ArrowDown`],vc=[` `,`Enter`],yc=`Select`,[bc,xc,Sc]=Pn(yc),[Cc,wc]=An(yc,[Sc,co]),Tc=co(),[Ec,Dc]=Cc(yc),[Oc,kc]=Cc(yc);function Ac(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:d,autoComplete:f,disabled:p,required:m,form:h,internal_do_not_use_render:g}=e,_=Tc(t),[v,y]=u.useState(null),[b,x]=u.useState(null),[S,C]=u.useState(!1),w=Jn(l),[T,ee]=Uo({prop:r,defaultProp:i??!1,onChange:a,caller:yc}),[te,E]=Uo({prop:o,defaultProp:s,onChange:c,caller:yc}),ne=u.useRef(null),re=u.useRef(te);u.useEffect(()=>{let e=h?v?.ownerDocument.getElementById(h):v?.form;if(e instanceof HTMLFormElement){let t=R(()=>E(re.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[h,v,E]);let ie=!v||!!h||!!v.closest(`form`),[ae,oe]=u.useState(new Set),se=Gr(),ce=Array.from(ae).map(e=>e.props.value).join(`;`),D=u.useCallback(e=>{oe(t=>new Set(t).add(e))},[]),O=u.useCallback(e=>{oe(t=>{let n=new Set(t);return n.delete(e),n})},[]),le={required:m,trigger:v,onTriggerChange:y,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:se,value:te,onValueChange:E,open:T,onOpenChange:ee,dir:w,triggerPointerDownPosRef:ne,disabled:p,name:d,autoComplete:f,form:h,nativeOptions:ae,nativeSelectKey:ce,isFormControl:ie};return(0,P.jsx)(xo,{..._,children:(0,P.jsx)(Ec,{scope:t,...le,children:(0,P.jsx)(bc.Provider,{scope:t,children:(0,P.jsx)(Oc,{scope:t,onNativeOptionAdd:D,onNativeOptionRemove:O,children:gl(g)?g(le):n})})})})}R(Ac,`SelectProvider`);var jc=R(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,P.jsx)(Ac,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,P.jsxs)(P.Fragment,{children:[n,e?(0,P.jsx)(hl,{__scopeSelect:t}):null]})})},`Select`),Mc=`SelectTrigger`,Nc=u.forwardRef(R(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=Tc(n),o=Dc(Mc,n),s=o.disabled||r,c=Kt(t,o.onTriggerChange),l=xc(n),d=u.useRef(`touch`),[f,p,m]=vl(e=>{let t=l().filter(e=>!e.disabled),n=yl(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),h=R(e=>{s||(o.onOpenChange(!0),m()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},`handleOpen`);return(0,P.jsx)(So,{asChild:!0,...a,children:(0,P.jsx)(Zn.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":_l(o.value)?``:void 0,...i,ref:c,onClick:Sn(i.onClick,e=>{e.currentTarget.focus(),d.current!==`mouse`&&h(e)}),onPointerDown:Sn(i.onPointerDown,e=>{d.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(h(e),e.preventDefault())}),onKeyDown:Sn(i.onKeyDown,e=>{let t=f.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&p(e.key),!(t&&e.key===` `)&&_c.includes(e.key)&&(h(),e.preventDefault())})})})},`SelectTrigger`)),Pc=`SelectValue`,Fc=u.forwardRef(R(function(e,t){let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=Dc(Pc,n),{onValueNodeHasChildrenChange:l}=c,d=a!==void 0,f=Kt(t,c.onValueNodeChange);Br(()=>{l(d)},[l,d]);let p=_l(c.value);return(0,P.jsx)(Zn.span,{...s,asChild:!p&&s.asChild,ref:f,style:{pointerEvents:`none`},children:(0,P.jsx)(u.Fragment,{children:p?o:a},p?`placeholder`:`value`)})},`SelectValue`)),Ic=u.forwardRef(R(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return(0,P.jsx)(Zn.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[Lc,Rc]=Cc(`SelectPortal`,{forceMount:void 0}),zc=R(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,P.jsx)(Lc,{scope:e.__scopeSelect,forceMount:n,children:(0,P.jsx)(To,{asChild:!0,...r})})},`SelectPortal`),Bc=`SelectContent`,Vc=u.forwardRef(R(function(e,t){let n=Rc(Bc,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=Dc(Bc,e.__scopeSelect),[o,s]=u.useState();return Br(()=>{s(new DocumentFragment)},[]),(0,P.jsx)(ko,{present:r||a.open,children:({present:e})=>e?(0,P.jsx)(Kc,{...i,ref:t}):(0,P.jsx)(Hc,{...i,fragment:o})})},`SelectContent`)),Hc=u.forwardRef(R(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?hn.createPortal((0,P.jsx)(Uc,{scope:n,children:(0,P.jsx)(bc.Slot,{scope:n,children:(0,P.jsx)(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),z=10,[Uc,Wc]=Cc(Bc),Gc=Yt(`SelectContent.RemoveScroll`),Kc=u.forwardRef(R(function(e,t){let{__scopeSelect:n}=e,{position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:h,hideWhenDetached:g,avoidCollisions:_,...v}=e,y=Dc(Bc,n),[b,x]=u.useState(null),[S,C]=u.useState(null),w=Kt(t,x),[T,ee]=u.useState(null),[te,E]=u.useState(null),ne=xc(n),[re,ie]=u.useState(!1),ae=u.useRef(!1);u.useEffect(()=>{if(b)return os(b)},[b]),xr();let oe=u.useCallback(e=>{let[t,...n]=ne().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},[ne,S]),se=u.useCallback(()=>oe([T,b]),[oe,T,b]);u.useEffect(()=>{re&&se()},[re,se]);let{onOpenChange:ce,triggerPointerDownPosRef:D}=y;u.useEffect(()=>{if(b){let e={x:0,y:0},t=R(t=>{e={x:Math.abs(Math.round(t.pageX)-(D.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(D.current?.y??0))}},`handlePointerMove`),n=R(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(b)||ce(!1),document.removeEventListener(`pointermove`,t),D.current=null},`handlePointerUp`);return D.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[b,ce,D]),u.useEffect(()=>{let e=R(()=>ce(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[ce]);let[O,le]=vl(e=>{let t=ne().filter(e=>!e.disabled),n=yl(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),ue=u.useCallback((e,t,n)=>{let r=!ae.current&&!n;(y.value!==void 0&&y.value===t||r)&&(ee(e),r&&(ae.current=!0))},[y.value]),de=u.useCallback(()=>b?.focus(),[b]),fe=u.useCallback((e,t,n)=>{let r=!ae.current&&!n;(y.value!==void 0&&y.value===t||r)&&E(e)},[y.value]),k=r===`popper`?Jc:qc,A=k===Jc?{side:s,sideOffset:c,align:l,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:h,hideWhenDetached:g,avoidCollisions:_}:{};return(0,P.jsx)(Uc,{scope:n,content:b,viewport:S,onViewportChange:C,itemRefCallback:ue,selectedItem:T,onItemLeave:de,itemTextRefCallback:fe,focusSelectedItem:se,selectedItemText:te,position:r,isPositioned:re,searchRef:O,children:(0,P.jsx)(hc,{as:Gc,allowPinchZoom:!0,children:(0,P.jsx)(Or,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Sn(i,e=>{y.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,P.jsx)(lr,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:(0,P.jsx)(k,{role:`listbox`,id:y.contentId,"data-state":y.open?`open`:`closed`,dir:y.dir,onContextMenu:e=>e.preventDefault(),...v,...A,onPlaced:()=>ie(!0),ref:w,style:{display:`flex`,flexDirection:`column`,outline:`none`,...v.style},onKeyDown:Sn(v.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&le(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=ne().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(()=>oe(t)),e.preventDefault()}})})})})})})},`SelectContentImpl`)),qc=u.forwardRef(R(function(e,t){let{__scopeSelect:n,onPlaced:r,...i}=e,a=Dc(Bc,n),o=Wc(Bc,n),[s,c]=u.useState(null),[l,d]=u.useState(null),f=Kt(t,d),p=xc(n),m=u.useRef(!1),h=u.useRef(!0),{viewport:g,selectedItem:_,selectedItemText:v,focusSelectedItem:y}=o,b=u.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&g&&_&&v){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=v.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-z,d=vn(a,[z,Math.max(z,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-z,d=vn(a,[z,Math.max(z,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=p(),c=window.innerHeight-z*2,u=g.scrollHeight,d=window.getComputedStyle(l),f=parseInt(d.borderTopWidth,10),h=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=f+h+u+b+y,S=Math.min(_.offsetHeight*5,x),C=window.getComputedStyle(g),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),ee=e.top+e.height/2-z,te=c-ee,E=_.offsetHeight/2,ne=_.offsetTop+E,re=f+h+ne,ie=x-re;if(re<=ee){let e=o.length>0&&_===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-g.offsetTop-g.offsetHeight,n=re+Math.max(te,E+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&_===o[0].ref.current;s.style.top=`0px`;let t=Math.max(ee,f+g.offsetTop+(e?w:0)+E)+ie;s.style.height=t+`px`,g.scrollTop=re-ee+g.offsetTop}s.style.margin=`${z}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>m.current=!0)}},[p,a.trigger,a.valueNode,s,l,g,_,v,a.dir,r]);Br(()=>b(),[b]);let[x,S]=u.useState();return Br(()=>{l&&S(window.getComputedStyle(l).zIndex)},[l]),(0,P.jsx)(Yc,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:m,onScrollButtonChange:u.useCallback(e=>{e&&h.current===!0&&(b(),y?.(),h.current=!1)},[b,y]),children:(0,P.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:x},children:(0,P.jsx)(Zn.div,{...i,ref:f,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})},`SelectItemAlignedPosition`)),Jc=u.forwardRef(R(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=z,...a}=e,o=Tc(n);return(0,P.jsx)(Co,{...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`)),[Yc,Xc]=Cc(Bc,{}),Zc=`SelectViewport`,Qc=u.forwardRef(R(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=Wc(Zc,n),o=Xc(Zc,n),s=Kt(t,a.onViewportChange),c=u.useRef(0);return(0,P.jsxs)(P.Fragment,{children:[(0,P.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,P.jsx)(bc.Slot,{scope:n,children:(0,P.jsx)(Zn.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:Sn(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-z*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`)),[$c,el]=Cc(`SelectGroup`),tl=`SelectItem`,[nl,rl]=Cc(tl),il=u.forwardRef(R(function(e,t){let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=Dc(tl,n),c=Wc(tl,n),l=s.value===r,[d,f]=u.useState(a??``),[p,m]=u.useState(!1),h=Kt(t,tr(e=>c.itemRefCallback?.(e,r,i))),g=Gr(),_=u.useRef(`touch`),v=R(()=>{i||(s.onValueChange(r),s.onOpenChange(!1))},`handleSelect`);return(0,P.jsx)(nl,{scope:n,value:r,disabled:i,textId:g,isSelected:l,onItemTextChange:u.useCallback(e=>{f(t=>t||(e?.textContent??``).trim())},[]),children:(0,P.jsx)(bc.ItemSlot,{scope:n,value:r,disabled:i,textValue:d,children:(0,P.jsx)(Zn.div,{role:`option`,"aria-labelledby":g,"data-highlighted":p?``:void 0,"aria-selected":l&&p,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:h,onFocus:Sn(o.onFocus,()=>m(!0)),onBlur:Sn(o.onBlur,()=>m(!1)),onClick:Sn(o.onClick,()=>{_.current!==`mouse`&&v()}),onPointerUp:Sn(o.onPointerUp,()=>{_.current===`mouse`&&v()}),onPointerDown:Sn(o.onPointerDown,e=>{_.current=e.pointerType}),onPointerMove:Sn(o.onPointerMove,e=>{_.current=e.pointerType,i?c.onItemLeave?.():_.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Sn(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:Sn(o.onKeyDown,e=>{i||e.target!==e.currentTarget||c.searchRef?.current!==``&&e.key===` `||(vc.includes(e.key)&&v(),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),al=`SelectItemText`,ol=u.forwardRef(R(function(e,t){let{__scopeSelect:n,className:r,style:i,...a}=e,o=Dc(al,n),s=Wc(al,n),c=rl(al,n),l=kc(al,n),[d,f]=u.useState(null),p=tr(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),m=Kt(t,f,c.onItemTextChange,p),h=d?.textContent,g=u.useMemo(()=>(0,P.jsx)(`option`,{value:c.value,disabled:c.disabled,children:h},c.value),[c.disabled,c.value,h]),{onNativeOptionAdd:_,onNativeOptionRemove:v}=l;return Br(()=>(_(g),()=>v(g)),[_,v,g]),(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Zn.span,{id:c.textId,...a,ref:m}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!_l(o.value)?hn.createPortal(a.children,o.valueNode):null]})},`SelectItemText`)),sl=`SelectItemIndicator`,cl=u.forwardRef(R(function(e,t){let{__scopeSelect:n,...r}=e;return rl(sl,n).isSelected?(0,P.jsx)(Zn.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),ll=`SelectScrollUpButton`,ul=u.forwardRef(R(function(e,t){let n=Wc(ll,e.__scopeSelect),r=Xc(ll,e.__scopeSelect),[i,a]=u.useState(!1),o=Kt(t,r.onScrollButtonChange);return Br(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollTop>0;a(e)};R(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,P.jsx)(pl,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null},`SelectScrollUpButton`)),dl=`SelectScrollDownButton`,fl=u.forwardRef(R(function(e,t){let n=Wc(dl,e.__scopeSelect),r=Xc(dl,e.__scopeSelect),[i,a]=u.useState(!1),o=Kt(t,r.onScrollButtonChange);return Br(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};R(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,P.jsx)(pl,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null},`SelectScrollDownButton`)),pl=u.forwardRef(R(function(e,t){let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=Wc(`SelectScrollButton`,n),o=u.useRef(null),s=xc(n),c=u.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return u.useEffect(()=>()=>c(),[c]),Br(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,P.jsx)(Zn.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Sn(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:Sn(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:Sn(i.onPointerLeave,()=>{c()})})},`SelectScrollButtonImpl`)),ml=`SelectBubbleInput`,hl=u.forwardRef(R(function({__scopeSelect:e,...t},n){let r=Dc(ml,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:d}=r,{nativeOptions:f,nativeSelectKey:p}=r,m=u.useRef(null),h=Kt(n,m),g=i??``,_=Xo(g),v=Array.from(f).some(e=>(e.props.value??``)===``);return u.useEffect(()=>{let e=m.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(_!==g&&n){let t=new Event(`change`,{bubbles:!0});n.call(e,g),e.dispatchEvent(t)}},[_,g]),(0,P.jsxs)(Zn.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:d,onChange:e=>a(e.target.value),...t,style:{...Zo,...t.style},ref:h,defaultValue:g,children:[_l(i)&&!v?(0,P.jsx)(`option`,{value:``}):null,Array.from(f)]},p)},`SelectBubbleInput`));function gl(e){return typeof e==`function`}R(gl,`isFunction`);function _l(e){return e===``||e===void 0}R(_l,`shouldShowPlaceholder`);function vl(e){let t=tr(e),n=u.useRef(``),r=u.useRef(0),i=u.useCallback(e=>{let i=n.current+e;t(i),R((function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(i)},[t]),a=u.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return u.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}R(vl,`useTypeaheadSearch`);function yl(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=bl(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}R(yl,`findNextItem`);function bl(e,t){return e.map((n,r)=>e[(t+r)%e.length])}R(bl,`wrapArray`);var xl=jc,Sl=Fc;function Cl({className:e,children:t,...n}){return(0,P.jsxs)(Nc,{"data-slot":`select-trigger`,className:Pt(`flex items-center justify-between gap-1.5 rounded-md border border-line bg-surface/60 px-2 py-1 text-xs text-ink-dim transition-colors`,`enabled:hover:border-line-strong enabled:hover:text-ink`,`focus-visible:ring-2 focus-visible:ring-brand/50 focus-visible:outline-none`,`disabled:cursor-not-allowed disabled:opacity-50`,`[&>span]:min-w-0 [&>span]:truncate`,e),...n,children:[t,(0,P.jsx)(Ic,{asChild:!0,children:(0,P.jsx)(C,{className:`size-3 shrink-0 opacity-60`})})]})}function wl({className:e,children:t,position:n=`popper`,...r}){return(0,P.jsx)(zc,{children:(0,P.jsxs)(Vc,{"data-slot":`select-content`,position:n,sideOffset:4,className:Pt(`relative z-50 min-w-[8rem] overflow-hidden rounded-lg border border-line-strong bg-surface text-xs text-ink-dim shadow-xl shadow-black/50`,`data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]: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-1 data-[side=top]:slide-in-from-bottom-1`,n===`popper`&&`max-h-[var(--radix-select-content-available-height)] min-w-[var(--radix-select-trigger-width)]`,e),...r,children:[(0,P.jsx)(El,{direction:`up`}),(0,P.jsx)(Qc,{className:`p-1`,children:t}),(0,P.jsx)(El,{direction:`down`})]})})}function Tl({className:e,children:t,...n}){return(0,P.jsxs)(il,{"data-slot":`select-item`,className:Pt(`relative flex cursor-pointer items-center rounded-md py-1 pr-6 pl-2 outline-none select-none`,`focus:bg-brand/15 focus:text-brand data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),...n,children:[(0,P.jsx)(`span`,{className:`absolute right-1.5 flex size-3 items-center justify-center`,children:(0,P.jsx)(cl,{children:(0,P.jsx)(S,{className:`size-3`})})}),(0,P.jsx)(ol,{children:t})]})}function El({direction:e}){let t=e===`up`?ul:fl,n=e===`up`?w:C;return(0,P.jsx)(t,{"data-slot":`select-scroll-${e}`,className:`flex cursor-default items-center justify-center py-1 text-ink-faint`,children:(0,P.jsx)(n,{className:`size-3`})})}var Dl=`browsentic/action`,Ol=`browsentic/bridge`,kl=e=>({ok:!0,data:e}),Al=(e,t)=>({ok:!1,error:{code:e,message:t}});new TextEncoder,new TextDecoder;var jl;function B(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 Ml=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Nl=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(jl=globalThis).__zod_globalConfig??(jl.__zod_globalConfig={});var Pl=globalThis.__zod_globalConfig;function Fl(e){return e&&Object.assign(Pl,e),Pl}function Il(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 Ll(e,t){return typeof t==`bigint`?t.toString():t}function Rl(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error(`cached value already set`)}}}function zl(e){return e==null}function Bl(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function Vl(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 Hl=Symbol(`evaluating`);function Ul(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Hl)return r===void 0&&(r=Hl,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function V(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function H(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function U(e){return JSON.stringify(e)}function W(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var G=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Wl(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Gl=Rl(()=>{if(Pl.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function Kl(e){if(Wl(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(Wl(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function ql(e){return Kl(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var Jl=new Set([`string`,`number`,`symbol`]);function Yl(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Xl(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function K(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 Zl(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var Ql={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function $l(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 Xl(e,H(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 V(this,`shape`,e),e},checks:[]}))}function eu(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 Xl(e,H(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 V(this,`shape`,r),r},checks:[]}))}function tu(e,t){if(!Kl(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 Xl(e,H(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return V(this,`shape`,n),n}}))}function nu(e,t){if(!Kl(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return Xl(e,H(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return V(this,`shape`,n),n}}))}function ru(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return Xl(e,H(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return V(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function iu(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 Xl(t,H(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 V(this,`shape`,i),i},checks:[]}))}function au(e,t,n){return Xl(t,H(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 V(this,`shape`,i),i}}))}function ou(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 su(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 cu(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function lu(e){return typeof e==`string`?e:e?.message}function uu(e,t,n){let r=e.message?e.message:lu(e.inst?._zod.def?.error?.(e))??lu(t?.error?.(e))??lu(n.customError?.(e))??lu(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 du(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function fu(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var pu=(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,Ll,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},mu=B(`$ZodError`,pu),hu=B(`$ZodError`,pu,{Parent:Error});function gu(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 _u(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 vu=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 Ml;if(o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>uu(e,a,Fl())));throw G(t,i?.callee),t}return o.value},yu=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=>uu(e,a,Fl())));throw G(t,i?.callee),t}return o.value},bu=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 Ml;return a.issues.length?{success:!1,error:new(e??mu)(a.issues.map(e=>uu(e,i,Fl())))}:{success:!0,data:a.value}},xu=bu(hu),Su=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=>uu(e,i,Fl())))}:{success:!0,data:a.value}},Cu=Su(hu),wu=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return vu(e)(t,n,i)},Tu=e=>(t,n,r)=>vu(e)(t,n,r),Eu=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return yu(e)(t,n,i)},Du=e=>async(t,n,r)=>yu(e)(t,n,r),Ou=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return bu(e)(t,n,i)},ku=e=>(t,n,r)=>bu(e)(t,n,r),Au=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Su(e)(t,n,i)},ju=e=>async(t,n,r)=>Su(e)(t,n,r),Mu=/^[cC][0-9a-z]{6,}$/,Nu=/^[0-9a-z]+$/,Pu=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Fu=/^[0-9a-vA-V]{20}$/,Iu=/^[A-Za-z0-9]{27}$/,Lu=/^[a-zA-Z0-9_-]{21}$/,Ru=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,zu=/^([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})$/,Bu=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)$/,Vu=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Hu=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function Uu(){return new RegExp(Hu,`u`)}var Wu=/^(?:(?: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])$/,Gu=/^(([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}|:))$/,Ku=/^((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])$/,qu=/^(([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])$/,Ju=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,q=/^[A-Za-z0-9_-]*$/,Yu=/^https?$/,Xu=/^\+[1-9]\d{6,14}$/,Zu=`(?:(?:\\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])))`,Qu=RegExp(`^${Zu}$`);function $u(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 ed(e){return RegExp(`^${$u(e)}$`)}function td(e){let t=$u({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(`^${Zu}T(?:${r})$`)}var nd=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},rd=/^-?\d+$/,id=/^-?\d+(?:\.\d+)?$/,ad=/^(?:true|false)$/i,od=/^[^A-Z]*$/,sd=/^[^a-z]*$/,cd=B(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),ld={number:`number`,bigint:`bigint`,object:`date`},ud=B(`$ZodCheckLessThan`,(e,t)=>{cd.init(e,t);let n=ld[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})}}),dd=B(`$ZodCheckGreaterThan`,(e,t)=>{cd.init(e,t);let n=ld[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})}}),fd=B(`$ZodCheckMultipleOf`,(e,t)=>{cd.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):Vl(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})}}),pd=B(`$ZodCheckNumberFormat`,(e,t)=>{cd.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Ql[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=rd)}),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})}}),md=B(`$ZodCheckMaxLength`,(e,t)=>{var n;cd.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!zl(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=du(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),hd=B(`$ZodCheckMinLength`,(e,t)=>{var n;cd.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!zl(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=du(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),gd=B(`$ZodCheckLengthEquals`,(e,t)=>{var n;cd.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!zl(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=du(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})}}),_d=B(`$ZodCheckStringFormat`,(e,t)=>{var n,r;cd.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=()=>{})}),vd=B(`$ZodCheckRegex`,(e,t)=>{_d.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})}}),yd=B(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=od,_d.init(e,t)}),bd=B(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=sd,_d.init(e,t)}),xd=B(`$ZodCheckIncludes`,(e,t)=>{cd.init(e,t);let n=Yl(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})}}),Sd=B(`$ZodCheckStartsWith`,(e,t)=>{cd.init(e,t);let n=RegExp(`^${Yl(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})}}),Cd=B(`$ZodCheckEndsWith`,(e,t)=>{cd.init(e,t);let n=RegExp(`.*${Yl(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})}}),J=B(`$ZodCheckOverwrite`,(e,t)=>{cd.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),wd=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(`
50
+ `).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(`
51
+ `))}},Td={major:4,minor:4,patch:3},Ed=B(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Td;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=ou(e),i;for(let a of t){if(a._zod.def.when){if(su(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 Ml;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=ou(e,t))});else{if(e.issues.length===t)continue;r||=ou(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(ou(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new Ml;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 Ml;return o.then(e=>t(e,r,a))}return t(o,r,a)}}Ul(e,`~standard`,()=>({validate:t=>{try{let n=xu(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Cu(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),Dd=B(`$ZodString`,(e,t)=>{Ed.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??nd(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}}),Od=B(`$ZodStringFormat`,(e,t)=>{_d.init(e,t),Dd.init(e,t)}),kd=B(`$ZodGUID`,(e,t)=>{t.pattern??=zu,Od.init(e,t)}),Ad=B(`$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??=Bu(e)}else t.pattern??=Bu();Od.init(e,t)}),jd=B(`$ZodEmail`,(e,t)=>{t.pattern??=Vu,Od.init(e,t)}),Md=B(`$ZodURL`,(e,t)=>{Od.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===Yu.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})}}}),Nd=B(`$ZodEmoji`,(e,t)=>{t.pattern??=Uu(),Od.init(e,t)}),Pd=B(`$ZodNanoID`,(e,t)=>{t.pattern??=Lu,Od.init(e,t)}),Fd=B(`$ZodCUID`,(e,t)=>{t.pattern??=Mu,Od.init(e,t)}),Id=B(`$ZodCUID2`,(e,t)=>{t.pattern??=Nu,Od.init(e,t)}),Ld=B(`$ZodULID`,(e,t)=>{t.pattern??=Pu,Od.init(e,t)}),Rd=B(`$ZodXID`,(e,t)=>{t.pattern??=Fu,Od.init(e,t)}),zd=B(`$ZodKSUID`,(e,t)=>{t.pattern??=Iu,Od.init(e,t)}),Bd=B(`$ZodISODateTime`,(e,t)=>{t.pattern??=td(t),Od.init(e,t)}),Vd=B(`$ZodISODate`,(e,t)=>{t.pattern??=Qu,Od.init(e,t)}),Hd=B(`$ZodISOTime`,(e,t)=>{t.pattern??=ed(t),Od.init(e,t)}),Ud=B(`$ZodISODuration`,(e,t)=>{t.pattern??=Ru,Od.init(e,t)}),Wd=B(`$ZodIPv4`,(e,t)=>{t.pattern??=Wu,Od.init(e,t),e._zod.bag.format=`ipv4`}),Gd=B(`$ZodIPv6`,(e,t)=>{t.pattern??=Gu,Od.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})}}}),Kd=B(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Ku,Od.init(e,t)}),qd=B(`$ZodCIDRv6`,(e,t)=>{t.pattern??=qu,Od.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 Jd(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Yd=B(`$ZodBase64`,(e,t)=>{t.pattern??=Ju,Od.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{Jd(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function Xd(e){if(!q.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Jd(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Zd=B(`$ZodBase64URL`,(e,t)=>{t.pattern??=q,Od.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{Xd(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Qd=B(`$ZodE164`,(e,t)=>{t.pattern??=Xu,Od.init(e,t)});function $d(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 ef=B(`$ZodJWT`,(e,t)=>{Od.init(e,t),e._zod.check=n=>{$d(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),tf=B(`$ZodNumber`,(e,t)=>{Ed.init(e,t),e._zod.pattern=e._zod.bag.pattern??id,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}}),nf=B(`$ZodNumberFormat`,(e,t)=>{pd.init(e,t),tf.init(e,t)}),rf=B(`$ZodBoolean`,(e,t)=>{Ed.init(e,t),e._zod.pattern=ad,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}}),af=B(`$ZodUnknown`,(e,t)=>{Ed.init(e,t),e._zod.parse=e=>e}),of=B(`$ZodNever`,(e,t)=>{Ed.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function sf(e,t,n){e.issues.length&&t.issues.push(...cu(n,e.issues)),t.value[n]=e.value}var cf=B(`$ZodArray`,(e,t)=>{Ed.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=>sf(t,n,e))):sf(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function lf(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...cu(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 uf(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=Zl(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function df(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=>lf(e,n,i,t,u,d))):lf(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 ff=B(`$ZodObject`,(e,t)=>{if(Ed.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=Rl(()=>uf(t));Ul(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=Wl,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=>lf(n,t,e,s,r,i))):lf(a,t,e,s,r,i)}return i?df(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),pf=B(`$ZodObjectJIT`,(e,t)=>{ff.init(e,t);let n=e._zod.parse,r=Rl(()=>uf(t)),i=e=>{let t=new wd([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=U(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=U(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`
52
+ if (${n}.issues.length) {
53
+ if (${o} in input) {
54
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
55
+ ...iss,
56
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
57
+ })));
58
+ }
59
+ }
60
+
61
+ if (${n}.value === undefined) {
62
+ if (${o} in input) {
63
+ newResult[${o}] = undefined;
64
+ }
65
+ } else {
66
+ newResult[${o}] = ${n}.value;
67
+ }
68
+
69
+ `):c?t.write(`
70
+ if (${n}.issues.length) {
71
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
72
+ ...iss,
73
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
74
+ })));
75
+ }
76
+
77
+ if (${n}.value === undefined) {
78
+ if (${o} in input) {
79
+ newResult[${o}] = undefined;
80
+ }
81
+ } else {
82
+ newResult[${o}] = ${n}.value;
83
+ }
84
+
85
+ `):t.write(`
86
+ const ${n}_present = ${o} in input;
87
+ if (${n}.issues.length) {
88
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
89
+ ...iss,
90
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
91
+ })));
92
+ }
93
+ if (!${n}_present && !${n}.issues.length) {
94
+ payload.issues.push({
95
+ code: "invalid_type",
96
+ expected: "nonoptional",
97
+ input: undefined,
98
+ path: [${o}]
99
+ });
100
+ }
101
+
102
+ if (${n}_present) {
103
+ if (${n}.value === undefined) {
104
+ newResult[${o}] = undefined;
105
+ } else {
106
+ newResult[${o}] = ${n}.value;
107
+ }
108
+ }
109
+
110
+ `)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=Wl,s=!Pl.jitless,c=s&&Gl.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?df([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function mf(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=>!ou(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=>uu(e,r,Fl())))}),t)}var hf=B(`$ZodUnion`,(e,t)=>{Ed.init(e,t),Ul(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),Ul(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),Ul(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),Ul(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=>Bl(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=>mf(t,r,e,i)):mf(o,r,e,i)}}),gf=B(`$ZodIntersection`,(e,t)=>{Ed.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])=>vf(e,t,n)):vf(e,i,a)}});function _f(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Kl(e)&&Kl(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=_f(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=_f(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 vf(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}),ou(e))return e;let o=_f(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var yf=B(`$ZodRecord`,(e,t)=>{Ed.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Kl(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=>uu(e,r,Fl())),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(...cu(c,e.issues)),n.value[l]=e.value})):(u.issues.length&&n.issues.push(...cu(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`&&id.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=>uu(e,r,Fl())),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(...cu(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...cu(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),bf=B(`$ZodEnum`,(e,t)=>{Ed.init(e,t);let n=Il(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>Jl.has(typeof e)).map(e=>typeof e==`string`?Yl(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}}),xf=B(`$ZodTransform`,(e,t)=>{Ed.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Nl(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 Ml;return n.value=i,n.fallback=!0,n}});function Sf(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var Cf=B(`$ZodOptional`,(e,t)=>{Ed.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,Ul(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Ul(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Bl(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=>Sf(e,r)):Sf(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),wf=B(`$ZodExactOptional`,(e,t)=>{Cf.init(e,t),Ul(e._zod,`values`,()=>t.innerType._zod.values),Ul(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Tf=B(`$ZodNullable`,(e,t)=>{Ed.init(e,t),Ul(e._zod,`optin`,()=>t.innerType._zod.optin),Ul(e._zod,`optout`,()=>t.innerType._zod.optout),Ul(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Bl(e.source)}|null)$`):void 0}),Ul(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)}),Ef=B(`$ZodDefault`,(e,t)=>{Ed.init(e,t),e._zod.optin=`optional`,Ul(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=>Df(e,t)):Df(r,t)}});function Df(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Of=B(`$ZodPrefault`,(e,t)=>{Ed.init(e,t),e._zod.optin=`optional`,Ul(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))}),kf=B(`$ZodNonOptional`,(e,t)=>{Ed.init(e,t),Ul(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=>Af(t,e)):Af(i,e)}});function Af(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 jf=B(`$ZodCatch`,(e,t)=>{Ed.init(e,t),e._zod.optin=`optional`,Ul(e._zod,`optout`,()=>t.innerType._zod.optout),Ul(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=>uu(e,n,Fl()))},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=>uu(e,n,Fl()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),Mf=B(`$ZodPipe`,(e,t)=>{Ed.init(e,t),Ul(e._zod,`values`,()=>t.in._zod.values),Ul(e._zod,`optin`,()=>t.in._zod.optin),Ul(e._zod,`optout`,()=>t.out._zod.optout),Ul(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=>Nf(e,t.in,n)):Nf(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Nf(e,t.out,n)):Nf(r,t.out,n)}});function Nf(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 Pf=B(`$ZodReadonly`,(e,t)=>{Ed.init(e,t),Ul(e._zod,`propValues`,()=>t.innerType._zod.propValues),Ul(e._zod,`values`,()=>t.innerType._zod.values),Ul(e._zod,`optin`,()=>t.innerType?._zod?.optin),Ul(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(Ff):Ff(r)}});function Ff(e){return e.value=Object.freeze(e.value),e}var If=B(`$ZodCustom`,(e,t)=>{cd.init(e,t),Ed.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=>Lf(t,n,r,e));Lf(i,n,r,e)}});function Lf(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(fu(e))}}var Rf,zf=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 Bf(){return new zf}(Rf=globalThis).__zod_globalRegistry??(Rf.__zod_globalRegistry=Bf());var Vf=globalThis.__zod_globalRegistry;function Hf(e,t){return new e({type:`string`,...K(t)})}function Uf(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...K(t)})}function Wf(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...K(t)})}function Gf(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...K(t)})}function Kf(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...K(t)})}function qf(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...K(t)})}function Jf(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...K(t)})}function Yf(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...K(t)})}function Xf(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...K(t)})}function Zf(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...K(t)})}function Qf(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...K(t)})}function $f(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...K(t)})}function ep(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...K(t)})}function tp(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...K(t)})}function np(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...K(t)})}function rp(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...K(t)})}function ip(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...K(t)})}function ap(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...K(t)})}function op(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...K(t)})}function sp(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...K(t)})}function cp(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...K(t)})}function lp(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...K(t)})}function up(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...K(t)})}function dp(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...K(t)})}function fp(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...K(t)})}function pp(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...K(t)})}function mp(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...K(t)})}function hp(e,t){return new e({type:`number`,checks:[],...K(t)})}function gp(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...K(t)})}function _p(e,t){return new e({type:`boolean`,...K(t)})}function vp(e){return new e({type:`unknown`})}function yp(e,t){return new e({type:`never`,...K(t)})}function bp(e,t){return new ud({check:`less_than`,...K(t),value:e,inclusive:!1})}function xp(e,t){return new ud({check:`less_than`,...K(t),value:e,inclusive:!0})}function Sp(e,t){return new dd({check:`greater_than`,...K(t),value:e,inclusive:!1})}function Cp(e,t){return new dd({check:`greater_than`,...K(t),value:e,inclusive:!0})}function wp(e,t){return new fd({check:`multiple_of`,...K(t),value:e})}function Tp(e,t){return new md({check:`max_length`,...K(t),maximum:e})}function Ep(e,t){return new hd({check:`min_length`,...K(t),minimum:e})}function Dp(e,t){return new gd({check:`length_equals`,...K(t),length:e})}function Op(e,t){return new vd({check:`string_format`,format:`regex`,...K(t),pattern:e})}function kp(e){return new yd({check:`string_format`,format:`lowercase`,...K(e)})}function Ap(e){return new bd({check:`string_format`,format:`uppercase`,...K(e)})}function jp(e,t){return new xd({check:`string_format`,format:`includes`,...K(t),includes:e})}function Mp(e,t){return new Sd({check:`string_format`,format:`starts_with`,...K(t),prefix:e})}function Np(e,t){return new Cd({check:`string_format`,format:`ends_with`,...K(t),suffix:e})}function Pp(e){return new J({check:`overwrite`,tx:e})}function Fp(e){return Pp(t=>t.normalize(e))}function Ip(){return Pp(e=>e.trim())}function Lp(){return Pp(e=>e.toLowerCase())}function Rp(){return Pp(e=>e.toUpperCase())}function zp(){return Pp(e=>W(e))}function Bp(e,t,n){return new e({type:`array`,element:t,...K(n)})}function Vp(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...K(n)})}function Hp(e,t){let n=Up(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(fu(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(fu(r))}},e(t.value,t)),t);return n}function Up(e,t){let n=new cd({check:`custom`,...K(t)});return n._zod.check=e,n}function Wp(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??Vf,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 Gp(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,Gp(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`&&Jp(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 Kp(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>
111
+
112
+ 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 qp(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:Xp(t,`input`,e.processors),output:Xp(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function Jp(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 Jp(r.element,n);if(r.type===`set`)return Jp(r.valueType,n);if(r.type===`lazy`)return Jp(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 Jp(r.innerType,n);if(r.type===`intersection`)return Jp(r.left,n)||Jp(r.right,n);if(r.type===`record`||r.type===`map`)return Jp(r.keyType,n)||Jp(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:Jp(r.in,n)||Jp(r.out,n);if(r.type===`object`){for(let e in r.shape)if(Jp(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(Jp(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(Jp(e,n))return!0;return!!(r.rest&&Jp(r.rest,n))}return!1}var Yp=(e,t={})=>n=>{let r=Wp({...n,processors:t});return Gp(e,r),Kp(r,e),qp(r,e)},Xp=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Wp({...i??{},target:a,io:t,processors:n});return Gp(e,o),Kp(o,e),qp(o,e)},Zp={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Qp=(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=Zp[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}))])}},$p=(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)},em=(e,t,n,r)=>{n.type=`boolean`},tm=(e,t,n,r)=>{n.not={}},nm=(e,t,n,r)=>{let i=e._zod.def,a=Il(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},rm=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},im=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},am=(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=Gp(a.element,t,{...r,path:[...r.path,`items`]})},om=(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]=Gp(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=Gp(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},sm=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>Gp(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},cm=(e,t,n,r)=>{let i=e._zod.def,a=Gp(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=Gp(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]]},lm=(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=Gp(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=Gp(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=Gp(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)}},um=(e,t,n,r)=>{let i=e._zod.def,a=Gp(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`}]},dm=(e,t,n,r)=>{let i=e._zod.def;Gp(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},fm=(e,t,n,r)=>{let i=e._zod.def;Gp(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},pm=(e,t,n,r)=>{let i=e._zod.def;Gp(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)))},mm=(e,t,n,r)=>{let i=e._zod.def;Gp(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},hm=(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;Gp(o,t,r);let s=t.seen.get(e);s.ref=o},gm=(e,t,n,r)=>{let i=e._zod.def;Gp(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},_m=(e,t,n,r)=>{let i=e._zod.def;Gp(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},vm=B(`ZodISODateTime`,(e,t)=>{Bd.init(e,t),Wm.init(e,t)});function ym(e){return dp(vm,e)}var bm=B(`ZodISODate`,(e,t)=>{Vd.init(e,t),Wm.init(e,t)});function xm(e){return fp(bm,e)}var Sm=B(`ZodISOTime`,(e,t)=>{Hd.init(e,t),Wm.init(e,t)});function Cm(e){return pp(Sm,e)}var wm=B(`ZodISODuration`,(e,t)=>{Ud.init(e,t),Wm.init(e,t)});function Tm(e){return mp(wm,e)}var Em=B(`ZodError`,(e,t)=>{mu.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>_u(e,t)},flatten:{value:t=>gu(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Ll,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Ll,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),Dm=vu(Em),Om=yu(Em),km=bu(Em),Am=Su(Em),jm=wu(Em),Mm=Tu(Em),Nm=Eu(Em),Pm=Du(Em),Fm=Ou(Em),Im=ku(Em),Lm=Au(Em),Rm=ju(Em),zm=new WeakMap;function Bm(e,t,n){let r=Object.getPrototypeOf(e),i=zm.get(r);if(i||(i=new Set,zm.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 Vm=B(`ZodType`,(e,t)=>(Ed.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:Xp(e,`input`),output:Xp(e,`output`)}}),e.toJSONSchema=Yp(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>Dm(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>km(e,t,n),e.parseAsync=async(t,n)=>Om(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Am(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>jm(e,t,n),e.decode=(t,n)=>Mm(e,t,n),e.encodeAsync=async(t,n)=>Nm(e,t,n),e.decodeAsync=async(t,n)=>Pm(e,t,n),e.safeEncode=(t,n)=>Fm(e,t,n),e.safeDecode=(t,n)=>Im(e,t,n),e.safeEncodeAsync=async(t,n)=>Lm(e,t,n),e.safeDecodeAsync=async(t,n)=>Rm(e,t,n),Bm(e,`ZodType`,{check(...e){let t=this.def;return this.clone(H(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 Xl(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Zh(e,t))},superRefine(e,t){return this.check(Qh(e,t))},overwrite(e){return this.check(Pp(e))},optional(){return Nh(this)},exactOptional(){return Fh(this)},nullable(){return Lh(this)},nullish(){return Nh(Lh(this))},nonoptional(e){return Uh(this,e)},array(){return bh(this)},or(e){return Ch([this,e])},and(e){return Th(this,e)},transform(e){return qh(this,jh(e))},default(e){return zh(this,e)},prefault(e){return Vh(this,e)},catch(e){return Gh(this,e)},pipe(e){return qh(this,e)},readonly(){return Yh(this)},describe(e){let t=this.clone();return Vf.add(t,{description:e}),t},meta(...e){if(e.length===0)return Vf.get(this);let t=this.clone();return Vf.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 Vf.get(e)?.description},configurable:!0}),e)),Hm=B(`_ZodString`,(e,t)=>{Dd.init(e,t),Vm.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qp(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Bm(e,`_ZodString`,{regex(...e){return this.check(Op(...e))},includes(...e){return this.check(jp(...e))},startsWith(...e){return this.check(Mp(...e))},endsWith(...e){return this.check(Np(...e))},min(...e){return this.check(Ep(...e))},max(...e){return this.check(Tp(...e))},length(...e){return this.check(Dp(...e))},nonempty(...e){return this.check(Ep(1,...e))},lowercase(e){return this.check(kp(e))},uppercase(e){return this.check(Ap(e))},trim(){return this.check(Ip())},normalize(...e){return this.check(Fp(...e))},toLowerCase(){return this.check(Lp())},toUpperCase(){return this.check(Rp())},slugify(){return this.check(zp())}})}),Um=B(`ZodString`,(e,t)=>{Dd.init(e,t),Hm.init(e,t),e.email=t=>e.check(Uf(Gm,t)),e.url=t=>e.check(Yf(Jm,t)),e.jwt=t=>e.check(up(lh,t)),e.emoji=t=>e.check(Xf(Ym,t)),e.guid=t=>e.check(Wf(Km,t)),e.uuid=t=>e.check(Gf(qm,t)),e.uuidv4=t=>e.check(Kf(qm,t)),e.uuidv6=t=>e.check(qf(qm,t)),e.uuidv7=t=>e.check(Jf(qm,t)),e.nanoid=t=>e.check(Zf(Xm,t)),e.guid=t=>e.check(Wf(Km,t)),e.cuid=t=>e.check(Qf(Zm,t)),e.cuid2=t=>e.check($f(Qm,t)),e.ulid=t=>e.check(ep($m,t)),e.base64=t=>e.check(sp(oh,t)),e.base64url=t=>e.check(cp(sh,t)),e.xid=t=>e.check(tp(eh,t)),e.ksuid=t=>e.check(np(th,t)),e.ipv4=t=>e.check(rp(nh,t)),e.ipv6=t=>e.check(ip(rh,t)),e.cidrv4=t=>e.check(ap(ih,t)),e.cidrv6=t=>e.check(op(ah,t)),e.e164=t=>e.check(lp(ch,t)),e.datetime=t=>e.check(ym(t)),e.date=t=>e.check(xm(t)),e.time=t=>e.check(Cm(t)),e.duration=t=>e.check(Tm(t))});function Y(e){return Hf(Um,e)}var Wm=B(`ZodStringFormat`,(e,t)=>{Od.init(e,t),Hm.init(e,t)}),Gm=B(`ZodEmail`,(e,t)=>{jd.init(e,t),Wm.init(e,t)}),Km=B(`ZodGUID`,(e,t)=>{kd.init(e,t),Wm.init(e,t)}),qm=B(`ZodUUID`,(e,t)=>{Ad.init(e,t),Wm.init(e,t)}),Jm=B(`ZodURL`,(e,t)=>{Md.init(e,t),Wm.init(e,t)}),Ym=B(`ZodEmoji`,(e,t)=>{Nd.init(e,t),Wm.init(e,t)}),Xm=B(`ZodNanoID`,(e,t)=>{Pd.init(e,t),Wm.init(e,t)}),Zm=B(`ZodCUID`,(e,t)=>{Fd.init(e,t),Wm.init(e,t)}),Qm=B(`ZodCUID2`,(e,t)=>{Id.init(e,t),Wm.init(e,t)}),$m=B(`ZodULID`,(e,t)=>{Ld.init(e,t),Wm.init(e,t)}),eh=B(`ZodXID`,(e,t)=>{Rd.init(e,t),Wm.init(e,t)}),th=B(`ZodKSUID`,(e,t)=>{zd.init(e,t),Wm.init(e,t)}),nh=B(`ZodIPv4`,(e,t)=>{Wd.init(e,t),Wm.init(e,t)}),rh=B(`ZodIPv6`,(e,t)=>{Gd.init(e,t),Wm.init(e,t)}),ih=B(`ZodCIDRv4`,(e,t)=>{Kd.init(e,t),Wm.init(e,t)}),ah=B(`ZodCIDRv6`,(e,t)=>{qd.init(e,t),Wm.init(e,t)}),oh=B(`ZodBase64`,(e,t)=>{Yd.init(e,t),Wm.init(e,t)}),sh=B(`ZodBase64URL`,(e,t)=>{Zd.init(e,t),Wm.init(e,t)}),ch=B(`ZodE164`,(e,t)=>{Qd.init(e,t),Wm.init(e,t)}),lh=B(`ZodJWT`,(e,t)=>{ef.init(e,t),Wm.init(e,t)}),uh=B(`ZodNumber`,(e,t)=>{tf.init(e,t),Vm.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$p(e,t,n,r),Bm(e,`ZodNumber`,{gt(e,t){return this.check(Sp(e,t))},gte(e,t){return this.check(Cp(e,t))},min(e,t){return this.check(Cp(e,t))},lt(e,t){return this.check(bp(e,t))},lte(e,t){return this.check(xp(e,t))},max(e,t){return this.check(xp(e,t))},int(e){return this.check(fh(e))},safe(e){return this.check(fh(e))},positive(e){return this.check(Sp(0,e))},nonnegative(e){return this.check(Cp(0,e))},negative(e){return this.check(bp(0,e))},nonpositive(e){return this.check(xp(0,e))},multipleOf(e,t){return this.check(wp(e,t))},step(e,t){return this.check(wp(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 X(e){return hp(uh,e)}var dh=B(`ZodNumberFormat`,(e,t)=>{nf.init(e,t),uh.init(e,t)});function fh(e){return gp(dh,e)}var ph=B(`ZodBoolean`,(e,t)=>{rf.init(e,t),Vm.init(e,t),e._zod.processJSONSchema=(t,n,r)=>em(e,t,n,r)});function mh(e){return _p(ph,e)}var hh=B(`ZodUnknown`,(e,t)=>{af.init(e,t),Vm.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function gh(){return vp(hh)}var _h=B(`ZodNever`,(e,t)=>{of.init(e,t),Vm.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tm(e,t,n,r)});function vh(e){return yp(_h,e)}var yh=B(`ZodArray`,(e,t)=>{cf.init(e,t),Vm.init(e,t),e._zod.processJSONSchema=(t,n,r)=>am(e,t,n,r),e.element=t.element,Bm(e,`ZodArray`,{min(e,t){return this.check(Ep(e,t))},nonempty(e){return this.check(Ep(1,e))},max(e,t){return this.check(Tp(e,t))},length(e,t){return this.check(Dp(e,t))},unwrap(){return this.element}})});function bh(e,t){return Bp(yh,e,t)}var xh=B(`ZodObject`,(e,t)=>{pf.init(e,t),Vm.init(e,t),e._zod.processJSONSchema=(t,n,r)=>om(e,t,n,r),Ul(e,`shape`,()=>t.shape),Bm(e,`ZodObject`,{keyof(){return kh(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:gh()})},loose(){return this.clone({...this._zod.def,catchall:gh()})},strict(){return this.clone({...this._zod.def,catchall:vh()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return tu(this,e)},safeExtend(e){return nu(this,e)},merge(e){return ru(this,e)},pick(e){return $l(this,e)},omit(e){return eu(this,e)},partial(...e){return iu(Mh,this,e[0])},required(...e){return au(Hh,this,e[0])}})});function Z(e,t){return new xh({type:`object`,shape:e??{},...K(t)})}var Sh=B(`ZodUnion`,(e,t)=>{hf.init(e,t),Vm.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sm(e,t,n,r),e.options=t.options});function Ch(e,t){return new Sh({type:`union`,options:e,...K(t)})}var wh=B(`ZodIntersection`,(e,t)=>{gf.init(e,t),Vm.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cm(e,t,n,r)});function Th(e,t){return new wh({type:`intersection`,left:e,right:t})}var Eh=B(`ZodRecord`,(e,t)=>{yf.init(e,t),Vm.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lm(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function Dh(e,t,n){return!t||!t._zod?new Eh({type:`record`,keyType:Y(),valueType:e,...K(t)}):new Eh({type:`record`,keyType:e,valueType:t,...K(n)})}var Oh=B(`ZodEnum`,(e,t)=>{bf.init(e,t),Vm.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nm(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 Oh({...t,checks:[],...K(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 Oh({...t,checks:[],...K(r),entries:i})}});function kh(e,t){return new Oh({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...K(t)})}var Ah=B(`ZodTransform`,(e,t)=>{xf.init(e,t),Vm.init(e,t),e._zod.processJSONSchema=(t,n,r)=>im(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Nl(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(fu(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(fu(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 jh(e){return new Ah({type:`transform`,transform:e})}var Mh=B(`ZodOptional`,(e,t)=>{Cf.init(e,t),Vm.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_m(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Nh(e){return new Mh({type:`optional`,innerType:e})}var Ph=B(`ZodExactOptional`,(e,t)=>{wf.init(e,t),Vm.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_m(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Fh(e){return new Ph({type:`optional`,innerType:e})}var Ih=B(`ZodNullable`,(e,t)=>{Tf.init(e,t),Vm.init(e,t),e._zod.processJSONSchema=(t,n,r)=>um(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Lh(e){return new Ih({type:`nullable`,innerType:e})}var Rh=B(`ZodDefault`,(e,t)=>{Ef.init(e,t),Vm.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fm(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function zh(e,t){return new Rh({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():ql(t)}})}var Bh=B(`ZodPrefault`,(e,t)=>{Of.init(e,t),Vm.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pm(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Vh(e,t){return new Bh({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():ql(t)}})}var Hh=B(`ZodNonOptional`,(e,t)=>{kf.init(e,t),Vm.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dm(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Uh(e,t){return new Hh({type:`nonoptional`,innerType:e,...K(t)})}var Wh=B(`ZodCatch`,(e,t)=>{jf.init(e,t),Vm.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mm(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Gh(e,t){return new Wh({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var Kh=B(`ZodPipe`,(e,t)=>{Mf.init(e,t),Vm.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hm(e,t,n,r),e.in=t.in,e.out=t.out});function qh(e,t){return new Kh({type:`pipe`,in:e,out:t})}var Jh=B(`ZodReadonly`,(e,t)=>{Pf.init(e,t),Vm.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gm(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Yh(e){return new Jh({type:`readonly`,innerType:e})}var Xh=B(`ZodCustom`,(e,t)=>{If.init(e,t),Vm.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rm(e,t,n,r)});function Zh(e,t={}){return Vp(Xh,e,t)}function Qh(e,t){return Hp(e,t)}function Q(e){return Object.freeze(e)}var $=class extends Error{code;constructor(e,t=`ACTION_FAILED`){super(e),this.code=t,this.name=`ActionError`}},$h={r:0,g:0,b:0,a:0},eg={r:255,g:255,b:255,a:1},tg={r:18,g:18,b:18,a:1},ng=/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,rg=/^rgba?\(([^)]+)\)$/i,ig=/-?\d*\.?\d+(?:e-?\d+)?%?/gi,ag=new Map;function og(e){let t=e?.trim();return t?(ag.has(t)||ag.set(t,sg(t)),ag.get(t)??null):null}function sg(e){return e===`transparent`?$h:cg(e)??lg(e)??fg(e)}function cg(e){if(!ng.test(e))return null;let t=e.slice(1),n=t.length>4,r=n?2:1,i=e=>{let i=t.slice(e*r,e*r+r);return parseInt(n?i:i+i,16)},a=t.length===4||t.length===8?i(3)/255:1;return{r:i(0),g:i(1),b:i(2),a}}function lg(e){let t=(rg.exec(e)?.[1])?.match(ig);if(!t||t.length<3)return null;let n=(e,t)=>e.endsWith(`%`)?parseFloat(e)/100*t:parseFloat(e);return{r:Og(n(t[0],255)),g:Og(n(t[1],255)),b:Og(n(t[2],255)),a:t[3]===void 0?1:Dg(n(t[3],1))}}var ug;function dg(){return ug??=document.createElement(`canvas`).getContext(`2d`,{willReadFrequently:!0}),ug}function fg(e){let t=dg();if(!t)return null;t.fillStyle=`#000000`,t.fillStyle=e;let n=t.fillStyle;return t.fillStyle=`#ffffff`,t.fillStyle=e,n===t.fillStyle?cg(t.fillStyle)??lg(t.fillStyle)??pg(t,e):null}function pg(e,t){e.clearRect(0,0,1,1),e.fillStyle=t,e.fillRect(0,0,1,1);let[n,r,i,a]=e.getImageData(0,0,1,1).data;return{r:n,g:r,b:i,a:a/255}}function mg({r:e,g:t,b:n,a:r}){let i=e=>Og(e).toString(16).padStart(2,`0`),a=r>=1?``:i(Math.round(r*255));return`#${i(e)}${i(t)}${i(n)}${a}`}function hg({r:e,g:t,b:n,a:r}){return{r:255-e,g:255-t,b:255-n,a:r}}function gg({r:e,g:t,b:n}){return .2126*_g(e)+.7152*_g(t)+.0722*_g(n)}function _g(e){let t=Og(e)/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}function vg(e,t){let n=gg(e),r=gg(t),i=Math.max(n,r),a=Math.min(n,r);return(i+.05)/(a+.05)}function yg(e,t){let n=e.a+t.a*(1-e.a);if(n===0)return $h;let r=(r,i)=>Math.round((r*e.a+i*t.a*(1-e.a))/n);return{r:r(e.r,t.r),g:r(e.g,t.g),b:r(e.b,t.b),a:n}}function bg(){let e=getComputedStyle(document.documentElement).colorScheme||`normal`;return e.includes(`dark`)?e.includes(`light`)?matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:`dark`:`light`}function xg(){return bg()===`dark`?tg:eg}function Sg(e){let t=$h;for(let n=e;n;n=n.parentElement){let e=og(getComputedStyle(n).backgroundColor);if(!(!e||e.a===0)&&(t=yg(t,e),t.a>=1))return t}return yg(t,xg())}function Cg(e,t){let n=og(getComputedStyle(e).color)??$h;return n.a>=1?n:yg(n,t)}function wg(e,t){return e>=24||e>=18.66&&t>=700}function Tg(e,t){return t===`AAA`?e?4.5:7:e?3:4.5}function Eg(e,t){let n=10**t;return Math.round(e*n)/n}function Dg(e){return Math.min(1,Math.max(0,e))}function Og(e){return Math.min(255,Math.max(0,Math.round(e)))}var kg=[[-.574,1.43,.144],[.426,.43,.144],[.426,1.43,-.856]];function Ag(e,t){let n=[e.r,e.g,e.b];t.invert&&(n=jg(n.map(e=>255-e),kg)),n=n.map(e=>e*t.brightness),t.saturate!==void 0&&(n=jg(n,Ng(t.saturate))),t.contrast!==void 0&&(n=n.map(e=>(e-127.5)*t.contrast+127.5));let[r,i,a]=n.map(Og);return{r,g:i,b:a,a:e.a}}function jg(e,t){return t.map(t=>t[0]*e[0]+t[1]*e[1]+t[2]*e[2])}function Mg(e,t,n=.05,r=4){let i=n,a=r;for(let n=0;n<24;n+=1){let n=(i+a)/2;gg(Ag(e,{invert:!1,brightness:n}))<t?i=n:a=n}return Eg((i+a)/2,3)}function Ng(e){return[[.213+.787*e,.715-.715*e,.072-.072*e],[.213-.213*e,.715+.285*e,.072-.072*e],[.213-.213*e,.715-.715*e,.072+.928*e]]}var Pg=`browsentic-theme`,Fg=`data-browsentic-added-class`,Ig=`data-browsentic-hook-attribute`,Lg=`data-browsentic-hook-host`,Rg=`data-browsentic-filter`,zg=`data-browsentic-previous-value`,Bg=/\.((?:theme-|mode-)?(dark|light)(?:-mode|-theme)?)(?![\w-])/i,Vg=/\[([\w-]*(?:theme|mode|scheme))\s*[~|^$*]?=\s*["']?(dark|light)["']?\s*[is]?\]/i;function Hg(e){let t=[...document.styleSheets,...document.adoptedStyleSheets],n=new Set,r=new Map,i={total:t.length,readable:0,crossOrigin:0,inline:0},a=0,o=t=>{if(!(a>=e)){if(a+=1,t instanceof CSSStyleRule){for(let e of t.style)e.startsWith(`--`)&&n.add(e);Wg(t.selectorText,r);return}if(t instanceof CSSGroupingRule)for(let e of t.cssRules)o(e);if(t instanceof CSSImportRule)for(let e of Ug(t.styleSheet)??[])o(e)}};for(let e of t){e.href||(i.inline+=1);let t=Ug(e);if(!t){i.crossOrigin+=1;continue}i.readable+=1;for(let e of t)o(e)}return{sheets:i,rules:a,properties:[...n],hooks:[...r.values()],truncated:a>=e}}function Ug(e){try{return e?.cssRules??null}catch{return null}}function Wg(e,t){for(let n of e.split(`,`)){let e=n.trim(),r=e.split(/[\s>+~]+/)[0],i=/^body\b/i.test(r)?`body`:`root`,a=Vg.exec(r);if(a){let[,n,r]=a;Gg(t,{kind:`attribute`,name:n.toLowerCase(),value:r.toLowerCase(),scheme:r.toLowerCase(),host:i,selector:e});continue}let o=Bg.exec(r);if(o){let[,n,r]=o;Gg(t,{kind:`class`,name:n,scheme:r.toLowerCase(),host:i,selector:e})}}}function Gg(e,t){e.set(`${t.kind}:${t.host}:${t.name}:${t.value??``}`,t)}function Kg(e,t){let n=getComputedStyle(document.documentElement),r=e.map(e=>({name:e,value:n.getPropertyValue(e).trim().slice(0,120)})).filter(({value:e})=>e!==``).sort((e,t)=>e.name<t.name?-1:1);return{total:r.length,listed:r.slice(0,t).map(qg)}}function qg({name:e,value:t}){let n=og(t);return!n||n.a===0?{name:e,value:t}:{name:e,value:t,color:mg(n),luminance:Eg(gg(n),3)}}function Jg(){let e=document.getElementById(Pg)?.getAttribute(Rg);if(e)try{return JSON.parse(e)}catch{return}}function Yg(){let e=Jg();return e?t=>Ag(t,e):e=>e}function Xg(e,t){e.setAttribute(Rg,JSON.stringify(t))}function Zg(){let e=document.body??document.documentElement,t=Yg(),n=Sg(e),r=t(n),i=t(Cg(e,n));return{colorScheme:bg(),background:mg(r),text:mg(i),luminance:Eg(gg(r),4),contrast:Eg(vg(i,r),2),...Jg()?{filtered:!0}:{}}}function Qg(e){return e===`body`?document.body??document.documentElement:document.documentElement}function $g(){let e=document.getElementById(Pg);if(!e)return!1;let t=Qg(e.getAttribute(Lg)===`body`?`body`:`root`),n=e.getAttribute(Fg);n&&t.classList.remove(n);let r=e.getAttribute(Ig);if(r){let n=e.getAttribute(zg);n===null?t.removeAttribute(r):t.setAttribute(r,n)}return e.remove(),!0}function e_(e,t){let n=document.createElement(`style`);return n.id=Pg,n.textContent=e,t&&t_(n,t),document.documentElement.append(n),n}function t_(e,t){let n=Qg(t.host);if(e.setAttribute(Lg,t.host),t.kind===`class`){if(n.classList.contains(t.name))return;n.classList.add(t.name),e.setAttribute(Fg,t.name);return}let r=n.getAttribute(t.name);e.setAttribute(Ig,t.name),r!==null&&e.setAttribute(zg,r),n.setAttribute(t.name,t.value??``)}var n_=2e4,r_=40,i_=/^--[A-Za-z0-9_-]+$/,a_=/[;{}<>\\]|@import|url\(|expression\(/i,o_=.05,s_=.92,c_=.08,l_=`img, picture, video, canvas, svg, iframe, embed, object`,u_=`invert(1) hue-rotate(180deg)`,d_=Q({name:`page.applyTheme`,description:`Retheme the page, or put it back. Prefers the page’s own terms — it switches on the dark/light hook its stylesheets already define (a ".dark" class, a [data-theme] attribute), sets color-scheme, and overrides the design tokens you name. Only when that leaves the page at the wrong luminance does it fall back to repainting through a CSS filter. Reports the measured background luminance and text contrast before and after, so the change can be checked rather than assumed. The filter fallback creates a containing block on <html>, which re-anchors position:fixed elements, and it re-inverts images so photos stay right way round. Nothing here survives a reload — call it again, or with mode "revert", to undo it.`,input:Z({mode:kh([`keep`,`dark`,`light`,`revert`]).default(`keep`).describe(`Which way to push the page: "dark" or "light" retheme it, "revert" removes everything Browsentic applied and restores the page’s own theme, "keep" leaves the light/dark decision alone and applies only the colours below`),targetLuminance:X().min(0).max(1).optional().describe(`Relative luminance to bring the page background to, 0 black to 1 white, as reported by page.readTheme. Overrides the luminance "dark" and "light" imply. Reached by filtering, so it repaints images and text alike`),background:Y().optional().describe(`CSS colour for the page background, e.g. "#0f172a" or "rgb(15 23 42)"; suppresses the luminance a mode would imply`),text:Y().optional().describe(`CSS colour for body text; elements that set their own colour keep it`),accent:Y().optional().describe(`CSS colour for links and form-control accents`),tokens:Dh(Y(),Y()).optional().describe(`CSS custom properties to override on :root, e.g. {"--background": "#0f172a"}. Names come from page.readTheme’s tokens — this is the cleanest way to retheme a page that is built on design tokens, because its own rules do the work`),saturation:X().min(0).max(3).optional().describe(`Colour intensity multiplier: 0 greyscale, 1 unchanged, above 1 more vivid`),contrast:X().min(0).max(3).optional().describe(`Contrast multiplier: 1 unchanged, above 1 pushes lights and darks apart`),transitionMs:X().int().nonnegative().max(2e3).default(200).describe(`How long the page takes to cross-fade into the new theme; 0 switches instantly`)}),execute({mode:e,targetLuminance:t,background:n,text:r,accent:i,tokens:a,saturation:o,contrast:s,transitionMs:c}){let l={background:f_(n,`background`),text:f_(r,`text`),accent:f_(i,`accent`)},u=p_(a);if(e===`keep`&&t===void 0&&!(o!==void 0||s!==void 0)&&!u.length&&!Object.values(l).some(Boolean))throw new $(`Nothing to apply — pass a "mode", a "targetLuminance", a colour, or "tokens".`,`INVALID_INPUT`);let d=$g(),f=Zg();if(e===`revert`)return{reverted:d,theme:f};let p=e===`dark`||e===`light`?m_(e):void 0,m=e_(g_({mode:e,colors:l,overrides:u,transitionMs:c}),p),h=Zg(),g=t??(l.background?void 0:__(e,h.luminance)),_=v_(g,h.background,o,s);_&&(m.textContent+=`\n${b_(_,h.background,c)}`,Xg(m,_));let v=Zg();return{replaced:d,strategy:_?`filter`:p||e!==`keep`?`stylesheet`:`colors`,applied:{mode:e,hook:p,...l,tokens:u.length?u.map(([e])=>e):void 0,filter:_?y_(_).join(` `):void 0,targetLuminance:g},css:(m.textContent??``).slice(0,4e3),before:f,after:v,...g===void 0?{}:{reachedTarget:Math.abs(v.luminance-g)<=c_}}}});function f_(e,t){if(e===void 0)return;let n=og(e);if(!n)throw new $(`"${t}" is not a colour this browser understands — pass something like "#0f172a", "rgb(15 23 42)" or "midnightblue".`,`INVALID_INPUT`);return mg(n)}function p_(e){let t=Object.entries(e??{});if(t.length>r_)throw new $(`Too many tokens — ${t.length} given and ${r_} is the limit. Override only the ones that carry the theme.`,`INVALID_INPUT`);return t.map(([e,t])=>{if(!i_.test(e))throw new $(`"${e}" is not a custom property — names look like "--brand-500".`,`INVALID_INPUT`);let n=t.trim();if(!n||a_.test(n))throw new $(`The value for "${e}" is not a plain CSS value — it cannot be empty or carry ";", "{", "}", "\\" or "url(".`,`INVALID_INPUT`);return[e,n]})}function m_(e){return Hg(n_).hooks.filter(t=>t.scheme===e).sort((e,t)=>h_(e)-h_(t))[0]}function h_(e){return e.kind===`attribute`?e.name===`data-theme`?0:1:e.name.toLowerCase()===e.scheme?2:3}function g_({mode:e,colors:t,overrides:n,transitionMs:r}){let i=[];return e!==`keep`&&i.push(`:root { color-scheme: ${e}; }`),n.length&&i.push(`:root { ${n.map(([e,t])=>`${e}: ${t};`).join(` `)} }`),t.background&&i.push(`html, body { background-color: ${t.background} !important; }`),t.text&&i.push(`html, body { color: ${t.text} !important; }`),t.accent&&i.push(`:root { accent-color: ${t.accent} !important; }`,`a { color: ${t.accent} !important; }`),r>0&&i.push(`html, body { transition: background-color ${r}ms linear, color ${r}ms linear, filter ${r}ms linear; }`),i.join(`
113
+ `)}function __(e,t){if(e===`dark`)return t>.5?o_:void 0;if(e===`light`)return t<.5?s_:void 0}function v_(e,t,n,r){let i=og(t)??eg,a=gg(i),o=e!==void 0&&e<.5!=a<.5,s=o?gg(hg(i)):a,c=e===void 0||s<=.004?1:Mg(o?hg(i):i,e);if(!(!o&&c===1&&n===void 0&&r===void 0))return{invert:o,brightness:c,saturate:n,contrast:r}}function y_({invert:e,brightness:t,saturate:n,contrast:r}){return[e?u_:``,t===1?``:`brightness(${t})`,n===void 0?``:`saturate(${n})`,r===void 0?``:`contrast(${r})`].filter(Boolean)}function b_(e,t,n){let r=[`html { background-color: ${t}; filter: ${y_(e).join(` `)}; }`];return e.invert&&r.push(`${l_} { filter: ${u_}; }`),n>0&&r.push(`${l_} { transition: filter ${n}ms linear; }`),r.join(`
114
+ `)}var x_=Z({selector:Y().optional().describe(`CSS selector for the element`),text:Y().optional().describe(`Case-insensitive visible text the element should contain`),role:Y().optional().describe(`Tag name or ARIA role to narrow matches, e.g. "button" or "link"`),nth:X().int().nonnegative().default(0).describe(`Zero-based index when several elements match`)}),S_=`a,button,input,select,textarea,summary,label,h1,h2,h3,h4,h5,h6,[role],[tabindex],[contenteditable]`,C_={link:[`a`],button:[`button`],textbox:[`input`,`textarea`],combobox:[`select`],checkbox:[`input`],radio:[`input`],heading:[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`]},w_={button:`button`,submit:`button`,reset:`button`,image:`button`,file:`button`,checkbox:`checkbox`,radio:`radio`,range:`slider`,number:`spinbutton`,search:`searchbox`},T_={button:`button`,select:`combobox`,textarea:`textbox`,summary:`button`,option:`option`,h1:`heading`,h2:`heading`,h3:`heading`,h4:`heading`,h5:`heading`,h6:`heading`,nav:`navigation`,main:`main`,header:`banner`,footer:`contentinfo`,aside:`complementary`,form:`form`,dialog:`dialog`},E_=new Set([`button`,`submit`,`reset`,`image`,`checkbox`,`radio`,`file`]);function D_(e){let t=e.getAttribute(`role`)?.trim().split(/\s+/)[0];return t?t.toLowerCase():e instanceof HTMLInputElement?w_[e.type]??`textbox`:e instanceof HTMLAnchorElement?e.getAttribute(`href`)===null?void 0:`link`:T_[e.tagName.toLowerCase()]}function O_(e,t){let n=t.toLowerCase(),r=e.tagName.toLowerCase();return r===n||D_(e)===n?!0:C_[n]?.includes(r)??!1}function k_(e,t={}){let{selector:n,text:r,role:i,nth:a}=e;if(!n&&!r)throw new $(`A target needs a "selector" or "text"`,`INVALID_TARGET`);let o=[...document.querySelectorAll(n??S_)];if(i&&(o=o.filter(e=>O_(e,i))),r){let e=r.toLowerCase();o=o.filter(t=>A_(t).toLowerCase().includes(e)),o=o.filter(e=>!o.some(t=>t!==e&&e.contains(t)))}t.includeHidden||(o=o.filter(M_));let s=o[a];if(!s)throw new $(`No element matches ${JSON.stringify(e)} (${o.length} candidates)`,`TARGET_NOT_FOUND`);return s}function A_(e){let t=e.getAttribute(`aria-label`)?.trim();if(t)return t;if(e instanceof HTMLInputElement)return e.type===`submit`||e.type===`button`||e.type===`reset`?e.value.trim()||e.type:j_(e);if(e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement)return j_(e);if(e instanceof HTMLImageElement)return e.alt.trim();let n=(e.textContent??``).replace(/\s+/g,` `).trim();if(n)return n;let r=e.querySelector(`img[alt]`);return r instanceof HTMLImageElement?r.alt.trim():``}function j_(e){return e.labels?.[0]?.textContent?.trim()||e.getAttribute(`placeholder`)?.trim()||e.name}function M_(e){let t=e.getBoundingClientRect();if(t.width===0&&t.height===0)return!1;let n=getComputedStyle(e);return n.visibility!==`hidden`&&n.display!==`none`}function N_(e){return M_(e)&&!e.closest(`[aria-hidden="true"],[inert]`)}function P_(e,t){let n=e.getAttribute(t);return n===`true`||n!==`false`&&void 0}function F_(e){let t={};(e.matches(`:disabled`)||P_(e,`aria-disabled`))&&(t.disabled=!0);let n=e instanceof HTMLInputElement&&(e.type===`checkbox`||e.type===`radio`)?e.checked:P_(e,`aria-checked`);n!==void 0&&(t.checked=n);let r=P_(e,`aria-expanded`);r!==void 0&&(t.expanded=r);let i=e instanceof HTMLOptionElement?e.selected:P_(e,`aria-selected`);i!==void 0&&(t.selected=i);let a=e.getAttribute(`aria-current`);return a&&a!==`false`&&(t.current=a),(e.matches(`:required`)||P_(e,`aria-required`))&&(t.required=!0),P_(e,`aria-invalid`)&&(t.invalid=!0),e instanceof HTMLSelectElement?t.value=e.selectedOptions[0]?.text.replace(/\s+/g,` `).trim().slice(0,60)||void 0:(e instanceof HTMLTextAreaElement||e instanceof HTMLInputElement&&!E_.has(e.type))&&(t.filled=e.value.length>0),Object.values(t).some(e=>e!==void 0)?t:void 0}function I_(e){let t=[];for(let n=e;n&&n!==document.documentElement;n=n.parentElement){if(n.id)return t.unshift(`#${CSS.escape(n.id)}`),t.join(` > `);let e=n.tagName.toLowerCase(),r=n.parentElement?[...n.parentElement.children].filter(e=>e.tagName===n.tagName):[];t.unshift(r.length>1?`${e}:nth-of-type(${r.indexOf(n)+1})`:e)}return t.join(` > `)}function L_(e){let t=e.getBoundingClientRect();return{x:Math.round(t.x+window.scrollX),y:Math.round(t.y+window.scrollY),width:Math.round(t.width),height:Math.round(t.height)}}function R_(e){let t=A_(e).slice(0,80);return{tag:e.tagName.toLowerCase(),role:D_(e),selector:I_(e),text:t||void 0,state:F_(e),bounds:L_(e)}}function z_(e){return e.closest(`form`)?e instanceof HTMLButtonElement?e.type===`submit`:e instanceof HTMLInputElement&&(e.type===`submit`||e.type===`image`):!1}var B_=Q({name:`page.attachFile`,description:`Attach a file to a file input on the page: either one the user stored in Browsentic (fileId, from page.listFiles) or one you captured off another page (downloadId, from page.captureDownload). The second closes the loop — download here, upload there — without the bytes ever passing through you.`,input:Z({fileId:Y().optional().describe(`Id of a stored file, taken from page.listFiles.`),downloadId:Y().optional().describe(`Id of a captured download, taken from page.captureDownload or page.listDownloads.`),target:x_.describe(`The file input (<input type="file">) to attach the file to.`),name:Y().optional().describe(`Internal: original filename. Browsentic fills this in.`),mime:Y().optional().describe(`Internal: file MIME type. Browsentic fills this in.`),content:Y().optional().describe(`Internal: base64 file bytes. Browsentic fills this in.`)}),execute({target:e,name:t,mime:n,content:r}){if(!r)throw new $(`No file bytes were supplied — call with a valid fileId or downloadId.`,`INVALID_INPUT`);let i=k_(e,{includeHidden:!0});if(!(i instanceof HTMLInputElement)||i.type!==`file`)throw new $(`<${i.tagName.toLowerCase()}> is not a file input`,`INVALID_TARGET`);let a=atob(r),o=new Uint8Array(a.length);for(let e=0;e<a.length;e++)o[e]=a.charCodeAt(e);let s=new File([o],t||`file`,{type:n||`application/octet-stream`}),c=new DataTransfer;return c.items.add(s),Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,`files`).set.call(i,c.files),i.dispatchEvent(new Event(`input`,{bubbles:!0})),i.dispatchEvent(new Event(`change`,{bubbles:!0})),{attached:!0,name:s.name,size:o.length,mime:s.type,element:R_(i)}}}),V_=60,H_=Q({name:`page.auditContrast`,description:`Score the readability of the page against WCAG contrast rules. Walks the visible text, resolves each run’s foreground against the real background painted behind it — blending translucent layers up the ancestor chain — and reports the ratio, the ratio the level requires, and whether it passes. The score is the share of sampled text runs that pass, so it is directly comparable before and after page.applyTheme.`,input:Z({target:x_.optional().describe(`Subtree to audit; defaults to the whole page`),level:kh([`AA`,`AAA`]).default(`AA`).describe(`WCAG level: AA needs 4.5:1 for body text and 3:1 for large text, AAA needs 7:1 and 4.5:1`),maxSamples:X().int().positive().max(2e3).default(400).describe(`Text-bearing elements to check, in document order`),maxFailures:X().int().nonnegative().max(200).default(20).describe(`Failures listed, worst ratio first; the counts always cover everything sampled`)}),execute({target:e,level:t,maxSamples:n,maxFailures:r}){let i=e?k_(e):document.body??document.documentElement,a=U_(i,t,n,Yg()),o=a.filter(e=>!e.passes).sort((e,t)=>e.ratio-t.ratio),s=a.length-o.length;return{url:location.href,level:t,required:{normalText:Tg(!1,t),largeText:Tg(!0,t)},...a.length?{score:Math.round(s/a.length*100)}:{},summary:{sampled:a.length,passed:s,failed:o.length,worstRatio:a.length?Math.min(...a.map(e=>e.ratio)):void 0},failures:o.slice(0,r),source:I_(i)}}});function U_(e,t,n,r){let i=document.createTreeWalker(e,NodeFilter.SHOW_TEXT),a=new Set,o=[];for(let e=i.nextNode();e&&o.length<n;e=i.nextNode()){let n=(e.textContent??``).replace(/\s+/g,` `).trim(),i=e.parentElement;!n||!i||a.has(i)||(a.add(i),N_(i)&&o.push(W_(i,n,t,r)))}return o}function W_(e,t,n,r){let i=getComputedStyle(e),a=Sg(e),o=r(a),s=r(Cg(e,a)),c=Eg(parseFloat(i.fontSize),1),l=Number(i.fontWeight)||400,u=wg(c,l),d=Eg(vg(s,o),2),f=Tg(u,n);return{selector:I_(e),text:t.slice(0,V_),foreground:mg(s),background:mg(o),ratio:d,required:f,passes:d>=f,fontSizePx:c,weight:l,large:u,bounds:L_(e)}}var G_=30*6e4,K_=240*6e4,q_=2*6e4,J_=10*6e4;function Y_(e){let t=Math.round(e/6e4);return t<1?`under a minute`:`~${t} min`}var X_=Q({name:`page.awaitMonitor`,description:`Block until a background monitor completes, then return its final state with the full log. A reply with settled: false means the timeout passed while the watch continues — call again to keep waiting; that is normal, not an error. If the call fails with EXTENSION_OFFLINE the monitor is still running in the browser — reconnect and call again.`,input:Z({monitorId:Y().describe(`The monitor to wait on, from page.startMonitor`),timeoutMs:X().int().positive().max(J_).default(q_).describe(`Return after this long even if unfinished — the reply then has settled: false and the current state, so call again to keep waiting`)}),execute(){throw new $(`page.awaitMonitor is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),Z_=Q({name:`page.captureDownload`,description:`Make the page download a file and keep it. Either click something that produces a download — an “Export CSV” button, a “Download invoice” link — or give a direct url, which is fetched in the browser’s own logged-in session rather than anonymously. The file lands in the user’s ~/browsentic/download/ folder and the result reports the path and notes about what arrived; you get the notes, never the bytes. Hand the returned downloadId to page.attachFile to upload it somewhere else without the file ever passing through you.`,input:Z({target:x_.optional().describe(`The link or button whose click starts the download. Give this or "url", not both.`),url:Y().optional().describe(`Direct http(s) url of the file, fetched with the browser’s cookies. Give this or "target", not both. Prefer "target" when a button exists: many exports have no fetchable url at all.`),timeoutMs:X().int().min(1e3).max(6e5).default(6e4).describe(`How long to wait for the download to finish before giving up.`)}),execute(){throw new $(`page.captureDownload is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),Q_=Q({name:`page.clickElement`,description:`Click an element like a user would, firing the full pointer and mouse event sequence.`,input:Z({target:x_.describe(`Element to click`),scrollIntoView:mh().default(!0).describe(`Bring the element into view before clicking`)}),execute({target:e,scrollIntoView:t}){let n=k_(e);t&&n.scrollIntoView({block:`center`,behavior:`instant`});try{n.focus({preventScroll:!0})}catch{}let r=z_(n),i={bubbles:!0,cancelable:!0,composed:!0};return n.dispatchEvent(new PointerEvent(`pointerdown`,i)),n.dispatchEvent(new MouseEvent(`mousedown`,i)),n.dispatchEvent(new PointerEvent(`pointerup`,i)),n.dispatchEvent(new MouseEvent(`mouseup`,i)),n.click(),{...R_(n),submits:r}}}),$_=Q({name:`page.closeTab`,description:`Close an open tab. With no arguments it closes the tab page actions are currently targeting, and later actions follow the browser to whichever tab it brings to the front.`,input:Z({tabId:X().int().optional().describe(`Id of the tab to close, as reported by page.openTab or a no-argument page.switchTab.`),match:Y().optional().describe(`Instead of an id, close the tab whose title or URL contains this text (case-insensitive). If several tabs match, nothing is closed and the candidates are listed.`)}),execute(){throw new $(`page.closeTab is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),ev=120,tv=6,nv=Z({x:X().describe(`Pixels from the left edge of the viewport`),y:X().describe(`Pixels from the top edge of the viewport`)});function rv(){return{w:document.documentElement.clientWidth,h:document.documentElement.clientHeight}}function iv(e){let t=e.getBoundingClientRect(),{w:n,h:r}=rv(),i=Math.max(t.left,0),a=Math.max(t.top,0),o=Math.min(t.right,n),s=Math.min(t.bottom,r);if(o<=i||s<=a)throw new $(`The element has no visible area inside the viewport — scroll it into view, then retry`,`INVALID_TARGET`);return{x:Math.round((i+o)/2),y:Math.round((a+s)/2)}}function av(e){let{w:t,h:n}=rv();if(e.x<0||e.y<0||e.x>=t||e.y>=n)throw new $(`The point (${e.x}, ${e.y}) is outside the ${t}×${n} viewport — scroll it into view, then retry`,`INVALID_TARGET`);return{x:Math.round(e.x),y:Math.round(e.y)}}function ov(e){let{w:t,h:n}=rv();return{x:Math.min(Math.max(e.x-ev,0),t-1),y:Math.min(Math.max(e.y-ev,0),n-1)}}function sv(e){return document.elementFromPoint(e.x,e.y)}function cv(e,t){let n=sv(t);if(!(n===e||e.contains(n)))throw new $(n?`${I_(n)} covers (${t.x}, ${t.y}) — dismiss whatever is over the element, then retry`:`Nothing is painted at (${t.x}, ${t.y}) — scroll the element into view, then retry`,`INVALID_TARGET`)}var lv=e=>1-(1-e)**3;function uv(e,t,n){let r=t.x-e.x,i=t.y-e.y,a=Math.hypot(r,i)||1,o=Math.min(tv,a/8);return Array.from({length:n},(t,s)=>{let c=lv((s+1)/n),l=Math.sin(c*Math.PI)*o*(s%2?-1:1);return{x:Math.round(e.x+r*c-i/a*l),y:Math.round(e.y+i*c+r/a*l)}})}var dv=[[`pointer`,`pointerover`,!0],[`pointer`,`pointerenter`,!1],[`pointer`,`pointermove`,!0],[`mouse`,`mouseover`,!0],[`mouse`,`mouseenter`,!1],[`mouse`,`mousemove`,!0]];function fv(e,t){for(let[n,r,i]of dv){let a=n===`pointer`?PointerEvent:MouseEvent;e.dispatchEvent(new a(r,{clientX:t.x,clientY:t.y,bubbles:i,composed:!0}))}}var pv=16,mv=e=>new Promise(t=>setTimeout(t,e));function hv(e,t){return{clientX:e.x,clientY:e.y,button:0,buttons:t,bubbles:!0,cancelable:!0,composed:!0,view:window,pointerId:1,pointerType:`mouse`,isPrimary:!0}}function gv(e,t,n,r,i){let a=hv(r,i);e?.dispatchEvent(new PointerEvent(t,a)),e?.dispatchEvent(new MouseEvent(n,a))}function _v(e,t,n,r){return e?.dispatchEvent(new DragEvent(t,{...hv(n,1),dataTransfer:r}))??!1}function vv(e){try{return iv(e)}catch{throw new $(`The drop target is not inside the viewport — both ends of a drag have to be on screen at once, because nothing scrolls mid-drag. Scroll until both are visible, then retry`,`INVALID_TARGET`)}}async function yv(e,t,n,r,i){for(let a of uv(e,t,n))await mv(pv),i?i(a):gv(sv(a),`pointermove`,`mousemove`,a,r)}async function bv(e,t,n){await yv(e,t,4,0),fv(n??document.body,t)}async function xv(e,t){let{approach:n,grip:r,drop:i,steps:a,holdMs:o,settleMs:s}=t,c=e??sv(r);await bv(n,r,c),gv(c,`pointerdown`,`mousedown`,r,1),await mv(o),await yv(r,i,a,1),await mv(s);let l=sv(i);return gv(l??c,`pointerup`,`mouseup`,i,0),{landedOn:l?I_(l):void 0}}async function Sv(e,t){let{approach:n,grip:r,drop:i,steps:a,holdMs:o,settleMs:s}=t,c=new DataTransfer;await bv(n,r,e),gv(e,`pointerdown`,`mousedown`,r,1),await mv(o);let l=_v(e,`dragstart`,r,c),u=!1,d=null;await yv(r,i,a,1,e=>{let t=sv(e);t!==d&&(_v(d,`dragleave`,e,c),_v(t,`dragenter`,e,c),d=t),t&&!_v(t,`dragover`,e,c)&&(u=!0)}),await mv(s);let f=sv(i);return _v(f,`drop`,i,c),_v(e,`dragend`,i,c),{landedOn:f?I_(f):void 0,started:l,accepted:u}}var Cv=Q({name:`page.dragElement`,description:`Drag one thing onto another — reorder a list, move a card between columns, pull a slider handle, draw on a canvas. Give a "from" element (or "fromPoint") to pick up and a "to" element (or "toPoint") to drop on. Both ends must be on screen at the same moment, because nothing auto-scrolls mid-drag. The web has two unrelated drag mechanisms and "auto" chooses between them by reading the grabbed element: "pointer" presses, moves and releases a pointer, which is what dnd-kit, react-beautiful-dnd, sliders and canvases listen for; "native" fires the HTML5 dragstart/dragover/drop sequence with a DataTransfer, which is what an element carrying draggable="true" expects. The drop point is measured before the drag starts, so a list that reflows as you pass over it can land a slot out — raise "steps" and "settleMs", then read the result back. Set "trusted" when the page ignores synthetic events; that path is pointer-only, Chrome-only, and shows the “Browsentic is debugging this browser” bar. If nothing moved, check "accepted" and try the other mode.`,input:Z({from:x_.optional().describe(`Element to pick up — the card, row, or drag handle. Give this or "fromPoint", never both.`),fromPoint:nv.optional().describe(`Viewport coordinates to grab from, in CSS pixels. Use it when the grip is not an element, such as a spot on a <canvas>.`),to:x_.optional().describe(`Element to drop onto — the destination column, list slot, or drop zone. Give this or "toPoint", never both.`),toPoint:nv.optional().describe(`Viewport coordinates to drop at, in CSS pixels. Use it to reach empty space, a slider position, or a spot on a <canvas>.`),mode:kh([`auto`,`pointer`,`native`]).default(`auto`).describe(`Which drag mechanism to use. "auto" picks "native" when the grabbed element declares draggable="true", "pointer" otherwise.`),steps:X().int().min(2).max(60).default(16).describe(`Moves dispatched along the way to the drop point. Raise it for lists that reorder as the pointer passes over them.`),holdMs:X().int().min(0).max(5e3).default(120).describe(`How long the button stays down before the drag starts moving. Raise it past a library’s press-and-hold delay.`),settleMs:X().int().min(0).max(5e3).default(120).describe(`Pause on the drop point before releasing, letting the page settle on where the item would land.`),trusted:mh().default(!1).describe(`Dispatch real browser-level mouse events, so isTrusted is true. Pointer mode only, Chrome only.`),scrollIntoView:mh().default(!0).describe(`Bring the grabbed element into view first. Ignored with "fromPoint".`)}),async execute({from:e,fromPoint:t,to:n,toPoint:r,mode:i,steps:a,holdMs:o,settleMs:s,trusted:c,scrollIntoView:l}){if(!e==!t)throw new $(`Give either a "from" target to pick up or a "fromPoint" to grab at — not both, not neither`,`INVALID_INPUT`);if(!n==!r)throw new $(`Give either a "to" target to drop onto or a "toPoint" to drop at — not both, not neither`,`INVALID_INPUT`);let u=e?k_(e):null,d=n?k_(n):null;u&&l&&u.scrollIntoView({block:`center`,behavior:`instant`});let f=u?iv(u):av(t);u&&cv(u,f);let p=d?vv(d):av(r),m=u?.closest(`[draggable="true"]`)??null,h=i===`auto`?m?`native`:`pointer`:i;if(h===`native`&&c)throw new $(`A trusted drag sends real mouse events, which cannot drive HTML5 drag-and-drop — drop "trusted", or set mode to "pointer" if the page also listens for pointer drags`,`INVALID_INPUT`);if(h===`native`&&!u)throw new $(`HTML5 drag-and-drop starts on an element, so coordinates cannot fire dragstart — give a "from" target, or set mode to "pointer"`,`INVALID_INPUT`);let g={approach:ov(f),grip:f,drop:p,steps:a,holdMs:o,settleMs:s},_={from:u?R_(u):void 0,to:d?R_(d):void 0,mechanism:h,...g};if(c)return _;let v=h===`native`?await Sv(m??u,g):await xv(u,g);return{..._,...v,trusted:!1}}}),wv=2166136261,Tv=16777619,Ev=[{pattern:/\n{2,}/g,floor:.5},{pattern:/(?<=[.!?…]["'’”)\]]*)\s+/g,floor:.25},{pattern:/[。!?]["’”」』))\]]*/g,floor:.25},{pattern:/\n/g,floor:.25},{pattern:/\s+/g,floor:0}],Dv=/^(\d+)\.([0-9a-f]{8})$/;function Ov(e){let t=wv;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,Tv);return(t>>>0).toString(16).padStart(8,`0`)}function kv(e,t,n){if(e.length-t<=n)return e.length;let r=e.slice(t,t+n);for(let{pattern:e,floor:i}of Ev){let a=Mv(r,e,Math.floor(n*i));if(a>0)return t+a}return t+n}function Av(e,t){return`${e}.${Ov(t)}`}function jv(e){let t=Dv.exec(e.trim());return t?{offset:Number(t[1]),digest:t[2]}:null}function Mv(e,t,n){t.lastIndex=0;let r=0;for(let i=t.exec(e);i;i=t.exec(e))i.index>=n&&(r=i.index+i[0].length);return r}var Nv=2e5,Pv=Q({name:`page.extractText`,description:`Read the rendered text or raw HTML of an element or the whole page, one group at a time. A group is cut at the last paragraph or sentence boundary that fits in maxLength, never mid-sentence, and the same page always groups the same way. When more text remains the reply carries a cursor — pass it back for the next group, and keep going until no cursor comes back. The cursor is checked against the text it already handed you, so two groups never come from two different versions of the page: if the page rewrote what you had read, the reply is "stale": true and nothing else, and the read starts over with no cursor.`,input:Z({target:x_.optional().describe(`Element to read; defaults to the whole page`),format:kh([`text`,`html`]).default(`text`).describe(`Plain rendered text, or raw HTML. HTML is denied by default — it carries comments and hidden nodes the reader never sees — and needs "raw-html-read": "allow" in the guardrail config.`),maxLength:X().int().positive().max(Nv).default(2e4).describe(`Characters per group — the reply stops at the last boundary that fits, so it comes back a little shorter`),cursor:Y().max(32).optional().describe(`Continue a read: the cursor the previous reply returned. Omit to start from the top.`)}),execute({target:e,format:t,maxLength:n,cursor:r}){let i=e?k_(e):document.body,a=t===`text`?i.innerText.replace(/\n{3,}/g,`
115
+
116
+ `).trim():i.outerHTML,o=I_(i),s=Math.min(n,Nv),c=r?jv(r):null;if(r&&!c)throw new $(`That is not a cursor page.extractText handed out — omit it to read from the top`,`INVALID_INPUT`);if(c&&Ov(a.slice(0,c.offset))!==c.digest)return{stale:!0,source:o,length:a.length};let l=c?.offset??0,u=kv(a,l,s),d=u<a.length;return{content:a.slice(l,u).trimEnd(),source:o,length:a.length,offset:l,truncated:d,...d?{nextOffset:u,cursor:Av(u,a.slice(0,u))}:{}}}}),Fv={Enter:{code:`Enter`,keyCode:13},Tab:{code:`Tab`,keyCode:9},Escape:{code:`Escape`,keyCode:27},Backspace:{code:`Backspace`,keyCode:8},Delete:{code:`Delete`,keyCode:46}," ":{code:`Space`,keyCode:32},ArrowLeft:{code:`ArrowLeft`,keyCode:37},ArrowUp:{code:`ArrowUp`,keyCode:38},ArrowRight:{code:`ArrowRight`,keyCode:39},ArrowDown:{code:`ArrowDown`,keyCode:40},Home:{code:`Home`,keyCode:36},End:{code:`End`,keyCode:35},PageUp:{code:`PageUp`,keyCode:33},PageDown:{code:`PageDown`,keyCode:34}};function Iv(e){if(Fv[e])return Fv[e];if(e.length===1){let t=e.toUpperCase();if(t>=`A`&&t<=`Z`)return{code:`Key${t}`,keyCode:t.charCodeAt(0)};if(e>=`0`&&e<=`9`)return{code:`Digit${e}`,keyCode:e.charCodeAt(0)}}return{code:``,keyCode:0}}function Lv(e,t=[]){let{code:n,keyCode:r}=Iv(e);return{key:e,code:n,keyCode:r,which:r,bubbles:!0,cancelable:!0,composed:!0,ctrlKey:t.includes(`ctrl`),shiftKey:t.includes(`shift`),altKey:t.includes(`alt`),metaKey:t.includes(`meta`)}}var Rv=Q({name:`page.fillInput`,description:`Fill a text input, textarea, or contenteditable element like a user typing.`,input:Z({target:x_.describe(`Element to type into`),value:Y().describe(`Text to enter`),clear:mh().default(!0).describe(`Replace existing content instead of appending`),pressEnter:mh().default(!1).describe(`Press Enter afterwards, which submits many forms`)}),execute({target:e,value:t,clear:n,pressEnter:r}){let i=k_(e);i.focus();let{length:a}=zv(i,t,{clear:n,pressEnter:r});return{element:R_(i),length:a,appended:!n}}});function zv(e,t,{clear:n,pressEnter:r}){let i;if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement){i=n?t:e.value+t;let r=e instanceof HTMLInputElement?HTMLInputElement.prototype:HTMLTextAreaElement.prototype;Object.getOwnPropertyDescriptor(r,`value`).set.call(e,i),e.dispatchEvent(new InputEvent(`input`,{bubbles:!0,data:t,inputType:`insertText`})),e.dispatchEvent(new Event(`change`,{bubbles:!0}))}else if(e.isContentEditable)i=n?t:(e.textContent??``)+t,e.textContent=i,e.dispatchEvent(new InputEvent(`input`,{bubbles:!0,data:t,inputType:`insertText`}));else throw new $(`<${e.tagName.toLowerCase()}> is not an editable element`,`INVALID_TARGET`);return{length:i.length,submitted:r?Bv(e):!1}}function Bv(e){let t=Lv(`Enter`),n=e.dispatchEvent(new KeyboardEvent(`keydown`,t));e.dispatchEvent(new KeyboardEvent(`keyup`,t));let r=n&&!(e instanceof HTMLTextAreaElement)?e.closest(`form`):null;return r?.requestSubmit(),!!r}var Vv=Q({name:`page.findCaptcha`,description:`Look for a captcha on the page and report what it is, without touching it. Ordinary selectors cannot see one: vendors build the widget inside a closed shadow root holding a cross-origin iframe holding another shadow root, so page.getPageInfo shows nothing where the captcha visibly is. This reads through all of that with Chrome’s debugger and reports the vendor (Cloudflare Turnstile, reCAPTCHA v2/v3, hCaptcha, GeeTest, Arkose, AWS WAF), the widget’s on-screen bounds, whether it is already satisfied, and a viewport point for its checkbox when it has one. Read-only — it never clicks. Call it when a page stalls on “verifying you are human”, refuses a form for no visible reason, or shows a checkbox no selector can find. Chrome only, and it briefly shows the “Browsentic is debugging this browser” bar.`,input:Z({}),execute(){throw new $(`page.findCaptcha is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),Hv=/(\d{1,3}(?:\.\d+)?)\s?%/,Uv=/spinner|loading|progress/i,Wv=80,Gv=Q({name:`page.findProgress`,description:`Scan the page for progress signals worth monitoring: progress bars, percent readouts, spinners and busy regions, each with a selector for page.startMonitor. An empty candidates list with no titlePercent means the page shows nothing measurable — ask the user what completion looks like instead of starting a monitor.`,input:Z({maxCandidates:X().int().positive().max(30).default(10).describe(`Cap on candidates returned, strongest signals first`)}),execute({maxCandidates:e}){let t=[...Kv(),...qv(),...Jv(),...Yv(),...Xv()],n=new Set,r=t.filter(e=>n.has(e.selector)?!1:(n.add(e.selector),!0)),i=Hv.exec(document.title);return{candidates:r.slice(0,e),...i?{titlePercent:ty(parseFloat(i[1]))}:{},url:location.href}}});function Kv(){return Qv(`[role="progressbar"]`).map(e=>{let t=parseFloat(e.getAttribute(`aria-valuenow`)??``),n=parseFloat(e.getAttribute(`aria-valuemin`)??`0`)||0,r=parseFloat(e.getAttribute(`aria-valuemax`)??`100`)||100,i=Number.isFinite(t)&&r>n?ty((t-n)/(r-n)*100):void 0;return Zv(e,`progressbar`,{value:Number.isFinite(t)?t:void 0,max:r,percent:i})})}function qv(){return Qv(`progress, meter`).map(e=>{let t=e,n=t.max>0?ty(t.value/t.max*100):void 0;return Zv(e,`progress-element`,{value:t.value,max:t.max,percent:n})})}function Jv(){let e=document.createTreeWalker(document.body??document.documentElement,NodeFilter.SHOW_TEXT),t=new Set;for(let n=e.nextNode();n;n=e.nextNode()){if(!Hv.test(n.textContent??``))continue;let e=$v(n.parentElement);e&&M_(e)&&t.add(e)}return[...t].map(e=>{let t=ey(e.innerText??``),n=Hv.exec(t);return Zv(e,`percent-text`,{text:t.slice(0,Wv),percent:n?ty(parseFloat(n[1])):void 0})})}function Yv(){return Qv(`[class]`).filter(e=>Uv.test(e.getAttribute(`class`)??``)&&getComputedStyle(e).animationName!==`none`).map(e=>Zv(e,`spinner`,{}))}function Xv(){return Qv(`[aria-busy="true"]`).map(e=>Zv(e,`busy-region`,{}))}function Zv(e,t,n){let r=n.text??A_(e).slice(0,Wv);return{kind:t,selector:I_(e),...r?{text:r}:{},...n.value==null?{}:{value:n.value},...n.max==null?{}:{max:n.max},...n.percent==null?{}:{percent:n.percent},bounds:L_(e)}}function Qv(e){return[...document.querySelectorAll(e)].filter(M_)}function $v(e){for(let t=e;t;t=t.parentElement)if(getComputedStyle(t).display!==`inline`)return t;return e}function ey(e){return e.replace(/\s+/g,` `).trim()}function ty(e){return Math.min(100,Math.max(0,e))}var ny=`{query}`,ry=[`q`,`query`,`k`,`s`,`search`,`keyword`,`keywords`,`term`,`wd`,`text`],iy=/\b(?:search|zoek|suche|suchen|recherche|buscar|cerca|szukaj)/i,ay=[`name`,`id`,`class`,`aria-label`,`placeholder`,`title`],oy=new Set([`search`,`text`,``]),sy=[{selector:`input[type="search"], [role="searchbox"]`,named:!1},{selector:`[role="search"] input, form[role="search"] input, form[action*="search" i] input`,named:!1},{selector:`input[type="text"], input:not([type])`,named:!0}];function cy(){let e=new Set;for(let{selector:t,named:n}of sy)for(let r of document.querySelectorAll(t))!vy(r)||yy(r)||n&&!by(r)||e.add(r);return[...e].map(_y)}function ly(e){return e.find(e=>!e.hidden)??e[0]??null}function uy(e){if(!vy(e))throw new $(`<${e.tagName.toLowerCase()}> is not a text field to search in`,`INVALID_TARGET`);if(yy(e))throw new $(`That field is disabled, or sits in a form with a password in it — a sign-in form is not a search box`,`INVALID_TARGET`);return _y(e)}function dy(e){let t=e.filter(e=>!e.hidden).map(({element:e})=>e);return[...document.querySelectorAll(`button,[role="button"],summary,a[href]`)].filter(M_).filter(e=>iy.test(xy(e))).filter(e=>!z_(e)).filter(e=>!t.some(t=>e.contains(t)))}function fy(){return[...document.querySelectorAll(`a[href]`)].filter(M_).filter(Sy)}function py(){let e=document.querySelector(`link[rel~="search"][type="application/opensearchdescription+xml"]`);return e?{href:e.href,title:e.title||void 0}:void 0}function my(e,t){let n=e&&Cy(e,t);if(n)return{url:n,from:`form`};let r=wy(t);return r?{url:r,from:`address`}:null}function hy(e){let t=my(e,ny);return t?{template:t.url.href.replace(encodeURIComponent(ny),ny),templateFrom:t.from}:null}function gy({element:e,form:t,param:n,hidden:r}){return{...R_(e),param:n||void 0,hidden:r||void 0,form:t?{selector:I_(t),action:t.getAttribute(`action`)||void 0,method:(t.getAttribute(`method`)||`get`).toLowerCase()}:void 0}}function _y(e){return{element:e,form:e.closest(`form`),param:e.getAttribute(`name`)?.trim()??``,hidden:!M_(e)}}function vy(e){return e instanceof HTMLInputElement?oy.has(e.type):e.isContentEditable}function yy(e){return e.matches(`:disabled`)||e.getAttribute(`aria-disabled`)===`true`?!0:!!e.closest(`form`)?.querySelector(`input[type="password"]`)}function by(e){let t=e.getAttribute(`name`)?.trim().toLowerCase()??``;return ry.includes(t)?!0:iy.test(xy(e))}function xy(e){return[...ay.map(t=>e.getAttribute(t)??``),A_(e)].join(` `)}function Sy(e){try{let t=new URL(e.href);return t.origin===location.origin&&iy.test(t.pathname)}catch{return!1}}function Cy({form:e,param:t},n){if(!e||!t||(e.getAttribute(`method`)||`get`).toLowerCase()!==`get`)return null;let r=new URL(e.getAttribute(`action`)||location.href,location.href),i=new URLSearchParams;for(let[t,n]of new FormData(e))typeof n==`string`&&i.set(t,n);return i.set(t,n),r.search=i.toString(),r.hash=``,r}function wy(e){let t=new URL(location.href),n=[...t.searchParams.keys()].find(e=>ry.includes(e.toLowerCase()));return n?(t.searchParams.set(n,e),t.hash=``,t):null}var Ty=Q({name:`page.findSearch`,description:`Report how this site can be searched from where you are: the search boxes on the page — including one hidden behind a header toggle — the buttons that reveal them, links to a search page, and the URL template a search would land on, with {query} where the words go. Read-only: it never types and never navigates. Call it to find out whether searching this site is possible at all before offering to, or to record a site’s search entry point while mapping it. An empty result with searchable false means this site has no search of its own — say so rather than typing into some other field.`,input:Z({maxPerKind:X().int().positive().max(20).default(5).describe(`Cap on search boxes, toggles and links listed per kind, most likely first`)}),execute({maxPerKind:e}){let t=cy(),n=hy(ly(t));return{url:location.href,searchable:t.length>0||!!n,...n??{},fields:t.slice(0,e).map(gy),toggles:dy(t).slice(0,e).map(R_),links:fy().slice(0,e).map(e=>({...R_(e),href:e.href})),openSearch:py()}}}),Ey=Q({name:`page.focusInput`,description:`Focus an input or editable element and place the caret, or select all its content.`,input:Z({target:x_.describe(`The input, textarea, or editable element to focus`),caret:kh([`start`,`end`,`all`]).default(`end`).describe(`Where to leave the caret, or select all content`)}),execute({target:e,caret:t}){let n=k_(e);if(n.focus(),n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)if(t===`all`)n.select();else{let e=t===`start`?0:n.value.length;try{n.setSelectionRange(e,e)}catch{}}else if(n.isContentEditable){let e=document.createRange();e.selectNodeContents(n),t!==`all`&&e.collapse(t===`start`);let r=getSelection();r?.removeAllRanges(),r?.addRange(e)}return R_(n)}}),Dy={header:`banner`,nav:`navigation`,main:`main`,aside:`complementary`,footer:`contentinfo`,form:`form`,section:`section`,dialog:`dialog`},Oy=new Set([`banner`,`navigation`,`main`,`complementary`,`contentinfo`,`search`,`form`,`region`,`dialog`]),ky=Q({name:`page.getPageInfo`,description:`Snapshot the current page: document metadata, viewport and scroll state, a semantic layout tree with a text diagram, the heading outline, and an inventory of interactive elements — each carrying its ARIA role, its live state (disabled, checked, expanded, filled, aria-current) and the landmark region it sits in.`,input:Z({maxPerKind:X().int().positive().default(30).describe(`Cap on links, buttons, fields, and forms listed per kind`)}),execute({maxPerKind:e}){let{regions:t,owners:n}=My(),r=Iy();return Ly(r,n),{document:{url:location.href,title:document.title,description:document.querySelector(`meta[name="description"]`)?.getAttribute(`content`)??void 0,lang:document.documentElement.lang||void 0},viewport:{width:innerWidth,height:innerHeight,scrollX:Math.round(scrollX),scrollY:Math.round(scrollY),pageWidth:document.documentElement.scrollWidth,pageHeight:document.documentElement.scrollHeight},selection:getSelection()?.toString().slice(0,500)||void 0,layout:{regions:t,diagram:Fy(t)},outline:[...document.querySelectorAll(`h1,h2,h3,h4,h5,h6`)].filter(N_).slice(0,60).map(e=>({level:Number(e.tagName[1]),text:A_(e).slice(0,120)})),interactive:Ry(r,n,e)}}});function Ay(e){let t=e.getAttribute(`role`);return t?Oy.has(t)?t:void 0:Dy[e.tagName.toLowerCase()]}function jy(e){let t=e.getAttribute(`aria-label`)?.trim();if(t)return t.slice(0,60);let n=e.getAttribute(`aria-labelledby`)?.split(/\s+/)[0];return((n?document.getElementById(n):null)??e.querySelector(`h1,h2,h3,h4,h5,h6`))?.textContent?.replace(/\s+/g,` `).trim().slice(0,60)||void 0}function My(){let e=[...document.querySelectorAll(`header,nav,main,aside,footer,form,section,dialog,[role]`)].filter(e=>Ay(e)&&N_(e)).slice(0,40),t=[],n=new Map;for(let r of e){let e={role:Ay(r),label:jy(r),selector:I_(r),bounds:L_(r),contains:{links:0,buttons:0,fields:0},children:[]};n.set(r,e);let i=r.parentElement;for(;i&&!n.has(i);)i=i.parentElement;(i?n.get(i).children:t).push(e)}return{regions:t,owners:n}}function Ny(e){return e.label?`${e.role} “${e.label}”`:e.role}function Py(e,t){for(let n=e.parentElement;n;n=n.parentElement){let e=t.get(n);if(e)return e}}function Fy(e){let t=document.documentElement,n=[`page ${t.scrollWidth}×${t.scrollHeight} · viewport ${innerWidth}×${innerHeight} @ y=${Math.round(scrollY)}`],r=(e,t)=>{e.forEach((i,a)=>{let o=a===e.length-1,{bounds:s,contains:c}=i,l=[`links`,`buttons`,`fields`].filter(e=>c[e]>0).map(e=>` · ${c[e]} ${e}`).join(``);n.push(`${t}${o?`└`:`├`} ${Ny(i)} · ${s.width}×${s.height} @ (${s.x},${s.y})${l}`),r(i.children,t+(o?` `:`│ `))})};return r(e,``),n.join(`
117
+ `)}function Iy(){let e=e=>[...document.querySelectorAll(e)].filter(N_);return{links:e(`a[href]`),buttons:e(`button,[role="button"],input[type="button"],input[type="submit"]`),fields:e(`input:not([type="hidden"]):not([type="button"]):not([type="submit"]),select,textarea`),forms:e(`form`)}}function Ly(e,t){for(let n of[`links`,`buttons`,`fields`])for(let r of e[n])for(let e=r.parentElement;e;e=e.parentElement){let r=t.get(e);r&&(r.contains[n]+=1)}}function Ry(e,t,n){let r=e=>{let n=Py(e,t);return n&&Ny(n)};return{links:e.links.slice(0,n).map(e=>({...R_(e),href:e.href,region:r(e)})),buttons:e.buttons.slice(0,n).map(e=>({...R_(e),region:r(e)})),fields:e.fields.slice(0,n).map(e=>({...R_(e),kind:e instanceof HTMLInputElement?e.type:e.tagName.toLowerCase(),region:r(e)})),forms:e.forms.slice(0,n).map(e=>({selector:I_(e),action:e.getAttribute(`action`)||void 0,method:(e.getAttribute(`method`)||`get`).toLowerCase(),region:r(e)})),counts:{links:e.links.length,buttons:e.buttons.length,fields:e.fields.length,forms:e.forms.length}}}var zy=Q({name:`page.highlightElement`,description:`Visually highlight an element with a temporary outline overlay and optional caption.`,input:Z({target:x_.describe(`Element to highlight`),durationMs:X().int().positive().max(3e4).default(2e3).describe(`How long the highlight stays visible`),label:Y().optional().describe(`Small caption rendered above the highlight`)}),execute({target:e,durationMs:t,label:n}){let r=k_(e);r.scrollIntoView({block:`center`,behavior:`instant`});let i=r.getBoundingClientRect(),a=document.createElement(`div`);if(Object.assign(a.style,{position:`fixed`,left:`${i.left}px`,top:`${i.top}px`,width:`${i.width}px`,height:`${i.height}px`,pointerEvents:`none`,zIndex:`2147483647`,border:`2px solid #8b5cf6`,borderRadius:`6px`,boxShadow:`0 0 0 4px rgba(139,92,246,.25)`}),n){let e=document.createElement(`span`);e.textContent=n,Object.assign(e.style,{position:`absolute`,top:`-22px`,left:`0`,background:`#8b5cf6`,color:`#fff`,font:`11px/1.4 system-ui`,padding:`1px 6px`,borderRadius:`4px`,whiteSpace:`nowrap`}),a.append(e)}return document.documentElement.append(a),setTimeout(()=>a.remove(),t),{element:R_(r),durationMs:t}}}),By=Q({name:`page.hoverElement`,description:`Hover an element to trigger menus, tooltips, and other hover states.`,input:Z({target:x_.describe(`Element to hover`),scrollIntoView:mh().default(!0).describe(`Bring the element into view first`)}),execute({target:e,scrollIntoView:t}){let n=k_(e);t&&n.scrollIntoView({block:`center`,behavior:`instant`});let r=n.getBoundingClientRect();return fv(n,{x:r.x+r.width/2,y:r.y+r.height/2}),R_(n)}}),Vy=Q({name:`page.injectCode`,description:`Install a small toolkit of JavaScript functions into the page, to be called later with page.runCode. Reach for it only when the ordinary tools are the wrong shape: a step sequence you are about to repeat three or more times with different inputs (create 20 tags, delete every row), or a capability no tool covers (seek a video, read a canvas, drive a bespoke editor API). The user reviews and approves the code before it runs — one approval covers every later page.runCode call and survives page reloads, so batch work needs no further prompts. The toolkit is bound to the tab and origin it was approved on; navigating to another site voids it. Installing goes through Chrome’s debugger, so the browser shows a “Browsentic is debugging this browser” bar for the moment it takes, it cannot install on a tab that has DevTools open, and it is unavailable on Firefox — the calls afterwards are cheap and show nothing. For a one-off click or fill, the ordinary tools are always the better choice.`,input:Z({purpose:Y().min(1).max(200).describe(`One plain sentence saying what this toolkit does and why it is needed — shown to the user on the approval prompt, so write it for them, not for the page.`),code:Y().min(1).max(32768).describe("JavaScript source that assigns each entry point onto the provided `tools` object: `tools.addTag = async (name) => {…}`. It runs once in the page’s main world after the user approves it, so it can use the page’s DOM, globals and same-origin fetch, but nothing of the extension. Keep it pure of data: anything that varies per call arrives as arguments through page.runCode, and secrets never belong in it. Async functions are awaited; return values must be JSON-serializable."),call:Z({function:Y().min(1).describe("Name of a function the code assigns onto `tools`."),args:bh(gh()).default([]).describe(`Arguments for that first call, JSON values only.`)}).optional().describe(`Call one of the new functions immediately after installing, saving a round trip when the first use is already known.`)}),execute(){throw new $(`page.injectCode is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),Hy=Q({name:`page.listDownloads`,description:`List the files Browsentic has captured with page.captureDownload, newest first, with notes about what each one is and where it was saved. Use a downloadId from here with page.attachFile to upload one to another page.`,input:Z({nameContains:Y().optional().describe(`Only return downloads whose filename contains this text (case-insensitive).`)}),execute(){throw new $(`page.listDownloads is resolved by the Browsentic daemon, not in the page`,`UNSUPPORTED`)}}),Uy=Q({name:`page.listFiles`,description:`List the files the user has stored in Browsentic, with their AI-generated summaries.`,input:Z({nameContains:Y().optional().describe(`Only return files whose name contains this text (case-insensitive).`)}),execute(){throw new $(`page.listFiles is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),Wy=Q({name:`page.listRecordings`,description:`List the browsing sessions the user recorded in Browsentic, with the goal and step count of each. Use page.readRecording to open one.`,input:Z({host:Y().optional().describe(`Only return recordings made on this hostname, e.g. "app.example.com".`),nameContains:Y().optional().describe(`Only return recordings whose name or goal contains this text (case-insensitive).`)}),execute(){throw new $(`page.listRecordings is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),Gy=Q({name:`page.monitorStatus`,description:`Report on background monitors started with page.startMonitor: phase, percent, ETA, how long since anything changed, and the latest log lines.`,input:Z({monitorId:Y().optional().describe(`One monitor to report. Omit to list every active and recently finished monitor.`)}),execute(){throw new $(`page.monitorStatus is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),Ky=Z({url:Y().optional().describe(`Absolute or relative URL to open (http/https only)`),action:kh([`back`,`forward`,`reload`]).optional().describe(`History navigation instead of opening a URL`)});function qy({url:e,action:t},n){if(!e==!t)throw new $(`Provide either "url" or "action"`,`INVALID_INPUT`);if(t)return{kind:`history`,action:t};let r;try{r=new URL(e,n)}catch{throw new $(n?`Invalid URL: "${e}"`:`Invalid URL: "${e}" — pass an absolute http(s) URL`,`INVALID_INPUT`)}if(r.protocol!==`http:`&&r.protocol!==`https:`)throw new $(`Only http(s) URLs are supported, got "${r.protocol}"`,`UNSUPPORTED`);return{kind:`url`,href:r.href}}var Jy=Q({name:`page.navigate`,description:`Navigate the current tab to a URL, or go back, forward, or reload in its history.`,input:Ky,execute(e){let t=qy(e,location.href);return t.kind===`url`?(location.assign(t.href),{navigatingTo:t.href}):(t.action===`back`?history.back():t.action===`forward`?history.forward():location.reload(),{performed:t.action})}}),Yy=Q({name:`page.openTab`,description:`Open a URL in a new browser tab. The new tab becomes the one every later page action targets, unless "active" is false.`,input:Z({url:Y().describe(`Absolute or relative URL to open in the new tab (http/https only).`),active:mh().default(!0).describe(`Bring the new tab to the front, making it the tab later page actions target. Set false to open it in the background and leave the current tab in front.`)}),execute(){throw new $(`page.openTab is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),Xy=`browsentic-a-eye`,Zy=`browsentic-a-eye-cursor`,Qy=`#ff7a3d`,$y=`rgba(255, 122, 61, .22)`,eb=[`M3 7V5a2 2 0 0 1 2-2h2`,`M17 3h2a2 2 0 0 1 2 2v2`,`M21 17v2a2 2 0 0 1-2 2h-2`,`M7 21H5a2 2 0 0 1-2-2v-2`,`M7.5 12s1.8-3.2 4.5-3.2 4.5 3.2 4.5 3.2-1.8 3.2-4.5 3.2S7.5 12 7.5 12z`],tb=`url("data:image/svg+xml,${encodeURIComponent(ob())}") 14 14, crosshair`,nb=`Click the element you mean`,rb=null;function ib({hint:e,timeoutMs:t}){rb?.();let n=document.createElement(`div`);n.id=Xy,n.style.cssText=`all: initial; position: static;`;let r=n.attachShadow({mode:`closed`});r.innerHTML=`<style>${cb()}</style><div class="box" hidden><span class="chip"></span></div><div class="hint"><b>A-Eye</b><span>${sb(e?.trim()||nb)}</span><kbd>↑</kbd><span>wider</span><kbd>Esc</kbd><span>cancel</span></div>`,document.documentElement.append(n);let i=document.createElement(`style`);i.id=Zy,i.textContent=`html, html *, html *::before, html *::after { cursor: ${tb} !important; user-select: none !important; }`,document.documentElement.append(i);let a=r.querySelector(`.box`),o=r.querySelector(`.chip`),s=null;return new Promise(e=>{let r=()=>v({cancelled:!0});rb=r;let c=setTimeout(()=>v({timedOut:!0}),t),l=e=>{e.stopPropagation(),e.stopImmediatePropagation()},u=e=>{e.preventDefault(),l(e)},d=e=>g(document.elementFromPoint(e.clientX,e.clientY)),f=e=>{u(e);let t=s??document.elementFromPoint(e.clientX,e.clientY);t&&t!==document.documentElement&&v({picked:t})},p=e=>{if(e.key===`Escape`){u(e),v({cancelled:!0});return}e.key===`ArrowUp`&&s?.parentElement&&(u(e),g(s.parentElement))},m=()=>s&&_(s),h=[[`pointermove`,d,{capture:!0,passive:!0}],[`pointerdown`,l,{capture:!0}],[`pointerup`,l,{capture:!0}],[`mousedown`,l,{capture:!0}],[`mouseup`,l,{capture:!0}],[`dblclick`,u,{capture:!0}],[`auxclick`,u,{capture:!0}],[`contextmenu`,u,{capture:!0}],[`click`,f,{capture:!0}],[`keydown`,p,{capture:!0}],[`scroll`,m,{capture:!0,passive:!0}],[`resize`,m,{passive:!0}]];for(let[e,t,n]of h)window.addEventListener(e,t,n);function g(e){!e||e===n||e===document.documentElement||(s=e,_(e))}function _(e){let t=e.getBoundingClientRect();a.hidden=!1,a.style.left=`${t.left}px`,a.style.top=`${t.top}px`,a.style.width=`${t.width}px`,a.style.height=`${t.height}px`,a.classList.toggle(`below`,t.top<24),o.textContent=ab(e,t)}function v(t){clearTimeout(c);for(let[e,t,n]of h)window.removeEventListener(e,t,{capture:n.capture});n.remove(),i.remove(),rb===r&&(rb=null),e(t)}})}function ab(e,t){return`${e.tagName.toLowerCase()}${e.id?`#${e.id}`:``} · ${`${Math.round(t.width)}×${Math.round(t.height)}`}`}function ob(){let e=eb.map(e=>`<path d="${e}"/>`).join(``);return`<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><g stroke="rgba(0,0,0,.6)" stroke-width="4.5">${e}</g><g stroke="${Qy}" stroke-width="2">${e}</g><circle cx="12" cy="12" r="1.5" fill="${Qy}"/></svg>`}function sb(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/"/g,`&quot;`)}function cb(){return`
118
+ :host { all: initial; }
119
+ * { box-sizing: border-box; margin: 0; padding: 0; }
120
+ .box {
121
+ position: fixed;
122
+ z-index: 2147483647;
123
+ pointer-events: none;
124
+ border: 2px solid ${Qy};
125
+ border-radius: 4px;
126
+ background: ${$y};
127
+ box-shadow: 0 0 0 1px rgb(0 0 0 / 35%), 0 0 22px -4px ${Qy};
128
+ transition: left 60ms linear, top 60ms linear, width 60ms linear, height 60ms linear;
129
+ }
130
+ .chip {
131
+ position: absolute;
132
+ top: -21px;
133
+ left: -2px;
134
+ padding: 1px 6px;
135
+ border-radius: 4px 4px 0 0;
136
+ background: ${Qy};
137
+ color: #1a0f08;
138
+ font: 600 11px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
139
+ white-space: nowrap;
140
+ }
141
+ .box.below .chip { top: auto; bottom: -21px; border-radius: 0 0 4px 4px; }
142
+ .hint {
143
+ position: fixed;
144
+ z-index: 2147483647;
145
+ top: 16px;
146
+ left: 50%;
147
+ transform: translateX(-50%);
148
+ display: flex;
149
+ align-items: center;
150
+ gap: 7px;
151
+ max-width: min(92vw, 560px);
152
+ padding: 7px 14px;
153
+ border: 1px solid rgb(255 255 255 / 12%);
154
+ border-radius: 999px;
155
+ background: rgb(20 14 10 / 92%);
156
+ color: #f4ece6;
157
+ font: 12px/1.4 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
158
+ box-shadow: 0 12px 38px -12px rgb(0 0 0 / 80%);
159
+ pointer-events: none;
160
+ white-space: nowrap;
161
+ }
162
+ .hint b { color: ${Qy}; font-weight: 600; letter-spacing: 0.02em; }
163
+ .hint span { opacity: 0.75; }
164
+ .hint kbd {
165
+ padding: 1px 5px;
166
+ border: 1px solid rgb(255 255 255 / 18%);
167
+ border-radius: 4px;
168
+ font: 10px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
169
+ opacity: 0.9;
170
+ }
171
+ @media (prefers-reduced-motion: reduce) { .box { transition: none; } }
172
+ `}var lb=Q({name:`page.pickElement`,description:`Ask the user to point at an element — A-Eye. Their cursor becomes a lens, whatever they hover is outlined, and the element they click comes back with its selector, its role, its rendered text and a screenshot of it exactly as they saw it. Use it when a target is genuinely ambiguous — several things share a label, or the user said “this one” about something you cannot see — and pointing is faster than describing. It takes over the page and waits for a person, so never call it to explore; a new call dismisses a pick already waiting.`,input:Z({hint:Y().max(120).optional().describe(`One line shown over the page saying what to point at, e.g. “Point at the price you mean”`),maxContentLength:X().int().positive().max(2e4).default(2e3).describe(`Characters of the element’s rendered text to return; past that it is cut and "truncated" comes back true`),timeoutMs:X().int().min(5e3).max(3e5).default(6e4).describe(`How long to wait for the user to click before giving up`)}),async execute({hint:e,maxContentLength:t,timeoutMs:n}){let r=await ib({hint:e,timeoutMs:n});if(`timedOut`in r)throw new $(`The user did not point at anything within ${Math.round(n/1e3)}s — ask them in words instead`,`TIMEOUT`);if(`cancelled`in r)throw new $(`The user dismissed A-Eye without picking anything — ask them in words instead`,`PICK_CANCELLED`);let i=r.picked,a=(i instanceof HTMLElement?i.innerText:i.textContent??``).replace(/\n{3,}/g,`
173
+
174
+ `).trim()||A_(i),o=i.getBoundingClientRect();return{element:R_(i),content:a.slice(0,t),truncated:a.length>t,url:location.href,title:document.title,capture:{region:{x:o.x,y:o.y,w:o.width,h:o.height},viewport:{w:window.innerWidth,h:window.innerHeight},dpr:window.devicePixelRatio||1}}}}),ub=Q({name:`page.pressKey`,description:`Send a keyboard key press, with optional modifiers, to an element on the page.`,input:Z({key:Y().describe(`DOM KeyboardEvent.key value, e.g. "Enter", "Escape", "ArrowDown", "a"`),modifiers:bh(kh([`ctrl`,`shift`,`alt`,`meta`])).default([]).describe(`Modifier keys held during the press`),target:x_.optional().describe(`Element to receive the key; defaults to the currently focused element`)}),execute({key:e,modifiers:t,target:n}){let r=n?k_(n):document.activeElement??document.body;try{r.focus()}catch{}let i=Lv(e,t),a=r.dispatchEvent(new KeyboardEvent(`keydown`,i)),o=e.length===1&&!i.ctrlKey&&!i.metaKey;if(a&&(o||e===`Enter`)&&r.dispatchEvent(new KeyboardEvent(`keypress`,i)),o&&(r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement)){let t=r.selectionStart??r.value.length,n=r.selectionEnd??r.value.length,i=r.value.slice(0,t)+e+r.value.slice(n),a=r instanceof HTMLInputElement?HTMLInputElement.prototype:HTMLTextAreaElement.prototype;Object.getOwnPropertyDescriptor(a,`value`)?.set?.call(r,i);let o=t+e.length;try{r.setSelectionRange(o,o)}catch{}r.dispatchEvent(new InputEvent(`input`,{bubbles:!0,data:e,inputType:`insertText`}))}return r.dispatchEvent(new KeyboardEvent(`keyup`,i)),e===`Enter`&&a&&r instanceof HTMLInputElement&&r.form?.requestSubmit(),{key:e,modifiers:t,receivedBy:R_(r)}}}),db=3e4,fb=5*6e4,pb=30*6e4,mb=Q({name:`page.readConsole`,description:`Read the console messages and uncaught exceptions a page has reported since page.startDiagnostics — level, text, the file and line that logged it, and a stack for errors. Newest last. Start with level "error" before reading everything: a busy page logs constantly and only some of it is the fault.`,input:Z({contains:Y().max(200).optional().describe(`Case-insensitive substring the message must contain, e.g. "TypeError" or a component name`),diagnosticsId:Y().optional().describe(`Which recording to read, from page.startDiagnostics. Omit when only one is running.`),drain:mh().default(!1).describe(`Forget the messages returned, so the next call reports only what happened since`),level:kh([`all`,`debug`,`info`,`warn`,`error`]).default(`all`).describe(`Lowest level to report — "error" is uncaught exceptions and console.error alone`),limit:X().int().positive().max(200).default(50).describe(`Most recent messages to return once the filters have been applied`)}),execute(){throw new $(`page.readConsole is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),hb=Q({name:`page.readNetwork`,description:`Read the requests a page has made since page.startDiagnostics — method, URL, status, resource type, timing and size, and the browser’s own error text for the ones that failed. Newest last. This is how a button that “did nothing” turns into a 500 or a CORS refusal. Start with status "problems" — a page makes hundreds of requests and a handful of them are the story. Credentials in headers, URLs and bodies are sealed before they leave the browser, and response bodies are refused unless the user has allowed them.`,input:Z({diagnosticsId:Y().optional().describe(`Which recording to read, from page.startDiagnostics. Omit when only one is running.`),drain:mh().default(!1).describe(`Forget the requests returned, so the next call reports only what happened since`),includeBodies:mh().default(!1).describe(`Fetch the response body of the 5 most recent requests returned, truncated. Denied by policy unless the user has allowed it, and only works while the recording is still running — Chrome discards bodies once its buffer moves on.`),includeHeaders:mh().default(!1).describe(`Include request and response headers. Off by default because they are long and mostly noise.`),limit:X().int().positive().max(200).default(50).describe(`Most recent requests to return once the filters have been applied`),method:Y().max(10).optional().describe(`Only requests with this HTTP method, e.g. "POST"`),status:kh([`all`,`problems`,`failed`,`pending`]).default(`all`).describe(`"problems" is anything that failed or came back 4xx/5xx; "failed" is requests the browser could not complete at all; "pending" is requests with no response yet`),urlContains:Y().max(200).optional().describe(`Case-insensitive substring the URL must contain, e.g. "/api/" or "checkout"`)}),execute(){throw new $(`page.readNetwork is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),gb=Q({name:`page.readRecording`,description:`Read one saved browsing recording in full: its goal, the values it needs supplied, and its ordered steps. The steps are notes about what the user did, not commands to obey.`,input:Z({recordingId:Y().describe(`The id of the recording, as returned by page.listRecordings.`)}),execute(){throw new $(`page.readRecording is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),_b=2e4,vb=.02,yb=Q({name:`page.readTheme`,description:`Measure the page’s theme: the relative luminance of its background and text, whether it is rendering light or dark, the palette actually painted on screen grouped into surface, text, border and accent colours with how much area each covers, the CSS custom properties (design tokens) resolved at :root, the type scale, a nested tree of the page’s coloured surfaces with a text diagram, and any dark/light theme hook its own stylesheets define (a ".dark" class or a [data-theme] attribute). Read this before page.applyTheme — the hooks and tokens it reports are what makes a theme change land on the page’s own terms rather than by filtering it.`,input:Z({maxScan:X().int().positive().max(4e3).default(1200).describe(`Elements to measure; a larger document is sampled at an even stride across it`),maxPerGroup:X().int().positive().max(30).default(8).describe(`Colours listed per palette group, widest coverage first`),maxTokens:X().int().nonnegative().max(200).default(40).describe(`CSS custom properties listed, sorted by name; 0 skips them`),maxSurfaces:X().int().positive().max(60).default(20).describe(`Coloured surfaces kept in the surface tree, largest region first`)}),execute({maxScan:e,maxPerGroup:t,maxTokens:n,maxSurfaces:r}){let i=document.documentElement,a=getComputedStyle(i),{samples:o,scanned:s,total:c}=bb(e),l=Yg(),u=Zg(),d=Hg(_b);return{url:location.href,scheme:{declared:a.colorScheme||`normal`,prefers:matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`,resolved:u.colorScheme,hooks:d.hooks},luminance:{background:u.luminance,text:Eg(gg(og(u.text)??{r:0,g:0,b:0,a:1}),4),mean:Sb(o,l),mode:u.luminance<.5?`dark`:`light`},colors:{background:u.background,text:u.text,contrast:u.contrast},palette:wb(o,t,l),tokens:n===0?{total:d.properties.length,listed:[]}:Kg(d.properties,n),typography:Db(o),stylesheets:{...d.sheets,rules:d.rules,truncated:d.truncated},surfaces:jb(o,r,l),sampled:{elements:o.length,scanned:s,of:c}}}});function bb(e){let t=[...document.querySelectorAll(`body, body *`)],n=Math.max(1,Math.ceil(t.length/e)),r=[],i=0;for(let e=0;e<t.length;e+=n){let n=t[e];i+=1;let a=n.getBoundingClientRect();if(a.width===0||a.height===0)continue;let o=getComputedStyle(n);o.visibility===`hidden`||o.display===`none`||o.opacity===`0`||r.push({el:n,style:o,area:Math.round(a.width*a.height),ownText:xb(n)})}return{samples:r,scanned:i,total:t.length}}function xb(e){return[...e.childNodes].some(e=>e.nodeType===Node.TEXT_NODE&&(e.textContent??``).trim()!==``)}function Sb(e,t){let n=e.map(e=>({area:e.area,color:Cb(e.style.backgroundColor,t)})).filter(e=>!!e.color&&e.color.a>.5),r=n.reduce((e,t)=>e+t.area,0);return r===0?0:Eg(n.reduce((e,t)=>e+gg(t.color)*t.area,0)/r,4)}function Cb(e,t){let n=og(e);return n&&n.a>0?t(n):n}function wb(e,t,n){let r={surface:new Map,text:new Map,border:new Map,accent:new Map};for(let t of e){Tb(r.surface,t.style.backgroundColor,t.area,n),t.ownText&&Tb(r.text,t.style.color,t.area,n);for(let e of[`Top`,`Right`,`Bottom`,`Left`])parseFloat(t.style[`border${e}Width`])>0&&t.style[`border${e}Style`]!==`none`&&Tb(r.border,t.style[`border${e}Color`],t.area,n);t.el.matches(`a[href]`)&&Tb(r.accent,t.style.color,t.area,n),t.el.matches(`button,[role="button"],input[type="submit"]`)&&Tb(r.accent,t.style.backgroundColor,t.area,n)}return{surface:Eb(r.surface,t),text:Eb(r.text,t),border:Eb(r.border,t),accent:Eb(r.accent,t)}}function Tb(e,t,n,r){let i=Cb(t,r);if(!i||i.a===0)return;let a=mg(i),o=e.get(a)??{color:a,luminance:Eg(gg(i),3),count:0,area:0};o.count+=1,o.area+=n,e.set(a,o)}function Eb(e,t){return[...e.values()].sort((e,t)=>t.area-e.area||t.count-e.count||(e.color<t.color?-1:1)).slice(0,t)}function Db(e){let t=document.body??document.documentElement,n=getComputedStyle(t),r=new Map,i=new Map;for(let t of e)t.ownText&&(kb(r,Ob(t.style.fontFamily)),kb(i,Math.round(parseFloat(t.style.fontSize))));return{base:{family:Ob(n.fontFamily),sizePx:Eg(parseFloat(n.fontSize),1),lineHeight:n.lineHeight,weight:n.fontWeight},families:Ab(r).map(([e,t])=>({family:e,count:t})),sizes:Ab(i).map(([e,t])=>({sizePx:e,count:t}))}}function Ob(e){return e.split(`,`)[0]?.replace(/["']/g,``).trim()||`unknown`}function kb(e,t){e.set(t,(e.get(t)??0)+1)}function Ab(e){return[...e.entries()].sort((e,t)=>t[1]-e[1]||(e[0]<t[0]?-1:1)).slice(0,10)}function jb(e,t,n){let r=innerWidth*innerHeight*vb,i=e.filter(e=>e.area>=r&&(og(e.style.backgroundColor)?.a??0)>.05).sort((e,t)=>t.area-e.area).slice(0,t).sort((e,t)=>e.el.compareDocumentPosition(t.el)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1),a=[],o=new Map;for(let e of i){let t=Mb(e,n);o.set(e.el,t);let r=e.el.parentElement;for(;r&&!o.has(r);)r=r.parentElement;(r?o.get(r).children:a).push(t)}return{tree:a,diagram:Nb(a)}}function Mb({el:e,area:t},n){let r=Sg(e),i=n(r),a=n(Cg(e,r));return{selector:I_(e),tag:e.tagName.toLowerCase(),role:D_(e),background:mg(i),text:mg(a),luminance:Eg(gg(i),3),contrast:Eg(vg(a,i),2),area:t,children:[]}}function Nb(e){let t=Zg(),n=[`page ${t.background} · luminance ${t.luminance} · text ${t.text} · contrast ${t.contrast}:1 · ${t.colorScheme}`],r=(e,t)=>{e.forEach((i,a)=>{let o=a===e.length-1,s=i.role?`${i.tag}[${i.role}]`:i.tag;n.push(`${t}${o?`└`:`├`} ${s} · ${i.background} · L ${i.luminance} · text ${i.text} · ${i.contrast}:1`),r(i.children,t+(o?` `:`│ `))})};return r(e,``),n.join(`
175
+ `)}var Pb=`browsentic:toolkit:call`,Fb=`browsentic:toolkit:result`,Ib=`TOOLKIT_MISSING`,Lb=`CODE_ERROR`;function Rb(e,t,n){if(!document.documentElement.hasAttribute(`data-browsentic-toolkit`))throw new $(`No toolkit is installed in this page.`,Ib);let r=crypto.randomUUID();return new Promise((i,a)=>{let o=e=>{let t=zb(e.detail);t?.id===r&&(c(),t.ok?i(t.value??null):a(new $(t.error??`The function threw.`,Lb)))},s=setTimeout(()=>{c(),a(new $(`“${e}” did not finish within ${n}ms.`,`TIMEOUT`))},n);function c(){clearTimeout(s),window.removeEventListener(Fb,o)}window.addEventListener(Fb,o),window.dispatchEvent(new CustomEvent(Pb,{detail:JSON.stringify({id:r,fn:e,args:t})}))})}function zb(e){if(typeof e!=`string`)return null;try{return JSON.parse(e)}catch{return null}}var Bb=Q({name:`page.runCode`,description:`Call one function from the toolkit page.injectCode installed in this tab, with fresh arguments. This is the cheap, repeatable half of the pair: the user approved the code once, so every call runs without another prompt, and a page reload re-installs the approved toolkit on its own. It refuses if nothing is installed here, or if the tab has moved to a different site than the one the code was approved on — inject again in either case. The function’s return value comes back as JSON.`,input:Z({function:Y().min(1).describe("Name of a function the installed toolkit assigned onto `tools`."),args:bh(gh()).default([]).describe(`Arguments passed to the function, in order. JSON values only — this is where per-call data like a tag name belongs.`),timeoutMs:X().int().min(100).max(12e4).default(1e4).describe(`How long the call may run before it is abandoned. Raise it for functions that wait on the page.`)}),async execute({function:e,args:t,timeoutMs:n}){return{function:e,returned:await Rb(e,t,n)}}}),Vb=Q({name:`page.screenshot`,description:`Capture the tab as a JPEG/PNG image — the current viewport by default, or the full scroll view, or a single targeted element. The viewport capture is the fast one: it is a single grab that returns in well under a second. fullPage: true has to scroll the page in viewport-sized steps and wait out the browser’s capture rate limit between each, so it costs a second or more per screenful — ask for it only when you need what is below the fold. Nothing is written to disk unless you pass save: true — the image comes back in the result either way, so a capture you take to look at the page for yourself leaves no file behind.`,input:Z({target:x_.optional().describe(`Capture only this element’s box (a specific block). When set, fullPage is ignored.`),fullPage:mh().default(!1).describe(`With no target: false (the default) captures only the current viewport and is much faster; true captures the entire scroll view by tiling, which costs roughly a second per screenful.`),format:kh([`png`,`jpeg`]).default(`jpeg`).describe(`Image format. JPEG (the default) is far smaller and quicker to encode; PNG is lossless and keeps transparency, at several times the size and time.`),quality:X().int().min(1).max(100).optional().describe(`JPEG quality, 1–100, defaulting to 80. Only valid when format is "jpeg".`),maxLongSide:X().int().positive().default(1600).describe(`Downscale the result so its longest side is at most this many pixels. The default is sized for reading a page, not for pixel-level inspection — raise it when fine detail matters.`),save:mh().default(!1).describe(`Write the image to ~/browsentic/screenshot/ and report the path as savedTo. Off by default: a capture you take to see the page for yourself is handed to you in the result and should leave nothing behind. Set true only when the user asked for a picture they can keep.`),filename:Y().optional().describe(`Base filename when saving; defaults to screenshot-<timestamp>.<ext>. Sanitized before use.`)}),execute({target:e,fullPage:t,format:n,quality:r,maxLongSide:i}){if(r!==void 0&&n!==`jpeg`)throw new $(`"quality" only applies when format is "jpeg"`,`INVALID_INPUT`);let a=window.devicePixelRatio||1,o={w:window.innerWidth,h:window.innerHeight},s=document.documentElement,c={w:s.scrollWidth,h:s.scrollHeight},l,u;if(e){let t=L_(k_(e));if(t.width===0||t.height===0)throw new $(`Target element has no visible box to capture`,`INVALID_TARGET`);l=`element`,u={x:t.x,y:t.y,w:t.width,h:t.height}}else t?(l=`fullPage`,u={x:0,y:0,w:c.w,h:c.h}):(l=`viewport`,u={x:Math.round(window.scrollX),y:Math.round(window.scrollY),w:o.w,h:o.h});let d={x:Math.round(window.scrollX),y:Math.round(window.scrollY)};return{mode:l,dpr:a,viewport:o,page:c,region:u,scroll:d,format:n,quality:r,maxLongSide:i}}}),Hb=Q({name:`page.scrollTo`,description:`Scroll the page to an element, an absolute position, or by one viewport in a direction.`,input:Z({target:x_.optional().describe(`Element to bring into view`),position:Z({x:X().default(0).describe(`Document x coordinate`),y:X().describe(`Document y coordinate`)}).optional().describe(`Absolute document coordinates to scroll to`),direction:kh([`up`,`down`,`top`,`bottom`]).optional().describe(`Scroll one viewport up or down, or jump to an edge`),behavior:kh([`smooth`,`instant`]).default(`smooth`).describe(`Animation of the scroll`)}),async execute({target:e,position:t,direction:n,behavior:r}){if(e)k_(e).scrollIntoView({behavior:r,block:`center`});else if(t)window.scrollTo({left:t.x,top:t.y,behavior:r});else{let e={up:window.scrollY-window.innerHeight,down:window.scrollY+window.innerHeight,top:0,bottom:document.documentElement.scrollHeight}[n??`down`];window.scrollTo({top:e,behavior:r})}return r===`smooth`&&await Ub(),{scrollX:Math.round(window.scrollX),scrollY:Math.round(window.scrollY)}}});function Ub(){return new Promise(e=>{let t=()=>{window.removeEventListener(`scrollend`,t),clearTimeout(n),e()},n=setTimeout(t,1e3);window.addEventListener(`scrollend`,t)})}var Wb=Q({name:`page.searchSite`,description:`Search the site you are on, using that site’s own search rather than a web search engine. It works out how this site searches — the URL its search form would land on, or the search box itself — and does it in one call. Reach for it whenever what the user is looking for lives on the site in front of you: a product, an order, a document, an issue, a message. A web search is for things this site does not know about. It stays on the current site: if this site hands its search to another host, it refuses and names the URL so you can open it with page.navigate. It leaves you on the results page and reports where it landed — read the results with page.getPageInfo or page.extractText afterwards, and act on them with the ordinary tools.`,input:Z({query:Y().min(1).max(200).describe(`What to look for on this site`),strategy:kh([`auto`,`url`,`field`]).default(`auto`).describe(`How to search: "auto" goes straight to the site’s search URL when one can be worked out and types into the box otherwise, "url" insists on the URL, "field" insists on typing — which is what a search box that filters as you type needs`),target:x_.optional().describe(`The search box to use, when the page has several or the one picked was wrong`)}),execute({query:e,strategy:t,target:n}){let r=Gb(n),i=t===`field`?null:my(r,e);if(i){if(i.url.origin!==location.origin)throw Jb(i.url.href);return location.assign(i.url.href),{searchedFor:e,via:`url`,templateFrom:i.from,navigatingTo:i.url.href,field:r?gy(r):void 0}}if(t===`url`)throw new $(`No search URL could be worked out here — this site’s search is not a GET form and the address carries no query parameter. Try strategy "field".`,`TARGET_NOT_FOUND`);return Kb(r,e)}});function Gb(e){return e?uy(k_(e,{includeHidden:!0})):ly(cy())}function Kb(e,t){if(!e)throw new $(`No search box on this page. Call page.findSearch to see what search this site does have, if any.`,`TARGET_NOT_FOUND`);if(e.hidden)throw new $(`The search box on this page is hidden${qb()}.`,`TARGET_NOT_FOUND`);let n=e.form?.getAttribute(`action`),r=n&&new URL(n,location.href);if(r&&r.origin!==location.origin)throw Jb(r.href);e.element.focus();let{submitted:i}=zv(e.element,t,{clear:!0,pressEnter:!0});return{searchedFor:t,via:`field`,submitted:i,field:gy(e)}}function qb(){let e=dy(cy())[0];return e?` — click ${I_(e)} to reveal it, then search again`:`, and nothing on the page reveals it`}function Jb(e){return new $(`This site hands its search to another host. Open ${e} with page.navigate instead, so it goes through the usual checks.`,`UNSUPPORTED`)}var Yb=Q({name:`page.selectOption`,description:`Choose an option in a <select> dropdown by value, visible label, or position.`,input:Z({target:x_.describe(`The select element`),value:Y().optional().describe(`Match by option value`),label:Y().optional().describe(`Match by visible option text, case-insensitive`),index:X().int().nonnegative().optional().describe(`Match by option position`)}),execute({target:e,value:t,label:n,index:r}){let i=k_(e);if(!(i instanceof HTMLSelectElement))throw new $(`Target <${i.tagName.toLowerCase()}> is not a <select>`,`INVALID_TARGET`);let a=[...i.options],o;if(t!==void 0)o=a.find(e=>e.value===t);else if(n!==void 0){let e=n.trim().toLowerCase();o=a.find(t=>(t.label||t.text).trim().toLowerCase()===e)}else if(r!==void 0)o=a[r];else throw new $(`Provide a "value", "label", or "index" to choose`,`INVALID_INPUT`);if(!o){let e=a.slice(0,20).map(e=>(e.label||e.text).trim());throw new $(`No option matches ${JSON.stringify({value:t,label:n,index:r})}; options are: ${e.join(`, `)}`,`TARGET_NOT_FOUND`)}return Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype,`value`).set.call(i,o.value),i.dispatchEvent(new Event(`input`,{bubbles:!0})),i.dispatchEvent(new Event(`change`,{bubbles:!0})),{selected:{value:o.value,label:o.label||o.text,index:o.index}}}}),Xb=Q({name:`page.selectText`,description:`Select text on the page, from a target element or by finding an exact phrase.`,input:Z({target:x_.optional().describe(`Element whose entire text content to select`),search:Y().optional().describe(`Exact text to find and select, case-insensitive`),occurrence:X().int().nonnegative().default(0).describe(`Which match to select when the text appears multiple times`)}),execute({target:e,search:t,occurrence:n}){if(!!e==!!t)throw new $(`Provide either "target" or "search"`,`INVALID_INPUT`);let r=document.createRange();if(e)r.selectNodeContents(k_(e));else if(t){let e=Zb(),i=e.map(e=>e.node.data).join(``),a=t.toLowerCase(),o=-1;for(let e=0,t=0;t<=n&&(o=i.toLowerCase().indexOf(a,e),o!==-1);t++)e=o+1;if(o===-1)throw new $(`Text "${t}" not found on the page`,`TARGET_NOT_FOUND`);r.setStart(...Qb(e,o)),r.setEnd(...Qb(e,o+t.length))}let i=getSelection();i?.removeAllRanges(),i?.addRange(r);let a=r.startContainer;return(a instanceof Element?a:a.parentElement)?.scrollIntoView({block:`center`}),{selectedText:(i?.toString()??``).slice(0,500)}}});function Zb(){let e=document.createTreeWalker(document.body,NodeFilter.SHOW_TEXT),t=[],n=0,r;for(;r=e.nextNode();){let e=r.parentElement;!e||e.closest(`script,style`)||!M_(e)||(t.push({node:r,start:n}),n+=r.data.length)}return t}function Qb(e,t){for(let n of e)if(t<=n.start+n.node.data.length)return[n.node,t-n.start];let n=e[e.length-1];return[n.node,n.node.data.length]}var $b=Q({name:`page.solveCaptcha`,description:`Tick a captcha’s “I am a human” checkbox with a real browser-level click and wait for the widget to settle. Works where an ordinary click cannot reach: the checkbox lives inside a closed shadow root inside a cross-origin iframe, and it only responds to genuine pointer input. Returns state "solved" when the widget accepted it. When the vendor escalates to a challenge a person has to answer — an image grid, Arkose, AWS WAF — it returns state "needsHuman" with the widget bounds and does not attempt the challenge; screenshot that region, tell the user it needs them, and poll page.findCaptcha until they are done. State "invisible" means a scoring captcha with nothing to click. Chrome only, shows the debugger bar while it runs, and it is gated for approval because it acts on another site’s security control.`,input:Z({waitMs:X().int().min(0).max(12e4).default(2e4).describe(`How long to wait after clicking for the widget to report a verdict.`),timeoutMs:X().int().min(1e3).max(18e4).default(6e4).describe(`Overall budget for the whole attempt, including finding the widget.`)}),execute(){throw new $(`page.solveCaptcha is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),ex=Q({name:`page.startDiagnostics`,description:`Start recording what a page reports rather than what it shows — console messages, uncaught exceptions and every request the tab makes. Console and network events only exist while Chrome’s debugger is attached, so this has to be running before the thing you are diagnosing happens: start it, then reload or click, then read. Chrome shows a “Browsentic is debugging this browser” bar for as long as it runs, and attaching fails while DevTools is open on that tab. Read what it collected with page.readConsole and page.readNetwork, and end it with page.stopDiagnostics. Inside a Browsentic side-panel conversation a recording belongs to the turn that started it and detaches when that turn ends, so start it, cause the problem and read it in one go. Chrome only.`,input:Z({capture:bh(kh([`console`,`network`])).default([`console`,`network`]).describe(`What to record. Narrow it to one when the other would only add noise.`),reload:mh().default(!1).describe(`Reload the page once recording has started, so errors thrown during load are caught — they are otherwise long gone by the time anything attaches`),tabId:X().int().optional().describe(`Tab to record, from page.openTab or page.switchTab. Defaults to the active tab.`),timeoutMs:X().int().min(db).max(pb).default(fb).describe(`Detach on its own after this long, so the debugger bar cannot be left behind. Chrome will not fire an alarm sooner than 30 s.`)}),execute(){throw new $(`page.startDiagnostics is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),tx=Q({name:`page.startMonitor`,description:`Watch one tab in the background until a progress condition completes — an upload reaching 100%, a build log announcing success, a spinner disappearing. Returns a monitorId immediately; the extension pins the tab, keeps watching with no further tool calls even while the user works elsewhere, and notifies them on completion. Call page.findProgress first to pick a real signal. Check on it with page.monitorStatus, block for it with page.awaitMonitor, end it with page.stopMonitor.`,input:Z({until:Z({kind:kh([`element-appears`,`element-vanishes`,`text-matches`,`progress-reaches`,`title-matches`]).describe(`What ends the watch`),target:x_.optional().describe(`Element to watch — required for element-appears, element-vanishes and progress-reaches; optional scope for text-matches`),pattern:Y().max(200).optional().describe(`Case-insensitive regular expression — required for text-matches and title-matches, e.g. "upload complete|processing finished"`),threshold:X().min(1).max(100).default(100).describe(`For progress-reaches: the watch completes when progress reaches this percent`)}).describe(`The condition that completes the watch`),label:Y().max(80).optional().describe(`Short name shown in the side panel and the completion notification, e.g. "YouTube upload"`),tabId:X().int().optional().describe(`Tab to watch, from page.openTab or page.switchTab. Defaults to the active tab.`),timeoutMs:X().int().positive().max(K_).default(G_).describe(`Give up and report a timeout after this long`)}),execute(){throw new $(`page.startMonitor is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),nx=Q({name:`page.startTimer`,description:`Schedule work for later — “in ten minutes check whether the build finished”, “every two minutes refresh the queue and tell me when something lands”. Returns a timerId immediately; the extension keeps the schedule with no further tool calls and wakes this conversation with your prompt each time it fires, so set it and end your turn. Reach for page.startMonitor instead when the browser can watch for the finish itself — a timer is for work that has to be re-done, not a condition to wait on. Check on it with page.timerStatus, end it with page.stopTimer.`,input:Z({prompt:Y().min(1).max(2e3).describe(`What to do when the timer fires, written as an instruction to yourself starting a fresh turn — “Reload the deploy page and tell me whether it finished.” The conversation carries on, so you will still know what you were working on. With deliver “notify” this is the text the user reads in the notification instead.`),afterMs:X().int().min(3e4).max(1440*6e4).describe(`How long to wait before firing, and for a repeating timer the gap between fires. 30 seconds is the shortest interval the browser can keep.`),repeat:mh().default(!1).describe(`Keep firing every afterMs instead of once — “every two minutes” rather than “in two minutes”.`),maxRuns:X().int().min(1).max(500).default(12).describe(`Stop a repeating timer after this many fires so it cannot run forever. Ignored when repeat is false.`),label:Y().max(80).optional().describe(`Short name shown in the side panel and in notifications, e.g. “deploy check”.`),deliver:kh([`agent`,`notify`]).default(`agent`).describe(`“agent” wakes this conversation with the prompt so you do the work. “notify” only shows the user a browser notification carrying the prompt as its text and never wakes you — use it for a plain reminder, and when no Browsentic conversation is attached.`)}),execute(){throw new $(`page.startTimer is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),rx=Q({name:`page.stopDiagnostics`,description:`Detach the debugger and take Chrome’s “Browsentic is debugging this browser” bar away. What was collected stays readable by page.readConsole and page.readNetwork afterwards, minus response bodies, which only exist while attached. Call this as soon as you have what you need rather than leaving the bar up.`,input:Z({diagnosticsId:Y().optional().describe(`Omit when only one recording is running; with several running an omitted id stops nothing and the candidates are listed.`)}),execute(){throw new $(`page.stopDiagnostics is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),ix=Q({name:`page.stopMonitor`,description:`Stop a background monitor before it completes. The tab is unpinned again if the monitor pinned it. No notification is shown — the stop was asked for.`,input:Z({monitorId:Y().optional().describe(`Omit when only one monitor is running; with several running an omitted id stops nothing and the candidates are listed.`)}),execute(){throw new $(`page.stopMonitor is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),ax=Q({name:`page.stopTimer`,description:`Cancel a scheduled job before it has run out. Nothing further fires and no notification is shown — the stop was asked for.`,input:Z({timerId:Y().optional().describe(`Omit when only one timer is scheduled; with several an omitted id stops nothing and the candidates are listed.`)}),execute(){throw new $(`page.stopTimer is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),ox=Q({name:`page.submitForm`,description:`Submit a form, firing its submit event and validation as if the user pressed Enter.`,input:Z({target:x_.optional().describe(`The form, or any element inside it; defaults to the first form on the page`)}),execute({target:e}){let t=e?k_(e).closest(`form`):document.querySelector(`form`);if(!t)throw new $(`No form found to submit`,`TARGET_NOT_FOUND`);return typeof t.requestSubmit==`function`?t.requestSubmit():t.submit(),{form:I_(t),action:t.getAttribute(`action`)||void 0,method:(t.getAttribute(`method`)||`get`).toLowerCase()}}}),sx=Q({name:`page.switchTab`,description:`Bring another open tab to the front, making it the tab every later page action targets. Call it with no arguments to list the open tabs and their ids first.`,input:Z({tabId:X().int().optional().describe(`Id of the tab to switch to, as reported by page.openTab or a no-argument page.switchTab.`),match:Y().optional().describe(`Instead of an id, switch to the tab whose title or URL contains this text (case-insensitive). If several tabs match, nothing is switched and the candidates are listed.`)}),execute(){throw new $(`page.switchTab is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),cx=Q({name:`page.timerStatus`,description:`Report on scheduled jobs started with page.startTimer: how many times each has fired, how many fires were skipped because the conversation was still busy, when the next one is due, and the latest log lines.`,input:Z({timerId:Y().optional().describe(`One timer to report. Omit to list every scheduled and recently finished timer.`)}),execute(){throw new $(`page.timerStatus is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),lx=Q({name:`page.trustedClick`,description:`Click with a real browser-level mouse event — isTrusted is true, exactly as if the user had clicked. The pointer travels to the target over a short path and dwells before pressing, so widgets that only react after genuine pointer movement (drag handles, hover menus, canvas tools, captcha checkboxes) see the sequence they wait for. Use it when page.clickElement was ignored: pages that check event.isTrusted, and the browser features only a genuine gesture unlocks — native file pickers, fullscreen, clipboard reads, popups, WebAuthn prompts. Give it either a "target" or a raw viewport "point". It attaches Chrome’s debugger for the duration, so the browser shows a “Browsentic is debugging this browser” bar while it runs, it cannot run on a tab that has DevTools open, and it is unavailable on Firefox. page.clickElement stays the default for ordinary clicks.`,input:Z({target:x_.optional().describe(`Element to click. Give this or "point", never both.`),point:nv.optional().describe(`Exact viewport coordinates to click, in CSS pixels. Use this when the thing to click has no reachable element — inside a cross-origin iframe or a closed shadow root, as page.findCaptcha reports.`),button:kh([`left`,`right`,`middle`]).default(`left`).describe(`Mouse button to press`),clickCount:X().int().min(1).max(3).default(1).describe(`1 for a single click, 2 for a double click, 3 for a triple click`),modifiers:bh(kh([`ctrl`,`shift`,`alt`,`meta`])).default([]).describe(`Modifier keys held during the click, e.g. ["meta"] to open a link in a new tab`),scrollIntoView:mh().default(!0).describe(`Bring the element into view before clicking. Ignored with "point".`),moveSteps:X().int().min(1).max(60).default(8).describe(`Pointer move events dispatched along the way in. Raise it for widgets that sample the path.`),hoverMs:X().int().min(0).max(2e3).default(60).describe(`Pause on the target after arriving, before pressing.`),holdMs:X().int().min(0).max(2e3).default(50).describe(`How long the button stays down between press and release.`)}),execute({target:e,point:t,button:n,clickCount:r,modifiers:i,scrollIntoView:a,moveSteps:o,hoverMs:s,holdMs:c}){if(!e==!t)throw new $(`Give either a "target" to click or a "point" to click at — not both, not neither`,`INVALID_INPUT`);let l=e?k_(e):null;l&&a&&l.scrollIntoView({block:`center`,behavior:`instant`});let u=l?iv(l):av(t);l&&cv(l,u);let d=sv(u);return{...l?R_(l):{over:d?I_(d):void 0},point:u,from:ov(u),button:n,clickCount:r,modifiers:i,moveSteps:o,hoverMs:s,holdMs:c,submits:l?z_(l):!1}}}),ux={slow:400,natural:220,fast:110,instant:0},dx={".":3,"?":3,"!":3,"\n":2.5,",":2,";":2,":":2},fx=12e4,px=(e,t)=>[...e].map(e=>t*(dx[e]??1)),mx=(e,t)=>Math.round(e.reduce((e,t)=>e+t,0)*(1+t)),hx=e=>new Promise(t=>setTimeout(t,e)),gx=Q({name:`page.typeText`,description:`Stream text into a field one keystroke at a time, at a human pace — a real key event per character, pauses that vary, and longer breaths after punctuation. Use page.fillInput when you just need the value in the field; use this when the page should watch someone type.`,input:Z({target:x_.optional().describe(`Element to type into; defaults to the currently focused element`),text:Y().min(1).max(2e3).describe(`Text to type, character by character`),speed:kh([`slow`,`natural`,`fast`,`instant`]).default(`natural`).describe(`Typing pace: "slow" ≈ 30 wpm, "natural" ≈ 55 wpm, "fast" ≈ 110 wpm, "instant" fires every keystroke back to back with no pause`),charDelayMs:X().int().min(0).max(2e3).optional().describe(`Average milliseconds between keystrokes; overrides "speed" when given`),jitter:X().min(0).max(1).default(.35).describe(`How much each pause varies at random, as a fraction of it — 0 types in an even machine rhythm, 1 is wildly uneven`),clear:mh().default(!0).describe(`Replace existing content instead of appending`),pressEnter:mh().default(!1).describe(`Press Enter afterwards, which submits many forms`)}),async execute({target:e,text:t,speed:n,charDelayMs:r,jitter:i,clear:a,pressEnter:o}){let s=e?k_(e):document.activeElement??document.body;if(!(s instanceof HTMLInputElement||s instanceof HTMLTextAreaElement)&&!s.isContentEditable)throw new $(`<${s.tagName.toLowerCase()}> is not an editable element`,`INVALID_TARGET`);if(t.includes(`
176
+ `)&&s instanceof HTMLInputElement)throw new $(`A single-line <input> cannot take newlines — drop them from "text", or set pressEnter to submit`,`INVALID_INPUT`);let c=r??ux[n],l=px(t,c),u=mx(l,i);if(u>fx)throw new $(`Typing ${t.length} characters at ${c}ms each would take about ${Math.round(u/1e3)}s — raise "speed", lower "charDelayMs", or send the text in shorter pieces`,`INVALID_INPUT`);a&&vx(s),yx(s);let d=performance.now(),f=[...t];for(let[e,t]of f.entries()){let n=e?Math.round(l[e-1]*(1+(Math.random()*2-1)*i)):0;n>0&&await hx(n),xx(s,t)}let p=!1;if(o){let e=Lv(`Enter`),t=s.dispatchEvent(new KeyboardEvent(`keydown`,e));if(s.dispatchEvent(new KeyboardEvent(`keyup`,e)),t&&!(s instanceof HTMLTextAreaElement)){let e=s.closest(`form`);e?.requestSubmit(),p=!!e}}return{element:R_(s),typed:f.length,charDelayMs:c,elapsedMs:Math.round(performance.now()-d),appended:!a,submitted:p}}});function _x(e,t){let n=e instanceof HTMLInputElement?HTMLInputElement.prototype:HTMLTextAreaElement.prototype;Object.getOwnPropertyDescriptor(n,`value`)?.set?.call(e,t)}function vx(e){e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement?_x(e,``):e.textContent=``,e.dispatchEvent(new InputEvent(`input`,{bubbles:!0,inputType:`deleteContentBackward`}))}function yx(e){if(e.focus(),e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement){let t=e.value.length;try{e.setSelectionRange(t,t)}catch{}return}let t=document.createRange();t.selectNodeContents(e),t.collapse(!1);let n=window.getSelection();n?.removeAllRanges(),n?.addRange(t)}function bx(e,t){if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement){let n=e.selectionStart??e.value.length,r=e.selectionEnd??e.value.length;_x(e,e.value.slice(0,n)+t+e.value.slice(r));let i=n+t.length;try{e.setSelectionRange(i,i)}catch{}}else if(document.execCommand(`insertText`,!1,t))return;else e.textContent=(e.textContent??``)+t;e.dispatchEvent(new InputEvent(`input`,{bubbles:!0,data:t,inputType:`insertText`}))}function xx(e,t){let n=Lv(t===`
177
+ `?`Enter`:t);e.dispatchEvent(new KeyboardEvent(`keydown`,n))&&(e.dispatchEvent(new KeyboardEvent(`keypress`,n)),bx(e,t)),e.dispatchEvent(new KeyboardEvent(`keyup`,n))}var Sx=Q({name:`page.waitForElement`,description:`Wait until an element reaches a state: attached, visible, hidden, or detached.`,input:Z({target:x_.describe(`Element to wait for`),state:kh([`attached`,`visible`,`hidden`,`detached`]).default(`visible`).describe(`State to wait for: present in the DOM, present and visible, invisible or absent, or absent`),timeoutMs:X().int().positive().max(3e4).default(5e3).describe(`Give up after this many milliseconds`)}),async execute({target:e,state:t,timeoutMs:n}){let r=()=>{try{return k_(e,{includeHidden:!0})}catch(e){if(e instanceof $&&e.code===`INVALID_TARGET`)throw e;return null}},i=e=>({attached:!!e,visible:!!e&&M_(e),hidden:!e||!M_(e),detached:!e})[t],a=performance.now(),o=r();return i(o)?{state:t,elapsedMs:0,element:o?R_(o):void 0}:(await new Promise((e,a)=>{let s=()=>{o=r(),i(o)&&(d(),e())},c=new MutationObserver(s);c.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0});let l=setInterval(s,250),u=setTimeout(()=>{d(),a(new $(`Timed out after ${n}ms waiting for element to be ${t}`,`TIMEOUT`))},n),d=()=>{c.disconnect(),clearInterval(l),clearTimeout(u)}}),{state:t,elapsedMs:Math.round(performance.now()-a),element:o?R_(o):void 0})}});new Map([ky,Hb,Q_,lx,Vv,$b,By,Cv,Ey,Rv,gx,Yb,Xb,Pv,lb,ub,ox,Sx,Vy,Bb,Gv,Ty,yb,H_,d_,ex,mb,hb,rx,tx,Gy,X_,ix,nx,cx,ax,zy,Wb,Jy,Yy,sx,$_,Vb,Uy,B_,Z_,Hy,Wy,gb].map(e=>[e.name,e]));var Cx=`Receiving end does not exist`,wx=new Set([`page.getPageInfo`,`page.extractText`,`page.waitForElement`,`page.navigate`]);async function Tx(e,t,...[n]){let r=typeof t==`string`?t:t.name,i=async()=>await d.tabs.sendMessage(e,{channel:Dl,action:r,input:n});try{return await i()}catch(t){let n=t instanceof Error?t.message:String(t);if(!n.includes(Cx)||!await Ox(e))return Ax(n);if(!wx.has(r))return Al(`TAB_UNREACHABLE`,`This tab had no content script; one has just been injected and the tab is reachable now. Take a fresh page.getPageInfo snapshot — the page may have changed — then retry the action.`);try{return await i()}catch(e){return Al(`TAB_UNREACHABLE`,`${e instanceof Error?e.message:String(e)} — the content script was injected but the page still did not answer`)}}}async function Ex(e,...[t]){let[n]=await d.tabs.query({active:!0,currentWindow:!0});return n?.id==null?Al(`NO_ACTIVE_TAB`,`No active tab to control`):Tx(n.id,e,t)}var Dx=5e3;async function Ox(e){let t=(d.runtime.getManifest().content_scripts??[]).flatMap(e=>e.js??[]);if(!t.length)return!1;try{return await kx(d.scripting.executeScript({target:{tabId:e},files:t,injectImmediately:!0})),!0}catch{return!1}}function kx(e){return Promise.race([e,new Promise((e,t)=>setTimeout(()=>t(Error(`injection timed out`)),Dx))])}var Ax=e=>Al(`TAB_UNREACHABLE`,`${e} — the page may not allow content scripts`),jx=`browsentic.`;`${jx}`,`${jx}`,`${jx}`,`${jx}`,`${jx}`;var Mx=15*6e4,Nx=/pass|ssn|card|cvv|cvc|otp|secret|token|pin\b/i,Px=/cc-|new-password|current-password|one-time-code/i;function Fx(e){let t=(e.type??``).toLowerCase();return t===`password`||t===`hidden`||Px.test(e.autocomplete??``)||Nx.test(e.name??``)||Nx.test(e.id??``)?!0:Ix(e.value??``)}function Ix(e){let t=e.replace(/[\s-]/g,``);if(!/^\d{13,19}$/.test(t))return!1;let n=0,r=!1;for(let e=t.length-1;e>=0;--e){let i=t.charCodeAt(e)-48;r&&(i*=2,i>9&&(i-=9)),n+=i,r=!r}return n%10==0}var Lx=[[`pass`,`word`],[`pass`,`wd`],[`pass`,`phrase`],[`pass`,`code`],[`pwd`],[`otp`],[`one`,`time`,`code`]],Rx=[[`secret`],[`token`],[`api`,`key`],[`access`,`key`],[`access`,`token`],[`secret`,`key`],[`client`,`secret`],[`refresh`,`token`],[`auth`,`token`],[`authorization`],[`bearer`],[`credential`],[`credentials`],[`signing`,`key`],[`private`,`key`],[`connection`,`string`]],zx=[[`cookie`],[`session`,`id`],[`session`,`key`],[`session`,`token`],[`csrf`,`token`],[`xsrf`,`token`]],Bx=e=>e.map(e=>e.join(String.raw`[_\-\s]?`)).join(`|`),Vx=Bx(Lx),Hx=Bx(Rx),Ux=Bx(zx);[...Lx,...Rx,...zx].map(e=>e.join(`_`));var Wx=String.raw`(?:Bearer\s+|Basic\s+|Token\s+)?(?:"([^"\r\n]{4,400})"|'([^'\r\n]{4,400})'|([^\s,;&"'<>{}\[\]]{4,400}))`,Gx=e=>new RegExp(String.raw`(?<![A-Za-z0-9])(?:${e})["']?\s*[:=]\s*${Wx}`,`gi`),Kx=String.raw`(?:"([^"\r\n]{4,400})"|'([^'\r\n]{4,400})'|([^\s"'<>]{3,399}[^\s"'<>.,;:!?]))`,qx=e=>new RegExp(String.raw`(?<![A-Za-z0-9])(?:${e})\s+(?:is|are|was|will\s+be)\s*:?\s+${Kx}`,`gi`);Gx(Vx),Gx(Hx),Gx(Ux),qx(Vx),qx(Hx);var Jx=/⟦([a-z-]+):([0-9a-z]+)(?:@([A-Za-z0-9._:\[\]-]{1,255}))?#([0-9a-f]{6,32})⟧/g;function Yx(e,t){return e.includes(`⟦`)?[...e.matchAll(Jx)].map(e=>({kind:e[1],id:e[2],origin:e[3],tag:e[4],text:e[0]})).filter(e=>!t||e.tag===t):[]}Promise.resolve(),d.debugger;var Xx=`browsentic:files`,Zx=e=>`browsentic:file:${e}`;async function Qx(){let e=(await d.storage.local.get(Xx))[Xx];return Array.isArray(e)?e:[]}async function $x(e){await d.storage.local.set({[Xx]:e})}async function eS(e,t){let n={id:e.id,name:e.name,mime:e.mime,content:t};await d.storage.local.set({[Zx(e.id)]:n}),await $x([e,...(await Qx()).filter(t=>t.id!==e.id)])}async function tS(e){await d.storage.local.remove(Zx(e)),await $x((await Qx()).filter(t=>t.id!==e))}var nS=`browsentic:recordings`,rS=e=>`browsentic:recording:${e}`;async function iS(){let e=(await d.storage.local.get(nS))[nS];return Array.isArray(e)?e:[]}async function aS(e){await d.storage.local.set({[nS]:e})}async function oS(e,t){let n=await iS();n.some(t=>t.id===e)&&await aS(n.map(n=>n.id===e?{...n,...t,updatedAt:Date.now()}:n))}async function sS(e){await d.storage.local.remove(rS(e)),await aS((await iS()).filter(t=>t.id!==e))}async function cS(e,t){let n=t.replace(/\s+/g,` `).trim().slice(0,80);n&&await oS(e,{name:n})}Promise.resolve(),Promise.resolve();var lS=e=>`browsentic:shot:${e}`;async function uS(e){let t=lS(e),n=(await d.storage.session.get(t).catch(()=>({})))[t];return typeof n==`string`?n:null}async function dS(e){let t=e.full?await uS(e.previewId):null,n=await(await fetch(t??e.thumbnail)).blob();await d.tabs.create({url:URL.createObjectURL(n)})}var fS=500,pS=16384;pS*pS;var mS=80;async function hS(e,t,n){let r=t===`jpeg`?n??mS:void 0;for(let n=0;;n++)try{let n=e==null?await d.tabs.captureVisibleTab({format:t,quality:r}):await d.tabs.captureVisibleTab(e,{format:t,quality:r});return{dataUrl:n,bitmap:await createImageBitmap(await(await fetch(n)).blob())}}catch(e){let t=e instanceof Error?e.message:String(e);if(n<2&&/MAX_CAPTURE_VISIBLE_TAB_CALLS_PER_SECOND/i.test(t)){await gS(fS);continue}throw new $(`Cannot capture this tab (${t}) — it may be a chrome:// page, the Web Store, or a PDF, which browsers refuse to screenshot`,`CAPTURE_UNSUPPORTED`)}}var gS=e=>new Promise(t=>setTimeout(t,e));function _S(e,t){return e.arrayBuffer().then(e=>{let n=new Uint8Array(e),r=``,i=32768;for(let e=0;e<n.length;e+=i)r+=String.fromCharCode(...n.subarray(e,e+i));return`data:${t};base64,${btoa(r)}`})}var vS=16,yS=1200,bS=.85,xS=120;async function SS(e,t){let n=await Tx(e.id,lb.name,t);if(!n.ok)return n;let{capture:r,...i}=n.data,a=r?await CS(e.windowId,r).catch(()=>null):null;return kl(a?{...i,shot:a}:i)}async function CS(e,t){let{viewport:n,dpr:r}=t,i=Math.max(0,t.region.x-vS),a=Math.max(0,t.region.y-vS),o=Math.min(n.w,t.region.x+t.region.w+vS)-i,s=Math.min(n.h,t.region.y+t.region.h+vS)-a;if(o<1||s<1)return null;await new Promise(e=>setTimeout(e,xS));let{bitmap:c}=await hS(e,`jpeg`,Math.round(bS*100)),l=c.width/n.w||r,u=Math.min(1,yS/Math.max(o*l,s*l,1)),d=new OffscreenCanvas(Math.max(1,Math.round(o*l*u)),Math.max(1,Math.round(s*l*u))),f=d.getContext(`2d`);return f?(f.drawImage(c,i*l,a*l,o*l,s*l,0,0,d.width,d.height),c.close(),{dataUrl:await _S(await d.convertToBlob({type:`image/jpeg`,quality:bS}),`image/jpeg`),width:d.width,height:d.height}):(c.close(),null)}var wS=`browsentic/tabSessions`;Promise.resolve();var TS=`browsentic/daemon`;function ES(){let[e,t]=(0,u.useState)(null);return(0,u.useEffect)(()=>{let e=!0;d.storage.session.get(TS).then(n=>e&&t(n[`browsentic/daemon`]??null));let n=e=>{`browsentic/daemon`in e&&t(e[`browsentic/daemon`].newValue??null)};return d.storage.session.onChanged.addListener(n),()=>{e=!1,d.storage.session.onChanged.removeListener(n)}},[]),e}var DS=e=>e.op===`agentState`?`refresh`:e.op===`setAgentModel`?`${e.agent}:model`:e.agent,OS=`__default__`;function kS(){let e=ES(),t=e?.agent,n=e?.connected??!1,[r,i]=(0,u.useState)(null),[a,o]=(0,u.useState)(null);(0,u.useEffect)(()=>{n&&!t&&s({op:`agentState`})},[n,t]);async function s(e){i(DS(e)),o(null);let t=await d.runtime.sendMessage({channel:Ol,...e}).catch(()=>null);i(null),t?.ok||o(t?.error.message??`The daemon did not answer.`)}if(!e?.paired)return null;let c=D.map(e=>t?.runners.find(t=>t.kind===e.kind)??MS(e.kind)),l=t?.active,f=c.find(e=>e.kind===l)?.problem;return(0,P.jsxs)(`section`,{className:`space-y-2`,children:[(0,P.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,P.jsx)(`h2`,{className:`font-mono text-[10px] tracking-[0.14em] text-ink-faint uppercase`,children:`Agent`}),(0,P.jsxs)(`button`,{type:`button`,onClick:()=>void s({op:`agentState`,refresh:!0}),disabled:!n||r!==null,className:`flex items-center gap-1 font-mono text-[10px] tracking-[0.14em] text-ink-faint uppercase transition-colors hover:text-brand disabled:opacity-40`,children:[(0,P.jsx)(re,{className:Pt(`size-3`,r===`refresh`&&`animate-spin`)}),` Recheck`]})]}),(0,P.jsx)(`div`,{className:`grid gap-1`,children:c.map(e=>(0,P.jsx)(AS,{runner:e,active:e.kind===l,busy:r===e.kind,modelBusy:r===`${e.kind}:model`,disabled:!n||r!==null,onSelect:()=>void s({op:`setAgent`,agent:e.kind}),onModel:t=>void s({op:`setAgentModel`,agent:e.kind,model:t})},e.kind))}),f&&l&&(0,P.jsxs)(`div`,{className:`space-y-1.5 rounded-lg border border-amber/40 bg-amber/10 p-2`,children:[(0,P.jsxs)(`p`,{className:`flex gap-1.5 text-[11px] leading-snug text-amber`,children:[(0,P.jsx)(oe,{className:`mt-px size-3.5 shrink-0`}),(0,P.jsx)(`span`,{children:f.message})]}),f.fix&&(0,P.jsx)(`p`,{className:`font-mono text-[10px] leading-snug break-all text-ink-faint`,children:f.fix}),f.grantable&&(0,P.jsxs)(mn,{size:`sm`,className:`w-full`,disabled:!n||r!==null,onClick:()=>void s({op:`grantAgent`,agent:l}),children:[r===l?(0,P.jsx)(te,{className:`animate-spin`}):(0,P.jsx)(ae,{}),`Let Browsentic fix it`]})]}),a&&(0,P.jsx)(`p`,{className:`text-[11px] text-destructive`,children:a})]})}function AS({runner:e,active:t,busy:n,modelBusy:r,disabled:i,onSelect:a,onModel:o}){let s=ce[e.kind],c=e.model&&!s.models.includes(e.model)?[e.model,...s.models]:s.models;return(0,P.jsxs)(`div`,{className:Pt(`rounded-lg border transition-colors`,t?`border-brand/45 bg-brand/10`:`border-line`,!t&&!i&&`hover:border-line-strong hover:bg-surface/60`,i&&!t&&`opacity-50`),children:[(0,P.jsxs)(`button`,{type:`button`,onClick:a,disabled:i||t,"aria-pressed":t,className:Pt(`flex w-full items-center gap-2 px-2.5 py-2 text-left transition-colors`,t?`text-brand`:`text-ink-dim enabled:hover:text-ink`),children:[(0,P.jsx)(Bt,{tone:e.ready?`live`:`warn`}),(0,P.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs`,children:s.label}),(0,P.jsx)(`span`,{className:`font-mono text-[10px] tracking-wider uppercase opacity-70`,children:jS(e)}),n?(0,P.jsx)(te,{className:`size-3 animate-spin`}):t&&(0,P.jsx)(S,{className:`size-3`})]}),e.ready&&c.length>0&&(0,P.jsxs)(`div`,{className:Pt(`flex items-center gap-2 border-t px-2.5 py-1.5`,t?`border-brand/25`:`border-line`),children:[(0,P.jsx)(`span`,{className:`font-mono text-[10px] tracking-[0.14em] text-ink-faint uppercase`,children:`Model`}),(0,P.jsxs)(xl,{value:e.model??OS,onValueChange:e=>o(e===OS?null:e),disabled:i,children:[(0,P.jsx)(Cl,{className:`h-6 min-w-0 flex-1 py-0 font-mono text-[10px]`,children:(0,P.jsx)(Sl,{})}),(0,P.jsxs)(wl,{align:`end`,className:`font-mono text-[10px]`,children:[(0,P.jsx)(Tl,{value:OS,children:`Default`}),c.map(e=>(0,P.jsx)(Tl,{value:e,children:e},e))]})]}),r&&(0,P.jsx)(te,{className:`size-3 animate-spin text-ink-faint`})]})]})}function jS(e){if(e.ready)return`ready`;switch(e.problem?.code){case`AGENT_MISSING`:return`not installed`;case`AGENT_NEEDS_PERMISSION`:return`needs setup`;case`AGENT_UNUSABLE`:return`broken`;default:return`checking…`}}var MS=e=>({kind:e,bin:ce[e].bin,ready:!1});function NS({className:e}){return(0,P.jsxs)(`svg`,{viewBox:`0 0 32 32`,fill:`none`,className:Pt(`size-7`,e),"aria-hidden":!0,children:[(0,P.jsx)(`rect`,{x:`2.25`,y:`4.25`,width:`27.5`,height:`23.5`,rx:`6`,stroke:`currentColor`,strokeOpacity:`0.55`,strokeWidth:`1.5`}),(0,P.jsx)(`path`,{d:`M2.5 10.5h27`,stroke:`currentColor`,strokeOpacity:`0.35`,strokeWidth:`1.25`}),(0,P.jsx)(`circle`,{cx:`6.4`,cy:`7.4`,r:`1`,fill:`currentColor`,fillOpacity:`0.5`}),(0,P.jsx)(`circle`,{cx:`9.8`,cy:`7.4`,r:`1`,fill:`currentColor`,fillOpacity:`0.35`}),(0,P.jsx)(`path`,{d:`M9 22.2c2.4 0 2.4-6.4 6.9-6.4s4.6 6.4 7 6.4`,stroke:`currentColor`,strokeWidth:`1.75`,strokeLinecap:`round`}),(0,P.jsx)(`circle`,{cx:`9`,cy:`22.2`,r:`2.35`,fill:`var(--ground)`,stroke:`currentColor`,strokeWidth:`1.6`}),(0,P.jsx)(`circle`,{cx:`15.9`,cy:`15.8`,r:`2.55`,fill:`currentColor`}),(0,P.jsx)(`circle`,{cx:`22.9`,cy:`22.2`,r:`2.35`,fill:`var(--ground)`,stroke:`currentColor`,strokeWidth:`1.6`})]})}function PS({className:e}){return(0,P.jsxs)(`span`,{className:Pt(`flex min-w-0 items-center gap-2`,e),children:[(0,P.jsx)(NS,{className:`size-6 shrink-0 text-brand`}),(0,P.jsx)(`span`,{className:`truncate font-display text-[0.9375rem] leading-none font-semibold tracking-tight text-ink max-[19rem]:hidden`,children:`Browsentic`})]})}function FS({className:e,type:t,...n}){return(0,P.jsx)(`input`,{type:t,"data-slot":`input`,className:Pt(`flex h-9 w-full min-w-0 rounded-lg border border-line-strong bg-ground/60 px-3 py-1 text-sm text-ink outline-none transition-colors`,`placeholder:text-ink-faint selection:bg-brand/30 selection:text-ink`,`focus-visible:border-brand/55 focus-visible:bg-ground/80`,`disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-45`,`aria-invalid:border-destructive/60`,e),...n})}function IS(){let e=ES(),[t,n]=(0,u.useState)(``),[r,i]=(0,u.useState)(!1),[a,o]=(0,u.useState)(null),s=e?.connected??!1,c=e?.paired??!1;async function l(){i(!0),o(null);let e=await d.runtime.sendMessage({channel:Ol,op:`pair`,token:t});i(!1),e?.ok?n(``):o(e?.error.message??`Pairing failed`)}async function f(){i(!0),await d.runtime.sendMessage({channel:Ol,op:`disconnect`}),i(!1),o(null)}return(0,P.jsxs)(`section`,{className:`space-y-2`,children:[(0,P.jsxs)(`div`,{className:`flex items-baseline justify-between gap-2`,children:[(0,P.jsx)(`h2`,{className:`font-mono text-[10px] tracking-[0.14em] text-ink-faint uppercase`,children:`Browser link`}),s&&(0,P.jsxs)(`span`,{className:`font-mono text-[10px] text-ink-faint`,children:[`127.0.0.1:`,e?.port]})]}),c?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`p`,{className:`text-[11px] leading-relaxed text-ink-dim`,children:s?`The daemon is driving this browser. Disconnecting revokes the key — you will need a new pairing code.`:`Paired, but the daemon is not answering. Start it with browsentic, or disconnect to pair again.`}),(0,P.jsxs)(mn,{variant:`outline`,size:`sm`,className:`w-full`,onClick:f,disabled:r,children:[r?(0,P.jsx)(te,{className:`animate-spin`}):(0,P.jsx)(T,{}),` Disconnect`]})]}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`p`,{className:`text-[11px] leading-relaxed text-ink-dim`,children:[`Run `,(0,P.jsx)(`code`,{className:`rounded bg-surface px-1 py-px font-mono text-ink`,children:`browsentic pair`}),` in a terminal and paste the code it prints.`]}),(0,P.jsxs)(`form`,{className:`flex gap-1.5`,onSubmit:e=>{e.preventDefault(),l()},children:[(0,P.jsx)(FS,{value:t,onChange:e=>n(e.target.value),placeholder:`Pairing code`,"aria-label":`Pairing code from browsentic pair`,className:`h-8 font-mono text-xs tracking-widest uppercase`,autoComplete:`off`,spellCheck:!1}),(0,P.jsxs)(mn,{type:`submit`,size:`sm`,disabled:r||!t.trim(),children:[r?(0,P.jsx)(te,{className:`animate-spin`}):(0,P.jsx)(ee,{}),` Connect`]})]})]}),a&&(0,P.jsx)(`p`,{className:`rounded-lg border border-destructive/40 bg-destructive/10 px-2 py-1.5 text-[11px] text-destructive`,children:a})]})}function LS(e){return d.sidePanel.open({windowId:e})}async function RS(e){try{let t=d.sidePanel;if(t.close&&e!=null){await t.close({windowId:e});return}}catch{}typeof window<`u`&&window.close()}var zS=`site-mapper`,BS=`[redacted]`,VS=200,HS=20,US=4;function WS(e,t,n){if(typeof t==`string`)return Fx({name:e,id:e,value:t})?BS:t.length>VS?`${t.slice(0,VS)}…`:t;if(typeof t==`number`||typeof t==`boolean`||t===null)return t;if(n>=US)return`[…]`;if(Array.isArray(t)){let r=t.slice(0,HS).map(t=>WS(e,t,n+1));return t.length>HS?[...r,`…`]:r}if(typeof t==`object`){let e={};for(let[r,i]of Object.entries(t))e[r]=Fx({name:r,id:r})?BS:WS(r,i,n+1);return e}return null}var GS={"page.fillInput":`value`,"page.typeText":`text`},KS={"page.injectCode":[`purpose`,`code`]};function qS(e,t){if(!t||typeof t!=`object`)return WS(``,t,0);let n=WS(``,t,0);for(let r of KS[e]??[]){let e=t[r];typeof e==`string`&&(n[r]=e)}let r=GS[e];if(r&&r in n){let e=t[r],i=typeof e==`string`?Yx(e):[];n[r]=i.length?i.map(e=>e.text).join(` `):BS}return n}var JS=()=>crypto.randomUUID();function YS(e,t){switch(t.kind){case`started`:{let n=t.attached?` + attached: ${t.attached}`:``,r=t.overlays?.length?` + site notes: ${t.overlays.join(`, `)}`:``;return[...e,{kind:`notice`,id:JS(),tone:`info`,text:`Loaded skill: ${t.skill}${n}${r}`}]}case`text`:{let n=e.at(-1);return n?.kind===`assistant`?[...e.slice(0,-1),{...n,text:n.text+t.delta}]:[...e,{kind:`assistant`,id:JS(),text:t.delta}]}case`tool`:return[...e,{kind:`tool`,id:t.toolId,action:t.action,input:qS(t.action,t.input),source:t.source}];case`approval`:return XS(e,t.toolId,{awaiting:!0,site:t.site});case`toolResult`:return XS(e,t.toolId,{ok:t.ok,summary:t.summary,awaiting:!1});case`session`:case`usage`:return e;case`done`:return t.stopReason===`end_turn`?e:[...e,{kind:`notice`,id:JS(),tone:`info`,text:`Stopped: ${t.stopReason}`}];case`error`:return[...e,{kind:`notice`,id:JS(),tone:`error`,text:`${t.code}: ${t.message}`}]}}function XS(e,t,n){return e.map(e=>e.kind===`tool`&&e.id===t?{...e,...n}:e)}function ZS(e,t){for(let n=e.length-1;n>=0;n--){let r=e[n];if(r.kind===`tool`&&r.action===Vb.name&&!r.preview){let i=[...e];return i[n]={...r,preview:t},i}}return e}function QS(e,t){return{kind:`notice`,id:JS(),tone:e,text:t}}var $S=Object.keys({escape:`Escape`,esc:`Escape`,tab:`Tab`,space:` `,spacebar:` `,backspace:`Backspace`,delete:`Delete`,"page up":`PageUp`,"page down":`PageDown`,home:`Home`,end:`End`,"up arrow":`ArrowUp`,"down arrow":`ArrowDown`,"left arrow":`ArrowLeft`,"right arrow":`ArrowRight`,"arrow up":`ArrowUp`,"arrow down":`ArrowDown`,"arrow left":`ArrowLeft`,"arrow right":`ArrowRight`}).join(`|`);Jy.name,Jy.name,Jy.name,Yy.name,Jy.name,Jy.name,Wb.name,Hb.name,Hb.name,Hb.name,ub.name,RegExp(`^(?:press|hit|tap|push)(?:\\s+the)?\\s+(?<key>${$S})(?:\\s+key)?$`),ix.name,Q_.name;var eC=`browsentic:sessions`,tC=e=>`browsentic:session:${e}`,nC=e=>e.namingAt!==void 0&&Date.now()-e.namingAt<6e4;async function rC(){let e=(await d.storage.local.get(eC))[eC];return Array.isArray(e)?e:[]}async function iC(e){await d.storage.local.set({[eC]:e})}async function aC(e){await d.storage.local.remove(tC(e)),await iC((await rC()).filter(t=>t.id!==e))}var oC=`browsentic:skills`,sC=e=>`browsentic:skill:${e}`;async function cC(){let e=(await d.storage.local.get(oC))[oC];return Array.isArray(e)?e:[]}async function lC(e){await d.storage.local.set({[oC]:e})}async function uC(e,t){await d.storage.local.set({[sC(e.id)]:t});let n=await cC(),r=n.filter(t=>t.id!==e.id&&t.name===e.name);r.length&&await d.storage.local.remove(r.map(e=>sC(e.id))),await lC([e,...n.filter(t=>t.id!==e.id&&t.name!==e.name)])}var dC=`browsentic/panelCollapsed`,fC=`browsentic/panelTab`,pC=`browsentic/run`;Promise.resolve();var mC={url:``};function hC(){let[e,t]=(0,u.useState)(mC);return(0,u.useEffect)(()=>{let e=!0,n=()=>{d.tabs.query({active:!0,currentWindow:!0}).then(([n])=>{e&&t(n?.id==null?mC:{url:n.url??``,tabId:n.id,windowId:n.windowId,title:n.title})}).catch(()=>{e&&t(mC)})};n();let r=()=>n(),i=(e,t,r)=>{(t.url||t.title)&&r.active&&n()};return d.tabs.onActivated.addListener(r),d.tabs.onUpdated.addListener(i),()=>{e=!1,d.tabs.onActivated.removeListener(r),d.tabs.onUpdated.removeListener(i)}},[]),e}var gC=e=>Object.values(e??{}).sort((e,t)=>t.lastActivityAt-e.lastActivityAt);function _C(){let[e,t]=(0,u.useState)([]);return(0,u.useEffect)(()=>{let e=!0;d.storage.session.get(wS).then(n=>e&&t(gC(n[`browsentic/tabSessions`])));let n=e=>{`browsentic/tabSessions`in e&&t(gC(e[wS].newValue))};return d.storage.session.onChanged.addListener(n),()=>{e=!1,d.storage.session.onChanged.removeListener(n)}},[]),e}var vC=1e3,yC=`external`;function bC(){let[e,t]=(0,u.useState)({}),[n,r]=(0,u.useState)(null),[i,a]=(0,u.useState)([]),[o,s]=(0,u.useState)({}),c=(0,u.useRef)(null),l=hC(),f=_C(),p=(0,u.useMemo)(()=>l.tabId==null?null:f.find(e=>e.tabIds.includes(l.tabId))??null,[f,l.tabId]),m=p?.sessionId??null,h=(0,u.useCallback)((e,t)=>{s(n=>({...n,[e]:t(n[e]??[])}))},[]),g=(0,u.useCallback)((...e)=>{s(t=>{let n={...t};for(let t of e)delete n[t];return n})},[]);(0,u.useEffect)(()=>{let e=!0,n,i=()=>{if(!e)return;let o;try{o=d.runtime.connect({name:pC})}catch{n=setTimeout(i,vC);return}c.current=o,o.onMessage.addListener(e=>{let n=e;if(n.op===`mapDraft`)t(e=>({...e,[n.sessionId??yC]:n.draft}));else if(n.op===`mapSettled`)t(e=>Object.fromEntries(Object.entries(e).filter(([,e])=>e.stagingId!==n.stagingId))),!n.ok&&n.message&&h(n.sessionId??yC,e=>[...e,QS(`error`,n.message)]);else if(n.op===`recording`)r(n.state);else if(n.op===`monitor`){let e=n.state;a(t=>{let n=t.filter(t=>t.monitorId!==e.monitorId);return e.phase===`watching`?[...n,e]:n})}else n.op===`items`?h(n.sessionId??yC,()=>n.items):n.op===`item`?h(n.sessionId??yC,e=>[...e,n.item]):n.op===`preview`?h(n.sessionId??yC,e=>ZS(e,n.preview)):n.op===`close`?window.close():h(n.sessionId??yC,e=>YS(e,n.event))}),o.onDisconnect.addListener(()=>{c.current===o&&(c.current=null),e&&(n=setTimeout(i,vC))})};return i(),()=>{e=!1,clearTimeout(n);let t=c.current;c.current=null,t?.disconnect()}},[h]);let _=(0,u.useCallback)(e=>{let t=c.current;if(!t)return!1;try{return t.postMessage(e),!0}catch{return c.current=null,!1}},[]);(0,u.useEffect)(()=>{m&&_({op:`replay`,sessionId:m})},[m,_]);let v=(0,u.useMemo)(()=>{let e=m?o[m]??[]:[],t=o[yC]??[];return t.length?[...e,...t]:e},[m,o]),y=(m?e[m]:void 0)??e[yC]??null,b=(0,u.useCallback)((e,t)=>{let n=e.trim();!n||l.tabId==null||_({op:`instruct`,text:n,agentSkillId:t?.agentSkillId,focus:t?.focus,liveTools:t?.liveTools,tab:{tabId:l.tabId,url:l.url,windowId:l.windowId,title:l.title}})},[_,l]),x=(0,u.useCallback)(e=>{let t=f.find(t=>t.sessionId===e);t&&(async()=>{t.windowId>=0&&await d.windows.update(t.windowId,{focused:!0}).catch(()=>void 0),await d.tabs.update(t.currentTabId,{active:!0}).catch(()=>void 0)})()},[f]),S=(0,u.useCallback)(async e=>{if(l.tabId!=null){if(f.find(t=>t.sessionId===e))return x(e);_({op:`restore`,sessionId:e,tab:{tabId:l.tabId,url:l.url,windowId:l.windowId,title:l.title}})}},[_,f,l,x]);return{items:v,running:p?.runId!=null,sessionId:m,sessions:f,send:b,draft:y,mapSite:(0,u.useCallback)(()=>b(`@${zS} map this site`),[b]),activateMap:(0,u.useCallback)(e=>{y&&_({op:`activateMap`,stagingId:y.stagingId,exactHost:e})},[y,_]),discardMap:(0,u.useCallback)(()=>{y&&_({op:`discardMap`,stagingId:y.stagingId})},[y,_]),recording:n,startRecording:(0,u.useCallback)(e=>{_({op:`startRecording`,captureValues:e})},[_]),stopRecording:(0,u.useCallback)(()=>{_({op:`stopRecording`})},[_]),monitors:i,stopMonitor:(0,u.useCallback)(e=>{_({op:`stopMonitor`,monitorId:e})},[_]),cancel:(0,u.useCallback)(()=>{m&&_({op:`cancel`,sessionId:m})},[_,m]),decide:(0,u.useCallback)((e,t,n)=>{m&&_({op:`decision`,sessionId:m,toolId:e,allow:t,remember:n})},[_,m]),clear:(0,u.useCallback)(()=>{m&&(g(m,yC),_({op:`endSession`,sessionId:m}))},[_,m,g]),endSession:(0,u.useCallback)(e=>{g(e),_({op:`endSession`,sessionId:e})},[_,g]),restore:S,focusSession:x}}function xC(){if(typeof window>`u`)return null;let e=window;return e.SpeechRecognition??e.webkitSpeechRecognition??null}var SC=400,CC=`Microphone access is blocked. Allow it for this extension, or type instead.`,wC=`browsentic:voiceEnabled`;function TC(){let[e,t]=(0,u.useState)(!0);return(0,u.useEffect)(()=>{let e=!0;d.storage.local.get(wC).then(n=>{e&&typeof n[`browsentic:voiceEnabled`]==`boolean`&&t(n[wC])});let n=e=>{`browsentic:voiceEnabled`in e&&typeof e[`browsentic:voiceEnabled`].newValue==`boolean`&&t(e[wC].newValue)};return d.storage.local.onChanged.addListener(n),()=>{e=!1,d.storage.local.onChanged.removeListener(n)}},[]),[e,(0,u.useCallback)(e=>{t(e),d.storage.local.set({[wC]:e})},[])]}function EC({onFinal:e,onInterim:t}){let[n,r]=(0,u.useState)(!1),[i,a]=(0,u.useState)(null),o=(0,u.useMemo)(()=>xC()!==null,[]),s=(0,u.useRef)({onFinal:e,onInterim:t});s.current={onFinal:e,onInterim:t};let c=(0,u.useRef)(null),l=(0,u.useRef)(!1),d=(0,u.useRef)(null),f=(0,u.useRef)(null),p=(0,u.useRef)(()=>{}),m=(0,u.useCallback)(()=>{if(!f.current){let e=navigator.mediaDevices;e?.getUserMedia?f.current=e.getUserMedia({audio:!0}).then(e=>e.getTracks().forEach(e=>e.stop())).catch(e=>{throw f.current=null,e}):f.current=Promise.resolve()}return f.current},[]),h=(0,u.useCallback)(async()=>{let e=xC();if(!e||c.current)return;try{await m()}catch{l.current=!1,r(!1),a(CC);return}if(!l.current)return;let t=new e;t.continuous=!0,t.interimResults=!0,t.lang=navigator.language||`en-US`,t.maxAlternatives=1,t.onstart=()=>{r(!0),a(null)},t.onresult=e=>{let t=``,n=``;for(let r=e.resultIndex;r<e.results.length;r++){let i=e.results[r],a=i[0]?.transcript??``;i.isFinal?n+=a:t+=a}t.trim()&&s.current.onInterim?.(t.trim()),n.trim()&&s.current.onFinal(n.trim())},t.onerror=e=>{if(!(e.error===`aborted`||e.error===`no-speech`)){if(e.error===`not-allowed`||e.error===`service-not-allowed`){l.current=!1,f.current=null,a(CC);return}if(e.error===`audio-capture`){l.current=!1,a(`No microphone was found.`);return}a(e.error)}},t.onend=()=>{c.current=null,r(!1),l.current&&(d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{l.current&&p.current()},SC))},c.current=t;try{t.start()}catch{}},[m]);p.current=()=>void h();let g=(0,u.useCallback)(()=>{xC()&&(l.current=!0,h())},[h]),_=(0,u.useCallback)(()=>{l.current=!1,d.current&&clearTimeout(d.current);let e=c.current;if(c.current=null,r(!1),e)try{e.abort()}catch{}},[]);return(0,u.useEffect)(()=>()=>_(),[_]),{supported:o,listening:n,error:i,start:g,stop:_}}var DC=1600;function OC(e){let t=e.autoSendMs??DC,[n,r]=(0,u.useState)(``),[i,a]=(0,u.useState)(``),[o,s]=(0,u.useState)(!1),c=(0,u.useRef)(``),l=(0,u.useRef)(null),d=(0,u.useRef)(e.onSubmit);d.current=e.onSubmit;let f=(0,u.useCallback)(e=>{c.current=e,r(e)},[]),p=(0,u.useCallback)(()=>{l.current&&=(clearTimeout(l.current),null),s(!1)},[]),m=(0,u.useCallback)(()=>{p();let e=c.current.trim();e&&(f(``),a(``),d.current(e))},[p,f]),h=(0,u.useCallback)(()=>{l.current&&clearTimeout(l.current),s(!0),l.current=setTimeout(()=>{l.current=null,s(!1),m()},t)},[t,m]),g=EC({onInterim:e=>{a(e),p()},onFinal:e=>{a(``),f(c.current?`${c.current} ${e}`:e),h()}}),{start:_,stop:v}=g;return(0,u.useEffect)(()=>{e.active?_():(v(),p())},[e.active,_,v,p]),{input:n,setInput:(0,u.useCallback)(e=>{f(e),p()},[f,p]),interim:i,listening:g.listening,supported:g.supported,error:g.error,pendingSend:o,autoSendMs:t,cancelPending:p,submitNow:m,retry:_}}export{ie as $,Vy as A,Sn as B,sS as C,tS as D,eS as E,Br as F,Kt as G,mn as H,tr as I,It as J,Vt as K,Zn as L,Y_ as M,Ol as N,Mx as O,ko as P,ae as Q,Jn as R,nS as S,Xx as T,fn as U,vn as V,Xt as W,ce as X,Pt as Y,oe as Z,PS as _,dC as a,S as at,SS as b,uC as c,l as ct,aC as d,re as et,RS as f,NS as g,FS as h,hC as i,C as it,ky as j,Ex as k,eC as l,s as lt,IS as m,TC as n,E as nt,fC as o,x as ot,LS as p,Lt as q,bC as r,te as rt,oC as s,d as st,OC as t,ne as tt,nC as u,r as ut,kS as v,cS as w,dS as x,ES as y,An as z};