@soleone/factory 0.1.0 → 0.2.0

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,79 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(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),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((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.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.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`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function N(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(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 P(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,P(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),P(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+M(a,u),c+=P(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+M(a,u++),c+=P(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return P(N(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 F(e,t,n){if(e==null)return e;var r=[],i=0;return P(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function I(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var L=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)};function R(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,L)}catch(e){L(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function z(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else R(z.bind(null,e))}var B={map:F,forEach:function(e,t,n){F(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return F(e,function(){t++}),t},toArray:function(e){return F(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=B,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=z,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=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.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 D(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)E.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 D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:I}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=R,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.1`})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=d();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},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 c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=u(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=u(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.1`})),h=o(((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=m()})),g=o((e=>{var t=p(),n=d(),r=h();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}function m(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&m(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function g(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function _(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function v(e){var t=[null,null],n=g(e);return n===null||y(t,e,n.child,{foundSelf:!1}),t}function y(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&y(e,t,n.child,r))return!0;n=n.sibling}return!1}function b(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var x=null,S=null;function C(e,t,n){return e===n||e===t&&(x=e,!0)}function w(e,t,n){return e===n?(S=e,!1):e===t&&(S!==null&&(x=e),!0)}function T(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function E(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var D=Object.assign,O=Symbol.for(`react.element`),k=Symbol.for(`react.transitional.element`),A=Symbol.for(`react.portal`),j=Symbol.for(`react.fragment`),M=Symbol.for(`react.strict_mode`),N=Symbol.for(`react.profiler`),P=Symbol.for(`react.consumer`),F=Symbol.for(`react.context`),I=Symbol.for(`react.forward_ref`),L=Symbol.for(`react.suspense`),R=Symbol.for(`react.suspense_list`),z=Symbol.for(`react.memo`),B=Symbol.for(`react.lazy`),V=Symbol.for(`react.activity`),H=Symbol.for(`react.legacy_hidden`),U=Symbol.for(`react.memo_cache_sentinel`),ee=Symbol.for(`react.view_transition`),te=Symbol.for(`react.recoverable`),ne=Symbol.iterator;function W(e){return typeof e!=`object`||!e?null:(e=ne&&e[ne]||e[`@@iterator`],typeof e==`function`?e:null)}var re=Symbol.for(`react.client.reference`);function ie(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===re?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case j:return`Fragment`;case N:return`Profiler`;case M:return`StrictMode`;case L:return`Suspense`;case R:return`SuspenseList`;case V:return`Activity`;case ee:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case A:return`Portal`;case F:return e.displayName||`Context`;case P:return(e._context.displayName||`Context`)+`.Consumer`;case I:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case z:return t=e.displayName||null,t===null?ie(e.type)||`Memo`:t;case B:t=e._payload,e=e._init;try{return ie(e(t))}catch{}}return null}var ae=Array.isArray,G=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q={pending:!1,data:null,method:null,action:null},oe=[],J=-1;function se(e){return{current:e}}function ce(e){0>J||(e.current=oe[J],oe[J]=null,J--)}function le(e,t){J++,oe[J]=e.current,e.current=t}var ue=se(null),de=se(null),fe=se(null),pe=se(null);function me(e,t){switch(le(fe,t),le(de,e),le(ue,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?fp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=fp(t),e=pp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ce(ue),le(ue,e)}function he(){ce(ue),ce(de),ce(fe)}function ge(e){var t=e.memoizedState;t!==null&&(lh._currentValue=t.memoizedState,le(pe,e)),t=ue.current;var n=pp(t,e.type);t!==n&&(le(de,e),le(ue,n))}function _e(e){de.current===e&&(ce(ue),ce(de)),pe.current===e&&(ce(pe),lh._currentValue=q)}var ve,ye;function be(e){if(ve===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ve=t&&t[1]||``,ye=-1<e.stack.indexOf(`
2
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
+ `+ve+e+ye}var xe=!1;function Se(e,t){if(!e||xe)return``;xe=!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}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}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{xe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?be(n):``}function Ce(e,t){switch(e.tag){case 26:case 27:case 5:return be(e.type);case 16:return be(`Lazy`);case 13:return e.child!==t&&t!==null?be(`Suspense Fallback`):be(`Suspense`);case 19:return be(`SuspenseList`);case 0:case 15:return Se(e.type,!1);case 11:return Se(e.type.render,!1);case 1:return Se(e.type,!0);case 31:return be(`Activity`);case 30:return be(`ViewTransition`);default:return``}}function we(e){try{var t=``,n=null;do t+=Ce(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
+ Error generating stack: `+e.message+`
8
+ `+e.stack}}var Te=Object.prototype.hasOwnProperty,Ee=t.unstable_scheduleCallback,De=t.unstable_cancelCallback,Oe=t.unstable_shouldYield,ke=t.unstable_requestPaint,Ae=t.unstable_now,je=t.unstable_getCurrentPriorityLevel,Me=t.unstable_ImmediatePriority,Ne=t.unstable_UserBlockingPriority,Pe=t.unstable_NormalPriority,Fe=t.unstable_LowPriority,Ie=t.unstable_IdlePriority,Le=t.log,Re=t.unstable_setDisableYieldValue,ze=null,Be=null;function Ve(e){if(typeof Le==`function`&&Re(e),Be&&typeof Be.setStrictMode==`function`)try{Be.setStrictMode(ze,e)}catch{}}var He=Math.clz32?Math.clz32:Ge,Ue=Math.log,We=Math.LN2;function Ge(e){return e>>>=0,e===0?32:31-(Ue(e)/We|0)|0}var Ke=256,qe=262144,Je=4194304;function Ye(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&-e;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 Xe(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=Ye(n))):i=Ye(o):i=Ye(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ye(n))):i=Ye(o)):i=Ye(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 Ze(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Qe(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-He(n),i=1<<r;t|=e[r],n&=~i}return t}function $e(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 et(){var e=Je;return Je<<=1,!(Je&62914560)&&(Je=4194304),e}function tt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function nt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function rt(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-He(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&&it(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function it(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-He(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function at(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-He(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function ot(e,t){var n=t&-t;return n=n&42?1:st(n),(n&(e.suspendedLanes|t))===0?n:0}function st(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 ct(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function lt(){var e=K.p;return e===0?(e=window.event,e===void 0?32:Th(e.type)):e}function ut(e,t){var n=K.p;try{return K.p=e,t()}finally{K.p=n}}var dt=Math.random().toString(36).slice(2),ft=`__reactFiber$`+dt,pt=`__reactProps$`+dt,mt=`__reactContainer$`+dt,ht=`__reactEvents$`+dt,gt=`__reactListeners$`+dt,_t=`__reactHandles$`+dt,vt=`__reactResources$`+dt,yt=`__reactMarker$`+dt,bt=`__reactLoad$`+dt;function xt(e){delete e[ft],delete e[pt],delete e[gt],delete e[_t]}function St(e){var t;if(t=e[ft])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=mm(e);e!==null;){if(n=e[ft])return n;e=mm(e)}return t}e=n,n=e.parentNode}return null}function Ct(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 wt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Tt(e){var t=e[vt];return t||=e[vt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Et(e){e[yt]=!0}function Dt(e){e[bt]=void 0}var Ot=new Set,kt={};function At(e,t){jt(e,t),jt(e+`Capture`,t)}function jt(e,t){for(kt[e]=t,e=0;e<t.length;e++)Ot.add(t[e])}var Mt=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]*$`),Nt={},Pt={};function Ft(e){return Te.call(Pt,e)?!0:Te.call(Nt,e)?!1:Mt.test(e)?Pt[e]=!0:(Nt[e]=!0,!1)}var It=!1;function Lt(){var e=It;return It=!1,e}function Rt(e,t,n){if(Ft(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 zt(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 Bt(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 Vt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Ht(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Ut(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 Wt(e){if(!e._valueTracker){var t=Ht(e)?`checked`:`value`;e._valueTracker=Ut(e,t,``+e[t])}}function Gt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Ht(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var Kt=/[\n"\\]/g;function qt(e){return e.replace(Kt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Jt(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=``+Vt(t)):e.value!==``+Vt(t)&&(e.value=``+Vt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Xt(e,Vt(n)):o===`number`&&e.value==t?Xt(e,Vt(e.value)):Xt(e,Vt(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=``+Vt(s):e.removeAttribute(`name`)}function Yt(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)){Wt(e);return}n=n==null?``:``+Vt(n),t=t==null?n:``+Vt(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),Wt(e)}function Xt(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function Zt(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=``+Vt(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){t!=null&&(t=``+Vt(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+Vt(n)}function $t(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ae(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Vt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Wt(e)}function en(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var tn=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 nn(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||tn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function rn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``,It=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(nn(e,a,r),It=!0)}else for(var o in t)t.hasOwnProperty(o)&&nn(e,o,t[o])}function an(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 on=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`],[`maskType`,`mask-type`],[`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`]]),sn=/^[\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 cn(e){return sn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function ln(){}var un=null;function dn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var fn=null,pn=null;function mn(e){var t=Ct(e);if(t&&(e=t.stateNode)){var n=e[pt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Jt(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="`+qt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[pt]||null;if(!a)throw Error(i(90));Jt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Gt(r)}break a;case`textarea`:Qt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Zt(e,!!n.multiple,t,!1)}}}var hn=!1;function gn(e,t,n){if(hn)return e(t,n);hn=!0;try{return e(t)}finally{if(hn=!1,(fn!==null||pn!==null)&&(zd(),fn&&(t=fn,e=pn,pn=fn=null,mn(t),e)))for(t=0;t<e.length;t++)mn(e[t])}}function _n(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(i(231,t,typeof n));return n}var vn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,yn=!1;if(vn)try{var bn={};Object.defineProperty(bn,"passive",{get:function(){yn=!0}}),window.addEventListener(`test`,bn,bn),window.removeEventListener(`test`,bn,bn)}catch{yn=!1}var xn=null,Sn=null,Cn=null;function wn(){if(Cn)return Cn;var e,t=Sn,n=t.length,r,i=`value`in xn?xn.value:xn.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 Cn=i.slice(e,1<r?1-r:void 0)}function Tn(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 En(){return!0}function Dn(){return!1}function On(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)?En:Dn,this.isPropagationStopped=Dn,this}return D(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=En)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=En)},persist:function(){},isPersistent:En}),t}var kn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},An=On(kn),jn=D({},kn,{view:0,detail:0}),Mn=On(jn),Nn,Pn,Fn,In=D({},jn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Kn,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!==Fn&&(Fn&&e.type===`mousemove`?(Nn=e.screenX-Fn.screenX,Pn=e.screenY-Fn.screenY):Pn=Nn=0,Fn=e),Nn)},movementY:function(e){return`movementY`in e?e.movementY:Pn}}),Y=On(In),Ln=On(D({},In,{dataTransfer:0})),Rn=On(D({},jn,{relatedTarget:0})),zn=On(D({},kn,{animationName:0,elapsedTime:0,pseudoElement:0})),Bn=On(D({},kn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Vn=On(D({},kn,{data:0})),Hn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Un={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`},Wn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Gn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Wn[e])?!!t[e]:!1}function Kn(){return Gn}var qn=On(D({},jn,{key:function(e){if(e.key){var t=Hn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Tn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Un[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Kn,charCode:function(e){return e.type===`keypress`?Tn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Tn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Jn=On(D({},In,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Yn=On(D({},kn,{submitter:0})),Xn=On(D({},jn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Kn})),Zn=On(D({},kn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Qn=On(D({},In,{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})),$n=On(D({},kn,{newState:0,oldState:0,source:0})),er=[9,13,27,32],tr=vn&&`CompositionEvent`in window,nr=null;vn&&`documentMode`in document&&(nr=document.documentMode);var rr=vn&&`TextEvent`in window&&!nr,ir=vn&&(!tr||nr&&8<nr&&11>=nr),ar=` `,or=!1;function sr(e,t){switch(e){case`keyup`:return er.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function cr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var lr=!1;function ur(e,t){switch(e){case`compositionend`:return cr(t);case`keypress`:return t.which===32?(or=!0,ar):null;case`textInput`:return e=t.data,e===ar&&or?null:e;default:return null}}function dr(e,t){if(lr)return e===`compositionend`||!tr&&sr(e,t)?(e=wn(),Cn=Sn=xn=null,lr=!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 ir&&t.locale!==`ko`?null:t.data;default:return null}}var fr={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 pr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!fr[e.type]:t===`textarea`}function mr(e,t,n,r){fn?pn?pn.push(r):pn=[r]:fn=r,t=Yf(t,`onChange`),0<t.length&&(n=new An(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var hr=null,gr=null;function _r(e){Vf(e,0)}function vr(e){if(Gt(wt(e)))return e}function yr(e,t){if(e===`change`)return t}var br=!1;if(vn){var xr;if(vn){var Sr=`oninput`in document;if(!Sr){var Cr=document.createElement(`div`);Cr.setAttribute(`oninput`,`return;`),Sr=typeof Cr.oninput==`function`}xr=Sr}else xr=!1;br=xr&&(!document.documentMode||9<document.documentMode)}function wr(){hr&&(hr.detachEvent(`onpropertychange`,Tr),gr=hr=null)}function Tr(e){if(e.propertyName===`value`&&vr(gr)){var t=[];mr(t,gr,e,dn(e)),gn(_r,t)}}function Er(e,t,n){e===`focusin`?(wr(),hr=t,gr=n,hr.attachEvent(`onpropertychange`,Tr)):e===`focusout`&&wr()}function Dr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return vr(gr)}function Or(e,t){if(e===`click`)return vr(t)}function kr(e,t){if(e===`input`||e===`change`)return vr(t)}function Ar(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var jr=typeof Object.is==`function`?Object.is:Ar;function Mr(e,t){if(jr(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(!Te.call(t,i)||!jr(e[i],t[i]))return!1}return!0}function Nr(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Pr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Fr(e,t){var n=Pr(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=Pr(n)}}function Ir(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ir(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Lr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Nr(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=Nr(e.document)}return t}function Rr(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 zr=vn&&`documentMode`in document&&11>=document.documentMode,Br=null,Vr=null,Hr=null,Ur=!1;function Wr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ur||Br==null||Br!==Nr(r)||(r=Br,`selectionStart`in r&&Rr(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}),Hr&&Mr(Hr,r)||(Hr=r,r=Yf(Vr,`onSelect`),0<r.length&&(t=new An(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Br)))}function Gr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Kr={animationend:Gr(`Animation`,`AnimationEnd`),animationiteration:Gr(`Animation`,`AnimationIteration`),animationstart:Gr(`Animation`,`AnimationStart`),transitionrun:Gr(`Transition`,`TransitionRun`),transitionstart:Gr(`Transition`,`TransitionStart`),transitioncancel:Gr(`Transition`,`TransitionCancel`),transitionend:Gr(`Transition`,`TransitionEnd`)},qr={},Jr={};vn&&(Jr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Kr.animationend.animation,delete Kr.animationiteration.animation,delete Kr.animationstart.animation),`TransitionEvent`in window||delete Kr.transitionend.transition);function Yr(e){if(qr[e])return qr[e];if(!Kr[e])return e;var t=Kr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Jr)return qr[e]=t[n];return e}var Xr=Yr(`animationend`),Zr=Yr(`animationiteration`),Qr=Yr(`animationstart`),$r=Yr(`transitionrun`),ei=Yr(`transitionstart`),ti=Yr(`transitioncancel`),ni=Yr(`transitionend`),ri=new Map,ii=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(` `);ii.push(`scrollEnd`);function ai(e,t){ri.set(e,t),At(t,[e])}var oi=0;function si(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=bd.identifierPrefix;var n=oi++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function ci(e){if(e==null||typeof e==`string`)return e;var t=null,n=Od;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function li(e,t){return e=ci(e),t=ci(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var ui=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)},di=[],fi=0,pi=0;function mi(){for(var e=fi,t=pi=fi=0;t<e;){var n=di[t];di[t++]=null;var r=di[t];di[t++]=null;var i=di[t];di[t++]=null;var a=di[t];if(di[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&&vi(n,i,a)}}function hi(e,t,n,r){di[fi++]=e,di[fi++]=t,di[fi++]=n,di[fi++]=r,pi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function gi(e,t,n,r){return hi(e,t,n,r),yi(e)}function _i(e,t){return hi(e,null,null,t),yi(e)}function vi(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-He(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function yi(e){if(50<kd)throw kd=0,Ad=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var bi={};function xi(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 Si(e,t,n,r){return new xi(e,t,n,r)}function Ci(e){return e=e.prototype,!(!e||!e.isReactComponent)}function wi(e,t){var n=e.alternate;return n===null?(n=Si(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&1206910976,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 Ti(e,t){e.flags&=1206910978;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 Ei(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Ci(r)&&(s=1);else if(typeof r==`string`)s=Ym(e,n,ue.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case V:return e=Si(31,n,t,a),e.elementType=V,e.lanes=o,e;case j:return Di(n.children,a,o,t);case M:s=8,a|=24;break;case N:return e=Si(12,n,t,a|2),e.elementType=N,e.lanes=o,e;case L:return e=Si(13,n,t,a),e.elementType=L,e.lanes=o,e;case R:return e=Si(19,n,t,a),e.elementType=R,e.lanes=o,e;case H:case ee:return e=a|32,e=Si(30,n,t,e),e.elementType=ee,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case F:s=10;break a;case P:s=9;break a;case I:s=11;break a;case z:s=14;break a;case B:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Si(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Di(e,t,n,r){return e=Si(7,e,r,t),e.lanes=n,e}function Oi(e,t,n){return e=Si(6,e,null,t),e.lanes=n,e}function ki(e){var t=Si(18,null,null,0);return t.stateNode=e,t}function Ai(e,t,n){return t=Si(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ji=new WeakMap;function Mi(e,t){if(typeof e==`object`&&e){var n=ji.get(e);return n===void 0?(t={value:e,source:t,stack:we(t)},ji.set(e,t),t):n}return{value:e,source:t,stack:we(t)}}var Ni=[],Pi=0,Fi=null,Ii=0,Li=[],Ri=0,zi=null,Bi=1,Vi=``;function Hi(e,t){Ni[Pi++]=Ii,Ni[Pi++]=Fi,Fi=e,Ii=t}function Ui(e,t,n){Li[Ri++]=Bi,Li[Ri++]=Vi,Li[Ri++]=zi,zi=e;var r=Bi;e=Vi;var i=32-He(r)-1;r&=~(1<<i),n+=1;var a=32-He(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Bi=1<<32-He(t)+i|n<<i|r,Vi=a+e}else Bi=1<<a|n<<i|r,Vi=e}function Wi(e){e.return!==null&&(Hi(e,1),Ui(e,1,0))}function Gi(e){for(;e===Fi;)Fi=Ni[--Pi],Ni[Pi]=null,Ii=Ni[--Pi],Ni[Pi]=null;for(;e===zi;)zi=Li[--Ri],Li[Ri]=null,Vi=Li[--Ri],Li[Ri]=null,Bi=Li[--Ri],Li[Ri]=null}function Ki(e,t){Li[Ri++]=Bi,Li[Ri++]=Vi,Li[Ri++]=zi,Bi=t.id,Vi=t.overflow,zi=e}var qi=null,Ji=null,Yi=!1,Xi=null,Zi=!1,Qi=Error(i(519));function $i(e){throw aa(Mi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Qi}function ea(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[ft]=e,t[pt]=r,n){case`dialog`:Hf(`cancel`,t),Hf(`close`,t);break;case`iframe`:case`object`:case`embed`:Hf(`load`,t);break;case`video`:case`audio`:for(n=0;n<zf.length;n++)Hf(zf[n],t);break;case`source`:Hf(`error`,t);break;case`img`:case`image`:case`link`:Hf(`error`,t),Hf(`load`,t);break;case`details`:Hf(`toggle`,t);break;case`input`:Hf(`invalid`,t),Yt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Hf(`invalid`,t);break;case`textarea`:Hf(`invalid`,t),$t(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||tp(t.textContent,n)?(r.popover!=null&&(Hf(`beforetoggle`,t),Hf(`toggle`,t)),r.onScroll!=null&&Hf(`scroll`,t),r.onScrollEnd!=null&&Hf(`scrollend`,t),r.onClick!=null&&(t.onclick=ln),t=!0):t=!1,t||$i(e,!0)}function ta(e){for(qi=e.return;qi;)switch(qi.tag){case 5:case 31:case 13:Zi=!1;return;case 27:case 3:Zi=!0;return;default:qi=qi.return}}function na(e){if(e!==qi)return!1;if(!Yi)return ta(e),Yi=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||hp(e.type,e.memoizedProps)),n=!n),n&&Ji&&$i(e),ta(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ji=pm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ji=pm(e)}else t===27?(t=Ji,wp(e.type)?(e=fm,fm=null,Ji=e):Ji=t):Ji=qi?dm(e.stateNode.nextSibling):null;return!0}function ra(){Ji=qi=null,Yi=!1}function ia(){var e=Xi;return e!==null&&(fd===null?fd=e:fd.push.apply(fd,e),Xi=null),e}function aa(e){Xi===null?Xi=[e]:Xi.push(e)}var oa=se(null),sa=null,ca=null;function la(e,t,n){le(oa,t._currentValue),t._currentValue=n}function ua(e){e._currentValue=oa.current,ce(oa)}function da(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 fa(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),da(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),da(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),da(a.return,n,e),s=a.child,s=s===null?null:s.sibling):s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function pa(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;jr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===pe.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[lh]:e.push(lh))}a=a.return}return e!==null&&fa(t,e,n,r),t.flags|=262144,e!==null}function ma(e){for(e=e.firstContext;e!==null;){if(!jr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ha(e){sa=e,ca=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ga(e){return va(sa,e)}function _a(e,t){return sa===null&&ha(e),va(e,t)}function va(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ca===null){if(e===null)throw Error(i(308));ca=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ca=ca.next=t;return n}var ya=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()})}},ba=t.unstable_scheduleCallback,xa=t.unstable_NormalPriority,Sa={$$typeof:F,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ca(){return{controller:new ya,data:new Map,refCount:0}}function wa(e){e.refCount--,e.refCount===0&&ba(xa,function(){e.controller.abort()})}function Ta(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var Ea=null;function Da(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Oa=null,ka=0,Aa=0,ja=null;function Ma(e,t){if(Oa===null){var n=Oa=[];ka=0,Aa=Pf(),ja={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ka++,t.then(Na,Na),t}function Na(){if(--ka===0&&(Ea=null,Oa!==null)){ja!==null&&(ja.status=`fulfilled`);var e=Oa;Oa=null,Aa=0,ja=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Pa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Fa=G.S;G.S=function(e,t){if(hd=Ae(),typeof t==`object`&&t&&typeof t.then==`function`&&Ma(e,t),Ea!==null)for(var n=bf;n!==null;)Ta(n,Ea),n=n.next;if(n=e.types,n!==null){for(var r=bf;r!==null;)Ta(r,n),r=r.next;if(Aa!==0){r=Ea,r===null&&(r=Ea=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Fa!==null&&Fa(e,t)};var Ia=se(null);function La(){var e=Ia.current;return e===null?Xu.pooledCache:e}function Ra(e,t){t===null?le(Ia,Ia.current):le(Ia,t.pool)}function za(){var e=La();return e===null?null:{parent:Sa._currentValue,pool:e}}var Ba=Error(i(460)),Va=Error(i(474)),Ha=Error(i(542)),Ua={then:function(){}};function Wa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ga(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(ln,ln),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ya(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(ln,ln);else{if(e=Xu,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ya(e),e}throw qa=t,Ba}}function Ka(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(qa=e,Ba):e}}var qa=null;function Ja(){if(qa===null)throw Error(i(459));var e=qa;return qa=null,e}function Ya(e){if(e===Ba||e===Ha)throw Error(i(483))}var Xa=null,Za=0;function Qa(e){var t=Za;return Za+=1,Xa===null&&(Xa=[]),Ga(Xa,e,t)}function $a(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function eo(e,t){throw t.$$typeof===O?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function to(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=wi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Oi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===j?(e=d(e,t,n.props.children,r,n.key),$a(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===B&&Ka(i)===t.type)?(t=a(t,n.props),$a(t,n),t.return=e,t):(t=Ei(n.type,n.key,n.props,null,e.mode,r),$a(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=Ai(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Di(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Oi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case k:return n=Ei(t.type,t.key,t.props,null,e.mode,n),$a(n,t),n.return=e,n;case A:return t=Ai(t,e.mode,n),t.return=e,t;case B:return t=Ka(t),f(e,t,n)}if(ae(t)||W(t))return t=Di(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Qa(t),n);if(t.$$typeof===F)return f(e,_a(e,t),n);eo(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 k:return n.key===i?l(e,t,n,r):null;case A:return n.key===i?u(e,t,n,r):null;case B:return n=Ka(n),p(e,t,n,r)}if(ae(n)||W(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Qa(n),r);if(n.$$typeof===F)return p(e,t,_a(e,n),r);eo(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 k:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case A:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case B:return r=Ka(r),m(e,t,n,r,i)}if(ae(r)||W(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Qa(r),i);if(r.$$typeof===F)return m(e,t,n,_a(t,r),i);eo(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Yi&&Hi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Yi&&Hi(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(_.key===null?h:_.key)),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),Yi&&Hi(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Yi&&Hi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Yi&&Hi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Yi&&Hi(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===j&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case k:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===j){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),$a(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===B&&Ka(l)===r.type){n(e,r.sibling),c=a(r,o.props),$a(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===j?(c=Di(o.props.children,e.mode,c,o.key),$a(c,o),c.return=e,e=c):(c=Ei(o.type,o.key,o.props,null,e.mode,c),$a(c,o),c.return=e,e=c)}return s(e);case A:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Ai(o,e.mode,c),c.return=e,e=c}return s(e);case B:return o=Ka(o),_(e,r,o,c)}if(ae(o))return h(e,r,o,c);if(W(o)){if(l=W(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,Qa(o),c);if(o.$$typeof===F)return _(e,r,_a(e,o),c);eo(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Oi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Za=0;var i=_(e,t,n,r);return Xa=null,i}catch(t){if(t===Ba||t===Ha)throw t;var a=Si(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var no=to(!0),ro=to(!1),io=!1;function ao(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function oo(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 so(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function co(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Yu&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=yi(e),vi(e,null,n),t}return hi(e,r,t,n),yi(e)}function lo(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,at(e,n)}}function uo(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}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var fo=!1;function po(){if(fo){var e=ja;if(e!==null)throw e}}function mo(e,t,n,r){fo=!1;var i=e.updateQueue;io=!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?(Qu&f)===f:(r&f)===f){f!==0&&f===Aa&&(fo=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=D({},d,f);break a;case 2:io=!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),od|=o,e.lanes=o,e.memoizedState=d}}function ho(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function go(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)ho(n[e],t)}var _o=se(null),vo=se(0);function yo(e,t){e=id,le(vo,e),le(_o,t),id=e|t.baseLanes}function bo(){le(vo,id),le(_o,_o.current)}function xo(){id=vo.current,ce(_o),ce(vo)}var So=se(null),Co=null;function wo(e){var t=e.alternate;le(ko,ko.current&1),le(So,e),Co===null&&(t===null||_o.current!==null||t.memoizedState!==null)&&(Co=e)}function To(e){le(ko,ko.current),le(So,e),Co===null&&(Co=e)}function Eo(e){e.tag===22?(le(ko,ko.current),le(So,e),Co===null&&(Co=e)):Do()}function Do(){le(ko,ko.current),le(So,So.current)}function Oo(e){ce(So),Co===e&&(Co=null),ce(ko)}var ko=se(0);function Ao(e,t){le(So,So.current),le(ko,t)}function jo(e){ce(ko),ce(So),Co===e&&(Co=null)}function Mo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||cm(n)||lm(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){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 No=0,Po=null,Fo=null,Io=null,Lo=!1,Ro=!1,zo=!1,Bo=0,Vo=0,Ho=null,Uo=0;function Wo(){throw Error(i(321))}function Go(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!jr(e[n],t[n]))return!1;return!0}function Ko(e,t,n,r,i,a){return No=a,Po=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,G.H=e===null||e.memoizedState===null?lc:uc,zo=!1,a=n(r,i),zo=!1,Ro&&(a=Jo(t,n,r,i)),qo(e),a}function qo(e){G.H=cc;var t=Fo!==null&&Fo.next!==null;if(No=0,Io=Fo=Po=null,Lo=!1,Vo=0,Ho=null,t)throw Error(i(300));e===null||Dc||(e=e.dependencies,e!==null&&ma(e)&&(Dc=!0))}function Jo(e,t,n,r){Po=e;var a=0;do{if(Ro&&(Ho=null),Vo=0,Ro=!1,25<=a)throw Error(i(301));if(a+=1,Io=Fo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}G.H=dc,o=t(n,r)}while(Ro);return o}function Yo(){var e=G.H,t=e.useState()[0];return t=typeof t.then==`function`?ns(t):t,e=e.useState()[0],(Fo===null?null:Fo.memoizedState)!==e&&(Po.flags|=1024),t}function Xo(){var e=Bo!==0;return Bo=0,e}function Zo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Qo(e){if(Lo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Lo=!1}No=0,Io=Fo=Po=null,Ro=!1,Vo=Bo=0,Ho=null}function $o(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Io===null?Po.memoizedState=Io=e:Io=Io.next=e,Io}function es(){if(Fo===null){var e=Po.alternate;e=e===null?null:e.memoizedState}else e=Fo.next;var t=Io===null?Po.memoizedState:Io.next;if(t!==null)Io=t,Fo=e;else{if(e===null)throw Po.alternate===null?Error(i(467)):Error(i(310));Fo=e,e={memoizedState:Fo.memoizedState,baseState:Fo.baseState,baseQueue:Fo.baseQueue,queue:Fo.queue,next:null},Io===null?Po.memoizedState=Io=e:Io=Io.next=e}return Io}function ts(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ns(e){var t=Vo;return Vo+=1,Ho===null&&(Ho=[]),e=Ga(Ho,e,t),t=Po,(Io===null?t.memoizedState:Io.next)===null&&(t=t.alternate,G.H=t===null||t.memoizedState===null?lc:uc),e}function rs(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return ns(e);if(e.$$typeof===te)return;if(e.$$typeof===F)return ga(e)}throw Error(i(438,String(e)))}function is(e){var t=null,n=Po.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=Po.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=ts(),Po.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]=U;return t.index++,n}function as(e,t){return typeof t==`function`?t(e):t}function os(e){return ss(es(),Fo,e)}function ss(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(No&f)===f:(Qu&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===Aa&&(d=!0);else if((No&p)===p){u=u.next,p===Aa&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,Po.lanes|=p,od|=p;f=u.action,zo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,Po.lanes|=f,od|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!jr(o,e.memoizedState)&&(Dc=!0,d&&(n=ja,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function cs(e){var t=es(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);jr(o,t.memoizedState)||(Dc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ls(e,t,n){var r=Po,a=es(),o=Yi;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!jr((Fo||a).memoizedState,n);if(s&&(a.memoizedState=n,Dc=!0),a=a.queue,Ps(fs.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Io!==null&&!!(Io.memoizedState.tag&1),ks(e?9:8,{destroy:void 0},ds.bind(null,r,a,n,t),null),e){if(r.flags|=2048,Xu===null)throw Error(i(349));o||No&127||us(r,t,n)}return n}function us(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Po.updateQueue,t===null?(t=ts(),Po.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ds(e,t,n,r){t.value=n,t.getSnapshot=r,ps(t)&&ms(e)}function fs(e,t,n){return n(function(){ps(t)&&ms(e)})}function ps(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!jr(e,n)}catch{return!0}}function ms(e){var t=_i(e,2);t!==null&&Pd(t,e,2)}function hs(e){var t=$o();if(typeof e==`function`){var n=e;if(e=n(),zo){Ve(!0);try{n()}finally{Ve(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:as,lastRenderedState:e},t}function gs(e,t,n,r){return e.baseState=n,ss(e,Fo,typeof r==`function`?r:as)}function _s(e,t,n,r,a){if(ac(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};G.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,vs(t,o)):(o.next=n.next,t.pending=n.next=o)}}function vs(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=G.T,o={};o.types=a===null?null:a.types,G.T=o;try{var s=n(i,r),c=G.S;c!==null&&c(o,s),ys(e,t,s)}catch(n){xs(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),G.T=a}}else try{a=n(i,r),ys(e,t,a)}catch(n){xs(e,t,n)}}function ys(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){bs(e,t,n)},function(n){return xs(e,t,n)}):bs(e,t,n)}function bs(e,t,n){t.status=`fulfilled`,t.value=n,Ss(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,vs(e,n)))}function xs(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Ss(t),t=t.next;while(t!==r)}e.action=null}function Ss(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Cs(e,t){return t}function ws(e,t){if(Yi){var n=Xu.formState;if(n!==null){a:{var r=Po;if(Yi){if(Ji){b:{for(var i=Ji,a=Zi;i.nodeType!==8;)if(!a||(i=dm(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ji=dm(i.nextSibling),r=i.data===`F!`;break a}}$i(r)}r=!1}r&&(t=n[0])}}return n=$o(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cs,lastRenderedState:t},n.queue=r,n=nc.bind(null,Po,r),r.dispatch=n,r=hs(!1),a=ic.bind(null,Po,!1,r.queue),r=$o(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=_s.bind(null,Po,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Ts(e){return Es(es(),Fo,e)}function Es(e,t,n){if(t=ss(e,t,Cs)[0],e=os(as)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=ns(t)}catch(e){throw e===Ba?Ha:e}else r=t;t=es();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(Po.flags|=2048,ks(9,{destroy:void 0},Ds.bind(null,i,n),null)),[r,a,e]}function Ds(e,t){e.action=t}function Os(e){var t=es(),n=Fo;if(n!==null)return Es(t,n,e);es(),t=t.memoizedState,n=es();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ks(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=Po.updateQueue,t===null&&(t=ts(),Po.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 As(){return es().memoizedState}function js(e,t,n,r){var i=$o();Po.flags|=e,i.memoizedState=ks(1|t,{destroy:void 0},n,r===void 0?null:r)}function Ms(e,t,n,r){var i=es();r=r===void 0?null:r;var a=i.memoizedState.inst;Fo!==null&&r!==null&&Go(r,Fo.memoizedState.deps)?i.memoizedState=ks(t,a,n,r):(Po.flags|=e,i.memoizedState=ks(1|t,a,n,r))}function Ns(e,t){js(8390656,8,e,t)}function Ps(e,t){Ms(2048,8,e,t)}function Fs(e){Po.flags|=4;var t=Po.updateQueue;if(t===null)t=ts(),Po.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Is(e){var t=es().memoizedState;return Fs({ref:t,nextImpl:e}),function(){if(Yu&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Ls(e,t){return Ms(4,2,e,t)}function Rs(e,t){return Ms(4,4,e,t)}function zs(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 Bs(e,t,n){n=n==null?null:n.concat([e]),Ms(4,4,zs.bind(null,t,e),n)}function Vs(){}function Hs(e,t){var n=es();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Go(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Us(e,t){var n=es();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Go(t,r[1]))return r[0];if(r=e(),zo){Ve(!0);try{e()}finally{Ve(!1)}}return n.memoizedState=[r,t],r}function Ws(e,t,n){return n===void 0||No&1073741824&&!(Qu&261930)?e.memoizedState=t:(e.memoizedState=n,e=Md(),Po.lanes|=e,od|=e,n)}function Gs(e,t,n,r){return jr(n,t)?n:_o.current===null?!(No&106)||No&1073741824&&!(Qu&261930)?(Dc=!0,e.memoizedState=n):(e=Md(),Po.lanes|=e,od|=e,t):(e=Ws(e,n,r),jr(e,t)||(Dc=!0),e)}function Ks(e,t,n,r,i){var a=K.p;K.p=a!==0&&8>a?a:8;var o=G.T,s={};s.types=o===null?null:o.types,G.T=s,ic(e,!1,t,n);try{var c=i(),l=G.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?rc(e,t,Pa(c,r),jd(e)):rc(e,t,r,jd(e))}catch(n){rc(e,t,{then:function(){},status:`rejected`,reason:n},jd())}finally{K.p=a,o!==null&&s.types!==null&&(o.types=s.types),G.T=o}}function qs(){}function Js(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ys(e).queue;Ks(e,a,t,q,n===null?qs:function(){return Xs(e),n(r)})}function Ys(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:q,baseState:q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:as,lastRenderedState:q},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:as,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Xs(e){var t=Ys(e);t.next===null&&(t=e.alternate.memoizedState),rc(e,t.next.queue,{},jd())}function Zs(){return ga(lh)}function Qs(){return es().memoizedState}function $s(){return es().memoizedState}function ec(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=jd();e=so(n);var r=co(t,e,n);r!==null&&(Pd(r,t,n),lo(r,t,n)),t={cache:Ca()},e.payload=t;return}t=t.return}}function tc(e,t,n){var r=jd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ac(e)?oc(t,n):(n=gi(e,t,n,r),n!==null&&(Pd(n,e,r),sc(n,t,r)))}function nc(e,t,n){rc(e,t,n,jd())}function rc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ac(e))oc(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,jr(s,o))return hi(e,t,i,0),Xu===null&&mi(),!1}catch{}if(n=gi(e,t,i,r),n!==null)return Pd(n,e,r),sc(n,t,r),!0}return!1}function ic(e,t,n,r){if(r={lane:2,revertLane:Pf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},ac(e)){if(t)throw Error(i(479))}else t=gi(e,n,r,2),t!==null&&Pd(t,e,2)}function ac(e){var t=e.alternate;return e===Po||t!==null&&t===Po}function oc(e,t){Ro=Lo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function sc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,at(e,n)}}var cc={readContext:ga,use:rs,useCallback:Wo,useContext:Wo,useEffect:Wo,useImperativeHandle:Wo,useLayoutEffect:Wo,useInsertionEffect:Wo,useMemo:Wo,useReducer:Wo,useRef:Wo,useState:Wo,useDebugValue:Wo,useDeferredValue:Wo,useTransition:Wo,useSyncExternalStore:Wo,useId:Wo,useHostTransitionStatus:Wo,useFormState:Wo,useActionState:Wo,useOptimistic:Wo,useMemoCache:Wo,useCacheRefresh:Wo,useEffectEvent:Wo},lc={readContext:ga,use:rs,useCallback:function(e,t){return $o().memoizedState=[e,t===void 0?null:t],e},useContext:ga,useEffect:Ns,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),js(4194308,4,zs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return js(4194308,4,e,t)},useInsertionEffect:function(e,t){js(4,2,e,t)},useMemo:function(e,t){var n=$o();t=t===void 0?null:t;var r=e();if(zo){Ve(!0);try{e()}finally{Ve(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=$o();if(n!==void 0){var i=n(t);if(zo){Ve(!0);try{n(t)}finally{Ve(!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=tc.bind(null,Po,e),[r.memoizedState,e]},useRef:function(e){var t=$o();return e={current:e},t.memoizedState=e},useState:function(e){e=hs(e);var t=e.queue,n=nc.bind(null,Po,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Vs,useDeferredValue:function(e,t){return Ws($o(),e,t)},useTransition:function(){var e=hs(!1);return e=Ks.bind(null,Po,e.queue,!0,!1),$o().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=Po,a=$o();if(Yi){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Xu===null)throw Error(i(349));Qu&127||us(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Ns(fs.bind(null,r,o,e),[e]),r.flags|=2048,ks(9,{destroy:void 0},ds.bind(null,r,o,n,t),null),n},useId:function(){var e=$o(),t=Xu.identifierPrefix;if(Yi){var n=Vi,r=Bi;n=(r&~(1<<32-He(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Bo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Uo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Zs,useFormState:ws,useActionState:ws,useOptimistic:function(e){var t=$o();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=ic.bind(null,Po,!0,n),n.dispatch=t,[e,t]},useMemoCache:is,useCacheRefresh:function(){return $o().memoizedState=ec.bind(null,Po)},useEffectEvent:function(e){var t=$o(),n={impl:e};return t.memoizedState=n,function(){if(Yu&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},uc={readContext:ga,use:rs,useCallback:Hs,useContext:ga,useEffect:Ps,useImperativeHandle:Bs,useInsertionEffect:Ls,useLayoutEffect:Rs,useMemo:Us,useReducer:os,useRef:As,useState:function(){return os(as)},useDebugValue:Vs,useDeferredValue:function(e,t){return Gs(es(),Fo.memoizedState,e,t)},useTransition:function(){var e=os(as)[0],t=es().memoizedState;return[typeof e==`boolean`?e:ns(e),t]},useSyncExternalStore:ls,useId:Qs,useHostTransitionStatus:Zs,useFormState:Ts,useActionState:Ts,useOptimistic:function(e,t){return gs(es(),Fo,e,t)},useMemoCache:is,useCacheRefresh:$s,useEffectEvent:Is},dc={readContext:ga,use:rs,useCallback:Hs,useContext:ga,useEffect:Ps,useImperativeHandle:Bs,useInsertionEffect:Ls,useLayoutEffect:Rs,useMemo:Us,useReducer:cs,useRef:As,useState:function(){return cs(as)},useDebugValue:Vs,useDeferredValue:function(e,t){var n=es();return Fo===null?Ws(n,e,t):Gs(n,Fo.memoizedState,e,t)},useTransition:function(){var e=cs(as)[0],t=es().memoizedState;return[typeof e==`boolean`?e:ns(e),t]},useSyncExternalStore:ls,useId:Qs,useHostTransitionStatus:Zs,useFormState:Os,useActionState:Os,useOptimistic:function(e,t){var n=es();return Fo===null?(n.baseState=e,[e,n.queue.dispatch]):gs(n,Fo,e,t)},useMemoCache:is,useCacheRefresh:$s,useEffectEvent:Is};function fc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:D({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var pc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=jd(),i=so(r);i.payload=t,n!=null&&(i.callback=n),t=co(e,i,r),t!==null&&(Pd(t,e,r),lo(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=jd(),i=so(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=co(e,i,r),t!==null&&(Pd(t,e,r),lo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=jd(),r=so(n);r.tag=2,t!=null&&(r.callback=t),t=co(e,r,n),t!==null&&(Pd(t,e,n),lo(t,e,n))}};function mc(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?!Mr(n,r)||!Mr(i,a):!0}function hc(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&&pc.enqueueReplaceState(t,t.state,null)}function gc(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=D({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function _c(e){ui(e)}function vc(e){console.error(e)}function yc(e){ui(e)}function bc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function xc(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 Sc(e,t,n){return n=so(n),n.tag=3,n.payload={element:null},n.callback=function(){bc(e,t)},n}function Cc(e){return e=so(e),e.tag=3,e}function wc(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(){xc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){xc(t,n,r),typeof i!=`function`&&(vd===null?vd=new Set([this]):vd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Tc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&pa(t,n,a,!0),n=So.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Co===null?Gd():n.alternate===null&&ad===0&&(ad=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Ua?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),mf(e,r,a)),!1;case 22:return n.flags|=65536,r===Ua?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)),mf(e,r,a)),!1}throw Error(i(435,n.tag))}return mf(e,r,a),Gd(),!1}if(Yi)return t=So.current,t===null?(r!==Qi&&(t=Error(i(423),{cause:r}),aa(Mi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Mi(r,n),a=Sc(e.stateNode,r,a),uo(e,a),ad!==4&&(ad=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Qi&&(e=Error(i(422),{cause:r}),aa(Mi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Mi(o,n),dd===null?dd=[o]:dd.push(o),ad!==4&&(ad=2),t===null)return!0;r=Mi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Sc(n.stateNode,r,e),uo(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(vd===null||!vd.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Cc(a),wc(a,e,n,r),uo(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Ec=Error(i(461)),Dc=!1;function Oc(e,t,n,r){t.child=e===null?ro(t,null,n,r):no(t,e.child,n,r)}function kc(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 ha(t),r=Ko(e,t,n,o,a,i),s=Xo(),e!==null&&!Dc?(Zo(e,t,i),rl(e,t,i)):(Yi&&s&&Wi(t),t.flags|=1,Oc(e,t,r,i),t.child)}function Ac(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Ci(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,jc(e,t,a,r,i)):(e=Ei(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!il(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Mr:n,n(o,r)&&e.ref===t.ref)return rl(e,t,i)}return t.flags|=1,e=wi(a,r),e.ref=t.ref,e.return=t,t.child=e}function jc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Mr(a,r)&&e.ref===t.ref){if(Dc=!1,t.pendingProps=r=a,il(e,i))e.flags&131072&&(Dc=!0);else return t.lanes=e.lanes,rl(e,t,i)}}return zc(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 Pc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ra(t,a===null?null:a.cachePool),a===null?bo():yo(t,a),Eo(t);else return r=t.lanes=536870912,Pc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ra(t,null),bo(),Do()):(Ra(t,a.cachePool),yo(t,a),Do(),t.memoizedState=null);return Oc(e,t,i,n),t.child}function Nc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Pc(e,t,n,r,i){var a=La();return a=a===null?null:{parent:Sa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ra(t,null),bo(),Eo(t),e!==null&&pa(e,t,r,!0),t.childLanes=i,null}function Fc(e,t){return t=Jc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Ic(e,t,n){return no(t,e.child,null,n),e=Fc(t,t.pendingProps),e.flags|=2,Oo(t),t.memoizedState=null,e}function Lc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(Yi){if(r.mode===`hidden`)return e=Fc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Nc(null,e);if(To(t),(e=Ji)?(e=sm(e,Zi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:zi===null?null:{id:Bi,overflow:Vi},retryLane:536870912,hydrationErrors:null},n=ki(e),n.return=t,t.child=n,qi=t,Ji=null)):e=null,e===null)throw $i(t);return t.lanes=536870912,null}return Fc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(To(t),a){if(t.flags&256)t.flags&=-257,t=Ic(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Dc||pa(e,t,n,!1),a=(n&e.childLanes)!==0,Dc||a){if(_o.current===null){if(r=Xu,r!==null&&(s=ot(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,_i(e,s),Pd(r,e,s),Ec;Gd()}t=Ic(e,t,n)}else e=o.treeContext,Ji=dm(s.nextSibling),qi=t,Yi=!0,Xi=null,Zi=!1,e!==null&&Ki(t,e),t=Fc(t,r),t.flags|=134221824;return t}return e=wi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Rc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function zc(e,t,n,r,i){return ha(t),n=Ko(e,t,n,r,void 0,i),r=Xo(),e!==null&&!Dc?(Zo(e,t,i),rl(e,t,i)):(Yi&&r&&Wi(t),t.flags|=1,Oc(e,t,n,i),t.child)}function Bc(e,t,n,r,i,a){return ha(t),t.updateQueue=null,n=Jo(t,r,n,i),qo(e),r=Xo(),e!==null&&!Dc?(Zo(e,t,a),rl(e,t,a)):(Yi&&r&&Wi(t),t.flags|=1,Oc(e,t,n,a),t.child)}function Vc(e,t,n,r,i){if(ha(t),t.stateNode===null){var a=bi,o=n.contextType;typeof o==`object`&&o&&(a=ga(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=pc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},ao(t),o=n.contextType,a.context=typeof o==`object`&&o?ga(o):bi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(fc(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&&pc.enqueueReplaceState(a,a.state,null),mo(t,r,a,i),po(),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=gc(n,s);a.props=c;var l=a.context,u=n.contextType;o=bi,typeof u==`object`&&u&&(o=ga(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)&&hc(t,a,r,o),io=!1;var f=t.memoizedState;a.state=f,mo(t,r,a,i),po(),l=t.memoizedState,s||f!==l||io?(typeof d==`function`&&(fc(t,n,d,r),l=t.memoizedState),(c=io||mc(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,oo(e,t),o=t.memoizedProps,u=gc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=bi,typeof l==`object`&&l&&(c=ga(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)&&hc(t,a,r,c),io=!1,f=t.memoizedState,a.state=f,mo(t,r,a,i),po();var p=t.memoizedState;o!==d||f!==p||io||e!==null&&e.dependencies!==null&&ma(e.dependencies)?(typeof s==`function`&&(fc(t,n,s,r),p=t.memoizedState),(u=io||mc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ma(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,Rc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=no(t,e.child,null,i),t.child=no(t,null,n,i)):Oc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=rl(e,t,i),e}function Hc(e,t,n,r){return ra(),t.flags|=256,Oc(e,t,n,r),t.child}var Uc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Wc(e){return{baseLanes:e,cachePool:za()}}function Gc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=ld),e}function Kc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(ko.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(Yi){if(i?wo(t):Do(),(e=Ji)?(e=sm(e,Zi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:zi===null?null:{id:Bi,overflow:Vi},retryLane:536870912,hydrationErrors:null},n=ki(e),n.return=t,t.child=n,qi=t,Ji=null)):e=null,e===null)throw $i(t);return t.lanes=lm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Do(),i=t.mode,a=Jc({mode:`hidden`,children:a},i),r=Di(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Wc(n),r.childLanes=Gc(e,o,n),t.memoizedState=Uc,Nc(null,r)):(wo(t),qc(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return Xc(e,t,a,o,r,c,s,n)}return i?(Do(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=wi(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Di(i,a,n,null),i.flags|=2):i=wi(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Nc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Wc(n):(a=i.cachePool,a===null?a=za():(s=Sa._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=Gc(e,o,n),t.memoizedState=Uc,Nc(e.child,r)):(wo(t),n=e.child,e=n.sibling,n=wi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function qc(e,t){return t=Jc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Jc(e,t){return e=Si(22,e,null,t),e.lanes=0,e}function Yc(e,t,n){return no(t,e.child,null,n),e=qc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Xc(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(wo(t),t.flags&=-257,Yc(e,t,c)):t.memoizedState===null?(Do(),o=a.fallback,s=t.mode,a=Jc({mode:`visible`,children:a.children},s),o=Di(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,no(t,e.child,null,c),a=t.child,a.memoizedState=Wc(c),a.childLanes=Gc(e,r,c),t.memoizedState=Uc,Nc(null,a)):(Do(),t.child=e.child,t.flags|=128,null);if(wo(t),lm(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,aa({value:a,source:null,stack:null})),Yc(e,t,c)}if(Dc||pa(e,t,c,!1),r=(c&e.childLanes)!==0,Dc||r){if(_o.current!==null)return Yc(e,t,c);if(r=Xu,r!==null&&(a=ot(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,_i(e,a),Pd(r,e,a),Ec;return cm(o)||Gd(),Yc(e,t,c)}return cm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,Ji=dm(o.nextSibling),qi=t,Yi=!0,Xi=null,Zi=!1,e!==null&&Ki(t,e),t=qc(t,a.children),t.flags|=134221824,t)}function Zc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),da(e.return,t,n)}function Qc(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Mo(n)===null&&(t=e),e=e.sibling}return t}function $c(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 el(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function tl(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=ko.current;if(t.flags&128)return Ao(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Ao(t,o),i===`backwards`&&e!==null?(el(e),Oc(e,t,r,n),el(e)):Oc(e,t,r,n),r=Yi?Ii:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Zc(e,n,t);else if(e.tag===19)Zc(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`backwards`:n=Qc(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,el(t)),$c(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Mo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}$c(t,!0,n,null,a,r);break;case`together`:$c(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=Qc(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),$c(t,!1,i,n,a,r)}return t.child}function nl(e,t,n){var r=t.pendingProps;return la(t,t.type,r.value),Oc(e,t,r.children,n),t.child}function rl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),od|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(pa(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=wi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=wi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function il(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&ma(e)))}function al(e,t,n){switch(t.tag){case 3:me(t,t.stateNode.containerInfo),la(t,Sa,e.memoizedState.cache),ra();break;case 27:case 5:ge(t);break;case 4:me(t,t.stateNode.containerInfo);break;case 10:la(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,To(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return wo(t),t.flags|=128,null;r=pa(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?Kc(e,t,n):(wo(t),e=rl(e,t,n),e===null?null:e.sibling)}wo(t);break;case 19:if(t.flags&128)return tl(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(pa(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return tl(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ao(t,ko.current),r)break;return null;case 22:return t.lanes=0,Mc(e,t,n,t.pendingProps);case 24:la(t,Sa,e.memoizedState.cache)}return rl(e,t,n)}function ol(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Dc=!0;else{if(!il(e,n)&&!(t.flags&128))return Dc=!1,al(e,t,n);Dc=!!(e.flags&131072)}}else Dc=!1,Yi&&t.flags&1048576&&Ui(t,Ii,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ka(t.elementType),t.type=e,typeof e==`function`)Ci(e)?(r=gc(e,r),t.tag=1,t=Vc(null,t,e,r,n)):(t.tag=0,t=zc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===I){t.tag=11,t=kc(null,t,e,r,n);break a}if(a===z){t.tag=14,t=Ac(null,t,e,r,n);break a}if(a===F){t.tag=10,t.type=e,t=nl(null,t,n);break a}}throw t=ie(e)||e,Error(i(306,t,``))}}return t;case 0:return zc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=gc(r,t.pendingProps),Vc(e,t,r,a,n);case 3:a:{if(me(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,oo(e,t),mo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,la(t,Sa,r),r!==o.cache&&fa(t,[Sa],n,!0),po(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Hc(e,t,r,n);break a}if(r!==a){a=Mi(Error(i(424)),t),aa(a),t=Hc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Ji=dm(e.firstChild),qi=t,Yi=!0,Xi=null,Zi=!0,n=ro(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(ra(),r===a){t=rl(e,t,n);break a}Oc(e,t,r,n)}t=t.child}return t;case 26:return Rc(e,t),e===null?(n=Fm(t.type,null,t.pendingProps,null))?t.memoizedState=n:Yi||(t.stateNode=mp(t.type,t.pendingProps,fe.current,t)):t.memoizedState=Fm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ge(t),e===null&&Yi&&(r=t.stateNode=_m(t.type,t.pendingProps,fe.current),qi=t,Zi=!0,a=Ji,wp(t.type)?(fm=a,Ji=dm(r.firstChild)):Ji=a),Oc(e,t,t.pendingProps.children,n),Rc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Yi&&((a=r=Ji)&&(r=am(r,t.type,t.pendingProps,Zi),r===null?a=!1:(t.stateNode=r,qi=t,Ji=dm(r.firstChild),Zi=!1,a=!0)),a||$i(t)),ge(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,hp(a,o)?r=null:s!==null&&hp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Ko(e,t,Yo,null,null,n),lh._currentValue=a),Rc(e,t),Oc(e,t,r,n),t.child;case 6:return e===null&&Yi&&((e=n=Ji)&&(n=om(n,t.pendingProps,Zi),n===null?e=!1:(t.stateNode=n,qi=t,Ji=null,e=!0)),e||$i(t)),null;case 13:return Kc(e,t,n);case 4:return me(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=no(t,null,r,n):Oc(e,t,r,n),t.child;case 11:return kc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Rc(e,t),Oc(e,t,r,n),t.child;case 8:return Oc(e,t,t.pendingProps.children,n),t.child;case 12:return Oc(e,t,t.pendingProps.children,n),t.child;case 10:return nl(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,ha(t),a=ga(a),r=r(a),t.flags|=1,Oc(e,t,r,n),t.child;case 14:return Ac(e,t,t.type,t.pendingProps,n);case 15:return jc(e,t,t.type,t.pendingProps,n);case 19:return tl(e,t,n);case 31:return Lc(e,t,n);case 22:return Mc(e,t,n,t.pendingProps);case 24:return ha(t),r=ga(Sa),e===null?(a=La(),a===null&&(a=Xu,o=Ca(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},ao(t),la(t,Sa,a)):((e.lanes&n)!==0&&(oo(e,t),mo(t,null,null,n),po()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,la(t,Sa,r),r!==a.cache&&fa(t,[Sa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),la(t,Sa,r))),Oc(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:Yi&&Wi(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Rc(e,t),Oc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function sl(e){e.flags|=4}function cl(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?Xm(t,r):Xm(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Hd())e.flags|=8192;else throw qa=Ua,Va}}else e.flags&=-16777217}function ll(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Zm(t)){if(Hd())e.flags|=8192;else throw qa=Ua,Va}}function ul(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:et(),e.lanes|=t,ud|=t)}function dl(e,t){if(!Yi)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,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;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function fl(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&1206910976,r|=i.flags&1206910976,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 pl(e,t,n){var r=t.pendingProps;switch(Gi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return fl(t),null;case 1:return fl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ua(Sa),he(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(na(t)?sl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ia())),fl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(sl(t),o===null?(fl(t),cl(t,a,null,r,n)):(fl(t),ll(t,o))):o?o===e.memoizedState?(fl(t),t.flags&=-16777217):(sl(t),fl(t),ll(t,o)):(e=e.memoizedProps,e!==r&&sl(t),fl(t),cl(t,a,e,r,n)),null;case 27:if(_e(t),n=fe.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&sl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return fl(t),t.subtreeFlags&=-33554433,null}e=ue.current,na(t)?ea(t,e):(e=_m(a,r,n),t.stateNode=e,sl(t))}return fl(t),t.subtreeFlags&=-33554433,null;case 5:if(_e(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&sl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return fl(t),t.subtreeFlags&=-33554433,null}if(o=ue.current,na(t))ea(t,o);else{var s=dp(fe.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[ft]=t,o[pt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(ip(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&sl(t)}}return fl(t),t.subtreeFlags&=-33554433,cl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&sl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=fe.current,na(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=qi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[ft]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||tp(e.nodeValue,n)),e||$i(t,!0)}else e=dp(e).createTextNode(r),e[ft]=t,t.stateNode=e}return fl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=na(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[ft]=t}else ra(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;fl(t),e=!1}else n=ia(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Oo(t),t):(Oo(t),null);if(t.flags&128)throw Error(i(558))}return fl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=na(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[ft]=t}else ra(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;fl(t),a=!1}else a=ia(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Oo(t),t):(Oo(t),null)}return Oo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),ul(t,t.updateQueue),fl(t),null);case 4:return he(),e===null&&Gf(t.stateNode.containerInfo),t.flags|=67108864,fl(t),null;case 10:return ua(t.type),fl(t),null;case 19:if(jo(t),r=t.memoizedState,r===null)return fl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)dl(r,!1);else{if(ad!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Mo(e),o!==null){for(t.flags|=128,dl(r,!1),e=o.updateQueue,t.updateQueue=e,ul(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Ti(n,e),n=n.sibling;return Ao(t,ko.current&1|2),Yi&&Hi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ae()>gd&&(t.flags|=128,a=!0,dl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Mo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,ul(t,e),dl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!Yi)return fl(t),null}else 2*Ae()-r.renderingStartTime>gd&&n!==536870912&&(t.flags|=128,a=!0,dl(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ae(),e.sibling=null,o=ko.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||Yi?Ao(t,o):(n=o,le(So,t),le(ko,n),Co===null&&(Co=t)),Yi&&Hi(t,r.treeForkCount),e}return fl(t),null;case 22:case 23:return Oo(t),xo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(fl(t),t.subtreeFlags&6&&(t.flags|=8192)):fl(t),n=t.updateQueue,n!==null&&ul(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&&ce(Ia),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ua(Sa),fl(t),null;case 25:return null;case 30:return t.flags|=33554432,fl(t),null}throw Error(i(156,t.tag))}function ml(e,t){switch(Gi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ua(Sa),he(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return _e(t),null;case 31:if(t.memoizedState!==null){if(Oo(t),t.alternate===null)throw Error(i(340));ra()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Oo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ra()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return jo(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return he(),null;case 10:return ua(t.type),null;case 22:case 23:return Oo(t),xo(),e!==null&&ce(Ia),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ua(Sa),null;case 25:return null;default:return null}}function hl(e,t){switch(Gi(t),t.tag){case 3:ua(Sa),he();break;case 26:case 27:case 5:_e(t);break;case 4:he();break;case 31:t.memoizedState!==null&&Oo(t);break;case 13:Oo(t);break;case 19:jo(t);break;case 10:ua(t.type);break;case 22:case 23:Oo(t),xo(),e!==null&&ce(Ia);break;case 24:ua(Sa)}}function gl(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){pf(t,t.return,e)}}function _l(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){pf(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){pf(t,t.return,e)}}function vl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{go(t,n)}catch(t){pf(e,e.return,t)}}}function yl(e,t,n){n.props=gc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){pf(e,t,n)}}function bl(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:var i=e.stateNode,a=si(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Ip(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Lp(e);m(e.child,!1,em,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){pf(e,t,n)}}function xl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){pf(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){pf(e,t,n)}else n.current=null}}function Sl(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)nm(e.stateNode,t[n])}function Cl(e){for(var t=e.return;t!==null&&(El(t)&&nm(e.stateNode,t.stateNode),!Tl(t));)t=t.return}function wl(e){for(var t=e.return;t!==null&&(El(t)&&rm(e.stateNode,t.stateNode),!Tl(t));)t=t.return}function Tl(e){return e.tag===5||e.tag===3||e.tag===27}function El(e){return e&&e.tag===7&&e.stateNode!==null}function Dl(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){pf(e,e.return,t)}}function Ol(e,t,n){try{var r=e.stateNode;op(r,e.type,n,t),r[pt]=t}catch(t){pf(e,e.return,t)}}function kl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&wp(e.type)||e.tag===4}function Al(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||kl(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&&wp(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 jl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ln)),Sl(e,r),It=!0;else if(i!==4&&(i===27&&(Sl(e,r),r=null,wp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(jl(e,t,n,r),e=e.sibling;e!==null;)jl(e,t,n,r),e=e.sibling}function Ml(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),Sl(e,r),It=!0;else if(i!==4&&(i===27&&(Sl(e,r),r=null,wp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Ml(e,t,n,r),e=e.sibling;e!==null;)Ml(e,t,n,r),e=e.sibling}function Nl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);ip(t,r,n),t[ft]=e,t[pt]=n}catch(t){pf(e,e.return,t)}}var Pl=!1,Fl=null;function Il(e){(e.tag===30||e.subtreeFlags&33554432)&&(Pl=!0)}var Ll=null;function Rl(){var e=Ll;return Ll=null,e}var zl=0;function Bl(e,t,n,r,i){return zl=0,Vl(e.child,t,n,r,i)}function Vl(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Ap(o);r.push(s),s.view&&(a=!0)}else a||Ap(o).view&&(a=!0);Pl=!0,Dp(o,zl===0?t:t+`_`+zl,n),zl++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&i||Vl(e.child,t,n,r,i)&&(a=!0));e=e.sibling}return a}function Hl(e,t){for(;e!==null;)e.tag===5?Op(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||Hl(e.child,t)),e=e.sibling}function X(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(X(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=li(t.default,t.share),t!==`none`&&(Bl(e,n,t,null,!1)||Hl(e.child,!1))}e=e.sibling}}function Ul(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=si(r,n),a=li(r.default,n.paired?r.share:r.enter);a===`none`?X(e):Bl(e,i,a,null,!1)?(X(e),n.paired||t||Nd(e,r.onEnter)):Hl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Ul(e,t),e=e.sibling;else X(e)}function Wl(e){if(Fl!==null&&Fl.size!==0){var t=Fl;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=li(n.default,n.share);if(a!==`none`&&(Bl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Nd(e,n.onShare)):Hl(e.child,!1)),t.delete(r),t.size===0)break}}}Wl(e)}e=e.sibling}}}function Gl(e){if(e.tag===30){var t=e.memoizedProps,n=si(t,e.stateNode),r=Fl===null?void 0:Fl.get(n),i=li(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Bl(e,n,i,null,!1)?r===void 0?Nd(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Fl.delete(n),Nd(e,t.onShare)):Hl(e.child,!1)),Fl!==null&&Wl(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Gl(e),e=e.sibling;else Fl!==null&&Wl(e)}function Kl(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=si(t,e.stateNode);t=li(t.default,t.update),e.flags&=-5,t!==`none`&&Bl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&Kl(e);e=e.sibling}}function ql(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,Hl(e.child,!1))}ql(e)}e=e.sibling}}function Jl(e){if(e.tag===30)e.stateNode.paired=null,Hl(e.child,!1),ql(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Jl(e),e=e.sibling;else ql(e)}function Yl(e){for(e=e.child;e!==null;)e.tag===30?Hl(e.child,!1):e.subtreeFlags&33554432&&Yl(e),e=e.sibling}function Xl(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&zl<a.length){var l=a[zl],u=Ap(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&Dp(c,zl===0?n:n+`_`+zl,i),s&&e.flags&4||(Ll===null&&(Ll=[]),Ll.push(c,zl===0?r:r+`_`+zl,t.memoizedProps)),zl++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:Xl(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function Zl(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=si(n,r),a=li(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(jp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;zl=0,i=Xl(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Nd(e,n.onUpdate))}else e.subtreeFlags&33554432&&Zl(e,t);e=e.sibling}}var Ql=!1,$l=!1,eu=!1,tu=!1,nu=typeof WeakSet==`function`?WeakSet:Set,ru=null,iu=!1,au=!1,ou=!1,su=!1;function cu(e,t,n){if(e=e.containerInfo,lp=vh,e=Lr(e),Rr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(up={focusedElem:e,selectionRange:r},vh=!1,n=(n&335544064)===n,ru=t,t=n?9270:1024;ru!==null;){if(e=ru,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&Gl(r[a]);if(e.alternate===null&&e.flags&2)n&&Il(e),lu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&Gl(r),lu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Il(e),lu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,ru=r):(n&&Kl(e),lu(n))}}Fl=null}function lu(e){for(;ru!==null;){var t=ru,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=gc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){pf(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)im(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:im(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=si(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=li(a.default,a.update),a!==`none`&&Bl(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,ru=r;break}ru=t.return}}function uu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Au(e,n),r&4&&gl(5,n);break;case 1:if(Au(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){pf(n,n.return,e)}else{var i=gc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){pf(n,n.return,e)}}}r&64&&vl(n),r&512&&bl(n,n.return);break;case 3:if(Au(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{go(e,t)}catch(e){pf(n,n.return,e)}}break;case 27:t===null&&r&4&&Nl(n);case 26:case 5:Au(e,n),t===null&&r&4&&Dl(n),r&512&&bl(n,n.return);break;case 12:Au(e,n);break;case 31:Au(e,n),r&4&&yu(e,n);break;case 13:Au(e,n),r&4&&bu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=_f.bind(null,n),um(e,n))));break;case 22:if(r=n.memoizedState!==null||Ql,!r){var a=t!==null&&t.memoizedState!==null||$l;t=Ql,i=$l,Ql=r,($l=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Mu(e,n,r)):Au(e,n),Ql=t,$l=i}break;case 30:Au(e,n),r&512&&bl(n,n.return);break;case 7:r&512&&bl(n,n.return);default:Au(e,n)}}function du(e,t){for(e=e.child;e!==null;)fu(e,t),e=e.sibling}function fu(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){pf(e,e.return,t)}pu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,It=!0}catch(t){pf(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Ep(s,!0):Ep(e.stateNode,!1)}catch(t){pf(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&du(e,t);break;default:du(e,t)}}function pu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:fu(n,r);break a;case 22:n.memoizedState===null&&pu(n,r);break a;default:pu(n,r)}}e=e.sibling}}function mu(e){var t=e.alternate;t!==null&&(e.alternate=null,mu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&xt(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 hu=null,gu=!1;function _u(e,t,n){for(n=n.child;n!==null;)vu(e,t,n),n=n.sibling}function vu(e,t,n){if(Be&&typeof Be.onCommitFiberUnmount==`function`)try{Be.onCommitFiberUnmount(ze,n)}catch{}switch(n.tag){case 26:$l||xl(n,t),_u(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!$l&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:$l||xl(n,t),wl(n);var r=hu,i=gu;wp(n.type)&&(hu=n.stateNode,gu=!1),_u(e,t,n),vm(n.stateNode,n.type,n.memoizedProps),hu=r,gu=i;break;case 5:$l||xl(n,t),wl(n);case 6:if(n.tag===6&&wl(n),r=hu,i=gu,hu=null,_u(e,t,n),hu=r,gu=i,hu!==null){if(gu)try{(hu.nodeType===9?hu.body:hu.nodeName===`HTML`?hu.ownerDocument.body:hu).removeChild(n.stateNode),It=!0}catch(e){pf(n,t,e)}else try{hu.removeChild(n.stateNode),It=!0}catch(e){pf(n,t,e)}}break;case 18:hu!==null&&(gu?(e=hu,Tp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Wh(e)):Tp(hu,n.stateNode));break;case 4:r=hu,i=gu,hu=n.stateNode.containerInfo,gu=!0,_u(e,t,n),hu=r,gu=i;break;case 0:case 11:case 14:case 15:_l(2,n,t),$l||_l(4,n,t),_u(e,t,n);break;case 1:$l||(xl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&yl(n,t,r)),_u(e,t,n);break;case 21:_u(e,t,n);break;case 22:$l=(r=$l)||n.memoizedState!==null,_u(e,t,n),$l=r;break;case 30:xl(n,t),_u(e,t,n);break;case 7:$l||xl(n,t),_u(e,t,n);break;default:_u(e,t,n)}}function yu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Wh(e)}catch(e){pf(t,t.return,e)}}}function bu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Wh(e)}catch(e){pf(t,t.return,e)}}function xu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new nu),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new nu),t;default:throw Error(i(435,e.tag))}}function Su(e,t){var n=xu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=vf.bind(null,e,t);t.then(r,r)}})}function Cu(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(wp(l.type)){hu=l.stateNode,gu=!1;break a}break;case 5:hu=l.stateNode,gu=!1;break a;case 3:case 4:hu=l.stateNode.containerInfo,gu=!0;break a}l=l.return}if(hu===null)throw Error(i(160));vu(s,c,o),hu=null,gu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Tu(t,e,n),t=t.sibling}var wu=null;function Tu(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}Cu(t,e,n),Eu(e),a&4&&(_l(3,e,e.return),gl(3,e),_l(5,e,e.return));break;case 1:Cu(t,e,n),Eu(e),a&512&&($l||r===null||xl(r,r.return)),a&64&&Ql&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=wu,Cu(t,e,n),Eu(e),a&512&&($l||r===null||xl(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(Ql)e.stateNode=mp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[yt]||r[ft]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),ip(r,t,n),r[ft]=e,Et(r),t=r;break a;case`link`:if(o=qm(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),ip(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=qm(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),ip(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[ft]=e,Et(r),t=r}e.stateNode=t}}else Ql||Jm(o,e.type,e.stateNode)}else e.stateNode=Hm(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Ol(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||$l||t.parentNode.removeChild(t)):a.count--,n===null?Ql||Jm(o,e.type,e.stateNode):Hm(o,n,e.memoizedProps))}break;case 27:Cu(t,e,n),Eu(e),a&512&&($l||r===null||xl(r,r.return)),r!==null&&a&4&&Ol(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=eu,eu=!1,Cu(t,e,n),eu=o,Eu(e),a&512&&($l||r===null||xl(r,r.return)),e.flags&32){t=e.stateNode;try{en(t,``),It=!0}catch(t){pf(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Ol(e,t,r===null?t:r.memoizedProps)),a&1024&&(tu=!0);break;case 6:if(Cu(t,e,n),Eu(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,It=!0}catch(t){pf(e,e.return,t)}}break;case 3:if(It=!1,Km=null,o=wu,wu=Sm(t.containerInfo),Cu(t,e,n),wu=o,Eu(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Wh(t.containerInfo)}catch(t){pf(e,e.return,t)}tu&&(tu=!1,Du(e)),It=!1;break;case 4:a=eu,eu=Ql,r=Lt(),o=wu,wu=Sm(e.stateNode.containerInfo),Cu(t,e,n),Eu(e),wu=o,It&&au&&(ou=!0),It=r,eu=a;break;case 12:Cu(t,e,n),Eu(e);break;case 31:Cu(t,e,n),Eu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Su(e,t)));break;case 13:Cu(t,e,n),Eu(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(md=Ae()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Su(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=Ql,l=$l,u=eu;Ql=c||o,eu=u||o,$l=l||s,Cu(t,e,n),$l=l,eu=u,Ql=c,Eu(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||Ql||$l||(t=s||$l,n=Ql,r=$l,Ql=o||Ql,$l=t,ju(e,2),Ql=n,$l=r),!o&&eu||du(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Su(e,n))));break;case 19:Cu(t,e,n),Eu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Su(e,t)));break;case 30:a&512&&($l||r===null||xl(r,r.return)),a=Lt(),o=au,s=(n&335544064)===n,c=e.memoizedProps,au=s&&li(c.default,c.update)!==`none`,Cu(t,e,n),Eu(e),s&&r!==null&&It&&(e.flags|=4),au=o,It=a;break;case 21:break;case 7:a&512&&($l||r===null||xl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Cu(t,e,n),Eu(e)}}function Eu(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(kl(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(El(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(Tl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Ml(e,Al(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(en(l,``),n.flags&=-33),Ml(e,Al(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;jl(e,Al(e),u,s);break;default:throw Error(i(161))}}catch(t){pf(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Du(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Du(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,vh=!0,t.reset(),vh=!1),e=e.sibling}}function Ou(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)ku(t,e),t=t.sibling;else Zl(t,!1)}function ku(e,t){var n=e.alternate;if(n===null)Ul(e,!1);else switch(e.tag){case 3:if(su=iu=!1,Rl(),Ou(t,e),!iu&&!ou){if(e=Ll,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Op(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),su=!0}Ll=null;break;case 5:Ou(t,e);break;case 4:r=iu,iu=!1,Ou(t,e),iu&&(ou=!0),iu=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Ou(t,e):Ul(e,!1));break;case 30:r=iu,i=Rl(),iu=!1,Ou(t,e),iu&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=si(a,o),o=si(n.memoizedProps,o);var s=li(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,zl=0,t=Xl(e,n,t,o,s,a,!0),zl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Nd(e,e.memoizedProps.onUpdate),Ll=i):i!==null&&(i.push.apply(i,Ll),Ll=i),iu=e.flags&32?!0:r;break;default:Ou(t,e)}}function Au(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)uu(e,t.alternate,t),t=t.sibling}function ju(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:_l(4,n,n.return),ju(n,r);break;case 1:xl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&yl(n,n.return,i),ju(n,r);break;case 27:r&2&&vm(n.stateNode,n.type,n.memoizedProps);case 5:xl(n,n.return),n.tag!==5&&n.tag!==27||wl(n),ju(n,r);break;case 6:wl(n);break;case 26:xl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||$l||i.parentNode.removeChild(i),ju(n,r);break;case 22:n.memoizedState===null&&ju(n,r);break;case 30:xl(n,n.return),ju(n,r);break;case 7:xl(n,n.return);default:ju(n,r)}e=e.sibling}}function Mu(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:Mu(i,a,n),gl(4,a);break;case 1:if(Mu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){pf(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)ho(l[i],c)}catch(e){pf(r,r.return,e)}}s&&o&64&&vl(a),bl(a,a.return);break;case 27:n&2&&Nl(a);case 5:a.tag!==5&&a.tag!==27||Cl(a),Mu(i,a,n),s&&r===null&&o&4&&Dl(a),bl(a,a.return);break;case 6:Cl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||Ql||Jm(Sm(c.ownerDocument),a.type,c),Mu(i,a,n),s&&r===null&&o&4&&Dl(a),bl(a,a.return);break;case 12:Mu(i,a,n);break;case 31:Mu(i,a,n),s&&o&4&&yu(i,a);break;case 13:Mu(i,a,n),s&&o&4&&bu(i,a);break;case 22:a.memoizedState===null&&Mu(i,a,n),bl(a,a.return);break;case 30:Mu(i,a,n),bl(a,a.return);break;case 7:bl(a,a.return);default:Mu(i,a,n)}t=t.sibling}}function Nu(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&&wa(n))}function Pu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&wa(e))}function Fu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Iu(e,t,n,r),t=t.sibling;else i&&Yl(t)}function Iu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&Jl(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Fu(e,t,n,r),a&2048&&gl(9,t);break;case 1:Fu(e,t,n,r);break;case 3:Fu(e,t,n,r),i&&su&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&wa(a)));break;case 12:if(a&2048){Fu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){pf(t,t.return,e)}}else Fu(e,t,n,r);break;case 31:Fu(e,t,n,r);break;case 13:Fu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&Jl(t),o._visibility&2?Fu(e,t,n,r):(o._visibility|=2,Lu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&Jl(s),o._visibility&2?Fu(e,t,n,r):Ru(e,t)),a&2048&&Nu(s,t);break;case 24:Fu(e,t,n,r),a&2048&&Pu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Hl(a.child,!0),Hl(t.child,!0))),Fu(e,t,n,r);break;default:Fu(e,t,n,r)}}function Lu(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!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:Lu(a,o,s,c,i),gl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Lu(a,o,s,c,i)):u._visibility&2?Lu(a,o,s,c,i):Ru(a,o),i&&l&2048&&Nu(o.alternate,o);break;case 24:Lu(a,o,s,c,i),i&&l&2048&&Pu(o.alternate,o);break;default:Lu(a,o,s,c,i)}t=t.sibling}}function Ru(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:Ru(n,r),i&2048&&Nu(r.alternate,r);break;case 24:Ru(n,r),i&2048&&Pu(r.alternate,r);break;default:Ru(n,r)}t=t.sibling}}var zu=8192;function Bu(e,t,n){if(e.subtreeFlags&zu)for(e=e.child;e!==null;)Vu(e,t,n),e=e.sibling}function Vu(e,t,n){switch(e.tag){case 26:Bu(e,t,n),e.flags&zu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&$m(n,e)):eh(n,wu,e.memoizedState,e.memoizedProps));break;case 5:Bu(e,t,n),e.flags&zu&&(e=e.stateNode,(t&335544128)===t&&$m(n,e));break;case 3:case 4:var r=wu;wu=Sm(e.stateNode.containerInfo),Bu(e,t,n),wu=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=zu,zu=16777216,Bu(e,t,n),zu=r):Bu(e,t,n));break;case 30:if((e.flags&zu)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Fl===null&&(Fl=new Map),Fl.set(r,i)}Bu(e,t,n);break;default:Bu(e,t,n)}}function Hu(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 Uu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ru=r,Ku(r,e)}Hu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Wu(e),e=e.sibling}function Wu(e){switch(e.tag){case 0:case 11:case 15:Uu(e),e.flags&2048&&_l(9,e,e.return);break;case 3:Uu(e);break;case 12:Uu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Gu(e)):Uu(e);break;default:Uu(e)}}function Gu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ru=r,Ku(r,e)}Hu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:_l(8,t,t.return),Gu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Gu(t));break;default:Gu(t)}e=e.sibling}}function Ku(e,t){for(;ru!==null;){var n=ru;switch(n.tag){case 0:case 11:case 15:_l(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:wa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,ru=r;else a:for(n=e;ru!==null;){r=ru;var i=r.sibling,a=r.return;if(mu(r),r===n){ru=null;break a}if(i!==null){i.return=a,ru=i;break a}ru=a}}}var qu={getCacheForType:function(e){var t=ga(Sa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ga(Sa).controller.signal}},Ju=typeof WeakMap==`function`?WeakMap:Map,Yu=0,Xu=null,Zu=null,Qu=0,$u=0,ed=null,td=!1,nd=!1,rd=!1,id=0,ad=0,od=0,sd=0,cd=0,ld=0,ud=0,dd=null,fd=null,pd=!1,md=0,hd=0,gd=1/0,_d=null,vd=null,yd=0,bd=null,xd=null,Sd=0,Cd=0,wd=null,Td=null,Ed=null,Dd=null,Od=null,kd=0,Ad=null;function jd(){return Yu&2&&Qu!==0?Qu&-Qu:G.T===null?lt():Pf()}function Md(){if(ld===0){if(!(Qu&536870912)||Yi){var e=qe;qe<<=1,!(qe&3932160)&&(qe=262144),ld=e}else ld=536870912}return e=So.current,e!==null&&(e.flags|=32),ld}function Nd(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Ip(si(e.memoizedProps,n))),Dd===null&&(Dd=[]),Dd.push(t.bind(null,r))}}function Pd(e,t,n){(e===Xu&&($u===2||$u===9)||e.cancelPendingCommit!==null)&&(Vd(e,0),Rd(e,Qu,ld,!1)),nt(e,n),(!(Yu&2)||e!==Xu)&&(e===Xu&&(!(Yu&2)&&(sd|=n),ad===4&&Rd(e,Qu,ld,!1)),Ef(e))}function Fd(e,t,n){if(Yu&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||Ze(e,t),a=r?Jd(e,t):Kd(e,t,!0),o=r;do{if(a===0){nd&&!r&&Rd(e,t,0,!1);break}if(n=e.current.alternate,o&&!Ld(n))a=Kd(e,t,!1),o=!1;else{if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=dd;var l=c.current.memoizedState.isDehydrated;if(l&&(Vd(c,s).flags|=256),s=Kd(c,s,!1),s!==2&&s!==6){if(rd&&!l){c.errorRecoveryDisabledLanes|=o,sd|=o,a=4;break a}o=fd,fd=a,o!==null&&(fd===null?fd=o:fd.push.apply(fd,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Vd(e,0),Rd(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Rd(r,t,ld,!td);break a;case 2:fd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=md+300-Ae(),10<a)){if(Rd(r,t,ld,!td),Xe(r,0,!0)!==0)break a;Sd=t,r.timeoutHandle=vp(Id.bind(null,r,n,fd,_d,pd,t,ld,sd,ud,td,o,`Throttled`,-0,0),a);break a}Id(r,n,fd,_d,pd,t,ld,sd,ud,td,o,null,-0,0)}break}}while(1);Ef(e)}function Id(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ln},Fl=null,Vu(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=ih.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?md-Ae():(a&4194048)===a?hd-Ae():0,m=nh(d,m),m!==null)?(Sd=a,e.cancelPendingCommit=m(tf.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Rd(e,a,o,!l)):tf(e,t,a,n,r,i,o,s,c,l,u,d)}function Ld(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(!jr(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 Rd(e,t,n,r){t=Qe(e,t),t&=~cd,t&=~sd,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-He(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&it(e,n,t)}function zd(){return Yu&6?!0:(Df(0,!1),!1)}function Bd(){if(Zu!==null){if($u===0)var e=Zu.return;else e=Zu,ca=sa=null,Qo(e),Xa=null,Za=0,e=Zu;for(;e!==null;)hl(e.alternate,e),e=e.return;Zu=null}}function Vd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,yp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Sd=0,Bd(),Xu=e,Zu=n=wi(e.current,null),Qu=t,$u=0,ed=null,td=!1,nd=Ze(e,t),rd=!1,ud=ld=cd=sd=od=ad=0,fd=dd=null,pd=!1,id=Qe(e,t),mi(),n}function Z(e,t){Po=null,G.H=cc,t===Ba||t===Ha?(t=Ja(),$u=3):t===Va?(t=Ja(),$u=4):$u=t===Ec?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,ed=t,Zu===null&&(ad=1,bc(e,Mi(t,e.current)))}function Hd(){var e=So.current;return e===null?!0:(Qu&4194048)===Qu?Co===null:(Qu&62914560)===Qu||Qu&536870912?e===Co:!1}function Ud(){var e=G.H;return G.H=cc,e===null?cc:e}function Wd(){var e=G.A;return G.A=qu,e}function Gd(){ad=4,td||(Qu&4194048)!==Qu&&So.current!==null||(nd=!0),!(od&134217727)&&!(sd&134217727)||Xu===null||Rd(Xu,Qu,ld,!1)}function Kd(e,t,n){var r=Yu;Yu|=2;var i=Ud(),a=Wd();(Xu!==e||Qu!==t)&&(_d=null,Vd(e,t)),t=!1;var o=ad;a:do try{if($u!==0&&Zu!==null){var s=Zu,c=ed;switch($u){case 8:Bd(),o=6;break a;case 3:case 2:case 9:case 6:So.current===null&&(t=!0);var l=$u;if($u=0,ed=null,Qd(e,s,c,l),n&&nd){o=0;break a}break;default:l=$u,$u=0,ed=null,Qd(e,s,c,l)}}qd(),o=ad;break}catch(t){Z(e,t)}while(1);return t&&e.shellSuspendCounter++,ca=sa=null,Yu=r,G.H=i,G.A=a,Zu===null&&(Xu=null,Qu=0,mi()),o}function qd(){for(;Zu!==null;)Xd(Zu)}function Jd(e,t){var n=Yu;Yu|=2;var r=Ud(),a=Wd();Xu!==e||Qu!==t?(_d=null,gd=Ae()+500,Vd(e,t)):nd=Ze(e,t);a:do try{if($u!==0&&Zu!==null){t=Zu;var o=ed;b:switch($u){case 1:$u=0,ed=null,Qd(e,t,o,1);break;case 2:case 9:if(Wa(o)){$u=0,ed=null,Zd(t);break}t=function(){$u!==2&&$u!==9||Xu!==e||($u=7),Ef(e)},o.then(t,t);break a;case 3:$u=7;break a;case 4:$u=5;break a;case 7:Wa(o)?($u=0,ed=null,Zd(t)):($u=0,ed=null,Qd(e,t,o,7));break;case 5:var s=null;switch(Zu.tag){case 26:s=Zu.memoizedState;case 5:case 27:var c=Zu;if(s?Zm(s):c.stateNode.complete){$u=0,ed=null;var l=c.sibling;if(l!==null)Zu=l;else{var u=c.return;u===null?Zu=null:(Zu=u,$d(u))}break b}}$u=0,ed=null,Qd(e,t,o,5);break;case 6:$u=0,ed=null,Qd(e,t,o,6);break;case 8:Bd(),ad=6;break a;default:throw Error(i(462))}}Yd();break}catch(t){Z(e,t)}while(1);return ca=sa=null,G.H=r,G.A=a,Yu=n,Zu===null?(Xu=null,Qu=0,mi(),ad):0}function Yd(){for(;Zu!==null&&!Oe();)Xd(Zu)}function Xd(e){var t=ol(e.alternate,e,id);e.memoizedProps=e.pendingProps,t===null?$d(e):Zu=t}function Zd(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Bc(n,t,t.pendingProps,t.type,void 0,Qu);break;case 11:t=Bc(n,t,t.pendingProps,t.type.render,t.ref,Qu);break;case 5:Qo(t);var r=t;r===qi&&(Yi?(ta(r),r.tag===5&&r.stateNode!=null&&(Ji=r.stateNode)):(ta(r),Yi=!0));default:hl(n,t),t=Zu=Ti(t,id),t=ol(n,t,id)}e.memoizedProps=e.pendingProps,t===null?$d(e):Zu=t}function Qd(e,t,n,r){ca=sa=null,Qo(t),Xa=null,Za=0;var i=t.return;try{if(Tc(e,i,t,n,Qu)){ad=1,bc(e,Mi(n,e.current)),Zu=null;return}}catch(t){if(i!==null)throw Zu=i,t;ad=1,bc(e,Mi(n,e.current)),Zu=null;return}t.flags&32768?(Yi||r===1?e=!0:nd||Qu&536870912?e=!1:(td=e=!0,(r===2||r===9||r===3||r===6)&&(r=So.current,r!==null&&r.tag===13&&(r.flags|=16384))),ef(t,e)):$d(t)}function $d(e){var t=e;do{if(t.flags&32768){ef(t,td);return}e=t.return;var n=pl(t.alternate,t,id);if(n!==null){Zu=n;return}if(t=t.sibling,t!==null){Zu=t;return}Zu=t=e}while(t!==null);ad===0&&(ad=5)}function ef(e,t){do{var n=ml(e.alternate,e);if(n!==null){n.flags&=32767,Zu=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Zu=e;return}Zu=e=n}while(e!==null);ad=6,Zu=null}function tf(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do uf();while(yd!==0);if(Yu&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===Xu&&(Zu=Xu=null,Qu=0),xd=t,bd=e,Sd=n,wd=a,Td=r,nf(e,t,n,s,c,l,f)}}function nf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Cd=s,s|=pi,rt(e,n,s,r,i,a),Dd=null,(n&335544064)===n?(Od=Da(e),r=10262):(Od=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,yf(Pe,function(){return df(),null})):(e.callbackNode=null,e.callbackPriority=0),Pl=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=G.T,G.T=null,i=K.p,K.p=2,a=Yu,Yu|=4;try{cu(e,t,n)}finally{Yu=a,K.p=i,G.T=r}}yd=1,Pl?Ed=Pp(o,e.containerInfo,Od,of,sf,af,cf,df,rf,null,null):(of(),sf(),cf())}function rf(e){if(yd!==0){var t=bd.onRecoverableError;t(e,{componentStack:null})}}function af(){yd===3&&(yd=0,ku(xd,bd),yd=4)}function of(){if(yd===1){yd=0;var e=bd,t=xd,n=Sd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=G.T,G.T=null;var i=K.p;K.p=2;var a=Yu;Yu|=4;try{au=ou=!1,Tu(t,e,n),n=up;var o=Lr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Ir(s.ownerDocument.documentElement,s)){if(c!==null&&Rr(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 _=Fr(s,h),v=Fr(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}}vh=!!lp,up=lp=null}finally{Yu=a,K.p=i,G.T=r}}e.current=t,yd=2}}function sf(){if(yd===2){yd=0;var e=bd,t=xd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=G.T,G.T=null;var r=K.p;K.p=2;var i=Yu;Yu|=4;try{uu(e,t.alternate,t)}finally{Yu=i,K.p=r,G.T=n}}yd=3}}function cf(){if(yd===4||yd===3){yd=0;var e=Ed;Ed=null,ke();var t=bd,n=xd,r=Sd,i=Td,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?yd=5:(yd=0,xd=bd=null,lf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(vd=null),ct(r),n=n.stateNode,Be&&typeof Be.onCommitFiberRoot==`function`)try{Be.onCommitFiberRoot(ze,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=G.T,a=K.p,K.p=2,G.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{G.T=n,K.p=a}}if(i=Dd,o=Od,Od=null,i!==null&&(Dd=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);Sd&3&&uf(),Ef(t),a=t.pendingLanes,r&261930&&a&42?t===Ad?kd++:(kd=0,Ad=t):(kd=0,Ad=null),Df(0,!1)}}function lf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,wa(t)))}function uf(){return Ed!==null&&(Ed.skipTransition(),Ed=null),of(),sf(),cf(),df()}function df(){if(yd!==5)return!1;var e=bd,t=Cd;Cd=0;var n=ct(Sd),r=G.T,a=K.p;try{K.p=32>n?32:n,G.T=null,n=wd,wd=null;var o=bd,s=Sd;if(yd=0,xd=bd=null,Sd=0,Yu&6)throw Error(i(331));var c=Yu;if(Yu|=4,Wu(o.current),Iu(o,o.current,s,n),Yu=c,Df(0,!1),Be&&typeof Be.onPostCommitFiberRoot==`function`)try{Be.onPostCommitFiberRoot(ze,o)}catch{}return!0}finally{K.p=a,G.T=r,lf(e,t)}}function ff(e,t,n){t=Mi(n,t),t=Sc(e.stateNode,t,2),e=co(e,t,2),e!==null&&(nt(e,2),Ef(e))}function pf(e,t,n){if(e.tag===3)ff(e,e,n);else for(;t!==null;){if(t.tag===3){ff(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(vd===null||!vd.has(r))){e=Mi(n,e),n=Cc(2),r=co(t,n,2),r!==null&&(wc(n,r,t,e),nt(r,2),Ef(r));break}}t=t.return}}function mf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ju;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)||(rd=!0,i.add(n),e=hf.bind(null,e,t,n),t.then(e,e))}function hf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Xu===e&&(Qu&n)===n&&(ad===4||ad===3&&(Qu&62914560)===Qu&&300>Ae()-md?Yu&2?cd|=n:Vd(e,0):cd|=n,ud===Qu&&(ud=0)),Ef(e)}function gf(e,t){t===0&&(t=et()),e=_i(e,t),e!==null&&(nt(e,t),Ef(e))}function _f(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),gf(e,n)}function vf(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),gf(e,n)}function yf(e,t){return Ee(e,t)}var bf=null,xf=null,Sf=!1,Cf=!1,wf=!1,Tf=0;function Ef(e){e!==xf&&e.next===null&&(xf===null?bf=xf=e:xf=xf.next=e),Cf=!0,Sf||(Sf=!0,Nf())}function Df(e,t){if(!wf&&Cf){wf=!0;do for(var n=!1,r=bf;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-He(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Mf(r,a))}else a=Qu,a=Xe(r,r===Xu?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ze(r,a)||(n=!0,Mf(r,a))}r=r.next}while(n);wf=!1}}function Of(){kf()}function kf(){Cf=Sf=!1;var e=0;Tf!==0&&_p()&&(e=Tf);for(var t=Ae(),n=null,r=bf;r!==null;){var i=r.next,a=Af(r,t);a===0?(r.next=null,n===null?bf=i:n.next=i,i===null&&(xf=n)):(n=r,(e!==0||a&3)&&(Cf=!0)),r=i}yd!==0&&yd!==5||Df(e,!1),Tf!==0&&(Tf=0)}function Af(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-He(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=$e(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Xu,n=Qu,n=Xe(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&($u===2||$u===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&De(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ze(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&De(r),ct(n)){case 2:case 8:n=Ne;break;case 32:n=Pe;break;case 268435456:n=Ie;break;default:n=Pe}return r=jf.bind(null,e),n=Ee(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&De(r),e.callbackPriority=2,e.callbackNode=null,2}function jf(e,t){if(yd!==0&&yd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(uf()&&e.callbackNode!==n)return null;var r=Qu;return r=Xe(e,e===Xu?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Fd(e,r,t),Af(e,Ae()),e.callbackNode!=null&&e.callbackNode===n?jf.bind(null,e):null)}function Mf(e,t){if(uf())return null;Fd(e,t,!0)}function Nf(){Sp(function(){Yu&6?Ee(Me,Of):kf()})}function Pf(){if(Tf===0){var e=Aa;e===0&&(e=Ke,Ke<<=1,!(Ke&261888)&&(Ke=256)),Tf=e}return Tf}function Ff(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:cn(e)}function If(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Ff((i[pt]||null).action),o=r.submitter;o&&(t=(t=o[pt]||null)?Ff(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new An(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Tf!==0){var e=new FormData(i,o);Js(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),Js(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Lf=0;Lf<ii.length;Lf++){var Rf=ii[Lf];ai(Rf.toLowerCase(),`on`+(Rf[0].toUpperCase()+Rf.slice(1)))}ai(Xr,`onAnimationEnd`),ai(Zr,`onAnimationIteration`),ai(Qr,`onAnimationStart`),ai(`dblclick`,`onDoubleClick`),ai(`focusin`,`onFocus`),ai(`focusout`,`onBlur`),ai($r,`onTransitionRun`),ai(ei,`onTransitionStart`),ai(ti,`onTransitionCancel`),ai(ni,`onTransitionEnd`),jt(`onMouseEnter`,[`mouseout`,`mouseover`]),jt(`onMouseLeave`,[`mouseout`,`mouseover`]),jt(`onPointerEnter`,[`pointerout`,`pointerover`]),jt(`onPointerLeave`,[`pointerout`,`pointerover`]),At(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),At(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),At(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),At(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),At(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),At(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var zf=`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(` `),Bf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(zf));function Vf(e,t){t=!!(t&4);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){ui(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){ui(e)}i.currentTarget=null,a=c}}}}function Hf(e,t){var n=t[ht];n===void 0&&(n=t[ht]=new Set);var r=e+`__bubble`;n.has(r)||(Kf(t,e,2,!1),n.add(r))}function Uf(e,t,n){var r=0;t&&(r|=4),Kf(n,e,r,t)}var Wf=`_reactListening`+Math.random().toString(36).slice(2);function Gf(e){if(!e[Wf]){e[Wf]=!0,Ot.forEach(function(t){t!==`selectionchange`&&(Bf.has(t)||Uf(t,!1,e),Uf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Wf]||(t[Wf]=!0,Uf(`selectionchange`,!1,t))}}function Kf(e,t,n,r){switch(Th(t)){case 2:var i=yh;break;case 8:i=bh;break;default:i=xh}n=i.bind(null,t,n,e),i=void 0,!yn||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 qf(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=St(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}gn(function(){var r=a,i=dn(n),s=[];a:{var c=ri.get(e);if(c!==void 0){var l=An,u=e;switch(e){case`keypress`:if(Tn(n)===0)break a;case`keydown`:case`keyup`:l=qn;break;case`focusin`:u=`focus`,l=Rn;break;case`focusout`:u=`blur`,l=Rn;break;case`beforeblur`:case`afterblur`:l=Rn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Y;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Ln;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Xn;break;case Xr:case Zr:case Qr:l=zn;break;case ni:l=Zn;break;case`scroll`:case`scrollend`:l=Mn;break;case`wheel`:l=Qn;break;case`copy`:case`cut`:case`paste`:l=Bn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Jn;break;case`submit`:l=Yn;break;case`toggle`:case`beforetoggle`:l=$n}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=_n(m,p),g!=null&&d.push(Jf(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==un&&(u=n.relatedTarget||n.fromElement)&&(St(u)||u[mt]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?St(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=Y,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Jn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:wt(c),h=l==null?u:wt(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,St(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?E(c,l,Xf):null,c!==null&&Zf(s,u,c,d,!1),l!==null&&f!==null&&Zf(s,f,l,d,!0)))}a:{if(c=r?wt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=yr;else if(pr(c)){if(br)_=kr;else{_=Dr;var v=Er}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&an(r.elementType)&&(_=yr):_=Or;if(_&&=_(e,r)){mr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?wt(r):window,e){case`focusin`:(pr(v)||v.contentEditable===`true`)&&(Br=v,Vr=r,Hr=null);break;case`focusout`:Hr=Vr=Br=null;break;case`mousedown`:Ur=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Ur=!1,Wr(s,n,i);break;case`selectionchange`:if(zr)break;case`keydown`:case`keyup`:Wr(s,n,i)}var y;if(tr)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else lr?sr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(ir&&n.locale!==`ko`&&(lr||b!==`onCompositionStart`?b===`onCompositionEnd`&&lr&&(y=wn()):(xn=i,Sn=`value`in xn?xn.value:xn.textContent,lr=!0)),v=Yf(r,b),0<v.length&&(b=new Vn(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=cr(n),y!==null&&(b.data=y)))),(y=rr?ur(e,n):dr(e,n))&&(b=Yf(r,`onBeforeInput`),0<b.length&&(v=new Vn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),If(s,e,r,n,i)}Vf(s,t)})}function Jf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Yf(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=_n(e,n),i!=null&&r.unshift(Jf(e,i,a)),i=_n(e,t),i!=null&&r.push(Jf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Xf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Zf(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=_n(n,a),l!=null&&o.unshift(Jf(n,l,c))):i||(l=_n(n,a),l!=null&&o.push(Jf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Qf=/\r\n?/g,$f=/\u0000|\uFFFD/g;function ep(e){return(typeof e==`string`?e:``+e).replace(Qf,`
9
+ `).replace($f,``)}function tp(e,t){return t=ep(t),ep(e)===t}function np(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||en(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&en(e,``+r);else return;break;case`className`:zt(e,`class`,r);break;case`tabIndex`:zt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:zt(e,n,r);break;case`style`:rn(e,r,o);return;case`data`:if(t!==`object`){zt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)||r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=cn(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}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&np(e,t,`name`,a.name,a,null),np(e,t,`formEncType`,a.formEncType,a,null),np(e,t,`formMethod`,a.formMethod,a,null),np(e,t,`formTarget`,a.formTarget,a,null)):(np(e,t,`encType`,a.encType,a,null),np(e,t,`method`,a.method,a,null),np(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=cn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=ln);return;case`onScroll`:r!=null&&Hf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Hf(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(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=cn(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`credentialless`: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`:Hf(`beforetoggle`,e),Hf(`toggle`,e),Rt(e,`popover`,r);break;case`xlinkActuate`:Bt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Bt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Bt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Bt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Bt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Bt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Bt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Bt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Bt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Rt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=on.get(n)||n,Rt(e,n,r);else return}It=!0}function rp(e,t,n,r,a,o){switch(n){case`style`:rn(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)en(e,r);else if(typeof r==`number`||typeof r==`bigint`)en(e,``+r);else return;break;case`onScroll`:r!=null&&Hf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Hf(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=ln);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!kt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[pt]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}It=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Rt(e,n,r)}return}It=!0}function ip(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Hf(`error`,e),Hf(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:np(e,t,o,s,n,null)}}a&&np(e,t,`srcSet`,n.srcSet,n,null),r&&np(e,t,`src`,n.src,n,null);return;case`input`:Hf(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:np(e,t,r,d,n,null)}}Yt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Hf(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:np(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Zt(e,!!r,n,!0):Zt(e,!!r,t,!1);return;case`textarea`:for(s in Hf(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:np(e,t,s,c,n,null)}$t(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:np(e,t,l,r,n,null)}return;case`dialog`:Hf(`beforetoggle`,e),Hf(`toggle`,e),Hf(`cancel`,e),Hf(`close`,e);break;case`iframe`:case`object`:Hf(`load`,e);break;case`video`:case`audio`:for(r=0;r<zf.length;r++)Hf(zf[r],e);break;case`image`:Hf(`error`,e),Hf(`load`,e);break;case`details`:Hf(`toggle`,e);break;case`embed`:case`source`:case`link`:Hf(`error`,e),Hf(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:np(e,t,u,r,n,null)}return;default:if(an(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&rp(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&np(e,t,c,r,n,null))}var ap={};function op(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||np(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`:m!==f&&(It=!0),o=m;break;case`name`:m!==f&&(It=!0),a=m;break;case`checked`:m!==f&&(It=!0),u=m;break;case`defaultChecked`:m!==f&&(It=!0),d=m;break;case`value`:m!==f&&(It=!0),s=m;break;case`defaultValue`:m!==f&&(It=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&np(e,t,p,m,r,f)}}Jt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||np(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(It=!0),p=o;break;case`defaultValue`:o!==l&&(It=!0),c=o;break;case`multiple`:o!==l&&(It=!0),s=o;default:o!==l&&np(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Zt(e,!!n,n?[]:``,!1):Zt(e,!!n,t,!0)):Zt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:np(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(It=!0),p=a;break;case`defaultValue`:a!==o&&(It=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&np(e,t,s,a,r,o)}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:np(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`:p!==m&&(It=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:np(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)&&np(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:np(e,t,u,p,r,m)}return;default:if(an(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&rp(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||rp(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&np(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||np(e,t,f,p,r,m)}function sp(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function cp(){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&&sp(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&&sp(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 lp=null,up=null;function dp(e){return e.nodeType===9?e:e.ownerDocument}function fp(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 pp(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 mp(e,t,n,r){return n=dp(n).createElement(e),n[ft]=r,n[pt]=t,ip(n,e,t),Et(n),n}function hp(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 gp=null;function _p(){var e=window.event;return e&&e.type===`popstate`?e!==gp&&(gp=e,!0):(gp=null,!1)}var vp=typeof setTimeout==`function`?setTimeout:void 0,yp=typeof clearTimeout==`function`?clearTimeout:void 0,bp=typeof Promise==`function`?Promise:void 0,xp=typeof requestAnimationFrame==`function`?requestAnimationFrame:vp,Sp=typeof queueMicrotask==`function`?queueMicrotask:bp===void 0?vp:function(e){return bp.resolve(null).then(e).catch(Cp)};function Cp(e){setTimeout(function(){throw e})}function wp(e){return e===`head`}function Tp(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),Wh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)ym(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,ym(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[yt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&ym(e.ownerDocument.body)}n=i}while(n);Wh(t)}function Ep(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 Dp(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Op(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function kp(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Ap(e){return kp(e.getBoundingClientRect(),getComputedStyle(e),e)}function jp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return kp(t,n,e)}function Mp(e){return e.documentElement.clientHeight}function Np(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Pp(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Mp(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=Qm(f),u>th){s.length=o;break}f=new Promise(Np.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Fp(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Fp.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:D({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Fp.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Fp.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Ip(e){return{name:e,group:new Fp(`group`,e),imagePair:new Fp(`image-pair`,e),old:new Fp(`old`,e),new:new Fp(`new`,e)}}function Lp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Lp.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Hp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=Bp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),m(this._fragmentFiber.child,!1,Rp,e,s,r)}this._eventListeners=a}};function Rp(e,t,n,r){return b(e).addEventListener(t,n,r),!1}Lp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Hp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Bp(i.optionsOrUseCapture),m(this._fragmentFiber.child,!1,zp,e,n,i),r.splice(t,1),a!==null&&a()}};function zp(e,t,n,r){return b(e).removeEventListener(t,n,r),!1}function Bp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Vp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Hp(e,t,n,r){if(e.length===0)return-1;r=Vp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Vp(a.optionsOrUseCapture)===r)return i}return-1}Lp.prototype.dispatchEvent=function(e){var t=g(this._fragmentFiber);if(t===null)return!0;t=b(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,Bp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,Bp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Lp.prototype.focus=function(e){m(this._fragmentFiber.child,!0,Up,e,void 0,void 0)};function Up(e,t){return e.tag!==6&&(e=b(e),hm(e,t))}Lp.prototype.focusLast=function(e){var t=[];m(this._fragmentFiber.child,!0,Wp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Up(t[n],e);n--);};function Wp(e,t){return t.push(e),!1}Lp.prototype.blur=function(){var e=g(this._fragmentFiber);e!==null&&(e=b(e),e=dp(e).activeElement,e!==null&&m(this._fragmentFiber.child,!1,Gp,e,void 0,void 0))};function Gp(e,t){return e.tag!==6&&(e=b(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Lp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),m(this._fragmentFiber.child,!1,Kp,e,void 0,void 0)};function Kp(e,t){return e.tag===6||(e=b(e),t.observe(e)),!1}Lp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),m(this._fragmentFiber.child,!1,qp,e,void 0,void 0);for(var n=t=0;n<Jp.length;n++){var r=Jp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Jp[t++]=r}Jp.length=t}};function qp(e,t){return e.tag===6||(e=b(e),t.unobserve(e)),!1}var Jp=[],Yp=!1;function Xp(e,t,n){Jp.push({fragmentInstance:e,observer:t,instance:n}),Yp||(Yp=!0,gm(function(){Yp=!1;var e=Jp;Jp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Lp.prototype.getClientRects=function(){var e=[];return m(this._fragmentFiber.child,!1,Zp,e,void 0,void 0),e};function Zp(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=b(e),t.push.apply(t,e.getClientRects());return!1}Lp.prototype.getRootNode=function(e){var t=g(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},Lp.prototype.compareDocumentPosition=function(e){var t=g(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];m(this._fragmentFiber.child,!1,Wp,n,void 0,void 0);var r=b(t);if(n.length===0){if(n=r,_(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=v(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=b(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=b(n[0]),i=b(n[n.length-1]);var a=_(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Qp(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Qp(e,t,n,r,i){var a=St(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=g(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=E(n,a,T),t===null?t=!1:(m(t,!0,C,a,n),a=x,x=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=E(r,a,T),t===null?t=!1:(m(t,!0,w,a,r),a=x,S=x=null,t=a!==null)),t):!1}function $p(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Lp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];m(this._fragmentFiber.child,!1,Wp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=v(this._fragmentFiber);if(r=n?r[1]||r[0]||g(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=b(r),$p(e,n);return}if(r=b(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=b(a),$p(a,n)):b(a).scrollIntoView(e),r+=n?-1:1}};function em(e,t){return e=b(e),tm(e,t),!1}function tm(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function nm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,Bp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Jp.length;i++){var a=Jp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Jp[r++]=a)}Jp.length=r,n.observe(e)}),tm(e,t))}function rm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,Bp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Xp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function im(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`:im(n),xt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function am(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[yt])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=dm(e.nextSibling),e===null)break}return null}function om(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=dm(e.nextSibling),e===null))return null;return e}function sm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=dm(e.nextSibling),e===null))return null;return e}function cm(e){return e.data===`$?`||e.data===`$~`}function lm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function um(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 dm(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 fm=null;function pm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return dm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function mm(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 hm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function gm(e){xp(function(){xp(function(t){return e(t)})})}function _m(e,t,n){switch(t=dp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function vm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&np(e,t,r,null,ap,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===ln&&(e.onclick=null),xt(e)}function ym(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);xt(e)}var bm=new Map,xm=new Set;function Sm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Cm=K.d;K.d={f:wm,r:Tm,D:Om,C:km,L:Am,m:jm,X:Nm,S:Mm,M:Pm};function wm(){var e=Cm.f(),t=zd();return e||t}function Tm(e){var t=Ct(e);t!==null&&t.tag===5&&t.type===`form`?Xs(t):Cm.r(e)}var Em=typeof document>`u`?null:document;function Dm(e,t,n){var r=Em;if(r&&typeof t==`string`&&t){var i=qt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),xm.has(i)||(xm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),ip(t,`link`,e),Et(t),r.head.appendChild(t)))}}function Om(e){Cm.D(e),Dm(`dns-prefetch`,e,null)}function km(e,t){Cm.C(e,t),Dm(`preconnect`,e,t)}function Am(e,t,n){Cm.L(e,t,n);var r=Em;if(r&&e&&t){var i=`link[rel="preload"][as="`+qt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+qt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+qt(n.imageSizes)+`"]`)):i+=`[href="`+qt(e)+`"]`;var a=i;switch(t){case`style`:a=Im(e);break;case`script`:a=Bm(e)}if(!(bm.has(a)||(e=D({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),bm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Lm(a))||t===`script`&&r.querySelector(Vm(a))))){var o=r.createElement(`link`);ip(o,`link`,e),t===`style`&&(o[bt]=!0,o.onload=o.onerror=function(){Dt(o)}),Et(o),r.head.appendChild(o)}}}function jm(e,t){Cm.m(e,t);var n=Em;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+qt(r)+`"][href="`+qt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Bm(e)}if(!bm.has(a)&&(e=D({rel:`modulepreload`,href:e},t),bm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Vm(a)))return}r=n.createElement(`link`),ip(r,`link`,e),Et(r),n.head.appendChild(r)}}}function Mm(e,t,n){Cm.S(e,t,n);var r=Em;if(r&&e){var i=Tt(r).hoistableStyles,a=Im(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Lm(a)))s.loading=5;else{e=D({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=bm.get(a))&&Wm(e,n);var c=o=r.createElement(`link`);Et(c),ip(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,Um(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Nm(e,t){Cm.X(e,t);var n=Em;if(n&&e){var r=Tt(n).hoistableScripts,i=Bm(e),a=r.get(i);a||(a=n.querySelector(Vm(i)),a||(e=D({src:e,async:!0},t),(t=bm.get(i))&&Gm(e,t),a=n.createElement(`script`),Et(a),ip(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Pm(e,t){Cm.M(e,t);var n=Em;if(n&&e){var r=Tt(n).hoistableScripts,i=Bm(e),a=r.get(i);a||(a=n.querySelector(Vm(i)),a||(e=D({src:e,async:!0,type:`module`},t),(t=bm.get(i))&&Gm(e,t),a=n.createElement(`script`),Et(a),ip(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Fm(e,t,n,r){var a=(a=fe.current)?Sm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Im(n.href),t=Tt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,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=Im(n.href);var o=Tt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Lm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=bm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},bm.set(e,o)),zm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Bm(n),t=Tt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Im(e){return`href="`+qt(e)+`"`}function Lm(e){return`link[rel="stylesheet"][`+e+`]`}function Rm(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function zm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[bt]){r.loading=1;return}}else t=e.createElement(`link`),t[bt]=!0,t.onload=t.onerror=Dt.bind(null,t),ip(t,`link`,n),Et(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Bm(e){return`[src="`+qt(e)+`"]`}function Vm(e){return`script[async]`+e}function Hm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+qt(n.href)+`"]`);if(r)return t.instance=r,Et(r),r;var a=D({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Et(r),ip(r,`style`,a),Um(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Im(n.href);var o=e.querySelector(Lm(a));if(o)return t.state.loading|=4,t.instance=o,Et(o),o;r=Rm(n),(a=bm.get(a))&&Wm(r,a),o=(e.ownerDocument||e).createElement(`link`),Et(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),ip(o,`link`,r),t.state.loading|=4,Um(o,n.precedence,e),t.instance=o;case`script`:return o=Bm(n.src),(a=e.querySelector(Vm(o)))?(t.instance=a,Et(a),a):(r=n,(a=bm.get(o))&&(r=D({},n),Gm(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Et(a),ip(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Um(r,n.precedence,e));return t.instance}function Um(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 Wm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Gm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Km=null;function qm(e,t,n){if(Km===null){var r=new Map,i=Km=new Map;i.set(n,r)}else i=Km,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[yt]||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 Jm(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Ym(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 Xm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Zm(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Qm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function $m(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Qm(t),e.suspenseyImages.push(t)),e=ah.bind(e),t.decode().then(e,e))}function eh(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=Im(r.href),a=t.querySelector(Lm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ih.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Et(a);return}a=t.ownerDocument||t,r=Rm(r),(i=bm.get(i))&&Wm(r,i),a=a.createElement(`link`),Et(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),ip(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=ih.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var th=0;function nh(e,t){return e.stylesheets&&e.count===0&&sh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&sh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&th===0&&(th=62500*cp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&sh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>th?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function rh(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)sh(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function ih(){this.count--,rh(this)}function ah(){this.imgCount--,rh(this)}var oh=null;function sh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,oh=new Map,t.forEach(ch,e),oh=null,ih.call(e))}function ch(e,t){if(!(t.state.loading&4)){var n=oh.get(e);if(n)var r=n.get(null);else{n=new Map,oh.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=ih.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 lh={$$typeof:F,Provider:null,Consumer:null,_currentValue:q,_currentValue2:q,_threadCount:0};function uh(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=tt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=tt(0),this.hiddenUpdates=tt(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function dh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new uh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Si(3,null,null,t),e.current=a,a.stateNode=e,t=Ca(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},ao(a),e}function fh(e){return e?(e=bi,e):bi}function ph(e,t,n,r,i,a){i=fh(i),r.context===null?r.context=i:r.pendingContext=i,r=so(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=co(e,r,t),n!==null&&(Pd(n,e,t),lo(n,e,t))}function mh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function hh(e,t){mh(e,t),(e=e.alternate)&&mh(e,t)}function gh(e){if(e.tag===13||e.tag===31){var t=_i(e,67108864);t!==null&&Pd(t,e,67108864),hh(e,67108864)}}function _h(e){if(e.tag===13||e.tag===31){var t=jd();t=st(t);var n=_i(e,t);n!==null&&Pd(n,e,t),hh(e,t)}}var vh=!0;function yh(e,t,n,r){var i=G.T;G.T=null;var a=K.p;try{K.p=2,xh(e,t,n,r)}finally{K.p=a,G.T=i}}function bh(e,t,n,r){var i=G.T;G.T=null;var a=K.p;try{K.p=8,xh(e,t,n,r)}finally{K.p=a,G.T=i}}function xh(e,t,n,r){if(vh){var i=Sh(r);if(i===null)qf(e,t,r,Ch,n),Ph(e,r);else if(Ih(i,e,t,n,r))r.stopPropagation();else if(Ph(e,r),t&4&&-1<Nh.indexOf(e)){for(;i!==null;){var a=Ct(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ye(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-He(o);s.entanglements[1]|=c,o&=~c}Ef(a),!(Yu&6)&&(gd=Ae()+500,Df(0,!1))}}break;case 31:case 13:s=_i(a,2),s!==null&&Pd(s,a,2),zd(),hh(a,2)}if(a=Sh(r),a===null&&qf(e,t,r,Ch,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else qf(e,t,r,null,n)}}function Sh(e){return e=dn(e),wh(e)}var Ch=null;function wh(e){if(Ch=null,e=St(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ch=e,null}function Th(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`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`fullscreenerror`: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`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(je()){case Me:return 2;case Ne:return 8;case Pe:case Fe:return 32;case Ie:return 268435456;default:return 32}default:return 32}}var Eh=!1,Dh=null,Oh=null,kh=null,Ah=new Map,jh=new Map,Mh=[],Nh=`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 Ph(e,t){switch(e){case`focusin`:case`focusout`:Dh=null;break;case`dragenter`:case`dragleave`:Oh=null;break;case`mouseover`:case`mouseout`:kh=null;break;case`pointerover`:case`pointerout`:Ah.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:jh.delete(t.pointerId)}}function Fh(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=Ct(t),t!==null&&gh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ih(e,t,n,r,i){switch(t){case`focusin`:return Dh=Fh(Dh,e,t,n,r,i),!0;case`dragenter`:return Oh=Fh(Oh,e,t,n,r,i),!0;case`mouseover`:return kh=Fh(kh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Ah.set(a,Fh(Ah.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,jh.set(a,Fh(jh.get(a)||null,e,t,n,r,i)),!0}return!1}function Lh(e){var t=St(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,ut(e.priority,function(){_h(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,ut(e.priority,function(){_h(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 Rh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Sh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);un=r,n.target.dispatchEvent(r),un=null}else return t=Ct(n),t!==null&&gh(t),e.blockedOn=n,!1;t.shift()}return!0}function zh(e,t,n){Rh(e)&&n.delete(t)}function Bh(){Eh=!1,Dh!==null&&Rh(Dh)&&(Dh=null),Oh!==null&&Rh(Oh)&&(Oh=null),kh!==null&&Rh(kh)&&(kh=null),Ah.forEach(zh),jh.forEach(zh)}function Vh(e,n){e.blockedOn===n&&(e.blockedOn=null,Eh||(Eh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Bh)))}var Hh=null;function Uh(e){Hh!==e&&(Hh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Hh===e&&(Hh=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(wh(r||n)===null)continue;break}var a=Ct(n);a!==null&&(e.splice(t,3),t-=3,Js(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Wh(e){function t(t){return Vh(t,e)}Dh!==null&&Vh(Dh,e),Oh!==null&&Vh(Oh,e),kh!==null&&Vh(kh,e),Ah.forEach(t),jh.forEach(t);for(var n=0;n<Mh.length;n++){var r=Mh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Mh.length&&(n=Mh[0],n.blockedOn===null);)Lh(n),n.blockedOn===null&&Mh.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||Uh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[pt]||null)s=o.formAction;else if(wh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Uh(n)}}}function Gh(){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 Kh(e){this._internalRoot=e}qh.prototype.render=Kh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;ph(n,jd(),e,t,null,null)},qh.prototype.unmount=Kh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ph(e.current,2,null,e,null,null),zd(),t[mt]=null}};function qh(e){this._internalRoot=e}qh.prototype.unstable_scheduleHydration=function(e){if(e){var t=lt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Mh.length&&t!==0&&t<Mh[n].priority;n++);Mh.splice(n,0,e),n===0&&Lh(e)}};var Jh=n.version;if(Jh!==`19.3.1`)throw Error(i(527,Jh,`19.3.1`));K.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Yh={bundleType:0,version:`19.3.1`,rendererPackageName:`react-dom`,currentDispatcherRef:G,reconcilerVersion:`19.3.1`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Xh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xh.isDisabled&&Xh.supportsFiber)try{ze=Xh.inject(Yh),Be=Xh}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=_c,s=vc,c=yc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=dh(e,1,!1,null,null,n,r,null,o,s,c,Gh),e[mt]=t.current,Gf(e),new Kh(t)}})),_=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=l(d(),1),y=_(),b=[{name:`gilt`,label:`Gilt`,mode:`dark`,accent:`#d4af37`,canvas:`#090a0c`},{name:`catppuccin-latte`,label:`Catppuccin Latte`,mode:`light`,accent:`#1e66f5`,canvas:`#e3e4e8`},{name:`catppuccin`,label:`Catppuccin Mocha`,mode:`dark`,accent:`#89b4fa`,canvas:`#161622`},{name:`coppernight`,label:`Copper Night`,mode:`dark`,accent:`#fab387`,canvas:`#0b0b12`},{name:`ethereal`,label:`Ethereal`,mode:`dark`,accent:`#7d82d9`,canvas:`#040816`},{name:`everforest`,label:`Everforest`,mode:`dark`,accent:`#7fbbb3`,canvas:`#21272c`},{name:`flexoki-light`,label:`Flexoki Light`,mode:`light`,accent:`#205ea6`,canvas:`#f2efe4`},{name:`game-boy`,label:`Game Boy`,mode:`light`,accent:`#346856`,canvas:`#88c070`,hidden:!0},{name:`gruvbox`,label:`Gruvbox`,mode:`dark`,accent:`#7daea3`,canvas:`#1e1e1e`},{name:`hackerman`,label:`Hackerman`,mode:`dark`,accent:`#82fb9c`,canvas:`#080910`},{name:`kanagawa`,label:`Kanagawa`,mode:`dark`,accent:`#dcd7ba`,canvas:`#17171e`},{name:`last-horizon`,label:`Last Horizon`,mode:`dark`,accent:`#b59790`,canvas:`#090809`},{name:`lumon`,label:`Lumon`,mode:`dark`,accent:`#8bc9eb`,canvas:`#101b21`},{name:`lupine`,label:`Lupine`,mode:`light`,accent:`#3264eb`,canvas:`#ececec`},{name:`matte-black`,label:`Matte Black`,mode:`dark`,accent:`#e68e0d`,canvas:`#0c0c0c`},{name:`miasma`,label:`Miasma`,mode:`dark`,accent:`#78824b`,canvas:`#191919`},{name:`nord`,label:`Nord`,mode:`dark`,accent:`#81a1c1`,canvas:`#222730`},{name:`oligarchy`,label:`Oligarchy`,mode:`light`,accent:`#c0271c`,canvas:`#e5dbc6`},{name:`osaka-jade`,label:`Osaka Jade`,mode:`dark`,accent:`#509475`,canvas:`#0c1512`},{name:`retro-82`,label:`Retro 82`,mode:`dark`,accent:`#faa968`,canvas:`#031222`},{name:`ristretto`,label:`Ristretto`,mode:`dark`,accent:`#f38d70`,canvas:`#211b1b`},{name:`rose-pine`,label:`Rose Pine Dawn`,mode:`light`,accent:`#56949f`,canvas:`#ede7e1`},{name:`solitude`,label:`Solitude`,mode:`dark`,accent:`#798186`,canvas:`#0c0e10`},{name:`tokyo-night`,label:`Tokyo Night`,mode:`dark`,accent:`#7aa2f7`,canvas:`#13141c`},{name:`vantablack`,label:`Vantablack`,mode:`dark`,accent:`#8d8d8d`,canvas:`#090909`},{name:`white`,label:`White`,mode:`light`,accent:`#6e6e6e`,canvas:`#f5f5f5`}],x=o((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})),S=o(((e,t)=>{t.exports=x()}))(),C=v.createContext(null),w=new Set,T=e=>(w.add(e),()=>w.delete(e)),E=()=>w.forEach(e=>e()),D=()=>document.documentElement.dataset.theme,O=()=>document.documentElement.classList.contains(`dark`)?`dark`:`light`,k=()=>void 0,A=()=>window.matchMedia(`(prefers-color-scheme: dark)`),j=e=>e===`system`?A().matches:e===`dark`,M=[];function N(e){try{let t=JSON.parse(e??`[]`);return Array.isArray(t)?t.filter(e=>typeof e==`string`):M}catch{return M}}function P(e){let t=document.createElement(`style`);t.textContent=`*,*::before,*::after{transition:none!important}`,document.head.appendChild(t),e(),getComputedStyle(document.body),setTimeout(()=>t.remove(),1)}function F({themes:e,storageKey:t,children:n}){let r=v.useSyncExternalStore(T,D,k),i=v.useSyncExternalStore(T,O,k),a=v.useCallback(n=>{let r=e.find(e=>e.name===n);if(r){P(()=>{document.documentElement.dataset.theme=r.name,document.documentElement.classList.toggle(`dark`,j(r.mode))});try{localStorage.setItem(t,r.name)}catch{}E()}},[e,t]),o=`${t}.favorites`,s=v.useSyncExternalStore(T,()=>{try{return localStorage.getItem(o)}catch{return null}},()=>null),c=v.useMemo(()=>N(s),[s]),l=v.useCallback(e=>{let t=c.includes(e)?c.filter(t=>t!==e):[...c,e];try{localStorage.setItem(o,JSON.stringify(t))}catch{return}E()},[c,o]),u=e.find(e=>e.name===r)?.mode;v.useEffect(()=>{if(u!==`system`)return;let e=A(),t=()=>{document.documentElement.classList.toggle(`dark`,e.matches),E()};return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[u]),v.useEffect(()=>{let e=getComputedStyle(document.documentElement).getPropertyValue(`--background`).trim();e&&document.querySelector(`meta[name="theme-color"]`)?.setAttribute(`content`,e)},[r,i]);let d=v.useMemo(()=>({theme:r,resolvedMode:i,themes:e,setTheme:a,favorites:c,toggleFavorite:l}),[r,i,e,a,c,l]);return(0,S.jsx)(C,{value:d,children:n})}function I(){let e=v.useContext(C);if(!e)throw Error(`useTheme must be used inside <ThemeProvider>`);return e}function L(e){return e instanceof HTMLElement?e.isContentEditable||e.tagName===`INPUT`||e.tagName===`TEXTAREA`||e.tagName===`SELECT`||e.closest(`[role="listbox"], [role="combobox"], [role="dialog"]`)!==null:!1}var R=l(h(),1),z=750;function B(e,t,n){if(n||!t||!(`startViewTransition`in document))return e();let r=document.documentElement;r.classList.add(`theme-reveal`);let i=document.startViewTransition(()=>(0,R.flushSync)(e)),{x:a,y:o}=t,s=Math.hypot(Math.max(a,innerWidth-a),Math.max(o,innerHeight-o));i.ready.then(()=>r.animate({clipPath:[`circle(0px at ${a}px ${o}px)`,`circle(${s}px at ${a}px ${o}px)`]},{duration:z,easing:`cubic-bezier(0.65, 0, 0.35, 1)`,pseudoElement:`::view-transition-new(root)`})).catch(()=>{}),i.finished.finally(()=>r.classList.remove(`theme-reveal`))}var V={};function H(e,t){let n=v.useRef(V);return n.current===V&&(n.current=e(t)),n}var U=[],ee=void 0;function te(){return ee}function ne(e){U.push(e)}function W(e){let t=(t,n)=>{let r=H(ie).current,i;try{ee=r;for(let e of U)e.before(r);i=e(t,n);for(let e of U)e.after(r);r.didInitialize=!0}finally{ee=void 0}return i};return t.displayName=e.displayName||e.name,t}function re(e){return v.forwardRef(W(e))}function ie(){return{didInitialize:!1}}function ae(){}var G=Object.freeze([]),K=Object.freeze({}),q=typeof document<`u`?v.useLayoutEffect:()=>{};function oe(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var J=oe(`https://base-ui.com/production-error`,`Base UI`),se=v.createContext(void 0);function ce(e){let t=v.useContext(se);if(t===void 0&&!e)throw Error(J(72));return t}function le(e){v.useEffect(e,G)}var ue=0,de=class e{static create(){return new e}currentId=ue;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=ue,t()},e)}isStarted(){return this.currentId!==ue}clear=()=>{this.currentId!==ue&&(clearTimeout(this.currentId),this.currentId=ue)};disposeEffect=()=>this.clear};function fe(){let e=H(de.create).current;return le(e.disposeEffect),e}function pe(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:me,platform:he,maxTouchPoints:ge}=pe(),_e=me.toLowerCase(),ve=he.toLowerCase(),ye=/^i(os$|p)/.test(ve)||ve===`macintel`&&ge>1,be=`android`,xe=ve===be||_e.includes(be),Se=!ye&&ve.startsWith(`mac`);ve.startsWith(`win`),!xe&&/^(linux|chrome os)/.test(ve);var Ce=Se||ye,we=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`),Te=!we&&_e.includes(`firefox`);!we&&_e.includes(`chrom`);var Ee=Ce,De=/jsdom|happydom/.test(_e);function Oe(e){e.preventDefault(),e.stopPropagation()}function ke(e){return`nativeEvent`in e}function Ae(e){return e.pointerType===``&&e.isTrusted?!0:xe&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function je(e){return De?!1:!xe&&e.width===0&&e.height===0||e.type===`pointerdown`&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`&&(xe||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function Me(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function Ne(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}function Pe(){return typeof window<`u`}function Fe(e){return Re(e)?(e.nodeName||``).toLowerCase():`#document`}function Ie(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Le(e){return((Re(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Re(e){return Pe()?e instanceof Node||e instanceof Ie(e).Node:!1}function ze(e){return Pe()?e instanceof Element||e instanceof Ie(e).Element:!1}function Be(e){return Pe()?e instanceof HTMLElement||e instanceof Ie(e).HTMLElement:!1}function Ve(e){return!Pe()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Ie(e).ShadowRoot}function He(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=$e(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Ue(e){return/^(table|td|th)$/.test(Fe(e))}function We(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Ge=/transform|translate|scale|rotate|perspective|filter/,Ke=/paint|layout|strict|content/,qe=e=>!!e&&e!==`none`,Je;function Ye(e){let t=ze(e)?$e(e):e;return qe(t.transform)||qe(t.translate)||qe(t.scale)||qe(t.rotate)||qe(t.perspective)||!Ze()&&(qe(t.backdropFilter)||qe(t.filter))||Ge.test(t.willChange||``)||Ke.test(t.contain||``)}function Xe(e){let t=tt(e);for(;Be(t)&&!Qe(t);){if(Ye(t))return t;if(We(t))return null;t=tt(t)}return null}function Ze(){return Je??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Je}function Qe(e){return/^(html|body|#document)$/.test(Fe(e))}function $e(e){return Ie(e).getComputedStyle(e)}function et(e){return ze(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tt(e){if(Fe(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Ve(e)&&e.host||Le(e);return Ve(t)?t.host:t}function nt(e){let t=tt(e);return Qe(t)?(e.ownerDocument||e).body:Be(t)&&He(t)?t:nt(t)}function rt(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=nt(e),i=r===e.ownerDocument?.body,a=Ie(r);if(i){let e=it(a);return t.concat(a,a.visualViewport||[],He(r)?r:[],e&&n?rt(e):[])}return t.concat(r,rt(r,[],n))}function it(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function at(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function ot(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Ve(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function st(e,t){let n=e;for(;n;){if(ze(n)&&n.matches(t))return n;n=n.assignedSlot??n.parentNode??(Ve(n)?n.host:null)}return null}function ct(e){return`composedPath`in e?e.composedPath()[0]??e.target:e.target}var lt=`data-base-ui-focusable`,ut=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,dt=`ArrowLeft`,ft=`ArrowRight`,pt=`ArrowUp`,mt=`ArrowDown`,ht=`data-starting-style`,gt=`data-ending-style`,_t={[ht]:``},vt={[gt]:``},yt={transitionStatus(e){return e===`starting`?_t:e===`ending`?vt:null}},bt=`data-open`,xt=`data-closed`,St=`data-anchor-hidden`,Ct=`data-popup-open`,wt=`data-pressed`,Tt={[Ct]:``},Et={[Ct]:``,[wt]:``},Dt={[bt]:``},Ot={[xt]:``},kt={[St]:``},At={open(e){return e?Tt:null}},jt={open(e){return e?Et:null}},Mt={open(e){return e?Dt:Ot},anchorHidden(e){return e?kt:null}},Nt={...Mt,...yt},Pt=`data-trigger-disabled`;function Ft(e,t){if(!ze(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(Pt);for(let[,e]of t.entries())if(ot(e,n))return!e.hasAttribute(Pt);return!1}function It(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function Lt(e){return e.matches(`html,body`)}function Rt(e){return Be(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function zt(e){return st(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${ut}`)!=null}function Bt(e){return e?e.getAttribute(`role`)===`combobox`&&Rt(e):!1}function Vt(e){if(!e||De)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function Ht(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function Ut(e,t){return t!=null&&!Me(t)?0:typeof e==`function`?e():e}function Wt(e,t,n){let r=Ut(e,n);return typeof r==`number`?r:r?.[t]}function Gt(e){return typeof e==`function`?e():e}function Kt(e,t){return t||e===`click`||e===`mousedown`}function qt(e){return e?.includes(`mouse`)&&e!==`mousedown`}function Jt(e,t,n,r){let i=!1,a=!1,o=r??K;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}function Yt(e,t,n){let r=n??K;return{reason:e,event:t??new Event(`base-ui`),...r}}var Xt=`none`,Zt=`trigger-press`,Qt=`trigger-hover`,$t=`trigger-focus`,en=`outside-press`,tn=`item-press`,nn=`close-press`,rn=`clear-press`,an=`input-change`,on=`input-clear`,sn=`input-press`,cn=`focus-out`,ln=`escape-key`,un=`list-navigation`,dn=`keyboard`,fn=`pointer`,pn=`cancel-open`,mn=`sibling-open`,hn=`disabled`,gn=`missing`,_n=`initial`,vn=`imperative-action`,yn=`window-resize`,bn=v.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new de,currentIdRef:{current:null},currentContextRef:{current:null}});function xn(e,t){e.current=t.current}function Sn(e){let{children:t,delay:n,timeoutMs:r=0}=e,i=v.useRef(n),a=v.useRef(n),o=v.useRef(null),s=v.useRef(null),c=fe();return q(()=>{a.current=n,o.current?i.current={open:Wt(i.current,`open`),close:Wt(n,`close`)}:i.current=n},[n,o,i,a]),(0,S.jsx)(bn.Provider,{value:v.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:a,currentIdRef:o,timeoutMs:r,currentContextRef:s,timeout:c}),[r,c]),children:t})}function Cn(e,t={open:!1}){let{open:n}=t,r=e.useState(`floatingId`),{currentIdRef:i,delayRef:a,timeoutMs:o,initialDelayRef:s,currentContextRef:c,hasProvider:l,timeout:u}=v.useContext(bn),[d,f]=v.useState(!1),p=v.useRef(n);return q(()=>{p.current=n},[n]),q(()=>{function t(){c.current?.setIsInstantPhase(!1),i.current=null,c.current=null,a.current=s.current,u.clear()}if(i.current&&!n&&i.current===r){if(f(!1),o){let n=r;return u.start(o,()=>{e.select(`open`)||i.current&&i.current!==n||t()}),()=>{(p.current||i.current!==n)&&u.clear()}}t()}},[n,r,i,a,o,s,c,u,e]),q(()=>{if(!n)return;let t=c.current,o=i.current;u.clear(),c.current={onOpenChange:e.setOpen,setIsInstantPhase:f},i.current=r,a.current={open:0,close:Wt(s.current,`close`)},o!==null&&o!==r?(f(!0),t?.setIsInstantPhase(!0),t?.onOpenChange(!1,Jt(Xt))):(f(!1),t?.setIsInstantPhase(!1))},[n,r,e,i,a,s,c,u]),q(()=>()=>{if(i.current===r){if(c.current=null,!p.current)return;i.current=null,xn(a,s),u.clear()}},[c,i,a,r,s,u]),v.useMemo(()=>({activeIdRef:i,hasProvider:l,delayRef:a,isInstantPhase:d}),[i,l,a,d])}function wn(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Tn(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function En(e,t,n,r){let i=H(On).current;return kn(i,e,t,n,r)&&jn(i,[e,t,n,r]),i.callback}function Dn(e){let t=H(On).current;return An(t,e)&&jn(t,e),t.callback}function On(){return{callback:null,cleanup:null,refs:[]}}function kn(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function An(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function jn(e,t){e.refs=t,e.callback=t.every(e=>e==null)?null:n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null}}}}}}function Mn(e){let t=H(Nn,e).current;return t.next=e,q(t.effect),t}function Nn(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var Pn={...v},Fn=Pn.useInsertionEffect,In=Fn&&Fn!==Pn.useLayoutEffect?Fn:e=>e();function Y(e){let t=H(Ln).current;return t.next=e,In(t.effect),t.trampoline}function Ln(){let e={next:void 0,callback:Rn,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Rn(){}var zn=null;globalThis.requestAnimationFrame;var Bn=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||this.callbacks[t]!==null&&(this.callbacks[t]=null,--this.callbacksCount)}},Vn=class e{static create(){return new e}static request(e){return Bn.request(e)}static cancel(e){return Bn.cancel(e)}currentId=zn;request(e){this.cancel(),this.currentId=Bn.request(()=>{this.currentId=zn,e()})}cancel=()=>{this.currentId!==zn&&(Bn.cancel(this.currentId),this.currentId=zn)};disposeEffect=()=>this.cancel};function Hn(){let e=H(Vn.create).current;return le(e.disposeEffect),e}function Un(e){return e?.ownerDocument||document}var Wn={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},Gn={...Wn,position:`fixed`,margin:0,top:0,left:0},Kn={...Wn,position:`absolute`},qn=v.forwardRef(function(e,t){let[n,r]=v.useState();q(()=>{Ee&&we&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,S.jsx)(`span`,{...e,ref:t,style:Gn,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})}),Jn=Math.min,Yn=Math.max,Xn=Math.round,Zn=Math.floor,Qn=e=>({x:e,y:e}),$n={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function er(e,t,n){return Yn(e,Jn(t,n))}function tr(e,t){return typeof e==`function`?e(t):e}function nr(e){return e.split(`-`)[0]}function rr(e){return e.split(`-`)[1]}function ir(e){return e===`x`?`y`:`x`}function ar(e){return e===`y`?`height`:`width`}function or(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function sr(e){return ir(or(e))}function cr(e,t,n){n===void 0&&(n=!1);let r=rr(e),i=sr(e),a=ar(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=_r(o)),[o,_r(o)]}function lr(e){let t=_r(e);return[ur(e),t,ur(t)]}function ur(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var dr=[`left`,`right`],fr=[`right`,`left`],pr=[`top`,`bottom`],mr=[`bottom`,`top`];function hr(e,t,n){switch(e){case`top`:case`bottom`:return n?t?fr:dr:t?dr:fr;case`left`:case`right`:return t?pr:mr;default:return[]}}function gr(e,t,n,r){let i=rr(e),a=hr(nr(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(ur)))),a}function _r(e){let t=nr(e);return $n[t]+e.slice(t.length)}function vr(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function yr(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:vr(e)}function br(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 xr(e,t,n){return Math.floor(e/t)!==n}function Sr(e,t){return t<0||t>=e.length}function Cr(e,t){return Er(e.current,{disabledIndices:t})}function wr(e,t){return Er(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Tr(e,t,n){let{decrement:r,loopFocus:i,allowEscape:a,disabledIndices:o,minIndex:s,maxIndex:c}=n,l=()=>Er(e,{startingIndex:t,decrement:r,disabledIndices:o}),u,d=!1;if(!i)u=r?Math.max(s,l()):Math.min(c,l());else if(r?t<=s:t>=c){let n=r?-1:e.length;a&&t!==n?u=-1:(u=r?c:s,d=!0)}else u=l();return{index:Sr(e,u)?-1:u,wrapped:d}}function Er(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&Or(e,a,r));return a}function Dr(e,{event:t,orientation:n,loopFocus:r,onLoop:i,rtl:a,cols:o,disabledIndices:s,minIndex:c,maxIndex:l,prevIndex:u,stopEvent:d=!1}){let f=u,p;if(t.key===`ArrowUp`?p=`up`:t.key===`ArrowDown`&&(p=`down`),p){let n=[],a=[],m=!1,h=0;{let t=null,r=-1;e.forEach((e,i)=>{if(e==null)return;h+=1;let o=st(e,`[role="row"]`);o&&(m=!0),(o!==t||r===-1)&&(t=o,r+=1,n[r]=[]),n[r].push(i),a[i]=r})}let g=!1,_=0;if(m)for(let e of n){let t=e.length;t>_&&(_=t),t!==o&&(g=!0)}let v=g&&h<e.length,y=_||o,b=o=>{if(!g||u===-1)return;let c=a[u];if(c==null)return;let l=n[c].indexOf(u),d=o===`up`?-1:1;for(let o=c+d,f=0;f<n.length;f+=1,o+=d){if(o<0||o>=n.length){if(!r||v)return;if(o=o<0?n.length-1:0,i){let e=Math.min(l,n[o].length-1),r=i(t,u,n[o][e]??n[o][0]);o=a[r]??o}}let c=n[o];for(let t=Math.min(l,c.length-1);t>=0;--t){let n=c[t];if(!Or(e,n,s))return n}}},x=t=>{if(!v||u===-1)return;let n=u%y,i=t===`up`?-y:y,a=l-l%y,o=Zn(l/y)+1;for(let t=u-n+i,c=0;c<o;c+=1,t+=i){if(t<0||t>l){if(!r)return;t=t<0?a:0}let i=Math.min(t+y-1,l);for(let r=Math.min(t+n,i);r>=t;--r)if(!Or(e,r,s))return r}};d&&Oe(t);let S=b(p)??x(p);if(S!==void 0)f=S;else if(u===-1)f=p===`up`?l:c;else if(f=Er(e,{startingIndex:u,amount:y,decrement:p===`up`,disabledIndices:s}),r){if(p===`up`&&(u-y<c||f<0)){let e=u%y,n=l%y,r=l-(n-e);f=n===e?l:n>e?r:r-y,i&&(f=i(t,u,f))}p===`down`&&u+y>l&&(f=Er(e,{startingIndex:u%y-y,amount:y,disabledIndices:s}),i&&(f=i(t,u,f)))}Sr(e,f)&&(f=u)}if(n===`both`){let n=Zn(u/o);t.key===(a?`ArrowLeft`:`ArrowRight`)&&(d&&Oe(t),u%o===o-1?r&&(f=Er(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):(f=Er(e,{startingIndex:u,disabledIndices:s}),r&&xr(f,o,n)&&(f=Er(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f)))),xr(f,o,n)&&(f=u)),t.key===(a?`ArrowRight`:`ArrowLeft`)&&(d&&Oe(t),u%o===0?r&&(f=Er(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f))):(f=Er(e,{startingIndex:u,decrement:!0,disabledIndices:s}),r&&xr(f,o,n)&&(f=Er(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f)))),xr(f,o,n)&&(f=u));let c=Zn(l/o)===n;Sr(e,f)&&(r&&c?(f=t.key===(a?`ArrowRight`:`ArrowLeft`)?l:Er(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):f=u)}return f}function Or(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?!Ar(r)||r.matches(`:disabled`)?!0:!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!1}function kr(e){return e.visibility===`hidden`||e.visibility===`collapse`}function Ar(e,t=e?$e(e):null){return!e||!e.isConnected||!t||kr(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var jr=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function Mr(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return Ve(n)?n.host:null}function Nr(e){for(let t of Array.from(e.children))if(Fe(t)===`summary`)return t;return null}function Pr(e,t){let n=Nr(t);return!!n&&(e===n||ot(n,e))}function Fr(e){let t=e?Fe(e):``;return e!=null&&e.matches(jr)&&(t!==`summary`||e.parentElement!=null&&Fe(e.parentElement)===`details`&&Nr(e.parentElement)===e)&&(t!==`details`||Nr(e)==null)&&(t!==`input`||e.type!==`hidden`)}function Ir(e){if(!Fr(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=Mr(t)){let n=t!==e,r=Fe(t)===`slot`;if(t.hasAttribute(`inert`)||n&&Fe(t)===`details`&&!t.open&&!Pr(e,t)||t.hasAttribute(`hidden`)||!r&&!Lr(t,n))return!1}return!0}function Lr(e,t){let n=$e(e);return t?n.display!==`none`:Ar(e,n)}function Rr(e){let t=e.tabIndex;if(t<0){let t=Fe(e);if(t===`details`||t===`audio`||t===`video`||Be(e)&&e.isContentEditable)return 0}return t}function zr(e){if(Fe(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function Br(e,t){let n=zr(e);if(!n)return!0;let r=t.find(e=>{let t=zr(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=zr(e);return t?.name===n.name&&t.form===n.form})===n}function Vr(e){if(Be(e)&&Fe(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return Be(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Hr(e,t){Vr(e).forEach(e=>{Fr(e)&&t.push(e),Hr(e,t)})}function Ur(e,t,n){Vr(e).forEach(e=>{Be(e)&&e.matches(t)&&n.push(e),Ur(e,t,n)})}function Wr(e){return Ir(e)&&Rr(e)>=0}function Gr(e){let t=[];return Hr(e,t),t.filter(Ir)}function Kr(e){let t=Gr(e);return t.filter(e=>Rr(e)>=0&&Br(e,t))}function qr(e,t){let n=Kr(e),r=n.length;if(r===0)return;let i=at(Un(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function Jr(e){return qr(Un(e).body,1)||e}function Yr(e){return qr(Un(e).body,-1)||e}function Xr(e,t,n){if(!e)return null;let r=[];Hr(Un(e).body,r);let i=r.indexOf(e);if(i===-1)return null;let a=r.filter(Ir);for(let e=1;e<r.length;e+=1){let o=r[(i+t*e+r.length)%r.length];if(!ot(n,o)&&Wr(o)&&Br(o,a))return o}return r[i]}function Zr(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!ot(n,r)}function Qr(e){Kr(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function $r(e){let t=[];Ur(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function ei(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...ei(e,t.id,n)])}function ti(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function ni(e){return`data-base-ui-${e}`}var ri=0;function ii(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(ri);function a(){(!i||i())&&e?.focus({preventScroll:n})}if(r)return a(),ae;let o=requestAnimationFrame(a);return ri=o,()=>{ri===o&&(cancelAnimationFrame(o),ri=0)}}var ai=`data-base-ui-inert`,oi=new WeakMap,si=new WeakSet,ci=new WeakMap,li=0;function ui(e){return e?Ve(e)?e.host:ui(e.parentNode):null}var di=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=ui(t);return e.contains(n)?n:null}).filter(e=>e!=null),fi=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},pi=(e,t,n)=>{let r=[],i=e=>{e&&!n.has(e)&&Array.from(e.children).forEach(e=>{Fe(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function mi(e,t,n,{mark:r=!0}){let i=di(t,e),a=r?pi(t,fi(i),new Set(i)):[],o=[],s=[];if(n){let e=di(t,Array.from(t.querySelectorAll(`[aria-live]`))),n=i.concat(e);pi(t,fi(n),new Set(n)).forEach(e=>{let t=e.getAttribute(`aria-hidden`),n=t!==null&&t!==`false`,r=(oi.get(e)||0)+1;oi.set(e,r),o.push(e),r===1&&n&&si.add(e),n||e.setAttribute(`aria-hidden`,`true`)})}return r&&a.forEach(e=>{let t=(ci.get(e)||0)+1;ci.set(e,t),s.push(e),t===1&&e.setAttribute(ai,``)}),li+=1,()=>{o.forEach(e=>{let t=(oi.get(e)||0)-1;oi.set(e,t),t||(si.has(e)||e.removeAttribute(`aria-hidden`),si.delete(e))}),r&&s.forEach(e=>{let t=(ci.get(e)||0)-1;ci.set(e,t),t||e.removeAttribute(ai)}),--li,li||(oi=new WeakMap,si=new WeakSet,ci=new WeakMap)}}function hi(e,t={}){let{ariaHidden:n=!1,mark:r=!0}=t,i=Un(e[0]).body;return mi(e,i,n,{mark:r})}function gi(){let[,e]=v.useState({});return v.useCallback(()=>{e({})},[])}var _i=0;function vi(e,t=`mui`){let n=v.useRef(void 0),r=gi(),i=e??n.current;return v.useEffect(()=>{n.current??(_i+=1,n.current=`${t}-${_i}`,e??r())},[e,t,r]),i}var yi=Pn.useId;function bi(e,t){if(yi!==void 0){let n=yi();return e??(t?`${t}-${n}`:n)}return vi(e,t)}var xi=19;function Si(e){return xi>=e}function Ci(e){if(!v.isValidElement(e))return null;let t=e,n=t.props;return(Si(19)?n?.ref:t.ref)??null}function wi(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Ti(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e)}else i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function Ei(e,t){return typeof e==`function`?e(t):e}function Di(e,t){return typeof e==`function`?e(t):e}var Oi={};function ki(e,t,n,r,i){if(!n&&!r&&!i&&!e)return ji(t);let a=ji(e);return t&&(a=Mi(a,t)),n&&(a=Mi(a,n)),r&&(a=Mi(a,r)),i&&(a=Mi(a,i)),a}function Ai(e){if(e.length===0)return Oi;if(e.length===1)return ji(e[0]);let t=ji(e[0]);for(let n=1;n<e.length;n+=1)t=Mi(t,e[n]);return t}function ji(e){return Ii(e)?{...e(Oi)}:Ni(e)}function Mi(e,t){return Ii(t)?t(e):Pi(e,t)}function Ni(e){let t={...e};for(let e in t){let n=t[e];Fi(e,n)&&(t[e]=Ri(n))}return t}function Pi(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=wi(e.style,r);break;case`className`:e[n]=Bi(e.className,r);break;default:e[n]=Fi(n,r)?Li(e[n],r):r}}return e}function Fi(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function Ii(e){return typeof e==`function`}function Li(e,t){return t?e?(...n)=>{let r=n[0];if(Vi(r)){let i=r;zi(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:Ri(t):e}function Ri(e){return e&&((...t)=>{let n=t[0];return Vi(n)&&zi(n),e(...t)})}function zi(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Bi(e,t){return t?e?t+` `+e:t:e}function Vi(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function Hi(e,t,n={}){let r=t.render;n.enabled!==!1&&(r=Ki(r));let i=Ui(t,n,r);if(n.enabled===!1)return null;let a=n.state??K;return qi(e,r,i,a)}function Ui(e,t,n){let{className:r,style:i}=e,{state:a=K,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?Ei(r,a):void 0,d=l?Di(i,a):void 0,f=l?Ti(a,c):K,p=l&&s?Wi(s):void 0,m=l?wi(f,p)??{}:K;return typeof document<`u`&&(l?m.ref=Array.isArray(o)?Dn([m.ref,Ci(n),...o]):En(m.ref,Ci(n),o):En(null,null)),l?(u!==void 0&&(m.className=Bi(m.className,u)),d!==void 0&&(m.style=wi(m.style,d)),m):K}function Wi(e){return Array.isArray(e)?Ai(e):ki(void 0,e)}var Gi=Symbol.for(`react.lazy`);function Ki(e){if(e?.$$typeof!==Gi)return e;let t=v.Children.toArray(e)[0];return v.isValidElement(t)?t:e}function qi(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=ki(n,t.props);return e.ref=n.ref,v.cloneElement(t,e)}return Ji(e,n)}function Ji(e,t){return e===`button`?(0,v.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,v.createElement)(`img`,{alt:``,...t,key:t.key}):v.createElement(e,t)}var Yi={style:{transition:`none`}},Xi=`data-base-ui-click-trigger`,Zi={fallbackAxisSide:`none`},Qi={fallbackAxisSide:`end`},$i={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},ea=v.createContext(null),ta=()=>v.useContext(ea),na=ni(`portal`);function ra(e={}){let{ref:t,container:n,componentProps:r=K,elementProps:i}=e,a=bi(),o=ta()?.portalNode,[s,c]=v.useState(null),[l,u]=v.useState(null),d=Y(e=>{e!==null&&u(e)}),f=v.useRef(null);q(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}let e=(n&&(Re(n)?n:n.current))??o??document.body;e==null?f.current&&(f.current=null,u(null),c(null)):f.current!==e&&(f.current=e,u(null),c(e))},[n,o]);let p=Hi(`div`,r,{ref:[t,d],props:[{id:a,[na]:``},i]}),m=s&&p?R.createPortal(p,s):null;return{node:l,nodeId:v.isValidElement(p)?p.props.id:void 0,subtree:m}}var ia=v.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,portalOwnerRole:s,...c}=e,{node:l,nodeId:u,subtree:d}=ra({container:o,ref:t,componentProps:e,elementProps:c}),f=v.useRef(null),p=v.useRef(null),m=v.useRef(null),h=v.useRef(null),[g,_]=v.useState(null),y=v.useRef(!1),b=g?.modal,x=g?.open,C=!!g&&!g.modal&&g.open&&!!l;v.useEffect(()=>{if(!l||b)return;function e(e){l&&e.relatedTarget&&Zr(e)&&(e.type===`focusin`?y.current&&=($r(l),!1):(Qr(l),y.current=!0))}return Tn(wn(l,`focusin`,e,!0),wn(l,`focusout`,e,!0))},[l,b]),q(()=>{l&&x===!0&&y.current&&($r(l),y.current=!1)},[x,l]);let w=v.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:h,portalNode:l,setFocusManagerState:_}),[l]);return(0,S.jsxs)(v.Fragment,{children:[d,(0,S.jsxs)(ea.Provider,{value:w,children:[C&&l&&(0,S.jsx)(qn,{"data-type":`outside`,ref:f,onFocus:e=>{Zr(e,l)?m.current?.focus():Yr(g?g.domReference:null)?.focus()}}),C&&l&&(0,S.jsx)(`span`,{role:s,"aria-owns":u,style:$i}),l&&R.createPortal(a,l),C&&l&&(0,S.jsx)(qn,{"data-type":`outside`,ref:p,onFocus:e=>{Zr(e,l)?h.current?.focus():(Jr(g?g.domReference:null)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,Jt(`focus-out`,e.nativeEvent)))}})]})]})});function aa(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var oa=class{nodesRef={current:[]};events=aa();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},sa=v.createContext(null),ca=v.createContext(null),la=()=>v.useContext(sa)?.id||null,ua=e=>{let t=v.useContext(ca);return e??t};function da(e){let t=bi(),n=ua(e),r=la();return q(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function fa(e){let{children:t,id:n}=e,r=la();return(0,S.jsx)(sa.Provider,{value:v.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function pa(e){let{children:t,externalTree:n}=e,r=H(()=>n??new oa).current;return(0,S.jsx)(ca.Provider,{value:r,children:t})}function ma(e){return e==null?e:`current`in e?e.current:e}function ha(e,t){let n=Ie(ct(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||(Ae(e)?`keyboard`:t||`mouse`):`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var ga=20,_a=[];function va(){_a=_a.filter(e=>e.deref()?.isConnected)}function ya(e){va(),e&&Fe(e)!==`body`&&(_a.push(new WeakRef(e)),_a.length>ga&&(_a=_a.slice(-20)))}function ba(){return va(),_a[_a.length-1]?.deref()}function xa(e){return e?Wr(e)?e:Kr(e)[0]||e:null}function Sa(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=Gr(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return Wr(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function Ca(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,explicitReturnFocus:o,restoreFocus:s=!1,modal:c=!0,closeOnFocusOut:l=!0,openInteractionType:u=``,nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:p,externalTree:m,getInsideElements:h}=e,g=t.useState(`open`),_=t.useState(`domReferenceElement`),y=t.useState(`floatingElement`),{events:b,dataRef:x}=t.context,C=Y(()=>x.current.floatingContext?.nodeId),w=i===!1,T=Bt(_)&&w,E=Mn(i),D=Mn(a),O=Mn(o),k=Mn(u),A=Mn(g),j=ua(m),M=ta(),N=v.useRef(!1),P=v.useRef(!1),F=v.useRef(!1),I=v.useRef(null),L=v.useRef(``),R=v.useRef(``),z=v.useRef(null),B=v.useRef(null),V=En(z,p,M?.beforeInsideRef),H=En(B,M?.afterInsideRef),U=fe(),ee=fe(),te=Hn(),ne=M!=null,W=Ht(y),re=Y((e=W)=>e?Kr(e):[]),ie=Y(()=>h?.().filter(e=>e!=null)??[]);v.useEffect(()=>{if(r||!c)return;function e(e){e.key===`Tab`&&ot(W,at(Un(W)))&&re().length===0&&!T&&Oe(e)}return wn(Un(W),`keydown`,e)},[r,W,c,T,re]),v.useEffect(()=>{if(r||!g)return;let e=Un(W);function t(){F.current=!1}function n(e){let t=ct(e),n=ie(),r=ot(y,t)||ot(_,t)||ot(M?.portalNode,t)||n.some(e=>e===t||ot(e,t));F.current=!r,R.current=e.pointerType||`keyboard`,st(t,`[data-base-ui-click-trigger]`)&&(P.current=!0,ee.start(0,()=>{P.current=!1}))}function i(){R.current=`keyboard`}return Tn(wn(e,`pointerdown`,n,!0),wn(e,`pointerup`,t,!0),wn(e,`pointercancel`,t,!0),wn(e,`keydown`,i,!0),t)},[r,y,_,W,g,M,ee,ie]),v.useEffect(()=>{if(r||!l)return;let e=Un(W);function n(){P.current=!0,ee.start(0,()=>{P.current=!1})}function i(e){let t=ct(e);Wr(t)&&(I.current=t)}function a(n){let r=n.relatedTarget,i=n.currentTarget,a=ct(n);c&&r==null&&a!=null&&ot(y,a)&&ya(a),queueMicrotask(()=>{let o=C(),l=t.context.triggerElements,u=ie(),p=r?.hasAttribute(ni(`focus-guard`))&&[z.current,B.current,M?.beforeInsideRef.current,M?.afterInsideRef.current,M?.beforeOutsideRef.current,M?.afterOutsideRef.current,ma(f),ma(d)].includes(r),m=!(ot(_,r)||ot(y,r)||ot(r,y)||ot(M?.portalNode,r)||u.some(e=>e===r||ot(e,r))||l.hasMatchingElement(e=>ot(e,r))||p||j&&(ei(j.nodesRef.current,o).find(e=>ot(e.context?.elements.floating,r)||ot(e.context?.elements.domReference,r))||ti(j.nodesRef.current,o).find(e=>[e.context?.elements.floating,Ht(e.context?.elements.floating)].includes(r)||e.context?.elements.domReference===r)));if(i===_&&W&&Sa(W),s&&i!==_&&!Ar(a)&&at(e)===e.body){if(Be(W)&&(W.focus(),s===`popup`)){te.request(()=>{W.focus()});return}let e=re(),t=I.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||W;Be(n)&&n.focus()}x.current.insideReactTree?x.current.insideReactTree=!1:(T||!c)&&r&&m&&!P.current&&(T||r!==ba())&&(N.current=!0,t.setOpen(!1,Jt(cn,n)))})}function o(){F.current||(x.current.insideReactTree=!0,U.start(0,()=>{x.current.insideReactTree=!1}))}let u=Be(_)?_:null;if(y||u)return Tn(u&&wn(u,`focusout`,a),u&&wn(u,`pointerdown`,n),y&&wn(y,`focusin`,i),y&&wn(y,`focusout`,a),y&&M&&wn(y,`focusout`,o,!0))},[r,_,y,W,c,j,M,t,l,s,re,T,C,x,U,ee,te,d,f,ie]),v.useEffect(()=>{if(r||!y||!g)return;let e=Array.from(M?.portalNode?.querySelectorAll(`[${ni(`portal`)}]`)||[]),t=(j?ti(j.nodesRef.current,C()):[]).find(e=>Bt(e.context?.elements.domReference||null))?.context?.elements.domReference,n=hi([y,...e,z.current,B.current,M?.beforeOutsideRef.current,M?.afterOutsideRef.current,...ie(),t,ma(f),ma(d),T?_:null].filter(e=>e!=null),{ariaHidden:c||T,mark:!1}),i=hi([y,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,y,c,M,T,j,C,d,f,ie]),q(()=>{if(!g||r||!Be(W))return;L.current=``,R.current=``;let e=Un(W),t=at(e);queueMicrotask(()=>{let n=E.current,r=typeof n==`function`?n(k.current||``):n;if(r===void 0||r===!1||ot(W,t))return;let i=null,a=()=>(i??=re(W),i[0]||W),o;o=r===!0||r===null?a():ma(r),o||=a();let s=ot(W,at(e)),c=x.current.openEvent,l=c?.type===`mousedown`&&Ae(c);ii(o,{sync:l,preventScroll:o===W,shouldFocus(){if(!A.current)return!1;if(s)return!0;let t=at(e);return!(t!==o&&ot(W,t))}})})},[r,g,W,re,E,k,A,x]);let ae=v.useRef(null);q(()=>{if(r||!W){ae.current=null;return}ae.current&&=(ae.current.cancelled=!0,null);let e=Un(W),t=at(e),n=k.current==null;ya(t);function i(e){if(e.open||(L.current=ha(e.nativeEvent,R.current)),(e.reason===`focus-out`&&e.triggerElement?.hasAttribute(ni(`focus-guard`))||e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`)&&(N.current=!0),e.reason===`outside-press`){if(e.nested)N.current=!1;else if(Ae(e.nativeEvent)||je(e.nativeEvent))N.current=!1;else{let e=!1;Un(W).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?N.current=!1:N.current=!0}}}b.on(`openchange`,i);function a(e){let r=D.current,i=typeof r==`function`?r(e):r;if(i===void 0||i===!1)return null;i===null&&(i=!0);let a=_?.isConnected?_:null,o=t?.isConnected&&Fe(t)!==`body`?t:null,s=n?o||a:a||o;return s||=ba()||null,typeof i==`boolean`?s:ma(i)||s||null}return()=>{b.off(`openchange`,i);let t=at(e),n=ie(),r=ot(y,t)||n.some(e=>e===t||ot(e,t))||j&&ei(j.nodesRef.current,C(),!1).some(e=>ot(e.context?.elements.floating,t)),o=D.current,s=L.current,c=a(s),l={cancelled:!1};ae.current=l,queueMicrotask(()=>{ae.current===l&&(ae.current=null);let n=xa(c),i=O.current??typeof o!=`boolean`;if(!l.cancelled&&o&&!N.current&&Be(n)&&(i||n===t||t===e.body||r)){let e={preventScroll:!0};s===`keyboard`&&(e.focusVisible=!0),n.focus(e)}N.current=!1})}},[r,y,W,D,O,k,b,j,_,C,ie]),q(()=>{if(!we||g||!y)return;let e=at(Un(y));Be(e)&&Rt(e)&&ot(y,e)&&e.blur()},[g,y]),q(()=>{if(!r&&M)return M.setFocusManagerState({modal:c,closeOnFocusOut:l,open:g,onOpenChange:t.setOpen,domReference:_}),()=>{M.setFocusManagerState(null)}},[r,M,c,g,t,l,_]),q(()=>{if(!r&&W)return Sa(W),()=>{queueMicrotask(va)}},[r,W]);let G=!r&&(!c||!T)&&(ne||c);return(0,S.jsxs)(v.Fragment,{children:[G&&(0,S.jsx)(qn,{"data-type":`inside`,ref:V,onFocus:e=>{if(c){let e=re();ii(e[e.length-1])}else M?.portalNode&&(N.current=!1,Zr(e,M.portalNode)?Jr(_)?.focus():ma(f??M.beforeOutsideRef)?.focus())}}),n,G&&(0,S.jsx)(qn,{"data-type":`inside`,ref:H,onFocus:e=>{c?ii(re()[0]):M?.portalNode&&(l&&(N.current=!0),Zr(e,M.portalNode)?Yr(_)?.focus():ma(d??M.afterOutsideRef)?.focus())}})]})}function wa(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:c=Zt}=t,l=e.context.dataRef,u=v.useRef(void 0),d=Hn(),f=fe(),p=v.useMemo(()=>{function t(t,n,r,i){let a=Jt(c,n,r);t&&i===`touch`&&s>0?f.start(s,()=>{e.setOpen(!0,a)}):e.setOpen(t,a)}function n(t,n,r){let a=l.current.openEvent,s=e.select(`domReferenceElement`)!==n;return t&&s||!t||!i?!0:a&&(typeof o==`function`?o():o)?!r(a.type):!1}return{onPointerDown(e){u.current=Me(e.pointerType,!0)&&je(e.nativeEvent)?`virtual`:e.pointerType},onMouseDown(i){let o=u.current,s=i.nativeEvent,c=e.select(`open`);if(i.button!==0||r===`click`||Me(o,!0)&&a)return;let l=n(c,i.currentTarget,e=>e===`click`||e===`mousedown`),f=ct(s),p=Rt(f);if(p||o===`virtual`){t(l,s,p?f:i.currentTarget,o);return}let m=i.currentTarget;d.request(()=>{t(l,s,m,o)})},onClick(i){if(r===`mousedown-only`)return;let o=u.current;r===`mousedown`&&o?u.current=void 0:Me(o,!0)&&a||t(n(e.select(`open`),i.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),i.nativeEvent,i.currentTarget,o)},onKeyDown(){u.current=void 0}}},[l,r,a,c,e,o,i,d,f,s]);return v.useMemo(()=>n?{reference:p}:K,[n,p])}function Ta(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},o=t.axis===`x`||t.axis===`both`,s=t.axis===`y`||t.axis===`both`,c=[`mouseenter`,`mousemove`].includes(t.dataRef.current.openEvent?.type||``)&&t.pointerType!==`touch`,l=t.axis===`y`?a.width:0,u=t.axis===`x`?a.height:0,d=a.x,f=a.y;return n==null&&t.x&&o&&(n=a.x-t.x),r==null&&t.y&&s&&(r=a.y-t.y),d-=n||0,f-=r||0,(!i||c)&&(d=o&&t.x!=null?t.x:d,f=s&&t.y!=null?t.y:f),i=!0,{width:l,height:u,x:d,y:f,top:f,right:d+l,bottom:f+u,left:d}}}}function Ea(e){return e!=null&&e.clientX!=null}function Da(e,t={}){let{enabled:n=!0,axis:r=`both`}=t,i=e.useState(`open`),a=e.useState(`floatingElement`),o=e.useState(`domReferenceElement`),s=e.context.dataRef,c=v.useRef(!1),l=v.useRef(null),[u,d]=v.useState(),[f,p]=v.useState([]),m=Y(t=>{e.set(`positionReference`,t)}),h=Y((t,n,i)=>{c.current||(!s.current.openEvent||Ea(s.current.openEvent))&&e.set(`positionReference`,Ta(i??o,{x:t,y:n,axis:r,dataRef:s,pointerType:u}))}),g=Y(e=>{i?l.current||(h(e.clientX,e.clientY,e.currentTarget),p([])):h(e.clientX,e.clientY,e.currentTarget)}),_=Me(u)?a:i;v.useEffect(()=>{if(!n){m(o);return}if(!_)return;function e(){l.current?.(),l.current=null}let t=Ie(a);function r(t){let n=ct(t);ot(a,n)?e():h(t.clientX,t.clientY)}return!s.current.openEvent||Ea(s.current.openEvent)?l.current=wn(t,`mousemove`,r):m(o),e},[_,n,a,s,o,e,h,m,f]),v.useEffect(()=>()=>{e.set(`positionReference`,null)},[e]),v.useEffect(()=>{n&&!a&&(c.current=!1)},[n,a]),v.useEffect(()=>{!n&&i&&(c.current=!0)},[n,i]);let y=v.useMemo(()=>{function e(e){d(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:g,onMouseEnter:g}},[g]);return v.useMemo(()=>n?{reference:y,trigger:y}:{},[n,y])}function Oa(){return!1}function ka(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function Aa(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=Oa,bubbles:s,externalTree:c}=t,l=e.useState(`open`),u=e.useState(`floatingElement`),{dataRef:d,events:f}=e.context,p=ua(c),m=Y(typeof i==`function`?i:()=>!1),h=typeof i==`function`?m:i,g=h!==!1,_=Y(()=>a),{escapeKey:y,outsidePress:b}=ka(s),x=v.useRef(!1),S=v.useRef(!1),C=v.useRef(!1),w=v.useRef(!1),T=v.useRef(!1),E=v.useRef(``),D=v.useRef(null),O=fe(),k=fe(),A=fe(),j=Y(()=>{k.clear(),d.current.insideReactTree=!1}),M=Y(e=>{let t=d.current.floatingContext?.nodeId;return(p?ei(p.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),N=Y(t=>It(t,e.select(`floatingElement`))||It(t,e.select(`domReferenceElement`))),P=Y(t=>{o()&&e.setOpen(!1,Jt(Zt,t.nativeEvent))}),F=Y(t=>{if(!l||!n||!r||t.key!==`Escape`)return;let i=ke(t)?t.nativeEvent:t;if(T.current||i.isComposing||!y&&M(`__escapeKeyBubbles`))return;let a=Jt(ln,i);e.setOpen(!1,a),a.isCanceled||t.preventDefault(),!y&&!a.isPropagationAllowed&&t.stopPropagation()}),I=Y(()=>{d.current.insideReactTree=!0,k.start(0,j)}),L=Y(t=>{if(!l||!n||t.button!==0)return;let r=ct(t.nativeEvent);ot(e.select(`floatingElement`),r)&&(x.current||(x.current=!0,S.current=!1))}),R=Y(e=>{l&&n&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&x.current&&(S.current=!0)});v.useEffect(()=>{function e(e){e.open||(w.current=!1)}return f.on(`openchange`,e),()=>{f.off(`openchange`,e)}},[f]),v.useEffect(()=>j,[j]),v.useEffect(()=>{if(!l||!n)return l||(w.current=!1,T.current=!1,E.current=``,D.current=null),j;d.current.__escapeKeyBubbles=y,d.current.__outsidePressBubbles=b;let t=new de,i=Un(u);function a(){A.clear(),T.current=!0}function o(){T.current=!0,A.start(we?5:0,()=>{T.current=!1})}function s(){C.current=!0,t.start(0,()=>{C.current=!1})}function c(){x.current=!1,S.current=!1}function f(){let e=E.current,t=e===`pen`||!e?`mouse`:e,n=_(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function m(e){let t=f();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function v(e){let t=d.current.floatingContext?.nodeId,n=p&&ei(p.nodesRef.current,t).some(t=>It(e,t.context?.elements.floating));return N(e)||n}function k(n){if(m(n)){n.type!==`click`&&!N(n)&&(t.clear(),C.current=!1),j();return}if(d.current.insideReactTree){j();return}let r=ct(n),i=`[${ni(`inert`)}]`,a=ze(r)?r.getRootNode():null,o=Array.from((Ve(a)?a:Un(e.select(`floatingElement`))).querySelectorAll(i)),s=e.context.triggerElements;if(r&&(s.hasElement(r)||s.hasMatchingElement(e=>ot(e,r))))return;let c=ze(r)?r:null;for(;c&&!Qe(c);){let e=tt(c);if(Qe(e)||!ze(e))break;c=e}if(!(o.length&&ze(r)&&!Lt(r)&&!ot(r,e.select(`floatingElement`))&&o.every(e=>!ot(c,e)))){if(Be(r)&&!(`touches`in n)){let e=Qe(r),t=$e(r),i=/auto|scroll/,a=e||i.test(t.overflowX),o=e||i.test(t.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=t.direction===`rtl`,u=c&&(l?n.offsetX<=r.offsetWidth-r.clientWidth:n.offsetX>r.clientWidth),d=s&&n.offsetY>r.clientHeight;if(u||d)return}if(!v(n)){if(f()===`intentional`){if(n.detail!==0&&!Ae(n)&&!w.current)return;if(C.current){t.clear(),C.current=!1;return}}(typeof h!=`function`||h(n))&&(M(`__outsidePressBubbles`)||(e.setOpen(!1,Jt(en,n)),j()))}}}function P(t){f()===`sloppy`&&t.pointerType!==`touch`&&e.select(`open`)&&n&&!N(t)&&k(t)}function I(t){if(f()!==`sloppy`||!e.select(`open`)||!n||N(t))return;let r=t.touches[0];r&&(D.current={startTime:Date.now(),startX:r.clientX,startY:r.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},O.start(1e3,()=>{D.current&&(D.current.dismissOnTouchEnd=!1,D.current.dismissOnMouseDown=!1)}))}function L(e,t){let n=ct(e);if(!n)return;let r=wn(n,e.type,()=>{t(e),r()})}function R(e){E.current=`touch`,L(e,I)}function z(e){O.clear(),e.type===`pointerdown`&&(e.button===0&&(w.current=!0),E.current=e.pointerType),(e.type!==`mousedown`||!D.current||D.current.dismissOnMouseDown)&&L(e,e=>{e.type===`pointerdown`?P(e):k(e)})}function B(e){if(e.type===`pointercancel`&&(w.current=!1),!x.current)return;let n=S.current;c(),f()===`intentional`&&(e.type===`pointercancel`?n&&s():v(e)||(n?s():(typeof h!=`function`||h(e))&&(t.clear(),C.current=!0,j())))}function V(e){if(f()!==`sloppy`||!D.current||N(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-D.current.startX),r=Math.abs(t.clientY-D.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(D.current.dismissOnTouchEnd=!0),i>10&&(k(e),O.clear(),D.current=null)}function H(e){L(e,V)}function U(e){f()===`sloppy`&&D.current&&!N(e)&&(D.current.dismissOnTouchEnd&&k(e),O.clear(),D.current=null)}function ee(e){L(e,U)}let te=Tn(r&&Tn(wn(i,`keydown`,F),wn(i,`compositionstart`,a),wn(i,`compositionend`,o)),g&&Tn(wn(i,`click`,z,!0),wn(i,`pointerdown`,z,!0),wn(i,`pointerup`,B,!0),wn(i,`pointercancel`,B,!0),wn(i,`mousedown`,z,!0),wn(i,`mouseup`,B,!0),wn(i,`touchstart`,R,{capture:!0,passive:!0}),wn(i,`touchmove`,H,{capture:!0,passive:!0}),wn(i,`touchend`,ee,{capture:!0,passive:!0})));return()=>{te(),t.clear(),c(),C.current=!1}},[d,u,r,g,h,l,n,y,b,F,j,_,M,N,p,e,O,A]);let z=v.useMemo(()=>({onKeyDown:F,onPointerDown:P,onClick:P}),[F,P]),B=v.useMemo(()=>({onKeyDown:F,onPointerDown:R,onMouseDown:R,onClickCapture:I,onMouseDownCapture(e){I(),L(e)},onPointerDownCapture(e){I(),L(e)},onMouseUpCapture:I,onTouchEndCapture:I,onTouchMoveCapture:I}),[F,I,L,R]);return v.useMemo(()=>n?{reference:z,floating:B,trigger:z}:{},[n,z,B])}var ja=class{attachedStores=[];attachedStoreValue=null;storeListeners=new Set;constructor(e,t,n=!0){this.fallbackStore=e,this.componentName=t,this.throwOnMissingTrigger=n}get attachedStore(){return this.attachedStoreValue}get store(){return this.attachedStoreValue??this.fallbackStore}get serverStore(){return this.fallbackStore}subscribeStore(e){return this.storeListeners.add(e),()=>{this.storeListeners.delete(e)}}attachStore(e){return this.attachedStores.push(e),this.setActiveStore(e),()=>{let t=this.attachedStores.lastIndexOf(e);t!==-1&&this.attachedStores.splice(t,1),this.setActiveStore(this.attachedStores[this.attachedStores.length-1]??null)}}setActiveStore(e){this.attachedStoreValue!==e&&(this.attachedStoreValue=e,this.storeListeners.forEach(e=>{e()}))}openByTrigger(e){let t=this.attachedStore;if(t===null)return;let n;if(e){for(let t=this.attachedStores.length-1;t>=0&&!n;--t)n=this.attachedStores[t].context.triggerElements.getById(e);n??=this.fallbackStore.context.triggerElements.getById(e)}if(e&&!n&&this.throwOnMissingTrigger)throw Error(J(99,this.componentName,e,this.componentName));t.setOpen(!0,Jt(vn,void 0,n))}closePopup(){let e=this.attachedStore;e!==null&&e.setOpen(!1,Jt(vn))}};function Ma(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=o;return t.useSyncedValue(`floatingId`,i),q(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};ze(c)&&(e.domReferenceElement=c),r.state.positionReference===r.state.referenceElement&&(e.positionReference=c),r.update(e)},[s,i,c,l,r]),r.context.onOpenChange=u,r.context.nested=a,r}function Na(e,t=!1,n=!1,r=!1){let[i,a]=v.useState(e&&t?`idle`:void 0),[o,s]=v.useState(e&&!r);return e&&!o&&(s(!0),a(`starting`)),!e&&o&&i!==`ending`&&!n&&a(`ending`),!e&&!o&&i===`ending`&&a(void 0),q(()=>{if(!e&&o&&i!==`ending`&&n){let e=Vn.request(()=>{a(`ending`)});return()=>{Vn.cancel(e)}}},[e,o,i,n]),q(()=>{if(!e||t||i===void 0)return;let n=Vn.request(()=>{a(void 0)});return()=>{Vn.cancel(n)}},[t,e,i]),q(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=Vn.request(()=>{a(`idle`)});return()=>{Vn.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}function Pa(e,t){return e.getAnimations(t).filter(e=>{let t=e.effect?.getTiming();return t?.duration!==1/0&&t?.iterations!==1/0})}var Fa=null;function Ia(e){if(!Fa){let e=[];Fa=e,queueMicrotask(()=>{Fa=null,R.flushSync(()=>{for(let t of e)t()})})}Fa.push(e)}function La(e,t=!1,n=!1){let r=Hn();return Y((i,a=null)=>{r.cancel();let o=ma(e);if(o==null)return;let s=o,c=()=>{n?Ia(()=>{a?.aborted||i()}):R.flushSync(i)};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(Pa(s).map(e=>e.finished.then(ae))).then(()=>{a?.aborted||c()},()=>{a?.aborted||(Pa(s).some(e=>e.pending||e.playState!==`finished`)?l():c())})}if(t){let e=ht;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0})}else r.request(l)})}function Ra(e){let{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=Y(a),s=La(r,n,i);v.useEffect(()=>{if(!t)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,n,o,s])}function za(e){let{open:t,ref:n,preventUnmountOnClose:r,setPreventUnmountOnClose:i,onUnmount:a,animateInitialOpen:o}=e,s=Y(i),{mounted:c,setMounted:l,transitionStatus:u}=Na(t,!1,!1,o),d=!t&&r;q(()=>{t&&s(!1)},[t,s]);let f=v.useRef(c),p=v.useRef(!1),m=gi(),h=()=>{f.current=!1,l(!1),a()};q(()=>{f.current=c,p.current&&(p.current=!1,!t&&c&&h())});let g=Y(()=>{f.current&&(t?(p.current=!0,m()):h())});return Ra({enabled:c&&!t&&!d,open:t,ref:n,onComplete(){t||g()}}),{mounted:c,transitionStatus:u,preventUnmountingOnClose:d,forceUnmount:g}}var Ba={tabIndex:-1,[lt]:``};function Va(e){return t=>t!==`touch`||e.current}function Ha(e,t=!1){let n=bi(),r=la()!=null,i=H(()=>e(n,r)).current;return Ma({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function Ua({handle:e,store:t}){return q(()=>e.attachStore(t),[e,t]),null}function Wa(e){let t=e.context.triggerElements.size;e.select(`open`)&&e.state.triggerCount!==t&&e.set(`triggerCount`,t)}function Ga(e,t){let n=v.useRef(null);return Y(r=>{let i=n.current;if(i!==null){if(i.element===r&&i.store===t&&i.id===e)return;n.current=null;let a=i.store;a.context.triggerElements.getById(i.id)===i.element&&(a.context.triggerElements.delete(i.id),Wa(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),Wa(t))})}function Ka(e,t,n,r=!1){let i=e.preventUnmountingOnClose;t?i=!1:r&&(i=!0);let a=n?.id??null,o=e.activeTriggerId,s=e.activeTriggerElement;return(a||t)&&(o=a,s=n??null),{open:t,preventUnmountingOnClose:i,activeTriggerId:o,activeTriggerElement:s,openedWithoutTrigger:t?n==null:e.openedWithoutTrigger}}function qa(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function Ja(e,t,n,r={}){let i=n.reason,a=i===Qt,o=t&&i===`trigger-focus`,s=!t&&(i===`trigger-press`||i===`escape-key`),c=qa(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);let l=()=>{let i=Ka(e.state,t,n.trigger,c()),l={...r.extraState,...i};o?l.instantType=`focus`:s?l.instantType=`dismiss`:a&&(l.instantType=void 0),e.update(l)};a?R.flushSync(l):l()}function Ya(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=Ga(e,n),o=Y(t=>{let i=n.select(`open`),a=n.select(`activeTriggerId`);if(a===e){let e={activeTriggerElement:t,...i?r:null};n.update(e)}else if(a==null&&i&&!n.state.openedWithoutTrigger){let i={activeTriggerId:e??null,activeTriggerElement:t,...r};n.update(i)}}),s=Y(e=>{a(e),e&&o(e)});return q(()=>(s(t.current),()=>s(null)),[s,t,n,e]),q(()=>{if(i){let e={activeTriggerElement:t.current,...r};n.update(e)}},[i,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:i}}function Xa(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=v.useRef(null),i=e.useState(`open`);q(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set(`triggerCount`,0),e.state.openedWithoutTrigger&&e.set(`openedWithoutTrigger`,!1);return}let t=e.context.triggerElements.size,a={};e.state.triggerCount!==t&&(a.triggerCount=t);let o=e.select(`activeTriggerId`),s=null;if(o){let t=e.context.triggerElements.getById(o);if(t)r.current=o,t!==e.state.activeTriggerElement&&(a.activeTriggerElement=t);else{for(let[t,n]of e.context.triggerElements.entries())if(n===e.state.activeTriggerElement){a.activeTriggerId=t,a.activeTriggerElement=n,r.current=t;break}a.activeTriggerId===void 0&&(r.current===o?s=o:r.current=null)}}else r.current=null;if(!s&&!o&&!e.state.openedWithoutTrigger&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;a.activeTriggerId=e,a.activeTriggerElement=n,r.current=e}}(a.triggerCount!==void 0||a.activeTriggerId!==void 0||a.activeTriggerElement!==void 0)&&e.update(a),s&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===s&&!e.context.triggerElements.getById(s)){let t=Jt(Xt);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,e.useState(`triggerCount`),e.useState(`activeTriggerId`),e.useState(`activeTriggerElement`),n])}function Za(e,t,n,r){let{mounted:i,transitionStatus:a,forceUnmount:o}=za({open:e,ref:t.context.popupRef,preventUnmountOnClose:t.useState(`preventUnmountingOnClose`),setPreventUnmountOnClose:e=>t.set(`preventUnmountingOnClose`,e),animateInitialOpen:r,onUnmount(){t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}});return H(()=>(t.set(`mounted`,i),null)),t.useSyncedValues({mounted:i,transitionStatus:a}),{forceUnmount:o,transitionStatus:a}}function Qa(e,t){e.useSyncedValues(t),q(()=>()=>{e.update({activeTriggerProps:K,inactiveTriggerProps:K,popupProps:K})},[e])}function $a(e,t){q(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),q(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var eo=class{idMap=new Map;add(e,t){this.idMap.set(e,t)}delete(e){this.idMap.delete(e)}hasElement(e){for(let t of this.idMap.values())if(t===e)return!0;return!1}hasMatchingElement(e){for(let t of this.idMap.values())if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}},to=o((e=>{var t=d();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),no=o(((e,t)=>{t.exports=to()})),ro=o((e=>{var t=d(),n=no();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),io=o(((e,t)=>{t.exports=ro()})),ao=no(),oo=io(),so=Si(19)?uo:fo;function co(e,t,n,r,i){return so(e,t,n,r,i)}function lo(e,t,n,r,i){let a=v.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,ao.useSyncExternalStore)(e.subscribe,a,a)}ne({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,ao.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function uo(e,t,n,r,i){let a=te();if(!a)return lo(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function fo(e,t,n,r,i){return(0,oo.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var po=class{static create(e){return new this(e)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return co(this,e,t,n,r)}},mo=class extends po{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){v.useDebugValue(e);let n=this;q(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;q(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;q(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){v.useDebugValue(e);let n=this,r=t!==void 0;q(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return v.useDebugValue(e),co(this,this.selectors[e],t,n,r)}useContextCallback(e,t){v.useDebugValue(e);let n=Y(t??ae);this.context[e]=n}useStateSetter(e){let t=v.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},ho={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId},go=class extends mo{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:aa(),nested:n,triggerElements:i},ho),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&Ne(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{this.syncOnly||this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function _o(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new go({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:K,inactiveTriggerProps:K,popupProps:K}}var vo=e=>e.triggerIdProp??e.activeTriggerId,yo=e=>e.openProp??e.open,bo=e=>(e.popupElement?.id??e.floatingId)||void 0;function xo(e,t){return t!==void 0&&yo(e)&&vo(e)===t}function So(e,t){return xo(e,t)?!0:t!==void 0&&yo(e)&&vo(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}var Co={open:yo,mounted:e=>e.mounted,transitionStatus:e=>yo(e)&&!e.mounted?`starting`:e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:vo,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:bo,isTriggerActive:(e,t)=>t!==void 0&&vo(e)===t,isOpenedByTrigger:(e,t)=>xo(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&vo(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>So(e,t)?bo(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function wo(e){let t=v.useCallback(t=>e===void 0?ae:e.subscribeStore(t),[e]),n=v.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,ao.useSyncExternalStore)(t,n,()=>e?.serverStore)}function To(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=bi(),a=la()!=null,o=H(()=>new go({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new eo,floatingId:i,syncOnly:!1,nested:a})).current;return q(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=ze(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}var Eo=Se&&we;function Do(e,t={}){let{enabled:n=!0,delay:r}=t,{events:i,dataRef:a}=e.context,o=v.useRef(!1),s=v.useRef(null),c=v.useRef(!0),l=fe();v.useEffect(()=>{let t=e.select(`domReferenceElement`);if(!n)return;let r=Ie(t);function i(){let t=e.select(`domReferenceElement`);!e.select(`open`)&&Be(t)&&t===at(Un(t))&&(o.current=!0,s.current=t)}function a(){c.current=!0}function l(){c.current=!1}return Tn(wn(r,`blur`,i),Eo&&wn(r,`keydown`,a,!0),Eo&&wn(r,`pointerdown`,l,!0))},[e,n]),v.useEffect(()=>{if(!n)return;function t(t){if(t.reason===`trigger-press`||t.reason===`escape-key`){let t=e.select(`domReferenceElement`);ze(t)&&(s.current=t,o.current=!0)}}return i.on(`openchange`,t),()=>{i.off(`openchange`,t)}},[i,n,e]);let u=v.useMemo(()=>{function t(){o.current=!1,s.current=null}return{onMouseLeave(){t()},onFocus(n){let i=n.currentTarget;if(o.current){if(s.current===i)return;t()}let a=ct(n.nativeEvent);if(ze(a)){if(Eo&&!n.relatedTarget){if(!c.current&&!Rt(a))return}else if(!Vt(a))return}let u=Ft(n.relatedTarget,e.context.triggerElements),{nativeEvent:d,currentTarget:f}=n;e.select(`open`)&&u||!r?e.setOpen(!0,Jt($t,d,f)):l.start(r,()=>{o.current||e.setOpen(!0,Jt($t,d,f))})},onBlur(n){t();let r=n.relatedTarget,i=n.nativeEvent,o=ze(r)&&r.hasAttribute(ni(`focus-guard`))&&r.getAttribute(`data-type`)===`outside`;l.start(0,()=>{let t=e.select(`domReferenceElement`),n=at(Un(t));(r||n!==t)&&(ot(a.current.floatingContext?.refs.floating.current,n)||ot(t,n)||o||Ft(r??n,e.context.triggerElements)||e.setOpen(!1,Jt($t,i)))})}}},[a,r,e,l]);return v.useMemo(()=>n?{reference:u,trigger:u}:{},[n,u])}var Oo=class e{pointerType=void 0;interactedInside=!1;handler=void 0;blockMouseMove=!0;performedPointerEventsMutation=!1;pointerEventsScopeElement=null;pointerEventsReferenceElement=null;pointerEventsFloatingElement=null;restTimeoutPending=!1;openChangeTimeout=new de;restTimeout=new de;handleCloseOptions=void 0;static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},ko=new WeakMap;function Ao(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&ko.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),ko.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function jo(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=ko.get(n);a&&a!==e&&Ao(a),Ao(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,ko.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function Mo(e){let t=e.context.dataRef.current,n=H(()=>t.hoverInteractionState??Oo.create()).current;return t.hoverInteractionState||=n,le(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function No(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=e.useState(`open`),o=e.useState(`floatingElement`),s=e.useState(`domReferenceElement`),{dataRef:c}=e.context,l=ua(),u=la(),d=Mo(e),f=fe(),p=Y(()=>Kt(c.current.openEvent?.type,d.interactedInside)),m=Y(()=>qt(c.current.openEvent?.type)),h=Y(()=>{Ao(d)});q(()=>{a||(d.pointerType=void 0,d.restTimeoutPending=!1,d.interactedInside=!1,h())},[a,d,h]),v.useEffect(()=>h,[h]),q(()=>{if(n&&a&&d.handleCloseOptions?.blockPointerEvents&&m()&&ze(s)&&o){let e=s,t=o,n=Un(o),r=l?.nodesRef.current.find(e=>e.id===u)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=d.pointerEventsScopeElement===t?null:d.pointerEventsScopeElement,a=r===t?null:r,c=d.handleCloseOptions?.getScope?.()??i??a??st(e,`[data-rootownerid]`)??n.body;return jo(d,{scopeElement:c,referenceElement:e,floatingElement:t}),()=>{h()}}},[n,a,s,o,d,m,l,u,h]),v.useEffect(()=>{if(!n)return;function t(){return!!(l&&u&&ei(l.nodesRef.current,u).length>0)}function a(t){let n=Wt(r,`close`,d.pointerType),i=()=>{e.setOpen(!1,Jt(Qt,t)),l?.events.emit(`floating.closed`,t)};n?d.openChangeTimeout.start(n,i):(d.openChangeTimeout.clear(),i())}function s(e){let t=ct(e);zt(t)?d.interactedInside=st(t,`[aria-haspopup]`)!=null:d.interactedInside=!1}function g(){d.openChangeTimeout.clear(),f.clear(),l?.events.off(`floating.closed`,v),h()}function _(n){if(t()&&l){l.events.on(`floating.closed`,v);return}if(Ft(n.relatedTarget,e.context.triggerElements))return;let r=c.current.floatingContext?.nodeId??i,o=n.relatedTarget;l&&r&&ze(o)&&ei(l.nodesRef.current,r,!1).some(e=>ot(e.context?.elements.floating,o))||(d.handler?d.handler(n):(h(),m()&&!p()&&a(n)))}function v(n){l&&u&&!t()&&f.start(0,()=>{l.events.off(`floating.closed`,v),e.setOpen(!1,Jt(Qt,n)),l.events.emit(`floating.closed`,n)})}let y=o;return Tn(y&&wn(y,`mouseenter`,g),y&&wn(y,`mouseleave`,_),y&&wn(y,`pointerdown`,s,!0),()=>{l?.events.off(`floating.closed`,v)})},[n,o,e,c,r,i,m,p,h,d,l,u,f])}var Po={current:null};function Fo(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=Po,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p,guardStaleOpen:m=!1}=t,{dataRef:h,events:g}=e.context,_=ua(l),y=Mo(e),b=v.useRef(!1),x=Mn(i),S=Mn(r),C=Mn(o),w=Mn(n),T=Mn(p),E=Mn(f),D=Y(()=>Kt(h.current.openEvent?.type,y.interactedInside)),O=Y(()=>T.current?.()!==!1),k=Y((t,n,r)=>{let i=e.context.triggerElements;if(i.hasElement(n))return!t||!ot(t,n);if(!ze(r))return!1;let a=r;return i.hasMatchingElement(e=>ot(e,a))&&(!t||!ot(t,a))}),A=Y(()=>{y.handler&&=(Un(e.select(`domReferenceElement`)).removeEventListener(`mousemove`,y.handler),void 0)}),j=Y(()=>{Ao(y)});return u&&(y.handleCloseOptions=i?.__options),v.useEffect(()=>A,[A]),v.useEffect(()=>{if(!n)return;function e(e){e.open?b.current=!1:(b.current=e.reason===Qt,A(),y.openChangeTimeout.clear(),y.restTimeout.clear(),y.blockMouseMove=!0,y.restTimeoutPending=!1)}return g.on(`openchange`,e),()=>{g.off(`openchange`,e)}},[n,g,y,A]),v.useEffect(()=>{if(!n)return;function t(t,n=!0){let r=Wt(S.current,`close`,y.pointerType);r?y.openChangeTimeout.start(r,()=>{e.setOpen(!1,Jt(Qt,t)),_?.events.emit(`floating.closed`,t)}):n&&(y.openChangeTimeout.clear(),e.setOpen(!1,Jt(Qt,t)),_?.events.emit(`floating.closed`,t))}let r=c.current??(u?e.select(`domReferenceElement`):null);if(!ze(r))return;function i(t){if(y.openChangeTimeout.clear(),y.blockMouseMove=!1,a&&!Me(y.pointerType))return;let n=Gt(C.current),r=Wt(S.current,`open`,y.pointerType),i=ct(t),o=t.currentTarget??null,s=e.select(`domReferenceElement`),c=o;if(ze(i)&&!e.context.triggerElements.hasElement(i)){for(let t of e.context.triggerElements.elements())if(ot(t,i)){c=t;break}}ze(o)&&ze(s)&&!e.context.triggerElements.hasElement(o)&&ot(o,s)&&(c=s);let l=c!=null&&k(s,c,i),u=e.select(`open`),d=E.current?.()??e.select(`transitionStatus`)===`ending`,f=!u&&d&&b.current,p=!l&&ze(c)&&ze(s)&&ot(s,c)&&f,m=n>0&&!r,h=l&&(u||f)||p,g=!u||l;h?O()&&e.setOpen(!0,Jt(Qt,t,c)):m||(r?y.openChangeTimeout.start(r,()=>{g&&O()&&e.setOpen(!0,Jt(Qt,t,c))}):g&&O()&&e.setOpen(!0,Jt(Qt,t,c)))}function o(n){if(D()){j();return}A();let r=Un(e.select(`domReferenceElement`));y.restTimeout.clear(),y.restTimeoutPending=!1;let i=h.current.floatingContext??d?.();if(!Ft(n.relatedTarget,e.context.triggerElements)){if(x.current&&i){e.select(`open`)||y.openChangeTimeout.clear();let a=c.current;y.handler=x.current({...i,tree:_,x:n.clientX,y:n.clientY,onClose(){j(),A(),w.current&&!D()&&a===e.select(`domReferenceElement`)&&t(n,!0)}}),r.addEventListener(`mousemove`,y.handler),y.handler(n)}else(y.pointerType!==`touch`||!ot(e.select(`floatingElement`),n.relatedTarget))&&t(n)}}function l(e){ot(r,e.relatedTarget)||(y.openChangeTimeout.clear(),y.restTimeout.clear(),y.restTimeoutPending=!1)}let f=m?wn(r,`mouseout`,l):void 0;return s?Tn(wn(r,`mousemove`,i,{once:!0}),wn(r,`mouseenter`,i),wn(r,`mouseleave`,o),f):Tn(wn(r,`mouseenter`,i),wn(r,`mouseleave`,o),f)},[A,j,h,S,e,n,x,y,u,k,D,a,s,C,c,_,w,d,E,O,m]),v.useMemo(()=>{if(!n)return;function t(e){y.pointerType=e.pointerType}return{onPointerDown:t,onPointerEnter:t,onMouseMove(t){let{nativeEvent:n}=t,r=t.currentTarget,i=e.select(`domReferenceElement`),o=e.select(`open`),s=k(i,r,t.target);if(a&&!Me(y.pointerType))return;if(o&&s&&y.handleCloseOptions?.blockPointerEvents){let t=e.select(`floatingElement`);if(t){let e=y.handleCloseOptions?.getScope?.()??r.ownerDocument.body;jo(y,{scopeElement:e,referenceElement:r,floatingElement:t})}}let c=Gt(C.current);if(o&&!s||c===0||!s&&y.restTimeoutPending&&t.movementX**2+t.movementY**2<2)return;y.restTimeout.clear();function l(){if(y.restTimeoutPending=!1,D())return;let t=e.select(`open`);!y.blockMouseMove&&(!t||s)&&O()&&e.setOpen(!0,Jt(Qt,n,r))}y.pointerType===`touch`?R.flushSync(()=>{l()}):s&&o?l():(y.restTimeoutPending=!0,y.restTimeout.start(c,l))}}},[n,y,D,k,a,e,C,O])}function Io(e){return we&&e.movementX===0&&e.movementY===0}function Lo(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function Ro(e,t){return Lo(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function zo(e,t,n){return Lo(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function Bo(e,t,n){return Lo(t,n?e===dt:e===ft,e===mt)}function Vo(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===`Escape`:Lo(t,n?e===ft:e===dt,e===pt)}function Ho(e,t){let{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:o=null,allowEscape:s=!1,loopFocus:c=!1,nested:l=!1,rtl:u=!1,virtual:d=!1,focusItemOnOpen:f=`auto`,focusItemOnHover:p=!0,openOnArrowKeyDown:m=!0,disabledIndices:h=void 0,orientation:g=`vertical`,triggerOrientation:_=g,parentOrientation:y,id:b,resetOnPointerLeave:x=!0,externalTree:S,nestedReturnFocusRef:C,grid:w}=t,T=w!=null,E=e.useState(`open`),D=e.useState(`floatingElement`),O=e.useState(`domReferenceElement`),k=e.context.dataRef,A=Ht(D),j=Bt(O),M=Mn(A),N=la(),P=ua(S),F=v.useRef(f),I=v.useRef(o??-1),L=v.useRef(null),R=v.useRef(!0),z=Y(e=>{i(I.current===-1?null:I.current,e)}),B=v.useRef(!!D),V=v.useRef(E),H=v.useRef(!1),U=v.useRef(!1),ee=v.useRef(null),te=Mn(h),ne=Mn(E),W=Mn(o),re=Mn(x),ie=Hn(),ae=Hn(),G=Y(()=>{ie.cancel();function e(e){d||(ee.current=ii(e,{sync:H.current,preventScroll:!0}))}let t=n.current[I.current],r=U.current;t&&e(t),(H.current?e=>e():e=>ie.request(e))(()=>{let i=n.current[I.current]||t;i&&(t||e(i),le&&(r||!R.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});q(()=>{k.current.orientation=g},[k,g]),q(()=>{E||(L.current=null),(!E||f!==`auto`)&&(F.current=f)},[E,f]),q(()=>{a&&(E&&D?(I.current=o??-1,F.current&&o!=null&&(U.current=!0,z())):B.current&&(I.current=-1,z()))},[a,E,D,o,z]),q(()=>{if(a){if(!E)H.current=!1;else if(D){if(r==null){if(H.current=!1,W.current!=null)return;if(B.current&&(I.current=-1,G()),(!V.current||!B.current)&&F.current&&(L.current!=null||F.current===!0&&L.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>ae.request(e):queueMicrotask)(t),e+=1):(I.current=L.current==null||zo(L.current,_,u)||l?Cr(n):wr(n),L.current=null,z())};t()}}else Sr(n.current,r)||(I.current=r,G(),U.current=!1)}}},[a,E,D,r,W,l,n,_,u,z,G,ae]),q(()=>{if(!a||D||!P||d||!B.current)return;let e=P.nodesRef.current,t=e.find(e=>e.id===N)?.context?.elements.floating,n=at(Un(O??t??null)),r=e.some(e=>e.context&&ot(e.context.elements.floating,n));t&&!r&&R.current&&t.focus({preventScroll:!0})},[a,D,O,P,N,d]),q(()=>{V.current=E,B.current=!!D});let K=r!=null,oe=Y(e=>{if(!ne.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(I.current!==t||r!==t)&&(I.current=t,z(e))}),J=Y(()=>y??P?.nodesRef.current.find(e=>e.id===N)?.context?.dataRef?.current.orientation),se=Y(()=>Cr(n,te.current)),ce=Y(t=>{if(R.current=!1,H.current=!0,t.which===229||!ne.current&&t.currentTarget===M.current)return;if(l&&Vo(t.key,g,u,T)){Ro(t.key,J())||Oe(t),e.setOpen(!1,Jt(un,t.nativeEvent));let n=C?.current??O;Be(n)&&n.focus();return}r!=null&&r!==I.current&&!Sr(n.current,r)&&(I.current=r);let i=I.current,a=Cr(n,h),o=wr(n,h);if(j||(t.key===`Home`&&(Oe(t),I.current=a,z(t)),t.key===`End`&&(Oe(t),I.current=o,z(t))),w!=null){let e=w(t,I.current,n,g,c,u,h,a,o);if(e!=null&&e!==I.current&&(I.current=e,z(t)),g===`both`)return}if(Ro(t.key,g)){Oe(t);let e=at(t.currentTarget.ownerDocument);if(E&&!d&&ot(t.currentTarget,e)&&!n.current.some(t=>t!=null&&ot(t,e))){I.current=zo(t.key,g,u)?a:o,z(t),r===I.current&&G();return}let{index:l,wrapped:f}=Tr(n.current,i,{decrement:!zo(t.key,g,u),loopFocus:c,allowEscape:s,disabledIndices:h,minIndex:a,maxIndex:o});f&&(H.current=!1),I.current=l,z(t)}}),le=v.useMemo(()=>({onFocus(e){H.current=!0,oe(e)},onClick({currentTarget:e}){d||e.focus({preventScroll:!0})},onMouseMove(e){Io(e)||(H.current=!0,U.current=!1,p&&oe(e))},onPointerLeave(e){if(!ne.current||!R.current||e.pointerType===`touch`)return;H.current=!0;let t=e.relatedTarget;if(p&&!n.current.includes(t)&&re.current&&(ee.current?.(),ee.current=null,I.current=-1,z(e),!d)){let e=M.current,t=at(Un(e));e&&ot(e,t)&&e.focus({preventScroll:!0})}}}),[oe,ne,M,p,n,z,re,d]),ue=v.useMemo(()=>d&&E&&K&&{"aria-activedescendant":`${b}-${r}`},[d,E,K,b,r]),de=v.useMemo(()=>({...j?{}:ue,onKeyDown(t){if(t.key===`Tab`&&t.shiftKey&&E&&!d){let n=ct(t.nativeEvent);if(n&&!ot(M.current,n))return;Oe(t);let r=Jt(cn,t.nativeEvent);e.setOpen(!1,r);let i=C?.current??O;!r.isCanceled&&Be(i)&&i.focus()}else ce(t)},onPointerMove(e){Io(e)||(R.current=!0)}}),[ue,ce,M,j,e,E,d,O,C]),fe=v.useMemo(()=>{function t(t){e.setOpen(!0,Jt(un,t.nativeEvent,t.currentTarget))}function n(e){f===`auto`&&Ae(e.nativeEvent)&&(F.current=!d)}function r(e){F.current=f,f===`auto`&&je(e.nativeEvent)&&(F.current=!0)}return{onKeyDown(n){let r=e.select(`open`);R.current=!1;let i=n.key.startsWith(`Arrow`),a=Bo(n.key,J(),u),o=Ro(n.key,r?g:_),s=(l?a:o)||n.key===`Enter`||n.key.trim()===``;if(d&&r&&(!l||Rt(n.currentTarget)))return ce(n);if(r||m||!i){if(s){let e=Ro(n.key,J());L.current=l&&e?null:n.key}l?a&&(Oe(n),r?(I.current=se(),z(n),d&&M.current?.focus()):t(n)):o&&(W.current!=null&&(I.current=W.current),Oe(n),!r&&m?t(n):ce(n),r&&z(n))}},onFocus(t){t.target===t.currentTarget&&e.select(`open`)&&!d&&(I.current=-1,z(t))},onPointerDown:r,onPointerEnter:r,onMouseDown:n,onClick:n}},[ce,f,se,l,z,e,m,g,_,J,u,W,d,M]),pe=v.useMemo(()=>({...ue,...fe}),[ue,fe]);return v.useMemo(()=>a?{reference:pe,floating:de,item:le,trigger:fe}:{},[a,pe,de,fe,le])}function Uo(e,t){let{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,disabledIndices:o,onTyping:s,enabled:c=!0,resetMs:l=750,selectedIndex:u=null}=t,d=Y(s),f=e.useState(`open`),p=fe(),m=v.useRef(``),h=v.useRef(u??i??-1),g=v.useRef(null),_=Y(e=>{function t(e){return r?.current[e]}function s(e){let n=t(e);return n&&!Ar(n)||n?.matches(`:disabled`)?!1:o==null||!Or(G,e,o)}function c(e,t,n=0){if(e.length===0)return-1;let r=(n%e.length+e.length)%e.length,i=t.toLowerCase();for(let t=0;t<e.length;t+=1){let n=(r+t)%e.length;if(e[n]?.toLowerCase().startsWith(i)&&s(n))return n}return-1}let _=n.current;if(m.current.length>0&&e.key===` `&&(Oe(e),d?.(!0)),m.current.length>0&&m.current[0]!==` `&&c(_,m.current)===-1&&e.key!==` `&&d?.(!1),_==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;f&&e.key!==` `&&(Oe(e),d?.(!0));let v=m.current===``;v&&(h.current=u??i??-1),_.every((e,t)=>e&&s(t)?e[0]?.toLowerCase()!==e[1]?.toLowerCase():!0)&&m.current===e.key&&(m.current=``,h.current=g.current),m.current+=e.key,p.start(l,()=>{m.current=``,h.current=g.current,d?.(!1)});let y=((v?u??i??-1:h.current)??0)+1,b=c(_,m.current,y);b===-1?e.key!==` `&&(m.current=``,d?.(!1)):(a?.(b,e),g.current=b)}),y=Y(t=>{let n=t.relatedTarget,r=e.select(`domReferenceElement`),i=e.select(`floatingElement`);ot(r,n)||ot(i,n)||(p.clear(),m.current=``,h.current=g.current,d?.(!1))});q(()=>{(f||u===null)&&(p.clear(),g.current=null,m.current!==``&&(m.current=``,d?.(!1)))},[f,u,p,d]);let b=v.useMemo(()=>({onKeyDown:_,onBlur:y}),[_,y]);return v.useMemo(()=>c?{reference:b,floating:b}:{},[c,b])}var Wo=.1,Go=Wo*Wo,Ko=.5;function qo(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function Jo(e,t,n,r,i,a,o,s,c,l){let u=!1;return qo(e,t,n,r,i,a)&&(u=!u),qo(e,t,i,a,o,s)&&(u=!u),qo(e,t,o,s,c,l)&&(u=!u),qo(e,t,c,l,n,r)&&(u=!u),u}function Yo(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Xo(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function Zo(e={}){let{blockPointerEvents:t=!1}=e,n=new de,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*Go;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=ct(r),g=r.type===`mouseleave`,_=ot(u,h),v=ot(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&ze(r.relatedTarget)&&ot(u,r.relatedTarget))return;function y(){return!!(s&&ei(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=Xo(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=Xo(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=Xo(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=Xo(d,f,x.right-1,A,S.left+1,k)}if(j)return;if(l&&!Yo(d,f,x)||!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?Ko/2:Ko*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+Ko+1,o=C||T?S.bottom-Ko:S.top,s=C?T?S.bottom-Ko:S.top:S.bottom-Ko;M=Jo(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?Ko/2:Ko*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-Ko,o=C||T?S.top+Ko:S.bottom,s=C?T?S.top+Ko:S.bottom:S.top+Ko;M=Jo(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?Ko/2:Ko*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+Ko+1,o=w||E?S.right-Ko:S.left,s=w?E?S.right-Ko:S.left:S.right-Ko;M=Jo(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?Ko/2:Ko*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-Ko,o=w||E?S.left+Ko:S.right,s=w?E?S.left+Ko:S.right:S.left+Ko;M=Jo(d,f,a,r,a,i,o,S.top,s,S.bottom);break}}M?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}function Qo(e,t,n){let{reference:r,floating:i}=e,a=or(t),o=sr(t),s=ar(o),c=nr(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=rr(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function $o(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}=tr(t,e),p=yr(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=br(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=br(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 es=50,ts=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:$o},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Qo(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<es&&(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}=Qo(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},ns=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}=tr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=nr(r),_=or(o),v=nr(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[_r(o)]:lr(o)),x=p!==`none`;!d&&x&&b.push(...gr(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=cr(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`||_===or(t)||T.every(e=>or(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=or(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}if(r!==n)return{reset:{placement:n}}}return{}}}},rs=new Set([`left`,`top`]);async function is(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=nr(n),s=rr(n),c=or(n)===`y`,l=rs.has(o)?-1:1,u=a&&c?-1:1,d=tr(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 as=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 is(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}}}}},os=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}=tr(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=or(i),p=ir(f),m=u[p],h=u[f],g=(e,t)=>er(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}}}}}},ss=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}=tr(e,t),u={x:n,y:r},d=or(i),f=ir(d),p=u[f],m=u[d],h=tr(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=rs.has(nr(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}}}},cs=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}=tr(e,t),c=await i.detectOverflow(t,s),l=nr(n),u=rr(n),d=or(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=Jn(p-c[m],g),y=Jn(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*Yn(c.left,c.right):S=p-2*Yn(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 ls(e){let t=$e(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Be(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Xn(n)!==a||Xn(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function us(e){return ze(e)?e:e.contextElement}function ds(e){let t=us(e);if(!Be(t))return Qn(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=ls(t),o=(a?Xn(n.width):n.width)/r,s=(a?Xn(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var fs=Qn(0);function ps(e){let t=Ie(e);return!Ze()||!t.visualViewport?fs:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ms(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Ie(e)}function hs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=us(e),o=Qn(1);t&&(r?ze(r)&&(o=ds(r)):o=ds(e));let s=ms(a,n,r)?ps(a):Qn(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=Ie(a),t=ze(r)?Ie(r):r,n=e,i=it(n);for(;i&&t!==n;){let e=ds(i),t=i.getBoundingClientRect(),r=$e(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=Ie(i),i=it(n)}}return br({width:u,height:d,x:c,y:l})}function gs(e,t){let n=et(e).scrollLeft;return t?t.left+n:hs(Le(e)).left+n}function _s(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-gs(e,n),y:n.top+t.scrollTop}}function vs(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Le(r),s=t?We(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Qn(1),u=Qn(0),d=Be(r);if((d||!a)&&((Fe(r)!==`body`||He(o))&&(c=et(r)),d)){let e=hs(r);l=ds(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?_s(o,c):Qn(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 ys(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function bs(e){let t=et(e),n=e.ownerDocument.body,r=Yn(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Yn(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+gs(e),o=-t.scrollTop;return $e(n).direction===`rtl`&&(a+=Yn(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var xs=25;function Ss(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Ie(e),a=Le(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Ze()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(gs(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<=xs&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Cs(e,t){let n=hs(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=ds(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function ws(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Ss(e,n,t);else if(t===`document`)r=bs(Le(e));else if(ze(t))r=Cs(t,n);else{let n=ps(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return br(r)}function Ts(e,t){let n=t.get(e);if(n)return n;let r=rt(e,[],!1).filter(e=>ze(e)&&Fe(e)!==`body`),i=null,a=$e(e).position===`fixed`,o=a?tt(e):e;for(;ze(o)&&!Qe(o);){let e=$e(o),t=Ye(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=tt(o)}return t.set(e,r),r}function Es(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?We(t)?[]:Ts(t,this._c):[].concat(n),r],o=ws(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=ws(t,a[e],i);s=Yn(n.top,s),c=Jn(n.right,c),l=Jn(n.bottom,l),u=Yn(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Ds(e){let{width:t,height:n}=ls(e);return{width:t,height:n}}function Os(e,t,n){let r=Be(t),i=Le(t),a=n===`fixed`,o=hs(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Qn(0);if((r||!a)&&((Fe(t)!==`body`||He(i))&&(s=et(t)),r)){let e=hs(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=gs(i));let l=i&&!r&&!a?_s(i,s):Qn(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 ks(e){return $e(e).position===`static`}function As(e,t){if(!Be(e)||$e(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Le(e)===n&&(n=n.ownerDocument.body),n}function js(e,t){let n=Ie(e);if(We(e))return n;if(!Be(e)){let t=tt(e);for(;t&&!Qe(t);){if(ze(t)&&!ks(t))return t;t=tt(t)}return n}let r=As(e,t);for(;r&&Ue(r)&&ks(r);)r=As(r,t);return r&&Qe(r)&&ks(r)&&!Ye(r)?n:r||Xe(e)||n}var Ms=async function(e){let t=this.getOffsetParent||js,n=this.getDimensions,r=await n(e.floating);return{reference:Os(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ns(e){return $e(e).direction===`rtl`}var Ps={convertOffsetParentRelativeRectToViewportRelativeRect:vs,getDocumentElement:Le,getClippingRect:Es,getOffsetParent:js,getElementRects:Ms,getClientRects:ys,getDimensions:Ds,getScale:ds,isElement:ze,isRTL:Ns};function Fs(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Is(e,t,n){let r=null,i,a=Le(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=Zn(d),h=Zn(a.clientWidth-(u+f)),g=Zn(a.clientHeight-(d+p)),_=Zn(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Yn(0,Jn(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Fs(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=Ie(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Ls(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=us(e),u=i||a?[...l?rt(l):[],...t?rt(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Is(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?hs(e):null;c&&g();function g(){let t=hs(e);h&&!Fs(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 Rs=as,zs=os,Bs=ns,Vs=cs,Hs=ss,Us=(e,t,n)=>{let r=new Map,i=n??{},a={...Ps,...i.platform,_c:r};return ts(e,t,{...i,platform:a})},Ws=typeof document<`u`?v.useLayoutEffect:function(){};function Gs(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(!Gs(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)&&!Gs(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Ks(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function qs(e,t){let n=Ks(e);return Math.round(t*n)/n}function Js(e){let t=v.useRef(e);return Ws(()=>{t.current=e}),t}function Ys(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=v.useState(r);Gs(f,r)||p(r);let[m,h]=v.useState(null),[g,_]=v.useState(null),y=v.useCallback(e=>{e!==C.current&&(C.current=e,h(e))},[]),b=v.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=a||m,S=o||g,C=v.useRef(null),w=v.useRef(null),T=v.useRef(u),E=c!=null,D=Js(c),O=Js(i),k=Js(l),A=v.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),Us(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!Gs(T.current,t)&&(T.current=t,R.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);Ws(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=v.useRef(!1);Ws(()=>(j.current=!0,()=>{j.current=!1}),[]),Ws(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=v.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),N=v.useMemo(()=>({reference:x,floating:S}),[x,S]),P=v.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=qs(N.floating,u.x),r=qs(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Ks(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return v.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var Xs=(e,t)=>{let n=Rs(e);return{name:n.name,fn:n.fn,options:[e,t]}},Zs=(e,t)=>{let n=zs(e);return{name:n.name,fn:n.fn,options:[e,t]}},Qs=(e,t)=>({fn:Hs(e).fn,options:[e,t]}),$s=(e,t)=>{let n=Bs(e);return{name:n.name,fn:n.fn,options:[e,t]}},ec=(e,t)=>{let n=Vs(e);return{name:n.name,fn:n.fn,options:[e,t]}},tc=class extends mo{setState(e){}update(e){}set(e,t){}notifyAll(){}},nc={...Co,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,appliedTriggerProps:(e,t)=>t?e.activeTriggerProps:void 0,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},rc=class extends mo{constructor(e,t,n){let r=new eo;super(ac(e,r,t,n),oc(r),nc)}setOpen=(e,t)=>{Ja(this,e,t,{extraState:{openChangeReason:t.reason}})};cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,Jt(Zt,e))}};function ic(){let e=new eo,t=new tc(Object.freeze(ac(void 0,e)),Object.freeze(oc(e)),nc);return Object.assign(t,{setOpen:ae,cancelPendingOpen:ae})}function ac(e,t,n,r=!1){return{..._o(t,n,r),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:`none`,disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function oc(e){return{popupRef:v.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}var sc=W(function(e){let{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:a=`none`,actionsRef:o,onOpenChange:s,onOpenChangeComplete:c,handle:l,triggerId:u,defaultTriggerId:d=null,children:f}=e,p=Ha((e,t)=>new rc({open:n,openProp:r,activeTriggerId:d,triggerIdProp:u},e,t));p.useControlledProp(`openProp`,r),p.useControlledProp(`triggerIdProp`,u),p.useContextCallback(`onOpenChange`,s),p.useContextCallback(`onOpenChangeComplete`,c);let m=p.useState(`open`),h=!t&&m,g=p.useState(`activeTriggerId`),_=p.useState(`mounted`),y=p.useState(`payload`);p.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:i,disabled:t}),Xa(p,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:b,transitionStatus:x}=Za(h,p),C=p.useState(`isInstantPhase`),w=p.useState(`instantType`),T=p.useState(`lastOpenChangeReason`),E=v.useRef(null);q(()=>{m&&t&&p.setOpen(!1,Jt(hn))},[m,t,p]),q(()=>{x===`ending`&&T===`none`||x!==`ending`&&C?(w!==`delay`&&(E.current=w),p.set(`instantType`,`delay`)):E.current!==null&&(p.set(`instantType`,E.current),E.current=null)},[x,C,T,w,p]),q(()=>{h&&(g??p.set(`payload`,void 0))},[p,g,h]),v.useImperativeHandle(o,()=>({unmount:b,close:()=>p.setOpen(!1,Jt(vn))}),[b,p]);let D=h||_||!t&&a!==`none`;return(0,S.jsxs)(se.Provider,{value:p,children:[l&&(0,S.jsx)(Ua,{handle:l,store:p}),D&&(0,S.jsx)(cc,{store:p,disabled:t,trackCursorAxis:a}),typeof f==`function`?f({payload:y}):f]})});function cc({store:e,disabled:t,trackCursorAxis:n}){let r=e.useState(`floatingRootContext`),i=Aa(r,{enabled:!t,referencePress:()=>e.select(`closeOnClick`)}),a=Da(r,{enabled:!t&&n!==`none`,axis:n===`none`?void 0:n}),o=v.useMemo(()=>ki(a.reference,i.reference),[a.reference,i.reference]);return Qa(e,{activeTriggerProps:o,inactiveTriggerProps:o,popupProps:i.floating??K}),null}function lc(e){return bi(e,`base-ui`)}var uc=v.createContext(void 0);function dc(){return v.useContext(uc)}var fc=`data-base-ui-tooltip-trigger`;function pc(e){let t=ct(e);return ze(t)?t:null}var mc=re(function(e,t){let{render:n,className:r,style:i,handle:a,payload:o,disabled:s,delay:c,closeOnClick:l=!0,closeDelay:u,id:d,...f}=e,p=ce(!0),m=wo(a)??p;if(!m)throw Error(J(82));let h=lc(d),g=m.useState(`isTriggerActive`,h),_=m.useState(`isOpenedByTrigger`,h),y=m.useState(`floatingRootContext`),b=v.useRef(null),x=u??0,{registerTrigger:S,isMountedByThisTrigger:C}=Ya(h,b,m,{payload:o,closeOnClick:l,closeDelay:x}),w=dc(),{activeIdRef:T,delayRef:E,isInstantPhase:D,hasProvider:O}=Cn(y,{open:_}),k=Mo(y);m.useSyncedValue(`isInstantPhase`,D);let A=m.useState(`disabled`),j=s??A,M=Mn(j),N=m.useState(`trackCursorAxis`),P=m.useState(`disableHoverablePopup`),F=v.useRef(!1),I=fe(),L=v.useRef(void 0);function R(){return O&&T.current!=null?0:c??w??600}function z(e){let t=b.current;if(!t||!e)return!1;let n=st(e,`[${fc}]`);return n!==null&&n!==t&&ot(t,n)}function B(e){let t=z(e);return F.current=t,t&&(k.openChangeTimeout.clear(),k.restTimeout.clear(),k.restTimeoutPending=!1,I.clear()),t}let V=Fo(y,{enabled:!j,mouseOnly:!0,move:!1,handleClose:!P&&N!==`both`?Zo():null,restMs:R,delay(){return u==null&&O?{close:Wt(E.current,`close`)}:{close:x}},triggerElementRef:b,isActiveTrigger:g,isClosing:()=>m.select(`transitionStatus`)===`ending`,shouldOpen(){return!F.current}}),H=Do(y,{enabled:!j}).reference,U=e=>{let t=F.current,n=pc(e),r=B(n),i=b.current,a=i&&n&&ot(i,n);if(r&&m.select(`open`)&&m.select(`lastOpenChangeReason`)===`trigger-hover`)m.setOpen(!1,Jt(Qt,e));else if(t&&!r&&a&&!M.current&&!m.select(`open`)&&i&&Me(L.current)){let t=()=>{!F.current&&!M.current&&!m.select(`open`)&&m.setOpen(!0,Jt(Qt,e,i))},n=R();n===0?(I.clear(),t()):I.start(n,t)}},ee=m.useState(`appliedTriggerProps`,C||N!==`none`);return Hi(`button`,e,{state:{open:_},ref:[t,S,b],props:[V,H,ee,{onMouseOver(e){U(e.nativeEvent)},onFocus(e){z(pc(e.nativeEvent))&&e.preventBaseUIHandler()},onMouseLeave(){F.current=!1,I.clear(),L.current=void 0},onPointerEnter(e){L.current=e.pointerType},onPointerDown(e){L.current=e.pointerType,m.set(`closeOnClick`,l),l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},onClick(e){l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},id:h,[Pt]:j?``:void 0,[fc]:j?void 0:``},f],stateAttributesMapping:At})}),hc=v.createContext(void 0);function gc(){let e=v.useContext(hc);if(e===void 0)throw Error(J(70));return e}var _c=v.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,style:o,...s}=e,{node:c,subtree:l}=ra({container:r,ref:t,componentProps:e,elementProps:s});return!l&&!c?null:(0,S.jsxs)(v.Fragment,{children:[l,c&&R.createPortal(n,c)]})}),vc=v.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return ce().useState(`mounted`)||n?(0,S.jsx)(hc.Provider,{value:n,children:(0,S.jsx)(_c,{ref:t,...r})}):null}),yc=v.createContext(void 0);function bc(){let e=v.useContext(yc);if(e===void 0)throw Error(J(71));return e}function xc(e){let{nodeId:t,externalTree:n,rootContext:r}=e,i=r.useState(`referenceElement`),a=r.useState(`floatingElement`),o=r.useState(`domReferenceElement`),s=r.useState(`open`),c=r.useState(`floatingId`),[l,u]=v.useState(null),d=v.useRef(null),f=ua(n),p=v.useMemo(()=>({reference:i,floating:a,domReference:o}),[i,a,o]),m=Ys({...e,elements:{...p,...l&&{reference:l}}}),h=v.useCallback(e=>{let t=ze(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),m.refs.setReference(t)},[m.refs]),g=v.useMemo(()=>({...m.refs,setPositionReference:h,domReference:d}),[m.refs,h]),_=v.useMemo(()=>({...m.elements,domReference:o}),[m.elements,o]),y=v.useMemo(()=>({...m,dataRef:r.context.dataRef,open:s,onOpenChange:r.setOpen,events:r.context.events,floatingId:c,refs:g,elements:_,nodeId:t,rootStore:r}),[m,g,_,t,r,s,c]);return q(()=>{o&&(d.current=o)},[o]),q(()=>{r.context.dataRef.current.floatingContext=y;let e=f?.nodesRef.current.find(e=>e.id===t);e&&(e.context=y)}),v.useMemo(()=>({...m,context:y,refs:g,elements:_,rootStore:r}),[m,g,_,y,r])}var Sc=v.createContext(void 0);function Cc(){return v.useContext(Sc)?.direction??`ltr`}var wc=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}=tr(e,t)||{};if(l==null)return{};let d=yr(u),f={x:n,y:r},p=sr(i),m=ar(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=s.floating[y]||a.floating[m],C=b/2-x/2,w=S/2-h[m]/2-1,T=Math.min(d[_],w),E=Math.min(d[v],w),D=T,O=S-h[m]-E,k=S/2-h[m]/2+C,A=er(D,k,O),j=!c.arrow&&rr(i)!=null&&k!==A&&a.reference[m]/2-(k<D?T:E)-h[m]/2<0,M=j?k<D?k-D:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),Tc=(e,t)=>{let{name:n,fn:r}=wc(e);return{name:n,fn:r,options:[e,t]}},Ec={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0,o=await e.platform.detectOverflow(e,{elementContext:`reference`});return{data:{referenceHidden:o.top-n>=0||o.right-t>=0||o.bottom-n>=0||o.left-t>=0||a}}}},Dc={sideX:`left`,sideY:`top`},Oc=`--available-width`,kc=`--available-height`,Ac=`--anchor-width`,jc=`--anchor-height`,Mc=`--transform-origin`,Nc=Oc,Pc=kc;function Fc(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function Ic(e,t,n){let{rects:r,placement:i}=e;return{side:Fc(t,nr(i),n),align:rr(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Lc(e){return Rc(e,xc)}function Rc(e,t){let{anchor:n,positionMethod:r=`absolute`,side:i=`bottom`,sideOffset:a=0,align:o=`center`,alignOffset:s=0,collisionBoundary:c,collisionPadding:l=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,inline:p,keepMounted:m=!1,floatingRootContext:h,mounted:g,collisionAvoidance:_,shift:y,nodeId:b,adaptiveOrigin:x,lazyFlip:S=!1,externalTree:C}=e,w=_.side||`flip`,T=_.align||`flip`,E=_.fallbackAxisSide||`end`,D=y?.crossAxis??!1,O=y?.rootBoundary,k=typeof n==`function`?n:void 0,A=Y(k),j=k?A:n,M=Mn(n),N=Mn(g),P=Cc()===`rtl`,[F,I]=v.useState(null);!g&&F!==null&&I(null);let L=S===`placement`,R=F?nr(F):null,z=F&&L?rr(F)||`center`:null,B=R||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":P?`left`:`right`,"inline-start":P?`right`:`left`}[i],V=z||o,H=V===`center`?B:`${B}-${V}`,U=l;typeof U==`number`?U={top:U,right:U,bottom:U,left:U}:U&&={top:U.top||0,right:U.right||0,bottom:U.bottom||0,left:U.left||0};let ee=+(i===`bottom`),te=+(i===`top`),ne=+(i===`right`),W=+(i===`left`),re={boundary:c===`clipping-ancestors`?`clippingAncestors`:c,padding:U},ie=v.useRef(null),ae=Mn(a),G=Mn(s),K=typeof a==`function`?0:a,oe=typeof s==`function`?0:s,J=[];p&&J.push(p),J.push(Xs(e=>{let t=Ic(e,i,P),n=typeof ae.current==`function`?ae.current(t):ae.current,r=typeof G.current==`function`?G.current(t):G.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},[K,oe,P,i]));let se=T===`none`&&w!==`shift`,ce=!se&&(u||D||w===`shift`),le=w===`none`?null:$s({...re,padding:{top:U.top+1+ee,right:U.right+1+W,bottom:U.bottom+1+te,left:U.left+1+ne},mainAxis:!D&&w===`flip`,crossAxis:T===`flip`&&`alignment`,fallbackAxisSideDirection:E}),ue=se?null:Zs({...re,rootBoundary:O,mainAxis:T!==`none`,crossAxis:ce,limiter:u||D?void 0:Qs(e=>{if(!ie.current)return{};let{width:t,height:n}=ie.current.getBoundingClientRect(),r=or(nr(e.placement)),i=r===`y`?t:n,a=r===`y`?U.left+U.right:U.top+U.bottom;return{offset:i/2+a/2}})},[re,u,D,O,U,T]);w===`shift`||T===`shift`||V===`center`?J.push(ue,le):J.push(le,ue),J.push(ec({...re,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!N.current)return;let i=e.style;i.setProperty(Nc,`${t}px`),i.setProperty(Pc,`${n}px`);let a=Ie(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(Ac,`${u}px`),i.setProperty(jc,`${d}px`)}}),Tc(e=>({element:ie.current||Un(e.elements.floating).createElement(`div`),padding:ie.current?d:0}),[d]),{name:`transformOrigin`,fn(e){let{elements:{floating:t},middlewareData:n,placement:r,platform:o,rects:s,y:c}=e,l=nr(r),u=rr(r),d=or(l)===`y`,f=ie.current,p=typeof a==`function`?a(Ic(e,i,P)):a,m;m=!f&&u&&Math.abs(d?n.shift?.x||0:n.shift?.y||0)<=1?u===`start`===(d&&o.isRTL?.(t)===!0)?`100%`:`0%`:`${(d?n.arrow?.x||0:n.arrow?.y||0)+(d?f?.clientWidth||0:f?.clientHeight||0)/2}px`;let h=l===`top`||l===`left`?`calc(100% + ${p}px)`:`${-p}px`;return ce&&d&&Math.abs(n.shift?.y||0)>p&&(h=`${s.reference.y+s.reference.height/2-c}px`),t.style.setProperty(Mc,d?`${m} ${h}`:`${h} ${m}`),{}}},Ec,x),q(()=>{!g&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[g,h]);let de=v.useMemo(()=>({ancestorScroll:!f,elementResize:!f&&typeof ResizeObserver<`u`,layoutShift:!f&&typeof IntersectionObserver<`u`}),[f]),{refs:fe,elements:pe,x:me,y:he,middlewareData:ge,update:_e,placement:ve,context:ye,isPositioned:be,floatingStyles:xe}=t({rootContext:h,open:m?g:void 0,placement:H,middleware:J,strategy:r,whileElementsMounted:m?void 0:(...e)=>Ls(...e,de),nodeId:b,externalTree:C}),{sideX:Se,sideY:Ce}=ge.adaptiveOrigin||Dc,we=be?r:`fixed`,Te=v.useMemo(()=>{let e;return e=be?x?{position:we,[Se]:me,[Ce]:he}:{...xe,position:we}:{position:we,top:0,left:0},e[Nc]=`100vw`,e[Pc]=`100vh`,be||(e.opacity=0),e},[x,we,Se,me,Ce,he,xe,be]),Ee=v.useRef(null);q(()=>{if(!g)return;let e=M.current,t=typeof e==`function`?e():e,n=(zc(t)?t.current:t)||null;n!==Ee.current&&(fe.setPositionReference(n),Ee.current=n)},[g,fe,j,M]),v.useEffect(()=>{if(!g)return;let e=M.current;typeof e!=`function`&&zc(e)&&e.current!==Ee.current&&(fe.setPositionReference(e.current),Ee.current=e.current)},[g,fe,j,M]),v.useEffect(()=>{if(m&&g&&pe.reference&&pe.floating)return Ls(pe.reference,pe.floating,_e,de)},[m,g,pe,_e,de]);let De=nr(ve),Oe=Fc(i,De,P),ke=rr(ve)||`center`,Ae=!!ge.hide?.referenceHidden;q(()=>{S&&g&&be&&(De!==B||L&&ke!==V)&&I(ve)},[S,L,g,be,ve,De,ke,B,V]);let je=v.useMemo(()=>({position:`absolute`,top:ge.arrow?.y,left:ge.arrow?.x}),[ge.arrow]),Me=ge.arrow?.centerOffset!==0;return v.useMemo(()=>({positionerStyles:Te,arrowStyles:je,arrowRef:ie,arrowUncentered:Me,side:Oe,align:ke,physicalSide:De,anchorHidden:Ae,refs:fe,context:ye,isPositioned:be,update:_e}),[Te,je,ie,Me,Oe,ke,De,Ae,fe,ye,be,_e])}function zc(e){return e!=null&&`current`in e}function Bc(e){return e===`starting`?Yi:K}function Vc(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),Hi(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},Bc(r),i],stateAttributesMapping:Mt})}var Hc=v.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`top`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=Qi,style:g,..._}=e,y=ce(),b=gc(),x=y.useState(`open`),C=y.useState(`mounted`),w=y.useState(`trackCursorAxis`),T=y.useState(`disableHoverablePopup`),E=y.useState(`floatingRootContext`),D=y.useState(`instantType`),O=y.useState(`transitionStatus`),k=Lc({anchor:i,positionMethod:a,floatingRootContext:E,mounted:C,side:o,sideOffset:c,align:s,alignOffset:l,collisionBoundary:u,collisionPadding:d,sticky:p,arrowPadding:f,disableAnchorTracking:m,keepMounted:b,collisionAvoidance:h,adaptiveOrigin:y.useState(`adaptiveOrigin`)}),A=Vc(e,v.useMemo(()=>({open:x,side:k.side,align:k.align,anchorHidden:k.anchorHidden,instant:w===`none`?D:`tracking-cursor`}),[x,k.side,k.align,k.anchorHidden,w,D]),{styles:k.positionerStyles,transitionStatus:O,props:_,refs:[t,y.useStateSetter(`positionerElement`)],hidden:!C,inert:!x||w===`both`||T});return(0,S.jsx)(yc.Provider,{value:k,children:A})}),Uc=v.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=ce(),{side:s,align:c}=bc(),l=o.useState(`open`),u=o.useState(`instantType`),d=o.useState(`transitionStatus`),f=o.useState(`popupProps`),p=o.useState(`floatingRootContext`),m=o.useState(`disabled`),h=o.useState(`closeDelay`);Ra({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}}),No(p,{enabled:!m,closeDelay:h});let g=o.useStateSetter(`popupElement`);return Hi(`div`,e,{state:{open:l,side:s,align:c,instant:u,transitionStatus:d},ref:[t,o.context.popupRef,g],props:[Ba,f,Bc(d),a],stateAttributesMapping:Nt})}),Wc=v.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=ce(),{arrowRef:s,side:c,align:l,arrowUncentered:u,arrowStyles:d}=bc();return Hi(`div`,e,{state:{open:o.useState(`open`),side:c,align:l,uncentered:u,instant:o.useState(`instantType`)},ref:[t,s],props:[{style:d,"aria-hidden":!0},a],stateAttributesMapping:Mt})}),Gc=function(e){let{delay:t,closeDelay:n,timeout:r=400}=e,i=v.useMemo(()=>({open:t,close:n}),[t,n]);return(0,S.jsx)(uc.Provider,{value:t,children:(0,S.jsx)(Sn,{delay:i,timeoutMs:r,children:e.children})})};function Kc(e){return Si(19)?e:e?`true`:void 0}function qc(e){let[t,n]=v.useState({current:e,previous:null});return Object.is(e,t.current)||n({current:e,previous:t.current}),t.previous}var Jc=class extends ja{constructor(){super(ic(),`Tooltip`)}open(e){this.openByTrigger(e)}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select(`open`)??!1}};function Yc(){return new Jc}var Xc=48,Zc=(e,t=0)=>{let n=new Int32Array(e.length);for(let r=0;r<e.length;r++)n[r]=e.charCodeAt(r)-Xc-t;return n},Qc=e=>{let t=new Int32Array(e.length+1);for(let n=0;n<e.length;n++)t[n+1]=t[n]+e[n];return t},$c=e=>{let t=new Int32Array(e.length),n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r)-Xc;n+=i>>>1^-(i&1),t[r]=n}return t},el=384,tl=[],nl=Qc(Zc(`E0500002005282000000002000150000020021820000011200000003022202000300004200120000200420001200021200301200010400162000010000220021010:2192001200220012000220012000200200200400010200040000000000400200108200110100000022010313000162002000020020012020080213000228200000000082000000000120002000120020020040101020300130001001010`)),rl=Qc(Zc(`:11111111211111119311546544411119731869:671397415686432441111111111161114151214313433415:78311132233313187211117221449443411141111151152226611131111112212518142224214215421421542142424242516171151615616347111111111197911327451111111111111111111113134714133513411111311111111111111111111112444411111342312715245411117:3`)),il=`@containerabcdefghinlmoprstunderlineviawzccentlignnimatespectuto-colsrowsaglorightnessckdrop-sisbcontrastfiltergrayscalehue-rotateinvertopacityslurrightnessaturateepia-coniclinearpositionradialsizeockurrderttom-belrstxyespacing-xyaretoursorlnt-umnsendspantartainentrasteividerop-shadowurationcorationlay-xyasendillexontromlter-featuresstretchapr-xyayscaleidow-colsrowsue-rotatedentlinesetvert-beringsxyeshadoweiadingftnest-clamp-imageabein-lrstxyskx--b-coniclpositionrsizet-x-y-fromto-fromto-inearfromto-fromto-adialfromto-fromtofromtofromtofromtoblockhinlinew-screenesblockhinlinewbjectpacityrutlinederigin-offsetbelrstxyesrspective-originaceholderioghtng-offsettateundedw-xyz-belrstlreseslr-endspantartaturatecepiahizekewpace-taleroll-xyz-barmpbelrstxyesbelrstxyes-thumbrackadowrink-xyxyartrokeabextora-shadowpckingnsformitionlate-xyz-offsetill-changeoom`,al=(()=>{let e=nl.length-1,t=new Int32Array(e);for(let n=e-1;n>=0;n--){let e=1,r=n+1;for(let i=nl[n];i<nl[n+1];i++)e+=t[r],r+=t[r];t[n]=e}let n=new Int32Array(nl[e]),r=0;for(let i=0;i<e;i++){let e=i+1;for(let a=nl[i];a<nl[i+1];a++)n[r++]=e,e+=t[e]}return n})(),ol=Zc(`02000000000000900<=0?000B000F00F00ŏI0J0LNPRTVX0000]_a00000000000000000000000rst0000000zŏ00000000000…ŏ000ˆ0000ŏ0000000000—0000000000000000000000000000000000000000000000000000Ë000000000000000000000Þ000000000000000000ð0000000ø0ùúûüýþÿĀāĂ㥹Ć000000000000000000000000000000000000000000ħ0ĨĪ00000000000000000000ļĽ00000Ŭ000000`,1),sl=Qc(Zc(`123333359346463635126536711576`)),cl=Zc(`93203242332583253248325D>E?F@03263243255B:032523853:0325B:8GA032542H<C=12727B:0328432553;D>E?3257D>032585:0325B:;0328B:032`),ll=Zc(`012113445661666666789111:5;;;;;;;;444;;;:62999<1161=62>>?61:21@ABCD4446996:64E:::;:?::64:F114GHHIHHHHIHH1HH1HH1HHHHHH::EEJ4444::EE4444441691;644444114244444:;K6666555555555555555999666664444444444444444444444226?6:66644L9M?D:111::::6DE199`),ul=$c(`020200202020020020020020020020200200200200200200200002020202001003040106000200200200200200200200200200200200200200200200200200200200200200200200200200200200020020020020020020002020200202002002002002002002002002002020002002020020200220200200200200200200200200200200020020020000200020002000200200200020020020002000200200200020020202002020202000200200020022000200200020020002002000200220002002000200W0Z00020020002002020002002000200g0j0002002000200200020020002002000200200020020002000200002000002002002002002000200020000200002002002002002002002020020020200200200200200200200200202020020020020020020020020002002002020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020002002002002002002000200200200200200200200200200020202020002000200020002002002002000020200200`),dl=(()=>{let e=new Int32Array(319).fill(-1),t=$c(`02422242:222222242224222242442222222422222244442242226224222426222422442462222422622222222626222462242622422622422424242422222222422222222242422222222222222222622442224222222222222224424442262222222222222222222226224222424242422224422422422222`),n=$c(`02222222222222222222202222222222222222222222221422222222222222222222222222222222222Y\\222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221422222222222222222222222222222222222222Ŀł222222222222222222`);for(let r=0;r<t.length;r++)e[t[r]]=n[r];return e})(),fl=`container |break-after- all auto avoid avoid-page column left page right|break-before- all auto avoid avoid-page column left page right|break-inside-a uto void void-column void-page|box-decoration- clone slice|box- border content| contents flow-root hidden table table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group| not-sr-only sr-only|float- end left none right start|clear- both end left none right start|isolat e ion-auto|overflow- auto clip hidden scroll visible|overflow-x- auto clip hidden scroll visible|overflow-y- auto clip hidden scroll visible|overscroll- auto contain none|overscroll-x- auto contain none|overscroll-y- auto contain none| absolute fixed relative static sticky| collapse invisible visible|justify- around baseline between center center-safe end end-safe evenly normal start stretch|justify-items- center center-safe end end-safe normal start stretch|justify-self- auto center center-safe end end-safe start stretch|items- baseline baseline-last center center-safe end end-safe start stretch|self- auto baseline baseline-last center center-safe end end-safe start stretch|place-content- around baseline between center center-safe end end-safe evenly start stretch|place-items- baseline center center-safe end end-safe start stretch|place-self- auto center center-safe end end-safe start stretch| antialiased subpixel-antialiased| italic not-italic|normal-nums |ordinal |slashed-zero | lining-nums oldstyle-nums| proportional-nums tabular-nums| diagonal-fractions stacked-fractions| no-underline overline| capitalize lowercase normal-case uppercase|truncate |whitespace- break-spaces normal nowrap pre pre-line pre-wrap|break- all keep normal words|wrap- anywhere break-word normal|hyphens- auto manual none|mix-blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay plus-darker plus-lighter saturation screen soft-light|table- auto fixed|caption- bottom top|backface- hidden visible|appearance- auto none|scheme- dark light light-dark normal only-dark only-light|field-sizing- content fixed|pointer-events- auto none|resize -none -x -y|snap- align-none center end start|snap- always normal|snap- both none x y|snap- mandatory proximity|touch- auto manipulation none|touch-pan- left right x|touch-pan- down up y|touch-pinch-zoom |select- all auto none text|forced-color-adjust- auto none| normal size| baseline bottom middle sub super text-bottom text-top top| bounce none ping pulse spin| auto square video| auto fr max min px|none | auto full px| fixed local scroll|clip- border content padding text|origin- border content padding| bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| no-repeat repeat repeat-round repeat-space repeat-x repeat-y| auto contain cover|blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay saturation screen soft-light|to- b bl br l r t tl tr| auto dvh fit full lh lvh max min px screen svh| dashed dotted double hidden none solid| collapse separate|px |auto |full | content none strict| inline-size size|layout |paint |style | around baseline between center center-safe end end-safe evenly normal start stretch| alias all-scroll auto cell col-resize context-menu copy crosshair default e-resize ew-resize grab grabbing help move n-resize ne-resize nesw-resize no-drop none not-allowed ns-resize nw-resize nwse-resize pointer progress row-resize s-resize se-resize sw-resize text vertical-text w-resize wait zoom-in zoom-out| dashed dotted double solid wavy| auto from-font|reverse |initial | in in-out initial linear out| col col-reverse row row-reverse| nowrap wrap wrap-reverse| auto initial none| black bold extrabold extralight light medium normal semibold thin| condensed expanded extra-condensed extra-expanded normal semi-condensed semi-expanded ultra-condensed ultra-expanded|flow- col col-dense dense row row-dense| none subgrid| auto dvh dvw fit full lh lvh lvw max min px screen svh svw| block flex grid table| auto dvw fit full lvw max min px screen svw| loose none normal px relaxed snug tight|through |item | inside outside| decimal disc none| auto px| clip-border clip-content clip-fill clip-padding clip-stroke clip-view no-clip| add exclude intersect subtract| alpha luminance match|origin- border content fill padding stroke view|type- alpha luminance| circle ellipse| closest-corner closest-side farthest-corner farthest-side|at- bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| dvh fit full lh lvh max min none px screen svh| auto dvh dvw fit full lh lvh lvw max min none px screen svh svw| dvw fit full lvw max min none px screen svw| auto dvh dvw fit full lvh lvw max min none prose px svh svw| auto dvh dvw fit full lvh lvw max min none px screen svh svw| contain cover fill none scale-down| first last none| distant dramatic midrange near none normal|inset | full none|3d | auto smooth|gutter- auto both stable| auto none thin| inner none| auto dvh dvw fit full lvh lvw max min px svh svw|base | center end justify left right start| clip ellipsis| balance nowrap pretty wrap| normal tight tighter wide wider widest| cpu gpu none| 3d flat| all colors none opacity shadow transform| discrete normal| full px| auto dvh dvw fit full lvh lvw max min px screen svh svw| auto contents scroll transform`.split(`|`).map(e=>{let t=e.split(` `),n=t.shift();for(let e=0;e<t.length;e++)t[e]=n+t[e];return t}),pl=$c(`0000000000000000000000000000000000000000000000000000000000000262242:6@200000006:240B428:4422400002046044222426220026642642462026224222824220022400000000\\00N222422242222222224062242222222422226264222422222222222222442804222422222222222222222222220<4<0204260002444020204224422`),ml=$c(`ɠ222222222222222222222222222222222222222222222222222222222222˕4222226>6ʰ22ʷʺʷʺʷ42ʴ2ʓ22>621422ɶ222ɹɼɷɺɷɺ22ɱ42222ɨ2ɧ26622ɘɓ244ƸƵ222]d24242ǖǓƚÄȫ2263ȨȥȨ2222222ǣ222222222222222222ǂƽ2ƾƵ2222222422222ƜƑ22222222222222222222144Ŧţ22Ţş222222222222222222222ĸ2ı68ĦģĦɡŰ4Ġ«®ĝ822ĔđĔ2ē2222622`),hl=$c(`02222222222222222222222222222222222222222222222222222222222222222202021422222222CF2200GJ021042222WZ222IL0ad2c10h2222U00X202[^2w0000120zy|}€22ƒ†…:22z22222222222G000q†OVI00000{˜2™<40000Œ›@00000G¦§000ª00000000000000021K¬«00®“000000000000000000000–222›HGH_1¸222½2¾2222ÇÊ000­°2±`),gl=new Int32Array(987),_l=new Int32Array(987),vl=new Int32Array(987),yl=``,bl=new Int32Array(1022);{let e=new Map,t=0,n=0;for(let r=0;r<pl.length;r++)for(let i of fl[hl[r]]){let a=e.get(i);a===void 0&&(a=t++,e.set(i,a),bl[a*2]=yl.length,bl[a*2+1]=i.length,yl+=i),gl[n]=pl[r],_l[n]=ml[r],vl[n]=a,n++}}var xl=$c(`0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p`),Sl=Qc(Zc(`1::24444432:442:44:44>222222:44:4421322511111311111114`)),Cl=$c(`2Š4A;33N=C@H4A;33N=C@<27;83:;8393NQ:3NQʰ222ˉºŴŽ2R2=18cƴÅҜ=cĞÛC1ƈǝȈ:ħ25=11D3A@4=<1;1DEr25;11B3?<6;:371BCn9@7=<8192>2E121@9@EHE@9>2T25511<398454131<=V25511<398454131<=„ƧNž2Đå242L222290000f22500ɛ000ǘ222`),wl=Zc(`ij`),Tl=Zc(`—`),El=Zc(`1`),Dl={GROUP_COUNT:el,customValidatorNames:tl,edgeStart:nl,labelStart:rl,labelText:il,edgeTarget:al,nodeGroup:ol,nodeVlist:dl,vlistPat:sl,vlistOps:cl,vlistRef:ll,vlistGroup:ul,litAnchor:gl,litGroup:_l,litPool:vl,poolOffsets:bl,poolText:yl,adjGid:xl,adjStart:Sl,adjTgt:Cl,patGid:wl,patTgt:Tl,postfixLookupGroups:El,orderSensitiveModifiers:`* ** after backdrop before details-content file first-letter first-line marker placeholder selection`},Ol=`line`in Error(),kl=-1,Al=-1,jl=(e,t,n)=>{let r=2166136261;for(let i=t;i<n;i++)r=Math.imul(r^e.charCodeAt(i),16777619);return r},Ml=(e,t,n)=>{let r=n-t,i=Math.imul(r,2654435761)^e.charCodeAt(t);if(r>3){let a=r>>2,o=r>>1;i=Math.imul(i^e.charCodeAt(t+1)<<8^e.charCodeAt(t+2)<<16^e.charCodeAt(t+a),2246822507),i=Math.imul(i^e.charCodeAt(t+o)<<8^e.charCodeAt(t+o+a)<<16^e.charCodeAt(n-3),3266489909),i^=e.charCodeAt(n-2)<<8^e.charCodeAt(n-1)<<16;for(let r=t+3,a=n-4;r<t+8&&r<a;r++,a--)i=Math.imul(i^e.charCodeAt(r)^e.charCodeAt(a)<<8,16777619)}return i^i>>>15},Nl=(e,t,n={})=>{let{GROUP_COUNT:r,edgeStart:i,labelStart:a,labelText:o,edgeTarget:s,nodeGroup:c,nodeVlist:l,vlistPat:u,vlistOps:d,vlistRef:f,vlistGroup:p,litAnchor:m,litGroup:h,litPool:g,poolOffsets:_,poolText:v,adjGid:y,adjStart:b,adjTgt:x,patGid:S,patTgt:C,postfixLookupGroups:w,customValidatorNames:T,orderSensitiveModifiers:E}=e,D=new Int32Array(r).fill(-1);for(let e=0;e<y.length;e++)D[y[e]]=e;let O=0;for(let e=0;e+1<b.length;e++){let t=b[e+1]-b[e];t>O&&(O=t)}let k=32;for(;k<2*(1+O+S.length);)k<<=1;let A=new Int32Array(f.length+1);for(let e=0;e<f.length;e++)A[e+1]=A[e]+u[f[e]+1]-u[f[e]];let j=new Uint8Array(r);for(let e=0;e<w.length;e++)j[w[e]]=1;let M=i.length-1,N=new Uint8Array(M),P=0,F=!0;for(let e=0;e<m.length;e++){N[m[e]]=1;let t=_[g[e]*2+1];t>P&&(P=t);let n=v.charCodeAt(_[g[e]*2]);(n===91||n===40)&&(F=!1)}let I=1;for(;I<m.length*2;)I<<=1;let L=new Int32Array(I).fill(-1);for(let e=0;e<m.length;e++){let t=_[g[e]*2],n=(jl(v,t,t+_[g[e]*2+1])^Math.imul(m[e],2654435761)|0)&I-1;for(;L[n]!==-1;)n=n+1&I-1;L[n]=e}let R=(e,t,n,r)=>{let i=(jl(t,n,r)^Math.imul(e,2654435761)|0)&I-1,a=r-n;for(;;){let r=L[i];if(r===-1)return-1;if(m[r]===e&&_[g[r]*2+1]===a){let e=_[g[r]*2],i=!0;for(let r=0;r<a;r++)if(v.charCodeAt(e+r)!==t.charCodeAt(n+r)){i=!1;break}if(i)return h[r]}i=i+1&I-1}},z=n.cacheSize??8192,B=n.prefix??e.prefix??``,V=B===``?``:B+`:`,H=V.length,U=(T??[]).map(e=>{let n=t&&t[e];if(!n)throw Error(`cn: missing validator `+e);return n}),ee=/\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$/,te=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ne=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,W=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,re=0,ie=-1,ae=-1,G=-1,K=-1,q=e=>e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95,oe=e=>/\s/.test(String.fromCharCode(e)),J=(e,t,n)=>{if(re=0,ie=-1,n-t<3)return;let r=e.charCodeAt(t),i=e.charCodeAt(n-1);if(r===91&&i===93)re=1;else if(r===40&&i===41)re=2;else return;G=t+1,K=n-1;let a=t+1;if(q(e.charCodeAt(a))){for(a++;a<n-1;){let t=e.charCodeAt(a);if(!q(t)&&t!==45)break;a++}a<n-2&&e.charCodeAt(a)===58&&(ie=t+1,ae=a,G=a+1)}},se=(e,t,n,r)=>{if(n-t!==r.length)return!1;for(let n=0;n<r.length;n++)if(e.charCodeAt(t+n)!==r.charCodeAt(n))return!1;return!0},ce=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,le=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ue=e=>!!e&&!Number.isNaN(Number(e)),de=(e,t,n)=>{if(n-t<11||!se(e,t,t+10,`@container`))return!1;if(e.charCodeAt(t+10)===47)return n-t>=12;let r=e.charCodeAt(t+11);return r===115&&n-t>=17&&se(e,t+10,t+16,`-size/`)||r===110&&n-t>=19&&se(e,t+10,t+18,`-normal/`)},fe=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],pe=`length|number|number weight|family-name|position percentage|length size bg-size|image url|shadow|length|family-name|position percentage|length size bg-size|image url|shadow|number weight`.split(`|`).map(e=>e.split(` `)),me=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],he=(e,t,n,r)=>{if(e>=10){if(e>=25)return U[e-25](t.slice(n,r));let i=e-10;if(re!==fe[i])return!1;if(ie>=0){for(let e of pe[i])if(se(t,ie,ae,e))return!0;return!1}switch(me[i]){case 0:return!1;case 1:return!0;case 2:{let e=t.slice(G,K);return ee.test(e)&&!te.test(e)}case 3:return ue(t.slice(G,K));case 4:return W.test(t.slice(G,K));default:return ne.test(t.slice(G,K))}}switch(e){case 0:return!0;case 1:return re===0;case 2:return re===1;case 3:return re===2;case 4:return ce.test(t.slice(n,r));case 5:return ue(t.slice(n,r));case 6:{let e=t.slice(n,r);return!!e&&Number.isInteger(Number(e))}case 7:return r>n&&t.charCodeAt(r-1)===37&&ue(t.slice(n,r-1));case 8:return le.test(t.slice(n,r));default:return de(t,n,r)}},ge=new Set(typeof E==`string`?E.split(` `):E),_e=(e,t,n,r,i,a)=>{let o=jl(t,n,r)^(i?2654435769:0),s=e.get(o);if(s!==void 0)outer:for(let e=0;e<s.length;e++){let a=s[e];if(a.imp===i&&a.k.length===r-n){for(let e=0;e<a.k.length;e++)if(a.k.charCodeAt(e)!==t.charCodeAt(n+e))continue outer;return a.id}}else e.set(o,s=[]);let c=t.slice(n,r),l=a(c);return s.push({k:c,imp:i,id:l}),l},ve=new Map,ye=new Map,be=2,xe=4096,Se=(e,t)=>{let n=[],r=0,i=0,a=0;for(let t=0;t<e.length;t++){let o=e.charCodeAt(t);r===0&&i===0&&o===58?(n.push(e.slice(a,t)),a=t+1):o===91?r++:o===93?r--:o===40?i++:o===41&&i--}n.push(e.slice(a));let o=n[0];if(n.length>1){let e=[],t=[];for(let r of n)r.charCodeAt(0)===91||ge.has(r)?(t.length&&(e.push(...t.sort()),t=[]),e.push(r)):t.push(r);t.length&&e.push(...t.sort()),o=e.join(`:`)}let s=t?o+` !`:o,c=ye.get(s);return c===void 0&&ye.set(s,c=be++),c},Ce=new Map,we=r,Te=r+4096,Ee=()=>we++,De=2097152,Oe=8192,ke=new Int32Array(Oe),Ae=Array(Oe).fill(null),je=new Int32Array(Oe),Me=new Int32Array(Oe),Ne=new Uint8Array(Oe),Pe=0,Fe=(e,t,n,r,i,a,o,s)=>{let c=e;if(Ae[e]!==null){if(Ae[e|1]===null)c=e|1;else if(!(Pe++&3))c=e|Pe>>2&1;else return}Ae[c]=t.slice(n,r),ke[c]=i,je[c]=a,Me[c]=o,Ne[c]=s},Ie=()=>Ae.fill(null),Le=256,Re=[new Int32Array(Le),new Int32Array(Le),new Int32Array(Le),new Int32Array(Le)],[ze,Be,Ve,He]=Re,Ue=new Uint8Array(Le),We=new Uint8Array(Le),Ge=()=>{Le*=2,Re=Re.map(e=>{let t=new Int32Array(Le);return t.set(e),t}),[ze,Be,Ve,He]=Re;let e=new Uint8Array(Le);e.set(Ue),Ue=e,We=new Uint8Array(Le)},Ke=64,qe=new Int32Array(Ke),Je=new Int32Array(Ke),Ye=new Int32Array(r),Xe=2048,Ze=21,Qe=new Float64Array(Xe),$e=new Int32Array(Xe),et=0,tt=(e,t)=>{if(e===0&&t<r)return Ye[t]===et?1:(Ye[t]=et,0);let n=e*2097152+t+1,i=Math.imul(n,2654435761)>>>Ze;for(;$e[i]===et;){if(Qe[i]===n)return 1;i=i+1&Xe-1}return Qe[i]=n,$e[i]=et,0},nt=(e,t,n,r,i)=>{if(n-t>=2&&e.charCodeAt(t)===91&&e.charCodeAt(n-1)===93){let r=-1;for(let i=t+1;i<n-1;i++)if(e.charCodeAt(i)===58){r=i;break}return r===-1||r===t+1?kl:_e(Ce,e,t+1,r,0,Ee)}if(r>=0&&c[r]>=0)return c[r];for(let t=i-1;t>=0;t--){let r=Je[t];if(r>n)continue;let i=qe[t],a=n-r;if(N[i]===1&&a>0&&a<=P){let t=e.charCodeAt(r);if(F===!1||t!==91&&t!==40){let t=R(i,e,r,n);if(t>=0)return t}}let o=l[i];if(o<0)continue;let s=f[o],c=u[s],m=u[s+1];if(c===m)continue;J(e,r,n);let h=A[o]-c;for(let t=c;t<m;t++)if(he(d[t],e,r,n))return p[h+t]}return kl},rt=e=>{let t=e.length,n=0,c=0,u=!1;(be>xe||ve.size>xe)&&(ve=new Map,ye=new Map,be=2,Ie()),we>Te&&(Ce=new Map,we=r,Ie());let d=0;for(;d<t;){let f=e.charCodeAt(d);if(f===32||f>=9&&f<=13||f>=160&&oe(f)){f!==32&&(u=!0),d++;continue}let p=d,m=0;for(;d<t;){if(f=e.charCodeAt(d),f<=32){if(f===32)break;if(f>=9&&f<=13){u=!0;break}}else if(f>=160&&oe(f)){u=!0;break}m=Math.imul(m^f,16777619),d++}let h=d,g=h-p;n===Le&&Ge();let _=n++;ze[_]=p,Be[_]=h,c+=g,m^=Math.imul(g,2654435761);let v=m^m>>>15,y=v&8190;{let t=-1;if(ke[y]===v&&Ae[y]!==null&&Ae[y].length===g?t=y:ke[y|1]===v&&Ae[y|1]!==null&&Ae[y|1].length===g&&(t=y|1),t>=0){let n=Ae[t],r=!0;for(let t=0;t<g;t++)if(n.charCodeAt(t)!==e.charCodeAt(p+t)){r=!1;break}if(r){Ve[_]=je[t],He[_]=Me[t],Ue[_]=Ne[t];continue}}}let b=p;if(H!==0){if(h-p<=H||!e.startsWith(V,p)){Ve[_]=kl,Fe(y,e,p,h,v,kl,0,0);continue}b=p+H}let x=0,S=0,C=-1,w=-1;for(let t=b;t<h;t++){let n=e.charCodeAt(t);if(x===0&&S===0){if(n===58){C=t;continue}if(n===47){w=t;continue}}n===91?x++:n===93?x--:n===40?S++:n===41&&S--}let T=C>=b?C+1:b,E=T,D=h,O=!1,k=0;D>E&&e.charCodeAt(D-1)===33?(O=!0,D--):D>E&&e.charCodeAt(E)===33&&(O=!0,E++,k=1);let A=-1;w>T&&(A=w+k,A>=D&&(A=-1));let M=E;D-E>1&&e.charCodeAt(E)===45&&(M=E+1);let P=0,F=0,I=0,L=-1,R=0;(l[0]>=0||N[0]===1)&&(qe[0]=0,Je[0]=M,R=1);let z=Al,B=0;for(let t=M;t<D;t++)if(t===A&&(z=F<I?Al:P,B=R),P!==Al){let n=e.charCodeAt(t),r=-1;if(F<I)o.charCodeAt(F)===n?(F++,F===I&&(r=P=L)):P=Al;else{let e=i[P],t=i[P+1],c=Al;for(let i=e;i<t;i++){let e=a[i];if(o.charCodeAt(e)===n){a[i+1]-e===1?r=c=s[i]:(F=e+1,I=a[i+1],L=s[i],c=P);break}}P=c}if(r>=0&&(l[r]>=0||N[r]===1)&&t+1<D&&e.charCodeAt(t+1)===45){if(R===Ke){Ke*=2;let e=new Int32Array(Ke);e.set(qe),qe=e;let t=new Int32Array(Ke);t.set(Je),Je=t}qe[R]=r,Je[R]=t+2,R++}}A===D&&(z=F<I?Al:P,B=R);let U=F<I?Al:P,ee,te=!1;if(A>=0){if(te=!0,ee=nt(e,E,A,z,B),ee!==kl&&ee<r&&j[ee]){let t=nt(e,E,D,U,R);t!==kl&&t!==ee&&(ee=t,te=!1)}else ee===kl&&(ee=nt(e,E,D,U,R),te=!1)}else ee=nt(e,E,D,U,R);let ne=0,W=0;ee===kl?Ve[_]=kl:(W=+!!te,ne=b>=C?+!!O:_e(ve,e,b,C,+!!O,e=>Se(e,O)),Ve[_]=ee,Ue[_]=W,He[_]=ne),Fe(y,e,p,h,v,ee,ne,W)}if(n===0)return``;if(n===1)return ze[0]===0&&Be[0]===t?e:e.slice(ze[0],Be[0]);if(n*k>Xe){for(;n*k>Xe;)Xe<<=1,Ze--;Qe=new Float64Array(Xe),$e=new Int32Array(Xe)}if(be>=De||we>=De)throw Error(`cn: too many distinct classes in one merge`);et=et+1|0,et===0&&(Ye.fill(0),$e.fill(0),et=1);let f=!1;for(let e=n-1;e>=0;e--){let t=Ve[e];if(t===kl){We[e]=1;continue}let n=He[e];if(tt(n,t)===1)We[e]=0,f=!0;else if(We[e]=1,t<r){let r=D[t];if(r>=0)for(let e=b[r];e<b[r+1];e++)tt(n,x[e]);if(Ue[e]&1)for(let e=0;e<S.length;e++)S[e]===t&&tt(n,C[e])}}if(!f&&!u&&t===c+n-1)return e;let p=``,m=0;for(;m<n;){if(!We[m]){m++;continue}let t=ze[m],r=Be[m],i=m+1;for(;i<n&&We[i]&&ze[i]===r+1&&e.charCodeAt(r)===32;)r=Be[i],i++;p.length>0&&(p+=` `),p+=e.slice(t,r),m=i}return p},it=16384,at=new Int32Array(it*2),ot=0,st=1,ct=Object.create(null),lt=Object.create(null),ut=new Map,dt=new Map,ft=0,pt=0,mt=()=>{ot^=it,st=st+1|0,pt=0},ht=e=>{let t=ct[e];if(t!==void 0)return t;let n=Ml(e,0,e.length),r=(n&16383)+ot,i=at[r]===(n^st)||at[r^it]===(n^st-1);return i&&(t=lt[e],t!==void 0)?(ct[e]=t,t):(t=rt(e),i?(ct[e]=t,++ft>z&&(ft=0,lt=ct,ct=Object.create(null),mt())):(at[r]=n^st,++pt>it&&mt()),t)},gt=e=>{let t=ut.get(e);if(t!==void 0)return t;let n=Ml(e,0,e.length),r=(n&16383)+ot,i=at[r]===(n^st)||at[r^it]===(n^st-1);return i&&(t=dt.get(e),t!==void 0)?(ut.set(e,t),t):(t=rt(e),i?(ut.set(e,t),++ft>z&&(ft=0,dt=ut,ut=new Map,mt())):(at[r]=n^st,++pt>it&&mt()),t)},_t=e=>{let t=Ml(e,0,e.length),n=(t&16383)+ot;return at[n]===(t^st)||at[n^it]===(t^st-1)||(at[n]=t^st,++pt>it&&mt(),!1)},vt=z===0?rt:Ol?e=>{let t=ut.get(e);return t===void 0?gt(e):t}:ht;return{merge:function(){return arguments.length===1&&typeof arguments[0]==`string`?vt(arguments[0]):vt(Il.apply(null,arguments))},mergeString:vt,seenBefore:z===0?()=>!1:_t,mergeUncached:rt}},Pl=(e,t)=>{if(!e)return``;if(typeof e==`string`)return e;let n=``;if(typeof e.length==`number`&&(!t||Array.isArray(e))){let r=e;for(let e=0;e<r.length;e++){let i=r[e];if(!i)continue;let a=typeof i==`string`?i:Pl(i,t);a&&(n&&(n+=` `),n+=a)}return n}if(t){if(typeof e==`number`)return``+e;if(typeof e==`object`)for(let t in e)e[t]&&(n&&(n+=` `),n+=t)}return n},Fl=(e,t)=>{let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(!i)continue;let a=typeof i==`string`?i:Pl(i,t);a&&(n&&(n+=` `),n+=a)}return n},Il=function(){return Fl(arguments,!1)},Ll=256,Rl=16,zl=1024,Bl=4096,Vl=(e,t)=>{let n=t===void 0?()=>!0:t.seenBefore,r=t===void 0?e:t.mergeUncached,i=new Map,a=new Map,o=0,s=null,c=null,l=[],u=[],d=0,f=(t,n,r)=>{c===null&&(c=Array(Bl).fill(``),l=Array(Bl).fill(``),u=Array(Bl).fill(``));let i=Ml(t,0,t.length)&4094;if(c[i]===t&&l[i]===n)return u[i];if(c[i|1]===t&&l[i|1]===n)return u[i|1];let a=e(r?n+` `+t:t),o=c[i]===``?i:i|(c[i|1]===``?1:d++&1);return c[o]=t,l[o]=n,u[o]=a,a},p=(e,t,n,r)=>{let i=0;if(t){if(t!==e.a0)return!1;i=1}if(n){if(n!==(i===0?e.a0:e.a1))return!1;i++}if(r){if(r!==(i===0?e.a0:i===1?e.a1:e.a2))return!1;i++}return i===e.t},m=(e,t)=>{let n=e.a,r=0;for(let e=0;e<t.length;e++){let i=t[e];if(i){if(i!==n[r])return!1;r++}}return r===e.t},h=(t,c)=>{let l=t.length,u=s===null?null:s.n;if(!c){if(u!==null&&m(u,t))return s=u,u.r;if(s!==null&&s!==u&&m(s,t))return s.r}let d=``,p=-1,h=0,g=!1;for(let e=0;e<l;e++){let n=t[e];if(n){if(typeof n!=`string`){if(n=t[e]=Pl(n,!0),!n)continue;g=!0}p<0&&(d=n,p=e),h++}}if(h===0)return``;if(h===1)return e(d);if(g){if(u!==null&&m(u,t))return s=u,u.r;if(s!==null&&s!==u&&m(s,t))return s.r}let _=i.get(d);_===void 0&&(_=a.get(d),_!==void 0&&i.set(d,_));let v=null;if(_!==void 0){if(_.skip>0){_.skip--,s=null;let e=d;for(let n=p+1;n<l;n++){let r=t[n];r&&(e+=` `+r)}return f(e,``,!1)}let e=_.e;outer:for(let n=0;n<e.length;n++){let r=e[n];if(r.t!==h)continue;let i=r.a,a=1;for(let e=p+1;e<l;e++){let n=t[e];if(n&&n!==i[a++])continue outer}v=r;break}v!==null&&(_.miss=0)}if(v===null){let s=d,c=[d];for(let e=p+1;e<l;e++){let n=t[e];n&&(s+=` `+n,c.push(n))}if(!n(s))return r(s);v={r:e(s),t:c.length,a0:c[0],a1:c[1],a2:c[2]??``,a:c,n:null},_===void 0?i.set(d,_={e:[],miss:0,skip:0,at:0}):++_.miss>Rl&&(_.miss=Rl,_.skip=zl,_.e.length=0,_.at=0);let u=_.e;u.length<Ll?u.push(v):(u[_.at]=v,_.at=_.at+1&255),++o>1e3&&(o=0,a=i,i=new Map)}return s!==null&&s!==v&&(s.n=v),s=v,v.r},g=t=>Array.isArray(t)?h(t.slice(),!1):e(Pl(t,!0));return function(t,n,r){let a=arguments.length;if((a|1)==3){let e=s;if(e!==null){let i=e.n;if(i!==null&&p(i,t,n,r))return s=i,i.r;if(e!==i&&p(e,t,n,r))return e.r}if(a===2&&typeof n==`string`&&n!==``){let e=i.get(t);if(e!==void 0&&e.skip>0)return e.skip--,s=null,f(n,t,!0)}return h([t,n,r],!0)}if(a===1)return typeof t==`string`?e(t):g(t);let o=s;if(o!==null){let e=o.n;if(e!==null){let t=e.a,n=0,r=!0;for(let e=0;e<a;e++){let i=arguments[e];if(i){if(i!==t[n]){r=!1;break}n++}}if(r&&n===e.t)return s=e,e.r}if(o!==e){let e=o.a,t=0,n=!0;for(let r=0;r<a;r++){let i=arguments[r];if(i){if(i!==e[t]){n=!1;break}t++}}if(n&&t===o.t)return o.r}}let c=[];for(let e=0;e<a;e++)c.push(arguments[e]);return h(c,!0)}},Hl=Nl(Dl),X=Vl(Hl.mergeString,Hl);Hl.merge;function Ul({delay:e=0,...t}){return(0,S.jsx)(Gc,{"data-slot":`tooltip-provider`,delay:e,...t})}function Wl({...e}){return(0,S.jsx)(sc,{"data-slot":`tooltip`,...e})}function Gl({...e}){return(0,S.jsx)(mc,{"data-slot":`tooltip-trigger`,...e})}function Kl({className:e,side:t=`top`,sideOffset:n=4,align:r=`center`,alignOffset:i=0,children:a,...o}){return(0,S.jsx)(vc,{children:(0,S.jsx)(Hc,{align:r,alignOffset:i,side:t,sideOffset:n,className:`isolate z-50`,children:(0,S.jsxs)(Uc,{"data-slot":`tooltip-content`,className:X(`z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...o,children:[a,(0,S.jsx)(Wc,{className:`z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5`})]})})})}var ql=new Set;function Jl(){for(let e of ql)e.isOpen&&e.close()}function Yl(e){return(0,v.useEffect)(()=>{function e(){document.hidden&&Jl()}return window.addEventListener(`blur`,Jl),document.addEventListener(`visibilitychange`,e),()=>{window.removeEventListener(`blur`,Jl),document.removeEventListener(`visibilitychange`,e)}},[]),(0,S.jsx)(Ul,{...e})}function Xl(e){let[t]=(0,v.useState)(Yc);return(0,v.useEffect)(()=>(ql.add(t),()=>{ql.delete(t)}),[t]),(0,S.jsx)(Wl,{handle:t,...e})}var Zl=`factory.theme`,Ql=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function $l(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:Ql(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var eu=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},tu=e=>{let t=eu(e);return t.charAt(0).toUpperCase()+t.slice(1)},nu=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),ru={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function iu(e){return e!=null}function au(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??ru.width,a=e.size??e.height??ru.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?nu(...c):nu(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??ru[`stroke-width`])*Number(e.size??e.width??ru.width)/Number(t.size??t.width??ru.width):t.strokeWidth??ru[`stroke-width`];return[`svg`,{...Object.entries(ru).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&iu(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&iu(t.width)&&{[r(`width`)]:t.width},...`height`in t&&iu(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function ou(e,t={}){return au(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var su=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},cu=(0,v.createContext)({}),lu=()=>(0,v.useContext)(cu),uu=(0,v.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:h=!1,nonScalingStroke:g=!1,color:_=`currentColor`,className:y=``}=lu()??{},b=!!c||su(d),[x,S,C=[]]=ou(u,{color:e??_,width:n??t??p,height:r??t??p,strokeWidth:i??m,absoluteStrokeWidth:a??h,nonScalingStroke:o??g,className:nu(y,s),hasA11yProp:b,attributes:d});return(0,v.createElement)(x,{ref:f,...S},[...C.map(([e,t])=>(0,v.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function du(e,t=[],n=[]){let r=typeof e==`string`?$l(e,t,n):e,i=(0,v.forwardRef)(({className:e,...t},n)=>(0,v.createElement)(uu,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=tu(r.name)),i}var fu={name:`arrow-down`,size:24,node:[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]};fu.node;var pu=du(fu),mu={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]};mu.node;var hu=du(mu),gu={name:`brain`,size:24,node:[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 01-3-4 4.17 4.17 0 01-3 4`,key:`5nuw1p`}],[`path`,{d:`M17.707 6.294A3 3 0 1012 5a3 3 0 10-5.707 1.294`,key:`18ldcf`}],[`path`,{d:`M17.996 5.125a4 4 0 012.526 5.77`,key:`1sdu8q`}],[`path`,{d:`M18 18a4 4 0 002-7.465`,key:`7xqqvr`}],[`path`,{d:`M19.967 17.482a4 4 0 11-7.967.517 4 4 0 11-7.967-.517`,key:`t46ysz`}],[`path`,{d:`M6 18a4 4 0 01-2-7.465`,key:`1y2m15`}],[`path`,{d:`M6.004 5.125a4 4 0 00-2.526 5.77`,key:`3cw1ss`}]]};gu.node;var _u=du(gu),vu={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};vu.node;var yu=du(vu),bu={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};bu.node;var xu=du(bu),Su={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};Su.node;var Cu=du(Su),wu={name:`chevron-up`,size:24,node:[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]};wu.node;var Tu=du(wu),Eu={name:`circle-check`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-circle-2`]};Eu.node;var Du=du(Eu),Ou={name:`circle-dashed`,size:24,node:[[`path`,{d:`M10.1 2.182a10 10 0 0 1 3.8 0`,key:`5ilxe3`}],[`path`,{d:`M13.9 21.818a10 10 0 0 1-3.8 0`,key:`11zvb9`}],[`path`,{d:`M17.609 3.721a10 10 0 0 1 2.69 2.7`,key:`1iw5b2`}],[`path`,{d:`M2.182 13.9a10 10 0 0 1 0-3.8`,key:`c0bmvh`}],[`path`,{d:`M20.279 17.609a10 10 0 0 1-2.7 2.69`,key:`1ruxm7`}],[`path`,{d:`M21.818 10.1a10 10 0 0 1 0 3.8`,key:`qkgqxc`}],[`path`,{d:`M3.721 6.391a10 10 0 0 1 2.7-2.69`,key:`1mcia2`}],[`path`,{d:`M6.391 20.279a10 10 0 0 1-2.69-2.7`,key:`1fvljs`}]]};Ou.node;var ku=du(Ou),Au={name:`circle-x`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]],aliases:[`x-circle`]};Au.node;var ju=du(Au),Mu={name:`circle`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};Mu.node;var Nu=du(Mu),Pu={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};Pu.node;var Fu=du(Pu),Iu={name:`folder-git-2`,size:24,node:[[`path`,{d:`M18 19a5 5 0 0 1-5-5v8`,key:`sz5oeg`}],[`path`,{d:`M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5`,key:`1w6njk`}],[`circle`,{cx:`13`,cy:`12`,r:`2`,key:`1j92g6`}],[`circle`,{cx:`20`,cy:`19`,r:`2`,key:`1obnsp`}]]};Iu.node;var Lu=du(Iu),Ru={name:`git-pull-request`,size:24,node:[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`line`,{x1:`6`,x2:`6`,y1:`9`,y2:`21`,key:`rroup`}]]};Ru.node;var zu=du(Ru),Bu={name:`globe`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]};Bu.node;var Vu=du(Bu),Hu={name:`inbox`,size:24,node:[[`polyline`,{points:`22 12 16 12 14 15 10 15 8 12 2 12`,key:`o97t9d`}],[`path`,{d:`M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`oot6mr`}]]};Hu.node;var Uu=du(Hu),Wu={name:`info`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]};Wu.node;var Gu=du(Wu),Ku={name:`list-ordered`,size:24,node:[[`path`,{d:`M11 5h10`,key:`1cz7ny`}],[`path`,{d:`M11 12h10`,key:`1438ji`}],[`path`,{d:`M11 19h10`,key:`11t30w`}],[`path`,{d:`M4 4h1v5`,key:`10yrso`}],[`path`,{d:`M4 9h2`,key:`r1h2o0`}],[`path`,{d:`M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02`,key:`xtkcd5`}]]};Ku.node;var qu=du(Ku),Ju={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};Ju.node;var Yu=du(Ju),Xu={name:`message-circle`,size:24,node:[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}]]};Xu.node;var Zu=du(Xu),Qu={name:`package-check`,size:24,node:[[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`path`,{d:`m16 17 2 2 4-4`,key:`uh5qu3`}],[`path`,{d:`M21 11.127V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.729l7 4a2 2 0 0 0 2 .001l1.32-.753`,key:`kpkbpo`}],[`path`,{d:`M3.29 7 12 12l8.71-5`,key:`19ckod`}],[`path`,{d:`m7.5 4.27 8.997 5.148`,key:`9yrvtv`}]]};Qu.node;var $u=du(Qu),ed={name:`palette`,size:24,node:[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]};ed.node;var td=du(ed),nd={name:`panel-right-close`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m8 9 3 3-3 3`,key:`12hl5m`}]]};nd.node;var rd=du(nd),id={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};id.node;var ad=du(id),od={name:`refresh-cw`,size:24,node:[[`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`}]]};od.node;var sd=du(od),cd={name:`rotate-ccw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]};cd.node;var ld=du(cd),ud={name:`settings-2`,size:24,node:[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]};ud.node;var dd=du(ud),fd={name:`square`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]};fd.node;var pd=du(fd),md={name:`star`,size:24,node:[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]};md.node;var hd=du(md),gd={name:`text-quote`,size:24,node:[[`path`,{d:`M17 5H3`,key:`1cn7zz`}],[`path`,{d:`M21 12H8`,key:`scolzb`}],[`path`,{d:`M21 19H8`,key:`13qgcb`}],[`path`,{d:`M3 12v7`,key:`1ri8j3`}]]};gd.node;var _d=du(gd),vd={name:`wrench`,size:24,node:[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]};vd.node;var yd=du(vd),bd={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};bd.node;var xd=du(bd);async function Sd(e,t,n){let r=await fetch(t,{method:e,body:n===void 0?void 0:JSON.stringify(n)}),i=await r.json();if(!r.ok)throw Error(i.error);return i}var Cd={candidates:()=>Sd(`GET`,`/api/candidates`),refreshCandidates:()=>Sd(`POST`,`/api/candidates/refresh`),plays:()=>Sd(`GET`,`/api/plays`),prompt:e=>Sd(`POST`,`/api/candidates/prompt`,{repo:e.repo,id:e.id}),repos:()=>Sd(`GET`,`/api/repos`),clone:(e,t)=>Sd(`POST`,`/api/repos/clone`,{name:e,folder:t}),queue:(e,t)=>Sd(`POST`,`/api/jobs`,{items:e,pin:t}),remove:e=>Sd(`POST`,`/api/jobs/${e}/remove`),retry:e=>Sd(`POST`,`/api/jobs/${e}/retry`),prDetails:e=>Sd(`GET`,`/api/jobs/${e}/pr`),merge:e=>Sd(`POST`,`/api/jobs/${e}/merge`),rebase:e=>Sd(`POST`,`/api/jobs/${e}/rebase`),mergeTrain:e=>Sd(`POST`,`/api/train`,{ids:e}),close:e=>Sd(`POST`,`/api/jobs/${e}/close`),move:(e,t)=>Sd(`POST`,`/api/jobs/${e}/move`,{index:t}),models:()=>Sd(`GET`,`/api/models`),saveSettings:e=>Sd(`PUT`,`/api/settings`,e),turnOn:e=>Sd(`POST`,`/api/on`,e),turnOff:()=>Sd(`POST`,`/api/off`),chat:e=>Sd(`POST`,`/api/chat`,{message:e}),abortChat:()=>Sd(`POST`,`/api/chat/abort`),answerChat:e=>Sd(`POST`,`/api/chat/answer`,e),resetChat:()=>Sd(`POST`,`/api/chat/reset`)};function wd(){let[e,t]=(0,v.useState)(),[n,r]=(0,v.useState)(),i=(0,v.useCallback)(()=>Sd(`GET`,`/api/state`).then(t,e=>r(`Can't reach factory serve: ${e.message}`)),[]);return(0,v.useEffect)(()=>{let e=()=>void Sd(`GET`,`/api/state`).then(t,e=>r(`Can't reach factory serve: ${e.message}`));e();let n=setInterval(e,3e3);return()=>clearInterval(n)},[]),{snapshot:e,error:n,act:(0,v.useCallback)(async e=>{try{await e(),r(void 0)}catch(e){r(e.message)}await i()},[i])}}function Td(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Ed=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Dd=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Od={};function kd(e,t){return((t||Od).jsx?Dd:Ed).test(e)}var Ad=/[ \t\n\f\r]/g;function jd(e){return typeof e==`object`?e.type===`text`&&Md(e.value):Md(e)}function Md(e){return e.replace(Ad,``)===``}var Nd=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Nd.prototype.normal={},Nd.prototype.property={},Nd.prototype.space=void 0;function Pd(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Nd(n,r,t)}function Fd(e){return e.toLowerCase()}var Id=class{constructor(e,t){this.attribute=t,this.property=e}};Id.prototype.attribute=``,Id.prototype.booleanish=!1,Id.prototype.boolean=!1,Id.prototype.commaOrSpaceSeparated=!1,Id.prototype.commaSeparated=!1,Id.prototype.defined=!1,Id.prototype.mustUseProperty=!1,Id.prototype.number=!1,Id.prototype.overloadedBoolean=!1,Id.prototype.property=``,Id.prototype.spaceSeparated=!1,Id.prototype.space=void 0;var Ld=s({boolean:()=>zd,booleanish:()=>Bd,commaOrSpaceSeparated:()=>Wd,commaSeparated:()=>Ud,number:()=>Z,overloadedBoolean:()=>Vd,spaceSeparated:()=>Hd}),Rd=0,zd=Gd(),Bd=Gd(),Vd=Gd(),Z=Gd(),Hd=Gd(),Ud=Gd(),Wd=Gd();function Gd(){return 2**++Rd}var Kd=Object.keys(Ld),qd=class extends Id{constructor(e,t,n,r){let i=-1;if(super(e,t),Jd(this,`space`,r),typeof n==`number`)for(;++i<Kd.length;){let e=Kd[i];Jd(this,Kd[i],(n&Ld[e])===Ld[e])}}};qd.prototype.defined=!0;function Jd(e,t,n){n&&(e[t]=n)}function Yd(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new qd(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Fd(r)]=r,n[Fd(a.attribute)]=r}return new Nd(t,n,e.space)}var Xd=Yd({properties:{ariaActiveDescendant:null,ariaAtomic:Bd,ariaAutoComplete:null,ariaBusy:Bd,ariaChecked:Bd,ariaColCount:Z,ariaColIndex:Z,ariaColSpan:Z,ariaControls:Hd,ariaCurrent:null,ariaDescribedBy:Hd,ariaDetails:null,ariaDisabled:Bd,ariaDropEffect:Hd,ariaErrorMessage:null,ariaExpanded:Bd,ariaFlowTo:Hd,ariaGrabbed:Bd,ariaHasPopup:null,ariaHidden:Bd,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Hd,ariaLevel:Z,ariaLive:null,ariaModal:Bd,ariaMultiLine:Bd,ariaMultiSelectable:Bd,ariaOrientation:null,ariaOwns:Hd,ariaPlaceholder:null,ariaPosInSet:Z,ariaPressed:Bd,ariaReadOnly:Bd,ariaRelevant:null,ariaRequired:Bd,ariaRoleDescription:Hd,ariaRowCount:Z,ariaRowIndex:Z,ariaRowSpan:Z,ariaSelected:Bd,ariaSetSize:Z,ariaSort:null,ariaValueMax:Z,ariaValueMin:Z,ariaValueNow:Z,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Zd(e,t){return t in e?e[t]:t}function Qd(e,t){return Zd(e,t.toLowerCase())}var $d=Yd({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Ud,acceptCharset:Hd,accessKey:Hd,action:null,allow:null,allowFullScreen:zd,allowPaymentRequest:zd,allowUserMedia:zd,alpha:zd,alt:null,as:null,async:zd,autoCapitalize:null,autoComplete:Hd,autoFocus:zd,autoPlay:zd,blocking:Hd,capture:null,charSet:null,checked:zd,cite:null,className:Hd,closedBy:null,colorSpace:null,cols:Z,colSpan:Z,command:null,commandFor:null,content:null,contentEditable:Bd,controls:zd,controlsList:Hd,coords:Z|Ud,crossOrigin:null,data:null,dateTime:null,decoding:null,default:zd,defer:zd,dir:null,dirName:null,disabled:zd,download:Vd,draggable:Bd,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:zd,formTarget:null,headers:Hd,height:Z,hidden:Vd,high:Z,href:null,hrefLang:null,htmlFor:Hd,httpEquiv:Hd,id:null,imageSizes:null,imageSrcSet:null,inert:zd,inputMode:null,integrity:null,is:null,isMap:zd,itemId:null,itemProp:Hd,itemRef:Hd,itemScope:zd,itemType:Hd,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:zd,low:Z,manifest:null,max:null,maxLength:Z,media:null,method:null,min:null,minLength:Z,multiple:zd,muted:zd,name:null,nonce:null,noModule:zd,noValidate:zd,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:zd,optimum:Z,pattern:null,ping:Hd,placeholder:null,playsInline:zd,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:zd,referrerPolicy:null,rel:Hd,required:zd,reversed:zd,rows:Z,rowSpan:Z,sandbox:Hd,scope:null,scoped:zd,seamless:zd,selected:zd,shadowRootClonable:zd,shadowRootCustomElementRegistry:zd,shadowRootDelegatesFocus:zd,shadowRootMode:null,shadowRootSerializable:zd,shape:null,size:Z,sizes:null,slot:null,span:Z,spellCheck:Bd,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Z,step:null,style:null,tabIndex:Z,target:null,title:null,translate:null,type:null,typeMustMatch:zd,useMap:null,value:Bd,width:Z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Hd,axis:null,background:null,bgColor:null,border:Z,borderColor:null,bottomMargin:Z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:zd,declare:zd,event:null,face:null,frame:null,frameBorder:null,hSpace:Z,leftMargin:Z,link:null,longDesc:null,lowSrc:null,marginHeight:Z,marginWidth:Z,noResize:zd,noHref:zd,noShade:zd,noWrap:zd,object:null,profile:null,prompt:null,rev:null,rightMargin:Z,rules:null,scheme:null,scrolling:Bd,standby:null,summary:null,text:null,topMargin:Z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Z,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:zd,disablePictureInPicture:zd,disableRemotePlayback:zd,exportParts:Ud,part:Hd,prefix:null,property:null,results:Z,security:null,unselectable:null},space:`html`,transform:Qd}),ef=Yd({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:Wd,accentHeight:Z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Z,amplitude:Z,arabicForm:null,ascent:Z,attributeName:null,attributeType:null,azimuth:Z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Z,by:null,calcMode:null,capHeight:Z,className:Hd,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Z,diffuseConstant:Z,direction:null,display:null,dur:null,divisor:Z,dominantBaseline:null,download:zd,dx:null,dy:null,edgeMode:null,editable:null,elevation:Z,enableBackground:null,end:null,event:null,exponent:Z,externalResourcesRequired:null,fill:null,fillOpacity:Z,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ud,g2:Ud,glyphName:Ud,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Z,horizOriginX:Z,horizOriginY:Z,id:null,ideographic:Z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Z,k:Z,k1:Z,k2:Z,k3:Z,k4:Z,kernelMatrix:Wd,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Z,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Z,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Z,overlineThickness:Z,paintOrder:null,panose1:null,path:null,pathLength:Z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Hd,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Z,pointsAtY:Z,pointsAtZ:Z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Wd,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Wd,rev:Wd,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Wd,requiredFeatures:Wd,requiredFonts:Wd,requiredFormats:Wd,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Z,specularExponent:Z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Z,strikethroughThickness:Z,string:null,stroke:null,strokeDashArray:Wd,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Z,strokeOpacity:Z,strokeWidth:null,style:null,surfaceScale:Z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Wd,tabIndex:Z,tableValues:null,target:null,targetX:Z,targetY:Z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Wd,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Z,underlineThickness:Z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Z,values:null,vAlphabetic:Z,vMathematical:Z,vectorEffect:null,vHanging:Z,vIdeographic:Z,version:null,vertAdvY:Z,vertOriginX:Z,vertOriginY:Z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Zd}),tf=Yd({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),nf=Yd({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Qd}),rf=Yd({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),af={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},of=/[A-Z]/g,sf=/-[a-z]/g,cf=/^data[-\w.:]+$/i;function lf(e,t){let n=Fd(t),r=t,i=Id;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&cf.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(sf,df);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!sf.test(e)){let n=e.replace(of,uf);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=qd}return new i(r,t)}function uf(e){return`-`+e.toLowerCase()}function df(e){return e.charAt(1).toUpperCase()}var ff=Pd([Xd,$d,tf,nf,rf],`html`),pf=Pd([Xd,ef,tf,nf,rf],`svg`);function mf(e){return e.join(` `).trim()}var hf=/\/\*(?:[^*]|\*(?!\/))*\*\//g,gf=/\n/g,_f=/^\s*/,vf=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,yf=/^:\s*/,bf=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,xf=/^[;\s]*/,Sf=`
10
+ `,Cf=`/`,wf=`*`,Tf=``,Ef=`comment`,Df=`declaration`;function Of(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var n=1,r=1;function i(e){var t=e.match(gf);t&&(n+=t.length);var i=e.lastIndexOf(Sf);r=~i?e.length-i:r+e.length}function a(){var e={line:n,column:r};return function(t){return t.position=new o(e),l(),t}}function o(e){this.start=e,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(i){var a=Error(t.source+`:`+n+`:`+r+`: `+i);if(a.reason=i,a.filename=t.source,a.line=n,a.column=r,a.source=e,!t.silent)throw a}function c(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function l(){c(_f)}function u(e){for(var t;t=d();)e.push(t);return e}function d(){var t=a();if(Cf==e.charAt(0)&&wf==e.charAt(1)){for(var n=2;Tf!=e.charAt(n)&&(wf!=e.charAt(n)||Cf!=e.charAt(n+1));)++n;if(n+=2,Tf===e.charAt(n-1))return s(`End of comment missing`);var o=e.slice(2,n-2);return r+=2,i(o),e=e.slice(n),r+=2,t({type:Ef,comment:o})}}function f(){var e=a(),t=c(vf);if(t){if(d(),!c(yf))return s(`property missing ':'`);var n=c(bf),r=e({type:Df,property:t[0].replace(hf,Tf).trim(),value:n?n[0].replace(hf,Tf).trim():Tf});return c(xf),r}}function p(){var e=[];u(e);for(var t;t=f();)e.push(t),u(e);return e}return l(),p()}function kf(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=Of(e),i=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:a}=e;i?t(r,a,e):a&&(n??={},n[r]=a)}),n}var Af=Mf(`end`),jf=Mf(`start`);function Mf(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Nf(e){let t=jf(e),n=Af(e);if(t&&n)return{start:t,end:n}}function Pf(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?If(e.position):`start`in e||`end`in e?If(e):`line`in e||`column`in e?Ff(e):``}function Ff(e){return Lf(e&&e.line)+`:`+Lf(e&&e.column)}function If(e){return Ff(e&&e.start)+`-`+Ff(e&&e.end)}function Lf(e){return e&&typeof e==`number`?e:1}var Rf=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=Pf(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Object.defineProperties(Rf.prototype,{file:{configurable:!0,enumerable:!0,value:``,writable:!0},name:{configurable:!0,enumerable:!0,value:``,writable:!0},reason:{configurable:!0,enumerable:!0,value:``,writable:!0},message:{configurable:!0,enumerable:!0,value:``,writable:!0},stack:{configurable:!0,enumerable:!0,value:``,writable:!0},column:{configurable:!0,enumerable:!0,writable:!0},line:{configurable:!0,enumerable:!0,writable:!0},ancestors:{configurable:!0,enumerable:!0,writable:!0},cause:{configurable:!0,enumerable:!0,writable:!0},fatal:{configurable:!0,enumerable:!0,writable:!0},place:{configurable:!0,enumerable:!0,writable:!0},ruleId:{configurable:!0,enumerable:!0,writable:!0},source:{configurable:!0,enumerable:!0,writable:!0}});var zf={}.hasOwnProperty,Bf=new Map,Vf=/[A-Z]/g,Hf=/-([a-z])/g,Uf=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Wf=new Set([`td`,`th`]),Gf=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Kf(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=rp(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=np(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?pf:ff,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=qf(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function qf(e,t,n){if(t.type===`element`)return Jf(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Yf(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Zf(e,t,n);if(t.type===`mdxjsEsm`)return Xf(e,t);if(t.type===`root`)return Qf(e,t,n);if(t.type===`text`)return $f(e,t)}function Jf(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=pf,e.schema=i),e.ancestors.push(t);let a=lp(e,t.tagName,!1),o=ip(e,t),s=op(e,t);return Uf.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!jd(e)})),ep(e,o,a,t),tp(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Yf(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}up(e,t.position)}function Xf(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);up(e,t.position)}function Zf(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=pf,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:lp(e,t.name,!0),o=ap(e,t),s=op(e,t);return ep(e,o,a,t),tp(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Qf(e,t,n){let r={};return tp(r,op(e,t)),e.create(t,e.Fragment,r,n)}function $f(e,t){return t.value}function ep(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function tp(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function np(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function rp(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=jf(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function ip(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&zf.call(t.properties,i)){let a=sp(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Wf.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function ap(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else up(e,t.position)}else{let{name:i}=r,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else up(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function op(e,t){let n=[],r=-1,i=e.passKeys?new Map:Bf;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=qf(e,a,o);s!==void 0&&n.push(s)}return n}function sp(e,t,n){if(n==null||typeof n==`number`&&Number.isNaN(n))return;let r=lf(e.schema,t);return Array.isArray(n)&&(n=r.commaSeparated?Td(n):mf(n)),r.property===`style`?[`style`,typeof n==`object`?e.stylePropertyNameCase===`dom`?n:dp(n):cp(e,String(n))]:[e.elementAttributeNameCase===`react`&&r.space?af[r.property]||r.property:r.attribute,n]}function cp(e,t){let n={};try{kf(t,function(t,r){if(t&&r){let i=t;i.slice(0,2)!==`--`&&(i=i.toLowerCase(),e.stylePropertyNameCase===`dom`&&(i.slice(0,4)===`-ms-`&&(i=i.slice(1)),i=i.replace(Hf,mp))),n[i]=r}})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new Rf("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=Gf+`#cannot-parse-style-attribute`,r}return n}function lp(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=kd(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=kd(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return zf.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);up(e)}function up(e,t){let n=new Rf("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=Gf+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function dp(e){let t={},n;for(n in e)zf.call(e,n)&&(t[fp(n)]=e[n]);return t}function fp(e){if(e.slice(0,2)===`--`)return e;let t=e.replace(Vf,pp);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function pp(e){return`-`+e.toLowerCase()}function mp(e,t){return t.toUpperCase()}var hp={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},gp={};function _p(e,t){let n=t||gp;return vp(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function vp(e,t,n){if(bp(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return yp(e.children,t,n)}return Array.isArray(e)?yp(e,t,n):``}function yp(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=vp(e[i],t,n);return r.join(``)}function bp(e){return!!(e&&typeof e==`object`)}var xp=document.createElement(`i`);function Sp(e){let t=`&`+e+`;`;xp.innerHTML=t;let n=xp.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function Cp(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function wp(e,t){return e.length>0?(Cp(e,e.length,0,t),e):t}var Tp={}.hasOwnProperty;function Ep(e){let t={},n=-1;for(;++n<e.length;)Dp(t,e[n]);return t}function Dp(e,t){let n;for(n in t){let r=(Tp.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){Tp.call(r,a)||(r[a]=[]);let e=i[a];Op(r[a],Array.isArray(e)?e:e?[e]:[])}}}function Op(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);Cp(e,0,0,r)}function kp(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function Ap(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var jp=Up(/[A-Za-z]/),Mp=Up(/[\dA-Za-z]/),Np=Up(/[#-'*+\--9=?A-Z^-~]/);function Pp(e){return e!==null&&(e<32||e===127)}var Fp=Up(/\d/),Ip=Up(/[\dA-Fa-f]/),Lp=Up(/[!-/:-@[-`{-~]/);function Rp(e){return e!==null&&e<-2}function zp(e){return e!==null&&(e<0||e===32)}function Bp(e){return e===-2||e===-1||e===32}var Vp=Up(/\p{P}|\p{S}/u),Hp=Up(/\s/);function Up(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Wp(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&Mp(e.charCodeAt(n+1))&&Mp(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function Gp(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return Bp(r)?(e.enter(n),s(r)):t(r)}function s(r){return Bp(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}function Kp(e,t,n,r,i,a){let o=0;return s;function s(t){return a>0&&Bp(t)?(e.enter(r),c(t)):l(t)}function c(t){return Bp(t)&&o<a?(e.consume(t),o++,c):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}var qp={tokenize:Jp};function Jp(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null)e.consume(n);else return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Gp(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null)e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);else return Rp(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var Yp=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){Xp(this,e,t,n,!1)}addBefore(e,t,n){Xp(this,e,t,n,!0)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function Xp(e,t,n,r,i){if(n===0&&r.length===0)return;let a=e.index.get(t);if(a){a[1]+=n,i?(r.push(...a[2]),a[2]=r):a[2].push(...r);return}let o=[t,n,r];e.map.push(o),e.index.set(t,o)}var Zp={tokenize:$p},Qp={tokenize:em};function $p(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;let c=new Yp;return c.add(a+1,0,t.events.slice(n)),c.add(n,s-n,[]),c.consume(t.events),l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Qp,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(Qp,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null)i&&v(),_(0),e.consume(n);else return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null)g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);else return Rp(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;let l=new Yp;l.add(a+1,0,t.events.slice(n)),l.add(n,e-n,[]),l.consume(t.events)}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function em(e,t,n){return Gp(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function tm(e){if(e===null||zp(e)||Hp(e))return 1;if(Vp(e))return 2}function nm(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var rm={name:`attention`,resolveAll:im,tokenize:am};function im(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]===`exit`&&e[i][1].type===`attentionSequence`&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;let a=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[n][1].start};om(o,-a),om(s,a);let c={type:a>1?`strongSequence`:`emphasisSequence`,start:o,end:{...e[i][1].end}},l={type:a>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:s},u={type:a>1?`strongText`:`emphasisText`,start:{...e[i][1].end},end:{...e[n][1].start}},d={type:a>1?`strong`:`emphasis`,start:{...c.start},end:{...l.end}};e[i][1].end={...c.start},e[n][1].start={...l.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=wp(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=wp(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=wp(r,nm(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=wp(r,[[`exit`,u,t],[`enter`,l,t],[`exit`,l,t],[`exit`,d,t]]);let f=0;e[n][1].end.offset-e[n][1].start.offset&&(f=2,r=wp(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),Cp(e,i-1,n-i+3,r),n=i+r.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function am(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=tm(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=tm(o),u=!l||l===2&&i||n.includes(o)&&o!==42&&o!==95,d=!i||i===2&&l||n.includes(r)&&r!==42&&r!==95;return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function om(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var sm={name:`autolink`,tokenize:cm};function cm(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return jp(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||Mp(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||Mp(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||Pp(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):Np(t)?(e.consume(t),l):n(t)}function u(e){return Mp(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||Mp(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var lm={partial:!0,tokenize:um};function um(e,t,n){return r;function r(t){return Bp(t)?Gp(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||Rp(e)?t(e):n(e)}}var dm={continuation:{tokenize:pm},exit:mm,name:`blockQuote`,tokenize:fm};function fm(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return Bp(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function pm(e,t,n){let r=this;return i;function i(t){return Bp(t)?Gp(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(dm,t,n)(r)}}function mm(e){e.exit(`blockQuote`)}var hm={name:`characterEscape`,tokenize:gm};function gm(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return Lp(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var _m={name:`characterReference`,tokenize:vm};function vm(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=Mp,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=Ip,u):(e.enter(`characterReferenceValue`),a=7,o=Fp,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===Mp&&!Sp(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var ym={partial:!0,tokenize:bm};function bm(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var xm={concrete:!0,name:`codeFenced`,tokenize:Sm};function Sm(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),Bp(t)?Gp(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||Rp(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(ym,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||Rp(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):Bp(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),Gp(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||Rp(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||Rp(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&Bp(t)?Gp(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||Rp(t)?e.check(ym,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||Rp(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),Bp(t)?Gp(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),Bp(t)?Gp(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||Rp(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var Cm={name:`codeIndented`,tokenize:Tm},wm={partial:!0,tokenize:Em};function Tm(e,t,n){return r;function r(t){return e.enter(`codeIndented`),Kp(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):Rp(t)?e.attempt(wm,i,o)(t):(e.enter(`codeFlowValue`),a(t))}function a(t){return t===null||Rp(t)?(e.exit(`codeFlowValue`),i(t)):(e.consume(t),a)}function o(n){return e.exit(`codeIndented`),t(n)}}function Em(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):Rp(o)?(e.enter(`lineEnding`),e.consume(o),e.exit(`lineEnding`),i):Kp(e,t,a,`linePrefix`,4,4)(o)}function a(e){return Rp(e)?i(e):n(e)}}var Dm={name:`codeText`,previous:km,resolve:Om,tokenize:Am};function Om(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function km(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function Am(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):Rp(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||Rp(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var jm=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&Mm(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),Mm(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Mm(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);Mm(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);Mm(this.left,t.reverse())}}}};function Mm(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Nm(e){let t={},n=-1,r,i,a,o,s,c,l,u=new jm(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,Pm(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return Cp(e,0,1/0,u.slice(0)),!l}function Pm(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var Fm={resolve:Lm,tokenize:Rm},Im={partial:!0,tokenize:zm};function Lm(e){return Nm(e),e}function Rm(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):Rp(t)?e.check(Im,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function zm(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Gp(e,a,`linePrefix`)}function a(i){if(i===null||Rp(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Bm(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||Pp(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||Rp(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||zp(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||Pp(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function Vm(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):Rp(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||Rp(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!Bp(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Hm(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):Rp(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Gp(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||Rp(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function Um(e,t){let n;return r;function r(i){return Rp(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):Bp(i)?Gp(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Wm={name:`definition`,tokenize:Km},Gm={partial:!0,tokenize:qm};function Km(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Vm.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=Ap(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return zp(t)?Um(e,l)(t):l(t)}function l(t){return Bm(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Gm,d,d)(t)}function d(t){return Bp(t)?Gp(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||Rp(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function qm(e,t,n){return r;function r(t){return zp(t)?Um(e,i)(t):n(t)}function i(t){return Hm(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Bp(t)?Gp(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||Rp(e)?t(e):n(e)}}var Jm={name:`hardBreakEscape`,tokenize:Ym};function Ym(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return Rp(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Xm={name:`headingAtx`,resolve:Zm,tokenize:Qm};function Zm(e,t){let n=e.length-2,r=3;if(e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r){let i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`};Cp(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function Qm(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||zp(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||Rp(n)?(e.exit(`atxHeading`),t(n)):Bp(n)?Gp(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||zp(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var $m=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),eh=[`pre`,`script`,`style`,`textarea`],th={concrete:!0,name:`htmlFlow`,resolveTo:rh,tokenize:ih},nh={partial:!0,tokenize:ah};function rh(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function ih(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:I):jp(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):jp(a)?(e.consume(a),i=4,r.interrupt?t:I):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:I):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return jp(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||zp(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&eh.includes(l)?(i=1,r.interrupt?t(s):O(s)):$m.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||Mp(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return Bp(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||jp(t)?(e.consume(t),b):Bp(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||Mp(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):Bp(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):Bp(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||Rp(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||zp(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||Bp(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||Rp(t)?O(t):Bp(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),L):t===63&&i===3?(e.consume(t),I):t===93&&i===5?(e.consume(t),F):Rp(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(nh,R,k)(t)):t===null||Rp(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(ym,A,R)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||Rp(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),I):O(t)}function N(t){return t===47?(e.consume(t),o=``,P):O(t)}function P(t){if(t===62){let n=o.toLowerCase();return eh.includes(n)?(e.consume(t),L):O(t)}return jp(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),P):O(t)}function F(t){return t===93?(e.consume(t),I):O(t)}function I(t){return t===62?(e.consume(t),L):t===45&&i===2?(e.consume(t),I):O(t)}function L(t){return t===null||Rp(t)?(e.exit(`htmlFlowData`),R(t)):(e.consume(t),L)}function R(n){return e.exit(`htmlFlow`),t(n)}}function ah(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(lm,t,n)}}var oh={name:`htmlText`,tokenize:sh};function sh(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):jp(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):jp(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):Rp(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):Rp(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):Rp(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):Rp(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return jp(t)?(e.consume(t),S):n(t)}function S(t){return t===45||Mp(t)?(e.consume(t),S):C(t)}function C(t){return Rp(t)?(o=C,N(t)):Bp(t)?(e.consume(t),C):M(t)}function w(t){return t===45||Mp(t)?(e.consume(t),w):t===47||t===62||zp(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||jp(t)?(e.consume(t),E):Rp(t)?(o=T,N(t)):Bp(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||Mp(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):Rp(t)?(o=D,N(t)):Bp(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):Rp(t)?(o=O,N(t)):Bp(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):Rp(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||zp(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||zp(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),P}function P(t){return Bp(t)?Gp(e,F,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):F(t)}function F(t){return e.enter(`htmlTextData`),o(t)}}var ch={name:`labelEnd`,resolveAll:fh,resolveTo:ph,tokenize:mh},lh={tokenize:hh},uh={tokenize:gh},dh={tokenize:_h};function fh(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&Cp(e,0,e.length,n),e}function ph(e,t){let n=e.length,r=0,i,a,o;for(;n--;){let t=e[n][1];if(i){if(t.type===`link`||t.type===`labelLink`&&t._inactive)break;e[n][0]===`enter`&&t.type===`labelLink`&&(t._inactive=!0)}else if(a){if(e[n][0]===`enter`&&(t.type===`labelImage`||t.type===`labelLink`)&&!t._balanced&&(i=n,t.type!==`labelLink`)){r=2;break}}else t.type===`labelEnd`&&(a=n)}let s={type:e[i][1].type===`labelLink`?`link`:`image`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:`label`,start:{...e[i][1].start},end:{...e[a][1].end}},l={type:`labelText`,start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return o=[[`enter`,s,t],[`enter`,c,t]],o=wp(o,e.slice(i+1,i+r+3)),o=wp(o,[[`enter`,l,t]]),o=wp(o,nm(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=wp(o,[[`exit`,l,t],e[a-2],e[a-1],[`exit`,c,t]]),o=wp(o,e.slice(a+1)),o=wp(o,[[`exit`,s,t]]),Cp(e,i,e.length,o),e}function mh(e,t,n){let r=this,i=r._labelStarts,a,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(Ap(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(lh,u,o?u:d)(t):t===91?e.attempt(uh,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(dh,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function hh(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return zp(t)?Um(e,a)(t):a(t)}function a(t){return t===41?u(t):Bm(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return zp(t)?Um(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Hm(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return zp(t)?Um(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function gh(e,t,n){let r=this;return i;function i(t){return Vm.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(Ap(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function _h(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var vh={name:`labelStartImage`,resolveAll:ch.resolveAll,tokenize:yh};function yh(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),o}function o(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelImage`),s):n(t)}function s(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var bh={name:`labelStartLink`,resolveAll:ch.resolveAll,tokenize:xh};function xh(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelLink`),o}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var Sh={name:`lineEnding`,tokenize:Ch};function Ch(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Gp(e,t,`linePrefix`)}}var wh={name:`thematicBreak`,tokenize:Th};function Th(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||Rp(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),Bp(t)?Gp(e,s,`whitespace`)(t):s(t))}}var Eh={continuation:{tokenize:Ah},exit:Mh,name:`list`,tokenize:kh},Dh={partial:!0,tokenize:Nh},Oh={partial:!0,tokenize:jh};function kh(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:Fp(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(wh,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return Fp(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(lm,r.interrupt?n:u,e.attempt(Dh,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return Bp(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function Ah(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(lm,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Gp(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Bp(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Oh,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Gp(e,e.attempt(Eh,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function jh(e,t,n){let r=this;return Gp(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function Mh(e){e.exit(this.containerState.type)}function Nh(e,t,n){let r=this;return Gp(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!Bp(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var Ph={name:`setextUnderline`,resolveTo:Fh,tokenize:Ih};function Fh(e,t){let n=new Yp,r=e.length,i,a,o;for(;r--;)if(e[r][0]===`enter`){if(e[r][1].type===`content`){i=r;break}e[r][1].type===`paragraph`&&(a=r)}else e[r][1].type===`content`&&n.add(r,1,[]),!o&&e[r][1].type===`definition`&&(o=r);let s={type:`setextHeading`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type=`setextHeadingText`,o?(n.add(a,0,[[`enter`,s,t]]),n.add(o+1,0,[[`exit`,e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=s,n.add(e.length,0,[[`exit`,s,t]]),n.consume(e),e}function Ih(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),Bp(t)?Gp(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||Rp(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var Lh={tokenize:Rh};function Rh(e){let t=this,n=e.attempt(lm,r,e.attempt(this.parser.constructs.flowInitial,i,Gp(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Fm,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var zh={resolveAll:Uh()},Bh=Hh(`string`),Vh=Hh(`text`);function Hh(e){return{resolveAll:Uh(e===`text`?Wh:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null)t.consume(e);else return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function Uh(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function Wh(e,t){let n=new Yp,r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type===`lineEnding`)&&e[r-1][1].type===`data`){let i=e[r-1][1],a=t.sliceStream(i),o=a.length,s=-1,c=0,l;for(;o--;){let e=a[o];if(typeof e==`string`){for(s=e.length;e.charCodeAt(s-1)===32;)c++,s--;if(s)break;s=-1}else if(e===-2)l=!0,c++;else if(e!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){let a={type:r===e.length||l||c<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:o?s:i.start._bufferIndex+s,_index:i.start._index+o,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...a.start},i.start.offset===i.end.offset?Object.assign(i,a):n.add(r,0,[[`enter`,a,t],[`exit`,a,t]])}r++}return n.consume(e),e}var Gh=s({attentionMarkers:()=>$h,contentInitial:()=>qh,disable:()=>eg,document:()=>Kh,flow:()=>Yh,flowInitial:()=>Jh,insideSpan:()=>Qh,string:()=>Xh,text:()=>Zh}),Kh={42:Eh,43:Eh,45:Eh,48:Eh,49:Eh,50:Eh,51:Eh,52:Eh,53:Eh,54:Eh,55:Eh,56:Eh,57:Eh,62:dm},qh={91:Wm},Jh={[-2]:Cm,[-1]:Cm,32:Cm},Yh={35:Xm,42:wh,45:[Ph,wh],60:th,61:Ph,95:wh,96:xm,126:xm},Xh={38:_m,92:hm},Zh={[-5]:Sh,[-4]:Sh,[-3]:Sh,33:vh,38:_m,42:rm,60:[sm,oh],91:bh,92:[Jm,hm],93:ch,95:rm,96:Dm},Qh={null:[rm,zh]},$h={null:[42,95]},eg={null:[]};function tg(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=wp(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=nm(a,l.events,l),l.events):[]}function f(e,t){return rg(p(e),t)}function p(e){return ng(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){for(;r._index<o.length;){let e=o[r._index];if(typeof e==`string`){let t=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===t&&r._bufferIndex<e.length;)_(e.charCodeAt(r._bufferIndex))}else _(e)}}function _(e){u=u(e)}function v(e){Rp(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&Cp(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function ng(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function rg(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
11
+ `;break;case-3:o=`\r
12
+ `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function ig(e){let t={constructs:Ep([Gh,...(e||{}).extensions||[]]),content:n(qp),defined:[],document:n(Zp),flow:n(Lh),lazy:{},string:n(Bh),text:n(Vh)};return t;function n(e){return n;function n(n){return tg(t,e,n)}}}function ag(e){for(;!Nm(e););return e}var og=/[\0\t\n\r]/g;function sg(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i));let s=[],c=0;for(t=``,n&&=(i.charCodeAt(0)===65279&&c++,void 0);c<i.length;){og.lastIndex=c;let n=og.exec(i),a=n&&n.index!==void 0?n.index:i.length,o=i.charCodeAt(a);if(!n){t=i.slice(c);break}if(o===10&&c===a&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),c<a&&(s.push(i.slice(c,a)),e+=a-c),o){case 0:s.push(65533),e++;break;case 9:{let t=Math.ceil(e/4)*4;for(s.push(-2);e++<t;)s.push(-1);break}case 10:s.push(-4),e=1;break;default:r=!0,e=1}c=a+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var cg=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function lg(e){return e.replace(cg,ug)}function ug(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return kp(n.slice(t?2:1),t?16:10)}return Sp(n)||e}var dg={}.hasOwnProperty;function fg(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),pg(n)(ag(ig(n).document().write(sg()(e,t,!0))))}function pg(e){let t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:o(se),autolinkProtocol:E,autolinkEmail:E,atxHeading:o(K),blockQuote:o(W),characterEscape:E,characterReference:E,codeFenced:o(re),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(re,s),codeText:o(ie,s),codeTextData:E,data:E,codeFlowValue:E,definition:o(ae),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(G),hardBreakEscape:o(q),hardBreakTrailing:o(q),htmlFlow:o(oe,s),htmlFlowData:E,htmlText:o(oe,s),htmlTextData:E,image:o(J),label:s,link:o(se),listItem:o(le),listItemValue:p,listOrdered:o(ce,f),listUnordered:o(ce),paragraph:o(ue),reference:B,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(K),strong:o(de),thematicBreak:o(pe)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:ne,autolinkProtocol:te,blockQuote:l(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:H,characterReferenceMarkerNumeric:H,characterReferenceValue:U,characterReference:ee,codeFenced:l(_),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:h,codeFlowValue:D,codeIndented:l(v),codeText:l(M),codeTextData:D,data:D,definition:l(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(k),hardBreakTrailing:l(k),htmlFlow:l(A),htmlFlowData:D,htmlText:l(j),htmlTextData:D,image:l(P),label:I,labelText:F,lineEnding:O,link:l(N),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:V,resourceDestinationString:L,resourceTitleString:R,resource:z,setextHeading:l(T),setextHeadingLineSequence:w,setextHeadingText:C,strong:l(),thematicBreak:l()}};hg(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[],position:void 0},o={stack:[r],tokenStack:[],config:t,enter:c,exit:u,buffer:s,resume:d,data:n},l=[],f=[],p=-1;for(;++p<e.length;)f.push(e[p]),(e[p][1].type===`listOrdered`||e[p][1].type===`listUnordered`)&&(e[p][0]===`enter`?l.push(f.length-1):a(f,l.pop()));for(e=f,p=-1;++p<e.length;){let n=t[e[p][0]];e[p][0]===`enter`&&t.beforeEnter.length>0&&i(t.beforeEnter,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),dg.call(n,e[p][1].type)&&n[e[p][1].type].call({...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),e[p][0]===`exit`&&t.afterExit.length>0&&i(t.afterExit,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||_g).call(o,void 0,e[0])}for(r.position={start:mg(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:mg(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},p=-1;++p<t.transforms.length;)r=t.transforms[p](r)||r;return r}function i(e,t,n){let r=-1;for(;++r<e.length;)e[r].call(t,n)}function a(e,t){let n=e.length-1,r=t-1,i=-1,a=!1,o,s,c,l,u=[];for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let n=r;for(s=void 0;n--;){let t=e[n];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=n}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),u.push({at:s||r,event:[`exit`,o,t[2]]})}if(t[1].type===`listItemPrefix`){let e={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=e,u.push({at:r,event:[`enter`,e,t[2]]}),c=void 0,l=!0}}}let d=e.splice(t),f=0;for(r=-1;++r<d.length;){for(;f<u.length&&u[f].at===t+r;)e.push(u[f++].event);e.push(d[r])}e[t][1]._spread=a}function o(e,t){return n;function n(n){c.call(this,e(n),n),t&&t.call(this,n)}}function s(){this.stack.push({type:`fragment`,children:[]})}function c(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:mg(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw Error("Cannot close `"+e.type+"` ("+Pf({start:e.start,end:e.end})+`): it’s not open`);r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||_g).call(this,e,r[0])),n.position.end=mg(e.end)}function d(){return _p(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function h(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function v(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function y(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Ap(this.sliceSerialize(e)).toLowerCase()}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function x(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function S(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function C(){this.data.setextHeadingSlurpLineEnding=!0}function w(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function E(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=fe(),n.position={start:mg(e.start),end:void 0},t.push(n)),this.stack.push(n)}function D(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=mg(e.end)}function O(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=mg(e.end),this.data.atHardBreak=void 0}else!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(E.call(this,e),D.call(this,e))}function k(){this.data.atHardBreak=!0}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function F(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=lg(t),n.identifier=Ap(t).toLowerCase()}function I(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function L(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function R(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function z(){this.data.inReference=void 0}function B(){this.data.referenceType=`collapsed`}function V(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Ap(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function H(e){this.data.characterReferenceType=e.type}function U(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=kp(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=Sp(t);let i=this.stack[this.stack.length-1];i.value+=r}function ee(e){let t=this.stack.pop();t.position.end=mg(e.end)}function te(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ne(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function W(){return{type:`blockquote`,children:[],position:void 0}}function re(){return{type:`code`,lang:null,meta:null,value:``,position:void 0}}function ie(){return{type:`inlineCode`,value:``,position:void 0}}function ae(){return{type:`definition`,identifier:``,label:null,title:null,url:``,position:void 0}}function G(){return{type:`emphasis`,children:[],position:void 0}}function K(){return{type:`heading`,depth:0,children:[],position:void 0}}function q(){return{type:`break`,position:void 0}}function oe(){return{type:`html`,value:``,position:void 0}}function J(){return{type:`image`,title:null,url:``,alt:null,position:void 0}}function se(){return{type:`link`,title:null,url:``,children:[],position:void 0}}function ce(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[],position:void 0}}function le(e){return{type:`listItem`,spread:e._spread,checked:null,children:[],position:void 0}}function ue(){return{type:`paragraph`,children:[],position:void 0}}function de(){return{type:`strong`,children:[],position:void 0}}function fe(){return{type:`text`,value:``,position:void 0}}function pe(){return{type:`thematicBreak`,position:void 0}}}function mg(e){return{line:e.line,column:e.column,offset:e.offset}}function hg(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?hg(e,r):gg(e,r)}}function gg(e,t){let n;for(n in t)if(dg.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`afterExit`:case`beforeEnter`:{let r=t[n];r&&e[n].push(r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function _g(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+Pf({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Pf({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+Pf({start:t.start,end:t.end})+`) is still open`)}function vg(e){let t=this;t.parser=n;function n(n){return fg(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function yg(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function bg(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
13
+ `}]}function xg(e,t){let n=t.value?t.value+`
14
+ `:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function Sg(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Cg(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wg(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=Wp(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function Tg(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Eg(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Dg(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function Og(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Dg(e,t);let i={src:Wp(r.url||``)};t.alt!==null&&t.alt!==void 0&&(i.alt=t.alt),r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function kg(e,t){let n={src:Wp(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Ag(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function jg(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Dg(e,t);let i={href:Wp(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Mg(e,t){let n={href:Wp(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Ng(e,t,n){let r=e.all(t),i=n?Pg(n):Fg(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
15
+ `}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
16
+ `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function Pg(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let{children:n}=e,r=-1;for(;!t&&++r<n.length;)t=Fg(n[r])}return t}function Fg(e){let{spread:t}=e;return t??e.children.length>1}function Ig(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Lg(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Rg(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function zg(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Bg(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=jf(t.children[1]),o=Af(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Vg(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function Hg(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var Ug=9,Wg=32;function Gg(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(Kg(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Kg(t.slice(i),i>0,!1)),a.join(``)}function Kg(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===Ug||t===Wg;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===Ug||t===Wg;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function qg(e,t){let n={type:`text`,value:Gg(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Jg(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var Yg={blockquote:yg,break:bg,code:xg,delete:Sg,emphasis:Cg,footnoteReference:wg,heading:Tg,html:Eg,imageReference:Og,image:kg,inlineCode:Ag,linkReference:jg,link:Mg,listItem:Ng,list:Ig,paragraph:Lg,root:Rg,strong:zg,table:Bg,tableCell:Hg,tableRow:Vg,text:qg,thematicBreak:Jg,toml:Xg,yaml:Xg,definition:Xg,footnoteDefinition:Xg};function Xg(){}var{defineProperty:Zg}=Object,Qg=typeof self==`object`?self:globalThis,$g=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new Qg[e](t)},e_=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?Zg(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof Qg[e]==`function`?$g(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n($g(a,o),i)};return r},t_=e=>e_(new Map,e)(0),n_=``,{toString:r_}={},{keys:i_,is:a_}=Object,o_=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=r_.call(e).slice(8,-1);switch(n){case`Array`:return[1,n_];case`Object`:return[2,n_];case`Date`:return[3,n_];case`RegExp`:return[4,n_];case`Map`:return[5,n_];case`Set`:return[6,n_];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},s_=([e,t])=>e===0&&(t===`function`||t===`symbol`),c_=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=o_(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&a_(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of i_(o))(e||!s_(o_(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?n_:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(s_(o_(n))||s_(o_(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!s_(o_(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},l_=(e,{json:t,lossy:n}={})=>{let r=[];return c_(!(t||n),!!t,new Map,r)(e),r},u_=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?t_(l_(e,t)):structuredClone(e):(e,t)=>t_(l_(e,t));function d_(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function f_(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function p_(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||d_,r=e.options.footnoteBackLabel||f_,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=[],l=-1;for(;++l<e.footnoteOrder.length;){let t=e.footnoteById.get(e.footnoteOrder[l]);t&&(s[l]=e.all(t))}for(l=-1;++l<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[l]);if(!i)continue;let a=s[l],o=String(i.identifier).toUpperCase(),u=Wp(o.toLowerCase()),d=0,f=[],p=e.footnoteCounts.get(o);for(;p!==void 0&&++d<=p;){f.length>0&&f.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(l,d);typeof e==`string`&&(e={type:`text`,value:e}),f.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+u+(d>1?`-`+d:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(l,d),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let m=a[a.length-1];if(m&&m.type===`element`&&m.tagName===`p`){let e=m.children[m.children.length-1];e&&e.type===`text`?e.value+=` `:m.children.push({type:`text`,value:` `}),m.children.push(...f)}else a.push(...f);let h={type:`element`,tagName:`li`,properties:{id:t+`fn-`+u},children:e.wrap(a,!0)};e.patch(i,h),c.push(h)}if(c.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...u_(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
17
+ `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(c,!0)},{type:`text`,value:`
18
+ `}]}}var m_=(function(e){if(e==null)return y_;if(typeof e==`function`)return v_(e);if(typeof e==`object`)return Array.isArray(e)?h_(e):g_(e);if(typeof e==`string`)return __(e);throw Error(`Expected function, string, or object as test`)});function h_(e){let t=[],n=-1;for(;++n<e.length;)t[n]=m_(e[n]);return v_(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function g_(e){let t=e;return v_(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function __(e){return v_(t);function t(t){return t&&t.type===e}}function v_(e){return t;function t(t,n,r){return!!(b_(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function y_(){return!0}function b_(e){return typeof e==`object`&&!!e&&`type`in e}function x_(e){return e}var S_=[];function C_(e,t,n,r){if(!e||typeof e!=`object`)throw Error("Unexpected value `"+e+"` for `tree`, expected node");let i=!0,a,o,s,c;if(typeof n==`function`||n&&typeof n==`object`?(a=t,o=n,r&&(i=!1)):(o=t,n&&(i=!1)),typeof o==`function`)s=o;else if(o&&typeof o==`object`){if(o.enter!==null&&o.enter!==void 0){if(typeof o.enter==`function`)s=o.enter;else throw Error("Unexpected value `"+o.enter+"` for `visitors.enter`, expected optional visitor")}if(typeof o.exit==`function`)c=o.exit;else throw Error("Unexpected value `"+o.exit+"` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)")}else throw Error("Unexpected value `"+o+"` for `enter` or `visitors`, expected visitor or object with visitors");let l=m_(a),u=i?1:-1;d(e,void 0,[])();function d(e,t,n){let r=e&&typeof e==`object`?e:{};if(typeof r.type==`string`){let t=typeof r.tagName==`string`?r.tagName:typeof r.name==`string`?r.name:void 0;Object.defineProperty(o,"name",{value:`node (`+x_(e.type+(t?`<`+t+`>`:``))+`)`})}return o;function o(){let r=!a||l(e,t,n[n.length-1]||void 0),o=S_;if(s&&r&&(o=w_(s(e,n,t)),o[0]===!1))return o;if(`children`in e&&e.children){let t=e;if(t.children&&o[0]!==`skip`){let e=(i?-1:t.children.length)+u,r=[...n,t];for(;e>-1&&e<t.children.length;){let n=t.children[e],i=d(n,e,r)();if(i[0]===!1)return i;e=typeof i[1]==`number`?i[1]:e+u}}}if(c&&r){let r=w_(c(e,n,t));if(r[0]===`skip`)throw Error("Unexpected value `"+r[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(r[0]===!1||typeof r[1]==`number`)return r}return o}}}function w_(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?S_:[e]}function T_(e,t,n,r){let i,a,o;typeof n==`function`||n&&typeof n==`object`?(i=t,a=n,o=r):(a=t,o=n),typeof a==`function`?C_(e,i,D_(a),o):C_(e,i,E_(a),o)}function E_(e){return!e||typeof e!=`object`?e:{enter:typeof e.enter==`function`?D_(e.enter):e.enter,exit:typeof e.exit==`function`?D_(e.exit):e.exit}}function D_(e){return t;function t(t,n,r){return e(t,r,n[n.length-1])}}var O_={}.hasOwnProperty,k_={};function A_(e,t){let n=t||k_,r=new Map,i=new Map,a={all:s,applyData:M_,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...Yg,...n.handlers},one:o,options:n,patch:j_,wrap:P_};return T_(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=String(e.identifier).toUpperCase();e.type===`definition`?r.has(t)||r.set(t,e):i.has(t)||i.set(t,e)}}),a;function o(e,t){let{type:n}=e,r=a.handlers[n];if(O_.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e;return{...u_(n),children:a.all(e)}}return u_(e)}return(a.options.unknownHandler||N_)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=F_(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=F_(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function j_(e,t){e.position&&(t.position=Nf(e))}function M_(e,t){let n=t;if(e&&e.data){let{hChildren:t,hName:r,hProperties:i}=e.data;typeof r==`string`&&(n.type===`element`?n.tagName=r:n={type:`element`,tagName:r,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,u_(i)),`children`in n&&n.children&&t!=null&&(n.children=t)}return n}function N_(e,t){let n=t.data||{},r=`value`in t&&!(O_.call(n,`hProperties`)||O_.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function P_(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
19
+ `});++r<e.length;)r&&n.push({type:`text`,value:`
20
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
21
+ `}),n}function F_(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function I_(e,t){let n=A_(e,t),r=n.one(e,void 0),i=p_(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
22
+ `},i)),a}function L_(e,t){return e&&`run`in e?async function(n,r){let i=I_(n,{file:r,...t});await e.run(i,r)}:function(n,r){return I_(n,{file:r,...e||t})}}function R_(e){if(e)throw e}var z_=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function B_(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function V_(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a)r(a);else{for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?H_(s,i)(...o):r(null,...o)}}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function H_(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var U_={basename:W_,dirname:G_,extname:K_,join:q_,sep:`/`};function W_(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);X_(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function G_(e){if(X_(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function K_(e){X_(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}}else n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function q_(...e){let t=-1,n;for(;++t<e.length;)X_(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:J_(n)}function J_(e){X_(e);let t=e.codePointAt(0)===47,n=Y_(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function Y_(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function X_(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var Z_={cwd:Q_};function Q_(){return`/`}function $_(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function ev(e){if(typeof e==`string`)e=new URL(e);else if(!$_(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return tv(e)}function tv(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var nv=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],rv=class{constructor(e){let t;t=e?$_(e)?{path:e}:typeof e==`string`||sv(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:Z_.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<nv.length;){let e=nv[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)nv.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?U_.basename(this.path):void 0}set basename(e){av(e,`basename`),iv(e,`basename`),this.path=U_.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?U_.dirname(this.path):void 0}set dirname(e){ov(this.basename,`dirname`),this.path=U_.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?U_.extname(this.path):void 0}set extname(e){if(iv(e,`extname`),ov(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=U_.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){$_(e)&&(e=ev(e)),av(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?U_.basename(this.path,this.extname):void 0}set stem(e){av(e,`stem`),iv(e,`stem`),this.path=U_.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new Rf(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function iv(e,t){if(e&&e.includes(U_.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+U_.sep+"`")}function av(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function ov(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function sv(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var cv=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),lv=l(z_(),1),uv={}.hasOwnProperty,dv=new class e extends cv{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=V_()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,lv.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(mv(`data`,this.frozen),this.namespace[e]=t,this):uv.call(this.namespace,e)&&this.namespace[e]||void 0:e?(mv(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=_v(e),n=this.parser||this.Parser;return fv(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),fv(`process`,this.parser||this.Parser),pv(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=_v(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);yv(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),fv(`processSync`,this.parser||this.Parser),pv(`processSync`,this.compiler||this.Compiler),this.process(e,r),gv(`processSync`,`process`,t),n;function r(e,r){t=!0,R_(e),n=r}}run(e,t,n){hv(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=_v(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),gv(`runSync`,`run`,n),r;function i(e,t){R_(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=_v(t),r=this.compiler||this.Compiler;return pv(`stringify`,r),hv(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(mv(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,lv.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];B_(o)&&B_(r)&&(r=(0,lv.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function fv(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function pv(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function mv(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function hv(e){if(!B_(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function gv(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function _v(e){return vv(e)?e:new rv(e)}function vv(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function yv(e){return typeof e==`string`||bv(e)}function bv(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var xv=[],Sv={allowDangerousHtml:!0},Cv=/^(https?|ircs?|mailto|xmpp)$/i,wv=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function Tv(e){let t=Ev(e),n=Dv(e);return Ov(t.runSync(t.parse(n),n),e)}function Ev(e){let t=e.rehypePlugins||xv,n=e.remarkPlugins||xv,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Sv}:Sv;return dv().use(vg).use(n).use(L_,r).use(t)}function Dv(e){let t=e.children||``,n=new rv;return typeof t==`string`?n.value=t:``+t,n}function Ov(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||kv;for(let e of wv)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return T_(e,l),Kf(e,{Fragment:S.Fragment,components:i,ignoreInvalidStyle:!0,jsx:S.jsx,jsxs:S.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in hp)if(Object.hasOwn(hp,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=hp[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function kv(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Cv.test(e.slice(0,t))?e:``}function Av(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=Av(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function jv(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Av(e))&&(r&&(r+=` `),r+=t);return r}var Mv=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Nv=jv,Pv=(e,t)=>n=>{if(t?.variants==null)return Nv(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=Mv(t)||Mv(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 Nv(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)},Fv=Pv(`group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-card text-card-foreground`,destructive:`bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current`}},defaultVariants:{variant:`default`}});function Iv({className:e,variant:t,...n}){return(0,S.jsx)(`div`,{"data-slot":`alert`,role:`alert`,className:X(Fv({variant:t}),e),...n})}function Lv({className:e,...t}){return(0,S.jsx)(`div`,{"data-slot":`alert-title`,className:X(`font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground`,e),...t})}function Rv({className:e,...t}){return(0,S.jsx)(`div`,{"data-slot":`alert-description`,className:X(`text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4`,e),...t})}function zv(e){return Hi(e.defaultTagName??`div`,e,e)}var Bv=Pv(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`,accent:`bg-(--om-accent) text-(--om-dark-background)`}},defaultVariants:{variant:`default`}});function Vv({className:e,variant:t=`default`,render:n,...r}){return zv({defaultTagName:`span`,props:ki({className:X(Bv({variant:t}),e)},r),render:n,state:{slot:`badge`,variant:t}})}var Hv=Pv(`group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full`,{variants:{variant:{default:`*:data-[slot=bubble-content]:bg-primary *:data-[slot=bubble-content]:text-primary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-primary/80`,secondary:`*:data-[slot=bubble-content]:bg-secondary *:data-[slot=bubble-content]:text-secondary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)]`,muted:`*:data-[slot=bubble-content]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--muted),var(--foreground)_5%)]`,tinted:`*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.93_calc(c*0.4)_h)] *:data-[slot=bubble-content]:text-foreground dark:*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.3_calc(c*0.4)_h)] [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.88_calc(c*0.5)_h)] dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.35_calc(c*0.5)_h)]`,outline:`*:data-[slot=bubble-content]:border-border *:data-[slot=bubble-content]:bg-background [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-input/30`,ghost:`border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted/50`,destructive:`*:data-[slot=bubble-content]:bg-destructive/10 *:data-[slot=bubble-content]:text-destructive dark:*:data-[slot=bubble-content]:bg-destructive/20 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/20 dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/30`}},defaultVariants:{variant:`default`}});function Uv({variant:e=`default`,align:t=`start`,className:n,...r}){return(0,S.jsx)(`div`,{"data-slot":`bubble`,"data-variant":e,"data-align":t,className:X(Hv({variant:e}),n),...r})}function Wv({className:e,render:t,...n}){return zv({defaultTagName:`div`,props:ki({className:X(`w-fit max-w-full min-w-0 overflow-hidden rounded-xl border border-transparent px-3 py-2 text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-left [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-ring/50`,e)},n),render:t,state:{slot:`bubble-content`}})}function Gv({className:e,...t}){return(0,S.jsx)(`div`,{"data-slot":`empty`,className:X(`flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance`,e),...t})}function Kv({className:e,...t}){return(0,S.jsx)(`div`,{"data-slot":`empty-header`,className:X(`flex max-w-sm flex-col items-center gap-2`,e),...t})}function qv({className:e,...t}){return(0,S.jsx)(`div`,{"data-slot":`empty-title`,className:X(`font-heading text-sm font-medium tracking-tight`,e),...t})}function Jv({className:e,...t}){return(0,S.jsx)(`div`,{"data-slot":`empty-description`,className:X(`text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,e),...t})}function Yv({className:e,...t}){return(0,S.jsx)(`div`,{"data-slot":`empty-content`,className:X(`flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm text-balance`,e),...t})}var Xv=v.createContext(void 0);function Zv(e=!1){let t=v.useContext(Xv);if(t===void 0&&!e)throw Error(J(16));return t}function Qv(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:v.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function $v(e,t,{detail:n=0,pointerType:r=``}={}){e.dispatchEvent(new(Ie(e)).PointerEvent(`click`,{bubbles:!0,cancelable:!0,composed:!0,detail:n,pointerType:r,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function ey(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=v.useRef(null),s=Zv(!0),c=a??s!==void 0,{props:l}=Qv({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=v.useCallback(()=>{let e=o.current;ty(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return q(u,[u]),{getButtonProps:v.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return ki({onClick(e){t?e.preventDefault():n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(zi(e),o?.(e),e.baseUIHandlerPrevented))return;let n=e.target===e.currentTarget,r=e.currentTarget,a=ty(r),s=!i&&ny(r),l=n&&(i?a:!s),u=e.key===`Enter`,d=e.key===` `,f=r.getAttribute(`role`),p=f?.startsWith(`menuitem`)||f===`option`||f===`gridcell`;if(n&&c&&d){if(e.defaultPrevented&&p)return;e.preventDefault(),(!i||a)&&(e.preventBaseUIHandler(),$v(r,e))}else!l||i||!d&&!u?n&&s&&d&&e.preventDefault():e.defaultPrevented||(e.preventDefault(),u&&(e.preventBaseUIHandler(),$v(r,e)))},onKeyUp(e){t||(zi(e),a?.(e),e.target===e.currentTarget&&i&&c&&ty(e.currentTarget)&&e.key===` `?e.preventDefault():e.baseUIHandlerPrevented||e.target===e.currentTarget&&!i&&!c&&!e.defaultPrevented&&e.key===` `&&(e.preventBaseUIHandler(),$v(e.currentTarget,e)))},onPointerDown(e){t?e.preventDefault():s?.(e)}},i?{type:`button`}:{role:`button`},l,u)},[t,l,c,i]),buttonRef:Y(e=>{o.current=e,u()})}}function ty(e){return Be(e)&&e.tagName===`BUTTON`}function ny(e){return Be(e)&&e.tagName===`A`&&!!e.href}var ry=v.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,focusableWhenDisabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{getButtonProps:l,buttonRef:u}=ey({disabled:i,focusableWhenDisabled:a,native:o});return Hi(`button`,e,{state:{disabled:i},ref:[t,u],props:[c,l]})}),iy=Pv(`group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-8`,"icon-xs":`size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function ay({className:e,variant:t=`default`,size:n=`default`,...r}){return(0,S.jsx)(ry,{"data-slot":`button`,className:X(iy({variant:t,size:n,className:e})),...r})}var oy=`data-valid`,sy=`data-invalid`,cy={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},ly={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},uy={disabled:!1,...ly},dy={valid(e){return e===null?null:e?{[oy]:``}:{[sy]:``}}},fy={invalid:void 0,name:void 0,validityData:{state:cy,errors:[],error:``,value:``,initialValue:null},setValidityData:ae,disabled:void 0,setTouched:ae,setDirty:ae,setFilled:ae,setFocused:ae,focusOwnerRef:{current:void 0},validationMode:`onSubmit`,shouldValidateOnChange:()=>!1,state:uy,registerFieldControl:ae,validation:{getValidationProps:(e,t=K)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:ae,getInputControl:()=>null,commit:async()=>{},change:ae}},py=v.createContext(fy);function my(e=!0){let t=v.useContext(py);if(t.setValidityData===ae&&!e)throw Error(J(28));return t}var hy=v.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:ae,validationMode:`onSubmit`,submitCountRef:{current:0}});function gy(){return v.useContext(hy)}var _y=v.createContext({controlId:void 0,registerControlId:ae,resetControlId:ae,labelId:void 0,setLabelId:ae,messageIds:[],setMessageIds:ae,getDescriptionProps:e=>e});function vy(){return v.useContext(_y)}function yy(e,t,n,r=!0,i,a){let[o,s]=v.useState(),c=lc(i?`${i}-label`:void 0),l=!!a?.trim(),u=e??(l?void 0:t)??o;return q(()=>{let i=e||t||l||!r?void 0:by(n.current,c);o!==i&&s(i)}),u}function by(e,t){let n=xy(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function xy(e){if(!e)return;let t=e.parentElement;if(t&&t.tagName===`LABEL`)return t;let n=e.id;if(n){let t=e.nextElementSibling;if(t&&t.htmlFor===n)return t}let r=e.labels;return r&&r[0]}function Sy(e={}){let{id:t,enabled:n=!0}=e,{controlId:r,registerControlId:i,resetControlId:a}=vy(),o=lc(),s=H(()=>Symbol()),c=v.useRef(!1),l=v.useRef(!1),u=Y(()=>{c.current&&i!==ae&&(c.current=!1,i(s.current,void 0))});return q(()=>{if(!n||i===ae){u();return}let e;if(t!==void 0)l.current=!0,e=t;else if(l.current)e=o;else{a();return}e===void 0?u():(c.current=!0,i(s.current,e))},[t,n,i,a,o,s,u]),q(()=>u,[u]),(n?r:void 0)??t??o}var Cy=v.createContext({disabled:!1});function wy(){return v.useContext(Cy)}function Ty(e,t,n){let{setFocused:r,focusOwnerRef:i}=my(),a=Y(t=>{(t?!e:i.current===a)&&(i.current=t&&a,n?.(t),r(t))});return q(()=>{let e=t.current;return e?.getRootNode()?.activeElement===e&&a(!0),()=>a(!1)},[e,t,a]),a}function Ey(e,t,n,r,i=!0,a){let{registerFieldControl:o}=my(),s=H(()=>Symbol());q(()=>{let c=s.current;i?o(c,{controlRef:e,getValue:r,id:t,name:a,value:n}):o(c,void 0)},[e,i,r,t,a,o,s,n]),q(()=>{let e=s.current;return()=>{o(e,void 0)}},[o,s])}function Dy(e,t){let n=v.useRef(e),r=Y(t);q(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}var Oy=v.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:s=!1,onValueChange:c,defaultValue:l,autoFocus:u=!1,style:d,...f}=e,{state:p,name:m,disabled:h,setTouched:g,setDirty:_,validityData:y,setFilled:b,validationMode:x,validation:S}=my(),{clearErrors:C,elementRef:w,submitCountRef:T}=gy(),E=h||s,D=m??a,O={...p,disabled:E},{labelId:k}=vy(),A=Sy({id:i}),j=o!==void 0,M=o==null?void 0:String(o),N=Y(()=>S.inputRef.current?.value);Ey(S.inputRef,A,M,N,!E,a),q(()=>{let e=M??S.inputRef.current?.value;e!==void 0&&b(e!==``)},[M,l,S.inputRef,b]),Dy(M,()=>{M!==void 0&&(C(D),_(M!==(y.initialValue??``)),S.change(M))});let P=v.useRef(null),F=Ty(E,P),I=fe();return Hi(`input`,e,{ref:[t,P],state:O,props:[{id:A,disabled:E,name:D,ref:S.inputRef,"aria-labelledby":k,autoFocus:u,...j?{value:o}:{defaultValue:l},onChange(e){let t=e.currentTarget.value,n=Jt(Xt,e.nativeEvent);c?.(t,n),!j&&(_(t!==(y.initialValue??``)),b(t!==``),!e.nativeEvent.defaultPrevented&&!n.isCanceled&&(C(D),S.change(t)))},onFocus(){F(!0)},onBlur(e){if(g(!0),F(!1),x===`onBlur`){let t=e.currentTarget.value;S.commit(t),j&&queueMicrotask(()=>{let e=S.inputRef.current?.value;e!==void 0&&e!==t&&e!==(y.initialValue??``)&&S.commit(e)})}},onKeyDown(e){if(e.currentTarget.tagName===`INPUT`&&e.key===`Enter`){g(!0);let t=e.currentTarget.value,n=e.currentTarget.form;if(n&&n===w.current&&!e.defaultPrevented){let t=e.currentTarget,n=T.current;I.start(0,()=>{T.current===n&&S.commit(t.value)})}else S.commit(t)}}},f,e=>S.getValidationProps(E,e)],stateAttributesMapping:dy})}),ky=v.forwardRef(function(e,t){return(0,S.jsx)(Oy,{ref:t,...e})});function Ay({className:e,type:t,...n}){return(0,S.jsx)(ky,{type:t,"data-slot":`input`,className:X(`h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...n})}function jy({className:e,...t}){return(0,S.jsx)(`textarea`,{"data-slot":`textarea`,className:X(`flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...t})}function My({className:e,...t}){return(0,S.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:X(`group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5`,e),...t})}var Ny=Pv(`flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4`,{variants:{align:{"inline-start":`order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]`,"inline-end":`order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]`,"block-start":`order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2`,"block-end":`order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2`}},defaultVariants:{align:`inline-start`}});function Py({className:e,align:t=`inline-start`,...n}){return(0,S.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":t,className:X(Ny({align:t}),e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`input`)?.focus()},...n})}var Fy=Pv(`flex items-center gap-2 text-sm shadow-none`,{variants:{size:{xs:`h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5`,sm:``,"icon-xs":`size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0`,"icon-sm":`size-8 p-0 has-[>svg]:p-0`}},defaultVariants:{size:`xs`}});function Iy({className:e,type:t=`button`,variant:n=`ghost`,size:r=`xs`,...i}){return(0,S.jsx)(ay,{type:t,"data-size":r,variant:n,className:X(Fy({size:r}),e),...i})}function Ly({className:e,...t}){return(0,S.jsx)(Ay,{"data-slot":`input-group-control`,className:X(`flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent`,e),...t})}function Ry({className:e,...t}){return(0,S.jsx)(jy,{"data-slot":`input-group-control`,className:X(`flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent`,e),...t})}function zy({className:e,align:t=`start`,...n}){return(0,S.jsx)(`div`,{"data-slot":`message`,"data-align":t,className:X(`group/message relative flex w-full min-w-0 gap-2 text-sm data-[align=end]:flex-row-reverse`,e),...n})}function By({className:e,...t}){return(0,S.jsx)(`div`,{"data-slot":`message-content`,className:X(`flex w-full min-w-0 flex-col gap-2.5 wrap-break-word group-data-[align=end]/message:*:data-slot:self-end`,e),...t})}function Vy({defaultTagName:e,props:t,render:n,state:r={},stateAttributesMapping:i}){let a=Hy(Uy(r,i),t);if(!n)return v.createElement(e,a);if(typeof n==`function`)return n(a,r);if(!v.isValidElement(n))return null;let o=n.props,s={...Hy(a,o),ref:Ky(a.ref,o.ref)};return v.cloneElement(n,s)}function Hy(...e){let t={};for(let n of e){if(!n)continue;let e=n;for(let n of Object.keys(e)){let r=e[n];if(r===void 0)continue;let i=t[n];t[n]=n===`className`?[i,r].filter(Boolean).join(` `):n===`style`?{...i,...r}:n===`ref`?Ky(i,r):Gy(n)&&typeof i==`function`&&typeof r==`function`?Wy(r,i):r}}return t}function Uy(e,t){let n={};for(let r of Object.keys(e)){let i=e[r],a=t?.[r]?.(i);if(a){Object.assign(n,a);continue}if(r===`slot`){n[`data-slot`]=i;continue}let o=`data-${String(r).replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}`;typeof i==`boolean`?n[o]=i?``:void 0:i!=null&&(n[o]=String(i))}return n}function Wy(e,t){return function(n){e(n),n.defaultPrevented||t(n)}}function Gy(e){return/^on[A-Z]/.test(e)}function Ky(...e){let t=e.filter(Boolean);if(t.length!==0)return e=>{for(let n of t)typeof n==`function`?n(e):n&&(n.current=e)}}var qy=8,Jy=64,Yy=0,Xy=.5,Zy=180,Qy=new Set([`ArrowDown`,`ArrowUp`,`End`,`Home`,`PageDown`,`PageUp`,` `]),$y={start:!1,end:!1},eb={currentAnchorId:null,visibleMessageIds:[]};function tb({content:e,scrollEdgeThreshold:t,spacer:n,viewport:r}){if(!r||!e)return $y;let i=pb({content:e,spacer:n,viewport:r});return{start:r.scrollTop>t,end:i-r.scrollTop-r.clientHeight>t}}function nb({content:e,scrollMargin:t,scrollPreviousItemPeek:n,spacer:r,viewport:i,visibleMessageIds:a}){if(!e||!i)return eb;let o=i.getBoundingClientRect(),s=o.top+t+n,c=typeof IntersectionObserver>`u`,l=[],u=null;for(let t of rb(e,r)){let e=t.dataset.messageId;if(!e)continue;let n=t.dataset.scrollAnchor===`true`,r=n||c?t.getBoundingClientRect():null;(c&&r?r.bottom>s&&r.top<o.bottom:a.has(e))&&l.push(e),n&&r&&r.top<=s+Xy&&(u=e)}return l.length===0&&u===null?eb:{currentAnchorId:u,visibleMessageIds:l}}function rb(e,t){return Array.from(e.children).filter(e=>e instanceof HTMLElement&&e!==t)}function ib(e,t){for(let n=t;n<e.length;n++){let t=e[n];if(t?.dataset.scrollAnchor===`true`)return t}return null}function ab(e,t){for(let n of e)if(n.dataset.scrollAnchor===`true`&&!t.has(n))return n;return null}function ob(e,t){let n=0;for(let r=t;r<e.length;r++)if(e[r]?.dataset.scrollAnchor===`true`&&(n+=1,n>1))return!0;return!1}function sb(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n?.dataset.scrollAnchor===`true`)return n}return null}function cb({content:e,spacer:t,viewport:n}){let r=n.getBoundingClientRect();for(let n of rb(e,t)){if(!n.dataset.messageId)continue;let e=n.getBoundingClientRect();if(e.bottom>r.top&&e.top<r.bottom)return n}return null}function lb({align:e,element:t,scrollMargin:n,spacer:r,viewport:i}){let a=ub(t,i),o=t.getBoundingClientRect().height,s=gb(r);if(e===`center`){let e=Math.max(0,i.clientHeight-s.start-s.end);return a-s.start-(e-o)/2-n}if(e===`end`)return a-i.clientHeight+o+s.end+n;if(e===`nearest`){let e=a+o,t=i.scrollTop+s.start,r=i.scrollTop+i.clientHeight-s.end;return a>=t&&e<=r?i.scrollTop:a<t?a-s.start-n:e-i.clientHeight+s.end+n}return a-s.start-n}function ub(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return n.top-r.top+t.scrollTop}function db(e,t){return e.getBoundingClientRect().top-t.getBoundingClientRect().top}function fb({content:e,scrollTop:t,spacer:n,viewport:r}){let i=pb({content:e,spacer:n,viewport:r});return t+r.clientHeight-i}function pb({content:e,spacer:t,viewport:n}){let r=rb(e,t),i=hb(e),a=n.getBoundingClientRect(),o=n.scrollTop,s=i.start+i.end;for(let e of r){let t=e.getBoundingClientRect();s=Math.max(s,t.bottom-a.top+o+i.end)}return s}function mb(e){return Math.max(0,e.scrollHeight-e.clientHeight)}function hb(e){let t=window.getComputedStyle(e);return{end:vb(t.paddingBlockEnd||t.paddingBottom),start:vb(t.paddingBlockStart||t.paddingTop)}}function gb(e){let t=e?.parentElement;return t?hb(t):{end:0,start:0}}function _b(e){if(!e)return 0;let t=window.getComputedStyle(e);return vb(t.rowGap===`normal`?t.gap:t.rowGap)}function vb(e){if(!e)return 0;let t=Number.parseFloat(e);return Number.isFinite(t)?t:0}function yb(e,t){let n=e,r=new Set;return{getSnapshot:()=>n,hasListeners:()=>r.size>0,setSnapshot:e=>{t(n,e)||(n=e,r.forEach(e=>e()))},subscribe:(e,t,n)=>{let i=r.size===0;return r.add(e),i&&t?.(),()=>{r.delete(e),r.size===0&&n?.()}}}}function bb(e,t){return yb(e,t)}function xb(){return yb(eb,Cb)}function Sb(e,t){return e.start===t.start&&e.end===t.end}function Cb(e,t){return e.currentAnchorId!==t.currentAnchorId||e.visibleMessageIds.length!==t.visibleMessageIds.length?!1:e.visibleMessageIds.every((e,n)=>e===t.visibleMessageIds[n])}function wb({autoScroll:e,defaultScrollPosition:t,scrollEdgeThreshold:n,scrollMargin:r,scrollPreviousItemPeek:i}){let a=v.useRef(e),o=v.useRef(!1),s=v.useRef(null),c=v.useRef(!1),l=v.useRef(n),u=v.useRef(0),d=v.useRef(null),f=v.useRef(0),p=v.useRef(e?`following-bottom`:`free-scrolling`),m=v.useRef(new Map),h=v.useRef(null),g=v.useRef(null),_=v.useRef(null),y=v.useRef(i),b=v.useRef(!0),x=v.useRef(null),S=v.useRef(r),C=v.useRef(null),w=v.useRef(0),T=v.useRef(0),E=v.useRef(null),D=v.useRef(null),O=v.useRef(null),k=v.useRef(null),A=v.useRef(null),j=v.useRef(null),M=v.useRef(null),N=v.useRef(null),P=v.useRef(null),F=v.useRef(new Set),I=v.useRef(new WeakSet);return O.current===null&&(O.current=bb(t===`end`||t===`last-anchor`,(e,t)=>e===t)),k.current===null&&(k.current=bb($y,Sb)),P.current===null&&(P.current=xb()),a.current=e,l.current=n,S.current=r,y.current=i,{autoScrollRef:a,autoscrollingRef:o,autoscrollingTimeoutRef:A,streamingTurnRef:_,contentRef:s,defaultScrollPositionAppliedRef:c,firstItemRef:d,itemCountRef:u,lastScrollTopRef:f,messageElementsRef:m,modeRef:p,pendingScrollFrameRef:C,pendingScrollToMessageRef:h,prependRestoreRef:g,preserveScrollOnPrependRef:b,pendingDefaultScrollStore:O.current,rootRef:x,scrollEdgeThresholdRef:l,scrollMarginRef:S,scrollPreviousItemPeekRef:y,spacerGapRef:w,spacerHeightRef:T,spacerRef:E,stateFrameRef:D,stateStore:k.current,viewportRef:j,visibilityFrameRef:M,visibilityObserverRef:N,visibilityStore:P.current,visibleMessageIdsRef:F,handledScrollAnchorsRef:I}}function Tb(e){e.pendingDefaultScrollStore.setSnapshot(!1)}function Eb(e){e.defaultScrollPositionAppliedRef.current=!0,Tb(e)}function Db({refs:e,commitScrollState:t,scheduleStateCommit:n,scheduleVisibilitySync:r}){let{streamingTurnRef:i,autoScrollRef:a,autoscrollingRef:o,autoscrollingTimeoutRef:s,contentRef:c,itemCountRef:l,messageElementsRef:u,modeRef:d,pendingScrollToMessageRef:f,prependRestoreRef:p,scrollMarginRef:m,scrollPreviousItemPeekRef:h,spacerGapRef:g,spacerHeightRef:_,spacerRef:y,viewportRef:b}=e,x=v.useCallback(e=>{s.current!==null&&(window.clearTimeout(s.current),s.current=null),o.current!==e&&(o.current=e,t()),e&&(s.current=window.setTimeout(()=>{s.current=null,o.current=!1,t()},Zy))},[t]),S=v.useCallback(e=>{let t=y.current;if(!t)return;let n=Math.max(0,Math.ceil(e));_.current!==n&&(_.current=n,t.hidden=n===0,t.style.height=`${n}px`,t.style.marginTop=n>0?`${-g.current}px`:``)},[]),C=v.useCallback((e,{behavior:r=`auto`,autoscrolling:i=!1}={})=>{let a=b.current;if(!a)return;let o=Math.max(0,e);Math.abs(a.scrollTop-o)<=Xy?(a.scrollTop=o,t()):(i&&x(!0),a.scrollTo({top:o,behavior:r}),n())},[t,n,x]),w=v.useCallback(({behavior:e=`auto`}={})=>b.current?(S(0),i.current=null,d.current=`free-scrolling`,C(0,{behavior:e}),r(),!0):!1,[r,C,S]),T=v.useCallback(({behavior:e=`auto`}={})=>{let t=b.current;return t?(S(0),i.current=null,d.current=a.current?`following-bottom`:`free-scrolling`,C(mb(t),{autoscrolling:!0,behavior:e}),r(),!0):!1},[r,C,S]),E=v.useCallback((e,{align:t=`start`,behavior:n=`auto`,scrollMargin:a=m.current}={},{keepPreviousPeek:o=!1}={})=>{let s=c.current,l=b.current;if(!s||!l||!s.contains(e))return!1;let u=lb({align:t,element:e,scrollMargin:o?a+h.current:a,spacer:y.current,viewport:l}),f=fb({content:s,scrollTop:u,spacer:y.current,viewport:l});return S(f),p.current={element:e,viewportTop:db(e,l)},d.current=o?`anchored-to-message`:`settling-jump`,i.current=o?e:null,C(u,{behavior:n}),r(),!0},[r,C,S]),D=v.useCallback(()=>{let e=i.current;return!e||!e.isConnected||d.current!==`anchored-to-message`?!1:E(e,{align:`start`},{keepPreviousPeek:!0})},[E]),O=v.useCallback((t,n)=>{let r=u.current.get(t);return r?(Eb(e),E(r,n)?(f.current=null,!0):(f.current={messageId:t,options:n},!0)):l.current===0&&(f.current={messageId:t,options:n},Eb(e),!0)},[E]);return{flushPendingScrollToMessage:v.useCallback(()=>{let t=f.current;if(!t)return!1;let n=u.current.get(t.messageId);return!n||!E(n,t.options)?!1:(f.current=null,Eb(e),!0)},[E]),reanchorToAnchoredMessage:D,scrollToElement:E,scrollToEnd:T,scrollToMessage:O,scrollToStart:w}}function Ob(e,t){return v.useCallback(n=>{e.current=n,n&&t()},[e,t])}function kb({autoScroll:e=!1,defaultScrollPosition:t=`end`,scrollEdgeThreshold:n=qy,scrollPreviousItemPeek:r=Jy,scrollMargin:i=Yy}){let a=wb({autoScroll:e,defaultScrollPosition:t,scrollEdgeThreshold:n,scrollMargin:i,scrollPreviousItemPeek:r}),{streamingTurnRef:o,autoScrollRef:s,autoscrollingRef:c,autoscrollingTimeoutRef:l,contentRef:u,defaultScrollPositionAppliedRef:d,firstItemRef:f,itemCountRef:p,lastScrollTopRef:m,messageElementsRef:h,modeRef:g,pendingScrollFrameRef:_,pendingScrollToMessageRef:y,prependRestoreRef:b,preserveScrollOnPrependRef:x,pendingDefaultScrollStore:S,rootRef:C,scrollEdgeThresholdRef:w,scrollMarginRef:T,scrollPreviousItemPeekRef:E,spacerGapRef:D,spacerHeightRef:O,spacerRef:k,stateFrameRef:A,stateStore:j,viewportRef:M,visibilityFrameRef:N,visibilityObserverRef:P,visibilityStore:F,visibleMessageIdsRef:I,handledScrollAnchorsRef:L}=a,R=v.useRef(t);R.current!==t&&(R.current=t,d.current=!1);let z=v.useCallback(e=>{let t=C.current,n=M.current,r=[e.start&&`start`,e.end&&`end`].filter(Boolean).join(` `),i=c.current;for(let e of[t,n])e&&(r?e.setAttribute(`data-scrollable`,r):e.removeAttribute(`data-scrollable`),e.toggleAttribute(`data-autoscrolling`,i))},[]),B=v.useCallback(e=>{let t=M.current?.scrollTop??0,n=t<m.current-Xy;m.current=t,s.current&&!e.end&&g.current!==`settling-jump`&&g.current!==`anchored-to-message`?g.current=`following-bottom`:g.current===`following-bottom`&&e.end&&n&&!c.current&&(g.current=`free-scrolling`)},[]),V=v.useCallback(()=>{let e=tb({content:u.current,scrollEdgeThreshold:w.current,spacer:k.current,viewport:M.current});B(e);let t=g.current===`following-bottom`?{...e,end:!1}:e;z(t),j.setSnapshot(t)},[B,j,z]),H=v.useCallback(()=>{A.current===null&&(A.current=window.requestAnimationFrame(()=>{A.current=null,V()}))},[V]),U=v.useCallback(()=>{F.hasListeners()&&N.current===null&&(N.current=window.requestAnimationFrame(()=>{N.current=null,F.hasListeners()&&F.setSnapshot(nb({content:u.current,scrollMargin:T.current,scrollPreviousItemPeek:E.current,spacer:k.current,viewport:M.current,visibleMessageIds:I.current}))}))},[F]),{flushPendingScrollToMessage:ee,reanchorToAnchoredMessage:te,scrollToElement:ne,scrollToEnd:W,scrollToMessage:re,scrollToStart:ie}=Db({refs:a,commitScrollState:V,scheduleStateCommit:H,scheduleVisibilitySync:U}),ae=v.useCallback(()=>{let e=b.current,t=M.current;if(!e||!t||!e.element.isConnected)return!1;let n=db(e.element,t)-e.viewportTop;return Math.abs(n)<=Xy?!1:(t.scrollTop+=n,e.viewportTop=db(e.element,t),H(),U(),!0)},[H,U]),G=v.useCallback(()=>{let e=u.current,t=M.current;if(!e||!t){b.current=null;return}let n=cb({content:e,spacer:k.current,viewport:t});b.current=n?{element:n,viewportTop:db(n,t)}:null},[]),K=v.useCallback(()=>{_.current===null&&(_.current=window.requestAnimationFrame(()=>{_.current=null,ee()&&G()}))},[G,ee]),q=v.useCallback(()=>{if(!t||d.current||p.current===0)return!1;let e=!1;if(t===`last-anchor`){let t=u.current,n=M.current,r=t&&n?sb(rb(t,k.current)):null;if(!t||!n||!r)e=W({behavior:`auto`});else{let i=ub(r,n);e=pb({content:t,spacer:k.current,viewport:n})-i<=n.clientHeight?W({behavior:`auto`}):ne(r,{align:`start`},{keepPreviousPeek:!0})}}else e=t===`end`?W({behavior:`auto`}):ie({behavior:`auto`});return e?(Eb(a),!0):!1},[t,ne,W,ie]),oe=v.useCallback(()=>{let e=u.current;if(!e)return;let t=rb(e,k.current),n=p.current,r=f.current;p.current=t.length,f.current=t[0]??null,(()=>{if(ee())return;if(n===0){if(q()||t.length>0&&s.current&&W({behavior:`auto`}))return;V(),U();return}let e=r?t.indexOf(r):-1;if(x.current&&e>0)ae();else{if(t.length>n){let e=ib(t,n);if(e){if(s.current&&g.current===`following-bottom`&&ob(t,n)){W({behavior:`auto`});return}ne(e,{align:`start`},{keepPreviousPeek:!0}),L.current.add(e);return}}if(t.length===n){let e=ab(t,L.current);if(e){ne(e,{align:`start`},{keepPreviousPeek:!0}),L.current.add(e);return}}g.current===`following-bottom`&&s.current?W({behavior:`auto`}):(V(),U())}})(),G()},[q,G,V,ee,ae,U,ne,W]),J=v.useCallback(()=>{if(g.current===`following-bottom`&&s.current){W({behavior:`auto`});return}let e=O.current;te()?s.current&&e>0&&O.current===0&&W({behavior:`auto`}):(H(),U())},[te,H,U,W]),se=v.useCallback(()=>{let e=M.current;if(e&&F.hasListeners()){if(typeof IntersectionObserver>`u`){U();return}P.current||=new IntersectionObserver(e=>{for(let t of e){let e=t.target.dataset.messageId;e&&(t.isIntersecting?I.current.add(e):I.current.delete(e))}U()},{root:e,rootMargin:`${-(T.current+E.current)}px 0px 0px 0px`,threshold:[0,.01,.5,1]}),h.current.forEach(e=>{P.current?.observe(e)}),U()}},[U,F]),ce=v.useCallback(()=>{N.current!==null&&(window.cancelAnimationFrame(N.current),N.current=null),P.current?.disconnect(),P.current=null,I.current.clear(),F.setSnapshot(eb)},[F]),le=v.useCallback((e,t,n)=>{t?(h.current.set(e,t),P.current?.observe(t),U(),y.current?.messageId===e&&K()):n&&h.current.get(e)===n&&(h.current.delete(e),I.current.delete(e),P.current?.unobserve(n),U())},[K,U]),ue=v.useCallback(()=>{(g.current===`following-bottom`||g.current===`anchored-to-message`||g.current===`settling-jump`)&&(o.current=null,g.current=`free-scrolling`)},[]),de=v.useCallback(()=>z(j.getSnapshot()),[j,z]),fe=Ob(C,de),pe=Ob(M,de),me=v.useCallback(e=>{u.current=e},[]),he=v.useCallback(e=>{k.current=e,D.current=_b(e?.parentElement??null)},[]),ge=v.useCallback(()=>{V(),U(),G()},[G,V,U]),_e=v.useMemo(()=>({handleContentChange:oe,handleResize:J,observeVisibility:se,pendingDefaultScrollStore:S,preserveScrollOnPrependRef:x,scrollToEnd:W,scrollToMessage:re,scrollToStart:ie,setContentElement:me,setRootElement:fe,setSpacerElement:he,setViewportElement:pe,stateStore:j,syncAfterScroll:ge,unobserveVisibility:ce,userScrollIntent:ue,viewportRef:M,visibilityStore:F}),[oe,J,se,S,W,re,ie,me,fe,he,pe,j,ge,ce,ue,F]);return v.useLayoutEffect(()=>{q()||p.current===0&&Tb(a)},[q]),v.useEffect(()=>()=>{A.current!==null&&(window.cancelAnimationFrame(A.current),A.current=null),N.current!==null&&(window.cancelAnimationFrame(N.current),N.current=null),l.current!==null&&(window.clearTimeout(l.current),l.current=null),_.current!==null&&(window.cancelAnimationFrame(_.current),_.current=null),P.current?.disconnect(),P.current=null},[]),v.useLayoutEffect(()=>{e&&g.current===`following-bottom`&&p.current>0?W({behavior:`auto`}):V()},[e,V,W]),{context:_e,registerMessage:le}}function Ab(e){let t=v.useRef(e);return t.current=e,t}var jb=v.createContext(null),Mb=v.createContext(null);function Nb(){let e=v.useContext(jb);if(!e)throw Error(`useMessageScroller must be used within a MessageScroller.`);return e}function Pb(){let e=v.useContext(Mb);if(!e)throw Error(`MessageScrollerItem must be used within a MessageScroller.`);return e}function Fb({autoScroll:e=!1,children:t,defaultScrollPosition:n=`end`,scrollEdgeThreshold:r,scrollPreviousItemPeek:i,scrollMargin:a}){let{context:o,registerMessage:s}=kb({autoScroll:e,defaultScrollPosition:n,scrollEdgeThreshold:r,scrollPreviousItemPeek:i,scrollMargin:a});return(0,S.jsx)(jb.Provider,{value:o,children:(0,S.jsx)(Mb.Provider,{value:s,children:t})})}function Ib(){let{pendingDefaultScrollStore:e}=Nb();return v.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}function Lb({children:e,...t}){let{setRootElement:n}=Nb(),r=Ib();return(0,S.jsx)(`div`,{ref:n,...t,...r?{"data-pending-scroll":``}:null,children:e})}function Rb({"aria-label":e,children:t,onKeyDown:n,onScroll:r,onTouchMove:i,onWheel:a,preserveScrollOnPrepend:o=!0,ref:s,role:c,tabIndex:l,...u}){let{handleResize:d,preserveScrollOnPrependRef:f,setViewportElement:p,syncAfterScroll:m,userScrollIntent:h,viewportRef:g}=Nb(),_=Ib();f.current=o;let y=v.useCallback(e=>{p(e),Ky(s)?.(e)},[s,p]);function b(e){m(),r?.(e)}function x(e){h(),a?.(e)}function C(e){h(),i?.(e)}function w(e){Qy.has(e.key)&&h(),n?.(e)}return v.useEffect(()=>{let e=g.current;if(!e||typeof ResizeObserver>`u`)return;let t=0,n=new ResizeObserver(()=>{window.cancelAnimationFrame(t),t=window.requestAnimationFrame(d)});return n.observe(e),()=>{window.cancelAnimationFrame(t),n.disconnect()}},[d,g]),(0,S.jsx)(`div`,{ref:y,role:c??`region`,"aria-label":e??`Messages`,tabIndex:l??0,onKeyDown:w,onScroll:b,onTouchMove:C,onWheel:x,...u,..._?{"data-pending-scroll":``}:null,children:t})}function zb({"aria-relevant":e,children:t,ref:n,role:r,spacerClassName:i,...a}){let{handleContentChange:o,handleResize:s,setContentElement:c,setSpacerElement:l}=Nb(),u=v.useRef(null),d=v.useCallback(e=>{u.current=e,c(e),Ky(n)?.(e)},[n,c]);return v.useLayoutEffect(()=>{let e=u.current;if(!e||(o(),typeof MutationObserver>`u`))return;let t=new MutationObserver(()=>{o()});return t.observe(e,{childList:!0}),()=>t.disconnect()},[o]),v.useEffect(()=>{let e=u.current;if(!e||typeof ResizeObserver>`u`)return;let t=0,n=new ResizeObserver(()=>{window.cancelAnimationFrame(t),t=window.requestAnimationFrame(s)});return n.observe(e),()=>{window.cancelAnimationFrame(t),n.disconnect()}},[s]),(0,S.jsxs)(`div`,{ref:d,role:r??`log`,"aria-relevant":e??`additions`,...a,children:[t,(0,S.jsx)(`div`,{ref:l,"aria-hidden":`true`,"data-message-scroller-spacer":``,hidden:!0,className:i})]})}function Bb({messageId:e,ref:t,scrollAnchor:n=!1,...r}){let i=Pb(),a=v.useRef(null),o=v.useCallback(n=>{let r=a.current;a.current=n,e&&i(e,n,r),Ky(t)?.(n)},[e,t,i]);return(0,S.jsx)(`div`,{ref:o,"data-message-id":e,"data-scroll-anchor":n?`true`:`false`,...r})}function Vb({behavior:e=`smooth`,children:t,direction:n=`end`,onClick:r,render:i,tabIndex:a,type:o=`button`,...s}){let{scrollToEnd:c,scrollToStart:l,stateStore:u}=Nb(),d=Ab(r),f=v.useCallback(e=>u.subscribe(e),[u]),p=v.useCallback(()=>{let e=u.getSnapshot();return n===`start`?e.start:e.end},[n,u]),m=v.useSyncExternalStore(f,p,p),h=v.useCallback(t=>{m&&(d.current?.(t),t.defaultPrevented||(t.currentTarget.blur(),n===`start`?l({behavior:e}):c({behavior:e})))},[e,n,m,d,c,l]);return Vy({defaultTagName:`button`,props:Hy({type:o,inert:!m,tabIndex:m?a:-1,children:t??(0,S.jsxs)(`span`,{children:[`Scroll to `,n]}),onClick:h},s),render:i,state:{active:m,direction:n},stateAttributesMapping:{active:e=>({"data-active":e?`true`:`false`})}})}var Hb={Provider:Fb,Root:Lb,Viewport:Rb,Content:zb,Item:Bb,Button:Vb};function Ub(e){return(0,S.jsx)(Hb.Provider,{...e})}function Wb({className:e,...t}){return(0,S.jsx)(Hb.Root,{"data-slot":`message-scroller`,className:X(`group/message-scroller relative flex size-full min-h-0 flex-col overflow-hidden`,e),...t})}function Gb({className:e,...t}){return(0,S.jsx)(Hb.Viewport,{"data-slot":`message-scroller-viewport`,className:X(`size-full min-h-0 min-w-0 scroll-fade-b scrollbar-thin scrollbar-gutter-stable overflow-y-auto overscroll-contain contain-content data-autoscrolling:scrollbar-thumb-transparent data-autoscrolling:scrollbar-track-transparent data-pending-scroll:invisible`,e),...t})}function Kb({className:e,...t}){return(0,S.jsx)(Hb.Content,{"data-slot":`message-scroller-content`,className:X(`flex h-max min-h-full flex-col gap-6`,e),...t})}function qb({className:e,scrollAnchor:t=!1,...n}){return(0,S.jsx)(Hb.Item,{"data-slot":`message-scroller-item`,scrollAnchor:t,className:X(`min-w-0 shrink-0 [contain-intrinsic-size:auto_10rem] [content-visibility:auto]`,e),...n})}function Jb({direction:e=`end`,className:t,children:n,render:r,variant:i=`secondary`,size:a=`icon-sm`,...o}){return(0,S.jsx)(Hb.Button,{"data-slot":`message-scroller-button`,"data-direction":e,"data-variant":i,"data-size":a,direction:e,className:X(`absolute inset-s-1/2 -translate-x-1/2 border-border bg-background text-foreground transition-[translate,scale,opacity] duration-200 hover:bg-muted hover:text-foreground data-[active=false]:pointer-events-none data-[active=false]:scale-95 data-[active=false]:opacity-0 data-[active=false]:duration-400 data-[active=false]:ease-[cubic-bezier(0.7,0,0.84,0)] data-[active=true]:translate-y-0 data-[active=true]:scale-100 data-[active=true]:opacity-100 data-[active=true]:ease-[cubic-bezier(0.23,1,0.32,1)] data-[direction=end]:bottom-4 data-[direction=end]:data-[active=false]:translate-y-full data-[direction=start]:top-4 data-[direction=start]:data-[active=false]:-translate-y-full rtl:translate-x-1/2 data-[direction=start]:[&_svg]:rotate-180`,t),render:r??(0,S.jsx)(ay,{variant:i,size:a}),...o,children:n??(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(pu,{}),(0,S.jsx)(`span`,{className:`sr-only`,children:e===`end`?`Scroll to end`:`Scroll to start`})]})})}function Yb({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=v.useRef(e!==void 0),[a,o]=v.useState(()=>t);return[i&&e!==void 0?e:a,v.useCallback(e=>{i||o(e)},[])]}function Xb(e){let{open:t,defaultOpen:n=!1,onOpenChange:r,disabled:i}=e,[a,o]=Yb({controlled:t,default:n,name:`Collapsible`,state:`open`}),{mounted:s,setMounted:c,transitionStatus:l}=Na(a,!0,!0),u=lc(),[d,f]=v.useState(),p=d===null?void 0:d??u,m=Y(e=>{let t=!a,n=Jt(Zt,e.nativeEvent);r(t,n),!n.isCanceled&&o(t)});return v.useMemo(()=>({defaultPanelId:u,disabled:i,handleTrigger:m,mounted:s,open:a,panelId:p,setMounted:c,setOpen:o,setPanelIdState:f,transitionStatus:l}),[u,i,m,s,a,p,c,o,f,l])}var Zb=v.createContext(void 0);function Qb(){let e=v.useContext(Zb);if(e===void 0)throw Error(J(15));return e}var $b=`data-open`,ex=`data-closed`,tx=ht,nx=`data-panel-open`,rx={[$b]:``},ix={[ex]:``},ax={open(e){return e?{[nx]:``}:null}},ox={open(e){return e?rx:ix},...yt},sx=v.forwardRef(function(e,t){let{render:n,className:r,defaultOpen:i=!1,disabled:a=!1,onOpenChange:o,open:s,style:c,...l}=e,u=Y(o),d=Xb({open:s,defaultOpen:i,onOpenChange:u,disabled:a}),f=v.useMemo(()=>({open:d.open,disabled:d.disabled,transitionStatus:d.transitionStatus}),[d.open,d.disabled,d.transitionStatus]),p=v.useMemo(()=>({...d,onOpenChange:u,state:f}),[d,u,f]),m=Hi(`div`,e,{state:f,ref:t,props:l,stateAttributesMapping:ox});return(0,S.jsx)(Zb.Provider,{value:p,children:m})}),cx={...ax,...yt},lx=v.forwardRef(function(e,t){let{panelId:n,open:r,handleTrigger:i,state:a,disabled:o}=Qb(),{className:s,disabled:c=o,render:l,nativeButton:u=!0,style:d,...f}=e,{getButtonProps:p,buttonRef:m}=ey({disabled:c,native:u});return Hi(`button`,e,{state:a,ref:[t,m],props:[{"aria-controls":r?n:void 0,"aria-expanded":r,onClick:i},f,p],stateAttributesMapping:cx})}),ux={height:void 0,width:void 0};function dx(e){let{externalRef:t,hiddenUntilFound:n,id:r,keepMounted:i,mounted:a,onOpenChange:o,open:s,setMounted:c,setOpen:l,transitionStatus:u}=e,d=v.useRef(null),f=v.useRef(null),[p,m]=v.useState(ux),h=v.useRef(ux),g=v.useRef(!1),_=v.useRef(s),y=v.useRef(!1),[b,x]=v.useState(!1),S=v.useRef(null),C=En(t,d),w=Mn(s),T=La(d),E=!s&&!a,D=b?`idle`:u,O=s&&(_.current||y.current),k=!s&&a&&f.current===`css-animation`&&p.height===void 0&&p.width===void 0?h.current:p,A=n&&E&&f.current!==`css-animation`,j=Y((e,t=!0)=>{t&&(h.current=e),m(e)}),M=Y(()=>{S.current?.(),S.current=null}),N=Y(e=>{M(),S.current=()=>{S.current=null,e()}}),P=Y(()=>{s&&a&&f.current===`css-animation`&&(y.current=!0)});q(()=>{b&&u!==`starting`&&x(!1)},[b,u]),v.useEffect(()=>()=>{P(),M()},[P,M]),q(()=>{s||(_.current=!1,y.current=!1);let e=d.current;if(!e)return;!s&&S.current&&M();let t=px(e,O);if(f.current=t,s&&u===`idle`&&_.current&&t===`css-animation`){h.current=fx(e);return}if(s&&u===`starting`){let n=g.current;if(g.current=!1,t===`none`){j(fx(e)),x(!0);return}if(t===`css-transition`){let t=gx(e);if(j(fx(e)),!n)return t;let r=hx(e,`transition-duration`,`0s`);return N(r),x(!0),t}j(fx(e));let r=hx(e,`animation-name`,`none`);if(!n){r();return}let i=hx(e,`animation-duration`,`0s`);r(),N(i),x(!0);return}if(!s&&a&&(u===`idle`||u===`starting`)){if(t===`none`){j(ux,!1),c(!1);return}j(fx(e));return}if(u!==`ending`)return;if(t===`none`){c(!1);return}let n=fx(e);n.height>0||n.width>0?(j(n),t===`css-animation`&&hx(e,`animation-name`,`none`)()):c(!1)},[a,s,M,j,c,N,O,u]),Ra({enabled:s&&a&&D===`idle`,open:!0,ref:d,onComplete(){s&&j(ux,!1)}}),v.useEffect(()=>{if(s||!a||D!==`ending`)return;if(!d.current){c(!1),j(ux,!1);return}let e=new AbortController,t=-1;function n(){w.current||(c(!1),j(ux,!1))}return t=Vn.request(()=>{T(n,e.signal)}),()=>{Vn.cancel(t),e.abort()}},[w,a,s,D,T,j,c]),q(()=>{let e=d.current;e&&n&&E&&e.setAttribute(`hidden`,`until-found`)},[E,n]),v.useEffect(function(){let e=d.current;if(!e)return;let t=de.create(),n=-1,r=(r,i)=>{t.start(0,()=>{w.current||(n=Vn.request(()=>{w.current||(r&&(g.current=!1),i&&e.setAttribute(tx,``),e.setAttribute(`hidden`,`until-found`))}))})},i=wn(e,`beforematch`,t=>{let n=Jt(Xt,t);if(o(!0,n),n.isCanceled){r(!1,!1);return}g.current=!0;let i=e.hasAttribute(tx);e.removeAttribute(tx),l(!0),r(!0,i)});return()=>{t.clear(),Vn.cancel(n),i()}},[w,o,l]);let F=i||n||a||s;return{height:k.height,props:{...A?{[tx]:``}:void 0,hidden:E,id:r},ref:C,shouldPreventOpenAnimation:O,shouldRender:F,transitionStatus:D,width:k.width}}function fx(e){return{height:e.scrollHeight,width:e.scrollWidth}}function px(e,t){let n=Ie(e).getComputedStyle(e),r=(n.animationName.split(`,`).map(e=>e.trim()).some(e=>e!==``&&e!==`none`)||t)&&mx(n.animationDuration),i=mx(n.transitionDuration);return r&&i||i?`css-transition`:r?`css-animation`:`none`}function mx(e){return e.split(`,`).map(e=>e.trim()).some(e=>e!==``&&Number.parseFloat(e)>0)}function hx(e,t,n){let r=e.style.getPropertyValue(t),i=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{r===``?e.style.removeProperty(t):e.style.setProperty(t,r,i)}}function gx(e){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(t=>{e.style.setProperty(t,`initial`,`important`)});function n(){Object.entries(t).forEach(([t,n])=>{n===``?e.style.removeProperty(t):e.style.setProperty(t,n)})}let r=Vn.request(n);return()=>{Vn.cancel(r),n()}}var _x=`--collapsible-panel-height`,vx=`--collapsible-panel-width`,yx=v.forwardRef(function(e,t){let{className:n,hiddenUntilFound:r,keepMounted:i,render:a,id:o,style:s,...c}=e,{defaultPanelId:l,mounted:u,onOpenChange:d,open:f,setMounted:p,setPanelIdState:m,setOpen:h,state:g,transitionStatus:_}=Qb(),v=r??!1,y=i??!1,b=o||void 0,x=b??l;q(()=>(m(e=>b??(e===null?void 0:e)),()=>{m(e=>e===b?null:e)}),[b,m]);let{height:S,props:C,ref:w,shouldPreventOpenAnimation:T,shouldRender:E,transitionStatus:D,width:O}=dx({externalRef:t,hiddenUntilFound:v,id:x,keepMounted:y,mounted:u,onOpenChange:d,open:f,setMounted:p,setOpen:h,transitionStatus:_}),k={...g,transitionStatus:D},A=Di(s,k),j=Hi(`div`,{...e,style:void 0},{state:k,ref:w,props:[C,{style:{[_x]:S===void 0?`auto`:`${S}px`,[vx]:O===void 0?`auto`:`${O}px`}},c,A?{style:A}:void 0,T?{style:{animationName:`none`}}:void 0],stateAttributesMapping:ox});return E?j:null});function bx({...e}){return(0,S.jsx)(sx,{"data-slot":`collapsible`,...e})}function xx({...e}){return(0,S.jsx)(lx,{"data-slot":`collapsible-trigger`,...e})}function Sx({...e}){return(0,S.jsx)(yx,{"data-slot":`collapsible-content`,...e})}function Cx({className:e,...t}){return(0,S.jsx)(`div`,{"data-slot":`trace`,className:X(`flex w-full min-w-0 flex-col gap-2 *:has-[>[data-slot=trace-line]]:flex *:has-[>[data-slot=trace-line]]:w-fit *:has-[>[data-slot=trace-line]]:max-w-full *:has-[>[data-slot=trace-line]]:min-w-0 *:has-[>[data-slot=trace-line]]:rounded-md *:has-[>[data-slot=trace-line]]:text-left *:has-[>[data-slot=trace-line]]:outline-none *:has-[>[data-slot=trace-line]]:focus-visible:ring-3 *:has-[>[data-slot=trace-line]]:focus-visible:ring-ring/50`,e),...t})}function wx({className:e,status:t,...n}){return(0,S.jsx)(`span`,{"data-slot":`trace-line`,"data-status":t,className:X(`flex w-fit max-w-full min-w-0 items-center gap-2 text-sm text-muted-foreground transition-colors in-[a,button]:cursor-pointer in-[a:hover,button:hover]:text-foreground data-[status=error]:text-destructive data-[status=error]:in-[a:hover,button:hover]:text-destructive data-[status=pending]:opacity-60 data-[status=running]:*:data-[slot=trace-title]:shimmer`,e),...n})}function Tx({className:e,...t}){return(0,S.jsx)(`span`,{"data-slot":`trace-icon`,"aria-hidden":`true`,className:X(`flex size-4 shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [[data-slot=trace-title]~&]:-ml-1`,e),...t})}function Ex({className:e,...t}){return(0,S.jsx)(`span`,{"data-slot":`trace-title`,className:X(`min-w-0 truncate motion-reduce:shimmer-none`,e),...t})}function Dx({className:e,...t}){return(0,S.jsx)(bx,{"data-slot":`trace-collapsible`,className:X(`flex w-full min-w-0 flex-col`,e),...t})}function Ox({className:e,children:t,...n}){return(0,S.jsxs)(xx,{"data-slot":`trace-collapsible-trigger`,className:X(`group/trace-collapsible-trigger flex w-fit max-w-full min-w-0 cursor-pointer items-center gap-1 rounded-md text-left text-muted-foreground transition-colors outline-none hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 has-[[data-status=error]]:text-destructive`,e),...n,children:[t,(0,S.jsx)(Tx,{className:`transition-transform group-aria-expanded/trace-collapsible-trigger:rotate-90`,children:(0,S.jsx)(Cu,{})})]})}function kx({className:e,children:t,...n}){return(0,S.jsx)(Sx,{"data-slot":`trace-collapsible-content`,className:`h-(--collapsible-panel-height) min-w-0 overflow-hidden transition-[height] duration-200 data-ending-style:h-0 data-starting-style:h-0`,...n,children:(0,S.jsx)(`div`,{"data-slot":`trace-collapsible-content-inner`,className:X(`mt-2 mb-1 ml-[calc(--spacing(2)-1px)] min-w-0 border-l pr-1 pl-4 leading-relaxed wrap-break-word text-muted-foreground`,e),children:t})})}function Ax(e){let t=[];for(let n of e){let e=t.at(-1);n.role===`assistant`&&e?.role===`assistant`?e.messages.push(n):t.push({id:n.id,role:n.role,messages:[n]})}return t}function jx(e,t){let n=[];for(let r of e){r.text&&n.push({type:`text`,text:r.text});for(let e of r.tools??[]){let r=t?.(e),i=n.at(-1);r==null?i?.type===`steps`?i.tools.push(e):n.push({type:`steps`,tools:[e]}):n.push({type:`result`,id:e.id,node:r})}}return n}function Mx({host:e}){let[t,n]=(0,v.useState)(!1);return t?(0,S.jsx)(Vu,{}):(0,S.jsx)(`img`,{src:`https://icons.duckduckgo.com/ip3/${e}.ico`,alt:``,className:`size-3 shrink-0 rounded-sm`,onError:()=>n(!0)})}var Nx=6;function Px({sources:e}){let t=new Map;for(let n of e){let e=new URL(n.url).hostname;t.has(e)||t.set(e,n)}let n=t.size-Nx;return(0,S.jsxs)(`ul`,{"aria-label":`Sources`,className:`flex flex-wrap gap-1 pl-6`,children:[[...t].slice(0,Nx).map(([e,t])=>(0,S.jsx)(`li`,{children:(0,S.jsxs)(Xl,{children:[(0,S.jsxs)(Gl,{render:(0,S.jsx)(Vv,{variant:`outline`,render:(0,S.jsx)(`a`,{href:t.url,target:`_blank`,rel:`noopener noreferrer`})}),children:[(0,S.jsx)(Mx,{host:e}),e.replace(/^www\./,``)]}),(0,S.jsx)(Kl,{className:`wrap-anywhere`,children:t.title??t.url})]})},e)),n>0&&(0,S.jsx)(`li`,{children:(0,S.jsxs)(Vv,{variant:`secondary`,children:[`+`,n]})})]})}function Fx({tool:e}){let t=(0,S.jsxs)(wx,{status:e.status===`complete`?void 0:e.status,children:[(0,S.jsx)(Tx,{children:e.sources?(0,S.jsx)(Vu,{}):(0,S.jsx)(yd,{})}),(0,S.jsx)(Ex,{children:e.label})]}),n=e.output?(0,S.jsxs)(Dx,{children:[(0,S.jsx)(Ox,{children:t}),(0,S.jsx)(kx,{children:(0,S.jsx)(`pre`,{className:`max-h-48 overflow-auto whitespace-pre-wrap text-xs`,children:e.output})})]}):t;return e.sources?.length?(0,S.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[n,(0,S.jsx)(Px,{sources:e.sources})]}):n}function Ix({quote:e}){return(0,S.jsx)(Cx,{children:(0,S.jsxs)(Dx,{defaultOpen:!0,children:[(0,S.jsx)(Ox,{children:(0,S.jsxs)(wx,{children:[(0,S.jsx)(Tx,{children:(0,S.jsx)(_d,{})}),(0,S.jsx)(Ex,{children:e.source})]})}),(0,S.jsxs)(kx,{children:[(0,S.jsx)(`p`,{className:`max-h-48 overflow-auto whitespace-pre-wrap text-foreground`,children:e.text}),e.href&&(0,S.jsx)(`a`,{href:e.href,target:`_blank`,rel:`noopener noreferrer`,className:`block truncate text-xs underline underline-offset-4`,children:e.href})]})]})})}var Lx=(0,v.memo)(function({text:e}){return(0,S.jsx)(`div`,{className:`flex min-w-0 flex-col gap-2 text-sm leading-relaxed wrap-break-word`,children:(0,S.jsx)(Tv,{skipHtml:!0,allowedElements:[`p`,`strong`,`em`,`a`,`ul`,`ol`,`li`,`code`,`pre`,`br`,`blockquote`],components:{a:({children:e,href:t})=>(0,S.jsx)(`a`,{href:t,target:`_blank`,rel:`noopener noreferrer`,className:`underline underline-offset-4`,children:e}),ul:({children:e})=>(0,S.jsx)(`ul`,{className:`list-disc pl-5`,children:e}),ol:({children:e})=>(0,S.jsx)(`ol`,{className:`list-decimal pl-5`,children:e}),pre:({children:e})=>(0,S.jsx)(`pre`,{className:`overflow-auto whitespace-pre-wrap`,children:e})},children:e})})});function Rx({messages:e,prompt:t,onPromptChange:n,busy:r,disabled:i=!1,error:a,onSend:o,onStop:s,renderTool:c,model:l,placeholder:u=`Ask the agent…`,emptyTitle:d=`What would you like to do?`,emptyDescription:f=`Ask a question or describe a change. You stay in control of what gets applied.`}){let[p,m]=(0,v.useState)(!1),[h,g]=(0,v.useState)(``),_=a||h,y=(0,v.useId)(),b=r||p;async function x(){let e=t.trim();if(!(!e||b||i)){m(!0),g(``);try{await o(e)&&n(t=>t.trim()===e?``:t)}catch(e){g(e instanceof Error?e.message:`Could not send. Please try again.`)}finally{m(!1)}}}return(0,S.jsxs)(`section`,{"aria-label":`Agent conversation`,className:`flex min-h-0 min-w-0 flex-1 flex-col gap-4`,children:[(0,S.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,S.jsx)(Ub,{autoScroll:!0,children:(0,S.jsxs)(Wb,{children:[(0,S.jsx)(Gb,{children:(0,S.jsx)(Kb,{children:e.length===0?(0,S.jsx)(qb,{messageId:`empty`,children:(0,S.jsx)(Gv,{children:(0,S.jsxs)(Kv,{children:[(0,S.jsx)(qv,{children:d}),(0,S.jsx)(Jv,{children:f})]})})}):Ax(e).map(e=>(0,S.jsx)(qb,{messageId:e.id,scrollAnchor:e.role===`user`,children:(0,S.jsx)(zy,{align:e.role===`user`?`end`:`start`,children:(0,S.jsx)(By,{children:e.role===`user`?(0,S.jsxs)(`div`,{className:`flex min-w-0 flex-col items-end gap-2`,children:[e.messages[0].quote&&(0,S.jsx)(Ix,{quote:e.messages[0].quote}),(0,S.jsx)(Uv,{align:`end`,variant:`muted`,children:(0,S.jsx)(Wv,{className:`whitespace-pre-wrap`,children:e.messages[0].text})})]}):(0,S.jsx)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:jx(e.messages,c).map((e,t)=>e.type===`text`?(0,S.jsx)(Lx,{text:e.text},t):e.type===`steps`?(0,S.jsx)(Cx,{children:e.tools.map(e=>(0,S.jsx)(Fx,{tool:e},e.id))},e.tools[0].id):(0,S.jsx)(`div`,{className:`min-w-0`,children:e.node},e.id))})})})},e.id))})}),(0,S.jsx)(Jb,{})]})})}),_&&(0,S.jsxs)(Iv,{variant:`destructive`,children:[(0,S.jsx)(Lv,{children:`The agent could not continue`}),(0,S.jsx)(Rv,{children:_})]}),(0,S.jsxs)(`form`,{className:`shrink-0`,onSubmit:e=>{e.preventDefault(),x()},children:[(0,S.jsx)(`label`,{htmlFor:y,className:`sr-only`,children:`Message the agent`}),(0,S.jsxs)(My,{children:[(0,S.jsx)(Ry,{id:y,value:t,onChange:e=>n(e.target.value),className:`max-h-40`,onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing&&(e.preventDefault(),x())},placeholder:u,disabled:i,maxLength:4e3,rows:2}),(0,S.jsx)(Py,{align:`block-end`,className:`justify-end`,children:b?(0,S.jsxs)(Iy,{type:`button`,size:`sm`,variant:`outline`,onClick:s,disabled:p||i,children:[(0,S.jsx)(pd,{"data-icon":`inline-start`}),`Stop`]}):(0,S.jsxs)(Iy,{type:`submit`,size:`sm`,variant:t.trim()?`default`:`secondary`,disabled:i,"aria-disabled":i||!t.trim(),children:[(0,S.jsx)(hu,{"data-icon":`inline-start`}),`Send`]})})]})]}),(0,S.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-2`,children:[(0,S.jsx)(`p`,{role:`status`,className:`truncate text-xs text-muted-foreground`,children:b?`Agent working. You can stop it at any time.`:`Enter to send. Shift+Enter for a new line.`}),l&&(0,S.jsxs)(Xl,{children:[(0,S.jsxs)(Gl,{render:(0,S.jsx)(Vv,{variant:`secondary`}),children:[(0,S.jsx)(_u,{}),l.name,` · `,l.thinking]}),(0,S.jsxs)(Kl,{children:[`Model `,l.name,`, thinking `,l.thinking]})]})]})]})}function zx({className:e,...t}){return(0,S.jsx)(`label`,{"data-slot":`label`,className:X(`flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...t})}var Bx=v.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return Hi(`div`,e,{state:{orientation:i},ref:t,props:[{role:`separator`,"aria-orientation":i},o]})});function Vx({className:e,...t}){return(0,S.jsx)(`fieldset`,{"data-slot":`field-set`,className:X(`flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3`,e),...t})}function Hx({className:e,variant:t=`legend`,...n}){return(0,S.jsx)(`legend`,{"data-slot":`field-legend`,"data-variant":t,className:X(`mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base`,e),...n})}function Ux({className:e,...t}){return(0,S.jsx)(`div`,{"data-slot":`field-group`,className:X(`group/field-group @container/field-group flex w-full flex-col gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4`,e),...t})}var Wx=Pv(`group/field flex w-full gap-2 data-[invalid=true]:text-destructive`,{variants:{orientation:{vertical:`flex-col *:w-full [&>.sr-only]:w-auto`,horizontal:`flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`,responsive:`flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`}},defaultVariants:{orientation:`vertical`}});function Gx({className:e,orientation:t=`vertical`,...n}){return(0,S.jsx)(`div`,{role:`group`,"data-slot":`field`,"data-orientation":t,className:X(Wx({orientation:t}),e),...n})}function Kx({className:e,...t}){return(0,S.jsx)(`div`,{"data-slot":`field-content`,className:X(`group/field-content flex flex-1 flex-col gap-0.5 leading-snug`,e),...t})}function qx({className:e,...t}){return(0,S.jsx)(zx,{"data-slot":`field-label`,className:X(`group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10`,`has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col`,e),...t})}function Jx({className:e,...t}){return(0,S.jsx)(`p`,{"data-slot":`field-description`,className:X(`text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5`,`last:mt-0 nth-last-2:-mt-1`,`[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,e),...t})}function Yx(e){let t=v.useRef(!0);t.current&&(t.current=!1,e())}function Xx(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}var Zx=v.createContext(void 0),Qx=v.createContext(void 0);function $x(){let e=v.useContext(Zx);if(e===void 0)throw Error(J(60));return e}function eS(){let e=v.useContext(Qx);if(e===void 0)throw Error(J(61));return e}function tS(e,t,n=Object.is){let{length:r}=e;if(r!==t.length)return!1;for(let i=0;i<r;i+=1)if(!n(e[i],t[i]))return!1;return!0}var nS=(e,t)=>Object.is(e,t);function rS(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function iS(e,t,n){return Array.isArray(e)&&Array.isArray(t)?!tS(e,t,(e,t)=>rS(e,t,n)):e!==t}function aS(e,t,n){return e?e.some(e=>e!==void 0&&rS(t,e,n)):!1}function oS(e,t,n){return e?e.findIndex(e=>e!==void 0&&rS(e,t,n)):-1}function sS(e,t){if(t!==nS)return n=>aS(e,n,t);let n=new Set(e);return n.delete(void 0),t=>n.has(t)&&(t!==0||e.some(e=>Object.is(t,e)))}function cS(e,t,n,r){let i=r&&Array.isArray(t)?e.findIndex(sS(t,n)):oS(e,t,n);return i===-1?null:i}function lS(e,t,n,r,i,a){return aS(r,t,i)?a!=null&&e>a&&aS(r,n[a],i)?a:e:e===a?cS(n,r,i,!0):a}function uS(e,t,n){return e.filter(e=>!rS(t,e,n))}function dS(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function fS(e){return typeof e==`object`&&!!e&&Array.isArray(e.items)}function pS(e){return fS(e?.[0])}function mS(e){return pS(e)?e.flatMap(e=>e.items):e}function hS(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(pS(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function gS(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return dS(e)}function _S(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?dS(e.value):dS(e)}function vS(e,t,n){function r(){return gS(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return(Object.hasOwn(t,e)?t[e]:void 0)??r();if(Array.isArray(t)){let n=mS(t);if(typeof e!=`object`||!e){let t=n.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=n.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function yS(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,S.jsx)(v.Fragment,{children:vS(r,t,n)},i)),e),[])}var bS={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,multiple:e=>e.multiple,disabled:e=>e.disabled,readOnly:e=>e.readOnly,required:e=>e.required,highlightItemOnHover:e=>e.highlightItemOnHover,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:_S(t,r)!==``},hasNullItemLabel:(e,t)=>t?hS(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(e=>rS(t,e,n)):rS(t,r,n)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,itemRoot:e=>e.itemRoot,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows};function xS(e){let t=v.useRef(``),n=v.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:v.useCallback(n=>{n.detail===0?e(n,`keyboard`):(`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``)},[e]),onPointerDown:n}}function SS(e,t){let{onClick:n,onPointerDown:r}=xS(Y((n,r)=>{(typeof e==`function`?e():e)||t(r||(ye?`touch`:``))}));return v.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function CS(e){let[t,n]=v.useState(null),r=SS(e,n);return Dy(e,t=>{t&&!e&&n(null)}),v.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}function wS(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}function TS(e,t){return Math.max(0,e-t)}function ES(e,t){if(t<=0)return 0;let n=wS(e,0,t),r=n,i=t-n,a=r<=1,o=i<=1;return a&&o?r<=i?0:t:a?0:o?t:n}function DS(e){let{id:t,value:n,defaultValue:r=null,onValueChange:i,open:a,defaultOpen:o=!1,onOpenChange:s,name:c,form:l,autoComplete:u,disabled:d=!1,readOnly:f=!1,required:p=!1,modal:m=!0,actionsRef:h,inputRef:g,onOpenChangeComplete:_,items:y,multiple:b=!1,itemToStringLabel:x,itemToStringValue:C,isItemEqualToValue:w=nS,highlightItemOnHover:T=!0,children:E}=e,{clearErrors:D}=gy(),{setDirty:O,setTouched:k,setFocused:A,validityData:j,setFilled:M,name:N,disabled:P,validation:F,validationMode:I}=my(),L=Sy({id:t}),R=P||d,z=N??c,[B,V]=Yb({controlled:n,default:b?r??G:r,name:`Select`,state:`value`}),[U,ee]=Yb({controlled:a,default:o,name:`Select`,state:`open`}),te=v.useRef([]),ne=v.useRef([]),W=v.useRef(null),re=v.useRef(null),ie=v.useRef(0),oe=v.useRef(null),J=v.useRef([]),se=v.useRef(!1),ce=v.useRef(null),le=v.useRef(null),ue=v.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),de=v.useRef(!1),fe=v.useRef(B),{openMethod:pe,triggerProps:me}=CS(U),he=H(()=>new mo({id:L,labelId:void 0,modal:m,multiple:b,disabled:R,readOnly:f,required:p,highlightItemOnHover:T,itemToStringLabel:x,itemToStringValue:C,isItemEqualToValue:w,value:B,open:U,mounted:U,transitionStatus:void 0,items:y,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:K,triggerProps:K,itemRoot:{props:K,multiple:b,disabled:R,readOnly:f,isItemEqualToValue:w},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1},{setValue:ae,setOpen:ae,handleScrollArrowVisibility:ae,onOpenChangeComplete:ae,listRef:te,popupRef:W,scrollHandlerRef:re,scrollArrowsMountedCountRef:ie,valueRef:oe,valuesRef:J,labelsRef:ne,typingRef:se,selectionRef:ue,firstItemTextRef:ce,selectedItemTextRef:le,alignItemWithTriggerActiveRef:de,initialValueRef:fe},bS)).current,[ge,_e]=v.useState(!1),{mounted:ve,transitionStatus:ye,forceUnmount:be}=za({open:U,ref:W,preventUnmountOnClose:ge,setPreventUnmountOnClose:_e,onUnmount(){he.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),_?.(!1)}}),xe=he.useState(`activeIndex`),Se=he.useState(`selectedIndex`),Ce=he.useState(`triggerElement`),we=he.useState(`positionerElement`),Te=qc(pe),Ee=pe??Te,De=v.useMemo(()=>b?``:_S(B,C),[b,B,C]),Oe=v.useMemo(()=>b&&Array.isArray(B)?B.map(e=>_S(e,C)):_S(B,C),[b,B,C]);Ey(Mn(Ce),L,B,Y(()=>Oe),!R,c);let ke=b?Array.isArray(B)&&B.length>0:B!=null&&De!==``;q(()=>{M(ke)},[ke,M]),q(function(){let e=cS(J.current,B,w,b);e===null&&(le.current=null),!U&&he.set(`selectedIndex`,e)},[b,U,B,w,he]),Dy(B,()=>{D(z),O(iS(B,j.initialValue,w)),F.change(B)});let Ae=Y((e,t)=>{let n=t,r=qa(n);s?.(e,n),!t.isCanceled&&(e||_e(r()),ee(e),!e&&(t.reason===`focus-out`||t.reason===`outside-press`)&&(k(!0),A(!1),I===`onBlur`&&F.commit(B)))});v.useImperativeHandle(h,()=>({unmount:be,close:()=>{he.state.open&&Ae(!1,Jt(vn))}}),[be,Ae,he]);let je=Y((e,t)=>{i?.(e,t),!t.isCanceled&&V(e)}),Me=Y(e=>{let t=TS(e.scrollHeight,e.clientHeight),n=ES(e.scrollTop,t),r=n>0,i=n<t;he.set(`scrollUpArrowVisible`,r),he.set(`scrollDownArrowVisible`,i)}),Ne=To({open:U,onOpenChange:Ae,elements:{reference:Ce,floating:we}}),Pe=wa(Ne,{enabled:!R,event:`mousedown`}),Fe=Aa(Ne),Ie=Ho(Ne,{enabled:!R,listRef:te,activeIndex:xe,selectedIndex:Se,disabledIndices:G,onNavigate(e){(e!==null||U)&&he.set(`activeIndex`,e)},focusItemOnHover:T}),Le=Uo(Ne,{enabled:!R&&(U||!f&&!b),listRef:ne,activeIndex:xe,selectedIndex:Se,disabledIndices:e=>Xx(te.current[e]),onMatch(e){U?he.set(`activeIndex`,e):je(J.current[e],Jt(Xt))},onTyping(e){se.current=e}}),Re=v.useMemo(()=>ki(Le.reference,Ie.reference,Fe.reference,Pe.reference,me),[Pe.reference,Le.reference,Ie.reference,Fe.reference,me]),ze=v.useMemo(()=>ki(Ba,Le.floating,Ie.floating,Fe.floating),[Le.floating,Ie.floating,Fe.floating]),Be=Ie.item??K,Ve=v.useMemo(()=>({props:Be,multiple:b,disabled:R,readOnly:f,isItemEqualToValue:w}),[Be,b,R,f,w]);he.useContextCallback(`setValue`,je),he.useContextCallback(`setOpen`,Ae),he.useContextCallback(`handleScrollArrowVisibility`,Me),he.useContextCallback(`onOpenChangeComplete`,_),Yx(()=>{he.update({popupProps:ze,triggerProps:Re,itemRoot:Ve})}),he.useSyncedValues({id:L,modal:m,multiple:b,disabled:R,readOnly:f,required:p,highlightItemOnHover:T,value:B,open:U,mounted:ve,transitionStatus:ye,popupProps:ze,triggerProps:Re,itemRoot:Ve,items:y,itemToStringLabel:x,itemToStringValue:C,isItemEqualToValue:w,openMethod:Ee});let He=En(g,F.inputRef),Ue=b?void 0:z,We=v.useMemo(()=>!b||!Array.isArray(B)||!z?null:B.map(e=>{let t=_S(e,C);return(0,S.jsx)(`input`,{type:`hidden`,form:l,name:z,value:t,disabled:R},t)}),[b,B,l,z,C,R]);return(0,S.jsxs)(Zx.Provider,{value:he,children:[(0,S.jsx)(Qx.Provider,{value:Ne,children:E}),(0,S.jsx)(`input`,{...F.getValidationProps(R,{onFocus(){he.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented||R||f)return;let t=e.currentTarget.value,n=Jt(Xt,e.nativeEvent);function r(){if(b)return;let e=t.toLowerCase(),r=J.current.findIndex(t=>_S(t,C).toLowerCase()===e||gS(t,x).toLowerCase()===e);r===-1&&(r=J.current.findIndex((t,n)=>{let r=ne.current[n];return r!=null&&r.toLowerCase()===e}));let i=J.current[r];i!=null&&je(i,n)}he.set(`forceMount`,!0),queueMicrotask(r)}}),id:L&&Ue==null?`${L}-hidden-input`:void 0,form:l,name:Ue,autoComplete:u,value:De,disabled:R,required:p&&!(b&&ke),readOnly:f,ref:He,style:z?Kn:Gn,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),We]})}function OS(e,t){return e??t}var kS=5;function AS(e,t){let n=jS(t);return e.clientX>=n.left-kS&&e.clientX<=n.right+kS&&e.clientY>=n.top-kS&&e.clientY<=n.bottom+kS}function jS(e){let t=e.getBoundingClientRect(),n=Ie(e);if(De)return t;let r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(r.content===`none`&&i.content===`none`)return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,c),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}var MS=`data-popup-side`,NS=400,PS={...jt,...dy,popupSide:e=>e?{[MS]:e}:null,value:()=>null},FS=v.forwardRef(function(e,t){let{render:n,className:r,id:i,disabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{setTouched:l,validationMode:u,validation:d,state:f,disabled:p}=my(),{labelId:m}=vy(),h=$x(),g=h.useState(`readOnly`),_=h.useState(`required`),y=h.useState(`disabled`),b=p||y||a,x=h.useState(`open`),S=h.useState(`mounted`),C=h.useState(`value`),w=h.useState(`triggerProps`),T=h.useState(`positionerElement`),E=h.useState(`listElement`),D=h.useState(`popupSide`),O=h.useState(`id`),k=h.useState(`labelId`),A=h.useState(`hasSelectedValue`),j=S&&T?D:null,M=i??O,N=OS(m,k);Sy({id:i});let P=Mn(T),F=v.useRef(null),I=Ty(b,F),{getButtonProps:L,buttonRef:R}=ey({disabled:b,native:o}),z=h.useStateSetter(`triggerElement`),B=fe(),V=fe(),H=fe();v.useEffect(()=>{if(x)return H.start(NS,()=>{h.context.selectionRef.current.allowUnselectedMouseUp=!0,h.context.selectionRef.current.allowSelectedMouseUp=!0}),()=>{H.clear()};h.context.selectionRef.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},V.clear()},[x,h,V,H]);let U=ki(w,{id:M,role:`combobox`,"aria-expanded":x,"aria-haspopup":`listbox`,"aria-controls":x?E?.id??Ht(T)?.id:void 0,"aria-labelledby":N,"aria-readonly":g||void 0,"aria-required":_||void 0,tabIndex:b?-1:0,onFocus(e){I(!0),x&&h.context.alignItemWithTriggerActiveRef.current&&h.context.setOpen(!1,Jt(Xt,e.nativeEvent)),B.start(0,()=>{h.set(`forceMount`,!0)})},onBlur(e){ot(T,e.relatedTarget)||(l(!0),I(!1),u===`onBlur`&&d.commit(C))},onMouseDown(e){if(x)return;let t=Un(e.currentTarget);function n(e){if(!F.current)return;let t=e.target;ot(F.current,t)||ot(P.current,t)||AS(e,F.current)||h.context.setOpen(!1,Jt(pn,e))}V.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},c,L),ee=d.getValidationProps(b,U);ee.role=`combobox`;let te={...f,open:x,disabled:b,value:C,readOnly:g,popupSide:j,placeholder:!A};return Hi(`button`,e,{ref:[t,F,R,z],state:te,stateAttributesMapping:PS,props:ee})}),IS={value:()=>null},LS=v.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,style:o,...s}=e,c=$x(),l=c.useState(`value`),u=c.useState(`items`),d=c.useState(`itemToStringLabel`),f=c.useState(`hasSelectedValue`),p=!f&&a!=null&&i==null,m=c.useState(`hasNullItemLabel`,p),h={value:l,placeholder:!f},g=null;return g=typeof i==`function`?i(l):i??(p&&!m?a:Array.isArray(l)?yS(l,u,d):vS(l,u,d)),Hi(`span`,e,{state:h,ref:[t,c.context.valueRef],props:[{children:g},s],stateAttributesMapping:IS})}),RS=v.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e;return Hi(`span`,e,{state:{open:$x().useState(`open`)},ref:t,props:[{"aria-hidden":!0,children:`▼`},a],stateAttributesMapping:At})}),zS=v.forwardRef(function(e,t){let n=$x(),r=n.useState(`mounted`),i=n.useState(`forceMount`);return r||i?(0,S.jsx)(ia,{ref:t,...e}):null}),BS=v.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function VS(){return v.useContext(BS)}function HS(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=Y(i),[,o]=v.useState(0),s=H(WS).current,c=H(US).current,l=v.useRef(0),u=v.useRef(!0),d=v.useRef(null),f=v.useRef(null),p=Y(()=>{u.current||(u.current=!0,o(e=>e+1))}),m=Y((e,t)=>{c.set(e,t),p()}),h=Y(e=>{c.delete(e),p()}),g=Y(e=>{let t=new Map;return n.current.length=0,r&&(r.current.length=0),e.forEach(e=>{t.set(e.element,{...e.registration.metadata??{},index:e.index}),n.current[e.index]=e.element,r&&(r.current[e.index]=e.registration.label===void 0?e.registration.textRef?.current?.textContent??e.element.textContent:e.registration.label)}),l.current=n.current.length,t});function _(e){if(f.current?.disconnect(),f.current=null,typeof MutationObserver!=`function`||e.length<2)return;let t=new MutationObserver(n=>{if(!qS(n))return;let r=null;for(let n of e)if(n.isConnected){if(r&&JS(r,n)>0){t.disconnect(),p();return}r=n}});f.current=t;let n=new Set;for(let t=1;t<e.length;t+=1){let r=KS(e[t-1],e[t]);r&&n.add(r)}n.forEach(e=>t.observe(e,{childList:!0}))}let y=Y(()=>{let[e,t]=GS(c),n=g(e),r=d.current,i=!r||r.length!==e.length||e.some((e,t)=>{let n=r[t];return e.index!==n.index||e.element!==n.element||e.registration.index!==n.registration.index||e.registration.metadata!==n.registration.metadata});_(t),d.current=e,u.current=!1,i&&(s.forEach(e=>e(n)),a(n))});q(()=>(!u.current&&d.current&&g(d.current),()=>{n.current=[],r&&(r.current=[])}),[n,r,g]),q(()=>{u.current&&y()}),q(()=>()=>{f.current?.disconnect(),u.current=!0},[]);let b=Y(e=>(s.add(e),()=>{s.delete(e)})),x=v.useMemo(()=>({register:m,unregister:h,subscribeMapChange:b,nextIndexRef:l}),[m,h,b,l]);return(0,S.jsx)(BS.Provider,{value:x,children:t})}function US(){return new Map}function WS(){return new Set}function GS(e){let t=new Set,n=[],r=[];e.forEach((e,i)=>{if(!i.isConnected)return;let a=e.index,o={index:a??-1,element:i,registration:e};a===null?r.push(o):a>=0&&(t.add(a),n.push(o))});let i=0;return r.sort((e,t)=>JS(e.element,t.element)),r.forEach(e=>{for(;t.has(i);)i+=1;e.index=i,n.push(e),i+=1}),t.size>0&&n.sort((e,t)=>e.index-t.index),[n,r.map(e=>e.element)]}function KS(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function qS(e){for(let t of e)for(let e=0;e<t.removedNodes.length;e+=1)if(t.removedNodes[e].isConnected)return!0;return!1}function JS(e,t){return e.nextElementSibling===t?-1:t.nextElementSibling===e?1:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}var YS=v.createContext(void 0);function XS(){let e=v.useContext(YS);if(!e)throw Error(J(59));return e}var ZS=v.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,S.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})});function QS(e,t){e&&Object.assign(e.style,t)}var $S={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},eC={},tC={},nC=``;function rC(e,t){return He(e)?e:t}function iC(e,t,n){return/hidden|clip/.test(e.getComputedStyle(rC(t,n)).overflowY)}function aC(e){if(typeof document>`u`)return!1;let t=Un(e);return Ie(t).innerWidth-t.documentElement.clientWidth>0}function oC(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=Un(e),n=t.documentElement,r=t.body,i=rC(n,r),a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function sC(e){let t=Un(e),n=t.documentElement,r=t.body,i=rC(n,r),a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function cC(e){let t=Un(e),n=t.documentElement,r=t.body,i=Ie(n),a=0,o=0,s=!1,c=Vn.create();if(we&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,eC={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},nC=n.style.scrollBehavior,tC={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=rC(n,r);s=oC(e),s?(n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`):(Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflowY:`hidden`,overflowX:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`)}function u(){Object.assign(n.style,eC),Object.assign(r.style,tC),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=nC)}function d(){u(),c.request(l)}l();let f=wn(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var lC=new class{lockCount=0;restore=null;timeoutLock=de.create();timeoutUnlock=de.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=Un(e),n=t.documentElement,r=t.body,i=Ie(n);if(iC(i,n,r)){let t=new i.MutationObserver(()=>{iC(i,n,r)||(t.disconnect(),this.restore=null,this.lock(e))}),a={attributes:!0};t.observe(n,a),t.observe(r,a),this.restore=()=>t.disconnect();return}let a=ye||!aC(e);this.restore=a?sC(e):cC(e)}};function uC(e=!0,t=null){q(()=>{if(e)return lC.acquire(t)},[e,t])}var dC=20;function fC(e,t,n,r){let[i,a]=v.useState(!1);q(()=>{if(!e||!t||n==null){a(!1);return}let r=Un(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-dC)},[e,t,n]),uC(e&&(!t||i),r)}var pC={position:`fixed`},mC=v.forwardRef(function(e,t){let{anchor:n,className:r,render:i,positionMethod:a,side:o,align:s,sideOffset:c,alignOffset:l,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f,sticky:p,disableAnchorTracking:m,alignItemWithTrigger:h=!0,collisionAvoidance:g=Zi,style:_,...y}=e,b=$x(),x=eS(),C=b.useState(`open`),w=b.useState(`mounted`),T=b.useState(`modal`),E=b.useState(`value`),D=b.useState(`openMethod`),O=b.useState(`positionerElement`),k=b.useState(`triggerElement`),A=b.useState(`isItemEqualToValue`),j=b.useState(`transitionStatus`),M=v.useRef(null),N=v.useRef(null),[P,F]=v.useState(h),I=w&&P&&D!==`touch`;!w&&P!==h&&F(h),v.useImperativeHandle(b.context.alignItemWithTriggerActiveRef,()=>I),fC((I||T)&&C,D===`touch`,O,k);let L=Lc({anchor:n,floatingRootContext:x,positionMethod:a,mounted:w,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m??I,collisionAvoidance:g,keepMounted:!0}),R=I?`none`:L.side,z=I?pC:L.positionerStyles,B={open:C,side:R,align:L.align,anchorHidden:L.anchorHidden};q(()=>{b.set(`popupSide`,L.side)},[b,L.side]);let V=Vc(e,B,{styles:z,transitionStatus:j,props:y,refs:[t,b.useStateSetter(`positionerElement`)],hidden:!w,inert:!C}),H=v.useRef(0),U=Y(e=>{if(b.context.valuesRef.current.length===0)return;let t=H.current;H.current=e.size;let n=Jt(Xt);if(t!==0&&!b.state.multiple&&E!==null&&oS(b.context.valuesRef.current,E,A)===-1){let e=b.context.initialValueRef.current,t=e!=null&&oS(b.context.valuesRef.current,e,A)!==-1?e:null;b.context.setValue(t,n),t===null&&(b.set(`selectedIndex`,null),b.context.selectedItemTextRef.current=null)}if(t!==0&&b.state.multiple&&Array.isArray(E)){let e=E.filter(e=>oS(b.context.valuesRef.current,e,A)!==-1);e.length!==E.length&&(b.context.setValue(e,n),e.length===0&&(b.set(`selectedIndex`,null),b.context.selectedItemTextRef.current=null))}if(C&&I){b.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};QS(O,e),QS(b.context.popupRef.current,e)}}),ee=v.useMemo(()=>({...L,side:R,alignItemWithTriggerActive:I,setControlledAlignItemWithTrigger:F,scrollUpArrowRef:M,scrollDownArrowRef:N}),[L,R,I,F]);return(0,S.jsx)(HS,{elementsRef:b.context.listRef,labelsRef:b.context.labelsRef,onMapChange:U,children:(0,S.jsxs)(YS.Provider,{value:ee,children:[w&&T&&(0,S.jsx)(ZS,{inert:Kc(!C),cutout:k}),V]})})}),hC=`base-ui-disable-scrollbar`,gC={className:hC,getElement(e){return(0,S.jsx)(`style`,{nonce:e,href:hC,precedence:`base-ui:low`,children:`.${hC}{scrollbar-width:none}.${hC}::-webkit-scrollbar{display:none}`})}},_C=v.createContext(void 0);function vC(e){let t=v.useContext(_C);if(t===void 0&&!e)throw Error(J(69));return t}var yC=`ArrowUp`,bC=`ArrowDown`,xC=`ArrowLeft`,SC=`ArrowRight`,CC=new Set([yC,bC,xC,SC,`Home`,`End`]),wC=[`Shift`,`Control`,`Alt`,`Meta`];function TC(e){return Be(e)&&e.tagName===`INPUT`}function EC(e){return!!(TC(e)&&e.selectionStart!=null||Be(e)&&e.tagName===`TEXTAREA`)}function DC(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,a=e.scrollTop,o=e.clientWidth<e.scrollWidth,s=e.clientHeight<e.scrollHeight;if(o&&r!==`vertical`){let r=OC(e,t,`left`),a=kC(e),o=kC(t);n===`ltr`&&(r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight?i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight:r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft&&(i=r-o.scrollMarginLeft-a.scrollPaddingLeft)),n===`rtl`&&(r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft?i=r-o.scrollMarginLeft-a.scrollPaddingLeft:r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight&&(i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight))}if(s&&r!==`horizontal`){let n=OC(e,t,`top`),r=kC(e),i=kC(t);n-i.scrollMarginTop<e.scrollTop+r.scrollPaddingTop?a=n-i.scrollMarginTop-r.scrollPaddingTop:n+t.offsetHeight+i.scrollMarginBottom>e.scrollTop+e.clientHeight-r.scrollPaddingBottom&&(a=n+t.offsetHeight+i.scrollMarginBottom-e.clientHeight+r.scrollPaddingBottom)}e.scrollTo({left:i,top:a,behavior:`auto`})}function OC(e,t,n){let r=n===`left`?`offsetLeft`:`offsetTop`,i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function kC(e){let t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}var AC=v.createContext(void 0),jC={disableStyleElements:!1};function MC(){return v.useContext(AC)??jC}var NC=`--transform-origin`,PC={...Mt,...yt},FC=v.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,s=$x(),c=s.useState(`multiple`),l=s.useState(`readOnly`),u=s.useState(`highlightItemOnHover`),d=eS(),{side:f,align:p,alignItemWithTriggerActive:m,isPositioned:h,setControlledAlignItemWithTrigger:g}=XS(),_=vC(!0)!=null,y=Cc(),{nonce:b,disableStyleElements:x}=MC(),C=s.useState(`id`),w=s.useState(`open`),T=s.useState(`openMethod`),E=s.useState(`mounted`),D=s.useState(`popupProps`),O=s.useState(`transitionStatus`),k=s.useState(`triggerElement`),A=s.useState(`positionerElement`),j=s.useState(`listElement`),M=v.useRef(!1),N=v.useRef(!1),P=v.useRef({}),F=Hn(),I=Y(e=>{if(!A||!s.context.popupRef.current||!N.current)return;let t=A.style.top===`0px`,n=A.style.bottom===`0px`;if(M.current||!m||!t&&!n){s.context.handleScrollArrowVisibility(e);return}let r=RC(A),i=zC(A.getBoundingClientRect().height,`y`,r),a=Un(A),o=Ie(A),c=o.getComputedStyle(A),l=parseFloat(c.marginTop),u=parseFloat(c.marginBottom),d=IC(o.getComputedStyle(s.context.popupRef.current)),f=Math.min(a.documentElement.clientHeight-l-u,d),p=e.scrollTop,h=LC(e),g=null,_=e=>{A.style.height=`${e}px`},v=t?h-p:p,y=Math.min(i+v,f);if(v<=1){let n=wS(v,0,f-i);n>0&&_(i+n),e.scrollTop=t?h:0,f-(i+n)<=1&&(M.current=!0),s.context.handleScrollArrowVisibility(e);return}f-y>1?g=t?1/0:0:n&&p<h&&(g=p-(v-(i+v-f)));let b=Math.ceil(y);if(b!==0&&_(b),g!=null){let t=wS(g,0,LC(e));Math.abs(e.scrollTop-t)>1&&(e.scrollTop=t)}b>=f-1&&(M.current=!0),s.context.handleScrollArrowVisibility(e)});v.useImperativeHandle(s.context.scrollHandlerRef,()=>I,[I]),Ra({open:w,ref:s.context.popupRef,onComplete(){w&&s.context.onOpenChangeComplete(!0)}});let L={open:w,transitionStatus:O,side:f,align:p};q(()=>{A&&s.context.popupRef.current&&!Object.keys(P.current).length&&(P.current={top:A.style.top||`0`,left:A.style.left||`0`,right:A.style.right,height:A.style.height,bottom:A.style.bottom,minHeight:A.style.minHeight,maxHeight:A.style.maxHeight,marginTop:A.style.marginTop,marginBottom:A.style.marginBottom})},[s,A]),q(()=>{w||m||(N.current=!1,M.current=!1,QS(A,P.current))},[w,m,A]),q(()=>{let e=s.context.popupRef.current;if(!w||!k||!A||!e||m&&!h||s.state.transitionStatus===`ending`)return;if(N.current=!0,e.style.removeProperty(NC),!m){F.request(()=>s.context.handleScrollArrowVisibility(j||e));return}let t=HC(e);try{let t=s.context.selectedItemTextRef.current;t?.isConnected||(t=!s.select(`hasSelectedValue`)&&s.context.firstItemTextRef.current?.isConnected?s.context.firstItemTextRef.current:null);let n=s.context.valueRef.current,r=Ie(A),i=r.getComputedStyle(A),a=r.getComputedStyle(e),o=Un(k),c=RC(k),l=BC(k.getBoundingClientRect(),c),d=BC(A.getBoundingClientRect(),c),f=l.height,p=j||e,m=p.scrollHeight,h=parseFloat(a.borderBottomWidth),_=parseFloat(i.marginTop)||10,v=parseFloat(i.marginBottom)||10,b=parseFloat(i.minHeight)||100,x=IC(a),S=o.documentElement.clientHeight-_-v,C=o.documentElement.clientWidth,w=S-l.bottom+f,T,E=y===`rtl`?l.right-d.width:l.left,D=0;if(t&&n){let e=BC(n.getBoundingClientRect(),c);T=BC(t.getBoundingClientRect(),c),E=d.left+(y===`rtl`?e.right-T.right:e.left-T.left);let r=e.top-l.top+e.height/2;D=T.top-d.top+T.height/2-r}let O=w+D+v+h,N=Math.min(S,O),F=S-_-v,I=O-N,L=C-5;A.style.left=`${wS(E,5,L-d.width)}px`,A.style.height=`${N}px`,A.style.maxHeight=`none`,A.style.marginTop=`${_}px`,A.style.marginBottom=`${v}px`,e.style.height=`100%`;let R=LC(p),z=I>=R-1;z&&(N=Math.min(S,d.height)-(I-R));let B=l.top<20||l.bottom>S-20||Math.ceil(N)+1<Math.min(m,b),V=(r.visualViewport?.scale??1)!==1&&we;if(B||V){QS(A,P.current),g(!1);return}let H=Math.max(b,N);if(z){let e=Math.max(0,S-O);A.style.top=d.height>=F?`0`:`${e}px`,A.style.height=`${N}px`,p.scrollTop=LC(p)}else A.style.bottom=`0`,p.scrollTop=I;if(T){let t=d.top,n=d.height,r=T.top+T.height/2,i=wS(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(NC,`50% ${i}%`)}(H===S||N>=x)&&(M.current=!0),s.context.handleScrollArrowVisibility(p),u&&s.state.selectedIndex===null&&s.state.activeIndex===null&&s.context.listRef.current[0]!=null&&s.set(`activeIndex`,0)}finally{t()}},[s,w,A,k,m,g,F,j,u,y,h]),v.useEffect(()=>{if(!m||!A||!w)return;let e=Ie(A);function t(e){s.context.setOpen(!1,Jt(yn,e))}return wn(e,`resize`,t)},[s,m,A,w]);let R={...j?{role:`presentation`}:{role:`listbox`,"aria-multiselectable":c||void 0,"aria-readonly":l||void 0,id:`${C}-list`},onKeyDown(e){_&&CC.has(e.key)&&e.stopPropagation()},onScroll(e){j||I(e.currentTarget)},...m&&{style:j?{height:`100%`}:$S},className:!j&&m?gC.className:void 0},z=Hi(`div`,e,{ref:[t,s.context.popupRef],state:L,stateAttributesMapping:PC,props:[D,R,Bc(O),o]});return(0,S.jsxs)(v.Fragment,{children:[!x&&gC.getElement(b),(0,S.jsx)(Ca,{context:d,modal:!1,disabled:!E,openInteractionType:T,returnFocus:a,restoreFocus:!0,children:z})]})});function IC(e){let t=e.maxHeight;return t.endsWith(`px`)&&parseFloat(t)||1/0}function LC(e){return TS(e.scrollHeight,e.clientHeight)}function RC(e){return Ps.getScale(e)}function zC(e,t,n){return e/n[t]}function BC(e,t){return br({x:zC(e.x,`x`,t),y:zC(e.y,`y`,t),width:zC(e.width,`x`,t),height:zC(e.height,`y`,t)})}var VC=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function HC(e){let{style:t}=e,n={};for(let[e,r]of VC)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of VC){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var UC=v.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=$x(),s=o.useState(`multiple`),c=o.useState(`readOnly`),{alignItemWithTriggerActive:l}=XS(),u=o.useState(`hasScrollArrows`),d=o.useState(`openMethod`),f={id:`${o.useState(`id`)}-list`,role:`listbox`,"aria-multiselectable":s||void 0,"aria-readonly":c||void 0,onScroll(e){o.context.scrollHandlerRef.current?.(e.currentTarget)},...l&&{style:$S},className:u&&d!==`touch`?gC.className:void 0};return Hi(`div`,e,{ref:[t,o.useStateSetter(`listElement`)],props:[f,a]})});function WC(e={}){let{guess:t,label:n,metadata:r,textRef:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,nextIndexRef:l}=VS(),u=v.useRef(-1),[d,f]=v.useState(a==null&&t?()=>{if(u.current===-1){let e=l.current;l.current+=1,u.current=e}return u.current}:-1),p=a??d,m=v.useRef(null),h=v.useCallback(e=>{let t=m.current;t&&s(t),m.current=e,e&&o(e,{metadata:r??null,index:a??null,label:n,textRef:i})},[a,o,s,r,n,i]);return q(()=>{if(a==null)return c(e=>{let t=m.current?e.get(m.current)?.index:null;t!=null&&f(t)})},[a,c]),{ref:h,index:p}}var GC=v.createContext(void 0);function KC(){let e=v.useContext(GC);if(!e)throw Error(J(57));return e}var qC=v.memo(v.forwardRef(function(e,t){let{render:n,className:r,style:i,value:a=null,label:o,disabled:s=!1,nativeButton:c=!1,...l}=e,u=v.useRef(null),d=WC({guess:!0,label:o,textRef:u}),f=$x(),{props:p,multiple:m,disabled:h,readOnly:g,isItemEqualToValue:_}=f.useState(`itemRoot`),y=h||s,b=f.useState(`isActive`,d.index),x=f.useState(`open`),C=f.useState(`isSelected`,a),w=f.useState(`isSelectedByFocus`,d.index),T=d.index,E=v.useRef(null);q(()=>{let e=f.context.valuesRef.current;return e[T]=a,()=>{delete e[T]}},[T,a,f]),q(()=>{let e=f.state.value,t=f.state.selectedIndex,n=t,r;m&&Array.isArray(e)?(n=lS(T,a,f.context.valuesRef.current,e,_,t),r=n===T,T===t&&!r&&(f.context.selectedItemTextRef.current=null)):(r=e!==void 0&&rS(a,e,_),r&&(n=T)),f.set(`selectedIndex`,n),r&&u.current&&(f.context.selectedItemTextRef.current=u.current)},[T,m,_,f,a]);let D=v.useRef(`mouse`),O=v.useRef(!1),{getButtonProps:k,buttonRef:A}=ey({disabled:y,focusableWhenDisabled:!0,native:c,composite:!0}),j={disabled:y,selected:C,highlighted:b};function M(e){if(h||g)return;let t=f.state.value;if(m){let n=Array.isArray(t)?t:[],r=C?uS(n,a,_):[...n,a];f.context.setValue(r,Jt(tn,e))}else f.context.setValue(a,Jt(tn,e)),f.context.setOpen(!1,Jt(tn,e))}function N(){f.context.selectionRef.current.dragY=0}let P={role:`option`,"aria-selected":C,tabIndex:x&&b?0:-1,onKeyDown(e){f.set(`activeIndex`,T),e.key===` `&&f.context.typingRef.current&&e.preventDefault()},onClick(e){let t=D.current!==`touch`,n=e.nativeEvent.pointerType,r=t&&Ae(e.nativeEvent)&&(n!==void 0||b),i=t&&!r&&!O.current;O.current=!1,!(y||i)&&M(e.nativeEvent)},onPointerEnter(e){D.current=e.pointerType},onPointerMove(e){if(e.pointerType===`mouse`&&e.buttons===1){let t=f.context.selectionRef.current;t.dragY+=e.movementY,t.dragY**2>=64&&(t.allowUnselectedMouseUp=!0)}},onPointerDown(e){D.current=e.pointerType,O.current=!0,N()},onMouseUp(){if(N(),y||D.current===`touch`||O.current)return;let e=!f.context.selectionRef.current.allowSelectedMouseUp&&C,t=!f.context.selectionRef.current.allowUnselectedMouseUp&&!C;e||t||(O.current=!0,E.current?.click(),O.current=!1)}},F=Hi(`div`,e,{ref:[A,t,d.ref,E],state:j,props:[p,P,l,k]}),I=v.useMemo(()=>({selected:C,index:T,textRef:u,selectedByFocus:w}),[C,T,u,w]);return(0,S.jsx)(GC.Provider,{value:I,children:F})})),JC=v.memo(v.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a,selected:o,...s}=e,c=v.useRef(null),{transitionStatus:l,setMounted:u}=Na(o),d=Hi(`span`,e,{ref:[t,c],state:{selected:o,transitionStatus:l},props:[{"aria-hidden":!0,children:`✔️`},s],stateAttributesMapping:yt});return Ra({batch:!0,enabled:!o,open:o,ref:c,onComplete(){o||u(!1)}}),d})),YC=v.forwardRef(function(e,t){let{selected:n}=KC();return e.keepMounted||n?(0,S.jsx)(JC,{...e,selected:n,ref:t}):null}),XC=v.memo(v.forwardRef(function(e,t){let{index:n,textRef:r,selectedByFocus:i}=KC(),a=$x(),{render:o,className:s,style:c,...l}=e;return Hi(`div`,e,{ref:[v.useCallback(e=>{e&&(n===0&&(a.context.firstItemTextRef.current=e),i&&(a.context.selectedItemTextRef.current=e))},[a,n,i]),t,r],props:l})})),ZC=v.forwardRef(function(e,t){let{render:n,className:r,style:i,direction:a,keepMounted:o,...s}=e,c=a===`up`,l=$x(),{side:u,scrollDownArrowRef:d,scrollUpArrowRef:f}=XS(),p=c?`scrollUpArrowVisible`:`scrollDownArrowVisible`,m=l.useState(p),h=l.useState(`openMethod`),g=m&&h!==`touch`,_=fe(),v=c?f:d,{mounted:y,transitionStatus:b,setMounted:x}=Na(g);q(()=>(l.context.scrollArrowsMountedCountRef.current+=1,l.set(`hasScrollArrows`,!0),()=>{l.context.scrollArrowsMountedCountRef.current=Math.max(0,l.context.scrollArrowsMountedCountRef.current-1),l.context.scrollArrowsMountedCountRef.current===0&&l.set(`hasScrollArrows`,!1)}),[l]),Ra({open:g,ref:v,onComplete(){g||x(!1)}});let S=Hi(`div`,e,{ref:[t,v],state:{direction:a,visible:g,side:u,transitionStatus:b},props:[{"aria-hidden":!0,children:c?`▲`:`▼`,style:{position:`absolute`},onMouseMove(e){if(e.movementX===0&&e.movementY===0||_.isStarted())return;l.set(`activeIndex`,null);function t(){let e=l.state.listElement??l.context.popupRef.current;if(!e)return;l.set(`activeIndex`,null),l.context.handleScrollArrowVisibility(e);let n=TS(e.scrollHeight,e.clientHeight),r=ES(e.scrollTop,n),i=r===(c?0:n),a=l.context.listRef.current;if(r!==e.scrollTop&&(e.scrollTop=r),i)_.clear();else{if(a.length>0){let t=v.current?.offsetHeight||0;e.scrollTop=QC(a,c,r,e.clientHeight,t,n)}_.start(40,t)}}_.start(40,t)},onMouseLeave(){_.clear()}},s],stateAttributesMapping:yt});return y||o?S:null});function QC(e,t,n,r,i,a){if(t){let t=0,r=n+i-1;for(let n=0;n<e.length;n+=1){let i=e[n];if(i&&i.offsetTop>=r){t=n;break}}let o=Math.max(0,t-1),s=e[o];return o<t&&s?ES(s.offsetTop-i,a):0}let o=e.length-1,s=n+r-i+1;for(let t=0;t<e.length;t+=1){let n=e[t];if(n&&n.offsetTop+n.offsetHeight>s){o=Math.max(0,t-1);break}}let c=Math.min(e.length-1,o+1),l=e[c];return c>o&&l?ES(l.offsetTop+l.offsetHeight-r+i,a):a}var $C=v.forwardRef(function(e,t){return(0,S.jsx)(ZC,{...e,ref:t,direction:`down`})}),ew=v.forwardRef(function(e,t){return(0,S.jsx)(ZC,{...e,ref:t,direction:`up`})}),tw=DS;function nw({className:e,...t}){return(0,S.jsx)(LS,{"data-slot":`select-value`,className:X(`flex flex-1 text-left`,e),...t})}function rw({className:e,size:t=`default`,children:n,...r}){return(0,S.jsxs)(FS,{"data-slot":`select-trigger`,"data-size":t,className:X(`flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r,children:[n,(0,S.jsx)(RS,{render:(0,S.jsx)(xu,{className:`pointer-events-none size-4 text-muted-foreground`})})]})}function iw({className:e,children:t,side:n=`bottom`,sideOffset:r=4,align:i=`center`,alignOffset:a=0,alignItemWithTrigger:o=!0,...s}){return(0,S.jsx)(zS,{children:(0,S.jsx)(mC,{side:n,sideOffset:r,align:i,alignOffset:a,alignItemWithTrigger:o,className:`isolate z-50`,children:(0,S.jsxs)(FC,{"data-slot":`select-content`,"data-align-trigger":o,className:X(`relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...s,children:[(0,S.jsx)(ow,{}),(0,S.jsx)(UC,{children:t}),(0,S.jsx)(sw,{})]})})})}function aw({className:e,children:t,...n}){return(0,S.jsxs)(qC,{"data-slot":`select-item`,className:X(`relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,e),...n,children:[(0,S.jsx)(XC,{className:`flex flex-1 shrink-0 gap-2 whitespace-nowrap`,children:t}),(0,S.jsx)(YC,{render:(0,S.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`}),children:(0,S.jsx)(yu,{className:`pointer-events-none`})})]})}function ow({className:e,...t}){return(0,S.jsx)(ew,{"data-slot":`select-scroll-up-button`,className:X(`top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4`,e),...t,children:(0,S.jsx)(Tu,{})})}function sw({className:e,...t}){return(0,S.jsx)($C,{"data-slot":`select-scroll-down-button`,className:X(`bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4`,e),...t,children:(0,S.jsx)(xu,{})})}var cw=768;function lw(){let[e,t]=v.useState(void 0);return v.useEffect(()=>{let e=window.matchMedia(`(max-width: 767px)`),n=()=>{t(window.innerWidth<cw)};return e.addEventListener(`change`,n),t(window.innerWidth<cw),()=>e.removeEventListener(`change`,n)},[]),!!e}var uw=v.createContext(void 0);function dw(e){let t=v.useContext(uw);if(!e&&t===void 0)throw Error(J(27));return t}var fw=v.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,s=dw(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`);return Hi(`div`,e,{state:{open:c,transitionStatus:s.useState(`transitionStatus`)},ref:[s.context.backdropRef,t],stateAttributesMapping:Nt,props:[{role:`presentation`,hidden:!u,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!l})}),pw=v.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,...s}=e,c=dw(),l=c.useState(`open`),{getButtonProps:u,buttonRef:d}=ey({disabled:a,native:o}),f={disabled:a};function p(e){l&&c.setOpen(!1,Jt(nn,e.nativeEvent))}return Hi(`button`,e,{state:f,ref:[t,d],props:[{onClick:p},s,u]})}),mw=v.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=dw(),c=lc(a);return s.useSyncedValueWithCleanup(`descriptionElementId`,c),Hi(`p`,e,{ref:t,props:[{id:c},o]})}),hw=v.createContext(void 0);function gw(){let e=v.useContext(hw);if(e===void 0)throw Error(J(26));return e}var _w=`--nested-dialogs`,vw=`data-nested-dialog-open`,yw={...Mt,...yt,nestedDialogOpen(e){return e?{[vw]:``}:null}},bw=v.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,initialFocus:o,...s}=e,c=dw(),l=c.useState(`descriptionElementId`),u=c.useState(`disablePointerDismissal`),d=c.useState(`floatingRootContext`),f=c.useState(`popupProps`),p=c.useState(`modal`),m=c.useState(`mounted`),h=c.useState(`nested`),g=c.useState(`nestedOpenDialogCount`),_=c.useState(`open`),v=c.useState(`openMethod`),y=c.useState(`titleElementId`),b=c.useState(`transitionStatus`),x=c.useState(`role`),C=d.useState(`floatingId`);gw(),Ra({open:_,ref:c.context.popupRef,onComplete(){_&&c.context.onOpenChangeComplete?.(!0)}});let w=o===void 0?Va(c.context.popupRef):o,T=g>0,E=c.useStateSetter(`popupElement`),D=Hi(`div`,e,{state:{open:_,nested:h,transitionStatus:b,nestedDialogOpen:T},props:[f,{id:C,"aria-labelledby":y,"aria-describedby":l,role:x,...Ba,hidden:!m,onKeyDown(e){CC.has(e.key)&&e.stopPropagation()},style:{[_w]:g}},s],ref:[t,c.context.popupRef,E],stateAttributesMapping:yw});return(0,S.jsx)(Ca,{context:d,openInteractionType:v,disabled:!m,closeOnFocusOut:!u,initialFocus:w,returnFocus:a,modal:p!==!1,restoreFocus:`popup`,children:D})}),xw=v.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=dw(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,S.jsx)(hw.Provider,{value:n,children:(0,S.jsxs)(ia,{ref:t,...r,children:[a&&o===!0&&(0,S.jsx)(ZS,{ref:i.context.internalBackdropRef,inert:Kc(!s)}),e.children]})}):null});function Sw({store:e,parentContext:t,isDrawer:n}){let r=e.useState(`open`),i=e.useState(`mounted`),a=e.useState(`disablePointerDismissal`),o=e.useState(`modal`),s=e.useState(`popupElement`),c=e.useState(`floatingRootContext`),[l,u]=v.useState(0),[d,f]=v.useState(0),p=l===0,m=Aa(c,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?`intentional`:{mouse:o===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||`button`in t&&t.button!==0)return!1;if(`touches`in t){if(t.type===`touchend`){if(t.changedTouches.length!==1||t.touches.length!==0)return!1}else if(t.touches.length!==1)return!1}let n=ct(t);if(p&&!a){if(o){let t=e.context.internalBackdropRef.current,r=e.context.backdropRef.current;return t||r?t===n||r===n||ot(n,s)&&!n?.hasAttribute(`data-base-ui-portal`):!0}return!0}return!1},escapeKey:p});return uC(r&&o===!0,s),e.useContextCallback(`onNestedDialogOpen`,(t,n)=>{(e.select(`open`)||e.select(`mounted`))&&(u(t),f(n))}),q(()=>{!r&&!i&&(u(0),f(0))},[r,i]),q(()=>(t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(l+1,d+ +!!n),()=>{t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(0,0)}),[n,r,l,d,t]),Qa(e,{activeTriggerProps:m.reference,inactiveTriggerProps:m.trigger,popupProps:m.floating,nestedOpenDialogCount:l,nestedOpenDrawerCount:d}),null}var Cw={...Co,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role},ww=class extends mo{constructor(e,t,n){let r=new eo,i=Tw(e,r,t,n);super(i,Ew(r),Cw)}setOpen=(e,t)=>{t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),!t.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(e,t),this.update(Ka(this.state,e,t.trigger)))}};function Tw(e,t,n,r=!1){return{..._o(t,n,r),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e}}function Ew(e){return{popupRef:v.createRef(),backdropRef:v.createRef(),internalBackdropRef:v.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function Dw(e,t){let{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,disablePointerDismissal:s=!1,modal:c=!0,actionsRef:l,handle:u,triggerId:d,defaultTriggerId:f=null}=t,p=e===`drawer`,m=e===`alert-dialog`,h=m?!0:c,g=m||s,_=m?`alertdialog`:`dialog`,y=dw(!0),b={modal:h,disablePointerDismissal:g,nested:y!=null,role:_},x=Ha((e,t)=>new ww({open:i,openProp:r,activeTriggerId:f,triggerIdProp:d,...b},e,t),!0);x.useControlledProp(`openProp`,r),x.useControlledProp(`triggerIdProp`,d),x.useSyncedValues(b),x.useContextCallback(`onOpenChange`,a),x.useContextCallback(`onOpenChangeComplete`,o);let C=x.useState(`open`),w=x.useState(`mounted`),T=x.useState(`payload`);$a(x,C),Xa(x);let{forceUnmount:E}=Za(C,x);v.useImperativeHandle(l,()=>({unmount:E,close:()=>x.setOpen(!1,Jt(vn))}),[E,x]);let D=C||w||u!=null;return(0,S.jsxs)(uw.Provider,{value:x,children:[u&&(0,S.jsx)(Ua,{handle:u,store:x}),D&&(0,S.jsx)(Sw,{store:x,parentContext:y?.context,isDrawer:p}),typeof n==`function`?n({payload:T}):n]})}var Ow=W(function(e){return Dw(`dialog`,e)}),kw=v.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=dw(),c=lc(a);return s.useSyncedValueWithCleanup(`titleElementId`,c),Hi(`h2`,e,{ref:t,props:[{id:c},o]})}),Aw=re(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,id:s,payload:c,handle:l,...u}=e,d=dw(!0),f=wo(l)??d;if(!f)throw Error(J(79));let p=lc(s),m=f.useState(`floatingRootContext`),h=f.useState(`isOpenedByTrigger`,p),g=f.useState(`triggerPopupId`,p),_=v.useRef(null),{registerTrigger:y,isMountedByThisTrigger:b}=Ya(p,_,f,{payload:c}),{getButtonProps:x,buttonRef:S}=ey({disabled:a,native:o}),C=wa(m),w=SS(()=>f.select(`open`),e=>{f.set(`openMethod`,e)}),T={disabled:a,open:h},E=f.useState(`triggerProps`,b);return Hi(`button`,e,{state:T,ref:[S,t,y,_],props:[C.reference,E,w,{[Xi]:``,id:p,"aria-haspopup":`dialog`,"aria-expanded":h,"aria-controls":g},u,x],stateAttributesMapping:At})});function jw({...e}){return(0,S.jsx)(Ow,{"data-slot":`sheet`,...e})}function Mw({...e}){return(0,S.jsx)(xw,{"data-slot":`sheet-portal`,...e})}function Nw({className:e,...t}){return(0,S.jsx)(fw,{"data-slot":`sheet-overlay`,className:X(`fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs`,e),...t})}function Pw({className:e,children:t,side:n=`right`,showCloseButton:r=!0,...i}){return(0,S.jsxs)(Mw,{children:[(0,S.jsx)(Nw,{}),(0,S.jsxs)(bw,{"data-slot":`sheet-content`,"data-side":n,className:X(`fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm`,e),...i,children:[t,r&&(0,S.jsxs)(pw,{"data-slot":`sheet-close`,render:(0,S.jsx)(ay,{variant:`ghost`,className:`absolute top-3 right-3`,size:`icon-sm`}),children:[(0,S.jsx)(xd,{}),(0,S.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function Fw({className:e,...t}){return(0,S.jsx)(`div`,{"data-slot":`sheet-header`,className:X(`flex flex-col gap-0.5 p-4`,e),...t})}function Iw({className:e,...t}){return(0,S.jsx)(kw,{"data-slot":`sheet-title`,className:X(`font-heading text-base font-medium text-foreground`,e),...t})}function Lw({className:e,...t}){return(0,S.jsx)(mw,{"data-slot":`sheet-description`,className:X(`text-sm text-muted-foreground`,e),...t})}var Rw=`sidebar_state`,zw=604800,Bw=`16rem`,Vw=`18rem`,Hw=`3rem`,Uw=`b`,Ww=v.createContext(null);function Gw(){let e=v.useContext(Ww);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function Kw({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:i,children:a,...o}){let s=lw(),[c,l]=v.useState(!1),[u,d]=v.useState(e),f=t??u,p=v.useCallback(e=>{let t=typeof e==`function`?e(f):e;n?n(t):d(t),document.cookie=`${Rw}=${t}; path=/; max-age=${zw}`},[n,f]),m=v.useCallback(()=>s?l(e=>!e):p(e=>!e),[s,p,l]);v.useEffect(()=>{let e=e=>{e.key===Uw&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),m())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[m]);let h=f?`expanded`:`collapsed`,g=v.useMemo(()=>({state:h,open:f,setOpen:p,isMobile:s,openMobile:c,setOpenMobile:l,toggleSidebar:m}),[h,f,p,s,c,l,m]);return(0,S.jsx)(Ww.Provider,{value:g,children:(0,S.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":Bw,"--sidebar-width-icon":Hw,...i},className:X(`group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar`,r),...o,children:a})})}function qw({side:e=`left`,variant:t=`sidebar`,collapsible:n=`offcanvas`,className:r,children:i,dir:a,...o}){let{isMobile:s,state:c,openMobile:l,setOpenMobile:u}=Gw();return n===`none`?(0,S.jsx)(`div`,{"data-slot":`sidebar`,className:X(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),...o,children:i}):s?(0,S.jsx)(jw,{open:l,onOpenChange:u,...o,children:(0,S.jsxs)(Pw,{dir:a,"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden`,style:{"--sidebar-width":Vw},side:e,children:[(0,S.jsxs)(Fw,{className:`sr-only`,children:[(0,S.jsx)(Iw,{children:`Sidebar`}),(0,S.jsx)(Lw,{children:`Displays the mobile sidebar.`})]}),(0,S.jsx)(`div`,{className:`flex h-full w-full flex-col`,children:i})]})}):(0,S.jsxs)(`div`,{className:`group peer hidden text-sidebar-foreground md:block`,"data-state":c,"data-collapsible":c===`collapsed`?n:``,"data-variant":t,"data-side":e,"data-slot":`sidebar`,children:[(0,S.jsx)(`div`,{"data-slot":`sidebar-gap`,className:X(`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,t===`floating`||t===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),(0,S.jsx)(`div`,{"data-slot":`sidebar-container`,"data-side":e,className:X(`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex`,t===`floating`||t===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,r),...o,children:(0,S.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:`flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border`,children:i})})]})}function Jw({className:e,...t}){return(0,S.jsx)(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:X(`flex flex-col gap-2 p-2`,e),...t})}function Yw({className:e,...t}){return(0,S.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:X(`no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function Xw({children:e,agent:t,title:n=`Agent`}){return(0,S.jsx)(Kw,{defaultOpen:!1,style:{"--sidebar-width":`24rem`},children:(0,S.jsx)(Zw,{agent:t,title:n,children:e})})}function Zw({children:e,agent:t,title:n}){let{open:r,openMobile:i,isMobile:a,toggleSidebar:o}=Gw(),s=a?i:r,[c,l]=(0,v.useState)(!1),u=(0,v.useRef)(null);return(0,v.useEffect)(()=>{s?l(!0):c&&u.current?.focus()},[s,c]),(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`div`,{className:`min-w-0 flex-1`,children:e}),(0,S.jsx)(`div`,{hidden:s,className:`fixed right-6 bottom-6 z-20`,children:(0,S.jsxs)(ay,{ref:u,"aria-label":`Open agent`,"aria-expanded":s,onClick:o,children:[(0,S.jsx)(Zu,{"data-icon":`inline-start`}),n]})}),(0,S.jsx)(qw,{side:`right`,collapsible:`offcanvas`,children:(0,S.jsxs)(`div`,{inert:!s,className:`flex h-full min-h-0 flex-col`,children:[(0,S.jsx)(Jw,{children:(0,S.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,S.jsx)(`h2`,{className:`text-sm font-medium`,children:n}),(0,S.jsx)(ay,{variant:`ghost`,size:`icon-sm`,"aria-label":`Minimize agent`,onClick:o,children:(0,S.jsx)(rd,{})})]})}),(0,S.jsx)(Yw,{className:`overflow-hidden`,children:(0,S.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 p-4`,children:c?t:null})})]})})]})}function Qw(e){let t=e.match(/https?:\/\/[^\s"'<>()[\]]+/g)??[];return[...new Set(t.map(e=>e.replace(/[.,;:!?]+$/,``)))].filter(e=>URL.canParse(e)).map(e=>({url:e}))}var $w=e=>typeof e==`string`?e.split(`
23
+ `)[0]:void 0,eT=e=>e>1?` and ${e-1} more`:``,tT=({url:e,urls:t})=>[e,t].flat().filter(e=>typeof e==`string`&&URL.canParse(e)),nT={running:`Running`,complete:`Ran`,error:`Failed to run`},rT={bash:{verbs:nT,subject:({command:e})=>$w(e)},read:{verbs:{running:`Reading`,complete:`Read`,error:`Failed to read`},subject:({path:e})=>$w(e)},edit:{verbs:{running:`Editing`,complete:`Edited`,error:`Failed to edit`},subject:({path:e})=>$w(e)},write:{verbs:{running:`Writing`,complete:`Wrote`,error:`Failed to write`},subject:({path:e})=>$w(e)},grep:{verbs:{running:`Searching for`,complete:`Searched for`,error:`Failed to search for`},subject:({pattern:e})=>$w(e)},find:{verbs:{running:`Finding`,complete:`Found`,error:`Failed to find`},subject:({pattern:e})=>$w(e)},ls:{verbs:{running:`Listing`,complete:`Listed`,error:`Failed to list`},subject:({path:e})=>$w(e)},web_search:{verbs:{running:`Searching`,complete:`Searched`,error:`Failed to search`},subject:({query:e,queries:t})=>{let n=Array.isArray(t)?t:[e];return typeof n[0]==`string`?`for “${n[0]}”${eT(n.length)}`:`the web`},sources:(e,t)=>t?Qw(t):void 0},fetch_content:{verbs:{running:`Reading`,complete:`Read`,error:`Failed to read`},subject:e=>{let t=tT(e);return t.length?`${new URL(t[0]).hostname}${eT(t.length)}`:`a page`},sources:e=>tT(e).map(e=>({url:e}))}};function iT(e,t,n,r=rT){let i=r[e.name];return i?{label:`${i.verbs[t]} ${i.subject(e.arguments)??``}`.trim(),sources:i.sources?.(e.arguments,n)}:{label:`${nT[t]} ${e.name}`}}var aT=(0,v.createContext)({});function oT(e){let t=(0,v.useRef)(null);return t.current===null&&(t.current=e()),t.current}var sT=typeof window<`u`?v.useLayoutEffect:v.useEffect,cT=(0,v.createContext)(null);function lT(e,t){e.indexOf(t)===-1&&e.push(t)}function uT(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var dT=(e,t,n)=>n>t?t:n<e?e:n,fT={},pT=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),mT=e=>typeof e==`object`&&!!e,hT=e=>/^0[^.\s]+$/u.test(e);function gT(e){let t;return()=>(t===void 0&&(t=e()),t)}var _T=e=>e,vT=(...e)=>e.reduce((e,t)=>n=>t(e(n))),yT=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},bT=class{constructor(){this.subscriptions=[]}add(e){return lT(this.subscriptions,e),()=>this.remove(e)}remove(e){uT(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r){if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},xT=e=>e*1e3,ST=e=>e/1e3,CT=(e,t)=>t?1e3/t*e:0,wT=(e,t,n)=>{let r=t-e;return((n-e)%r+r)%r+e},TT=(e,t,n)=>e*(3*(1-e)*((1-e)*t+e*n)+e*e);function ET(e,t,n,r){return e===t&&n===r?_T:i=>{let a=0,o=1,s=i;for(let t=0;;t++){s>=a&&s<=o||(s=(a+o)/2);let r=TT(s,e,n)-i;if(r*r<1e-28||t===40)break;r>0?o=s:a=s,s-=r*1e-7/(TT(s+1e-7,e,n)-i-r)}return TT(s,t,r)}}var DT=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,OT=e=>t=>1-e(1-t),kT=ET(.33,1.53,.69,.99),AT=OT(kT),jT=DT(AT),MT=e=>e>=1?1:(e*=2)<1?.5*AT(e):.5*(2-2**(-10*(e-1))),NT=e=>1-Math.sin(Math.acos(e)),PT=OT(NT),FT=DT(NT),IT=ET(.42,0,1,1),LT=ET(0,0,.58,1),RT=ET(.42,0,.58,1),zT=e=>Array.isArray(e)&&typeof e[0]!=`number`;function BT(e,t){return zT(e)?e[wT(0,e.length,t)]:e}var VT=e=>Array.isArray(e)&&typeof e[0]==`number`,HT={linear:_T,easeIn:IT,easeInOut:RT,easeOut:LT,circIn:NT,circInOut:FT,circOut:PT,backIn:AT,backInOut:jT,backOut:kT,anticipate:MT},UT=e=>typeof e==`string`,WT=e=>{if(VT(e)){let[t,n,r,i]=e;return ET(t,n,r,i)}return UT(e)?HT[e]:e},GT={delta:0,timestamp:0,isProcessing:!1},KT;function qT(){KT=void 0}var JT={now:()=>(KT===void 0&&JT.set(GT.isProcessing||fT.useManualTiming?GT.timestamp:performance.now()),KT),set:e=>{KT=e,queueMicrotask(qT)}},YT=e=>Math.round(e*1e5)/1e5,XT=e=>t=>typeof t==`string`&&t.startsWith(e),ZT=XT(`--`),QT=XT(`var(--`),$T=e=>QT(e)?eE.test(e.split(`/*`)[0].trim()):!1,eE=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function tE(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var nE={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},rE={...nE,transform:e=>dT(0,1,e)},iE={...nE,default:1},aE=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function oE(e){return e==null}var sE=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,cE=(e,t)=>n=>!!(typeof n==`string`&&sE.test(n)&&n.startsWith(e)||t&&!oE(n)&&Object.prototype.hasOwnProperty.call(n,t)),lE=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(aE);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},uE=e=>dT(0,255,e),dE={...nE,transform:e=>Math.round(uE(e))},fE={test:cE(`rgb`,`red`),parse:lE(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+dE.transform(e)+`, `+dE.transform(t)+`, `+dE.transform(n)+`, `+YT(rE.transform(r))+`)`},pE=(e,t,n)=>{let r=e.substring(1+t*n,1+(t+1)*n);return n>1?r:r+r};function mE(e){let t=e.length>5?2:1,n=pE(e,3,t);return{red:parseInt(pE(e,0,t),16),green:parseInt(pE(e,1,t),16),blue:parseInt(pE(e,2,t),16),alpha:n?parseInt(n,16)/255:1}}var hE={test:cE(`#`),parse:mE,transform:fE.transform},gE=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),_E=gE(`deg`),vE=gE(`%`),yE=gE(`px`),bE=gE(`vh`),xE=gE(`vw`),SE={...vE,parse:e=>vE.parse(e)/100,transform:e=>vE.transform(e*100)},CE={test:cE(`hsl`,`hue`),parse:lE(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+vE.transform(YT(t))+`, `+vE.transform(YT(n))+`, `+YT(rE.transform(r))+`)`},wE={test:e=>fE.test(e)||hE.test(e)||CE.test(e),parse:e=>fE.test(e)?fE.parse(e):CE.test(e)?CE.parse(e):hE.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?fE.transform(e):CE.transform(e),getAnimatableNone:e=>{let t=wE.parse(e);return t.alpha=0,wE.transform(t)}},TE=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,EE=new RegExp(aE.source),DE=new RegExp(TE.source,`i`);function OE(e){return isNaN(e)&&typeof e==`string`&&(EE.test(e)||DE.test(e))}var kE=`number`,AE=`color`,jE=`var`,ME=`var(`,NE="${}",PE=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)(?![a-z]*\()/giu;function FE(e){let t=e.toString();return EE.test(t)||DE.test(t)}function IE(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(PE,e=>(wE.test(e)?(r.color.push(a),i.push(AE),n.push(wE.parse(e))):e.startsWith(ME)?(r.var.push(a),i.push(jE),n.push(e)):(r.number.push(a),i.push(kE),n.push(parseFloat(e))),++a,NE)).split(NE),indexes:r,types:i}}function LE(e){return IE(e).values}function RE({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];i+=e===kE?YT(r[a]):e===AE?wE.transform(r[a]):r[a]}return i}}function zE(e){return RE(IE(e))}var BE=e=>typeof e==`number`?0:wE.test(e)?wE.getAnimatableNone(e):e,VE=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:BE(e);function HE(e){let t=IE(e);return RE(t)(t.values.map((e,n)=>VE(e,t.split[n])))}var UE={test:OE,parse:LE,createTransformer:zE,getAnimatableNone:HE};function WE(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function GE({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=WE(s,r,e+1/3),a=WE(s,r,e),o=WE(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function KE(e,t){return n=>n>0?t:e}var qE=(e,t,n)=>e+(t-e)*n,JE=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},YE=[hE,fE,CE],XE=e=>YE.find(t=>t.test(e));function ZE(e){let t=XE(e);if(!t)return!1;let n=t.parse(e);return t===CE&&(n=GE(n)),n}var QE=(e,t)=>{let n=ZE(e),r=ZE(t);if(!n||!r)return KE(e,t);let i={...n};return e=>(i.red=JE(n.red,r.red,e),i.green=JE(n.green,r.green,e),i.blue=JE(n.blue,r.blue,e),i.alpha=qE(n.alpha,r.alpha,e),fE.transform(i))},$E=new Set([`none`,`hidden`]);function eD(e,t){return $E.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function tD(e,t){return n=>qE(e,t,n)}function nD(e){return typeof e==`number`?tD:typeof e==`string`?$T(e)?KE:wE.test(e)?QE:oD:Array.isArray(e)?rD:typeof e==`object`?wE.test(e)?QE:iD:KE}function rD(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>nD(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function iD(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=nD(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function aD(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]],s=e.values[o]??0;n[i]=s,r[a]++}return n}var oD=(e,t)=>{let n=IE(e),r=IE(t);return n.indexes.var.length===r.indexes.var.length&&n.indexes.color.length===r.indexes.color.length&&n.indexes.number.length>=r.indexes.number.length?$E.has(e)&&!r.values.length||$E.has(t)&&!n.values.length?eD(e,t):vT(rD(aD(n,r),r.values),RE(r)):KE(e,t)},sD=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function cD(e,t){let n=sD.exec(e);if(!n)return;let r=sD.exec(t);if(!r||n[2]!==r[2])return;let i=n[2],a=parseFloat(n[1]),o=parseFloat(r[1]);return e=>YT(qE(a,o,e))+i}function lD(e,t,n){if(typeof e==`number`&&typeof t==`number`&&typeof n==`number`)return qE(e,t,n);if(typeof e==`string`&&typeof t==`string`){let n=cD(e,t);if(n)return n}return nD(e)(e,t)}var uD=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function dD(e){let t=new Set,n=new Set,r=!1,i=!1,a,o=new Set,s={delta:0,timestamp:0,isProcessing:!1};function c(t){o.has(t)&&(n.add(t),e()),(a=t)(s)}let l={schedule:(e,i=!1,s=!1)=>{let c=s&&r,l=c?t:n;return i&&o.add(e),c&&e!==a&&l.delete(e),l.add(e),e},cancel:e=>{n.delete(e),o.delete(e)},process:e=>{if(s=e,r){i=!0;return}r=!0;let o=t;t=n,n=o,t.forEach(c),t.clear(),a=void 0,r=!1,i&&(i=!1,l.process(e))}};return l}var fD=40;function pD(e,t,n={delta:0,timestamp:0,isProcessing:!1}){let r=!1,i=!0,a=()=>r=!0,o=uD.reduce((e,t)=>(e[t]=dD(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=fT.useManualTiming,o=a?n.timestamp:performance.now();r=!1,a||(n.delta=i?1e3/60:Math.max(Math.min(o-n.timestamp,fD),1)),n.timestamp=o,n.isProcessing=!0,s.process(n),c.process(n),l.process(n),u.process(n),d.process(n),f.process(n),p.process(n),m.process(n),n.isProcessing=!1,r&&t&&(i=!1,e(h))},g=()=>{r=!0,i=!0,n.isProcessing||e(h)};return{schedule:uD.reduce((e,t)=>{let n=o[t];return e[t]=(e,t=!1,i=!1)=>(r||g(),n.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<uD.length;t++)o[uD[t]].cancel(e)},state:n,steps:o}}var{schedule:mD,cancel:hD,steps:gD}=pD(typeof requestAnimationFrame<`u`?requestAnimationFrame:_T,!0,GT),_D=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>mD.update(t,e),stop:()=>hD(t),now:()=>GT.isProcessing?GT.timestamp:JT.now()}},vD=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},yD=2e4;function bD(e,t=50,n=yD,r){let i=0,a=e.next(i);for(r?.push(a.value);!a.done&&i<n;)i+=t,a=e.next(i),r?.push(a.value);return i>=n?1/0:i}function xD(e,t=100,n){let{keyframes:r,velocity:i}=e,a=r&&r[r.length-1]-r[0],o=n({...e,velocity:i&&a?i*t/a:i,keyframes:[0,t]}),s=Math.min(bD(o),yD);return{type:`keyframes`,ease:e=>o.next(s*e).value/t,duration:ST(s)}}var SD=100,CD=10,wD=1,TD=800,ED=.3,DD=.3,OD=.01,kD=2,AD=.005,jD=.5,MD=.01,ND=10,PD=.05,FD=e=>e<0?1/Math.max(1+e,PD):Math.max(1-e,PD);function ID(e,t){if(!(e>1))return 1;let n=Math.sqrt(e*e-1),r=e-n,i=e+n,a=2*n*Math.exp(-t)*(1+t);return zD(e=>i*Math.exp(-r*e)-r*Math.exp(-i*e)-a,e=>Math.exp(-i*e)-Math.exp(-r*e),t)/t}function LD(e,t){return e*Math.sqrt(1-t*t)}var RD=12;function zD(e,t,n){let r=n;for(let n=1;n<RD;n++)r-=e(r)/t(r);return r}var BD=.001;function VD({duration:e=TD,bounce:t=ED}){let n,r,i=FD(t);e=dT(MD,ND,ST(e)),i<1?(n=t=>{let n=t*i,r=n*e,a=LD(t,i),o=Math.exp(-r);return BD-n/a*o},r=t=>{let r=t*i*e,a=i*i*t*t*e,o=Math.exp(-r),s=LD(t*t,i);return(-n(t)+BD>0?-1:1)*-a*o/s}):(n=t=>-.001+Math.exp(-t*e)*(t*e+1),r=t=>Math.exp(-t*e)*(-t*(e*e)));let a=5/e,o=zD(n,r,a),s=o*ID(i,o*e),c=s*s;return{stiffness:c,damping:i*2*Math.sqrt(c),duration:xT(e)}}var HD=(e,t)=>(t?e>=0:e>0)&&e<1/0;function UD(e,t){if(HD(e,t))return e}function WD(e){let t=UD(e.stiffness),n=UD(e.damping,!0),r=UD(e.mass),i={...e,stiffness:t??SD,damping:n??CD,mass:r??wD,isResolvedFromDuration:!1,isTimeDefined:(t??n??r)===void 0&&(e.duration!==void 0||e.bounce!==void 0)};if(i.isTimeDefined){if(e.visualDuration){let t=FD(e.bounce||0),n=2*Math.PI/(e.visualDuration*1.2)*ID(t,2*Math.PI/1.2);i.stiffness=n*n,i.damping=2*t*Math.sqrt(i.stiffness)}else Object.assign(i,VD(i)),i.isResolvedFromDuration=!0;(!HD(i.stiffness)||!HD(i.damping,!0))&&(i.stiffness=SD,i.damping=CD)}return i}function GD(e=DD,t=ED){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},r=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:o,damping:s,mass:c,duration:l,isResolvedFromDuration:u,isTimeDefined:d}=WD({...n}),f=e=>u?0:-ST(e),p=s/(2*Math.sqrt(o*c)),m=ST(Math.sqrt(o/c)),h=p*m,g={target:i,delta:i-r,velocity:f(n.velocity)||0,restSpeed:0,restDelta:0},_=()=>{let e=Math.abs(g.delta)<5;g.restSpeed=n.restSpeed||(e?OD:kD),g.restDelta=n.restDelta||(e?AD:jD)};_();let v,y,b;if(p<1){let e=LD(m,p),t={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};b=()=>{t.A=(g.velocity+h*g.delta)/e,t.sinC=h*t.A+g.delta*e,t.cosC=h*g.delta-t.A*e};let n=n=>{n!==t.t&&(t.t=n,t.env=Math.exp(-h*n),t.sin=Math.sin(e*n),t.cos=Math.cos(e*n))};v=e=>(n(e),g.target-t.env*(t.A*t.sin+g.delta*t.cos)),y=e=>(n(e),t.env*(t.sinC*t.sin+t.cosC*t.cos))}else if(p===1){v=e=>g.target-Math.exp(-m*e)*(g.delta+(g.velocity+m*g.delta)*e);let e={C:0};b=()=>{e.C=g.velocity+m*g.delta},y=t=>Math.exp(-m*t)*(m*e.C*t-g.velocity)}else{let e=m*Math.sqrt(p*p-1),t=h-e,n=h+e,r=e<1||d?1/0:300/e,i=(e,t)=>Math.exp(t>r?(h-e)*r-h*t:-e*t),a={S:0,F:0};b=()=>{let t=(g.velocity+h*g.delta)/e;a.S=(g.delta+t)/2,a.F=(g.delta-t)/2},v=e=>g.target-a.S*i(t,e)-a.F*i(n,e),y=e=>t*a.S*i(t,e)+n*a.F*i(n,e)}b();let x=u&&l||null,S={calculatedDuration:x,retarget:(e,t)=>{g.target=e[e.length-1],g.delta=g.target-e[0],g.velocity=f(t),n.restSpeed&&n.restDelta||_(),S.calculatedDuration=x,a.done=!1,b()},velocity:e=>xT(y(e)),next:e=>{let t=v(e);if(u)a.done=e>=l;else{let n=xT(y(e));a.done=Math.abs(n)<=g.restSpeed&&Math.abs(g.target-t)<=g.restDelta}return a.value=a.done?g.target:t,a},toString:()=>{let e=Math.min(bD(S),yD),t=vD(t=>S.next(e*t).value,e,30);return e+`ms `+t}};return S}var KD=Object.assign(GD,{applyToOptions:e=>{let t=xD(e,100,GD);return e.ease=t.ease,e.duration=xT(t.duration),e.type=`keyframes`,e}});function qD({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>e<s||e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o?o(g):g;_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>{let t=v(e);f.done=Math.abs(t)<=l,f.value=f.done?_:e?_+t:d},b,x,S=e=>{p(f.value)&&(b=e,x=KD({keyframes:[f.value,m(f.value)],velocity:-v(e)/r*1e3,damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return S(0),{calculatedDuration:null,next:e=>{let t=!1;return!x&&b===void 0&&(t=!0,y(e),S(e)),b!==void 0&&e>=b?x.next(e-b):(!t&&y(e),f)}}}function JD(e,t,n){let r=[],i=fT.mix||lD,a=e.length-1;for(let o=0;o<a;o++){let a=n?.(e[o],e[o+1])||i(e[o],e[o+1]);t&&(a=vT(Array.isArray(t)?t[o]||_T:t,a)),r.push(a)}return r}function YD(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=JD(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=yT(e[r],e[r+1],n);return s[r](i)};return n?t=>l(dT(e[0],e[a-1],t)):l}function XD(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=yT(0,t,r);e.push(qE(n,1,i))}}function ZD(e){let t=[0];return XD(t,e.length-1),t}function QD(e,t){return e.map(e=>e*t)}function $D(e,t){return e.map(()=>t||RT).splice(0,e.length-1)}function eO({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`,mixer:i}){let a=typeof t[0]==`number`?void 0:i,o=zT(r)?r.map(WT):WT(r)||RT,s={done:!1,value:t[0]},c=-1;if(!a){for(let e=1;e<t.length;e++)if(t[e]!==t[e-1]){if(c>=0){c=-2;break}c=e-1}}if(c>=0){let r=n&&n.length===t.length?n:ZD(t),i=r[c]*e,a=r[c+1]*e,l=t[c],u=t[c+1],d=Array.isArray(o)?o[c]:o,f=(fT.mix||lD)(l,u),p=t.length-2;return{calculatedDuration:e,next:t=>(s.value=c&&t<i?f(0):c<p&&(t>=a||!e)?typeof u==`number`?u:f(1):f(d(t>=a||!e?1:t<=i?0:(t-i)/(a-i))),s.done=t>=e,s)}}let l=YD(QD(n&&n.length===t.length?n:ZD(t),e),t,{ease:Array.isArray(o)?o:$D(t,o),mixer:a});return{calculatedDuration:e,next:t=>(s.value=l(t),s.done=t>=e,s)}}var tO=5;function nO(e,t,n){let r=Math.max(t-tO,0);return CT(n-e(r),t-r)}function rO(e,t,n=0){return t<=0?n:e.velocity?e.velocity(t):nO(t=>e.next(t).value,t,e.next(t).value)}function iO(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a,o,s=0;for(let t=0;t<e.length;t++){let n=e[t];n!==null&&(s++||(a=n),o=n)}let c=i<0||t&&n!==`loop`&&t%2==1?0:s-1;return!c||r===void 0?c?o:a:r}var aO={decay:qD,inertia:qD,tween:eO,keyframes:eO,spring:KD};function oO(e){typeof e.type==`string`&&(e.type=aO[e.type])}var sO=40,cO=(e,t)=>t-e>sO&&!fT.useManualTiming?t:e;function lO(e,t){return{kind:e,animation:t,timestamp:JT.now(),frameTimestamp:GT.timestamp,frameIsProcessing:GT.isProcessing}}function uO(e,t,n){let r=globalThis.__MOTION_INSPECT__;if(r)try{r({...lO(`animation-start`,e),options:n?{...t,...n}:t})}catch{}}function dO(e,t){let n=globalThis.__MOTION_INSPECT__;if(n)try{n({...lO(`layout-animation-start`,e),node:t})}catch{}}var fO=class{constructor(){this.isResolved=!1}get finished(){return this._finished||=this.isResolved?Promise.resolve():new Promise(e=>{this._resolve=e}),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){this.isResolved=!0,this._resolve?.()}then(e,t){return this.finished.then(e,t)}},pO=e=>e/100,mO=e=>Math.round(e*1e4)/1e4,hO=class extends fO{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options,t=JT.now();e&&e.updatedAt!==t&&this.tick(e.updatedAt=t),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause(),uO(this,this.options)}initAnimation(){let{options:e}=this;oO(e);let{type:t=eO,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||eO;this.mixKeyframes=void 0,s!==eO&&typeof o[0]!=`number`&&(this.mixKeyframes=vT(pO,e.mixer?.(o[0],o[1])||lD(o[0],o[1])),o=[0,100]);let c=s(o===e.keyframes?e:{...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=bD(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){this.currentTime=this.holdTime??Math.round(e-this.startTime)*this.playbackSpeed}tick(e,t=!1){let{generator:n,totalDuration:r,calculatedDuration:i}=this;if(this.startTime===null)return n.next(0);let{delay:a=0,keyframes:o,type:s,onUpdate:c,finalKeyframe:l}=this.options;this.startTime===this.pendingStartTime&&(this.startTime=cO(this.startTime,e)),this.pendingStartTime=void 0,this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let u=this.currentTime-a*(this.playbackSpeed>=0?1:-1),d=this.playbackSpeed>=0?u<0:u>r;this.currentTime=Math.max(u,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let f=this.generate(this.currentTime,d),{done:p}=f;d||(p=this.playbackSpeed>=0?i<1/0?this.currentTime>=r:p:this.currentTime<=0);let m=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&p);return m&&s!==qD&&(f.value=iO(o,this.options,l,this.speed)),c&&c(f.value),m&&this.finish(),f}at(e){return this.holdTime??mO((e-this.startTime)*this.playbackSpeed)}sampleAt(e,t){let{options:n,totalDuration:r}=this,i=this.at(e)-(n.delay||0);return i>=r&&n.type!==qD?iO(n.keyframes,n,t?void 0:n.finalKeyframe):this.generate(Math.max(i,0),i<0).value}generate(e,t){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o}=this,{keyframes:s,repeat:c,repeatType:l,repeatDelay:u}=this.options,d=e,f=n;if(c){let t=Math.min(e,r)/o,n=Math.floor(t),i=t%1;!i&&t>=1&&(i=1),i===1&&n--,n=Math.min(n,c+1),n%2&&(l===`reverse`?(i=1-i,u&&(i-=u/o)):l===`mirror`&&(f=a)),d=dT(0,1,i)*o}let p;return t?(this.delayState.value=s[0],p=this.delayState):p=f.next(d),i&&!t&&(p.value=i(p.value)),p}get duration(){return ST(this.calculatedDuration)}get iterationDuration(){return this.duration+ST(this.options.delay??0)}get time(){return ST(this.currentTime)}set time(e){this.state===`finished`&&this.updateFinished(),e=xT(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){return rO(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(JT.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=ST(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=_D,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??(this.pendingStartTime=n):this.startTime=n-this.holdTime/(this.playbackSpeed||1),this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(JT.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.driver?.stop(),this.driver=void 0,this.startTime=this.holdTime=null}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}},gO=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function _O(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(aE)||[];if(!r)return e;let i=n.replace(r,``),a=+!!gO.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var vO=/\b([a-z-]*)\(.*?\)/gu,yO={...UE,getAnimatableNone:e=>{let t=e.match(vO);return t?t.map(_O).join(` `):e}},bO={...UE,getAnimatableNone:e=>{let t=UE.parse(e);return UE.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},xO={...nE,transform:Math.round},SO={rotate:_E,pathRotation:_E,rotateX:_E,rotateY:_E,rotateZ:_E,scale:iE,scaleX:iE,scaleY:iE,scaleZ:iE,skew:_E,skewX:_E,skewY:_E,distance:yE,translateX:yE,translateY:yE,translateZ:yE,x:yE,y:yE,z:yE,perspective:yE,transformPerspective:yE,opacity:rE,originX:SE,originY:SE,originZ:yE},CO={borderWidth:yE,borderTopWidth:yE,borderRightWidth:yE,borderBottomWidth:yE,borderLeftWidth:yE,borderRadius:yE,borderTopLeftRadius:yE,borderTopRightRadius:yE,borderBottomRightRadius:yE,borderBottomLeftRadius:yE,width:yE,maxWidth:yE,height:yE,maxHeight:yE,top:yE,right:yE,bottom:yE,left:yE,inset:yE,insetBlock:yE,insetBlockStart:yE,insetBlockEnd:yE,insetInline:yE,insetInlineStart:yE,insetInlineEnd:yE,padding:yE,paddingTop:yE,paddingRight:yE,paddingBottom:yE,paddingLeft:yE,paddingBlock:yE,paddingBlockStart:yE,paddingBlockEnd:yE,paddingInline:yE,paddingInlineStart:yE,paddingInlineEnd:yE,margin:yE,marginTop:yE,marginRight:yE,marginBottom:yE,marginLeft:yE,marginBlock:yE,marginBlockStart:yE,marginBlockEnd:yE,marginInline:yE,marginInlineStart:yE,marginInlineEnd:yE,fontSize:yE,backgroundPositionX:yE,backgroundPositionY:yE,...SO,zIndex:xO,fillOpacity:rE,strokeOpacity:rE,numOctaves:xO},wO={...CO,color:wE,backgroundColor:wE,outlineColor:wE,fill:wE,stroke:wE,borderColor:wE,borderTopColor:wE,borderRightColor:wE,borderBottomColor:wE,borderLeftColor:wE,filter:yO,WebkitFilter:yO,mask:bO,WebkitMask:bO},TO=e=>wO[e],EO=new Set([yO,bO]),DO,OO,kO;function AO(e,t){if(e===DO&&t===OO)return kO;let n=TO(e);return EO.has(n)||(n=UE),kO=n.getAnimatableNone?n.getAnimatableNone(t):void 0,DO=e,OO=t,kO}function jO(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var MO=e=>e*180/Math.PI,NO=e=>FO(MO(Math.atan2(e[1],e[0]))),PO={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scaleZ:()=>1,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:NO,rotateZ:NO,skewX:e=>MO(Math.atan(e[1])),skewY:e=>MO(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},FO=e=>(e%=360,e<0&&(e+=360),e),IO=NO,LO=e=>Math.hypot(e[0],e[1]),RO=e=>Math.hypot(e[4],e[5]),zO={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:LO,scaleY:RO,scaleZ:e=>Math.hypot(e[8],e[9],e[10]),scale:e=>(LO(e)+RO(e))/2,rotateX:e=>FO(MO(Math.atan2(e[6],e[5]))),rotateY:e=>FO(MO(Math.atan2(-e[2],e[0]))),rotateZ:IO,rotate:IO,skewX:e=>MO(Math.atan(e[4])),skewY:e=>MO(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function BO(e){return+!!e.includes(`scale`)}function VO(e,t){if(!e||e===`none`)return BO(t);let n=e.match(/^matrix(3d)?\(([-\d.e\s,]+)\)$/u);if(!n)return BO(t);let r=(n[1]?zO:PO)[t],i=n[2].split(`,`).map(e=>parseFloat(e));return typeof r==`function`?r(i):i[r]}var HO=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return VO(n,t)},UO=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`scaleZ`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],WO=new Set([...UO,`pathRotation`]),GO=e=>e===nE||e===yE,KO=new Set([`x`,`y`,`z`]),qO=UO.filter(e=>!KO.has(e));function JO(e){let t=[];return qO.forEach(n=>{let r=e.getValue(n);if(r!==void 0){let e=r.get(),i=+!!n.startsWith(`scale`);if(e===i)return;t.push([n,e]),r.set(i)}}),t}var YO=new Set([`bottom`,`right`]);function XO(e,t,n,r,i,a){let o=parseFloat(e);if(!isNaN(o))return o;let{min:s,max:c}=t()[n],l=c-s;return a===`border-box`?l:l-parseFloat(r)-parseFloat(i)}var ZO=({transform:e})=>VO(e,`x`),QO=({transform:e})=>VO(e,`y`),$O={width:({width:e,paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r},i)=>XO(e,i,`x`,t,n,r),height:({height:e,paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r},i)=>XO(e,i,`y`,t,n,r),top:({top:e})=>parseFloat(e),left:({left:e})=>parseFloat(e),bottom:({top:e},t)=>{let{y:n}=t();return parseFloat(e)+(n.max-n.min)},right:({left:e},t)=>{let{x:n}=t();return parseFloat(e)+(n.max-n.min)},x:ZO,y:QO,translateX:ZO,translateY:QO},ek=new Set,tk=!1,nk=!1,rk=!1;function ik(){if(nk){let e=[],t=new Set,n=new Set;ek.forEach(r=>{r.needsMeasurement&&(e.push(r),t.add(r.element),YO.has(r.name)&&n.add(r.element))});let r=new Map;n.forEach(e=>{let t=JO(e);t.length&&(r.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=r.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}nk=!1,tk=!1,ek.forEach(e=>e.complete(rk)),ek.clear()}function ak(){ek.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(nk=!0)})}function ok(){rk=!0,ak(),ik(),rk=!1}function sk(e,t,n){if(typeof e==`string`){if(pT(e)||hT(e))return parseFloat(e);if(!UE.test(e)&&UE.test(n))return AO(t,n)}return e??void 0}var ck=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(ek.add(this),tk||(tk=!0,mD.read(ak),mD.resolveKeyframes(ik))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=sk(n.readValue(t,a),t,a);r!==void 0&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}jO(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),ek.delete(this)}cancel(){this.state===`scheduled`&&(ek.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},lk=e=>e.startsWith(`--`);function uk(e,t,n){lk(t)?e.style.setProperty(t,n):e.style[t]=n}var dk={};function fk(e,t){let n=gT(e);return()=>dk[t]??n()}var pk=fk(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),mk=fk(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),hk=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,gk={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:hk([0,.65,.55,1]),circOut:hk([.55,0,1,.45]),backIn:hk([.31,.01,.66,-.59]),backOut:hk([.33,1.53,.69,.99])};function _k(e,t){if(e)return typeof e==`function`?mk()?vD(e,t):`ease-out`:VT(e)?hk(e):Array.isArray(e)?e.map(e=>_k(e,t)||gk.easeOut):gk[e]}function vk(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=_k(s,i);Array.isArray(d)&&(u.easing=d);let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};return l&&(f.pseudoElement=l),e.animate(u,f)}function yk(e){return typeof e==`function`&&`applyToOptions`in e}function bk({type:e,...t}){return yk(e)&&mk()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var xk=class extends fO{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e;let c=bk(e);this.animation=vk(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=this.onFinish=()=>{if(this.animation.onfinish=null,this.finishedTime=this.time,!i){let e=iO(r,this.options,o,this.speed);this.updateMotionValue?.(e),uk(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()},uO(this,e,c)}play(){this.isStopped||(this.manualStartTime=null,this.animation.onfinish=this.onFinish,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.isStopped||(this.animation.onfinish=this.onFinish),this.animation.finish?.()}cancel(){this.animation.onfinish=null;try{this.animation.cancel()}catch{}}stop(){this.isStopped||(this.isStopped=!0,this.state!==`idle`&&this.finishedTime===null&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel()))}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return ST(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+ST(e)}get time(){return ST(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=xT(e),t&&(this.animation.pause(),this.updateFinished())}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,onAttach:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=this.onFinish=null,e&&pk()?(this.animation.timeline=e,t?.(this.animation),_T):n(this)}},Sk={anticipate:MT,backInOut:jT,circInOut:FT};function Ck(e){return e in Sk}function wk(e){typeof e.ease==`string`&&Ck(e.ease)&&(e.ease=Sk[e.ease])}var Tk=class extends xk{constructor(e){wk(e),oO(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}elapsed(){return this.state===`running`?(JT.now()-this.startTime)*this.speed:this.time*1e3}sample(e){if(!this.sampler){let{motionValue:e,onUpdate:t,onComplete:n,onPlay:r,onStop:i,element:a,...o}=this.options;this.sampler=new hO({...o,autoplay:!1}),this.sampler.stop()}return this.sampler.sample(Math.max(0,e)).value}liveValue(){let{state:e}=this;if(e===`running`||e===`paused`)return this.sample(this.elapsed())}updateMotionValue(e){let{motionValue:t,element:n,name:r}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let{speed:i}=this,a=this.elapsed(),o=this.state===`running`&&i?dT(0,10,a):0,s=this.sample(a);n&&r&&uk(n,r,s),t.setWithVelocity(this.sample(a-o*Math.sign(i)),s,o/Math.abs(i||1))}},Ek=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(UE.test(e)||e===`0`)&&!e.startsWith(`url(`));function Dk(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Ok(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=Ek(i,t),s=Ek(a,t);return!o||!s?!1:Dk(e)||(n===`spring`||yk(n))&&r}function kk(e){e.duration=0,e.type=`keyframes`}var Ak=new Set([`opacity`,`clipPath`,`filter`,`transform`]),jk=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Mk(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&jk.test(e[t]))return!0;return!1}var Nk=({mixer:e,keyframes:t})=>e&&typeof t[0]!=`number`&&t.some((n,r)=>r&&e(t[r-1],n)),Pk=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),Fk=()=>!fT.useManualTiming&&Object.hasOwnProperty.call(Element.prototype,`animate`);function Ik(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!n||!(Ak.has(n)||Pk.has(n)))return!1;let c=t?.owner?.current;if(!(c instanceof HTMLElement)&&!(c instanceof SVGElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return Fk()&&(Ak.has(n)||Pk.has(n)&&Mk(s))&&(n!==`transform`||!u)&&!l&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`&&!Nk(e)}var Lk=(e,t)=>t&&typeof e==`number`?t.transform(e):e,Rk={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},zk=UO.length,Bk={},Vk=(e,t,n=Lk(t,SO[e]))=>(Bk[e]||(Bk[e]=(Rk[e]||e)+`(`))+n+`)`,Hk=(e,t)=>(typeof t==`number`?t:parseFloat(t))===+!!e.startsWith(`scale`);function Uk(e,t,n){let r=``;for(let i=0;i<zk;i++){let a=UO[i],o=e[a];if(o===void 0)continue;let s=n&&(t[a]=Lk(o,CO[a]));Hk(a,o)||(r+=Vk(a,o,s||void 0)+` `)}let i=e.pathRotation;return i&&(r+=Vk(`rotate`,i)),r=r.trim(),n?n(t,r):r||`none`}var Wk=new WeakMap,Gk=200,Kk=.001,qk=.1,Jk=.001,Yk=100,Xk=100,Zk=new Set([`linear`,`easeIn`,`easeOut`,`easeInOut`]),Qk=e=>Zk.has(e),$k=new WeakMap,eA=(e,t)=>{let n=$k.get(e);return n?.[0]!==t&&(n=[t,`linear(`+ZD(Array(t+1)).map(t=>mO(e(t))+` `+mO(t*100)+`%`)+`)`],$k.set(e,n)),n[1]},tA=(e,t)=>Math.min(Gk,Math.max(2,Math.ceil((t-e)/10))),nA=(e,t)=>Math.abs(e-t)<=Kk,rA=(e,t)=>e-t,iA=(e,t,n)=>ZD(Array(n+1)).map(n=>qE(e,t,n)),aA=e=>e.motionValue.owner,oA=e=>Wk.get(e),sA=({state:e})=>e===`idle`||e===`finished`,cA=(e,t)=>e.latestValues?e.latestValues[t]:e.getValue(t)?.get(),lA=({name:e,motionValue:t})=>e&&UO.includes(e)&&t?.owner?.current instanceof HTMLElement&&Fk()&&mk();function uA(e){let t=aA(e),{onUpdate:n,transformTemplate:r}=t.getProps();return!e.isHandoff&&!n&&!e.hasOnUpdate&&!r&&e.type!==`inertia`&&(cA(t,`transform`)||`none`)===`none`&&!cA(t,`pathRotation`)&&!t.projection?.isProjecting()&&!Nk(e)}var dA=class{constructor(e,t,n,r){this.element=e,this.update=t,this.makeDriver=n,this.animation=r}get js(){return this.driver||=this.makeDriver(this.update)}now(){return this.driver||this.makeDriver!==_D?this.js.now():GT.isProcessing?GT.timestamp:JT.now()}start(e=!0){let t=oA(this.element);!t||t.isJS?this.js.start(e):t.schedule(!1,!e)}stopJS(){this.driver?.stop()}stop(){this.stopJS();let e=oA(this.element);e&&!e.isFinishing&&e.release(this.animation)}},fA,pA=class extends hO{constructor(e){let t=aA(e).current,{driver:n=_D}=e,r,i=uA(e);e.driver=e=>new dA(t,e,n,r),super(e),r=this;let a=this.driver;a&&(a.animation=this),this.canAccelerate=i;let{stop:o}=this;this.stop=()=>{this.isAccelerated()&&this.sync(),o()}}offsets(){let{keyframes:e,times:t}=this.options;return t||(this.offsetsOf!==e&&(this.offsetsOf=e,this.cachedOffsets=ZD(e)),this.cachedOffsets)}get group(){return oA(aA(this.options).current)}get js(){return this.driver?.js}stopJS(){this.driver?.stopJS()}get name(){return this.options.name}timing(){let{startTime:e,speed:t,totalDuration:n}=this,{delay:r=0,repeatType:i}=this.options;return this.holdTime===null?n===1/0?[e+r/t,this.resolvedDuration*(i===`loop`?1:2)/t||1]:[e+(r+n)/t,0]:[1/0,0]}isAccelerated(){let{group:e,state:t}=this;return e?.tracks.has(this)&&!e.isJS&&this.canAccelerate&&(t===`running`||t===`paused`)}liveValue(){return this.isAccelerated()?this.sampleAt(JT.now()):void 0}tween(){let{keyframes:e,type:t,repeat:n,delay:r=0}=this.options,i=-1;if(n||t!==eO||this.holdTime!==null)return;for(let t=1;t<e.length;t++)if(e[t]!==e[t-1]){if(i>=0)return;i=t-1}let{ease:a}=this.options;zT(a)&&(a=a[i]);let o=this.offsets(),s=e=>this.startTime+(r+o[e]*this.totalDuration)/this.speed;if(i>=0){let e=VT(a)?hk(a):Qk(a)?gk[a]:WT(a);return[s(i),s(i+1),typeof e==`string`||nA(e(0),0)&&nA(e(1),1)?e:void 0]}}boundaries(e,t){let{startTime:n,speed:r,resolvedDuration:i,options:a}=this,{delay:o=0,repeat:s=0,repeatDelay:c=0,repeatType:l,type:u}=a,d=(u||eO)===eO?this.offsets():[0,1],f=n+o/r,p=[];if(this.holdTime!==null||!(i>0))return p;for(let n=Math.max(0,Math.floor((e-f)*r/i));n<=s;n++){let a=f+n*i/r;if(a>t)break;for(let o of d){let s=a+(n%2&&l&&l!==`loop`?1-o:o)*(i-c)/r;s>e&&s<t&&p.push(s)}}return p}numberAt(e){return parseFloat(this.sampleAt(e,!0))}sync(){let e=JT.now(),t=this.sampleAt(e,!0);this.options.motionValue.setWithVelocity(this.holdTime===null?this.sampleAt(e-10,!0):t,t,10)}play(){this.isStopped||((this.group||gA(aA(this.options))).tracks.add(this),super.play())}pause(){super.pause(),this.isAccelerated()&&this.group.schedule(!1)}complete(){super.complete();let{group:e}=this;e&&!e.isJS&&this.tick(JT.now())}get time(){return this.isAccelerated()?ST(dT(0,this.totalDuration,this.at(JT.now())-(this.options.delay||0))):super.time}set time(e){(fA??=Object.getOwnPropertyDescriptor(hO.prototype,`time`).set).call(this,e)}attachTimeline(e){return this.canAccelerate=!1,this.group?.demote(!0),super.attachTimeline(e)}},mA,hA=e=>{mA||queueMicrotask(()=>{let e=mA;mA=void 0,e.forEach(e=>e())}),(mA||=[]).push(e)};function gA(e){let t=e.current,n=new Set,r=new Map,i={},a=[],o=new Map,s=[],c=!1,l=!1,u=!1,d=!1,f=-1/0,p,m=1/0,h,g=e=>{for(let t of n)if(t.name===e)return!0},_=(t,n)=>{let o={};for(let s of t===void 0?UO:a){let a=r.get(s),c=t===void 0?cA(e,s):a?a.sampleAt(n>t&&!a.timing()[1]?n:t):i[s];c!==void 0&&(o[s]=c)}return o},v=(e,t)=>{let n=``;for(let r in e){let i=e[r];(!t||!Hk(r,i))&&(n+=Vk(r,i)+` `)}return(t?n.trim():n)||`none`},y=(e,t)=>v(_(e,t)),b=(e=_())=>{t.style.transform=v(e,!0)},x=e=>{e.onfinish=e.oncancel=null,e.cancel()},S=(e=!0)=>{clearTimeout(p),m=1/0,h=void 0,e&&b(),s.forEach(({animation:e})=>x(e)),s=[]},C=(e,n)=>new Animation(new KeyframeEffect(t,e,n)),w=(e,t,n=1/0)=>{let r={animation:e,offset:t,end:n};e.startTime=JT.now()+t,n<1/0&&(e.onfinish=()=>{r.isDone=!0,s.some(e=>e.end===1/0)&&(x(e),s=s.filter(e=>e!==r)),F.schedule(!1)}),e.oncancel=()=>s.includes(r)&&F.demote(),s.push(r)},T=(e,t,n)=>{let r=(t,n)=>Math.abs(e(n)-e(t)),i=r(t,n);for(;n-t>.01;){let e=(t+n)/2;r(t,e)>r(e,n)?n=e:t=e}return r(t,n)>i/2?[t,n]:[]},E=(e,t,n,r)=>{let i=tA(t,n);if(r.length*4>i)return;let a;for(let r of e){let e=r.numberAt(t),i=(r.numberAt((t+n)/2)-e)/(r.numberAt(n)-e);if(i===i){if(a===void 0)a=i;else if(!nA(i,a))return}}let o=iA(t,n,i).concat(r).sort(rA),s=e=>yT(t,n,e),c,l;for(let n of e){let e=n.numberAt(t),r=o.map(t=>n.numberAt(t)-e),i=r[r.length-1],a=r.some(e=>Math.abs(e)*Kk>Math.abs(i))?0:i,s=r.map(e=>a?e/a:e);if(a&&!c)c=s,l=t=>(n.numberAt(t)-e)/a;else if(s.some((e,t)=>!nA(e,a&&c[t])))return}if(!c||c.every((e,t)=>nA(e,s(o[t]))))return`linear`;let u=[],d=(e,t=l(e))=>u.push(mO(t)+` `+mO(s(e)*100)+`%`);return c.forEach((e,t)=>{t&&Math.abs(e-c[t-1])>.2&&T(l,o[t-1],o[t]).forEach(e=>d(e)),d(o[t],e)}),`linear(`+u+`)`},D=(e,t,n,r)=>{let i=[t],a=[],o=n,s=t;for(let r of e){let e=r.tween();if(e?.[2]!==`linear`){let[i,c]=r.timing(),[l,u]=e||[t,c?n:i];o=Math.min(o,l),s=Math.max(s,u),a.push(r)}}o=Math.max(t,o),s=Math.min(n,s);let c=(e,t)=>a.every(n=>!(Math.abs(n.numberAt((e+t)/2)-(n.numberAt(e)+n.numberAt(t))/2)>(n.name.startsWith(`scale`)?Jk:qk))),l=(t,n,r)=>{if(n-t<1||c(t,n))i.push(n);else if(r<4)l(t,(t+n)/2,r+1),l((t+n)/2,n,r+1);else{for(let r of e)i.push(...T(e=>r.numberAt(e),t,n));i.push(n)}},u=s>o?iA(o,s,Math.ceil((s-o)/100)):[];u.push(n);for(let e of r)u.push(e,Math.min(e+.01,n));let d=t;for(let e of u.sort(rA))e>d&&l(d,e,0),d=e;return i.sort(rA)},O=e=>{let t;for(let n of e){let e=n.tween();if(!e||t&&(Math.abs(e[0]-t[0])>1||Math.abs(e[1]-t[1])>1))return;t=[e[0],e[1],!t||e[2]===t[2]?e[2]:void 0]}return t},k=(e,t,n,r,i={fill:`both`},a)=>{let o=r?[]:e.flatMap(e=>e.boundaries(t,n)),s=r||E(e,t,n,o),c=s?[t,n]:D(e,t,n,o),l=c.map(e=>y(e,a)),u={transform:l};return s||(u.offset=c.map(e=>yT(t,n,e))),l.every(e=>e===l[0])&&(b(_(t,a)),u=null),C(u,{...i,duration:n-t,easing:s||`linear`})},A=e=>{let t=JT.now()+e;t<m&&(clearTimeout(p),m=t,p=setTimeout(()=>{m=1/0,F.schedule(!1)},e))},j=t=>{let c=t,l=0,u=0,d=[],f=[],p=new Set;r.clear(),o=new Map;for(let e of n){r.set(e.name,e);let[n,i]=e.timing(),a=n===1/0;if(o.set(e,[e.at(t),e.speed,a]),!a){if(e.speed<0)return;if(i){if(l){let e=(n-u)/i;if(Math.abs(i-l)>1||Math.abs(e-Math.round(e))*l>1)return}else l=i,u=n;f.push(e)}else p.add(n);d.push(e),c=Math.max(c,n)}}i={},a=UO.filter(t=>{if(r.has(t))return!0;let n=i[t]=cA(e,t);return n!==void 0&&!Hk(t,n)}),S(!1);let m=!l&&O(d);try{if(c>t){let e;if(m&&m[1]>t){let[n,r,i]=m;if(n-t>Xk)return d.forEach(e=>e.sync()),A(h=n-t-Xk),!0;e=typeof i==`string`?i:i?eA(i,tA(n,r)):E(d,n,r,[]),e&&w(k(d,n,r,e,{fill:`both`,endDelay:c-r}),n-t,c-n)}e||w(k(d,t,c),0,c-t),p.forEach(e=>e<c-1&&w(C(null,{duration:e-t}),0,e-t))}if(l){let e=u+Math.floor((c-u)/l)*l;w(k(f,e,e+l,void 0,{iterations:1/0,iterationStart:(c-e)/l,fill:`forwards`},c),c-t)}}catch{return}return s.length||S(),!0},M=(e,t)=>{let r,i=0;for(let t of n){let n=o.get(t);if(!n)return!1;let[a,c,l]=n,u=t.at(e),d=t.timing()[0]===1/0;if(l){if(d&&(u===a||!s.length))continue;return!1}let f=(u-a)/c,p=d?0:t.speed/c;if(r===void 0)r=f,i=p;else if(Math.abs(f-r)>1||p!==i)return!1}if(r===void 0)return!0;if(!s.length){if(h===void 0||t&&i)return!1;if(i){let e=(h-r)/i;if(e<1)return!1;A(e)}return!0}for(let{offset:e,end:n,isDone:i}of s){let a=r-e;if(n<1/0&&(i?a<n-1:a<0&&(t||e<=0)||a>=n))return!1}for(let{animation:t,offset:n,isDone:a}of s){if(a)continue;let o=r-n;i&&t.updatePlaybackRate&&t.playState===`running`&&Math.abs(Number(t.currentTime)-o)<20?t.playbackRate!==i&&t.updatePlaybackRate(i):i?(t.playbackRate!==i&&(t.playbackRate=i),t.startTime=e-o/i):(t.startTime=null,t.currentTime=o)}return!0},N=()=>!n.size&&(u=!0,oA(t)===F&&Wk.delete(t),F.isJS||S(),!0),P=()=>{let t=JT.now();if(F.isJS||(F.isFinishing=!0,n.forEach(n=>{let[r,a]=n.timing();n.state===`running`&&n.speed>0&&!a&&r<=t+1&&(n.complete(),i[n.name]=cA(e,n.name),o.has(n)||(c=!0))}),F.isFinishing=!1),l=!1,u||(n.forEach(e=>sA(e)&&n.delete(e)),N()))return;for(let e of n)if(!e.canAccelerate)return F.demote(!0);F.isJS&&(F.isJS=!1,c=!0,n.forEach(e=>e.stopJS()));let r=c,a=d;if(c=d=!1,r||!M(t,a)){if(a){if(t-f<Yk)return F.demote();f=t}if(!j(t))return F.demote()}else if(h!==void 0&&!a)return;n.forEach(e=>e.timing()[0]===1/0&&e.sync())},F={tracks:n,isJS:!1,isFinishing:!1,schedule(e,t){u||(c||=e,d||=!!t,l||(l=!0,GT.isProcessing?mD.render(P,!1,!0):hA(P)))},release(e){sA(e)&&n.delete(e),N()||F.schedule(!0)},check(){if(!F.isJS){for(let t in i)if(cA(e,t)!==i[t]&&!g(t))return F.schedule(!0,!0)}},demote(e){if(!(F.isJS||u))return n.forEach(t=>{t.isAccelerated()&&t.sync(),e||(t.canAccelerate=!1)}),F.isJS=!0,o=new Map,S(),n.forEach(e=>e.state===`running`&&e.js?.start()),!0}};return Wk.set(t,F),F}var _A=class extends fO{constructor(e){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=JT.now();let{keyframes:t,name:n,motionValue:r,element:i}=e,a=e;a.autoplay??=!0,a.delay??=0,a.type??=`keyframes`,a.repeat??=0,a.repeatDelay??=0,a.repeatType??=`loop`;let o=i?.KeyframeResolver||ck;this.keyframeResolver=new o(t,(e,t,n)=>this.onKeyframesResolved(e,t,a,!n),n,r,i),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=JT.now();let u=Ok(e,i,a,o);u||((fT.instantAnimations||!s)&&l?.(iO(e,n,t)),e[0]=e[e.length-1],kk(n),n.repeat=0);let{onComplete:d}=n;n.finalKeyframe=t,n.keyframes=e,n.onComplete=()=>{d?.(),this.notifyFinished()};let f=u&&!c&&Ik(n),p=!f&&lA(n);r&&(f||p||this.resolvedAt!==this.createdAt)&&(n.startTime??=cO(this.createdAt,this.resolvedAt));let m;if(f){n.element=n.motionValue?.owner?.current;try{m=new Tk(n)}catch{m=new hO(n)}}else m=p?new pA(n):new hO(n);this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this._animation.finished:super.finished}then(e,t){return this.finished.finally(e).then(()=>{})}liveValue(){return this._animation?.liveValue?.()}get animation(){return this._animation||(this.keyframeResolver?.resume(),ok()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation?.cancel(),this.keyframeResolver?.cancel()}},vA=class{constructor(e){this.stop=()=>{for(let e of this.animations)e.stop()},this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}attachTimeline(e){let t=this.animations.map(t=>t.attachTimeline(e));return()=>{t.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll(`time`)}set time(e){for(let t of this.animations)t.time=e}get speed(){return this.getAll(`speed`)}set speed(e){for(let t of this.animations)t.speed=e}get state(){return this.getAll(`state`)}get startTime(){return this.getAll(`startTime`)}get duration(){return yA(this.animations,`duration`)}get iterationDuration(){return yA(this.animations,`iterationDuration`)}play(){for(let e of this.animations)e.play()}pause(){for(let e of this.animations)e.pause()}cancel(){for(let e of this.animations)e.cancel()}complete(){for(let e of this.animations)e.complete()}};function yA(e,t){let n=0;for(let r=0;r<e.length;r++){let i=e[r][t];i!==null&&i>n&&(n=i)}return n}var bA=class extends vA{then(e,t){return this.finished.finally(e).then(()=>{})}};function xA(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var SA=30,CA=e=>!isNaN(parseFloat(e)),wA={current:void 0},TA=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=JT.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.dirty(),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=JT.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=CA(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){var n;return e===`change`?this.onChangeSubscribe(t):((n=this.events)[e]||(n[e]=new bT)).add(t)}onChangeSubscribe(e){let{events:t}=this;return!t.change&&!this.changeSubscriber?this.changeSubscriber=e:(t.change||(t.change=new bT,t.change.add(this.changeSubscriber),this.changeSubscriber=void 0),t.change.add(e)),()=>{this.changeSubscriber===e?this.changeSubscriber=void 0:t.change?.remove(e),this.stopIfUnobserved()}}stopIfUnobserved(){mD.read(()=>{!this.changeSubscriber&&!this.events.change?.getSize()&&this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){t&&(this.updatedAt=JT.now(),this.stop()),this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,this.stopPassiveEffect?.()}dirty(){let{current:e,changeSubscriber:t}=this;t?t(e):this.events.change?.notify(e)}addDependent(e){(this.dependents||=new Set).add(e)}removeDependent(e){this.dependents?.delete(e)}get(){wA.current?.push(this);let e=this.animation?.liveValue?.();return e===void 0?this.current:e}getCurrent(){return this.current}getPrevious(){return this.prev}getVelocity(){let e=JT.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>SA)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,SA);return CT(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return new Promise(t=>this.run(e,t))}run(e,t){this.stop(),this.hasAnimated=!0;let n=!1,r;r=e(()=>{n=!0,this.events.animationComplete?.notify(),this.animation===r&&(this.animation=void 0),t?.()}),n||(this.animation=r),this.events.animationStart?.notify()}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel?.notify()),this.animation=void 0}isAnimating(){return!!this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect?.()}};function EA(e,t){return new TA(e,t)}function DA(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function OA(e,t){let n=e?.[t]??e?.default??e;return n===e?n:DA(n,e)}var kA={type:`spring`,stiffness:500,damping:25,restSpeed:10},AA=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),jA={type:`keyframes`,duration:.8},MA={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},NA=(e,{keyframes:t})=>t.length>2?jA:WO.has(e)?e.startsWith(`scale`)?AA(t[1]):kA:MA,PA=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`,`out`,`mixer`]);function FA(e){for(let t in e)if(!PA.has(t))return!0;return!1}var IA=(e,t,n,r={},i,a)=>o=>{let s=OA(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=xT(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i,hasOnUpdate:!!s.onUpdate};FA(s)||Object.assign(u,NA(e,u)),u.duration&&=xT(u.duration),u.repeatDelay&&=xT(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(kk(u),u.delay===0&&(d=!0)),(fT.instantAnimations||fT.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,kk(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=iO(u.keyframes,s);if(e!==void 0){mD.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new hO(u):new _A(u)},LA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function RA(e){let t=LA.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function zA(e,t,n=1){let[r,i]=RA(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return pT(e)?parseFloat(e):e}return $T(i)?zA(i,t,n+1):i}function BA(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function VA(e,t,n,r){let i=t=>typeof t==`function`?t(n===void 0?e.custom:n,...BA(r)):t;return t=i(t),typeof t==`string`&&(t=e.variants&&e.variants[t]),i(t)}function HA(e,t,n){return VA(e.getProps(),t,n,e)}var UA=(e,t)=>t===`exit`?e.presenceContext?.custom:void 0,WA=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...UO]),GA=e=>Array.isArray(e);function KA(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,EA(n))}function qA(e){return GA(e)?e[e.length-1]||0:e}function JA(e,t){let{transitionEnd:n={},transition:r={},...i}=HA(e,t)||{};i={...i,...n};for(let t in i)KA(e,t,qA(i[t]))}var YA=e=>!!(e&&e.getVelocity);function XA(e){return!!(YA(e)&&e.add)}function ZA(e,t){let n=e.getValue(`willChange`);if(XA(n))return n.add(t);if(!n&&fT.WillChange){let n=new fT.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}var QA=`data-framer-appear-id`;function $A(e){return e.props[QA]}var ej=typeof window<`u`;function tj({protectedKeys:e,needsAnimating:t},n){let r=n in e&&!t[n];return t[n]=!1,r}function nj(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?DA(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState?.getState()[i],p=a?.path;p&&(p.animateValues?p.animateValues(t=>e.getValue(t,e.latestValues[t]??0),s,a,n,d):p.animateVisualElement?.(e,s,a,n,d));for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&tj(f,t))continue;let o={delay:n,...OA(f?.out[t]||a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){mD.update(()=>r.set(i));continue}let p=!1;if(ej&&window.MotionHandoffAnimation){let n=$A(e);if(n){let e=window.MotionHandoffAnimation(n,t,mD);e!==null&&(o.startTime=e,p=!0)}}ZA(e,t);let m=l??e.shouldReduceMotion;r.run(IA(t,r,i,m&&WA.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>mD.update(()=>{o&&JA(e,o)});d.length?Promise.all(d).then(t):t()}return d}function rj(e,t,n={}){let r=HA(e,t,UA(e,n.type)),i=n.transitionOverride||(r?.transition??(e.getDefaultTransition()||{})),a=()=>Promise.all(r?nj(e,r,n):[]),o=(r=0)=>{let{variantChildren:a}=e,{delayChildren:o=0,staggerChildren:s,staggerDirection:c}=i,l=[];return a?.forEach(e=>{e.notify(`AnimationStart`,t),l.push(rj(e,t,{...n,delay:r+(typeof o==`function`?0:o)+xA(a,e,o,s,c)}).then(()=>e.notify(`AnimationComplete`,t)))}),Promise.all(l)},{when:s}=i;return s?s===`beforeChildren`?a().then(()=>o()):o().then(a):Promise.all([a(),o(n.delay)])}function ij(e,t,n={}){return e.notify(`AnimationStart`,t),(Array.isArray(t)?Promise.all(t.map(t=>rj(e,t,n))):typeof t==`string`?rj(e,t,n):Promise.all(nj(e,HA(e,t,n.custom),n))).then(()=>{e.notify(`AnimationComplete`,t)})}var aj={test:e=>e===`auto`,parse:e=>e},oj=e=>t=>t.test(e),sj=[nE,yE,vE,_E,xE,bE,aj],cj=e=>sj.find(oj(e));function lj(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||hT(e)}var uj=new Set([`auto`,`none`,`0`]);function dj(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!uj.has(t)&&FE(t)&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]!==i&&(e[r]=AO(n,i))}var fj=class extends ck{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}scheduleResolve(){if(this.canReadNow()&&(this.readKeyframes(),!this.needsMeasurement))return this.complete();super.scheduleResolve()}canReadNow(){let{unresolvedKeyframes:e,element:t,motionValue:n}=this,r=e[0]??n?.get();if(!t?.current||r===void 0)return!1;for(let t=0;t<e.length;t++)if(tE(t?e[t]:r))return!1;return!0}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t?.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),$T(r))){let i=zA(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!WA.has(n)||e.length!==2)return;let[r,i]=e;if(typeof r==`number`&&typeof i==`number`)return;let a=cj(r),o=cj(i);if(tE(r)!==tE(i)&&$O[n])this.needsMeasurement=!0;else if(a!==o){if(GO(a)&&GO(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else $O[n]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||lj(e[t]))&&n.push(t);n.length&&dj(e,n,t)}measure(){let{element:e,name:t}=this;return $O[t](window.getComputedStyle(e.current),()=>e.measureViewportBox())}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e?.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&this.motionValue?.jump(r,!1)}measureEndState(){let{element:e,unresolvedKeyframes:t}=this;if(!e?.current)return;this.motionValue?.jump(this.measuredOrigin,!1);let n=t.length-1,r=t[n];t[n]=this.measure(),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.resolveNoneKeyframes()}},pj=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`],mj=[];function hj(e){gj(e),mj.unshift(e)}function gj(e){uT(mj,e)}function _j(e){return mj.find(t=>t.test(e))}function vj(e,t,n={},r){let i=[],{velocity:a,path:o}=n,s=n.reduceMotion??r?.shouldReduceMotion;o?.animateValues&&r&&(t={...t},o.animateValues(e,t,n,0,i));for(let o in t){if(o===`transition`||o===`transitionEnd`)continue;let c=t[o];if(c===void 0)continue;let l=e(o),u=l.get();u!==void 0&&!l.isAnimating()&&!Array.isArray(c)&&c===u&&!a?mD.update(()=>l.set(c)):(l.run(IA(o,l,c,s&&WA.has(o)?{type:!1}:n,r)),l.animation&&i.push(l.animation))}let{transitionEnd:c}=t;if(c){let t=()=>mD.update(()=>{for(let t in c)e(t).set(c[t])});i.length?Promise.all(i).then(t):t()}return i}function yj(e,t,n,r,i){let a,o=!1,s=vj(r=>{let s=a?.[r]??e.get(t,r);if(!s){let c;if(!i){let i=n[r];c=bj(i)??e.read(t,r,i)}s=EA(c,{owner:i}),o?e(t,{[r]:s}):(a||={})[r]=s}return s},n,r,i);return o=!0,a&&e(t,a),s}function bj(e){let t=Array.isArray(e)?e[0]:void 0;return t===null?void 0:t}function xj(e){return mT(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}function Sj(e){return mT(e)&&`ownerSVGElement`in e}var Cj={};function wj(e){return Cj.current?.add(e),e}var Tj=e=>Cj.current?Cj.current.bind(e):e;function Ej(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=t?t.current:Cj.current?.root||document,i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var Dj=class{constructor(e=mD.render){this.step=e,this.values=new Map,this.pending=[],this.numPending=0,this.flush=()=>{let{pending:e,numPending:t}=this;this.numPending=0;for(let n=0;n<t;n++)e[n]()}}set(e,t,n,r){if(this.values.get(e)?.onRemove(),r)for(let e of this.values.values())e.value===r&&(n=e.render);let i=()=>n&&this.schedule(n);t.get()!==void 0&&i();let a=t.on(`change`,i),o=()=>{a(),n&&!r&&this.cancel(n),this.values.get(e)?.onRemove===o&&this.values.delete(e)};return this.values.set(e,{value:t,render:r?void 0:n,onRemove:o}),o}get(e){return this.values.get(e)?.value}release(){let e=new Map;return this.values.forEach((t,n)=>{e.set(n,t.value),t.onRemove()}),this.transformKeys=this.transformValues=void 0,e}schedule(e){let{pending:t,numPending:n}=this;for(let r=0;r<n;r++)if(t[r]===e)return;n||this.step(this.flush),t[this.numPending++]=e}cancel(e){let{pending:t}=this;for(let n=0;n<this.numPending;n++)if(t[n]===e){t[n]=t[--this.numPending];return}}};function Oj(e,{step:t,...n}={}){let r=new WeakMap;return Object.assign((n,i)=>{let a=r.get(n)??new Dj(t);r.set(n,a);let o=[];for(let t in i){let r=i[t],s=e(n,a,t,r);o.push(s)}return()=>{for(let e of o)e()}},n,{get:(e,t)=>r.get(e)?.get(t),flush:e=>r.get(e)?.flush(),state:e=>r.get(e)})}function kj(e){let t=``,{transformKeys:n=[],transformValues:r={}}=e;for(let e=0;e<n.length;e++){let i=n[e],a=r[i].getCurrent();a!==void 0&&(Hk(i,a)||(t+=(t&&` `)+Vk(i,a)))}let i=e.get(`pathRotation`)?.get();return i&&(t+=(t&&` `)+Vk(`rotate`,i)),t||`none`}var Aj=new Set([`originX`,`originY`,`originZ`]),jj=(e,t)=>Lk(e.get(t)?.get(),CO[t]),Mj=(e,t,n,r)=>{let i,a;if(WO.has(n)){if(n!==`pathRotation`){let e=t.transformKeys??=[];(t.transformValues??={})[n]=r,e.includes(n)||(e.push(n),e.sort((e,t)=>UO.indexOf(e)-UO.indexOf(t)))}t.get(`transform`)||(!xj(e)&&!t.get(`transformBox`)&&Mj(e,t,`transformBox`,new TA(`fill-box`)),t.set(`transform`,new TA(`none`),()=>{Wk.get(e)?.check(),e.style.transform=kj(t)})),a=t.get(`transform`)}else Aj.has(n)?(t.get(`transformOrigin`)||t.set(`transformOrigin`,new TA(``),()=>{let n=jj(t,`originX`)??`50%`,r=jj(t,`originY`)??`50%`,i=jj(t,`originZ`)??0;e.style.transformOrigin=`${n} ${r} ${i}`}),a=t.get(`transformOrigin`)):i=lk(n)?()=>{e.style.setProperty(n,r.getCurrent())}:()=>{e.style[n]=Lk(r.getCurrent(),CO[n])};return t.set(n,r,i,a)},Nj=e=>xj(e)||Sj(e),Pj=(e,t)=>{if(WO.has(t))return HO(e,t);let n=getComputedStyle(e),r=lk(t)?n.getPropertyValue(t):n[t];return typeof r==`string`&&r.trim()||0},Fj=Oj(Mj,{test:Nj,read:Pj});function Ij(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}function Lj(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(WO.has(e))o=!0;else if(ZT(e))i[e]=n;else{let t=Lk(n,CO[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=Uk(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}var Rj={offset:`stroke-dashoffset`,array:`stroke-dasharray`},zj={offset:`strokeDashoffset`,array:`strokeDasharray`};function Bj(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?Rj:zj;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var Vj=[`transform`,`opacity`,`clipPath`,`filter`,`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function Hj(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(Lj(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;for(let e of Vj)d[e]!==void 0&&(f[e]=d[e],delete d[e]);(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&Bj(d,i,a,o,!1)}function Uj(e,t){if(!(t in e))return!1;let n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),t)||Object.getOwnPropertyDescriptor(e,t);return n&&typeof n.set==`function`}var Wj=(e,t,n,r,i=n)=>{let a=Uj(e,i);!a&&(i.startsWith(`data`)||i.startsWith(`aria`))&&(i=Ij(i));let o=CO[n]||CO[i],s=a?()=>{e[i]=Lk(r.get(),CO[n])}:()=>{let t=Lk(r.get(),o);t==null?e.removeAttribute(i):e.setAttribute(i,String(t))};return t.set(n,r,s)};function Gj(e,t,n,r){return mD.render(()=>e.setAttribute(`pathLength`,`1`)),n===`pathOffset`?t.set(n,r,()=>{let t=r.get();e.setAttribute(`stroke-dashoffset`,`${-t}`)}):(t.get(`stroke-dasharray`)||t.set(`stroke-dasharray`,new TA(`1 1`),()=>{let n=t.get(`pathLength`)?.get()??1,r=t.get(`pathSpacing`)?.get();e.setAttribute(`stroke-dasharray`,`${n} ${r??1-Number(n)}`)}),t.set(n,r,void 0,t.get(`stroke-dasharray`)))}var Kj=Oj((e,t,n,r)=>n.startsWith(`path`)&&!WO.has(n)?Gj(e,t,n,r):n.startsWith(`attr`)?Wj(e,t,n,r,qj(n)):n===`d`?t.set(n,r,()=>{let t=r.get()?.replace(/path\(|["')]/g,``);t===void 0?e.removeAttribute(n):e.setAttribute(n,t)}):(WO.has(n)||Aj.has(n)||lk(n)||n in e.style?Mj:Wj)(e,t,n,r),{test:Sj,read:(e,t)=>WO.has(t)?CO[t]?.default||0:lk(t)||Vj.includes(t)?Pj(e,t)||e.getAttribute(Ij(t))||0:(t=qj(t),e.getAttribute(Ij(t))??e.getAttribute(t)??void 0)});function qj(e){return e.replace(/^attr([A-Z])/,(e,t)=>t.toLowerCase())}function Jj({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Yj({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Xj(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Zj(e){return e===void 0||e===1}function Qj({scale:e,scaleX:t,scaleY:n}){return!Zj(e)||!Zj(t)||!Zj(n)}var $j=[`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skewX`,`skewY`];function eM(e){return Qj(e)||nM(e)||tM(e)}function tM(e){return e.z||e.rotate||e.rotateX||e.rotateY||e.rotateZ||e.skewX||e.skewY}function nM(e){return rM(e.x)||rM(e.y)}function rM(e){return e&&e!==`0%`}function iM(e,t,n){return n+t*(e-n)}function aM(e,t,n,r,i){return i!==void 0&&(e=iM(e,i,r)),iM(e,n,r)+t}function oM(e,t=0,n=1,r,i){e.min=aM(e.min,t,n,r,i),e.max=aM(e.max,t,n,r,i)}function sM(e,{x:t,y:n}){oM(e.x,t.translate,t.scale,t.originPoint),oM(e.y,n.translate,n.scale,n.originPoint)}var cM=.999999999999,lM=1.0000000000001;function uM(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++)a=n[s],o=a.projectionDelta,a.options.visualElement?.props.style?.display!==`contents`&&(r===!0&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(dM(e.x,-a.scroll.offset.x),dM(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,sM(e,o)),r&&(r.path?.[s]||r)!==a&&eM(a.latestValues)&&mM(e,a.latestValues,a.layout?.layoutBox));t.x<lM&&t.x>cM&&(t.x=1),t.y<lM&&t.y>cM&&(t.y=1)}function dM(e,t){e.min+=t,e.max+=t}function fM(e,t,n,r,i=.5){oM(e,t,n,qE(e.min,e.max,i),r)}function pM(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function mM(e,t,n){let r=n??e;fM(e.x,pM(t.x,r.x),t.scaleX,t.scale,t.originX),fM(e.y,pM(t.y,r.y),t.scaleY,t.scale,t.originY)}function hM(e,t){return Jj(Xj(e.getBoundingClientRect(),t))}function gM(e,t,n){let r=hM(e,n),{scroll:i}=t;return i&&(dM(r.x,i.offset.x),dM(r.y,i.offset.y)),r}var _M=()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),vM={},yM=e=>Sj(e)?Kj:Fj,bM=class{constructor(e,t){this.effect=e,this.current=t,this.KeyframeResolver=fj}getValue(e){return this.effect.get(this.current,e)}readValue(e,t){return this.effect.read(this.current,e,t)}render(){this.effect.flush(this.current)}measureViewportBox(){return hM(this.current)}getProps(){return vM}};function xM(e,t,n,r){if(Cj.current?.track(e),r)return vj(e=>r.getValue(e,null),t,n,r);let i=yM(e);return yj(i,e,t,n,new bM(i,e))}var SM=Oj((e,t,n,r)=>t.set(n,r,()=>{e[n]=r.get()}),{test:e=>mT(e),read:(e,t)=>{let n=e[t];return typeof n==`string`||typeof n==`number`?n:void 0}}),{schedule:CM,cancel:wM}=pD(queueMicrotask,!1);function TM(e,t,n){let r=YA(e)?e:EA(e);return r.run(IA(``,r,t,n)),r.animation}var EM={},DM={value:null,addProjectionMetrics:null,countProjection:void 0};function OM(e,t){let n=JT.now();e=Tj(e);let r=({timestamp:i})=>{let a=i-n;a>=t&&(hD(r),e(a-t))};return mD.setup(r,!0),wj(()=>hD(r))}function kM(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function AM(e){return Sj(e)&&e.tagName===`svg`}function jM(e){return YA(e)?e.get():e}var MM=e=>typeof e==`number`?e:parseFloat(e),NM=pj.length,PM=e=>typeof e==`number`||yE.test(e);function FM(e,t,n,r,i,a){i?(e.opacity=qE(0,n.opacity??1,LM(r)),e.opacityExit=qE(t.opacity??1,0,RM(r))):a&&(e.opacity=qE(t.opacity??1,n.opacity??1,r));for(let i=0;i<NM;i++){let a=pj[i],o=IM(t,a),s=IM(n,a);(o!==void 0||s!==void 0)&&(o||=0,s||=0,o===0||s===0||PM(o)===PM(s)?(e[a]=Math.max(qE(MM(o),MM(s),r),0),(vE.test(s)||vE.test(o))&&(e[a]+=`%`)):e[a]=s)}for(let i=0;i<$j.length;i++){let a=$j[i];(t[a]||n[a])&&(e[a]=qE(t[a]||0,n[a]||0,r))}}function IM(e,t){return e[t]===void 0?e.borderRadius:e[t]}var LM=zM(0,.5,PT),RM=zM(.5,.95,_T);function zM(e,t,n){return r=>r<e?0:r>t?1:n(yT(e,t,r))}var BM=(e,t,{x:n,y:r})=>{let i=e*e+t*t;return i<1?0:-1e3*(n*e+r*t)/i},VM=(e,t=300)=>{let n=dT(.25,2,t/300),{stiffness:r,damping:i}=WD({...e,duration:e.duration&&xT(e.duration)});return{...e,stiffness:r,damping:i*Math.sqrt(n),mass:n}};function HM(e,t){e.min=t.min,e.max=t.max}function UM(e,t){HM(e.x,t.x),HM(e.y,t.y)}function WM(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var GM=.9999,KM=1.0001,qM=-.01,JM=.01;function YM(e){return e.max-e.min}function XM(e,t,n){return Math.abs(e-t)<=n}function ZM(e,t,n,r=.5){e.origin=r,e.originPoint=qE(t.min,t.max,e.origin),e.scale=YM(n)/YM(t),e.translate=qE(n.min,n.max,e.origin)-e.originPoint,(e.scale>=GM&&e.scale<=KM||isNaN(e.scale))&&(e.scale=1),(e.translate>=qM&&e.translate<=JM||isNaN(e.translate))&&(e.translate=0)}function QM(e,t,n,r){ZM(e.x,t.x,n.x,r?.originX),ZM(e.y,t.y,n.y,r?.originY)}function $M(e,t,n,r=0){e.min=(r?qE(n.min,n.max,r):n.min)+t.min,e.max=e.min+YM(t)}function eN(e,t,n,r){$M(e.x,t.x,n.x,r?.x),$M(e.y,t.y,n.y,r?.y)}function tN(e,t,n,r=0){let i=r?qE(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+YM(t)}function nN(e,t,n,r){tN(e.x,t.x,n.x,r?.x),tN(e.y,t.y,n.y,r?.y)}function rN(e,t,n,r,i){return e-=t,e=iM(e,1/n,r),i!==void 0&&(e=iM(e,1/i,r)),e}function iN(e,t=0,n=1,r=.5,i,a=e,o=e){if(vE.test(t)&&(t=parseFloat(t),t=qE(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=qE(a.min,a.max,r);e===a&&(s-=t),e.min=rN(e.min,t,n,s,i),e.max=rN(e.max,t,n,s,i)}function aN(e,t,[n,r,i],a,o){iN(e,t[n],t[r],t[i],t.scale,a,o)}var oN=[`x`,`scaleX`,`originX`],sN=[`y`,`scaleY`,`originY`];function cN(e,t,n,r){aN(e.x,t,oN,n?.x,r?.x),aN(e.y,t,sN,n?.y,r?.y)}var lN=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),uN=lN(`applewebkit/`)&&!lN(`chrome/`)?Math.round:_T;function dN(e){e.min=uN(e.min),e.max=uN(e.max)}function fN(e){dN(e.x),dN(e.y)}var pN=()=>({translate:0,scale:1,origin:0,originPoint:0}),mN=()=>({x:pN(),y:pN()}),hN=()=>({min:0,max:0}),gN=()=>({x:hN(),y:hN()});function _N(e){return e.translate===0&&e.scale===1}function vN(e){return _N(e.x)&&_N(e.y)}function yN(e,t){return e.min===t.min&&e.max===t.max}function bN(e,t){return yN(e.x,t.x)&&yN(e.y,t.y)}function xN(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function SN(e,t){return xN(e.x,t.x)&&xN(e.y,t.y)}function CN(e){return YM(e.x)/YM(e.y)}function wN(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var TN=class{constructor(){this.members=[]}add(e){lT(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(uT(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(uT(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}};function EN(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var DN={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if(yE.test(e))e=parseFloat(e);else return e}return`${EN(e,t.target.x)}% ${EN(e,t.target.y)}%`}},ON={borderRadius:Object.assign({},DN,{applyTo:pj.slice()}),borderTopLeftRadius:DN,borderTopRightRadius:DN,borderBottomLeftRadius:DN,borderBottomRightRadius:DN,boxShadow:{correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=UE.parse(e);if(i.length>5)return r;let a=UE.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=qE(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}}};function kN(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;(i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `);let s=``;if(n){let{transformPerspective:e}=n;e&&(r=`perspective(${e}px) ${r}`);for(let e=0;e<$j.length;e++){let t=$j[e],r=n[t];r&&(s+=`${t}(${r}deg) `),!e&&n.pathRotation&&(s+=`rotate(${n.pathRotation}deg) `)}}if(s){(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),r+=s;let n=e.x.scale*t.x,i=e.y.scale*t.y;(n!==1||i!==1)&&(r+=`scale(${n}, ${i})`)}else e.x.scale!==1||e.y.scale!==1?r+=`scale(${e.x.scale}, ${e.y.scale})`:!r&&(t.x!==1||t.y!==1)&&(r=`scale(1, 1)`);return r||`none`}function AN(e){return[e(`x`),e(`y`)]}var jN=(e,t)=>e.depth-t.depth,MN=class{constructor(){this.children=[],this.isDirty=!1}add(e){lT(this.children,e),this.isDirty=!0}remove(e){uT(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(jN),this.isDirty=!1,this.children.forEach(e)}},NN={hasAnimatedSinceResize:!0,hasEverUpdated:!1},PN=[`z`,`skew`,`skewZ`],FN=1e3,IN=0;function LN(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}var RN=e=>e.instance&&Wk.get(e.instance)?.demote()&&e.resetSkewAndRotation();function zN(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=$A(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,mD,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&zN(r)}function BN(e){if(e)return e.options.allowProjection===!1?BN(e.parent):e.projection}function VN({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return Object.assign(EM,{...ON,...EM}),class{static create(e,t,n){let{layoutId:r,layout:i,drag:a,dragConstraints:o,layoutScroll:s,layoutRoot:c,layoutAnchor:l,layoutCrossfade:u}=t,d=e.projection=new this(e.latestValues,t[`data-framer-portal-id`]?void 0:BN(e.parent));d.setOptions({layoutId:r,layout:i,alwaysMeasureLayout:!!a||o&&kM(o),visualElement:e,animationType:typeof i==`string`?i:`both`,initialPromotionConfig:n,crossfade:u,layoutScroll:s,layoutRoot:c,layoutAnchor:l});let f=d.getStack()?.lead;f&&!d.root.isUpdateBlocked()&&(f.willUpdate(),f.scheduleCheckAfterUnmount())}constructor(e={},n=t?.()){this.id=IN++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(WN),this.nodes.forEach(tP),this.nodes.forEach(nP),this.nodes.forEach(GN),DM.countProjection?.()},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new MN)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new bT),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){this.eventHandlers.get(e)?.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=Sj(t)&&!AM(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent?.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;mD.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n?.(),n=OM(i,250),NN.hasAnimatedSinceResize&&(NN.hasAnimatedSinceResize=!1,this.nodes.forEach(eP)))})}n&&this.root.registerSharedNode(n,this),this.addLayoutListener()}addLayoutListener(){let{layoutId:e,layout:t,visualElement:n,animate:r}=this.options;this.instance&&!this.hasLayoutListener&&r!==!1&&n&&(e||t)&&(this.hasLayoutListener=!0,this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:r,layout:i})=>{if(this.isAnimationBlocked){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||n.getDefaultTransition()||lP,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=n.getProps(),c=!this.targetLayout||!SN(this.targetLayout,i),l=!t&&r;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...OA(a,`layout`),onPlay:o,onComplete:s};(n.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||eP(this),this.isLead()&&this.options.onExitComplete?.();this.targetLayout=i}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),this.getStack()?.remove(this),this.parent?.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),this.hasLayoutListener=!1,hD(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes?.forEach(rP),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete?.();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&zN(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;RN(this),this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,RN(t),(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1),t.isAnimationBlocked&&(t.dragSnapshot||=t.measure(),this.dragAncestor=t)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(JN),this.nodes.forEach(qN);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(YN);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(ZN),this.nodes.forEach(QN),this.nodes.forEach($N),this.nodes.forEach(HN),this.nodes.forEach(UN)):this.nodes.forEach(YN),this.clearAllSnapshots();let e=JT.now();GT.delta=dT(0,1e3/60,e-GT.timestamp),GT.timestamp=e,GT.isProcessing=!0,gD.update.process(GT),gD.preRender.process(GT),gD.render.process(GT),GT.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,CM.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(KN),this.sharedNodes.forEach((e,t)=>e.members.length?e.removeLeadSnapshot():this.sharedNodes.delete(t))}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,mD.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){mD.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(!this.snapshot&&this.instance&&(this.snapshot=this.measure(),this.snapshot&&!YM(this.snapshot.measuredBox.x)&&!YM(this.snapshot.measuredBox.y)&&(this.snapshot=void 0),this.snapshot)){let{visualElement:e}=this.options,t=this.currentAnimation?.state===`running`,n=t&&this.animationEdges;t&&this.relativeTarget&&(this.snapshot.relativeVelocity=this.relativeVelocity?.slice()||[]);let r=n&&this.motionValue?.getVelocity()||0,i=[0,1,2,3,4,5].map(t=>(t<4?n&&(this.edgeValues?this.edgeVelocity(t):-n[t]*r/1e3):e?.getValue(t<5?`x`:`y`)?.getVelocity())||0);i.some(Boolean)&&(this.snapshot.velocity=i)}}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutCorrected||=gN(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t?.notify(`LayoutMeasure`,this.layout.layoutBox,e?.layoutBox)}updateScroll(e=`measure`){let{scroll:t,instance:i}=this,{animationId:a}=this.root;if(this.options.layoutScroll&&i&&!(t&&t.animationId===a&&t.phase===e)){let o=r(i);this.scroll={animationId:a,phase:e,isRoot:o,offset:n(i),wasRoot:t?t.isRoot:o}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout;e&&RN(this);let t=this.projectionDelta&&!vN(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||eM(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),fN(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return gN();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(fP))){let{scroll:e}=this.root;e&&(dM(t.x,e.offset.x),dM(t.y,e.offset.y))}return t}removeElementScroll(e){let t=gN();if(UM(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&UM(t,e),dM(t.x,i.offset.x),dM(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n,r,i=0){let a=n||gN();UM(a,e);for(let e=i;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(dM(a.x,-n.scroll.offset.x),dM(a.y,-n.scroll.offset.y)),eM(n.latestValues)&&mM(a,n.latestValues,n.layout?.layoutBox)}return!r&&eM(this.latestValues)&&mM(a,this.latestValues,this.layout?.layoutBox),a}removeTransform(e){let t=gN();UM(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!eM(n.latestValues))continue;let r;n.instance&&(Qj(n.latestValues)&&n.updateSnapshot(),r=gN(),UM(r,n.measurePageBox())),cN(t,n.latestValues,n.snapshot?.layoutBox,r)}return eM(this.latestValues)&&cN(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0||e.crossfade},this.addLayoutListener()}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==GT.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=GT.timestamp;let a=this.getClosestProjectingParent();!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target=gN(),this.targetWithTransforms=gN()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),eN(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target,!0):UM(this.target,this.layout.layoutBox),sM(this.target,this.targetDelta)):UM(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&(!a.resumingFrom==!this.resumingFrom||a.options.layoutRoot&&!a.resumingFrom)&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),DM.countProjection?.(1))}getClosestProjectingParent(){if(!(!this.parent||Qj(this.parent.latestValues)||nM(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=gN(),this.relativeTargetOrigin=gN(),nN(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),UM(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===GT.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent?.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;UM(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;uM(this.layoutCorrected,this.treeScale,this.path,t&&(e.relativeTarget&&!e.relativeParent.resumingFrom?e.relativeParent:!0)),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=gN());let{target:s}=e;s?(!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(WM(this.prevProjectionDelta.x,this.projectionDelta.x),WM(this.prevProjectionDelta.y,this.projectionDelta.y)),QM(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!wN(this.projectionDelta.x,this.prevProjectionDelta.x)||!wN(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),DM.countProjection?.(2)):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){this.options.visualElement?.scheduleRender(),e&&this.getStack()?.scheduleRender(),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=mN(),this.projectionDelta=mN(),this.projectionDeltaWithTransform=mN()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=mN();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=gN(),c=r?.source!==this.layout?.source,l=this.getStack(),u=!l||l.members.length<=1,d=!(!c||u||this.options.crossfade!==!0||this.path.some(cP));this.animationProgress=0;let f,p=n?.interpolateProjection(e),m=this.layout?.layoutBox,h=m&&[m.x.min,m.x.max,m.y.min,m.y.max].map((t,n)=>{let{translate:r,scale:i,originPoint:a}=e[n<2?`x`:`y`];return(t-a)*(i-1)+r});h?.every(isFinite)||(h=void 0),this.animationEdges=h,this.edgeValues=this.startVelocity=this.impulse=this.relativeVelocity=this.relativeStart=void 0;let g=r?.velocity,_=r?.relativeVelocity||g;if(_?.slice(0,4).some(Boolean)&&this.getClosestProjectingParent()&&(this.relativeStart=_),g&&h){let t=g.slice(0,4).map((e,t)=>e+(c?g[4+(t>>1)]:0));t.some(Boolean)&&(this.startVelocity=p?BM(e.x.translate,e.y.translate,{x:(t[0]+t[1])/2,y:(t[2]+t[3])/2}):t)}this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n),l=this.edgeValues;for(let t=0;t<2;t++){let r=t?`y`:`x`;l?iP(o[r],e[r],this.layout.layoutBox[r],l[t*2],l[t*2+1]):aP(o[r],e[r],n)}if(r&&(o.x.translate=r.x,o.y.translate=r.y),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){nN(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0);let e=this.relativeTargetOrigin,t=s;if(sP(this.relativeTarget,e,t,n),this.isSpringLayout){let e=this.relativeTarget,t=this.impulse||0,n=this.relativeStart,r=JT.now(),i=(r-this.relativeTime)/1e3;this.relativeTime=r;let a=this.relativeVelocity||=[0,0,0,0];for(let r=0;r<4;r++){let o=r<2?`x`:`y`,s=r&1?`max`:`min`;n&&(e[o][s]+=n[r]*t),f&&i>0&&(a[r]=(e[o][s]-f[o][s])/i)}}f&&bN(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=gN(),UM(f,this.relativeTarget)}c&&(this.animationValues=a,FM(a,i,this.latestValues,n,d,u)),r?.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`);let t=this.isSpringLayout=e.type===`spring`;this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.resumingFrom&&(this.resumingFrom.edgeValues=void 0),this.pendingAnimation&&=(hD(this.pendingAnimation),void 0),this.pendingAnimation=mD.update(()=>{NN.hasAnimatedSinceResize=!0,this.motionValue||=EA(0),this.motionValue.jump(0,!1);let n=this.startVelocity;this.startVelocity=void 0;let r=e,i=0;if(t){if(e.mass===`auto`){let t=this.layout?.layoutBox;r=VM(e,t&&Math.sqrt(YM(t.x)*YM(t.y)))}let t=this.relativeStart;if((n||t)&&!e.repeat){if(typeof n==`number`)i=n;else{let e=n&&this.animationEdges;r={...r,type:r=>{let i=[r.velocity,...n||[]].map((t,n)=>KD({...r,keyframes:n?[e[n-1],0]:r.keyframes,velocity:t})),a=i.length;t&&i.push(KD({...r,keyframes:[0,0],velocity:1e3,restDelta:.5,restSpeed:5}));let o=0,s=[],c={calculatedDuration:null,next:t=>{o=t;let n=i[0].next(t),r=n.done;for(let e=1;e<i.length;e++){let{value:n,done:o}=i[e].next(t);e<a?s[e-1]=n:this.impulse=n/1e3,r&&=o}return e&&(this.edgeValues=s),n.done=r,n}};return c.calculatedDuration=bD(c),c.next(0),this.edgeVelocity=e=>i[e+1].velocity(o),c}}}}}let a=TM(this.motionValue,[0,1e3],{...r,velocity:i,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}});this.currentAnimation=a,dO(this.currentAnimation,this),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=this.edgeValues=this.edgeVelocity=this.impulse=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.edgeValues=this.impulse=void 0,this.mixTargetDelta?.(FN),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,layout:n,latestValues:r}=e,{target:i}=e;if(t&&i&&n){if(this!==e&&this.layout&&n&&dP(this.options.animationType,this.layout.layoutBox,n.layoutBox)){let{layoutBox:e}=this.layout,t=i;i=this.target||gN(),uP(i.x,t.x,e.x),uP(i.y,t.y,e.y)}UM(t,i),mM(t,r),QM(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new TN),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?.transition,preserveFollowOpacity:n?.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){this.getStack()?.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){return this.getStack()?.relegate(this)||!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let{latestValues:t}=e;if(!tM(t))return;let n={};for(let t=0;t<PN.length;t++)LN(PN[t],e,n,this.animationValues);for(let t=0;t<$j.length;t++)LN($j[t],e,n,this.animationValues);e.render();for(let t in n)e.setStaticValue(t,n[t]),this.animationValues&&(this.animationValues[t]=n[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;let n=this.getLead();if(!this.isVisible&&n!==this){e.visibility=`hidden`;return}let r=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=jM(t?.pointerEvents)||``,e.transform=r?r(this.latestValues,``):`none`;return}if(!this.projectionDelta||!this.layout||!n.target){(this.options.layoutId||this.needsShow)&&(this.needsShow=!1,e.visibility=``,e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=jM(t?.pointerEvents)||``),this.hasProjected&&!eM(this.latestValues)&&(e.transform=r?r({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=n.animationValues||n.latestValues;this.applyTransformsToTarget();let a=kN(this.projectionDeltaWithTransform,this.treeScale,i);r&&(a=r(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,e.opacity=n.animationValues?n===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:n===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in EM){if(i[t]===void 0)continue;let{correct:r,applyTo:o,isCSSVariable:s}=EM[t],c=a===`none`?i[t]:r(i[t],n);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=n===this?jM(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=this.dragSnapshot=this.dragAncestor=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(qN),this.root.sharedNodes.clear()}}}function HN(e){e.updateLayout(),XN(e)}function UN(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source,o=(r,a)=>{if(i===`size`)AN(e=>{let t=YM(r[e]);r[e].min=a[e].min,r[e].max=r[e].min+t});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;HM(r[e],a[e])}else dP(i,t.layoutBox,n)&&AN(t=>{let n=YM(a[t]);r[t].max=r[t].min+n,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[t].max=e.relativeTarget[t].min+n)})},s=a?t.measuredBox:t.layoutBox;o(s,n);let c=mN();QM(c,n,t.layoutBox);let l=mN();QM(l,a?e.applyTransform(r,!0):n,s);let u=!vN(c),d=!1,f=e.getClosestProjectingParent();if((!a||f?.options.layoutRoot&&e.resumeFrom?.path.includes(f))&&f&&!f.resumeFrom){let{snapshot:r,layout:i}=f;if(r&&i){let s=e.options.layoutAnchor||void 0,c=gN();nN(c,a?e.resumeFrom.applyTransform(t.layoutBox,!0,void 0,!0,f.depth+1):t.layoutBox,r.layoutBox,s);let l=gN();nN(l,n,i.layoutBox,s),a&&o(c,l),SN(c,l)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=l,e.relativeTargetOrigin=c,e.relativeParent=f)}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:l,layoutDelta:c,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else e.isLead()&&e.options.onExitComplete?.();e.options.transition=void 0}function WN(e){DM.countProjection?.(0),e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function GN(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function KN(e){e.clearSnapshot()}function qN(e){e.clearMeasurements()}function JN(e){e.isLayoutDirty=!0,e.updateLayout()}function YN(e){e.isLayoutDirty=!1}function XN(e){let{snapshot:t,dragAncestor:n}=e,r=n?.isAnimationBlocked&&n.layout;if(!t||!r||e.resumeFrom||e.isAnimationBlocked)return;let i=n.dragSnapshot;AN(e=>dM(t.layoutBox[e],r.layoutBox[e].min-i.layoutBox[e].min))}function ZN(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.dragSnapshot||e.layout,e.isLayoutDirty=!0)}function QN(e){e.relativeTarget&&e.relativeParent?.isLayoutDirty&&(e.currentAnimation?e.isLayoutDirty=!0:(e.targetDelta=void 0,e.removeRelativeTarget()))}function $N(e){let{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function eP(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function tP(e){e.resolveTargetDelta()}function nP(e){e.calcProjection()}function rP(e){e.resetSkewAndRotation()}function iP(e,t,n,r,i){let a=n.max-n.min,o=a?Math.max(0,(a+i-r)/a):1,s=e.originPoint=t.originPoint;e.origin=t.origin,e.scale=o,e.translate=n.min+r-(s+(n.min-s)*o)}function aP(e,t,n){e.translate=qE(t.translate,0,n),e.scale=qE(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function oP(e,t,n,r){e.min=qE(t.min,n.min,r),e.max=qE(t.max,n.max,r)}function sP(e,t,n,r){oP(e.x,t.x,n.x,r),oP(e.y,t.y,n.y,r)}function cP(e){return e.animationValues?.opacityExit!==void 0}var lP={duration:.45,ease:[.4,0,.1,1]};function uP(e,t,n){e.max=YM(n)+(e.min=t.min)}function dP(e,t,n){return e===`position`||e===`preserve-aspect`&&!XM(CN(t),CN(n),.2)}function fP(e){return e!==e.root&&e.scroll?.wasRoot}function pP(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var mP=VN({attachResizeListener:(e,t)=>pP(e,`resize`,t),measureScroll:_M,checkIsScrollRoot:()=>!0}),hP={current:void 0},gP=VN({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!hP.current){let e=new mP({});e.mount(window),e.setOptions({layoutScroll:!0}),hP.current=e}return hP.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),_P=new WeakMap;function vP(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function yP(e){return typeof e==`string`||Array.isArray(e)}var bP=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`whilePinch`,`exit`],xP=[`initial`].concat(bP);function SP(e){if(vP(e.animate))return!0;for(let t=0;t<xP.length;t++)if(yP(e[xP[t]]))return!0;return!1}function CP(e){return!!(SP(e)||e.variants)}function wP(e,t,n){for(let r in t){let i=t[r],a=n[r];if(YA(i))e.addValue(r,i);else if(YA(a))e.addValue(r,EA(i,{owner:e}));else if(a!==i){if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,EA(t===void 0?i:t,{owner:e}))}}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var TP={current:null},EP={current:!1},DP=typeof window<`u`;function OP(){if(EP.current=!0,DP){if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>TP.current=e.matches;e.addEventListener(`change`,t),t()}else TP.current=!1}}var kP=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],AP={};function jP(e){AP=e}function MP(){return AP}var NP=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=ck,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=JT.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,mD.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=SP(t),this.isVariantNode=CP(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&YA(t)&&t.set(c[e])}}mount(e){let t=this.presenceContext;if(this.hasBeenMounted&&t?.isPresent!==!1&&!t?.keepValuesOnRemount)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];if(this.current=e,_P.set(e,this),this.projection?.instance||this.projection?.mount(e),this.isVariantNode&&!this.isControllingVariants){let e=this;do e=e.props.inherit!==!1&&e.parent;while(e&&!e.isVariantNode);if(e){let{variantChildren:t}=e;t.add(this),this.removeFromVariantTree=()=>t.delete(this)}}this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(EP.current||OP(),this.shouldReduceMotion=TP.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection?.unmount(),hD(this.notifyUpdate),hD(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree?.(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),(this.enteringChildren||=new Set).add(e)}removeChild(e){this.children.delete(e),this.enteringChildren?.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.get(e)?.(),t.accelerate&&Ak.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new xk({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:xT(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=WO.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&mD.preRender(this.notifyUpdate),n&&(this.projection&&(this.projection.isTransformDirty=!0),Wk.get(this.current)?.check()),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i?.()})}sortNodePosition(e){return!this.current||!e.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in AP){let t=AP[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):gN()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){let{transformTemplate:n,onUpdate:r}=this.props;(e.transformTemplate||n)&&this.scheduleRender(),(e.transformTemplate&&!n||e.onUpdate&&!r)&&Wk.get(this.current)?.demote(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<kP.length;t++){let n=kP[t];this.propEventSubscriptions[n]?.(),delete this.propEventSubscriptions[n];let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=wP(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue?.()}getProps(){return this.props}getVariant(e){return this.props.variants?.[e]}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}addValue(e,t){let n=this.values.get(e);if(t!==n){n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t);let r=t.get();r!==void 0&&(this.latestValues[e]=r)}}removeValue(e){this.values.delete(e),this.valueSubscriptions.get(e)?.(),this.valueSubscriptions.delete(e),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){let n=this.props.values?.[e];return n||(n=this.values.get(e),n===void 0&&t!==void 0&&(n=EA(t??this.getDefaultValue?.(e),{owner:this}),this.addValue(e,n)),n)}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(pT(n)||hT(n))?n=parseFloat(n):typeof n!=`number`&&!UE.test(n)&&UE.test(t)&&(n=AO(e,t)),this.setBaseTarget(e,YA(n)?n.get():n)),YA(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}on(e,t){return(this.events[e]||(this.events[e]=new bT)).add(t)}notify(e,...t){this.events[e]?.notify(...t)}scheduleRenderMicrotask(){CM.render(this.render)}},PP=class extends NP{constructor(){super(...arguments),this.KeyframeResolver=fj}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;YA(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function FP(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function IP(e,{layout:t,layoutId:n}){return WO.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!EM[e]||e===`opacity`)}function LP(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(YA(r[t])||i&&YA(i[t])||IP(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function RP(e){return window.getComputedStyle(e)}var zP=class extends PP{constructor(){super(...arguments),this.type=`html`,this.renderInstance=FP}mount(e){super.mount(e)}readValueFromInstance(e,t){if(WO.has(t))return this.projection?.isProjecting?BO(t):HO(e,t);{let n=RP(e),r=(ZT(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return hM(e,t)}build(e,t,n){Lj(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return LP(e,t,n)}},BP=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1;function VP(e){return{point:{x:e.pageX,y:e.pageY}}}var HP=e=>t=>BP(t)&&e(t,VP(t));function UP(e,t,n,r){return pP(e,t,HP(n),r)}var WP=new WeakMap,GP,KP=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:Sj(r)&&`getBBox`in r?r.getBBox()[t]:r[n],qP=KP(`inline`,`width`,`offsetWidth`),JP=KP(`block`,`height`,`offsetHeight`);function YP({target:e,borderBoxSize:t}){WP.get(e)?.forEach(n=>{n(e,{get width(){return qP(e,t)},get height(){return JP(e,t)}})})}function XP(e){e.forEach(YP)}function ZP(){typeof ResizeObserver<`u`&&(GP=new ResizeObserver(XP))}function QP(e,t){GP||ZP();let n=Ej(e);return n.forEach(e=>{let n=WP.get(e);n||(n=new Set,WP.set(e,n)),n.add(t),GP?.observe(e)}),()=>{n.forEach(e=>{let n=WP.get(e);n?.delete(t),n?.size||GP?.unobserve(e)})}}var $P=new Set,eF;function tF(){eF=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};$P.forEach(t=>t(e))},window.addEventListener(`resize`,eF)}function nF(e){return $P.add(e),eF||tF(),()=>{$P.delete(e),!$P.size&&typeof eF==`function`&&(window.removeEventListener(`resize`,eF),eF=void 0)}}function rF(e,t){return wj(typeof e==`function`?nF(e):QP(e,t))}var iF=(e,t)=>Math.abs(e-t);function aF(e,t){let n=iF(e.x,t.x),r=iF(e.y,t.y);return Math.sqrt(n**2+r**2)}var oF=new Set([`auto`,`scroll`]),sF=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o,immediate:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=lF(this.lastRawMoveEventInfo,this.transformPagePoint));let e=dF(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=aF(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e;this.history.push({...r,timestamp:JT.now()});let{onStart:i,onMove:a}=this.handlers;t||(i?.(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a?.(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.handleScroll(window),this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=lF(t,this.transformPagePoint),this.hasPendingMove=!0,mD.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.hasPendingMove&&this.updatePoint(),this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i?.(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=dF(e.type===`pointercancel`?this.lastMoveEventInfo:lF(t,this.transformPagePoint),this.history);this.startEvent&&n?.(e,a),r?.(e,a)},!BP(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=s?0:a,this.contextWindow=r||window;let c=VP(e),l=lF(c,this.transformPagePoint),{point:u}=l;this.history=[{...u,timestamp:JT.now()}];let{onSessionStart:d}=t;d&&d(e,dF(l,this.history));let f={passive:!0,capture:!0};this.removeListeners=vT(UP(this.contextWindow,`pointermove`,this.handlePointerMove,f),UP(this.contextWindow,`pointerup`,this.handlePointerUp,f),UP(this.contextWindow,`pointercancel`,this.handlePointerUp,f)),o&&this.startScrollTracking(o),s&&(this.handlePointerMove(e,c),this.updatePoint())}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(oF.has(e.overflowX)||oF.has(e.overflowY))&&this.scrollPositions.set(t,cF(t)),t=t.parentElement}this.scrollPositions.set(window,cF(window)),this.removeScrollListeners=vT(pP(window,`scroll`,this.onElementScroll,{capture:!0}),pP(window,`scroll`,this.onWindowScroll,{}))}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=cF(e),i={x:r.x-t.x,y:r.y-t.y};(i.x!==0||i.y!==0)&&(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),mD.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners?.(),this.removeScrollListeners?.(),this.scrollPositions.clear(),hD(this.updatePoint)}},cF=e=>e===window?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop};function lF(e,t){return t?{point:t(e.point)}:e}function uF(e,t){return{x:e.x-t.x,y:e.y-t.y}}function dF({point:e},t){return{point:e,delta:uF(e,pF(t)),offset:uF(e,fF(t)),velocity:mF(t,.1)}}function fF(e){return e[0]}function pF(e){return e[e.length-1]}function mF(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=pF(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>xT(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>xT(t)*2&&(r=e[1]);let a=ST(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}var hF=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function gF(e){return hF.has(e.tagName)||e.isContentEditable===!0}var _F=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function vF(e){return _F.has(e.tagName)||e.isContentEditable===!0}var yF={x:!1,y:!1};function bF(){return yF.x||yF.y}function xF(e){return e===`x`||e===`y`?yF[e]?null:(yF[e]=!0,()=>{yF[e]=!1}):yF.x||yF.y?null:(yF.x=yF.y=!0,()=>{yF.x=yF.y=!1})}function SF(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?qE(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?qE(n,e,r.max):Math.min(e,n)),e}function CF(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function wF(e,{top:t,left:n,bottom:r,right:i}){return{x:CF(e.x,n,i),y:CF(e.y,t,r)}}function TF(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function EF(e,t){return{x:TF(e.x,t.x),y:TF(e.y,t.y)}}function DF(e,t){let n=.5,r=YM(e),i=YM(t);return i>r?n=yT(t.min,t.max-r,e.min):r>i&&(n=yT(e.min,e.max-i,t.min)),dT(0,1,n)}function OF(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var kF=.35;function AF(e=kF){return e===!1?e=0:e===!0&&(e=kF),{x:jF(e,`left`,`right`),y:jF(e,`top`,`bottom`)}}function jF(e,t,n){return{min:MF(e,t),max:MF(e,n)}}function MF(e,t){return typeof e==`number`?e:e[t]||0}function NF(e){let t=``;for(let n of e.path){n.scroll=void 0,n.updateScroll();let{scroll:r}=n;n!==e.root&&r&&(t+=r.offset.x+`,`+r.offset.y+`,`)}return t}var PF=new WeakMap,FF=class{constructor(e,t=()=>e.getProps()){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=gN(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e,this.readProps=t}start(e,t={}){if(this.visualElement.presenceContext?.isPresent===!1)return;let n=e=>{t.snapToCursor&&this.snapToCursor(e),this.stopAnimation()},r=(e,t)=>{let{drag:n,dragConstraints:r,dragPropagation:i,onDragStart:a}=this.getProps();if(n&&!i&&(this.openDragLock?.(),this.openDragLock=xF(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints();let{projection:o}=this.visualElement;o&&(o.isAnimationBlocked=!0,o.target=void 0),AN(e=>{let t=this.getAxisMotionValue(e).get()||0;if($T(t)&&(t=zA(t,this.visualElement.current)||0),yE.test(t))t=parseFloat(t);else if(vE.test(t)){let n=o?.layout?.layoutBox[e];n&&(t=YM(n)*(parseFloat(t)/100))}this.originPoint[e]=t}),this.point=typeof r==`function`&&r(this),a&&mD.update(()=>a(e,t),!1,!0),ZA(this.visualElement,`transform`),this.visualElement.animationState?.setActive(`whileDrag`,!0)},i=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){if(this.currentDirection=VF(o),this.currentDirection===null)return;i&&i(this.currentDirection)}this.updateAxis(`x`,o),this.updateAxis(`y`,o),this.point&&this.point.move(),this.visualElement.render(),a&&mD.update(()=>a(e,t),!1,!0)},a=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},o=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints||this.point)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:s}=this.getProps();this.panSession=new sF(e,{onSessionStart:n,onStart:r,onMove:i,onSessionEnd:a,resumeAnimation:o},{...t,transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:s,contextWindow:this.visualElement.current?.ownerDocument.defaultView,element:this.visualElement.current})}stop(e,t,n){let r=e||this.latestPointerEvent,i=t||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!i||!r)return;let{velocity:o}=i;this.startAnimation(o,n);let{onDragEnd:s}=this.getProps();s&&mD.postRender(()=>s(r,i))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession(),!this.getProps().dragPropagation&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t?.setActive(`whileDrag`,!1)}endPanSession(){this.panSession?.end(),this.panSession=void 0}updateAxis(e,t){let{drag:n}=this.readProps();if(!t||!BF(e,n,this.currentDirection))return;let r=this.getAxisMotionValue(e),i=this.originPoint[e]+t[e],a=this.constraints&&this.constraints[e];a&&(i=SF(i,a,this.elastic[e])),this.point?this.point[e]=i:r.set(i)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),{projection:n}=this.visualElement,r=n&&(n.layout||n.measure(!1)),i=this.constraints;IF(e)?(!this.constraints||this.scroll!==NF(n))&&(this.constraints=this.resolveRefConstraints()):this.constraints=e&&r&&typeof e==`object`?wF(r.layoutBox,e):!1,this.elastic=AF(t),i!==this.constraints&&!IF(e)&&r&&this.constraints&&!this.hasMutatedConstraints&&AN(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=OF(r.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!IF(e))return!1;let n=LF(e),{projection:r}=this.visualElement;if(!r||!r.layout)return!1;this.scroll=NF(r);let i=gM(n,r.root,this.visualElement.getTransformPagePoint()),a=EF(r.layout.layoutBox,r.removeElementScroll(i));if(t){let e=t(Yj(a));this.hasMutatedConstraints=!!e,e&&(a=Jj(e))}return a}startAnimation(e,t){let{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),c={bounceStiffness:i?200:1e6,bounceDamping:i?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...a},l=i=>r&&!(this.point&&o)&&BF(i,t||n,this.currentDirection)?e[i]:0;if(this.point&&!o)return this.point.release({x:l(`x`),y:l(`y`)},c).then(s);let u=this.constraints||{},d=AN(e=>{if(!BF(e,t||n,this.currentDirection))return;let r=u[e]||{};(o===!0||o===e)&&(r={min:0,max:0});let i={type:`inertia`,velocity:l(e),...c,...r};return this.startAxisValueAnimation(e,i)});return Promise.all(d).then(s)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return ZA(this.visualElement,e),n.start(IA(e,n,0,t,this.visualElement,!1))}stopAnimation(){AN(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.readProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor({clientX:e,clientY:t}){let{drag:n}=this.getProps(),r={x:e,y:t},i=this.visualElement.getTransformPagePoint()?.(r)||r,a=this.visualElement.measureViewportBox();AN(e=>{if(!BF(e,n,this.currentDirection))return;let t=this.getAxisMotionValue(e),{min:r,max:o}=a[e];t.set((t.get()||0)+i[e]-qE(r,o,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!IF(t)||!n||!this.constraints)return;this.stopAnimation();let r=this.constraints,i={x:0,y:0};AN(e=>{let t=this.getAxisMotionValue(e).get();i[e]=DF({min:t,max:t},r[e])});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},``):`none`,n.root?.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),AN(t=>{let n=this.getAxisMotionValue(t);if(!BF(t,e,null)||!n.get())return;let{min:r,max:a}=this.constraints[t];n.set(qE(r,a,i[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;PF.set(this.visualElement,this);let e=this.visualElement.current,t=UP(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&vF(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps(),r=IF(t)&&LF(t);r&&(this.constraints=this.resolveRefConstraints(),n||=zF(e,r,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i.layout||(i.root?.updateScroll(),i.updateLayout()),mD.read(r);let o=pP(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(AN(t=>{if(!BF(t,this.getProps().drag,this.currentDirection))return;let n=this.getAxisMotionValue(t);this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate)}),this.visualElement.render())}));return()=>{o(),t(),a(),s(),n?.()}}getProps(){let e=this.readProps(),{dragElastic:t=kF,dragMomentum:n=!0}=e;return{...e,dragElastic:t,dragMomentum:n}}};function IF(e){return!!e&&typeof e==`object`&&(`current`in e||`nodeType`in e)}var LF=e=>`current`in e?e.current:e;function RF(e){let t=!0;return()=>{t?t=!1:e()}}function zF(e,t,n){let r=rF(e,RF(n)),i=rF(t,RF(n));return()=>{r(),i()}}function BF(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function VF(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}function HF(e,t){let n=Ej(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},wj(()=>r.abort())]}function UF(e){return!(e.pointerType===`touch`||bF())}function WF(e,t,n={}){t=Tj(t);let[r,i,a]=HF(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{e.pointerType!==`touch`&&(n?r=!0:s(e))};e.addEventListener(`pointerenter`,n=>{if(!UF(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var GF=(e,t)=>t?e===t||GF(e,t.parentElement):!1,KF=new WeakSet;function qF(e){return t=>{t.key===`Enter`&&e(t)}}function JF(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var YF=(e,t)=>{let n=!1,r=qF(()=>{n||KF.has(e)||(n=!0,JF(e,`down`))}),i=qF(()=>{n&&(n=!1,JF(e,`up`))});e.addEventListener(`keydown`,r,t),e.addEventListener(`keyup`,i,t),e.addEventListener(`blur`,()=>{e.removeEventListener(`keydown`,r),e.removeEventListener(`keyup`,i),n&&JF(e,`cancel`)},{...t,once:!0})};function XF(e){return BP(e)&&!bF()}var ZF=new WeakSet,QF=100,$F=8,eI=(e,t,n)=>Math.hypot(e.clientX-t.clientX,e.clientY-t.clientY)>n,tI=e=>e.preventDefault();function nI(e,t,n={}){t=Tj(t);let[r,i,a]=HF(e,n),o=new WeakMap,s=e=>{let r=e.currentTarget;if(!XF(e)||ZF.has(e))return;n.stopPropagation&&ZF.add(e);let{count:a=1,countTimeout:s=.3,hold:c=0,repeat:l}=n,u=JT.now(),d=xT(c),f=xT(s),p=o.get(r);p?.expire(eI(p.event,e,QF))?p=void 0:p&&(hD(p.expire),o.delete(r));let m=p?p.count+1:1,h=m>=a,g=h&&(c||l),_=!c,v=0,y;if(KF.add(r),p)y=p.handlers;else{let n=t(r,e);y=typeof n==`function`?{onComplete:n}:n||{}}h&&_&&y.onActive?.();let b=xT(l),x=d||b,S=u+x,C=!0,w=()=>{if(i.signal.aborted)return hD(w);let e=Math.min(1-(S-JT.now())/x,1);C&&e<1&&(e=0),C=!1,y.onHold?.(e),!(e<1)&&(_?y.onRepeat?.(++v):(_=!0,y.onActive?.()),l?(C=!0,S+=x=b):hD(w))},T={...i,capture:!0},E=(t,n)=>{if(BP(t)){if(window.removeEventListener(`pointerup`,D,T),window.removeEventListener(`pointercancel`,O,T),window.removeEventListener(`pointermove`,k,T),r.removeEventListener(`contextmenu`,tI),hD(w),KF.delete(r),bF()&&(n=!1),n&&!h){let n=JT.now(),a=e=>{let s=i.signal.aborted;if(s||e===!0||JT.now()-n>f)return hD(a),o.delete(r),s||y.onComplete?.(t,{success:!1}),!0};o.set(r,{count:m,event:e,handlers:y,expire:a}),mD.update(a,!0)}else y.onComplete?.(t,{success:n&&_})}},D=e=>{E(e,r===window||r===document||n.useGlobalTarget||GF(r,e.target))},O=e=>{E(e,!1)},k=t=>{BP(t)&&((l||!_)&&eI(e,t,$F)||a>1&&bF())&&O(t)};window.addEventListener(`pointerup`,D,T),window.addEventListener(`pointercancel`,O,T),(g||a>1)&&window.addEventListener(`pointermove`,k,T),g&&(mD.update(w,!0),r.addEventListener(`contextmenu`,tI,{...i,passive:!1}))};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,s,i),xj(e)&&(e.addEventListener(`focus`,()=>YF(e,i),i),!gF(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function rI(...e){let t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],i=e[1+n],a=e[2+n],o=e[3+n],s=YD(i,a,o);return t?s(r):s}var iI=new Set,aI=({timestamp:e})=>{iI.forEach(t=>t.tick(e))},oI=class extends fO{constructor(e){super(),this.state=`idle`,this.startTime=0,this.currentTime=0,this.started=!1,this.hasNextTarget=!1,this.nextTarget=0,this.stop=()=>{this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.factory=e.type,this.generator=this.factory(e);let{driver:t}=e;t&&(this.driver=t(e=>this.tick(e))),this.startTime=this.now(),this.state=`running`,this.driver?this.driver.start():(iI.size||mD.update(aI,!0),iI.add(this))}setTarget(e,t){this.nextTarget=e,this.nextVelocity=t,this.hasNextTarget=!0}retarget(e,t){let{options:n,generator:r}=this;n.keyframes=e,n.velocity=t,this.startTime=this.now(),this.currentTime=0,r.retarget?r.retarget(e,t):this.generator=this.factory(n)}tick(e){let{options:t,hasNextTarget:n}=this,{delay:r=0,onUpdate:i,onPlay:a}=t;this.started||(this.startTime=cO(this.startTime,e));let o=Math.round(e-this.startTime)-r,s=this.currentTime=Math.max(0,o),c=this.generator.next(s),l=o<0?t.keyframes[0]:c.value;if(n){this.hasNextTarget=!1;let{keyframes:e}=t;e[0]=l,e[1]=this.nextTarget,this.retarget(e,this.nextVelocity??this.getGeneratorVelocity())}(n||!this.started)&&(this.started=!0,a?.()),this.state===`running`&&(i?.(l),c.done&&o>=0&&!n&&!this.hasNextTarget&&this.state===`running`&&(this.notifyFinished(),this.teardown(),this.state=`finished`,t.onComplete?.()))}getGeneratorVelocity(){return rO(this.generator,this.currentTime,this.options.velocity)}now(){return this.driver?this.driver.now():JT.now()}teardown(){this.state=`idle`,this.driver?this.driver.stop():(iI.delete(this),iI.size||hD(aI))}};function sI(e,t,n){let r=e.get(),i=null,a,o=typeof r==`string`?r.replace(/[\d.-]/g,``):void 0,s=e=>a(o?e+o:e),c=()=>e.events.animationStart?.notify(),l=()=>{i&&=(i.stop(),null),e.animation=void 0};if(e.attach((t,r)=>{a=r;let o=MM(t);if(i?.state===`running`){i.setTarget(o,n.velocity);return}let u=MM(e.get()),d=i?i.getGeneratorVelocity():e.getVelocity();if(l(),u===o)return;let f=i=new oI({keyframes:[u,o],velocity:d,restDelta:.001,restSpeed:.01,...n,onUpdate:s,onPlay:c});e.animation=f,f.then(()=>{i===f&&(i=null,e.animation=void 0,e.events.animationComplete?.notify())})},l),YA(t)){let r=n.skipInitialAnimation===!0,i=t=>{r?(r=!1,e.jump(cI(t,o),!1)):e.set(cI(t,o))},a=t.on(`change`,i),s=t.get();MM(s)-MM(e.get())&&i(s);let c=e.on(`destroy`,a);return()=>{a(),c(),l()}}return l}function cI(e,t){return t?e+t:e}function lI(e,t,n){return sI(e,t,{...n,type:KD})}var uI=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},dI=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]),fI=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function pI(e,t,n,r){FP(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(dI.has(n)?n:Ij(n),t.attrs[n])}function mI(e,t,n){let r=LP(e,t,n);for(let n in e)if(n!==`children`&&(YA(e[n])||YA(t[n]))){let t=UO.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var hI=class extends PP{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=gN}getBaseTargetFromProps(e,t){return WO.has(t)?super.getBaseTargetFromProps(e,t)??BO(t):e[t]}getDefaultValue(e){return WO.has(e)?this.latestValues[e]??BO(e):void 0}readValueFromInstance(e,t){if(WO.has(t)){let e=TO(t);return e&&e.default||0}if(Vj.includes(t)){let n=getComputedStyle(e)[t];if(typeof n==`string`&&n)return n.trim()}return t=dI.has(t)?t:Ij(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return mI(e,t,n)}build(e,t,n){Hj(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){pI(e,t,n,r)}mount(e){this.isSVGTag=fI(e.tagName),super.mount(e)}};function gI(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var _I=[...bP].reverse(),vI=e=>e?.out===!0?e:e?.out;function yI(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>ij(e,t,n))),n=xI(),r=!0,i=!1;function a(a){let{props:o,parent:s,manuallyAnimateOnMount:c}=e,{initial:l}=o,u=r||i,d=[],f=(t=l)=>typeof t!=`boolean`&&HA(e,Array.isArray(t)?t[0]:t,e.presenceContext?.custom)||void 0,p=new Map,m={},h=1/0,g=e;do g=g.props.inherit!==!1&&g.parent;while(g&&!g.isControllingVariants);let _=u&&vI(f(l??(g&&g.props.initial))?.transition);if(_I.forEach((t,r)=>{let i=n[t],l=o[t],f=g&&g.props[t],v=l===void 0?yP(f)||f===!1?f:void 0:l,y=yP(v),b=t===a?i.isActive:null,x=y&&l===void 0&&!(u&&c);if(i.protectedKeys={...m},!i.isActive&&b===null||!v&&!i.prevProp||vP(v)||typeof v==`boolean`)return;if(b===!1&&(h=r),t===`exit`&&i.isActive&&b!==!0){m={...m,...i.prevResolvedValues};return}let S=bI(i.prevProp,v),C=S||y&&(b&&!x||r>h),w=!1,T=Array.isArray(v)?v:[v],E={},D;if(b!==!1)for(let n of T){let{transition:r,transitionEnd:i,...a}=HA(e,n,UA(e,t))||{};E={...E,...a,...i},D=vI(r)||D}let{prevResolvedValues:O}=i;for(let t in{...O,...E}){if(t in m)continue;let n=E[t],r=O[t],a=Array.isArray(n)&&Array.isArray(r)?!gI(n,r)||S:n!==r,o;if(a&&n==null)p.has(t)||p.set(t,i.prevOut);else if(a||n!==void 0&&p.has(t)){C=!0,o=p.get(t)||_,p.delete(t)&&(w=!0),i.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)}else i.protectedKeys[t]=!0;i.out[t]=o}if(i.prevProp=v,i.prevResolvedValues=E,i.prevOut=D,i.isActive&&(m={...m,...E}),C&&(!(x&&S)||w))for(let n of T){let r={type:t};if(typeof n==`string`&&u&&c&&s?.enteringChildren){let t=HA(s,n)?.transition?.delayChildren;r.delay=xA(s.enteringChildren,e,t)}d.push({animation:n,options:r})}}),p.size){let t={},n=f(),r=n?.transition;p.forEach((i,a)=>{i&&(r={...r||e.getDefaultTransition(),[a]:i});let s=e.getValue(a);s&&(s.liveStyle=!0);let c=n&&!Array.isArray(l)?n[a]:void 0,u=e.getBaseTargetFromProps(o,a);t[a]=(c===void 0?u!==void 0&&!YA(u)?u:e.initialValues[a]===void 0?e.baseTarget[a]:void 0:c)??null}),r&&(t.transition=r),d.push({animation:t})}let v=u&&e.blockInitialAnimation||r&&!c&&(o.initial===!1||o.initial===o.animate);return r=i=!1,!v&&d.length?t(d):Promise.resolve()}function o(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=a(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:a,setActive:o,setAnimateFunction:n=>{t=n(e)},getState:()=>n,reset:()=>{n=xI(),i=!0}}}function bI(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!gI(t,e):!1}function xI(){let e={};for(let t of bP)e[t]={isActive:t===`animate`,protectedKeys:{},needsAnimating:{},prevResolvedValues:{},out:{}};return e}var SI=(0,v.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function CI(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function wI(...e){return t=>{let n=!1,r=e.map(e=>{let r=CI(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():CI(e[t],null)}}}}function TI(...e){return v.useCallback(wI(...e),e)}var EI=e=>{let{width:t,height:n}=e?.getBoundingClientRect()||{};return[t/e?.offsetWidth||1,n/e?.offsetHeight||1]},DI=e=>{let{left:t,top:n}=e.getBoundingClientRect(),r=e;for(;r=r.parentElement||r.parentNode?.host;){let{scrollLeft:e,scrollTop:i}=r;if(e||i){let[a,o]=EI(r);t+=e*a,n+=i*o}if(getComputedStyle(r).position===`fixed`)break}let[i,a]=EI(e.offsetParent);return[t/i,n/a]},OI=class extends v.Component{getSnapshotBeforeUpdate(e){let t=this.props.getElement();if(xj(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=xj(e)&&e.offsetWidth||0,r=xj(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=i.direction,a.point=DI(t)}return null}componentDidUpdate(){}render(){return this.props.children}};function kI({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a,popNode:o}){let s=(0,v.useId)(),c=(0,v.useRef)(null),l=(0,v.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:`ltr`}),{nonce:u}=(0,v.useContext)(SI),d=TI(c,a===!1?void 0:e.props?.ref??e?.ref),f=()=>c.current||o?.current?.current,p=e=>{let{width:t,height:i,top:a,left:o,right:c,bottom:u,direction:d}=l.current,f=d===`rtl`,p=n===`left`?f?`right:${c}`:`left:${o}`:f?`left:${o}`:`right:${c}`,m=r===`bottom`?`bottom:${u}`:`top:${a}`;e?.insertRule(`[data-motion-pop-id="${s}"]{position:absolute!important;width:${t}px!important;height:${i}px!important;${p}px!important;${m}px!important}`)};return(0,v.useInsertionEffect)(()=>{let{width:e,height:n}=l.current,r=f();if(t||a===!1||!r||!e||!n)return;r.dataset.motionPopId=s;let o=r.ownerDocument,c=o.createElement(`style`);u&&(c.nonce=u);let d=i??o.head;d.appendChild(c),p(c.sheet);let m=0,h=0;return CM.setup(()=>{let[e,t]=DI(r);m=l.current.point[0]-e,h=l.current.point[1]-t}),CM.read(()=>{let{sheet:e}=c;if(!e||!m&&!h)return;let t=l.current;t.left+=m,t.right-=m,t.top+=h,t.bottom-=h,e.deleteRule(0),p(e)}),()=>{r.removeAttribute(`data-motion-pop-id`),d.contains(c)&&d.removeChild(c)}},[t]),(0,S.jsx)(OI,{isPresent:t,getElement:f,sizeRef:l,pop:a,children:a===!1?e:v.cloneElement(e,{ref:d})})}var AI=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=oT(jI),d=(0,v.useId)(),f=(0,v.useRef)(),p=(0,v.useRef)(n),m=(0,v.useRef)(r);sT(()=>{p.current=n,m.current=r});let h=!0,g=(0,v.useMemo)(()=>(h=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:e=>{u.set(e,!0);for(let e of u.values())if(!e)return;r&&r()},register:(e,t)=>(u.set(e,!1),t&&t.parent?.presenceContext?.id!==d&&(f.current=t),()=>{u.delete(e),!p.current&&!u.size&&m.current?.()})}),[n,u,r]);return a&&h&&(g={...g}),(0,v.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),v.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,S.jsx)(kI,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,popNode:f,children:e}),(0,S.jsx)(cT.Provider,{value:g,children:e})};function jI(){return new Map}function MI(e=!0){let t=(0,v.useContext)(cT);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,v.useId)();(0,v.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,v.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var NI=e=>e.key||``;function PI(e){let t=[];return v.Children.forEach(e,e=>{(0,v.isValidElement)(e)&&t.push(e)}),t}var FI=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,anchorY:c=`top`,root:l})=>{let[u,d]=MI(o),f=(0,v.useMemo)(()=>PI(e),[e]),p=o&&!u?[]:f.map(NI),m=(0,v.useRef)(!0),h=oT(()=>new Map),g=(0,v.useRef)(new Set),[_,y]=(0,v.useState)(f),[b,x]=(0,v.useState)(f);sT(()=>{o&&!u&&!b.length&&d?.()},[u,o,b.length,d]);let C=(0,v.useRef)();(0,v.useEffect)(()=>()=>{let e=C.current;C.current=void 0,e?.()},[b]),sT(()=>{m.current=!1;for(let e=0;e<b.length;e++){let t=NI(b[e]);p.includes(t)?(h.delete(t),g.current.delete(t)):h.get(t)!==!0&&h.set(t,!1)}},[b,p.length,p.join(`-`)]);let w=[];if(f!==_){let e=[...f],t=0;for(let n of b){let r=p.indexOf(NI(n));r===-1?(e.splice(t++,0,n),w.push(n)):t=r+w.length+1}return w.every(e=>h.get(NI(e)))?e=f:a===`wait`&&(e=w),x(PI(e)),y(f),null}let{forceRender:T}=(0,v.useContext)(aT);return(0,S.jsx)(S.Fragment,{children:b.map(e=>{let _=NI(e),v=o&&!u?!1:f===b||p.includes(_);return(0,S.jsx)(AI,{isPresent:v,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:l,onExitComplete:v?void 0:()=>{if(g.current.has(_))return;if(h.has(_))g.current.add(_),h.set(_,!0);else return;let e=!0;h.forEach(t=>{t||(e=!1)}),e&&(T?.(),y([]),o&&d?.(),C.current=r)},anchorX:s,anchorY:c,children:e},_)})})},II=(0,v.createContext)({strict:!1}),LI={animation:[`variants`,...bP],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},RI=!1;function zI(){if(RI)return;let e={};for(let t in LI)e[t]={isEnabled:e=>LI[t].some(t=>!!e[t])};jP(e),RI=!0}function BI(){return zI(),MP()}function VI(e){let t=BI();for(let n in e)t[n]={...t[n],...e[n]};jP(t)}var HI=(0,v.createContext)({});function UI(e,t){if(SP(e)){let{initial:t,animate:n}=e;return{initial:t===!1||yP(t)?t:void 0,animate:yP(n)?n:void 0}}return e.inherit===!1?{}:t}function WI(e){let{initial:t,animate:n}=UI(e,(0,v.useContext)(HI));return(0,v.useMemo)(()=>({initial:t,animate:n}),[GI(t),GI(n)])}function GI(e){return Array.isArray(e)?e.join(` `):e}var KI=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function qI(e,t,n){for(let r in t)!YA(t[r])&&!IP(r,n)&&(e[r]=t[r])}function JI({transformTemplate:e},t){return(0,v.useMemo)(()=>{let n=KI();return Lj(n,t,e),Object.assign({},n.vars,n.style)},[t])}function YI(e,t){let n=e.style||{},r={};return qI(r,n,e),Object.assign(r,JI(e,t)),r}function XI(e,t){let n={},r=YI(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var ZI=()=>({...KI(),attrs:{}});function QI(e,t,n,r){let i=(0,v.useMemo)(()=>{let n=ZI();return Hj(n,t,fI(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};return qI(t,e.style,e),{...i,style:{...t,...i.style}}}return i}var $I=new Set(`animate.exit.variants.initial.style.values.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.tap.propagate.ignoreStrict.viewport.pinch`.split(`.`));function eL(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||$I.has(e)}function tL(e,t){return e.startsWith(`on`)?!eL(e):t?.(e)??!eL(e)}function nL(e,t,n,r){let i={};for(let a in e)(a!==`values`||typeof e.values!=`object`)&&(YA(e[a])||(a===`fx`?e.fx&&(i.fx=``):(tL(a,r)||n===!0&&eL(a)||!t&&!eL(a)||e.draggable&&a.startsWith(`onDrag`))&&(i[a]=e[a])));return i}var rL=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function iL(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(rL.indexOf(e)>-1||/[A-Z]/u.test(e))}function aL(e,t,n,{latestValues:r},i,a=!1,o,s){let c=(o??iL(e)?QI:XI)(t,r,i,e),l=nL(t,typeof e==`string`,a,s),u=e===v.Fragment?{}:{...l,...c,ref:n},{children:d}=t,f=(0,v.useMemo)(()=>YA(d)?d.get():d,[d]);return(0,v.createElement)(e,{...u,children:f})}function oL({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:sL(n,r,i,e),renderState:t()}}function sL(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=jM(a[e]);let{initial:o,animate:s}=e,c=SP(e),l=CP(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!vP(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=VA(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var cL=e=>(t,n)=>{let r=(0,v.useContext)(HI),i=(0,v.useContext)(cT),a=()=>oL(e,t,r,i);return n?a():oT(a)},lL=cL({scrapeMotionValuesFromProps:LP,createRenderState:KI}),uL=cL({scrapeMotionValuesFromProps:mI,createRenderState:ZI}),dL=Symbol.for(`motionComponentSymbol`);function fL(e,t,n){let r=(0,v.useRef)(n);(0,v.useInsertionEffect)(()=>{r.current=n});let i=(0,v.useRef)(null);return(0,v.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`){if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n)}else a&&(a.current=n)},[t])}var pL=(0,v.createContext)({});function mL(e,t,n,r,i,a){let{visualElement:o}=(0,v.useContext)(HI),s=(0,v.useContext)(II),c=(0,v.useContext)(cT),l=(0,v.useContext)(SI),u=l.reducedMotion,d=l.skipAnimations,f=(0,v.useRef)(null),p=(0,v.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let m=f.current,h=(0,v.useContext)(pL);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&i.create(m,n,h),(0,v.useInsertionEffect)(()=>{m&&m.props!==n&&m.update(n,c)});let g=n[QA],_=(0,v.useRef)(!!g&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(g)&&window.MotionHasOptimisedAnimation?.(g));return sT(()=>{p.current&&m&&(m.animationState?.animateChanges(),m.enteringChildren=void 0)},[]),sT(()=>{p.current=!0,m&&(window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),_.current&&m.animationState&&m.animationState.animateChanges())}),(0,v.useEffect)(()=>{m&&(!_.current&&m.animationState&&m.animationState.animateChanges(),_.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(g)}),!1),m.enteringChildren=void 0)}),m}function hL(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&VI(r);let a=n?n===`svg`:iL(e),o=a?uL:lL;function s(n,s){let c,l=gL(n);oT(()=>!!hP.current?.sharedNodes.get(l)?.lead&&n.initial)&&(n={...n,initial:!1});let u={...(0,v.useContext)(SI),...n,layoutId:l},{isStatic:d,isValidProp:f}=u,p=WI(n),m=o(n,d);if(!d&&typeof window<`u`){_L(u,r);let t=vL(u);p.visualElement=mL(e,m,u,i,t.ProjectionNode,a),(t.isEnabled||p.visualElement?.projection?.options.layoutId)&&(c=t.MeasureLayout)}return(0,S.jsxs)(HI.Provider,{value:p,children:[c&&p.visualElement?(0,S.jsx)(c,{visualElement:p.visualElement,...u}):null,aL(e,n,fL(m,p.visualElement,s),m,d,t,a,f)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,v.forwardRef)(s);return c[dL]=e,c}function gL({layoutId:e}){let t=(0,v.useContext)(aT).id;return t&&e!==void 0?t+`-`+e:e}function _L(e,t){(0,v.useContext)(II).strict}function vL(e){let{drag:t,layout:n}=BI();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:r.MeasureLayout,isEnabled:t?.isEnabled(e)||n?.isEnabled(e),ProjectionNode:r.ProjectionNode}}function yL(e,t){if(typeof Proxy>`u`)return hL;let n=new Map,r=(n,r)=>hL(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,hL(a,void 0,e,t)),n.get(a))})}var bL=(e,t)=>t.isSVG??iL(e)?new hI(t):new zP(t,{allowProjection:e!==v.Fragment}),xL=class extends uI{constructor(e){super(e),e.animationState||=yI(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();vP(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){this.node.getProps().animate!==this.node.prevProps?.animate&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},SL=0,CL={animation:{Feature:xL},exit:{Feature:class extends uI{constructor(){super(...arguments),this.id=SL++}update(){let{presenceContext:e,animationState:t}=this.node;if(!e||!t)return;let{isPresent:n,onExitComplete:r}=e;if(n===!this.exit)return;if(n){if(this.exit===!0){let{initial:e}=this.node.getProps();if(e&&!Array.isArray(e)){let{transition:t,transitionEnd:n,...r}=HA(this.node,e)||{};for(let e in r)this.node.getValue(e)?.jump(r[e])}this.node.blockInitialAnimation=!1,t.reset(),t.animateChanges()}else t.setActive(`exit`,!1);this.exit=void 0;return}let i=this.exit=t.setActive(`exit`,!0);r&&i.then(()=>{this.exit===i&&(this.exit=!0,r(this.id))})}mount(){let{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id,this.node)),this.update()}unmount(){}}}},wL=class extends uI{constructor(e){super(e),this.removeGroupControls=_T,this.removeListeners=_T,this.controls=new FF(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||_T}update(){let{dragControls:e,drag:t}=this.node.getProps(),{dragControls:n,drag:r}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls))),r&&!t&&this.controls.stop(void 0,void 0,r)}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},TL=e=>(t,n)=>{e&&mD.update(()=>e(t,n),!1,!0)},EL=class extends uI{constructor(){super(...arguments),this.removePointerDownListener=_T}onPointerDown(e){this.session=new sF(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:this.node.current?.ownerDocument.defaultView})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:TL(e),onStart:TL(t),onMove:TL(n),onEnd:(e,t)=>{delete this.session,r&&mD.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=UP(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session?.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session?.end()}},DL=!1,OL=({layout:e,layoutDependency:t,layoutAnchor:n})=>({layout:e,layoutDependency:t,layoutAnchor:n,animationType:typeof e==`string`?e:`both`}),kL=(e,t)=>{let{snapshot:n}=e,r=e.getStack();r?.remove(e);let i=r?.lead;if(r?.prevLead===e&&i.resumeFrom===e&&(i.resumeFrom=i.currentAnimation=e.resumingFrom=void 0),e.options.layoutId=t,!t)e.needsShow=!0;else return e.root.registerSharedNode(t,e),()=>{let{resumeFrom:t}=e;t?.isPresent!==!1&&e.getStack().members.includes(t)&&(t.hide(),e.resumeFrom=void 0,e.snapshot=n)}},AL=class extends v.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group?.add(i),r&&n?.register?.(i),DL&&i.root.didUpdate(),i.options.layoutId!==r&&kL(i,r)?.(),i.addEventListener(`animationComplete`,()=>this.safeToRemove()),i.setOptions({...i.options,...OL(this.props),onExitComplete:()=>this.safeToRemove()})),NN.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,layoutId:n,visualElement:r,drag:i,isPresent:a}=this.props,{projection:o}=r;return o&&(o.isPresent=a,this.takeOver=e.layoutId===n?void 0:(o.willUpdate(),kL(o,n)),o.setOptions({...o.options,...OL(this.props)}),DL=!0,i||e.layoutDependency!==t||t===void 0||e.isPresent!==a?o.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?o.promote():o.relegate()||mD.postRender(()=>{o.getStack()?.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(this.takeOver?.(),e.root.didUpdate(),CM.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;DL=!0,r&&(r.scheduleCheckAfterUnmount(),t.group?.remove(r),n?.deregister?.(r))}safeToRemove(){this.props.safeToRemove?.()}render(){return null}};function jL(e){let[t,n]=MI(),r=(0,v.useContext)(aT);return(0,S.jsx)(AL,{...e,layoutGroup:r,switchLayoutGroup:(0,v.useContext)(pL),isPresent:t,safeToRemove:n})}var ML={pan:{Feature:EL},drag:{Feature:wL,ProjectionNode:gP,MeasureLayout:jL}};function NL(e,t,n,r,i){let{props:a}=e,o=`while`+n;!i&&e.animationState&&a[o]&&e.animationState.setActive(o,r===`Start`);let s=a[`on`+n+r];s&&mD.postRender(()=>s(t,VP(t)))}var PL=class extends uI{mount(){let{current:e}=this.node;e&&(this.unmount=WF(e,(e,t)=>(NL(this.node,t,`Hover`,`Start`),e=>NL(this.node,e,`Hover`,`End`))))}unmount(){}},FL=class extends uI{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}e&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=vT(pP(this.node.current,`focus`,()=>this.onFocus()),pP(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function IL(e,t,n,r){e.current instanceof HTMLButtonElement&&e.current.disabled||NL(e,t,`Tap`,n,r)}var LL=class extends uI{constructor(){super(...arguments),this.options={}}mount(){let{current:e}=this.node;e&&(this.update(),this.unmount=nI(e,(e,t)=>(IL(this.node,t,`Start`),{onComplete:(e,{success:t})=>IL(this.node,e,t?``:`Cancel`),onRepeat:()=>IL(this.node,t,``,!0)}),this.options))}update(){let{options:e,node:t}=this,{globalTapTarget:n,propagate:r,tap:i}=t.props;for(let t in e)delete e[t];Object.assign(e,i,{useGlobalTarget:n,stopPropagation:r?.tap===!1})}unmount(){}},RL=new WeakMap,zL=new WeakMap,BL=e=>{let t=RL.get(e.target);t&&t(e)},VL=e=>{e.forEach(BL)};function HL({root:e,...t}){let n=e||document;zL.has(n)||zL.set(n,{});let r=zL.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(VL,{root:e,...t})),r[i]}function UL(e,t,n){let r=HL(t);return RL.set(e,n),r.observe(e),()=>{RL.delete(e),r.unobserve(e)}}var WL={some:0,all:1},GL=class extends uI{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:WL[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=UL(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(KL(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function KL({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var qL=yL(Object.assign({},CL,{inView:{Feature:GL},tap:{Feature:LL},focus:{Feature:FL},hover:{Feature:PL}},ML,{layout:{ProjectionNode:gP,MeasureLayout:jL}}),bL);function JL(e,t,n){(0,v.useInsertionEffect)(()=>e.on(t,n),[e,t,n])}function YL(e){let t=oT(()=>EA(e)),{isStatic:n}=(0,v.useContext)(SI);if(n){let[,n]=(0,v.useState)(e);(0,v.useEffect)(()=>t.on(`change`,n),[])}return t}function XL(e,t){let n=YL(t()),r=()=>n.set(t());return r(),sT(()=>{let t=()=>mD.preRender(r,!1,!0),n=e.map(e=>e.on(`change`,t));return r(),()=>{n.forEach(e=>e()),hD(r)}}),n}function ZL(e){wA.current=[],e();let t=XL(wA.current,e);return wA.current=void 0,t}function QL(e,t,n){let{isStatic:r}=(0,v.useContext)(SI),i=()=>YA(e)?e.get():e;if(r)return ZL(i);let a=YL(i());return(0,v.useInsertionEffect)(()=>n(a,e,t),[a,JSON.stringify(t)]),a}function $L(e,t={}){return QL(e,t,lI)}function eR(e,t,n,r){if(typeof e==`function`)return ZL(e);if(n!==void 0&&!Array.isArray(n)&&typeof t!=`function`)return nR(e,t,n,r);let i=typeof t==`function`?t:rI(t,n,r),a=Array.isArray(e)?tR(e,i):tR([e],([e])=>i(e)),o=Array.isArray(e)?void 0:e.accelerate;if(o&&!o.isTransformed&&typeof t!=`function`&&Array.isArray(n)&&r?.clamp!==!1&&!r?.mixer){let e=r?.ease;a.accelerate={...o,times:[0,...t,1],keyframes:[n[0],...n,n[n.length-1]],isTransformed:!0,...e?{ease:Array.isArray(e)?[e[0],...e]:e}:{}}}return a}function tR(e,t){let n=oT(()=>[]);return XL(e,()=>{n.length=0;let r=e.length;for(let t=0;t<r;t++)n[t]=e[t].get();return t(n)})}function nR(e,t,n,r){let i=oT(()=>Object.keys(n)),a=oT(()=>({}));for(let o of i)a[o]=eR(e,t,n[o],r);return a}function rR(){!EP.current&&OP();let[e]=(0,v.useState)(TP.current);return e}function iR(e){return typeof e==`object`&&!Array.isArray(e)}function aR(e,t,n,r){return e==null?[]:typeof e==`string`&&iR(t)?Ej(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(e=>e!=null):[e]}function oR(e,t,n){return e*(t+1)+n*t}function sR(e,t){if(t.has(e))return t.get(e);let[,n,r]=e.match(/^(.+?)([+-][\d.]+)$/)||[];return t.has(n)?Math.max(0,t.get(n)+parseFloat(r)):void 0}function cR(e,t,n,r){return typeof t==`number`?t:t.startsWith(`-`)||t.startsWith(`+`)?Math.max(0,e+parseFloat(t)):t===`<`?n:t.startsWith(`<`)?Math.max(0,n+parseFloat(t.slice(1))):sR(t,r)??e}function lR(e,t,n){for(let r=0;r<e.length;r++){let i=e[r];i.at>t&&i.at<n&&(uT(e,i),r--)}}function uR(e,t,n,r,i,a){lR(e,i,a);for(let o=0;o<t.length;o++)e.push({value:t[o],at:qE(i,a,r[o]),easing:BT(n,o)})}function dR(e,t,n=0){let r=t+1+t*n;for(let t=0;t<e.length;t++)e[t]=e[t]/r}function fR(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var pR=`easeInOut`,mR=20;function hR(e,{defaultTransition:t={},...n}={},r,i,a){let o=t.duration||.3,s=new Map,c=new Map,l={},u=new Map,d=0,f=0,p=0,m=(e,n)=>{let a=n,s=e=>typeof e==`number`?n+e:cR(f,e,d,u);for(let n=0;n<e.length;n++){let h=e[n];if(typeof h==`string`){u.set(h,f);continue}if(!Array.isArray(h)){let e=h.at===void 0?f:s(h.at);`sequence`in h?(d=f=e,f=m(h.sequence,e),d=e,a=Math.max(a,f)):u.set(h.name,e);continue}let[g,_,v={}]=h;v.at!==void 0&&(f=s(v.at));let y=0,b=(e,n,r,a=0,s=0)=>{let c=vR(e),{delay:l=0,times:u=ZD(c),type:d=t.type||`keyframes`,repeat:m,repeatType:h,repeatDelay:g=0,..._}=n,{ease:v=t.ease||`easeOut`,duration:b}=n;r.mixer||=n.mixer;let x=typeof l==`function`?l(a,s):l,S=c.length,C=yk(d)?d:i?.[d||`keyframes`];if(S<=2&&C){let e=100;if(S===2&&xR(c)){let t=c[1]-c[0];e=Math.abs(t)}let n={...t,..._};b!==void 0&&(n.duration=xT(b));let r=xD(n,e,C);v=r.ease,b=r.duration}b??=o;let w=f+x;u.length===1&&u[0]===0&&(u[1]=1);let T=u.length-c.length;if(T>0&&XD(u,T),c.length===1&&c.unshift(null),m&&m<mR){let e=b>0?g/b:0;b=oR(b,m,g);let t=[...c],n=[...u];v=Array.isArray(v)?[...v]:[v];let r=[...v],i=h===`reverse`||h===`mirror`,a=t,o=r;i&&(a=[...t].reverse(),h===`reverse`&&(o=[...r].reverse().map(e=>typeof e==`function`?OT(e):e)));for(let s=0;s<m;s++){let l=i&&s%2==0,d=l?a:t,f=l?o:r,p=(s+1)*(1+e);e>0&&(c.push(c[c.length-1]),u.push(p),v.push(`linear`)),c.push(...d);for(let e=0;e<d.length;e++)u.push(n[e]+p),v.push(e===0?`linear`:BT(f,e-1))}dR(u,m,e)}let E=w+b;uR(r,c,v,u,w,E),y=Math.max(x+b,y),p=Math.max(E,p)};if(YA(g)){let e=gR(g,c);b(_,v,_R(`default`,e))}else{let e=aR(g,_,r,l),t=e.length;for(let n=0;n<t;n++){_=_,v=v;let r=e[n],i=gR(r,c);for(let e in _)b(_[e],yR(v,e),_R(e,i),n,t)}}d=f,f+=y,a=Math.max(a,f)}return a};m(e,0),a&&(a.duration=p,a.labels=u);let{type:h,...g}=t;return c.forEach((e,r)=>{for(let i in e){let a=e[i];a.sort(fR);let o=[],c=[],l=[];for(let e=0;e<a.length;e++){let{at:t,value:n,easing:r}=a[e];o.push(n),c.push(yT(0,p,t)),l.push(r||`easeOut`)}c[0]!==0&&(c.unshift(0),o.unshift(o[0]),l.unshift(pR)),c[c.length-1]!==1&&(c.push(1),o.push(null)),s.has(r)||s.set(r,{keyframes:{},transition:{}});let u=s.get(r);u.keyframes[i]=o,u.transition[i]={...g,duration:p,ease:l,times:c,mixer:a.mixer||t.mixer,...n}}}),s}function gR(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function _R(e,t){return t[e]||(t[e]=[]),t[e]}function vR(e){return Array.isArray(e)?e:[e]}function yR(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var bR=e=>typeof e==`number`,xR=e=>e.every(bR);function SR(e,t){return YA(e)||typeof e==`number`||typeof e==`string`&&!iR(t)}function CR(e,t,n,r){let i=[];if(SR(e,t))i.push(TM(e,iR(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return i;let a=aR(e,t,r),o=a.length;for(let e=0;e<o;e++){let r=a[e],s={...n};`delay`in s&&typeof s.delay==`function`&&(s.delay=s.delay(e,o)),r instanceof Element?i.push(...xM(r,t,s,_P.get(r))):i.push(...yj(_j(r)??SM,r,t,s))}}return i}function wR(e,t,n,r){let i=[],a=hR(e.map(e=>{if(Array.isArray(e)&&typeof e[0]==`function`){let t=e[0],n=EA(0);return n.on(`change`,t),e.length===1?[n,[0,1]]:e.length===2?[n,[0,1],e[1]]:[n,e[1],e[2]]}return e}),t,n,{spring:KD},r),o=t?.reduceMotion??t?.defaultTransition?.reduceMotion;return a.forEach(({keyframes:e,transition:t},n)=>{i.push(...CR(n,e,{...t,reduceMotion:o}))}),i}var TR=0;function ER({repeat:e=0,repeatDelay:t=0,repeatType:n=`loop`,delay:r=0},i,a,o){let s=i+t,c=o===void 0;if(c){let t=Math.max(0,a-r);o=s&&t>0?Math.min(e,Math.ceil(t/s-1e-9)-1):0,a=Math.min(t-o*s,i)}return n!==`loop`&&o%2&&(a=i-a),[o,c?a:r+o*s+a]}function DR(e,t){let n=[...e],r=typeof n[0]==`function`?Math.max(1,n.length-1):2;return n[r]={...n[r],at:t},n}var OR=(e,t)=>t===void 0?e:{name:e,at:t};function kR(e){e.pause(),e.time=0,e.stop()}var AR=class e{constructor(e=[],t={},n){this.options=t,this.entries=[],this.repeatIndex=0,this.prevTime=0,this.markers=[],this.labels=new Map,this.totalDuration=0,this.isDirty=!1,this.isDone=!1,this.isRebuilding=!1,this.playbackSpeed=1,this.motionScope=Cj.current,this.isKilled=!1,this.isWrapped=!1,this.stop=()=>{this.flush(),this.group?.stop()},this.isPaused=t.autoplay===!1,this.newFinished(),e.forEach(e=>this.add(e)),n?(this.isDirty=!1,this.isWrapped=!0,this.group=new bA(n),this.watch()):(this.invalidate(),this.flush())}add(t,n){return t instanceof e&&t.adopt(this),this.push({item:t,at:n})}call(e,t){return this.push({item:e,at:t,marker:{name:`_m`+TR++,time:0,callback:e}})}addPause(e,t){return this.push({item:t||{},at:e,marker:{name:`_m`+TR++,time:0,callback:t,pause:!0}})}move(e,t){return this.entries.forEach(n=>{n.item===e&&(n.at=t)}),this.invalidate()}remove(t){return t instanceof e&&(t.parent=void 0),this.entries=this.entries.filter(e=>e.item!==t),this.invalidate()}clear(){return this.entries=[],this.invalidate()}getLabelTime(e){return this.flush(),this.labels.get(e)}seek(e){return this.time=this.resolve(e),this}playTo(e){let t=this.resolve(e),n=this.iterationDuration,r=this.time,[i]=ER(this.options,n,r),a=ER(this.options,n,t,i)[1],o=Math.abs(this.speed);return this.speed=a<r?-o:o,this.stopAt=t,this.clock||this.invalidate(),this.play(),this}reverse(){return this.speed=-this.speed,this.play(),this}get progress(){return this.duration?this.time/this.duration:0}set progress(e){this.time=e*this.duration}get time(){return this.active()?.time??0}set time(e){this.flush(),this.prevTime=e,this.group&&(this.group.time=e),this.repeatIndex=this.currentRepeat()}get speed(){return this.playbackSpeed}set speed(e){this.playbackSpeed=e,this.group&&(this.group.speed=e)}get duration(){return this.flush(),this.isWrapped?this.group.duration:this.totalDuration}get iterationDuration(){return this.flush(),this.isWrapped?this.group.iterationDuration:this.totalDuration}get state(){return this.active()?.state??`idle`}get startTime(){return this.active()?.startTime??null}play(){this.flush(),this.isPaused=!1,this.group?.play(),this.isDone&&(this.newFinished(),this.watch())}pause(){this.flush(),this.isPaused=!0,this.group?.pause()}cancel(){this.flush(),this.group?.cancel()}complete(){this.flush(),this.group?.complete()}attachTimeline(e){return this.flush(),this.scrollTimeline=e,this.detachScroll=this.group?.attachTimeline(e),()=>{this.scrollTimeline=void 0,this.detachScroll?.()}}then(e,t){return this.finished.then(e,t)}active(){return this.flush(),this.group?.animations.length?this.group:void 0}push(e){return this.entries.push(e),this.invalidate()}invalidate(){return this.parent?this.parent.invalidate():this.isDirty||(this.isDirty=!0,queueMicrotask(()=>this.flush())),this}flush(){this.isDirty&&!this.parent&&!this.isKilled&&this.build()}adopt(e){this.group&&=(kR(this.group),void 0),this.isDirty=!1,this.parent=e}build(){let e=this.isWrapped?this.group.iterationDuration:this.totalDuration;this.isDirty=!1,this.isWrapped=!1;let t=this.group,n=0;t&&(this.isRebuilding=!0,this.scrollTimeline?(this.detachScroll?.(),t.cancel()):(n=t.animations.length?t.time:0,kR(t)),this.isRebuilding=!1);let{defaultTransition:r,onComplete:i,onUpdate:a,onRepeat:o,onReverseComplete:s,autoplay:c,scope:l,...u}=this.options,d={};l?.reduceMotion!==void 0&&(d.reduceMotion=l.reduceMotion),l?.skipAnimations!==void 0&&(d.skipAnimations=l.skipAnimations),Object.assign(d,u);let f=new Map,p={},m=Cj.current;Cj.current=this.motionScope;let h;try{h=wR(this.toSequence(f),{defaultTransition:r,...d},l,p)}finally{Cj.current=m}let g=p.labels,_=d.duration??p.duration,v=p.duration?_/p.duration:1;if(g.forEach((e,t)=>g.set(t,e*v)),this.markers=[],f.forEach((e,t)=>{e.time=g.get(t),g.delete(t),_=Math.max(_,e.time),this.markers.push(e)}),this.markers.sort((e,t)=>e.time-t.time),this.labels=g,this.totalDuration=_,this.clock=this.clockAnimation=void 0,this.markers.length||this.stopAt!==void 0||a||o){let e=this.clock=EA(0);e.on(`change`,t=>e===this.clock&&this.onClock(t)),h.unshift(this.clockAnimation=TM(e,[0,_],{...d,duration:_,ease:`linear`}))}let y=this.group=new bA(h),{delay:b=0,repeat:x=0,repeatDelay:S=0}=this.options,[C,w]=ER(this.options,e,n);n>b&&(n=ER(this.options,_,Math.min(w,_),C)[1]),this.isDone&&n<b+(x+1)*(_+S)-S&&this.newFinished(),this.scrollTimeline?this.detachScroll=y.attachTimeline(this.scrollTimeline):(y.speed=this.playbackSpeed,this.isPaused&&y.pause(),n&&(y.time=n)),this.repeatIndex=this.currentRepeat(),this.prevTime=n||-1,this.watch()}toSequence(t){return this.entries.map(({item:n,at:r,marker:i})=>i?(t.set(i.name,i),OR(i.name,r)):n instanceof e?{sequence:n.toSequence(t),at:r}:typeof n==`string`?OR(n,r):r===void 0?n:Array.isArray(n)?DR(n,r):{...n,at:r})}resolve(e){return this.flush(),typeof e==`number`?e:sR(e,this.labels)??this.time}currentRepeat(){return ER(this.options,this.totalDuration,this.clockAnimation?.time??0)[0]}onClock(e){let t=this.prevTime;if(this.prevTime=e,this.isRebuilding)return;let{onUpdate:n,onRepeat:r,repeatType:i=`loop`}=this.options;n?.(e);let a=this.currentRepeat(),o=a>this.repeatIndex?1:-1;for(;a!==this.repeatIndex;){let e=this.speed>0==(i===`loop`||!(this.repeatIndex%2)),n=e?this.totalDuration:0;if(this.cross(t,n))return;this.repeatIndex+=o,r?.(),t=i===`loop`?e?-1:1/0:n}this.cross(t,e)}cross(e,t){if(e===t)return;let n=t>e,r=r=>n?r>e&&r<=t:r<e&&r>=t,i=n?this.markers:[...this.markers].reverse();for(let e of i)if(r(e.time)&&(e.callback?.(n?1:-1),e.pause))return this.pauseAt(e.time);if(this.stopAt!==void 0&&r(this.stopAt))return this.pauseAt(this.stopAt),this.stopAt=void 0,!0}pauseAt(e){return this.pause(),this.time=ER(this.options,this.totalDuration,e,this.repeatIndex)[1],!0}watch(){let e=this.group;e.finished.then(()=>{if(e!==this.group||this.isDone)return;this.isDone=!0;let{onComplete:t,onReverseComplete:n}=this.options,r=this.speed<0&&n||t,i=this.resolveFinished;r?.(),i()})}newFinished(){this.isDone=!1,this.finished=new Promise(e=>{this.resolveFinished=e});let{scope:e}=this.options,t=this.motionScope?.add(()=>{this.isKilled=!0,this.stop()});e?.animations.push(this),this.finished.then(()=>{t?.(),e&&uT(e.animations,this)})}};function jR(e){return Array.isArray(e)&&e.some(e=>Array.isArray(e)||e?.sequence)}function MR(e={}){let{scope:t,reduceMotion:n,skipAnimations:r}=e;function i(e,i,a){let o=Cj.current?.transition,s={};n!==void 0&&(s.reduceMotion=n),r!==void 0&&(s.skipAnimations=r);let c;if(jR(e)){let r={...s,...i,scope:t};o&&(r.defaultTransition={...o,...r.defaultTransition}),r.reduceMotion=i?.reduceMotion??r.defaultTransition?.reduceMotion??n,c=new AR(e,r)}else{let{onComplete:n,...r}=a||{},l={...s,...o,...r},{onUpdate:u}=r;c=new AR([typeof e==`number`||typeof e==`string`&&(typeof i==`string`||Array.isArray(i))?[u||(()=>{}),Array.isArray(i)?i:[e,i],{...l,onUpdate:void 0}]:[e,i,l]],{...s,onComplete:n,scope:t},CR(e,i,l,t))}return c}return i}var NR=Object.assign(MR(),{addEffect:hj,removeEffect:gj}),PR=qL;function FR({className:e,...t}){return(0,S.jsx)(`kbd`,{"data-slot":`kbd`,className:X(`pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3`,e),...t})}var IR={maskImage:`linear-gradient(#000 0 0), linear-gradient(#000 0 0)`,maskClip:`content-box, border-box`,maskComposite:`exclude`};function LR({glareX:e,glareY:t,rimAngle:n,shine:r,rimOpacity:i,glare:a,rim:o,rimWidth:s}){return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(PR.div,{"aria-hidden":!0,className:`pointer-events-none absolute inset-0 overflow-hidden rounded-3xl mix-blend-soft-light`,style:{opacity:r},children:(0,S.jsx)(PR.div,{className:`absolute -inset-1/2`,style:{x:e,y:t,background:`radial-gradient(circle closest-side, rgb(255 255 255 / ${a*.55}) 0%, rgb(255 255 255 / ${a*.12}) 35%, transparent 85%)`}})}),(0,S.jsx)(PR.div,{"aria-hidden":!0,className:`pointer-events-none absolute inset-0 overflow-hidden rounded-3xl`,style:{opacity:i,padding:s,...IR},children:(0,S.jsx)(PR.div,{className:`absolute top-1/2 left-1/2 aspect-square w-[200%]`,style:{x:`-50%`,y:`-50%`,rotate:n,background:`linear-gradient(0deg, rgb(255 255 255 / ${o}) 16%, rgb(255 255 255 / 0) 45%)`}})})]})}var RR=()=>window.matchMedia(`(prefers-color-scheme: dark)`),zR=e=>{let t=RR();return t.addEventListener(`change`,e),()=>t.removeEventListener(`change`,e)};function BR(e){let t=(0,v.useSyncExternalStore)(zR,()=>RR().matches,()=>!1);return e===`system`?t:e===`dark`}var VR=3,HR=2,UR={text:`Small tools and games,`,highlight:`built with care`};function WR({theme:e,tagline:t=UR,depth:n=0,grain:r=!0,className:i,style:a,selectable:o=!1,pressed:s=!1,children:c}){let l=BR(e.mode),u=n>0,d=e=>u?{transform:`translateZ(${e*n}px)`}:void 0;return(0,S.jsxs)(`div`,{"data-theme":e.name,className:X(`relative flex flex-col rounded-3xl border border-black/[0.07] bg-background p-2 text-foreground select-none`,`shadow-rim`,l&&`dark border-white/10`,u&&`transform-3d`,i),style:{colorScheme:l?`dark`:`light`,...a},children:[u&&Array.from({length:VR},(e,t)=>(0,S.jsx)(`div`,{"aria-hidden":!0,className:`pointer-events-none absolute -inset-px rounded-3xl`,style:{transform:`translateZ(${-(t+1)*HR}px)`,background:`color-mix(in oklab, var(--background), black ${30+t*13}%)`}},t)),r&&(0,S.jsx)(`div`,{"aria-hidden":!0,className:X(`pointer-events-none absolute inset-0 rounded-3xl`,l?`opacity-12 mix-blend-screen`:`opacity-7 mix-blend-multiply`),style:{backgroundImage:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E")`}}),(0,S.jsxs)(`div`,{className:X(`relative flex flex-1 flex-col justify-center rounded-inner bg-card p-3.5 text-card-foreground`,`shadow-surface`,u&&`transform-3d`),style:d(10),children:[(0,S.jsxs)(`div`,{className:`text-center`,style:d(6),children:[(0,S.jsx)(`div`,{className:`truncate text-lg leading-tight font-semibold tracking-tight`,children:e.label}),(0,S.jsxs)(`p`,{className:`mt-1.5 line-clamp-2 text-xs leading-relaxed text-muted-foreground`,children:[t.text,` `,(0,S.jsx)(`span`,{className:`rounded-xs bg-(--selection) px-0.5 whitespace-nowrap text-(--selection-foreground)`,children:t.highlight}),`.`]})]}),(0,S.jsxs)(`div`,{className:`mt-3 flex items-center justify-center gap-1.5 text-3xs font-medium`,style:d(8),children:[(0,S.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-success/15 px-2 py-0.5 text-success`,children:[(0,S.jsx)(`span`,{className:`size-1.5 rounded-full bg-current`}),`Live`]}),(0,S.jsx)(`span`,{className:`rounded-full bg-secondary px-2 py-0.5 text-secondary-foreground`,children:`v1.2`})]}),(0,S.jsx)(`div`,{className:`mt-5 flex items-center justify-center`,style:d(14),children:(0,S.jsx)(`span`,{"data-select":!0,className:X(`inline-flex items-center rounded-full bg-primary px-3 py-1 text-xs font-medium text-primary-foreground`,`shadow-glow transition duration-150 ease-out`,o&&!s&&`hover:shadow-glow-lifted hover:brightness-110`,s&&`scale-[0.985] shadow-glow-pressed brightness-95 duration-75`),children:`Select`})})]}),(0,S.jsx)(`div`,{className:`flex items-center justify-between gap-1 px-1.5 pt-2 pb-0.5`,style:d(4),children:[1,2,3,4,5,6,7,8].map(e=>(0,S.jsx)(`span`,{className:`h-1.5 flex-1 rounded-full shadow-swatch`,style:{background:`var(--tint-${e})`}},e))}),c&&(0,S.jsx)(`div`,{className:`pointer-events-none absolute inset-0`,style:d(30),children:c})]})}var GR=236,KR=252,qR=168,JR=50,YR=.07,XR=1100,ZR=10,QR=24,$R=140,ez=(e,t)=>({type:`spring`,stiffness:e,damping:t}),tz=ez(260,30),nz=ez(380,26),rz=.45,iz=60,az=100,oz=2,sz=[1.5,3.5,1/0],cz=new Set([`ArrowUp`,`ArrowDown`,`PageUp`,`PageDown`,`Home`,`End`,` `]),lz=e=>{if(typeof requestIdleCallback>`u`){let t=window.setTimeout(e,1e3);return()=>clearTimeout(t)}let t=requestIdleCallback(e,{timeout:3e3});return()=>cancelIdleCallback(t)},uz=()=>Math.min(1,window.innerWidth/(GR*2.6)),dz=(e,t)=>`${e.label} ${e.mode}`.toLowerCase().includes(t.trim().toLowerCase()),fz=e=>JR/(360/Math.max(e,QR)),pz=e=>(e-1)/2>=fz(e),mz=(e,t)=>(e%t+t)%t,hz=(e,t)=>Math.min(t-1,Math.max(0,e)),gz=(e,t,n)=>{let r=e-t;return pz(n)?r-n*Math.round(r/n):r},_z=(e,t)=>pz(t)?Math.round(e):hz(Math.round(e),t),vz=(e,t)=>mz(_z(e,t),t),yz=.3,bz=(e,t)=>{if(pz(t))return e;let n=hz(e,t);return n+(e-n)*yz};function xz({tagline:e,open:t,onOpenChange:n,trigger:r,shortcut:i=!0,finalFocus:a,favoriteKey:o=`!`,favoritesOnlyKey:s=`@`}={}){let{theme:c,themes:l,setTheme:u,favorites:d,toggleFavorite:f}=I(),p=l.filter(e=>!e.hidden||e.name===c),m=rR()??!1,[h,g]=(0,v.useState)(!1),_=t??h,[y,b]=(0,v.useState)(0),[x,C]=(0,v.useState)(1),[w,T]=(0,v.useState)(!1),[E,D]=(0,v.useState)(!1),[O,k]=(0,v.useState)(!1),[A,j]=(0,v.useState)(!1),M=YL(1),N=YL(1/0),P=YL(0),F=(0,v.useRef)(0),R=(0,v.useRef)(null),[z,V]=(0,v.useState)(``),[H,U]=(0,v.useState)(!1),ee=(e,t,n)=>p.filter(r=>dz(r,e)&&(!t||n.includes(r.name))),te=ee(z,H,d),ne=te.length,W=te[y];JL(P,`change`,e=>ne&&b(vz(e,ne)));let re=(0,v.useRef)(!1),ie=e=>{re.current=!1,F.current=_z(e,ne),NR(P,F.current,m?{duration:0}:tz)},ae=e=>ie(Math.round(F.current)+e),G=e=>{let t=Math.max(-60,Math.min(iz,e));if(m)return ie(P.get());re.current=!0,F.current=_z(P.get()+t*rz,ne),NR(P,F.current,{type:`inertia`,velocity:t,power:rz,timeConstant:rz*1e3,modifyTarget:e=>_z(e,ne),restDelta:.001})},K=(0,v.useEffectEvent)(e=>{!i||_||e.defaultPrevented||e.repeat||e.metaKey||e.ctrlKey||e.altKey||e.key.toLowerCase()!==`t`||L(e.target)||(e.preventDefault(),q(!0))});(0,v.useEffect)(()=>(window.addEventListener(`keydown`,K),()=>window.removeEventListener(`keydown`,K)),[]),(0,v.useEffect)(()=>lz(()=>j(!0)),[]),(0,v.useEffect)(()=>{if(A)return lz(()=>{let e=R.current?.closest(`[hidden]`);e&&(e.style.visibility=`hidden`,e.hidden=!1,e.offsetWidth,e.hidden=!0,e.style.visibility=``)})},[A]),(0,v.useEffect)(()=>{if(!_)return;let e=e=>e.preventDefault();return window.addEventListener(`wheel`,e,{passive:!1}),()=>window.removeEventListener(`wheel`,e)},[_]),(0,v.useEffect)(()=>{if(!_)return;let e=()=>C(uz());return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[_]);let q=(e,r)=>{if(!e&&r?.reason===`escape-key`&&z)return ce(``);t===void 0&&g(e),n?.(e)},oe=(0,v.useEffectEvent)(()=>{V(``),U(!1),T(!1),C(uz());let e=Math.max(0,p.findIndex(e=>e.name===c));P.jump(e),b(e),F.current=e,N.jump(sz[0]);let t=e=>requestAnimationFrame(()=>requestAnimationFrame(()=>{N.jump(sz[e]),e<sz.length-1&&t(e+1)}));t(1),m||(M.jump(.4),NR(M,1,nz))});(0,v.useEffect)(()=>{_&&oe()},[_]);let J=e=>{if(!e||e.name===c)return q(!1);let t=document.getElementById(`theme-card-${e.name}`)?.getBoundingClientRect();B(()=>{u(e.name),T(!0),q(!1)},t&&{x:t.left+t.width/2,y:t.top+t.height/2},m)},se=e=>{let t=W?e.indexOf(W):-1,n=Math.max(0,t);P.stop(),P.jump(n),F.current=n,b(n)},ce=e=>{se(ee(e,H,d)),V(e)},le=e=>{se(ee(z,e,d)),U(e)},ue=e=>{H&&se(te.filter(t=>t!==e)),f(e.name)},de=e=>{if(e.metaKey||e.ctrlKey||e.altKey)return;if(cz.has(e.key)&&e.target===R.current&&e.preventDefault(),e.key===o||e.key===s){if(e.preventDefault(),e.repeat)return;e.key===s?le(!H):W&&ue(W);return}if(e.key.length===1&&(e.key!==` `||z!==``)&&(e.key!==` `||e.target===R.current))return e.preventDefault(),ce(z+e.key);if(e.key===`Backspace`&&z)return e.preventDefault(),ce(z.slice(0,-1));if(!ne)return;let t={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1}[e.key];if(t)e.preventDefault(),ae(t);else if((e.key===`Enter`||e.key===` `)&&e.target===R.current){if(e.preventDefault(),e.repeat||E)return;if(m)return J(W);D(!0),window.setTimeout(()=>{D(!1),J(W)},$R)}else if(e.key===`Home`||e.key===`End`){e.preventDefault();let t=Math.round(F.current),n=pz(ne)?t-mz(t,ne):0;ie(e.key===`Home`?n:pz(ne)?n-1:ne-1)}},fe=(0,v.useRef)({last:0,settle:0}),pe=e=>{let t=Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY;if(e.deltaMode!==0||Number.isInteger(t)&&Math.abs(t)>=50){if(e.timeStamp-fe.current.last<60)return;fe.current.last=e.timeStamp,ae(Math.sign(t))}else P.stop(),P.set(bz(P.get()+t/(qR*x),ne)),clearTimeout(fe.current.settle),fe.current.settle=window.setTimeout(()=>ie(P.get()),120)},me=(0,v.useRef)({x:0,y:0,start:0,moved:!1,caught:!1,gesture:`ring`,samples:[]}),he=(0,v.useRef)(null),[ge,_e]=(0,v.useState)(!1);return(0,S.jsxs)(Ow,{open:_,onOpenChange:q,modal:`trap-focus`,onOpenChangeComplete:e=>!e&&T(!1),children:[r===void 0&&(0,S.jsxs)(Xl,{children:[(0,S.jsx)(Gl,{render:(0,S.jsx)(Aw,{render:(0,S.jsxs)(ay,{variant:`ghost`,size:`icon`,"aria-label":`Choose a theme`,"aria-keyshortcuts":i?`t`:void 0,className:`relative outline-none focus-visible:border-transparent focus-visible:bg-muted focus-visible:ring-0`,children:[(0,S.jsx)(td,{}),(0,S.jsx)(`span`,{className:`absolute right-1.5 bottom-1.5 size-2 rounded-full bg-primary ring-2 ring-background`})]})})}),(0,S.jsxs)(Kl,{children:[`Theme `,i&&(0,S.jsx)(FR,{children:`T`})]})]}),r&&(0,S.jsx)(Aw,{render:r}),(0,S.jsxs)(xw,{keepMounted:A,children:[(0,S.jsx)(fw,{className:X(`fixed inset-0 z-50 bg-background/55 duration-200 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,w&&`invisible`)}),(0,S.jsxs)(bw,{initialFocus:R,finalFocus:a,onKeyDown:de,onPointerDown:e=>{if(e.button!==0||e.target.closest(`button`))return;let t=e.pointerType===`touch`,n=e.target.closest(`[data-theme-index]`),r=n!==null&&Math.round(gz(Number(n.dataset.themeIndex),F.current,ne))===0;if(r&&e.target.closest(`[data-select]`)){k(!0);let e=()=>{k(!1),window.removeEventListener(`pointerup`,e),window.removeEventListener(`pointercancel`,e)};window.addEventListener(`pointerup`,e),window.addEventListener(`pointercancel`,e)}if(me.current.moved=me.current.caught=!1,me.current.gesture=`ring`,ne<2&&!(t&&r))return;let i=re.current&&Math.abs(P.getVelocity())>oz;i&&P.stop(),me.current={x:e.clientX,y:e.clientY,start:P.get(),moved:!1,caught:i,gesture:t?`pending`:`ring`,samples:[{t:e.timeStamp,x:e.clientX}]};let a=e=>{let{current:t}=me,n=e.clientX-t.x;if(t.gesture===`pending`){let i=e.clientY-t.y;if(Math.hypot(n,i)<6)return;t.gesture=Math.abs(i)>Math.abs(n)?r&&!m?`tilt`:`none`:ne<2?`none`:`ring`,k(!1)}if(t.gesture===`tilt`)return he.current?.aim(e.clientX,e.clientY);if(t.gesture===`ring`){for(t.samples.push({t:e.timeStamp,x:e.clientX});t.samples.length>2&&e.timeStamp-t.samples[0].t>az;)t.samples.shift();!t.moved&&Math.abs(n)<4||(t.moved||(k(!1),P.stop(),t.start=P.get()+n/(qR*x),_e(!0)),t.moved=!0,P.set(bz(t.start-n/(qR*x),ne)))}},o=e=>{window.removeEventListener(`pointermove`,a),window.removeEventListener(`pointerup`,o),window.removeEventListener(`pointercancel`,o),_e(!1),me.current.gesture===`tilt`&&he.current?.release();let{samples:t}=me.current,n=t[0],r=t[t.length-1],i=e.timeStamp-r.t>50||r.t===n.t?0:(r.x-n.x)/(r.t-n.t)*1e3;me.current.moved?G(-i/(qR*x)):me.current.caught&&ie(P.get())};window.addEventListener(`pointermove`,a),window.addEventListener(`pointerup`,o),window.addEventListener(`pointercancel`,o)},onWheel:pe,onClick:e=>{let{moved:t,caught:n,gesture:r}=me.current;if(t||n||r===`tilt`||r===`none`)return;let i=e.target;if(i.closest(`button`))return;let a=i.closest(`[data-theme-index]`);if(!a)return q(!1);let o=Number(a.dataset.themeIndex);if(i.closest(`[data-favorite]`))return ue(te[o]);let s=Math.round(gz(o,F.current,ne));s===0?J(te[o]):ae(s)},className:X(`fixed inset-0 z-50 flex touch-none flex-col items-center justify-center overflow-hidden text-foreground outline-none select-none duration-200 data-open:duration-75 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,w&&`invisible`),children:[(0,S.jsx)(pw,{render:(0,S.jsx)(ay,{variant:`ghost`,size:`icon`,"aria-label":`Close`,className:`absolute top-4 right-4`,children:(0,S.jsx)(xd,{})})}),(0,S.jsxs)(Xl,{children:[(0,S.jsx)(Gl,{render:(0,S.jsx)(ay,{variant:`ghost`,size:`icon`,"aria-label":`Favorites only`,"aria-pressed":H,"aria-keyshortcuts":s,className:`absolute top-4 right-14`,onMouseDown:e=>e.preventDefault(),onClick:()=>le(!H)}),children:(0,S.jsx)(hd,{className:X(H&&`fill-current`)})}),(0,S.jsxs)(Kl,{children:[`Favorites only `,(0,S.jsx)(FR,{children:s})]})]}),(0,S.jsxs)(PR.div,{className:`flex w-full flex-col items-center will-change-transform`,style:{scale:M},children:[(0,S.jsxs)(`div`,{className:`text-center`,children:[(0,S.jsx)(kw,{className:`text-xs font-medium tracking-wider text-muted-foreground uppercase`,children:`Theme`}),(0,S.jsx)(`div`,{"aria-live":`polite`,className:`mt-1 h-9 overflow-hidden`,children:z?(0,S.jsxs)(`div`,{className:`text-3xl font-semibold tracking-tight whitespace-pre`,children:[z,(0,S.jsx)(`span`,{className:`ml-0.5 inline-block h-[0.9em] w-[2px] translate-y-[0.1em] animate-pulse bg-primary`})]}):(0,S.jsx)(PR.div,{initial:!m&&{y:14,opacity:0},animate:{y:0,opacity:1},transition:ez(420,32),className:`text-3xl font-semibold tracking-tight`,children:W?.label},W?.name)}),(0,S.jsxs)(`div`,{className:`mt-1 text-xs text-muted-foreground tabular-nums`,children:[ne===0?H&&!z?`No favorites yet`:`No theme matches`:z?`${W?.label} · ${y+1} of ${ne}`:`${String(y+1).padStart(2,`0`)} / ${String(ne).padStart(2,`0`)}`,H&&` · favorites`,W?.name===c&&` · current`]})]}),(0,S.jsx)(`div`,{ref:R,tabIndex:0,role:`listbox`,"aria-label":`Themes`,"aria-activedescendant":W?`theme-card-${W.name}`:void 0,className:`relative my-6 w-full outline-none`,style:{height:332*x},children:(0,S.jsx)(`div`,{className:`absolute top-1/2 left-1/2`,style:{transform:`scale(${x})`},children:!w&&te.map((t,n)=>(0,S.jsx)(Cz,{theme:t,index:n,count:ne,position:P,reach:N,isFront:n===y,tilt:n===y&&!ge&&!m,aimRef:he,pressed:n===y&&(E||O),favorite:d.includes(t.name),taglineText:e?.text,taglineHighlight:e?.highlight},t.name))})}),(0,S.jsxs)(`div`,{className:`hidden items-center gap-1.5 text-xs text-muted-foreground sm:flex`,children:[(0,S.jsx)(`span`,{children:`Drag or`}),(0,S.jsx)(FR,{children:`←`}),(0,S.jsx)(FR,{children:`→`}),(0,S.jsx)(`span`,{className:`mr-2`,children:`to browse`}),(0,S.jsx)(FR,{children:`Enter`}),(0,S.jsx)(`span`,{className:`mr-2`,children:`select`}),(0,S.jsx)(`span`,{className:`mr-2`,children:`type to filter`}),(0,S.jsx)(FR,{children:o}),(0,S.jsx)(`span`,{className:`mr-2`,children:`favorite`}),(0,S.jsx)(FR,{children:s}),(0,S.jsx)(`span`,{className:`mr-2`,children:`favorites only`}),(0,S.jsx)(FR,{children:`Esc`}),(0,S.jsx)(`span`,{children:z?`clear`:`close`})]})]})]})]})]})}var Sz=e=>Math.min(1,Math.max(-1,e*2-1)),Cz=(0,v.memo)(function({theme:e,index:t,count:n,position:r,reach:i,isFront:a,tilt:o,aimRef:s,pressed:c,favorite:l,taglineText:u,taglineHighlight:d}){let f=Math.max(n,QR),p=2*Math.PI/f,m=qR*f/(2*Math.PI),h=fz(n),g=eR(r,e=>gz(t,e,n)),_=eR(g,e=>{let t=e*p,n=1+YR*Math.max(0,1-Math.abs(e));return`translate(-50%, -50%) perspective(${XR}px) translate3d(${m*Math.sin(t)}px, 0, ${m*(Math.cos(t)-1)}px) rotateY(${t*180/Math.PI}deg) scale(${n})`}),y=eR(g,e=>Math.min(1,Math.max(0,h+.5-Math.abs(e)))),b=eR([y,g,i],([e,t,n])=>e<=0||Math.abs(t)>n?`hidden`:`visible`),x=eR(g,e=>100-Math.round(Math.abs(e)*4)),C=eR(g,e=>Math.min(.45,Math.abs(e)*.09)),w=$L(0,{stiffness:320,damping:26}),T=$L(0,{stiffness:320,damping:26}),E=$L(0,{stiffness:200,damping:30}),D=eR(T,e=>-e*ZR),O=eR(w,e=>e*ZR),k=eR(w,e=>`${e*25}%`),A=eR(T,e=>`${e*25}%`),j=eR([w,T,g],([e,t,n])=>Math.atan2(t,e+n)*180/Math.PI+90),M=eR(E,[0,1],[.25,1]),N=eR(O,e=>-e*1.6),P=eR(D,e=>18+e*.8),F=eR(g,e=>Math.max(0,1-Math.abs(e))),I=eR(F,e=>e<=0?`hidden`:`visible`),L=eR(F,e=>e*.5);(0,v.useEffect)(()=>{o||(w.set(0),T.set(0),E.set(0))},[o,w,T,E]);let R=(0,v.useRef)(null);return(0,v.useEffect)(()=>{if(!o)return;let e={aim(e,t){let n=R.current?.getBoundingClientRect();n&&(w.set(Sz((e-n.left)/n.width)),T.set(Sz((t-n.top)/n.height)),E.set(1))},release(){w.set(0),T.set(0),E.set(0)}};return s.current=e,()=>{s.current===e&&(s.current=null)}},[o,s,w,T,E]),(0,S.jsxs)(PR.div,{"data-theme-index":t,className:`absolute top-0 left-0 cursor-pointer transform-3d`,style:{width:GR,height:KR,transform:_,opacity:y,visibility:b,zIndex:x},ref:R,onPointerMove:e=>{o&&e.pointerType!==`touch`&&s.current?.aim(e.clientX,e.clientY)},onPointerLeave:e=>{e.pointerType!==`touch`&&(w.set(0),T.set(0),E.set(0))},children:[(0,S.jsx)(PR.div,{"aria-hidden":!0,className:`pointer-events-none absolute inset-x-[8%] top-[12%] bottom-0 rounded-4xl bg-black blur-2xl`,style:{x:N,y:P,z:-40,opacity:L,visibility:I}}),(0,S.jsx)(PR.div,{id:`theme-card-${e.name}`,role:`option`,"aria-selected":a,"aria-label":l?`${e.label}, favorite`:e.label,className:`relative size-full transform-3d`,style:{rotateX:D,rotateY:O},children:(0,S.jsxs)(WR,{theme:e,tagline:u&&d?{text:u,highlight:d}:void 0,depth:1,grain:a,selectable:a,pressed:c,className:`size-full`,children:[(0,S.jsx)(`span`,{"data-favorite":!0,"aria-hidden":!0,className:X(`pointer-events-auto absolute top-1 right-1 flex size-11 items-center justify-center rounded-full transition duration-150 ease-out hover:scale-115`,l?`text-primary`:`text-muted-foreground/60 hover:text-foreground`),children:(0,S.jsx)(hd,{className:X(`size-4`,l&&`fill-current`)})}),(0,S.jsx)(PR.div,{"aria-hidden":!0,className:`absolute inset-0 rounded-3xl bg-black`,style:{opacity:C}}),(0,S.jsx)(PR.div,{className:`absolute inset-0`,style:{opacity:F,visibility:I},children:(0,S.jsx)(LR,{glareX:k,glareY:A,rimAngle:j,shine:E,rimOpacity:M,glare:.55,rim:.7,rimWidth:.5})})]})})]})});function wz({className:e,...t}){return(0,S.jsx)(Yu,{"data-slot":`spinner`,role:`status`,"aria-label":`Loading`,className:X(`size-4 animate-spin`,e),...t})}var Tz=v.createContext(void 0);function Ez(){let e=v.useContext(Tz);if(e===void 0)throw Error(J(64));return e}var Dz=`data-activation-direction`,Oz={tabActivationDirection:e=>({[Dz]:e})},kz=v.forwardRef(function(e,t){let{className:n,defaultValue:r=0,onValueChange:i,orientation:a=`horizontal`,render:o,value:s,style:c,...l}=e,u=e.defaultValue!==void 0,d=v.useRef([]),[f,p]=v.useState(()=>new Map),[m,h]=Yb({controlled:s,default:r,name:`Tabs`,state:`value`}),g=s!==void 0,[_,y]=v.useState(()=>new Map),b=v.useRef(void 0),x=v.useCallback(e=>Az(_,e),[_]),[C,w]=v.useState(()=>({previousValue:m,tabActivationDirection:`none`})),{previousValue:T,tabActivationDirection:E}=C,D=E,O=!1;T!==m&&(D=jz(T,m,a,_),O=T!=null&&m!=null&&x(m)==null);let k=O?T:m,A=T!==k||E!==D;q(()=>{A&&w({previousValue:k,tabActivationDirection:D})},[k,A,D]);let j=Y((e,t)=>{t.activationDirection=jz(m,e,a,_),i?.(e,t),!t.isCanceled&&h(()=>e)}),M=Y((e,t)=>{i?.(e,Jt(t,void 0,void 0,{activationDirection:`none`}))}),N=Y((e,t)=>(p(n=>{let r=new Map(n);return r.set(e,t),r}),()=>{p(n=>{if(n.get(e)!==t)return n;let r=new Map(n);return r.delete(e),r})})),P=v.useCallback(e=>f.get(e),[f]),F=v.useCallback(e=>{for(let t of _.values())if(e===t.value)return t.id},[_]),I=v.useMemo(()=>({getTabElementBySelectedValue:x,getTabIdByPanelValue:F,getTabPanelIdByValue:P,onValueChange:j,orientation:a,registerMountedTabPanel:N,setTabMap:y,tabActivationDirection:D,value:m}),[x,F,P,j,a,N,y,D,m]),L=v.useMemo(()=>{for(let e of _.values())if(e.value===m)return e},[_,m]),R=v.useMemo(()=>{for(let e of _.values())if(!e.disabled)return e.value},[_]),z=v.useRef(!u),B=v.useRef(r),V=v.useRef(u),H=v.useRef(!1);q(()=>{if(g)return;function e(e,t){h(()=>e),w({previousValue:e,tabActivationDirection:`none`}),M(e,t),z.current=!1}if(_.size===0){H.current&&m!==null&&!b.current?.isConnected&&e(null,gn);return}H.current=!0,b.current=_.keys().next().value;let t=L?.disabled,n=L==null&&m!==null;if(!t&&m===B.current&&(V.current=!1),V.current&&t&&m===B.current)return;let r=z.current;if(t||n){let n=R??null;if(m===n){z.current=!1;return}let i=gn;r?i=_n:t&&(i=hn),e(n,i)}else r&&L!=null&&(M(m,_n),z.current=!1)},[R,g,M,L,h,_,m]);let U=Hi(`div`,e,{state:{orientation:a,tabActivationDirection:D},ref:t,props:l,stateAttributesMapping:Oz});return(0,S.jsx)(Tz.Provider,{value:I,children:(0,S.jsx)(HS,{elementsRef:d,children:U})})});function Az(e,t){for(let[n,r]of e.entries())if(t===r.value)return n;return null}function jz(e,t,n,r){if(e==null||t==null)return`none`;let[i,a,o]=n===`horizontal`?[`left`,`left`,`right`]:[`top`,`up`,`down`],s=Az(r,e),c=Az(r,t);if(s==null||c==null)return s!==c&&(typeof e==`number`||typeof e==`string`)&&typeof e==typeof t?t>e?o:a:`none`;let l=s.getBoundingClientRect()[i],u=c.getBoundingClientRect()[i];return u<l?a:u>l?o:`none`}var Mz=`data-composite-item-active`;function Nz(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=Zv(),{ref:i,index:a}=WC(e),o=n===a,s=v.useRef(null),c=En(i,s);return{compositeProps:{tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){let e=s.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!o&&!n&&e.focus()}},compositeRef:c,index:a}}var Pz=v.createContext(void 0);function Fz(){let e=v.useContext(Pz);if(e===void 0)throw Error(J(65));return e}var Iz=v.forwardRef(function(e,t){let{className:n,disabled:r=!1,render:i,value:a,id:o,nativeButton:s=!0,style:c,...l}=e,{value:u,getTabPanelIdByValue:d,onValueChange:f,orientation:p,tabActivationDirection:m}=Ez(),{activateOnFocus:h,registerTabResizeObserverElement:g,tabsListElement:_}=Fz(),{highlightedIndex:y,onHighlightedIndexChange:b}=Zv(),x=lc(o),{compositeProps:S,compositeRef:C,index:w}=Nz({metadata:v.useMemo(()=>({disabled:r,id:x,value:a}),[r,x,a])}),T=a===u,E=v.useRef(!1),D=v.useRef(null),O=Y(e=>{D.current?.(),D.current=e?g(e):null});q(()=>{if(E.current){E.current=!1;return}if(!(T&&w>-1&&y!==w))return;let e=_;if(e!=null){let t=at(Un(e));if(t&&ot(e,t))return}r||b(w)},[T,w,y,b,r,_]);let{getButtonProps:k,buttonRef:A}=ey({disabled:r,native:s,focusableWhenDisabled:!0}),j=d(a),M=v.useRef(!1),N=v.useRef(!1);function P(e){f(a,Jt(Xt,e.nativeEvent,void 0,{activationDirection:`none`}))}function F(e){T||r||P(e)}function I(e){T||r||h&&(!M.current||N.current)&&P(e)}function L(e){if(T||r)return;M.current=!0,N.current=e.button===0;let t=Un(e.currentTarget);function n(){M.current=!1,N.current=!1,t.removeEventListener(`pointerup`,n),t.removeEventListener(`pointercancel`,n)}t.addEventListener(`pointerup`,n),t.addEventListener(`pointercancel`,n)}return Hi(`button`,e,{state:{disabled:r,active:T,orientation:p,tabActivationDirection:m},ref:[t,A,C,O],props:[S,{role:`tab`,"aria-controls":j,"aria-selected":T,id:x,onClick:F,onFocus:I,onPointerDown:L,[Mz]:T?``:void 0,onKeyDownCapture(){E.current=!0}},l,k],stateAttributesMapping:Oz})}),Lz=`data-index`,Rz={...Oz,...yt},zz=v.forwardRef(function(e,t){let{className:n,value:r,render:i,keepMounted:a=!1,style:o,...s}=e,{value:c,getTabIdByPanelValue:l,orientation:u,tabActivationDirection:d,registerMountedTabPanel:f}=Ez(),p=lc(),{ref:m,index:h}=WC(),g=r===c,{mounted:_,transitionStatus:y,setMounted:b}=Na(g),x=!_,S=l(r),C={hidden:x,orientation:u,tabActivationDirection:d,transitionStatus:y},w=v.useRef(null),T=Hi(`div`,e,{state:C,ref:[t,m,w],props:[{"aria-labelledby":S,hidden:x,id:p,role:`tabpanel`,tabIndex:g?0:-1,inert:Kc(!g),[Lz]:h},s],stateAttributesMapping:Rz});return Ra({open:g,ref:w,onComplete(){g||b(!1)}}),q(()=>{if(!(p==null||x&&!a))return f(r,p)},[x,a,r,p,f]),a||_?T:null});function Bz(e){let{loopFocus:t=!0,orientation:n=`both`,grid:r,onLoop:i,direction:a,highlightedIndex:o,onHighlightedIndexChange:s,rootRef:c,enableHomeAndEndKeys:l=!1,stopEventPropagation:u,disabledIndices:d,modifierKeys:f=G}=e,[p,m]=v.useState(0),h=r!=null,g=v.useRef(null),_=En(g,c),y=v.useRef([]),b=v.useRef(!1),x=v.useRef(null),S=o??p,C=Y((e,t=!1)=>{if(x.current=y.current[e]??null,(s??m)(e),t){let t=y.current[e];DC(g.current,t,a,n)}}),w=Y(e=>{if(e.size===0)return;if(b.current){let e=y.current,t=e.indexOf(x.current);if(t===-1){let t=e[S];!t||Or(e,S,d)?C(Vz(e,d)):x.current=t}else t!==S&&C(t);return}b.current=!0;let t=Array.from(e.keys()),r=t.find(e=>e?.hasAttribute(`data-composite-item-active`))??null,i=r?e.get(r)?.index??-1:-1;if(i!==-1)C(i);else if(Or(t,S,d)){let e=Er(t,{disabledIndices:d});Sr(t,e)||C(e)}DC(g.current,r,a,n)});q(()=>{if(d==null||o!=null||!b.current)return;let e=y.current;if(Or(e,S,d)){let t=Er(e,{disabledIndices:d});Sr(e,t)||C(t)}},[d,o,S,y,C]);let T=Y((e,t,n)=>i?i(e,t,n,y):n),E=Y(e=>{let o=e.key===`Home`||e.key===`End`;if(!CC.has(e.key)||!l&&o||Hz(e,f)||!g.current)return;let s=a===`rtl`,c=s?xC:SC,p=s?SC:xC,m=n===`vertical`?bC:c,_=n===`vertical`?yC:p,v=ct(e.nativeEvent);if(v!=null&&EC(v)&&!Xx(v)){let t=v.selectionStart,n=v.selectionEnd,r=v.value;if(t==null||e.shiftKey||t!==n||e.key!==_&&t<r.length||e.key!==m&&t>0)return}let b=S,x=Cr(y,d),w=wr(y,d);r!=null&&(b=r({disabledIndices:d,elementsRef:y,event:e,highlightedIndex:S,loopFocus:t,maxIndex:w,minIndex:x,onLoop:T,orientation:n,rtl:s}));let E=n!==`vertical`&&e.key===c||n!==`horizontal`&&e.key===`ArrowDown`,D=n!==`vertical`&&e.key===p||n!==`horizontal`&&e.key===`ArrowUp`;l&&(e.key===`Home`?b=x:e.key===`End`&&(b=w)),b===S&&(E||D)&&(t&&b===w&&E?(b=x,i&&(b=i(e,S,b,y))):t&&b===x&&D?(b=w,i&&(b=i(e,S,b,y))):b=Er(y.current,{startingIndex:b,decrement:D,disabledIndices:d})),b!==S&&!Sr(y.current,b)&&(u&&e.stopPropagation(),(h||o||E||D)&&e.preventDefault(),C(b,!0),queueMicrotask(()=>{y.current[b]?.focus()}))});return{props:{ref:_,onFocus(e){let t=g.current,n=ct(e.nativeEvent);t&&n!=null&&EC(n)&&n.setSelectionRange(0,n.value.length)},onKeyDown:E},highlightedIndex:S,onHighlightedIndexChange:C,elementsRef:y,onMapChange:w,relayKeyboardEvent:E}}function Vz(e,t){let n=-1;for(let r=0;r<e.length;r+=1){let i=e[r];if(i&&!Or(e,r,t)){if(i.hasAttribute(`data-composite-item-active`))return r;n===-1&&(n=r)}}return Math.max(n,0)}function Hz(e,t){for(let n of wC)if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function Uz(e){let{render:t,className:n,style:r,refs:i=G,props:a=G,state:o=K,stateAttributesMapping:s,highlightedIndex:c,onHighlightedIndexChange:l,orientation:u,grid:d,loopFocus:f,onLoop:p,enableHomeAndEndKeys:m,onMapChange:h,stopEventPropagation:g=!0,rootRef:_,disabledIndices:y,modifierKeys:b,highlightItemOnHover:x=!1,tag:C=`div`,...w}=e,{props:T,highlightedIndex:E,onHighlightedIndexChange:D,elementsRef:O,onMapChange:k,relayKeyboardEvent:A}=Bz({grid:d,loopFocus:f,onLoop:p,orientation:u,highlightedIndex:c,onHighlightedIndexChange:l,rootRef:_,stopEventPropagation:g,enableHomeAndEndKeys:m,direction:Cc(),disabledIndices:y,modifierKeys:b}),j=Hi(C,e,{state:o,ref:i,props:[T,...a,w],stateAttributesMapping:s}),M=v.useMemo(()=>({highlightedIndex:E,onHighlightedIndexChange:D,highlightItemOnHover:x,relayKeyboardEvent:A}),[E,D,x,A]);return(0,S.jsx)(Xv.Provider,{value:M,children:(0,S.jsx)(HS,{elementsRef:O,onMapChange:e=>{h?.(e),k(e)},children:j})})}var Wz=v.forwardRef(function(e,t){let{activateOnFocus:n=!1,className:r,loopFocus:i=!0,render:a,style:o,...s}=e,{orientation:c,setTabMap:l,tabActivationDirection:u}=Ez(),[d,f]=v.useState(0),[p,m]=v.useState(null),h=v.useRef(new Set),g=v.useRef(new Set),_=v.useRef(null);q(()=>{if(typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{h.current.forEach(e=>{e()})});return _.current=e,p&&e.observe(p),g.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),_.current=null}},[p]);let y=Y(e=>(h.current.add(e),()=>{h.current.delete(e)})),b=Y(e=>(g.current.add(e),_.current?.observe(e),()=>{g.current.delete(e),_.current?.unobserve(e)})),x={orientation:c,tabActivationDirection:u},C={"aria-orientation":c===`vertical`?`vertical`:void 0,role:`tablist`},w=v.useMemo(()=>({activateOnFocus:n,registerIndicatorUpdateListener:y,registerTabResizeObserverElement:b,tabsListElement:p}),[n,y,b,p]);return(0,S.jsx)(Pz.Provider,{value:w,children:(0,S.jsx)(Uz,{render:a,className:r,style:o,state:x,refs:[t,m],props:[C,s],stateAttributesMapping:Oz,highlightedIndex:d,enableHomeAndEndKeys:!0,loopFocus:i,orientation:c,onHighlightedIndexChange:f,onMapChange:l,disabledIndices:G})})});function Gz({className:e,orientation:t=`horizontal`,...n}){return(0,S.jsx)(kz,{"data-slot":`tabs`,"data-orientation":t,className:X(`group/tabs flex gap-2 data-horizontal:flex-col`,e),...n})}var Kz=Pv(`group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none`,{variants:{variant:{default:`bg-muted`,line:`gap-1 bg-transparent`}},defaultVariants:{variant:`default`}});function qz({className:e,variant:t=`default`,...n}){return(0,S.jsx)(Wz,{"data-slot":`tabs-list`,"data-variant":t,className:X(Kz({variant:t}),e),...n})}function Jz({className:e,...t}){return(0,S.jsx)(Iz,{"data-slot":`tabs-trigger`,className:X(`relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent`,`data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground`,`after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100`,e),...t})}function Yz({className:e,...t}){return(0,S.jsx)(zz,{"data-slot":`tabs-content`,className:X(`flex-1 text-sm outline-none`,e),...t})}var Xz=Object.keys({claude:/usage limit|You've hit your [\w' ]*limit|You've reached your [\w ]*limit|rate_limit_error/i,pi:/usage limit|usage_limit_reached|usage_not_included|rate_limit_exceeded/i}),Zz={claude:[`low`,`medium`,`high`,`xhigh`,`max`],pi:[`off`,`minimal`,`low`,`medium`,`high`,`xhigh`,`max`]},Qz=Pv(`flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1`,{variants:{orientation:{horizontal:`*:data-slot:rounded-r-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-lg! [&>[data-slot]~[data-slot]]:rounded-l-none [&>[data-slot]~[data-slot]]:border-l-0`,vertical:`flex-col *:data-slot:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-lg! [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0`}},defaultVariants:{orientation:`horizontal`}});function $z({className:e,orientation:t,...n}){return(0,S.jsx)(`div`,{role:`group`,"data-slot":`button-group`,"data-orientation":t,className:X(Qz({orientation:t}),e),...n})}var eB=v.createContext(void 0);function tB(e){let t=v.useContext(eB);if(t===void 0&&!e)throw Error(J(33));return t}var nB=v.createContext(void 0);function rB(e){let t=v.useContext(nB);if(t===void 0&&!e)throw Error(J(36));return t}var iB=v.createContext(void 0);function aB(e=!0){let t=v.useContext(iB);if(t===void 0&&!e)throw Error(J(25));return t}var oB=v.createContext(null);function sB(e=`root`){let t=v.useContext(oB),n=v.useContext(nB);return t===null||n===void 0?null:(e===`submenu-trigger`?n.virtualFocus||n.parentVirtualFocus:n.virtualFocus)?t:null}var cB={visible:!0,ref:null};function lB(){return cB}function uB(e,t,n=`root`){let r=sB(n),i=((n===`submenu-trigger`?r?.useSubmenuTrigger:r?.useItem)??lB)({label:e.label,children:e.children,render:e.render}),a=En(t,i.ref);return{visible:i.visible,ref:a,props:i.props}}function dB(e){e.preventDefault()}function fB(e){let{closeOnClick:t,highlighted:n,id:r,nodeId:i,store:a,typingRef:o,itemRef:s,itemMetadata:c}=e,l=rB(),u=aB(!0),d=c.type===`submenu-trigger`,f=d?l.parentVirtualFocus:l.virtualFocus,p=(d&&l.parent.type===`menu`?l.parent.store:l.store).useState(`webkitAriaSelected`,n),{events:m}=a.useState(`floatingTreeRoot`),h=a.useState(`open`),g=u!==void 0,_=!f&&h&&n?0:-1;return v.useMemo(()=>({id:r,role:`menuitem`,tabIndex:_,"aria-selected":p,onMouseDown:f?dB:void 0,onKeyDown(e){e.key===` `&&o?.current&&e.preventDefault()},onMouseMove(e){i&&m.emit(`itemhover`,{nodeId:i,target:e.currentTarget})},onClick(e){t&&m.emit(`close`,{domEvent:e.nativeEvent,reason:tn})},onMouseUp(e){if(u){let t=u.initialCursorPointRef.current;if(u.initialCursorPointRef.current=null,g&&t&&Math.abs(e.clientX-t.x)<=1&&Math.abs(e.clientY-t.y)<=1||g&&!Se&&e.button===2)return}s.current&&a.context.allowMouseUpTriggerRef.current&&(!g||e.button===2)&&c.type===`regular-item`&&$v(s.current,e,{detail:1,pointerType:`mouse`})}}),[t,_,r,m,i,a.context.allowMouseUpTriggerRef,o,s,u,g,c.type,p,f])}var pB={type:`regular-item`};function mB(e){let{closeOnClick:t,disabled:n,highlighted:r,id:i,store:a,typingRef:o=a.context.typingRef,nativeButton:s,itemMetadata:c,nodeId:l}=e,u=v.useRef(null),{getButtonProps:d,buttonRef:f}=ey({disabled:n,focusableWhenDisabled:!0,native:s,composite:!0}),p=fB({closeOnClick:t,highlighted:r,id:i,nodeId:l,store:a,typingRef:o,itemRef:u,itemMetadata:c}),m=v.useCallback(e=>ki(p,{onMouseEnter(e){c.type===`submenu-trigger`&&c.setActive(e.nativeEvent)}},e,d),[p,d,c]),h=En(u,f);return v.useMemo(()=>({getItemProps:m,itemRef:h}),[m,h])}var hB=v.createContext(void 0);function gB(){let e=v.useContext(hB);if(e===void 0)throw Error(J(31));return e}var _B=v.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,[o,s]=v.useState(void 0),c=Hi(`div`,e,{ref:t,props:{role:`group`,"aria-labelledby":o,...a}});return(0,S.jsx)(hB.Provider,{value:s,children:c})}),vB=v.forwardRef(function(e,t){let n=sB()?.Group??_B;return(0,S.jsx)(n,{...e,ref:t})}),yB=v.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=lc(a),c=gB();return q(()=>(c(s),()=>{c(e=>e===s?void 0:e)}),[c,s]),Hi(`div`,e,{ref:t,props:{id:s,"aria-hidden":!0,...o}})}),bB=v.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!0,style:l,...u}=e,{store:d}=rB(),f=WC({guess:!0,label:a}),p=lc(i),m=d.useState(`disabled`),h=d.useState(`isActive`,f.index),g=d.useState(`floatingNodeId`),_=d.useState(`itemProps`),v=s||m,{getItemProps:y,itemRef:b}=mB({closeOnClick:c,disabled:v,highlighted:h,id:p,store:d,nativeButton:o,nodeId:g,itemMetadata:pB});return Hi(`div`,e,{state:{disabled:v,highlighted:h},props:[_,u,y],ref:[b,t,f.ref]})}),xB=v.forwardRef(function(e,t){let n=uB(e,t);return n.visible?(0,S.jsx)(bB,{...e,ref:n.ref}):null}),SB=v.createContext(void 0);function CB(){return v.useContext(SB)}function wB(e,t){let n=Ki(e.render);if(v.isValidElement(n)){let e=n.props;if(Object.hasOwn(e,`id`))return e.id??``}return e.id??t}function TB(e,t,n){let r=wB(e,t),i=r===t?void 0:r;return[r,v.useCallback(e=>n?.(e?i:void 0),[i,n])]}function EB(e,t,n){let r=Ki(e.render),i=v.isValidElement(r)?r.props:void 0,a=e[`aria-label`]??i?.[`aria-label`],o=e[`aria-labelledby`]??i?.[`aria-labelledby`];return o==null&&!a&&(o=t?t.id||void 0:n||void 0),o}var DB=v.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,id:o,initialFocus:s,...c}=e,{store:l,defaultFloatingId:u,setRenderedFloatingId:d,virtualFocus:f,orientation:p}=rB(),m=CB(),{side:h,align:g}=tB(),_=vC(!0)!=null,y=l.useState(`open`),b=l.useState(`transitionStatus`),x=l.useState(`popupProps`),C=l.useState(`mounted`),w=l.useState(`instantType`),T=l.useState(`activeTriggerElement`),E=l.useState(`parent`),D=l.useState(`lastOpenChangeReason`),O=l.useState(`rootId`),k=l.useState(`floatingRootContext`),A=l.useState(`floatingTreeRoot`),j=l.useState(`closeDelay`),M=l.useState(`hoverEnabled`),N=l.useState(`disabled`),P=l.useState(`openMethod`),F=l.useState(`activeTriggerId`),I=l.useState(`listElement`),[L,R]=TB(e,u,d),z=EB(e,T,F),B=E.type===`menu`?m:void 0,V=E.type===`context-menu`,H=s??E.type!==`menu`;s===void 0&&I&&E.type!==`menu`&&(H=()=>l.state.activeIndex===null&&I),Ra({open:y,ref:l.context.popupRef,onComplete(){y&&l.context.onOpenChangeComplete?.(!0)}}),v.useEffect(()=>{function e(e){l.setOpen(!1,Jt(e.reason,e.domEvent))}return A.events.on(`close`,e),()=>{A.events.off(`close`,e)}},[A.events,l]),No(k,{enabled:M&&!N&&!V&&E.type!==`menubar`,closeDelay:j});let U=l.useStateSetter(`popupElement`),{parentVirtualFocusRef:ee,handleFocus:te}=(v.useContext(oB)?.useParentHandoff??kB)(l,E,y,f),ne=Hi(`div`,e,{state:{transitionStatus:b,side:h,align:g,open:y,nested:E.type===`menu`,instant:w},ref:[t,l.context.popupRef,U,R],stateAttributesMapping:Nt,props:[x,{id:L,...I?{role:`presentation`}:{role:`menu`,"aria-orientation":p===`horizontal`?`horizontal`:void 0,"aria-labelledby":z},onKeyDown(e){B?.onPopupKeyDown?.(e),_&&CC.has(e.key)&&e.stopPropagation()},onFocus:te},Bc(b),c,{"data-rootownerid":O}]}),W=E.type===void 0||V;(T||E.type===`menubar`&&D!==`outside-press`)&&(W=!0);let re=B?.getReturnElement??ee;return(0,S.jsx)(Ca,{context:k,openInteractionType:P,modal:V,disabled:!C,returnFocus:a??re??W,explicitReturnFocus:a===void 0&&re?!1:void 0,initialFocus:H,restoreFocus:!0,getInsideElements:E.type===void 0?()=>[l.context.beforeTriggerFocusGuardRef.current]:void 0,externalTree:E.type===`menubar`?void 0:A,previousFocusableElement:T,nextFocusableElement:E.type===void 0?l.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:l.context.beforeContentFocusGuardRef,children:ne})}),OB={parentVirtualFocusRef:void 0,handleFocus:void 0};function kB(){return OB}var AB=v.forwardRef(function(e,t){let n=sB()?.Popup??DB;return(0,S.jsx)(n,{...e,ref:t})}),jB=v.createContext(void 0);function MB(){let e=v.useContext(jB);if(e===void 0)throw Error(J(32));return e}var NB=v.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i,parent:a}=rB();if(!(i.useState(`mounted`)||n))return null;let o=a.type===`menu`||a.type===`menubar`?`group`:void 0;return(0,S.jsx)(jB.Provider,{value:n,children:(0,S.jsx)(ia,{ref:t,...r,portalOwnerRole:o})})});function PB(e){let{store:t,domReference:n,positionerElement:r,open:i}=e,a=v.useRef(null),o=v.useRef(null),s=La(r);q(()=>{i||(o.current?.abort(),o.current=null,t.state.instantType===`trigger-change`&&t.set(`instantType`,void 0))},[i,t]),q(()=>{let e=n,r=a.current;if(e&&(a.current=e),!r||!e||e===r||!t.select(`open`))return;t.set(`instantType`,void 0);let i=new AbortController;return o.current=i,s(()=>{t.select(`open`)&&t.set(`instantType`,`trigger-change`)},i.signal),()=>{i.abort()}},[n,s,t])}var FB=v.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o,align:s,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=Zi,style:g,..._}=e,{store:y,virtualFocus:b,syncHighlightedItem:x}=rB(),C=MB(),w=aB(!0),T=y.useState(`parent`),E=y.useState(`floatingRootContext`),D=y.useState(`floatingTreeRoot`),O=y.useState(`mounted`),k=y.useState(`open`),A=y.useState(`modal`),j=y.useState(`openMethod`),M=y.useState(`activeTriggerElement`),N=y.useState(`transitionStatus`),P=y.useState(`positionerElement`),F=y.useState(`instantType`),I=y.useState(`adaptiveOrigin`),L=y.useState(`lastOpenChangeReason`),R=y.useState(`floatingNodeId`),z=y.useState(`floatingParentNodeId`),B=E.useState(`domReferenceElement`),V=n,H=c,U=l,ee=s,te=h;T.type===`context-menu`&&(V=n??T.context?.anchor,ee??=`start`,!o&&ee!==`center`&&(U=e.alignOffset??2,H=e.sideOffset??-5));let ne=o,W=ee;T.type===`menu`?(ne??=`inline-end`,W??=`start`,te=e.collisionAvoidance??Qi):T.type===`menubar`&&(ne??=T.context.orientation===`vertical`?`inline-end`:`bottom`,W??=`start`);let re=T.type===`context-menu`,ie=Lc({anchor:V,floatingRootContext:E,positionMethod:w?`fixed`:r,mounted:O,side:ne,sideOffset:H,align:W,alignOffset:U,arrowPadding:re?0:f,collisionBoundary:u,collisionPadding:d,sticky:p,nodeId:R,keepMounted:C,disableAnchorTracking:m,collisionAvoidance:te,shift:re?{crossAxis:!(`side`in te&&te.side===`flip`),rootBoundary:`layoutViewport`}:void 0,externalTree:D,adaptiveOrigin:I,lazyFlip:b?`placement`:!1});v.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===R&&y.set(`hoverEnabled`,!1),e.nodeId!==R&&e.parentNodeId===y.select(`floatingParentNodeId`)&&y.setOpen(!1,Jt(mn)))}return D.events.on(`menuopenchange`,e),()=>{D.events.off(`menuopenchange`,e)}},[y,D.events,R]),v.useEffect(()=>{if(y.select(`floatingParentNodeId`)==null)return;function e(e){if(e.open||e.nodeId!==y.select(`floatingParentNodeId`))return;let t=e.reason??`sibling-open`;y.setOpen(!1,Jt(t))}return D.events.on(`menuopenchange`,e),()=>{D.events.off(`menuopenchange`,e)}},[D.events,y]);let ae=fe();v.useEffect(()=>{k||ae.clear()},[k,ae]),v.useEffect(()=>{function e(e){if(k&&e.nodeId===y.select(`floatingParentNodeId`)){if(e.target&&M&&M!==e.target){let e=y.select(`closeDelay`);e>0?ae.isStarted()||ae.start(e,()=>{y.setOpen(!1,Jt(mn))}):y.setOpen(!1,Jt(mn))}else ae.clear()}}return D.events.on(`itemhover`,e),()=>{D.events.off(`itemhover`,e)}},[D.events,k,M,y,ae]),v.useEffect(()=>{let e={open:k,nodeId:R,parentNodeId:z,reason:y.select(`lastOpenChangeReason`)};D.events.emit(`menuopenchange`,e)},[D.events,k,y,R,z]),PB({store:y,domReference:B,positionerElement:P,open:k});let G={open:k,side:ie.side,align:ie.align,anchorHidden:ie.anchorHidden,nested:T.type===`menu`,instant:F},K=T.type===`menubar`&&T.context.modal;fC(k&&(K||A&&L!==`trigger-hover`),j===`touch`,P,M);let q=Vc(e,G,{styles:ie.positionerStyles,transitionStatus:N,props:_,refs:[t,y.useStateSetter(`positionerElement`)],hidden:!O,inert:!k}),oe=O&&T.type!==`menu`&&(T.type!==`menubar`&&A&&L!==`trigger-hover`||T.type===`menubar`&&T.context.modal),J=null;return T.type===`menubar`?J=T.context.contentElement:T.type===void 0&&(J=M),(0,S.jsxs)(eB.Provider,{value:ie,children:[oe&&(0,S.jsx)(ZS,{ref:T.type===`context-menu`||T.type===`nested-context-menu`?T.context.internalBackdropRef:null,inert:Kc(!k),cutout:J}),(0,S.jsx)(fa,{id:R,children:(0,S.jsx)(HS,{elementsRef:y.context.itemDomElements,labelsRef:y.context.itemLabels,onMapChange:x,children:q})})]})}),IB=v.createContext(null);function LB(e){let t=v.useContext(IB);if(t===null&&!e)throw Error(J(5));return t}function RB(e){return e==null?Xt:e.type.startsWith(`key`)?dn:e.type.startsWith(`mouse`)||e.type.startsWith(`pointer`)?fn:Xt}var zB={...Co,disabled:e=>e.parent.type===`menubar`&&e.parent.context.disabled||e.disabled,modal:e=>(e.parent.type===void 0||e.parent.type===`context-menu`)&&(e.modal??!0),openMethod:e=>e.openMethod,keyboardOpen:e=>e.keyboardOpen,allowMouseEnter:e=>e.allowMouseEnter,highlightItemOnHover:e=>e.highlightItemOnHover,parent:e=>e.parent,rootId:e=>e.parent.type===`menu`?e.parent.store.select(`rootId`):e.parent.type===void 0?e.rootId:e.parent.context.rootId,activeIndex:e=>e.activeIndex,listElement:e=>e.listElement,triggerControlsId:(e,t)=>{let n=Co.triggerPopupId(e,t);return n?e.listElement?.id||n:void 0},filterTriggerProps:e=>e.filterTriggerProps,inputProps:e=>e.inputProps,webkitAriaSelected:(e,t)=>we&&e.inputFocused&&t?!0:void 0,highlightedItemId:e=>e.highlightedItem?.id||void 0,isActive:(e,t)=>e.activeIndex===t,hoverEnabled:e=>e.hoverEnabled,instantType:e=>e.instantType===`trigger-change`&&!Co.open(e)?void 0:e.instantType,lastOpenChangeReason:e=>e.openChangeReason,floatingTreeRoot:e=>e.parent.type===`menu`?e.parent.store.select(`floatingTreeRoot`):e.floatingTreeRoot,floatingNodeId:e=>e.floatingNodeId,floatingParentNodeId:e=>e.floatingParentNodeId,itemProps:e=>e.itemProps,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin,keyboardEventRelay:e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type===`menu`)return e.parent.store.select(`keyboardEventRelay`)}},BB=class extends mo{constructor(e,t,n=!1){let r=new eo,i=HB(r,t,n,e);super(i,VB(r),zB),this.observe(`parent`,e=>{e.type===`menu`?this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef:e.type!==void 0&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef)})}subscribeToParentMenu(){let e=this.state.parent;if(e.type!==`menu`)return;let t=e.store.select(`rootId`),n=e.store.select(`floatingTreeRoot`),r=e.store.select(`keyboardEventRelay`);return e.store.subscribe(()=>{let i=e.store.select(`rootId`),a=e.store.select(`floatingTreeRoot`),o=e.store.select(`keyboardEventRelay`);(t!==i||n!==a||r!==o)&&(t=i,n=a,r=o,this.notifyAll())})}setOpen(e,t){this.state.floatingRootContext.context.events.emit(`setOpen`,{open:e,eventDetails:t})}setActiveIndex(e,t,n){if(this.state.activeIndex!==e){let r=(e===null?void 0:this.context.itemDomElements.current[e])===this.context.reportedItem;this.context.highlightReason=r?`none`:t,this.context.highlightEvent=r?void 0:n}this.set(`activeIndex`,e)}highlightItem(e,t,n){let r=this.context.itemDomElements.current.indexOf(e);r>-1&&this.setActiveIndex(r,t,n)}};function VB(e){return{positionerRef:v.createRef(),popupRef:v.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},highlightReason:`none`,highlightEvent:void 0,reportedItem:void 0,allowMouseUpTriggerRef:{current:!1},virtualFocusRef:void 0,triggerFocusTargetRef:v.createRef(),beforeTriggerFocusGuardRef:v.createRef(),beforeContentFocusGuardRef:v.createRef(),onOpenChangeComplete:void 0,triggerElements:e}}function HB(e,t,n=!1,r){return{..._o(e,t,n),disabled:!1,modal:!0,openMethod:null,keyboardOpen:!1,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,listElement:null,filterTriggerProps:K,inputProps:K,inputFocused:!1,highlightedItem:void 0,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new oa,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:K,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...r}}var UB=v.createContext(null);function WB(e,t){return(e===`trigger-press`||e===`item-press`)&&t?.detail===0}function GB(e,t){return e===`list-navigation`||WB(e,t)}var KB=W(function(e){let{children:t,open:n,onOpenChange:r,onOpenChangeComplete:i,onItemHighlighted:a,defaultOpen:o=!1,disabled:s=!1,modal:c,loopFocus:l=!0,orientation:u=`vertical`,actionsRef:d,closeParentOnEsc:f=!1,handle:p,triggerId:m,defaultTriggerId:h=null,highlightItemOnHover:g=!0,isSubmenu:_=!1,virtualFocus:y=!1,virtualFocusRef:b,allowEscape:x=!0,resetOnPointerLeave:C=!0}=e,w=aB(!0),T=rB(!0),E=LB(!0),D=T?.store,O=T?.virtualFocus??!1,k=v.useMemo(()=>_&&D?{type:`menu`,store:D}:E?{type:`menubar`,context:E}:w&&!D?{type:`context-menu`,context:w}:{type:void 0},[w,D,E,_]),A=lc(),j=lc(),[M,N]=v.useState(void 0),P=(M??j)||void 0,F=la(),I=k.type===`menu`?k.store:void 0,L=(n??o)&&I?.state.transitionStatus===`starting`,R=H(()=>L?I?.state.instantType:void 0).current,z=H(()=>{let e=new BB({open:o,openProp:n,activeTriggerId:h,triggerIdProp:m,parent:k,disabled:s,highlightItemOnHover:g,modal:k.type===void 0?c:void 0,rootId:A,instantType:R},P,F!=null);return e.context.virtualFocusRef=b,e}).current;z.useControlledProp(`openProp`,n),z.useControlledProp(`triggerIdProp`,m),z.useContextCallback(`onOpenChangeComplete`,i);let B=z.useState(`floatingTreeRoot`),V=da(B),U=z.useState(`open`),ee=z.useState(`activeTriggerElement`),te=z.useState(`positionerElement`),ne=z.useState(`hoverEnabled`),W=z.useState(`disabled`),re=z.useState(`lastOpenChangeReason`),ie=z.useState(`parent`),ae=z.useState(`activeIndex`),oe=z.useState(`keyboardOpen`),J=z.useState(`payload`),se=z.useState(`floatingParentNodeId`),ce=v.useRef(null),le=v.useRef(ie.type!==`context-menu`),ue=fe(),de=v.useRef(!0),pe=fe(),me=se!=null,{openMethod:he,triggerProps:ge}=CS(U);z.useSyncedValues({disabled:s,highlightItemOnHover:g,modal:ie.type===void 0?c:void 0,openMethod:he,rootId:A}),Xa(z);let{forceUnmount:_e,transitionStatus:ve}=Za(U,z,()=>{z.set(`allowMouseEnter`,!1)},L),ye=La(z.context.popupRef);v.useEffect(()=>{if(R===void 0)return;let e=()=>{z.state.instantType===R&&z.set(`instantType`,void 0)};if(!U){e();return}if(ve!==void 0)return;if(z.context.popupRef.current==null){e();return}let t=new AbortController;return ye(e,t.signal),()=>{t.abort()}},[R,U,ve,ye,z]),q(()=>{w&&!T?z.update({parent:{type:`context-menu`,context:w},floatingNodeId:V,floatingParentNodeId:F}):(T||!z.select(`activeTriggerElement`))&&z.update({floatingNodeId:V,floatingParentNodeId:F})},[w,T,V,F,ee,z]),v.useEffect(()=>{U||(ce.current=null),ie.type===`context-menu`&&(U?ue.start(500,()=>{le.current=!0}):(ue.clear(),le.current=!1))},[ue,U,ie.type]),q(()=>{!U&&!ne&&z.set(`hoverEnabled`,!0)},[U,ne,z]);let be=Y((e,t)=>{let n=t.reason;if(!e&&!z.select(`open`)||U===e&&t.trigger===ee&&re===n)return;let i=qa(t);if(!e&&t.trigger==null&&(t.trigger=ee??void 0),r?.(e,t),t.isCanceled)return;z.state.floatingRootContext.dispatchOpenChange(e,t);let a=t.event;if(e===!1&&n!==`item-press`&&a?.type===`click`&&a.pointerType===`touch`&&!de.current)return;e&&n===`trigger-focus`?(de.current=!1,pe.start(300,()=>{de.current=!0})):(de.current=!0,pe.clear());let o=!e&&(n===`escape-key`||n==null);ce.current=t.event;let s=Ka(z.state,e,t.trigger,i());s.openChangeReason=n,s.keyboardOpen=e&&GB(n,a),s.instantType=ie.type===`menubar`&&(n===`trigger-focus`||n===`focus-out`||n===`trigger-hover`||n===`list-navigation`||n===`sibling-open`)?`group`:WB(n,a)?`click`:o?`dismiss`:void 0,z.update(s)}),xe=Ma({popupStore:z,floatingRootContext:z.state.floatingRootContext,floatingId:P,nested:F!=null,onOpenChange:be}),Se=xe.context.events;q(()=>{let e=({open:e,eventDetails:t})=>be(e,t);return Se.on(`setOpen`,e),()=>{Se?.off(`setOpen`,e)}},[Se,be]),q(()=>z.subscribeToParentMenu(),[z]);let Ce=v.useCallback(()=>{z.setOpen(!1,Jt(vn))},[z]);v.useImperativeHandle(d,()=>({unmount:_e,close:Ce}),[_e,Ce]);let we;ie.type===`context-menu`&&(we=ie.context),v.useImperativeHandle(we?.positionerRef,()=>te,[te]),v.useImperativeHandle(we?.actionsRef,()=>({setOpen:be}),[be]);let Te=Aa(xe,{enabled:!W,bubbles:{escapeKey:f&&ie.type===`menu`},outsidePress(){return ie.type!==`context-menu`||ce.current?.type===`contextmenu`||le.current},externalTree:me?B:void 0}),Ee=Cc(),De=Ho(xe,{enabled:!W,listRef:z.context.itemDomElements,activeIndex:ae,virtual:y,nested:ie.type===`menubar`||!y&&ie.type!==void 0,parentOrientation:ie.type===`menubar`?ie.context.orientation:void 0,loopFocus:l,focusItemOnOpen:y?oe:void 0,allowEscape:y&&l&&x,orientation:u,triggerOrientation:y?`vertical`:u,rtl:Ee===`rtl`,disabledIndices:G,onNavigate(e,t){z.setActiveIndex(e,RB(t),t?.nativeEvent)},openOnArrowKeyDown:ie.type!==`context-menu`&&!(y&&_),externalTree:!y&&me?B:void 0,nestedReturnFocusRef:I?.context.virtualFocusRef,focusItemOnHover:g,resetOnPointerLeave:C}),Oe=v.useCallback(e=>{z.context.typingRef.current=e},[z]),ke=Uo(xe,{enabled:!W&&!y,listRef:z.context.itemLabels,elementsRef:z.context.itemDomElements,activeIndex:ae,resetMs:500,onMatch:(e,t)=>{U&&e!==ae&&z.setActiveIndex(e,dn,t.nativeEvent)},onTyping:Oe}),Ae=Y(a),je=v.useRef(-1),Me=Y(()=>{let e=z.state.activeIndex,t=e===null?void 0:z.context.itemDomElements.current[e]??void 0;if(t?.isConnected===!1)return;let n=t===void 0?-1:e;if(je.current===n&&z.context.reportedItem===t)return;je.current=n,z.context.reportedItem=t,y&&z.set(`highlightedItem`,t);let{highlightReason:r,highlightEvent:i}=z.context;z.context.highlightReason=Xt,z.context.highlightEvent=void 0,a&&Ae(t,Yt(r,i,{label:t===void 0?void 0:z.context.itemLabels.current[n]??void 0}))});q(()=>{Me()},[ae,Me]);let Ne=v.useMemo(()=>{if(!y)return De.reference;if(!De.trigger)return K;let{onFocus:e,...t}=De.trigger;return t},[y,De.reference,De.trigger]);z.useSyncedValue(`inputProps`,y?De.reference??K:K);let Pe=v.useMemo(()=>{let e=ki(ke.reference,Ne,Te.reference,{onMouseMove(){z.set(`allowMouseEnter`,!0)}},ge);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=U,e},[z,ke.reference,Ne,Te.reference,ge,U]),Fe=v.useMemo(()=>{let e=ki(De.trigger,Te.trigger,ge);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=!1,e},[De.trigger,Te.trigger,ge]);H(()=>(z.update({inactiveTriggerProps:Fe}),null)),Qa(z,{floatingRootContext:xe,activeTriggerProps:Pe,inactiveTriggerProps:Fe,popupProps:v.useMemo(()=>ki(Ba,{onMouseMove(){z.set(`allowMouseEnter`,!0),ie.type===`menu`&&z.set(`hoverEnabled`,!1)},onClick(){z.select(`hoverEnabled`)&&z.set(`hoverEnabled`,!1)},onKeyDown(e){let t=z.select(`keyboardEventRelay`);t&&!e.isPropagationStopped()&&t(e)}},ke.floating,De.floating,Te.floating),[ie.type,z,ke.floating,De.floating,Te.floating]),itemProps:De.item??K});let Ie=v.useMemo(()=>({store:z,parent:k,orientation:u,loopFocus:l,allowEscape:x,defaultFloatingId:j,setRenderedFloatingId:N,virtualFocus:y,parentVirtualFocus:O,syncHighlightedItem:Me}),[z,k,u,l,x,j,y,O,Me]),Le=typeof t==`function`?t({payload:J}):t,Re=(0,S.jsxs)(nB.Provider,{value:Ie,children:[p&&(0,S.jsx)(Ua,{handle:p,store:z}),Le]});return(ie.type===void 0||ie.type===`context-menu`)&&(Re=(0,S.jsx)(pa,{externalTree:B,children:Re})),Re});function qB(e){let t=v.useContext(UB);if(t===null)return(0,S.jsx)(KB,{...e});let n=t.Root;return(0,S.jsx)(UB.Provider,{value:null,children:(0,S.jsx)(n,{...t.options,...e})})}function JB(e){let{render:t,className:n,style:r,state:i=K,props:a=G,refs:o=G,metadata:s,stateAttributesMapping:c,tag:l=`div`,...u}=e,{compositeProps:d,compositeRef:f}=Nz({metadata:s});return Hi(l,e,{state:i,ref:[f,...o],props:[d,...a,u],stateAttributesMapping:c})}function YB(e){if(Be(e)&&e.hasAttribute(`data-rootownerid`))return e.getAttribute(`data-rootownerid`);if(!Qe(e))return YB(tt(e))}function XB(e,t){function n(n,r,i){let a=n.currentTarget;R.flushSync(()=>{e.setOpen(!1,Jt(cn,n.nativeEvent,a))}),Xr(a.isConnected?a:t.current,r,i)?.focus()}function r(t){n(t,-1,e.select(`positionerElement`))}function i(t){let r=e.select(`positionerElement`);r&&Zr(t,r)?e.context.beforeContentFocusGuardRef.current?.focus():n(t,1,r)}return{handlePreFocusGuardFocus:r,handleFocusTargetFocus:i}}function ZB(e){let{enabled:t=!0,mouseDownAction:n,open:r}=e,i=v.useRef(!1);return v.useMemo(()=>t?{onMouseDown:e=>{(n===`open`&&!r||n===`close`&&r)&&(i.current=!0,Un(e.currentTarget).addEventListener(`click`,()=>{i.current=!1},{once:!0}))},onClick:e=>{i.current&&(i.current=!1,e.preventBaseUIHandler())}}:K,[t,n,r])}var QB=re(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,id:s,openOnHover:c,delay:l=100,closeDelay:u=0,handle:d,payload:f,...p}=e,m=rB(!0),h=wo(d)??m?.store;if(!h)throw Error(J(85));let g=lc(s),_=h.useState(`isTriggerActive`,g),y=h.useState(`floatingRootContext`),b=h.useState(`isOpenedByTrigger`,g),x=h.useState(`triggerControlsId`,g),C=v.useRef(null),w=eV(),T=Zv(!0),E=ua(),D=v.useMemo(()=>E??new oa,[E]),{registerTrigger:O,isMountedByThisTrigger:k}=Ya(g,C,h,{payload:f,closeDelay:u,parent:w,floatingTreeRoot:D,floatingNodeId:da(D),floatingParentNodeId:la(),keyboardEventRelay:T?.relayKeyboardEvent}),A=w.type===`menubar`,j=h.useState(`disabled`),M=a||j||A&&w.context.disabled,{getButtonProps:N,buttonRef:P}=ey({disabled:M,native:o});v.useEffect(()=>{!b&&w.type===void 0&&(h.context.allowMouseUpTriggerRef.current=!1)},[h,b,w.type]);let F=v.useRef(null),I=fe(),L=Y(e=>{if(!F.current)return;I.clear(),h.context.allowMouseUpTriggerRef.current=!1;let t=e.target;ot(F.current,t)||ot(h.select(`positionerElement`),t)||t===F.current||(t==null||YB(t)!==h.select(`rootId`))&&(AS(e,F.current)||D.events.emit(`close`,{domEvent:e,reason:pn}))});v.useEffect(()=>{let e=Un(F.current);if(b&&h.select(`lastOpenChangeReason`)===`trigger-hover`)return e.addEventListener(`mouseup`,L,{once:!0}),()=>{e.removeEventListener(`mouseup`,L)}},[b,L,h]);let R=A&&w.context.hasSubmenuOpen,z=Fo(y,{enabled:(c??R)&&!M&&(!A||R&&!k),handleClose:Zo({blockPointerEvents:!A}),mouseOnly:!0,move:!1,restMs:w.type===void 0?l:void 0,delay:{close:u},triggerElementRef:C,externalTree:D,isActiveTrigger:_,isClosing:()=>h.select(`transitionStatus`)===`ending`}),B=$B(b,h.select(`lastOpenChangeReason`)),V=wa(y,{enabled:!M,event:b&&A?`click`:`mousedown`,toggle:!0,ignoreMouse:!1,stickIfOpen:w.type===void 0&&B}),H=Do(y,{enabled:!M&&R}),U=ZB({open:b,enabled:A,mouseDownAction:`open`}),ee=v.useMemo(()=>ki(H.reference,V.reference),[H.reference,V.reference]),te=h.useState(`triggerProps`,k),ne=h.useState(`filterTriggerProps`),{handlePreFocusGuardFocus:W,handleFocusTargetFocus:re}=XB(h,C),ie={disabled:M,open:b},ae=[F,t,P,O,C],G=[ee,z??K,te,{"aria-haspopup":`menu`,"aria-controls":x,id:g,onMouseDown:e=>{h.select(`open`)||(I.start(200,()=>{h.context.allowMouseUpTriggerRef.current=!0}),Un(e.currentTarget).addEventListener(`mouseup`,L,{once:!0}))}},ne,A?{role:`menuitem`}:{},U,p,N],q=Hi(`button`,e,{enabled:!A,stateAttributesMapping:jt,state:ie,ref:ae,props:G});return A?(0,S.jsx)(JB,{tag:`button`,render:n,className:r,style:i,state:ie,refs:ae,props:G,stateAttributesMapping:jt}):b?(0,S.jsxs)(v.Fragment,{children:[(0,S.jsx)(qn,{ref:h.context.beforeTriggerFocusGuardRef,onFocus:W},`${g}-pre-focus-guard`),(0,S.jsx)(v.Fragment,{children:q},g),(0,S.jsx)(qn,{ref:h.context.triggerFocusTargetRef,onFocus:re},`${g}-post-focus-guard`)]}):(0,S.jsx)(v.Fragment,{children:q},g)});function $B(e,t){let n=fe(),[r,i]=v.useState(!1);return q(()=>{e&&t===`trigger-hover`?(i(!0),n.start(500,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function eV(){let e=LB(!0);return v.useMemo(()=>e?{type:`menubar`,context:e}:{type:void 0},[e])}function tV(e){return Array.isArray(e)?e.map(e=>tV(e)).join(`,`):e==null?``:String(e)}var nV=new Map;function rV(e={}){let{locale:t,...n}=e,r={usage:`search`,sensitivity:`base`,ignorePunctuation:!0,...n},i=`${tV(t)}|${JSON.stringify(r)}`,a=nV.get(i);if(a)return a;let o=new Intl.Collator(t,r),s={contains(e,t,n){if(!t)return!0;let r=gS(e,n);for(let e=0;e<=r.length-t.length;e+=1)if(o.compare(r.slice(e,e+t.length),t)===0)return!0;return!1},startsWith(e,t,n){if(!t)return!0;let r=gS(e,n);return o.compare(r.slice(0,t.length),t)===0},endsWith(e,t,n){if(!t)return!0;let r=gS(e,n),i=t.length;return r.length>=i&&o.compare(r.slice(r.length-i),t)===0}};return nV.set(i,s),s}var iV=`⁠`;function aV(e){let t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=null;for(;t.nextNode();){let e=t.currentNode;e.nodeValue!==``&&(n=e)}return n}function oV(e=!0){let t=fe(),n=v.useRef(null);return v.useEffect(()=>{if(!e||ye)return;let r=n.current;if(r==null)return;let i=aV(r);if(i==null)return;let a=i.data,o=`${a}${iV}`;return i.nodeValue=o,t.start(200,()=>{i.nodeValue===o&&(i.nodeValue=a)}),()=>{t.clear(),i.nodeValue===o&&(i.nodeValue=a)}},[e,n,t]),n}function sV({...e}){return(0,S.jsx)(qB,{"data-slot":`dropdown-menu`,...e})}function cV({...e}){return(0,S.jsx)(QB,{"data-slot":`dropdown-menu-trigger`,...e})}function lV({align:e=`start`,alignOffset:t=0,side:n=`bottom`,sideOffset:r=4,className:i,...a}){return(0,S.jsx)(NB,{children:(0,S.jsx)(FB,{className:`isolate z-50 outline-none`,align:e,alignOffset:t,side:n,sideOffset:r,children:(0,S.jsx)(AB,{"data-slot":`dropdown-menu-content`,className:X(`z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95`,i),...a})})})}function uV({...e}){return(0,S.jsx)(vB,{"data-slot":`dropdown-menu-group`,...e})}function dV({className:e,inset:t,...n}){return(0,S.jsx)(yB,{"data-slot":`dropdown-menu-label`,"data-inset":t,className:X(`px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7`,e),...n})}function fV({className:e,inset:t,variant:n=`default`,...r}){return(0,S.jsx)(xB,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":n,className:X(`group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive`,e),...r})}function pV({className:e,...t}){return(0,S.jsx)(Bx,{"data-slot":`dropdown-menu-separator`,className:X(`-mx-1 my-1 h-px bg-border`,e),...t})}function mV({className:e,...t}){return(0,S.jsx)(`div`,{role:`list`,"data-slot":`item-group`,className:X(`group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2`,e),...t})}var hV=Pv(`group/item flex w-full flex-wrap items-center rounded-lg border text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted`,{variants:{variant:{default:`border-transparent`,outline:`border-border`,muted:`border-transparent bg-muted/50`},size:{default:`gap-2.5 px-3 py-2.5`,sm:`gap-2.5 px-3 py-2.5`,xs:`gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0`}},defaultVariants:{variant:`default`,size:`default`}});function gV({className:e,variant:t=`default`,size:n=`default`,render:r,...i}){return zv({defaultTagName:`div`,props:ki({className:X(hV({variant:t,size:n,className:e}))},i),render:r,state:{slot:`item`,variant:t,size:n}})}var _V=Pv(`flex shrink-0 items-center justify-center gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start [&_svg]:pointer-events-none`,{variants:{variant:{default:`bg-transparent`,icon:`[&_svg:not([class*='size-'])]:size-4`,image:`size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover`}},defaultVariants:{variant:`default`}});function vV({className:e,variant:t=`default`,...n}){return(0,S.jsx)(`div`,{"data-slot":`item-media`,"data-variant":t,className:X(_V({variant:t,className:e})),...n})}function yV({className:e,...t}){return(0,S.jsx)(`div`,{"data-slot":`item-content`,className:X(`flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none`,e),...t})}function bV({className:e,...t}){return(0,S.jsx)(`div`,{"data-slot":`item-title`,className:X(`line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4`,e),...t})}function xV({className:e,...t}){return(0,S.jsx)(`p`,{"data-slot":`item-description`,className:X(`line-clamp-2 text-left text-sm leading-normal font-normal text-muted-foreground group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,e),...t})}function SV({className:e,...t}){return(0,S.jsx)(`div`,{"data-slot":`item-actions`,className:X(`flex items-center gap-2`,e),...t})}var CV;function wV(e){if(!CV){if(typeof document>`u`)return;CV=document.createElement(`textarea`)}var t=`&${e};`;CV.innerHTML=t;var n=CV.value;return n===t?void 0:n}var Q=32,TV=9,EV=13,DV=10,OV=96,kV=126,AV=91,jV=94,MV=62,NV=35,PV=37,FV=45,IV=61,LV=92,RV=42,zV=95,BV=60,VV=64,HV=93,UV=33,WV=38,GV=58,KV=70,qV=102,JV=104,YV=119,XV=116,ZV=112,QV=115,$V=160,eH=12,tH=44,nH=59,rH=63,iH=46,aH=47,oH=39,sH=34,cH=43,lH=124,uH=123,dH=125,fH=40,pH=41,mH=78,hH=110,gH=79,_H=111,vH=120,yH=88,bH=30,xH=48,SH=57,CH=65,wH=90,TH=97,EH=122,DH=128,OH=32,$={blockQuote:0,breakLine:1,breakThematic:2,codeBlock:3,codeInline:4,footnote:5,footnoteReference:6,frontmatter:7,gfmTask:8,heading:9,htmlBlock:10,htmlComment:11,htmlSelfClosing:12,image:13,link:14,orderedList:15,paragraph:16,ref:17,refCollection:18,table:19,text:20,textFormatted:21,unorderedList:22};function kH(e){if(!XH(e,`---`))return null;let t=3;for(;t<e.length&&(e[t]===` `||e[t]===` `);)t++;if(t<e.length&&e[t]===`\r`&&t++,t>=e.length||e[t]!==`
24
+ `)return null;t++;let n=!1;for(;t<e.length;){let r=t;for(;t<e.length&&e[t]!==`
25
+ `&&e[t]!==`\r`;)t++;if(t>=e.length)break;let i=t;if(e[t]===`\r`&&t++,t<e.length&&e[t]===`
26
+ `&&t++,XH(e,`---`,r))return{endPos:t,hasValidYaml:n};if(!n){let t=gU(e,r,i);if(t<i){let r=e.charCodeAt(t);if(r>=TH&&r<=EH||r>=CH&&r<=wH||r>=xH&&r<=SH||r===zV){for(t++;t<i&&(r=e.charCodeAt(t),r>=TH&&r<=EH||r>=CH&&r<=wH||r>=xH&&r<=SH||r===zV||r===FV||r===iH);)t++;t<i&&e.charCodeAt(t)===GV&&(t++,t>=i?n=!0:(r=e.charCodeAt(t),(r===Q||r===TV)&&(n=!0)))}}}}return null}var AH=/&([a-zA-Z0-9]+|#[0-9]{1,7}|#x[0-9a-fA-F]{1,6});/gi,jH={class:`className`,for:`htmlFor`,allowfullscreen:`allowFullScreen`,allowtransparency:`allowTransparency`,autocomplete:`autoComplete`,autofocus:`autoFocus`,autoplay:`autoPlay`,cellpadding:`cellPadding`,cellspacing:`cellSpacing`,charset:`charSet`,classid:`classId`,colspan:`colSpan`,contenteditable:`contentEditable`,contextmenu:`contextMenu`,crossorigin:`crossOrigin`,enctype:`encType`,formaction:`formAction`,formenctype:`formEncType`,formmethod:`formMethod`,formnovalidate:`formNoValidate`,formtarget:`formTarget`,frameborder:`frameBorder`,hreflang:`hrefLang`,inputmode:`inputMode`,keyparams:`keyParams`,keytype:`keyType`,marginheight:`marginHeight`,marginwidth:`marginWidth`,maxlength:`maxLength`,mediagroup:`mediaGroup`,minlength:`minLength`,novalidate:`noValidate`,radiogroup:`radioGroup`,readonly:`readOnly`,rowspan:`rowSpan`,spellcheck:`spellCheck`,srcdoc:`srcDoc`,srclang:`srcLang`,srcset:`srcSet`,tabindex:`tabIndex`,usemap:`useMap`,viewbox:`viewBox`},MH={};function NH(e){if(!e)return MH;var t={};for(var n in e){var r=jH[n.toLowerCase()];if(r)t[r]=e[n];else{var i=n.indexOf(`:`);i===-1?t[n]=e[n]:t[n.slice(0,i)+n[i+1].toUpperCase()+n.slice(i+2)]=e[n]}}return t}function PH(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)if(PH(e[t]))return!0;return!1}return e!=null&&typeof e!=`boolean`&&e!==``}function FH(e,t){return typeof e==`string`&&!PH(t)?e:void 0}var IH=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s|^<(div|p|h[1-6]|ul|ol|li|blockquote|pre|table|thead|tbody|tr|td|th|dl|dt|dd|hr|address|article|aside|details|dialog|figure|figcaption|footer|form|header|main|menu|nav|section|summary|textarea|fieldset|legend|center|dir|hgroup|marquee|search|output|template)\b)/i;function LH(e){return e.indexOf(`&`)===-1?e:e.replace(AH,(e,t)=>{var n=wV(t);if(n)return n;if(t[0]===`#`){var r=t[1]===`x`||t[1]===`X`?Number.parseInt(t.slice(2),16):Number.parseInt(t.slice(1),10);return r===0||r>=55296&&r<=57343||r>1114111?`�`:r<=65535?String.fromCharCode(r):String.fromCharCode(55296+(r-65536>>10),56320+(r-65536&1023))}return e})}var RH=RegExp(`^[^/?#]*?(javascript|vbscript|data(?!:image)):`,`i`),zH=/[/?#][\s\S]*$/,BH={malformed:3,safe:0,unsafe:1,unsafeDecoded:2},VH=/[^A-Za-z0-9/:]/g,HH=/[%\t\n\r]/;function UH(e){return decodeURIComponent(e).replace(VH,``)}function WH(e){if(RH.test(e))return BH.unsafe;if(!HH.test(e))return BH.safe;try{return RH.test(UH(e.replace(zH,``)))?BH.unsafeDecoded:BH.safe}catch{return BH.malformed}}function GH(e){return WH(e)===BH.safe?e:null}for(var KH={},qH=[192,193,194,195,196,197,224,225,226,227,228,229,230,198],JH=0;JH<qH.length;JH++)KH[qH[JH]]=`a`;for(KH[231]=KH[199]=`c`,KH[240]=KH[208]=`d`,qH=[200,201,202,203,233,232,234,235],JH=0;JH<qH.length;JH++)KH[qH[JH]]=`e`;for(qH=[207,239,206,238,205,237,204,236],JH=0;JH<qH.length;JH++)KH[qH[JH]]=`i`;for(KH[209]=KH[241]=`n`,qH=[248,216,339,338,213,245,212,244,211,243,210,242],JH=0;JH<qH.length;JH++)KH[qH[JH]]=`o`;for(qH=[220,252,219,251,218,250,217,249],JH=0;JH<qH.length;JH++)KH[qH[JH]]=`u`;KH[376]=KH[255]=KH[221]=KH[253]=`y`;function YH(e){for(var t=``,n=-1,r=e.length,i=0;i<r;i++){var a=e.charCodeAt(i);if(a>=TH&&a<=EH||a>=xH&&a<=SH)n<0&&(n=i);else if(a>=CH&&a<=wH)n>=0&&(t+=e.slice(n,i),n=-1),t+=String.fromCharCode(a+OH);else if(a===Q||a===FV)n>=0&&(t+=e.slice(n,i),n=-1),t+=`-`;else{n>=0&&(t+=e.slice(n,i),n=-1);var o=KH[a];o&&(t+=o)}}return n>=0&&(t+=e.slice(n)),t}function XH(e,t,n){return e.startsWith(t,n)}var ZH=new Set([`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`,`circle`,`ellipse`,`line`,`path`,`polygon`,`polyline`,`rect`,`use`,`stop`,`animate`,`set`]);function QH(e){let t=e.toLowerCase();if(ZH.has(t))return!0;let n=t.indexOf(`:`);return n!==-1&&(t=t.slice(n+1),ZH.has(t))}var $H=1,eU=2,tU=4,nU=8,rU=16,iU=32,aU=64,oU=(()=>{var e=new Uint8Array(128),t;for(e[TV]=$H,e[DV]=$H|eU,e[eH]=$H,e[EV]=$H|eU,e[Q]=$H,t=UV;t<=aH;t++)e[t]=tU;for(t=GV;t<=VV;t++)e[t]=tU;for(t=AV;t<=OV;t++)e[t]=tU;for(t=uH;t<=kV;t++)e[t]=tU;for(t=xH;t<=SH;t++)e[t]=rU;for(t=CH;t<=wH;t++)e[t]=nU;for(t=TH;t<=EH;t++)e[t]=nU;return e})();function sU(e){return e<DH&&(oU[e]&$H)!==0}var cU=/[\p{P}\p{S}]/u,lU=/\p{Zs}/u,uU=[];function dU(e){var t=e.indexOf(`\r`),n=e.indexOf(`\0`);if(t===-1&&n===-1)return e;var r=e.length;uU.length=0;var i=0,a=0;for(a=t===-1?n:n===-1||t<n?t:n;a<r;a++){var o=e.charCodeAt(a);o===EV?(i<a&&uU.push(e.slice(i,a)),a+1<r&&e.charCodeAt(a+1)===DV&&a++,uU.push(`
27
+ `),i=a+1):o===0&&(i<a&&uU.push(e.slice(i,a)),uU.push(`�`),i=a+1)}return i<r&&uU.push(e.slice(i)),uU.join(``)}var fU=/>\s+</g,pU=/\n+/g;function mU(e){return e.replace(fU,`><`).replace(pU,` `)}function hU(e){for(var t=``,n=0,r=!1,i=0,a=0;a<e.length;a+=1){var o=e.charCodeAt(a);if(o===BV){var s=e.charCodeAt(a+1);r=s>=TH&&s<=EH||s>=CH&&s<=wH,i=o}else if(o===MV)r=!1;else if(r&&i===IV&&(o===sH||o===oH)){var c=e.indexOf(e[a],a+1);c===-1&&(c=e.length),t+=mU(e.slice(n,a+1))+e.slice(a+1,c),n=c,a=c,i=o}else o!==Q&&o!==TV&&o!==DV&&o!==EV&&(i=o)}return(t+mU(e.slice(n))).trim()}function gU(e,t,n){let r=n??e.length;for(;t<r&&(e[t]===` `||e[t]===` `);)t++;return t}function _U(e){if(!e)return!1;for(var t in e)return!0;return!1}function vU(e){return{attrs:{},children:[{type:$.text,text:e}],h:void 0,c:!0,type:$.htmlBlock,tag:`header`}}var yU=/^\n+/;function bU(e){for(var t=e.length;t>0&&(e[t-1]===`
28
+ `||e[t-1]===`\r`);)t--;return`${e.slice(0,t).replace(yU,``)}
29
+
30
+ `}function xU(e){if((e.type===$.htmlSelfClosing||e.type===$.htmlBlock)&&e.b)return[];if(e.type===$.paragraph){var t=e.children;return t?t.flatMap(xU):[]}return e.type===$.text?e.text?.trim()?[e]:[]:e.type===$.htmlBlock&&e.children?[{...e,children:e.children?.flatMap(xU)}]:[e]}function SU(e){for(var t=0;t<e.length;t++){if(e[t].type===$.htmlBlock){var n=e[t],r=!1;if(n.c&&t===e.length-1){var i=n.k===void 0?n.b?n.e||``:(n.e||``)+(n.j||``):n.k,a=`</${String(n.tag).toLowerCase()}>`,o=i.toLowerCase().indexOf(a);o!==-1&&i.slice(o+a.length).replace(/<\/[a-z][a-z0-9-]*\s*>/gi,``).trim()&&(r=!0)}r||(n.c=!1)}`children`in e[t]&&e[t].children&&SU(e[t].children)}}function CU(e,t){let n=e.at(-1);return n===void 0||n.type!==$.htmlBlock||n.c!==!0?!1:(n.h||n.k)===t}function wU(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.type===$.paragraph&&r.children)for(var i=r.children,a=0;a<i.length;a++){var o=i[a];if(o.type===$.htmlSelfClosing&&o.b&&o.tag.toLowerCase()===t){var s=e.slice(0,n);a>0&&s.push({type:$.paragraph,children:i.slice(0,a)});var c=[];if(a+1<i.length){var l=i.slice(a+1).filter(e=>!(e.type===$.htmlSelfClosing&&e.b));l.length>0&&(c=l)}return c=c.concat(e.slice(n+1)),{found:!0,beforeClose:s,afterClose:c}}}if((r.type===$.htmlSelfClosing||r.type===$.htmlBlock)&&r.b&&r.tag.toLowerCase()===t)return{found:!0,beforeClose:e.slice(0,n),afterClose:e.slice(n+1)}}return{found:!1,beforeClose:e,afterClose:[]}}function TU(e){var t=``;for(var n in e){var r=e[n];r===!0?t+=` ${n}`:r!==void 0&&r!=null&&r!==!1&&(t+=` ${n}="${String(r)}"`)}return t}function EU(e,t,n,r){return`<${e}${t===void 0?TU(n):t.length>0&&t.charCodeAt(0)>Q?` ${t}`:t}${r}`}function DU(e,t){var n=e.tag,r=e.type===$.htmlSelfClosing,i=e,a=i.a,o=`</${n}>`;if(!r&&i.b)return{kind:`literal`,literal:(i.j||o)+(i.e||``)};if(r){var s=e;return s.b?{kind:`literal`,literal:s.j||o}:s.u?{kind:`literal`,literal:s.u}:{kind:`literal`,literal:EU(n,a,e.attrs,` />`)}}var c=EU(n,a,e.attrs,`>`),l=i.children,u=l!=null&&l.length>0;if(i.c&&i.k!==void 0)return u?{kind:`sandwich`,open:c,close:o}:{kind:`literal`,literal:i.k};if(i.c&&!u)return{kind:`literal`,literal:c+(i.e||``)+(i.j||(a===void 0?o:``))};if(l!=null&&l.length>0){for(var d=``,f=0;f<l.length;f++){var p=l[f];if(p.type!==$.text)return{kind:`sandwich`,open:c,close:o};d+=p.text}return{kind:`literal`,literal:c+(t?t(d):d)+o}}var m=i.e||``;return m&&m.indexOf(o)!==-1?{kind:`literal`,literal:c+m}:{kind:`literal`,literal:c+m+o}}function OU(e,t,n){var r=[],i=e,a=n;if(i&&r.push(i),Array.isArray(t))for(var o=0;o<t.length;o++)r.push(t[o]);else t!=null&&r.push(t);a&&r.push(a);for(var s=[],c=0;c<r.length;c++){var l=r[c];typeof l==`string`&&s.length>0&&typeof s.at(-1)==`string`?s[s.length-1]=s.at(-1)+l:s.push(l)}return s}function kU(e){return e==null||e.tagfilter!==!1}function AU(e,t,n,r){var i=t(e,n,r);return i===null?null:BU(i)}function jU(e){var t=[];if(!e)return t;for(var n in e)n.charCodeAt(0)===94&&t.push({identifier:n,footnote:e[n].target});return t}function MU(e){for(var t=0,n=e.length;t<n;){var r=e.charCodeAt(t);if(r>=CH&&r<=wH)return e.toLowerCase();t++}return e}var NU=Object.prototype.hasOwnProperty;function PU(e,t){if(e!=null)return t in(typeof e==`function`?Function.prototype:Object.prototype)&&!NU.call(e,t)?void 0:e[t]}function FU(e,t){var n=MU(t);if(n!==t){var r=PU(e,n),i=t.charCodeAt(0);if(r||i<CH||i>wH)return r;var a=i+OH;for(var o in e){var s=o.charCodeAt(0);if(o.length===t.length&&(s===i||s===a||s>=DH)&&o.toLowerCase()===n){var c=PU(e,o);if(c)return c}}}}function IU(e,t,n){if(t.indexOf(`.`)===-1){var r=PU(e,t);return r||!e?r||n:FU(e,t)||n}var i=t.split(`.`),a=PU(e,i[0]);a===void 0&&e&&(a=FU(e,i[0]));for(var o=1;a!==void 0&&o<i.length;)a=PU(a,i[o]),o++;return a||n}var LU=/^(?:attr|bool|prop):/i;function RU(e){var t=e.charCodeAt(4)===GV&&LU.test(e)?5:0,n=e.charCodeAt(t),r=e.charCodeAt(t+1);return(n===_H||n===gH)&&(r===hH||r===mH)}function zU(e,t,n){var r;for(var i in t)if(RU(i)&&typeof t[i]!=`function`){if(r===void 0){var a=e.charCodeAt(0);if(a>=CH&&a<=wH&&IU(n,e,void 0))return t;r={...t}}delete r[i]}return r||t}function BU(e){for(var t=!1,n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r<=Q||r===sH||r===PV||r===BV||r===MV||r===AV||r===LV||r===HV||r===jV||r===OV||r>=123){t=!0;break}}if(!t)return e;for(var i=``,n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r===PV&&n+2<e.length){var a=e.charCodeAt(n+1),o=e.charCodeAt(n+2);if((a>=xH&&a<=SH||a>=CH&&a<=KV||a>=TH&&a<=qV)&&(o>=xH&&o<=SH||o>=CH&&o<=KV||o>=TH&&o<=qV)){i+=e[n]+e[n+1]+e[n+2],n+=2;continue}}if(r>=55296&&r<=57343){if(r<=56319&&n+1<e.length){var s=e.charCodeAt(n+1);if(s>=56320&&s<=57343){i+=encodeURI(e[n]+e[n+1]),n++;continue}}i+=e[n]}else i+=encodeURI(e[n])}return i}function VU(...e){return e.filter(Boolean).join(` `)}var HU=new Set([`title`,`textarea`,`style`,`xmp`,`iframe`,`noembed`,`noframes`,`script`,`plaintext`]),UU=/<(\/?)(title|textarea|style|xmp|iframe|noembed|noframes|script|plaintext)(\s|>|\/)/gi;function WU(e){return HU.has(e.toLowerCase())}function GU(e){return UU.lastIndex=0,UU.test(e)}function KU(e,t){var n=e.toLowerCase();return n===`pre`||n===`textarea`?LH(t):t}function qU(e){return UU.lastIndex=0,e.replace(UU,(e,t,n,r)=>`&lt;${t}${n}${r}`)}function JU(e,t){var n=e||{},r=n.slugify,i;if(r){var a=r;i=e=>a(e,YH)}else i=YH;return{disableAutoLink:n.disableAutoLink,disableFrontmatter:n.disableFrontmatter,disableParsingRawHTML:n.disableParsingRawHTML,enforceAtxHeadings:n.enforceAtxHeadings,evalUnserializableExpressions:n.evalUnserializableExpressions,forceBlock:n.forceBlock,forceInline:t===void 0?n.forceInline:t,ignoreHTMLBlocks:n.ignoreHTMLBlocks,optimizeForStreaming:n.optimizeForStreaming,overrides:n.overrides,preserveFrontmatter:n.preserveFrontmatter,sanitizer:n.sanitizer||GH,slugify:i,tagfilter:kU(n)}}var YU=/^<([a-zA-Z][a-zA-Z0-9-]*)\s[^>]*>/,XU=/^<[A-Z]/,ZU=new Set([`pre`,`script`,`style`,`textarea`]),QU=/<(?:pre|script|style|textarea)\b/i,$U=/<(?:pre|script|style|textarea)\b/iy,eW=/<\/(?:pre|script|style|textarea)>/iy,tW=String.fromCharCode(bH);function nW(e){return e.indexOf(tW)===-1?e:e.split(tW).join(``)}var rW=/^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m,iW=/^(\s{0,3}#[\s\S]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m,aW=/^#{1,6}\s/,oW=/^#{1,6}[^#]/;function sW(e){return e.enforceAtxHeadings===!1?iW:rW}var cW=/^<([a-z][^ >/\n\r]*) ?([^>]*?)>/im,lW=new Uint8Array(128);(()=>{for(var e=[OV,RV,zV,kV,IV,AV,UV,BV,LV,WV,DV,JV,YV,qV],t=0;t<e.length;t++)lW[e[t]]=1})();var uW=/([a-zA-Z_][a-zA-Z0-9_-]*)=(?:"([^"]*)"|'([^']*)')/g;function dW(e){return ZU.has(e)}function fW(e){return QU.test(e)}function pW(e,t,n){for(var r=t,i=n;r<i&&(e.charCodeAt(r)===Q||e.charCodeAt(r)===TV);)r++;if(r>=i)return!1;e.charCodeAt(r)===lH&&r++;for(var a=0;r<i;){for(;r<i&&(e.charCodeAt(r)===Q||e.charCodeAt(r)===TV);)r++;if(r>=i)break;if(e.charCodeAt(r)===lH&&a>0){for(var o=r+1;o<i&&(e.charCodeAt(o)===Q||e.charCodeAt(o)===TV);)o++;if(o>=i)return!0}if(e.charCodeAt(r)===GV&&r++,r>=i||e.charCodeAt(r)!==FV)return!1;for(;r<i&&e.charCodeAt(r)===FV;)r++;for(r<i&&e.charCodeAt(r)===GV&&r++,a++;r<i&&(e.charCodeAt(r)===Q||e.charCodeAt(r)===TV);)r++;if(r<i){if(e.charCodeAt(r)===lH)r++;else return!1}}return a>0}var mW=/[\u0000-\u001F\u007F]/g,hW={action:1,background:1,cite:1,data:1,formaction:1,href:1,longdesc:1,poster:1,src:1,"xlink:href":1,xlinkhref:1},gW={children:1,dangerouslysetinnerhtml:1,innerhtml:1,outerhtml:1,ref:1},_W=/^\{\s*[[{]/,vW=/[{}"'`]/g,yW=/&#(x[0-9a-f]+|[0-9]+);?/gi;function bW(e){return e.indexOf(`&#`)===-1?e:e.replace(yW,(e,t)=>{var n=t.charCodeAt(0)===vH||t.charCodeAt(0)===yH?Number.parseInt(t.slice(1),16):Number.parseInt(t,10);return n>0&&n<=1114111?String.fromCodePoint(n):e})}var xW;function SW(e){return!!IU(xW?.overrides,e,void 0)}function CW(e,t,n,r){if(e.charCodeAt(4)===GV&&LU.test(e))return CW(e.slice(5),t,n,r);var i=e.toLowerCase();if(gW[i]===1)return!0;var a=n&&t.charCodeAt(0)===uH;if(i===`attributename`)return!a&&wW(t);var o=RU(e);if(a&&(hW[i]!==1||_W.test(t)))return!1;if(o)return!(n&&t===``);if(i===`srcdoc`)return!0;if(i===`style`)return/url\s*\(\s*(javascript|vbscript|data:(?!image\/))/i.test(t);if(hW[i]===1){var s=bW(LH(t));if(TW(s,r))return!0;var c=s.replace(mW,``);return c!==s&&TW(c,r)}return!1}function wW(e){var t=bW(LH(e)).replace(vW,``).trim().toLowerCase();return t=t.slice(t.lastIndexOf(`:`)+1),hW[t]===1||t.slice(0,2)===`on`}function TW(e,t){return t?WH(e)!==BH.safe:GH(e)===null}function EW(e,t){return`<`+(e.g?`/`:``)+e.tag+e.i+(t===void 0?e.a:t)+(e.n?e.v?` />`:`/>`:`>`)}function DW(e,t,n,r){for(var i=[],a=t,o=0;o<r.length;o+=2){var s=r[o];if(s>a){var c=e.slice(a,s).trim();c&&i.push(c)}a=r[o+1]}if(a<n){var l=e.slice(a,n).trim();l&&i.push(l)}return i.join(` `)}function OW(e,t){var n=[];if(e!==null)for(var r=0;r<e.length;r+=2)e[r]!==t&&n.push(e[r],e[r+1]);return n}var kW=1024;function AW(e){return sU(e)||e===MV||e===sH||e===oH}function jW(e){return(e|32)>=TH&&(e|32)<=EH}var MW=!1;function NW(e,t,n,r){var i=r===void 0?e.length:r,a=t+2,o=0;for(MW=!1;a<i;){var s=e.charCodeAt(a);if(sU(s)||s===aH||s===MV)break;a++}for(;a<i;){if(s=e.charCodeAt(a),s===MV)return MW||=o>a+1,a+1;if(sU(s)||s===aH)a++;else{var c=a;for(a++;a<i&&(s=e.charCodeAt(a),!(sU(s)||s===aH||s===MV||s===IV));)a++;for(var l=e.slice(c,a);a<i&&sU(e.charCodeAt(a));)a++;var u=``,d=-1;if(a<i&&e.charCodeAt(a)===IV){for(a++;a<i&&sU(e.charCodeAt(a));)a++;var f=e.charCodeAt(a);if(f===sH||f===oH){for(d=++a;a<i&&e.charCodeAt(a)!==f;)a++;u=e.slice(d,a),a++}else{for(var p=a;a<i&&(s=e.charCodeAt(a),!(sU(s)||s===MV));)a++;u=e.slice(p,a)}}if(!MW){var m=n===null?void 0:PU(n,l);MW=CW(l,u,m?.startsWith(u)===!0,!0)}if(r===void 0&&d!==-1)for(var h=u.indexOf(`<`);h!==-1&&!MW;){if(jW(u.charCodeAt(h+1))){var g=d+h;o=Math.max(o,NW(e,g,null,Math.min(i,g+kW)))}h=u.indexOf(`<`,h+1)}}}return MW=!0,i}function PW(e,t,n,r,i,a){var o=e.slice(0,n+kW);if(i!==null&&r!==null){for(var s=o.slice(t,i[0]),c=0;c<i.length;c+=2)s+=` `.repeat(i[c+1]-i[c])+o.slice(i[c+1],c+2<i.length?i[c+2]:o.length);o=s,n-=t,t=0}for(var l=NW(o,o.charCodeAt(t+1)===aH?t+1:t,r);!MW&&l<n;){var u=o.indexOf(`<`,l);if(u===-1||u>=n)break;var d=o.charCodeAt(u+1)===aH;l=jW(o.charCodeAt(u+(d?2:1)))?NW(o,d?u+1:u,null):u+1}if(!MW)return i;if(i===null)return a;for(var f=[],p=0,m=0;p<i.length||m<a.length;)m>=a.length||i[p]<a[m]?(f.push(i[p],i[p+1]),p+=2):(f.push(a[m],a[m+1]),m+=2);return f}function FW(e,t,n,r){if(e.charCodeAt(t)!==BV)return null;let i=t+1,a=e.length,o=!1;e.charCodeAt(i)===aH&&(i++,o=!0);let s=i,c=e.charCodeAt(i);if(!(c>=TH&&c<=EH||c>=CH&&c<=wH))return null;for(;i<a&&(e.charCodeAt(i)>=TH&&e.charCodeAt(i)<=EH||e.charCodeAt(i)>=CH&&e.charCodeAt(i)<=wH||e.charCodeAt(i)>=xH&&e.charCodeAt(i)<=SH||e.charCodeAt(i)===FV);)i++;let l=e.slice(s,i);if(!l)return null;let u=l.charCodeAt(0),d=u>=CH&&u<=wH,f=d||l.indexOf(`-`)!==-1,p=d&&SW(l),m=i;for(;i<a&&(e.charCodeAt(i)===Q||e.charCodeAt(i)===TV||e.charCodeAt(i)===DV);)i++;let h=e.slice(m,i);if(i===m&&i<a){var g=e.charCodeAt(i);if(g!==MV&&g!==aH)return null}let _=i,v={},y=!1;for(var b=null,x=null,S=!1,C=-1;i<a;){let s=e.charCodeAt(i);if(s===MV){x!==null&&!r&&(b=PW(e,t,i+1,p?v:null,b,x));let n=b?DW(e,_,i,b):e.slice(_,i);return{w:x!==null,v:y,g:o,x:p,y:f,a:n,z:C===-1?void 0:DW(e,_,i,OW(b,C)),q:b!=null,n:!1,i:h,attrs:v,end:i+1,tag:l}}if(s===Q||s===TV||s===DV)i++;else{if(s===aH&&i+1<a&&e.charCodeAt(i+1)===MV){y=i>_&&e.charCodeAt(i-1)===Q,x!==null&&!r&&(b=PW(e,t,i+2,p?v:null,b,x));let n=b?DW(e,_,i,b):e.slice(_,i);return{w:x!==null,v:y,g:o,x:p,y:f,a:n,z:C===-1?void 0:DW(e,_,i,OW(b,C)),q:b!=null,n:!0,i:h,attrs:v,end:i+2,tag:l}}var w=i,T=e.charCodeAt(i);if(!(T>=TH&&T<=EH||T>=CH&&T<=wH||T===zV||T===GV))return null;for(i++;i<a;){var E=e.charCodeAt(i);if(E>=TH&&E<=EH||E>=CH&&E<=wH||E>=xH&&E<=SH||E===zV||E===iH||E===GV||E===FV)i++;else break}for(var D=e.slice(w,i),O=i;i<a&&(e.charCodeAt(i)===Q||e.charCodeAt(i)===TV);)i++;var k,A;if(e.charCodeAt(i)===IV){for(i++;i<a&&(e.charCodeAt(i)===Q||e.charCodeAt(i)===TV);)i++;var j=e.charCodeAt(i);if(j===sH||j===oH){i++;for(var M=i;i<a;){var N=e.charCodeAt(i);if(N===j)break;N===BV&&jW(e.charCodeAt(i+1))&&(S=!0),i++}if(i>=a)return null;if(k=e.slice(M,i),i++,i<a){var P=e.charCodeAt(i);if(P!==Q&&P!==TV&&P!==DV&&P!==MV&&P!==aH)return null}A=i}else if(j===uH){var F=1,M=i;for(i++;i<a&&F>0;){var E=e.charCodeAt(i);E===uH?F++:E===dH?F--:AW(E)&&(S=!0),i++}k=e.slice(M,i),A=i}else{for(var M=i;i<a;){var I=e.charCodeAt(i);if(I===Q||I===TV||I===MV||I===DV||I===sH||I===oH||I===IV||I===BV||I===OV)break;i++}if(i===M)return null;k=e.slice(M,i),A=i}}else k=``,A=O;CW(D,k,p,n)?(b===null&&(b=[]),b.push(w,A),!d&&RU(D)&&SW(l)?v[D]=k:D.toLowerCase()===`children`&&!_W.test(k)&&SW(l)&&(v.children=k,C=w)):(v[D]=k,S&&(x===null&&(x=[]),x.push(w,A))),S=!1}}return null}var IW=/</g;function LW(e,t,n){var r=zW(e,t,n);return r===e?e:zW(r,!0)===r?r:(n!==void 0&&(n.keepingChildren=void 0),r.replace(IW,`&lt;`))}function RW(e,t){var n=t+1;if(e.charCodeAt(n)===aH&&n++,!jW(e.charCodeAt(n)))return-1;for(var r=e.charCodeAt(++n);jW(r)||r>=xH&&r<=SH||r===FV;)r=e.charCodeAt(++n);return r===MV?n+1:-1}function zW(e,t,n){var r=e.indexOf(`<`);if(r===-1)return e;for(var i=``,a,o=0,s=!1;r!==-1;){var c=RW(e,r);if(c!==-1)r=e.indexOf(`<`,c);else{var l=FW(e,r,t,!0),u;if(l?.q&&l.w&&l.x)u=e.slice(o,r)+zW(EW(l),t),i+=u,a!==void 0&&(a+=u),o=l.end,s=!0,r=e.indexOf(`<`,l.end);else if(l&&!l.w){if(l.q){var d=e.slice(o,r),f=l.z;a===void 0&&f!==void 0&&n!==void 0&&(a=i),i+=d+EW(l),a!==void 0&&(a+=d+EW(l,f)),o=l.end,s=!0}r=e.indexOf(`<`,l.end)}else if(l||jW(e.charCodeAt(r+1))){var p=NW(e,l?.g?r+1:r,l?.x?l.attrs:null);MW&&(u=e.slice(o,r)+e.slice(r,p).replace(IW,`&lt;`),i+=u,a!==void 0&&(a+=u),o=p,s=!0),r=e.indexOf(`<`,p)}else r=e.indexOf(`<`,r+1)}}if(!s)return e;var m=e.slice(o);return a!==void 0&&n!==void 0&&(n.keepingChildren=a+m),i+m}function BW(e,t,n){if(!n.optimizeForStreaming&&e.indexOf(`[`)===-1)return!1;for(var r=0,i=e.length,a=!1,o=!1;r<i;){for(var s=e.indexOf(`
31
+ `,r),c=s<0?i:s,l=r,u=0;l<c&&u<4;)if(e.charCodeAt(l)===Q)u++,l++;else if(e.charCodeAt(l)===TV)u+=4,l++;else break;if(l>=c)a=!1,r=s<0?i:s+1;else{if(u<4){var d=e.charCodeAt(l);if(d===OV||d===kV){for(var f=d,p=0,m=l;m<c&&e.charCodeAt(m)===f;)p++,m++;if(p>=3){var h=!0;if(f===OV){for(var g=m;g<c;g++)if(e.charCodeAt(g)===OV){h=!1;break}}if(h){a=!1;for(var _=s<0?i:s+1;_<i;){for(var v=_,y=0;v<i&&y<4;){var b=e.charCodeAt(v);if(b===Q)y++,v++;else if(b===TV)y+=4,v++;else break}if(y<4&&v<i&&e.charCodeAt(v)===f){for(var x=0;v<i&&e.charCodeAt(v)===f;)x++,v++;if(x>=p){for(;v<i&&(e.charCodeAt(v)===Q||e.charCodeAt(v)===TV);)v++;if(v>=i||e.charCodeAt(v)===DV){r=v>=i?i:v+1;break}}}for(;_<i&&e.charCodeAt(_)!==DV;)_++;_<i&&_++}_>=i&&(r=i,o=!0);continue}}}}for(var S=l;S<c&&e.charCodeAt(S)===MV;){S++,S<c&&e.charCodeAt(S)===Q&&S++;for(var C=0;S<c&&C<4;)if(e.charCodeAt(S)===Q)C++,S++;else if(e.charCodeAt(S)===TV)C+=4,S++;else break;if(C>=4)break;a=!1}if(!a&&u<4&&S<c&&e.charCodeAt(S)===AV&&!(S+1<i&&e.charCodeAt(S+1)===jV)){var w=VW(e,S,t);if(w){r=w,a=!1;continue}}var T=e.charCodeAt(l);if(T===NV&&u<4)a=!1;else if(u<4&&(T===FV||T===RV||T===zV)){for(var E=l,D=0;E<c;){var O=e.charCodeAt(E);if(O===T)D++;else if(O!==Q&&O!==TV)break;E++}a=!(D>=3&&E>=c)}else a=!0;r=s<0?i:s+1}}return o}function VW(e,t,n){let r=e.length;if(e.charCodeAt(t)!==AV)return null;let i=t+1<r&&e.charCodeAt(t+1)===jV,a=t+1;for(;a<r;){var o=e.charCodeAt(a);if(o===HV){a++;break}if(o===AV)return null;o===LV&&a+1<r&&a++,a++}if(a>r||e.charCodeAt(a-1)!==HV)return null;let s=nW(e.slice(t+1,a-1));if(s.length>999)return null;let c=GW(s);if(!c||a>=r||e.charCodeAt(a)!==GV)return null;a++;let l=!1;for(;a<r;){let t=e.charCodeAt(a);if(t===Q||t===TV)a++;else if(t===DV&&!l)l=!0,a++;else if(t===bH&&l)a++;else break}if(i){let t=e.indexOf(`
32
+ `,a),i=t<0?r:t;return n[c]={target:e.slice(a,i).trim(),title:void 0},t<0?r:t+1}var u;if(a<r&&e.charCodeAt(a)===BV){a++;for(var d=a;a<r&&e.charCodeAt(a)!==MV&&e.charCodeAt(a)!==DV;)e.charCodeAt(a)===LV&&a+1<r&&e.charCodeAt(a+1)!==DV&&a++,a++;if(a>=r||e.charCodeAt(a)!==MV)return null;u=e.slice(d,a),a++;for(var f=e.indexOf(`
33
+ `,a),p=f<0?r:f,m=a;m<p&&(e.charCodeAt(m)===Q||e.charCodeAt(m)===TV);)m++;if(m<p){if(m===a)return null;var h=e.charCodeAt(m);if(h!==sH&&h!==oH&&h!==fH)return null}}else{for(var d=a,g=0;a<r;){var o=e.charCodeAt(a);if(o===fH)g++;else if(o===pH){if(g===0)break;g--}else{if(o===Q||o===TV||o===DV)break;if(o===LV&&a+1<r){var _=e.charCodeAt(a+1);_!==Q&&_!==TV&&_!==DV&&a++}}a++}if(u=e.slice(d,a),!u)return null}for(;a<r&&(e.charCodeAt(a)===Q||e.charCodeAt(a)===TV);)a++;var v=e.indexOf(`
34
+ `,a),y=v<0?r:v,b,x=!1,S=a,C=a;if(a===y&&a<r)for(C=a+1;C<r&&(e.charCodeAt(C)===Q||e.charCodeAt(C)===TV);)C++;if(C<r){var w=e.charCodeAt(C);if(w===sH||w===oH||w===fH){for(var T=w===fH?41:w,E=C+1,D=E;E<r;){var O=e.charCodeAt(E);if(O===T){for(var k=E+1;k<r&&(e.charCodeAt(k)===Q||e.charCodeAt(k)===TV);)k++;(k>=r||e.charCodeAt(k)===DV)&&(b=nW(e.slice(D,E)),x=!0,S=k<r?k+1:r);break}if(O===LV&&E+1<r)E+=2;else{if(O===DV&&E+1<r&&e.charCodeAt(E+1)===DV)break;E++}}if(!x&&C===a)return null}}if(x)return n[c]||(n[c]={target:LH(qW(u)),title:b===void 0?b:LH(qW(b))}),S;for(;a<y&&(e.charCodeAt(a)===Q||e.charCodeAt(a)===TV);)a++;return a<y?null:(n[c]||(n[c]={target:LH(qW(u)),title:b}),v<0?r:v+1)}var HW=new Uint8Array(oU);for(HW[NV]|=iU,HW[MV]|=iU,HW[FV]|=iU|aU,HW[cH]|=iU,HW[RV]|=iU|aU,HW[zV]|=iU|aU,HW[OV]|=iU|aU,HW[kV]|=iU|aU,HW[BV]|=iU|aU,HW[AV]|=aU,HW[UV]|=aU,HW[lH]|=iU,UW=xH;UW<=SH;UW++)HW[UW]|=iU;var UW;function WW(e){if(e.indexOf(`[`)<0&&e.indexOf(`]`)<0)return!1;for(var t=0;t<e.length;t++)if(e.charCodeAt(t)===LV)t++;else if(e.charCodeAt(t)===AV||e.charCodeAt(t)===HV)return!0;return!1}function GW(e){for(var t=e.length,n=!0,r=t>0,i=0;i<t;i++){var a=e.charCodeAt(i);if(a===Q){if(n){r=!1;break}n=!0}else if(a<33||a>126||a>=CH&&a<=wH){r=!1;break}else n=!1}if(r&&!n)return e;var o=e.replace(/\s+/g,` `).trim();return o.indexOf(`ẞ`)===-1?o.toLowerCase():o.replace(/\u1E9E/g,`ss`).toLowerCase()}function KW(e){return e<DH?HW[e]:e===$V?$H:0}function qW(e){return e.indexOf(`\\`)===-1?e:e.replace(/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,`$1`)}var JW=null,YW=-1,XW=-1,ZW=null,QW=-1,$W=-1;function eG(e,t){if(t>=YW&&t<=XW&&e===JW)return XW;var n=e.indexOf(`
35
+ `,t),r=n<0?e.length:n;return JW=e,YW=t,XW=r,r}function tG(e,t){let n=eG(e,t);return n<e.length?n+1:n}function nG(e,t,n){for(;t<n;){let n=e.charCodeAt(t);if(n!==Q&&n!==TV)break;t++}return t}function rG(e,t){let n=tG(e,t);if(n>=QW&&n<=$W&&e===ZW)return $W;for(ZW=e,QW=n;n<e.length&&!cG(e,n,eG(e,n));)n=tG(e,n);return $W=n<e.length?n:e.length,$W}function iG(e,t,n,r){let i=0;for(;t+i<n&&e.charCodeAt(t+i)===r;)i++;return i}var aG=0,oG=0;function sG(e,t,n){for(aG=0,oG=0;t+oG<n;){let n=e.charCodeAt(t+oG);if(n===TV)aG+=4-aG%4;else if(n===Q)aG++;else break;oG++}}function cG(e,t,n){return nG(e,t,n)>=n}function lG(e,t,n){for(;t<n;){var r=e.charCodeAt(t);if(r!==DV&&r!==Q&&r!==TV)return!1;t++}return!0}function uG(e,t){if(!e)return e;var n=t.A||=Object.create(null),r=n[e];if(r===void 0)return n[e]=0,e;for(var i=r+1,a=`${e}-${i}`;n[a]!==void 0;)i++,a=`${e}-${i}`;return n[e]=i,n[a]=0,a}function dG(e,t,n,r){let i=eG(e,t);if(sG(e,t,i),aG>3)return null;let a=t+oG;if(e.charCodeAt(a)!==NV)return null;let o=iG(e,a,i,NV);if(o<1||o>6||(a+=o,r.enforceAtxHeadings!==!1&&a<i&&e.charCodeAt(a)!==Q&&e.charCodeAt(a)!==TV))return null;a=nG(e,a,i);for(var s=i;s>a&&e.charCodeAt(s-1)===Q;)s--;for(var c=s;s>a&&e.charCodeAt(s-1)===NV;)s--;if(s<c){if(s===a||e.charCodeAt(s-1)===Q)for(;s>a&&e.charCodeAt(s-1)===Q;)s--;else s=c}let l=$G(e.slice(a,s),!1,n,r);return{node:{type:$.heading,level:o,children:l,id:``},end:tG(e,i)}}function fG(e,t,n){var r=e.charCodeAt(t);if(r!==IV&&r!==FV)return!1;for(var i=t;i<n&&e.charCodeAt(i)===r;)i++;for(;i<n&&(e.charCodeAt(i)===Q||e.charCodeAt(i)===TV);)i++;return i>=n}function pG(e,t){let n=eG(e,t);if(sG(e,t,n),aG>3)return null;let r=t+oG,i=e.charCodeAt(r);if(i!==FV&&i!==RV&&i!==zV)return null;let a=0;for(;r<n;){let t=e.charCodeAt(r);if(t===i)a++;else if(t!==Q&&t!==TV)return null;r++}return a<3?null:{node:{type:$.breakThematic},end:tG(e,n)}}var mG=0,hG=0,gG=``;function _G(e,t,n){let r=eG(e,t);if(sG(e,t,r),aG>3)return null;let i=aG,a=t+oG,o=e.charCodeAt(a);if(o!==OV&&o!==kV)return null;let s=iG(e,a,r,o);if(s<3)return null;a+=s;let c=nG(e,a,r),l=r;if(o===OV){for(let t=c;t<r;t++)if(e.charCodeAt(t)===OV)return null}for(;l>c&&(e.charCodeAt(l-1)===Q||e.charCodeAt(l-1)===TV);)l--;let u=e.slice(c,l),d=``,f=``,p=u.indexOf(` `);p===-1?d=u:(d=u.slice(0,p),f=u.slice(p+1).trim()),d=qW(d);var m;if(f){uW.lastIndex=0;for(var h;(h=uW.exec(f))!=null;){var g=h[2]===void 0?h[3]:h[2];CW(h[1],g,!1)||(m||={},m[h[1]]=g)}}let _=tG(e,r),{length:v,length:y}=e;var b;o===mG&&s===hG?b=gG:(b=String.fromCharCode(o).repeat(s),mG=o,hG=s,gG=b);for(var x=_;x<e.length;){var S=e.indexOf(b,x);if(S===-1)break;for(var C=S,w=0;C>0&&w<4&&e.charCodeAt(C-1)===Q;)C--,w++;if(w<=3&&(C===0||e.charCodeAt(C-1)===DV)){for(var T=S+s;T<e.length&&e.charCodeAt(T)===o;)T++;var E=eG(e,T);if(cG(e,T,E)){v=C,y=tG(e,E);break}}x=S+1}var D;if(i===0)D=v>_&&e.charCodeAt(v-1)===DV?e.slice(_,v-1):e.slice(_,v);else{D=``;for(var O=_;O<v;){var k=eG(e,O);sG(e,O,k);var A=Math.min(oG,i);D+=`${e.slice(O+A,k)}
36
+ `,O=tG(e,k)}D.length>0&&D.charCodeAt(D.length-1)===DV&&(D=D.slice(0,-1))}return n.inList&&(D=nW(D)),{node:{type:$.codeBlock,lang:d||void 0,text:D,infoString:f||void 0,attrs:m},end:y}}function vG(e,t,n){for(var r=0,i=t;i<n&&r<4;)e.charCodeAt(i)===TV?r+=4-r%4:r++,i++;if(r<4)return``;for(var a=``,o=4;o<r;o++)a+=` `;return a+e.slice(i,n)}function yG(e,t){if(sG(e,t,eG(e,t)),aG<4)return null;let n=``,r=t;for(;r<e.length;){let t=eG(e,r);if(sG(e,r,t),cG(e,r,t)){for(var i=`${vG(e,r,t)}
37
+ `,a=tG(e,t);a<e.length;){var o=eG(e,a);if(cG(e,a,o))i+=`${vG(e,a,o)}
38
+ `,a=tG(e,o);else{sG(e,a,o),aG>=4&&(n+=i,r=a);break}}if(r!==a)break;continue}if(aG<4)break;let d=0,f=0;var s=0;for(let n=r;n<t&&f<4;n++){if(e.charCodeAt(n)===TV){var c=4-f%4;f+c>4&&(s=f+c-4),f+=c}else f++;d++}var l=``;if(s>0)for(var u=0;u<s;u++)l+=` `;l+=e.slice(r+d,t),n+=`${l}
39
+ `,r=tG(e,t)}for(;n.length>0&&n.charCodeAt(n.length-1)===DV;)n=n.slice(0,-1);return n?{node:{type:$.codeBlock,lang:void 0,text:n,infoString:void 0,attrs:void 0},end:r}:null}function bG(e,t,n,r){if(sG(e,t,eG(e,t)),aG>3)return null;let i=t+oG;if(e.charCodeAt(i)!==MV)return null;let a=``,o=t,s,c=!1,l=!1,u=!1;for(;o<e.length;){let t=eG(e,o);sG(e,o,t);let n=o+oG;if(e.charCodeAt(n)===MV){let r=n+1;var d=aG+1,f=!1;if(r<t){var p=e.charCodeAt(r);p===Q?(r++,d++,f=!0):p===TV&&(f=!0)}for(var m=``,h=!1,g=r;g<t;g++)if(e.charCodeAt(g)===TV){h=!0;break}if(h){var _=d;if(f&&r<t&&e.charCodeAt(r)===TV){for(var v=4-_%4,y=0;y<v-1;y++)m+=` `;_+=v,r++}for(var b=r;b<t;b++)if(e.charCodeAt(b)===TV){for(var x=4-_%4,S=0;S<x;S++)m+=` `;_+=x}else m+=e[b],_++}else m=e.slice(r,t);if(!(a||s)){let n=m.match(/^\[!([A-Za-z]+)\]\s*$/);if(n){s=n[1].toUpperCase(),o=tG(e,t);continue}}a+=`${m}
40
+ `;var C=m.trimStart();C.startsWith("```")||C.startsWith(`~~~`)?u=!u:(m.startsWith(` `)||m.startsWith(` `))&&(u=!0),l=C.length>0,o=tG(e,t)}else if(a&&!cG(e,o,t)&&l){if(aG<4){var w=o+oG,T=w<t?e.charCodeAt(w):0;if(T===NV||T===MV||T===OV||T===kV||T===BV||(T===FV||T===RV||T===zV)&&pG(e,o)||(T===FV||T===RV||T===cH)&&w+1<t&&(e.charCodeAt(w+1)===Q||e.charCodeAt(w+1)===TV))break;if(T>=xH&&T<=SH){for(var E=w;E<t&&e.charCodeAt(E)>=xH&&e.charCodeAt(E)<=SH;)E++;if(E<t&&(e.charCodeAt(E)===iH||e.charCodeAt(E)===pH))break}}if(u)break;a+=`${e.slice(o,t)}
41
+ `,c=!0,o=tG(e,t)}else break}if(!(a||s))return null;var{inBlockQuote:D,m:O}=n;n.inBlockQuote=!0,c&&(n.m=!0);var k=n.f;n.f=k||!lG(e,o,e.length);let A=UK(a||``,n,r);return n.f=k,n.inBlockQuote=D,n.m=O,{node:{type:$.blockQuote,children:A,alert:s||void 0},end:o}}function xG(e,t,n){for(var r=0,i=t;i<n;i++)e.charCodeAt(i)===TV?r+=4-r%4:r++;return r}function SG(e,t,n){if(sG(e,t,n),aG>3)return null;var r=t+oG;if(r>=n)return null;var i=e.charCodeAt(r),a=aG,o=r,s=r;if(i===FV||i===RV||i===cH){if(o=r+1,o<n&&e.charCodeAt(o)!==Q&&e.charCodeAt(o)!==TV&&e.charCodeAt(o)!==DV)return null}else if(i>=xH&&i<=SH){for(;s<n&&s-r<9;){var c=e.charCodeAt(s);if(c<xH||c>SH)break;s++}if(s>r&&s<n){var l=e.charCodeAt(s);if(l===iH||l===pH){if(o=s+1,o<n&&e.charCodeAt(o)!==Q&&e.charCodeAt(o)!==TV&&e.charCodeAt(o)!==DV)return null}else return null}else return null}else return null;var u=o,d=xG(e,t,o),f=0,p=u,m=d;if(u>=n)return{ordered:i>=xH&&i<=SH,marker:i>=xH&&i<=SH?e[s]:e[r],start:i>=xH&&i<=SH?Number.parseInt(e.slice(r,s),10):void 0,contentStart:u,contentCol:d+1,markerCol:a,isEmpty:!0};for(;p<n&&(e.charCodeAt(p)===Q||e.charCodeAt(p)===TV);){if(e.charCodeAt(p)===TV){var h=4-m%4;m+=h}else m++;p++,f++}var g=p>=n,_=m-d;return g||_>4?(m=d+1,p=u+1,f=1):f===0&&(m=d+1,p=u,f=1),{ordered:i>=xH&&i<=SH,marker:i>=xH&&i<=SH?e[s]:e[r],start:i>=xH&&i<=SH?Number.parseInt(e.slice(r,s),10):void 0,contentStart:p,contentCol:m,markerCol:a,isEmpty:g}}var CG=0;function wG(e,t,n,r){var i=0,a=t;for(CG=0;a<n&&i<r;){var o=e.charCodeAt(a);if(o===TV){var s=4-i%4;if(i+s>r){CG=i+s-r,a++,i=r;break}i+=s}else if(o===Q)i++;else break;a++}return a}function TG(e,t,n,r){var i=eG(e,t),a=SG(e,t,i);if(!a)return null;var o=[],s=t,c=a.contentCol,l=``,u=a.isEmpty,d=!1,f=!1;if(!a.isEmpty){for(var p=!1,m=a.contentStart;m<i;m++)if(e.charCodeAt(m)===TV){p=!0;break}if(p){var h=``,g=xG(e,t,a.contentStart),_=g-a.contentCol;if(_>0)for(var v=0;v<_;v++)h+=` `;for(var y=a.contentStart;y<i;y++)if(e.charCodeAt(y)===TV){for(var b=4-g%4,x=0;x<b;x++)h+=` `;g+=b}else h+=e[y],g++;l=`${h}
42
+ `}else l=`${e.slice(a.contentStart,i)}
43
+ `}for(s=tG(e,i);s<e.length;){var S=eG(e,s);sG(e,s,S);var C=e.charCodeAt(s+oG);if(aG<c&&(C===FV||C===RV||C===zV)&&aG<=3&&pG(e,s))break;var w=SG(e,s,S);if(w&&w.ordered===a.ordered&&w.marker===a.marker&&w.markerCol<c)o.push({contentCol:c,raw:l,hasBlankAfter:d,isEmpty:u}),d&&(f=!0),c=w.contentCol,u=w.isEmpty,d=!1,l=w.isEmpty?``:`${e.slice(w.contentStart,S)}
44
+ `,s=tG(e,S);else if(cG(e,s,S)){var T=wG(e,s,S,c);if(CG>0||T<S){for(var E=``,D=0;D<CG;D++)E+=` `;l+=`${E+e.slice(T,S)}
45
+ `}else l+=`
46
+ `;s=tG(e,S);for(var O=!1,k=0;k<l.length;k++){var A=l.charCodeAt(k);if(A!==DV&&A!==EV&&A!==Q&&A!==TV){O=!0;break}}if(u&&!O){if(s<e.length){var j=eG(e,s),M=SG(e,s,j);if(!M||M.ordered!==a.ordered||M.marker!==a.marker)break;d=!0}else break}if(s<e.length){var N=eG(e,s);sG(e,s,N);var P=e.charCodeAt(s+oG);if((P===FV||P===RV||P===zV)&&aG<=3&&pG(e,s))break;var F=SG(e,s,N);if(F&&F.ordered===a.ordered&&F.marker===a.marker&&F.markerCol<c){d=!0;continue}if(!cG(e,s,N)&&aG<c)break}}else if(aG>=c){var I=wG(e,s,S,c);if(CG>0){for(var L=``,R=c,z=0;z<CG;z++)L+=` `,R++;for(var B=I;B<S;B++)if(e.charCodeAt(B)===TV){for(var V=4-R%4,H=0;H<V;H++)L+=` `;R+=V}else L+=e[B],R++;l+=`${L}
47
+ `}else l+=`${e.slice(I,S)}
48
+ `;s=tG(e,S)}else{for(var U=!1,ee=0;ee<l.length;ee++){var te=l.charCodeAt(ee);if(te!==DV&&te!==EV&&te!==Q&&te!==TV){U=!0;break}}if(!d&&U&&!u){var ne=s+oG,W=e.charCodeAt(ne);if(!(W===NV||W===MV||W===BV||W===OV||W===kV||(W===FV||W===RV||W===zV||W===cH)&&(pG(e,s)!=null||SG(e,s,S)!=null)||W>=xH&&W<=SH&&SG(e,s,S)!=null)){l+=`${e.slice(ne,S)}
49
+ `,s=tG(e,S);continue}}break}}if(o.push({contentCol:c,raw:l,hasBlankAfter:d,isEmpty:u}),o.length===0)return null;var re=f;if(!re)for(var ie=0;ie<o.length;ie++){if(o[ie].hasBlankAfter&&ie<o.length-1){re=!0;break}if(!o[ie].isEmpty){for(var ae=o[ie].raw,G=ae.length,K=0,q=!1,oe=!1,J=!1,se=!1,ce=0,le=0,ue=-1;K<G;){var de=ae.indexOf(`
50
+ `,K);if(de<0&&(de=G),se){sG(ae,K,de);for(var fe=ae.slice(K+oG,de),pe=0;pe<fe.length&&fe.charCodeAt(pe)===ce;)pe++;pe>=le&&fe.slice(pe).trim()===``&&(se=!1),K=de<G?de+1:G}else if(cG(ae,K,de))ue>=0?J=!0:q&&(oe=!0),K=de<G?de+1:G;else{if(sG(ae,K,de),ue>=0){if(aG>=ue){K=de<G?de+1:G;continue}var me=SG(ae,K,de);if(me&&me.markerCol<ue&&me.contentCol<=ue||me){K=de<G?de+1:G;continue}ue=-1,J&&=(oe=!0,!1)}var he=ae.slice(K+oG,de),ge=he.charCodeAt(0);if((ge===OV||ge===kV)&&aG<=3){for(var _e=0;_e<he.length&&he.charCodeAt(_e)===ge;)_e++;if(_e>=3){if(oe&&q){re=!0;break}se=!0,ce=ge,le=_e,q=!0,K=de<G?de+1:G;continue}}var ve=aG<=3?SG(ae,K,de):null;if(ve&&q){if(oe){re=!0;break}ue=ve.contentCol,J=!1,K=de<G?de+1:G,q=!0}else{if(oe){re=!0;break}q=!0,K=de<G?de+1:G}}}if(re)break}}for(var ye=[],be=0;be<o.length;be++){for(var xe=o[be],Se=xe.raw,Ce=Se.length;Ce>0&&Se.charCodeAt(Ce-1)===DV;)Ce--;var we=Ce<Se.length?Se.slice(0,Ce):Se,Te=null;if(we.length>=3&&we.charCodeAt(0)===AV){var Ee=we[1];(Ee===` `||Ee===`x`||Ee===`X`)&&we.charCodeAt(2)===HV&&(Te={type:$.gfmTask,completed:Ee===`x`||Ee===`X`},we=we.slice(3))}var De;if(xe.isEmpty&&we.trim()===``)De=[];else if(re){var Oe=n.inList;n.inList=!0;var ke=n.f;n.f=ke||be!==o.length-1,De=UK(we,n,r),n.f=ke,n.inList=Oe}else{var Ae=n.inList;n.inList=!0;var je=n.f;if(n.f=je||be!==o.length-1,De=UK(we,n,r),n.f=je,n.inList=Ae,De.length===1&&De[0].type===$.paragraph)De=De[0].children;else if(n.r){var Me=[];n.r.push({src:De,dest:Me,unwrap:!0}),De=Me}else{for(var Ne=[],Pe=0;Pe<De.length;Pe++)if(De[Pe].type===$.paragraph)for(var Fe=De[Pe].children,Ie=0;Ie<Fe.length;Ie++)Ne.push(Fe[Ie]);else Ne.push(De[Pe]);De=Ne}}if(Te){var Le=[Te,{type:$.text,text:` `}];if(n.r)n.r.push({src:De,dest:Le,unwrap:!1});else for(var Re=0;Re<De.length;Re++)Le.push(De[Re]);ye.push(Le)}else ye.push(De)}return{node:{type:a.ordered?$.orderedList:$.unorderedList,start:a.ordered?a.start:void 0,items:ye},end:s}}var EG=new Set(`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`));function DG(e,t,n){let r={};var i=t.charCodeAt(0),a=i>=CH&&i<=wH&&!!IU(n.overrides,t,void 0);for(let[i,c]of Object.entries(e)){let e=i.toLowerCase();if(e===`style`&&typeof c==`string`){let e={},t=[],n=0,a=0;for(let e=0;e<c.length;e++){let r=c.charCodeAt(e);r===fH?n++:r===pH?n--:r===nH&&n===0&&(t.push(c.slice(a,e)),a=e+1)}a<c.length&&t.push(c.slice(a));let o=!1;t.forEach(t=>{let n=t.indexOf(`:`);if(n===-1)return;let r=t.slice(0,n).trim(),i=t.slice(n+1).trim();if(r&&i){if(/url\s*\(\s*(javascript|vbscript|data:(?!image\/))/i.test(i)){o=!0;return}let t=r.indexOf(`-`)===-1?r:r.replace(/-([a-z])/g,(e,t)=>t.toUpperCase());e[t]=i}}),!o&&Object.keys(e).length>0&&(r[i]=e)}else if((e===`href`||e===`src`)&&n?.sanitizer){let a=n.sanitizer(c,t,e);a!=null&&(r[i]=a)}else if(c===``)r[i]=!0;else if(a&&c.length>=2&&c.charCodeAt(0)===uH&&c.charCodeAt(c.length-1)===dH){var o=c.slice(1,-1);if(o.length>0){var s=o.charCodeAt(0);if(s===AV||s===uH)try{r[i]=JSON.parse(o);continue}catch{}}if(o===`true`){r[i]=!0;continue}if(o===`false`){r[i]=!1;continue}if(n?.evalUnserializableExpressions)try{r[i]=(0,eval)(`(${o})`);continue}catch{}r[i]=o}else r[i]=c}return r}function OG(e,t,n,r){let i=t.length;for(var a=t.charAt(0),o=r-i,s=n;s<=o;){var c=e.indexOf(a,s);if(c===-1||c>o)return-1;for(var l=!0,u=1;u<i;u++){var d=e.charCodeAt(c+u),f=t.charCodeAt(u);if(d>=CH&&d<=wH&&(d+=OH),f>=CH&&f<=wH&&(f+=OH),d!==f){l=!1;break}}if(l)return c;s=c+1}return-1}function kG(e,t,n){for(var r=0;r<n.length;r++){var i=e.charCodeAt(t+r);if(i>=CH&&i<=wH&&(i+=OH),i!==n.charCodeAt(r))return!1}return!0}function AG(e,t,n){for(var r=t.charAt(0),i=Math.min(n,e.length-t.length),a=i<0?-1:e.lastIndexOf(r,i);a!==-1&&!kG(e,a,t);)a=a===0?-1:e.lastIndexOf(r,a-1);return a}var jG=null,MG=Object.create(null),NG=null,PG=0;function FG(){jG=null,MG=Object.create(null),NG=null,PG=0}function IG(e){return e===MV||e===Q||e===TV||e===DV}function LG(e){for(var t=Object.create(null),n=e.indexOf(`</`);n!==-1;){for(var r=n+2,i=e.charCodeAt(r);r<e.length&&i!==aH&&!IG(i);)i=e.charCodeAt(++r);(r===e.length||i!==aH)&&(t[e.slice(n+2,r).toLowerCase()]=n),n=e.indexOf(`</`,r-1)}return t}var RG=-1;function zG(e,t,n,r){let i=n.toLowerCase(),a=`<${i}`,o=`</${i}`,s=1,c=t;if(RG=-1,jG===e){if(NG!==null){var l=NG[i];if(l===void 0||l<t)return-1}var u=MG[i];if(u!==void 0){if(t>=u.noCloseFrom&&r<=u.noCloseEnd)return-1;if(r===u.failEnd){var d=u.failStarts,f=BG(d,t);if(f<d.length&&d[f]===t)return-1}}}for(var p=null,m=-1,h=-2,g=-2;c<r&&s>0;){if(h!==-1&&h<c&&(h=OG(e,a,c,r)),g<c&&(g=OG(e,o,c,r)),g===-1){m=c;break}if(h!==-1&&h<g){let t=FW(e,h);t?(t.tag.toLowerCase()===i&&!t.g&&!t.n&&!QH(t.tag)&&(s++,p===null&&(p=[]),p.push(t.end)),c=t.end):c=h+1}else{var _=g+o.length;if(IG(_<e.length?e.charCodeAt(_):MV)){if(s--,s===0){RG=g;let t=g+o.length;for(;t<e.length&&e.charCodeAt(t)!==MV;)t++;return t+1}p===null&&(p=[]),p.push(-1)}c=g+1}}jG!==e&&(FG(),jG=e),PG+=r-t,NG===null&&PG>=e.length&&(NG=LG(e));var v=MG[i];v===void 0&&(v=MG[i]={failEnd:-1,failStarts:[],noCloseEnd:-1,noCloseFrom:-1}),m!==-1&&(v.noCloseFrom=m,v.noCloseEnd=r);var y=v.failStarts;if(v.failEnd!==r&&(y.length=0,v.failEnd=r),y.length=BG(y,t),p===null)return-1;for(var b=s,x=s,S=p.length-1;S>=0;S--){var C=p[S]!==-1;b<x&&(p[S]=-1),x<b&&(b=x),x+=C?-1:1}for(S=0;S<p.length;S++)p[S]!==-1&&y.push(p[S]);return-1}function BG(e,t){for(var n=0,r=e.length;n<r;){var i=n+r>>1;e[i]<t?n=i+1:r=i}return n}var VG=null,HG=null;function UG(e,t,n,r,i){if(e!==null&&e.s===t&&n>=e.from&&n<=e.at)return e;for(var a=t.indexOf(r,n);a!==-1;){if(i.lastIndex=a,i.test(t))return{at:a,from:n,s:t};a=t.indexOf(r,a+1)}return{at:t.length,from:n,s:t}}function WG(e,t,n){for(var r=0,i=t,a=e.charCodeAt(i);a===DV||a===Q||a===TV;)a===DV&&r++,a=e.charCodeAt(++i);if(r<2||a!==BV)return!1;if(e.slice(i,i+n.length).toLowerCase()!==n)return!0;var o=i+n.length;return!IG(o<e.length?e.charCodeAt(o):MV)}function GG(e,t){var n=FW(e,t);if(n===null)return!1;var r=n.tag.charCodeAt(0);return r>=CH&&r<=wH||n.tag.includes(`-`)}function KG(e,t,n,r){if(r.ignoreHTMLBlocks||r.disableParsingRawHTML)return null;var i=eG(e,t);if(sG(e,t,i),aG>3&&!n.inHTML)return null;var a=t+oG;if(e.charCodeAt(a)!==BV)return null;var o=e.indexOf(`>`,a+1);if(o!==-1&&o<i){var s=e.slice(a+1,o);if(/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(s)||/^[^\s@]+@[^\s@]+$/.test(s))return null}var c=qG(e,a);if(c>=1&&c<=5){var l=e.length;if(c===1){HG=UG(HG,e,a,`</`,eW);var u=HG.at;u<e.length&&(l=tG(e,e.indexOf(`>`,u)+1))}else{var d=c===2?`-->`:c===3?`?>`:c===4?`>`:`]]>`,f=e.indexOf(d,a);f>=0&&(l=tG(e,f+d.length))}var p=e.slice(a,l);if(c>=2)return{node:{type:$.htmlComment,text:LW(p),t:!1,raw:!0},end:l};var m=`div`,h=p.match(/^<\/?([a-zA-Z][a-zA-Z0-9-]*)/);h&&(m=h[1]);var g=FW(e,a),_={},v;g&&!g.g&&(_=DG(g.attrs,m,r),v=g.i+g.a);var y=[],b=OG(p,`</${m.toLowerCase()}`,0,p.length),x=``,S,C,w;if(g?.g){w=NK(e,a,g.end,m);for(var T=p.slice(g.end-a);T.length>0&&T.charCodeAt(T.length-1)===DV;)T=T.slice(0,-1);T&&(C=LW(T))}else if(g&&!g.g){var E=g.end-a;if(b===-1){for(var D=p;D.length>0&&D.charCodeAt(D.length-1)===DV;)D=D.slice(0,-1);S=LW(D);var O=E;p.charCodeAt(O)===DV&&(O+=1),x=D.slice(O)}else{var k=E;p.charCodeAt(k)===DV&&k++;for(var A=b;A>k;){var j=p.charCodeAt(A-1);if(j!==Q&&j!==TV&&j!==DV&&j!==EV)break;A--}var M=p.slice(k,A);M&&(C=LW(M));for(var N=p.slice(b);N.length>0&&N.charCodeAt(N.length-1)===DV;)N=N.slice(0,-1);w=LW(N),x=p.slice(E,b).trim()}}var P=g?g.g:!1;return{node:{type:$.htmlBlock,tag:m,attrs:_,a:v,children:y,e:C,j:w,k:S,h:void 0,text:x&&LW(x),c:!0,b:P},end:l}}if(c===6||c===7){var F=rG(e,t),I=F<e.length?F:e.length,L=e.slice(a,I),R=F<e.length?tG(e,F):e.length,z=FW(e,a);if(z){var B=z.tag,V=B.toLowerCase();if(z.g){var H=e.slice(z.end,I),U={keepingChildren:void 0},ee=H?LW(H,void 0,U):void 0;return{node:{type:$.htmlBlock,tag:B,attrs:{},children:[],j:NK(e,a,z.end,B),e:ee,h:U.keepingChildren,text:ee||``,c:!0,b:!0},end:R}}if(z.n||QH(B))return{node:{type:$.htmlBlock,tag:B,attrs:DG(z.attrs,B,r),a:z.i+z.a,children:[],h:void 0,text:``,c:!1,b:!1},end:z.end<e.length&&e.charCodeAt(z.end)===DV?z.end+1:z.end};var te=n.d||0,ne=e.slice(a,I),W=-1,re=-1,ie=!1;if(te<10){for(var ae=`</${V}`,G=z.end-a,K=1,q=G,oe=-2,J=-2;q<ne.length&&K>0&&(oe!==-1&&oe<q&&(oe=OG(ne,`<${V}`,q,ne.length)),J<q&&(J=OG(ne,ae,q,ne.length)),J!==-1);)if(oe!==-1&&oe<J){var se=oe+V.length+1;if(se<ne.length){var ce=ne.charCodeAt(se);(ce===Q||ce===TV||ce===DV||ce===MV||ce===aH)&&K++}q=oe+1}else{var le=J+ae.length;if(le<ne.length){if(IG(ne.charCodeAt(le))&&(K--,K===0)){W=J;for(var ue=le;ue<ne.length&&ne.charCodeAt(ue)!==MV;)ue++;re=ue+1;break}}else if(K--,K===0){W=J,re=ne.length;break}q=J+1}if(W===-1&&!z.g&&(c===6||z.y)&&!WG(e,z.end,ae)){VG=UG(VG,e,z.end,`<`,$U);var de=zG(e,z.end,V,VG.at);if(de!==-1){var fe=RG;if(fe>rG(e,z.end)){var pe=eG(e,de);I=pe,R=tG(e,pe),ne=e.slice(a,I),L=e.slice(a,I),W=fe-a,re=de-a,ie=!0}}}}var me=z.a.indexOf(`
51
+ `)!==-1||z.i.indexOf(`
52
+ `)!==-1,he=!1;W!==-1&&(he=ne.slice(re).trim().length===0);var ge=!1,_e=I,ve=R;if(W!==-1){var ye=a+re,be=eG(e,ye-1);if(ye<be){for(var xe=ye;xe<be&&(e.charCodeAt(xe)===Q||e.charCodeAt(xe)===TV);)xe++;if(xe<be&&e.charCodeAt(xe)===BV){var Se=FW(e,xe);Se&&!Se.g&&(ge=!0,_e=ye,ve=ye,he=!0)}}if(!ge){var Ce=tG(e,be);if(Ce<I){for(var we=Ce;we<I&&(e.charCodeAt(we)===Q||e.charCodeAt(we)===TV);)we++;we<I&&e.charCodeAt(we)===BV&&FW(e,we)&&(ge=!0,_e=be,ve=Ce,he=!0)}}!ge&&n.inHTML&&(ge=!0,_e=be,ve=tG(e,be),he=e.slice(ye,be).trim().length===0)}var Te=[],Ee=``;if(W!==-1){Ee=ne.slice(z.end-a,W);var De=Ee.trim();if(De){var{inline:Oe,inHTML:ke,d:Ae}=n;if(n.inHTML=!0,n.d=te+1,V===`p`)n.inline=!0,Te=$G(De,!1,n,r);else{var je=Ee.indexOf(`
53
+
54
+ `)!==-1,Me=sW(r).test(De),Ne=cW.test(De),Pe=je||Me||n.inHTML&&Ne;Ee.length>=2&&Ee.charCodeAt(0)===DV&&Ee.charCodeAt(Ee.length-1)===DV&&!je&&!Me&&!Ne?Te=[{type:$.text,text:De}]:Pe||Ne?(n.inline=!1,Te=UK(Ee,n,r)):(n.inline=!0,Te=$G(De,!1,n,r))}n.inline=Oe,n.inHTML=ke,n.d=Ae}}var Fe=!1;if(c===6&&W!==-1&&!n.inHTML&&!me){var Ie=/<[a-zA-Z][^>]*>/.test(Ee),Le=Ee.indexOf(`
55
+
56
+ `)!==-1||sW(r).test(Ee);Ie&&!Le&&(Fe=!0)}if(!ie&&(n.inHTML||c===7||me||!he||Fe)){var Re,ze,Be=!1;if(W!==-1&&ge){var Ve=!1;if(n.inHTML&&re<ne.length){for(var He=re;He<ne.length&&ne.charCodeAt(He)!==DV;)He++;var Ue=ne.slice(re,He).trim();Ve=Ue.length>1&&Ue.charCodeAt(0)===BV&&Ue.charCodeAt(1)!==aH}ze=Ve?ne.slice(z.end-a):Ee,Be=!0}else(c===7||n.inHTML)&&W!==-1?(ze=ne.slice(z.end-a),ze.charCodeAt(0)===DV&&(ze=ze.slice(1))):ge?Re=e.slice(a,_e):me?Re=L:(ze=ne.slice(z.end-a),ze.charCodeAt(0)===DV&&(ze=ze.slice(1)));var We=Re!==void 0,Ge=ze||``;Re!==void 0&&(Ge=Re);var Ke={keepingChildren:void 0},qe=LW(Ge,void 0,Ke),Je=Ee;W===-1&&(Je=ne.slice(z.end-a)),!(W!==-1&&ge)&&Je.charCodeAt(0)===DV&&(Je=Je.slice(1));var Ye=qe;Je!==Ge&&(Ye=LW(Je));var Xe={type:$.htmlBlock,tag:B,attrs:DG(z.attrs,B,r),a:z.i+z.a,children:Te,e:We?void 0:qe,k:We?qe:void 0,h:Ke.keepingChildren,text:Ye,c:!0,b:!1};return Be&&(Xe.C=!0),{node:Xe,end:ve}}var Ze=LW(Ee);return{node:{type:$.htmlBlock,tag:B,attrs:DG(z.attrs,B,r),a:z.i+z.a,children:Te,e:ie?void 0:Ze,h:void 0,text:Ze,c:!1,b:!1},end:ve}}var Qe=L.match(/^<(\/?)([a-zA-Z][a-zA-Z0-9-]*)/),$e=Qe?Qe[2]:`div`,et=Qe?Qe[1]===`/`:!1,tt,nt,rt,it={keepingChildren:void 0},at=``;if(et){var ot=L.indexOf(`>`);ot===-1?tt=L:(tt=L.slice(0,ot+1),at=L.slice(ot+1),at&&(nt=LW(at,void 0,it)))}else rt=LW(L,void 0,it);return{node:{type:$.htmlBlock,tag:$e,attrs:{},children:[],e:nt,j:tt,k:rt,h:it.keepingChildren,text:rt||nt||``,c:!0,b:et},end:R}}var st=FW(e,a);if(!st)return null;var ct=st.tag,lt=ct.toLowerCase(),ut=ct.charCodeAt(0),dt=ut>=CH&&ut<=wH;if(!(dt||EG.has(lt)||ZU.has(lt)||lt.includes(`-`)))return null;if(st.g)return{node:{type:$.htmlSelfClosing,tag:ct,attrs:{},j:NK(e,a,st.end,ct),b:!0},end:st.end};var ft=zG(e,st.end,ct,e.length),pt=[];if(ft!==-1){var mt=RG,ht=e.slice(st.end,mt),gt=ht.trim();if(gt){var _t=ht.indexOf(`
57
+
58
+ `)!==-1,vt=sW(r).test(gt),yt=cW.test(gt),{inline:bt,inHTML:xt,d:St}=n;n.inHTML=!0,n.d=(n.d||0)+1,_t||vt||yt?(n.inline=!1,pt=UK(ht,n,r)):(n.inline=!0,pt=$G(gt,!1,n,r)),n.inline=bt,n.inHTML=xt,n.d=St}var Ct=eG(e,ft),wt=e.slice(ft,Ct).trim()?ft:tG(e,ft),Tt=dt?e.slice(a,ft):e.slice(a,wt),Et={keepingChildren:void 0},Dt=LW(Tt,void 0,Et);return{node:{type:$.htmlBlock,tag:ct,attrs:DG(st.attrs,ct,r),a:st.i+st.a,children:pt,k:Dt,h:Et.keepingChildren,text:LW(ht),c:!0,b:!1},end:wt}}var Ot=rG(e,st.end),kt=Ot<e.length?tG(e,Ot):Ot,At=e.slice(st.end,Ot);if(At.trim()){var{inline:jt,inHTML:Mt,d:Nt}=n;n.inline=!1,n.inHTML=!0,n.d=(n.d||0)+1,pt=UK(At,n,r),n.inline=jt,n.inHTML=Mt,n.d=Nt}var Pt={keepingChildren:void 0},Ft=LW(e.slice(st.end,Ot),void 0,Pt);return{node:{type:$.htmlBlock,tag:ct,attrs:DG(st.attrs,ct,r),a:st.i+st.a,children:pt,e:Ft,h:Pt.keepingChildren,text:Ft,c:!0,b:!1},end:kt}}function qG(e,t){if(e.charCodeAt(t)!==BV)return 0;var n=t+1,r=e.length;if(e.charCodeAt(n)===UV&&e.charCodeAt(n+1)===FV&&e.charCodeAt(n+2)===FV)return 2;if(e.charCodeAt(n)===rH)return 3;if(e.charCodeAt(n)===UV){var i=e.charCodeAt(n+1);if(i>=CH&&i<=wH)return 4;if(e.slice(n+1,n+8)===`[CDATA[`)return 5}for(var a=e.charCodeAt(n)===aH,o=a?n+1:n,s=o;s<r;){var c=e.charCodeAt(s);if(c>=CH&&c<=wH||c>=TH&&c<=EH||c>=xH&&c<=SH||c===FV)s++;else break}if(s===o)return 0;var l=e.slice(o,s);if(ZU.has(l.toLowerCase())){if(a)return 0;var u=e.charCodeAt(s);return+(u===Q||u===TV||u===MV||u===DV||s>=r)}if(EG.has(l.toLowerCase())){if(a){for(var d=s;d<r&&(e.charCodeAt(d)===Q||e.charCodeAt(d)===TV);)d++;return d<r&&e.charCodeAt(d)===MV?6:0}var f=s<r?e.charCodeAt(s):-1;return f===Q||f===TV||f===MV||f===DV||f===aH||f===-1?6:0}if(a){for(var p=s;p<r&&(e.charCodeAt(p)===Q||e.charCodeAt(p)===TV);)p++;if(p<r&&e.charCodeAt(p)===MV){var m=eG(e,t);if(e.slice(p+1,m).trim()===``)return 7}}else{var h=eG(e,t),g=FW(e,t);if(g&&g.end<=h&&e.slice(g.end,h).trim()===``)return 7}return 0}function JG(e,t,n){for(var r=0,i=e.length;r<i&&(e.charCodeAt(r)===Q||e.charCodeAt(r)===TV||e.charCodeAt(r)===bH);)r++;for(;i>r&&(e.charCodeAt(i-1)===Q||e.charCodeAt(i-1)===TV);)i--;r<i&&e.charCodeAt(r)===lH&&r++,i>r&&e.charCodeAt(i-1)===lH&&(i-2<r||e.charCodeAt(i-2)!==LV)&&i--;for(var a=[],o=r,s=!1,c=[],l=r;l<i;){var u=e.charCodeAt(l);if(u===LV&&l+1<i)e.charCodeAt(l+1)===lH?(s||(s=!0,c=[]),c.push(e.slice(o,l)),c.push(`|`),l+=2,o=l):l+=2;else if(u===OV){for(var d=0;l<i&&e.charCodeAt(l)===OV;)d++,l++;for(var f=!1;l<i&&!f;){for(var p=0;l<i&&e.charCodeAt(l)===OV;)p++,l++;p===d?f=!0:p===0&&l++}}else if(u===lH){var m=s?(c.push(e.slice(o,l)),c.join(``)):e.slice(o,l);a.push(m.trim()),l++,o=l,s=!1,c=[]}else l++}var h=s?(c.push(e.slice(o,i)),c.join(``)):e.slice(o,i);return a.push(h.trim()),a.map(e=>{var r=e.indexOf(`\\|`)===-1?e:e.replace(/\\[\s\S]/g,e=>e===`\\|`?`|`:e);return r?$G(r,!1,t,n):[]})}function YG(e,t,n,r){let i=eG(e,t);var a=e.indexOf(`|`,t);if(a<0||a>=i)return null;let o=tG(e,i);if(o>=e.length)return null;let s=eG(e,o);if(!pW(e,o,s))return null;let c=e.slice(t,i),l=e.slice(o,s);for(var u=[],d=0,f=l.length;d<f&&(l.charCodeAt(d)===Q||l.charCodeAt(d)===TV);)d++;for(d<f&&l.charCodeAt(d)===lH&&d++;d<f;){for(;d<f&&(l.charCodeAt(d)===Q||l.charCodeAt(d)===TV);)d++;if(d>=f||l.charCodeAt(d)===lH)break;var p=l.charCodeAt(d)===GV;for(p&&d++;d<f&&l.charCodeAt(d)===FV;)d++;var m=d<f&&l.charCodeAt(d)===GV;for(m&&d++,u.push(p&&m?`center`:m?`right`:p?`left`:null);d<f&&(l.charCodeAt(d)===Q||l.charCodeAt(d)===TV);)d++;d<f&&l.charCodeAt(d)===lH&&d++}let h=JG(c,n,r);if(u.length!==h.length)return null;let g=[],_=tG(e,s);for(;_<e.length;){let t=eG(e,_),i=e.slice(_,t);if(cG(e,_,t))break;if(sG(e,_,t),aG<4){var v=e.charCodeAt(_+oG);if(v===MV||v===NV||(v===FV||v===RV||v===zV)&&pG(e,_))break;if(v===OV||v===kV){for(var y=_+oG,b=0;y<t&&e.charCodeAt(y)===v;)b++,y++;if(b>=3)break}}g.push(JG(i,n,r)),_=tG(e,t)}if(r.optimizeForStreaming&&g.length===0)return null;for(var x=h.length,S=0;S<g.length;S++)if(g[S].length<x)for(;g[S].length<x;)g[S].push([]);else g[S].length>x&&(g[S].length=x);return{node:{type:$.table,header:h,cells:g,align:u},end:_}}function XG(e,t,n){if(sG(e,t,eG(e,t)),aG>3)return null;var r=t+oG;if(e.charCodeAt(r)!==AV)return null;if(r+1<e.length&&e.charCodeAt(r+1)===jV)return ZG(e,r,n)||null;n.refs||=Object.create(null);var i=VW(e,r,n.refs);return i===null?null:{node:{type:$.refCollection},end:i}}function ZG(e,t,n){var r=e.length;if(e.charCodeAt(t)!==AV||t+1>=r||e.charCodeAt(t+1)!==jV)return null;for(var i=t+2,a=i;i<r&&e.charCodeAt(i)!==HV;){if(e.charCodeAt(i)===DV)return null;i++}if(i>=r)return null;var o=`^${e.slice(a,i)}`.toLowerCase();if(i++,i>=r||e.charCodeAt(i)!==GV)return null;for(i++;i<r&&(e.charCodeAt(i)===Q||e.charCodeAt(i)===TV);)i++;if(i<r&&e.charCodeAt(i)===DV){for(i++;e.charCodeAt(i)===bH;)i++;for(;i<r&&(e.charCodeAt(i)===Q||e.charCodeAt(i)===TV);)i++}var s=e.indexOf(`
59
+ `,i);s<0&&(s=r);for(var c=e.slice(i,s).trim(),l=s<r?s+1:r;l<r;){var u=eG(e,l);if(sG(e,l,u),aG>=2&&!cG(e,l,u))c+=`
60
+ ${e.slice(l,u)}`,l=tG(e,u);else if(cG(e,l,u)){var d=tG(e,u);if(d<r&&(sG(e,d,eG(e,d)),aG>=2)){c+=`
61
+ `,l=tG(e,u);continue}break}else break}var f=n.refs;return f&&!f[o]&&(f[o]={target:c,title:void 0}),{node:{type:$.footnote},end:l}}function QG(e,t,n,r){let i=t,a=0,o=0,s=-1;for(;i<e.length;){let t=s>=0?s:eG(e,i);if(s=-1,cG(e,i,t))break;if(sG(e,i,t),aG<4&&o>0&&!n.m){let n=e.charCodeAt(i+oG);if(n===IV||n===FV){let r=i+oG;for(;r<t&&e.charCodeAt(r)===n;)r++;for(;r<t&&(e.charCodeAt(r)===Q||e.charCodeAt(r)===TV);)r++;if(r>=t){a=n===IV?1:2,i=tG(e,t);break}}}o=t;let x=tG(e,t);if(x<e.length){if(e.charCodeAt(x)===bH){var c=eG(e,x);i=tG(e,c),o=c;continue}let t=eG(e,x);if(s=t,sG(e,x,t),aG<4){let a=e.charCodeAt(x+oG);if(a===MV){i=x;break}if(a===NV){for(var l=x+oG,u=0;l<t&&e.charCodeAt(l)===NV&&u<=6;)u++,l++;if(u>=1&&u<=6&&(r.enforceAtxHeadings===!1||l>=t||e.charCodeAt(l)===Q||e.charCodeAt(l)===TV)){i=x;break}}if(a===OV||a===kV){for(var d=x+oG,f=0;d<t&&e.charCodeAt(d)===a;)f++,d++;if(f>=3){i=x;break}}if(a===BV){var p=x+oG+1,m=p<t?e.charCodeAt(p):0,h=m===UV||m===rH;if(!h&&m===aH){for(var g=p+1,_=g;_<t&&(e.charCodeAt(_)>=CH&&e.charCodeAt(_)<=wH||e.charCodeAt(_)>=TH&&e.charCodeAt(_)<=EH||e.charCodeAt(_)>=xH&&e.charCodeAt(_)<=SH||e.charCodeAt(_)===FV);)_++;_>g&&(h=EG.has(e.slice(g,_).toLowerCase()))}else if(!h){for(var v=p;v<t&&(e.charCodeAt(v)>=CH&&e.charCodeAt(v)<=wH||e.charCodeAt(v)>=TH&&e.charCodeAt(v)<=EH||e.charCodeAt(v)>=xH&&e.charCodeAt(v)<=SH||e.charCodeAt(v)===FV);)v++;if(v>p){var y=e.slice(p,v).toLowerCase();h=EG.has(y)||ZU.has(y)}}if(h&&KG(e,x,n,r)){i=x;break}}if(a===FV||a===RV||a===cH){let n=x+oG+1;if(n<t&&(e.charCodeAt(n)===Q||e.charCodeAt(n)===TV)&&nG(e,n,t)<t&&!pG(e,x)){i=x;break}}if(a>=xH&&a<=SH){let n=x+oG;for(;n<t&&e.charCodeAt(n)>=xH&&e.charCodeAt(n)<=SH;)n++;if(n<t&&(e.charCodeAt(n)===iH||e.charCodeAt(n)===pH)&&n-(x+oG)===1&&e.charCodeAt(x+oG)===49){var b=n+1;if(b<t&&(e.charCodeAt(b)===Q||e.charCodeAt(b)===TV)&&nG(e,b,t)<t){i=x;break}}}if(a===lH){let n=tG(e,t);if(n<e.length&&pW(e,n,eG(e,n))){i=x;break}}if((a===FV||a===RV||a===zV)&&pG(e,x)){if(a!==FV){i=x;break}let n=0,r=x+oG;for(;r<t&&e.charCodeAt(r)===FV;)n++,r++;for(;r<t&&(e.charCodeAt(r)===Q||e.charCodeAt(r)===TV);)r++;if(r<t){i=x;break}}}}i=tG(e,t)}for(var x=a?o:i;x>t&&(e.charCodeAt(x-1)===DV||e.charCodeAt(x-1)===EV||e.charCodeAt(x-1)===Q||e.charCodeAt(x-1)===TV);)x--;for(var S=t;S<x&&(e.charCodeAt(S)===Q||e.charCodeAt(S)===TV);)S++;if(S>=x)return null;for(var C=!1,w=S;w<x;w++)if(e.charCodeAt(w)===bH){C=!0;break}var T=C?e.slice(S,x).replace(/\u001E/g,``):e.slice(S,x);if(!T)return null;let E=$G(T,!0,n,r);return a?{node:{type:$.heading,level:a,children:E,id:``},end:i}:{node:{type:$.paragraph,children:E},end:i}}function $G(e,t,n,r){var i=n.o;if(!i){var a=n.l;n.l=t;var o=VK(e,0,e.length,n,r);return n.l=a,o}var s=[];return i.push({dest:s,text:e,breaks:t,inline:n.inline,inAnchor:n.inAnchor,inHTML:n.inHTML,htmlDepth:n.d,inList:n.inList,inBlockQuote:n.inBlockQuote,noSetext:n.m,depth:n.p,notAtEdge:n.f}),s}function eK(e,t,n){if(e.charCodeAt(t)!==OV)return null;let r=iG(e,t,n,96),i=t+r;for(;i<n;){let a=e.indexOf("`",i);if(a<0||a>=n)return null;let o=iG(e,a,n,96);if(o===r){let n=e.slice(t+r,a);return n.indexOf(`
62
+ `)!==-1&&(n=n.replace(/\n/g,` `)),n.length>0&&n[0]===` `&&n.at(-1)===` `&&n.trim().length>0&&(n=n.slice(1,-1)),{node:{type:$.codeInline,text:n},end:a+o}}i=a+o}return null}function tK(e,t,n){if(e.charCodeAt(t)!==OV)return t;let r=iG(e,t,n,96),i=t+r;for(;i<n;){let a=e.indexOf("`",i);if(a<0||a>=n)return t;let o=iG(e,a,n,96);if(o===r)return a+o;i=a+o}return t}var nK=1048576,rK=nK;function iK(e,t,n){if(e.charCodeAt(t)!==BV||rK<=0)return t;if(t+1<n&&e.charCodeAt(t+1)===aH){let r=t+2;for(;r<n&&e.charCodeAt(r)!==MV;)r++;return r<n?r+1:(rK-=r-t,t)}if(t+3<n&&e.charCodeAt(t+1)===UV&&e.charCodeAt(t+2)===FV&&e.charCodeAt(t+3)===FV){let n=IK(e,`-->`,t+4);return n<0?t:n+3}let r=t+1,i=r;for(;r<n;){let t=e.charCodeAt(r);if(t>=CH&&t<=wH||t>=TH&&t<=EH||t>=xH&&t<=SH||t===FV)r++;else break}if(r===i)return t;let a=e.slice(i,r).toLowerCase(),o=!1;for(;r<n;){let i=e.charCodeAt(r);if(i===MV){r++;break}if(i===aH&&r+1<n&&e.charCodeAt(r+1)===MV){r+=2,o=!0;break}if(i===sH||i===oH){var s=i;for(r++;r<n&&e.charCodeAt(r)!==s;)r++;r<n&&r++}else{if(i===DV)return rK-=r-t,t;r++}}if(o||QH(a))return r;let c=1;for(;r<n&&c>0;)if(e.charCodeAt(r)===BV){if(r+1<n&&e.charCodeAt(r+1)===aH){let t=r+2,i=t;for(;i<n&&(e.charCodeAt(i)>=CH&&e.charCodeAt(i)<=wH||e.charCodeAt(i)>=TH&&e.charCodeAt(i)<=EH);)i++;if(e.slice(t,i).toLowerCase()===a){for(;i<n&&e.charCodeAt(i)!==MV;)i++;if(i<n&&i++,c--,c===0)return i}r=i}else{let t=r+1,i=t;for(;i<n&&(e.charCodeAt(i)>=CH&&e.charCodeAt(i)<=wH||e.charCodeAt(i)>=TH&&e.charCodeAt(i)<=EH);)i++;e.slice(t,i).toLowerCase()===a&&c++,r++}}else r++;return r}function aK(e,t,n,r,i){if(e.charCodeAt(t)!==kV||t+1>=n||e.charCodeAt(t+1)!==kV)return null;let a=t+2;for(;a+1<n;){let o=e.charCodeAt(a);if(o===OV){let t=tK(e,a,n);if(t>a){a=t;continue}}if(o===kV&&e.charCodeAt(a+1)===kV){let n=e.slice(t+2,a),o=VK(n,0,n.length,r,i);return{node:{type:$.textFormatted,tag:`del`,children:o},end:a+2}}o===LV&&a+1<n&&a++,a++}return null}function oK(e,t,n,r,i){if(e.charCodeAt(t)!==IV||t+1>=n||e.charCodeAt(t+1)!==IV)return null;let a=t+2;for(;a+1<n;){let o=e.charCodeAt(a);if(o===OV){let t=tK(e,a,n);if(t>a){a=t;continue}}if(o===IV&&e.charCodeAt(a+1)===IV&&a>t+2){let n=e.slice(t+2,a),o=VK(n,0,n.length,r,i);return{node:{type:$.textFormatted,tag:`mark`,children:o},end:a+2}}o===LV&&a+1<n&&a++,a++}return null}function sK(e,t,n){return e<DH?!!(KW(e)&tU):cU.test(t[n])}function cK(e,t,n){return e<DH?!!(KW(e)&$H):lU.test(t[n])}function lK(e,t,n){var r=e.charCodeAt(t);if(r!==RV&&r!==zV)return null;var i=iG(e,t,n,r);if(i===0)return null;var a=t>0?e.charCodeAt(t-1):32,o=t+i<n?e.charCodeAt(t+i):32,s=cK(a,e,t-1),c=cK(o,e,t+i),l=t>0&&sK(a,e,t-1),u=t+i<n&&sK(o,e,t+i),d=!c&&(!u||s||l),f=!s&&(!l||c||u),p,m;return r===RV?(p=d,m=f):(p=d&&(!f||l),m=f&&(!d||u)),{len:i,canOpen:p,canClose:m}}function uK(e,t,n,r,i){if(t.length!==0){for(var a=e.length,o=Array(a),s=null,c=null,l=0;l<a;l++){var u={node:e[l],prev:c,next:null};c?c.next=u:s=u,o[l]=u,c=u}for(var d=Array(t.length),f=0;f<t.length;f++)d[f]=o[t[f].idx];for(var p=[],m=0;m<12;m++)p[m]=-1;for(var h=0;h<t.length;){var g=t[h];if(!(g.active&&g.canClose))h++;else{for(var _=(g.ch===RV?0:1)*6+g.len%3*2+ +!!g.canOpen,v=p[_]===void 0?-1:p[_],y=-1,b=h-1;b>v;b--){var x=t[b];if(x.active&&x.ch===g.ch&&x.canOpen&&(!g.canOpen&&!x.canClose||(x.len+g.len)%3!=0||x.len%3==0)){y=b;break}}if(y<0)p[_]=h-1,!g.canOpen&&(g.active=!1),h++;else{var S=t[y],C=S.len>=2&&g.len>=2,w=C?2:1;S.len-=w,g.len-=w;var T=d[y],E=d[h],D=T.node,O=E.node;D.text=D.text.slice(0,D.text.length-w),O.text=O.text.slice(w);for(var k=[],A=T.next;A&&A!==E;)k.push(A.node),A=A.next;var j={node:{type:$.textFormatted,tag:C?`strong`:`em`,children:k},prev:T,next:E};T.next=j,E.prev=j;for(var M=y+1;M<h;M++)t[M].active=!1;if(S.len===0&&(S.active=!1,D.text===``)){var N=T.prev;j.prev=N,N?N.next=j:s=j}if(g.len===0){if(g.active=!1,O.text===``){var P=E.next;j.next=P,P&&(P.prev=j)}}else continue;h++}}}if(n)for(var F=0;F<n.length;F++){var I=t[n[F]];I.active&&I.len>0&&(d[n[F]].node.text=``)}for(var L=0,R=s;R;){var z=R.node;if(z.type===$.text){var B=z;if(B.text===``){R=R.next;continue}if(L>0&&e[L-1].type===$.text){e[L-1].text+=B.text,R=R.next;continue}}e[L++]=z,R=R.next}e.length=L}}function dK(e,t,n,r){return t(e,n,r)===null?null:e}var fK=0,pK=0,mK=0,hK=0,gK=0,_K=0;function vK(){return gK===2147483647&&(pK=0,hK=0,bK=0,gK=0),++gK}var yK=null,bK=0,xK=[],SK=256;function CK(e,t,n,r,i){let a=e.charCodeAt(t)===UV,o=a?t+1:t;if(e.charCodeAt(o)!==AV||hK===_K&&o>=mK)return null;var s=bK===_K?yK:null,c=s===null?0:s[o];if(c<0)return null;var l=c;if(c===0){var u=e.indexOf(`]`,o+1);if(u<0||u>=n)return mK=o,hK=_K,null;l=o+1;var d=0;xK[d++]=o;for(var f=n-o>=SK;l<n&&d>0;){var p=e.charCodeAt(l);if(p===LV&&l+1<n)l+=2;else{if(p===OV){var m=tK(e,l,n);if(m>l){l=m;continue}}if(p===BV){var h=wK(e,l,n);if(h){l=h.end;continue}var g=iK(e,l,n);if(g>l){rK-=g-l,l=g;continue}}if(p===AV)xK[d++]=l;else if(p===HV){var _=xK[--d];s===null&&f&&l-o>=SK&&(s=yK=new Int32Array(n),bK=_K),s!==null&&(s[_]=l+1)}l++}}if(d>0){if(s===null&&f&&l-o>=SK&&(s=yK=new Int32Array(n),bK=_K),s!==null)for(;d>0;)s[xK[--d]]=-1;return null}}var v=l-1,y=e.slice(o+1,v),b=l<n?e.charCodeAt(l):0,x=!1;if(b===fH){var S=!0;for(l++;l<n&&(e.charCodeAt(l)===Q||e.charCodeAt(l)===DV);)l++;var C=``,w=l;if(l<n&&e.charCodeAt(l)===BV){for(l++,w=l;w<n&&e.charCodeAt(w)!==MV;)if(e.charCodeAt(w)===LV&&w+1<n)w+=2;else{if(e.charCodeAt(w)===DV){S=!1;break}w++}S&&(w>=n||e.charCodeAt(w)!==MV)&&(S=!1),S&&(C=e.slice(l,w),w++)}else if(S){var T=pK===_K?fK:-1;if(T>=0&&l>=T)S=!1;else{for(var E=0,D=!1;w<n;){var O=e.charCodeAt(w);if(O===LV&&w+1<n)w+=2;else{if(O===fH)E++;else if(O===pH){if(D=!0,E===0)break;E--}else if(O===Q||O===DV)break;w++}}w>=n&&!D&&(T<0||l<T)&&(fK=l,pK=_K),C=e.slice(l,w)}}if(S){for(l=w;l<n&&(e.charCodeAt(l)===Q||e.charCodeAt(l)===DV);)l++;var k;if(l<n){var A=e.charCodeAt(l);if(A===sH||A===oH||A===fH){var j=A===fH?41:A;l++;for(var M=l;l<n&&e.charCodeAt(l)!==j;)e.charCodeAt(l)===LV&&l+1<n&&l++,l++;l>=n?S=!1:(k=e.slice(M,l),l++)}}if(S){for(;l<n&&(e.charCodeAt(l)===Q||e.charCodeAt(l)===DV);)l++;(l>=n||e.charCodeAt(l)!==pH)&&(S=!1)}}if(S){if(l++,C=LH(qW(C)),k!==void 0&&(k=LH(qW(k))),a){var N=kK(VK(y,0,y.length,r,i));return{node:{type:$.image,target:dK(C,i?.sanitizer||GH,`img`,`src`),alt:N,title:k},end:l}}var P=r.inAnchor;r.inAnchor=!0;var F=P?[{type:$.text,text:y}]:VK(y,0,y.length,r,i);return r.inAnchor=P,!r.inAnchor&&OK(F)?null:{node:{type:$.link,target:dK(C,i?.sanitizer||GH,`a`,`href`),title:k,children:F},end:l}}l=v+1,x=!0}var I=``,L=l;if(!x&&b===AV){var R=l+1;L=R;for(var z=!1;L<n&&e.charCodeAt(L)!==HV;)if(e.charCodeAt(L)===LV&&L+1<n)L+=2;else{if(e.charCodeAt(L)===AV){z=!0;break}L++}if(z||L>=n)return null;var B=e.slice(R,L);if(B.trim())I=GW(B);else{if(WW(y))return null;I=GW(y)}L+=1}else{if(WW(y))return null;I=GW(y)}var V=r.refs?.[I];if(!V||I.charCodeAt(0)===jV)return null;if(a)return{node:{type:$.image,target:dK(V.target,i?.sanitizer||GH,`img`,`src`),alt:kK(VK(y,0,y.length,r,i)),title:V.title},end:L};var H=r.inAnchor;r.inAnchor=!0;var F=H?[{type:$.text,text:y}]:VK(y,0,y.length,r,i);return r.inAnchor=H,!r.inAnchor&&OK(F)?null:{node:{type:$.link,target:dK(V.target,i?.sanitizer||GH,`a`,`href`),title:V.title,children:F},end:L}}function wK(e,t,n){if(e.charCodeAt(t)!==BV)return null;for(var r=t+1;r<n;){var i=e.charCodeAt(r);if(i===MV)break;if(i===Q||i===DV||i===EV||i===BV)return null;r++}if(r>=n||e.charCodeAt(r)!==MV)return null;var a=e.slice(t+1,r);return a.match(/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^\x00-\x20]*)$/)?{node:{type:$.link,target:a,title:void 0,children:[{type:$.text,text:a}]},end:r+1}:a.indexOf(`@`)!==-1&&/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)?{node:{type:$.link,target:`mailto:${a}`,title:void 0,children:[{type:$.text,text:a}]},end:r+1}:null}function TK(e,t,n,r,i){if(e.charCodeAt(t)!==AV||t+1>=n||e.charCodeAt(t+1)!==jV)return null;let a=t+2;for(;a<n&&e.charCodeAt(a)!==HV&&e.charCodeAt(a)!==AV&&e.charCodeAt(a)!==DV;)a++;if(a>=n||e.charCodeAt(a)!==HV)return null;let o=e.slice(t+2,a);return!o||!(i.optimizeForStreaming||r.refs?.[`^${o}`.toLowerCase()])?null:{node:{type:$.footnoteReference,target:`#${YH(o)}`,text:o},end:a+1}}function EK(e,t,n,r){if(r.disableBareUrls)return null;var i=``,a=!1,o=e.charCodeAt(t);if(o===JV||o===72?t+8<=n&&e.charCodeAt(t+1)===XV&&e.charCodeAt(t+2)===XV&&e.charCodeAt(t+3)===ZV&&(e.charCodeAt(t+4)===QV&&e.charCodeAt(t+5)===GV&&e.charCodeAt(t+6)===aH&&e.charCodeAt(t+7)===aH?i=`https://`:e.charCodeAt(t+4)===GV&&e.charCodeAt(t+5)===aH&&e.charCodeAt(t+6)===aH&&(i=`http://`)):o===qV||o===70?t+6<=n&&e.charCodeAt(t+1)===XV&&e.charCodeAt(t+2)===ZV&&e.charCodeAt(t+3)===GV&&e.charCodeAt(t+4)===aH&&e.charCodeAt(t+5)===aH&&(i=`ftp://`):(o===YV||o===87)&&t+4<=n&&e.charCodeAt(t+1)===YV&&e.charCodeAt(t+2)===YV&&e.charCodeAt(t+3)===iH&&(i=`www.`,a=!0),!i)return null;let s=t+i.length;for(;s<n;){let t=e.charCodeAt(s);if(t===Q||t===DV||t===TV||t===EV||t===BV||t===MV)break;s++}for(var c=0,l=0,u=t;u<s;u++){var d=e.charCodeAt(u);d===fH?c++:d===pH&&l++}let f=s;for(;f>t+i.length;){let n=e.charCodeAt(f-1);if(n===iH||n===tH||n===GV||n===UV||n===rH||n===pH||n===RV||n===zV||n===kV){if(n===pH){if(c>=l)break;l--}f--}else if(n===nH){for(var p=f-2;p>t&&(e.charCodeAt(p)>=CH&&e.charCodeAt(p)<=wH||e.charCodeAt(p)>=TH&&e.charCodeAt(p)<=EH||e.charCodeAt(p)>=xH&&e.charCodeAt(p)<=SH);)p--;p>=t&&e.charCodeAt(p)===WV?f=p:f--}else break}if(f<=t+i.length)return null;var m=t+(a?4:i.length),h=e.indexOf(`/`,m);if((h<0||h>f)&&(h=f),a&&e.indexOf(`.`,m)===-1)return null;for(var g=-1,_=-1,v=h-1;v>=m;v--)if(e.charCodeAt(v)===iH){if(g<0)g=v;else{_=v;break}}for(var v=_>=0?_+1:m;v<h;v++)if(e.charCodeAt(v)===zV)return null;var y=e.slice(t,f),b=a?`http://${y}`:y;return{node:{type:$.link,target:b,title:void 0,children:[{type:$.text,text:y}]},end:f}}function DK(e,t,n,r){if(r.disableBareUrls)return null;for(var i=t,a=i;i<n;){var o=e.charCodeAt(i);if(o>=CH&&o<=wH||o>=TH&&o<=EH||o>=xH&&o<=SH||o===iH||o===UV||o===NV||o===36||o===PV||o===WV||o===oH||o===RV||o===cH||o===aH||o===IV||o===rH||o===jV||o===zV||o===OV||o===uH||o===lH||o===dH||o===kV||o===FV)i++;else break}if(i===a||i>=n||e.charCodeAt(i)!==VV)return null;i++;for(var s=i,c=-1,l=i;i<n;){var o=e.charCodeAt(i);if(o>=CH&&o<=wH||o>=TH&&o<=EH||o>=xH&&o<=SH)i++;else if((o===FV||o===zV)&&i>s)i++;else if(o===iH){if(i===s)break;var u=e.charCodeAt(i-1);if(u===FV||u===zV||i-l>63)break;if(i+1<n){var d=e.charCodeAt(i+1);if(d>=CH&&d<=wH||d>=TH&&d<=EH||d>=xH&&d<=SH)c=i,l=i+1,i++;else break}else break}else break}if(i-l>63||c<0)return null;var f=e.charCodeAt(i-1);if(!(f>=CH&&f<=wH||f>=TH&&f<=EH||f>=xH&&f<=SH)||i<=c+1)return null;for(var p=-1,m=c-1;m>=s;m--)if(e.charCodeAt(m)===iH){p=m;break}for(var m=p>=0?p+1:s;m<i;m++)if(e.charCodeAt(m)===zV)return null;var h=e.slice(t,i);return{node:{type:$.link,target:`mailto:${h}`,title:void 0,children:[{type:$.text,text:h}]},end:i}}function OK(e){for(var t=0;t<e.length;t++)if(e[t].type===$.link||`children`in e[t]&&Array.isArray(e[t].children)&&OK(e[t].children))return!0;return!1}function kK(e,t){for(var n=``,r=0;r<e.length;r++){var i=e[r];i.type===$.text?n+=i.text:i.type===$.breakLine?n+=` `:i.type===$.codeInline||i.type===$.footnoteReference?n+=i.text:`children`in i&&Array.isArray(i.children)?n+=kK(i.children,t):!t&&i.type===$.image&&(n+=i.alt||``)}return n}function AK(e,t,n){for(var r=0;r<e.length;r++){var i=e[r];if(i.type===$.heading){var a=i;a.id=uG(n(kK(a.children,!0)),t)}if(`children`in i){var o=i.children;Array.isArray(o)&&AK(o,t,n)}if((i.type===$.orderedList||i.type===$.unorderedList)&&Array.isArray(i.items))for(var s=i.items,c=0;c<s.length;c++)AK(s[c],t,n)}}function jK(e){return{type:$.text,text:e}}function MK(e,t,n){var r=t+1;if(r>=n)return-1;if(e.charCodeAt(r)===NV){r++;var i=r<n&&(e.charCodeAt(r)===vH||e.charCodeAt(r)===yH);i&&r++;for(var a=r,o=i?6:7;r<n&&r-a<=o;){var s=e.charCodeAt(r);if(!(s>=xH&&s<=SH||i&&(s>=CH&&s<=KV||s>=TH&&s<=qV)))break;r++}return r===a||r-a>o?-1:r<n&&e.charCodeAt(r)===nH?r+1:-1}for(var c=r;r<n&&r-c<48;){var l=e.charCodeAt(r);if(l>=CH&&l<=wH||l>=TH&&l<=EH||l>=xH&&l<=SH)r++;else break}return r===c?-1:r<n&&e.charCodeAt(r)===nH?r+1:-1}function NK(e,t,n,r){return e.lastIndexOf(`<`,n-1)===t?e.slice(t,n):`</${r}>`}function PK(e,t,n){return{node:{type:$.htmlComment,text:LW(e.slice(t,n)),t:!1,raw:!0},end:n}}var FK=null;function IK(e,t,n){var r=FK===null?void 0:FK[t];if(r!==void 0&&n>=r)return-1;var i=e.indexOf(t,n);return i===-1&&(FK===null&&(FK={}),FK[t]=n),i}function LK(e,t,n,r,i){if(e.charCodeAt(t)!==BV)return null;var a=t+1;if(a>=n)return null;var o=e.charCodeAt(a);if(o===UV&&a+1<n&&e.charCodeAt(a+1)===FV&&a+2<n&&e.charCodeAt(a+2)===FV){var s=a+3;if(s<n&&e.charCodeAt(s)===MV)return{node:{type:$.htmlComment,text:``,t:!0},end:s+1};if(s+1<n&&e.charCodeAt(s)===FV&&e.charCodeAt(s+1)===MV)return{node:{type:$.htmlComment,text:`-`,t:!0},end:s+2};var c=IK(e,`-->`,s);if(c===-1)return null;var l=e.slice(t,c+3),u=LW(l);return{node:u===l?{type:$.htmlComment,text:e.slice(t+4,c),t:!1}:{type:$.htmlComment,text:u,t:!1,raw:!0},end:c+3}}if(o===rH){var d=IK(e,`?>`,a+1);return d===-1?null:PK(e,t,d+2)}if(o===UV&&a+1<n){var f=e.charCodeAt(a+1);if(f===AV&&e.slice(a+1,a+8)===`[CDATA[`){var p=IK(e,`]]>`,a+8);return p===-1?null:PK(e,t,p+3)}if(f>=CH&&f<=wH){var m=IK(e,`>`,a+2);return m===-1?null:PK(e,t,m+1)}}if(o===aH){var h=a+1;if(h>=n)return null;var g=e.charCodeAt(h);if(!(g>=CH&&g<=wH||g>=TH&&g<=EH))return null;for(h++;h<n;){var _=e.charCodeAt(h);if(_>=CH&&_<=wH||_>=TH&&_<=EH||_>=xH&&_<=SH||_===FV)h++;else break}for(;h<n&&(e.charCodeAt(h)===Q||e.charCodeAt(h)===TV||e.charCodeAt(h)===DV);)h++;if(h<n&&e.charCodeAt(h)===MV){var v=e.slice(a+1,h).trim();return{node:{type:$.htmlSelfClosing,tag:v,attrs:{},j:e.slice(t,h+1),b:!0},end:h+1}}return null}if(!(o>=CH&&o<=wH||o>=TH&&o<=EH))return null;var y=FW(e,t);if(!y)return null;var b=y.tag,x=b.toLowerCase();if(y.n||QH(b))return{node:{type:$.htmlSelfClosing,tag:b,attrs:DG(y.attrs,b,i),u:y.q?EW(y):e.slice(t,y.end),b:!1},end:y.end};var S=ZU.has(x),C=zG(e,y.end,b,n);if(C===-1)return{node:{type:$.htmlSelfClosing,tag:b,attrs:DG(y.attrs,b,i),u:y.q?EW(y):e.slice(t,y.end),b:!1},end:y.end};var w=AG(e,`</${x}`,C),T=e.slice(y.end,w);if(S){var E=LW(T);return{node:{type:$.htmlBlock,tag:b,attrs:DG(y.attrs,b,i),a:y.i+y.a,children:[],e:E||void 0,j:NK(e,w,C,b),h:void 0,text:E,c:!0,b:!1},end:C}}var D=[],O=T.trim();if(T){var{inAnchor:k,inline:A,l:j}=r;x===`a`&&(r.inAnchor=!0),r.l=!1,O.indexOf(`
63
+
64
+ `)!==-1||(i.enforceAtxHeadings===!1?oW:aW).test(O)?(r.inline=!1,D=UK(O,r,i)):D=VK(T,0,T.length,r,i),r.inAnchor=k,r.inline=A,r.l=j}return{node:{type:$.htmlBlock,tag:b,attrs:DG(y.attrs,b,i),a:y.a,children:D,h:void 0,text:LW(T),c:!1,b:!1},end:C}}function RK(e){if(e.indexOf(`[`)===-1)return e;for(var t=e.length,n=new Int32Array(t).fill(-1),r=[],i=0;i<t;i++){var a=e.charCodeAt(i);if((a===AV||a===HV)&&(i===0||e.charCodeAt(i-1)!==LV)){if(a===AV)r.push(i);else{var o=r.pop();o!==void 0&&(n[o]=i)}}}var s=[],c=t;for(i=0;i<c;i++)if(!(e.charCodeAt(i)!==AV||i>0&&e.charCodeAt(i-1)===LV)){var l=i>0&&e.charCodeAt(i-1)===UV,u=n[i];if(u>=0){var d=u+1;if(d<c){var f=e.charCodeAt(d);if(f!==fH&&f!==AV){s.push(i),i=u;continue}for(var p=f===fH?pH:HV,m=d+1;m<c&&e.charCodeAt(m)!==p;)m++;if(m<c){i=m;continue}}}if(l){c=i-1;var h=s.pop();if(h!==void 0&&n[h]===c-1){i=h-1;continue}break}n[i]=-2,u>=0&&(c=u)}var g=``,_=0;for(i=0;i<c;i++)n[i]===-2&&(g+=e.slice(_,i),_=i+1);return g+e.slice(_,c)}var zK=200,BK=0;function VK(e,t,n,r,i){if(BK++,BK>zK)return BK--,[{type:$.text,text:e.slice(t,n)}];var a=_K;_K=vK();var o=FK;FK=null;var s=jG,c=MG,l=NG,u=PG;let d=r;var f=i.optimizeForStreaming===!0&&BK===1&&!r.f;if(f){let r=e.slice(t,n),i=r,a=0,o=-1;for(let e=0;e<r.length;e++)r.charCodeAt(e)===OV&&(a++,o=e);if(a%2==1&&o!==-1){let e=!1,t=-1,n=0;for(;n<r.length;)r.charCodeAt(n)===OV&&(e?(e=!1,t=-1):(t=n,e=!0)),n++;e&&t!==-1&&(r=r.slice(0,t))}r=RK(r);let s=r.match(/<([A-Z][A-Za-z0-9]*)(?:\s[^>]*)?>([^<]*)$/);if(s&&s.index!==void 0){var p=s[0].length-s[2].length;if(!(p>=2&&s[0].charCodeAt(p-2)===aH)){for(var m=!1,h=0,g=0;g<s.index;g++)r.charCodeAt(g)===OV&&h++;if(m=h%2==1,!m){let e=s[1];OG(r,`</${e}`,0,r.length)===-1&&(r=r.slice(0,s.index)+s[2])}}}r!==i&&(e=e.slice(0,t)+r,n=t+r.length)}let _=[];var v=[],y=null;let b=t;var x=``,S=i.disableAutoLink||i.disableBareUrls||d.inAnchor?-1:e.indexOf(`@`,t);for(S>=n&&(S=-1);t<n;){let r=e.charCodeAt(t),a=null;if(r===OV){if(a=eK(e,t,n),!a){var C=iG(e,t,n,OV);t+=C-1}}else if(r===RV||r===zV){var w=lK(e,t,n);if(w){var T=!1;if(f){var E=t+w.len,D=t>0?e.charCodeAt(t-1):Q,O=t===0||cK(D,e,t-1);if(w.canOpen){var k=e.charCodeAt(E);T=O||sK(D,e,t-1)||cK(k,e,E)||sK(k,e,E)}else T=E===n&&O}if(T&&(y===null&&(y=[]),y.push(v.length)),w.canOpen||w.canClose||T){(x||t>b)&&(_.push(jK(x+e.slice(b,t))),x=``);var A=jK(e.slice(t,t+w.len));v.push({idx:_.length,ch:r,len:w.len,canOpen:w.canOpen,canClose:w.canClose,active:!0}),_.push(A),t+=w.len,b=t;continue}t+=w.len-1}}else if(r===kV){if(a=aK(e,t,n,d,i),!a&&f&&t+1<n&&e.charCodeAt(t+1)===kV){(x||t>b)&&(_.push(jK(x+e.slice(b,t))),x=``),t+=2,b=t;continue}}else if(r===IV)a=oK(e,t,n,d,i);else if(r===AV)t+1<n&&e.charCodeAt(t+1)===jV&&(a=TK(e,t,n,d,i)),a||=CK(e,t,n,d,i);else if(r===UV&&t+1<n&&e.charCodeAt(t+1)===AV)a=CK(e,t,n,d,i);else if(r===BV)a=wK(e,t,n),!(a||i.disableParsingRawHTML||i.ignoreHTMLBlocks)&&(a=LK(e,t,n,d,i));else if(r===WV){var j=MK(e,t,n);if(j!==-1){var M=e.slice(t,j),N=LH(M);if(N!==M){x=x+e.slice(b,t)+N,t=j,b=j;continue}}}else if((r===JV||r===YV||r===qV)&&!d.inAnchor&&!i.disableAutoLink&&(t===0||e.charCodeAt(t-1)!==BV)){var P=t+1<n?e.charCodeAt(t+1):0;(r===JV&&P===XV||r===qV&&P===XV||r===YV&&P===YV)&&(a=EK(e,t,n,i))}if(!a&&S>=0&&S-t<=64&&!d.inAnchor&&!i.disableAutoLink&&!i.disableBareUrls&&(r>=CH&&r<=wH||r>=TH&&r<=EH||r>=xH&&r<=SH)&&(a=DK(e,t,n,i),!a&&t>=S&&(S=e.indexOf(`@`,t+1),S>=n&&(S=-1))),r===DV&&d.l){var F=!1,I=0;if(t>b&&e.charCodeAt(t-1)===LV)F=!0,I=1;else{for(var L=0,R=t-1;R>=b&&e.charCodeAt(R)===Q;)L++,R--;L>=2&&(F=!0,I=L)}if(F){for((x||t-I>b)&&(_.push(jK(x+e.slice(b,t-I))),x=``),_.push({type:$.breakLine}),t++;t<n&&e.charCodeAt(t)===Q;)t++;b=t;continue}var z=t>b&&e.charCodeAt(t-1)===Q,B=t+1<n&&e.charCodeAt(t+1)===Q;if(z||B){for(var V=t;V>b&&e.charCodeAt(V-1)===Q;)V--;for(x+=`${e.slice(b,V)}
65
+ `,t++;t<n&&e.charCodeAt(t)===Q;)t++;b=t;continue}}if(a)(x||t>b)&&(_.push(jK(x+e.slice(b,t))),x=``),_.push(a.node),t=a.end,b=t;else{if(r===LV&&t+1<n&&KW(e.charCodeAt(t+1))&tU){(x||t>b)&&(_.push(jK(x+e.slice(b,t))),x=``),_.push(jK(e[t+1])),t+=2,b=t;continue}if(t++,S<0||S-t>64)for(;t<n&&!(S>=0&&S-t<=64);){var H=e.charCodeAt(t);if(H<DH&&!lW[H])t++;else break}}}return(x||n>b)&&(_.push(jK(x+e.slice(b,n))),x=``),v.length>0&&uK(_,v,y,r,i),_K=a,FK=o,s!==null&&s!==jG&&(jG=s,MG=c,NG=l,PG=u),BK--,_}var HK=500;function UK(e,t,n){var r=t.p||0;if(r>HK)return[{type:$.text,text:e}];t.p=r+1;var i=ZW,a=QW,o=$W,s=jG,c=MG,l=NG,u=PG,d=VG,f=HG;if(n.optimizeForStreaming&&!(t.f||t.B)){for(var p=e.length;p>0&&e.charCodeAt(p-1)===DV;)p--;for(var m=p;m>0&&e.charCodeAt(m-1)!==DV;)m--;if(p>m&&e.charCodeAt(m)===lH){for(var h=!1,g=m+1;g<p;g++){var _=e.charCodeAt(g);if(_!==Q&&_!==TV&&_!==lH&&_!==GV&&_!==FV){h=!0;break}}for(var v=!1,y=!1,b=0,x=m,S=m-1;S>0;){for(var C=S;C>0&&e.charCodeAt(C-1)!==DV;)C--;if(e.charCodeAt(C)!==lH)break;x=C;for(var w=!0,T=!1,E=C;E<S;E++){var D=e.charCodeAt(E);if(D===FV)T=!0;else if(D!==Q&&D!==TV&&D!==GV&&D!==lH){w=!1;break}}w&&T?(v=!0,y=!0):y||b++,S=C-1}h?v||(e=e.slice(0,m).trimEnd()):e=v&&b>0?e.slice(0,m).trimEnd():e.slice(0,x).trimEnd()}for(var O=-1,k=-1,A=-1,j=!1,M=e.length-1;M>=0;M--)if(e.charCodeAt(M)===BV){for(var N=M+1<e.length?e.charCodeAt(M+1):0,P=N>=CH&&N<=wH||N>=TH&&N<=EH,F=N===aH&&M+2<e.length&&(e.charCodeAt(M+2)>=CH&&e.charCodeAt(M+2)<=wH||e.charCodeAt(M+2)>=TH&&e.charCodeAt(M+2)<=EH),I=N===UV||N===rH,L=e.length;L>M+1&&e.charCodeAt(L-1)===DV;)L--;var R=M+1>=L;if((P||F||I||R)&&!(P&&wK(e,M,e.length))){var z=M+1;if((F||P)&&(z=M+2),P||F)for(;z<e.length;){var B=e.charCodeAt(z);if(B>=CH&&B<=wH||B>=TH&&B<=EH||B>=xH&&B<=SH)z++;else break}for(var V=P||F?z:M+2;V<e.length&&e.charCodeAt(V)!==MV;)V++;if(V>=e.length)O=M,j=!0;else if(P&&e.charCodeAt(V-1)!==aH&&!QH(e.slice(M+1,z))){for(var H=!1,U=V+1;U<e.length;U++)if(e.charCodeAt(U)===BV){H=!0;break}H||(O=M,k=z,A=V+1)}}break}if(O>=0){for(var ee=0,te=0;te<O;te++)e.charCodeAt(te)===OV&&ee++;if(ee%2==0){if(j)e=e.slice(0,O);else{var ne=e.slice(O+1,k);OG(e,`</${ne}`,0,e.length)===-1&&(e=e.slice(0,O)+e.slice(A))}}}for(var W=e.length;W>0&&e.charCodeAt(W-1)===DV;)W--;if(W>0){for(var re=W;re>0&&e.charCodeAt(re-1)!==DV;)re--;for(var ie=re,ae=0;ie<W&&e.charCodeAt(ie)===Q&&ae<3;)ie++,ae++;if(re>0&&ie<W&&fG(e,ie,W)){for(var G=re-1,K=G;K>0&&e.charCodeAt(K-1)!==DV;)K--;cG(e,K,G)||(e=e.slice(0,re).trimEnd())}}var q=e.length;if(q>0){for(var oe=e.lastIndexOf(`
66
+ `),J=oe===-1?0:oe+1,se=q,ce=J,le=0;ce<se&&e.charCodeAt(ce)===Q&&le<3;)ce++,le++;if(ce<se){var ue=e.charCodeAt(ce),de=!1;if(ue===RV||ue===FV||ue===cH){var fe=ce+1;if(fe>=se||e.charCodeAt(fe)===Q||e.charCodeAt(fe)===TV){for(var pe=fe;pe<se&&(e.charCodeAt(pe)===Q||e.charCodeAt(pe)===TV);)pe++;pe>=se&&(de=!0)}}else if(ue>=xH&&ue<=SH){for(var me=ce;me<se&&e.charCodeAt(me)>=xH&&e.charCodeAt(me)<=SH;)me++;if(me<se&&(e.charCodeAt(me)===iH||e.charCodeAt(me)===pH)){var he=me+1;if(he>=se||e.charCodeAt(he)===Q||e.charCodeAt(he)===TV){for(var ge=he;ge<se&&(e.charCodeAt(ge)===Q||e.charCodeAt(ge)===TV);)ge++;ge>=se&&(de=!0)}}}de&&(e=e.slice(0,J).trimEnd())}}}if(t.inline)return VK(e,0,e.length,t,n);let _e=[],ve=0;var ye=e.length,be=-2;if(ve===0&&!n.disableFrontmatter&&e.startsWith(`---`)){let t=kH(e);if(t?.hasValidYaml){if(n.preserveFrontmatter!==!1){let n=e.slice(0,t.endPos).trimEnd();_e.push({type:$.frontmatter,text:n})}ve=t.endPos}}for(;ve<ye;){for(var xe=e.indexOf(`
67
+ `,ve),Se=xe<0?ye:xe;ve<ye&&cG(e,ve,Se);)ve=Se<ye?Se+1:Se,ve<ye&&(xe=e.indexOf(`
68
+ `,ve),Se=xe<0?ye:xe);if(ve>=ye)break;var Ce=e.charCodeAt(ve)===bH;sG(e,ve,Se);let r=null;var we=t.o?t.o.length:0;if(JW=e,YW=ve,XW=Se,!Ce&&aG>=4&&!t.inHTML)r=yG(e,ve);else if(!Ce){let i=ve+oG,a=e.charCodeAt(i);a===NV?r=dG(e,ve,t,n):a===MV?r=bG(e,ve,t,n):a===OV||a===kV?r=_G(e,ve,t):a===FV||a===RV||a===zV?(r=pG(e,ve),!r&&(r=TG(e,ve,t,n))):a===cH||a>=xH&&a<=SH?r=TG(e,ve,t,n):a===BV?(t.inList&&(be===-2&&(be=e.lastIndexOf(tW)),be>ve&&!n.ignoreHTMLBlocks&&!n.disableParsingRawHTML&&(qG(e,i)!==0||GG(e,i))&&(e=e.slice(0,ve)+nW(e.slice(ve)),ye=e.length,be=-1)),r=KG(e,ve,t,n)):a===lH?r=YG(e,ve,t,n):a===AV&&(r=XG(e,ve,t))}if(!r){for(var Te=!1,Ee=ve;Ee<Se;Ee++)if(e.charCodeAt(Ee)===lH){Te=!0;break}Te&&(r=YG(e,ve,t,n))}if(r||=QG(e,ve,t,n),r){r.node.type!==$.refCollection&&_e.push(r.node);var De=t.o;if(n.optimizeForStreaming&&De&&De.length>we&&!lG(e,r.end,ye))for(var Oe=we;Oe<De.length;Oe++)De[Oe].notAtEdge=!0;ve=r.end}else{var ke=e.indexOf(`
69
+ `,ve);ve=ke<0?ye:ke+1}}return ZW=i,QW=a,$W=o,jG=s,MG=c,NG=l,PG=u,VG=d,HG=f,t.p=r,_e}function WK(e,t,n,r){var i=FW(e,t);return i?{tagName:i.tag,tagLower:i.tag.toLowerCase(),attrs:i.a,whitespaceBeforeAttrs:i.i,isSelfClosing:i.n,hasSpaceBeforeSlash:i.v,isClosing:i.g,hasNewline:i.i.includes(`
70
+ `)||i.a.includes(`
71
+ `),endPos:i.end}:null}function GK(e,t,n){BK=0;var r=xW;xW=n,e=dU(e),rK=e.length*16+nK,!t.refs&&(t.refs=Object.create(null)),(n.optimizeForStreaming||t.inline)&&(t.B=BW(e,t.refs,n));var i,a;t.o||(t.o=i=[],t.r=a=[]);let o=UK(e,t,n);if(i&&a){for(var s=i,c={inline:t.inline,inAnchor:t.inAnchor,inHTML:t.inHTML,htmlDepth:t.d,inList:t.inList,inBlockQuote:t.inBlockQuote,noSetext:t.m,depth:t.p,notAtEdge:t.f},l=0;l<s.length;l++){var u=s[l];t.inline=u.inline,t.inAnchor=u.inAnchor,t.inHTML=u.inHTML,t.d=u.htmlDepth,t.inList=u.inList,t.inBlockQuote=u.inBlockQuote,t.m=u.noSetext,t.p=u.depth,t.f=u.notAtEdge,t.l=u.breaks;var d=VK(u.text,0,u.text.length,t,n);t.l=!1;for(var f=0;f<d.length;f++)u.dest.push(d[f])}t.inline=c.inline,t.inAnchor=c.inAnchor,t.inHTML=c.inHTML,t.d=c.htmlDepth,t.inList=c.inList,t.inBlockQuote=c.inBlockQuote,t.m=c.noSetext,t.p=c.depth,t.f=c.notAtEdge;for(var p=a,m=0;m<p.length;m++)for(var h=p[m],g=0;g<h.src.length;g++){var _=h.src[g];if(h.unwrap&&_.type===$.paragraph)for(var v=_.children,y=0;y<v.length;y++)h.dest.push(v[y]);else h.dest.push(_)}t.o=void 0,t.r=void 0,jG!==null&&FG(),AK(o,t,n.slugify)}return xW=r,_U(t.refs)?[{type:$.refCollection,refs:t.refs},...o]:o}var KK;try{qK=v.createElement(`div`),KK=typeof qK==`object`&&qK&&`$$typeof`in qK&&typeof qK.$$typeof==`symbol`?qK.$$typeof:Symbol.for(`react.transitional.element`)}catch{KK=Symbol.for(`react.transitional.element`)}var qK;function JK(e,t,n){return{$$typeof:KK,type:e,key:n==null?null:String(n),ref:null,props:t,_owner:null,_store:{},_debugStack:null,_debugTask:null}}function YK(e,t){var n={key:e};if(t){var r=NH(t);for(var i in r)n[i]=r[i]}return n}var XK=typeof v.createContext>`u`?void 0:v.createContext(void 0);function ZK(e,t,n,r,i,a,o,s,c){switch(e.type){case $.blockQuote:{let i={key:n.key};return e.alert&&(i.className=`markdown-alert-${a(e.alert.toLowerCase(),YH)}`,e.children.unshift(vU(e.alert))),r(`blockquote`,i,t(e.children,n))}case $.breakLine:return r(`br`,{key:n.key});case $.breakThematic:return r(`hr`,{key:n.key});case $.frontmatter:return s.preserveFrontmatter?r(`pre`,{key:n.key},e.text):null;case $.codeBlock:{let t=e.lang?LH(e.lang):``;var l=e.attrs?NH(zU(`code`,e.attrs,s.overrides)):{};return l.className=t?`language-${t} lang-${t}`:``,r(`pre`,{key:n.key},r(`code`,l,e.text))}case $.codeInline:return r(`code`,{key:n.key},e.text);case $.footnoteReference:return r(`a`,{key:n.key,href:i(e.target,`a`,`href`)||void 0},r(`sup`,null,e.text));case $.gfmTask:return r(`input`,{checked:e.completed,key:n.key,readOnly:!0,type:`checkbox`});case $.heading:return r(`h${e.level}`,{id:e.id,key:n.key},t(e.children,n));case $.htmlBlock:{let a=e;if(kU(s)&&WU(a.tag)){var u=DU(a);return u.kind===`literal`?r(`span`,{key:n.key},u.literal):r(`span`,{key:n.key},...OU(u.open,a.children?t(a.children,n):null,u.close))}let l=a.k,g=l!==void 0,_=g?l:a.b?a.e||``:(a.e||``)+(a.j||``);if(_&&a.c){let r=dW(a.tag.toLowerCase()),l=a.children,u=l!=null&&l.length>0;if(r){let t=(g?a.text:a.e)||``,r=kU(s)?qU(t):t;if(/<[a-z][^>]{0,100}>/i.test(t)){var d=YK(n.key,e.attrs);return d.dangerouslySetInnerHTML={__html:r},c(e.tag,d)}return c(e.tag,YK(n.key,e.attrs),KU(e.tag,r))}let y=RegExp(`^<${a.tag}(\\s|>)`,`i`);if(u&&!y.test(_)&&kU(s)&&GU(_))return c(e.tag,YK(n.key,e.attrs),t(l,n));if(fW(_)){let t=kU(s)?qU(_):_;var f=YK(n.key,e.attrs);return f.dangerouslySetInnerHTML={__html:t},c(e.tag,f)}let b=JU({overrides:s.overrides,slugify:s.slugify,sanitizer:i,tagfilter:!0}),x=hU(a.h||_);if(RegExp(`^<${a.tag}(\\s[^>]*)?>(\\s*</${a.tag}>)?$`,`i`).test(x))return a.children&&a.children.length>0?c(e.tag,YK(n.key,e.attrs),t(a.children,n)):c(e.tag,YK(n.key,e.attrs));let S=GK(x,{inline:!1,refs:o,inHTML:!1},b);if(SU(S),CU(S,x))return x;let C=a.tag.toLowerCase(),w=g;if(w&&u)return c(e.tag,YK(n.key,e.attrs),t(l,n));if(w)return t(S.flatMap(xU),n);var p=wU(S,C);if(p.found&&p.afterClose.length>0){var m=p.beforeClose.flatMap(xU),h=p.afterClose.flatMap(xU);return JK(v.Fragment,{children:[c(e.tag,YK(n.key,e.attrs),t(m,n)),t(h,n)]},n.key)}return c(e.tag,YK(n.key,e.attrs),t(S.flatMap(xU),n))}return QH(e.tag)?c(e.tag,YK(n.key,e.attrs)):c(e.tag,YK(n.key,e.attrs),e.children?t(e.children,n):``)}case $.htmlSelfClosing:{let t=e;if(kU(s)&&WU(t.tag)){var g=DU(t);return r(`span`,{key:n.key},g.kind===`literal`?g.literal:g.open+(g.close||``))}return c(e.tag,YK(n.key,e.attrs))}case $.image:{let t=e.target===null?null:i(e.target,`img`,`src`);return r(`img`,{key:n.key,alt:e.alt&&e.alt.length>0?e.alt:void 0,title:e.title||void 0,src:t||void 0})}case $.link:{let a={key:n.key};if(e.target!=null){let t=AU(e.target,i,`a`,`href`);t!=null&&(a.href=t)}return e.title&&(a.title=e.title),r(`a`,a,t(e.children,n))}case $.table:{let i=e;return r(`table`,{key:n.key},r(`thead`,{key:`thead`},r(`tr`,null,i.header.map(function(e,a){return r(`th`,{key:a,style:i.align[a]===null?{}:{textAlign:i.align[a]}},t(e,n))}))),i.cells.length>0&&r(`tbody`,{key:`tbody`},i.cells.map(function(e,a){return r(`tr`,{key:a},e.map(function(e,a){return r(`td`,{key:a,style:i.align[a]===null?{}:{textAlign:i.align[a]}},t(e,n))}))})))}case $.text:return e.text;case $.textFormatted:return r(e.tag,{key:n.key},t(e.children,n));case $.orderedList:case $.unorderedList:return r(e.type===$.orderedList?`ol`:`ul`,{key:n.key,start:e.type===$.orderedList?e.start:void 0},e.items.map(function(e,i){return r(`li`,{key:i},t(e,n))}));case $.paragraph:return r(`p`,{key:n.key},t(e.children,n));case $.ref:return null;default:return null}}var QK=(e,t,n,r,i,a,o)=>{var s=e=>e.map(e=>`text`in e?e.text:``),c=(l,u={})=>{var d=Array.isArray(l)?l:[l],f=(u.renderDepth||0)+1;if(f>2500)return s(d);u.renderDepth=f;for(var p=u.key,m=[],h=!1,g=0;g<d.length;g++){u.key=g;var _=e?e(ZK.bind(null,d[g],c,u,t,n,r,i,a,o),d[g],c,u):ZK(d[g],c,u,t,n,r,i,a,o),v=typeof _==`string`;if(h&&typeof _==`string`){var y=m.at(-1);m[m.length-1]=(typeof y==`string`?y:``)+_}else if(_!=null){if(Array.isArray(_))for(var b=0;b<_.length;b++)m.push(_[b]);else m.push(_)}h=v}return u.key=p,u.renderDepth=f-1,m};return c},$K=(e,t)=>{let n=IU(t,e,void 0);return n?typeof n==`function`||typeof n==`object`&&`render`in n?n:IU(t,`${e}.component`,e):e};function eq(e,t){let n={...t||{}};n.overrides=n.overrides||{};let r=n.slugify||YH,i=n.sanitizer||GH,a=n.createElement,o=_U(n.overrides),s=e=>tq(e,{...n,wrapper:null});function c(e){for(var t in e){var n=e[t];if(typeof n==`string`&&n.length>0&&n.charCodeAt(0)===BV&&(YU.test(n)||XU.test(n)||WK(n,0))){var r=s(n.trim());e[t]=t===`innerHTML`&&Array.isArray(r)?r[0]:r}}}function l(e,t,...r){var i=t||{},s=e;if(o){var c=IU(n.overrides,`${e}.props`,{});s=$K(e,n.overrides),i={...i,...c,className:VU(i.className,c.className)||void 0},typeof s==`string`&&QH(s)&&(delete i.children,r.length=0)}if(!a){var l=i.key;return l!=null&&delete i.key,r.length===1?i.children=r[0]:r.length>1&&(i.children=r),JK(s,i,l)}return a(s,i,...r)}function u(e,t,...r){var i=t&&zU(e,t,n.overrides);if(i){if(typeof i.children==`string`){var a=i.dangerouslySetInnerHTML===void 0?FH(i.children,r):void 0;delete i.children,a!==void 0&&(r=[a])}c(i)}return l(e,i,...r)}let d=JU(n,n.forceInline),f=e[0]&&e[0].type===$.refCollection?e[0].refs:Object.create(null),p=QK(n.renderRule,l,i,r,f,n,u),m=p(e,{inline:n.forceInline,refs:f}),h=jU(f);if(h.length>0&&m.push(l(`footer`,{key:`footer`},h.map(function(e){let t=e.identifier.charCodeAt(0)===jV?e.identifier.slice(1):e.identifier,n=GK(e.footnote,{inline:!0,refs:f},d);return l(`div`,{id:r(t,YH),key:e.identifier},`${t}: `,p(n,{inline:!0,refs:f}))}))),n.wrapper===null)return m;let g=n.wrapper||(n.forceInline?`span`:`div`),_;if(m.length>1||n.forceWrapper)_=m;else return m.length===1?m[0]:null;var v=n.wrapperProps?{...n.wrapperProps}:{};return v.children=_,JK(g,v,`outer`)}function tq(e=``,t={}){let n={...t||{}};n.overrides=n.overrides||{},n.slugify,n.sanitizer;function r(e){let t=n.forceInline||!(n.forceBlock||IH.test(e)),r=JU(n,t);return eq(GK(t?e:bU(e),{inline:t,refs:i},r),{...n,forceInline:t})}let i=Object.create(null);return r(e)}function nq(e){let t=v.useRef(e),n=t.current;if(n!==e){var r=!0,i=0;for(var a in e)if(i++,!Object.is(n[a],e[a])){r=!1;break}if(r){var o=0;for(var s in n)o++;r=o===i}r||(t.current=e)}return t.current}var rq=({children:e,options:t,...n})=>{if(typeof v.useContext>`u`){let r={...t,overrides:{...t?.overrides},wrapperProps:{...t?.wrapperProps,...n}};return tq(e??``,r)}let r=XK?v.useContext(XK):void 0,i=nq(n),a=v.useMemo(()=>({...r,...t,overrides:{...r?.overrides,...t?.overrides},wrapperProps:{...r?.wrapperProps,...t?.wrapperProps,...i}}),[r,t,i]),o=e??``;return v.useMemo(()=>tq(o,a),[o,a])};function iq({...e}){return(0,S.jsx)(Ow,{"data-slot":`dialog`,...e})}function aq({...e}){return(0,S.jsx)(Aw,{"data-slot":`dialog-trigger`,...e})}function oq({...e}){return(0,S.jsx)(xw,{"data-slot":`dialog-portal`,...e})}function sq({className:e,...t}){return(0,S.jsx)(fw,{"data-slot":`dialog-overlay`,className:X(`fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function cq({className:e,children:t,showCloseButton:n=!0,...r}){return(0,S.jsxs)(oq,{children:[(0,S.jsx)(sq,{}),(0,S.jsxs)(bw,{"data-slot":`dialog-content`,className:X(`fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...r,children:[t,n&&(0,S.jsxs)(pw,{"data-slot":`dialog-close`,render:(0,S.jsx)(ay,{variant:`ghost`,className:`absolute top-2 right-2`,size:`icon-sm`}),children:[(0,S.jsx)(xd,{}),(0,S.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function lq({className:e,...t}){return(0,S.jsx)(`div`,{"data-slot":`dialog-header`,className:X(`flex flex-col gap-2`,e),...t})}function uq({className:e,showCloseButton:t=!1,children:n,...r}){return(0,S.jsxs)(`div`,{"data-slot":`dialog-footer`,className:X(`-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end`,e),...r,children:[n,t&&(0,S.jsx)(pw,{render:(0,S.jsx)(ay,{variant:`outline`}),children:`Close`})]})}function dq({className:e,...t}){return(0,S.jsx)(kw,{"data-slot":`dialog-title`,className:X(`font-heading text-base leading-none font-medium`,e),...t})}function fq({className:e,...t}){return(0,S.jsx)(mw,{"data-slot":`dialog-description`,className:X(`text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground`,e),...t})}var pq=e=>new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}),mq=e=>new Date(e).toLocaleString([],{weekday:`short`,day:`numeric`,month:`short`,hour:`2-digit`,minute:`2-digit`});function hq(e){let t=Math.round((Date.now()-Date.parse(e))/6e4);if(t<1)return`just now`;if(t<60)return`${t} min ago`;let n=Math.round(t/60);return n<48?`${n} h ago`:`${Math.round(n/24)} days ago`}var gq=(e,t)=>`${Math.max(1,Math.round((Date.parse(t)-Date.parse(e))/6e4))} min`,_q=e=>e.split(`/`).filter(Boolean).at(-1)??e,vq=e=>`${_q(e.repo)}: ${e.title||e.id}`,yq=e=>e.replace(/T(\d\d)(\d\d)(\d\d)$/,`T$1:$2:$3Z`),bq={done:`secondary`,failed:`destructive`,timeout:`destructive`,limited:`outline`,stopped:`outline`},xq={working:`default`,idle:`secondary`,sleeping:`outline`,stopped:`outline`},Sq={queued:`outline`,running:`default`,done:`secondary`,failed:`destructive`,removed:`outline`},Cq=({model:e,effort:t})=>[e,t].filter(Boolean).join(`, `),wq=e=>[e.agent,Cq(e)].filter(Boolean).join(` `),Tq=e=>e.charAt(0).toUpperCase()+e.slice(1),Eq=`max-h-[60dvh] overflow-auto rounded-md border bg-muted/50 p-3 font-mono text-xs leading-relaxed`,Dq={wrapper:null,overrides:{h1:{props:{className:`mt-3 text-base font-semibold first:mt-0`}},h2:{props:{className:`mt-3 font-semibold first:mt-0`}},h3:{props:{className:`mt-2 font-medium first:mt-0`}},ul:{props:{className:`list-disc pl-5`}},ol:{props:{className:`list-decimal pl-5`}},a:{props:{className:`underline underline-offset-4`,target:`_blank`,rel:`noreferrer`}},code:{props:{className:`rounded bg-muted px-1 font-mono text-xs`}},pre:{props:{className:`overflow-auto rounded-md bg-muted p-2`}},blockquote:{props:{className:`border-l-2 pl-3 text-muted-foreground`}},table:{props:{className:`border-collapse text-xs`}},th:{props:{className:`border px-2 py-1 text-left font-medium`}},td:{props:{className:`border px-2 py-1`}}}};function Oq({jobId:e,url:t,pr:n}){return(0,S.jsxs)(iq,{children:[(0,S.jsx)(aq,{render:(0,S.jsx)(ay,{variant:`link`,size:`xs`}),children:`Review`}),(0,S.jsxs)(cq,{className:`sm:max-w-4xl`,children:[(0,S.jsxs)(lq,{className:`mr-8`,children:[(0,S.jsx)(dq,{children:n.title}),(0,S.jsx)(fq,{children:(0,S.jsxs)(`a`,{href:t,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1`,children:[t.replace(`https://github.com/`,``),` `,(0,S.jsx)(Fu,{className:`size-3`})]})})]}),(0,S.jsx)(kq,{jobId:e,pr:n})]})]})}function kq({jobId:e,pr:t}){let[n,r]=(0,v.useState)(),[i,a]=(0,v.useState)();return(0,v.useEffect)(()=>{let t=!0;return Cd.prDetails(e).then(e=>t&&r(e),e=>t&&a(e.message)),()=>{t=!1}},[e]),i?(0,S.jsxs)(`p`,{role:`status`,className:`text-destructive`,children:[`Could not load the PR: `,i]}):n?(0,S.jsxs)(Gz,{defaultValue:`description`,className:`min-w-0`,children:[(0,S.jsxs)(qz,{children:[(0,S.jsx)(Jz,{value:`description`,children:`Description`}),(0,S.jsxs)(Jz,{value:`diff`,children:[`Diff`,(0,S.jsxs)(`span`,{className:`text-success`,children:[`+`,t.additions]}),(0,S.jsxs)(`span`,{className:`text-destructive`,children:[`−`,t.deletions]})]})]}),(0,S.jsx)(Yz,{value:`description`,children:(0,S.jsx)(`div`,{tabIndex:0,className:`${Eq} flex flex-col gap-2 font-sans text-sm wrap-anywhere`,children:n.body.trim()?(0,S.jsx)(rq,{options:Dq,children:n.body}):`This PR has no description.`})}),(0,S.jsx)(Yz,{value:`diff`,children:(0,S.jsx)(`pre`,{tabIndex:0,className:Eq,children:n.diff.split(`
72
+ `).map((e,t)=>(0,S.jsx)(`span`,{className:`block ${Aq(e)}`,children:e||` `},t))})})]}):(0,S.jsxs)(`p`,{role:`status`,className:`flex items-center gap-2 text-muted-foreground`,children:[(0,S.jsx)(wz,{}),` Asking GitHub…`]})}function Aq(e){return e.startsWith(`diff --git`)?`mt-3 font-semibold text-foreground first:mt-0`:/^(\+\+\+|---|index |@@)/.test(e)?`text-muted-foreground`:e.startsWith(`+`)?`bg-success/10 text-success`:e.startsWith(`-`)?`bg-destructive/10 text-destructive`:``}var jq={auto:`a check defines correct, so a digest is enough`,skim:`same behavior and a small diff, to skim and accept`,decide:`changes behavior or needs your product judgment`};function Mq({item:e,play:t,children:n}){return(0,S.jsxs)(iq,{children:[(0,S.jsxs)(Xl,{children:[(0,S.jsx)(Gl,{render:(0,S.jsx)(aq,{render:(0,S.jsx)(ay,{variant:`ghost`,size:`icon-sm`,"aria-label":`What this does`})}),children:(0,S.jsx)(Gu,{})}),(0,S.jsx)(Kl,{children:`What this does`})]}),(0,S.jsxs)(cq,{className:`sm:max-w-3xl`,children:[(0,S.jsxs)(lq,{className:`mr-8`,children:[(0,S.jsx)(dq,{children:vq(e)}),(0,S.jsxs)(fq,{children:[e.label,` · `,e.play,` · `,e.level,jq[e.level]&&`: ${jq[e.level]}`]}),t&&(0,S.jsx)(`p`,{className:`text-sm`,children:t})]}),(0,S.jsx)(Nq,{item:e}),(0,S.jsx)(uq,{children:n})]})]})}function Nq({item:e}){let[t,n]=(0,v.useState)(),[r,i]=(0,v.useState)();return(0,v.useEffect)(()=>{let t=!0;return Cd.prompt(e).then(e=>t&&n(e),e=>t&&i(e.message)),()=>{t=!1}},[e]),r?(0,S.jsxs)(`p`,{role:`status`,className:`text-destructive`,children:[`Could not load the task: `,r]}):t===void 0?(0,S.jsxs)(`p`,{role:`status`,className:`flex items-center gap-2 text-muted-foreground`,children:[(0,S.jsx)(wz,{}),` Asking workwork…`]}):(0,S.jsx)(`div`,{tabIndex:0,className:`${Eq} flex flex-col gap-2 font-sans text-sm wrap-anywhere`,children:(0,S.jsx)(rq,{options:Dq,children:t.split(`
73
+ ## Standard`)[0]})})}var Pq=v.createContext(void 0);function Fq(){return v.useContext(Pq)}var Iq=v.forwardRef(function(e,t){let{className:n,defaultPressed:r=!1,disabled:i=!1,form:a,onPressedChange:o,pressed:s,render:c,type:l,value:u,nativeButton:d=!0,style:f,...p}=e,m=lc(u||void 0),h=Fq(),g=h?.value??[],_=(i||h?.disabled)??!1,[y,b]=Yb({controlled:h?m!==void 0&&g.indexOf(m)>-1:s,default:r,name:`Toggle`,state:`pressed`}),{getButtonProps:x,buttonRef:C}=ey({disabled:_,native:d}),w={disabled:_,pressed:y},T=[C,t],E=[{"aria-pressed":y,onClick(e){let t=!y,n=Jt(Xt,e.nativeEvent);o?.(t,n),!n.isCanceled&&(m&&h?.setGroupValue?.(m,t,n),!n.isCanceled&&b(t))}},p,x],D=Hi(`button`,e,{enabled:!h,state:w,ref:T,props:E}),O=v.useMemo(()=>({disabled:_,focusableWhenDisabled:!1}),[_]);return h?(0,S.jsx)(JB,{tag:`button`,render:c,className:n,style:f,metadata:O,state:w,refs:T,props:E}):D}),Lq=v.createContext(void 0);function Rq(){return v.useContext(Lq)}var zq=v.forwardRef(function(e,t){let{defaultValue:n,disabled:r=!1,loopFocus:i=!0,onValueChange:a,orientation:o=`horizontal`,multiple:s=!1,value:c,className:l,render:u,style:d,...f}=e,p=vC(!0),m=Rq(),h=n??G,g=c!==void 0||n!==void 0,_=(p?.disabled??!1)||(m?.disabled??!1)||r,[y,b]=Yb({controlled:c,default:h,name:`ToggleGroup`,state:`value`}),x=Y((e,t,n)=>{let r;s?(r=y.slice(),t?r.push(e):r.splice(y.indexOf(e),1)):r=t?[e]:[],a?.(r,n),!n.isCanceled&&b(r)}),C={disabled:_,multiple:s,orientation:o},w=v.useMemo(()=>({disabled:_,setGroupValue:x,value:y,isValueInitialized:g}),[_,x,y,g]),T={role:`group`},E=Hi(`div`,e,{enabled:!!p,state:C,ref:t,props:[T,f]});return(0,S.jsx)(Pq.Provider,{value:w,children:p?E:(0,S.jsx)(Uz,{render:u,className:l,style:d,state:C,refs:[t],props:[T,f],loopFocus:i,enableHomeAndEndKeys:!0,orientation:o})})}),Bq=Pv(`group/toggle inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-transparent`,outline:`border border-input bg-transparent hover:bg-muted`},size:{default:`h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,sm:`h-7 min-w-7 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`}},defaultVariants:{variant:`default`,size:`default`}}),Vq=v.createContext({size:`default`,variant:`default`,spacing:2,orientation:`horizontal`});function Hq({className:e,variant:t,size:n,spacing:r=2,orientation:i=`horizontal`,children:a,...o}){return(0,S.jsx)(zq,{"data-slot":`toggle-group`,"data-variant":t,"data-size":n,"data-spacing":r,"data-orientation":i,style:{"--gap":r},className:X(`group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-lg data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-vertical:flex-col data-vertical:items-stretch`,e),...o,children:(0,S.jsx)(Vq.Provider,{value:{variant:t,size:n,spacing:r,orientation:i},children:a})})}function Uq({className:e,children:t,variant:n=`default`,size:r=`default`,...i}){let a=v.useContext(Vq);return(0,S.jsx)(Iq,{"data-slot":`toggle-group-item`,"data-variant":a.variant||n,"data-size":a.size||r,"data-spacing":a.spacing,className:X(`shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t`,Bq({variant:a.variant||n,size:a.size||r}),e),...i,children:t})}function Wq({leading:e,title:t,meta:n,children:r}){return(0,S.jsxs)(gV,{variant:`outline`,size:`sm`,children:[e&&(0,S.jsx)(vV,{children:e}),(0,S.jsxs)(yV,{children:[(0,S.jsx)(bV,{children:t}),(0,S.jsx)(xV,{children:n})]}),r&&(0,S.jsx)(SV,{children:r})]})}function Gq({title:e,children:t}){return(0,S.jsxs)(`section`,{className:`flex flex-col gap-2`,children:[(0,S.jsx)(`h2`,{className:`text-sm font-medium text-muted-foreground`,children:e}),t]})}var Kq=``,qq=100,Jq=e=>`${e.repo} ${e.id}`;function Yq({snapshot:e,act:t}){let[n,r]=(0,v.useState)([]),[i,a]=(0,v.useState)(Kq),[o,s]=(0,v.useState)(Kq),[c,l]=(0,v.useState)([`auto`,`skim`,`decide`]),[u,d]=(0,v.useState)(``),[f,p]=(0,v.useState)(qq),[m,h]=(0,v.useState)(new Map),[g,_]=(0,v.useState)(0),{at:y,count:b,refreshing:x}=e.candidates;(0,v.useEffect)(()=>{Cd.candidates().then(e=>r(e.items)),Cd.plays().then(e=>h(new Map(e.map(e=>[e.name,e.description]))))},[y]);let C=(0,v.useMemo)(()=>{let t=new Map;for(let n of e.jobs)n.state!==`removed`&&t.set(Jq(n.item),n);return t},[e.jobs]),w=(0,v.useMemo)(()=>{let e=new Map;for(let t of n)e.set(t.repo,(e.get(t.repo)??0)+1);return[{value:Kq,label:`All repos (${n.length})`}].concat([...e].sort((e,t)=>_q(e[0]).localeCompare(_q(t[0]))).map(([e,t])=>({value:e,label:`${_q(e)} (${t})`})))},[n]),T=i===Kq?n:n.filter(e=>e.repo===i),E=new Map;for(let e of T)E.set(e.play,(E.get(e.play)??0)+1);let D=[...E].sort((e,t)=>e[1]-t[1]),O=u.toLowerCase().split(/\s+/).filter(Boolean),k=T.filter(e=>(o===Kq||e.play===o)&&c.includes(e.level)&&O.every(t=>`${vq(e)} ${e.id} ${e.label}`.toLowerCase().includes(t))),A=(e,n)=>t(()=>Cd.queue(e,n)),j=k.filter(e=>!C.has(Jq(e)));return n.length===0?(0,S.jsxs)(Gv,{children:[(0,S.jsxs)(Kv,{children:[(0,S.jsx)(qv,{children:x?`Asking workwork`:`No candidates yet`}),(0,S.jsx)(Jv,{children:x?`workwork is looking through every repo under $SRC. That takes a few minutes.`:`Ask workwork for candidates across your repos. It takes a few minutes.`})]}),(0,S.jsx)(Yv,{children:(0,S.jsxs)(ay,{disabled:x,onClick:()=>t(Cd.refreshCandidates),children:[x&&(0,S.jsx)(wz,{}),` Ask workwork`]})})]}):(0,S.jsxs)(`div`,{className:`flex flex-col gap-4 pt-2`,children:[(0,S.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,S.jsx)(Ay,{className:`max-w-xs`,placeholder:`Search titles, ids, repos`,value:u,onChange:e=>d(e.target.value)}),(0,S.jsx)(Hq,{multiple:!0,variant:`outline`,value:c,onValueChange:l,children:[`auto`,`skim`,`decide`].map(e=>(0,S.jsx)(Uq,{value:e,children:e},e))}),(0,S.jsxs)(tw,{items:w,value:i,onValueChange:e=>{let t=e??Kq;a(t),p(qq),n.some(e=>e.play===o&&(t===Kq||e.repo===t))||s(Kq)},children:[(0,S.jsx)(rw,{"aria-label":`Repo`,children:(0,S.jsx)(nw,{})}),(0,S.jsx)(iw,{children:w.map(e=>(0,S.jsx)(aw,{value:e.value,children:e.label},e.value))})]}),(0,S.jsxs)(`span`,{className:`flex flex-1 items-center justify-end gap-2 text-sm text-muted-foreground`,children:[x?`Asking workwork…`:`${b} candidates${y?`, ${hq(y)}`:``}`,(0,S.jsxs)(Xl,{children:[(0,S.jsx)(Gl,{render:(0,S.jsx)(ay,{variant:`ghost`,size:`icon-sm`,"aria-label":`Refresh candidates`,disabled:x,onClick:()=>{_(g+1),t(Cd.refreshCandidates)}}),children:(0,S.jsx)(sd,{className:g?`refresh-turn`:void 0},g)}),(0,S.jsx)(Kl,{children:x?`Asking workwork, takes a few minutes`:`Ask workwork again`})]})]})]}),(0,S.jsxs)(`div`,{className:`flex flex-col gap-6 md:flex-row`,children:[(0,S.jsx)(`nav`,{className:`flex flex-wrap gap-1 md:w-48 md:flex-none md:flex-col`,children:[[Kq,T.length],...D].map(([e,t])=>(0,S.jsxs)(Xl,{disabled:!m.has(e),children:[(0,S.jsxs)(Gl,{render:(0,S.jsx)(ay,{variant:o===e?`secondary`:`ghost`,size:`sm`,onClick:()=>{s(e),p(qq)}}),children:[(0,S.jsx)(`span`,{className:`flex-1 text-left`,children:e||`All plays`}),(0,S.jsx)(`span`,{className:`text-muted-foreground`,children:t})]}),(0,S.jsx)(Kl,{side:`right`,children:m.get(e)})]},e))}),(0,S.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,S.jsxs)(Gq,{title:(0,S.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,S.jsxs)(`span`,{className:`flex-1`,children:[k.length,` matching, `,j.length,` not queued yet`]}),j.length>0&&j.length<=20&&(0,S.jsx)(Xq,{label:`Queue all ${j.length}`,presets:e.settings.presets,onQueue:e=>A(j,e)})]}),children:[(0,S.jsx)(mV,{children:k.slice(0,f).map(t=>{let n=C.get(Jq(t)),r=(0,S.jsx)(Xq,{label:`Queue`,presets:e.settings.presets,onQueue:e=>A([t],e)});return(0,S.jsxs)(Wq,{title:vq(t),meta:[t.play,t.level,t.id].join(` · `),children:[n?(0,S.jsx)(Vv,{variant:Sq[n.state],children:n.state}):r,(0,S.jsx)(Mq,{item:t,play:m.get(t.play),children:!n&&r})]},Jq(t))})}),k.length>f&&(0,S.jsxs)(ay,{variant:`ghost`,onClick:()=>p(f+qq),children:[`Show `,Math.min(qq,k.length-f),` more`]})]})})]})]})}function Xq({label:e,presets:t,onQueue:n}){return(0,S.jsxs)($z,{children:[(0,S.jsx)(ay,{variant:`outline`,size:`sm`,onClick:()=>n(),children:e}),(0,S.jsxs)(sV,{children:[(0,S.jsx)(cV,{render:(0,S.jsx)(ay,{variant:`outline`,size:`icon-sm`,"aria-label":`${e} with`}),children:(0,S.jsx)(xu,{})}),(0,S.jsxs)(lV,{align:`end`,className:`w-auto`,children:[(0,S.jsxs)(uV,{children:[(0,S.jsx)(dV,{children:`Agent`}),Xz.map(e=>(0,S.jsx)(fV,{onClick:()=>n({agent:e}),children:e},e))]}),(0,S.jsx)(pV,{}),(0,S.jsxs)(uV,{children:[(0,S.jsx)(dV,{children:`Preset`}),t.length===0&&(0,S.jsx)(fV,{disabled:!0,children:`Add presets in Settings`}),t.map((e,t)=>(0,S.jsx)(fV,{onClick:()=>n(e),children:wq(e)},t))]})]})]})]})}function Zq({act:e}){let[t,n]=(0,v.useState)(!1);return(0,S.jsxs)(iq,{open:t,onOpenChange:n,children:[(0,S.jsxs)(Xl,{children:[(0,S.jsx)(Gl,{render:(0,S.jsx)(aq,{render:(0,S.jsx)(ay,{variant:`ghost`,size:`icon`,"aria-label":`Clone a repo`})}),children:(0,S.jsx)(Lu,{})}),(0,S.jsx)(Kl,{children:`Clone a repo`})]}),(0,S.jsxs)(cq,{className:`sm:max-w-xl`,children:[(0,S.jsxs)(lq,{children:[(0,S.jsx)(dq,{children:`Clone a repo`}),(0,S.jsx)(fq,{children:`Your GitHub repos that aren't cloned yet, newest first. Once cloned, workwork looks for work in it.`})]}),(0,S.jsx)(Qq,{act:e})]})]})}function Qq({act:e}){let[t,n]=(0,v.useState)(),[r,i]=(0,v.useState)(),[a,o]=(0,v.useState)(),[s,c]=(0,v.useState)(``),[l,u]=(0,v.useState)();if((0,v.useEffect)(()=>{Cd.repos().then(e=>{n(e),o(e.usual)},e=>i(e.message))},[]),r)return(0,S.jsx)(`p`,{className:`text-sm text-destructive`,children:r});if(!t)return(0,S.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,S.jsx)(wz,{}),` Asking GitHub`]});let d=s.toLowerCase(),f=t.repos.filter(e=>e.name.toLowerCase().includes(d)||e.description.toLowerCase().includes(d)),p=r=>e(async()=>{u(r.name);try{await Cd.clone(r.name,a),n({...t,repos:t.repos.filter(e=>e!==r)})}finally{u(void 0)}});return(0,S.jsxs)(`div`,{className:`flex min-h-0 flex-col gap-3`,children:[(0,S.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,S.jsxs)(`span`,{className:`text-sm text-muted-foreground`,children:[`Into `,t.root,`/`]}),(0,S.jsxs)(tw,{value:a,onValueChange:e=>o(e??void 0),children:[(0,S.jsx)(rw,{size:`sm`,"aria-label":`Folder`,children:(0,S.jsx)(nw,{placeholder:`folder`})}),(0,S.jsx)(iw,{children:t.folders.map(e=>(0,S.jsx)(aw,{value:e,children:e},e))})]})]}),(0,S.jsx)(Ay,{placeholder:`Search ${t.repos.length} repos`,value:s,onChange:e=>c(e.target.value)}),(0,S.jsxs)(mV,{className:`max-h-[50svh] overflow-y-auto`,children:[f.map(e=>(0,S.jsx)(Wq,{title:e.name,meta:[e.description,`created ${e.createdAt.slice(0,10)}`].filter(Boolean).join(` · `),children:(0,S.jsxs)(ay,{variant:`outline`,size:`sm`,disabled:!a||l!==void 0,onClick:()=>p(e),children:[l===e.name&&(0,S.jsx)(wz,{}),` Clone`]})},e.name)),f.length===0&&(0,S.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:t.repos.length?`No repo matches.`:`Every repo of yours is cloned.`})]})]})}function $q(e){if(!e)return null;for(let t of e.elements){let e=t.tagName;if(e===`BUTTON`||e===`INPUT`){let e=t;if(e.type===`submit`)return e}}return null}var eJ=`data-checked`,tJ=`data-unchecked`;function nJ(e){return{checked(t){return e.indeterminate?{}:t?{[eJ]:``}:{[tJ]:``}},...dy}}var rJ=v.createContext(void 0);function iJ(){return v.useContext(rJ)}var aJ=v.createContext(void 0);function oJ(){let e=v.useContext(aJ);if(e===void 0)throw Error(J(14));return e}var sJ=`data-parent`,cJ=v.forwardRef(function(e,t){let{checked:n,className:r,defaultChecked:i=!1,"aria-labelledby":a,disabled:o=!1,form:s,id:c,indeterminate:l=!1,inputRef:u,name:d,onCheckedChange:f,parent:p=!1,readOnly:m=!1,render:h,required:g=!1,uncheckedValue:_,value:y,nativeButton:b=!1,style:x,...C}=e,{clearErrors:w}=gy(),{disabled:T,name:E,setDirty:D,setFilled:O,setTouched:k,state:A,validationMode:j,validityData:M,validation:N}=my(),P=wy(),{labelId:F,registerControlId:I,getDescriptionProps:L}=vy(),R=iJ(),z=R?.allValues===void 0?void 0:R.parent,B=z!==void 0,V=T||P.disabled||R?.disabled||o,H=E??d,U=y??H,ee=lc(),te=R?.registerControlId!==I,ne=Sy({id:c||void 0,enabled:te}),W=b?ne:ee,re={};B&&(p?re=z.getParentProps():U!==void 0&&(re=z.getChildProps(U)));let{checked:ie=n,indeterminate:ae=l,onCheckedChange:G,...oe}=re,J=R?.value,se=v.useRef(null),ce=Ty(V,se),{getButtonProps:le,buttonRef:ue}=ey({disabled:V,native:b}),de=R?.validation??N,[fe,pe]=Yb({controlled:U!==void 0&&J!==void 0&&!p?J.includes(U):ie,default:i,name:`Checkbox`,state:`checked`}),me=B?!!ie:fe,he=B&&ae||l;Ey(se,ee,fe,void 0,!R&&!V,d);let ge=z?.registerChildId,_e=v.useRef(null),ve=de.registerInput,ye=R?U:void 0,be=v.useCallback(e=>ve(e,{controlRef:se,value:ye}),[ve,ye]),xe=En(u,_e,p?void 0:be),Se=yy(a,F,_e,!b,ne,C[`aria-label`]);q(()=>{_e.current&&(_e.current.indeterminate=he),R||O(fe)},[fe,he,R,O]),Dy(fe,()=>{R||(w(H),D(fe!==M.initialValue),de.change(fe))});let Ce=ki({checked:fe,disabled:V,form:s,name:p?void 0:H,id:b?void 0:ne,required:g,ref:xe,style:H?Kn:Gn,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(m){e.preventDefault();return}let t=e.currentTarget.checked,n=Jt(Xt,e.nativeEvent);if(f?.(t,n),!n.isCanceled&&(G?.(t,n),!n.isCanceled&&(pe(t),U!==void 0&&R!==void 0&&!p&&!B))){let e=t?[...R.value,U]:R.value.filter(e=>e!==U);R.setValue(e,n)}},onClick(e){e.stopPropagation()},onFocus(){se.current?.focus()}},y===void 0?K:{value:(R?fe&&y:y)||``},L,e=>de.getValidationProps(V,e));v.useEffect(()=>{if(!z||U===void 0)return;let e=z.disabledStatesRef.current;return e.set(U,V),()=>{e.delete(U)}},[z,V,U]);let we=v.useMemo(()=>({...A,checked:me,disabled:V,readOnly:m,required:g,indeterminate:he}),[A,me,V,m,g,he]),Te=nJ(we),Ee=Hi(`span`,e,{state:we,ref:[ue,se,t],props:[{id:W,role:`checkbox`,"aria-checked":he?`mixed`:me,"aria-readonly":m||void 0,"aria-required":g||void 0,"aria-labelledby":Se,[sJ]:p?``:void 0,onFocus(){ce(!0)},onBlur(){let e=_e.current;e&&(k(!0),ce(!1),j===`onBlur`&&de.commit(R?J:e.checked))},onKeyDown(e){if(e.key!==`Enter`||(e.preventBaseUIHandler(),e.defaultPrevented))return;let t=_e.current?.form??null,n=e.currentTarget,r=e.nativeEvent,i=e.preventDefault,a=r.preventDefault,o=!1;e.preventDefault=()=>{o=!0,i.call(e)},r.preventDefault=()=>{o=!0,a.call(r)},a.call(r),Ie(n).queueMicrotask(()=>{e.preventDefault=i,r.preventDefault=a,o||$q(t)?.click()})},onClick(e){if(m||V)return;e.preventDefault();let t=_e.current;t&&$v(t,e)}},C,oe,le,L,e=>de.getValidationProps(V,e)],stateAttributesMapping:Te}),De=Ee.props.id;return q(()=>{if(ge&&!p&&U!==void 0&&De!==void 0)return ge(U,De)},[ge,p,U,De]),(0,S.jsxs)(aJ.Provider,{value:we,children:[Ee,!fe&&!R&&H&&!p&&_!==void 0&&(0,S.jsx)(`input`,{type:`hidden`,form:s,name:H,value:_,disabled:V}),(0,S.jsx)(`input`,{...Ce,suppressHydrationWarning:!0})]})}),lJ=v.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=oJ(),c=s.checked||s.indeterminate,{mounted:l,transitionStatus:u,setMounted:d}=Na(c),f=v.useRef(null),p={...s,transitionStatus:u};Ra({batch:!0,enabled:!c,open:c,ref:f,onComplete(){c||d(!1)}});let m={...nJ(s),...yt},h=a||l,g=Hi(`span`,e,{ref:[t,f],state:p,stateAttributesMapping:m,props:o});return h?g:null});function uJ({className:e,...t}){return(0,S.jsx)(cJ,{"data-slot":`checkbox`,className:X(`peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary`,e),...t,children:(0,S.jsx)(lJ,{"data-slot":`checkbox-indicator`,className:`grid place-content-center text-current transition-none [&>svg]:size-3.5`,children:(0,S.jsx)(yu,{})})})}function dJ(e,t,n,r,i,a,o,s,c,l=2){let u=Dr(n.current,{event:e,orientation:r,loopFocus:i,rtl:a,cols:l,disabledIndices:o,minIndex:s,maxIndex:c,prevIndex:t>c?s:t,stopEvent:!0});return Sr(n.current,u)?void 0:u}var fJ=v.createContext(void 0),pJ=v.createContext(void 0),mJ=v.createContext(void 0),hJ=v.createContext(!1),gJ=v.createContext(``);function _J(){let e=v.useContext(fJ);if(!e)throw Error(J(22));return e}function vJ(){let e=v.useContext(pJ);if(!e)throw Error(J(23));return e}function yJ(){let e=v.useContext(mJ);if(!e)throw Error(J(24));return e}function bJ(){return v.useContext(gJ)}function xJ(){return v.useContext(hJ)}var SJ={id:e=>e.id,labelId:e=>e.labelId,items:e=>e.items,selectedValue:e=>e.selectedValue,hasSelectionChips:e=>{let t=e.selectedValue;return Array.isArray(t)&&t.length>0},hasSelectedValue:e=>{let{selectedValue:t,selectionMode:n}=e;return t==null?!1:n===`multiple`&&Array.isArray(t)?t.length>0:!0},hasNullItemLabel:(e,t)=>t?hS(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMounted:e=>e.forceMounted,inline:e=>e.inline,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(e=>rS(t,e,n)):rS(t,r,n)},transitionStatus:e=>e.transitionStatus,popupProps:e=>e.popupProps,listProps:e=>e.listProps,inputProps:e=>e.inputProps,triggerProps:e=>e.triggerProps,itemRoot:e=>e.itemRoot,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupId:e=>e.popupId,triggerElement:e=>e.triggerElement,inputElement:e=>e.inputElement,inputGroupElement:e=>e.inputGroupElement,popupSide:e=>e.popupSide,openMethod:e=>e.openMethod,inputInsidePopup:e=>e.inputInsidePopup,inputOwnsFormValue:e=>e.inputOwnsFormValue,selectionMode:e=>e.selectionMode,name:e=>e.name,form:e=>e.form,disabled:e=>e.disabled,readOnly:e=>e.readOnly,required:e=>e.required,grid:e=>e.grid,virtualized:e=>e.virtualized,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,modal:e=>e.modal,autoHighlight:e=>e.autoHighlight};function CJ(e){return e==null?void 0:`${e}-popup`}function wJ(e,t){return(n,r)=>n!=null&&e.contains(n,r,t)}var TJ=rV;function EJ(e,t=!1){let{overflowY:n}=$e(e);return n!==`auto`&&n!==`scroll`?!1:t?e.clientHeight>0:e.scrollHeight>e.clientHeight}var DJ=Symbol(`none`),OJ={value:DJ,index:-1};function kJ(e,t,n){let r=e.get(t);if(r!==void 0||n===nS)return r;for(let[r,i]of e)if(rS(r,t,n))return i}function AJ(e){let{id:t,onOpenChangeComplete:n,defaultSelectedValue:r=null,selectedValue:i,onSelectedValueChange:a,defaultInputValue:o,inputValue:s,open:c,defaultOpen:l=!1,selectionMode:u,onItemHighlighted:d,name:f,form:p,disabled:m=!1,readOnly:h=!1,required:g=!1,inputRef:_,grid:y=!1,items:b,filteredItems:x,filter:C,filterQuery:w,openOnInputClick:T=!0,autoHighlight:E=!1,keepHighlight:D=!1,highlightItemOnHover:O=!0,loopFocus:k=!0,itemToStringLabel:A,itemToStringValue:j,isItemEqualToValue:M=nS,virtualized:N=!1,inline:P=!1,fillInputOnItemPress:F=!0,modal:I=!1,limit:L=-1,autoComplete:R=`list`,formAutoComplete:z,locale:B,submitOnItemClick:V=!1}=e,{clearErrors:U}=gy(),{setDirty:ee,validityData:te,setFilled:ne,name:W,disabled:re,setTouched:ie,setFocused:oe,validationMode:se,validation:ce}=my(),le=Cc(),ue=Sy({id:t}),de=TJ({locale:B}),fe=Array.isArray(b)?null:b;if(fe&&typeof fe.label!=`function`)throw Error(J(100));let pe=fe?fe.data:b,me=fe?.value,he=me?void 0:pe,ge=v.useMemo(()=>{if(!x||!me)return;let e=mS(x),t=e.map(me),n;return{values:t,findItem(r,i){if(!n){n=new Map;for(let r=0;r<t.length;r+=1)n.has(t[r])||n.set(t[r],e[r])}return kJ(n,r,i)}}},[x,me]),_e=v.useMemo(()=>fe?e=>fe.label(e,M,e=>{let t=ge?.findItem(e,M);return t==null?gS(e,A):fe.itemLabel(t)}):A,[fe,A,ge,M]),ve=v.useMemo(()=>fe?Object.assign(e=>fe.itemLabel(e),{selected:e=>gS(e,_e)}):A,[fe,_e,A]);function ye(e){return gS(e,_e)}let[be,xe]=v.useState(!1),[Se,Ce]=v.useState(null),we=v.useRef(Se),Te=v.useRef([]),Ee=v.useRef([]),De=v.useRef(null),Oe=v.useRef(null),ke=v.useRef(null),Ae=v.useRef(null),je=v.useRef(null),Me=v.useRef(!1),Ne=v.useRef(null),Pe=v.useRef(null),Fe=v.useRef(null),Ie=v.useRef(OJ),Le=v.useRef(null),Re=v.useRef([]),ze=v.useRef(null),Ve=re||m,He=W??f,Ue=u===`multiple`,We=u===`single`,Ge=s!==void 0||o!==void 0,Ke=pe!==void 0,qe=x!==void 0,Je;Je=E===`always`?`always`:E?`input-change`:!1;let[Ye,Xe]=Yb({controlled:i,default:Ue?r??G:r,name:`Combobox`,state:`selectedValue`}),Ze=v.useMemo(()=>C===null?()=>!0:C===void 0?wJ(de,ve):C,[C,de,ve]),Qe=H(()=>Ge?o??``:We?ye(Ye):``).current,[$e,et]=Yb({controlled:s,default:Qe,name:`Combobox`,state:`inputValue`}),[tt,nt]=Yb({controlled:c,default:l,name:`Combobox`,state:`open`}),it=pS(pe),lt=!tt&&Se!==null?Se:String($e).trim(),ut=We?ye(Ye):``,dt=We&&!be&&lt!==``&&ut.length===lt.length&&de.contains(ut,lt),ft=dt?``:w??lt,pt=Ke&&qe&&dt&&(!fe||fe.hasValue(Ye,M)),mt=v.useMemo(()=>pe?mS(pe):G,[pe]),ht=v.useMemo(()=>{if(x&&!pt)return x;if(!pe)return G;if(it){let e=pe,t=[],n=0;for(let r of e){if(L>-1&&n>=L)break;let e=L>-1?L-n:1/0,i=ft===``?r.items.slice(0,e):[];if(ft!==``)for(let t of r.items){if(i.length>=e)break;Ze(t,ft,ve)&&i.push(t)}if(i.length>0){let e={...r,items:i};t.push(e),n+=i.length}}return t}if(ft===``)return L>-1?mt.slice(0,L):mt;let e=[];for(let t of mt){if(L>-1&&e.length>=L)break;Ze(t,ft,ve)&&e.push(t)}return e},[x,pt,pe,it,ft,L,Ze,ve,mt]),gt=v.useMemo(()=>{if(ge&&ht===x)return ge.values;let e=mS(ht);return me?e.map(e=>me(e)):e},[ht,x,ge,me]),_t=H(()=>{let e=null;return P&&tt&&Ke&&u!==`none`&&(e=cS(gt,Ye,M,Ue)),new mo({id:ue,labelId:void 0,selectedValue:Ye,open:tt,items:he,selectionMode:u,name:He,form:p,disabled:Ve,readOnly:h,required:g,grid:y,virtualized:N,openOnInputClick:T,itemToStringLabel:_e,isItemEqualToValue:M,modal:I,autoHighlight:Je,submitOnItemClick:V,hasInputValue:Ge,mounted:!1,forceMounted:!1,transitionStatus:`idle`,inline:P,activeIndex:null,selectedIndex:e,popupProps:{},listProps:{},inputProps:{},triggerProps:{},itemRoot:{props:K,id:ue,selectionMode:u,disabled:Ve,readOnly:h,isItemEqualToValue:M},positionerElement:null,listElement:null,popupId:void 0,triggerElement:null,inputElement:null,inputGroupElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,inputOwnsFormValue:u===`none`},{onOpenChangeComplete:ae,setOpen:ae,setInputValue:ae,setSelectedValue:ae,setIndices:ae,handleSelection:ae,forceMount:ae,requestSubmit:ae,listRef:Te,labelsRef:Ee,popupRef:De,emptyRef:je,inputRef:Oe,startDismissRef:ke,endDismissRef:Ae,chipsContainerRef:Ne,clearRef:Pe,valuesRef:Re,pointerDownItemRef:ze,selectionEventRef:Fe},SJ)}).current,vt=u===`none`?$e:Ye,yt=v.useMemo(()=>u===`none`?vt:Array.isArray(Ye)?Ye.map(e=>_S(e,j)):_S(Ye,j),[vt,j,u,Ye]),bt=Y(d),xt=Y(n),St=_t.useState(`activeIndex`),Ct=_t.useState(`selectedIndex`),wt=_t.useState(`positionerElement`),Tt=_t.useState(`listElement`),Et=_t.useState(`triggerElement`),Dt=_t.useState(`inputElement`),Ot=_t.useState(`inputGroupElement`),kt=_t.useState(`inline`),At=_t.useState(`inputInsidePopup`),jt=_t.useState(`inputOwnsFormValue`),Mt=We&&!At&&$e===ut,Nt=Mn(Et),{openMethod:Pt,triggerProps:Ft}=CS(tt),It=Y(()=>yt);Ey(At?Nt:Oe,ue,vt,It,!Ve,f);let Lt=Y(()=>{pe?Ee.current=gt.map(ye):_t.set(`forceMounted`,!0)}),Rt=Y((e,t,n,r)=>{if(t===-1){if(Ie.current===OJ)return;Ie.current=OJ}else Ie.current={value:e,index:t};bt(e,Yt(n,r,{index:t}))}),zt=Y(e=>{let t={};e.activeIndex!==void 0&&(t.activeIndex=e.activeIndex),e.selectedIndex!==void 0&&(t.selectedIndex=e.selectedIndex),_t.update(t);let n=e.activeIndex;if(n===void 0)return;let r=e.type||`none`;n===null?Rt(void 0,-1,r,e.event):Rt(Re.current[n],n,r,e.event)}),Bt=Y((t,n)=>{if(e.onInputValueChange?.(t,n),!n.isCanceled){if(Me.current=n.reason===on,n.reason===`input-change`){tt&&Se!==null&&Ce(null);let e=n.event,r=e.inputType;if(e.type===`compositionend`||r!=null&&r!==``&&r!==`insertReplacementText`){let e=t.trim()!==``;e&&xe(!0),Le.current={hasQuery:e};let n=_t.state.listElement;if(!_t.state.virtualized&&n){let e=De.current;for(let t of rt(n.firstElementChild??n)){if(!Be(t)||(e?!ot(e,t):t.getAttribute(`role`)===`dialog`))break;if(EJ(t)){t.scrollTop=0;break}}}e&&Je&&_t.state.activeIndex==null&&(tt||kt)&&_t.set(`activeIndex`,0)}}else n.reason===`input-clear`&&t===``&&_t.state.inputInsidePopup&&(Le.current={hasQuery:!1,selection:!0});et(t)}}),Vt=Y(e=>{let t=!e&&At&&!kt&&$e!==``&&(String($e).trim()===Se||$e===ut);!e&&(t||$e===``||Mt)&&xe(!1),Ce(null),t&&Bt(``,Jt(on))}),[Ht,Ut]=v.useState(!1),Wt=Y((t,n)=>{if(tt===t)return;n.reason===`escape-key`&&Ke&&gt.length===0&&!je.current&&n.allowPropagation();let r=n,i=qa(r);if(e.onOpenChange?.(t,r),Le.current?.hasQuery&&n.reason===`input-change`===n.isCanceled&&(Le.current=null),!n.isCanceled&&(t&&Se!==null&&Vt(n.reason===an),!t&&be&&(We?(kt||Ce(lt),lt===``&&xe(!1)):Ue&&(kt||Ce(lt),At&&zt({activeIndex:null}),(!At||kt)&&Bt(``,Jt(on,n.event,void 0,{isItemPress:n.reason===tn})))),t||Ut(i()),nt(t),!t&&At&&(n.reason===`focus-out`||n.reason===`outside-press`)&&(ie(!0),oe(!1),se===`onBlur`))){let e=u===`none`?$e:Ye;ce.commit(e)}}),Gt=Y((e,t)=>{a?.(e,t),!t.isCanceled&&(Xe(e),(u===`none`&&De.current&&F||We&&!_t.state.inputInsidePopup)&&Bt(ye(e),Jt(t.reason,t.event)))}),Kt=Y((e,t)=>{let n=ct(e),r=Fe.current??e;Fe.current=null;let i=Jt(tn,r),a=st(n,`a`)?.getAttribute(`href`);if(a)a.startsWith(`#`)&&Wt(!1,i);else if(Ue){let e=Array.isArray(Ye)?Ye:[],n=aS(e,t,M),r=n?uS(e,t,M):[...e,t];if(Gt(r,i),i.isCanceled||!(Oe.current&&Oe.current.value.trim()!==``))return;if(_t.state.inputInsidePopup){Bt(``,Jt(on,i.event,void 0,{isItemPress:!0}));let e=Le.current;e&&!n&&(e.toggledValue=t)}else Wt(!1,i)}else{if(Gt(t,i),i.isCanceled)return;Wt(!1,i)}}),qt=Y(()=>{let e=ce.inputRef.current?.form??_t.state.inputElement?.form;e&&typeof e.requestSubmit==`function`&&e.requestSubmit()}),Zt=Y(()=>{if(xt?.(!1),xe(!1),Ce(null),zt(u===`none`?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),Ue&&Oe.current&&Oe.current.value!==``&&!Me.current&&Bt(``,Jt(on)),We){if(_t.state.inputInsidePopup)Oe.current&&Oe.current.value!==``&&Bt(``,Jt(on));else{let e=ye(Ye);Oe.current&&Oe.current.value!==e&&Bt(e,Jt(e===``?on:Xt))}}}),Qt=v.useMemo(()=>kt&&wt?{current:st(wt,`[role="dialog"]`)}:De,[kt,wt]),{mounted:$t,transitionStatus:en,forceUnmount:nn}=za({open:tt,ref:Qt,preventUnmountOnClose:Ht,setPreventUnmountOnClose:Ut,onUnmount:Zt});v.useImperativeHandle(e.actionsRef,()=>({unmount:nn,close:()=>Wt(!1,Jt(vn))}),[nn,Wt]),q(function(){let e=we.current!==null&&Se===null;if(we.current=Se,tt&&(!e||!Ke)||(tt||(ze.current=null),u===`none`))return;let t=Ke?gt:Re.current;zt({selectedIndex:cS(t,Ye,M,Ue)})},[tt,Se,Ye,u,Ue,Ke,gt,M,zt]),q(()=>{pe&&(Re.current=gt,Te.current.length=gt.length)},[pe,gt]),q(()=>{!tt&&Le.current?.hasQuery&&(Le.current=null)},[tt]),q(()=>{if(!tt&&kt&&Qt.current){Le.current=null;return}let e=Ke||qe?gt:Re.current,t=Le.current;if(t){let n=tt||kt||_t.state.positionerElement?.hidden===!1;if(t.hasQuery){let t=Oe.current;!Je||String($e).trim()===``||kt&&Je!==`always`&&(!t||at(t.ownerDocument)!==t)?Le.current=null:n&&(e[0]!==void 0||!Ke&&!qe)&&(_t.set(`activeIndex`,0),Le.current=null)}else if(String($e).trim()===``&&(Le.current=null,n)){let e=t.selection;Je===`always`&&!e&&_t.state.selectionMode===`none`&&_t.set(`activeIndex`,0),queueMicrotask(()=>{if(!_t.state.open&&(!_t.state.inline||Qt.current)||Oe.current&&Oe.current.value.trim()!==``)return;let n=_t.state.selectedValue,r=_t.state.selectionMode===`multiple`;if(r&&Array.isArray(n)?n.length>0:_t.state.selectionMode!==`none`&&n!=null){let e=Ke||qe?gt:Re.current,i=oS(e,t.toggledValue,_t.state.isItemEqualToValue);_t.set(`activeIndex`,i===-1?cS(e,n,_t.state.isItemEqualToValue,r):i)}else e?_t.set(`activeIndex`,null):Je===`always`&&_t.set(`activeIndex`,0)})}}if(!tt&&!kt)return;let n=_t.state.activeIndex;if(n==null){if(Je===`always`&&e.length>0){_t.set(`activeIndex`,0);return}Rt(void 0,-1,Xt);return}if(n>=e.length){Rt(void 0,-1,Xt),_t.set(`activeIndex`,null);return}let r=e[n],i=Ie.current.value,a=i!==DJ&&rS(r,i,_t.state.isItemEqualToValue);(Ie.current.index!==n||!a)&&Rt(r,n,Xt)},[St,Je,Rt,qe,Ke,gt,kt,tt,Qt,_t,$e]),q(()=>{ne(u===`none`?String($e)!==``:Ue?Array.isArray(Ye)&&Ye.length>0:Ye!=null)},[ne,u,$e,Ye,Ue]),v.useEffect(()=>{Ke&&Je&&gt.length===0&&zt({activeIndex:null})},[Ke,Je,gt.length,zt]);function rn(){tt&&lt!==``&&lt!==String(Qe)&&!Mt&&xe(!0)}function cn(){tt&&Se!==null&&Vt(!1)}let ln=!1;function un(){!ln&&$e!==ut&&(ln=!0,Bt(ut,Jt(Xt)))}function dn(){u!==`none`&&(U(He),ee(iS(Ye,te.initialValue,M)),ce.change(Ye),We&&!Ge&&!At&&un())}function fn(){We&&!Ge&&!At&&!be&&un()}function pn(){u===`none`&&(U(He),ee($e!==te.initialValue),ce.change($e))}Dy(lt,rn),Dy(tt,cn),Dy(Ye,dn),Dy(ut,fn),Dy(pe,fn),Dy($e,pn);let mn=To({open:kt?!0:tt,onOpenChange:Wt,elements:{reference:At?Et:Dt,floating:wt}}),hn=y?`grid`:`listbox`,gn=tt||kt,_n=gn?`true`:`false`,yn=v.useMemo(()=>{let e=Dt?.tagName===`INPUT`,t=Dt==null||e,n=t||gn,r=t?{autoComplete:`off`,spellCheck:`false`,autoCorrect:`off`,autoCapitalize:`none`}:{};return n&&(r.role=`combobox`,r[`aria-expanded`]=_n,r[`aria-haspopup`]=hn,r[`aria-controls`]=gn?Tt?.id:void 0,r[`aria-autocomplete`]=h?`none`:R),{reference:r,floating:{role:`presentation`}}},[Dt,gn,_n,hn,Tt?.id,R,h]),bn=wa(mn,{enabled:!Ve&&T,event:`mousedown-only`,toggle:!1,touchOpenDelay:At?0:100,reason:sn}),xn=Aa(mn,{enabled:!Ve&&!kt,outsidePressEvent:{mouse:`sloppy`,touch:`intentional`},bubbles:kt?!0:void 0,outsidePress(e){let t=ct(e);return!ot(Et,t)&&!ot(Pe.current,t)&&!ot(Ne.current,t)&&!ot(Ot,t)}}),Sn=Ho(mn,{enabled:!Ve,id:ue,listRef:Te,activeIndex:St,selectedIndex:Ct,virtual:!0,loopFocus:k,allowEscape:k&&!Je,focusItemOnOpen:be||u===`none`&&!Je?!1:`auto`,focusItemOnHover:O,resetOnPointerLeave:!D,orientation:y?`horizontal`:void 0,rtl:le===`rtl`,disabledIndices:G,grid:y?dJ:void 0,onNavigate(e,t){(t||tt||kt&&e===null)&&en!==`ending`&&zt({activeIndex:e,type:RB(t),event:t?.nativeEvent})}}),Cn=v.useMemo(()=>ki(Sn.reference,{onKeyDown(e){y&&_t.state.activeIndex==null&&(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&e.preventBaseUIHandler()}},xn.reference,bn.reference,yn.reference),[Sn.reference,xn.reference,bn.reference,yn.reference,y,_t]),wn=v.useMemo(()=>ki(Ba,xn.floating),[xn.floating]),Tn=v.useMemo(()=>ki(Sn.floating,yn.floating),[Sn.floating,yn.floating]),Dn=v.useMemo(()=>{let e=Sn.item;return{props:e?{...e,onFocus:void 0}:K,id:ue,selectionMode:u,disabled:Ve,readOnly:h,isItemEqualToValue:M}},[Sn.item,ue,u,Ve,h,M]);_t.useContextCallback(`setOpen`,Wt),_t.useContextCallback(`setInputValue`,Bt),_t.useContextCallback(`setSelectedValue`,Gt),_t.useContextCallback(`setIndices`,zt),_t.useContextCallback(`handleSelection`,Kt),_t.useContextCallback(`forceMount`,Lt),_t.useContextCallback(`requestSubmit`,qt),_t.useContextCallback(`onOpenChangeComplete`,n),Yx(()=>{_t.update({inline:P,popupProps:wn,listProps:Tn,inputProps:Cn,triggerProps:Ft,itemRoot:Dn})});let On={id:ue,selectedValue:Ye,open:tt,mounted:$t,transitionStatus:en,items:he,inline:P,popupProps:wn,listProps:Tn,inputProps:Cn,triggerProps:Ft,itemRoot:Dn,openMethod:Pt,selectionMode:u,name:He,form:p,disabled:Ve,readOnly:h,required:g,grid:y,virtualized:N,openOnInputClick:T,itemToStringLabel:_e,modal:I,autoHighlight:Je,isItemEqualToValue:M,submitOnItemClick:V,hasInputValue:Ge};q(()=>{_t.update({...On,inputOwnsFormValue:u===`none`&&(P||!_t.state.inputInsidePopup)})},[_t,...Object.values(On)]);let kn=En(_,ce.inputRef),An=v.useMemo(()=>({query:lt,hasItems:Ke,filteredItems:ht,flatFilteredValues:gt}),[lt,Ke,ht,gt]),jn=v.useMemo(()=>Array.isArray(vt)?``:_S(vt,j),[vt,j]),Nn=Ue&&Array.isArray(Ye)&&Ye.length>0,Pn=Ue||u===`none`&&jt?void 0:He,Fn=v.useMemo(()=>!Ue||!Array.isArray(Ye)||!He?null:Ye.map(e=>{let t=_S(e,j);return(0,S.jsx)(`input`,{type:`hidden`,form:p,name:He,value:t,disabled:Ve},t)}),[Ue,Ye,p,He,j,Ve]),In=(0,S.jsxs)(v.Fragment,{children:[e.children,(0,S.jsx)(`input`,{...ce.getValidationProps(Ve,{onFocus(){At?Et?.focus():(Oe.current||Et)?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented||Ve||h)return;let t=e.currentTarget.value,n=t.toLowerCase(),r=Jt(Xt,e.nativeEvent),i=()=>Re.current.findIndex(e=>_S(e,j).toLowerCase()===n||ye(e).toLowerCase()===n);function a(){if(Ue)return;if(u===`none`){Bt(t,r);return}let e=i();e===-1&&(e=Re.current.findIndex((e,t)=>{let r=Ee.current[t];return r!=null&&r.toLowerCase()===n}));let a=e===-1?void 0:Re.current[e];a!=null&&Gt?.(a,r)}We&&(Lt(),pe&&i()===-1&&_t.set(`forceMounted`,!0)),queueMicrotask(a)}}),id:ue&&Pn==null?`${ue}-hidden-input`:void 0,form:p,name:Pn,autoComplete:z,disabled:Ve,required:g&&!Nn,readOnly:h,value:jn,ref:kn,style:Pn?Kn:Gn,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Fn]});return(0,S.jsx)(fJ.Provider,{value:_t,children:(0,S.jsx)(pJ.Provider,{value:mn,children:(0,S.jsx)(hJ.Provider,{value:Ke,children:(0,S.jsx)(mJ.Provider,{value:An,children:(0,S.jsx)(gJ.Provider,{value:$e,children:In})})})})})}var jJ=`data-popup-side`,MJ=`data-list-empty`,NJ={...jt,...dy,popupSide:e=>e?{[jJ]:e}:null,listEmpty:e=>e?{[MJ]:``}:null};function PJ(e){let t=e.useState(`mounted`),n=e.useState(`popupSide`),r=e.useState(`positionerElement`);return t&&r?n:null}function FJ(){return yJ().filteredItems.length===0}function IJ(e){return e===`rtl`?[`ArrowRight`,`ArrowLeft`]:[`ArrowLeft`,`ArrowRight`]}function LJ(e,t,n){let r=e.context.listRef.current[t];r&&(e.context.selectionEventRef.current=n,r.click(),e.context.selectionEventRef.current=null)}var RJ=v.forwardRef(function(e,t){let{render:n,className:r,nativeButton:i=!0,disabled:a=!1,id:o,style:s,...c}=e,{state:l,disabled:u,setTouched:d,validationMode:f,validation:p}=my(),{labelId:m}=vy(),h=_J(),g=h.useState(`selectionMode`),_=h.useState(`disabled`),y=h.useState(`readOnly`),b=h.useState(`required`),x=h.useState(`positionerElement`),S=h.useState(`listElement`),C=h.useState(`popupId`),w=h.useState(`triggerProps`),T=h.useState(`inputInsidePopup`),E=h.useState(`id`),D=h.useState(`labelId`),O=h.useState(`open`),k=h.useState(`selectedValue`),A=h.useState(`activeIndex`),j=h.useState(`selectedIndex`),M=h.useState(`hasSelectedValue`),N=vJ(),P=bJ(),F=fe(),I=u||_||a,L=FJ(),R=PJ(h),z=v.useRef(null),B=Ty(I,z);Sy({id:T?o:void 0});let V=T?o??E:o,H=OS(m,D),U;O&&T?U=C??CJ(E):O&&(U=S?.id);let ee=v.useRef(``);function te(e){ee.current=e.pointerType}let{reference:ne}=Uo(N,{enabled:!O&&!y&&!_&&g===`single`,listRef:h.context.labelsRef,activeIndex:A,selectedIndex:j,onMatch(e){let t=h.context.valuesRef.current[e];t!==void 0&&h.context.setSelectedValue(t,Jt(Xt))}}),{reference:W}=wa(N,{enabled:!_,event:`mousedown`}),{buttonRef:re,getButtonProps:ie}=ey({native:i,disabled:I}),ae={...l,readOnly:y,open:O,disabled:I,popupSide:R,listEmpty:L,placeholder:g!==`none`&&!M};return Hi(`button`,e,{ref:[t,re,z,Y(e=>{h.set(`triggerElement`,e)})],state:ae,props:[w,W,ne,{id:V,tabIndex:T?0:-1,role:T?`combobox`:void 0,"aria-expanded":O,"aria-haspopup":T?`dialog`:`listbox`,"aria-controls":U,"aria-required":T&&b||void 0,"aria-readonly":T&&y||void 0,"aria-labelledby":H,onPointerDown:te,onPointerEnter:te,onFocus(){B(!0),!I&&F.start(0,h.context.forceMount)},onBlur(e){if(!ot(x,e.relatedTarget)&&(d(!0),B(!1),f===`onBlur`)){let e=g===`none`?P:k;p.commit(e)}},onMouseDown(e){if(I||(T||N.set(`domReferenceElement`,e.currentTarget),h.context.forceMount(),ee.current!==`touch`&&(h.context.inputRef.current?.focus(),T||e.preventDefault()),O))return;let t=Un(e.currentTarget);function n(e){let t=h.state.triggerElement;if(!t)return;let n=ct(e),r=h.state.positionerElement,i=h.state.listElement;ot(t,n)||ot(r,n)||ot(i,n)||AS(e,t)||h.context.setOpen(!1,Jt(pn,e))}T&&t.addEventListener(`mouseup`,n,{once:!0})},onKeyDown(e){(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(Oe(e),h.context.setOpen(!0,Jt(un,e.nativeEvent)),h.context.inputRef.current?.focus())}},p.getValidationProps(I,c),ie],stateAttributesMapping:NJ})}),zJ=v.createContext(void 0);function BJ(){return v.useContext(zJ)}var VJ=v.createContext(void 0);function HJ(e){let t=v.useContext(VJ);if(t===void 0&&!e)throw Error(J(21));return t}var UJ=v.forwardRef(function(e,t){let n=_J(),{buttonRef:r,getButtonProps:i}=ey({native:!1}),a=En(t,r);function o(e){n.context.setOpen(!1,Jt(nn,e.nativeEvent,e.currentTarget))}let s=i({onClick:o});return(0,S.jsx)(`span`,{ref:a,...s,"aria-label":`Dismiss`,tabIndex:void 0,style:Kn})}),WJ=v.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,id:a,style:o,...s}=e,{state:c,disabled:l,setTouched:u,validationMode:d,validation:f}=my(),{labelId:p}=vy(),m=BJ(),h=!!HJ(!0),g=_J(),_=bJ(),y=Cc(),b=g.useState(`required`),x=g.useState(`disabled`),C=g.useState(`readOnly`),w=g.useState(`name`),T=g.useState(`form`),E=g.useState(`selectionMode`),D=g.useState(`autoHighlight`),O=g.useState(`inputProps`),k=g.useState(`triggerProps`),A=g.useState(`open`),j=g.useState(`mounted`),M=g.useState(`selectedValue`),N=g.useState(`id`),P=g.useState(`inline`),F=g.useState(`modal`),I=!!D,L=PJ(g),R=l||x||i,z=FJ(),B=Ty(R,g.context.inputRef),V=h||P,H=!V||F,U=lc(a??(V?void 0:N)),ee=h?ly:c,[te,ne]=v.useState(null),W=v.useRef(!1),re=v.useRef(null);q(()=>{A||(re.current=null)},[A]);let ie=E===`none`&&!h,ae=Y(e=>{let t=h||g.state.inline;t&&!g.state.hasInputValue&&g.context.setInputValue(``,Jt(Xt)),g.update({inputElement:e,inputInsidePopup:t,inputOwnsFormValue:ie})}),G=h?s:f.getValidationProps(R,s);function K(e){g.context.setIndices({activeIndex:null,selectedIndex:null,type:RB(e),event:e})}let oe={...ee,open:A,disabled:R,readOnly:C,popupSide:L,listEmpty:z};function J(e){if(!m)return;let t,n=m.chipsRef.current.length,[r]=IJ(y);return e.key===r&&(e.currentTarget.selectionStart??0)===0&&M.length>0&&(e.preventDefault(),t=n>0?n-1:void 0),t}let se=Hi(`input`,e,{state:oe,ref:[t,g.context.inputRef,ae],props:[O,k,{value:te??_,"aria-readonly":C||void 0,"aria-required":b||void 0,"aria-labelledby":p,disabled:R,readOnly:C,required:E===`none`?b:void 0,form:T,...ie&&w&&{name:w},id:U,onFocus(){if(B(!0),!P)return;let e=re.current;re.current=null,e!=null&&Object.hasOwn(g.context.valuesRef.current,e)&&g.context.setIndices({activeIndex:e})},onBlur(){u(!0),B(!1);let e=g.state.activeIndex;if(P&&e!==null&&D!==`always`&&(re.current=e,g.context.setIndices({activeIndex:null})),d===`onBlur`){let e=E===`none`?_:M;f.commit(e)}},onCompositionStart(e){xe||(W.current=!0,ne(e.currentTarget.value))},onCompositionEnd(e){W.current=!1;let t=e.currentTarget.value;ne(null),g.context.setInputValue(t,Jt(an,e.nativeEvent))},onChange(e){let t=e.nativeEvent,n=t.inputType,r=!n||n===`insertReplacementText`,i=W.current||!r;function a(e){!C&&!R&&e&&i&&(g.context.setOpen(!0,Jt(an,t)),I||K(t))}if(W.current){let n=e.currentTarget.value;ne(n),n===``&&!g.state.openOnInputClick&&!g.state.inputInsidePopup&&g.context.setOpen(!1,Jt(on,t));let r=n.trim(),i=I&&r!==``;a(r),A&&g.state.activeIndex!==null&&!i&&K(t);return}let o=Jt(an,t);if(g.context.setInputValue(e.currentTarget.value,o),o.isCanceled)return;let s=e.currentTarget.value===``,c=Jt(on,t);s&&!g.state.inputInsidePopup&&(E===`single`&&g.context.setSelectedValue(null,c),g.state.openOnInputClick||g.context.setOpen(!1,c)),a(e.currentTarget.value.trim()),A&&g.state.activeIndex!==null&&!I&&K(t)},onKeyDown(e){if(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)return;if(R||C){C&&e.key===`Enter`&&A&&g.state.activeIndex!==null&&Oe(e);return}let t=e.currentTarget,n=t.scrollWidth-t.clientWidth,r=y===`rtl`;if(e.key===`Home`){Oe(e);let n=Te&&r?t.value.length:0;t.setSelectionRange(n,n),t.scrollLeft=0;return}if(e.key===`End`){Oe(e);let i=Te&&r?0:t.value.length;t.setSelectionRange(i,i),t.scrollLeft=r?-n:n;return}if(!j&&e.key===`Escape`){let t=E===`multiple`&&Array.isArray(M)?M.length===0:M===null,n=Jt(ln,e.nativeEvent),r=E===`multiple`?[]:null;g.context.setInputValue(``,n),g.context.setSelectedValue(r,n),!t&&!g.state.inline&&!n.isPropagationAllowed&&e.stopPropagation();return}if(m&&e.key===`Backspace`&&t.value===``&&Array.isArray(M)&&M.length>0){let t=m.chipsRef.current.length,n=t>0?t-1:M.length-1,r=M.filter((e,t)=>t!==n);K(e.nativeEvent),g.context.setSelectedValue(r,Jt(Xt,e.nativeEvent));return}let i=J(e);if(i!==void 0&&m?.chipsRef.current[i]?.focus(),e.which!==229&&e.key===`Enter`&&A){let t=g.state.activeIndex,n=e.nativeEvent;if(t===null){if(P)return;g.context.setOpen(!1,Jt(Xt,n));return}Oe(e),LJ(g,t,n)}}},G],stateAttributesMapping:NJ}),ce=h?(0,S.jsx)(py.Provider,{value:fy,children:se}):se;return(0,S.jsxs)(v.Fragment,{children:[A&&H&&(0,S.jsx)(UJ,{ref:g.context.startDismissRef}),ce]})}),GJ={...yt,...At},KJ=v.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,keepMounted:o=!1,style:s,...c}=e,{disabled:l}=my(),u=_J(),d=u.useState(`selectionMode`),f=u.useState(`disabled`),p=u.useState(`readOnly`),m=u.useState(`open`),h=u.useState(`selectedValue`),g=u.useState(`hasSelectionChips`),_=bJ(),v=!1;v=d===`none`?_!==``:d===`single`?h!=null:g;let y=l||f||i,{buttonRef:b,getButtonProps:x}=ey({native:a,disabled:y}),{mounted:S,transitionStatus:C,setMounted:w}=Na(v),T={disabled:y,visible:v,open:m,transitionStatus:C};Ra({open:v,ref:u.context.clearRef,onComplete(){v||w(!1)}});let E=Hi(`button`,e,{state:T,ref:[t,b,u.context.clearRef],props:[{tabIndex:-1,children:`x`,onMouseDown(e){e.preventDefault()},onClick(e){if(y||p)return;let t=RB(e);u.context.setInputValue(``,Jt(rn,e.nativeEvent)),d===`none`?u.context.setIndices({activeIndex:null,type:t,event:e.nativeEvent}):(u.context.setSelectedValue(Array.isArray(h)?[]:null,Jt(rn,e.nativeEvent)),u.context.setIndices({activeIndex:null,selectedIndex:null,type:t,event:e.nativeEvent})),u.context.inputRef.current?.focus()}},c,x],stateAttributesMapping:GJ});return o||S?E:null}),qJ=v.createContext(null);function JJ(){return v.useContext(qJ)}function YJ(e){let{children:t,items:n}=e,r=v.useMemo(()=>({items:n}),[n]);return(0,S.jsx)(qJ.Provider,{value:r,children:t})}function XJ(e){let{children:t}=e,{filteredItems:n}=yJ(),r=JJ(),i=r?r.items:n;return(0,S.jsx)(v.Fragment,{children:i.map(t)})}var ZJ=v.forwardRef(function(e,t){var n;let{render:r,className:i,style:a,children:o,...s}=e,c=_J(),l=vJ(),u=!!HJ(!0),{filteredItems:d,hasItems:f}=yJ(),p=c.useState(`selectionMode`),m=c.useState(`grid`),h=c.useState(`readOnly`),g=c.useState(`listProps`),_=c.useState(`virtualized`),y=c.useState(`forceMounted`),b=p===`multiple`,x=d.length===0,C=Y(e=>{c.set(`positionerElement`,e)}),w=Y(e=>{c.set(`listElement`,e)}),T=v.useMemo(()=>typeof o==`function`?n||=(0,S.jsx)(XJ,{children:o}):o,[o]),E={empty:x},D=l.useState(`floatingId`),O=Hi(`div`,e,{state:E,ref:[t,w,u?null:C],props:[g,{children:T,tabIndex:-1,id:D,role:m?`grid`:`listbox`,"aria-multiselectable":b?`true`:void 0,"aria-readonly":!m&&h?!0:void 0,onKeyDown(e){if(!(c.state.disabled||c.state.readOnly)&&e.key===`Enter`){let t=c.state.activeIndex;if(t==null)return;Oe(e),LJ(c,t,e.nativeEvent)}}},s]});if(_)return O;let k=f&&!y?void 0:c.context.labelsRef;return(0,S.jsx)(HS,{elementsRef:c.context.listRef,labelsRef:k,children:O})}),QJ=v.createContext(void 0);function $J(){let e=v.useContext(QJ);if(e===void 0)throw Error(J(20));return e}var eY=v.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=_J(),a=i.useState(`mounted`),o=i.useState(`forceMounted`);return a||n||o?(0,S.jsx)(QJ.Provider,{value:n,children:(0,S.jsx)(ia,{ref:t,...r})}):null}),tY=v.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a,side:o,align:s,sideOffset:c,alignOffset:l,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f,sticky:p,disableAnchorTracking:m=!1,collisionAvoidance:h=Zi,style:g,..._}=e,v=_J(),y=vJ(),b=$J(),x=v.useState(`modal`),C=v.useState(`open`),w=v.useState(`mounted`),T=v.useState(`openMethod`),E=v.useState(`positionerElement`),D=v.useState(`triggerElement`),O=v.useState(`inputElement`),k=v.useState(`inputGroupElement`),A=v.useState(`inputInsidePopup`),j=v.useState(`transitionStatus`),M=FJ(),N=Lc({anchor:i??(A?D:k??O),floatingRootContext:y,positionMethod:a,mounted:w,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m,keepMounted:b,collisionAvoidance:h,lazyFlip:!0});fC(C&&x,T===`touch`,E,D);let P={open:C,side:N.side,align:N.align,anchorHidden:N.anchorHidden,empty:M};q(()=>{v.set(`popupSide`,N.side)},[v,N.side]);let F=Y(e=>{v.set(`positionerElement`,e)}),I=Vc(e,P,{styles:N.positionerStyles,transitionStatus:j,props:_,refs:[t,F],hidden:!w,inert:!C});return(0,S.jsxs)(VJ.Provider,{value:N,children:[w&&x&&(0,S.jsx)(ZS,{inert:Kc(!C),cutout:k??O??D}),I]})}),nY={...Mt,...yt},rY=v.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...s}=e,c=_J(),l=HJ(),u=vJ(),d=c.useState(`mounted`),f=c.useState(`open`),p=c.useState(`openMethod`),m=c.useState(`popupProps`),h=c.useState(`transitionStatus`),g=c.useState(`inputInsidePopup`),_=c.useState(`inputElement`),y=c.useState(`modal`),b=c.useState(`id`),x=FJ(),C=s.id??(g?CJ(b):void 0);q(()=>(c.set(`popupId`,c.context.popupRef.current?.id||C),()=>{c.set(`popupId`,void 0)}),[c,C]),Ra({open:f,ref:c.context.popupRef,onComplete(){f&&c.context.onOpenChangeComplete(!0)}});let w=Hi(`div`,e,{state:{open:f,side:l.side,align:l.align,anchorHidden:l.anchorHidden,transitionStatus:h,empty:x},ref:[t,c.context.popupRef],props:[m,{id:C,role:g?`dialog`:`presentation`,onFocus(e){let t=ct(e.nativeEvent);p!==`touch`&&(ot(c.state.listElement,t)||t===e.currentTarget)&&c.context.inputRef.current?.focus()}},Bc(h),s],stateAttributesMapping:nY}),T=a===void 0?g?e=>e===`touch`?c.context.popupRef.current:_:!1:a,E;E=o??(g?void 0:!1);let D=!g||y;return(0,S.jsx)(Ca,{context:u,disabled:!d,modal:D,openInteractionType:p,initialFocus:T,returnFocus:E,getInsideElements:()=>[c.context.startDismissRef.current,c.context.endDismissRef.current],children:(0,S.jsxs)(v.Fragment,{children:[w,D&&(0,S.jsx)(UJ,{ref:c.context.endDismissRef})]})})}),iY=v.createContext(void 0);function aY(){let e=v.useContext(iY);if(e===void 0)throw Error(J(18));return e}var oY=v.forwardRef(function(e,t){let{render:n,className:r,style:i,items:a,...o}=e,s=_J().useState(`grid`),[c,l]=v.useState(),u=v.useMemo(()=>({labelId:c,setLabelId:l,items:a}),[c,l,a]),d=Hi(`div`,e,{ref:t,props:[{role:s?`rowgroup`:`group`,"aria-labelledby":c},o]}),f=(0,S.jsx)(iY.Provider,{value:u,children:d});return a?(0,S.jsx)(YJ,{items:a,children:f}):f}),sY=v.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{setLabelId:s}=aY(),c=lc(a);return q(()=>(s(c),()=>{s(e=>e===c?void 0:e)}),[c,s]),Hi(`div`,e,{ref:t,props:[{id:c,"aria-hidden":!0},o]})}),cY=v.createContext(void 0);function lY(){let e=v.useContext(cY);if(!e)throw Error(J(19));return e}var uY=v.createContext(!1);function dY(){return v.useContext(uY)}function fY(e){let{componentProps:t,forwardedRef:n,virtualized:r,indexFromFilter:i}=e,{render:a,className:o,style:s,value:c=null,index:l,disabled:u=!1,nativeButton:d=!1,...f}=t,p=v.useRef(null),m=WC({guess:!0,index:l,textRef:p}),h=_J(),g=dY(),_=xJ(),{props:y,id:b,selectionMode:x,disabled:C,readOnly:w,isItemEqualToValue:T}=h.useState(`itemRoot`),E=C||u,D=x!==`none`,O=l??i??m.index,k=O!==-1,A=h.useState(`isActive`,O),j=h.useState(`isSelected`,c),M=v.useRef(null),N=b!=null&&k?`${b}-${O}`:void 0,P=j&&D;q(()=>{if(!k||!r&&l==null)return;let e=h.context.listRef.current;return e[O]=M.current,()=>{delete e[O]}},[k,r,O,l,h]),q(()=>{if(!k||_)return;let e=h.context.valuesRef.current;return e[O]=c,()=>{delete e[O]}},[k,_,O,c,h]),q(()=>{if(!k||_)return;let e=h.state.selectedValue,t=h.state.selectedIndex;h.state.selectionMode===`multiple`&&Array.isArray(e)?t=lS(O,c,h.context.valuesRef.current,e,T,t):rS(c,e,T)&&(t=O),h.set(`selectedIndex`,t)},[k,_,h,O,c,T]);let{getButtonProps:F,buttonRef:I}=ey({disabled:E,focusableWhenDisabled:!0,native:d,composite:!0}),L={disabled:E,selected:P,highlighted:A};function z(e){function t(){h.context.handleSelection(e,c)}h.state.submitOnItemClick?(R.flushSync(t),h.context.requestSubmit()):t()}let B={id:N,role:g?`gridcell`:`option`,"aria-selected":D?P:void 0,tabIndex:void 0,onPointerDownCapture(e){e.isPrimary&&(h.context.pointerDownItemRef.current=e.currentTarget),e.preventDefault()},onMouseDown(e){e.preventDefault()},onClick(e){E||w||z(e.nativeEvent)},onMouseUp(e){let t=h.context.pointerDownItemRef.current===e.currentTarget;h.context.pointerDownItemRef.current=null,!(E||w||e.button!==0||t||!A)&&z(e.nativeEvent)}},V=Hi(`div`,t,{ref:[I,n,m.ref,M],state:L,props:[y,B,f,F]}),H=v.useMemo(()=>({selected:P,textRef:p}),[P,p]);return(0,S.jsx)(cY.Provider,{value:H,children:V})}function pY(e){let{componentProps:t,forwardedRef:n}=e,r=_J().useState(`isItemEqualToValue`),{flatFilteredValues:i}=yJ(),a=oS(i,t.value??null,r);return(0,S.jsx)(fY,{componentProps:t,forwardedRef:n,virtualized:!0,indexFromFilter:a})}var mY=v.memo(v.forwardRef(function(e,t){let n=_J().useState(`virtualized`);return n&&e.index==null?(0,S.jsx)(pY,{componentProps:e,forwardedRef:t}):(0,S.jsx)(fY,{componentProps:e,forwardedRef:t,virtualized:n,indexFromFilter:void 0})})),hY=v.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,{filteredItems:s}=yJ(),c=_J(),l=oV(),u=s.length===0?a:null;return Hi(`div`,e,{ref:[t,c.context.emptyRef,l],props:[{children:u,role:`status`,"aria-live":`polite`,"aria-atomic":!0},o]})});function gY(e){let{multiple:t=!1,defaultValue:n,value:r,onValueChange:i,autoComplete:a,...o}=e;return(0,S.jsx)(AJ,{...o,selectionMode:t?`multiple`:`single`,selectedValue:r,defaultSelectedValue:n,onSelectedValueChange:i,formAutoComplete:a})}var _Y=v.forwardRef(function(e,t){let{selected:n}=lY();return e.keepMounted||n?(0,S.jsx)(JC,{...e,selected:n,ref:t}):null}),vY=v.createContext(void 0);function yY(e){let t=v.useContext(vY);if(t===void 0&&!e)throw Error(J(47));return t}var bY={...Co,disabled:e=>e.disabled,instantType:e=>e.instantType===`trigger-change`&&!Co.open(e)?void 0:e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,isPressOpenedByTrigger:(e,t)=>e.openChangeReason===`trigger-press`&&Co.isOpenedByTrigger(e,t),isTouchPressOpen:(e,t)=>t&&e.openMethod===`touch`&&e.openChangeReason===`trigger-press`,hasTriggerFocusGuards:(e,t)=>Co.isOpenedByTrigger(e,t)&&!e.focusManagerModal,modal:e=>e.modal,titleElementId:e=>e.titleElementId,descriptionElementId:e=>e.descriptionElementId,openOnHover:e=>e.openOnHover,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},xY=class extends mo{constructor(e,t,n){let r=new eo;super(SY(e,r,t,n),CY(r),bY)}setOpen=(e,t)=>{let n=t.reason===Qt,r=t.reason===`trigger-press`&&t.event.detail===0,i=!e&&(t.reason===`escape-key`||t.reason==null),a=qa(t),o=this.select(`activeTriggerId`);if(!e&&t.reason===`close-press`&&t.trigger==null&&o!=null&&(t.trigger=this.context.triggerElements.getById(o)??this.select(`activeTriggerElement`)??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let s=()=>{let n=Ka(this.state,e,t.trigger,a());n.openChangeReason=t.reason,this.update(n)};n?(this.context.stickIfOpen=!0,this.context.stickIfOpenTimeout.start(500,()=>{this.context.stickIfOpen=!1}),R.flushSync(s)):s();let c;r?c=`click`:i?c=`dismiss`:t.reason===`focus-out`&&(c=`focus`),this.set(`instantType`,c)}};function SY(e,t,n,r=!1){let i={..._o(t,n,r),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...e};return i.open&&e?.mounted===void 0&&(i.mounted=!0),i}function CY(e){return{popupRef:v.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:v.createRef(),beforeTriggerFocusGuardRef:v.createRef(),beforeContentFocusGuardRef:v.createRef(),stickIfOpenTimeout:new de,stickIfOpen:!0,triggerElements:e}}var wY=W(function({props:e}){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,modal:o=!1,handle:s,triggerId:c,defaultTriggerId:l=null}=e,u=EY(s,{modal:o,open:r,openProp:n,activeTriggerId:l,triggerIdProp:c});u.useControlledProp(`openProp`,n),u.useControlledProp(`triggerIdProp`,c);let d=u.useState(`open`),f=u.useState(`mounted`),p=u.useState(`payload`);u.useContextCallback(`onOpenChange`,i),u.useContextCallback(`onOpenChangeComplete`,a),$a(u,d),Xa(u);let{forceUnmount:m}=Za(d,u,()=>{u.context.stickIfOpen=!0,u.set(`openChangeReason`,null)});u.useSyncedValues({modal:o}),v.useEffect(()=>{d||u.context.stickIfOpenTimeout.clear()},[u,d]),v.useImperativeHandle(e.actionsRef,()=>({unmount:m,close:()=>u.setOpen(!1,Jt(vn))}),[m,u]);let h=d||f||s!=null;return(0,S.jsxs)(vY.Provider,{value:u,children:[s&&(0,S.jsx)(Ua,{handle:s,store:u}),h&&(0,S.jsx)(DY,{store:u,modal:o}),typeof t==`function`?t({payload:p}):t]})});function TY(e){return yY(!0)?(0,S.jsx)(wY,{props:e}):(0,S.jsx)(pa,{children:(0,S.jsx)(wY,{props:e})})}function EY(e,t){let n=Ha((e,n)=>new xY(t,e,n));return v.useEffect(()=>n.context.stickIfOpenTimeout.disposeEffect(),[n]),n}function DY({store:e,modal:t}){let n=Aa(e.useState(`floatingRootContext`),{outsidePressEvent:{mouse:t===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}}),r=n.reference,i=n.floating;return Qa(e,{activeTriggerProps:r,inactiveTriggerProps:r,popupProps:i}),null}var OY=re(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,handle:s,payload:c,openOnHover:l=!1,delay:u=300,closeDelay:d=0,id:f,...p}=e,m=yY(!0),h=wo(s)??m;if(!h)throw Error(J(74));let g=lc(f),_=h.useState(`isTriggerActive`,g),y=h.useState(`floatingRootContext`),b=h.useState(`isOpenedByTrigger`,g),x=h.useState(`triggerPopupId`,g),C=v.useRef(null),{registerTrigger:w,isMountedByThisTrigger:T}=Ya(g,C,h,{payload:c,disabled:a,openOnHover:l,closeDelay:d}),E=h.useState(`isPressOpenedByTrigger`,g),D=h.useState(`isTouchPressOpen`,l),O=h.useState(`hasTriggerFocusGuards`,g),k=Fo(y,{enabled:!a&&l&&!D,mouseOnly:!0,move:!1,handleClose:Zo(),restMs:u,delay:{close:d},triggerElementRef:C,isActiveTrigger:_,isClosing:()=>h.select(`transitionStatus`)===`ending`}),A=wa(y,{stickIfOpen:Y(()=>h.context.stickIfOpen)}),j=SS(()=>h.select(`open`),e=>{h.set(`openMethod`,e)}),M=h.useState(`triggerProps`,T),{getButtonProps:N,buttonRef:P}=ey({disabled:a,native:o}),F={open(e){return E?jt.open(e):At.open(e)}},{handlePreFocusGuardFocus:I,handleFocusTargetFocus:L}=XB(h,C),R=Hi(`button`,e,{state:{disabled:a,open:b},ref:[P,t,w,C],props:[A.reference,k,M,j,{[Xi]:``,id:g,"aria-haspopup":`dialog`,"aria-expanded":b,"aria-controls":x},p,N],stateAttributesMapping:F}),z=(0,S.jsx)(v.Fragment,{children:R},g);return O?(0,S.jsxs)(v.Fragment,{children:[(0,S.jsx)(qn,{ref:h.context.beforeTriggerFocusGuardRef,onFocus:I}),z,(0,S.jsx)(qn,{ref:h.context.triggerFocusTargetRef,onFocus:L})]}):z}),kY=v.createContext(void 0);function AY(){let e=v.useContext(kY);if(e===void 0)throw Error(J(45));return e}var jY=v.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return yY().useState(`mounted`)||n?(0,S.jsx)(kY.Provider,{value:n,children:(0,S.jsx)(ia,{ref:t,...r})}):null}),MY=v.createContext(void 0);function NY(){let e=v.useContext(MY);if(!e)throw Error(J(46));return e}var PY=v.forwardRef(function(e,t){let{render:n,className:r,style:i,anchor:a,positionMethod:o,side:s,align:c,sideOffset:l,alignOffset:u,collisionBoundary:d=`clipping-ancestors`,collisionPadding:f,arrowPadding:p,sticky:m,disableAnchorTracking:h=!1,collisionAvoidance:g=Qi,..._}=e,v=yY(),y=AY(),b=da(),x=v.useState(`floatingRootContext`),C=v.useState(`mounted`),w=v.useState(`open`),T=v.useState(`openChangeReason`),E=v.useState(`activeTriggerElement`),D=v.useState(`modal`),O=v.useState(`openMethod`),k=v.useState(`positionerElement`),A=v.useState(`instantType`),j=v.useState(`transitionStatus`),M=Lc({anchor:a,floatingRootContext:x,positionMethod:o,mounted:C,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:p,collisionBoundary:d,collisionPadding:f,sticky:m,disableAnchorTracking:h,keepMounted:y,nodeId:b,collisionAvoidance:g,adaptiveOrigin:v.useState(`adaptiveOrigin`)});PB({store:v,domReference:x.useState(`domReferenceElement`),positionerElement:k,open:w});let N=D===!0&&T!==`trigger-hover`;fC(w&&N,O===`touch`,k,E);let P=v.useStateSetter(`positionerElement`),F=Vc(e,{open:w,side:M.side,align:M.align,anchorHidden:M.anchorHidden,instant:A},{styles:M.positionerStyles,transitionStatus:j,props:_,refs:[t,P],hidden:!C,inert:!w});return(0,S.jsxs)(MY.Provider,{value:M,children:[C&&N&&(0,S.jsx)(ZS,{inert:Kc(!w),cutout:E}),(0,S.jsx)(fa,{id:b,children:F})]})}),FY=v.createContext(void 0);function IY(){let[e,t]=v.useState(0),n=Y(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:v.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}function LY(){let e=v.useContext(FY);q(()=>e?.register(),[e])}var RY=v.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...s}=e,c=yY(),l=NY(),u=vC(!0)!=null,{context:d,hasClosePart:f}=IY(),p=c.useState(`open`),m=c.useState(`openMethod`),h=c.useState(`instantType`),g=c.useState(`transitionStatus`),_=c.useState(`popupProps`),v=c.useState(`titleElementId`),y=c.useState(`descriptionElementId`),b=c.useState(`modal`),x=c.useState(`mounted`),C=c.useState(`openChangeReason`),w=c.useState(`activeTriggerElement`),T=c.useState(`floatingRootContext`),E=T.useState(`floatingId`),D=c.useState(`disabled`),O=c.useState(`openOnHover`),k=c.useState(`closeDelay`);Ra({open:p,ref:c.context.popupRef,onComplete(){p&&c.context.onOpenChangeComplete?.(!0)}}),No(T,{enabled:O&&!D,closeDelay:k});let A=a===void 0?Va(c.context.popupRef):a,j=b!==!1&&f;c.useSyncedValue(`focusManagerModal`,j);let M=c.useStateSetter(`popupElement`),N=Hi(`div`,e,{state:{open:p,side:l.side,align:l.align,instant:h,transitionStatus:g},ref:[t,c.context.popupRef,M],props:[_,{id:E,role:`dialog`,...Ba,"aria-labelledby":v,"aria-describedby":y,onKeyDown(e){u&&CC.has(e.key)&&e.stopPropagation()}},Bc(g),s],stateAttributesMapping:Nt});return(0,S.jsx)(Ca,{context:T,openInteractionType:m,modal:j,disabled:!x||C===`trigger-hover`,initialFocus:A,returnFocus:o,restoreFocus:`popup`,getInsideElements:()=>[c.context.beforeTriggerFocusGuardRef.current],previousFocusableElement:Be(w)?w:void 0,nextFocusableElement:c.context.triggerFocusTargetRef,beforeContentFocusGuardRef:c.context.beforeContentFocusGuardRef,children:(0,S.jsx)(FY.Provider,{value:d,children:N})})}),zY=v.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=yY(),s=lc(a.id);return o.useSyncedValueWithCleanup(`titleElementId`,s),Hi(`h2`,e,{ref:t,props:[{id:s},a]})}),BY=v.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=yY(),s=lc(a.id);return o.useSyncedValueWithCleanup(`descriptionElementId`,s),Hi(`p`,e,{ref:t,props:[{id:s},a]})}),VY=v.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,...s}=e,{buttonRef:c,getButtonProps:l}=ey({disabled:a,focusableWhenDisabled:!1,native:o}),u=yY();return LY(),Hi(`button`,e,{ref:[t,c],props:[{onClick(e){u.setOpen(!1,Jt(nn,e.nativeEvent))}},s,l]})}),HY=gY;function UY({className:e,children:t,...n}){return(0,S.jsxs)(RJ,{"data-slot":`combobox-trigger`,className:X(`[&_svg:not([class*='size-'])]:size-4`,e),...n,children:[t,(0,S.jsx)(xu,{className:`pointer-events-none size-4 text-muted-foreground`})]})}function WY({className:e,...t}){return(0,S.jsx)(KJ,{"data-slot":`combobox-clear`,render:(0,S.jsx)(Iy,{variant:`ghost`,size:`icon-xs`}),className:X(e),...t,children:(0,S.jsx)(xd,{className:`pointer-events-none`})})}function GY({className:e,children:t,disabled:n=!1,showTrigger:r=!0,showClear:i=!1,...a}){return(0,S.jsxs)(My,{className:X(`w-auto`,e),children:[(0,S.jsx)(WJ,{render:(0,S.jsx)(Ly,{disabled:n}),...a}),(0,S.jsxs)(Py,{align:`inline-end`,children:[r&&(0,S.jsx)(Iy,{size:`icon-xs`,variant:`ghost`,render:(0,S.jsx)(UY,{}),"data-slot":`input-group-button`,className:`group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent`,disabled:n}),i&&(0,S.jsx)(WY,{disabled:n})]}),t]})}function KY({className:e,side:t=`bottom`,sideOffset:n=6,align:r=`start`,alignOffset:i=0,anchor:a,...o}){return(0,S.jsx)(eY,{children:(0,S.jsx)(tY,{side:t,sideOffset:n,align:r,alignOffset:i,anchor:a,className:`isolate z-50`,children:(0,S.jsx)(rY,{"data-slot":`combobox-content`,"data-chips":!!a,className:X(`group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...o})})})}function qY({className:e,...t}){return(0,S.jsx)(ZJ,{"data-slot":`combobox-list`,className:X(`no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0`,e),...t})}function JY({className:e,children:t,...n}){return(0,S.jsxs)(mY,{"data-slot":`combobox-item`,className:X(`relative flex w-full cursor-default items-center gap-2 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...n,children:[t,(0,S.jsx)(_Y,{render:(0,S.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`}),children:(0,S.jsx)(yu,{className:`pointer-events-none`})})]})}function YY({className:e,...t}){return(0,S.jsx)(oY,{"data-slot":`combobox-group`,className:X(e),...t})}function XY({className:e,...t}){return(0,S.jsx)(sY,{"data-slot":`combobox-label`,className:X(`px-2 py-1.5 text-xs text-muted-foreground`,e),...t})}function ZY({...e}){return(0,S.jsx)(XJ,{"data-slot":`combobox-collection`,...e})}function QY({className:e,...t}){return(0,S.jsx)(hY,{"data-slot":`combobox-empty`,className:X(`hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex`,e),...t})}var $Y=`default`,eX=[{value:`1`,label:`Stop that agent`},{value:`2`,label:`Wait for 1 reset, then stop`},{value:`3`,label:`Wait for 2 resets, then stop`},{value:`4`,label:`Wait for 3 resets, then stop`},{value:`5`,label:`Wait for 4 resets, then stop`},{value:`none`,label:`Wait and always continue`}];function tX({value:e,onChange:t}){let n=(n,r)=>{let i={...e.agents};r?i[n]=r:delete i[n],t({...e,agents:i})};return(0,S.jsxs)(Ux,{children:[(0,S.jsxs)(Vx,{children:[(0,S.jsx)(Hx,{variant:`label`,children:`Agents`}),Xz.map(t=>{let r=e.agents[t];return(0,S.jsxs)(Gx,{orientation:`horizontal`,children:[(0,S.jsx)(uJ,{id:`agent-${t}`,checked:r!==void 0,onCheckedChange:e=>n(t,e?{}:void 0)}),(0,S.jsx)(qx,{htmlFor:`agent-${t}`,className:`w-14 flex-none!`,children:t}),(0,S.jsx)(iX,{agent:t,value:r,onChange:e=>n(t,e)})]},t)})]}),(0,S.jsxs)(Gx,{children:[(0,S.jsxs)(Kx,{children:[(0,S.jsx)(qx,{children:`When an agent hits its usage limit`}),(0,S.jsx)(Jx,{children:`Waiting pauses that agent until its plan resets, then it goes on. Once every agent has stopped, the factory turns off.`})]}),(0,S.jsxs)(tw,{items:eX,value:e.limit===null?`none`:String(e.limit),onValueChange:n=>t({...e,limit:n===`none`?null:Number(n)}),children:[(0,S.jsx)(rw,{className:`w-56`,children:(0,S.jsx)(nw,{})}),(0,S.jsx)(iw,{children:eX.map(e=>(0,S.jsx)(aw,{value:e.value,children:e.label},e.value))})]})]}),(0,S.jsxs)(Gx,{orientation:`horizontal`,children:[(0,S.jsxs)(Kx,{children:[(0,S.jsx)(qx,{htmlFor:`until`,children:`Start nothing new after`}),(0,S.jsx)(Jx,{children:`Leave empty to keep going.`})]}),(0,S.jsx)(Ay,{id:`until`,type:`time`,className:`w-28`,value:e.until??``,onChange:n=>t({...e,until:n.target.value||void 0})})]})]})}var nX;function rX(){let[e,t]=(0,v.useState)({});return(0,v.useEffect)(()=>{nX??=Cd.models(),nX.then(t,()=>nX=void 0)},[]),e}function iX({agent:e,value:t,onChange:n}){let r=rX()[e]??[],i=t=>r.find(e=>e.value===t)?.efforts??Zz[e],a=[{value:$Y,label:`Default effort`}].concat(i(t?.model).map(e=>({value:e,label:e}))),o=e=>e===$Y?void 0:e??void 0;return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(aX,{label:`${e} model`,offered:r,disabled:!t,value:t?.model??$Y,onChange:e=>{let r=o(e),a=t?.effort&&i(r).includes(t.effort)?t.effort:void 0;n({...t,model:r,effort:a})}}),(0,S.jsx)(oX,{label:`${e} effort`,items:a,disabled:!t,value:t?.effort??$Y,onChange:e=>n({...t,effort:o(e)})})]})}function aX({label:e,offered:t,disabled:n,value:r,onChange:i}){let a=[{value:$Y,label:`Default model`,efforts:[],scoped:!0}];r!==$Y&&!t.some(e=>e.value===r)&&a.push({value:r,label:r,efforts:[],scoped:!0});let o=[{value:``,items:a},{value:`Scoped`,items:t.filter(e=>e.scoped)},{value:`All models`,items:t.filter(e=>!e.scoped)}].filter(e=>e.items.length>0),s=o.flatMap(e=>e.items).find(e=>e.value===r);return(0,S.jsxs)(HY,{items:o,disabled:n,value:s,onValueChange:e=>e&&i(e.value),isItemEqualToValue:(e,t)=>e.value===t.value,autoHighlight:!0,filter:(e,t)=>t.toLowerCase().split(/\s+/).every(t=>`${e.label} ${e.value}`.toLowerCase().includes(t)),children:[(0,S.jsx)(GY,{"aria-label":e,className:`w-full min-w-0 flex-1`,disabled:n,onFocus:e=>e.target.select()}),(0,S.jsxs)(KY,{className:`min-w-72`,children:[(0,S.jsx)(QY,{children:`No model matches`}),(0,S.jsx)(qY,{children:e=>(0,S.jsxs)(YY,{items:e.items,children:[e.value&&(0,S.jsx)(XY,{children:e.value}),(0,S.jsx)(ZY,{children:e=>(0,S.jsx)(JY,{value:e,children:(0,S.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,S.jsx)(`span`,{className:`truncate`,children:e.label}),e.value!==$Y&&e.value!==e.label&&(0,S.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:e.value})]})},e.value)})]},e.value)})]})]})}function oX({label:e,className:t,items:n,disabled:r,value:i,onChange:a}){return(0,S.jsxs)(tw,{items:n,disabled:r,value:i,onValueChange:a,children:[(0,S.jsx)(rw,{"aria-label":e,className:t,children:(0,S.jsx)(nw,{})}),(0,S.jsx)(iw,{children:n.map(e=>(0,S.jsx)(aw,{value:e.value,children:e.label},e.value))})]})}function sX({snapshot:e,act:t}){let{settings:n,on:r}=e,[i,a]=(0,v.useState)();return(0,S.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,S.jsxs)(Xl,{children:[(0,S.jsxs)(Gl,{render:(0,S.jsx)(Gx,{orientation:`horizontal`}),children:[(0,S.jsx)(uJ,{id:`auto`,checked:n.auto.on,onCheckedChange:e=>t(()=>Cd.saveSettings({...n,auto:{...n.auto,on:e}}))}),(0,S.jsx)(qx,{htmlFor:`auto`,children:`Auto`})]}),(0,S.jsx)(Kl,{children:`Keep the queue topped up from candidates while the factory is on`})]}),(0,S.jsxs)(Xl,{disabled:r,children:[(0,S.jsx)(Gl,{render:(0,S.jsx)(ay,{variant:r?`outline`:`default`,onClick:e=>{let i={agents:n.agents,limit:n.limit,until:n.until};r?t(Cd.turnOff):e.shiftKey?t(()=>Cd.turnOn(i)):a(i)}}),children:r?`Turn off`:`Turn on`}),(0,S.jsx)(Kl,{children:`Shift-click to turn on with your defaults`})]}),(0,S.jsx)(iq,{open:i!==void 0,onOpenChange:e=>!e&&a(void 0),children:(0,S.jsxs)(cq,{children:[(0,S.jsxs)(lq,{children:[(0,S.jsx)(dq,{children:`Turn the factory on`}),(0,S.jsx)(fq,{children:`For this run only; the defaults are under Settings. Your picks go first, then what auto mode queues.`})]}),i&&(0,S.jsx)(tX,{value:i,onChange:a}),(0,S.jsx)(uq,{children:(0,S.jsx)(ay,{disabled:!i||Object.keys(i.agents).length===0,onClick:()=>t(async()=>{await Cd.turnOn(i),a(void 0)}),children:`Turn on`})})]})})]})}var cX={y:14.2,width:3,height:3.4,rx:.6};function lX({working:e}){return(0,S.jsxs)(`svg`,{viewBox:`0 0 48 48`,width:32,height:32,"aria-hidden":!0,className:e?`logo-working`:void 0,children:[(0,S.jsx)(`rect`,{width:`48`,height:`48`,rx:`10.5`,className:`logo-tile`}),(0,S.jsxs)(`g`,{transform:`translate(6 6) scale(1.5)`,children:[(0,S.jsx)(`g`,{fill:`none`,className:`logo-ink`,strokeWidth:`2.25`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,S.jsx)(`path`,{d:`M3 19a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a.5.5 0 0 0-.769-.422l-4.462 2.844A.5.5 0 0 1 15 10.5v-2a.5.5 0 0 0-.769-.422L9.77 10.922A.5.5 0 0 1 9 10.5V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2z`})}),(0,S.jsx)(`g`,{className:`logo-ink-fill`,children:[6.5,10.5,14.5].map(e=>(0,S.jsx)(`rect`,{className:`logo-window`,x:e,...cX},e))})]})]})}function uX({dialog:e,onAnswer:t}){let[n,r]=(0,v.useState)(e.method===`editor`?e.prefill??``:``),i=e.method===`input`||e.method===`editor`;return(0,S.jsx)(iq,{open:!0,onOpenChange:e=>!e&&t({cancelled:!0}),children:(0,S.jsxs)(cq,{children:[(0,S.jsxs)(lq,{children:[(0,S.jsx)(dq,{children:e.title}),e.method===`confirm`&&e.message&&(0,S.jsx)(fq,{children:e.message})]}),e.method===`input`&&(0,S.jsx)(Ay,{autoFocus:!0,value:n,placeholder:e.placeholder,onChange:e=>r(e.target.value),onKeyDown:e=>e.key===`Enter`&&t({value:n})}),e.method===`editor`&&(0,S.jsx)(jy,{autoFocus:!0,value:n,onChange:e=>r(e.target.value)}),(0,S.jsxs)(uq,{children:[e.method===`select`&&e.options.map(e=>(0,S.jsx)(ay,{variant:`outline`,onClick:()=>t({value:e}),children:e},e)),e.method===`confirm`&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(ay,{variant:`outline`,onClick:()=>t({confirmed:!1}),children:`No`}),(0,S.jsx)(ay,{autoFocus:!0,onClick:()=>t({confirmed:!0}),children:`Yes`})]}),i&&(0,S.jsx)(ay,{onClick:()=>t({value:n}),children:`Send`})]})]})})}var dX=[`select`,`confirm`,`input`,`editor`],fX={messages:[],busy:!1,dialogs:[]};function pX(e,t){let{messages:n}=e;switch(t.type){case`agent_start`:return{...e,busy:!0,error:void 0};case`agent_settled`:return{...e,busy:!1,dialogs:[]};case`exit`:return{...e,busy:!1,dialogs:[],error:t.error};case`extension_ui_request`:return dX.includes(t.method)?{...e,dialogs:[...e.dialogs,t]}:e;case`extension_ui_answered`:return{...e,dialogs:e.dialogs.filter(e=>e.id!==t.id)};case`reset`:return fX;case`message_start`:return{...e,messages:[...n,t.message]};case`message_end`:return{...e,messages:[...n.slice(0,-1),t.message]};case`message_update`:{let r=n.at(-1);if(r?.role!==`assistant`)return e;let i=mX(r.content,t.assistantMessageEvent);return{...e,messages:[...n.slice(0,-1),{...r,content:i}]}}case`response`:if(!t.success)return{...e,error:t.error};if(t.command===`get_messages`)return{...e,messages:t.data.messages};if(t.command===`get_state`){let n=t.data;return n.model?{...e,model:{name:n.model.name,thinking:n.thinkingLevel}}:e}return e;default:return e}}function mX(e,t){if(!(`contentIndex`in t))return e;let n=[...e],r=t.contentIndex;if(t.type===`text_start`)n[r]={type:`text`,text:``};else if(t.type===`thinking_start`)n[r]={type:`thinking`};else if(t.type===`text_delta`&&`delta`in t){let e=n[r];n[r]={type:`text`,text:(e?.type===`text`?e.text:``)+t.delta}}else t.type===`toolcall_start`&&`toolName`in t?n[r]={type:`toolCall`,id:t.id,name:t.toolName,arguments:{}}:t.type===`toolcall_end`&&`toolCall`in t&&(n[r]=t.toolCall);return n}function hX({messages:e,busy:t}){let n=new Map;for(let t of e)t.role===`toolResult`&&n.set(t.toolCallId,t);return e.flatMap((e,r)=>{let i=String(r);if(e.role===`user`)return[{id:i,role:`user`,text:gX(e.content)}];if(e.role!==`assistant`)return[];let a=e.content.flatMap(e=>e.type===`toolCall`?[_X(e,n.get(e.id),t)]:[]),o=e.stopReason===`error`?[e.errorMessage,e.model&&`(${e.provider}/${e.model})`].filter(Boolean).join(` `):void 0;return[{id:i,role:`assistant`,text:[gX(e.content),o&&`**Error:** ${o}`].filter(Boolean).join(`
74
+
75
+ `),tools:a}]})}function gX(e){return typeof e==`string`?e:e.flatMap(e=>e?.type===`text`?[e.text]:[]).join(`
76
+
77
+ `)}function _X(e,t,n){let r=t?t.isError?`error`:`complete`:n?`running`:`error`,i=t&&gX(t.content);return{id:e.id,name:e.name,status:r,output:i,...iT(e,r,i)}}function vX({agent:e,prompt:t,onPromptChange:n}){let[r,i]=(0,v.useState)(fX),[a,o]=(0,v.useState)();(0,v.useEffect)(()=>{let e=new EventSource(`/api/chat`);return e.onopen=()=>i(fX),e.onmessage=e=>i(t=>pX(t,JSON.parse(e.data))),()=>e.close()},[]);async function s(e){try{return await e(),o(void 0),!0}catch(e){return o(e.message),!1}}return(0,S.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-3`,children:[(0,S.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,S.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[Tq(e),` looks through the candidates and queues jobs once you agree. It never turns the factory on.`]}),(0,S.jsxs)(ay,{variant:`outline`,size:`sm`,disabled:r.messages.length===0,onClick:()=>void s(Cd.resetChat),children:[(0,S.jsx)(ld,{}),`New chat`]})]}),r.dialogs[0]&&(0,S.jsx)(uX,{dialog:r.dialogs[0],onAnswer:e=>void s(()=>Cd.answerChat({id:r.dialogs[0].id,...e}))},r.dialogs[0].id),(0,S.jsx)(Rx,{messages:hX(r),prompt:t,onPromptChange:n,busy:r.busy,model:r.model,error:a??r.error,placeholder:`What should the factory work on next?`,emptyTitle:`Plan the queue`,emptyDescription:`For example: pick five auto jobs for tonight that won't conflict.`,onSend:e=>s(()=>Cd.chat(e)),onStop:()=>void s(Cd.abortChat)})]})}function yX(e){let t=e.agent?wq({...e,agent:e.agent}):``;return[e.item.play,e.item.level,t].filter(Boolean).join(` · `)}function bX({ref:e,children:t}){return(0,S.jsx)(PR.div,{ref:e,layout:`position`,exit:{opacity:0,x:64},transition:{duration:.2},children:t})}function xX({snapshot:e,act:t,onCandidates:n}){let{jobs:r,status:i,on:a,settings:o}=e,s=new Map(r.map(e=>[e.id,e])),c=r.filter(e=>e.state===`queued`&&e.source===`pick`),l=r.filter(e=>e.state===`queued`&&e.source===`auto`),u=e=>(0,S.jsx)(ay,{variant:`ghost`,size:`icon-sm`,"aria-label":`Remove`,onClick:()=>t(()=>Cd.remove(e.id)),children:(0,S.jsx)(xd,{})});return(0,S.jsxs)(`div`,{className:`flex flex-col gap-8 pt-2`,children:[a&&i&&(0,S.jsx)(Gq,{title:`Agents`,children:(0,S.jsx)(mV,{children:i.workers.map(e=>{let t=e.job?s.get(e.job):void 0,n=t?vq(t.item):e.until?`until ${pq(e.until)}`:e.reason??`waiting for work`,r=`limits hit ${e.limits} of ${i.limit??`∞`}`;return(0,S.jsx)(Wq,{title:(0,S.jsxs)(S.Fragment,{children:[e.agent,` `,(0,S.jsx)(Vv,{variant:xq[e.state],children:e.state})]}),meta:[n,Cq(e),`since ${pq(e.since)}`,r].filter(Boolean).join(` · `)},e.agent)})})}),(0,S.jsx)(Gq,{title:`Your picks (${c.length})`,children:c.length===0?(0,S.jsxs)(Gv,{children:[(0,S.jsxs)(Kv,{children:[(0,S.jsx)(qv,{children:`Nothing picked`}),(0,S.jsx)(Jv,{children:`Picks go before anything auto mode queues. Find work under Candidates.`})]}),(0,S.jsx)(Yv,{children:(0,S.jsx)(ay,{variant:`outline`,onClick:n,children:`Browse candidates`})})]}):(0,S.jsx)(mV,{children:(0,S.jsx)(FI,{mode:`popLayout`,initial:!1,children:c.map((e,n)=>(0,S.jsx)(bX,{children:(0,S.jsxs)(Wq,{title:vq(e.item),meta:yX(e),children:[(0,S.jsx)(ay,{variant:`ghost`,size:`icon-sm`,"aria-label":`Move up`,disabled:n===0,onClick:()=>t(()=>Cd.move(e.id,n-1)),children:(0,S.jsx)(hu,{})}),(0,S.jsx)(ay,{variant:`ghost`,size:`icon-sm`,"aria-label":`Move down`,disabled:n===c.length-1,onClick:()=>t(()=>Cd.move(e.id,n+1)),children:(0,S.jsx)(pu,{})}),u(e)]})},e.id))})})}),(0,S.jsx)(Gq,{title:`Auto (${l.length})`,children:l.length===0?(0,S.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:o.auto.on?`Auto mode tops this up to 5 jobs per agent while the factory is on.`:`Auto mode is off. Turn it on to keep the queue topped up from workwork.`}):(0,S.jsx)(mV,{children:(0,S.jsx)(FI,{mode:`popLayout`,initial:!1,children:l.map(e=>(0,S.jsx)(bX,{children:(0,S.jsx)(Wq,{title:vq(e.item),meta:yX(e),children:u(e)})},e.id))})})})]})}function SX({...e}){return(0,S.jsx)(TY,{"data-slot":`popover`,...e})}function CX({...e}){return(0,S.jsx)(OY,{"data-slot":`popover-trigger`,...e})}function wX({...e}){return(0,S.jsx)(VY,{"data-slot":`popover-close`,...e})}function TX({className:e,align:t=`center`,alignOffset:n=0,side:r=`bottom`,sideOffset:i=4,...a}){return(0,S.jsx)(jY,{children:(0,S.jsx)(PY,{align:t,alignOffset:n,side:r,sideOffset:i,className:`isolate z-50`,children:(0,S.jsx)(RY,{"data-slot":`popover-content`,className:X(`z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...a})})})}function EX({className:e,...t}){return(0,S.jsx)(`div`,{"data-slot":`popover-header`,className:X(`flex flex-col gap-0.5 text-sm`,e),...t})}function DX({className:e,...t}){return(0,S.jsx)(zY,{"data-slot":`popover-title`,className:X(`font-medium`,e),...t})}function OX({className:e,...t}){return(0,S.jsx)(BY,{"data-slot":`popover-description`,className:X(`text-muted-foreground`,e),...t})}var kX={log:{label:`Log`,title:`Agent log`,name:`agent.log`,noun:`log`},prompt:{label:`Prompt`,title:`Prompt`,name:`prompt.md`,noun:`prompt`}};function AX({log:e,agent:t,kind:n}){let r=kX[n],i=`/${e.replace(/agent\.log$/,r.name)}`;return(0,S.jsxs)(SX,{children:[(0,S.jsx)(CX,{render:(0,S.jsx)(ay,{variant:`link`,size:`xs`}),children:r.label}),(0,S.jsxs)(TX,{className:`w-xl max-w-[calc(100vw-2rem)]`,children:[(0,S.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-2`,children:[(0,S.jsxs)(EX,{children:[(0,S.jsx)(DX,{children:r.title}),(0,S.jsx)(OX,{children:t})]}),(0,S.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,S.jsxs)(`a`,{className:`text-xs underline underline-offset-4`,href:i,target:`_blank`,rel:`noreferrer`,children:[`Open raw `,r.noun]}),(0,S.jsx)(wX,{render:(0,S.jsx)(ay,{variant:`ghost`,size:`icon-sm`,"aria-label":`Close`}),children:(0,S.jsx)(xd,{})})]})]}),(0,S.jsx)(jX,{url:i,noun:r.noun})]})]})}function jX({url:e,noun:t}){let[n,r]=(0,v.useState)(),[i,a]=(0,v.useState)(!1);return(0,v.useEffect)(()=>{let t=new AbortController;return(async()=>{try{let n=await fetch(e,{signal:t.signal});if(!n.ok)throw Error(`Request failed: ${n.status}`);let i=await n.text();t.signal.aborted||r(MX(i))}catch{t.signal.aborted||a(!0)}})(),()=>t.abort()},[e]),i?(0,S.jsxs)(`p`,{role:`status`,className:`text-destructive`,children:[`Could not load the `,t,`. Reopen it to try again.`]}):n===void 0?(0,S.jsxs)(`p`,{role:`status`,className:`flex items-center gap-2 text-muted-foreground`,children:[(0,S.jsx)(wz,{}),` Loading `,t,`…`]}):n.trim()?(0,S.jsx)(`pre`,{tabIndex:0,className:`max-h-[min(28rem,50dvh)] overflow-auto rounded-md border bg-muted/50 p-3 font-mono text-xs leading-relaxed wrap-anywhere whitespace-pre-wrap focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none`,children:n}):(0,S.jsxs)(`p`,{className:`text-muted-foreground`,children:[`The `,t,` is empty.`]})}function MX(e){if(!e.trimStart().startsWith(`{`))return e;try{let t=JSON.parse(e);return t?.type===`result`&&typeof t.result==`string`&&t.result.trim()?t.result:JSON.stringify(t,null,2)}catch{return e}}var NX=e=>e!==void 0&&e.step!==`merged`&&e.step!==`skipped`,PX=e=>e.attempts.findLast(e=>e.url?.includes(`/pull/`))?.url,FX=e=>e.state===`OPEN`&&!e.draft&&e.conflicts===!1&&(e.checks===`passing`||e.checks===`none`),IX=e=>e.state===`OPEN`&&e.conflicts===!0&&!e.fork,LX={review:{label:`Needs review`,shows:(e,t)=>{let n=PX(e);return n!==void 0&&(t[n]?.state??`OPEN`)===`OPEN`}},failed:{label:`Failed`,shows:e=>e.state===`failed`},nothing:{label:`Nothing to do`,shows:e=>{let t=e.attempts.at(-1);return e.state===`done`&&!t.url&&!t.branch}},all:{label:`All`,shows:()=>!0}},RX={OPEN:`default`,MERGED:`secondary`,CLOSED:`outline`},zX={passing:{label:`checks passing`,Icon:Du,className:`text-success`},failing:{label:`checks failing`,Icon:ju,className:`text-destructive`},pending:{label:`checks running`,Icon:ku,className:void 0},none:{label:`no checks`,Icon:Nu,className:void 0}};function BX(e){return e.state===`done`||e.state===`failed`}function VX(e,t,n){let r=PX(e),i=r?t[r]:void 0;return i?.state===`OPEN`&&!i.draft&&i.checks!==`failing`&&!(i.conflicts&&i.fork)&&!NX(n[e.id])}var HX={queued:`on the merge train`,waiting:`merge train: waiting for checks`,rebasing:`merge train: rebasing`,merging:`merge train: merging`};function UX({snapshot:e,act:t,onAsk:n}){let[r,i]=(0,v.useState)(`all`),[a,o]=(0,v.useState)(()=>new Set),[s,c]=(0,v.useState)(!1),{prs:l,train:u}=e,d=e.jobs.filter(e=>e.state!==`removed`&&e.attempts.length>0).sort((e,t)=>t.attempts.at(-1).start.localeCompare(e.attempts.at(-1).start));if(d.length===0)return(0,S.jsx)(Gv,{children:(0,S.jsxs)(Kv,{children:[(0,S.jsx)(qv,{children:`Nothing done yet`}),(0,S.jsx)(Jv,{children:`What the agents did shows up here, with their PRs to review and merge.`})]})});let f=d.filter(e=>LX[r].shows(e,l)),p=f.filter(BX),m=p.filter(e=>a.has(e.id)),h=m.length===p.length,g=m.filter(e=>VX(e,l,u)),_=(e,t)=>{o(n=>{let r=new Set(n);return t?r.add(e):r.delete(e),r})};return(0,S.jsxs)(`div`,{className:`flex flex-col gap-4 pt-2`,children:[(0,S.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,S.jsx)(Hq,{variant:`outline`,className:`flex-wrap`,value:[r],disabled:s,onValueChange:([e])=>{e&&e!==r&&(i(e),o(new Set))},children:Object.entries(LX).map(([e,{label:t,shows:n}])=>(0,S.jsxs)(Uq,{value:e,children:[t,` (`,d.filter(e=>n(e,l)).length,`)`]},e))}),p.length>0&&(0,S.jsxs)(`div`,{role:`group`,"aria-label":`Batch actions`,className:`flex items-center gap-2 sm:ml-auto`,children:[(0,S.jsx)(ay,{variant:`ghost`,size:`sm`,"aria-label":h?`Clear selection`:void 0,disabled:s,onClick:()=>o(new Set(h?[]:p.map(e=>e.id))),children:h?`Clear`:`Select all`}),(0,S.jsx)(ay,{variant:`outline`,size:`sm`,disabled:s||m.length===0,onClick:async()=>{if(!m.some(e=>e.attempts.some(e=>e.branch))||window.confirm(`Dismiss selected results and delete their unpushed branches?`)){c(!0);try{await t(async()=>{let e=(await Promise.allSettled(m.map(e=>Cd.remove(e.id)))).find(e=>e.status===`rejected`);if(e)throw e.reason})}finally{c(!1)}}},children:s?`Dismissing…`:`Dismiss (${m.length})`}),f.some(e=>VX(e,l,u))&&(0,S.jsxs)(ay,{size:`sm`,title:`Merges one after another per repo, smallest first`,disabled:s||g.length===0,onClick:()=>{let e=g.length===1?`1 PR`:`${g.length} PRs`;window.confirm(`Merge ${e} one after another? Conflicting ones get rebased; ones that still conflict are skipped.`)&&(t(()=>Cd.mergeTrain(g.map(e=>e.id))),o(new Set))},children:[`Merge (`,g.length,`)`]})]})]}),(0,S.jsx)(mV,{children:f.map(r=>(0,S.jsx)(WX,{job:r,prs:l,act:t,car:u[r.id],onAsk:n,asked:e.settings.chat.agent,disabled:s&&a.has(r.id),selection:BX(r)&&(0,S.jsx)(uJ,{"aria-label":`Select ${vq(r.item)}`,checked:a.has(r.id),disabled:s,onCheckedChange:e=>_(r.id,e)})},r.id))})]})}function WX({job:e,prs:t,act:n,car:r,onAsk:i,asked:a,disabled:o,selection:s}){let[c,l]=(0,v.useState)(),u=e.attempts.at(-1),d=PX(e),f=d?t[d]:void 0,p=f?.state===`OPEN`,m=o||c!==void 0||NX(r),h=f&&(IX(f)?`rebase`:FX(f)?`merge`:void 0),g=r?.step===`skipped`?`The merge train skipped ${d}, "${vq(e.item)}": ${r.reason}. Why, and what should I do about it?`:e.state===`failed`?`Job ${e.id}, "${vq(e.item)}" (workwork ${e.item.id} in ${e.item.repo}), failed${u.error?`: ${u.error}`:``}. Its log is ${u.log}. Why did it fail, and should I retry it, pin another agent, or drop it?`:void 0;async function _(t){l(t);try{await n(()=>Cd[t](e.id))}finally{l(void 0)}}return(0,S.jsxs)(Wq,{leading:s,title:(0,S.jsxs)(S.Fragment,{children:[f?(0,S.jsx)(Vv,{variant:RX[f.state],children:f.state.toLowerCase()}):(0,S.jsx)(Vv,{variant:bq[u.outcome],children:u.outcome}),` `,(0,S.jsx)(Vv,{variant:`outline`,children:f?.level??e.item.level}),` `,vq(e.item)]}),meta:(0,S.jsxs)(`span`,{className:`flex flex-col gap-1`,children:[(0,S.jsx)(GX,{job:e,attempt:u}),d&&(0,S.jsx)(KX,{jobId:e.id,url:d,pr:f}),r?.step===`skipped`&&(0,S.jsxs)(`span`,{className:`text-destructive`,children:[`Merge train skipped it: `,r.reason.replaceAll(`
78
+ `,` `)]}),r&&HX[r.step]&&(0,S.jsx)(`span`,{children:HX[r.step]}),e.attempts.length>1&&(0,S.jsxs)(`details`,{children:[(0,S.jsxs)(`summary`,{className:`cursor-pointer`,children:[e.attempts.length-1,` earlier`,` `,e.attempts.length===2?`attempt`:`attempts`]}),e.attempts.slice(0,-1).map(t=>(0,S.jsx)(GX,{job:e,attempt:t,withOutcome:!0},t.log))]})]}),children:[h&&(0,S.jsx)(ay,{size:`sm`,disabled:m,onClick:()=>_(h),children:c===`rebase`?`Rebasing…`:c===`merge`?`Merging…`:h===`rebase`?`Rebase`:`Merge`}),p&&(0,S.jsx)(ay,{variant:`outline`,size:`sm`,disabled:m,onClick:()=>_(`close`),children:c===`close`?`Closing…`:`Close`}),e.state===`failed`&&(0,S.jsx)(ay,{variant:`outline`,size:`sm`,disabled:m,onClick:()=>n(()=>Cd.retry(e.id)),children:`Retry`}),g&&(0,S.jsxs)(ay,{variant:`outline`,size:`sm`,onClick:()=>i(g),children:[`Ask `,Tq(a)]}),BX(e)&&(0,S.jsx)(ay,{variant:`ghost`,size:`icon-sm`,"aria-label":`Dismiss ${vq(e.item)}`,title:`Dismiss`,disabled:m,onClick:()=>n(()=>Cd.remove(e.id)),children:(0,S.jsx)(xd,{"aria-hidden":`true`})})]})}function GX({job:e,attempt:t,withOutcome:n}){let r=[t.agent,Cq(t)].filter(Boolean).join(` `);return(0,S.jsxs)(`span`,{className:`flex flex-col gap-1`,children:[(0,S.jsxs)(`span`,{className:`flex flex-wrap items-center gap-x-3`,children:[(0,S.jsx)(`span`,{children:[n&&t.outcome,e.item.play,r,`${mq(t.start)}, ${gq(t.start,t.end)}`].filter(Boolean).join(` · `)}),(0,S.jsx)(AX,{log:t.log,agent:r,kind:`log`}),!t.error&&(0,S.jsx)(AX,{log:t.log,agent:r,kind:`prompt`})]}),t.error&&(0,S.jsx)(`span`,{className:`text-destructive`,children:t.error.split(`
79
+ `)[0]}),t.branch&&(0,S.jsxs)(`span`,{children:[`Unpushed work kept on branch `,t.branch]})]})}function KX({jobId:e,url:t,pr:n}){let r=n&&zX[n.checks];return(0,S.jsxs)(`span`,{className:`flex flex-wrap items-center gap-x-3`,children:[(0,S.jsxs)(`a`,{href:t,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1`,children:[(0,S.jsx)(zu,{className:`size-3.5`,"aria-hidden":`true`}),t.replace(`https://github.com/`,``)]}),n?(0,S.jsxs)(S.Fragment,{children:[n.state===`OPEN`&&r&&(0,S.jsxs)(`span`,{className:`inline-flex items-center gap-1 ${r.className??``}`,children:[(0,S.jsx)(r.Icon,{className:`size-3.5`,"aria-hidden":`true`}),r.label]}),n.draft&&(0,S.jsx)(`span`,{children:`draft`}),n.state===`OPEN`&&n.conflicts===null&&(0,S.jsx)(`span`,{children:`checking mergeability…`}),n.state===`OPEN`&&n.conflicts&&(0,S.jsx)(`span`,{className:`text-destructive`,children:n.fork?`conflicts · resolve in fork`:`conflicts`}),(0,S.jsxs)(`span`,{children:[(0,S.jsxs)(`span`,{className:`text-success`,children:[`+`,n.additions]}),` `,(0,S.jsxs)(`span`,{className:`text-destructive`,children:[`−`,n.deletions]}),` in `,n.files.length,` `,n.files.length===1?`file`:`files`]}),(0,S.jsx)(Oq,{jobId:e,url:t,pr:n})]}):(0,S.jsx)(`span`,{children:`asking GitHub…`})]})}function qX({snapshot:e,act:t}){let[n,r]=(0,v.useState)(!1);return(0,S.jsxs)(iq,{open:n,onOpenChange:r,children:[(0,S.jsx)(aq,{render:(0,S.jsx)(ay,{variant:`ghost`,size:`icon`,"aria-label":`Settings`}),children:(0,S.jsx)(dd,{})}),(0,S.jsxs)(cq,{className:`sm:max-w-xl`,children:[(0,S.jsxs)(lq,{children:[(0,S.jsx)(dq,{children:`Settings`}),(0,S.jsx)(fq,{children:`Defaults for every run, and what auto mode may queue. Closing without saving discards changes.`})]}),(0,S.jsx)(JX,{snapshot:e,act:t,onSaved:()=>r(!1)})]})]})}function JX({snapshot:e,act:t,onSaved:n}){let[r,i]=(0,v.useState)(e.settings),[a,o]=(0,v.useState)([]),[s,c]=(0,v.useState)([]),l={...r,auto:{...r.auto,on:e.settings.auto.on}},u=JSON.stringify(l)===JSON.stringify(e.settings);(0,v.useEffect)(()=>{Cd.candidates().then(e=>{o([...new Set(e.items.map(e=>e.play))].sort()),c([...new Set(e.items.map(e=>e.repo))].sort())})},[e.candidates.at]);let d=r.auto,f=e=>i({...r,auto:{...d,...e}});return(0,S.jsxs)(`form`,{className:`flex flex-col gap-4`,onSubmit:e=>{e.preventDefault(),t(async()=>{await Cd.saveSettings(l),n()})},children:[(0,S.jsxs)(Gz,{defaultValue:`runs`,children:[(0,S.jsxs)(qz,{children:[(0,S.jsx)(Jz,{value:`runs`,children:`Runs`}),(0,S.jsx)(Jz,{value:`presets`,children:`Presets`}),(0,S.jsx)(Jz,{value:`auto`,children:`Auto mode`}),(0,S.jsx)(Jz,{value:`chat`,children:`Live Agent`})]}),(0,S.jsxs)(`div`,{className:`mt-2 grid`,children:[(0,S.jsx)(XX,{value:`runs`,children:(0,S.jsxs)(Ux,{children:[(0,S.jsx)(tX,{value:r,onChange:e=>i({...r,...e})}),(0,S.jsxs)(Gx,{orientation:`horizontal`,children:[(0,S.jsx)(qx,{htmlFor:`timeout`,children:`Minutes before an agent is stopped`}),(0,S.jsx)(Ay,{id:`timeout`,type:`number`,className:`w-20`,min:1,value:r.timeout,onChange:e=>i({...r,timeout:Number(e.target.value)})})]})]})}),(0,S.jsx)(XX,{value:`presets`,children:(0,S.jsx)(YX,{value:r.presets,onChange:e=>i({...r,presets:e})})}),(0,S.jsx)(XX,{value:`auto`,children:(0,S.jsxs)(Ux,{children:[(0,S.jsx)(Jx,{children:`While the factory is on, auto mode keeps up to 5 jobs per agent queued, cheapest attention first, and never queues a candidate that already had a job. An empty filter allows everything.`}),(0,S.jsxs)(Gx,{children:[(0,S.jsx)(qx,{children:`Levels`}),(0,S.jsx)(Hq,{multiple:!0,variant:`outline`,value:d.levels,onValueChange:e=>f({levels:e}),children:[`auto`,`skim`,`decide`].map(e=>(0,S.jsx)(Uq,{value:e,children:e},e))})]}),(0,S.jsxs)(Gx,{children:[(0,S.jsx)(qx,{children:`Plays`}),(0,S.jsx)(Hq,{multiple:!0,variant:`outline`,className:`flex-wrap`,value:d.plays,onValueChange:e=>f({plays:e}),children:a.map(e=>(0,S.jsx)(Uq,{value:e,children:e},e))})]}),(0,S.jsxs)(Gx,{children:[(0,S.jsx)(qx,{children:`Repos`}),(0,S.jsx)(Hq,{multiple:!0,variant:`outline`,className:`flex-wrap`,value:d.repos,onValueChange:e=>f({repos:e}),children:s.map(e=>(0,S.jsx)(Uq,{value:e,children:_q(e)},e))})]})]})}),(0,S.jsx)(XX,{value:`chat`,children:(0,S.jsxs)(Ux,{children:[(0,S.jsx)(Jx,{children:`The agent you plan the queue with. Changing it starts a new chat.`}),(0,S.jsxs)(Gx,{orientation:`horizontal`,children:[(0,S.jsx)(oX,{label:`Chat agent`,className:`w-24 flex-none`,items:Xz.map(e=>({value:e,label:Tq(e)})),value:r.chat.agent,onChange:e=>e&&i({...r,chat:{agent:e}})}),(0,S.jsx)(iX,{agent:r.chat.agent,value:r.chat,onChange:e=>i({...r,chat:{...e,agent:r.chat.agent}})})]})]})})]})]}),(0,S.jsx)(uq,{children:(0,S.jsx)(ay,{type:`submit`,disabled:u,children:`Save`})})]})}function YX({value:e,onChange:t}){let n=(n,r)=>t(e.map((e,t)=>t===n?r:e));return(0,S.jsxs)(Ux,{children:[(0,S.jsx)(Jx,{children:`Queue a candidate with one of these from the arrow next to its Queue button.`}),e.map((r,i)=>(0,S.jsxs)(Gx,{orientation:`horizontal`,children:[(0,S.jsx)(oX,{label:`Preset agent`,className:`w-24 flex-none`,items:Xz.map(e=>({value:e,label:Tq(e)})),value:r.agent,onChange:e=>e&&n(i,{agent:e})}),(0,S.jsx)(iX,{agent:r.agent,value:r,onChange:e=>n(i,{...e,agent:r.agent})}),(0,S.jsx)(ay,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":`Remove preset`,onClick:()=>t(e.filter((e,t)=>t!==i)),children:(0,S.jsx)(xd,{})})]},i)),(0,S.jsxs)(ay,{type:`button`,variant:`outline`,className:`self-start`,onClick:()=>t([...e,{agent:Xz[0]}]),children:[(0,S.jsx)(ad,{}),` Add preset`]})]})}function XX(e){return(0,S.jsx)(Yz,{keepMounted:!0,hidden:!1,className:`col-start-1 row-start-1 data-hidden:invisible`,...e})}function ZX(){let{snapshot:e,error:t,act:n}=wd(),[r,i]=(0,v.useState)(``);return e?(0,S.jsx)(Xw,{title:`Live Agent`,agent:(0,S.jsx)(vX,{agent:e.settings.chat.agent,prompt:r,onPromptChange:i}),children:(0,S.jsx)(QX,{snapshot:e,error:t,act:n,onAsk:i})}):(0,S.jsx)(`div`,{className:`flex min-h-svh items-center justify-center gap-2 p-4 text-muted-foreground`,children:t??(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(wz,{}),` Loading`]})})}function QX({snapshot:e,error:t,act:n,onAsk:r}){let[i,a]=(0,v.useState)(`queue`),{isMobile:o,setOpen:s,setOpenMobile:c}=Gw(),{on:l,status:u}=e,d=e.jobs.filter(e=>e.state===`queued`).length,f=e.jobs.filter(e=>e.state===`failed`).length,p=l&&u?[`since ${pq(yq(u.run))}`,u.limit===null?`always waits for usage resets`:u.limit===1?`stops at usage limits`:`waits for ${u.limit-1} usage reset${u.limit>2?`s`:``}`,u.until&&`until ${pq(u.until)}`].filter(Boolean).join(` · `):``;return(0,S.jsxs)(`div`,{className:`mx-auto flex min-h-svh w-full max-w-5xl flex-col gap-6 p-4`,children:[(0,S.jsxs)(`header`,{className:`flex flex-wrap items-center gap-x-4 gap-y-3`,children:[(0,S.jsxs)(`div`,{className:`flex flex-1 items-center gap-2`,children:[(0,S.jsxs)(`h1`,{className:`flex items-center gap-2 font-heading text-xl font-semibold`,children:[(0,S.jsx)(lX,{working:l}),`Factory`]}),(0,S.jsx)(Vv,{variant:l?`accent`:`outline`,children:l?`on`:`off`}),(0,S.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:p})]}),(0,S.jsx)(sX,{snapshot:e,act:n}),(0,S.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,S.jsx)(xz,{}),(0,S.jsx)(qX,{snapshot:e,act:n})]})]}),t&&(0,S.jsx)(`p`,{role:`alert`,className:`text-sm wrap-anywhere whitespace-pre-line text-destructive`,children:t}),(0,S.jsxs)(Gz,{value:i,onValueChange:a,children:[(0,S.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,S.jsxs)(qz,{children:[(0,S.jsxs)(Jz,{value:`queue`,children:[(0,S.jsx)(qu,{}),`Queue`,d?` (${d})`:``]}),(0,S.jsxs)(Jz,{value:`candidates`,children:[(0,S.jsx)(Uu,{}),`Candidates`]}),(0,S.jsxs)(Jz,{value:`results`,children:[(0,S.jsx)($u,{}),`Results`,f?` (${f} failed)`:``]})]}),(0,S.jsx)(`div`,{className:`ml-auto`,children:(0,S.jsx)(Zq,{act:n})})]}),(0,S.jsx)(Yz,{value:`queue`,children:(0,S.jsx)(xX,{snapshot:e,act:n,onCandidates:()=>a(`candidates`)})}),(0,S.jsx)(Yz,{value:`candidates`,children:(0,S.jsx)(Yq,{snapshot:e,act:n})}),(0,S.jsx)(Yz,{value:`results`,children:(0,S.jsx)(UX,{snapshot:e,act:n,onAsk:e=>{r(e),(o?c:s)(!0)}})})]})]})}(0,y.createRoot)(document.getElementById(`root`)).render((0,S.jsx)(v.StrictMode,{children:(0,S.jsx)(F,{themes:b,storageKey:Zl,children:(0,S.jsx)(Yl,{children:(0,S.jsx)(ZX,{})})})}));