@johpaz/hive-agents 0.0.13 → 0.0.20

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.
@@ -1,317 +0,0 @@
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),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,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,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),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.iterator;function p(e){return typeof e!=`object`||!e?null:(e=f&&e[f]||e[`@@iterator`],typeof e==`function`?e:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,g={};function _(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}_.prototype.isReactComponent={},_.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`setState(...): 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`)},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function v(){}v.prototype=_.prototype;function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}var b=y.prototype=new v;b.constructor=y,h(b,_.prototype),b.isPureReactComponent=!0;var x=Array.isArray,S=Object.prototype.hasOwnProperty,C={current:null},w={key:!0,ref:!0,__self:!0,__source:!0};function T(e,n,r){var i,a={},o=null,s=null;if(n!=null)for(i in n.ref!==void 0&&(s=n.ref),n.key!==void 0&&(o=``+n.key),n)S.call(n,i)&&!w.hasOwnProperty(i)&&(a[i]=n[i]);var c=arguments.length-2;if(c===1)a.children=r;else if(1<c){for(var l=Array(c),u=0;u<c;u++)l[u]=arguments[u+2];a.children=l}if(e&&e.defaultProps)for(i in c=e.defaultProps,c)a[i]===void 0&&(a[i]=c[i]);return{$$typeof:t,type:e,key:o,ref:s,props:a,_owner:C.current}}function E(e,n){return{$$typeof:t,type:e.type,key:n,ref:e.ref,props:e.props,_owner:e._owner}}function D(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function O(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var k=/\/+/g;function A(e,t){return typeof e==`object`&&e&&e.key!=null?O(``+e.key):t.toString(36)}function j(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`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0}}if(c)return c=e,o=o(c),e=a===``?`.`+A(c,0):a,x(o)?(i=``,e!=null&&(i=e.replace(k,`$&/`)+`/`),j(o,r,i,``,function(e){return e})):o!=null&&(D(o)&&(o=E(o,i+(!o.key||c&&c.key===o.key?``:(``+o.key).replace(k,`$&/`)+`/`)+e)),r.push(o)),1;if(c=0,a=a===``?`.`:a+`:`,x(e))for(var l=0;l<e.length;l++){s=e[l];var u=a+A(s,l);c+=j(s,r,i,u,o)}else if(u=p(e),typeof u==`function`)for(e=u.call(e),l=0;!(s=e.next()).done;)s=s.value,u=a+A(s,l++),c+=j(s,r,i,u,o);else if(s===`object`)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 M(e,t,n){if(e==null)return e;var r=[],i=0;return j(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function N(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var P={current:null},F={transition:null},I={ReactCurrentDispatcher:P,ReactCurrentBatchConfig:F,ReactCurrentOwner:C};function L(){throw Error(`act(...) is not supported in production builds of React.`)}e.Children={map:M,forEach:function(e,t,n){M(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return M(e,function(){t++}),t},toArray:function(e){return M(e,function(e){return e})||[]},only:function(e){if(!D(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}},e.Component=_,e.Fragment=r,e.Profiler=a,e.PureComponent=y,e.StrictMode=i,e.Suspense=l,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=I,e.act=L,e.cloneElement=function(e,n,r){if(e==null)throw Error(`React.cloneElement(...): The argument must be a React element, but you passed `+e+`.`);var i=h({},e.props),a=e.key,o=e.ref,s=e._owner;if(n!=null){if(n.ref!==void 0&&(o=n.ref,s=C.current),n.key!==void 0&&(a=``+n.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in n)S.call(n,l)&&!w.hasOwnProperty(l)&&(i[l]=n[l]===void 0&&c!==void 0?c[l]:n[l])}var l=arguments.length-2;if(l===1)i.children=r;else if(1<l){c=Array(l);for(var u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}return{$$typeof:t,type:e.type,key:a,ref:o,props:i,_owner:s}},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:o,_context:e},e.Consumer=e},e.createElement=T,e.createFactory=function(e){var t=T.bind(null,e);return t.type=e,t},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=D,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:N}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=F.transition;F.transition={};try{e()}finally{F.transition=t}},e.unstable_act=L,e.useCallback=function(e,t){return P.current.useCallback(e,t)},e.useContext=function(e){return P.current.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e){return P.current.useDeferredValue(e)},e.useEffect=function(e,t){return P.current.useEffect(e,t)},e.useId=function(){return P.current.useId()},e.useImperativeHandle=function(e,t,n){return P.current.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return P.current.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return P.current.useLayoutEffect(e,t)},e.useMemo=function(e,t){return P.current.useMemo(e,t)},e.useReducer=function(e,t,n){return P.current.useReducer(e,t,n)},e.useRef=function(e){return P.current.useRef(e)},e.useState=function(e){return P.current.useState(e)},e.useSyncExternalStore=function(e,t,n){return P.current.useSyncExternalStore(e,t,n)},e.useTransition=function(){return P.current.useTransition()},e.version=`18.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(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=typeof setTimeout==`function`?setTimeout:null,_=typeof clearTimeout==`function`?clearTimeout:null,v=typeof setImmediate<`u`?setImmediate:null;typeof navigator<`u`&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(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 b(e){if(h=!1,y(e),!m)if(n(c)!==null)m=!0,M(x);else{var t=n(l);t!==null&&N(b,t.startTime-e)}}function x(t,i){m=!1,h&&(h=!1,_(w),w=-1),p=!0;var a=f;try{for(y(i),d=n(c);d!==null&&(!(d.expirationTime>i)||t&&!D());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=i);i=e.unstable_now(),typeof s==`function`?d.callback=s:d===n(c)&&r(c),y(i)}else r(c);d=n(c)}if(d!==null)var u=!0;else{var g=n(l);g!==null&&N(b,g.startTime-i),u=!1}return u}finally{d=null,f=a,p=!1}}var S=!1,C=null,w=-1,T=5,E=-1;function D(){return!(e.unstable_now()-E<T)}function O(){if(C!==null){var t=e.unstable_now();E=t;var n=!0;try{n=C(!0,t)}finally{n?k():(S=!1,C=null)}}else S=!1}var k;if(typeof v==`function`)k=function(){v(O)};else if(typeof MessageChannel<`u`){var A=new MessageChannel,j=A.port2;A.port1.onmessage=O,k=function(){j.postMessage(null)}}else k=function(){g(O,0)};function M(e){C=e,S||(S=!0,k())}function N(t,n){w=g(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_continueExecution=function(){m||p||(m=!0,M(x))},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`):T=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(c)},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_pauseExecution=function(){},e.unstable_requestPaint=function(){},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?(_(w),w=-1):h=!0,N(b,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,M(x))),r},e.unstable_shouldYield=D,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(),n=p();function r(e){for(var t=`https://reactjs.org/docs/error-decoder.html?invariant=`+e,n=1;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.`}var i=new Set,a={};function o(e,t){s(e,t),s(e+`Capture`,t)}function s(e,t){for(a[e]=t,e=0;e<t.length;e++)i.add(t[e])}var c=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),l=Object.prototype.hasOwnProperty,u=/^[: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]*$/,f={},m={};function h(e){return l.call(m,e)?!0:l.call(f,e)?!1:u.test(e)?m[e]=!0:(f[e]=!0,!1)}function g(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case`function`:case`symbol`:return!0;case`boolean`:return r?!1:n===null?(e=e.toLowerCase().slice(0,5),e!==`data-`&&e!==`aria-`):!n.acceptsBooleans;default:return!1}}function _(e,t,n,r){if(t==null||g(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function v(e,t,n,r,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var y={};`children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style`.split(` `).forEach(function(e){y[e]=new v(e,0,!1,e,null,!1,!1)}),[[`acceptCharset`,`accept-charset`],[`className`,`class`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`]].forEach(function(e){var t=e[0];y[t]=new v(t,1,!1,e[1],null,!1,!1)}),[`contentEditable`,`draggable`,`spellCheck`,`value`].forEach(function(e){y[e]=new v(e,2,!1,e.toLowerCase(),null,!1,!1)}),[`autoReverse`,`externalResourcesRequired`,`focusable`,`preserveAlpha`].forEach(function(e){y[e]=new v(e,2,!1,e,null,!1,!1)}),`allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope`.split(` `).forEach(function(e){y[e]=new v(e,3,!1,e.toLowerCase(),null,!1,!1)}),[`checked`,`multiple`,`muted`,`selected`].forEach(function(e){y[e]=new v(e,3,!0,e,null,!1,!1)}),[`capture`,`download`].forEach(function(e){y[e]=new v(e,4,!1,e,null,!1,!1)}),[`cols`,`rows`,`size`,`span`].forEach(function(e){y[e]=new v(e,6,!1,e,null,!1,!1)}),[`rowSpan`,`start`].forEach(function(e){y[e]=new v(e,5,!1,e.toLowerCase(),null,!1,!1)});var b=/[\-:]([a-z])/g;function x(e){return e[1].toUpperCase()}`accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height`.split(` `).forEach(function(e){var t=e.replace(b,x);y[t]=new v(t,1,!1,e,null,!1,!1)}),`xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type`.split(` `).forEach(function(e){var t=e.replace(b,x);y[t]=new v(t,1,!1,e,`http://www.w3.org/1999/xlink`,!1,!1)}),[`xml:base`,`xml:lang`,`xml:space`].forEach(function(e){var t=e.replace(b,x);y[t]=new v(t,1,!1,e,`http://www.w3.org/XML/1998/namespace`,!1,!1)}),[`tabIndex`,`crossOrigin`].forEach(function(e){y[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)}),y.xlinkHref=new v(`xlinkHref`,1,!1,`xlink:href`,`http://www.w3.org/1999/xlink`,!0,!1),[`src`,`href`,`action`,`formAction`].forEach(function(e){y[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)});function S(e,t,n,r){var i=y.hasOwnProperty(t)?y[t]:null;(i===null?r||!(2<t.length)||t[0]!==`o`&&t[0]!==`O`||t[1]!==`n`&&t[1]!==`N`:i.type!==0)&&(_(t,n,i,r)&&(n=null),r||i===null?h(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,``+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:``:n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&!0===n?``:``+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var C=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for(`react.element`),T=Symbol.for(`react.portal`),E=Symbol.for(`react.fragment`),D=Symbol.for(`react.strict_mode`),O=Symbol.for(`react.profiler`),k=Symbol.for(`react.provider`),A=Symbol.for(`react.context`),j=Symbol.for(`react.forward_ref`),M=Symbol.for(`react.suspense`),N=Symbol.for(`react.suspense_list`),P=Symbol.for(`react.memo`),F=Symbol.for(`react.lazy`),I=Symbol.for(`react.offscreen`),L=Symbol.iterator;function R(e){return typeof e!=`object`||!e?null:(e=L&&e[L]||e[`@@iterator`],typeof e==`function`?e:null)}var ee=Object.assign,te;function ne(e){if(te===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);te=t&&t[1]||``}return`
2
- `+te+e}var re=!1;function ie(e,t){if(!e||re)return``;re=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&typeof t.stack==`string`){for(var i=t.stack.split(`
3
- `),a=r.stack.split(`
4
- `),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(o!==1||s!==1)do if(o--,s--,0>s||i[o]!==a[s]){var c=`
5
- `+i[o].replace(` at new `,` at `);return e.displayName&&c.includes(`<anonymous>`)&&(c=c.replace(`<anonymous>`,e.displayName)),c}while(1<=o&&0<=s);break}}}finally{re=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:``)?ne(e):``}function ae(e){switch(e.tag){case 5:return ne(e.type);case 16:return ne(`Lazy`);case 13:return ne(`Suspense`);case 19:return ne(`SuspenseList`);case 0:case 2:case 15:return e=ie(e.type,!1),e;case 11:return e=ie(e.type.render,!1),e;case 1:return e=ie(e.type,!0),e;default:return``}}function oe(e){if(e==null)return null;if(typeof e==`function`)return e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case E:return`Fragment`;case T:return`Portal`;case O:return`Profiler`;case D:return`StrictMode`;case M:return`Suspense`;case N:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case A:return(e.displayName||`Context`)+`.Consumer`;case k:return(e._context.displayName||`Context`)+`.Provider`;case j:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case P:return t=e.displayName||null,t===null?oe(e.type)||`Memo`:t;case F:t=e._payload,e=e._init;try{return oe(e(t))}catch{}}return null}function se(e){var t=e.type;switch(e.tag){case 24:return`Cache`;case 9:return(t.displayName||`Context`)+`.Consumer`;case 10:return(t._context.displayName||`Context`)+`.Provider`;case 18:return`DehydratedFragment`;case 11:return e=t.render,e=e.displayName||e.name||``,t.displayName||(e===``?`ForwardRef`:`ForwardRef(`+e+`)`);case 7:return`Fragment`;case 5:return t;case 4:return`Portal`;case 3:return`Root`;case 6:return`Text`;case 16:return oe(t);case 8:return t===D?`StrictMode`:`Mode`;case 22:return`Offscreen`;case 12:return`Profiler`;case 21:return`Scope`;case 13:return`Suspense`;case 19:return`SuspenseList`;case 25:return`TracingMarker`;case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t==`function`)return t.displayName||t.name||null;if(typeof t==`string`)return t}return null}function ce(e){switch(typeof e){case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function z(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function le(e){var t=z(e)?`checked`:`value`,n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=``+e[t];if(!e.hasOwnProperty(t)&&n!==void 0&&typeof n.get==`function`&&typeof n.set==`function`){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function B(e){e._valueTracker||=le(e)}function ue(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=z(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function de(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 fe(e,t){var n=t.checked;return ee({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function pe(e,t){var n=t.defaultValue==null?``:t.defaultValue,r=t.checked==null?t.defaultChecked:t.checked;n=ce(t.value==null?n:t.value),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type===`checkbox`||t.type===`radio`?t.checked!=null:t.value!=null}}function me(e,t){t=t.checked,t!=null&&S(e,`checked`,t,!1)}function he(e,t){me(e,t);var n=ce(t.value),r=t.type;if(n!=null)r===`number`?(n===0&&e.value===``||e.value!=n)&&(e.value=``+n):e.value!==``+n&&(e.value=``+n);else if(r===`submit`||r===`reset`){e.removeAttribute(`value`);return}t.hasOwnProperty(`value`)?_e(e,t.type,n):t.hasOwnProperty(`defaultValue`)&&_e(e,t.type,ce(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ge(e,t,n){if(t.hasOwnProperty(`value`)||t.hasOwnProperty(`defaultValue`)){var r=t.type;if(!(r!==`submit`&&r!==`reset`||t.value!==void 0&&t.value!==null))return;t=``+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==``&&(e.name=``),e.defaultChecked=!!e._wrapperState.initialChecked,n!==``&&(e.name=n)}function _e(e,t,n){(t!==`number`||de(e.ownerDocument)!==e)&&(n==null?e.defaultValue=``+e._wrapperState.initialValue:e.defaultValue!==``+n&&(e.defaultValue=``+n))}var ve=Array.isArray;function ye(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=``+ce(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 be(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(r(91));return ee({},t,{value:void 0,defaultValue:void 0,children:``+e._wrapperState.initialValue})}function xe(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(r(92));if(ve(n)){if(1<n.length)throw Error(r(93));n=n[0]}t=n}t??=``,n=t}e._wrapperState={initialValue:ce(n)}}function Se(e,t){var n=ce(t.value),r=ce(t.defaultValue);n!=null&&(n=``+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=``+r)}function Ce(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==``&&t!==null&&(e.value=t)}function we(e){switch(e){case`svg`:return`http://www.w3.org/2000/svg`;case`math`:return`http://www.w3.org/1998/Math/MathML`;default:return`http://www.w3.org/1999/xhtml`}}function Te(e,t){return e==null||e===`http://www.w3.org/1999/xhtml`?we(t):e===`http://www.w3.org/2000/svg`&&t===`foreignObject`?`http://www.w3.org/1999/xhtml`:e}var Ee,De=function(e){return typeof MSApp<`u`&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!==`http://www.w3.org/2000/svg`||`innerHTML`in e)e.innerHTML=t;else{for(Ee||=document.createElement(`div`),Ee.innerHTML=`<svg>`+t.valueOf().toString()+`</svg>`,t=Ee.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Oe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ke={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ae=[`Webkit`,`ms`,`Moz`,`O`];Object.keys(ke).forEach(function(e){Ae.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ke[t]=ke[e]})});function je(e,t,n){return t==null||typeof t==`boolean`||t===``?``:n||typeof t!=`number`||t===0||ke.hasOwnProperty(e)&&ke[e]?(``+t).trim():t+`px`}function Me(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=n.indexOf(`--`)===0,i=je(n,t[n],r);n===`float`&&(n=`cssFloat`),r?e.setProperty(n,i):e[n]=i}}var Ne=ee({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Pe(e,t){if(t){if(Ne[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(r(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(r(60));if(typeof t.dangerouslySetInnerHTML!=`object`||!(`__html`in t.dangerouslySetInnerHTML))throw Error(r(61))}if(t.style!=null&&typeof t.style!=`object`)throw Error(r(62))}}function Fe(e,t){if(e.indexOf(`-`)===-1)return typeof t.is==`string`;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 Ie=null;function Le(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Re=null,ze=null,Be=null;function Ve(e){if(e=Bi(e)){if(typeof Re!=`function`)throw Error(r(280));var t=e.stateNode;t&&(t=Hi(t),Re(e.stateNode,e.type,t))}}function He(e){ze?Be?Be.push(e):Be=[e]:ze=e}function Ue(){if(ze){var e=ze,t=Be;if(Be=ze=null,Ve(e),t)for(e=0;e<t.length;e++)Ve(t[e])}}function We(e,t){return e(t)}function Ge(){}var Ke=!1;function qe(e,t,n){if(Ke)return e(t,n);Ke=!0;try{return We(e,t,n)}finally{Ke=!1,(ze!==null||Be!==null)&&(Ge(),Ue())}}function Je(e,t){var n=e.stateNode;if(n===null)return null;var i=Hi(n);if(i===null)return null;n=i[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`:(i=!i.disabled)||(e=e.type,i=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!i;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(r(231,t,typeof n));return n}var Ye=!1;if(c)try{var Xe={};Object.defineProperty(Xe,`passive`,{get:function(){Ye=!0}}),window.addEventListener(`test`,Xe,Xe),window.removeEventListener(`test`,Xe,Xe)}catch{Ye=!1}function Ze(e,t,n,r,i,a,o,s,c){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(e){this.onError(e)}}var Qe=!1,$e=null,et=!1,tt=null,nt={onError:function(e){Qe=!0,$e=e}};function rt(e,t,n,r,i,a,o,s,c){Qe=!1,$e=null,Ze.apply(nt,arguments)}function it(e,t,n,i,a,o,s,c,l){if(rt.apply(this,arguments),Qe){if(Qe){var u=$e;Qe=!1,$e=null}else throw Error(r(198));et||(et=!0,tt=u)}}function at(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function ot(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 st(e){if(at(e)!==e)throw Error(r(188))}function ct(e){var t=e.alternate;if(!t){if(t=at(e),t===null)throw Error(r(188));return t===e?e:null}for(var n=e,i=t;;){var a=n.return;if(a===null)break;var o=a.alternate;if(o===null){if(i=a.return,i!==null){n=i;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return st(a),e;if(o===i)return st(a),t;o=o.sibling}throw Error(r(188))}if(n.return!==i.return)n=a,i=o;else{for(var s=!1,c=a.child;c;){if(c===n){s=!0,n=a,i=o;break}if(c===i){s=!0,i=a,n=o;break}c=c.sibling}if(!s){for(c=o.child;c;){if(c===n){s=!0,n=o,i=a;break}if(c===i){s=!0,i=o,n=a;break}c=c.sibling}if(!s)throw Error(r(189))}}if(n.alternate!==i)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?e:t}function lt(e){return e=ct(e),e===null?null:ut(e)}function ut(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=ut(e);if(t!==null)return t;e=e.sibling}return null}var dt=n.unstable_scheduleCallback,ft=n.unstable_cancelCallback,pt=n.unstable_shouldYield,mt=n.unstable_requestPaint,ht=n.unstable_now,gt=n.unstable_getCurrentPriorityLevel,_t=n.unstable_ImmediatePriority,vt=n.unstable_UserBlockingPriority,yt=n.unstable_NormalPriority,bt=n.unstable_LowPriority,xt=n.unstable_IdlePriority,St=null,Ct=null;function wt(e){if(Ct&&typeof Ct.onCommitFiberRoot==`function`)try{Ct.onCommitFiberRoot(St,e,void 0,(e.current.flags&128)==128)}catch{}}var Tt=Math.clz32?Math.clz32:Ot,Et=Math.log,Dt=Math.LN2;function Ot(e){return e>>>=0,e===0?32:31-(Et(e)/Dt|0)|0}var kt=64,At=4194304;function jt(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Mt(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s===0?(a&=o,a!==0&&(r=jt(a))):r=jt(s)}else o=n&~i,o===0?a!==0&&(r=jt(a)):r=jt(o);if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,a=t&-t,i>=a||i===16&&a&4194240))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Tt(t),i=1<<n,r|=e[n],t&=~i;return r}function Nt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Pt(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-Tt(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Nt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}}function Ft(e){return e=e.pendingLanes&-1073741825,e===0?e&1073741824?1073741824:0:e}function It(){var e=kt;return kt<<=1,!(kt&4194240)&&(kt=64),e}function Lt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Rt(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Tt(t),e[t]=n}function zt(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Tt(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}function Bt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Tt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Vt=0;function Ht(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Ut,Wt,Gt,V,Kt,qt=!1,Jt=[],Yt=null,Xt=null,Zt=null,Qt=new Map,$t=new Map,en=[],tn=`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 submit`.split(` `);function nn(e,t){switch(e){case`focusin`:case`focusout`:Yt=null;break;case`dragenter`:case`dragleave`:Xt=null;break;case`mouseover`:case`mouseout`:Zt=null;break;case`pointerover`:case`pointerout`:Qt.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:$t.delete(t.pointerId)}}function rn(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=Bi(t),t!==null&&Wt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function an(e,t,n,r,i){switch(t){case`focusin`:return Yt=rn(Yt,e,t,n,r,i),!0;case`dragenter`:return Xt=rn(Xt,e,t,n,r,i),!0;case`mouseover`:return Zt=rn(Zt,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Qt.set(a,rn(Qt.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,$t.set(a,rn($t.get(a)||null,e,t,n,r,i)),!0}return!1}function on(e){var t=H(e.target);if(t!==null){var n=at(t);if(n!==null){if(t=n.tag,t===13){if(t=ot(n),t!==null){e.blockedOn=t,Kt(e.priority,function(){Gt(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 sn(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=vn(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ie=r,n.target.dispatchEvent(r),Ie=null}else return t=Bi(n),t!==null&&Wt(t),e.blockedOn=n,!1;t.shift()}return!0}function cn(e,t,n){sn(e)&&n.delete(t)}function ln(){qt=!1,Yt!==null&&sn(Yt)&&(Yt=null),Xt!==null&&sn(Xt)&&(Xt=null),Zt!==null&&sn(Zt)&&(Zt=null),Qt.forEach(cn),$t.forEach(cn)}function un(e,t){e.blockedOn===t&&(e.blockedOn=null,qt||(qt=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,ln)))}function dn(e){function t(t){return un(t,e)}if(0<Jt.length){un(Jt[0],e);for(var n=1;n<Jt.length;n++){var r=Jt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Yt!==null&&un(Yt,e),Xt!==null&&un(Xt,e),Zt!==null&&un(Zt,e),Qt.forEach(t),$t.forEach(t),n=0;n<en.length;n++)r=en[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<en.length&&(n=en[0],n.blockedOn===null);)on(n),n.blockedOn===null&&en.shift()}var fn=C.ReactCurrentBatchConfig,pn=!0;function mn(e,t,n,r){var i=Vt,a=fn.transition;fn.transition=null;try{Vt=1,gn(e,t,n,r)}finally{Vt=i,fn.transition=a}}function hn(e,t,n,r){var i=Vt,a=fn.transition;fn.transition=null;try{Vt=4,gn(e,t,n,r)}finally{Vt=i,fn.transition=a}}function gn(e,t,n,r){if(pn){var i=vn(e,t,n,r);if(i===null)fi(e,t,r,_n,n),nn(e,r);else if(an(i,e,t,n,r))r.stopPropagation();else if(nn(e,r),t&4&&-1<tn.indexOf(e)){for(;i!==null;){var a=Bi(i);if(a!==null&&Ut(a),a=vn(e,t,n,r),a===null&&fi(e,t,r,_n,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else fi(e,t,r,null,n)}}var _n=null;function vn(e,t,n,r){if(_n=null,e=Le(r),e=H(e),e!==null)if(t=at(e),t===null)e=null;else if(n=t.tag,n===13){if(e=ot(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 _n=e,null}function yn(e){switch(e){case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 1;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`toggle`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 4;case`message`:switch(gt()){case _t:return 1;case vt:return 4;case yt:case bt:return 16;case xt:return 536870912;default:return 16}default:return 16}}var bn=null,xn=null,Sn=null;function Cn(){if(Sn)return Sn;var e,t=xn,n=t.length,r,i=`value`in bn?bn.value:bn.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 Sn=i.slice(e,1<r?1-r:void 0)}function wn(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 Tn(){return!0}function En(){return!1}function Dn(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)?Tn:En,this.isPropagationStopped=En,this}return ee(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=Tn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Tn)},persist:function(){},isPersistent:Tn}),t}var On={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},kn=Dn(On),An=ee({},On,{view:0,detail:0}),jn=Dn(An),Mn,Nn,Pn,Fn=ee({},An,{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!==Pn&&(Pn&&e.type===`mousemove`?(Mn=e.screenX-Pn.screenX,Nn=e.screenY-Pn.screenY):Nn=Mn=0,Pn=e),Mn)},movementY:function(e){return`movementY`in e?e.movementY:Nn}}),In=Dn(Fn),Ln=Dn(ee({},Fn,{dataTransfer:0})),Rn=Dn(ee({},An,{relatedTarget:0})),zn=Dn(ee({},On,{animationName:0,elapsedTime:0,pseudoElement:0})),Bn=Dn(ee({},On,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Vn=Dn(ee({},On,{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=Dn(ee({},An,{key:function(e){if(e.key){var t=Hn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=wn(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`?wn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?wn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Jn=Dn(ee({},Fn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Yn=Dn(ee({},An,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Kn})),Xn=Dn(ee({},On,{propertyName:0,elapsedTime:0,pseudoElement:0})),Zn=Dn(ee({},Fn,{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})),Qn=[9,13,27,32],$n=c&&`CompositionEvent`in window,er=null;c&&`documentMode`in document&&(er=document.documentMode);var tr=c&&`TextEvent`in window&&!er,nr=c&&(!$n||er&&8<er&&11>=er),rr=` `,ir=!1;function ar(e,t){switch(e){case`keyup`:return Qn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function or(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var sr=!1;function cr(e,t){switch(e){case`compositionend`:return or(t);case`keypress`:return t.which===32?(ir=!0,rr):null;case`textInput`:return e=t.data,e===rr&&ir?null:e;default:return null}}function lr(e,t){if(sr)return e===`compositionend`||!$n&&ar(e,t)?(e=Cn(),Sn=xn=bn=null,sr=!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 nr&&t.locale!==`ko`?null:t.data;default:return null}}var ur={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 dr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!ur[e.type]:t===`textarea`}function fr(e,t,n,r){He(r),t=mi(t,`onChange`),0<t.length&&(n=new kn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var pr=null,mr=null;function hr(e){oi(e,0)}function gr(e){if(ue(Vi(e)))return e}function _r(e,t){if(e===`change`)return t}var vr=!1;if(c){var yr;if(c){var br=`oninput`in document;if(!br){var xr=document.createElement(`div`);xr.setAttribute(`oninput`,`return;`),br=typeof xr.oninput==`function`}yr=br}else yr=!1;vr=yr&&(!document.documentMode||9<document.documentMode)}function Sr(){pr&&(pr.detachEvent(`onpropertychange`,Cr),mr=pr=null)}function Cr(e){if(e.propertyName===`value`&&gr(mr)){var t=[];fr(t,mr,e,Le(e)),qe(hr,t)}}function wr(e,t,n){e===`focusin`?(Sr(),pr=t,mr=n,pr.attachEvent(`onpropertychange`,Cr)):e===`focusout`&&Sr()}function Tr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return gr(mr)}function Er(e,t){if(e===`click`)return gr(t)}function Dr(e,t){if(e===`input`||e===`change`)return gr(t)}function Or(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var kr=typeof Object.is==`function`?Object.is:Or;function Ar(e,t){if(kr(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(!l.call(t,i)||!kr(e[i],t[i]))return!1}return!0}function jr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Mr(e,t){var n=jr(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=jr(n)}}function Nr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Nr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Pr(){for(var e=window,t=de();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=de(e.document)}return t}function Fr(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`)}function Ir(e){var t=Pr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Nr(n.ownerDocument.documentElement,n)){if(r!==null&&Fr(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),`selectionStart`in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=Mr(n,a);var o=Mr(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus==`function`&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Lr=c&&`documentMode`in document&&11>=document.documentMode,Rr=null,zr=null,Br=null,Vr=!1;function Hr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Vr||Rr==null||Rr!==de(r)||(r=Rr,`selectionStart`in r&&Fr(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}),Br&&Ar(Br,r)||(Br=r,r=mi(zr,`onSelect`),0<r.length&&(t=new kn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Rr)))}function Ur(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Wr={animationend:Ur(`Animation`,`AnimationEnd`),animationiteration:Ur(`Animation`,`AnimationIteration`),animationstart:Ur(`Animation`,`AnimationStart`),transitionend:Ur(`Transition`,`TransitionEnd`)},Gr={},Kr={};c&&(Kr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Wr.animationend.animation,delete Wr.animationiteration.animation,delete Wr.animationstart.animation),`TransitionEvent`in window||delete Wr.transitionend.transition);function qr(e){if(Gr[e])return Gr[e];if(!Wr[e])return e;var t=Wr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Kr)return Gr[e]=t[n];return e}var Jr=qr(`animationend`),Yr=qr(`animationiteration`),Xr=qr(`animationstart`),Zr=qr(`transitionend`),Qr=new Map,$r=`abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);function ei(e,t){Qr.set(e,t),o(t,[e])}for(var ti=0;ti<$r.length;ti++){var ni=$r[ti];ei(ni.toLowerCase(),`on`+(ni[0].toUpperCase()+ni.slice(1)))}ei(Jr,`onAnimationEnd`),ei(Yr,`onAnimationIteration`),ei(Xr,`onAnimationStart`),ei(`dblclick`,`onDoubleClick`),ei(`focusin`,`onFocus`),ei(`focusout`,`onBlur`),ei(Zr,`onTransitionEnd`),s(`onMouseEnter`,[`mouseout`,`mouseover`]),s(`onMouseLeave`,[`mouseout`,`mouseover`]),s(`onPointerEnter`,[`pointerout`,`pointerover`]),s(`onPointerLeave`,[`pointerout`,`pointerover`]),o(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),o(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),o(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),o(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),o(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),o(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var ri=`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(` `),ii=new Set(`cancel close invalid load scroll toggle`.split(` `).concat(ri));function ai(e,t,n){var r=e.type||`unknown-event`;e.currentTarget=n,it(r,t,void 0,e),e.currentTarget=null}function oi(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;ai(i,s,l),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;ai(i,s,l),a=c}}}if(et)throw e=tt,et=!1,tt=null,e}function si(e,t){var n=t[Li];n===void 0&&(n=t[Li]=new Set);var r=e+`__bubble`;n.has(r)||(di(t,e,2,!1),n.add(r))}function ci(e,t,n){var r=0;t&&(r|=4),di(n,e,r,t)}var li=`_reactListening`+Math.random().toString(36).slice(2);function ui(e){if(!e[li]){e[li]=!0,i.forEach(function(t){t!==`selectionchange`&&(ii.has(t)||ci(t,!1,e),ci(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[li]||(t[li]=!0,ci(`selectionchange`,!1,t))}}function di(e,t,n,r){switch(yn(t)){case 1:var i=mn;break;case 4:i=hn;break;default:i=gn}n=i.bind(null,t,n,e),i=void 0,!Ye||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 fi(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;o=o.return}for(;s!==null;){if(o=H(s),o===null)return;if(c=o.tag,c===5||c===6){r=a=o;continue a}s=s.parentNode}}r=r.return}qe(function(){var r=a,i=Le(n),o=[];a:{var s=Qr.get(e);if(s!==void 0){var c=kn,l=e;switch(e){case`keypress`:if(wn(n)===0)break a;case`keydown`:case`keyup`:c=qn;break;case`focusin`:l=`focus`,c=Rn;break;case`focusout`:l=`blur`,c=Rn;break;case`beforeblur`:case`afterblur`:c=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`:c=In;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:c=Ln;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:c=Yn;break;case Jr:case Yr:case Xr:c=zn;break;case Zr:c=Xn;break;case`scroll`:c=jn;break;case`wheel`:c=Zn;break;case`copy`:case`cut`:case`paste`:c=Bn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:c=Jn}var u=(t&4)!=0,d=!u&&e===`scroll`,f=u?s===null?null:s+`Capture`:s;u=[];for(var p=r,m;p!==null;){m=p;var h=m.stateNode;if(m.tag===5&&h!==null&&(m=h,f!==null&&(h=Je(p,f),h!=null&&u.push(pi(p,h,m)))),d)break;p=p.return}0<u.length&&(s=new c(s,l,null,n,i),o.push({event:s,listeners:u}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,s&&n!==Ie&&(l=n.relatedTarget||n.fromElement)&&(H(l)||l[Ii]))break a;if((c||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?H(l):null,l!==null&&(d=at(l),l!==d||l.tag!==5&&l.tag!==6)&&(l=null)):(c=null,l=r),c!==l)){if(u=In,h=`onMouseLeave`,f=`onMouseEnter`,p=`mouse`,(e===`pointerout`||e===`pointerover`)&&(u=Jn,h=`onPointerLeave`,f=`onPointerEnter`,p=`pointer`),d=c==null?s:Vi(c),m=l==null?s:Vi(l),s=new u(h,p+`leave`,c,n,i),s.target=d,s.relatedTarget=m,h=null,H(i)===r&&(u=new u(f,p+`enter`,l,n,i),u.target=m,u.relatedTarget=d,h=u),d=h,c&&l)b:{for(u=c,f=l,p=0,m=u;m;m=hi(m))p++;for(m=0,h=f;h;h=hi(h))m++;for(;0<p-m;)u=hi(u),p--;for(;0<m-p;)f=hi(f),m--;for(;p--;){if(u===f||f!==null&&u===f.alternate)break b;u=hi(u),f=hi(f)}u=null}else u=null;c!==null&&gi(o,s,c,u,!1),l!==null&&d!==null&&gi(o,d,l,u,!0)}}a:{if(s=r?Vi(r):window,c=s.nodeName&&s.nodeName.toLowerCase(),c===`select`||c===`input`&&s.type===`file`)var g=_r;else if(dr(s))if(vr)g=Dr;else{g=Tr;var _=wr}else (c=s.nodeName)&&c.toLowerCase()===`input`&&(s.type===`checkbox`||s.type===`radio`)&&(g=Er);if(g&&=g(e,r)){fr(o,g,n,i);break a}_&&_(e,s,r),e===`focusout`&&(_=s._wrapperState)&&_.controlled&&s.type===`number`&&_e(s,`number`,s.value)}switch(_=r?Vi(r):window,e){case`focusin`:(dr(_)||_.contentEditable===`true`)&&(Rr=_,zr=r,Br=null);break;case`focusout`:Br=zr=Rr=null;break;case`mousedown`:Vr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Vr=!1,Hr(o,n,i);break;case`selectionchange`:if(Lr)break;case`keydown`:case`keyup`:Hr(o,n,i)}var v;if($n)b:{switch(e){case`compositionstart`:var y=`onCompositionStart`;break b;case`compositionend`:y=`onCompositionEnd`;break b;case`compositionupdate`:y=`onCompositionUpdate`;break b}y=void 0}else sr?ar(e,n)&&(y=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(y=`onCompositionStart`);y&&(nr&&n.locale!==`ko`&&(sr||y!==`onCompositionStart`?y===`onCompositionEnd`&&sr&&(v=Cn()):(bn=i,xn=`value`in bn?bn.value:bn.textContent,sr=!0)),_=mi(r,y),0<_.length&&(y=new Vn(y,e,null,n,i),o.push({event:y,listeners:_}),v?y.data=v:(v=or(n),v!==null&&(y.data=v)))),(v=tr?cr(e,n):lr(e,n))&&(r=mi(r,`onBeforeInput`),0<r.length&&(i=new Vn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:i,listeners:r}),i.data=v))}oi(o,t)})}function pi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function mi(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=Je(e,n),a!=null&&r.unshift(pi(e,a,i)),a=Je(e,t),a!=null&&r.push(pi(e,a,i))),e=e.return}return r}function hi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function gi(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(c!==null&&c===r)break;s.tag===5&&l!==null&&(s=l,i?(c=Je(n,a),c!=null&&o.unshift(pi(n,c,s))):i||(c=Je(n,a),c!=null&&o.push(pi(n,c,s)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var _i=/\r\n?/g,vi=/\u0000|\uFFFD/g;function yi(e){return(typeof e==`string`?e:``+e).replace(_i,`
6
- `).replace(vi,``)}function bi(e,t,n){if(t=yi(t),yi(e)!==t&&n)throw Error(r(425))}function xi(){}var Si=null,Ci=null;function wi(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ti=typeof setTimeout==`function`?setTimeout:void 0,Ei=typeof clearTimeout==`function`?clearTimeout:void 0,Di=typeof Promise==`function`?Promise:void 0,Oi=typeof queueMicrotask==`function`?queueMicrotask:Di===void 0?Ti:function(e){return Di.resolve(null).then(e).catch(ki)};function ki(e){setTimeout(function(){throw e})}function Ai(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===`/$`){if(r===0){e.removeChild(i),dn(t);return}r--}else n!==`$`&&n!==`$?`&&n!==`$!`||r++;n=i}while(n);dn(t)}function ji(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===`$?`)break;if(t===`/$`)return null}}return e}function Mi(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`){if(t===0)return e;t--}else n===`/$`&&t++}e=e.previousSibling}return null}var Ni=Math.random().toString(36).slice(2),Pi=`__reactFiber$`+Ni,Fi=`__reactProps$`+Ni,Ii=`__reactContainer$`+Ni,Li=`__reactEvents$`+Ni,Ri=`__reactListeners$`+Ni,zi=`__reactHandles$`+Ni;function H(e){var t=e[Pi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ii]||n[Pi]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Mi(e);e!==null;){if(n=e[Pi])return n;e=Mi(e)}return t}e=n,n=e.parentNode}return null}function Bi(e){return e=e[Pi]||e[Ii],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Vi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(r(33))}function Hi(e){return e[Fi]||null}var Ui=[],Wi=-1;function Gi(e){return{current:e}}function Ki(e){0>Wi||(e.current=Ui[Wi],Ui[Wi]=null,Wi--)}function qi(e,t){Wi++,Ui[Wi]=e.current,e.current=t}var Ji={},Yi=Gi(Ji),Xi=Gi(!1),Zi=Ji;function Qi(e,t){var n=e.type.contextTypes;if(!n)return Ji;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function $i(e){return e=e.childContextTypes,e!=null}function ea(){Ki(Xi),Ki(Yi)}function ta(e,t,n){if(Yi.current!==Ji)throw Error(r(168));qi(Yi,t),qi(Xi,n)}function na(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!=`function`)return n;for(var a in i=i.getChildContext(),i)if(!(a in t))throw Error(r(108,se(e)||`Unknown`,a));return ee({},n,i)}function ra(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ji,Zi=Yi.current,qi(Yi,e),qi(Xi,Xi.current),!0}function ia(e,t,n){var i=e.stateNode;if(!i)throw Error(r(169));n?(e=na(e,t,Zi),i.__reactInternalMemoizedMergedChildContext=e,Ki(Xi),Ki(Yi),qi(Yi,e)):Ki(Xi),qi(Xi,n)}var aa=null,oa=!1,sa=!1;function ca(e){aa===null?aa=[e]:aa.push(e)}function la(e){oa=!0,ca(e)}function ua(){if(!sa&&aa!==null){sa=!0;var e=0,t=Vt;try{var n=aa;for(Vt=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}aa=null,oa=!1}catch(t){throw aa!==null&&(aa=aa.slice(e+1)),dt(_t,ua),t}finally{Vt=t,sa=!1}}return null}var da=[],fa=0,pa=null,ma=0,ha=[],ga=0,_a=null,va=1,ya=``;function ba(e,t){da[fa++]=ma,da[fa++]=pa,pa=e,ma=t}function xa(e,t,n){ha[ga++]=va,ha[ga++]=ya,ha[ga++]=_a,_a=e;var r=va;e=ya;var i=32-Tt(r)-1;r&=~(1<<i),n+=1;var a=32-Tt(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,va=1<<32-Tt(t)+i|n<<i|r,ya=a+e}else va=1<<a|n<<i|r,ya=e}function Sa(e){e.return!==null&&(ba(e,1),xa(e,1,0))}function Ca(e){for(;e===pa;)pa=da[--fa],da[fa]=null,ma=da[--fa],da[fa]=null;for(;e===_a;)_a=ha[--ga],ha[ga]=null,ya=ha[--ga],ha[ga]=null,va=ha[--ga],ha[ga]=null}var wa=null,Ta=null,Ea=!1,Da=null;function Oa(e,t){var n=tu(5,null,null,0);n.elementType=`DELETED`,n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function ka(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t===null?!1:(e.stateNode=t,wa=e,Ta=ji(t.firstChild),!0);case 6:return t=e.pendingProps===``||t.nodeType!==3?null:t,t===null?!1:(e.stateNode=t,wa=e,Ta=null,!0);case 13:return t=t.nodeType===8?t:null,t===null?!1:(n=_a===null?null:{id:va,overflow:ya},e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=tu(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,wa=e,Ta=null,!0);default:return!1}}function Aa(e){return(e.mode&1)!=0&&(e.flags&128)==0}function ja(e){if(Ea){var t=Ta;if(t){var n=t;if(!ka(e,t)){if(Aa(e))throw Error(r(418));t=ji(n.nextSibling);var i=wa;t&&ka(e,t)?Oa(i,n):(e.flags=e.flags&-4097|2,Ea=!1,wa=e)}}else{if(Aa(e))throw Error(r(418));e.flags=e.flags&-4097|2,Ea=!1,wa=e}}}function Ma(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;wa=e}function Na(e){if(e!==wa)return!1;if(!Ea)return Ma(e),Ea=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!==`head`&&t!==`body`&&!wi(e.type,e.memoizedProps)),t&&=Ta){if(Aa(e))throw Pa(),Error(r(418));for(;t;)Oa(e,t),t=ji(t.nextSibling)}if(Ma(e),e.tag===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(r(317));a:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`){if(t===0){Ta=ji(e.nextSibling);break a}t--}else n!==`$`&&n!==`$!`&&n!==`$?`||t++}e=e.nextSibling}Ta=null}}else Ta=wa?ji(e.stateNode.nextSibling):null;return!0}function Pa(){for(var e=Ta;e;)e=ji(e.nextSibling)}function Fa(){Ta=wa=null,Ea=!1}function Ia(e){Da===null?Da=[e]:Da.push(e)}var La=C.ReactCurrentBatchConfig;function Ra(e,t,n){if(e=n.ref,e!==null&&typeof e!=`function`&&typeof e!=`object`){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(r(309));var i=n.stateNode}if(!i)throw Error(r(147,e));var a=i,o=``+e;return t!==null&&t.ref!==null&&typeof t.ref==`function`&&t.ref._stringRef===o?t.ref:(t=function(e){var t=a.refs;e===null?delete t[o]:t[o]=e},t._stringRef=o,t)}if(typeof e!=`string`)throw Error(r(284));if(!n._owner)throw Error(r(290,e))}return e}function za(e,t){throw e=Object.prototype.toString.call(t),Error(r(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e))}function Ba(e){var t=e._init;return t(e._payload)}function Va(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 i(e,t){for(e=new Map;t!==null;)t.key===null?e.set(t.index,t):e.set(t.key,t),t=t.sibling;return e}function a(e,t){return e=iu(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|=2,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|=2),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=cu(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===E?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===F&&Ba(i)===t.type)?(r=a(t,n.props),r.ref=Ra(e,t,n),r.return=e,r):(r=au(n.type,n.key,n.props,null,e.mode,r),r.ref=Ra(e,t,n),r.return=e,r)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=lu(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=ou(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`)return t=cu(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case w:return n=au(t.type,t.key,t.props,null,e.mode,n),n.ref=Ra(e,null,t),n.return=e,n;case T:return t=lu(t,e.mode,n),t.return=e,t;case F:var r=t._init;return f(e,r(t._payload),n)}if(ve(t)||R(t))return t=ou(t,e.mode,n,null),t.return=e,t;za(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case w:return n.key===i?l(e,t,n,r):null;case T:return n.key===i?u(e,t,n,r):null;case F:return i=n._init,p(e,t,i(n._payload),r)}if(ve(n)||R(n))return i===null?d(e,t,n,r,null):null;za(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case w:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case T:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case F:var a=r._init;return m(e,t,n,a(r._payload),i)}if(ve(r)||R(r))return e=e.get(n)||null,d(t,e,r,i,null);za(t,r)}return null}function h(r,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(r,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(r,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(r,d),Ea&&ba(r,h),l;if(d===null){for(;h<s.length;h++)d=f(r,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Ea&&ba(r,h),l}for(d=i(r,d);h<s.length;h++)g=m(d,r,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(r,e)}),Ea&&ba(r,h),l}function g(a,s,c,l){var u=R(c);if(typeof u!=`function`)throw Error(r(150));if(c=u.call(c),c==null)throw Error(r(151));for(var d=u=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),Ea&&ba(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 Ea&&ba(a,g),u}for(h=i(a,h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Ea&&ba(a,g),u}function _(e,r,i,o){if(typeof i==`object`&&i&&i.type===E&&i.key===null&&(i=i.props.children),typeof i==`object`&&i){switch(i.$$typeof){case w:a:{for(var c=i.key,l=r;l!==null;){if(l.key===c){if(c=i.type,c===E){if(l.tag===7){n(e,l.sibling),r=a(l,i.props.children),r.return=e,e=r;break a}}else if(l.elementType===c||typeof c==`object`&&c&&c.$$typeof===F&&Ba(c)===l.type){n(e,l.sibling),r=a(l,i.props),r.ref=Ra(e,l,i),r.return=e,e=r;break a}n(e,l);break}else t(e,l);l=l.sibling}i.type===E?(r=ou(i.props.children,e.mode,o,i.key),r.return=e,e=r):(o=au(i.type,i.key,i.props,null,e.mode,o),o.ref=Ra(e,r,i),o.return=e,e=o)}return s(e);case T:a:{for(l=i.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),r=a(r,i.children||[]),r.return=e,e=r;break a}else{n(e,r);break}else t(e,r);r=r.sibling}r=lu(i,e.mode,o),r.return=e,e=r}return s(e);case F:return l=i._init,_(e,r,l(i._payload),o)}if(ve(i))return h(e,r,i,o);if(R(i))return g(e,r,i,o);za(e,i)}return typeof i==`string`&&i!==``||typeof i==`number`?(i=``+i,r!==null&&r.tag===6?(n(e,r.sibling),r=a(r,i),r.return=e,e=r):(n(e,r),r=cu(i,e.mode,o),r.return=e,e=r),s(e)):n(e,r)}return _}var Ha=Va(!0),Ua=Va(!1),Wa=Gi(null),Ga=null,Ka=null,qa=null;function Ja(){qa=Ka=Ga=null}function Ya(e){var t=Wa.current;Ki(Wa),e._currentValue=t}function Xa(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 Za(e,t){Ga=e,qa=Ka=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Vs=!0),e.firstContext=null)}function Qa(e){var t=e._currentValue;if(qa!==e)if(e={context:e,memoizedValue:t,next:null},Ka===null){if(Ga===null)throw Error(r(308));Ka=e,Ga.dependencies={lanes:0,firstContext:e}}else Ka=Ka.next=e;return t}var $a=null;function eo(e){$a===null?$a=[e]:$a.push(e)}function to(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,eo(t)):(n.next=i.next,i.next=n),t.interleaved=n,no(e,r)}function no(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var ro=!1;function io(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ao(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function oo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function so(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Yc&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,no(e,n)}return i=r.interleaved,i===null?(t.next=t,eo(r)):(t.next=i.next,i.next=t),r.interleaved=t,no(e,n)}function co(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194240)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Bt(e,n)}}function lo(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={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,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,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function uo(e,t,n,r){var i=e.updateQueue;ro=!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,p=s.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});a:{var m=e,h=s;switch(f=t,p=n,h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(p,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(p,d,f):m,f==null)break a;d=ee({},d,f);break a;case 2:ro=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[s]:f.push(s))}else p={eventTime: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;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(1);if(u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);rl|=o,e.lanes=o,e.memoizedState=d}}function fo(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],a=i.callback;if(a!==null){if(i.callback=null,i=n,typeof a!=`function`)throw Error(r(191,a));a.call(i)}}}var po={},mo=Gi(po),ho=Gi(po),go=Gi(po);function _o(e){if(e===po)throw Error(r(174));return e}function vo(e,t){switch(qi(go,t),qi(ho,e),qi(mo,po),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Te(null,``);break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Te(t,e)}Ki(mo),qi(mo,t)}function yo(){Ki(mo),Ki(ho),Ki(go)}function bo(e){_o(go.current);var t=_o(mo.current),n=Te(t,e.type);t!==n&&(qi(ho,e),qi(mo,n))}function xo(e){ho.current===e&&(Ki(mo),Ki(ho))}var So=Gi(0);function Co(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data===`$?`||n.data===`$!`))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){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 wo=[];function To(){for(var e=0;e<wo.length;e++)wo[e]._workInProgressVersionPrimary=null;wo.length=0}var Eo=C.ReactCurrentDispatcher,Do=C.ReactCurrentBatchConfig,Oo=0,ko=null,Ao=null,jo=null,Mo=!1,No=!1,Po=0,Fo=0;function Io(){throw Error(r(321))}function Lo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!kr(e[n],t[n]))return!1;return!0}function Ro(e,t,n,i,a,o){if(Oo=o,ko=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Eo.current=e===null||e.memoizedState===null?xs:Ss,e=n(i,a),No){o=0;do{if(No=!1,Po=0,25<=o)throw Error(r(301));o+=1,jo=Ao=null,t.updateQueue=null,Eo.current=Cs,e=n(i,a)}while(No)}if(Eo.current=bs,t=Ao!==null&&Ao.next!==null,Oo=0,jo=Ao=ko=null,Mo=!1,t)throw Error(r(300));return e}function zo(){var e=Po!==0;return Po=0,e}function Bo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jo===null?ko.memoizedState=jo=e:jo=jo.next=e,jo}function Vo(){if(Ao===null){var e=ko.alternate;e=e===null?null:e.memoizedState}else e=Ao.next;var t=jo===null?ko.memoizedState:jo.next;if(t!==null)jo=t,Ao=e;else{if(e===null)throw Error(r(310));Ao=e,e={memoizedState:Ao.memoizedState,baseState:Ao.baseState,baseQueue:Ao.baseQueue,queue:Ao.queue,next:null},jo===null?ko.memoizedState=jo=e:jo=jo.next=e}return jo}function Ho(e,t){return typeof t==`function`?t(e):t}function Uo(e){var t=Vo(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=Ao,a=i.baseQueue,o=n.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}i.baseQueue=a=o,n.pending=null}if(a!==null){o=a.next,i=i.baseState;var c=s=null,l=null,u=o;do{var d=u.lane;if((Oo&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),i=u.hasEagerState?u.eagerState:e(i,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(c=l=f,s=i):l=l.next=f,ko.lanes|=d,rl|=d}u=u.next}while(u!==null&&u!==o);l===null?s=i:l.next=c,kr(i,t.memoizedState)||(Vs=!0),t.memoizedState=i,t.baseState=s,t.baseQueue=l,n.lastRenderedState=i}if(e=n.interleaved,e!==null){a=e;do o=a.lane,ko.lanes|=o,rl|=o,a=a.next;while(a!==e)}else a===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Wo(e){var t=Vo(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=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);kr(o,t.memoizedState)||(Vs=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,i]}function Go(){}function Ko(e,t){var n=ko,i=Vo(),a=t(),o=!kr(i.memoizedState,a);if(o&&(i.memoizedState=a,Vs=!0),i=i.queue,is(Yo.bind(null,n,i,e),[e]),i.getSnapshot!==t||o||jo!==null&&jo.memoizedState.tag&1){if(n.flags|=2048,$o(9,Jo.bind(null,n,i,a,t),void 0,null),Xc===null)throw Error(r(349));Oo&30||qo(n,t,a)}return a}function qo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ko.updateQueue,t===null?(t={lastEffect:null,stores:null},ko.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Jo(e,t,n,r){t.value=n,t.getSnapshot=r,Xo(t)&&Zo(e)}function Yo(e,t,n){return n(function(){Xo(t)&&Zo(e)})}function Xo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!kr(e,n)}catch{return!0}}function Zo(e){var t=no(e,1);t!==null&&Cl(t,e,1,-1)}function Qo(e){var t=Bo();return typeof e==`function`&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ho,lastRenderedState:e},t.queue=e,e=e.dispatch=gs.bind(null,ko,e),[t.memoizedState,e]}function $o(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ko.updateQueue,t===null?(t={lastEffect:null,stores:null},ko.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function es(){return Vo().memoizedState}function ts(e,t,n,r){var i=Bo();ko.flags|=e,i.memoizedState=$o(1|t,n,void 0,r===void 0?null:r)}function ns(e,t,n,r){var i=Vo();r=r===void 0?null:r;var a=void 0;if(Ao!==null){var o=Ao.memoizedState;if(a=o.destroy,r!==null&&Lo(r,o.deps)){i.memoizedState=$o(t,n,a,r);return}}ko.flags|=e,i.memoizedState=$o(1|t,n,a,r)}function rs(e,t){return ts(8390656,8,e,t)}function is(e,t){return ns(2048,8,e,t)}function as(e,t){return ns(4,2,e,t)}function os(e,t){return ns(4,4,e,t)}function ss(e,t){if(typeof t==`function`)return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function cs(e,t,n){return n=n==null?null:n.concat([e]),ns(4,4,ss.bind(null,t,e),n)}function ls(){}function us(e,t){var n=Vo();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Lo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ds(e,t){var n=Vo();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Lo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function fs(e,t,n){return Oo&21?(kr(n,t)||(n=It(),ko.lanes|=n,rl|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Vs=!0),e.memoizedState=n)}function ps(e,t){var n=Vt;Vt=n!==0&&4>n?n:4,e(!0);var r=Do.transition;Do.transition={};try{e(!1),t()}finally{Vt=n,Do.transition=r}}function ms(){return Vo().memoizedState}function hs(e,t,n){var r=Sl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},_s(e))vs(t,n);else if(n=to(e,t,n,r),n!==null){var i=xl();Cl(n,e,r,i),ys(n,t,r)}}function gs(e,t,n){var r=Sl(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(_s(e))vs(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,kr(s,o)){var c=t.interleaved;c===null?(i.next=i,eo(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}n=to(e,t,i,r),n!==null&&(i=xl(),Cl(n,e,r,i),ys(n,t,r))}}function _s(e){var t=e.alternate;return e===ko||t!==null&&t===ko}function vs(e,t){No=Mo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ys(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Bt(e,n)}}var bs={readContext:Qa,useCallback:Io,useContext:Io,useEffect:Io,useImperativeHandle:Io,useInsertionEffect:Io,useLayoutEffect:Io,useMemo:Io,useReducer:Io,useRef:Io,useState:Io,useDebugValue:Io,useDeferredValue:Io,useTransition:Io,useMutableSource:Io,useSyncExternalStore:Io,useId:Io,unstable_isNewReconciler:!1},xs={readContext:Qa,useCallback:function(e,t){return Bo().memoizedState=[e,t===void 0?null:t],e},useContext:Qa,useEffect:rs,useImperativeHandle:function(e,t,n){return n=n==null?null:n.concat([e]),ts(4194308,4,ss.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ts(4194308,4,e,t)},useInsertionEffect:function(e,t){return ts(4,2,e,t)},useMemo:function(e,t){var n=Bo();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Bo();return t=n===void 0?t:n(t),r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=hs.bind(null,ko,e),[r.memoizedState,e]},useRef:function(e){var t=Bo();return e={current:e},t.memoizedState=e},useState:Qo,useDebugValue:ls,useDeferredValue:function(e){return Bo().memoizedState=e},useTransition:function(){var e=Qo(!1),t=e[0];return e=ps.bind(null,e[1]),Bo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=ko,a=Bo();if(Ea){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),Xc===null)throw Error(r(349));Oo&30||qo(i,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,rs(Yo.bind(null,i,o,e),[e]),i.flags|=2048,$o(9,Jo.bind(null,i,o,n,t),void 0,null),n},useId:function(){var e=Bo(),t=Xc.identifierPrefix;if(Ea){var n=ya,r=va;n=(r&~(1<<32-Tt(r)-1)).toString(32)+n,t=`:`+t+`R`+n,n=Po++,0<n&&(t+=`H`+n.toString(32)),t+=`:`}else n=Fo++,t=`:`+t+`r`+n.toString(32)+`:`;return e.memoizedState=t},unstable_isNewReconciler:!1},Ss={readContext:Qa,useCallback:us,useContext:Qa,useEffect:is,useImperativeHandle:cs,useInsertionEffect:as,useLayoutEffect:os,useMemo:ds,useReducer:Uo,useRef:es,useState:function(){return Uo(Ho)},useDebugValue:ls,useDeferredValue:function(e){return fs(Vo(),Ao.memoizedState,e)},useTransition:function(){return[Uo(Ho)[0],Vo().memoizedState]},useMutableSource:Go,useSyncExternalStore:Ko,useId:ms,unstable_isNewReconciler:!1},Cs={readContext:Qa,useCallback:us,useContext:Qa,useEffect:is,useImperativeHandle:cs,useInsertionEffect:as,useLayoutEffect:os,useMemo:ds,useReducer:Wo,useRef:es,useState:function(){return Wo(Ho)},useDebugValue:ls,useDeferredValue:function(e){var t=Vo();return Ao===null?t.memoizedState=e:fs(t,Ao.memoizedState,e)},useTransition:function(){return[Wo(Ho)[0],Vo().memoizedState]},useMutableSource:Go,useSyncExternalStore:Ko,useId:ms,unstable_isNewReconciler:!1};function ws(e,t){if(e&&e.defaultProps){for(var n in t=ee({},t),e=e.defaultProps,e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Ts(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ee({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Es={isMounted:function(e){return(e=e._reactInternals)?at(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=xl(),i=Sl(e),a=oo(r,i);a.payload=t,n!=null&&(a.callback=n),t=so(e,a,i),t!==null&&(Cl(t,e,i,r),co(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=xl(),i=Sl(e),a=oo(r,i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=so(e,a,i),t!==null&&(Cl(t,e,i,r),co(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=xl(),r=Sl(e),i=oo(n,r);i.tag=2,t!=null&&(i.callback=t),t=so(e,i,r),t!==null&&(Cl(t,e,r,n),co(t,e,r))}};function Ds(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?!Ar(n,r)||!Ar(i,a):!0}function Os(e,t,n){var r=!1,i=Ji,a=t.contextType;return typeof a==`object`&&a?a=Qa(a):(i=$i(t)?Zi:Yi.current,r=t.contextTypes,a=(r=r!=null)?Qi(e,i):Ji),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Es,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function ks(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&&Es.enqueueReplaceState(t,t.state,null)}function As(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},io(e);var a=t.contextType;typeof a==`object`&&a?i.context=Qa(a):(a=$i(t)?Zi:Yi.current,i.context=Qi(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a==`function`&&(Ts(e,t,a,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps==`function`||typeof i.getSnapshotBeforeUpdate==`function`||typeof i.UNSAFE_componentWillMount!=`function`&&typeof i.componentWillMount!=`function`||(t=i.state,typeof i.componentWillMount==`function`&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount==`function`&&i.UNSAFE_componentWillMount(),t!==i.state&&Es.enqueueReplaceState(i,i.state,null),uo(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount==`function`&&(e.flags|=4194308)}function js(e,t){try{var n=``,r=t;do n+=ae(r),r=r.return;while(r);var i=n}catch(e){i=`
7
- Error generating stack: `+e.message+`
8
- `+e.stack}return{value:e,source:t,stack:i,digest:null}}function Ms(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Ns(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var Ps=typeof WeakMap==`function`?WeakMap:Map;function Fs(e,t,n){n=oo(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){dl||(dl=!0,fl=r),Ns(e,t)},n}function Is(e,t,n){n=oo(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r==`function`){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Ns(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch==`function`&&(n.callback=function(){Ns(e,t),typeof r!=`function`&&(pl===null?pl=new Set([this]):pl.add(this));var n=t.stack;this.componentDidCatch(t.value,{componentStack:n===null?``:n})}),n}function Ls(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ps;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)||(i.add(n),e=Jl.bind(null,e,t,n),t.then(e,e))}function Rs(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t===null?!0:t.dehydrated!==null),t)return e;e=e.return}while(e!==null);return null}function zs(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=oo(-1,1),t.tag=2,so(n,t,1))),n.lanes|=1),e)}var Bs=C.ReactCurrentOwner,Vs=!1;function Hs(e,t,n,r){t.child=e===null?Ua(t,null,n,r):Ha(t,e.child,n,r)}function Us(e,t,n,r,i){n=n.render;var a=t.ref;return Za(t,i),r=Ro(e,t,n,r,a,i),n=zo(),e!==null&&!Vs?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,lc(e,t,i)):(Ea&&n&&Sa(t),t.flags|=1,Hs(e,t,r,i),t.child)}function Ws(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!nu(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,Gs(e,t,a,r,i)):(e=au(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&i)===0){var o=a.memoizedProps;if(n=n.compare,n=n===null?Ar:n,n(o,r)&&e.ref===t.ref)return lc(e,t,i)}return t.flags|=1,e=iu(a,r),e.ref=t.ref,e.return=t,t.child=e}function Gs(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Ar(a,r)&&e.ref===t.ref)if(Vs=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(Vs=!0);else return t.lanes=e.lanes,lc(e,t,i)}return Js(e,t,n,r,i)}function Ks(e,t,n){var r=t.pendingProps,i=r.children,a=e===null?null:e.memoizedState;if(r.mode===`hidden`)if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},qi(el,$c),$c|=n;else{if(!(n&1073741824))return e=a===null?n:a.baseLanes|n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,qi(el,$c),$c|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a===null?n:a.baseLanes,qi(el,$c),$c|=r}else a===null?r=n:(r=a.baseLanes|n,t.memoizedState=null),qi(el,$c),$c|=r;return Hs(e,t,i,n),t.child}function qs(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Js(e,t,n,r,i){var a=$i(n)?Zi:Yi.current;return a=Qi(t,a),Za(t,i),n=Ro(e,t,n,r,a,i),r=zo(),e!==null&&!Vs?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,lc(e,t,i)):(Ea&&r&&Sa(t),t.flags|=1,Hs(e,t,n,i),t.child)}function Ys(e,t,n,r,i){if($i(n)){var a=!0;ra(t)}else a=!1;if(Za(t,i),t.stateNode===null)cc(e,t),Os(t,n,r),As(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var c=o.context,l=n.contextType;typeof l==`object`&&l?l=Qa(l):(l=$i(n)?Zi:Yi.current,l=Qi(t,l));var u=n.getDerivedStateFromProps,d=typeof u==`function`||typeof o.getSnapshotBeforeUpdate==`function`;d||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==r||c!==l)&&ks(t,o,r,l),ro=!1;var f=t.memoizedState;o.state=f,uo(t,r,o,i),c=t.memoizedState,s!==r||f!==c||Xi.current||ro?(typeof u==`function`&&(Ts(t,n,u,r),c=t.memoizedState),(s=ro||Ds(t,n,s,r,f,c,l))?(d||typeof o.UNSAFE_componentWillMount!=`function`&&typeof o.componentWillMount!=`function`||(typeof o.componentWillMount==`function`&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount==`function`&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount==`function`&&(t.flags|=4194308)):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=l,r=s):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,ao(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:ws(t.type,s),o.props=l,d=t.pendingProps,f=o.context,c=n.contextType,typeof c==`object`&&c?c=Qa(c):(c=$i(n)?Zi:Yi.current,c=Qi(t,c));var p=n.getDerivedStateFromProps;(u=typeof p==`function`||typeof o.getSnapshotBeforeUpdate==`function`)||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==d||f!==c)&&ks(t,o,r,c),ro=!1,f=t.memoizedState,o.state=f,uo(t,r,o,i);var m=t.memoizedState;s!==d||f!==m||Xi.current||ro?(typeof p==`function`&&(Ts(t,n,p,r),m=t.memoizedState),(l=ro||Ds(t,n,l,r,f,m,c)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!=`function`&&typeof o.componentWillUpdate!=`function`||(typeof o.componentWillUpdate==`function`&&o.componentWillUpdate(r,m,c),typeof o.UNSAFE_componentWillUpdate==`function`&&o.UNSAFE_componentWillUpdate(r,m,c)),typeof o.componentDidUpdate==`function`&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=c,r=l):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Xs(e,t,n,r,a,i)}function Xs(e,t,n,r,i,a){qs(e,t);var o=(t.flags&128)!=0;if(!r&&!o)return i&&ia(t,n,!1),lc(e,t,a);r=t.stateNode,Bs.current=t;var s=o&&typeof n.getDerivedStateFromError!=`function`?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Ha(t,e.child,null,a),t.child=Ha(t,null,s,a)):Hs(e,t,s,a),t.memoizedState=r.state,i&&ia(t,n,!0),t.child}function Zs(e){var t=e.stateNode;t.pendingContext?ta(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ta(e,t.context,!1),vo(e,t.containerInfo)}function Qs(e,t,n,r,i){return Fa(),Ia(i),t.flags|=256,Hs(e,t,n,r),t.child}var $s={dehydrated:null,treeContext:null,retryLane:0};function ec(e){return{baseLanes:e,cachePool:null,transitions:null}}function tc(e,t,n){var r=t.pendingProps,i=So.current,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!=0),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),qi(So,i&1),e===null)return ja(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data===`$!`?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,a?(r=t.mode,a=t.child,o={mode:`hidden`,children:o},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=su(o,r,0,null),e=ou(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=ec(n),t.memoizedState=$s,e):nc(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return ic(e,t,o,r,s,i,n);if(a){a=r.fallback,o=t.mode,i=e.child,s=i.sibling;var c={mode:`hidden`,children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=iu(i,c),r.subtreeFlags=i.subtreeFlags&14680064),s===null?(a=ou(a,o,n,null),a.flags|=2):a=iu(s,a),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,o=e.child.memoizedState,o=o===null?ec(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=$s,r}return a=e.child,e=a.sibling,r=iu(a,{mode:`visible`,children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function nc(e,t){return t=su({mode:`visible`,children:t},e.mode,0,null),t.return=e,e.child=t}function rc(e,t,n,r){return r!==null&&Ia(r),Ha(t,e.child,null,n),e=nc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ic(e,t,n,i,a,o,s){if(n)return t.flags&256?(t.flags&=-257,i=Ms(Error(r(422))),rc(e,t,s,i)):t.memoizedState===null?(o=i.fallback,a=t.mode,i=su({mode:`visible`,children:i.children},a,0,null),o=ou(o,a,s,null),o.flags|=2,i.return=t,o.return=t,i.sibling=o,t.child=i,t.mode&1&&Ha(t,e.child,null,s),t.child.memoizedState=ec(s),t.memoizedState=$s,o):(t.child=e.child,t.flags|=128,null);if(!(t.mode&1))return rc(e,t,s,null);if(a.data===`$!`){if(i=a.nextSibling&&a.nextSibling.dataset,i)var c=i.dgst;return i=c,o=Error(r(419)),i=Ms(o,i,void 0),rc(e,t,s,i)}if(c=(s&e.childLanes)!==0,Vs||c){if(i=Xc,i!==null){switch(s&-s){case 4:a=2;break;case 16:a=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}a=(a&(i.suspendedLanes|s))===0?a:0,a!==0&&a!==o.retryLane&&(o.retryLane=a,no(e,a),Cl(i,e,a,-1))}return Ll(),i=Ms(Error(r(421))),rc(e,t,s,i)}return a.data===`$?`?(t.flags|=128,t.child=e.child,t=Xl.bind(null,e),a._reactRetry=t,null):(e=o.treeContext,Ta=ji(a.nextSibling),wa=t,Ea=!0,Da=null,e!==null&&(ha[ga++]=va,ha[ga++]=ya,ha[ga++]=_a,va=e.id,ya=e.overflow,_a=t),t=nc(t,i.children),t.flags|=4096,t)}function ac(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Xa(e.return,t,n)}function oc(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function sc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Hs(e,t,r.children,n),r=So.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ac(e,n,t);else if(e.tag===19)ac(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}r&=1}if(qi(So,r),!(t.mode&1))t.memoizedState=null;else switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Co(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),oc(t,!1,i,n,a);break;case`backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Co(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}oc(t,!0,n,null,a);break;case`together`:oc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function cc(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function lc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),rl|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=iu(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=iu(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function uc(e,t,n){switch(t.tag){case 3:Zs(t),Fa();break;case 5:bo(t);break;case 1:$i(t.type)&&ra(t);break;case 4:vo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;qi(Wa,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(qi(So,So.current&1),e=lc(e,t,n),e===null?null:e.sibling):tc(e,t,n):(qi(So,So.current&1),t.flags|=128,null);qi(So,So.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return sc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),qi(So,So.current),r)break;return null;case 22:case 23:return t.lanes=0,Ks(e,t,n)}return lc(e,t,n)}var dc=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},fc=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,_o(mo.current);var o=null;switch(n){case`input`:i=fe(e,i),r=fe(e,r),o=[];break;case`select`:i=ee({},i,{value:void 0}),r=ee({},r,{value:void 0}),o=[];break;case`textarea`:i=be(e,i),r=be(e,r),o=[];break;default:typeof i.onClick!=`function`&&typeof r.onClick==`function`&&(e.onclick=xi)}Pe(n,r);var s;for(u in n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u===`style`){var c=i[u];for(s in c)c.hasOwnProperty(s)&&(n||={},n[s]=``)}else u!==`dangerouslySetInnerHTML`&&u!==`children`&&u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&u!==`autoFocus`&&(a.hasOwnProperty(u)?o||=[]:(o||=[]).push(u,null));for(u in r){var l=r[u];if(c=i?.[u],r.hasOwnProperty(u)&&l!==c&&(l!=null||c!=null))if(u===`style`)if(c){for(s in c)!c.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||={},n[s]=``);for(s in l)l.hasOwnProperty(s)&&c[s]!==l[s]&&(n||={},n[s]=l[s])}else n||(o||=[],o.push(u,n)),n=l;else u===`dangerouslySetInnerHTML`?(l=l?l.__html:void 0,c=c?c.__html:void 0,l!=null&&c!==l&&(o||=[]).push(u,l)):u===`children`?typeof l!=`string`&&typeof l!=`number`||(o||=[]).push(u,``+l):u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&(a.hasOwnProperty(u)?(l!=null&&u===`onScroll`&&si(`scroll`,e),o||c===l||(o=[])):(o||=[]).push(u,l))}n&&(o||=[]).push(`style`,n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}},pc=function(e,t,n,r){n!==r&&(t.flags|=4)};function mc(e,t){if(!Ea)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function hc(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&14680064,r|=i.flags&14680064,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 gc(e,t,n){var i=t.pendingProps;switch(Ca(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return hc(t),null;case 1:return $i(t.type)&&ea(),hc(t),null;case 3:return i=t.stateNode,yo(),Ki(Xi),Ki(Yi),To(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Na(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Da!==null&&(Dl(Da),Da=null))),hc(t),null;case 5:xo(t);var o=_o(go.current);if(n=t.type,e!==null&&t.stateNode!=null)fc(e,t,n,i,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(r(166));return hc(t),null}if(e=_o(mo.current),Na(t)){i=t.stateNode,n=t.type;var s=t.memoizedProps;switch(i[Pi]=t,i[Fi]=s,e=(t.mode&1)!=0,n){case`dialog`:si(`cancel`,i),si(`close`,i);break;case`iframe`:case`object`:case`embed`:si(`load`,i);break;case`video`:case`audio`:for(o=0;o<ri.length;o++)si(ri[o],i);break;case`source`:si(`error`,i);break;case`img`:case`image`:case`link`:si(`error`,i),si(`load`,i);break;case`details`:si(`toggle`,i);break;case`input`:pe(i,s),si(`invalid`,i);break;case`select`:i._wrapperState={wasMultiple:!!s.multiple},si(`invalid`,i);break;case`textarea`:xe(i,s),si(`invalid`,i)}for(var c in Pe(n,s),o=null,s)if(s.hasOwnProperty(c)){var l=s[c];c===`children`?typeof l==`string`?i.textContent!==l&&(!0!==s.suppressHydrationWarning&&bi(i.textContent,l,e),o=[`children`,l]):typeof l==`number`&&i.textContent!==``+l&&(!0!==s.suppressHydrationWarning&&bi(i.textContent,l,e),o=[`children`,``+l]):a.hasOwnProperty(c)&&l!=null&&c===`onScroll`&&si(`scroll`,i)}switch(n){case`input`:B(i),ge(i,s,!0);break;case`textarea`:B(i),Ce(i);break;case`select`:case`option`:break;default:typeof s.onClick==`function`&&(i.onclick=xi)}i=o,t.updateQueue=i,i!==null&&(t.flags|=4)}else{c=o.nodeType===9?o:o.ownerDocument,e===`http://www.w3.org/1999/xhtml`&&(e=we(n)),e===`http://www.w3.org/1999/xhtml`?n===`script`?(e=c.createElement(`div`),e.innerHTML=`<script><\/script>`,e=e.removeChild(e.firstChild)):typeof i.is==`string`?e=c.createElement(n,{is:i.is}):(e=c.createElement(n),n===`select`&&(c=e,i.multiple?c.multiple=!0:i.size&&(c.size=i.size))):e=c.createElementNS(e,n),e[Pi]=t,e[Fi]=i,dc(e,t,!1,!1),t.stateNode=e;a:{switch(c=Fe(n,i),n){case`dialog`:si(`cancel`,e),si(`close`,e),o=i;break;case`iframe`:case`object`:case`embed`:si(`load`,e),o=i;break;case`video`:case`audio`:for(o=0;o<ri.length;o++)si(ri[o],e);o=i;break;case`source`:si(`error`,e),o=i;break;case`img`:case`image`:case`link`:si(`error`,e),si(`load`,e),o=i;break;case`details`:si(`toggle`,e),o=i;break;case`input`:pe(e,i),o=fe(e,i),si(`invalid`,e);break;case`option`:o=i;break;case`select`:e._wrapperState={wasMultiple:!!i.multiple},o=ee({},i,{value:void 0}),si(`invalid`,e);break;case`textarea`:xe(e,i),o=be(e,i),si(`invalid`,e);break;default:o=i}for(s in Pe(n,o),l=o,l)if(l.hasOwnProperty(s)){var u=l[s];s===`style`?Me(e,u):s===`dangerouslySetInnerHTML`?(u=u?u.__html:void 0,u!=null&&De(e,u)):s===`children`?typeof u==`string`?(n!==`textarea`||u!==``)&&Oe(e,u):typeof u==`number`&&Oe(e,``+u):s!==`suppressContentEditableWarning`&&s!==`suppressHydrationWarning`&&s!==`autoFocus`&&(a.hasOwnProperty(s)?u!=null&&s===`onScroll`&&si(`scroll`,e):u!=null&&S(e,s,u,c))}switch(n){case`input`:B(e),ge(e,i,!1);break;case`textarea`:B(e),Ce(e);break;case`option`:i.value!=null&&e.setAttribute(`value`,``+ce(i.value));break;case`select`:e.multiple=!!i.multiple,s=i.value,s==null?i.defaultValue!=null&&ye(e,!!i.multiple,i.defaultValue,!0):ye(e,!!i.multiple,s,!1);break;default:typeof o.onClick==`function`&&(e.onclick=xi)}switch(n){case`button`:case`input`:case`select`:case`textarea`:i=!!i.autoFocus;break a;case`img`:i=!0;break a;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return hc(t),null;case 6:if(e&&t.stateNode!=null)pc(e,t,e.memoizedProps,i);else{if(typeof i!=`string`&&t.stateNode===null)throw Error(r(166));if(n=_o(go.current),_o(mo.current),Na(t)){if(i=t.stateNode,n=t.memoizedProps,i[Pi]=t,(s=i.nodeValue!==n)&&(e=wa,e!==null))switch(e.tag){case 3:bi(i.nodeValue,n,(e.mode&1)!=0);break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&bi(i.nodeValue,n,(e.mode&1)!=0)}s&&(t.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[Pi]=t,t.stateNode=i}return hc(t),null;case 13:if(Ki(So),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ea&&Ta!==null&&t.mode&1&&!(t.flags&128))Pa(),Fa(),t.flags|=98560,s=!1;else if(s=Na(t),i!==null&&i.dehydrated!==null){if(e===null){if(!s)throw Error(r(318));if(s=t.memoizedState,s=s===null?null:s.dehydrated,!s)throw Error(r(317));s[Pi]=t}else Fa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;hc(t),s=!1}else Da!==null&&(Dl(Da),Da=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,t.mode&1&&(e===null||So.current&1?tl===0&&(tl=3):Ll())),t.updateQueue!==null&&(t.flags|=4),hc(t),null);case 4:return yo(),e===null&&ui(t.stateNode.containerInfo),hc(t),null;case 10:return Ya(t.type._context),hc(t),null;case 17:return $i(t.type)&&ea(),hc(t),null;case 19:if(Ki(So),s=t.memoizedState,s===null)return hc(t),null;if(i=(t.flags&128)!=0,c=s.rendering,c===null)if(i)mc(s,!1);else{if(tl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(c=Co(e),c!==null){for(t.flags|=128,mc(s,!1),i=c.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;n!==null;)s=n,e=i,s.flags&=14680066,c=s.alternate,c===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,e=c.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return qi(So,So.current&1|2),t.child}e=e.sibling}s.tail!==null&&ht()>ll&&(t.flags|=128,i=!0,mc(s,!1),t.lanes=4194304)}else{if(!i)if(e=Co(c),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),mc(s,!0),s.tail===null&&s.tailMode===`hidden`&&!c.alternate&&!Ea)return hc(t),null}else 2*ht()-s.renderingStartTime>ll&&n!==1073741824&&(t.flags|=128,i=!0,mc(s,!1),t.lanes=4194304);s.isBackwards?(c.sibling=t.child,t.child=c):(n=s.last,n===null?t.child=c:n.sibling=c,s.last=c)}return s.tail===null?(hc(t),null):(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=ht(),t.sibling=null,n=So.current,qi(So,i?n&1|2:n&1),t);case 22:case 23:return Nl(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?$c&1073741824&&(hc(t),t.subtreeFlags&6&&(t.flags|=8192)):hc(t),null;case 24:return null;case 25:return null}throw Error(r(156,t.tag))}function _c(e,t){switch(Ca(t),t.tag){case 1:return $i(t.type)&&ea(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return yo(),Ki(Xi),Ki(Yi),To(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return xo(t),null;case 13:if(Ki(So),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Fa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ki(So),null;case 4:return yo(),null;case 10:return Ya(t.type._context),null;case 22:case 23:return Nl(),null;case 24:return null;default:return null}}var vc=!1,yc=!1,eee=typeof WeakSet==`function`?WeakSet:Set,U=null;function bc(e,t){var n=e.ref;if(n!==null)if(typeof n==`function`)try{n(null)}catch(n){ql(e,t,n)}else n.current=null}function xc(e,t,n){try{n()}catch(n){ql(e,t,n)}}var Sc=!1;function Cc(e,t){if(Si=pn,e=Pr(),Fr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||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===n&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Ci={focusedElem:e,selectionRange:n},pn=!1,U=t;U!==null;)if(t=U,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,U=e;else for(;U!==null;){t=U;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var g=h.memoizedProps,_=h.memoizedState,v=t.stateNode;v.__reactInternalSnapshotBeforeUpdate=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:ws(t.type,g),_)}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent=``:y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(e){ql(t,t.return,e)}if(e=t.sibling,e!==null){e.return=t.return,U=e;break}U=t.return}return h=Sc,Sc=!1,h}function wc(e,t,n){var r=t.updateQueue;if(r=r===null?null:r.lastEffect,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&xc(t,n,a)}i=i.next}while(i!==r)}}function Tc(e,t){if(t=t.updateQueue,t=t===null?null:t.lastEffect,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ec(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t==`function`?t(e):t.current=e}}function Dc(e){var t=e.alternate;t!==null&&(e.alternate=null,Dc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Pi],delete t[Fi],delete t[Li],delete t[Ri],delete t[zi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Oc(e){return e.tag===5||e.tag===3||e.tag===4}function kc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Oc(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.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 Ac(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=xi));else if(r!==4&&(e=e.child,e!==null))for(Ac(e,t,n),e=e.sibling;e!==null;)Ac(e,t,n),e=e.sibling}function jc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(jc(e,t,n),e=e.sibling;e!==null;)jc(e,t,n),e=e.sibling}var Mc=null,Nc=!1;function Pc(e,t,n){for(n=n.child;n!==null;)Fc(e,t,n),n=n.sibling}function Fc(e,t,n){if(Ct&&typeof Ct.onCommitFiberUnmount==`function`)try{Ct.onCommitFiberUnmount(St,n)}catch{}switch(n.tag){case 5:yc||bc(n,t);case 6:var r=Mc,i=Nc;Mc=null,Pc(e,t,n),Mc=r,Nc=i,Mc!==null&&(Nc?(e=Mc,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Mc.removeChild(n.stateNode));break;case 18:Mc!==null&&(Nc?(e=Mc,n=n.stateNode,e.nodeType===8?Ai(e.parentNode,n):e.nodeType===1&&Ai(e,n),dn(e)):Ai(Mc,n.stateNode));break;case 4:r=Mc,i=Nc,Mc=n.stateNode.containerInfo,Nc=!0,Pc(e,t,n),Mc=r,Nc=i;break;case 0:case 11:case 14:case 15:if(!yc&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&xc(n,t,o),i=i.next}while(i!==r)}Pc(e,t,n);break;case 1:if(!yc&&(bc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){ql(n,t,e)}Pc(e,t,n);break;case 21:Pc(e,t,n);break;case 22:n.mode&1?(yc=(r=yc)||n.memoizedState!==null,Pc(e,t,n),yc=r):Pc(e,t,n);break;default:Pc(e,t,n)}}function Ic(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new eee),t.forEach(function(t){var r=Zl.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function Lc(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var a=n[i];try{var o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 5:Mc=c.stateNode,Nc=!1;break a;case 3:Mc=c.stateNode.containerInfo,Nc=!0;break a;case 4:Mc=c.stateNode.containerInfo,Nc=!0;break a}c=c.return}if(Mc===null)throw Error(r(160));Fc(o,s,a),Mc=null,Nc=!1;var l=a.alternate;l!==null&&(l.return=null),a.return=null}catch(e){ql(a,t,e)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Rc(t,e),t=t.sibling}function Rc(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Lc(t,e),zc(e),i&4){try{wc(3,e,e.return),Tc(3,e)}catch(t){ql(e,e.return,t)}try{wc(5,e,e.return)}catch(t){ql(e,e.return,t)}}break;case 1:Lc(t,e),zc(e),i&512&&n!==null&&bc(n,n.return);break;case 5:if(Lc(t,e),zc(e),i&512&&n!==null&&bc(n,n.return),e.flags&32){var a=e.stateNode;try{Oe(a,``)}catch(t){ql(e,e.return,t)}}if(i&4&&(a=e.stateNode,a!=null)){var o=e.memoizedProps,s=n===null?o:n.memoizedProps,c=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{c===`input`&&o.type===`radio`&&o.name!=null&&me(a,o),Fe(c,s);var u=Fe(c,o);for(s=0;s<l.length;s+=2){var d=l[s],f=l[s+1];d===`style`?Me(a,f):d===`dangerouslySetInnerHTML`?De(a,f):d===`children`?Oe(a,f):S(a,d,f,u)}switch(c){case`input`:he(a,o);break;case`textarea`:Se(a,o);break;case`select`:var p=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m==null?p!==!!o.multiple&&(o.defaultValue==null?ye(a,!!o.multiple,o.multiple?[]:``,!1):ye(a,!!o.multiple,o.defaultValue,!0)):ye(a,!!o.multiple,m,!1)}a[Fi]=o}catch(t){ql(e,e.return,t)}}break;case 6:if(Lc(t,e),zc(e),i&4){if(e.stateNode===null)throw Error(r(162));a=e.stateNode,o=e.memoizedProps;try{a.nodeValue=o}catch(t){ql(e,e.return,t)}}break;case 3:if(Lc(t,e),zc(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{dn(t.containerInfo)}catch(t){ql(e,e.return,t)}break;case 4:Lc(t,e),zc(e);break;case 13:Lc(t,e),zc(e),a=e.child,a.flags&8192&&(o=a.memoizedState!==null,a.stateNode.isHidden=o,!o||a.alternate!==null&&a.alternate.memoizedState!==null||(cl=ht())),i&4&&Ic(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(yc=(u=yc)||d,Lc(t,e),yc=u):Lc(t,e),zc(e),i&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(U=e,d=e.child;d!==null;){for(f=U=d;U!==null;){switch(p=U,m=p.child,p.tag){case 0:case 11:case 14:case 15:wc(4,p,p.return);break;case 1:bc(p,p.return);var h=p.stateNode;if(typeof h.componentWillUnmount==`function`){i=p,n=p.return;try{t=i,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(e){ql(i,n,e)}}break;case 5:bc(p,p.return);break;case 22:if(p.memoizedState!==null){Uc(f);continue}}m===null?Uc(f):(m.return=p,U=m)}d=d.sibling}a:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{a=f.stateNode,u?(o=a.style,typeof o.setProperty==`function`?o.setProperty(`display`,`none`,`important`):o.display=`none`):(c=f.stateNode,l=f.memoizedProps.style,s=l!=null&&l.hasOwnProperty(`display`)?l.display:null,c.style.display=je(`display`,s))}catch(t){ql(e,e.return,t)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?``:f.memoizedProps}catch(t){ql(e,e.return,t)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break a;for(;f.sibling===null;){if(f.return===null||f.return===e)break a;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Lc(t,e),zc(e),i&4&&Ic(e);break;case 21:break;default:Lc(t,e),zc(e)}}function zc(e){var t=e.flags;if(t&2){try{a:{for(var n=e.return;n!==null;){if(Oc(n)){var i=n;break a}n=n.return}throw Error(r(160))}switch(i.tag){case 5:var a=i.stateNode;i.flags&32&&(Oe(a,``),i.flags&=-33),jc(e,kc(e),a);break;case 3:case 4:var o=i.stateNode.containerInfo;Ac(e,kc(e),o);break;default:throw Error(r(161))}}catch(t){ql(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Bc(e,t,n){U=e,Vc(e,t,n)}function Vc(e,t,n){for(var r=(e.mode&1)!=0;U!==null;){var i=U,a=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||vc;if(!o){var s=i.alternate,c=s!==null&&s.memoizedState!==null||yc;s=vc;var l=yc;if(vc=o,(yc=c)&&!l)for(U=i;U!==null;)o=U,c=o.child,o.tag===22&&o.memoizedState!==null||c===null?Wc(i):(c.return=o,U=c);for(;a!==null;)U=a,Vc(a,t,n),a=a.sibling;U=i,vc=s,yc=l}Hc(e,t,n)}else i.subtreeFlags&8772&&a!==null?(a.return=i,U=a):Hc(e,t,n)}}function Hc(e){for(;U!==null;){var t=U;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:yc||Tc(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!yc)if(n===null)i.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:ws(t.type,n.memoizedProps);i.componentDidUpdate(a,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&fo(t,o,i);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}fo(t,s,n)}break;case 5:var c=t.stateNode;if(n===null&&t.flags&4){n=c;var l=t.memoizedProps;switch(t.type){case`button`:case`input`:case`select`:case`textarea`:l.autoFocus&&n.focus();break;case`img`:l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&dn(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}yc||t.flags&512&&Ec(t)}catch(e){ql(t,t.return,e)}}if(t===e){U=null;break}if(n=t.sibling,n!==null){n.return=t.return,U=n;break}U=t.return}}function Uc(e){for(;U!==null;){var t=U;if(t===e){U=null;break}var n=t.sibling;if(n!==null){n.return=t.return,U=n;break}U=t.return}}function Wc(e){for(;U!==null;){var t=U;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Tc(4,t)}catch(e){ql(t,n,e)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount==`function`){var i=t.return;try{r.componentDidMount()}catch(e){ql(t,i,e)}}var a=t.return;try{Ec(t)}catch(e){ql(t,a,e)}break;case 5:var o=t.return;try{Ec(t)}catch(e){ql(t,o,e)}}}catch(e){ql(t,t.return,e)}if(t===e){U=null;break}var s=t.sibling;if(s!==null){s.return=t.return,U=s;break}U=t.return}}var Gc=Math.ceil,Kc=C.ReactCurrentDispatcher,qc=C.ReactCurrentOwner,Jc=C.ReactCurrentBatchConfig,Yc=0,Xc=null,Zc=null,Qc=0,$c=0,el=Gi(0),tl=0,nl=null,rl=0,il=0,al=0,ol=null,sl=null,cl=0,ll=1/0,ul=null,dl=!1,fl=null,pl=null,ml=!1,hl=null,gl=0,_l=0,vl=null,yl=-1,bl=0;function xl(){return Yc&6?ht():yl===-1?yl=ht():yl}function Sl(e){return e.mode&1?Yc&2&&Qc!==0?Qc&-Qc:La.transition===null?(e=Vt,e===0?(e=window.event,e=e===void 0?16:yn(e.type),e):e):(bl===0&&(bl=It()),bl):1}function Cl(e,t,n,i){if(50<_l)throw _l=0,vl=null,Error(r(185));Rt(e,n,i),(!(Yc&2)||e!==Xc)&&(e===Xc&&(!(Yc&2)&&(il|=n),tl===4&&kl(e,Qc)),wl(e,i),n===1&&Yc===0&&!(t.mode&1)&&(ll=ht()+500,oa&&ua()))}function wl(e,t){var n=e.callbackNode;Pt(e,t);var r=Mt(e,e===Xc?Qc:0);if(r===0)n!==null&&ft(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&ft(n),t===1)e.tag===0?la(Al.bind(null,e)):ca(Al.bind(null,e)),Oi(function(){!(Yc&6)&&ua()}),n=null;else{switch(Ht(r)){case 1:n=_t;break;case 4:n=vt;break;case 16:n=yt;break;case 536870912:n=xt;break;default:n=yt}n=$l(n,Tl.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Tl(e,t){if(yl=-1,bl=0,Yc&6)throw Error(r(327));var n=e.callbackNode;if(Gl()&&e.callbackNode!==n)return null;var i=Mt(e,e===Xc?Qc:0);if(i===0)return null;if(i&30||(i&e.expiredLanes)!==0||t)t=Rl(e,i);else{t=i;var a=Yc;Yc|=2;var o=Il();(Xc!==e||Qc!==t)&&(ul=null,ll=ht()+500,Pl(e,t));do try{Bl();break}catch(t){Fl(e,t)}while(1);Ja(),Kc.current=o,Yc=a,Zc===null?(Xc=null,Qc=0,t=tl):t=0}if(t!==0){if(t===2&&(a=Ft(e),a!==0&&(i=a,t=El(e,a))),t===1)throw n=nl,Pl(e,0),kl(e,i),wl(e,ht()),n;if(t===6)kl(e,i);else{if(a=e.current.alternate,!(i&30)&&!Ol(a)&&(t=Rl(e,i),t===2&&(o=Ft(e),o!==0&&(i=o,t=El(e,o))),t===1))throw n=nl,Pl(e,0),kl(e,i),wl(e,ht()),n;switch(e.finishedWork=a,e.finishedLanes=i,t){case 0:case 1:throw Error(r(345));case 2:Ul(e,sl,ul);break;case 3:if(kl(e,i),(i&130023424)===i&&(t=cl+500-ht(),10<t)){if(Mt(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){xl(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=Ti(Ul.bind(null,e,sl,ul),t);break}Ul(e,sl,ul);break;case 4:if(kl(e,i),(i&4194240)===i)break;for(t=e.eventTimes,a=-1;0<i;){var s=31-Tt(i);o=1<<s,s=t[s],s>a&&(a=s),i&=~o}if(i=a,i=ht()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Gc(i/1960))-i,10<i){e.timeoutHandle=Ti(Ul.bind(null,e,sl,ul),i);break}Ul(e,sl,ul);break;case 5:Ul(e,sl,ul);break;default:throw Error(r(329))}}}return wl(e,ht()),e.callbackNode===n?Tl.bind(null,e):null}function El(e,t){var n=ol;return e.current.memoizedState.isDehydrated&&(Pl(e,t).flags|=256),e=Rl(e,t),e!==2&&(t=sl,sl=n,t!==null&&Dl(t)),e}function Dl(e){sl===null?sl=e:sl.push.apply(sl,e)}function Ol(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(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(!kr(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 kl(e,t){for(t&=~al,t&=~il,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Tt(t),r=1<<n;e[n]=-1,t&=~r}}function Al(e){if(Yc&6)throw Error(r(327));Gl();var t=Mt(e,0);if(!(t&1))return wl(e,ht()),null;var n=Rl(e,t);if(e.tag!==0&&n===2){var i=Ft(e);i!==0&&(t=i,n=El(e,i))}if(n===1)throw n=nl,Pl(e,0),kl(e,t),wl(e,ht()),n;if(n===6)throw Error(r(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ul(e,sl,ul),wl(e,ht()),null}function jl(e,t){var n=Yc;Yc|=1;try{return e(t)}finally{Yc=n,Yc===0&&(ll=ht()+500,oa&&ua())}}function Ml(e){hl!==null&&hl.tag===0&&!(Yc&6)&&Gl();var t=Yc;Yc|=1;var n=Jc.transition,r=Vt;try{if(Jc.transition=null,Vt=1,e)return e()}finally{Vt=r,Jc.transition=n,Yc=t,!(Yc&6)&&ua()}}function Nl(){$c=el.current,Ki(el)}function Pl(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Ei(n)),Zc!==null)for(n=Zc.return;n!==null;){var r=n;switch(Ca(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&ea();break;case 3:yo(),Ki(Xi),Ki(Yi),To();break;case 5:xo(r);break;case 4:yo();break;case 13:Ki(So);break;case 19:Ki(So);break;case 10:Ya(r.type._context);break;case 22:case 23:Nl()}n=n.return}if(Xc=e,Zc=e=iu(e.current,null),Qc=$c=t,tl=0,nl=null,al=il=rl=0,sl=ol=null,$a!==null){for(t=0;t<$a.length;t++)if(n=$a[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var o=a.next;a.next=i,r.next=o}n.pending=r}$a=null}return e}function Fl(e,t){do{var n=Zc;try{if(Ja(),Eo.current=bs,Mo){for(var i=ko.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}Mo=!1}if(Oo=0,jo=Ao=ko=null,No=!1,Po=0,qc.current=null,n===null||n.return===null){tl=1,nl=t,Zc=null;break}a:{var o=e,s=n.return,c=n,l=t;if(t=Qc,c.flags|=32768,typeof l==`object`&&l&&typeof l.then==`function`){var u=l,d=c,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=Rs(s);if(m!==null){m.flags&=-257,zs(m,s,c,o,t),m.mode&1&&Ls(o,u,t),t=m,l=u;var h=t.updateQueue;if(h===null){var g=new Set;g.add(l),t.updateQueue=g}else h.add(l);break a}else{if(!(t&1)){Ls(o,u,t),Ll();break a}l=Error(r(426))}}else if(Ea&&c.mode&1){var _=Rs(s);if(_!==null){!(_.flags&65536)&&(_.flags|=256),zs(_,s,c,o,t),Ia(js(l,c));break a}}o=l=js(l,c),tl!==4&&(tl=2),ol===null?ol=[o]:ol.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var v=Fs(o,l,t);lo(o,v);break a;case 1:c=l;var y=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof y.getDerivedStateFromError==`function`||b!==null&&typeof b.componentDidCatch==`function`&&(pl===null||!pl.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var x=Is(o,c,t);lo(o,x);break a}}o=o.return}while(o!==null)}Hl(n)}catch(e){t=e,Zc===n&&n!==null&&(Zc=n=n.return);continue}break}while(1)}function Il(){var e=Kc.current;return Kc.current=bs,e===null?bs:e}function Ll(){(tl===0||tl===3||tl===2)&&(tl=4),Xc===null||!(rl&268435455)&&!(il&268435455)||kl(Xc,Qc)}function Rl(e,t){var n=Yc;Yc|=2;var i=Il();(Xc!==e||Qc!==t)&&(ul=null,Pl(e,t));do try{zl();break}catch(t){Fl(e,t)}while(1);if(Ja(),Yc=n,Kc.current=i,Zc!==null)throw Error(r(261));return Xc=null,Qc=0,tl}function zl(){for(;Zc!==null;)Vl(Zc)}function Bl(){for(;Zc!==null&&!pt();)Vl(Zc)}function Vl(e){var t=Ql(e.alternate,e,$c);e.memoizedProps=e.pendingProps,t===null?Hl(e):Zc=t,qc.current=null}function Hl(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=_c(n,t),n!==null){n.flags&=32767,Zc=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{tl=6,Zc=null;return}}else if(n=gc(n,t,$c),n!==null){Zc=n;return}if(t=t.sibling,t!==null){Zc=t;return}Zc=t=e}while(t!==null);tl===0&&(tl=5)}function Ul(e,t,n){var r=Vt,i=Jc.transition;try{Jc.transition=null,Vt=1,Wl(e,t,n,r)}finally{Jc.transition=i,Vt=r}return null}function Wl(e,t,n,i){do Gl();while(hl!==null);if(Yc&6)throw Error(r(327));n=e.finishedWork;var a=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(r(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(zt(e,o),e===Xc&&(Zc=Xc=null,Qc=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||ml||(ml=!0,$l(yt,function(){return Gl(),null})),o=(n.flags&15990)!=0,n.subtreeFlags&15990||o){o=Jc.transition,Jc.transition=null;var s=Vt;Vt=1;var c=Yc;Yc|=4,qc.current=null,Cc(e,n),Rc(n,e),Ir(Ci),pn=!!Si,Ci=Si=null,e.current=n,Bc(n,e,a),mt(),Yc=c,Vt=s,Jc.transition=o}else e.current=n;if(ml&&(ml=!1,hl=e,gl=a),o=e.pendingLanes,o===0&&(pl=null),wt(n.stateNode,i),wl(e,ht()),t!==null)for(i=e.onRecoverableError,n=0;n<t.length;n++)a=t[n],i(a.value,{componentStack:a.stack,digest:a.digest});if(dl)throw dl=!1,e=fl,fl=null,e;return gl&1&&e.tag!==0&&Gl(),o=e.pendingLanes,o&1?e===vl?_l++:(_l=0,vl=e):_l=0,ua(),null}function Gl(){if(hl!==null){var e=Ht(gl),t=Jc.transition,n=Vt;try{if(Jc.transition=null,Vt=16>e?16:e,hl===null)var i=!1;else{if(e=hl,hl=null,gl=0,Yc&6)throw Error(r(331));var a=Yc;for(Yc|=4,U=e.current;U!==null;){var o=U,s=o.child;if(U.flags&16){var c=o.deletions;if(c!==null){for(var l=0;l<c.length;l++){var u=c[l];for(U=u;U!==null;){var d=U;switch(d.tag){case 0:case 11:case 15:wc(8,d,o)}var f=d.child;if(f!==null)f.return=d,U=f;else for(;U!==null;){d=U;var p=d.sibling,m=d.return;if(Dc(d),d===u){U=null;break}if(p!==null){p.return=m,U=p;break}U=m}}}var h=o.alternate;if(h!==null){var g=h.child;if(g!==null){h.child=null;do{var _=g.sibling;g.sibling=null,g=_}while(g!==null)}}U=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,U=s;else b:for(;U!==null;){if(o=U,o.flags&2048)switch(o.tag){case 0:case 11:case 15:wc(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,U=v;break b}U=o.return}}var y=e.current;for(U=y;U!==null;){s=U;var b=s.child;if(s.subtreeFlags&2064&&b!==null)b.return=s,U=b;else b:for(s=y;U!==null;){if(c=U,c.flags&2048)try{switch(c.tag){case 0:case 11:case 15:Tc(9,c)}}catch(e){ql(c,c.return,e)}if(c===s){U=null;break b}var x=c.sibling;if(x!==null){x.return=c.return,U=x;break b}U=c.return}}if(Yc=a,ua(),Ct&&typeof Ct.onPostCommitFiberRoot==`function`)try{Ct.onPostCommitFiberRoot(St,e)}catch{}i=!0}return i}finally{Vt=n,Jc.transition=t}}return!1}function Kl(e,t,n){t=js(n,t),t=Fs(e,t,1),e=so(e,t,1),t=xl(),e!==null&&(Rt(e,1,t),wl(e,t))}function ql(e,t,n){if(e.tag===3)Kl(e,e,n);else for(;t!==null;){if(t.tag===3){Kl(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(pl===null||!pl.has(r))){e=js(n,e),e=Is(t,e,1),t=so(t,e,1),e=xl(),t!==null&&(Rt(t,1,e),wl(t,e));break}}t=t.return}}function Jl(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=xl(),e.pingedLanes|=e.suspendedLanes&n,Xc===e&&(Qc&n)===n&&(tl===4||tl===3&&(Qc&130023424)===Qc&&500>ht()-cl?Pl(e,0):al|=n),wl(e,t)}function Yl(e,t){t===0&&(e.mode&1?(t=At,At<<=1,!(At&130023424)&&(At=4194304)):t=1);var n=xl();e=no(e,t),e!==null&&(Rt(e,t,n),wl(e,n))}function Xl(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Yl(e,n)}function Zl(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(r(314))}i!==null&&i.delete(t),Yl(e,n)}var Ql=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Xi.current)Vs=!0;else{if((e.lanes&n)===0&&!(t.flags&128))return Vs=!1,uc(e,t,n);Vs=!!(e.flags&131072)}else Vs=!1,Ea&&t.flags&1048576&&xa(t,ma,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;cc(e,t),e=t.pendingProps;var a=Qi(t,Yi.current);Za(t,n),a=Ro(null,t,i,e,a,n);var o=zo();return t.flags|=1,typeof a==`object`&&a&&typeof a.render==`function`&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,$i(i)?(o=!0,ra(t)):o=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,io(t),a.updater=Es,t.stateNode=a,a._reactInternals=t,As(t,i,e,n),t=Xs(null,t,i,!0,o,n)):(t.tag=0,Ea&&o&&Sa(t),Hs(null,t,a,n),t=t.child),t;case 16:i=t.elementType;a:{switch(cc(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=ru(i),e=ws(i,e),a){case 0:t=Js(null,t,i,e,n);break a;case 1:t=Ys(null,t,i,e,n);break a;case 11:t=Us(null,t,i,e,n);break a;case 14:t=Ws(null,t,i,ws(i.type,e),n);break a}throw Error(r(306,i,``))}return t;case 0:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:ws(i,a),Js(e,t,i,a,n);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:ws(i,a),Ys(e,t,i,a,n);case 3:a:{if(Zs(t),e===null)throw Error(r(387));i=t.pendingProps,o=t.memoizedState,a=o.element,ao(e,t),uo(t,i,null,n);var s=t.memoizedState;if(i=s.element,o.isDehydrated)if(o={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){a=js(Error(r(423)),t),t=Qs(e,t,i,n,a);break a}else if(i!==a){a=js(Error(r(424)),t),t=Qs(e,t,i,n,a);break a}else for(Ta=ji(t.stateNode.containerInfo.firstChild),wa=t,Ea=!0,Da=null,n=Ua(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Fa(),i===a){t=lc(e,t,n);break a}Hs(e,t,i,n)}t=t.child}return t;case 5:return bo(t),e===null&&ja(t),i=t.type,a=t.pendingProps,o=e===null?null:e.memoizedProps,s=a.children,wi(i,a)?s=null:o!==null&&wi(i,o)&&(t.flags|=32),qs(e,t),Hs(e,t,s,n),t.child;case 6:return e===null&&ja(t),null;case 13:return tc(e,t,n);case 4:return vo(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Ha(t,null,i,n):Hs(e,t,i,n),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:ws(i,a),Us(e,t,i,a,n);case 7:return Hs(e,t,t.pendingProps,n),t.child;case 8:return Hs(e,t,t.pendingProps.children,n),t.child;case 12:return Hs(e,t,t.pendingProps.children,n),t.child;case 10:a:{if(i=t.type._context,a=t.pendingProps,o=t.memoizedProps,s=a.value,qi(Wa,i._currentValue),i._currentValue=s,o!==null)if(kr(o.value,s)){if(o.children===a.children&&!Xi.current){t=lc(e,t,n);break a}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var c=o.dependencies;if(c!==null){s=o.child;for(var l=c.firstContext;l!==null;){if(l.context===i){if(o.tag===1){l=oo(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Xa(o.return,n,t),c.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(r(341));s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),Xa(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Hs(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,Za(t,n),a=Qa(a),i=i(a),t.flags|=1,Hs(e,t,i,n),t.child;case 14:return i=t.type,a=ws(i,t.pendingProps),a=ws(i.type,a),Ws(e,t,i,a,n);case 15:return Gs(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:ws(i,a),cc(e,t),t.tag=1,$i(i)?(e=!0,ra(t)):e=!1,Za(t,n),Os(t,i,a),As(t,i,a,n),Xs(null,t,i,!0,e,n);case 19:return sc(e,t,n);case 22:return Ks(e,t,n)}throw Error(r(156,t.tag))};function $l(e,t){return dt(e,t)}function eu(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.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 tu(e,t,n,r){return new eu(e,t,n,r)}function nu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ru(e){if(typeof e==`function`)return nu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===j)return 11;if(e===P)return 14}return 2}function iu(e,t){var n=e.alternate;return n===null?(n=tu(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&14680064,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}function au(e,t,n,i,a,o){var s=2;if(i=e,typeof e==`function`)nu(e)&&(s=1);else if(typeof e==`string`)s=5;else a:switch(e){case E:return ou(n.children,a,o,t);case D:s=8,a|=8;break;case O:return e=tu(12,n,t,a|2),e.elementType=O,e.lanes=o,e;case M:return e=tu(13,n,t,a),e.elementType=M,e.lanes=o,e;case N:return e=tu(19,n,t,a),e.elementType=N,e.lanes=o,e;case I:return su(n,a,o,t);default:if(typeof e==`object`&&e)switch(e.$$typeof){case k:s=10;break a;case A:s=9;break a;case j:s=11;break a;case P:s=14;break a;case F:s=16,i=null;break a}throw Error(r(130,e==null?e:typeof e,``))}return t=tu(s,n,t,a),t.elementType=e,t.type=i,t.lanes=o,t}function ou(e,t,n,r){return e=tu(7,e,r,t),e.lanes=n,e}function su(e,t,n,r){return e=tu(22,e,r,t),e.elementType=I,e.lanes=n,e.stateNode={isHidden:!1},e}function cu(e,t,n){return e=tu(6,e,null,t),e.lanes=n,e}function lu(e,t,n){return t=tu(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function uu(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Lt(0),this.expirationTimes=Lt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Lt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function du(e,t,n,r,i,a,o,s,c){return e=new uu(e,t,n,s,c),t===1?(t=1,!0===a&&(t|=8)):t=0,a=tu(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},io(a),e}function fu(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:T,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}function pu(e){if(!e)return Ji;e=e._reactInternals;a:{if(at(e)!==e||e.tag!==1)throw Error(r(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break a;case 1:if($i(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break a}}t=t.return}while(t!==null);throw Error(r(171))}if(e.tag===1){var n=e.type;if($i(n))return na(e,n,t)}return t}function mu(e,t,n,r,i,a,o,s,c){return e=du(n,r,!0,e,i,a,o,s,c),e.context=pu(null),n=e.current,r=xl(),i=Sl(n),a=oo(r,i),a.callback=t??null,so(n,a,i),e.current.lanes=i,Rt(e,i,r),wl(e,r),e}function hu(e,t,n,r){var i=t.current,a=xl(),o=Sl(i);return n=pu(n),t.context===null?t.context=n:t.pendingContext=n,t=oo(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=so(i,t,o),e!==null&&(Cl(e,i,o,a),co(e,i,o)),o}function gu(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function _u(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function vu(e,t){_u(e,t),(e=e.alternate)&&_u(e,t)}function yu(){return null}var bu=typeof reportError==`function`?reportError:function(e){console.error(e)};function xu(e){this._internalRoot=e}Su.prototype.render=xu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));hu(e,t,null,null)},Su.prototype.unmount=xu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ml(function(){hu(null,e,null,null)}),t[Ii]=null}};function Su(e){this._internalRoot=e}Su.prototype.unstable_scheduleHydration=function(e){if(e){var t=V();e={blockedOn:null,target:e,priority:t};for(var n=0;n<en.length&&t!==0&&t<en[n].priority;n++);en.splice(n,0,e),n===0&&on(e)}};function Cu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function wu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==` react-mount-point-unstable `))}function Tu(){}function Eu(e,t,n,r,i){if(i){if(typeof r==`function`){var a=r;r=function(){var e=gu(o);a.call(e)}}var o=mu(t,r,e,0,null,!1,!1,``,Tu);return e._reactRootContainer=o,e[Ii]=o.current,ui(e.nodeType===8?e.parentNode:e),Ml(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r==`function`){var s=r;r=function(){var e=gu(c);s.call(e)}}var c=du(e,0,!1,null,null,!1,!1,``,Tu);return e._reactRootContainer=c,e[Ii]=c.current,ui(e.nodeType===8?e.parentNode:e),Ml(function(){hu(t,c,n,r)}),c}function Du(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if(typeof i==`function`){var s=i;i=function(){var e=gu(o);s.call(e)}}hu(t,o,e,i)}else o=Eu(n,t,e,i,r);return gu(o)}Ut=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=jt(t.pendingLanes);n!==0&&(Bt(t,n|1),wl(t,ht()),!(Yc&6)&&(ll=ht()+500,ua()))}break;case 13:Ml(function(){var t=no(e,1);t!==null&&Cl(t,e,1,xl())}),vu(e,1)}},Wt=function(e){if(e.tag===13){var t=no(e,134217728);t!==null&&Cl(t,e,134217728,xl()),vu(e,134217728)}},Gt=function(e){if(e.tag===13){var t=Sl(e),n=no(e,t);n!==null&&Cl(n,e,t,xl()),vu(e,t)}},V=function(){return Vt},Kt=function(e,t){var n=Vt;try{return Vt=e,t()}finally{Vt=n}},Re=function(e,t,n){switch(t){case`input`:if(he(e,n),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name=`+JSON.stringify(``+t)+`][type="radio"]`),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var a=Hi(i);if(!a)throw Error(r(90));ue(i),he(i,a)}}}break;case`textarea`:Se(e,n);break;case`select`:t=n.value,t!=null&&ye(e,!!n.multiple,t,!1)}},We=jl,Ge=Ml;var Ou={usingClientEntryPoint:!1,Events:[Bi,Vi,Hi,He,Ue,jl]},ku={findFiberByHostInstance:H,bundleType:0,version:`18.3.1`,rendererPackageName:`react-dom`},Au={bundleType:ku.bundleType,version:ku.version,rendererPackageName:ku.rendererPackageName,rendererConfig:ku.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:C.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=lt(e),e===null?null:e.stateNode},findFiberByHostInstance:ku.findFiberByHostInstance||yu,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:`18.3.1-next-f1338f8080-20240426`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var ju=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ju.isDisabled&&ju.supportsFiber)try{St=ju.inject(Au),Ct=ju}catch{}}e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ou,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Cu(t))throw Error(r(200));return fu(e,t,null,n)},e.createRoot=function(e,t){if(!Cu(e))throw Error(r(299));var n=!1,i=``,a=bu;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=du(e,1,!1,null,null,n,!1,i,a),e[Ii]=t.current,ui(e.nodeType===8?e.parentNode:e),new xu(t)},e.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(r(188)):(e=Object.keys(e).join(`,`),Error(r(268,e)));return e=lt(t),e=e===null?null:e.stateNode,e},e.flushSync=function(e){return Ml(e)},e.hydrate=function(e,t,n){if(!wu(t))throw Error(r(200));return Du(null,e,t,!0,n)},e.hydrateRoot=function(e,t,n){if(!Cu(e))throw Error(r(405));var i=n!=null&&n.hydratedSources||null,a=!1,o=``,s=bu;if(n!=null&&(!0===n.unstable_strictMode&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=mu(t,null,e,1,n??null,a,!1,o,s),e[Ii]=t.current,ui(e),i)for(e=0;e<i.length;e++)n=i[e],a=n._getVersion,a=a(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,a]:t.mutableSourceEagerHydrationData.push(n,a);return new Su(t)},e.render=function(e,t,n){if(!wu(t))throw Error(r(200));return Du(null,e,t,!1,n)},e.unmountComponentAtNode=function(e){if(!wu(e))throw Error(r(40));return e._reactRootContainer?(Ml(function(){Du(null,null,e,!1,function(){e._reactRootContainer=null,e[Ii]=null})}),!0):!1},e.unstable_batchedUpdates=jl,e.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!wu(n))throw Error(r(200));if(e==null||e._reactInternals===void 0)throw Error(r(38));return Du(e,t,n,!1,i)},e.version=`18.3.1-next-f1338f8080-20240426`})),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=h();e.createRoot=t.createRoot,e.hydrateRoot=t.hydrateRoot}))(),_=l(d(),1),v=1,y=1e6,b=0;function x(){return b=(b+1)%(2**53-1),b.toString()}var S=new Map,C=e=>{if(S.has(e))return;let t=setTimeout(()=>{S.delete(e),D({type:`REMOVE_TOAST`,toastId:e})},y);S.set(e,t)},w=(e,t)=>{switch(t.type){case`ADD_TOAST`:return{...e,toasts:[t.toast,...e.toasts].slice(0,v)};case`UPDATE_TOAST`:return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case`DISMISS_TOAST`:{let{toastId:n}=t;return n?C(n):e.toasts.forEach(e=>{C(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===n||n===void 0?{...e,open:!1}:e)}}case`REMOVE_TOAST`:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},T=[],E={toasts:[]};function D(e){E=w(E,e),T.forEach(e=>{e(E)})}function O({...e}){let t=x(),n=e=>D({type:`UPDATE_TOAST`,toast:{...e,id:t}}),r=()=>D({type:`DISMISS_TOAST`,toastId:t});return D({type:`ADD_TOAST`,toast:{...e,id:t,open:!0,onOpenChange:e=>{e||r()}}}),{id:t,dismiss:r,update:n}}function k(){let[e,t]=_.useState(E);return _.useEffect(()=>(T.push(t),()=>{let e=T.indexOf(t);e>-1&&T.splice(e,1)}),[e]),{...e,toast:O,dismiss:e=>D({type:`DISMISS_TOAST`,toastId:e})}}var A=l(h(),1);typeof window<`u`&&window.document&&window.document.createElement;function j(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function M(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function N(...e){return t=>{let n=!1,r=e.map(e=>{let r=M(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():M(e[t],null)}}}}function P(...e){return _.useCallback(N(...e),e)}var F=o((e=>{var t=d(),n=Symbol.for(`react.element`),r=Symbol.for(`react.fragment`),i=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var s,c={},l=null,u=null;for(s in r!==void 0&&(l=``+r),t.key!==void 0&&(l=``+t.key),t.ref!==void 0&&(u=t.ref),t)i.call(t,s)&&!o.hasOwnProperty(s)&&(c[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)c[s]===void 0&&(c[s]=t[s]);return{$$typeof:n,type:e,key:l,ref:u,props:c,_owner:a.current}}e.Fragment=r,e.jsx=s,e.jsxs=s})),I=o(((e,t)=>{t.exports=F()}))();function L(e,t){let n=_.createContext(t),r=e=>{let{children:t,...r}=e,i=_.useMemo(()=>r,Object.values(r));return(0,I.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=_.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function R(e,t=[]){let n=[];function r(t,r){let i=_.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=_.useMemo(()=>o,Object.values(o));return(0,I.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=_.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>_.createContext(e));return function(n){let r=n?.[e]||t;return _.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,ee(i,...t)]}function ee(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return _.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function te(e){let t=ne(e),n=_.forwardRef((e,n)=>{let{children:r,...i}=e,a=_.Children.toArray(r),o=a.find(ae);if(o){let e=o.props.children,r=a.map(t=>t===o?_.Children.count(e)>1?_.Children.only(null):_.isValidElement(e)?e.props.children:null:t);return(0,I.jsx)(t,{...i,ref:n,children:_.isValidElement(e)?_.cloneElement(e,void 0,r):null})}return(0,I.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function ne(e){let t=_.forwardRef((e,t)=>{let{children:n,...r}=e;if(_.isValidElement(n)){let e=se(n),i=oe(r,n.props);return n.type!==_.Fragment&&(i.ref=t?N(t,e):e),_.cloneElement(n,i)}return _.Children.count(n)>1?_.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var re=Symbol(`radix.slottable`);function ie(e){let t=({children:e})=>(0,I.jsx)(I.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=re,t}function ae(e){return _.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===re}function oe(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function se(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function ce(e){let t=e+`CollectionProvider`,[n,r]=R(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=_.useRef(null),a=_.useRef(new Map).current;return(0,I.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=te(s),l=_.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,I.jsx)(c,{ref:P(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=te(u),p=_.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=_.useRef(null),s=P(t,o),c=a(u,n);return _.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,I.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return _.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}var z=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=te(`Primitive.${t}`),r=_.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,I.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function le(e,t){e&&A.flushSync(()=>e.dispatchEvent(t))}function B(e){let t=_.useRef(e);return _.useEffect(()=>{t.current=e}),_.useMemo(()=>(...e)=>t.current?.(...e),[])}function ue(e,t=globalThis?.document){let n=B(e);_.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var de=`DismissableLayer`,fe=`dismissableLayer.update`,pe=`dismissableLayer.pointerDownOutside`,me=`dismissableLayer.focusOutside`,he,ge=_.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_e=_.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=_.useContext(ge),[u,d]=_.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=_.useState({}),m=P(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),v=h.indexOf(g),y=u?h.indexOf(u):-1,b=l.layersWithOutsidePointerEventsDisabled.size>0,x=y>=v,S=be(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!x||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),C=xe(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return ue(e=>{y===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),_.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(he=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Se(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=he)}},[u,f,n,l]),_.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Se())},[u,l]),_.useEffect(()=>{let e=()=>p({});return document.addEventListener(fe,e),()=>document.removeEventListener(fe,e)},[]),(0,I.jsx)(z.div,{...c,ref:m,style:{pointerEvents:b?x?`auto`:`none`:void 0,...e.style},onFocusCapture:j(e.onFocusCapture,C.onFocusCapture),onBlurCapture:j(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:j(e.onPointerDownCapture,S.onPointerDownCapture)})});_e.displayName=de;var ve=`DismissableLayerBranch`,ye=_.forwardRef((e,t)=>{let n=_.useContext(ge),r=_.useRef(null),i=P(t,r);return _.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,I.jsx)(z.div,{...e,ref:i})});ye.displayName=ve;function be(e,t=globalThis?.document){let n=B(e),r=_.useRef(!1),i=_.useRef(()=>{});return _.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){Ce(pe,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function xe(e,t=globalThis?.document){let n=B(e),r=_.useRef(!1);return _.useEffect(()=>{let e=e=>{e.target&&!r.current&&Ce(me,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Se(){let e=new CustomEvent(fe);document.dispatchEvent(e)}function Ce(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?le(i,a):i.dispatchEvent(a)}var we=_e,Te=ye,Ee=globalThis?.document?_.useLayoutEffect:()=>{},De=`Portal`,Oe=_.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=_.useState(!1);Ee(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?A.createPortal((0,I.jsx)(z.div,{...r,ref:t}),o):null});Oe.displayName=De;function ke(e,t){return _.useReducer((e,n)=>t[e][n]??e,e)}var Ae=e=>{let{present:t,children:n}=e,r=je(t),i=typeof n==`function`?n({present:r.isPresent}):_.Children.only(n),a=P(r.ref,Ne(i));return typeof n==`function`||r.isPresent?_.cloneElement(i,{ref:a}):null};Ae.displayName=`Presence`;function je(e){let[t,n]=_.useState(),r=_.useRef(null),i=_.useRef(e),a=_.useRef(`none`),[o,s]=ke(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return _.useEffect(()=>{let e=Me(r.current);a.current=o===`mounted`?e:`none`},[o]),Ee(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=Me(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),Ee(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=Me(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=Me(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:_.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function Me(e){return e?.animationName||`none`}function Ne(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Pe=_.useInsertionEffect||Ee;function Fe({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=Ie({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=_.useRef(e!==void 0);_.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,_.useCallback(t=>{if(s){let n=Le(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function Ie({defaultProp:e,onChange:t}){let[n,r]=_.useState(e),i=_.useRef(n),a=_.useRef(t);return Pe(()=>{a.current=t},[t]),_.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function Le(e){return typeof e==`function`}var Re=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),ze=`VisuallyHidden`,Be=_.forwardRef((e,t)=>(0,I.jsx)(z.span,{...e,ref:t,style:{...Re,...e.style}}));Be.displayName=ze;var Ve=Be,He=`ToastProvider`,[Ue,We,Ge]=ce(`Toast`),[Ke,qe]=R(`Toast`,[Ge]),[Je,Ye]=Ke(He),Xe=e=>{let{__scopeToast:t,label:n=`Notification`,duration:r=5e3,swipeDirection:i=`right`,swipeThreshold:a=50,children:o}=e,[s,c]=_.useState(null),[l,u]=_.useState(0),d=_.useRef(!1),f=_.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${He}\`. Expected non-empty \`string\`.`),(0,I.jsx)(Ue.Provider,{scope:t,children:(0,I.jsx)(Je,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:a,toastCount:l,viewport:s,onViewportChange:c,onToastAdd:_.useCallback(()=>u(e=>e+1),[]),onToastRemove:_.useCallback(()=>u(e=>e-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};Xe.displayName=He;var Ze=`ToastViewport`,Qe=[`F8`],$e=`toast.viewportPause`,et=`toast.viewportResume`,tt=_.forwardRef((e,t)=>{let{__scopeToast:n,hotkey:r=Qe,label:i=`Notifications ({hotkey})`,...a}=e,o=Ye(Ze,n),s=We(n),c=_.useRef(null),l=_.useRef(null),u=_.useRef(null),d=_.useRef(null),f=P(t,d,o.onViewportChange),p=r.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),m=o.toastCount>0;_.useEffect(()=>{let e=e=>{r.length!==0&&r.every(t=>e[t]||e.code===t)&&d.current?.focus()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[r]),_.useEffect(()=>{let e=c.current,t=d.current;if(m&&e&&t){let n=()=>{if(!o.isClosePausedRef.current){let e=new CustomEvent($e);t.dispatchEvent(e),o.isClosePausedRef.current=!0}},r=()=>{if(o.isClosePausedRef.current){let e=new CustomEvent(et);t.dispatchEvent(e),o.isClosePausedRef.current=!1}},i=t=>{e.contains(t.relatedTarget)||r()},a=()=>{e.contains(document.activeElement)||r()};return e.addEventListener(`focusin`,n),e.addEventListener(`focusout`,i),e.addEventListener(`pointermove`,n),e.addEventListener(`pointerleave`,a),window.addEventListener(`blur`,n),window.addEventListener(`focus`,r),()=>{e.removeEventListener(`focusin`,n),e.removeEventListener(`focusout`,i),e.removeEventListener(`pointermove`,n),e.removeEventListener(`pointerleave`,a),window.removeEventListener(`blur`,n),window.removeEventListener(`focus`,r)}}},[m,o.isClosePausedRef]);let h=_.useCallback(({tabbingDirection:e})=>{let t=s().map(t=>{let n=t.ref.current,r=[n,...Ot(n)];return e===`forwards`?r:r.reverse()});return(e===`forwards`?t.reverse():t).flat()},[s]);return _.useEffect(()=>{let e=d.current;if(e){let t=t=>{let n=t.altKey||t.ctrlKey||t.metaKey;if(t.key===`Tab`&&!n){let n=document.activeElement,r=t.shiftKey;if(t.target===e&&r){l.current?.focus();return}let i=h({tabbingDirection:r?`backwards`:`forwards`}),a=i.findIndex(e=>e===n);kt(i.slice(a+1))?t.preventDefault():r?l.current?.focus():u.current?.focus()}};return e.addEventListener(`keydown`,t),()=>e.removeEventListener(`keydown`,t)}},[s,h]),(0,I.jsxs)(Te,{ref:c,role:`region`,"aria-label":i.replace(`{hotkey}`,p),tabIndex:-1,style:{pointerEvents:m?void 0:`none`},children:[m&&(0,I.jsx)(rt,{ref:l,onFocusFromOutsideViewport:()=>{kt(h({tabbingDirection:`forwards`}))}}),(0,I.jsx)(Ue.Slot,{scope:n,children:(0,I.jsx)(z.ol,{tabIndex:-1,...a,ref:f})}),m&&(0,I.jsx)(rt,{ref:u,onFocusFromOutsideViewport:()=>{kt(h({tabbingDirection:`backwards`}))}})]})});tt.displayName=Ze;var nt=`ToastFocusProxy`,rt=_.forwardRef((e,t)=>{let{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,a=Ye(nt,n);return(0,I.jsx)(Be,{tabIndex:0,...i,ref:t,style:{position:`fixed`},onFocus:e=>{let t=e.relatedTarget;a.viewport?.contains(t)||r()}})});rt.displayName=nt;var it=`Toast`,at=`toast.swipeStart`,ot=`toast.swipeMove`,st=`toast.swipeCancel`,ct=`toast.swipeEnd`,lt=_.forwardRef((e,t)=>{let{forceMount:n,open:r,defaultOpen:i,onOpenChange:a,...o}=e,[s,c]=Fe({prop:r,defaultProp:i??!0,onChange:a,caller:it});return(0,I.jsx)(Ae,{present:n||s,children:(0,I.jsx)(ft,{open:s,...o,ref:t,onClose:()=>c(!1),onPause:B(e.onPause),onResume:B(e.onResume),onSwipeStart:j(e.onSwipeStart,e=>{e.currentTarget.setAttribute(`data-swipe`,`start`)}),onSwipeMove:j(e.onSwipeMove,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`move`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-y`,`${n}px`)}),onSwipeCancel:j(e.onSwipeCancel,e=>{e.currentTarget.setAttribute(`data-swipe`,`cancel`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-y`)}),onSwipeEnd:j(e.onSwipeEnd,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`end`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-y`,`${n}px`),c(!1)})})})});lt.displayName=it;var[ut,dt]=Ke(it,{onClose(){}}),ft=_.forwardRef((e,t)=>{let{__scopeToast:n,type:r=`foreground`,duration:i,open:a,onClose:o,onEscapeKeyDown:s,onPause:c,onResume:l,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:p,...m}=e,h=Ye(it,n),[g,v]=_.useState(null),y=P(t,e=>v(e)),b=_.useRef(null),x=_.useRef(null),S=i||h.duration,C=_.useRef(0),w=_.useRef(S),T=_.useRef(0),{onToastAdd:E,onToastRemove:D}=h,O=B(()=>{g?.contains(document.activeElement)&&h.viewport?.focus(),o()}),k=_.useCallback(e=>{!e||e===1/0||(window.clearTimeout(T.current),C.current=new Date().getTime(),T.current=window.setTimeout(O,e))},[O]);_.useEffect(()=>{let e=h.viewport;if(e){let t=()=>{k(w.current),l?.()},n=()=>{let e=new Date().getTime()-C.current;w.current-=e,window.clearTimeout(T.current),c?.()};return e.addEventListener($e,n),e.addEventListener(et,t),()=>{e.removeEventListener($e,n),e.removeEventListener(et,t)}}},[h.viewport,S,c,l,k]),_.useEffect(()=>{a&&!h.isClosePausedRef.current&&k(S)},[a,S,h.isClosePausedRef,k]),_.useEffect(()=>(E(),()=>D()),[E,D]);let M=_.useMemo(()=>g?Ct(g):null,[g]);return h.viewport?(0,I.jsxs)(I.Fragment,{children:[M&&(0,I.jsx)(pt,{__scopeToast:n,role:`status`,"aria-live":r===`foreground`?`assertive`:`polite`,children:M}),(0,I.jsx)(ut,{scope:n,onClose:O,children:A.createPortal((0,I.jsx)(Ue.ItemSlot,{scope:n,children:(0,I.jsx)(we,{asChild:!0,onEscapeKeyDown:j(s,()=>{h.isFocusedToastEscapeKeyDownRef.current||O(),h.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,I.jsx)(z.li,{tabIndex:0,"data-state":a?`open`:`closed`,"data-swipe-direction":h.swipeDirection,...m,ref:y,style:{userSelect:`none`,touchAction:`none`,...e.style},onKeyDown:j(e.onKeyDown,e=>{e.key===`Escape`&&(s?.(e.nativeEvent),e.nativeEvent.defaultPrevented||(h.isFocusedToastEscapeKeyDownRef.current=!0,O()))}),onPointerDown:j(e.onPointerDown,e=>{e.button===0&&(b.current={x:e.clientX,y:e.clientY})}),onPointerMove:j(e.onPointerMove,e=>{if(!b.current)return;let t=e.clientX-b.current.x,n=e.clientY-b.current.y,r=!!x.current,i=[`left`,`right`].includes(h.swipeDirection),a=[`left`,`up`].includes(h.swipeDirection)?Math.min:Math.max,o=i?a(0,t):0,s=i?0:a(0,n),c=e.pointerType===`touch`?10:2,l={x:o,y:s},f={originalEvent:e,delta:l};r?(x.current=l,wt(ot,d,f,{discrete:!1})):Tt(l,h.swipeDirection,c)?(x.current=l,wt(at,u,f,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>c||Math.abs(n)>c)&&(b.current=null)}),onPointerUp:j(e.onPointerUp,e=>{let t=x.current,n=e.target;if(n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),x.current=null,b.current=null,t){let n=e.currentTarget,r={originalEvent:e,delta:t};Tt(t,h.swipeDirection,h.swipeThreshold)?wt(ct,p,r,{discrete:!0}):wt(st,f,r,{discrete:!0}),n.addEventListener(`click`,e=>e.preventDefault(),{once:!0})}})})})}),h.viewport)})]}):null}),pt=e=>{let{__scopeToast:t,children:n,...r}=e,i=Ye(it,t),[a,o]=_.useState(!1),[s,c]=_.useState(!1);return Et(()=>o(!0)),_.useEffect(()=>{let e=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(e)},[]),s?null:(0,I.jsx)(Oe,{asChild:!0,children:(0,I.jsx)(Be,{...r,children:a&&(0,I.jsxs)(I.Fragment,{children:[i.label,` `,n]})})})},mt=`ToastTitle`,ht=_.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return(0,I.jsx)(z.div,{...r,ref:t})});ht.displayName=mt;var gt=`ToastDescription`,_t=_.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return(0,I.jsx)(z.div,{...r,ref:t})});_t.displayName=gt;var vt=`ToastAction`,yt=_.forwardRef((e,t)=>{let{altText:n,...r}=e;return n.trim()?(0,I.jsx)(St,{altText:n,asChild:!0,children:(0,I.jsx)(xt,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${vt}\`. Expected non-empty \`string\`.`),null)});yt.displayName=vt;var bt=`ToastClose`,xt=_.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e,i=dt(bt,n);return(0,I.jsx)(St,{asChild:!0,children:(0,I.jsx)(z.button,{type:`button`,...r,ref:t,onClick:j(e.onClick,i.onClose)})})});xt.displayName=bt;var St=_.forwardRef((e,t)=>{let{__scopeToast:n,altText:r,...i}=e;return(0,I.jsx)(z.div,{"data-radix-toast-announce-exclude":``,"data-radix-toast-announce-alt":r||void 0,...i,ref:t})});function Ct(e){let t=[];return Array.from(e.childNodes).forEach(e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent&&t.push(e.textContent),Dt(e)){let n=e.ariaHidden||e.hidden||e.style.display===`none`,r=e.dataset.radixToastAnnounceExclude===``;if(!n)if(r){let n=e.dataset.radixToastAnnounceAlt;n&&t.push(n)}else t.push(...Ct(e))}}),t}function wt(e,t,n,{discrete:r}){let i=n.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?le(i,a):i.dispatchEvent(a)}var Tt=(e,t,n=0)=>{let r=Math.abs(e.x),i=Math.abs(e.y),a=r>i;return t===`left`||t===`right`?a&&r>n:!a&&i>n};function Et(e=()=>{}){let t=B(e);Ee(()=>{let e=0,n=0;return e=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(n)}},[t])}function Dt(e){return e.nodeType===e.ELEMENT_NODE}function Ot(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function kt(e){let t=document.activeElement;return e.some(e=>e===t?!0:(e.focus(),document.activeElement!==t))}var At=Xe,jt=tt,Mt=lt,Nt=ht,Pt=_t,Ft=yt,It=xt;function Lt(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=Lt(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Rt(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Lt(e))&&(r&&(r+=` `),r+=t);return r}var zt=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Bt=Rt,Vt=(e,t)=>n=>{if(t?.variants==null)return Bt(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=zt(t)||zt(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 Bt(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)},Ht=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Ut=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Wt={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},Gt=(0,_.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,_.createElement)(`svg`,{ref:c,...Wt,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Ut(`lucide`,i),...s},[...o.map(([e,t])=>(0,_.createElement)(e,t)),...Array.isArray(a)?a:[a]])),V=(e,t)=>{let n=(0,_.forwardRef)(({className:n,...r},i)=>(0,_.createElement)(Gt,{ref:i,iconNode:t,className:Ut(`lucide-${Ht(e)}`,n),...r}));return n.displayName=`${e}`,n},Kt=V(`Activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),qt=V(`ArrowLeft`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),Jt=V(`ArrowRight`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),Yt=V(`ArrowUpRight`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),Xt=V(`Bell`,[[`path`,{d:`M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9`,key:`1qo2s2`}],[`path`,{d:`M10.3 21a1.94 1.94 0 0 0 3.4 0`,key:`qgo35s`}]]),Zt=V(`Bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),Qt=V(`Brain`,[[`path`,{d:`M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z`,key:`l5xja`}],[`path`,{d:`M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z`,key:`ep3f8r`}],[`path`,{d:`M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4`,key:`1p4c4q`}],[`path`,{d:`M17.599 6.5a3 3 0 0 0 .399-1.375`,key:`tmeiqw`}],[`path`,{d:`M6.003 5.125A3 3 0 0 0 6.401 6.5`,key:`105sqy`}],[`path`,{d:`M3.477 10.896a4 4 0 0 1 .585-.396`,key:`ql3yin`}],[`path`,{d:`M19.938 10.5a4 4 0 0 1 .585.396`,key:`1qfode`}],[`path`,{d:`M6 18a4 4 0 0 1-1.967-.516`,key:`2e4loj`}],[`path`,{d:`M19.967 17.484A4 4 0 0 1 18 18`,key:`159ez6`}]]),$t=V(`Briefcase`,[[`path`,{d:`M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16`,key:`jecpp`}],[`rect`,{width:`20`,height:`14`,x:`2`,y:`6`,rx:`2`,key:`i6l2r4`}]]),en=V(`Cable`,[[`path`,{d:`M17 21v-2a1 1 0 0 1-1-1v-1a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1`,key:`10bnsj`}],[`path`,{d:`M19 15V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V9`,key:`1eqmu1`}],[`path`,{d:`M21 21v-2h-4`,key:`14zm7j`}],[`path`,{d:`M3 5h4V3`,key:`z442eg`}],[`path`,{d:`M7 5a1 1 0 0 1 1 1v1a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1V3`,key:`ebdjd7`}]]),tn=V(`Calendar`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M3 10h18`,key:`8toen8`}]]),nn=V(`ChartColumn`,[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M18 17V9`,key:`2bz60n`}],[`path`,{d:`M13 17V5`,key:`1frdt8`}],[`path`,{d:`M8 17v-3`,key:`17ska0`}]]),rn=V(`Check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),an=V(`ChevronDown`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),on=V(`ChevronLeft`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),sn=V(`ChevronRight`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),cn=V(`ChevronUp`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),ln=V(`CircleAlert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),un=V(`CircleArrowUp`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 12-4-4-4 4`,key:`177agl`}],[`path`,{d:`M12 16V8`,key:`1sbj14`}]]),dn=V(`CircleCheck`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),fn=V(`CircleMinus`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}]]),pn=V(`CircleStop`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`rect`,{x:`9`,y:`9`,width:`6`,height:`6`,rx:`1`,key:`1ssd4o`}]]),mn=V(`CircleX`,[[`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`}]]),hn=V(`Circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),gn=V(`Clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`polyline`,{points:`12 6 12 12 16 14`,key:`68esgv`}]]),_n=V(`CodeXml`,[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]]),vn=V(`Code`,[[`polyline`,{points:`16 18 22 12 16 6`,key:`z7tu5w`}],[`polyline`,{points:`8 6 2 12 8 18`,key:`1eg1df`}]]),yn=V(`Copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),bn=V(`Cpu`,[[`rect`,{width:`16`,height:`16`,x:`4`,y:`4`,rx:`2`,key:`14l7u7`}],[`rect`,{width:`6`,height:`6`,x:`9`,y:`9`,rx:`1`,key:`5aljv4`}],[`path`,{d:`M15 2v2`,key:`13l42r`}],[`path`,{d:`M15 20v2`,key:`15mkzm`}],[`path`,{d:`M2 15h2`,key:`1gxd5l`}],[`path`,{d:`M2 9h2`,key:`1bbxkp`}],[`path`,{d:`M20 15h2`,key:`19e6y8`}],[`path`,{d:`M20 9h2`,key:`19tzq7`}],[`path`,{d:`M9 2v2`,key:`165o2o`}],[`path`,{d:`M9 20v2`,key:`i2bqo8`}]]),xn=V(`DollarSign`,[[`line`,{x1:`12`,x2:`12`,y1:`2`,y2:`22`,key:`7eqyqh`}],[`path`,{d:`M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6`,key:`1b0p4s`}]]),Sn=V(`Dot`,[[`circle`,{cx:`12.1`,cy:`12.1`,r:`1`,key:`18d7e5`}]]),Cn=V(`Download`,[[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`polyline`,{points:`7 10 12 15 17 10`,key:`2ggqvy`}],[`line`,{x1:`12`,x2:`12`,y1:`15`,y2:`3`,key:`1vk2je`}]]),wn=V(`Earth`,[[`path`,{d:`M21.54 15H17a2 2 0 0 0-2 2v4.54`,key:`1djwo0`}],[`path`,{d:`M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17`,key:`1tzkfa`}],[`path`,{d:`M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05`,key:`14pb5j`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),Tn=V(`EllipsisVertical`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`5`,r:`1`,key:`gxeob9`}],[`circle`,{cx:`12`,cy:`19`,r:`1`,key:`lyex9k`}]]),En=V(`Ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),Dn=V(`ExternalLink`,[[`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`}]]),On=V(`EyeOff`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),kn=V(`Eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),An=V(`FileText`,[[`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`,key:`1rqfz7`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),jn=V(`Fingerprint`,[[`path`,{d:`M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4`,key:`1nerag`}],[`path`,{d:`M14 13.12c0 2.38 0 6.38-1 8.88`,key:`o46ks0`}],[`path`,{d:`M17.29 21.02c.12-.6.43-2.3.5-3.02`,key:`ptglia`}],[`path`,{d:`M2 12a10 10 0 0 1 18-6`,key:`ydlgp0`}],[`path`,{d:`M2 16h.01`,key:`1gqxmh`}],[`path`,{d:`M21.8 16c.2-2 .131-5.354 0-6`,key:`drycrb`}],[`path`,{d:`M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2`,key:`1tidbn`}],[`path`,{d:`M8.65 22c.21-.66.45-1.32.57-2`,key:`13wd9y`}],[`path`,{d:`M9 6.8a6 6 0 0 1 9 5.2v2`,key:`1fr1j5`}]]),Mn=V(`FolderKanban`,[[`path`,{d:`M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z`,key:`1fr9dc`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M12 10v2`,key:`hh53o1`}],[`path`,{d:`M16 10v6`,key:`1d6xys`}]]),Nn=V(`FolderOpen`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 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.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),Pn=V(`Gauge`,[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]),Fn=V(`GitBranch`,[[`line`,{x1:`6`,x2:`6`,y1:`3`,y2:`15`,key:`17qcm7`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}],[`path`,{d:`M18 9a9 9 0 0 1-9 9`,key:`n2h4wq`}]]),In=V(`Globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),Ln=V(`GripVertical`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]),Rn=V(`Hammer`,[[`path`,{d:`m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9`,key:`eefl8a`}],[`path`,{d:`m18 15 4-4`,key:`16gjal`}],[`path`,{d:`m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5`,key:`b7pghm`}]]),zn=V(`HardDrive`,[[`line`,{x1:`22`,x2:`2`,y1:`12`,y2:`12`,key:`1y58io`}],[`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`}],[`line`,{x1:`6`,x2:`6.01`,y1:`16`,y2:`16`,key:`sgf278`}],[`line`,{x1:`10`,x2:`10.01`,y1:`16`,y2:`16`,key:`1l4acy`}]]),Bn=V(`Hash`,[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`,key:`4lhtct`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`,key:`vyu0kd`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`,key:`1ggp8o`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`,key:`weycgp`}]]),Vn=V(`Hexagon`,[[`path`,{d:`M21 16V8a2 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.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z`,key:`yt0hxn`}]]),Hn=V(`History`,[[`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`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),Un=V(`Info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),Wn=V(`KeyRound`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),Gn=V(`Key`,[[`path`,{d:`m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4`,key:`g0fldk`}],[`path`,{d:`m21 2-9.6 9.6`,key:`1j0ho8`}],[`circle`,{cx:`7.5`,cy:`15.5`,r:`5.5`,key:`yqb3hr`}]]),Kn=V(`Languages`,[[`path`,{d:`m5 8 6 6`,key:`1wu5hv`}],[`path`,{d:`m4 14 6-6 2-3`,key:`1k1g8d`}],[`path`,{d:`M2 5h12`,key:`or177f`}],[`path`,{d:`M7 2h1`,key:`1t2jsx`}],[`path`,{d:`m22 22-5-10-5 10`,key:`don7ne`}],[`path`,{d:`M14 18h6`,key:`1m8k6r`}]]),qn=V(`Layers`,[[`path`,{d:`m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z`,key:`8b97xw`}],[`path`,{d:`m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65`,key:`dd6zsq`}],[`path`,{d:`m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65`,key:`ep9fru`}]]),Jn=V(`LayoutDashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),Yn=V(`LayoutGrid`,[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,key:`6d4xhi`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,key:`nxv5o0`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}]]),Xn=V(`LoaderCircle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),Zn=V(`LockOpen`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 9.9-1`,key:`1mm8w8`}]]),Qn=V(`Lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),$n=V(`MemoryStick`,[[`path`,{d:`M6 19v-3`,key:`1nvgqn`}],[`path`,{d:`M10 19v-3`,key:`iu8nkm`}],[`path`,{d:`M14 19v-3`,key:`kcehxu`}],[`path`,{d:`M18 19v-3`,key:`1vh91z`}],[`path`,{d:`M8 11V9`,key:`63erz4`}],[`path`,{d:`M16 11V9`,key:`fru6f3`}],[`path`,{d:`M12 11V9`,key:`ha00sb`}],[`path`,{d:`M2 15h20`,key:`16ne18`}],[`path`,{d:`M2 7a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v1.1a2 2 0 0 0 0 3.837V17a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-5.1a2 2 0 0 0 0-3.837Z`,key:`lhddv3`}]]),er=V(`MessageCircle`,[[`path`,{d:`M7.9 20A9 9 0 1 0 4 16.1L2 22Z`,key:`vv11sd`}]]),tr=V(`MessageSquare`,[[`path`,{d:`M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z`,key:`1lielz`}]]),nr=V(`Mic`,[[`path`,{d:`M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z`,key:`131961`}],[`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`,key:`1vc78b`}],[`line`,{x1:`12`,x2:`12`,y1:`19`,y2:`22`,key:`x3vr5v`}]]),rr=V(`PanelLeft`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]]),ir=V(`PanelsTopLeft`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`M9 21V9`,key:`1oto5p`}]]),ar=V(`Pause`,[[`rect`,{x:`14`,y:`4`,width:`4`,height:`16`,rx:`1`,key:`zuxfzm`}],[`rect`,{x:`6`,y:`4`,width:`4`,height:`16`,rx:`1`,key:`1okwgv`}]]),or=V(`Pen`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),sr=V(`Pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),cr=V(`Play`,[[`polygon`,{points:`6 3 20 12 6 21 6 3`,key:`1oa8hb`}]]),lr=V(`Plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),ur=V(`Power`,[[`path`,{d:`M12 2v10`,key:`mnfbl`}],[`path`,{d:`M18.4 6.6a9 9 0 1 1-12.77.04`,key:`obofu9`}]]),dr=V(`QrCode`,[[`rect`,{width:`5`,height:`5`,x:`3`,y:`3`,rx:`1`,key:`1tu5fj`}],[`rect`,{width:`5`,height:`5`,x:`16`,y:`3`,rx:`1`,key:`1v8r4q`}],[`rect`,{width:`5`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`1x03jg`}],[`path`,{d:`M21 16h-3a2 2 0 0 0-2 2v3`,key:`177gqh`}],[`path`,{d:`M21 21v.01`,key:`ents32`}],[`path`,{d:`M12 7v3a2 2 0 0 1-2 2H7`,key:`8crl2c`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M12 3h.01`,key:`n36tog`}],[`path`,{d:`M12 16v.01`,key:`133mhm`}],[`path`,{d:`M16 12h1`,key:`1slzba`}],[`path`,{d:`M21 12v.01`,key:`1lwtk9`}],[`path`,{d:`M12 21v-1`,key:`1880an`}]]),fr=V(`RefreshCw`,[[`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`}]]),pr=V(`RotateCcw`,[[`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`}]]),mr=V(`Save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]),hr=V(`ScrollText`,[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),gr=V(`Search`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`path`,{d:`m21 21-4.3-4.3`,key:`1qie3q`}]]),_r=V(`SendHorizontal`,[[`path`,{d:`M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z`,key:`117uat`}],[`path`,{d:`M6 12h16`,key:`s4cdu5`}]]),vr=V(`Send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),yr=V(`Server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),br=V(`Settings2`,[[`path`,{d:`M20 7h-9`,key:`3s1dr2`}],[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]),xr=V(`Settings`,[[`path`,{d:`M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z`,key:`1qme2f`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Sr=V(`ShieldAlert`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]),Cr=V(`ShieldCheck`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),wr=V(`ShieldOff`,[[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71`,key:`1jlk70`}],[`path`,{d:`M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264`,key:`18rp1v`}]]),Tr=V(`Shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),Er=V(`SlidersHorizontal`,[[`line`,{x1:`21`,x2:`14`,y1:`4`,y2:`4`,key:`obuewd`}],[`line`,{x1:`10`,x2:`3`,y1:`4`,y2:`4`,key:`1q6298`}],[`line`,{x1:`21`,x2:`12`,y1:`12`,y2:`12`,key:`1iu8h1`}],[`line`,{x1:`8`,x2:`3`,y1:`12`,y2:`12`,key:`ntss68`}],[`line`,{x1:`21`,x2:`16`,y1:`20`,y2:`20`,key:`14d8ph`}],[`line`,{x1:`12`,x2:`3`,y1:`20`,y2:`20`,key:`m0wm8r`}],[`line`,{x1:`14`,x2:`14`,y1:`2`,y2:`6`,key:`14e1ph`}],[`line`,{x1:`8`,x2:`8`,y1:`10`,y2:`14`,key:`1i6ji0`}],[`line`,{x1:`16`,x2:`16`,y1:`18`,y2:`22`,key:`1lctlv`}]]),Dr=V(`Sparkles`,[[`path`,{d:`M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z`,key:`4pj2yx`}],[`path`,{d:`M20 3v4`,key:`1olli1`}],[`path`,{d:`M22 5h-4`,key:`1gvqau`}],[`path`,{d:`M4 17v2`,key:`vumght`}],[`path`,{d:`M5 18H3`,key:`zchphs`}]]),Or=V(`Square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),kr=V(`StickyNote`,[[`path`,{d:`M16 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8Z`,key:`qazsjp`}],[`path`,{d:`M15 3v4a2 2 0 0 0 2 2h4`,key:`40519r`}]]),Ar=V(`Terminal`,[[`polyline`,{points:`4 17 10 11 4 5`,key:`akl6gq`}],[`line`,{x1:`12`,x2:`20`,y1:`19`,y2:`19`,key:`q2wloq`}]]),jr=V(`Trash2`,[[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6`,key:`4alrt4`}],[`path`,{d:`M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2`,key:`v07s0e`}],[`line`,{x1:`10`,x2:`10`,y1:`11`,y2:`17`,key:`1uufr5`}],[`line`,{x1:`14`,x2:`14`,y1:`11`,y2:`17`,key:`xtxkd`}]]),Mr=V(`TrendingUp`,[[`polyline`,{points:`22 7 13.5 15.5 8.5 10.5 2 17`,key:`126l90`}],[`polyline`,{points:`16 7 22 7 22 13`,key:`kwv8wd`}]]),Nr=V(`TriangleAlert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Pr=V(`User`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),Fr=V(`Volume2`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}],[`path`,{d:`M19.364 18.364a9 9 0 0 0 0-12.728`,key:`ijwkga`}]]),Ir=V(`WandSparkles`,[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`,key:`ul74o6`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`M5 6v4`,key:`ilb8ba`}],[`path`,{d:`M19 14v4`,key:`blhpug`}],[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M7 8H3`,key:`zfb6yr`}],[`path`,{d:`M21 16h-4`,key:`1cnmox`}],[`path`,{d:`M11 3H9`,key:`1obp7u`}]]),Lr=V(`WifiOff`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}],[`path`,{d:`M5 12.859a10 10 0 0 1 5.17-2.69`,key:`1dl1wf`}],[`path`,{d:`M19 12.859a10 10 0 0 0-2.007-1.523`,key:`4k23kn`}],[`path`,{d:`M2 8.82a15 15 0 0 1 4.177-2.643`,key:`1grhjp`}],[`path`,{d:`M22 8.82a15 15 0 0 0-11.288-3.764`,key:`z3jwby`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),Rr=V(`Wifi`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M2 8.82a15 15 0 0 1 20 0`,key:`dnpr2z`}],[`path`,{d:`M5 12.859a10 10 0 0 1 14 0`,key:`1x1e6c`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}]]),zr=V(`Wrench`,[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z`,key:`cbrjhi`}]]),Br=V(`X`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Vr=V(`Zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]),Hr=V(`ZoomIn`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`11`,x2:`11`,y1:`8`,y2:`14`,key:`1vmskp`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]),Ur=V(`ZoomOut`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]),Wr=`-`,Gr=e=>{let t=Yr(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{let n=e.split(Wr);return n[0]===``&&n.length!==1&&n.shift(),Kr(n,t)||Jr(e)},getConflictingClassGroupIds:(e,t)=>{let i=n[e]||[];return t&&r[e]?[...i,...r[e]]:i}}},Kr=(e,t)=>{if(e.length===0)return t.classGroupId;let n=e[0],r=t.nextPart.get(n),i=r?Kr(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;let a=e.join(Wr);return t.validators.find(({validator:e})=>e(a))?.classGroupId},qr=/^\[(.+)\]$/,Jr=e=>{if(qr.test(e)){let t=qr.exec(e)[1],n=t?.substring(0,t.indexOf(`:`));if(n)return`arbitrary..`+n}},Yr=e=>{let{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return $r(Object.entries(e.classGroups),n).forEach(([e,n])=>{Xr(n,r,e,t)}),r},Xr=(e,t,n,r)=>{e.forEach(e=>{if(typeof e==`string`){let r=e===``?t:Zr(t,e);r.classGroupId=n;return}if(typeof e==`function`){if(Qr(e)){Xr(e(r),t,n,r);return}t.validators.push({validator:e,classGroupId:n});return}Object.entries(e).forEach(([e,i])=>{Xr(i,Zr(t,e),n,r)})})},Zr=(e,t)=>{let n=e;return t.split(Wr).forEach(e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n},Qr=e=>e.isThemeGetter,$r=(e,t)=>t?e.map(([e,n])=>[e,n.map(e=>typeof e==`string`?t+e:typeof e==`object`?Object.fromEntries(Object.entries(e).map(([e,n])=>[t+e,n])):e)]):e,ei=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=new Map,r=new Map,i=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);if(t!==void 0)return t;if((t=r.get(e))!==void 0)return i(e,t),t},set(e,t){n.has(e)?n.set(e,t):i(e,t)}}},ti=`!`,ni=e=>{let{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],a=t.length,o=e=>{let n=[],o=0,s=0,c;for(let l=0;l<e.length;l++){let u=e[l];if(o===0){if(u===i&&(r||e.slice(l,l+a)===t)){n.push(e.slice(s,l)),s=l+a;continue}if(u===`/`){c=l;continue}}u===`[`?o++:u===`]`&&o--}let l=n.length===0?e:e.substring(s),u=l.startsWith(ti);return{modifiers:n,hasImportantModifier:u,baseClassName:u?l.substring(1):l,maybePostfixModifierPosition:c&&c>s?c-s:void 0}};return n?e=>n({className:e,parseClassName:o}):o},ri=e=>{if(e.length<=1)return e;let t=[],n=[];return e.forEach(e=>{e[0]===`[`?(t.push(...n.sort(),e),n=[]):n.push(e)}),t.push(...n.sort()),t},ii=e=>({cache:ei(e.cacheSize),parseClassName:ni(e),...Gr(e)}),ai=/\s+/,oi=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,a=[],o=e.trim().split(ai),s=``;for(let e=o.length-1;e>=0;--e){let t=o[e],{modifiers:c,hasImportantModifier:l,baseClassName:u,maybePostfixModifierPosition:d}=n(t),f=!!d,p=r(f?u.substring(0,d):u);if(!p){if(!f){s=t+(s.length>0?` `+s:s);continue}if(p=r(u),!p){s=t+(s.length>0?` `+s:s);continue}f=!1}let m=ri(c).join(`:`),h=l?m+ti:m,g=h+p;if(a.includes(g))continue;a.push(g);let _=i(p,f);for(let e=0;e<_.length;++e){let t=_[e];a.push(h+t)}s=t+(s.length>0?` `+s:s)}return s};function si(){let e=0,t,n,r=``;for(;e<arguments.length;)(t=arguments[e++])&&(n=ci(t))&&(r&&(r+=` `),r+=n);return r}var ci=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=ci(e[r]))&&(n&&(n+=` `),n+=t);return n};function li(e,...t){let n,r,i,a=o;function o(o){return n=ii(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)}function s(e){let t=r(e);if(t)return t;let a=oi(e,n);return i(e,a),a}return function(){return a(si.apply(null,arguments))}}var ui=e=>{let t=t=>t[e]||[];return t.isThemeGetter=!0,t},di=/^\[(?:([a-z-]+):)?(.+)\]$/i,fi=/^\d+\/\d+$/,pi=new Set([`px`,`full`,`screen`]),mi=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,hi=/\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$/,gi=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,_i=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,vi=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,yi=e=>xi(e)||pi.has(e)||fi.test(e),bi=e=>Pi(e,`length`,Fi),xi=e=>!!e&&!Number.isNaN(Number(e)),Si=e=>Pi(e,`number`,xi),Ci=e=>!!e&&Number.isInteger(Number(e)),wi=e=>e.endsWith(`%`)&&xi(e.slice(0,-1)),Ti=e=>di.test(e),Ei=e=>mi.test(e),Di=new Set([`length`,`size`,`percentage`]),Oi=e=>Pi(e,Di,Ii),ki=e=>Pi(e,`position`,Ii),Ai=new Set([`image`,`url`]),ji=e=>Pi(e,Ai,Ri),Mi=e=>Pi(e,``,Li),Ni=()=>!0,Pi=(e,t,n)=>{let r=di.exec(e);return r?r[1]?typeof t==`string`?r[1]===t:t.has(r[1]):n(r[2]):!1},Fi=e=>hi.test(e)&&!gi.test(e),Ii=()=>!1,Li=e=>_i.test(e),Ri=e=>vi.test(e),zi=li(()=>{let e=ui(`colors`),t=ui(`spacing`),n=ui(`blur`),r=ui(`brightness`),i=ui(`borderColor`),a=ui(`borderRadius`),o=ui(`borderSpacing`),s=ui(`borderWidth`),c=ui(`contrast`),l=ui(`grayscale`),u=ui(`hueRotate`),d=ui(`invert`),f=ui(`gap`),p=ui(`gradientColorStops`),m=ui(`gradientColorStopPositions`),h=ui(`inset`),g=ui(`margin`),_=ui(`opacity`),v=ui(`padding`),y=ui(`saturate`),b=ui(`scale`),x=ui(`sepia`),S=ui(`skew`),C=ui(`space`),w=ui(`translate`),T=()=>[`auto`,`contain`,`none`],E=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],D=()=>[`auto`,Ti,t],O=()=>[Ti,t],k=()=>[``,yi,bi],A=()=>[`auto`,xi,Ti],j=()=>[`bottom`,`center`,`left`,`left-bottom`,`left-top`,`right`,`right-bottom`,`right-top`,`top`],M=()=>[`solid`,`dashed`,`dotted`,`double`,`none`],N=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],P=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`],F=()=>[``,`0`,Ti],I=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],L=()=>[xi,Ti];return{cacheSize:500,separator:`:`,theme:{colors:[Ni],spacing:[yi,bi],blur:[`none`,``,Ei,Ti],brightness:L(),borderColor:[e],borderRadius:[`none`,``,`full`,Ei,Ti],borderSpacing:O(),borderWidth:k(),contrast:L(),grayscale:F(),hueRotate:L(),invert:F(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[wi,bi],inset:D(),margin:D(),opacity:L(),padding:O(),saturate:L(),scale:L(),sepia:F(),skew:L(),space:O(),translate:O()},classGroups:{aspect:[{aspect:[`auto`,`square`,`video`,Ti]}],container:[`container`],columns:[{columns:[Ei]}],"break-after":[{"break-after":I()}],"break-before":[{"break-before":I()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:[...j(),Ti]}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[`auto`,Ci,Ti]}],basis:[{basis:D()}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`wrap`,`wrap-reverse`,`nowrap`]}],flex:[{flex:[`1`,`auto`,`initial`,`none`,Ti]}],grow:[{grow:F()}],shrink:[{shrink:F()}],order:[{order:[`first`,`last`,`none`,Ci,Ti]}],"grid-cols":[{"grid-cols":[Ni]}],"col-start-end":[{col:[`auto`,{span:[`full`,Ci,Ti]},Ti]}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":[Ni]}],"row-start-end":[{row:[`auto`,{span:[Ci,Ti]},Ti]}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":[`auto`,`min`,`max`,`fr`,Ti]}],"auto-rows":[{"auto-rows":[`auto`,`min`,`max`,`fr`,Ti]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:[`normal`,...P()]}],"justify-items":[{"justify-items":[`start`,`end`,`center`,`stretch`]}],"justify-self":[{"justify-self":[`auto`,`start`,`end`,`center`,`stretch`]}],"align-content":[{content:[`normal`,...P(),`baseline`]}],"align-items":[{items:[`start`,`end`,`center`,`baseline`,`stretch`]}],"align-self":[{self:[`auto`,`start`,`end`,`center`,`stretch`,`baseline`]}],"place-content":[{"place-content":[...P(),`baseline`]}],"place-items":[{"place-items":[`start`,`end`,`center`,`baseline`,`stretch`]}],"place-self":[{"place-self":[`auto`,`start`,`end`,`center`,`stretch`]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[C]}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":[C]}],"space-y-reverse":[`space-y-reverse`],w:[{w:[`auto`,`min`,`max`,`fit`,`svw`,`lvw`,`dvw`,Ti,t]}],"min-w":[{"min-w":[Ti,t,`min`,`max`,`fit`]}],"max-w":[{"max-w":[Ti,t,`none`,`full`,`min`,`max`,`fit`,`prose`,{screen:[Ei]},Ei]}],h:[{h:[Ti,t,`auto`,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],"min-h":[{"min-h":[Ti,t,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],"max-h":[{"max-h":[Ti,t,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],size:[{size:[Ti,t,`auto`,`min`,`max`,`fit`]}],"font-size":[{text:[`base`,Ei,bi]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`,Si]}],"font-family":[{font:[Ni]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`,Ti]}],"line-clamp":[{"line-clamp":[`none`,xi,Si]}],leading:[{leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`,yi,Ti]}],"list-image":[{"list-image":[`none`,Ti]}],"list-style-type":[{list:[`none`,`disc`,`decimal`,Ti]}],"list-style-position":[{list:[`inside`,`outside`]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[_]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[_]}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...M(),`wavy`]}],"text-decoration-thickness":[{decoration:[`auto`,`from-font`,yi,bi]}],"underline-offset":[{"underline-offset":[`auto`,yi,Ti]}],"text-decoration-color":[{decoration:[e]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:O()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Ti]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,Ti]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-opacity":[{"bg-opacity":[_]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:[...j(),ki]}],"bg-repeat":[{bg:[`no-repeat`,{repeat:[``,`x`,`y`,`round`,`space`]}]}],"bg-size":[{bg:[`auto`,`cover`,`contain`,Oi]}],"bg-image":[{bg:[`none`,{"gradient-to":[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},ji]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[_]}],"border-style":[{border:[...M(),`hidden`]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":[`divide-y-reverse`],"divide-opacity":[{"divide-opacity":[_]}],"divide-style":[{divide:M()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:[``,...M()]}],"outline-offset":[{"outline-offset":[yi,Ti]}],"outline-w":[{outline:[yi,bi]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:k()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[_]}],"ring-offset-w":[{"ring-offset":[yi,bi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:[``,`inner`,`none`,Ei,Mi]}],"shadow-color":[{shadow:[Ni]}],opacity:[{opacity:[_]}],"mix-blend":[{"mix-blend":[...N(),`plus-lighter`,`plus-darker`]}],"bg-blend":[{"bg-blend":N()}],filter:[{filter:[``,`none`]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":[``,`none`,Ei,Ti]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":[``,`none`]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[_]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[`none`,`all`,``,`colors`,`opacity`,`shadow`,`transform`,Ti]}],duration:[{duration:L()}],ease:[{ease:[`linear`,`in`,`out`,`in-out`,Ti]}],delay:[{delay:L()}],animate:[{animate:[`none`,`spin`,`ping`,`pulse`,`bounce`,Ti]}],transform:[{transform:[``,`gpu`,`none`]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[Ci,Ti]}],"translate-x":[{"translate-x":[w]}],"translate-y":[{"translate-y":[w]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:[`center`,`top`,`top-right`,`right`,`bottom-right`,`bottom`,`bottom-left`,`left`,`top-left`,Ti]}],accent:[{accent:[`auto`,e]}],appearance:[{appearance:[`none`,`auto`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,Ti]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":[`none`,`auto`]}],resize:[{resize:[`none`,`y`,`x`,``]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,Ti]}],fill:[{fill:[e,`none`]}],"stroke-w":[{stroke:[yi,bi,Si]}],stroke:[{stroke:[e,`none`]}],sr:[`sr-only`,`not-sr-only`],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-s`,`border-w-e`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-s`,`border-color-e`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]}}});function H(...e){return zi(Rt(e))}function Bi(){return typeof crypto<`u`&&typeof crypto.randomUUID==`function`?crypto.randomUUID():`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e===`x`?t:t&3|8).toString(16)})}var Vi=At,Hi=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(jt,{ref:n,className:H(`fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]`,e),...t}));Hi.displayName=jt.displayName;var Ui=Vt(`group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full`,{variants:{variant:{default:`border bg-background text-foreground`,destructive:`destructive group border-destructive bg-destructive text-destructive-foreground`}},defaultVariants:{variant:`default`}}),Wi=_.forwardRef(({className:e,variant:t,...n},r)=>(0,I.jsx)(Mt,{ref:r,className:H(Ui({variant:t}),e),...n}));Wi.displayName=Mt.displayName;var Gi=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(Ft,{ref:n,className:H(`inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50`,e),...t}));Gi.displayName=Ft.displayName;var Ki=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(It,{ref:n,className:H(`absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600`,e),"toast-close":``,...t,children:(0,I.jsx)(Br,{className:`h-4 w-4`})}));Ki.displayName=It.displayName;var qi=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(Nt,{ref:n,className:H(`text-sm font-semibold`,e),...t}));qi.displayName=Nt.displayName;var Ji=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(Pt,{ref:n,className:H(`text-sm opacity-90`,e),...t}));Ji.displayName=Pt.displayName;function Yi(){let{toasts:e}=k();return(0,I.jsxs)(Vi,{children:[e.map(function({id:e,title:t,description:n,action:r,...i}){return(0,I.jsxs)(Wi,{...i,children:[(0,I.jsxs)(`div`,{className:`grid gap-1`,children:[t&&(0,I.jsx)(qi,{children:t}),n&&(0,I.jsx)(Ji,{children:n})]}),r,(0,I.jsx)(Ki,{})]},e)}),(0,I.jsx)(Hi,{})]})}var Xi=[`light`,`dark`],Zi=`(prefers-color-scheme: dark)`,Qi=_.createContext(void 0),$i={setTheme:e=>{},themes:[]},ea=()=>_.useContext(Qi)??$i;_.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:i,defaultTheme:a,value:o,attrs:s,nonce:c})=>{let l=a===`system`,u=n===`class`?`var d=document.documentElement,c=d.classList;${`c.remove(${s.map(e=>`'${e}'`).join(`,`)})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,d=i?Xi.includes(a)&&a?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${a}'`:`if(e==='light'||e==='dark')d.style.colorScheme=e`:``,f=(e,t=!1,r=!0)=>{let a=o?o[e]:e,s=t?e+`|| ''`:`'${a}'`,c=``;return i&&r&&!t&&Xi.includes(e)&&(c+=`d.style.colorScheme = '${e}';`),n===`class`?t||a?c+=`c.add(${s})`:c+=`null`:a&&(c+=`d[s](n,${s})`),c},p=e?`!function(){${u}${f(e)}}()`:r?`!function(){try{${u}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${l})){var t='${Zi}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f(`dark`)}}else{${f(`light`)}}}else if(e){${o?`var x=${JSON.stringify(o)};`:``}${f(o?`x[e]`:`e`,!0)}}${l?``:`else{`+f(a,!1,!1)+`}`}${d}}catch(e){}}()`:`!function(){try{${u}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:``}${f(o?`x[e]`:`e`,!0)}}else{${f(a,!1,!1)};}${d}}catch(t){}}();`;return _.createElement(`script`,{nonce:c,dangerouslySetInnerHTML:{__html:p}})});var ta=e=>{switch(e){case`success`:return ia;case`info`:return oa;case`warning`:return aa;case`error`:return sa;default:return null}},na=Array(12).fill(0),ra=({visible:e,className:t})=>_.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},_.createElement(`div`,{className:`sonner-spinner`},na.map((e,t)=>_.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),ia=_.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},_.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),aa=_.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`},_.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),oa=_.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},_.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),sa=_.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},_.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),ca=_.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`},_.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),_.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),la=()=>{let[e,t]=_.useState(document.hidden);return _.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>window.removeEventListener(`visibilitychange`,e)},[]),e},ua=1,da=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{let{message:t,...n}=e,r=typeof e?.id==`number`||e.id?.length>0?e.id:ua++,i=this.toasts.find(e=>e.id===r),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=e instanceof Promise?e:e(),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],_.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(pa(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description;this.create({id:n,type:`error`,message:r,description:a})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description;this.create({id:n,type:`success`,message:r,description:a})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description;this.create({id:n,type:`error`,message:r,description:a})}}).finally(()=>{var e;i&&(this.dismiss(n),n=void 0),(e=t.finally)==null||e.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=t?.id||ua++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},fa=(e,t)=>{let n=t?.id||ua++;return da.addToast({title:e,...t,id:n}),n},pa=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`;Object.assign(fa,{success:da.success,info:da.info,warning:da.warning,error:da.error,custom:da.custom,message:da.message,promise:da.promise,dismiss:da.dismiss,loading:da.loading},{getHistory:()=>da.toasts,getToasts:()=>da.getActiveToasts()});function ma(e,{insertAt:t}={}){if(!e||typeof document>`u`)return;let n=document.head||document.getElementsByTagName(`head`)[0],r=document.createElement(`style`);r.type=`text/css`,t===`top`&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}ma(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
9
- `);function ha(e){return e.label!==void 0}var ga=3,_a=`32px`,va=`16px`,ya=4e3,ba=356,xa=14,Sa=20,Ca=200;function wa(...e){return e.filter(Boolean).join(` `)}function Ta(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var Ea=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:m,cancelButtonStyle:h,actionButtonStyle:g,className:v=``,descriptionClassName:y=``,duration:b,position:x,gap:S,loadingIcon:C,expandByDefault:w,classNames:T,icons:E,closeButtonAriaLabel:D=`Close toast`,pauseWhenPageIsHidden:O}=e,[k,A]=_.useState(null),[j,M]=_.useState(null),[N,P]=_.useState(!1),[F,I]=_.useState(!1),[L,R]=_.useState(!1),[ee,te]=_.useState(!1),[ne,re]=_.useState(!1),[ie,ae]=_.useState(0),[oe,se]=_.useState(0),ce=_.useRef(n.duration||b||ya),z=_.useRef(null),le=_.useRef(null),B=c===0,ue=c+1<=o,de=n.type,fe=n.dismissible!==!1,pe=n.className||``,me=n.descriptionClassName||``,he=_.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),ge=_.useMemo(()=>n.closeButton??p,[n.closeButton,p]),_e=_.useMemo(()=>n.duration||b||ya,[n.duration,b]),ve=_.useRef(0),ye=_.useRef(0),be=_.useRef(0),xe=_.useRef(null),[Se,Ce]=x.split(`-`),we=_.useMemo(()=>s.reduce((e,t,n)=>n>=he?e:e+t.height,0),[s,he]),Te=la(),Ee=n.invert||t,De=de===`loading`;ye.current=_.useMemo(()=>he*S+we,[he,we]),_.useEffect(()=>{ce.current=_e},[_e]),_.useEffect(()=>{P(!0)},[]),_.useEffect(()=>{let e=le.current;if(e){let t=e.getBoundingClientRect().height;return se(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),_.useLayoutEffect(()=>{if(!N)return;let e=le.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,se(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[N,n.title,n.description,a,n.id]);let Oe=_.useCallback(()=>{I(!0),ae(ye.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},Ca)},[n,d,a,ye]);_.useEffect(()=>{if(n.promise&&de===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||O&&Te?(()=>{if(be.current<ve.current){let e=new Date().getTime()-ve.current;ce.current-=e}be.current=new Date().getTime()})():ce.current!==1/0&&(ve.current=new Date().getTime(),e=setTimeout(()=>{var e;(e=n.onAutoClose)==null||e.call(n,n),Oe()},ce.current)),()=>clearTimeout(e)},[u,i,n,de,O,Te,Oe]),_.useEffect(()=>{n.delete&&Oe()},[Oe,n.delete]);function ke(){return E!=null&&E.loading?_.createElement(`div`,{className:wa(T?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":de===`loading`},E.loading):C?_.createElement(`div`,{className:wa(T?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":de===`loading`},C):_.createElement(ra,{className:wa(T?.loader,n?.classNames?.loader),visible:de===`loading`})}return _.createElement(`li`,{tabIndex:0,ref:le,className:wa(v,pe,T?.toast,n?.classNames?.toast,T?.default,T?.[de],n?.classNames?.[de]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":N,"data-promise":!!n.promise,"data-swiped":ne,"data-removed":F,"data-visible":ue,"data-y-position":Se,"data-x-position":Ce,"data-index":c,"data-front":B,"data-swiping":L,"data-dismissible":fe,"data-type":de,"data-invert":Ee,"data-swipe-out":ee,"data-swipe-direction":j,"data-expanded":!!(u||w&&N),style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${F?ie:ye.current}px`,"--initial-height":w?`auto`:`${oe}px`,...m,...n.style},onDragEnd:()=>{R(!1),A(null),xe.current=null},onPointerDown:e=>{De||!fe||(z.current=new Date,ae(ye.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(R(!0),xe.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{var e;if(ee||!fe)return;xe.current=null;let t=Number(le.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),r=Number(le.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),i=new Date().getTime()-z.current?.getTime(),a=k===`x`?t:r,o=Math.abs(a)/i;if(Math.abs(a)>=Sa||o>.11){ae(ye.current),(e=n.onDismiss)==null||e.call(n,n),M(k===`x`?t>0?`right`:`left`:r>0?`down`:`up`),Oe(),te(!0),re(!1);return}R(!1),A(null)},onPointerMove:t=>{var n,r;if(!xe.current||!fe||window.getSelection()?.toString().length>0)return;let i=t.clientY-xe.current.y,a=t.clientX-xe.current.x,o=e.swipeDirections??Ta(x);!k&&(Math.abs(a)>1||Math.abs(i)>1)&&A(Math.abs(a)>Math.abs(i)?`x`:`y`);let s={x:0,y:0};k===`y`?(o.includes(`top`)||o.includes(`bottom`))&&(o.includes(`top`)&&i<0||o.includes(`bottom`)&&i>0)&&(s.y=i):k===`x`&&(o.includes(`left`)||o.includes(`right`))&&(o.includes(`left`)&&a<0||o.includes(`right`)&&a>0)&&(s.x=a),(Math.abs(s.x)>0||Math.abs(s.y)>0)&&re(!0),(n=le.current)==null||n.style.setProperty(`--swipe-amount-x`,`${s.x}px`),(r=le.current)==null||r.style.setProperty(`--swipe-amount-y`,`${s.y}px`)}},ge&&!n.jsx?_.createElement(`button`,{"aria-label":D,"data-disabled":De,"data-close-button":!0,onClick:De||!fe?()=>{}:()=>{var e;Oe(),(e=n.onDismiss)==null||e.call(n,n)},className:wa(T?.closeButton,n?.classNames?.closeButton)},E?.close??ca):null,n.jsx||(0,_.isValidElement)(n.title)?n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title:_.createElement(_.Fragment,null,de||n.icon||n.promise?_.createElement(`div`,{"data-icon":``,className:wa(T?.icon,n?.classNames?.icon)},n.promise||n.type===`loading`&&!n.icon?n.icon||ke():null,n.type===`loading`?null:n.icon||E?.[de]||ta(de)):null,_.createElement(`div`,{"data-content":``,className:wa(T?.content,n?.classNames?.content)},_.createElement(`div`,{"data-title":``,className:wa(T?.title,n?.classNames?.title)},typeof n.title==`function`?n.title():n.title),n.description?_.createElement(`div`,{"data-description":``,className:wa(y,me,T?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),(0,_.isValidElement)(n.cancel)?n.cancel:n.cancel&&ha(n.cancel)?_.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||h,onClick:e=>{var t,r;ha(n.cancel)&&fe&&((r=(t=n.cancel).onClick)==null||r.call(t,e),Oe())},className:wa(T?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,(0,_.isValidElement)(n.action)?n.action:n.action&&ha(n.action)?_.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||g,onClick:e=>{var t,r;ha(n.action)&&((r=(t=n.action).onClick)==null||r.call(t,e),!e.defaultPrevented&&Oe())},className:wa(T?.actionButton,n?.classNames?.actionButton)},n.action.label):null))};function Da(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function Oa(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?va:_a;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var ka=(0,_.forwardRef)(function(e,t){let{invert:n,position:r=`bottom-right`,hotkey:i=[`altKey`,`KeyT`],expand:a,closeButton:o,className:s,offset:c,mobileOffset:l,theme:u=`light`,richColors:d,duration:f,style:p,visibleToasts:m=ga,toastOptions:h,dir:g=Da(),gap:v=xa,loadingIcon:y,icons:b,containerAriaLabel:x=`Notifications`,pauseWhenPageIsHidden:S}=e,[C,w]=_.useState([]),T=_.useMemo(()=>Array.from(new Set([r].concat(C.filter(e=>e.position).map(e=>e.position)))),[C,r]),[E,D]=_.useState([]),[O,k]=_.useState(!1),[j,M]=_.useState(!1),[N,P]=_.useState(u===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:u),F=_.useRef(null),I=i.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),L=_.useRef(null),R=_.useRef(!1),ee=_.useCallback(e=>{w(t=>{var n;return(n=t.find(t=>t.id===e.id))!=null&&n.delete||da.dismiss(e.id),t.filter(({id:t})=>t!==e.id)})},[]);return _.useEffect(()=>da.subscribe(e=>{if(e.dismiss){w(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t));return}setTimeout(()=>{A.flushSync(()=>{w(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[]),_.useEffect(()=>{if(u!==`system`){P(u);return}if(u===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?P(`dark`):P(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{P(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{P(e?`dark`:`light`)}catch(e){console.error(e)}})}},[u]),_.useEffect(()=>{C.length<=1&&k(!1)},[C]),_.useEffect(()=>{let e=e=>{var t,n;i.every(t=>e[t]||e.code===t)&&(k(!0),(t=F.current)==null||t.focus()),e.code===`Escape`&&(document.activeElement===F.current||(n=F.current)!=null&&n.contains(document.activeElement))&&k(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[i]),_.useEffect(()=>{if(F.current)return()=>{L.current&&(L.current.focus({preventScroll:!0}),L.current=null,R.current=!1)}},[F.current]),_.createElement(`section`,{ref:t,"aria-label":`${x} ${I}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0},T.map((t,r)=>{let[i,u]=t.split(`-`);return C.length?_.createElement(`ol`,{key:t,dir:g===`auto`?Da():g,tabIndex:-1,ref:F,className:s,"data-sonner-toaster":!0,"data-theme":N,"data-y-position":i,"data-lifted":O&&C.length>1&&!a,"data-x-position":u,style:{"--front-toast-height":`${E[0]?.height||0}px`,"--width":`${ba}px`,"--gap":`${v}px`,...p,...Oa(c,l)},onBlur:e=>{R.current&&!e.currentTarget.contains(e.relatedTarget)&&(R.current=!1,L.current&&=(L.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||R.current||(R.current=!0,L.current=e.relatedTarget)},onMouseEnter:()=>k(!0),onMouseMove:()=>k(!0),onMouseLeave:()=>{j||k(!1)},onDragEnd:()=>k(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||M(!0)},onPointerUp:()=>M(!1)},C.filter(e=>!e.position&&r===0||e.position===t).map((r,i)=>_.createElement(Ea,{key:r.id,icons:b,index:i,toast:r,defaultRichColors:d,duration:h?.duration??f,className:h?.className,descriptionClassName:h?.descriptionClassName,invert:n,visibleToasts:m,closeButton:h?.closeButton??o,interacting:j,position:t,style:h?.style,unstyled:h?.unstyled,classNames:h?.classNames,cancelButtonStyle:h?.cancelButtonStyle,actionButtonStyle:h?.actionButtonStyle,removeToast:ee,toasts:C.filter(e=>e.position==r.position),heights:E.filter(e=>e.position==r.position),setHeights:D,expandByDefault:a,gap:v,loadingIcon:y,expanded:O,pauseWhenPageIsHidden:S,swipeDirections:e.swipeDirections}))):null}))}),Aa=({...e})=>{let{theme:t=`system`}=ea();return(0,I.jsx)(ka,{theme:t,className:`toaster group`,toastOptions:{classNames:{toast:`group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg`,description:`group-[.toast]:text-muted-foreground`,actionButton:`group-[.toast]:bg-primary group-[.toast]:text-primary-foreground`,cancelButton:`group-[.toast]:bg-muted group-[.toast]:text-muted-foreground`}},...e})},ja=_.useId||(()=>void 0),Ma=0;function Na(e){let[t,n]=_.useState(ja());return Ee(()=>{e||n(e=>e??String(Ma++))},[e]),e||(t?`radix-${t}`:``)}var Pa=[`top`,`right`,`bottom`,`left`],Fa=Math.min,Ia=Math.max,La=Math.round,Ra=Math.floor,za=e=>({x:e,y:e}),Ba={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Va(e,t,n){return Ia(e,Fa(t,n))}function Ha(e,t){return typeof e==`function`?e(t):e}function Ua(e){return e.split(`-`)[0]}function Wa(e){return e.split(`-`)[1]}function Ga(e){return e===`x`?`y`:`x`}function Ka(e){return e===`y`?`height`:`width`}function qa(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Ja(e){return Ga(qa(e))}function Ya(e,t,n){n===void 0&&(n=!1);let r=Wa(e),i=Ja(e),a=Ka(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=io(o)),[o,io(o)]}function Xa(e){let t=io(e);return[Za(e),t,Za(t)]}function Za(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Qa=[`left`,`right`],$a=[`right`,`left`],eo=[`top`,`bottom`],to=[`bottom`,`top`];function no(e,t,n){switch(e){case`top`:case`bottom`:return n?t?$a:Qa:t?Qa:$a;case`left`:case`right`:return t?eo:to;default:return[]}}function ro(e,t,n,r){let i=Wa(e),a=no(Ua(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Za)))),a}function io(e){let t=Ua(e);return Ba[t]+e.slice(t.length)}function ao(e){return{top:0,right:0,bottom:0,left:0,...e}}function oo(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:ao(e)}function so(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 co(e,t,n){let{reference:r,floating:i}=e,a=qa(t),o=Ja(t),s=Ka(o),c=Ua(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Wa(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function lo(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}=Ha(t,e),p=oo(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=so(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=so(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 uo=50,fo=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:lo},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=co(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<uo&&(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}=co(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},po=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}=Ha(e,t)||{};if(l==null)return{};let d=oo(u),f={x:n,y:r},p=Ja(i),m=Ka(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Fa(d[_],T),D=Fa(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=Va(O,A,k),M=!c.arrow&&Wa(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),mo=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}=Ha(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Ua(r),_=qa(o),v=Ua(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[io(o)]:Xa(o)),x=p!==`none`;!d&&x&&b.push(...ro(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=Ya(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`&&_!==qa(t))||T.every(e=>qa(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=qa(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function ho(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function go(e){return Pa.some(t=>e[t]>=0)}var _o=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Ha(e,t);switch(i){case`referenceHidden`:{let e=ho(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:go(e)}}}case`escaped`:{let e=ho(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:go(e)}}}default:return{}}}}},vo=new Set([`left`,`top`]);async function yo(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Ua(n),s=Wa(n),c=qa(n)===`y`,l=vo.has(o)?-1:1,u=a&&c?-1:1,d=Ha(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 bo=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 yo(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}}}}},xo=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}=Ha(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=qa(Ua(i)),p=Ga(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=Va(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=Va(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},So=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}=Ha(e,t),u={x:n,y:r},d=qa(i),f=Ga(d),p=u[f],m=u[d],h=Ha(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=vo.has(Ua(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Co=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=Ha(e,t),u=await o.detectOverflow(t,l),d=Ua(i),f=Wa(i),p=qa(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Fa(h-u[g],v),x=Fa(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=Ia(u.left,0),t=Ia(u.right,0),n=Ia(u.top,0),r=Ia(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:Ia(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:Ia(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function wo(){return typeof window<`u`}function To(e){return Oo(e)?(e.nodeName||``).toLowerCase():`#document`}function Eo(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Do(e){return((Oo(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Oo(e){return wo()?e instanceof Node||e instanceof Eo(e).Node:!1}function ko(e){return wo()?e instanceof Element||e instanceof Eo(e).Element:!1}function Ao(e){return wo()?e instanceof HTMLElement||e instanceof Eo(e).HTMLElement:!1}function jo(e){return!wo()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Eo(e).ShadowRoot}function Mo(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Uo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function No(e){return/^(table|td|th)$/.test(To(e))}function Po(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Fo=/transform|translate|scale|rotate|perspective|filter/,Io=/paint|layout|strict|content/,Lo=e=>!!e&&e!==`none`,Ro;function zo(e){let t=ko(e)?Uo(e):e;return Lo(t.transform)||Lo(t.translate)||Lo(t.scale)||Lo(t.rotate)||Lo(t.perspective)||!Vo()&&(Lo(t.backdropFilter)||Lo(t.filter))||Fo.test(t.willChange||``)||Io.test(t.contain||``)}function Bo(e){let t=Go(e);for(;Ao(t)&&!Ho(t);){if(zo(t))return t;if(Po(t))return null;t=Go(t)}return null}function Vo(){return Ro??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Ro}function Ho(e){return/^(html|body|#document)$/.test(To(e))}function Uo(e){return Eo(e).getComputedStyle(e)}function Wo(e){return ko(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Go(e){if(To(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||jo(e)&&e.host||Do(e);return jo(t)?t.host:t}function Ko(e){let t=Go(e);return Ho(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ao(t)&&Mo(t)?t:Ko(t)}function qo(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Ko(e),i=r===e.ownerDocument?.body,a=Eo(r);if(i){let e=Jo(a);return t.concat(a,a.visualViewport||[],Mo(r)?r:[],e&&n?qo(e):[])}else return t.concat(r,qo(r,[],n))}function Jo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Yo(e){let t=Uo(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Ao(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=La(n)!==a||La(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Xo(e){return ko(e)?e:e.contextElement}function Zo(e){let t=Xo(e);if(!Ao(t))return za(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Yo(t),o=(a?La(n.width):n.width)/r,s=(a?La(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Qo=za(0);function $o(e){let t=Eo(e);return!Vo()||!t.visualViewport?Qo:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function es(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Eo(e)?!1:t}function ts(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Xo(e),o=za(1);t&&(r?ko(r)&&(o=Zo(r)):o=Zo(e));let s=es(a,n,r)?$o(a):za(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=Eo(a),t=r&&ko(r)?Eo(r):r,n=e,i=Jo(n);for(;i&&r&&t!==n;){let e=Zo(i),t=i.getBoundingClientRect(),r=Uo(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=Eo(i),i=Jo(n)}}return so({width:u,height:d,x:c,y:l})}function ns(e,t){let n=Wo(e).scrollLeft;return t?t.left+n:ts(Do(e)).left+n}function rs(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ns(e,n),y:n.top+t.scrollTop}}function is(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Do(r),s=t?Po(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=za(1),u=za(0),d=Ao(r);if((d||!d&&!a)&&((To(r)!==`body`||Mo(o))&&(c=Wo(r)),d)){let e=ts(r);l=Zo(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?rs(o,c):za(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 as(e){return Array.from(e.getClientRects())}function os(e){let t=Do(e),n=Wo(e),r=e.ownerDocument.body,i=Ia(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Ia(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+ns(e),s=-n.scrollTop;return Uo(r).direction===`rtl`&&(o+=Ia(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var ss=25;function cs(e,t){let n=Eo(e),r=Do(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Vo();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=ns(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=ss&&(a-=o)}else l<=ss&&(a+=l);return{width:a,height:o,x:s,y:c}}function ls(e,t){let n=ts(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Ao(e)?Zo(e):za(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function us(e,t,n){let r;if(t===`viewport`)r=cs(e,n);else if(t===`document`)r=os(Do(e));else if(ko(t))r=ls(t,n);else{let n=$o(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return so(r)}function ds(e,t){let n=Go(e);return n===t||!ko(n)||Ho(n)?!1:Uo(n).position===`fixed`||ds(n,t)}function fs(e,t){let n=t.get(e);if(n)return n;let r=qo(e,[],!1).filter(e=>ko(e)&&To(e)!==`body`),i=null,a=Uo(e).position===`fixed`,o=a?Go(e):e;for(;ko(o)&&!Ho(o);){let t=Uo(o),n=zo(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Mo(o)&&!n&&ds(e,o))?r=r.filter(e=>e!==o):i=t,o=Go(o)}return t.set(e,r),r}function ps(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Po(t)?[]:fs(t,this._c):[].concat(n),r],o=us(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=us(t,a[e],i);s=Ia(n.top,s),c=Fa(n.right,c),l=Fa(n.bottom,l),u=Ia(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function ms(e){let{width:t,height:n}=Yo(e);return{width:t,height:n}}function hs(e,t,n){let r=Ao(t),i=Do(t),a=n===`fixed`,o=ts(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=za(0);function l(){c.x=ns(i)}if(r||!r&&!a)if((To(t)!==`body`||Mo(i))&&(s=Wo(t)),r){let e=ts(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?rs(i,s):za(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function gs(e){return Uo(e).position===`static`}function _s(e,t){if(!Ao(e)||Uo(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Do(e)===n&&(n=n.ownerDocument.body),n}function vs(e,t){let n=Eo(e);if(Po(e))return n;if(!Ao(e)){let t=Go(e);for(;t&&!Ho(t);){if(ko(t)&&!gs(t))return t;t=Go(t)}return n}let r=_s(e,t);for(;r&&No(r)&&gs(r);)r=_s(r,t);return r&&Ho(r)&&gs(r)&&!zo(r)?n:r||Bo(e)||n}var ys=async function(e){let t=this.getOffsetParent||vs,n=this.getDimensions,r=await n(e.floating);return{reference:hs(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function bs(e){return Uo(e).direction===`rtl`}var xs={convertOffsetParentRelativeRectToViewportRelativeRect:is,getDocumentElement:Do,getClippingRect:ps,getOffsetParent:vs,getElementRects:ys,getClientRects:as,getDimensions:ms,getScale:Zo,isElement:ko,isRTL:bs};function Ss(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Cs(e,t){let n=null,r,i=Do(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=Ra(d),h=Ra(i.clientWidth-(u+f)),g=Ra(i.clientHeight-(d+p)),_=Ra(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Ia(0,Fa(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Ss(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function ws(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=Xo(e),u=i||a?[...l?qo(l):[],...t?qo(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Cs(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?ts(e):null;c&&g();function g(){let t=ts(e);h&&!Ss(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 Ts=bo,Es=xo,Ds=mo,Os=Co,ks=_o,As=po,js=So,Ms=(e,t,n)=>{let r=new Map,i={platform:xs,...n},a={...i.platform,_c:r};return fo(e,t,{...i,platform:a})},Ns=typeof document<`u`?_.useLayoutEffect:function(){};function Ps(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(!Ps(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)&&!Ps(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Fs(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Is(e,t){let n=Fs(e);return Math.round(t*n)/n}function Ls(e){let t=_.useRef(e);return Ns(()=>{t.current=e}),t}function Rs(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]=_.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=_.useState(r);Ps(f,r)||p(r);let[m,h]=_.useState(null),[g,v]=_.useState(null),y=_.useCallback(e=>{e!==C.current&&(C.current=e,h(e))},[]),b=_.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||m,S=o||g,C=_.useRef(null),w=_.useRef(null),T=_.useRef(u),E=c!=null,D=Ls(c),O=Ls(i),k=Ls(l),j=_.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),Ms(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};M.current&&!Ps(T.current,t)&&(T.current=t,A.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);Ns(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let M=_.useRef(!1);Ns(()=>(M.current=!0,()=>{M.current=!1}),[]),Ns(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,j);j()}},[x,S,j,D,E]);let N=_.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),P=_.useMemo(()=>({reference:x,floating:S}),[x,S]),F=_.useMemo(()=>{let e={position:n,left:0,top:0};if(!P.floating)return e;let t=Is(P.floating,u.x),r=Is(P.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Fs(P.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,P.floating,u.x,u.y]);return _.useMemo(()=>({...u,update:j,refs:N,elements:P,floatingStyles:F}),[u,j,N,P,F])}var zs=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:As({element:r.current,padding:i}).fn(n):r?As({element:r,padding:i}).fn(n):{}}}},Bs=(e,t)=>{let n=Ts(e);return{name:n.name,fn:n.fn,options:[e,t]}},Vs=(e,t)=>{let n=Es(e);return{name:n.name,fn:n.fn,options:[e,t]}},Hs=(e,t)=>({fn:js(e).fn,options:[e,t]}),Us=(e,t)=>{let n=Ds(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ws=(e,t)=>{let n=Os(e);return{name:n.name,fn:n.fn,options:[e,t]}},Gs=(e,t)=>{let n=ks(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ks=(e,t)=>{let n=zs(e);return{name:n.name,fn:n.fn,options:[e,t]}},qs=`Arrow`,Js=_.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,I.jsx)(z.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,I.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});Js.displayName=qs;var Ys=Js;function Xs(e){let[t,n]=_.useState(void 0);return Ee(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var Zs=`Popper`,[Qs,$s]=R(Zs),[ec,tc]=Qs(Zs),nc=e=>{let{__scopePopper:t,children:n}=e,[r,i]=_.useState(null);return(0,I.jsx)(ec,{scope:t,anchor:r,onAnchorChange:i,children:n})};nc.displayName=Zs;var rc=`PopperAnchor`,ic=_.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=tc(rc,n),o=_.useRef(null),s=P(t,o),c=_.useRef(null);return _.useEffect(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:(0,I.jsx)(z.div,{...i,ref:s})});ic.displayName=rc;var ac=`PopperContent`,[oc,sc]=Qs(ac),cc=_.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=tc(ac,n),[v,y]=_.useState(null),b=P(t,e=>y(e)),[x,S]=_.useState(null),C=Xs(x),w=C?.width??0,T=C?.height??0,E=r+(a===`center`?``:`-`+a),D=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},O=Array.isArray(l)?l:[l],k=O.length>0,A={padding:D,boundary:O.filter(fc),altBoundary:k},{refs:j,floatingStyles:M,placement:N,isPositioned:F,middlewareData:L}=Rs({strategy:`fixed`,placement:E,whileElementsMounted:(...e)=>ws(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[Bs({mainAxis:i+T,alignmentAxis:o}),c&&Vs({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?Hs():void 0,...A}),c&&Us({...A}),Ws({...A,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),x&&Ks({element:x,padding:s}),pc({arrowWidth:w,arrowHeight:T}),f&&Gs({strategy:`referenceHidden`,...A})]}),[R,ee]=mc(N),te=B(m);Ee(()=>{F&&te?.()},[F,te]);let ne=L.arrow?.x,re=L.arrow?.y,ie=L.arrow?.centerOffset!==0,[ae,oe]=_.useState();return Ee(()=>{v&&oe(window.getComputedStyle(v).zIndex)},[v]),(0,I.jsx)(`div`,{ref:j.setFloating,"data-radix-popper-content-wrapper":``,style:{...M,transform:F?M.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ae,"--radix-popper-transform-origin":[L.transformOrigin?.x,L.transformOrigin?.y].join(` `),...L.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,I.jsx)(oc,{scope:n,placedSide:R,onArrowChange:S,arrowX:ne,arrowY:re,shouldHideArrow:ie,children:(0,I.jsx)(z.div,{"data-side":R,"data-align":ee,...h,ref:b,style:{...h.style,animation:F?void 0:`none`}})})})});cc.displayName=ac;var lc=`PopperArrow`,uc={top:`bottom`,right:`left`,bottom:`top`,left:`right`},dc=_.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=sc(lc,n),a=uc[i.placedSide];return(0,I.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,I.jsx)(Ys,{...r,ref:t,style:{...r.style,display:`block`}})})});dc.displayName=lc;function fc(e){return e!==null}var pc=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=mc(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function mc(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var hc=nc,gc=ic,_c=cc,vc=dc,[yc,eee]=R(`Tooltip`,[$s]),U=$s(),bc=`TooltipProvider`,xc=700,Sc=`tooltip.open`,[Cc,wc]=yc(bc),Tc=e=>{let{__scopeTooltip:t,delayDuration:n=xc,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=_.useRef(!0),s=_.useRef(!1),c=_.useRef(0);return _.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,I.jsx)(Cc,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:_.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:_.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:_.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};Tc.displayName=bc;var Ec=`Tooltip`,[Dc,Oc]=yc(Ec),kc=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=wc(Ec,e.__scopeTooltip),l=U(t),[u,d]=_.useState(null),f=Na(),p=_.useRef(0),m=o??c.disableHoverableContent,h=s??c.delayDuration,g=_.useRef(!1),[v,y]=Fe({prop:r,defaultProp:i??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(Sc))):c.onClose(),a?.(e)},caller:Ec}),b=_.useMemo(()=>v?g.current?`delayed-open`:`instant-open`:`closed`,[v]),x=_.useCallback(()=>{window.clearTimeout(p.current),p.current=0,g.current=!1,y(!0)},[y]),S=_.useCallback(()=>{window.clearTimeout(p.current),p.current=0,y(!1)},[y]),C=_.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{g.current=!0,y(!0),p.current=0},h)},[h,y]);return _.useEffect(()=>()=>{p.current&&=(window.clearTimeout(p.current),0)},[]),(0,I.jsx)(hc,{...l,children:(0,I.jsx)(Dc,{scope:t,contentId:f,open:v,stateAttribute:b,trigger:u,onTriggerChange:d,onTriggerEnter:_.useCallback(()=>{c.isOpenDelayedRef.current?C():x()},[c.isOpenDelayedRef,C,x]),onTriggerLeave:_.useCallback(()=>{m?S():(window.clearTimeout(p.current),p.current=0)},[S,m]),onOpen:x,onClose:S,disableHoverableContent:m,children:n})})};kc.displayName=Ec;var Ac=`TooltipTrigger`,jc=_.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=Oc(Ac,n),a=wc(Ac,n),o=U(n),s=P(t,_.useRef(null),i.onTriggerChange),c=_.useRef(!1),l=_.useRef(!1),u=_.useCallback(()=>c.current=!1,[]);return _.useEffect(()=>()=>document.removeEventListener(`pointerup`,u),[u]),(0,I.jsx)(gc,{asChild:!0,...o,children:(0,I.jsx)(z.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:j(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:j(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:j(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,u,{once:!0})}),onFocus:j(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:j(e.onBlur,i.onClose),onClick:j(e.onClick,i.onClose)})})});jc.displayName=Ac;var Mc=`TooltipPortal`,[Nc,Pc]=yc(Mc,{forceMount:void 0}),Fc=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=Oc(Mc,t);return(0,I.jsx)(Nc,{scope:t,forceMount:n,children:(0,I.jsx)(Ae,{present:n||a.open,children:(0,I.jsx)(Oe,{asChild:!0,container:i,children:r})})})};Fc.displayName=Mc;var Ic=`TooltipContent`,Lc=_.forwardRef((e,t)=>{let n=Pc(Ic,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=Oc(Ic,e.__scopeTooltip);return(0,I.jsx)(Ae,{present:r||o.open,children:o.disableHoverableContent?(0,I.jsx)(Hc,{side:i,...a,ref:t}):(0,I.jsx)(Rc,{side:i,...a,ref:t})})}),Rc=_.forwardRef((e,t)=>{let n=Oc(Ic,e.__scopeTooltip),r=wc(Ic,e.__scopeTooltip),i=_.useRef(null),a=P(t,i),[o,s]=_.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=_.useCallback(()=>{s(null),d(!1)},[d]),p=_.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=Kc(r,Gc(r,n.getBoundingClientRect())),a=qc(t.getBoundingClientRect());s(Yc([...i,...a])),d(!0)},[d]);return _.useEffect(()=>()=>f(),[f]),_.useEffect(()=>{if(c&&u){let e=e=>p(e,u),t=e=>p(e,c);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),_.useEffect(()=>{if(o){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!Jc(n,o);r?f():i&&(f(),l())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,I.jsx)(Hc,{...e,ref:a})}),[zc,Bc]=yc(Ec,{isInside:!1}),Vc=ie(`TooltipContent`),Hc=_.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=Oc(Ic,n),l=U(n),{onClose:u}=c;return _.useEffect(()=>(document.addEventListener(Sc,u),()=>document.removeEventListener(Sc,u)),[u]),_.useEffect(()=>{if(c.trigger){let e=e=>{e.target?.contains(c.trigger)&&u()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[c.trigger,u]),(0,I.jsx)(_e,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,I.jsxs)(_c,{"data-state":c.stateAttribute,...l,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,I.jsx)(Vc,{children:r}),(0,I.jsx)(zc,{scope:n,isInside:!0,children:(0,I.jsx)(Ve,{id:c.contentId,role:`tooltip`,children:i||r})})]})})});Lc.displayName=Ic;var Uc=`TooltipArrow`,Wc=_.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=U(n);return Bc(Uc,n).isInside?null:(0,I.jsx)(vc,{...i,...r,ref:t})});Wc.displayName=Uc;function Gc(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function Kc(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function qc(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function Jc(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function Yc(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),Xc(t)}function Xc(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Zc=Tc,Qc=kc,$c=jc,el=Lc,tl=Zc,nl=Qc,rl=$c,il=_.forwardRef(({className:e,sideOffset:t=4,...n},r)=>(0,I.jsx)(el,{ref:r,sideOffset:t,className:H(`z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,e),...n}));il.displayName=el.displayName;var al=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ol=new class extends al{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},sl={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},cl=new class{#e=sl;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function ll(e){setTimeout(e,0)}var ul=typeof window>`u`||`Deno`in globalThis;function dl(){}function fl(e,t){return typeof e==`function`?e(t):e}function pl(e){return typeof e==`number`&&e>=0&&e!==1/0}function ml(e,t){return Math.max(e+(t||0)-Date.now(),0)}function hl(e,t){return typeof e==`function`?e(t):e}function gl(e,t){return typeof e==`function`?e(t):e}function _l(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==yl(o,t.options))return!1}else if(!xl(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function vl(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(bl(t.options.mutationKey)!==bl(a))return!1}else if(!xl(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function yl(e,t){return(t?.queryKeyHashFn||bl)(e)}function bl(e){return JSON.stringify(e,(e,t)=>El(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function xl(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>xl(e[n],t[n])):!1}var Sl=Object.prototype.hasOwnProperty;function Cl(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=Tl(e)&&Tl(t);if(!r&&!(El(e)&&El(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:Sl.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=Cl(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function wl(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function Tl(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function El(e){if(!Dl(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!Dl(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function Dl(e){return Object.prototype.toString.call(e)===`[object Object]`}function Ol(e){return new Promise(t=>{cl.setTimeout(t,e)})}function kl(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:Cl(e,t)}function Al(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function jl(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Ml=Symbol();function Nl(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Ml?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Pl(e,t){return typeof e==`function`?e(...t):!!e}function Fl(e,t,n){let r=!1,i;return Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var Il=(()=>{let e=()=>ul;return{isServer(){return e()},setIsServer(t){e=t}}})();function Ll(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var Rl=ll;function zl(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Rl,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var Bl=zl(),Vl=new class extends al{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function Hl(e){return Math.min(1e3*2**e,3e4)}function Ul(e){return(e??`online`)===`online`?Vl.isOnline():!0}var Wl=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function Gl(e){let t=!1,n=0,r,i=Ll(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new Wl(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>ol.isFocused()&&(e.networkMode===`always`||Vl.isOnline())&&e.canRun(),u=()=>Ul(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(Il.isServer()?0:3),o=e.retryDelay??Hl,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),Ol(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var Kl=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),pl(this.gcTime)&&(this.#e=cl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Il.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e&&=(cl.clearTimeout(this.#e),void 0)}},ql=class extends Kl{#e;#t;#n;#r;#i;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=Xl(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Xl(this.options);e.data!==void 0&&(this.setState(Yl(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#n.remove(this)}setData(e,t){let n=kl(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#c({type:`setState`,state:e,setStateOptions:t})}cancel(e){let t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(dl).catch(dl):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>gl(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ml||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>hl(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!ml(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#i&&(this.#o||this.#s()?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#s(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#i?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{let e=Nl(this.options,t),n=(()=>{let e={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#o=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return r(e),e})();this.options.behavior?.onFetch(a,this),this.#t=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta}),this.#i=Gl({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof Wl&&e.revert&&this.setState({...this.#t,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#i.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#n.config.onSuccess?.(e,this),this.#n.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof Wl){if(e.silent)return this.#i.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#n.config.onError?.(e,this),this.#n.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#c(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...Jl(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Yl(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}})(this.state),Bl.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#n.notify({query:this,type:`updated`,action:e})})}};function Jl(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ul(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Yl(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Xl(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var Zl=class extends al{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=Ll(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),$l(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return eu(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return eu(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof gl(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!wl(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&tu(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||gl(this.options.enabled,this.#t)!==gl(t.enabled,this.#t)||hl(this.options.staleTime,this.#t)!==hl(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||gl(this.options.enabled,this.#t)!==gl(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return ru(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(dl)),t}#g(){this.#b();let e=hl(this.options.staleTime,this.#t);if(Il.isServer()||this.#r.isStale||!pl(e))return;let t=ml(this.#r.dataUpdatedAt,e)+1;this.#d=cl.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(Il.isServer()||gl(this.options.enabled,this.#t)===!1||!pl(this.#p)||this.#p===0)&&(this.#f=cl.setInterval(()=>{(this.options.refetchIntervalInBackground||ol.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d&&=(cl.clearTimeout(this.#d),void 0)}#x(){this.#f&&=(cl.clearInterval(this.#f),void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&$l(e,t),o=i&&tu(e,n,t,r);(a||o)&&(l={...l,...Jl(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=kl(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=kl(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:nu(e,t),refetch:this.refetch,promise:this.#o,isEnabled:gl(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=x.data!==void 0,r=x.status===`error`&&!t,i=e=>{r?e.reject(x.error):t&&e.resolve(x.data)},a=()=>{i(this.#o=x.promise=Ll())},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||x.data!==o.value)&&a();break;case`rejected`:(!r||x.error!==o.reason)&&a();break}}return x}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!wl(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){Bl.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function Ql(e,t){return gl(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&t.retryOnMount===!1)}function $l(e,t){return Ql(e,t)||e.state.data!==void 0&&eu(e,t,t.refetchOnMount)}function eu(e,t,n){if(gl(t.enabled,e)!==!1&&hl(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&nu(e,t)}return!1}function tu(e,t,n,r){return(e!==t||gl(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&nu(e,n)}function nu(e,t){return gl(t.enabled,e)!==!1&&e.isStaleByTime(hl(t.staleTime,e))}function ru(e,t){return!wl(e.getCurrentResult(),t)}function iu(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{Fl(e,()=>t.signal,()=>n=!0)},u=Nl(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject();if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?jl:Al;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?ou:au,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:au(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function au(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function ou(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var su=class extends Kl{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||cu(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=Gl({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}})(this.state),Bl.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function cu(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var lu=class extends al{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new su({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=uu(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=uu(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=uu(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=uu(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){Bl.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>vl(t,e))}findAll(e={}){return this.getAll().filter(t=>vl(e,t))}notify(e){Bl.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return Bl.batch(()=>Promise.all(e.map(e=>e.continue().catch(dl))))}};function uu(e){return e.options.scope?.id}var du=class extends al{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),wl(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&bl(t.mutationKey)!==bl(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??cu();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){Bl.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},fu=class extends al{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??yl(r,t),a=this.get(i);return a||(a=new ql({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){Bl.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>_l(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>_l(e,t)):t}notify(e){Bl.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Bl.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Bl.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},pu=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new fu,this.#t=e.mutationCache||new lu,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=ol.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Vl.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(hl(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=fl(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Bl.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;Bl.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return Bl.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=Bl.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(dl).catch(dl)}invalidateQueries(e,t={}){return Bl.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=Bl.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(dl)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(dl)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(hl(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(dl).catch(dl)}fetchInfiniteQuery(e){return e.behavior=iu(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(dl).catch(dl)}ensureInfiniteQueryData(e){return e.behavior=iu(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Vl.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(bl(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{xl(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(bl(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{xl(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=yl(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===Ml&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},mu=_.createContext(void 0),hu=e=>{let t=_.useContext(mu);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},gu=({client:e,children:t})=>(_.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,I.jsx)(mu.Provider,{value:e,children:t})),_u=_.createContext(!1),vu=()=>_.useContext(_u);_u.Provider;function yu(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var bu=_.createContext(yu()),xu=()=>_.useContext(bu),Su=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?Pl(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Cu=e=>{_.useEffect(()=>{e.clearReset()},[e])},wu=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Pl(n,[e.error,r])),Tu=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},Eu=(e,t)=>e.isLoading&&e.isFetching&&!t,Du=(e,t)=>e?.suspense&&t.isPending,Ou=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function ku(e,t,n){let r=vu(),i=xu(),a=hu(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash);o._optimisticResults=r?`isRestoring`:`optimistic`,Tu(o),Su(o,i,s),Cu(i);let c=!a.getQueryCache().get(o.queryHash),[l]=_.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&e.subscribed!==!1;if(_.useSyncExternalStore(_.useCallback(e=>{let t=d?l.subscribe(Bl.batchCalls(e)):dl;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),_.useEffect(()=>{l.setOptions(o)},[o,l]),Du(o,u))throw Ou(o,l,i);if(wu({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,u),o.experimental_prefetchInRender&&!Il.isServer()&&Eu(u,r)&&(c?Ou(o,l,i):s?.promise)?.catch(dl).finally(()=>{l.updateResult()}),o.notifyOnChangeProps?u:l.trackResult(u)}function Au(e,t){return ku(e,Zl,t)}function ju(e,t){let n=hu(t),[r]=_.useState(()=>new du(n,e));_.useEffect(()=>{r.setOptions(e)},[r,e]);let i=_.useSyncExternalStore(_.useCallback(e=>r.subscribe(Bl.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=_.useCallback((e,t)=>{r.mutate(e,t).catch(dl)},[r]);if(i.error&&Pl(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var Mu=`modulepreload`,Nu=function(e){return`/`+e},Pu={},Fu=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=Nu(t,n),t in Pu)return;Pu[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:Mu,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Iu=`popstate`;function Lu(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function tee(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return Vu(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:Hu(t)}return Wu(t,n,null,e)}function Ru(e,t){if(e===!1||e==null)throw Error(t)}function zu(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function nee(){return Math.random().toString(36).substring(2,10)}function Bu(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Vu(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?Uu(t):t,state:n,key:t&&t.key||r||nee(),unstable_mask:i}}function Hu({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function Uu(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function Wu(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=Lu(e)?e:Vu(h.location,e,t);n&&n(r,e),l=u()+1;let d=Bu(r,l),f=h.createHref(r.unstable_mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=Lu(e)?e:Vu(h.location,e,t);n&&n(r,e),l=u();let i=Bu(r,l),d=h.createHref(r.unstable_mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return ree(e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(Iu,d),c=e,()=>{i.removeEventListener(Iu,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function ree(e,t=!1){let n=`http://localhost`;typeof window<`u`&&(n=window.location.origin===`null`?window.location.href:window.location.origin),Ru(n,`No window.location.(origin|href) available to create URL`);let r=typeof e==`string`?e:Hu(e);return r=r.replace(/ $/,`%20`),!t&&r.startsWith(`//`)&&(r=n+r),new URL(r,n)}function Gu(e,t,n=`/`){return iee(e,t,n,!1)}function iee(e,t,n,r){let i=ad((typeof t==`string`?Uu(t):t).pathname||`/`,n);if(i==null)return null;let a=Ku(e);oee(a);let o=null;for(let e=0;o==null&&e<a.length;++e){let t=id(i);o=td(a[e],t,r)}return o}function aee(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function Ku(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;Ru(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=fd([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(Ru(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),Ku(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:$u(l,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of qu(e.path))a(e,t,!0,n)}),t}function qu(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=qu(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function oee(e){e.sort((e,t)=>e.score===t.score?ed(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var see=/^:[\w-]+$/,cee=3,Ju=2,Yu=1,Xu=10,Zu=-2,Qu=e=>e===`*`;function $u(e,t){let n=e.split(`/`),r=n.length;return n.some(Qu)&&(r+=Zu),t&&(r+=Ju),n.filter(e=>!Qu(e)).reduce((e,t)=>e+(see.test(t)?cee:t===``?Yu:Xu),r)}function ed(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function td(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u=nd({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=nd({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:fd([a,u.pathname]),pathnameBase:uee(fd([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=fd([a,u.pathnameBase]))}return o}function nd(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=rd(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function rd(e,t=!1,n=!0){zu(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function id(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return zu(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function ad(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}var od=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function sd(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?Uu(e):e,a;return n?(n=n.replace(/\/\/+/g,`/`),a=n.startsWith(`/`)?cd(n.substring(1),`/`):cd(n,t)):a=t,{pathname:a,search:dee(r),hash:fee(i)}}function cd(e,t){let n=t.replace(/\/+$/,``).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function ld(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function lee(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function ud(e){let t=lee(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function dd(e,t,n,r=!1){let i;typeof e==`string`?i=Uu(e):(i={...e},Ru(!i.pathname||!i.pathname.includes(`?`),ld(`?`,`pathname`,`search`,i)),Ru(!i.pathname||!i.pathname.includes(`#`),ld(`#`,`pathname`,`hash`,i)),Ru(!i.search||!i.search.includes(`#`),ld(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=sd(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var fd=e=>e.join(`/`).replace(/\/\/+/g,`/`),uee=e=>e.replace(/\/+$/,``).replace(/^\/*/,`/`),dee=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,fee=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,pee=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function mee(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function hee(e){return e.map(e=>e.route.path).filter(Boolean).join(`/`).replace(/\/\/*/g,`/`)||`/`}var pd=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function md(e,t){let n=e;if(typeof n!=`string`||!od.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(pd)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=ad(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{zu(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var hd=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(hd);var gee=[`GET`,...hd];new Set(gee);var gd=_.createContext(null);gd.displayName=`DataRouter`;var _d=_.createContext(null);_d.displayName=`DataRouterState`;var vd=_.createContext(!1),yd=_.createContext({isTransitioning:!1});yd.displayName=`ViewTransition`;var bd=_.createContext(new Map);bd.displayName=`Fetchers`;var xd=_.createContext(null);xd.displayName=`Await`;var Sd=_.createContext(null);Sd.displayName=`Navigation`;var Cd=_.createContext(null);Cd.displayName=`Location`;var wd=_.createContext({outlet:null,matches:[],isDataRoute:!1});wd.displayName=`Route`;var Td=_.createContext(null);Td.displayName=`RouteError`;var Ed=`REACT_ROUTER_ERROR`,Dd=`REDIRECT`,Od=`ROUTE_ERROR_RESPONSE`;function kd(e){if(e.startsWith(`${Ed}:${Dd}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function Ad(e){if(e.startsWith(`${Ed}:${Od}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new pee(t.status,t.statusText,t.data)}catch{}}function jd(e,{relative:t}={}){Ru(Md(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=_.useContext(Sd),{hash:i,pathname:a,search:o}=Vd(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:fd([n,a])),r.createHref({pathname:s,search:o,hash:i})}function Md(){return _.useContext(Cd)!=null}function Nd(){return Ru(Md(),`useLocation() may be used only in the context of a <Router> component.`),_.useContext(Cd).location}var Pd=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Fd(e){_.useContext(Sd).static||_.useLayoutEffect(e)}function Id(){let{isDataRoute:e}=_.useContext(wd);return e?Oee():Ld()}function Ld(){Ru(Md(),`useNavigate() may be used only in the context of a <Router> component.`);let e=_.useContext(gd),{basename:t,navigator:n}=_.useContext(Sd),{matches:r}=_.useContext(wd),{pathname:i}=Nd(),a=JSON.stringify(ud(r)),o=_.useRef(!1);return Fd(()=>{o.current=!0}),_.useCallback((r,s={})=>{if(zu(o.current,Pd),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=dd(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:fd([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var Rd=_.createContext(null);function zd(e){let t=_.useContext(wd).outlet;return _.useMemo(()=>t&&_.createElement(Rd.Provider,{value:e},t),[t,e])}function Bd(){let{matches:e}=_.useContext(wd),t=e[e.length-1];return t?t.params:{}}function Vd(e,{relative:t}={}){let{matches:n}=_.useContext(wd),{pathname:r}=Nd(),i=JSON.stringify(ud(n));return _.useMemo(()=>dd(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function _ee(e,t){return Hd(e,t)}function Hd(e,t,n){Ru(Md(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=_.useContext(Sd),{matches:i}=_.useContext(wd),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;Xd(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
10
-
11
- Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=Nd(),d;if(t){let e=typeof t==`string`?Uu(t):t;Ru(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);p=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let m=Gu(e,{pathname:p});zu(l||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),zu(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let h=See(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:fd([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:fd([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&h?_.createElement(Cd.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,unstable_mask:void 0,...d},navigationType:`POP`}},h):h}function vee(){let e=Dee(),t=mee(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=_.createElement(_.Fragment,null,_.createElement(`p`,null,`💿 Hey developer 👋`),_.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,_.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,_.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),_.createElement(_.Fragment,null,_.createElement(`h2`,null,`Unexpected Application Error!`),_.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?_.createElement(`pre`,{style:i},n):null,o)}var yee=_.createElement(vee,null),Ud=class extends _.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=Ad(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:_.createElement(wd.Provider,{value:this.props.routeContext},_.createElement(Td.Provider,{value:e,children:this.props.component}));return this.context?_.createElement(bee,{error:e},t):t}};Ud.contextType=vd;var Wd=new WeakMap;function bee({children:e,error:t}){let{basename:n}=_.useContext(Sd);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=kd(t.digest);if(e){let r=Wd.get(t);if(r)throw r;let i=md(e.location,n);if(pd&&!Wd.get(t))if(i.isExternal||e.reloadDocument)window.location.href=i.absoluteURL||i.to;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw Wd.set(t,n),n}return _.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${i.absoluteURL||i.to}`})}}return e}function xee({routeContext:e,match:t,children:n}){let r=_.useContext(gd);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),_.createElement(wd.Provider,{value:e},n)}function See(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);Ru(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:hee(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||yee,o&&(s<0&&c===0?(Xd(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?_.createElement(n.route.Component,null):n.route.element?n.route.element:e,_.createElement(xee,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?_.createElement(Ud,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function Gd(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Cee(e){let t=_.useContext(gd);return Ru(t,Gd(e)),t}function Kd(e){let t=_.useContext(_d);return Ru(t,Gd(e)),t}function wee(e){let t=_.useContext(wd);return Ru(t,Gd(e)),t}function qd(e){let t=wee(e),n=t.matches[t.matches.length-1];return Ru(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Tee(){return qd(`useRouteId`)}function Eee(){return Kd(`useNavigation`).navigation}function Jd(){let{matches:e,loaderData:t}=Kd(`useMatches`);return _.useMemo(()=>e.map(e=>aee(e,t)),[e,t])}function Dee(){let e=_.useContext(Td),t=Kd(`useRouteError`),n=qd(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Oee(){let{router:e}=Cee(`useNavigate`),t=qd(`useNavigate`),n=_.useRef(!1);return Fd(()=>{n.current=!0}),_.useCallback(async(r,i={})=>{zu(n.current,Pd),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Yd={};function Xd(e,t,n){!t&&!Yd[e]&&(Yd[e]=!0,zu(!1,n))}_.useOptimistic,_.memo(kee);function kee({routes:e,future:t,state:n,isStatic:r,onError:i}){return Hd(e,void 0,{state:n,isStatic:r,onError:i,future:t})}function Aee({to:e,replace:t,state:n,relative:r}){Ru(Md(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=_.useContext(Sd);zu(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:a}=_.useContext(wd),{pathname:o}=Nd(),s=Id(),c=dd(e,ud(a),o,r===`path`),l=JSON.stringify(c);return _.useEffect(()=>{s(JSON.parse(l),{replace:t,state:n,relative:r})},[s,l,r,t,n]),null}function jee(e){return zd(e.context)}function Zd(e){Ru(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function Qd({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,unstable_useTransitions:o}){Ru(!Md(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=_.useMemo(()=>({basename:s,navigator:i,static:a,unstable_useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=Uu(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,unstable_mask:m}=n,h=_.useMemo(()=>{let e=ad(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,unstable_mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return zu(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:_.createElement(Sd.Provider,{value:c},_.createElement(Cd.Provider,{children:t,value:h}))}function Mee({children:e,location:t}){return _ee($d(e),t)}_.Component;function $d(e,t=[]){let n=[];return _.Children.forEach(e,(e,r)=>{if(!_.isValidElement(e))return;let i=[...t,r];if(e.type===_.Fragment){n.push.apply(n,$d(e.props.children,i));return}Ru(e.type===Zd,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ru(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=$d(e.props.children,i)),n.push(a)}),n}var ef=`get`,tf=`application/x-www-form-urlencoded`;function nf(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Nee(e){return nf(e)&&e.tagName.toLowerCase()===`button`}function Pee(e){return nf(e)&&e.tagName.toLowerCase()===`form`}function Fee(e){return nf(e)&&e.tagName.toLowerCase()===`input`}function Iee(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Lee(e,t){return e.button===0&&(!t||t===`_self`)&&!Iee(e)}var rf=null;function Ree(){if(rf===null)try{new FormData(document.createElement(`form`),0),rf=!1}catch{rf=!0}return rf}var zee=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function af(e){return e!=null&&!zee.has(e)?(zu(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${tf}"`),null):e}function Bee(e,t){let n,r,i,a,o;if(Pee(e)){let o=e.getAttribute(`action`);r=o?ad(o,t):null,n=e.getAttribute(`method`)||ef,i=af(e.getAttribute(`enctype`))||tf,a=new FormData(e)}else if(Nee(e)||Fee(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?ad(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||ef,i=af(e.getAttribute(`formenctype`))||af(o.getAttribute(`enctype`))||tf,a=new FormData(o,e),!Ree()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(nf(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=ef,r=null,i=tf,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Vee={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},Hee=/[&><\u2028\u2029]/g;function of(e){return e.replace(Hee,e=>Vee[e])}function sf(e,t){if(e===!1||e==null)throw Error(t)}function cf(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&ad(i.pathname,t)===`/`?i.pathname=`${t.replace(/\/$/,``)}/_root.${r}`:i.pathname=`${i.pathname.replace(/\/$/,``)}.${r}`,i}async function lf(e,t){if(e.id in t)return t[e.id];try{let n=await Fu(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function uf(e){return e!=null&&typeof e.page==`string`}function df(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function ff(e,t,n){return _f((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await lf(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(df).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function pf(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function mf(e,t,{includeHydrateFallback:n}={}){return hf(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function hf(e){return[...new Set(e)]}function gf(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function _f(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!uf(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(gf(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function vf(){let e=_.useContext(gd);return sf(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function yf(){let e=_.useContext(_d);return sf(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var bf=_.createContext(void 0);bf.displayName=`FrameworkContext`;function xf(){let e=_.useContext(bf);return sf(e,`You must render this element inside a <HydratedRouter> element`),e}function Sf(e,t){let n=_.useContext(bf),[r,i]=_.useState(!1),[a,o]=_.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=_.useRef(null);_.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),_.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:Cf(s,p),onBlur:Cf(c,m),onMouseEnter:Cf(l,p),onMouseLeave:Cf(u,m),onTouchStart:Cf(d,p)}]:[a,f,{}]:[!1,f,{}]}function Cf(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function wf({page:e,...t}){let{router:n}=vf(),r=_.useMemo(()=>Gu(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?_.createElement(Ef,{page:e,matches:r,...t}):null}function Tf(e){let{manifest:t,routeModules:n}=xf(),[r,i]=_.useState([]);return _.useEffect(()=>{let r=!1;return ff(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Ef({page:e,matches:t,...n}){let r=Nd(),{future:i,manifest:a,routeModules:o}=xf(),{basename:s}=vf(),{loaderData:c,matches:l}=yf(),u=_.useMemo(()=>pf(e,t,l,a,r,`data`),[e,t,l,a,r]),d=_.useMemo(()=>pf(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=_.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=cf(e,s,i.unstable_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.unstable_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),p=_.useMemo(()=>mf(d,a),[d,a]),m=Tf(d);return _.createElement(_.Fragment,null,f.map(e=>_.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>_.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>_.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Df(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}_.Component;var Of=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Of&&(window.__reactRouterVersion=`7.13.1`)}catch{}function kf({basename:e,children:t,unstable_useTransitions:n,window:r}){let i=_.useRef();i.current??=tee({window:r,v5Compat:!0});let a=i.current,[o,s]=_.useState({action:a.action,location:a.location}),c=_.useCallback(e=>{n===!1?s(e):_.startTransition(()=>s(e))},[n]);return _.useLayoutEffect(()=>a.listen(c),[a,c]),_.createElement(Qd,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,unstable_useTransitions:n})}function Af({basename:e,children:t,history:n,unstable_useTransitions:r}){let[i,a]=_.useState({action:n.action,location:n.location}),o=_.useCallback(e=>{r===!1?a(e):_.startTransition(()=>a(e))},[r]);return _.useLayoutEffect(()=>n.listen(o),[n,o]),_.createElement(Qd,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,unstable_useTransitions:r})}Af.displayName=`unstable_HistoryRouter`;var jf=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Mf=_.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,unstable_mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,unstable_useTransitions:v}=_.useContext(Sd),y=typeof l==`string`&&jf.test(l),b=md(l,h);l=b.to;let x=jd(l,{relative:r}),S=Nd(),C=null;if(o){let e=dd(o,[],S.unstable_mask?S.unstable_mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:fd([h,e.pathname])),C=g.createHref(e)}let[w,T,E]=Sf(n,p),D=zf(l,{replace:a,unstable_mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,unstable_defaultShouldRevalidate:f,unstable_useTransitions:v});function O(t){e&&e(t),t.defaultPrevented||D(t)}let k=!(b.isExternal||i),A=_.createElement(`a`,{...p,...E,href:(k?C:void 0)||b.absoluteURL||x,onClick:k?O:e,ref:Df(m,T),target:c,"data-discover":!y&&t===`render`?`true`:void 0});return w&&!y?_.createElement(_.Fragment,null,A,_.createElement(wf,{page:x})):A});Mf.displayName=`Link`;var Nf=_.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=Vd(a,{relative:c.relative}),d=Nd(),f=_.useContext(_d),{navigator:p,basename:m}=_.useContext(Sd),h=f!=null&&Yf(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,v=d.pathname,y=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,g=g.toLowerCase()),y&&m&&(y=ad(y,m)||y);let b=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,x=v===g||!r&&v.startsWith(g)&&v.charAt(b)===`/`,S=y!=null&&(y===g||!r&&y.startsWith(g)&&y.charAt(g.length)===`/`),C={isActive:x,isPending:S,isTransitioning:h},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return _.createElement(Mf,{...c,"aria-current":w,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});Nf.displayName=`NavLink`;var Pf=_.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=ef,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},m)=>{let{unstable_useTransitions:h}=_.useContext(Sd),g=Hf(),v=Uf(s,{relative:l}),y=o.toLowerCase()===`get`?`get`:`post`,b=typeof s==`string`&&jf.test(s);return _.createElement(`form`,{ref:m,method:y,action:v,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f});h&&n!==!1?_.startTransition(()=>p()):p()},...p,"data-discover":!b&&e===`render`?`true`:void 0})});Pf.displayName=`Form`;function Ff({getKey:e,storageKey:t,...n}){let r=_.useContext(bf),{basename:i}=_.useContext(Sd),a=Nd(),o=Jd();qf({getKey:e,storageKey:t});let s=_.useMemo(()=>{if(!r||!e)return null;let t=Kf(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return _.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${of(JSON.stringify(t||Wf))}, ${of(JSON.stringify(s))})`}})}Ff.displayName=`ScrollRestoration`;function If(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Lf(e){let t=_.useContext(gd);return Ru(t,If(e)),t}function Rf(e){let t=_.useContext(_d);return Ru(t,If(e)),t}function zf(e,{target:t,replace:n,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:c,unstable_useTransitions:l}={}){let u=Id(),d=Nd(),f=Vd(e,{relative:o});return _.useCallback(p=>{if(Lee(p,t)){p.preventDefault();let t=n===void 0?Hu(d)===Hu(f):n,m=()=>u(e,{replace:t,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:c});l?_.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}var Bf=0,Vf=()=>`__${String(++Bf)}__`;function Hf(){let{router:e}=Lf(`useSubmit`),{basename:t}=_.useContext(Sd),n=Tee(),r=e.fetch,i=e.navigate;return _.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Bee(e,t);a.navigate===!1?await r(a.fetcherKey||Vf(),n,a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function Uf(e,{relative:t}={}){let{basename:n}=_.useContext(Sd),r=_.useContext(wd);Ru(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...Vd(e||`.`,{relative:t})},o=Nd();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:fd([n,a.pathname])),Hu(a)}var Wf=`react-router-scroll-positions`,Gf={};function Kf(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:ad(e.pathname,n)||e.pathname},t)),i??=e.key,i}function qf({getKey:e,storageKey:t}={}){let{router:n}=Lf(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=Rf(`useScrollRestoration`),{basename:a}=_.useContext(Sd),o=Nd(),s=Jd(),c=Eee();_.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),Jf(_.useCallback(()=>{if(c.state===`idle`){let t=Kf(o,s,a,e);Gf[t]=window.scrollY}try{sessionStorage.setItem(t||Wf,JSON.stringify(Gf))}catch(e){zu(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(_.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||Wf);e&&(Gf=JSON.parse(e))}catch{}},[t]),_.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(Gf,()=>window.scrollY,e?(t,n)=>Kf(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),_.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{zu(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function Jf(e,t){let{capture:n}=t||{};_.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function Yf(e,{relative:t}={}){let n=_.useContext(yd);Ru(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Lf(`useViewTransitionState`),i=Vd(e,{relative:t});if(!n.isTransitioning)return!1;let a=ad(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=ad(n.nextLocation.pathname,r)||n.nextLocation.pathname;return nd(i.pathname,o)!=null||nd(i.pathname,a)!=null}var Xf=Symbol.for(`react.lazy`),Zf=_.use;function Qf(e){return typeof e==`object`&&!!e&&`then`in e}function $f(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Xf&&`_payload`in e&&Qf(e._payload)}function ep(e){let t=np(e),n=_.forwardRef((e,n)=>{let{children:r,...i}=e;$f(r)&&typeof Zf==`function`&&(r=Zf(r._payload));let a=_.Children.toArray(r),o=a.find(ip);if(o){let e=o.props.children,r=a.map(t=>t===o?_.Children.count(e)>1?_.Children.only(null):_.isValidElement(e)?e.props.children:null:t);return(0,I.jsx)(t,{...i,ref:n,children:_.isValidElement(e)?_.cloneElement(e,void 0,r):null})}return(0,I.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var tp=ep(`Slot`);function np(e){let t=_.forwardRef((e,t)=>{let{children:n,...r}=e;if($f(n)&&typeof Zf==`function`&&(n=Zf(n._payload)),_.isValidElement(n)){let e=op(n),i=ap(r,n.props);return n.type!==_.Fragment&&(i.ref=t?N(t,e):e),_.cloneElement(n,i)}return _.Children.count(n)>1?_.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var rp=Symbol(`radix.slottable`);function ip(e){return _.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===rp}function ap(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function op(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var sp=768;function cp(){let[e,t]=_.useState(void 0);return _.useEffect(()=>{let e=window.matchMedia(`(max-width: ${sp-1}px)`),n=()=>{t(window.innerWidth<sp)};return e.addEventListener(`change`,n),t(window.innerWidth<sp),()=>e.removeEventListener(`change`,n)},[]),!!e}var lp=Vt(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/90`,destructive:`bg-destructive text-destructive-foreground hover:bg-destructive/90`,outline:`border border-input bg-background hover:bg-accent hover:text-accent-foreground`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-10 px-4 py-2`,sm:`h-9 rounded-md px-3`,lg:`h-11 rounded-md px-8`,icon:`h-10 w-10`}},defaultVariants:{variant:`default`,size:`default`}}),W=_.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},a)=>(0,I.jsx)(r?tp:`button`,{className:H(lp({variant:t,size:n,className:e})),ref:a,...i}));W.displayName=`Button`;var G=_.forwardRef(({className:e,type:t,...n},r)=>(0,I.jsx)(`input`,{type:t,className:H(`flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,e),ref:r,...n}));G.displayName=`Input`;var up=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=ep(`Primitive.${t}`),r=_.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,I.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),dp=`Separator`,fp=`horizontal`,Uee=[`horizontal`,`vertical`],pp=_.forwardRef((e,t)=>{let{decorative:n,orientation:r=fp,...i}=e,a=Wee(r)?r:fp,o=a===`vertical`?a:void 0,s=n?{role:`none`}:{"aria-orientation":o,role:`separator`};return(0,I.jsx)(up.div,{"data-orientation":a,...s,...i,ref:t})});pp.displayName=dp;function Wee(e){return Uee.includes(e)}var mp=pp,hp=_.forwardRef(({className:e,orientation:t=`horizontal`,decorative:n=!0,...r},i)=>(0,I.jsx)(mp,{ref:i,decorative:n,orientation:t,className:H(`shrink-0 bg-border`,t===`horizontal`?`h-[1px] w-full`:`h-full w-[1px]`,e),...r}));hp.displayName=mp.displayName;var gp=`focusScope.autoFocusOnMount`,_p=`focusScope.autoFocusOnUnmount`,vp={bubbles:!1,cancelable:!0},Gee=`FocusScope`,yp=_.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=_.useState(null),l=B(i),u=B(a),d=_.useRef(null),f=P(t,e=>c(e)),p=_.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;_.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:Sp(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Sp(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Sp(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),_.useEffect(()=>{if(s){Cp.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(gp,vp);s.addEventListener(gp,l),s.dispatchEvent(t),t.defaultPrevented||(Kee(Zee(bp(s)),{select:!0}),document.activeElement===e&&Sp(s))}return()=>{s.removeEventListener(gp,l),setTimeout(()=>{let t=new CustomEvent(_p,vp);s.addEventListener(_p,u),s.dispatchEvent(t),t.defaultPrevented||Sp(e??document.body,{select:!0}),s.removeEventListener(_p,u),Cp.remove(p)},0)}}},[s,l,u,p]);let m=_.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=qee(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Sp(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Sp(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,I.jsx)(z.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});yp.displayName=Gee;function Kee(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Sp(r,{select:t}),document.activeElement!==n)return}function qee(e){let t=bp(e);return[xp(t,e),xp(t.reverse(),e)]}function bp(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function xp(e,t){for(let n of e)if(!Jee(n,{upTo:t}))return n}function Jee(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function Yee(e){return e instanceof HTMLInputElement&&`select`in e}function Sp(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Yee(e)&&t&&e.select()}}var Cp=Xee();function Xee(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=wp(e,t),e.unshift(t)},remove(t){e=wp(e,t),e[0]?.resume()}}}function wp(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Zee(e){return e.filter(e=>e.tagName!==`A`)}var Tp=0;function Ep(){_.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??Dp()),document.body.insertAdjacentElement(`beforeend`,e[1]??Dp()),Tp++,()=>{Tp===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),Tp--}},[])}function Dp(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var Op=function(){return Op=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Op.apply(this,arguments)};function kp(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Qee(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Ap=`right-scroll-bar-position`,jp=`width-before-scroll-bar`,$ee=`with-scroll-bars-hidden`,ete=`--removed-body-scroll-bar-size`;function Mp(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function tte(e,t){var n=(0,_.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var nte=typeof window<`u`?_.useLayoutEffect:_.useEffect,Np=new WeakMap;function rte(e,t){var n=tte(t||null,function(t){return e.forEach(function(e){return Mp(e,t)})});return nte(function(){var t=Np.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Mp(e,null)}),i.forEach(function(e){r.has(e)||Mp(e,a)})}Np.set(n,e)},[e]),n}function ite(e){return e}function ate(e,t){t===void 0&&(t=ite);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function ote(e){e===void 0&&(e={});var t=ate(null);return t.options=Op({async:!0,ssr:!1},e),t}var Pp=function(e){var t=e.sideCar,n=kp(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return _.createElement(r,Op({},n))};Pp.isSideCarExport=!0;function ste(e,t){return e.useMedium(t),Pp}var Fp=ote(),Ip=function(){},Lp=_.forwardRef(function(e,t){var n=_.useRef(null),r=_.useState({onScrollCapture:Ip,onWheelCapture:Ip,onTouchMoveCapture:Ip}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=kp(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=rte([n,t]),w=Op(Op({},x),i);return _.createElement(_.Fragment,null,u&&_.createElement(S,{sideCar:Fp,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:b}),o?_.cloneElement(_.Children.only(s),Op(Op({},w),{ref:C})):_.createElement(y,Op({},w,{className:c,ref:C}),s))});Lp.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Lp.classNames={fullWidth:jp,zeroRight:Ap};var Rp,cte=function(){if(Rp)return Rp;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function lte(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=cte();return t&&e.setAttribute(`nonce`,t),e}function ute(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function dte(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var fte=function(){var e=0,t=null;return{add:function(n){e==0&&(t=lte())&&(ute(t,n),dte(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},pte=function(){var e=fte();return function(t,n){_.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},zp=function(){var e=pte();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},mte={left:0,top:0,right:0,gap:0},Bp=function(e){return parseInt(e||``,10)||0},hte=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Bp(n),Bp(r),Bp(i)]},gte=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return mte;var t=hte(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},_te=zp(),Vp=`data-scroll-locked`,vte=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
12
- .${$ee} {
13
- overflow: hidden ${r};
14
- padding-right: ${s}px ${r};
15
- }
16
- body[${Vp}] {
17
- overflow: hidden ${r};
18
- overscroll-behavior: contain;
19
- ${[t&&`position: relative ${r};`,n===`margin`&&`
20
- padding-left: ${i}px;
21
- padding-top: ${a}px;
22
- padding-right: ${o}px;
23
- margin-left:0;
24
- margin-top:0;
25
- margin-right: ${s}px ${r};
26
- `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
27
- }
28
-
29
- .${Ap} {
30
- right: ${s}px ${r};
31
- }
32
-
33
- .${jp} {
34
- margin-right: ${s}px ${r};
35
- }
36
-
37
- .${Ap} .${Ap} {
38
- right: 0 ${r};
39
- }
40
-
41
- .${jp} .${jp} {
42
- margin-right: 0 ${r};
43
- }
44
-
45
- body[${Vp}] {
46
- ${ete}: ${s}px;
47
- }
48
- `},Hp=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},yte=function(){_.useEffect(function(){return document.body.setAttribute(Vp,(Hp()+1).toString()),function(){var e=Hp()-1;e<=0?document.body.removeAttribute(Vp):document.body.setAttribute(Vp,e.toString())}},[])},bte=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;yte();var a=_.useMemo(function(){return gte(i)},[i]);return _.createElement(_te,{styles:vte(a,!t,i,n?``:`!important`)})},Up=!1;if(typeof window<`u`)try{var Wp=Object.defineProperty({},`passive`,{get:function(){return Up=!0,!0}});window.addEventListener(`test`,Wp,Wp),window.removeEventListener(`test`,Wp,Wp)}catch{Up=!1}var Gp=Up?{passive:!1}:!1,xte=function(e){return e.tagName===`TEXTAREA`},Kp=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!xte(e)&&n[t]===`visible`)},Ste=function(e){return Kp(e,`overflowY`)},Cte=function(e){return Kp(e,`overflowX`)},qp=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Jp(e,r)){var i=Yp(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},wte=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Tte=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Jp=function(e,t){return e===`v`?Ste(t):Cte(t)},Yp=function(e,t){return e===`v`?wte(t):Tte(t)},Ete=function(e,t){return e===`h`&&t===`rtl`?-1:1},Dte=function(e,t,n,r,i){var a=Ete(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Yp(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Jp(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Xp=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Zp=function(e){return[e.deltaX,e.deltaY]},Qp=function(e){return e&&`current`in e?e.current:e},Ote=function(e,t){return e[0]===t[0]&&e[1]===t[1]},kte=function(e){return`
49
- .block-interactivity-${e} {pointer-events: none;}
50
- .allow-interactivity-${e} {pointer-events: all;}
51
- `},Ate=0,$p=[];function jte(e){var t=_.useRef([]),n=_.useRef([0,0]),r=_.useRef(),i=_.useState(Ate++)[0],a=_.useState(zp)[0],o=_.useRef(e);_.useEffect(function(){o.current=e},[e]),_.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Qee([e.lockRef.current],(e.shards||[]).map(Qp),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=_.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Xp(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=qp(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=qp(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Dte(h,t,e,h===`h`?s:c,!0)},[]),c=_.useCallback(function(e){var n=e;if(!(!$p.length||$p[$p.length-1]!==a)){var r=`deltaY`in n?Zp(n):Xp(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Ote(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(Qp).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=_.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Mte(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=_.useCallback(function(e){n.current=Xp(e),r.current=void 0},[]),d=_.useCallback(function(t){l(t.type,Zp(t),t.target,s(t,e.lockRef.current))},[]),f=_.useCallback(function(t){l(t.type,Xp(t),t.target,s(t,e.lockRef.current))},[]);_.useEffect(function(){return $p.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,Gp),document.addEventListener(`touchmove`,c,Gp),document.addEventListener(`touchstart`,u,Gp),function(){$p=$p.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Gp),document.removeEventListener(`touchmove`,c,Gp),document.removeEventListener(`touchstart`,u,Gp)}},[]);var p=e.removeScrollBar,m=e.inert;return _.createElement(_.Fragment,null,m?_.createElement(a,{styles:kte(i)}):null,p?_.createElement(bte,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Mte(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Nte=ste(Fp,jte),em=_.forwardRef(function(e,t){return _.createElement(Lp,Op({},e,{ref:t,sideCar:Nte}))});em.classNames=Lp.classNames;var Pte=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},tm=new WeakMap,nm=new WeakMap,rm={},im=0,am=function(e){return e&&(e.host||am(e.parentNode))},om=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=am(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},sm=function(e,t,n,r){var i=om(t,Array.isArray(e)?e:[e]);rm[n]||(rm[n]=new WeakMap);var a=rm[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(tm.get(e)||0)+1,l=(a.get(e)||0)+1;tm.set(e,c),a.set(e,l),o.push(e),c===1&&i&&nm.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),im++,function(){o.forEach(function(e){var t=tm.get(e)-1,i=a.get(e)-1;tm.set(e,t),a.set(e,i),t||(nm.has(e)||e.removeAttribute(r),nm.delete(e)),i||e.removeAttribute(n)}),im--,im||(tm=new WeakMap,tm=new WeakMap,nm=new WeakMap,rm={})}},cm=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Pte(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),sm(r,i,n,`aria-hidden`)):function(){return null}},lm=`Dialog`,[um,dm]=R(lm),[fm,pm]=um(lm),mm=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=_.useRef(null),c=_.useRef(null),[l,u]=Fe({prop:r,defaultProp:i??!1,onChange:a,caller:lm});return(0,I.jsx)(fm,{scope:t,triggerRef:s,contentRef:c,contentId:Na(),titleId:Na(),descriptionId:Na(),open:l,onOpenChange:u,onOpenToggle:_.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};mm.displayName=lm;var hm=`DialogTrigger`,gm=_.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=pm(hm,n),a=P(t,i.triggerRef);return(0,I.jsx)(z.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Im(i.open),...r,ref:a,onClick:j(e.onClick,i.onOpenToggle)})});gm.displayName=hm;var _m=`DialogPortal`,[vm,ym]=um(_m,{forceMount:void 0}),bm=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=pm(_m,t);return(0,I.jsx)(vm,{scope:t,forceMount:n,children:_.Children.map(r,e=>(0,I.jsx)(Ae,{present:n||a.open,children:(0,I.jsx)(Oe,{asChild:!0,container:i,children:e})}))})};bm.displayName=_m;var xm=`DialogOverlay`,Sm=_.forwardRef((e,t)=>{let n=ym(xm,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=pm(xm,e.__scopeDialog);return a.modal?(0,I.jsx)(Ae,{present:r||a.open,children:(0,I.jsx)(wm,{...i,ref:t})}):null});Sm.displayName=xm;var Cm=te(`DialogOverlay.RemoveScroll`),wm=_.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=pm(xm,n);return(0,I.jsx)(em,{as:Cm,allowPinchZoom:!0,shards:[i.contentRef],children:(0,I.jsx)(z.div,{"data-state":Im(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),Tm=`DialogContent`,Em=_.forwardRef((e,t)=>{let n=ym(Tm,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=pm(Tm,e.__scopeDialog);return(0,I.jsx)(Ae,{present:r||a.open,children:a.modal?(0,I.jsx)(Dm,{...i,ref:t}):(0,I.jsx)(Om,{...i,ref:t})})});Em.displayName=Tm;var Dm=_.forwardRef((e,t)=>{let n=pm(Tm,e.__scopeDialog),r=_.useRef(null),i=P(t,n.contentRef,r);return _.useEffect(()=>{let e=r.current;if(e)return cm(e)},[]),(0,I.jsx)(km,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:j(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:j(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:j(e.onFocusOutside,e=>e.preventDefault())})}),Om=_.forwardRef((e,t)=>{let n=pm(Tm,e.__scopeDialog),r=_.useRef(!1),i=_.useRef(!1);return(0,I.jsx)(km,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),km=_.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=pm(Tm,n),c=_.useRef(null),l=P(t,c);return Ep(),(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(yp,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,I.jsx)(_e,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Im(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Bm,{titleId:s.titleId}),(0,I.jsx)(Hm,{contentRef:c,descriptionId:s.descriptionId})]})]})}),Am=`DialogTitle`,jm=_.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=pm(Am,n);return(0,I.jsx)(z.h2,{id:i.titleId,...r,ref:t})});jm.displayName=Am;var Mm=`DialogDescription`,Nm=_.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=pm(Mm,n);return(0,I.jsx)(z.p,{id:i.descriptionId,...r,ref:t})});Nm.displayName=Mm;var Pm=`DialogClose`,Fm=_.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=pm(Pm,n);return(0,I.jsx)(z.button,{type:`button`,...r,ref:t,onClick:j(e.onClick,()=>i.onOpenChange(!1))})});Fm.displayName=Pm;function Im(e){return e?`open`:`closed`}var Lm=`DialogTitleWarning`,[Rm,zm]=L(Lm,{contentName:Tm,titleName:Am,docsSlug:`dialog`}),Bm=({titleId:e})=>{let t=zm(Lm),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
52
-
53
- If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
54
-
55
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return _.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Vm=`DialogDescriptionWarning`,Hm=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${zm(Vm).contentName}}.`;return _.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Um=mm,Wm=gm,Gm=bm,Km=Sm,qm=Em,Jm=jm,Ym=Nm,Xm=Fm,Zm=Um,Qm=Wm,$m=Gm,eh=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(Km,{className:H(`fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),...t,ref:n}));eh.displayName=Km.displayName;var th=Vt(`fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500`,{variants:{side:{top:`inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top`,bottom:`inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom`,left:`inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm`,right:`inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm`}},defaultVariants:{side:`right`}}),nh=_.forwardRef(({side:e=`right`,className:t,children:n,...r},i)=>(0,I.jsxs)($m,{children:[(0,I.jsx)(eh,{}),(0,I.jsxs)(qm,{ref:i,className:H(th({side:e}),t),...r,children:[n,(0,I.jsxs)(Xm,{className:`absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-secondary hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none`,children:[(0,I.jsx)(Br,{className:`h-4 w-4`}),(0,I.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]}));nh.displayName=qm.displayName;var rh=({className:e,...t})=>(0,I.jsx)(`div`,{className:H(`flex flex-col space-y-2 text-center sm:text-left`,e),...t});rh.displayName=`SheetHeader`;var ih=({className:e,...t})=>(0,I.jsx)(`div`,{className:H(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,e),...t});ih.displayName=`SheetFooter`;var ah=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(Jm,{ref:n,className:H(`text-lg font-semibold text-foreground`,e),...t}));ah.displayName=Jm.displayName;var oh=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(Ym,{ref:n,className:H(`text-sm text-muted-foreground`,e),...t}));oh.displayName=Ym.displayName;function sh({className:e,...t}){return(0,I.jsx)(`div`,{className:H(`animate-pulse rounded-md bg-muted`,e),...t})}var ch=`sidebar:state`,lh=3600*24*7,uh=`16rem`,dh=`18rem`,fh=`3rem`,ph=`b`,mh=_.createContext(null);function hh(){let e=_.useContext(mh);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}var gh=_.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:i,children:a,...o},s)=>{let c=cp(),[l,u]=_.useState(!1),[d,f]=_.useState(e),p=t??d,m=_.useCallback(e=>{let t=typeof e==`function`?e(p):e;n?n(t):f(t),document.cookie=`${ch}=${t}; path=/; max-age=${lh}`},[n,p]),h=_.useCallback(()=>c?u(e=>!e):m(e=>!e),[c,m,u]);_.useEffect(()=>{let e=e=>{e.key===ph&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),h())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[h]);let g=p?`expanded`:`collapsed`,v=_.useMemo(()=>({state:g,open:p,setOpen:m,isMobile:c,openMobile:l,setOpenMobile:u,toggleSidebar:h}),[g,p,m,c,l,u,h]);return(0,I.jsx)(mh.Provider,{value:v,children:(0,I.jsx)(tl,{delayDuration:0,children:(0,I.jsx)(`div`,{style:{"--sidebar-width":uh,"--sidebar-width-icon":fh,...i},className:H(`group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar`,r),ref:s,...o,children:a})})})});gh.displayName=`SidebarProvider`;var _h=_.forwardRef(({side:e=`left`,variant:t=`sidebar`,collapsible:n=`offcanvas`,className:r,children:i,...a},o)=>{let{isMobile:s,state:c,openMobile:l,setOpenMobile:u}=hh();return n===`none`?(0,I.jsx)(`div`,{className:H(`flex h-full w-[var(--sidebar-width)] flex-col bg-sidebar text-sidebar-foreground`,r),ref:o,...a,children:i}):s?(0,I.jsx)(Zm,{open:l,onOpenChange:u,...a,children:(0,I.jsx)(nh,{"data-sidebar":`sidebar`,"data-mobile":`true`,className:`w-[var(--sidebar-width)] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden`,style:{"--sidebar-width":dh},side:e,children:(0,I.jsx)(`div`,{className:`flex h-full w-full flex-col`,children:i})})}):(0,I.jsxs)(`div`,{ref:o,className:`group peer hidden text-sidebar-foreground md:block`,"data-state":c,"data-collapsible":c===`collapsed`?n:``,"data-variant":t,"data-side":e,children:[(0,I.jsx)(`div`,{className:H(`relative h-svh w-[var(--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)_+_theme(spacing.4))]`:`group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)]`)}),(0,I.jsx)(`div`,{className:H(`fixed inset-y-0 z-10 hidden h-svh w-[var(--sidebar-width)] transition-[left,right,width] duration-200 ease-linear md:flex`,e===`left`?`left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]`:`right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]`,t===`floating`||t===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]`:`group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)] group-data-[side=left]:border-r group-data-[side=right]:border-l`,r),...a,children:(0,I.jsx)(`div`,{"data-sidebar":`sidebar`,className:`flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow`,children:i})})]})});_h.displayName=`Sidebar`;var vh=_.forwardRef(({className:e,onClick:t,...n},r)=>{let{toggleSidebar:i}=hh();return(0,I.jsxs)(W,{ref:r,"data-sidebar":`trigger`,variant:`ghost`,size:`icon`,className:H(`h-7 w-7`,e),onClick:e=>{t?.(e),i()},...n,children:[(0,I.jsx)(rr,{}),(0,I.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})});vh.displayName=`SidebarTrigger`;var yh=_.forwardRef(({className:e,...t},n)=>{let{toggleSidebar:r}=hh();return(0,I.jsx)(`button`,{ref:n,"data-sidebar":`rail`,"aria-label":`Toggle Sidebar`,tabIndex:-1,onClick:r,title:`Toggle Sidebar`,className:H(`absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] group-data-[side=left]:-right-4 group-data-[side=right]:left-0 hover:after:bg-sidebar-border sm:flex`,`[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize`,`[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize`,`group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar`,`[[data-side=left][data-collapsible=offcanvas]_&]:-right-2`,`[[data-side=right][data-collapsible=offcanvas]_&]:-left-2`,e),...t})});yh.displayName=`SidebarRail`;var bh=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(`main`,{ref:n,className:H(`relative flex min-h-svh flex-1 flex-col bg-background`,`peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow`,e),...t}));bh.displayName=`SidebarInset`;var xh=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(G,{ref:n,"data-sidebar":`input`,className:H(`h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring`,e),...t}));xh.displayName=`SidebarInput`;var Sh=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(`div`,{ref:n,"data-sidebar":`header`,className:H(`flex flex-col gap-2 p-2`,e),...t}));Sh.displayName=`SidebarHeader`;var Ch=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(`div`,{ref:n,"data-sidebar":`footer`,className:H(`flex flex-col gap-2 p-2`,e),...t}));Ch.displayName=`SidebarFooter`;var wh=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(hp,{ref:n,"data-sidebar":`separator`,className:H(`mx-2 w-auto bg-sidebar-border`,e),...t}));wh.displayName=`SidebarSeparator`;var Th=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(`div`,{ref:n,"data-sidebar":`content`,className:H(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...t}));Th.displayName=`SidebarContent`;var Eh=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(`div`,{ref:n,"data-sidebar":`group`,className:H(`relative flex w-full min-w-0 flex-col p-2`,e),...t}));Eh.displayName=`SidebarGroup`;var Dh=_.forwardRef(({className:e,asChild:t=!1,...n},r)=>(0,I.jsx)(t?tp:`div`,{ref:r,"data-sidebar":`group-label`,className:H(`flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,`group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0`,e),...n}));Dh.displayName=`SidebarGroupLabel`;var Oh=_.forwardRef(({className:e,asChild:t=!1,...n},r)=>(0,I.jsx)(t?tp:`button`,{ref:r,"data-sidebar":`group-action`,className:H(`absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,`after:absolute after:-inset-2 after:md:hidden`,`group-data-[collapsible=icon]:hidden`,e),...n}));Oh.displayName=`SidebarGroupAction`;var kh=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(`div`,{ref:n,"data-sidebar":`group-content`,className:H(`w-full text-sm`,e),...t}));kh.displayName=`SidebarGroupContent`;var Ah=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(`ul`,{ref:n,"data-sidebar":`menu`,className:H(`flex w-full min-w-0 flex-col gap-1`,e),...t}));Ah.displayName=`SidebarMenu`;var jh=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(`li`,{ref:n,"data-sidebar":`menu-item`,className:H(`group/menu-item relative`,e),...t}));jh.displayName=`SidebarMenuItem`;var Mh=Vt(`peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0`,{variants:{variant:{default:`hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:!p-0`}},defaultVariants:{variant:`default`,size:`default`}}),Nh=_.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n=`default`,size:r=`default`,tooltip:i,className:a,...o},s)=>{let c=e?tp:`button`,{isMobile:l,state:u}=hh(),d=(0,I.jsx)(c,{ref:s,"data-sidebar":`menu-button`,"data-size":r,"data-active":t,className:H(Mh({variant:n,size:r}),a),...o});return i?(typeof i==`string`&&(i={children:i}),(0,I.jsxs)(nl,{children:[(0,I.jsx)(rl,{asChild:!0,children:d}),(0,I.jsx)(il,{side:`right`,align:`center`,hidden:u!==`collapsed`||l,...i})]})):d});Nh.displayName=`SidebarMenuButton`;var Ph=_.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...r},i)=>(0,I.jsx)(t?tp:`button`,{ref:i,"data-sidebar":`menu-action`,className:H(`absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform peer-hover/menu-button:text-sidebar-accent-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,`after:absolute after:-inset-2 after:md:hidden`,`peer-data-[size=sm]/menu-button:top-1`,`peer-data-[size=default]/menu-button:top-1.5`,`peer-data-[size=lg]/menu-button:top-2.5`,`group-data-[collapsible=icon]:hidden`,n&&`group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0`,e),...r}));Ph.displayName=`SidebarMenuAction`;var Fh=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(`div`,{ref:n,"data-sidebar":`menu-badge`,className:H(`pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground`,`peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground`,`peer-data-[size=sm]/menu-button:top-1`,`peer-data-[size=default]/menu-button:top-1.5`,`peer-data-[size=lg]/menu-button:top-2.5`,`group-data-[collapsible=icon]:hidden`,e),...t}));Fh.displayName=`SidebarMenuBadge`;var Ih=_.forwardRef(({className:e,showIcon:t=!1,...n},r)=>{let i=_.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return(0,I.jsxs)(`div`,{ref:r,"data-sidebar":`menu-skeleton`,className:H(`flex h-8 items-center gap-2 rounded-md px-2`,e),...n,children:[t&&(0,I.jsx)(sh,{className:`size-4 rounded-md`,"data-sidebar":`menu-skeleton-icon`}),(0,I.jsx)(sh,{className:`h-4 max-w-[--skeleton-width] flex-1`,"data-sidebar":`menu-skeleton-text`,style:{"--skeleton-width":i}})]})});Ih.displayName=`SidebarMenuSkeleton`;var Lh=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(`ul`,{ref:n,"data-sidebar":`menu-sub`,className:H(`mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5`,`group-data-[collapsible=icon]:hidden`,e),...t}));Lh.displayName=`SidebarMenuSub`;var Rh=_.forwardRef(({...e},t)=>(0,I.jsx)(`li`,{ref:t,...e}));Rh.displayName=`SidebarMenuSubItem`;var zh=_.forwardRef(({asChild:e=!1,size:t=`md`,isActive:n,className:r,...i},a)=>(0,I.jsx)(e?tp:`a`,{ref:a,"data-sidebar":`menu-sub-button`,"data-size":t,"data-active":n,className:H(`flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring aria-disabled:pointer-events-none aria-disabled:opacity-50 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground`,`data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground`,t===`sm`&&`text-xs`,t===`md`&&`text-sm`,`group-data-[collapsible=icon]:hidden`,r),...i}));zh.displayName=`SidebarMenuSubButton`;var Bh=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},Vh=(e=>e?Bh(e):Bh),Hh=e=>e;function Uh(e,t=Hh){let n=_.useSyncExternalStore(e.subscribe,_.useCallback(()=>t(e.getState()),[e,t]),_.useCallback(()=>t(e.getInitialState()),[e,t]));return _.useDebugValue(n),n}var Wh=e=>{let t=Vh(e),n=e=>Uh(t,e);return Object.assign(n,t),n},Gh=(e=>e?Wh(e):Wh),Kh=Gh(e=>({isOpen:!1,data:null,show:t=>e({isOpen:!0,data:t}),close:()=>e({isOpen:!1,data:null})})),qh=typeof window<`u`?window.__HIVE_CONFIG__:void 0,Jh=qh?.apiUrl||``,Yh=qh?.wsUrl||``,Xh=e=>/localhost|127\.0\.0\.1/.test(e),Zh=/localhost|127\.0\.0\.1/.test(window.location.hostname);function Qh(){return Jh&&(!Xh(Jh)||Zh)?Jh:``}function $h(){if(Yh&&(!Xh(Yh)||Zh))return Yh;let e=Qh();return e?e.replace(/^http/,`ws`):`${window.location.protocol===`https:`?`wss:`:`ws:`}//${window.location.host}`}var eg=Gh((e,t)=>{let n=null,r=null;return{ws:null,status:`disconnected`,url:$h()+`/ws`,lastPing:null,retryCount:0,handlers:new Map,sessionId:null,setStatus:t=>e({status:t}),setLastPing:t=>e({lastPing:t}),setSessionId:t=>e({sessionId:t}),connect:i=>{let a=t();a.ws&&a.ws.close(),n&&clearTimeout(n);let o=a.url;try{let e=new URL(o),t=typeof localStorage<`u`?localStorage.getItem(`hive-auth-token`):null;i&&e.searchParams.set(`session`,i),t&&e.searchParams.set(`token`,t),o=e.toString()}catch{}e({status:`connecting`});try{let a=new WebSocket(o);a.onopen=()=>{console.log(`[WS-GLOBAL] Connected to`,o),e({status:`connected`,retryCount:0,ws:a}),a.send(JSON.stringify({type:`canvas_subscribe`})),r&&clearInterval(r),r=setInterval(()=>{a.readyState===WebSocket.OPEN&&a.send(JSON.stringify({type:`ping`,sessionId:i}))},3e4)},a.onclose=a=>{console.log(`[WS-GLOBAL] Disconnected from`,o,`Code:`,a.code),r&&=(clearInterval(r),null),e({status:`disconnected`,ws:null}),a.code!==1e3&&a.code!==1001&&(n=setTimeout(()=>{e(e=>({retryCount:e.retryCount+1})),t().connect(i)},3e3))},a.onerror=()=>{console.error(`[WS-GLOBAL] Error on`,o),e({status:`error`})},a.onmessage=n=>{e({lastPing:new Date().toISOString()});try{let r=JSON.parse(n.data),i=r.type;if(i===`pong`)return;i===`welcome`&&r.sessionId&&(e({sessionId:r.sessionId}),Kh.getState().show(r));let a=t().handlers.get(i);a&&a.forEach(e=>e(r))}catch{}}}catch(t){console.error(`[WS-GLOBAL] Failed to create WebSocket:`,t),e({status:`error`})}},disconnect:()=>{let{ws:i}=t();n&&=(clearTimeout(n),null),r&&=(clearInterval(r),null),i?.close(1e3),e({ws:null,status:`disconnected`})},send:e=>{let{ws:n,status:r}=t();n&&r===`connected`&&n.send(JSON.stringify(e))},subscribe:(e,n)=>{let{handlers:r}=t();return r.has(e)||r.set(e,new Set),r.get(e).add(n),()=>{let t=r.get(e);t&&(t.delete(n),t.size===0&&r.delete(e))}}}});function tg(e){let{status:t,url:n,connect:r,disconnect:i,send:a,subscribe:o}=eg();return(0,_.useEffect)(()=>{},[r]),{status:t,url:n,connect:r,disconnect:i,send:a,subscribe:o}}var Fte={connected:`bg-hive-connected`,connecting:`bg-hive-thinking animate-pulse`,disconnected:`bg-hive-disconnected`,error:`bg-hive-disconnected`};function Ite(){let{status:e}=tg();return(0,I.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,I.jsx)(`span`,{className:`inline-block h-2 w-2 rounded-full ${Fte[e]}`}),(0,I.jsxs)(`span`,{className:`hidden sm:inline`,children:[`WS: `,e]})]})}function Lte(){return(0,I.jsxs)(`header`,{className:`flex h-12 items-center justify-between border-b px-4`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(vh,{className:`h-8 w-8`}),(0,I.jsxs)(`h1`,{className:`text-sm font-semibold tracking-tight`,children:[(0,I.jsx)(`span`,{className:`text-primary`,children:`⬡`}),` Hive`]})]}),(0,I.jsx)(`div`,{className:`flex items-center gap-3`,children:(0,I.jsx)(Ite,{})})]})}var Rte=Nf,ng=(0,_.forwardRef)(({className:e,activeClassName:t,pendingClassName:n,to:r,...i},a)=>(0,I.jsx)(Rte,{ref:a,to:r,className:({isActive:r,isPending:i})=>H(e,r&&t,i&&n),...i}));ng.displayName=`NavLink`;var rg=`Collapsible`,[zte,ig]=R(rg),[Bte,ag]=zte(rg),og=_.forwardRef((e,t)=>{let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[c,l]=Fe({prop:r,defaultProp:i??!1,onChange:o,caller:rg});return(0,I.jsx)(Bte,{scope:n,disabled:a,contentId:Na(),open:c,onOpenToggle:_.useCallback(()=>l(e=>!e),[l]),children:(0,I.jsx)(z.div,{"data-state":dg(c),"data-disabled":a?``:void 0,...s,ref:t})})});og.displayName=rg;var sg=`CollapsibleTrigger`,cg=_.forwardRef((e,t)=>{let{__scopeCollapsible:n,...r}=e,i=ag(sg,n);return(0,I.jsx)(z.button,{type:`button`,"aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":dg(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:j(e.onClick,i.onOpenToggle)})});cg.displayName=sg;var lg=`CollapsibleContent`,ug=_.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=ag(lg,e.__scopeCollapsible);return(0,I.jsx)(Ae,{present:n||i.open,children:({present:e})=>(0,I.jsx)(Vte,{...r,ref:t,present:e})})});ug.displayName=lg;var Vte=_.forwardRef((e,t)=>{let{__scopeCollapsible:n,present:r,children:i,...a}=e,o=ag(lg,n),[s,c]=_.useState(r),l=_.useRef(null),u=P(t,l),d=_.useRef(0),f=d.current,p=_.useRef(0),m=p.current,h=o.open||s,g=_.useRef(h),v=_.useRef(void 0);return _.useEffect(()=>{let e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),Ee(()=>{let e=l.current;if(e){v.current=v.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();d.current=t.height,p.current=t.width,g.current||(e.style.transitionDuration=v.current.transitionDuration,e.style.animationName=v.current.animationName),c(r)}},[o.open,r]),(0,I.jsx)(z.div,{"data-state":dg(o.open),"data-disabled":o.disabled?``:void 0,id:o.contentId,hidden:!h,...a,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&i})});function dg(e){return e?`open`:`closed`}var fg=og,Hte=cg,Ute=ug,pg=fg,Wte=cg,mg=ug;function hg({icon:e,...t}){return(0,I.jsx)(e,{...t})}var Gte=[{title:`Dashboard`,url:`/`,icon:Jn},{title:`Web Chat`,url:`/chat`,icon:tr},{title:`Agentes`,url:`/agents`,icon:Zt},{title:`Proyectos`,url:`/projects`,icon:Mn},{title:`Canales`,url:`/channels`,icon:tr},{title:`Providers`,url:`/providers`,icon:Qt},{title:`Canvas`,url:`/canvas`,icon:qn},{title:`Bridge`,url:`/bridge`,icon:en},{title:`Logs`,url:`/logs`,icon:hr}],Kte=[{label:`Entorno`,items:[{id:`herramientas`,label:`Herramientas`,icon:zr},{id:`mcp`,label:`MCP Servers`,icon:yr},{id:`skills`,label:`Skills`,icon:Ir},{id:`etica`,label:`Ética`,icon:Sr}]},{label:`Usuario`,items:[{id:`perfil`,label:`Perfil`,icon:Pr},{id:`voz`,label:`Voz`,icon:nr},{id:`seguridad`,label:`Seguridad`,icon:Sr}]}],qte=[{title:`Notas`,url:`/notas`,icon:kr},{title:`Cron Jobs`,url:`/cron-jobs`,icon:gn}];function Jte(){let e=Nd().pathname.startsWith(`/settings`);return(0,I.jsx)(_h,{collapsible:`icon`,className:`hive-sidebar`,children:(0,I.jsx)(Th,{children:(0,I.jsxs)(Eh,{children:[(0,I.jsx)(Dh,{children:`Navegación`}),(0,I.jsx)(kh,{children:(0,I.jsxs)(Ah,{children:[Gte.map(e=>(0,I.jsx)(jh,{children:(0,I.jsx)(Nh,{asChild:!0,children:(0,I.jsxs)(ng,{to:e.url,end:e.url===`/`,className:`hive-sidebar-item group/item text-white/50 hover:text-white`,activeClassName:`hive-sidebar-item--active text-blue-400 font-bold`,children:[(0,I.jsx)(hg,{icon:e.icon,className:`h-4 w-4 transition-transform group-hover/item:scale-110`}),(0,I.jsx)(`span`,{children:e.title})]})})},e.title)),(0,I.jsx)(`div`,{className:`h-4`}),(0,I.jsx)(`p`,{className:`px-2 pb-1 text-[10px] font-bold uppercase tracking-widest text-white/20`,children:`Cognitivo`}),qte.map(e=>(0,I.jsx)(jh,{children:(0,I.jsx)(Nh,{asChild:!0,children:(0,I.jsxs)(ng,{to:e.url,className:`hive-sidebar-item group/item text-white/50 hover:text-white`,activeClassName:`hive-sidebar-item--active text-blue-400 font-bold`,children:[(0,I.jsx)(hg,{icon:e.icon,className:`h-4 w-4 transition-transform group-hover/item:scale-110`}),(0,I.jsx)(`span`,{children:e.title})]})})},e.title)),(0,I.jsx)(`div`,{className:`h-4`}),(0,I.jsx)(`p`,{className:`px-2 pb-1 text-[10px] font-bold uppercase tracking-widest text-white/20`,children:`Sistema`}),(0,I.jsx)(pg,{open:e,asChild:!0,children:(0,I.jsxs)(jh,{children:[(0,I.jsx)(Nh,{asChild:!0,isActive:e,children:(0,I.jsxs)(ng,{to:`/settings/herramientas`,className:`hive-sidebar-item group/item text-white/50 hover:text-white`,activeClassName:`hive-sidebar-item--active text-blue-400 font-bold`,children:[(0,I.jsx)(hg,{icon:Er,className:`h-4 w-4 transition-transform group-hover/item:scale-110`}),(0,I.jsx)(`span`,{children:`Ajustes`})]})}),(0,I.jsx)(mg,{children:Kte.map(e=>(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`p`,{className:`px-2 pt-2 pb-0.5 text-[10px] font-semibold uppercase tracking-widest text-sidebar-foreground/40`,children:e.label}),(0,I.jsx)(Lh,{children:e.items.map(e=>(0,I.jsx)(Rh,{children:(0,I.jsx)(zh,{asChild:!0,children:(0,I.jsxs)(ng,{to:`/settings/${e.id}`,className:`flex items-center gap-2.5 px-3 py-2 rounded-lg text-white/40 hover:text-white hover:bg-white/5 transition-all text-xs`,activeClassName:`text-blue-400 bg-blue-500/5 font-semibold`,children:[(0,I.jsx)(hg,{icon:e.icon,className:`h-3.5 w-3.5`}),(0,I.jsx)(`span`,{children:e.label})]})})},e.id))})]},e.label))})]})})]})})]})})})}var Yte=s({loader:()=>_g,useLoaderStore:()=>gg}),gg=Gh(e=>({isLoading:!1,message:void 0,showLoader:t=>e({isLoading:!0,message:t}),hideLoader:()=>e({isLoading:!1,message:void 0})})),_g={show:e=>gg.getState().showLoader(e),hide:()=>gg.getState().hideLoader()},vg=l(o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self,n.Sweetalert2=r())})(e,(function(){function e(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function t(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function n(t,n){return t.get(e(t,n))}function r(e,n,r){t(e,n),n.set(e,r)}function i(t,n,r){return t.set(e(t,n),r),r}let a={},o=()=>{a.previousActiveElement instanceof HTMLElement?(a.previousActiveElement.focus(),a.previousActiveElement=null):document.body&&document.body.focus()},s=e=>new Promise(t=>{if(!e)return t();let n=window.scrollX,r=window.scrollY;a.restoreFocusTimeout=setTimeout(()=>{o(),t()},100),window.scrollTo(n,r)}),c=`swal2-`,l=`container.shown.height-auto.iosfix.popup.modal.no-backdrop.no-transition.toast.toast-shown.show.hide.close.title.html-container.actions.confirm.deny.cancel.footer.icon.icon-content.image.input.file.range.select.radio.checkbox.label.textarea.inputerror.input-label.validation-message.progress-steps.active-progress-step.progress-step.progress-step-line.loader.loading.styled.top.top-start.top-end.top-left.top-right.center.center-start.center-end.center-left.center-right.bottom.bottom-start.bottom-end.bottom-left.bottom-right.grow-row.grow-column.grow-fullscreen.rtl.timer-progress-bar.timer-progress-bar-container.scrollbar-measure.icon-success.icon-warning.icon-info.icon-question.icon-error.draggable.dragging`.split(`.`).reduce((e,t)=>(e[t]=c+t,e),{}),u=[`success`,`warning`,`info`,`question`,`error`].reduce((e,t)=>(e[t]=c+t,e),{}),d=`SweetAlert2:`,f=e=>e.charAt(0).toUpperCase()+e.slice(1),p=e=>{console.warn(`${d} ${typeof e==`object`?e.join(` `):e}`)},m=e=>{console.error(`${d} ${e}`)},h=[],g=e=>{h.includes(e)||(h.push(e),p(e))},_=(e,t=null)=>{g(`"${e}" is deprecated and will be removed in the next major release.${t?` Use "${t}" instead.`:``}`)},v=e=>typeof e==`function`?e():e,y=e=>e&&typeof e.toPromise==`function`,b=e=>y(e)?e.toPromise():Promise.resolve(e),x=e=>e&&Promise.resolve(e)===e,S=()=>navigator.userAgent.includes(`Firefox`),C=()=>document.body.querySelector(`.${l.container}`),w=e=>{let t=C();return t?t.querySelector(e):null},T=e=>w(`.${e}`),E=()=>T(l.popup),D=()=>T(l.icon),O=()=>T(l[`icon-content`]),k=()=>T(l.title),A=()=>T(l[`html-container`]),j=()=>T(l.image),M=()=>T(l[`progress-steps`]),N=()=>T(l[`validation-message`]),P=()=>w(`.${l.actions} .${l.confirm}`),F=()=>w(`.${l.actions} .${l.cancel}`),I=()=>w(`.${l.actions} .${l.deny}`),L=()=>T(l[`input-label`]),R=()=>w(`.${l.loader}`),ee=()=>T(l.actions),te=()=>T(l.footer),ne=()=>T(l[`timer-progress-bar`]),re=()=>T(l.close),ie=()=>{let e=E();if(!e)return[];let t=e.querySelectorAll(`[tabindex]:not([tabindex="-1"]):not([tabindex="0"])`),n=Array.from(t).sort((e,t)=>{let n=parseInt(e.getAttribute(`tabindex`)||`0`),r=parseInt(t.getAttribute(`tabindex`)||`0`);return n>r?1:n<r?-1:0}),r=e.querySelectorAll(`
56
- a[href],
57
- area[href],
58
- input:not([disabled]),
59
- select:not([disabled]),
60
- textarea:not([disabled]),
61
- button:not([disabled]),
62
- iframe,
63
- object,
64
- embed,
65
- [tabindex="0"],
66
- [contenteditable],
67
- audio[controls],
68
- video[controls],
69
- summary
70
- `),i=Array.from(r).filter(e=>e.getAttribute(`tabindex`)!==`-1`);return[...new Set(n.concat(i))].filter(e=>Se(e))},ae=()=>z(document.body,l.shown)&&!z(document.body,l[`toast-shown`])&&!z(document.body,l[`no-backdrop`]),oe=()=>{let e=E();return e?z(e,l.toast):!1},se=()=>{let e=E();return e?e.hasAttribute(`data-loading`):!1},ce=(e,t)=>{if(e.textContent=``,t){let n=new DOMParser().parseFromString(t,`text/html`),r=n.querySelector(`head`);r&&Array.from(r.childNodes).forEach(t=>{e.appendChild(t)});let i=n.querySelector(`body`);i&&Array.from(i.childNodes).forEach(t=>{t instanceof HTMLVideoElement||t instanceof HTMLAudioElement?e.appendChild(t.cloneNode(!0)):e.appendChild(t)})}},z=(e,t)=>{if(!t)return!1;let n=t.split(/\s+/);for(let t=0;t<n.length;t++)if(!e.classList.contains(n[t]))return!1;return!0},le=(e,t)=>{Array.from(e.classList).forEach(n=>{!Object.values(l).includes(n)&&!Object.values(u).includes(n)&&!Object.values(t.showClass||{}).includes(n)&&e.classList.remove(n)})},B=(e,t,n)=>{if(le(e,t),!t.customClass)return;let r=t.customClass[n];if(r){if(typeof r!=`string`&&!r.forEach){p(`Invalid type of customClass.${n}! Expected string or iterable object, got "${typeof r}"`);return}pe(e,r)}},ue=(e,t)=>{if(!t)return null;switch(t){case`select`:case`textarea`:case`file`:return e.querySelector(`.${l.popup} > .${l[t]}`);case`checkbox`:return e.querySelector(`.${l.popup} > .${l.checkbox} input`);case`radio`:return e.querySelector(`.${l.popup} > .${l.radio} input:checked`)||e.querySelector(`.${l.popup} > .${l.radio} input:first-child`);case`range`:return e.querySelector(`.${l.popup} > .${l.range} input`);default:return e.querySelector(`.${l.popup} > .${l.input}`)}},de=e=>{if(e.focus(),e.type!==`file`){let t=e.value;e.value=``,e.value=t}},fe=(e,t,n)=>{if(!e||!t)return;let r=typeof t==`string`?t.split(/\s+/).filter(Boolean):t;(Array.isArray(e)?e:[e]).forEach(e=>{r.forEach(t=>{n?e.classList.add(t):e.classList.remove(t)})})},pe=(e,t)=>{fe(e,t,!0)},me=(e,t)=>{fe(e,t,!1)},he=(e,t)=>{let n=Array.from(e.children);for(let e=0;e<n.length;e++){let r=n[e];if(r instanceof HTMLElement&&z(r,t))return r}},ge=(e,t,n)=>{n===`${parseInt(`${n}`)}`&&(n=parseInt(n)),n||n===0?e.style.setProperty(t,typeof n==`number`?`${n}px`:n):e.style.removeProperty(t)},_e=(e,t=`flex`)=>{e&&(e.style.display=t)},ve=e=>{e&&(e.style.display=`none`)},ye=(e,t=`block`)=>{e&&new MutationObserver(()=>{xe(e,e.innerHTML,t)}).observe(e,{childList:!0,subtree:!0})},be=(e,t,n,r)=>{let i=e.querySelector(t);i&&i.style.setProperty(n,r)},xe=(e,t,n=`flex`)=>{t?_e(e,n):ve(e)},Se=e=>!!(e&&(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),Ce=()=>!Se(P())&&!Se(I())&&!Se(F()),we=e=>e.scrollHeight>e.clientHeight,Te=(e,t)=>{let n=e;for(;n&&n!==t;){if(we(n))return!0;n=n.parentElement}return!1},Ee=e=>{let t=window.getComputedStyle(e),n=parseFloat(t.getPropertyValue(`animation-duration`)||`0`),r=parseFloat(t.getPropertyValue(`transition-duration`)||`0`);return n>0||r>0},De=(e,t=!1)=>{let n=ne();n&&Se(n)&&(t&&(n.style.transition=`none`,n.style.width=`100%`),setTimeout(()=>{n.style.transition=`width ${e/1e3}s linear`,n.style.width=`0%`},10))},Oe=()=>{let e=ne();if(!e)return;let t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty(`transition`),e.style.width=`100%`;let n=t/parseInt(window.getComputedStyle(e).width)*100;e.style.width=`${n}%`},ke=()=>typeof window>`u`||typeof document>`u`,Ae=`
71
- <div aria-labelledby="${l.title}" aria-describedby="${l[`html-container`]}" class="${l.popup}" tabindex="-1">
72
- <button type="button" class="${l.close}"></button>
73
- <ul class="${l[`progress-steps`]}"></ul>
74
- <div class="${l.icon}"></div>
75
- <img class="${l.image}" />
76
- <h2 class="${l.title}" id="${l.title}"></h2>
77
- <div class="${l[`html-container`]}" id="${l[`html-container`]}"></div>
78
- <input class="${l.input}" id="${l.input}" />
79
- <input type="file" class="${l.file}" />
80
- <div class="${l.range}">
81
- <input type="range" />
82
- <output></output>
83
- </div>
84
- <select class="${l.select}" id="${l.select}"></select>
85
- <div class="${l.radio}"></div>
86
- <label class="${l.checkbox}">
87
- <input type="checkbox" id="${l.checkbox}" />
88
- <span class="${l.label}"></span>
89
- </label>
90
- <textarea class="${l.textarea}" id="${l.textarea}"></textarea>
91
- <div class="${l[`validation-message`]}" id="${l[`validation-message`]}"></div>
92
- <div class="${l.actions}">
93
- <div class="${l.loader}"></div>
94
- <button type="button" class="${l.confirm}"></button>
95
- <button type="button" class="${l.deny}"></button>
96
- <button type="button" class="${l.cancel}"></button>
97
- </div>
98
- <div class="${l.footer}"></div>
99
- <div class="${l[`timer-progress-bar-container`]}">
100
- <div class="${l[`timer-progress-bar`]}"></div>
101
- </div>
102
- </div>
103
- `.replace(/(^|\n)\s*/g,``),je=()=>{let e=C();return e?(e.remove(),me([document.documentElement,document.body],[l[`no-backdrop`],l[`toast-shown`],l[`has-column`]]),!0):!1},Me=()=>{a.currentInstance&&a.currentInstance.resetValidationMessage()},Ne=()=>{let e=E();if(!e)return;let t=he(e,l.input),n=he(e,l.file),r=e.querySelector(`.${l.range} input`),i=e.querySelector(`.${l.range} output`),a=he(e,l.select),o=e.querySelector(`.${l.checkbox} input`),s=he(e,l.textarea);t&&(t.oninput=Me),n&&(n.onchange=Me),a&&(a.onchange=Me),o&&(o.onchange=Me),s&&(s.oninput=Me),r&&i&&(r.oninput=()=>{Me(),i.value=r.value},r.onchange=()=>{Me(),i.value=r.value})},Pe=e=>{if(typeof e==`string`){let t=document.querySelector(e);if(!t)throw Error(`Target element "${e}" not found`);return t}return e},Fe=e=>{let t=E();t&&(t.setAttribute(`role`,e.toast?`alert`:`dialog`),t.setAttribute(`aria-live`,e.toast?`polite`:`assertive`),e.toast||t.setAttribute(`aria-modal`,`true`))},Ie=e=>{window.getComputedStyle(e).direction===`rtl`&&(pe(C(),l.rtl),a.isRTL=!0)},Le=e=>{let t=je();if(ke()){m(`SweetAlert2 requires document to initialize`);return}let n=document.createElement(`div`);n.className=l.container,t&&pe(n,l[`no-transition`]),ce(n,Ae),n.dataset.swal2Theme=e.theme;let r=Pe(e.target||`body`);r.appendChild(n),e.topLayer&&(n.setAttribute(`popover`,``),n.showPopover()),Fe(e),Ie(r),Ne()},Re=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):typeof e==`object`?ze(e,t):e&&ce(t,e)},ze=(e,t)=>{`jquery`in e?Be(t,e):ce(t,e.toString())},Be=(e,t)=>{if(e.textContent=``,0 in t)for(let n=0;n in t;n++)e.appendChild(t[n].cloneNode(!0));else e.appendChild(t.cloneNode(!0))},Ve=(e,t)=>{let n=ee(),r=R();!n||!r||(!t.showConfirmButton&&!t.showDenyButton&&!t.showCancelButton?ve(n):_e(n),B(n,t,`actions`),He(n,r,t),ce(r,t.loaderHtml||``),B(r,t,`loader`))};function He(e,t,n){let r=P(),i=I(),a=F();!r||!i||!a||(Ge(r,`confirm`,n),Ge(i,`deny`,n),Ge(a,`cancel`,n),Ue(r,i,a,n),n.reverseButtons&&(n.toast?(e.insertBefore(a,r),e.insertBefore(i,r)):(e.insertBefore(a,t),e.insertBefore(i,t),e.insertBefore(r,t))))}function Ue(e,t,n,r){if(!r.buttonsStyling){me([e,t,n],l.styled);return}pe([e,t,n],l.styled),[[e,`confirm`,r.confirmButtonColor],[t,`deny`,r.denyButtonColor],[n,`cancel`,r.cancelButtonColor]].forEach(([e,t,n])=>{n&&e.style.setProperty(`--swal2-${t}-button-background-color`,n),We(e)})}function We(e){let t=window.getComputedStyle(e);if(t.getPropertyValue(`--swal2-action-button-focus-box-shadow`))return;let n=t.backgroundColor.replace(/rgba?\((\d+), (\d+), (\d+).*/,`rgba($1, $2, $3, 0.5)`);e.style.setProperty(`--swal2-action-button-focus-box-shadow`,t.getPropertyValue(`--swal2-outline`).replace(/ rgba\(.*/,` ${n}`))}function Ge(e,t,n){xe(e,n[`show${f(t)}Button`],`inline-block`),ce(e,n[`${t}ButtonText`]||``),e.setAttribute(`aria-label`,n[`${t}ButtonAriaLabel`]||``),e.className=l[t],B(e,n,`${t}Button`)}let Ke=(e,t)=>{let n=re();n&&(ce(n,t.closeButtonHtml||``),B(n,t,`closeButton`),xe(n,t.showCloseButton),n.setAttribute(`aria-label`,t.closeButtonAriaLabel||``))},qe=(e,t)=>{let n=C();n&&(Je(n,t.backdrop),Ye(n,t.position),Xe(n,t.grow),B(n,t,`container`))};function Je(e,t){typeof t==`string`?e.style.background=t:t||pe([document.documentElement,document.body],l[`no-backdrop`])}function Ye(e,t){t&&(t in l?pe(e,l[t]):(p(`The "position" parameter is not valid, defaulting to "center"`),pe(e,l.center)))}function Xe(e,t){t&&pe(e,l[`grow-${t}`])}var Ze={innerParams:new WeakMap,domCache:new WeakMap,focusedElement:new WeakMap};let Qe=[`input`,`file`,`range`,`select`,`radio`,`checkbox`,`textarea`],$e=(e,t)=>{let n=E();if(!n)return;let r=Ze.innerParams.get(e),i=!r||t.input!==r.input;Qe.forEach(e=>{let r=he(n,l[e]);r&&(nt(e,t.inputAttributes),r.className=l[e],i&&ve(r))}),t.input&&(i&&et(t),rt(t))},et=e=>{if(!e.input)return;if(!ct[e.input]){m(`Unexpected type of input! Expected ${Object.keys(ct).join(` | `)}, got "${e.input}"`);return}let t=ot(e.input);if(!t)return;let n=ct[e.input](t,e);_e(t),e.inputAutoFocus&&setTimeout(()=>{de(n)})},tt=e=>{for(let t=0;t<e.attributes.length;t++){let n=e.attributes[t].name;[`id`,`type`,`value`,`style`].includes(n)||e.removeAttribute(n)}},nt=(e,t)=>{let n=E();if(!n)return;let r=ue(n,e);if(r){tt(r);for(let e in t)r.setAttribute(e,t[e])}},rt=e=>{if(!e.input)return;let t=ot(e.input);t&&B(t,e,`input`)},it=(e,t)=>{!e.placeholder&&t.inputPlaceholder&&(e.placeholder=t.inputPlaceholder)},at=(e,t,n)=>{if(n.inputLabel){let r=document.createElement(`label`),i=l[`input-label`];r.setAttribute(`for`,e.id),r.className=i,typeof n.customClass==`object`&&pe(r,n.customClass.inputLabel),r.innerText=n.inputLabel,t.insertAdjacentElement(`beforebegin`,r)}},ot=e=>{let t=E();if(t)return he(t,l[e]||l.input)},st=(e,t)=>{[`string`,`number`].includes(typeof t)?e.value=`${t}`:x(t)||p(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof t}"`)},ct={};ct.text=ct.email=ct.password=ct.number=ct.tel=ct.url=ct.search=ct.date=ct[`datetime-local`]=ct.time=ct.week=ct.month=(e,t)=>{let n=e;return st(n,t.inputValue),at(n,n,t),it(n,t),n.type=t.input,n},ct.file=(e,t)=>{let n=e;return at(n,n,t),it(n,t),n},ct.range=(e,t)=>{let n=e,r=n.querySelector(`input`),i=n.querySelector(`output`);return r&&(st(r,t.inputValue),r.type=t.input,at(r,e,t)),i&&st(i,t.inputValue),e},ct.select=(e,t)=>{let n=e;if(n.textContent=``,t.inputPlaceholder){let e=document.createElement(`option`);ce(e,t.inputPlaceholder),e.value=``,e.disabled=!0,e.selected=!0,n.appendChild(e)}return at(n,n,t),n},ct.radio=e=>{let t=e;return t.textContent=``,e},ct.checkbox=(e,t)=>{let n=E();if(!n)throw Error(`Popup not found`);let r=ue(n,`checkbox`);if(!r)throw Error(`Checkbox input not found`);r.value=`1`,r.checked=!!t.inputValue;let i=e.querySelector(`span`);if(i){let e=t.inputPlaceholder||t.inputLabel;e&&ce(i,e)}return r},ct.textarea=(e,t)=>{let n=e;st(n,t.inputValue),it(n,t),at(n,n,t);let r=e=>parseInt(window.getComputedStyle(e).marginLeft)+parseInt(window.getComputedStyle(e).marginRight);return setTimeout(()=>{if(`MutationObserver`in window){let e=E();if(!e)return;let i=parseInt(window.getComputedStyle(e).width);new MutationObserver(()=>{if(!document.body.contains(n))return;let e=n.offsetWidth+r(n),a=E();a&&(e>i?a.style.width=`${e}px`:ge(a,`width`,t.width))}).observe(n,{attributes:!0,attributeFilter:[`style`]})}}),n};let lt=(e,t)=>{let n=A();n&&(ye(n),B(n,t,`htmlContainer`),t.html?(Re(t.html,n),_e(n,`block`)):t.text?(n.textContent=t.text,_e(n,`block`)):ve(n),$e(e,t))},ut=(e,t)=>{let n=te();n&&(ye(n),xe(n,!!t.footer,`block`),t.footer&&Re(t.footer,n),B(n,t,`footer`))},dt=(e,t)=>{let n=Ze.innerParams.get(e),r=D();if(r){if(n&&t.icon===n.icon){ht(r,t),ft(r,t);return}if(!t.icon&&!t.iconHtml){ve(r);return}if(t.icon&&Object.keys(u).indexOf(t.icon)===-1){m(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${t.icon}"`),ve(r);return}_e(r),ht(r,t),ft(r,t),pe(r,t.showClass&&t.showClass.icon),window.matchMedia(`(prefers-color-scheme: dark)`).addEventListener(`change`,pt)}},ft=(e,t)=>{for(let[n,r]of Object.entries(u))t.icon!==n&&me(e,r);pe(e,t.icon&&u[t.icon]),gt(e,t),pt(),B(e,t,`icon`)},pt=()=>{let e=E();if(!e)return;let t=window.getComputedStyle(e).getPropertyValue(`background-color`),n=e.querySelectorAll(`[class^=swal2-success-circular-line], .swal2-success-fix`);for(let e=0;e<n.length;e++)n[e].style.backgroundColor=t},mt=e=>`
104
- ${e.animation?`<div class="swal2-success-circular-line-left"></div>`:``}
105
- <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>
106
- <div class="swal2-success-ring"></div>
107
- ${e.animation?`<div class="swal2-success-fix"></div>`:``}
108
- ${e.animation?`<div class="swal2-success-circular-line-right"></div>`:``}
109
- `,ht=(e,t)=>{if(!t.icon&&!t.iconHtml)return;let n=e.innerHTML,r=``;t.iconHtml?r=_t(t.iconHtml):t.icon===`success`?(r=mt(t),n=n.replace(/ style=".*?"/g,``)):t.icon===`error`?r=`
110
- <span class="swal2-x-mark">
111
- <span class="swal2-x-mark-line-left"></span>
112
- <span class="swal2-x-mark-line-right"></span>
113
- </span>
114
- `:t.icon&&(r=_t({question:`?`,warning:`!`,info:`i`}[t.icon])),n.trim()!==r.trim()&&ce(e,r)},gt=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(let n of[`.swal2-success-line-tip`,`.swal2-success-line-long`,`.swal2-x-mark-line-left`,`.swal2-x-mark-line-right`])be(e,n,`background-color`,t.iconColor);be(e,`.swal2-success-ring`,`border-color`,t.iconColor)}},_t=e=>`<div class="${l[`icon-content`]}">${e}</div>`,vt=(e,t)=>{let n=j();if(n){if(!t.imageUrl){ve(n);return}_e(n,``),n.setAttribute(`src`,t.imageUrl),n.setAttribute(`alt`,t.imageAlt||``),ge(n,`width`,t.imageWidth),ge(n,`height`,t.imageHeight),n.className=l.image,B(n,t,`image`)}},yt=!1,bt=0,xt=0,St=0,Ct=0,wt=e=>{e.addEventListener(`mousedown`,Et),document.body.addEventListener(`mousemove`,Dt),e.addEventListener(`mouseup`,Ot),e.addEventListener(`touchstart`,Et),document.body.addEventListener(`touchmove`,Dt),e.addEventListener(`touchend`,Ot)},Tt=e=>{e.removeEventListener(`mousedown`,Et),document.body.removeEventListener(`mousemove`,Dt),e.removeEventListener(`mouseup`,Ot),e.removeEventListener(`touchstart`,Et),document.body.removeEventListener(`touchmove`,Dt),e.removeEventListener(`touchend`,Ot)},Et=e=>{let t=E();if(!t)return;let n=D();if(e.target===t||n&&n.contains(e.target)){yt=!0;let n=kt(e);bt=n.clientX,xt=n.clientY,St=parseInt(t.style.insetInlineStart)||0,Ct=parseInt(t.style.insetBlockStart)||0,pe(t,`swal2-dragging`)}},Dt=e=>{let t=E();if(t&&yt){let{clientX:n,clientY:r}=kt(e),i=n-bt;t.style.insetInlineStart=`${St+(a.isRTL?-i:i)}px`,t.style.insetBlockStart=`${Ct+(r-xt)}px`}},Ot=()=>{let e=E();yt=!1,me(e,`swal2-dragging`)},kt=e=>{let t=e.type.startsWith(`touch`)?e.touches[0]:e;return{clientX:t.clientX,clientY:t.clientY}},At=(e,t)=>{let n=C(),r=E();if(!(!n||!r)){if(t.toast){ge(n,`width`,t.width),r.style.width=`100%`;let e=R();e&&r.insertBefore(e,D())}else ge(r,`width`,t.width);ge(r,`padding`,t.padding),t.color&&(r.style.color=t.color),t.background&&(r.style.background=t.background),ve(N()),jt(r,t),t.draggable&&!t.toast?(pe(r,l.draggable),wt(r)):(me(r,l.draggable),Tt(r))}},jt=(e,t)=>{let n=t.showClass||{};e.className=`${l.popup} ${Se(e)?n.popup:``}`,t.toast?(pe([document.documentElement,document.body],l[`toast-shown`]),pe(e,l.toast)):pe(e,l.modal),B(e,t,`popup`),typeof t.customClass==`string`&&pe(e,t.customClass),t.icon&&pe(e,l[`icon-${t.icon}`])},Mt=(e,t)=>{let n=M();if(!n)return;let{progressSteps:r,currentProgressStep:i}=t;if(!r||r.length===0||i===void 0){ve(n);return}_e(n),n.textContent=``,i>=r.length&&p(`Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)`),r.forEach((e,a)=>{let o=Nt(e);if(n.appendChild(o),a===i&&pe(o,l[`active-progress-step`]),a!==r.length-1){let e=Pt(t);n.appendChild(e)}})},Nt=e=>{let t=document.createElement(`li`);return pe(t,l[`progress-step`]),ce(t,e),t},Pt=e=>{let t=document.createElement(`li`);return pe(t,l[`progress-step-line`]),e.progressStepsDistance&&ge(t,`width`,e.progressStepsDistance),t},Ft=(e,t)=>{let n=k();n&&(ye(n),xe(n,!!(t.title||t.titleText),`block`),t.title&&Re(t.title,n),t.titleText&&(n.innerText=t.titleText),B(n,t,`title`))},It=(e,t)=>{var n;At(e,t),qe(e,t),Mt(e,t),dt(e,t),vt(e,t),Ft(e,t),Ke(e,t),lt(e,t),Ve(e,t),ut(e,t);let r=E();typeof t.didRender==`function`&&r&&t.didRender(r),(n=a.eventEmitter)==null||n.emit(`didRender`,r)},Lt=()=>Se(E()),Rt=()=>P()?.click(),zt=()=>I()?.click(),Bt=()=>F()?.click(),Vt=Object.freeze({cancel:`cancel`,backdrop:`backdrop`,close:`close`,esc:`esc`,timer:`timer`}),Ht=e=>{if(e.keydownTarget&&e.keydownHandlerAdded&&e.keydownHandler){let t=e.keydownHandler;e.keydownTarget.removeEventListener(`keydown`,t,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!1}},Ut=(e,t,n)=>{if(Ht(e),!t.toast){let r=e=>Kt(t,e,n);e.keydownHandler=r;let i=t.keydownListenerCapture?window:E();if(i){e.keydownTarget=i,e.keydownListenerCapture=t.keydownListenerCapture;let n=r;e.keydownTarget.addEventListener(`keydown`,n,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!0}}},Wt=(e,t)=>{var n;let r=ie();return r.length?(e+=t,e===-2&&(e=r.length-1),e===r.length?e=0:e===-1&&(e=r.length-1),r[e].focus(),!(S()&&r[e]instanceof HTMLIFrameElement)):((n=E())==null||n.focus(),!0)},Gt=[`ArrowRight`,`ArrowDown`],V=[`ArrowLeft`,`ArrowUp`],Kt=(e,t,n)=>{e&&(t.isComposing||t.keyCode===229||(e.stopKeydownPropagation&&t.stopPropagation(),t.key===`Enter`?qt(t,e):t.key===`Tab`?Jt(t):[...Gt,...V].includes(t.key)?Yt(t.key):t.key===`Escape`&&Xt(t,e,n)))},qt=(e,t)=>{if(!v(t.allowEnterKey))return;let n=E();if(!n||!t.input)return;let r=ue(n,t.input);if(e.target&&r&&e.target instanceof HTMLElement&&e.target.outerHTML===r.outerHTML){if([`textarea`,`file`].includes(t.input))return;Rt(),e.preventDefault()}},Jt=e=>{let t=e.target,n=ie(),r=-1;for(let e=0;e<n.length;e++)if(t===n[e]){r=e;break}let i=!0;i=e.shiftKey?Wt(r,-1):Wt(r,1),e.stopPropagation(),i&&e.preventDefault()},Yt=e=>{let t=ee(),n=P(),r=I(),i=F();if(!t||!n||!r||!i)return;let a=[n,r,i];if(document.activeElement instanceof HTMLElement&&!a.includes(document.activeElement))return;let o=Gt.includes(e)?`nextElementSibling`:`previousElementSibling`,s=document.activeElement;if(s){for(let e=0;e<t.children.length;e++){if(s=s[o],!s)return;if(s instanceof HTMLButtonElement&&Se(s))break}s instanceof HTMLButtonElement&&s.focus()}},Xt=(e,t,n)=>{e.preventDefault(),v(t.allowEscapeKey)&&n(Vt.esc)};var Zt={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};let Qt=()=>{let e=C();Array.from(document.body.children).forEach(t=>{t.contains(e)||(t.hasAttribute(`aria-hidden`)&&t.setAttribute(`data-previous-aria-hidden`,t.getAttribute(`aria-hidden`)||``),t.setAttribute(`aria-hidden`,`true`))})},$t=()=>{Array.from(document.body.children).forEach(e=>{e.hasAttribute(`data-previous-aria-hidden`)?(e.setAttribute(`aria-hidden`,e.getAttribute(`data-previous-aria-hidden`)||``),e.removeAttribute(`data-previous-aria-hidden`)):e.removeAttribute(`aria-hidden`)})},en=typeof window<`u`&&!!window.GestureEvent,tn=en&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,nn=()=>{if(en&&!z(document.body,l.iosfix)){let e=document.body.scrollTop;document.body.style.top=`${e*-1}px`,pe(document.body,l.iosfix),rn()}},rn=()=>{let e=C();if(!e)return;let t;e.ontouchstart=e=>{t=an(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},an=e=>{let t=e.target,n=C(),r=A();return!n||!r||on(e)||sn(e)?!1:t===n||!we(n)&&t instanceof HTMLElement&&!Te(t,r)&&t.tagName!==`INPUT`&&t.tagName!==`TEXTAREA`&&!(we(r)&&r.contains(t))},on=e=>!!(e.touches&&e.touches.length&&e.touches[0].touchType===`stylus`),sn=e=>e.touches&&e.touches.length>1,cn=()=>{if(z(document.body,l.iosfix)){let e=parseInt(document.body.style.top,10);me(document.body,l.iosfix),document.body.style.top=``,document.body.scrollTop=e*-1}},ln=()=>{let e=document.createElement(`div`);e.className=l[`scrollbar-measure`],document.body.appendChild(e);let t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t},un=null,dn=e=>{un===null&&(document.body.scrollHeight>window.innerHeight||e===`scroll`)&&(un=parseInt(window.getComputedStyle(document.body).getPropertyValue(`padding-right`)),document.body.style.paddingRight=`${un+ln()}px`)},fn=()=>{un!==null&&(document.body.style.paddingRight=`${un}px`,un=null)};function pn(e,t,n,r){oe()?Sn(e,r):(s(n).then(()=>Sn(e,r)),Ht(a)),en?(t.setAttribute(`style`,`display:none !important`),t.removeAttribute(`class`),t.innerHTML=``):t.remove(),ae()&&(fn(),cn(),$t()),mn()}function mn(){me([document.documentElement,document.body],[l.shown,l[`height-auto`],l[`no-backdrop`],l[`toast-shown`]])}function hn(e){e=yn(e);let t=Zt.swalPromiseResolve.get(this),n=gn(this);this.isAwaitingPromise?e.isDismissed||(vn(this),t(e)):n&&t(e)}let gn=e=>{let t=E();if(!t)return!1;let n=Ze.innerParams.get(e);if(!n||z(t,n.hideClass.popup))return!1;me(t,n.showClass.popup),pe(t,n.hideClass.popup);let r=C();return me(r,n.showClass.backdrop),pe(r,n.hideClass.backdrop),bn(e,t,n),!0};function _n(e){let t=Zt.swalPromiseReject.get(this);vn(this),t&&t(e)}let vn=e=>{e.isAwaitingPromise&&(delete e.isAwaitingPromise,Ze.innerParams.get(e)||e._destroy())},yn=e=>e===void 0?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},e),bn=(e,t,n)=>{var r;let i=C(),o=Ee(t);typeof n.willClose==`function`&&n.willClose(t),(r=a.eventEmitter)==null||r.emit(`willClose`,t),o&&i?xn(e,t,i,!!n.returnFocus,n.didClose):i&&pn(e,i,!!n.returnFocus,n.didClose)},xn=(e,t,n,r,i)=>{a.swalCloseEventFinishedCallback=pn.bind(null,e,n,r,i);let o=function(e){if(e.target===t){var n;(n=a.swalCloseEventFinishedCallback)==null||n.call(a),delete a.swalCloseEventFinishedCallback,t.removeEventListener(`animationend`,o),t.removeEventListener(`transitionend`,o)}};t.addEventListener(`animationend`,o),t.addEventListener(`transitionend`,o)},Sn=(e,t)=>{setTimeout(()=>{var n;typeof t==`function`&&t.bind(e.params)(),(n=a.eventEmitter)==null||n.emit(`didClose`),e._destroy&&e._destroy()})},Cn=e=>{let t=E();if(t||new xi,t=E(),!t)return;let n=R();oe()?ve(D()):wn(t,e),_e(n),t.setAttribute(`data-loading`,`true`),t.setAttribute(`aria-busy`,`true`),t.focus()},wn=(e,t)=>{let n=ee(),r=R();!n||!r||(!t&&Se(P())&&(t=P()),_e(n),t&&(ve(t),r.setAttribute(`data-button-to-replace`,t.className),n.insertBefore(r,t)),pe([e,n],l.loading))},Tn=(e,t)=>{t.input===`select`||t.input===`radio`?An(e,t):[`text`,`email`,`number`,`tel`,`textarea`].some(e=>e===t.input)&&(y(t.inputValue)||x(t.inputValue))&&(Cn(P()),jn(e,t))},En=(e,t)=>{let n=e.getInput();if(!n)return null;switch(t.input){case`checkbox`:return Dn(n);case`radio`:return On(n);case`file`:return kn(n);default:return t.inputAutoTrim?n.value.trim():n.value}},Dn=e=>e.checked?1:0,On=e=>e.checked?e.value:null,kn=e=>e.files&&e.files.length?e.getAttribute(`multiple`)===null?e.files[0]:e.files:null,An=(e,t)=>{let n=E();if(!n)return;let r=e=>{t.input===`select`?Mn(n,Pn(e),t):t.input===`radio`&&Nn(n,Pn(e),t)};y(t.inputOptions)||x(t.inputOptions)?(Cn(P()),b(t.inputOptions).then(t=>{e.hideLoading(),r(t)})):typeof t.inputOptions==`object`?r(t.inputOptions):m(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof t.inputOptions}`)},jn=(e,t)=>{let n=e.getInput();n&&(ve(n),b(t.inputValue).then(r=>{n.value=t.input===`number`?`${parseFloat(r)||0}`:`${r}`,_e(n),n.focus(),e.hideLoading()}).catch(t=>{m(`Error in inputValue promise: ${t}`),n.value=``,_e(n),n.focus(),e.hideLoading()}))};function Mn(e,t,n){let r=he(e,l.select);if(!r)return;let i=(e,t,r)=>{let i=document.createElement(`option`);i.value=r,ce(i,t),i.selected=Fn(r,n.inputValue),e.appendChild(i)};t.forEach(e=>{let t=e[0],n=e[1];if(Array.isArray(n)){let e=document.createElement(`optgroup`);e.label=t,e.disabled=!1,r.appendChild(e),n.forEach(t=>i(e,t[1],t[0]))}else i(r,n,t)}),r.focus()}function Nn(e,t,n){let r=he(e,l.radio);if(!r)return;t.forEach(e=>{let t=e[0],i=e[1],a=document.createElement(`input`),o=document.createElement(`label`);a.type=`radio`,a.name=l.radio,a.value=t,Fn(t,n.inputValue)&&(a.checked=!0);let s=document.createElement(`span`);ce(s,i),s.className=l.label,o.appendChild(a),o.appendChild(s),r.appendChild(o)});let i=r.querySelectorAll(`input`);i.length&&i[0].focus()}let Pn=e=>(e instanceof Map?Array.from(e):Object.entries(e)).map(([e,t])=>[e,typeof t==`object`?Pn(t):t]),Fn=(e,t)=>!!t&&t!=null&&t.toString()===e.toString(),In=e=>{let t=Ze.innerParams.get(e);e.disableButtons(),t.input?zn(e,`confirm`):Wn(e,!0)},Ln=e=>{let t=Ze.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?zn(e,`deny`):Vn(e,!1)},Rn=(e,t)=>{e.disableButtons(),t(Vt.cancel)},zn=(e,t)=>{let n=Ze.innerParams.get(e);if(!n.input){m(`The "input" parameter is needed to be set when using returnInputValueOn${f(t)}`);return}let r=e.getInput(),i=En(e,n);n.inputValidator?Bn(e,i,t):r&&!r.checkValidity()?(e.enableButtons(),e.showValidationMessage(n.validationMessage||r.validationMessage)):t===`deny`?Vn(e,i):Wn(e,i)},Bn=(e,t,n)=>{let r=Ze.innerParams.get(e);e.disableInput(),Promise.resolve().then(()=>b(r.inputValidator(t,r.validationMessage))).then(r=>{e.enableButtons(),e.enableInput(),r?e.showValidationMessage(r):n===`deny`?Vn(e,t):Wn(e,t)})},Vn=(e,t)=>{let n=Ze.innerParams.get(e);n.showLoaderOnDeny&&Cn(I()),n.preDeny?(e.isAwaitingPromise=!0,Promise.resolve().then(()=>b(n.preDeny(t,n.validationMessage))).then(n=>{n===!1?(e.hideLoading(),vn(e)):e.close({isDenied:!0,value:n===void 0?t:n})}).catch(t=>Un(e,t))):e.close({isDenied:!0,value:t})},Hn=(e,t)=>{e.close({isConfirmed:!0,value:t})},Un=(e,t)=>{e.rejectPromise(t)},Wn=(e,t)=>{let n=Ze.innerParams.get(e);n.showLoaderOnConfirm&&Cn(),n.preConfirm?(e.resetValidationMessage(),e.isAwaitingPromise=!0,Promise.resolve().then(()=>b(n.preConfirm(t,n.validationMessage))).then(n=>{Se(N())||n===!1?(e.hideLoading(),vn(e)):Hn(e,n===void 0?t:n)}).catch(t=>Un(e,t))):Hn(e,t)};function Gn(){let e=Ze.innerParams.get(this);if(!e)return;let t=Ze.domCache.get(this);ve(t.loader),oe()?e.icon&&_e(D()):Kn(t),me([t.popup,t.actions],l.loading),t.popup.removeAttribute(`aria-busy`),t.popup.removeAttribute(`data-loading`),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1;let n=Ze.focusedElement.get(this);n instanceof HTMLElement&&document.activeElement===document.body&&n.focus(),Ze.focusedElement.delete(this)}let Kn=e=>{let t=e.loader.getAttribute(`data-button-to-replace`),n=t?e.popup.getElementsByClassName(t):[];n.length?_e(n[0],`inline-block`):Ce()&&ve(e.actions)};function qn(){let e=Ze.innerParams.get(this),t=Ze.domCache.get(this);return t?ue(t.popup,e.input):null}function Jn(e,t,n){let r=Ze.domCache.get(e);t.forEach(e=>{r[e].disabled=n})}function Yn(e,t){let n=E();if(!(!n||!e))if(e.type===`radio`){let e=n.querySelectorAll(`[name="${l.radio}"]`);for(let n=0;n<e.length;n++)e[n].disabled=t}else e.disabled=t}function Xn(){Jn(this,[`confirmButton`,`denyButton`,`cancelButton`],!1);let e=Ze.focusedElement.get(this);e instanceof HTMLElement&&document.activeElement===document.body&&e.focus(),Ze.focusedElement.delete(this)}function Zn(){Ze.focusedElement.set(this,document.activeElement),Jn(this,[`confirmButton`,`denyButton`,`cancelButton`],!0)}function Qn(){Yn(this.getInput(),!1)}function $n(){Yn(this.getInput(),!0)}function er(e){let t=Ze.domCache.get(this),n=Ze.innerParams.get(this);ce(t.validationMessage,e),t.validationMessage.className=l[`validation-message`],n.customClass&&n.customClass.validationMessage&&pe(t.validationMessage,n.customClass.validationMessage),_e(t.validationMessage);let r=this.getInput();r&&(r.setAttribute(`aria-invalid`,`true`),r.setAttribute(`aria-describedby`,l[`validation-message`]),de(r),pe(r,l.inputerror))}function tr(){let e=Ze.domCache.get(this);e.validationMessage&&ve(e.validationMessage);let t=this.getInput();t&&(t.removeAttribute(`aria-invalid`),t.removeAttribute(`aria-describedby`),me(t,l.inputerror))}let nr={title:``,titleText:``,text:``,html:``,footer:``,icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,draggable:!1,animation:!0,theme:`light`,showClass:{popup:`swal2-show`,backdrop:`swal2-backdrop-show`,icon:`swal2-icon-show`},hideClass:{popup:`swal2-hide`,backdrop:`swal2-backdrop-hide`,icon:`swal2-icon-hide`},customClass:{},target:`body`,color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:`OK`,confirmButtonAriaLabel:``,confirmButtonColor:void 0,denyButtonText:`No`,denyButtonAriaLabel:``,denyButtonColor:void 0,cancelButtonText:`Cancel`,cancelButtonAriaLabel:``,cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:`&times;`,closeButtonAriaLabel:`Close this dialog`,loaderHtml:``,showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:``,timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:``,inputLabel:``,inputValue:``,inputOptions:{},inputAutoFocus:!0,inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:`center`,progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0,topLayer:!1},rr=`allowEscapeKey.allowOutsideClick.background.buttonsStyling.cancelButtonAriaLabel.cancelButtonColor.cancelButtonText.closeButtonAriaLabel.closeButtonHtml.color.confirmButtonAriaLabel.confirmButtonColor.confirmButtonText.currentProgressStep.customClass.denyButtonAriaLabel.denyButtonColor.denyButtonText.didClose.didDestroy.draggable.footer.hideClass.html.icon.iconColor.iconHtml.imageAlt.imageHeight.imageUrl.imageWidth.preConfirm.preDeny.progressSteps.returnFocus.reverseButtons.showCancelButton.showCloseButton.showConfirmButton.showDenyButton.text.title.titleText.theme.willClose`.split(`.`),ir={allowEnterKey:void 0},ar=[`allowOutsideClick`,`allowEnterKey`,`backdrop`,`draggable`,`focusConfirm`,`focusDeny`,`focusCancel`,`returnFocus`,`heightAuto`,`keydownListenerCapture`],or=e=>Object.prototype.hasOwnProperty.call(nr,e),sr=e=>rr.indexOf(e)!==-1,cr=e=>ir[e],lr=e=>{or(e)||p(`Unknown parameter "${e}"`)},ur=e=>{ar.includes(e)&&p(`The parameter "${e}" is incompatible with toasts`)},dr=e=>{let t=cr(e);t&&_(e,t)},fr=e=>{e.backdrop===!1&&e.allowOutsideClick&&p('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),e.theme&&![`light`,`dark`,`auto`,`minimal`,`borderless`,`bootstrap-4`,`bootstrap-4-light`,`bootstrap-4-dark`,`bootstrap-5`,`bootstrap-5-light`,`bootstrap-5-dark`,`material-ui`,`material-ui-light`,`material-ui-dark`,`embed-iframe`,`bulma`,`bulma-light`,`bulma-dark`].includes(e.theme)&&p(`Invalid theme "${e.theme}"`);for(let t in e)lr(t),e.toast&&ur(t),dr(t)};function pr(e){let t=C(),n=E(),r=Ze.innerParams.get(this);if(!n||z(n,r.hideClass.popup)){p(`You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.`);return}let i=mr(e),a=Object.assign({},r,i);fr(a),t&&(t.dataset.swal2Theme=a.theme),It(this,a),Ze.innerParams.set(this,a),Object.defineProperties(this,{params:{value:Object.assign({},this.params,e),writable:!1,enumerable:!0}})}let mr=e=>{let t={};return Object.keys(e).forEach(n=>{sr(n)?t[n]=e[n]:p(`Invalid parameter to update: ${n}`)}),t};function hr(){var e;let t=Ze.domCache.get(this),n=Ze.innerParams.get(this);if(!n){_r(this);return}t.popup&&a.swalCloseEventFinishedCallback&&(a.swalCloseEventFinishedCallback(),delete a.swalCloseEventFinishedCallback),typeof n.didDestroy==`function`&&n.didDestroy(),(e=a.eventEmitter)==null||e.emit(`didDestroy`),gr(this)}let gr=e=>{_r(e),delete e.params,delete a.keydownHandler,delete a.keydownTarget,delete a.currentInstance},_r=e=>{e.isAwaitingPromise?(vr(Ze,e),e.isAwaitingPromise=!0):(vr(Zt,e),vr(Ze,e),delete e.isAwaitingPromise,delete e.disableButtons,delete e.enableButtons,delete e.getInput,delete e.disableInput,delete e.enableInput,delete e.hideLoading,delete e.disableLoading,delete e.showValidationMessage,delete e.resetValidationMessage,delete e.close,delete e.closePopup,delete e.closeModal,delete e.closeToast,delete e.rejectPromise,delete e.update,delete e._destroy)},vr=(e,t)=>{for(let n in e)e[n].delete(t)};var yr=Object.freeze({__proto__:null,_destroy:hr,close:hn,closeModal:hn,closePopup:hn,closeToast:hn,disableButtons:Zn,disableInput:$n,disableLoading:Gn,enableButtons:Xn,enableInput:Qn,getInput:qn,handleAwaitingPromise:vn,hideLoading:Gn,rejectPromise:_n,resetValidationMessage:tr,showValidationMessage:er,update:pr});let br=(e,t,n)=>{e.toast?xr(e,t,n):(wr(t),Tr(t),Er(e,t,n))},xr=(e,t,n)=>{t.popup.onclick=()=>{e&&(Sr(e)||e.timer||e.input)||n(Vt.close)}},Sr=e=>!!(e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton),Cr=!1,wr=e=>{e.popup.onmousedown=()=>{e.container.onmouseup=function(t){e.container.onmouseup=()=>{},t.target===e.container&&(Cr=!0)}}},Tr=e=>{e.container.onmousedown=t=>{t.target===e.container&&t.preventDefault(),e.popup.onmouseup=function(t){e.popup.onmouseup=()=>{},(t.target===e.popup||t.target instanceof HTMLElement&&e.popup.contains(t.target))&&(Cr=!0)}}},Er=(e,t,n)=>{t.container.onclick=r=>{if(Cr){Cr=!1;return}r.target===t.container&&v(e.allowOutsideClick)&&n(Vt.backdrop)}},Dr=e=>typeof e==`object`&&!!e&&`jquery`in e,Or=e=>e instanceof Element||Dr(e),kr=e=>{let t={};return typeof e[0]==`object`&&!Or(e[0])?Object.assign(t,e[0]):[`title`,`html`,`icon`].forEach((n,r)=>{let i=e[r];typeof i==`string`||Or(i)?t[n]=i:i!==void 0&&m(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof i}`)}),t};function Ar(...e){return new this(...e)}function jr(e){class t extends this{_main(t,n){return super._main(t,Object.assign({},e,n))}}return t}let Mr=()=>a.timeout&&a.timeout.getTimerLeft(),Nr=()=>{if(a.timeout)return Oe(),a.timeout.stop()},Pr=()=>{if(a.timeout){let e=a.timeout.start();return De(e),e}},Fr=()=>{let e=a.timeout;return e&&(e.running?Nr():Pr())},Ir=e=>{if(a.timeout){let t=a.timeout.increase(e);return De(t,!0),t}},Lr=()=>!!(a.timeout&&a.timeout.isRunning()),Rr=!1,zr={};function Br(e=`data-swal-template`){zr[e]=this,Rr||=(document.body.addEventListener(`click`,Vr),!0)}let Vr=e=>{for(let t=e.target;t&&t!==document;t=t.parentNode)for(let e in zr){let n=t.getAttribute&&t.getAttribute(e);if(n){zr[e].fire({template:n});return}}};class Hr{constructor(){this.events={}}_getHandlersByEventName(e){return this.events[e]===void 0&&(this.events[e]=[]),this.events[e]}on(e,t){let n=this._getHandlersByEventName(e);n.includes(t)||n.push(t)}once(e,t){let n=(...r)=>{this.removeListener(e,n),t.apply(this,r)};this.on(e,n)}emit(e,...t){this._getHandlersByEventName(e).forEach(e=>{try{e.apply(this,t)}catch(e){console.error(e)}})}removeListener(e,t){let n=this._getHandlersByEventName(e),r=n.indexOf(t);r>-1&&n.splice(r,1)}removeAllListeners(e){this.events[e]!==void 0&&(this.events[e].length=0)}reset(){this.events={}}}a.eventEmitter=new Hr;var Ur=Object.freeze({__proto__:null,argsToParams:kr,bindClickHandler:Br,clickCancel:Bt,clickConfirm:Rt,clickDeny:zt,enableLoading:Cn,fire:Ar,getActions:ee,getCancelButton:F,getCloseButton:re,getConfirmButton:P,getContainer:C,getDenyButton:I,getFocusableElements:ie,getFooter:te,getHtmlContainer:A,getIcon:D,getIconContent:O,getImage:j,getInputLabel:L,getLoader:R,getPopup:E,getProgressSteps:M,getTimerLeft:Mr,getTimerProgressBar:ne,getTitle:k,getValidationMessage:N,increaseTimer:Ir,isDeprecatedParameter:cr,isLoading:se,isTimerRunning:Lr,isUpdatableParameter:sr,isValidParameter:or,isVisible:Lt,mixin:jr,off:(e,t)=>{if(a.eventEmitter){if(!e){a.eventEmitter.reset();return}t?a.eventEmitter.removeListener(e,t):a.eventEmitter.removeAllListeners(e)}},on:(e,t)=>{a.eventEmitter&&a.eventEmitter.on(e,t)},once:(e,t)=>{a.eventEmitter&&a.eventEmitter.once(e,t)},resumeTimer:Pr,showLoading:Cn,stopTimer:Nr,toggleTimer:Fr});class Wr{constructor(e,t){this.callback=e,this.remaining=t,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.started&&this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=new Date().getTime()-this.started.getTime()),this.remaining}increase(e){let t=this.running;return t&&this.stop(),this.remaining+=e,t&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}let Gr=[`swal-title`,`swal-html`,`swal-footer`],Kr=e=>{let t=typeof e.template==`string`?document.querySelector(e.template):e.template;if(!t)return{};let n=t.content;return ei(n),Object.assign(qr(n),Jr(n),Yr(n),Xr(n),Zr(n),Qr(n),$r(n,Gr))},qr=e=>{let t={};return Array.from(e.querySelectorAll(`swal-param`)).forEach(e=>{ti(e,[`name`,`value`]);let n=e.getAttribute(`name`),r=e.getAttribute(`value`);!n||!r||(n in nr&&typeof nr[n]==`boolean`?t[n]=r!==`false`:n in nr&&typeof nr[n]==`object`?t[n]=JSON.parse(r):t[n]=r)}),t},Jr=e=>{let t={};return Array.from(e.querySelectorAll(`swal-function-param`)).forEach(e=>{let n=e.getAttribute(`name`),r=e.getAttribute(`value`);!n||!r||(t[n]=Function(`return ${r}`)())}),t},Yr=e=>{let t={};return Array.from(e.querySelectorAll(`swal-button`)).forEach(e=>{ti(e,[`type`,`color`,`aria-label`]);let n=e.getAttribute(`type`);if(!n||![`confirm`,`cancel`,`deny`].includes(n))return;t[`${n}ButtonText`]=e.innerHTML,t[`show${f(n)}Button`]=!0;let r=e.getAttribute(`color`);r!==null&&(t[`${n}ButtonColor`]=r);let i=e.getAttribute(`aria-label`);i!==null&&(t[`${n}ButtonAriaLabel`]=i)}),t},Xr=e=>{let t={},n=e.querySelector(`swal-image`);if(n){ti(n,[`src`,`width`,`height`,`alt`]);let e=n.getAttribute(`src`);e!==null&&(t.imageUrl=e||void 0);let r=n.getAttribute(`width`);r!==null&&(t.imageWidth=r||void 0);let i=n.getAttribute(`height`);i!==null&&(t.imageHeight=i||void 0);let a=n.getAttribute(`alt`);a!==null&&(t.imageAlt=a||void 0)}return t},Zr=e=>{let t={},n=e.querySelector(`swal-icon`);return n&&(ti(n,[`type`,`color`]),n.hasAttribute(`type`)&&(t.icon=n.getAttribute(`type`)),n.hasAttribute(`color`)&&(t.iconColor=n.getAttribute(`color`)),t.iconHtml=n.innerHTML),t},Qr=e=>{let t={},n=e.querySelector(`swal-input`);n&&(ti(n,[`type`,`label`,`placeholder`,`value`]),t.input=n.getAttribute(`type`)||`text`,n.hasAttribute(`label`)&&(t.inputLabel=n.getAttribute(`label`)),n.hasAttribute(`placeholder`)&&(t.inputPlaceholder=n.getAttribute(`placeholder`)),n.hasAttribute(`value`)&&(t.inputValue=n.getAttribute(`value`)));let r=Array.from(e.querySelectorAll(`swal-input-option`));return r.length&&(t.inputOptions={},r.forEach(e=>{ti(e,[`value`]);let n=e.getAttribute(`value`);if(!n)return;let r=e.innerHTML;t.inputOptions[n]=r})),t},$r=(e,t)=>{let n={};for(let r in t){let i=t[r],a=e.querySelector(i);a&&(ti(a,[]),n[i.replace(/^swal-/,``)]=a.innerHTML.trim())}return n},ei=e=>{let t=Gr.concat([`swal-param`,`swal-function-param`,`swal-button`,`swal-image`,`swal-icon`,`swal-input`,`swal-input-option`]);Array.from(e.children).forEach(e=>{let n=e.tagName.toLowerCase();t.includes(n)||p(`Unrecognized element <${n}>`)})},ti=(e,t)=>{Array.from(e.attributes).forEach(n=>{t.indexOf(n.name)===-1&&p([`Unrecognized attribute "${n.name}" on <${e.tagName.toLowerCase()}>.`,`${t.length?`Allowed attributes are: ${t.join(`, `)}`:`To set the value, use HTML within the element.`}`])})},ni=e=>{var t,n;let r=C(),i=E();if(!r||!i)return;typeof e.willOpen==`function`&&e.willOpen(i),(t=a.eventEmitter)==null||t.emit(`willOpen`,i);let o=window.getComputedStyle(document.body).overflowY;if(oi(r,i,e),setTimeout(()=>{ii(r,i)},10),ae()&&(ai(r,e.scrollbarPadding===void 0?!1:e.scrollbarPadding,o),Qt()),tn&&e.backdrop===!1&&i.scrollHeight>r.clientHeight&&(r.style.pointerEvents=`auto`),!oe()&&!a.previousActiveElement&&(a.previousActiveElement=document.activeElement),typeof e.didOpen==`function`){let t=e.didOpen;setTimeout(()=>t(i))}(n=a.eventEmitter)==null||n.emit(`didOpen`,i)},ri=e=>{let t=E();if(!t||e.target!==t)return;let n=C();n&&(t.removeEventListener(`animationend`,ri),t.removeEventListener(`transitionend`,ri),n.style.overflowY=`auto`,me(n,l[`no-transition`]))},ii=(e,t)=>{Ee(t)?(e.style.overflowY=`hidden`,t.addEventListener(`animationend`,ri),t.addEventListener(`transitionend`,ri)):e.style.overflowY=`auto`},ai=(e,t,n)=>{nn(),t&&n!==`hidden`&&dn(n),setTimeout(()=>{e.scrollTop=0})},oi=(e,t,n)=>{var r;(r=n.showClass)!=null&&r.backdrop&&pe(e,n.showClass.backdrop),n.animation?(t.style.setProperty(`opacity`,`0`,`important`),_e(t,`grid`),setTimeout(()=>{var e;(e=n.showClass)!=null&&e.popup&&pe(t,n.showClass.popup),t.style.removeProperty(`opacity`)},10)):_e(t,`grid`),pe([document.documentElement,document.body],l.shown),n.heightAuto&&n.backdrop&&!n.toast&&pe([document.documentElement,document.body],l[`height-auto`])};var si={email:(e,t)=>/^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(e)?Promise.resolve():Promise.resolve(t||`Invalid email address`),url:(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||`Invalid URL`)};function ci(e){e.inputValidator||(e.input===`email`&&(e.inputValidator=si.email),e.input===`url`&&(e.inputValidator=si.url))}function li(e){(!e.target||typeof e.target==`string`&&!document.querySelector(e.target)||typeof e.target!=`string`&&!e.target.appendChild)&&(p(`Target parameter is not valid, defaulting to "body"`),e.target=`body`)}function ui(e){ci(e),e.showLoaderOnConfirm&&!e.preConfirm&&p(`showLoaderOnConfirm is set to true, but preConfirm is not defined.
115
- showLoaderOnConfirm should be used together with preConfirm, see usage example:
116
- https://sweetalert2.github.io/#ajax-request`),li(e),typeof e.title==`string`&&(e.title=e.title.split(`
117
- `).join(`<br />`)),Le(e)}let di;var fi=new WeakMap;class pi{constructor(...e){r(this,fi,Promise.resolve({isConfirmed:!1,isDenied:!1,isDismissed:!0})),!(typeof window>`u`)&&(di=this,this.params=Object.freeze(this.constructor.argsToParams(e)),this.isAwaitingPromise=!1,i(fi,this,this._main(di.params)))}_main(e,t={}){if(fr(Object.assign({},t,e)),a.currentInstance){let e=Zt.swalPromiseResolve.get(a.currentInstance),{isAwaitingPromise:t}=a.currentInstance;a.currentInstance._destroy(),t||e({isDismissed:!0}),ae()&&$t()}a.currentInstance=di;let n=hi(e,t);ui(n),Object.freeze(n),a.timeout&&(a.timeout.stop(),delete a.timeout),clearTimeout(a.restoreFocusTimeout);let r=gi(di);return It(di,n),Ze.innerParams.set(di,n),mi(di,r,n)}then(e){return n(fi,this).then(e)}finally(e){return n(fi,this).finally(e)}}let mi=(e,t,n)=>new Promise((r,i)=>{let o=t=>{e.close({isDismissed:!0,dismiss:t,isConfirmed:!1,isDenied:!1})};Zt.swalPromiseResolve.set(e,r),Zt.swalPromiseReject.set(e,i),t.confirmButton.onclick=()=>{In(e)},t.denyButton.onclick=()=>{Ln(e)},t.cancelButton.onclick=()=>{Rn(e,o)},t.closeButton.onclick=()=>{o(Vt.close)},br(n,t,o),Ut(a,n,o),Tn(e,n),ni(n),_i(a,n,o),vi(t,n),setTimeout(()=>{t.container.scrollTop=0})}),hi=(e,t)=>{let n=Kr(e),r=Object.assign({},nr,t,n,e);return r.showClass=Object.assign({},nr.showClass,r.showClass),r.hideClass=Object.assign({},nr.hideClass,r.hideClass),r.animation===!1&&(r.showClass={backdrop:`swal2-noanimation`},r.hideClass={}),r},gi=e=>{let t={popup:E(),container:C(),actions:ee(),confirmButton:P(),denyButton:I(),cancelButton:F(),loader:R(),closeButton:re(),validationMessage:N(),progressSteps:M()};return Ze.domCache.set(e,t),t},_i=(e,t,n)=>{let r=ne();ve(r),t.timer&&(e.timeout=new Wr(()=>{n(`timer`),delete e.timeout},t.timer),t.timerProgressBar&&r&&(_e(r),B(r,t,`timerProgressBar`),setTimeout(()=>{e.timeout&&e.timeout.running&&De(t.timer)})))},vi=(e,t)=>{if(!t.toast){if(!v(t.allowEnterKey)){_(`allowEnterKey`,`preConfirm: () => false`),e.popup.focus();return}yi(e)||bi(e,t)||Wt(-1,1)}},yi=e=>{let t=Array.from(e.popup.querySelectorAll(`[autofocus]`));for(let e of t)if(e instanceof HTMLElement&&Se(e))return e.focus(),!0;return!1},bi=(e,t)=>t.focusDeny&&Se(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&Se(e.cancelButton)?(e.cancelButton.focus(),!0):t.focusConfirm&&Se(e.confirmButton)?(e.confirmButton.focus(),!0):!1;pi.prototype.disableButtons=Zn,pi.prototype.enableButtons=Xn,pi.prototype.getInput=qn,pi.prototype.disableInput=$n,pi.prototype.enableInput=Qn,pi.prototype.hideLoading=Gn,pi.prototype.disableLoading=Gn,pi.prototype.showValidationMessage=er,pi.prototype.resetValidationMessage=tr,pi.prototype.close=hn,pi.prototype.closePopup=hn,pi.prototype.closeModal=hn,pi.prototype.closeToast=hn,pi.prototype.rejectPromise=_n,pi.prototype.update=pr,pi.prototype._destroy=hr,Object.assign(pi,Ur),Object.keys(yr).forEach(e=>{pi[e]=function(...t){if(di&&di[e])return di[e](...t)}}),pi.DismissReason=Vt,pi.version=`11.26.24`;let xi=pi;return xi.default=xi,xi})),e!==void 0&&e.Sweetalert2&&(e.swal=e.sweetAlert=e.Swal=e.SweetAlert=e.Sweetalert2),typeof document<`u`&&function(e,t){var n=e.createElement(`style`);if(e.getElementsByTagName(`head`)[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch{n.innerText=t}}(document,`:root{--swal2-outline: 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-container-padding: 0.625em;--swal2-backdrop: rgba(0, 0, 0, 0.4);--swal2-backdrop-transition: background-color 0.15s;--swal2-width: 32em;--swal2-padding: 0 0 1.25em;--swal2-border: none;--swal2-border-radius: 0.3125rem;--swal2-background: white;--swal2-color: #545454;--swal2-show-animation: swal2-show 0.3s;--swal2-hide-animation: swal2-hide 0.15s forwards;--swal2-icon-zoom: 1;--swal2-icon-animations: true;--swal2-title-padding: 0.8em 1em 0;--swal2-html-container-padding: 1em 1.6em 0.3em;--swal2-input-border: 1px solid #d9d9d9;--swal2-input-border-radius: 0.1875em;--swal2-input-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-background: transparent;--swal2-input-transition: border-color 0.2s, box-shadow 0.2s;--swal2-input-hover-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-focus-border: 1px solid #b4dbed;--swal2-input-focus-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-progress-step-background: #add8e6;--swal2-validation-message-background: #f0f0f0;--swal2-validation-message-color: #666;--swal2-footer-border-color: #eee;--swal2-footer-background: transparent;--swal2-footer-color: inherit;--swal2-timer-progress-bar-background: rgba(0, 0, 0, 0.3);--swal2-close-button-position: initial;--swal2-close-button-inset: auto;--swal2-close-button-font-size: 2.5em;--swal2-close-button-color: #ccc;--swal2-close-button-transition: color 0.2s, box-shadow 0.2s;--swal2-close-button-outline: initial;--swal2-close-button-box-shadow: inset 0 0 0 3px transparent;--swal2-close-button-focus-box-shadow: inset var(--swal2-outline);--swal2-close-button-hover-transform: none;--swal2-actions-justify-content: center;--swal2-actions-width: auto;--swal2-actions-margin: 1.25em auto 0;--swal2-actions-padding: 0;--swal2-actions-border-radius: 0;--swal2-actions-background: transparent;--swal2-action-button-transition: background-color 0.2s, box-shadow 0.2s;--swal2-action-button-hover: black 10%;--swal2-action-button-active: black 10%;--swal2-confirm-button-box-shadow: none;--swal2-confirm-button-border-radius: 0.25em;--swal2-confirm-button-background-color: #7066e0;--swal2-confirm-button-color: #fff;--swal2-deny-button-box-shadow: none;--swal2-deny-button-border-radius: 0.25em;--swal2-deny-button-background-color: #dc3741;--swal2-deny-button-color: #fff;--swal2-cancel-button-box-shadow: none;--swal2-cancel-button-border-radius: 0.25em;--swal2-cancel-button-background-color: #6e7881;--swal2-cancel-button-color: #fff;--swal2-toast-show-animation: swal2-toast-show 0.5s;--swal2-toast-hide-animation: swal2-toast-hide 0.1s forwards;--swal2-toast-border: none;--swal2-toast-box-shadow: 0 0 1px hsl(0deg 0% 0% / 0.075), 0 1px 2px hsl(0deg 0% 0% / 0.075), 1px 2px 4px hsl(0deg 0% 0% / 0.075), 1px 3px 8px hsl(0deg 0% 0% / 0.075), 2px 4px 16px hsl(0deg 0% 0% / 0.075)}[data-swal2-theme=dark]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white);--swal2-timer-progress-bar-background: rgba(255, 255, 255, 0.7)}@media(prefers-color-scheme: dark){[data-swal2-theme=auto]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white);--swal2-timer-progress-bar-background: rgba(255, 255, 255, 0.7)}}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:auto}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px var(--swal2-backdrop)}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}@media print{body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown) .swal2-container{position:static !important}}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:var(--swal2-container-padding);overflow-x:hidden;transition:var(--swal2-backdrop-transition);-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:var(--swal2-backdrop)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container)[popover]{width:auto;border:0}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:var(--swal2-width);max-width:100%;padding:var(--swal2-padding);border:var(--swal2-border);border-radius:var(--swal2-border-radius);background:var(--swal2-background);color:var(--swal2-color);font-family:inherit;font-size:1rem;container-name:swal2-popup}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable{cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable div:where(.swal2-icon){cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging{cursor:grabbing}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging div:where(.swal2-icon){cursor:grabbing}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:var(--swal2-title-padding);color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;overflow-wrap:break-word;cursor:initial}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:var(--swal2-actions-justify-content);width:var(--swal2-actions-width);margin:var(--swal2-actions-margin);padding:var(--swal2-actions-padding);border-radius:var(--swal2-actions-border-radius);background:var(--swal2-actions-background)}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:var(--swal2-action-button-transition);border:none;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm){border-radius:var(--swal2-confirm-button-border-radius);background:initial;background-color:var(--swal2-confirm-button-background-color);box-shadow:var(--swal2-confirm-button-box-shadow);color:var(--swal2-confirm-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):hover{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):active{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny){border-radius:var(--swal2-deny-button-border-radius);background:initial;background-color:var(--swal2-deny-button-background-color);box-shadow:var(--swal2-deny-button-box-shadow);color:var(--swal2-deny-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):hover{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):active{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel){border-radius:var(--swal2-cancel-button-border-radius);background:initial;background-color:var(--swal2-cancel-button-background-color);box-shadow:var(--swal2-cancel-button-box-shadow);color:var(--swal2-cancel-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):hover{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):active{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none;box-shadow:var(--swal2-action-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-styled)[disabled]:not(.swal2-loading){opacity:.4}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid var(--swal2-footer-border-color);background:var(--swal2-footer-background);color:var(--swal2-footer-color);font-size:1em;text-align:center;cursor:initial}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:var(--swal2-border-radius);border-bottom-left-radius:var(--swal2-border-radius)}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:var(--swal2-timer-progress-bar-background)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em;cursor:initial}div:where(.swal2-container) button:where(.swal2-close){position:var(--swal2-close-button-position);inset:var(--swal2-close-button-inset);z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:var(--swal2-close-button-transition);border:none;border-radius:var(--swal2-border-radius);outline:var(--swal2-close-button-outline);background:rgba(0,0,0,0);color:var(--swal2-close-button-color);font-family:monospace;font-size:var(--swal2-close-button-font-size);cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:var(--swal2-close-button-hover-transform);background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:var(--swal2-close-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-html-container){z-index:1;justify-content:center;margin:0;padding:var(--swal2-html-container-padding);overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;overflow-wrap:break-word;word-break:break-word;cursor:initial}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:var(--swal2-input-transition);border:var(--swal2-input-border);border-radius:var(--swal2-input-border-radius);background:var(--swal2-input-background);box-shadow:var(--swal2-input-box-shadow);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):hover,div:where(.swal2-container) input:where(.swal2-file):hover,div:where(.swal2-container) textarea:where(.swal2-textarea):hover{box-shadow:var(--swal2-input-hover-box-shadow)}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:var(--swal2-input-focus-border);outline:none;box-shadow:var(--swal2-input-focus-box-shadow)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:var(--swal2-background)}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:var(--swal2-input-background);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:var(--swal2-input-background);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:var(--swal2-background);color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:var(--swal2-validation-message-background);color:var(--swal2-validation-message-color);font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:var(--swal2-progress-step-background);color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:var(--swal2-progress-step-background)}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;zoom:var(--swal2-icon-zoom);border:.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}}div:where(.swal2-icon).swal2-warning{border-color:#f8bb86;color:#f8bb86}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}}div:where(.swal2-icon).swal2-info{border-color:#3fc3ee;color:#3fc3ee}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}}div:where(.swal2-icon).swal2-question{border-color:#87adbd;color:#87adbd}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:var(--swal2-show-animation)}.swal2-hide{animation:var(--swal2-hide-animation)}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;border:var(--swal2-toast-border);background:var(--swal2-background);box-shadow:var(--swal2-toast-box-shadow);pointer-events:auto}.swal2-toast>*{grid-column:2}.swal2-toast h2:where(.swal2-title){margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-toast .swal2-loading{justify-content:center}.swal2-toast input:where(.swal2-input){height:2em;margin:.5em;font-size:1em}.swal2-toast .swal2-validation-message{font-size:1em}.swal2-toast div:where(.swal2-footer){margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-toast button:where(.swal2-close){grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-toast div:where(.swal2-html-container){margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-toast div:where(.swal2-html-container):empty{padding:0}.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-toast div:where(.swal2-actions){justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-toast button:where(.swal2-styled){margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}@container swal2-popup style(--swal2-icon-animations:true){.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}}.swal2-toast.swal2-show{animation:var(--swal2-toast-show-animation)}.swal2-toast.swal2-hide{animation:var(--swal2-toast-hide-animation)}@keyframes swal2-show{0%{transform:translate3d(0, -50px, 0) scale(0.9);opacity:0}100%{transform:translate3d(0, 0, 0) scale(1);opacity:1}}@keyframes swal2-hide{0%{transform:translate3d(0, 0, 0) scale(1);opacity:1}100%{transform:translate3d(0, -50px, 0) scale(0.9);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}`)}))(),1),yg=vg.default.mixin({customClass:{confirmButton:`bg-primary text-primary-foreground hover:bg-primary/90 px-4 py-2 rounded-md font-medium transition-colors outline-none`,cancelButton:`bg-destructive text-destructive-foreground hover:bg-destructive/90 px-4 py-2 rounded-md font-medium transition-colors outline-none`,popup:`rounded-lg border border-border bg-card text-card-foreground shadow-lg overflow-hidden`,title:`text-foreground font-bold text-xl`,htmlContainer:`text-muted-foreground text-base`},buttonsStyling:!1,background:`hsl(var(--card))`,color:`hsl(var(--foreground))`}),bg=vg.default.mixin({toast:!0,position:`top-end`,showConfirmButton:!1,timer:3e3,timerProgressBar:!0,background:`hsl(var(--card))`,color:`hsl(var(--foreground))`,didOpen:e=>{e.onmouseenter=vg.default.stopTimer,e.onmouseleave=vg.default.resumeTimer}}),Xte=Qh(),Zte=e=>new Promise(t=>setTimeout(t,e));async function K(e,t={}){let{method:n=`GET`,body:r,headers:i={},requireAuth:a=!0,showLoader:o=!1,showError:s=!0,showSuccess:c=!1}=t;if(o){let e=typeof o==`string`?o:`Procesando...`;gg.getState().showLoader(e)}let l=typeof window<`u`?localStorage.getItem(`hive-auth-token`):null;console.log(`[API] ${n} ${e}`,{hasToken:!!l,tokenPreview:l?l.slice(0,20)+`...`:null,requireAuth:a});let u={method:n,headers:{"Content-Type":`application/json`,Accept:`application/json`,...a&&l?{Authorization:`Bearer ${l}`}:{},...i},body:r?JSON.stringify(r):void 0},d=null;for(let t=0;t<=3;t++)try{d=await fetch(`${Xte}${e}`,u);break}catch(n){if(t<3)console.warn(`[API] Network error on ${e}, retrying in ${(t+1)*2}s…`),await Zte((t+1)*2e3);else throw o&&gg.getState().hideLoader(),n}if(d=d,o&&gg.getState().hideLoader(),!d.ok){if(d.status===401&&typeof window<`u`&&!e.startsWith(`/api/auth/`)&&window.location.pathname!==`/login`)throw localStorage.removeItem(`hive-auth-token`),window.location.href=`/login`,Error(`No autorizado`);if(d.status===503)throw Error(`API Error: 503 Service Unavailable`);let t=`API Error: ${d.status} ${d.statusText}`;try{let e=await d.json();(e.message||e.error)&&(t=e.message||e.error)}catch{}throw s&&yg.fire({title:`Error de Sistema`,text:t,icon:`error`}),Error(t)}let f=await d.json();if(c){let e=`Operación exitosa`;typeof c==`function`?e=c(f):typeof c==`string`&&(e=c),e!==!1&&yg.fire({toast:!0,position:`top-end`,icon:`success`,title:typeof e==`string`?e:`Operación exitosa`,showConfirmButton:!1,timer:3e3,timerProgressBar:!0})}return f}var xg=Gh((e,t)=>({isLoading:!1,currentUser:null,error:null,setLoading:t=>e({isLoading:t}),setError:t=>e({error:t}),fetchUser:async()=>{e({isLoading:!0,error:null});try{let t=((await K(`/api/users`)).users||[])[0]||null;return e({currentUser:t,isLoading:!1}),t}catch(t){return e({isLoading:!1,error:t instanceof Error?t.message:`Failed to fetch user profile`}),null}},saveUser:async n=>{let r=t().currentUser;if(!r)throw Error(`No user to update`);e({isLoading:!0,error:null});try{let t=await K(`/api/users`,{method:`POST`,body:{...r,...n,id:r.id}});return e({currentUser:{...r,...n},isLoading:!1}),t.message||`Perfil guardado correctamente`}catch(t){throw e({isLoading:!1,error:t instanceof Error?t.message:`Failed to save user profile`}),t}}})),Qte=jee;function $te(){let{connect:e}=tg(),{currentUser:t,fetchUser:n}=xg();return(0,_.useEffect)(()=>{n()},[n]),(0,_.useEffect)(()=>{t?.id&&e(t.id)},[e,t?.id]),(0,I.jsxs)(gh,{children:[(0,I.jsx)(Jte,{}),(0,I.jsxs)(bh,{className:`bg-background relative overflow-hidden`,children:[(0,I.jsx)(`div`,{className:`hive-glow-blob hive-glow-blob--blue -top-20 -left-20 h-[500px] w-[500px] opacity-20`}),(0,I.jsx)(`div`,{className:`hive-glow-blob hive-glow-blob--purple -bottom-20 -right-20 h-[500px] w-[500px] opacity-20`}),(0,I.jsxs)(`div`,{className:`flex flex-1 flex-col overflow-hidden relative z-10`,children:[(0,I.jsx)(Lte,{}),(0,I.jsx)(`main`,{className:`hive-page flex-1 min-h-0 p-4 animate-fade-in flex flex-col overflow-auto`,children:(0,I.jsx)(Qte,{})})]})]})]})}var Sg=o(((e,t)=>{t.exports=Array.isArray})),Cg=o(((e,t)=>{t.exports=typeof global==`object`&&global&&global.Object===Object&&global})),wg=o(((e,t)=>{var n=Cg(),r=typeof self==`object`&&self&&self.Object===Object&&self;t.exports=n||r||Function(`return this`)()})),Tg=o(((e,t)=>{t.exports=wg().Symbol})),ene=o(((e,t)=>{var n=Tg(),r=Object.prototype,i=r.hasOwnProperty,a=r.toString,o=n?n.toStringTag:void 0;function s(e){var t=i.call(e,o),n=e[o];try{e[o]=void 0;var r=!0}catch{}var s=a.call(e);return r&&(t?e[o]=n:delete e[o]),s}t.exports=s})),tne=o(((e,t)=>{var n=Object.prototype.toString;function r(e){return n.call(e)}t.exports=r})),Eg=o(((e,t)=>{var n=Tg(),r=ene(),i=tne(),a=`[object Null]`,o=`[object Undefined]`,s=n?n.toStringTag:void 0;function c(e){return e==null?e===void 0?o:a:s&&s in Object(e)?r(e):i(e)}t.exports=c})),Dg=o(((e,t)=>{function n(e){return typeof e==`object`&&!!e}t.exports=n})),Og=o(((e,t)=>{var n=Eg(),r=Dg(),i=`[object Symbol]`;function a(e){return typeof e==`symbol`||r(e)&&n(e)==i}t.exports=a})),kg=o(((e,t)=>{var n=Sg(),r=Og(),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;function o(e,t){if(n(e))return!1;var o=typeof e;return o==`number`||o==`symbol`||o==`boolean`||e==null||r(e)?!0:a.test(e)||!i.test(e)||t!=null&&e in Object(t)}t.exports=o})),Ag=o(((e,t)=>{function n(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}t.exports=n})),jg=o(((e,t)=>{var n=Eg(),r=Ag(),i=`[object AsyncFunction]`,a=`[object Function]`,o=`[object GeneratorFunction]`,s=`[object Proxy]`;function c(e){if(!r(e))return!1;var t=n(e);return t==a||t==o||t==i||t==s}t.exports=c})),nne=o(((e,t)=>{t.exports=wg()[`__core-js_shared__`]})),rne=o(((e,t)=>{var n=nne(),r=function(){var e=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function i(e){return!!r&&r in e}t.exports=i})),Mg=o(((e,t)=>{var n=Function.prototype.toString;function r(e){if(e!=null){try{return n.call(e)}catch{}try{return e+``}catch{}}return``}t.exports=r})),ine=o(((e,t)=>{var n=jg(),r=rne(),i=Ag(),a=Mg(),o=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,d=l.hasOwnProperty,f=RegExp(`^`+u.call(d).replace(o,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function p(e){return!i(e)||r(e)?!1:(n(e)?f:s).test(a(e))}t.exports=p})),ane=o(((e,t)=>{function n(e,t){return e?.[t]}t.exports=n})),Ng=o(((e,t)=>{var n=ine(),r=ane();function i(e,t){var i=r(e,t);return n(i)?i:void 0}t.exports=i})),Pg=o(((e,t)=>{t.exports=Ng()(Object,`create`)})),one=o(((e,t)=>{var n=Pg();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r})),sne=o(((e,t)=>{function n(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}t.exports=n})),cne=o(((e,t)=>{var n=Pg(),r=`__lodash_hash_undefined__`,i=Object.prototype.hasOwnProperty;function a(e){var t=this.__data__;if(n){var a=t[e];return a===r?void 0:a}return i.call(t,e)?t[e]:void 0}t.exports=a})),lne=o(((e,t)=>{var n=Pg(),r=Object.prototype.hasOwnProperty;function i(e){var t=this.__data__;return n?t[e]!==void 0:r.call(t,e)}t.exports=i})),une=o(((e,t)=>{var n=Pg(),r=`__lodash_hash_undefined__`;function i(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=n&&t===void 0?r:t,this}t.exports=i})),dne=o(((e,t)=>{var n=one(),r=sne(),i=cne(),a=lne(),o=une();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),fne=o(((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n})),Fg=o(((e,t)=>{function n(e,t){return e===t||e!==e&&t!==t}t.exports=n})),Ig=o(((e,t)=>{var n=Fg();function r(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}t.exports=r})),pne=o(((e,t)=>{var n=Ig(),r=Array.prototype.splice;function i(e){var t=this.__data__,i=n(t,e);return i<0?!1:(i==t.length-1?t.pop():r.call(t,i,1),--this.size,!0)}t.exports=i})),mne=o(((e,t)=>{var n=Ig();function r(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}t.exports=r})),hne=o(((e,t)=>{var n=Ig();function r(e){return n(this.__data__,e)>-1}t.exports=r})),gne=o(((e,t)=>{var n=Ig();function r(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}t.exports=r})),Lg=o(((e,t)=>{var n=fne(),r=pne(),i=mne(),a=hne(),o=gne();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),Rg=o(((e,t)=>{t.exports=Ng()(wg(),`Map`)})),_ne=o(((e,t)=>{var n=dne(),r=Lg(),i=Rg();function a(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=a})),vne=o(((e,t)=>{function n(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}t.exports=n})),zg=o(((e,t)=>{var n=vne();function r(e,t){var r=e.__data__;return n(t)?r[typeof t==`string`?`string`:`hash`]:r.map}t.exports=r})),yne=o(((e,t)=>{var n=zg();function r(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}t.exports=r})),bne=o(((e,t)=>{var n=zg();function r(e){return n(this,e).get(e)}t.exports=r})),xne=o(((e,t)=>{var n=zg();function r(e){return n(this,e).has(e)}t.exports=r})),Sne=o(((e,t)=>{var n=zg();function r(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}t.exports=r})),Bg=o(((e,t)=>{var n=_ne(),r=yne(),i=bne(),a=xne(),o=Sne();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),Vg=o(((e,t)=>{var n=Bg(),r=`Expected a function`;function i(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(r);var a=function(){var n=arguments,r=t?t.apply(this,n):n[0],i=a.cache;if(i.has(r))return i.get(r);var o=e.apply(this,n);return a.cache=i.set(r,o)||i,o};return a.cache=new(i.Cache||n),a}i.Cache=n,t.exports=i})),Cne=o(((e,t)=>{var n=Vg(),r=500;function i(e){var t=n(e,function(e){return i.size===r&&i.clear(),e}),i=t.cache;return t}t.exports=i})),wne=o(((e,t)=>{var n=Cne(),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g;t.exports=n(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(r,function(e,n,r,a){t.push(r?a.replace(i,`$1`):n||e)}),t})})),Hg=o(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}t.exports=n})),Tne=o(((e,t)=>{var n=Tg(),r=Hg(),i=Sg(),a=Og(),o=1/0,s=n?n.prototype:void 0,c=s?s.toString:void 0;function l(e){if(typeof e==`string`)return e;if(i(e))return r(e,l)+``;if(a(e))return c?c.call(e):``;var t=e+``;return t==`0`&&1/e==-o?`-0`:t}t.exports=l})),Ug=o(((e,t)=>{var n=Tne();function r(e){return e==null?``:n(e)}t.exports=r})),Wg=o(((e,t)=>{var n=Sg(),r=kg(),i=wne(),a=Ug();function o(e,t){return n(e)?e:r(e,t)?[e]:i(a(e))}t.exports=o})),Gg=o(((e,t)=>{var n=Og(),r=1/0;function i(e){if(typeof e==`string`||n(e))return e;var t=e+``;return t==`0`&&1/e==-r?`-0`:t}t.exports=i})),Kg=o(((e,t)=>{var n=Wg(),r=Gg();function i(e,t){t=n(t,e);for(var i=0,a=t.length;e!=null&&i<a;)e=e[r(t[i++])];return i&&i==a?e:void 0}t.exports=i})),qg=o(((e,t)=>{var n=Kg();function r(e,t,r){var i=e==null?void 0:n(e,t);return i===void 0?r:i}t.exports=r})),Ene=o(((e,t)=>{function n(e){return e==null}t.exports=n})),Dne=o(((e,t)=>{var n=Eg(),r=Sg(),i=Dg(),a=`[object String]`;function o(e){return typeof e==`string`||!r(e)&&i(e)&&n(e)==a}t.exports=o})),One=o((e=>{var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),s=Symbol.for(`react.context`),c=Symbol.for(`react.server_context`),l=Symbol.for(`react.forward_ref`),u=Symbol.for(`react.suspense`),d=Symbol.for(`react.suspense_list`),f=Symbol.for(`react.memo`),p=Symbol.for(`react.lazy`);function m(e){if(typeof e==`object`&&e){var m=e.$$typeof;switch(m){case t:switch(e=e.type,e){case r:case a:case i:case u:case d:return e;default:switch(e&&=e.$$typeof,e){case c:case s:case l:case p:case f:case o:return e;default:return m}}case n:return m}}}e.isFragment=function(e){return m(e)===r}})),kne=o(((e,t)=>{t.exports=One()})),Jg=o(((e,t)=>{var n=Eg(),r=Dg(),i=`[object Number]`;function a(e){return typeof e==`number`||r(e)&&n(e)==i}t.exports=a})),Ane=o(((e,t)=>{var n=Jg();function r(e){return n(e)&&e!=+e}t.exports=r})),Yg=l(Dne()),Xg=l(Ane()),Zg=l(qg()),jne=l(Jg()),Qg=l(Ene()),$g=function(e){return e===0?0:e>0?1:-1},e_=function(e){return(0,Yg.default)(e)&&e.indexOf(`%`)===e.length-1},q=function(e){return(0,jne.default)(e)&&!(0,Xg.default)(e)},Mne=function(e){return(0,Qg.default)(e)},t_=function(e){return q(e)||(0,Yg.default)(e)},Nne=0,n_=function(e){var t=++Nne;return`${e||``}${t}`},r_=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!q(e)&&!(0,Yg.default)(e))return n;var i;if(e_(e)){var a=e.indexOf(`%`);i=t*parseFloat(e.slice(0,a))/100}else i=+e;return(0,Xg.default)(i)&&(i=n),r&&i>t&&(i=t),i},i_=function(e){if(!e)return null;var t=Object.keys(e);return t&&t.length?e[t[0]]:null},Pne=function(e){if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[e[r]])n[e[r]]=!0;else return!0;return!1},a_=function(e,t){return q(e)&&q(t)?function(n){return e+n*(t-e)}:function(){return t}};function o_(e,t,n){return!e||!e.length?null:e.find(function(e){return e&&(typeof t==`function`?t(e):(0,Zg.default)(e,t))===n})}var Fne=function(e,t){return q(e)&&q(t)?e-t:(0,Yg.default)(e)&&(0,Yg.default)(t)?e.localeCompare(t):e instanceof Date&&t instanceof Date?e.getTime()-t.getTime():String(e).localeCompare(String(t))};function s_(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}var c_=l(Ag());function l_(e){"@babel/helpers - typeof";return l_=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},l_(e)}var Ine=[`viewBox`,`children`],Lne=`aria-activedescendant.aria-atomic.aria-autocomplete.aria-busy.aria-checked.aria-colcount.aria-colindex.aria-colspan.aria-controls.aria-current.aria-describedby.aria-details.aria-disabled.aria-errormessage.aria-expanded.aria-flowto.aria-haspopup.aria-hidden.aria-invalid.aria-keyshortcuts.aria-label.aria-labelledby.aria-level.aria-live.aria-modal.aria-multiline.aria-multiselectable.aria-orientation.aria-owns.aria-placeholder.aria-posinset.aria-pressed.aria-readonly.aria-relevant.aria-required.aria-roledescription.aria-rowcount.aria-rowindex.aria-rowspan.aria-selected.aria-setsize.aria-sort.aria-valuemax.aria-valuemin.aria-valuenow.aria-valuetext.className.color.height.id.lang.max.media.method.min.name.style.target.width.role.tabIndex.accentHeight.accumulate.additive.alignmentBaseline.allowReorder.alphabetic.amplitude.arabicForm.ascent.attributeName.attributeType.autoReverse.azimuth.baseFrequency.baselineShift.baseProfile.bbox.begin.bias.by.calcMode.capHeight.clip.clipPath.clipPathUnits.clipRule.colorInterpolation.colorInterpolationFilters.colorProfile.colorRendering.contentScriptType.contentStyleType.cursor.cx.cy.d.decelerate.descent.diffuseConstant.direction.display.divisor.dominantBaseline.dur.dx.dy.edgeMode.elevation.enableBackground.end.exponent.externalResourcesRequired.fill.fillOpacity.fillRule.filter.filterRes.filterUnits.floodColor.floodOpacity.focusable.fontFamily.fontSize.fontSizeAdjust.fontStretch.fontStyle.fontVariant.fontWeight.format.from.fx.fy.g1.g2.glyphName.glyphOrientationHorizontal.glyphOrientationVertical.glyphRef.gradientTransform.gradientUnits.hanging.horizAdvX.horizOriginX.href.ideographic.imageRendering.in2.in.intercept.k1.k2.k3.k4.k.kernelMatrix.kernelUnitLength.kerning.keyPoints.keySplines.keyTimes.lengthAdjust.letterSpacing.lightingColor.limitingConeAngle.local.markerEnd.markerHeight.markerMid.markerStart.markerUnits.markerWidth.mask.maskContentUnits.maskUnits.mathematical.mode.numOctaves.offset.opacity.operator.order.orient.orientation.origin.overflow.overlinePosition.overlineThickness.paintOrder.panose1.pathLength.patternContentUnits.patternTransform.patternUnits.pointerEvents.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.r.radius.refX.refY.renderingIntent.repeatCount.repeatDur.requiredExtensions.requiredFeatures.restart.result.rotate.rx.ry.seed.shapeRendering.slope.spacing.specularConstant.specularExponent.speed.spreadMethod.startOffset.stdDeviation.stemh.stemv.stitchTiles.stopColor.stopOpacity.strikethroughPosition.strikethroughThickness.string.stroke.strokeDasharray.strokeDashoffset.strokeLinecap.strokeLinejoin.strokeMiterlimit.strokeOpacity.strokeWidth.surfaceScale.systemLanguage.tableValues.targetX.targetY.textAnchor.textDecoration.textLength.textRendering.to.transform.u1.u2.underlinePosition.underlineThickness.unicode.unicodeBidi.unicodeRange.unitsPerEm.vAlphabetic.values.vectorEffect.version.vertAdvY.vertOriginX.vertOriginY.vHanging.vIdeographic.viewTarget.visibility.vMathematical.widths.wordSpacing.writingMode.x1.x2.x.xChannelSelector.xHeight.xlinkActuate.xlinkArcrole.xlinkHref.xlinkRole.xlinkShow.xlinkTitle.xlinkType.xmlBase.xmlLang.xmlns.xmlnsXlink.xmlSpace.y1.y2.y.yChannelSelector.z.zoomAndPan.ref.key.angle`.split(`.`),u_=[`points`,`pathLength`],Rne={svg:Ine,polygon:u_,polyline:u_},d_=`dangerouslySetInnerHTML.onCopy.onCopyCapture.onCut.onCutCapture.onPaste.onPasteCapture.onCompositionEnd.onCompositionEndCapture.onCompositionStart.onCompositionStartCapture.onCompositionUpdate.onCompositionUpdateCapture.onFocus.onFocusCapture.onBlur.onBlurCapture.onChange.onChangeCapture.onBeforeInput.onBeforeInputCapture.onInput.onInputCapture.onReset.onResetCapture.onSubmit.onSubmitCapture.onInvalid.onInvalidCapture.onLoad.onLoadCapture.onError.onErrorCapture.onKeyDown.onKeyDownCapture.onKeyPress.onKeyPressCapture.onKeyUp.onKeyUpCapture.onAbort.onAbortCapture.onCanPlay.onCanPlayCapture.onCanPlayThrough.onCanPlayThroughCapture.onDurationChange.onDurationChangeCapture.onEmptied.onEmptiedCapture.onEncrypted.onEncryptedCapture.onEnded.onEndedCapture.onLoadedData.onLoadedDataCapture.onLoadedMetadata.onLoadedMetadataCapture.onLoadStart.onLoadStartCapture.onPause.onPauseCapture.onPlay.onPlayCapture.onPlaying.onPlayingCapture.onProgress.onProgressCapture.onRateChange.onRateChangeCapture.onSeeked.onSeekedCapture.onSeeking.onSeekingCapture.onStalled.onStalledCapture.onSuspend.onSuspendCapture.onTimeUpdate.onTimeUpdateCapture.onVolumeChange.onVolumeChangeCapture.onWaiting.onWaitingCapture.onAuxClick.onAuxClickCapture.onClick.onClickCapture.onContextMenu.onContextMenuCapture.onDoubleClick.onDoubleClickCapture.onDrag.onDragCapture.onDragEnd.onDragEndCapture.onDragEnter.onDragEnterCapture.onDragExit.onDragExitCapture.onDragLeave.onDragLeaveCapture.onDragOver.onDragOverCapture.onDragStart.onDragStartCapture.onDrop.onDropCapture.onMouseDown.onMouseDownCapture.onMouseEnter.onMouseLeave.onMouseMove.onMouseMoveCapture.onMouseOut.onMouseOutCapture.onMouseOver.onMouseOverCapture.onMouseUp.onMouseUpCapture.onSelect.onSelectCapture.onTouchCancel.onTouchCancelCapture.onTouchEnd.onTouchEndCapture.onTouchMove.onTouchMoveCapture.onTouchStart.onTouchStartCapture.onPointerDown.onPointerDownCapture.onPointerMove.onPointerMoveCapture.onPointerUp.onPointerUpCapture.onPointerCancel.onPointerCancelCapture.onPointerEnter.onPointerEnterCapture.onPointerLeave.onPointerLeaveCapture.onPointerOver.onPointerOverCapture.onPointerOut.onPointerOutCapture.onGotPointerCapture.onGotPointerCaptureCapture.onLostPointerCapture.onLostPointerCaptureCapture.onScroll.onScrollCapture.onWheel.onWheelCapture.onAnimationStart.onAnimationStartCapture.onAnimationEnd.onAnimationEndCapture.onAnimationIteration.onAnimationIterationCapture.onTransitionEnd.onTransitionEndCapture`.split(`.`),f_=function(e,t){if(!e||typeof e==`function`||typeof e==`boolean`)return null;var n=e;if((0,_.isValidElement)(e)&&(n=e.props),!(0,c_.default)(n))return null;var r={};return Object.keys(n).forEach(function(e){d_.includes(e)&&(r[e]=t||function(t){return n[e](n,t)})}),r},zne=function(e,t,n){return function(r){return e(t,n,r),null}},p_=function(e,t,n){if(!(0,c_.default)(e)||l_(e)!==`object`)return null;var r=null;return Object.keys(e).forEach(function(i){var a=e[i];d_.includes(i)&&typeof a==`function`&&(r||={},r[i]=zne(a,t,n))}),r},m_=l(jg()),Bne=kne(),Vne=[`children`],Hne=[`children`];function h_(e,t){if(e==null)return{};var n=Une(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Une(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function g_(e){"@babel/helpers - typeof";return g_=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},g_(e)}var __={click:`onClick`,mousedown:`onMouseDown`,mouseup:`onMouseUp`,mouseover:`onMouseOver`,mousemove:`onMouseMove`,mouseout:`onMouseOut`,mouseenter:`onMouseEnter`,mouseleave:`onMouseLeave`,touchcancel:`onTouchCancel`,touchend:`onTouchEnd`,touchmove:`onTouchMove`,touchstart:`onTouchStart`,contextmenu:`onContextMenu`,dblclick:`onDoubleClick`},v_=function(e){return typeof e==`string`?e:e?e.displayName||e.name||`Component`:``},y_=null,b_=null,x_=function e(t){if(t===y_&&Array.isArray(b_))return b_;var n=[];return _.Children.forEach(t,function(t){(0,Qg.default)(t)||((0,Bne.isFragment)(t)?n=n.concat(e(t.props.children)):n.push(t))}),b_=n,y_=t,n};function S_(e,t){var n=[],r=[];return r=Array.isArray(t)?t.map(function(e){return v_(e)}):[v_(t)],x_(e).forEach(function(e){var t=(0,Zg.default)(e,`type.displayName`)||(0,Zg.default)(e,`type.name`);r.indexOf(t)!==-1&&n.push(e)}),n}function C_(e,t){var n=S_(e,t);return n&&n[0]}var w_=function(e){if(!e||!e.props)return!1;var t=e.props,n=t.width,r=t.height;return!(!q(n)||n<=0||!q(r)||r<=0)},T_=`a.altGlyph.altGlyphDef.altGlyphItem.animate.animateColor.animateMotion.animateTransform.circle.clipPath.color-profile.cursor.defs.desc.ellipse.feBlend.feColormatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.filter.font.font-face.font-face-format.font-face-name.font-face-url.foreignObject.g.glyph.glyphRef.hkern.image.line.lineGradient.marker.mask.metadata.missing-glyph.mpath.path.pattern.polygon.polyline.radialGradient.rect.script.set.stop.style.svg.switch.symbol.text.textPath.title.tref.tspan.use.view.vkern`.split(`.`),E_=function(e){return e&&e.type&&(0,Yg.default)(e.type)&&T_.indexOf(e.type)>=0},D_=function(e){return e&&g_(e)===`object`&&`clipDot`in e},O_=function(e,t,n,r){var i=Rne?.[r]??[];return t.startsWith(`data-`)||!(0,m_.default)(e)&&(r&&i.includes(t)||Lne.includes(t))||n&&d_.includes(t)},J=function(e,t,n){if(!e||typeof e==`function`||typeof e==`boolean`)return null;var r=e;if((0,_.isValidElement)(e)&&(r=e.props),!(0,c_.default)(r))return null;var i={};return Object.keys(r).forEach(function(e){O_(r?.[e],e,t,n)&&(i[e]=r[e])}),i},k_=function e(t,n){if(t===n)return!0;var r=_.Children.count(t);if(r!==_.Children.count(n))return!1;if(r===0)return!0;if(r===1)return A_(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i<r;i++){var a=t[i],o=n[i];if(Array.isArray(a)||Array.isArray(o)){if(!e(a,o))return!1}else if(!A_(a,o))return!1}return!0},A_=function(e,t){if((0,Qg.default)(e)&&(0,Qg.default)(t))return!0;if(!(0,Qg.default)(e)&&!(0,Qg.default)(t)){var n=e.props||{},r=n.children,i=h_(n,Vne),a=t.props||{},o=a.children,s=h_(a,Hne);return r&&o?s_(i,s)&&k_(r,o):!r&&!o?s_(i,s):!1}return!1},j_=function(e,t){var n=[],r={};return x_(e).forEach(function(e,i){if(E_(e))n.push(e);else if(e){var a=v_(e.type),o=t[a]||{},s=o.handler,c=o.once;if(s&&(!c||!r[a])){var l=s(e,a,i);n.push(l),r[a]=!0}}}),n},M_=function(e){var t=e&&e.type;return t&&__[t]?__[t]:null},N_=function(e,t){return x_(t).indexOf(e)},P_=[`children`,`width`,`height`,`viewBox`,`className`,`style`,`title`,`desc`];function F_(){return F_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},F_.apply(this,arguments)}function I_(e,t){if(e==null)return{};var n=L_(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function L_(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function R_(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,a=e.className,o=e.style,s=e.title,c=e.desc,l=I_(e,P_),u=i||{width:n,height:r,x:0,y:0},d=Rt(`recharts-surface`,a);return _.createElement(`svg`,F_({},J(l,!0,`svg`),{className:d,width:n,height:r,style:o,viewBox:`${u.x} ${u.y} ${u.width} ${u.height}`}),_.createElement(`title`,null,s),_.createElement(`desc`,null,c),t)}var z_=[`children`,`className`];function B_(){return B_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},B_.apply(this,arguments)}function V_(e,t){if(e==null)return{};var n=H_(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function H_(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var U_=_.forwardRef(function(e,t){var n=e.children,r=e.className,i=V_(e,z_),a=Rt(`recharts-layer`,r);return _.createElement(`g`,B_({className:a},J(i,!0),{ref:t}),n)}),W_=!1,G_=function(e,t){var n=[...arguments].slice(2);if(W_&&typeof console<`u`&&console.warn&&(t===void 0&&console.warn(`LogUtils requires an error message argument`),!e))if(t===void 0)console.warn(`Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.`);else{var r=0;console.warn(t.replace(/%s/g,function(){return n[r++]}))}},K_=o(((e,t)=>{function n(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}t.exports=n})),q_=o(((e,t)=>{var n=K_();function r(e,t,r){var i=e.length;return r=r===void 0?i:r,!t&&r>=i?e:n(e,t,r)}t.exports=r})),J_=o(((e,t)=>{var n=RegExp(`[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]`);function r(e){return n.test(e)}t.exports=r})),Y_=o(((e,t)=>{function n(e){return e.split(``)}t.exports=n})),X_=o(((e,t)=>{var n=`\\ud800-\\udfff`,r=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,i=`\\ufe0e\\ufe0f`,a=`[`+n+`]`,o=`[`+r+`]`,s=`\\ud83c[\\udffb-\\udfff]`,c=`(?:`+o+`|`+s+`)`,l=`[^`+n+`]`,u=`(?:\\ud83c[\\udde6-\\uddff]){2}`,d=`[\\ud800-\\udbff][\\udc00-\\udfff]`,f=`\\u200d`,p=c+`?`,m=`[`+i+`]?`,h=`(?:`+f+`(?:`+[l,u,d].join(`|`)+`)`+m+p+`)*`,g=m+p+h,_=`(?:`+[l+o+`?`,o,u,d,a].join(`|`)+`)`,v=RegExp(s+`(?=`+s+`)|`+_+g,`g`);function y(e){return e.match(v)||[]}t.exports=y})),Z_=o(((e,t)=>{var n=Y_(),r=J_(),i=X_();function a(e){return r(e)?i(e):n(e)}t.exports=a})),Q_=o(((e,t)=>{var n=q_(),r=J_(),i=Z_(),a=Ug();function o(e){return function(t){t=a(t);var o=r(t)?i(t):void 0,s=o?o[0]:t.charAt(0),c=o?n(o,1).join(``):t.slice(1);return s[e]()+c}}t.exports=o})),$_=o(((e,t)=>{t.exports=Q_()(`toUpperCase`)}));function ev(e){return function(){return e}}var tv=Math.cos,nv=Math.sin,rv=Math.sqrt,iv=Math.PI;iv/2;var av=2*iv,ov=Math.PI,sv=2*ov,cv=1e-6,lv=sv-cv;function uv(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function dv(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return uv;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var fv=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?uv:dv(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>cv)if(!(Math.abs(u*s-c*l)>cv)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((ov-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>cv&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>cv||Math.abs(this._y1-l)>cv)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%sv+sv),d>lv?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>cv&&this._append`A${n},${n},0,${+(d>=ov)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function pv(){return new fv}pv.prototype=fv.prototype;function mv(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new fv(t)}Array.prototype.slice;function hv(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function gv(e){this._context=e}gv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function _v(e){return new gv(e)}function vv(e){return e[0]}function yv(e){return e[1]}function bv(e,t){var n=ev(!0),r=null,i=_v,a=null,o=mv(s);e=typeof e==`function`?e:e===void 0?vv:ev(e),t=typeof t==`function`?t:t===void 0?yv:ev(t);function s(s){var c,l=(s=hv(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:ev(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:ev(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:ev(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function xv(e,t,n){var r=null,i=ev(!0),a=null,o=_v,s=null,c=mv(l);e=typeof e==`function`?e:e===void 0?vv:ev(+e),t=typeof t==`function`?t:ev(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?yv:ev(+n);function l(l){var u,d,f,p=(l=hv(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h)if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return bv().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:ev(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:ev(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:ev(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:ev(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:ev(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:ev(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:ev(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}var Sv=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function Cv(e){return new Sv(e,!0)}function wv(e){return new Sv(e,!1)}var Tv={draw(e,t){let n=rv(t/iv);e.moveTo(n,0),e.arc(0,0,n,0,av)}},Ev={draw(e,t){let n=rv(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},Dv=rv(1/3),Ov=Dv*2,kv={draw(e,t){let n=rv(t/Ov),r=n*Dv;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Av={draw(e,t){let n=rv(t),r=-n/2;e.rect(r,r,n,n)}},jv=.8908130915292852,Mv=nv(iv/10)/nv(7*iv/10),Nv=nv(av/10)*Mv,Pv=-tv(av/10)*Mv,Fv={draw(e,t){let n=rv(t*jv),r=Nv*n,i=Pv*n;e.moveTo(0,-n),e.lineTo(r,i);for(let t=1;t<5;++t){let a=av*t/5,o=tv(a),s=nv(a);e.lineTo(s*n,-o*n),e.lineTo(o*r-s*i,s*r+o*i)}e.closePath()}},Iv=rv(3),Lv={draw(e,t){let n=-rv(t/(Iv*3));e.moveTo(0,n*2),e.lineTo(-Iv*n,-n),e.lineTo(Iv*n,-n),e.closePath()}},Rv=-.5,zv=rv(3)/2,Bv=1/rv(12),Vv=(Bv/2+1)*3,Hv={draw(e,t){let n=rv(t/Vv),r=n/2,i=n*Bv,a=r,o=n*Bv+n,s=-a,c=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(s,c),e.lineTo(Rv*r-zv*i,zv*r+Rv*i),e.lineTo(Rv*a-zv*o,zv*a+Rv*o),e.lineTo(Rv*s-zv*c,zv*s+Rv*c),e.lineTo(Rv*r+zv*i,Rv*i-zv*r),e.lineTo(Rv*a+zv*o,Rv*o-zv*a),e.lineTo(Rv*s+zv*c,Rv*c-zv*s),e.closePath()}};function Uv(e,t){let n=null,r=mv(i);e=typeof e==`function`?e:ev(e||Tv),t=typeof t==`function`?t:ev(t===void 0?64:+t);function i(){let i;if(n||=i=r(),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+``||null}return i.type=function(t){return arguments.length?(e=typeof t==`function`?t:ev(t),i):e},i.size=function(e){return arguments.length?(t=typeof e==`function`?e:ev(+e),i):t},i.context=function(e){return arguments.length?(n=e??null,i):n},i}function Wv(){}function Gv(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Kv(e){this._context=e}Kv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Gv(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Gv(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function qv(e){return new Kv(e)}function Jv(e){this._context=e}Jv.prototype={areaStart:Wv,areaEnd:Wv,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Gv(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Yv(e){return new Jv(e)}function Xv(e){this._context=e}Xv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Gv(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Zv(e){return new Xv(e)}function Qv(e){this._context=e}Qv.prototype={areaStart:Wv,areaEnd:Wv,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function $v(e){return new Qv(e)}function ey(e){return e<0?-1:1}function ty(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(ey(a)+ey(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function ny(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function ry(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function iy(e){this._context=e}iy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ry(this,this._t0,ny(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ry(this,ny(this,n=ty(this,e,t)),n);break;default:ry(this,this._t0,n=ty(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function ay(e){this._context=new oy(e)}(ay.prototype=Object.create(iy.prototype)).point=function(e,t){iy.prototype.point.call(this,t,e)};function oy(e){this._context=e}oy.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function sy(e){return new iy(e)}function cy(e){return new ay(e)}function ly(e){this._context=e}ly.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=uy(e),i=uy(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function uy(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function dy(e){return new ly(e)}function fy(e,t){this._context=e,this._t=t}fy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}this._x=e,this._y=t}};function py(e){return new fy(e,.5)}function my(e){return new fy(e,0)}function hy(e){return new fy(e,1)}function gy(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function _y(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}function vy(e,t){return e[t]}function yy(e){let t=[];return t.key=e,t}function by(){var e=ev([]),t=_y,n=gy,r=vy;function i(i){var a=Array.from(e.apply(this,arguments),yy),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o<s;++o)(a[o][c]=[0,+r(e,a[o].key,c,i)]).data=e;for(o=0,l=hv(t(a));o<s;++o)a[l[o]].index=o;return n(a,l),a}return i.keys=function(t){return arguments.length?(e=typeof t==`function`?t:ev(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r=typeof e==`function`?e:ev(+e),i):r},i.order=function(e){return arguments.length?(t=e==null?_y:typeof e==`function`?e:ev(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??gy,i):n},i}function xy(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}gy(e,t)}}function Sy(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,s=0;o<i;++o)s+=e[o][n][1]||0;r[n][1]+=r[n][0]=-s/2}gy(e,t)}}function Cy(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r<a;++r){for(var s=0,c=0,l=0;s<o;++s){for(var u=e[t[s]],d=u[r][1]||0,f=(d-(u[r-1][1]||0))/2,p=0;p<s;++p){var m=e[t[p]],h=m[r][1]||0,g=m[r-1][1]||0;f+=h-g}c+=d,l+=f*d}i[r-1][1]+=i[r-1][0]=n,c&&(n-=l/c)}i[r-1][1]+=i[r-1][0]=n,gy(e,t)}}var wy=l($_());function Ty(e){"@babel/helpers - typeof";return Ty=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Ty(e)}var Ey=[`type`,`size`,`sizeType`];function Dy(){return Dy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dy.apply(this,arguments)}function Oy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ky(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Oy(Object(n),!0).forEach(function(t){Ay(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oy(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ay(e,t,n){return t=jy(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jy(e){var t=My(e,`string`);return Ty(t)==`symbol`?t:t+``}function My(e,t){if(Ty(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Ty(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Ny(e,t){if(e==null)return{};var n=Py(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Py(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Fy={symbolCircle:Tv,symbolCross:Ev,symbolDiamond:kv,symbolSquare:Av,symbolStar:Fv,symbolTriangle:Lv,symbolWye:Hv},Iy=Math.PI/180,Ly=function(e){return Fy[`symbol${(0,wy.default)(e)}`]||Tv},Ry=function(e,t,n){if(t===`area`)return e;switch(n){case`cross`:return 5*e*e/9;case`diamond`:return .5*e*e/Math.sqrt(3);case`square`:return e*e;case`star`:var r=18*Iy;return 1.25*e*e*(Math.tan(r)-Math.tan(r*2)*Math.tan(r)**2);case`triangle`:return Math.sqrt(3)*e*e/4;case`wye`:return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},zy=function(e,t){Fy[`symbol${(0,wy.default)(e)}`]=t},By=function(e){var t=e.type,n=t===void 0?`circle`:t,r=e.size,i=r===void 0?64:r,a=e.sizeType,o=a===void 0?`area`:a,s=ky(ky({},Ny(e,Ey)),{},{type:n,size:i,sizeType:o}),c=function(){var e=Ly(n);return Uv().type(e).size(Ry(i,o,n))()},l=s.className,u=s.cx,d=s.cy,f=J(s,!0);return u===+u&&d===+d&&i===+i?_.createElement(`path`,Dy({},f,{className:Rt(`recharts-symbols`,l),transform:`translate(${u}, ${d})`,d:c()})):null};By.registerSymbol=zy;function Vy(e){"@babel/helpers - typeof";return Vy=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Vy(e)}function Hy(){return Hy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hy.apply(this,arguments)}function Uy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Wy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Uy(Object(n),!0).forEach(function(t){tb(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uy(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Gy(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function Ky(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,nb(r.key),r)}}function qy(e,t,n){return t&&Ky(e.prototype,t),n&&Ky(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function Jy(e,t,n){return t=Qy(t),Yy(e,Zy()?Reflect.construct(t,n||[],Qy(e).constructor):t.apply(e,n))}function Yy(e,t){if(t&&(Vy(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return Xy(e)}function Xy(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function Zy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Zy=function(){return!!e})()}function Qy(e){return Qy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Qy(e)}function $y(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,`prototype`,{writable:!1}),t&&eb(e,t)}function eb(e,t){return eb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},eb(e,t)}function tb(e,t,n){return t=nb(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nb(e){var t=rb(e,`string`);return Vy(t)==`symbol`?t:t+``}function rb(e,t){if(Vy(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Vy(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var ib=32,ab=function(e){function t(){return Gy(this,t),Jy(this,t,arguments)}return $y(t,e),qy(t,[{key:`renderIcon`,value:function(e){var t=this.props.inactiveColor,n=ib/2,r=ib/6,i=ib/3,a=e.inactive?t:e.color;if(e.type===`plainline`)return _.createElement(`line`,{strokeWidth:4,fill:`none`,stroke:a,strokeDasharray:e.payload.strokeDasharray,x1:0,y1:n,x2:ib,y2:n,className:`recharts-legend-icon`});if(e.type===`line`)return _.createElement(`path`,{strokeWidth:4,fill:`none`,stroke:a,d:`M0,${n}h${i}
118
- A${r},${r},0,1,1,${2*i},${n}
119
- H${ib}M${2*i},${n}
120
- A${r},${r},0,1,1,${i},${n}`,className:`recharts-legend-icon`});if(e.type===`rect`)return _.createElement(`path`,{stroke:`none`,fill:a,d:`M0,${ib/8}h${ib}v${ib*3/4}h${-ib}z`,className:`recharts-legend-icon`});if(_.isValidElement(e.legendIcon)){var o=Wy({},e);return delete o.legendIcon,_.cloneElement(e.legendIcon,o)}return _.createElement(By,{fill:a,cx:n,cy:n,size:ib,sizeType:`diameter`,type:e.type})}},{key:`renderItems`,value:function(){var e=this,t=this.props,n=t.payload,r=t.iconSize,i=t.layout,a=t.formatter,o=t.inactiveColor,s={x:0,y:0,width:ib,height:ib},c={display:i===`horizontal`?`inline-block`:`block`,marginRight:10},l={display:`inline-block`,verticalAlign:`middle`,marginRight:4};return n.map(function(t,n){var i=t.formatter||a,u=Rt(tb(tb({"recharts-legend-item":!0},`legend-item-${n}`,!0),`inactive`,t.inactive));if(t.type===`none`)return null;var d=(0,m_.default)(t.value)?null:t.value;G_(!(0,m_.default)(t.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var f=t.inactive?o:t.color;return _.createElement(`li`,Hy({className:u,style:c,key:`legend-item-${n}`},p_(e.props,t,n)),_.createElement(R_,{width:r,height:r,viewBox:s,style:l},e.renderIcon(t)),_.createElement(`span`,{className:`recharts-legend-item-text`,style:{color:f}},i?i(d,t,n):d))})}},{key:`render`,value:function(){var e=this.props,t=e.payload,n=e.layout,r=e.align;if(!t||!t.length)return null;var i={padding:0,margin:0,textAlign:n===`horizontal`?r:`left`};return _.createElement(`ul`,{className:`recharts-default-legend`,style:i},this.renderItems())}}])}(_.PureComponent);tb(ab,`displayName`,`Legend`),tb(ab,`defaultProps`,{iconSize:14,layout:`horizontal`,align:`center`,verticalAlign:`middle`,inactiveColor:`#ccc`});var ob=o(((e,t)=>{var n=Lg();function r(){this.__data__=new n,this.size=0}t.exports=r})),sb=o(((e,t)=>{function n(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}t.exports=n})),cb=o(((e,t)=>{function n(e){return this.__data__.get(e)}t.exports=n})),lb=o(((e,t)=>{function n(e){return this.__data__.has(e)}t.exports=n})),ub=o(((e,t)=>{var n=Lg(),r=Rg(),i=Bg(),a=200;function o(e,t){var o=this.__data__;if(o instanceof n){var s=o.__data__;if(!r||s.length<a-1)return s.push([e,t]),this.size=++o.size,this;o=this.__data__=new i(s)}return o.set(e,t),this.size=o.size,this}t.exports=o})),db=o(((e,t)=>{var n=Lg(),r=ob(),i=sb(),a=cb(),o=lb(),s=ub();function c(e){this.size=(this.__data__=new n(e)).size}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c})),fb=o(((e,t)=>{var n=`__lodash_hash_undefined__`;function r(e){return this.__data__.set(e,n),this}t.exports=r})),pb=o(((e,t)=>{function n(e){return this.__data__.has(e)}t.exports=n})),mb=o(((e,t)=>{var n=Bg(),r=fb(),i=pb();function a(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}a.prototype.add=a.prototype.push=r,a.prototype.has=i,t.exports=a})),hb=o(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}t.exports=n})),gb=o(((e,t)=>{function n(e,t){return e.has(t)}t.exports=n})),_b=o(((e,t)=>{var n=mb(),r=hb(),i=gb(),a=1,o=2;function s(e,t,s,c,l,u){var d=s&a,f=e.length,p=t.length;if(f!=p&&!(d&&p>f))return!1;var m=u.get(e),h=u.get(t);if(m&&h)return m==t&&h==e;var g=-1,_=!0,v=s&o?new n:void 0;for(u.set(e,t),u.set(t,e);++g<f;){var y=e[g],b=t[g];if(c)var x=d?c(b,y,g,t,e,u):c(y,b,g,e,t,u);if(x!==void 0){if(x)continue;_=!1;break}if(v){if(!r(t,function(e,t){if(!i(v,t)&&(y===e||l(y,e,s,c,u)))return v.push(t)})){_=!1;break}}else if(!(y===b||l(y,b,s,c,u))){_=!1;break}}return u.delete(e),u.delete(t),_}t.exports=s})),vb=o(((e,t)=>{t.exports=wg().Uint8Array})),yb=o(((e,t)=>{function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}t.exports=n})),bb=o(((e,t)=>{function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}t.exports=n})),xb=o(((e,t)=>{var n=Tg(),r=vb(),i=Fg(),a=_b(),o=yb(),s=bb(),c=1,l=2,u=`[object Boolean]`,d=`[object Date]`,f=`[object Error]`,p=`[object Map]`,m=`[object Number]`,h=`[object RegExp]`,g=`[object Set]`,_=`[object String]`,v=`[object Symbol]`,y=`[object ArrayBuffer]`,b=`[object DataView]`,x=n?n.prototype:void 0,S=x?x.valueOf:void 0;function C(e,t,n,x,C,w,T){switch(n){case b:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case y:return!(e.byteLength!=t.byteLength||!w(new r(e),new r(t)));case u:case d:case m:return i(+e,+t);case f:return e.name==t.name&&e.message==t.message;case h:case _:return e==t+``;case p:var E=o;case g:var D=x&c;if(E||=s,e.size!=t.size&&!D)return!1;var O=T.get(e);if(O)return O==t;x|=l,T.set(e,t);var k=a(E(e),E(t),x,C,w,T);return T.delete(e),k;case v:if(S)return S.call(e)==S.call(t)}return!1}t.exports=C})),Sb=o(((e,t)=>{function n(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}t.exports=n})),Cb=o(((e,t)=>{var n=Sb(),r=Sg();function i(e,t,i){var a=t(e);return r(e)?a:n(a,i(e))}t.exports=i})),wb=o(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}t.exports=n})),Tb=o(((e,t)=>{function n(){return[]}t.exports=n})),Eb=o(((e,t)=>{var n=wb(),r=Tb(),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols;t.exports=a?function(e){return e==null?[]:(e=Object(e),n(a(e),function(t){return i.call(e,t)}))}:r})),Db=o(((e,t)=>{function n(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}t.exports=n})),Ob=o(((e,t)=>{var n=Eg(),r=Dg(),i=`[object Arguments]`;function a(e){return r(e)&&n(e)==i}t.exports=a})),kb=o(((e,t)=>{var n=Ob(),r=Dg(),i=Object.prototype,a=i.hasOwnProperty,o=i.propertyIsEnumerable;t.exports=n(function(){return arguments}())?n:function(e){return r(e)&&a.call(e,`callee`)&&!o.call(e,`callee`)}})),Ab=o(((e,t)=>{function n(){return!1}t.exports=n})),jb=o(((e,t)=>{var n=wg(),r=Ab(),i=typeof e==`object`&&e&&!e.nodeType&&e,a=i&&typeof t==`object`&&t&&!t.nodeType&&t,o=a&&a.exports===i?n.Buffer:void 0;t.exports=(o?o.isBuffer:void 0)||r})),Mb=o(((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(e,t){var i=typeof e;return t??=n,!!t&&(i==`number`||i!=`symbol`&&r.test(e))&&e>-1&&e%1==0&&e<t}t.exports=i})),Nb=o(((e,t)=>{var n=9007199254740991;function r(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=n}t.exports=r})),Pb=o(((e,t)=>{var n=Eg(),r=Nb(),i=Dg(),a=`[object Arguments]`,o=`[object Array]`,s=`[object Boolean]`,c=`[object Date]`,l=`[object Error]`,u=`[object Function]`,d=`[object Map]`,f=`[object Number]`,p=`[object Object]`,m=`[object RegExp]`,h=`[object Set]`,g=`[object String]`,_=`[object WeakMap]`,v=`[object ArrayBuffer]`,y=`[object DataView]`,b=`[object Float32Array]`,x=`[object Float64Array]`,S=`[object Int8Array]`,C=`[object Int16Array]`,w=`[object Int32Array]`,T=`[object Uint8Array]`,E=`[object Uint8ClampedArray]`,D=`[object Uint16Array]`,O=`[object Uint32Array]`,k={};k[b]=k[x]=k[S]=k[C]=k[w]=k[T]=k[E]=k[D]=k[O]=!0,k[a]=k[o]=k[v]=k[s]=k[y]=k[c]=k[l]=k[u]=k[d]=k[f]=k[p]=k[m]=k[h]=k[g]=k[_]=!1;function A(e){return i(e)&&r(e.length)&&!!k[n(e)]}t.exports=A})),Fb=o(((e,t)=>{function n(e){return function(t){return e(t)}}t.exports=n})),Ib=o(((e,t)=>{var n=Cg(),r=typeof e==`object`&&e&&!e.nodeType&&e,i=r&&typeof t==`object`&&t&&!t.nodeType&&t,a=i&&i.exports===r&&n.process;t.exports=function(){try{return i&&i.require&&i.require(`util`).types||a&&a.binding&&a.binding(`util`)}catch{}}()})),Lb=o(((e,t)=>{var n=Pb(),r=Fb(),i=Ib(),a=i&&i.isTypedArray;t.exports=a?r(a):n})),Rb=o(((e,t)=>{var n=Db(),r=kb(),i=Sg(),a=jb(),o=Mb(),s=Lb(),c=Object.prototype.hasOwnProperty;function l(e,t){var l=i(e),u=!l&&r(e),d=!l&&!u&&a(e),f=!l&&!u&&!d&&s(e),p=l||u||d||f,m=p?n(e.length,String):[],h=m.length;for(var g in e)(t||c.call(e,g))&&!(p&&(g==`length`||d&&(g==`offset`||g==`parent`)||f&&(g==`buffer`||g==`byteLength`||g==`byteOffset`)||o(g,h)))&&m.push(g);return m}t.exports=l})),zb=o(((e,t)=>{var n=Object.prototype;function r(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||n)}t.exports=r})),Bb=o(((e,t)=>{function n(e,t){return function(n){return e(t(n))}}t.exports=n})),Vb=o(((e,t)=>{t.exports=Bb()(Object.keys,Object)})),Hb=o(((e,t)=>{var n=zb(),r=Vb(),i=Object.prototype.hasOwnProperty;function a(e){if(!n(e))return r(e);var t=[];for(var a in Object(e))i.call(e,a)&&a!=`constructor`&&t.push(a);return t}t.exports=a})),Ub=o(((e,t)=>{var n=jg(),r=Nb();function i(e){return e!=null&&r(e.length)&&!n(e)}t.exports=i})),Wb=o(((e,t)=>{var n=Rb(),r=Hb(),i=Ub();function a(e){return i(e)?n(e):r(e)}t.exports=a})),Gb=o(((e,t)=>{var n=Cb(),r=Eb(),i=Wb();function a(e){return n(e,i,r)}t.exports=a})),Kb=o(((e,t)=>{var n=Gb(),r=1,i=Object.prototype.hasOwnProperty;function a(e,t,a,o,s,c){var l=a&r,u=n(e),d=u.length;if(d!=n(t).length&&!l)return!1;for(var f=d;f--;){var p=u[f];if(!(l?p in t:i.call(t,p)))return!1}var m=c.get(e),h=c.get(t);if(m&&h)return m==t&&h==e;var g=!0;c.set(e,t),c.set(t,e);for(var _=l;++f<d;){p=u[f];var v=e[p],y=t[p];if(o)var b=l?o(y,v,p,t,e,c):o(v,y,p,e,t,c);if(!(b===void 0?v===y||s(v,y,a,o,c):b)){g=!1;break}_||=p==`constructor`}if(g&&!_){var x=e.constructor,S=t.constructor;x!=S&&`constructor`in e&&`constructor`in t&&!(typeof x==`function`&&x instanceof x&&typeof S==`function`&&S instanceof S)&&(g=!1)}return c.delete(e),c.delete(t),g}t.exports=a})),qb=o(((e,t)=>{t.exports=Ng()(wg(),`DataView`)})),Jb=o(((e,t)=>{t.exports=Ng()(wg(),`Promise`)})),Yb=o(((e,t)=>{t.exports=Ng()(wg(),`Set`)})),Xb=o(((e,t)=>{t.exports=Ng()(wg(),`WeakMap`)})),Zb=o(((e,t)=>{var n=qb(),r=Rg(),i=Jb(),a=Yb(),o=Xb(),s=Eg(),c=Mg(),l=`[object Map]`,u=`[object Object]`,d=`[object Promise]`,f=`[object Set]`,p=`[object WeakMap]`,m=`[object DataView]`,h=c(n),g=c(r),_=c(i),v=c(a),y=c(o),b=s;(n&&b(new n(new ArrayBuffer(1)))!=m||r&&b(new r)!=l||i&&b(i.resolve())!=d||a&&b(new a)!=f||o&&b(new o)!=p)&&(b=function(e){var t=s(e),n=t==u?e.constructor:void 0,r=n?c(n):``;if(r)switch(r){case h:return m;case g:return l;case _:return d;case v:return f;case y:return p}return t}),t.exports=b})),Qb=o(((e,t)=>{var n=db(),r=_b(),i=xb(),a=Kb(),o=Zb(),s=Sg(),c=jb(),l=Lb(),u=1,d=`[object Arguments]`,f=`[object Array]`,p=`[object Object]`,m=Object.prototype.hasOwnProperty;function h(e,t,h,g,_,v){var y=s(e),b=s(t),x=y?f:o(e),S=b?f:o(t);x=x==d?p:x,S=S==d?p:S;var C=x==p,w=S==p,T=x==S;if(T&&c(e)){if(!c(t))return!1;y=!0,C=!1}if(T&&!C)return v||=new n,y||l(e)?r(e,t,h,g,_,v):i(e,t,x,h,g,_,v);if(!(h&u)){var E=C&&m.call(e,`__wrapped__`),D=w&&m.call(t,`__wrapped__`);if(E||D){var O=E?e.value():e,k=D?t.value():t;return v||=new n,_(O,k,h,g,v)}}return T?(v||=new n,a(e,t,h,g,_,v)):!1}t.exports=h})),$b=o(((e,t)=>{var n=Qb(),r=Dg();function i(e,t,a,o,s){return e===t?!0:e==null||t==null||!r(e)&&!r(t)?e!==e&&t!==t:n(e,t,a,o,i,s)}t.exports=i})),ex=o(((e,t)=>{var n=db(),r=$b(),i=1,a=2;function o(e,t,o,s){var c=o.length,l=c,u=!s;if(e==null)return!l;for(e=Object(e);c--;){var d=o[c];if(u&&d[2]?d[1]!==e[d[0]]:!(d[0]in e))return!1}for(;++c<l;){d=o[c];var f=d[0],p=e[f],m=d[1];if(u&&d[2]){if(p===void 0&&!(f in e))return!1}else{var h=new n;if(s)var g=s(p,m,f,e,t,h);if(!(g===void 0?r(m,p,i|a,s,h):g))return!1}}return!0}t.exports=o})),tx=o(((e,t)=>{var n=Ag();function r(e){return e===e&&!n(e)}t.exports=r})),nx=o(((e,t)=>{var n=tx(),r=Wb();function i(e){for(var t=r(e),i=t.length;i--;){var a=t[i],o=e[a];t[i]=[a,o,n(o)]}return t}t.exports=i})),rx=o(((e,t)=>{function n(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}t.exports=n})),ix=o(((e,t)=>{var n=ex(),r=nx(),i=rx();function a(e){var t=r(e);return t.length==1&&t[0][2]?i(t[0][0],t[0][1]):function(r){return r===e||n(r,e,t)}}t.exports=a})),ax=o(((e,t)=>{function n(e,t){return e!=null&&t in Object(e)}t.exports=n})),ox=o(((e,t)=>{var n=Wg(),r=kb(),i=Sg(),a=Mb(),o=Nb(),s=Gg();function c(e,t,c){t=n(t,e);for(var l=-1,u=t.length,d=!1;++l<u;){var f=s(t[l]);if(!(d=e!=null&&c(e,f)))break;e=e[f]}return d||++l!=u?d:(u=e==null?0:e.length,!!u&&o(u)&&a(f,u)&&(i(e)||r(e)))}t.exports=c})),sx=o(((e,t)=>{var n=ax(),r=ox();function i(e,t){return e!=null&&r(e,t,n)}t.exports=i})),cx=o(((e,t)=>{var n=$b(),r=qg(),i=sx(),a=kg(),o=tx(),s=rx(),c=Gg(),l=1,u=2;function d(e,t){return a(e)&&o(t)?s(c(e),t):function(a){var o=r(a,e);return o===void 0&&o===t?i(a,e):n(t,o,l|u)}}t.exports=d})),lx=o(((e,t)=>{function n(e){return e}t.exports=n})),ux=o(((e,t)=>{function n(e){return function(t){return t?.[e]}}t.exports=n})),dx=o(((e,t)=>{var n=Kg();function r(e){return function(t){return n(t,e)}}t.exports=r})),fx=o(((e,t)=>{var n=ux(),r=dx(),i=kg(),a=Gg();function o(e){return i(e)?n(a(e)):r(e)}t.exports=o})),px=o(((e,t)=>{var n=ix(),r=cx(),i=lx(),a=Sg(),o=fx();function s(e){return typeof e==`function`?e:e==null?i:typeof e==`object`?a(e)?r(e[0],e[1]):n(e):o(e)}t.exports=s})),mx=o(((e,t)=>{function n(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}t.exports=n})),hx=o(((e,t)=>{function n(e){return e!==e}t.exports=n})),gx=o(((e,t)=>{function n(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}t.exports=n})),_x=o(((e,t)=>{var n=mx(),r=hx(),i=gx();function a(e,t,a){return t===t?i(e,t,a):n(e,r,a)}t.exports=a})),vx=o(((e,t)=>{var n=_x();function r(e,t){return!!(e!=null&&e.length)&&n(e,t,0)>-1}t.exports=r})),yx=o(((e,t)=>{function n(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}t.exports=n})),bx=o(((e,t)=>{function n(){}t.exports=n})),xx=o(((e,t)=>{var n=Yb(),r=bx(),i=bb();t.exports=n&&1/i(new n([,-0]))[1]==1/0?function(e){return new n(e)}:r})),Sx=o(((e,t)=>{var n=mb(),r=vx(),i=yx(),a=gb(),o=xx(),s=bb(),c=200;function l(e,t,l){var u=-1,d=r,f=e.length,p=!0,m=[],h=m;if(l)p=!1,d=i;else if(f>=c){var g=t?null:o(e);if(g)return s(g);p=!1,d=a,h=new n}else h=t?[]:m;outer:for(;++u<f;){var _=e[u],v=t?t(_):_;if(_=l||_!==0?_:0,p&&v===v){for(var y=h.length;y--;)if(h[y]===v)continue outer;t&&h.push(v),m.push(_)}else d(h,v,l)||(h!==m&&h.push(v),m.push(_))}return m}t.exports=l})),Cx=l(o(((e,t)=>{var n=px(),r=Sx();function i(e,t){return e&&e.length?r(e,n(t,2)):[]}t.exports=i}))());function wx(e,t,n){return t===!0?(0,Cx.default)(e,n):(0,m_.default)(t)?(0,Cx.default)(e,t):e}function Tx(e){"@babel/helpers - typeof";return Tx=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Tx(e)}var Wne=[`ref`];function Ex(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Dx(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Ex(Object(n),!0).forEach(function(t){Mx(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ex(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Gne(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function Ox(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,Nx(r.key),r)}}function Kne(e,t,n){return t&&Ox(e.prototype,t),n&&Ox(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function qne(e,t,n){return t=Ax(t),Jne(e,kx()?Reflect.construct(t,n||[],Ax(e).constructor):t.apply(e,n))}function Jne(e,t){if(t&&(Tx(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return Yne(e)}function Yne(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function kx(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kx=function(){return!!e})()}function Ax(e){return Ax=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ax(e)}function Xne(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,`prototype`,{writable:!1}),t&&jx(e,t)}function jx(e,t){return jx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},jx(e,t)}function Mx(e,t,n){return t=Nx(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nx(e){var t=Zne(e,`string`);return Tx(t)==`symbol`?t:t+``}function Zne(e,t){if(Tx(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Tx(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Qne(e,t){if(e==null)return{};var n=$ne(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $ne(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function ere(e){return e.value}function tre(e,t){if(_.isValidElement(e))return _.cloneElement(e,t);if(typeof e==`function`)return _.createElement(e,t);t.ref;var n=Qne(t,Wne);return _.createElement(ab,n)}var Px=1,Fx=function(e){function t(){var e;Gne(this,t);var n=[...arguments];return e=qne(this,t,[].concat(n)),Mx(e,`lastBoundingBox`,{width:-1,height:-1}),e}return Xne(t,e),Kne(t,[{key:`componentDidMount`,value:function(){this.updateBBox()}},{key:`componentDidUpdate`,value:function(){this.updateBBox()}},{key:`getBBox`,value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();return e.height=this.wrapperNode.offsetHeight,e.width=this.wrapperNode.offsetWidth,e}return null}},{key:`updateBBox`,value:function(){var e=this.props.onBBoxUpdate,t=this.getBBox();t?(Math.abs(t.width-this.lastBoundingBox.width)>Px||Math.abs(t.height-this.lastBoundingBox.height)>Px)&&(this.lastBoundingBox.width=t.width,this.lastBoundingBox.height=t.height,e&&e(t)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,e&&e(null))}},{key:`getBBoxSnapshot`,value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Dx({},this.lastBoundingBox):{width:0,height:0}}},{key:`getDefaultPosition`,value:function(e){var t=this.props,n=t.layout,r=t.align,i=t.verticalAlign,a=t.margin,o=t.chartWidth,s=t.chartHeight,c,l;if(!e||(e.left===void 0||e.left===null)&&(e.right===void 0||e.right===null))if(r===`center`&&n===`vertical`){var u=this.getBBoxSnapshot();c={left:((o||0)-u.width)/2}}else c=r===`right`?{right:a&&a.right||0}:{left:a&&a.left||0};if(!e||(e.top===void 0||e.top===null)&&(e.bottom===void 0||e.bottom===null))if(i===`middle`){var d=this.getBBoxSnapshot();l={top:((s||0)-d.height)/2}}else l=i===`bottom`?{bottom:a&&a.bottom||0}:{top:a&&a.top||0};return Dx(Dx({},c),l)}},{key:`render`,value:function(){var e=this,t=this.props,n=t.content,r=t.width,i=t.height,a=t.wrapperStyle,o=t.payloadUniqBy,s=t.payload,c=Dx(Dx({position:`absolute`,width:r||`auto`,height:i||`auto`},this.getDefaultPosition(a)),a);return _.createElement(`div`,{className:`recharts-legend-wrapper`,style:c,ref:function(t){e.wrapperNode=t}},tre(n,Dx(Dx({},this.props),{},{payload:wx(s,o,ere)})))}}],[{key:`getWithHeight`,value:function(e,t){var n=Dx(Dx({},this.defaultProps),e.props).layout;return n===`vertical`&&q(e.props.height)?{height:e.props.height}:n===`horizontal`?{width:e.props.width||t}:null}}])}(_.PureComponent);Mx(Fx,`displayName`,`Legend`),Mx(Fx,`defaultProps`,{iconSize:14,layout:`horizontal`,align:`center`,verticalAlign:`bottom`});var nre=o(((e,t)=>{var n=Tg(),r=kb(),i=Sg(),a=n?n.isConcatSpreadable:void 0;function o(e){return i(e)||r(e)||!!(a&&e&&e[a])}t.exports=o})),Ix=o(((e,t)=>{var n=Sb(),r=nre();function i(e,t,a,o,s){var c=-1,l=e.length;for(a||=r,s||=[];++c<l;){var u=e[c];t>0&&a(u)?t>1?i(u,t-1,a,o,s):n(s,u):o||(s[s.length]=u)}return s}t.exports=i})),rre=o(((e,t)=>{function n(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}t.exports=n})),ire=o(((e,t)=>{t.exports=rre()()})),Lx=o(((e,t)=>{var n=ire(),r=Wb();function i(e,t){return e&&n(e,t,r)}t.exports=i})),are=o(((e,t)=>{var n=Ub();function r(e,t){return function(r,i){if(r==null)return r;if(!n(r))return e(r,i);for(var a=r.length,o=t?a:-1,s=Object(r);(t?o--:++o<a)&&i(s[o],o,s)!==!1;);return r}}t.exports=r})),Rx=o(((e,t)=>{var n=Lx();t.exports=are()(n)})),zx=o(((e,t)=>{var n=Rx(),r=Ub();function i(e,t){var i=-1,a=r(e)?Array(e.length):[];return n(e,function(e,n,r){a[++i]=t(e,n,r)}),a}t.exports=i})),ore=o(((e,t)=>{function n(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}t.exports=n})),sre=o(((e,t)=>{var n=Og();function r(e,t){if(e!==t){var r=e!==void 0,i=e===null,a=e===e,o=n(e),s=t!==void 0,c=t===null,l=t===t,u=n(t);if(!c&&!u&&!o&&e>t||o&&s&&l&&!c&&!u||i&&s&&l||!r&&l||!a)return 1;if(!i&&!o&&!u&&e<t||u&&r&&a&&!i&&!o||c&&r&&a||!s&&a||!l)return-1}return 0}t.exports=r})),cre=o(((e,t)=>{var n=sre();function r(e,t,r){for(var i=-1,a=e.criteria,o=t.criteria,s=a.length,c=r.length;++i<s;){var l=n(a[i],o[i]);if(l)return i>=c?l:l*(r[i]==`desc`?-1:1)}return e.index-t.index}t.exports=r})),lre=o(((e,t)=>{var n=Hg(),r=Kg(),i=px(),a=zx(),o=ore(),s=Fb(),c=cre(),l=lx(),u=Sg();function d(e,t,d){t=t.length?n(t,function(e){return u(e)?function(t){return r(t,e.length===1?e[0]:e)}:e}):[l];var f=-1;return t=n(t,s(i)),o(a(e,function(e,r,i){return{criteria:n(t,function(t){return t(e)}),index:++f,value:e}}),function(e,t){return c(e,t,d)})}t.exports=d})),ure=o(((e,t)=>{function n(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}t.exports=n})),dre=o(((e,t)=>{var n=ure(),r=Math.max;function i(e,t,i){return t=r(t===void 0?e.length-1:t,0),function(){for(var a=arguments,o=-1,s=r(a.length-t,0),c=Array(s);++o<s;)c[o]=a[t+o];o=-1;for(var l=Array(t+1);++o<t;)l[o]=a[o];return l[t]=i(c),n(e,this,l)}}t.exports=i})),fre=o(((e,t)=>{function n(e){return function(){return e}}t.exports=n})),Bx=o(((e,t)=>{var n=Ng();t.exports=function(){try{var e=n(Object,`defineProperty`);return e({},``,{}),e}catch{}}()})),pre=o(((e,t)=>{var n=fre(),r=Bx(),i=lx();t.exports=r?function(e,t){return r(e,`toString`,{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:i})),mre=o(((e,t)=>{var n=800,r=16,i=Date.now;function a(e){var t=0,a=0;return function(){var o=i(),s=r-(o-a);if(a=o,s>0){if(++t>=n)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}t.exports=a})),hre=o(((e,t)=>{var n=pre();t.exports=mre()(n)})),gre=o(((e,t)=>{var n=lx(),r=dre(),i=hre();function a(e,t){return i(r(e,t,n),e+``)}t.exports=a})),Vx=o(((e,t)=>{var n=Fg(),r=Ub(),i=Mb(),a=Ag();function o(e,t,o){if(!a(o))return!1;var s=typeof t;return(s==`number`?r(o)&&i(t,o.length):s==`string`&&t in o)?n(o[t],e):!1}t.exports=o})),Hx=l(o(((e,t)=>{var n=Ix(),r=lre(),i=gre(),a=Vx();t.exports=i(function(e,t){if(e==null)return[];var i=t.length;return i>1&&a(e,t[0],t[1])?t=[]:i>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),r(e,n(t,1),[])})}))());function Ux(e){"@babel/helpers - typeof";return Ux=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Ux(e)}function Wx(){return Wx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wx.apply(this,arguments)}function _re(e,t){return xre(e)||bre(e,t)||yre(e,t)||vre()}function vre(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
121
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yre(e,t){if(e){if(typeof e==`string`)return Gx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gx(e,t)}}function Gx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function bre(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function xre(e){if(Array.isArray(e))return e}function Kx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function qx(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Kx(Object(n),!0).forEach(function(t){Sre(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kx(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Sre(e,t,n){return t=Cre(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cre(e){var t=wre(e,`string`);return Ux(t)==`symbol`?t:t+``}function wre(e,t){if(Ux(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Ux(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Tre(e){return Array.isArray(e)&&t_(e[0])&&t_(e[1])?e.join(` ~ `):e}var Ere=function(e){var t=e.separator,n=t===void 0?` : `:t,r=e.contentStyle,i=r===void 0?{}:r,a=e.itemStyle,o=a===void 0?{}:a,s=e.labelStyle,c=s===void 0?{}:s,l=e.payload,u=e.formatter,d=e.itemSorter,f=e.wrapperClassName,p=e.labelClassName,m=e.label,h=e.labelFormatter,g=e.accessibilityLayer,v=g===void 0?!1:g,y=function(){if(l&&l.length){var e={padding:0,margin:0},t=(d?(0,Hx.default)(l,d):l).map(function(e,t){if(e.type===`none`)return null;var r=qx({display:`block`,paddingTop:4,paddingBottom:4,color:e.color||`#000`},o),i=e.formatter||u||Tre,a=e.value,s=e.name,c=a,d=s;if(i&&c!=null&&d!=null){var f=i(a,s,e,t,l);if(Array.isArray(f)){var p=_re(f,2);c=p[0],d=p[1]}else c=f}return _.createElement(`li`,{className:`recharts-tooltip-item`,key:`tooltip-item-${t}`,style:r},t_(d)?_.createElement(`span`,{className:`recharts-tooltip-item-name`},d):null,t_(d)?_.createElement(`span`,{className:`recharts-tooltip-item-separator`},n):null,_.createElement(`span`,{className:`recharts-tooltip-item-value`},c),_.createElement(`span`,{className:`recharts-tooltip-item-unit`},e.unit||``))});return _.createElement(`ul`,{className:`recharts-tooltip-item-list`,style:e},t)}return null},b=qx({margin:0,padding:10,backgroundColor:`#fff`,border:`1px solid #ccc`,whiteSpace:`nowrap`},i),x=qx({margin:0},c),S=!(0,Qg.default)(m),C=S?m:``,w=Rt(`recharts-default-tooltip`,f),T=Rt(`recharts-tooltip-label`,p);S&&h&&l!=null&&(C=h(m,l));var E=v?{role:`status`,"aria-live":`assertive`}:{};return _.createElement(`div`,Wx({className:w,style:b},E),_.createElement(`p`,{className:T,style:x},_.isValidElement(C)?C:`${C}`),y())};function Jx(e){"@babel/helpers - typeof";return Jx=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Jx(e)}function Yx(e,t,n){return t=Dre(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dre(e){var t=Ore(e,`string`);return Jx(t)==`symbol`?t:t+``}function Ore(e,t){if(Jx(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Jx(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Xx=`recharts-tooltip-wrapper`,kre={visibility:`hidden`};function Are(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return Rt(Xx,Yx(Yx(Yx(Yx({},`${Xx}-right`,q(n)&&t&&q(t.x)&&n>=t.x),`${Xx}-left`,q(n)&&t&&q(t.x)&&n<t.x),`${Xx}-bottom`,q(r)&&t&&q(t.y)&&r>=t.y),`${Xx}-top`,q(r)&&t&&q(t.y)&&r<t.y))}function Zx(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,i=e.offsetTopLeft,a=e.position,o=e.reverseDirection,s=e.tooltipDimension,c=e.viewBox,l=e.viewBoxDimension;if(a&&q(a[r]))return a[r];var u=n[r]-s-i,d=n[r]+i;return t[r]?o[r]?u:d:o[r]?u<c[r]?Math.max(d,c[r]):Math.max(u,c[r]):d+s>c[r]+l?Math.max(u,c[r]):Math.max(d,c[r])}function jre(e){var t=e.translateX,n=e.translateY;return{transform:e.useTranslate3d?`translate3d(${t}px, ${n}px, 0)`:`translate(${t}px, ${n}px)`}}function Mre(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,s=e.useTranslate3d,c=e.viewBox,l,u,d;return o.height>0&&o.width>0&&n?(u=Zx({allowEscapeViewBox:t,coordinate:n,key:`x`,offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:c,viewBoxDimension:c.width}),d=Zx({allowEscapeViewBox:t,coordinate:n,key:`y`,offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:c,viewBoxDimension:c.height}),l=jre({translateX:u,translateY:d,useTranslate3d:s})):l=kre,{cssProperties:l,cssClasses:Are({translateX:u,translateY:d,coordinate:n})}}function Qx(e){"@babel/helpers - typeof";return Qx=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Qx(e)}function $x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function eS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?$x(Object(n),!0).forEach(function(t){aS(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$x(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Nre(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function tS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,oS(r.key),r)}}function Pre(e,t,n){return t&&tS(e.prototype,t),n&&tS(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function Fre(e,t,n){return t=rS(t),Ire(e,nS()?Reflect.construct(t,n||[],rS(e).constructor):t.apply(e,n))}function Ire(e,t){if(t&&(Qx(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return Lre(e)}function Lre(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function nS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(nS=function(){return!!e})()}function rS(e){return rS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},rS(e)}function Rre(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,`prototype`,{writable:!1}),t&&iS(e,t)}function iS(e,t){return iS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},iS(e,t)}function aS(e,t,n){return t=oS(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oS(e){var t=zre(e,`string`);return Qx(t)==`symbol`?t:t+``}function zre(e,t){if(Qx(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Qx(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var sS=1,Bre=function(e){function t(){var e;Nre(this,t);var n=[...arguments];return e=Fre(this,t,[].concat(n)),aS(e,`state`,{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),aS(e,`handleKeyDown`,function(t){t.key===`Escape`&&e.setState({dismissed:!0,dismissedAtCoordinate:{x:e.props.coordinate?.x??0,y:e.props.coordinate?.y??0}})}),e}return Rre(t,e),Pre(t,[{key:`updateBBox`,value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();(Math.abs(e.width-this.state.lastBoundingBox.width)>sS||Math.abs(e.height-this.state.lastBoundingBox.height)>sS)&&this.setState({lastBoundingBox:{width:e.width,height:e.height}})}else (this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:`componentDidMount`,value:function(){document.addEventListener(`keydown`,this.handleKeyDown),this.updateBBox()}},{key:`componentWillUnmount`,value:function(){document.removeEventListener(`keydown`,this.handleKeyDown)}},{key:`componentDidUpdate`,value:function(){this.props.active&&this.updateBBox(),this.state.dismissed&&(this.props.coordinate?.x!==this.state.dismissedAtCoordinate.x||this.props.coordinate?.y!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:`render`,value:function(){var e=this,t=this.props,n=t.active,r=t.allowEscapeViewBox,i=t.animationDuration,a=t.animationEasing,o=t.children,s=t.coordinate,c=t.hasPayload,l=t.isAnimationActive,u=t.offset,d=t.position,f=t.reverseDirection,p=t.useTranslate3d,m=t.viewBox,h=t.wrapperStyle,g=Mre({allowEscapeViewBox:r,coordinate:s,offsetTopLeft:u,position:d,reverseDirection:f,tooltipBox:this.state.lastBoundingBox,useTranslate3d:p,viewBox:m}),v=g.cssClasses,y=g.cssProperties,b=eS(eS({transition:l&&n?`transform ${i}ms ${a}`:void 0},y),{},{pointerEvents:`none`,visibility:!this.state.dismissed&&n&&c?`visible`:`hidden`,position:`absolute`,top:0,left:0},h);return _.createElement(`div`,{tabIndex:-1,className:v,style:b,ref:function(t){e.wrapperNode=t}},o)}}])}(_.PureComponent),cS={isSsr:function(){return!(typeof window<`u`&&window.document&&window.document.createElement&&window.setTimeout)}(),get:function(e){return cS[e]},set:function(e,t){if(typeof e==`string`)cS[e]=t;else{var n=Object.keys(e);n&&n.length&&n.forEach(function(t){cS[t]=e[t]})}}};function lS(e){"@babel/helpers - typeof";return lS=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},lS(e)}function uS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function dS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?uS(Object(n),!0).forEach(function(t){gS(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Vre(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function fS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,_S(r.key),r)}}function Hre(e,t,n){return t&&fS(e.prototype,t),n&&fS(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function Ure(e,t,n){return t=mS(t),Wre(e,pS()?Reflect.construct(t,n||[],mS(e).constructor):t.apply(e,n))}function Wre(e,t){if(t&&(lS(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return Gre(e)}function Gre(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function pS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(pS=function(){return!!e})()}function mS(e){return mS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},mS(e)}function Kre(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,`prototype`,{writable:!1}),t&&hS(e,t)}function hS(e,t){return hS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},hS(e,t)}function gS(e,t,n){return t=_S(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _S(e){var t=qre(e,`string`);return lS(t)==`symbol`?t:t+``}function qre(e,t){if(lS(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(lS(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Jre(e){return e.dataKey}function Yre(e,t){return _.isValidElement(e)?_.cloneElement(e,t):typeof e==`function`?_.createElement(e,t):_.createElement(Ere,t)}var vS=function(e){function t(){return Vre(this,t),Ure(this,t,arguments)}return Kre(t,e),Hre(t,[{key:`render`,value:function(){var e=this,t=this.props,n=t.active,r=t.allowEscapeViewBox,i=t.animationDuration,a=t.animationEasing,o=t.content,s=t.coordinate,c=t.filterNull,l=t.isAnimationActive,u=t.offset,d=t.payload,f=t.payloadUniqBy,p=t.position,m=t.reverseDirection,h=t.useTranslate3d,g=t.viewBox,v=t.wrapperStyle,y=d??[];c&&y.length&&(y=wx(d.filter(function(t){return t.value!=null&&(t.hide!==!0||e.props.includeHidden)}),f,Jre));var b=y.length>0;return _.createElement(Bre,{allowEscapeViewBox:r,animationDuration:i,animationEasing:a,isAnimationActive:l,active:n,coordinate:s,hasPayload:b,offset:u,position:p,reverseDirection:m,useTranslate3d:h,viewBox:g,wrapperStyle:v},Yre(o,dS(dS({},this.props),{},{payload:y})))}}])}(_.PureComponent);gS(vS,`displayName`,`Tooltip`),gS(vS,`defaultProps`,{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:`ease`,contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!cS.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:` : `,trigger:`hover`,useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var Xre=o(((e,t)=>{var n=wg();t.exports=function(){return n.Date.now()}})),Zre=o(((e,t)=>{var n=/\s/;function r(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t}t.exports=r})),Qre=o(((e,t)=>{var n=Zre(),r=/^\s+/;function i(e){return e&&e.slice(0,n(e)+1).replace(r,``)}t.exports=i})),yS=o(((e,t)=>{var n=Qre(),r=Ag(),i=Og(),a=NaN,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;function u(e){if(typeof e==`number`)return e;if(i(e))return a;if(r(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=r(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=n(e);var u=s.test(e);return u||c.test(e)?l(e.slice(2),u?2:8):o.test(e)?a:+e}t.exports=u})),$re=o(((e,t)=>{var n=Ag(),r=Xre(),i=yS(),a=`Expected a function`,o=Math.max,s=Math.min;function c(e,t,c){var l,u,d,f,p,m,h=0,g=!1,_=!1,v=!0;if(typeof e!=`function`)throw TypeError(a);t=i(t)||0,n(c)&&(g=!!c.leading,_=`maxWait`in c,d=_?o(i(c.maxWait)||0,t):d,v=`trailing`in c?!!c.trailing:v);function y(t){var n=l,r=u;return l=u=void 0,h=t,f=e.apply(r,n),f}function b(e){return h=e,p=setTimeout(C,t),g?y(e):f}function x(e){var n=e-m,r=e-h,i=t-n;return _?s(i,d-r):i}function S(e){var n=e-m,r=e-h;return m===void 0||n>=t||n<0||_&&r>=d}function C(){var e=r();if(S(e))return w(e);p=setTimeout(C,x(e))}function w(e){return p=void 0,v&&l?y(e):(l=u=void 0,f)}function T(){p!==void 0&&clearTimeout(p),h=0,l=m=u=p=void 0}function E(){return p===void 0?f:w(r())}function D(){var e=r(),n=S(e);if(l=arguments,u=this,m=e,n){if(p===void 0)return b(m);if(_)return clearTimeout(p),p=setTimeout(C,t),y(m)}return p===void 0&&(p=setTimeout(C,t)),f}return D.cancel=T,D.flush=E,D}t.exports=c})),bS=l(o(((e,t)=>{var n=$re(),r=Ag(),i=`Expected a function`;function a(e,t,a){var o=!0,s=!0;if(typeof e!=`function`)throw TypeError(i);return r(a)&&(o=`leading`in a?!!a.leading:o,s=`trailing`in a?!!a.trailing:s),n(e,t,{leading:o,maxWait:t,trailing:s})}t.exports=a}))());function xS(e){"@babel/helpers - typeof";return xS=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},xS(e)}function SS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function CS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?SS(Object(n),!0).forEach(function(t){eie(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function eie(e,t,n){return t=tie(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tie(e){var t=nie(e,`string`);return xS(t)==`symbol`?t:t+``}function nie(e,t){if(xS(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(xS(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function rie(e,t){return sie(e)||oie(e,t)||aie(e,t)||iie()}function iie(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
122
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aie(e,t){if(e){if(typeof e==`string`)return wS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wS(e,t)}}function wS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function oie(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function sie(e){if(Array.isArray(e))return e}var TS=(0,_.forwardRef)(function(e,t){var n=e.aspect,r=e.initialDimension,i=r===void 0?{width:-1,height:-1}:r,a=e.width,o=a===void 0?`100%`:a,s=e.height,c=s===void 0?`100%`:s,l=e.minWidth,u=l===void 0?0:l,d=e.minHeight,f=e.maxHeight,p=e.children,m=e.debounce,h=m===void 0?0:m,g=e.id,v=e.className,y=e.onResize,b=e.style,x=b===void 0?{}:b,S=(0,_.useRef)(null),C=(0,_.useRef)();C.current=y,(0,_.useImperativeHandle)(t,function(){return Object.defineProperty(S.current,`current`,{get:function(){return console.warn(`The usage of ref.current.current is deprecated and will no longer be supported.`),S.current},configurable:!0})});var w=rie((0,_.useState)({containerWidth:i.width,containerHeight:i.height}),2),T=w[0],E=w[1],D=(0,_.useCallback)(function(e,t){E(function(n){var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]);(0,_.useEffect)(function(){var e=function(e){var t,n=e[0].contentRect,r=n.width,i=n.height;D(r,i),(t=C.current)==null||t.call(C,r,i)};h>0&&(e=(0,bS.default)(e,h,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=S.current.getBoundingClientRect(),r=n.width,i=n.height;return D(r,i),t.observe(S.current),function(){t.disconnect()}},[D,h]);var O=(0,_.useMemo)(function(){var e=T.containerWidth,t=T.containerHeight;if(e<0||t<0)return null;G_(e_(o)||e_(c),`The width(%s) and height(%s) are both fixed numbers,
123
- maybe you don't need to use a ResponsiveContainer.`,o,c),G_(!n||n>0,`The aspect(%s) must be greater than zero.`,n);var r=e_(o)?e:o,i=e_(c)?t:c;n&&n>0&&(r?i=r/n:i&&(r=i*n),f&&i>f&&(i=f)),G_(r>0||i>0,`The width(%s) and height(%s) of chart should be greater than 0,
124
- please check the style of container, or the props width(%s) and height(%s),
125
- or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
126
- height and width.`,r,i,o,c,u,d,n);var a=!Array.isArray(p)&&v_(p.type).endsWith(`Chart`);return _.Children.map(p,function(e){return _.isValidElement(e)?(0,_.cloneElement)(e,CS({width:r,height:i},a?{style:CS({height:`100%`,width:`100%`,maxHeight:i,maxWidth:r},e.props.style)}:{})):e})},[n,p,c,f,d,u,T,o]);return _.createElement(`div`,{id:g?`${g}`:void 0,className:Rt(`recharts-responsive-container`,v),style:CS(CS({},x),{},{width:o,height:c,minWidth:u,minHeight:d,maxHeight:f}),ref:S},O)}),ES=function(e){return null};ES.displayName=`Cell`;function DS(e){"@babel/helpers - typeof";return DS=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},DS(e)}function OS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?OS(Object(n),!0).forEach(function(t){cie(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function cie(e,t,n){return t=lie(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lie(e){var t=uie(e,`string`);return DS(t)==`symbol`?t:t+``}function uie(e,t){if(DS(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(DS(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var AS={widthCache:{},cacheCount:0},die=2e3,fie={position:`absolute`,top:`-20000px`,left:0,padding:0,margin:0,border:`none`,whiteSpace:`pre`},jS=`recharts_measurement_span`;function pie(e){var t=kS({},e);return Object.keys(t).forEach(function(e){t[e]||delete t[e]}),t}var MS=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e==null||cS.isSsr)return{width:0,height:0};var n=pie(t),r=JSON.stringify({text:e,copyStyle:n});if(AS.widthCache[r])return AS.widthCache[r];try{var i=document.getElementById(jS);i||(i=document.createElement(`span`),i.setAttribute(`id`,jS),i.setAttribute(`aria-hidden`,`true`),document.body.appendChild(i));var a=kS(kS({},fie),n);Object.assign(i.style,a),i.textContent=`${e}`;var o=i.getBoundingClientRect(),s={width:o.width,height:o.height};return AS.widthCache[r]=s,++AS.cacheCount>die&&(AS.cacheCount=0,AS.widthCache={}),s}catch{return{width:0,height:0}}},mie=function(e){return{top:e.top+window.scrollY-document.documentElement.clientTop,left:e.left+window.scrollX-document.documentElement.clientLeft}};function NS(e){"@babel/helpers - typeof";return NS=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},NS(e)}function PS(e,t){return vie(e)||_ie(e,t)||gie(e,t)||hie()}function hie(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
127
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gie(e,t){if(e){if(typeof e==`string`)return FS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return FS(e,t)}}function FS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _ie(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function vie(e){if(Array.isArray(e))return e}function yie(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function IS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,xie(r.key),r)}}function bie(e,t,n){return t&&IS(e.prototype,t),n&&IS(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function xie(e){var t=Sie(e,`string`);return NS(t)==`symbol`?t:t+``}function Sie(e,t){if(NS(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(NS(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var LS=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,RS=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Cie=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,wie=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,zS={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Tie=Object.keys(zS),BS=`NaN`;function Eie(e,t){return e*zS[t]}var VS=function(){function e(t,n){yie(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=``),n!==``&&!Cie.test(n)&&(this.num=NaN,this.unit=``),Tie.includes(n)&&(this.num=Eie(t,n),this.unit=`px`)}return bie(e,[{key:`add`,value:function(t){return this.unit===t.unit?new e(this.num+t.num,this.unit):new e(NaN,``)}},{key:`subtract`,value:function(t){return this.unit===t.unit?new e(this.num-t.num,this.unit):new e(NaN,``)}},{key:`multiply`,value:function(t){return this.unit!==``&&t.unit!==``&&this.unit!==t.unit?new e(NaN,``):new e(this.num*t.num,this.unit||t.unit)}},{key:`divide`,value:function(t){return this.unit!==``&&t.unit!==``&&this.unit!==t.unit?new e(NaN,``):new e(this.num/t.num,this.unit||t.unit)}},{key:`toString`,value:function(){return`${this.num}${this.unit}`}},{key:`isNaN`,value:function(){return Number.isNaN(this.num)}}],[{key:`parse`,value:function(t){var n=PS(wie.exec(t)??[],3),r=n[1],i=n[2];return new e(parseFloat(r),i??``)}}])}();function HS(e){if(e.includes(BS))return BS;for(var t=e;t.includes(`*`)||t.includes(`/`);){var n=PS(LS.exec(t)??[],4),r=n[1],i=n[2],a=n[3],o=VS.parse(r??``),s=VS.parse(a??``),c=i===`*`?o.multiply(s):o.divide(s);if(c.isNaN())return BS;t=t.replace(LS,c.toString())}for(;t.includes(`+`)||/.-\d+(?:\.\d+)?/.test(t);){var l=PS(RS.exec(t)??[],4),u=l[1],d=l[2],f=l[3],p=VS.parse(u??``),m=VS.parse(f??``),h=d===`+`?p.add(m):p.subtract(m);if(h.isNaN())return BS;t=t.replace(RS,h.toString())}return t}var US=/\(([^()]*)\)/;function Die(e){for(var t=e;t.includes(`(`);){var n=PS(US.exec(t),2)[1];t=t.replace(US,HS(n))}return t}function Oie(e){var t=e.replace(/\s+/g,``);return t=Die(t),t=HS(t),t}function kie(e){try{return Oie(e)}catch{return BS}}function WS(e){var t=kie(e.slice(5,-1));return t===BS?``:t}var Aie=[`x`,`y`,`lineHeight`,`capHeight`,`scaleToFit`,`textAnchor`,`verticalAnchor`,`fill`],jie=[`dx`,`dy`,`angle`,`className`,`breakAll`];function GS(){return GS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},GS.apply(this,arguments)}function KS(e,t){if(e==null)return{};var n=Mie(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Mie(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function qS(e,t){return Iie(e)||Fie(e,t)||Pie(e,t)||Nie()}function Nie(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
128
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pie(e,t){if(e){if(typeof e==`string`)return JS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return JS(e,t)}}function JS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Fie(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Iie(e){if(Array.isArray(e))return e}var YS=/[ \f\n\r\t\v\u2028\u2029]+/,XS=function(e){var t=e.children,n=e.breakAll,r=e.style;try{var i=[];return(0,Qg.default)(t)||(i=n?t.toString().split(``):t.toString().split(YS)),{wordsWithComputedWidth:i.map(function(e){return{word:e,width:MS(e,r).width}}),spaceWidth:n?0:MS(`\xA0`,r).width}}catch{return null}},Lie=function(e,t,n,r,i){var a=e.maxLines,o=e.children,s=e.style,c=e.breakAll,l=q(a),u=o,d=function(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).reduce(function(e,t){var a=t.word,o=t.width,s=e[e.length-1];if(s&&(r==null||i||s.width+o+n<Number(r)))s.words.push(a),s.width+=o+n;else{var c={words:[a],width:o};e.push(c)}return e},[])},f=d(t),p=function(e){return e.reduce(function(e,t){return e.width>t.width?e:t})};if(!l)return f;for(var m=`…`,h=function(e){var t=XS({breakAll:c,style:s,children:u.slice(0,e)+m}).wordsWithComputedWidth,n=d(t);return[n.length>a||p(n).width>Number(r),n]},g=0,_=u.length-1,v=0,y;g<=_&&v<=u.length-1;){var b=Math.floor((g+_)/2),x=qS(h(b-1),2),S=x[0],C=x[1],w=qS(h(b),1)[0];if(!S&&!w&&(g=b+1),S&&w&&(_=b-1),!S&&w){y=C;break}v++}return y||f},ZS=function(e){return[{words:(0,Qg.default)(e)?[]:e.toString().split(YS)}]},Rie=function(e){var t=e.width,n=e.scaleToFit,r=e.children,i=e.style,a=e.breakAll,o=e.maxLines;if((t||n)&&!cS.isSsr){var s,c,l=XS({breakAll:a,children:r,style:i});if(l){var u=l.wordsWithComputedWidth,d=l.spaceWidth;s=u,c=d}else return ZS(r);return Lie({breakAll:a,children:r,maxLines:o,style:i},s,c,t,n)}return ZS(r)},QS=`#808080`,$S=function(e){var t=e.x,n=t===void 0?0:t,r=e.y,i=r===void 0?0:r,a=e.lineHeight,o=a===void 0?`1em`:a,s=e.capHeight,c=s===void 0?`0.71em`:s,l=e.scaleToFit,u=l===void 0?!1:l,d=e.textAnchor,f=d===void 0?`start`:d,p=e.verticalAnchor,m=p===void 0?`end`:p,h=e.fill,g=h===void 0?QS:h,v=KS(e,Aie),y=(0,_.useMemo)(function(){return Rie({breakAll:v.breakAll,children:v.children,maxLines:v.maxLines,scaleToFit:u,style:v.style,width:v.width})},[v.breakAll,v.children,v.maxLines,u,v.style,v.width]),b=v.dx,x=v.dy,S=v.angle,C=v.className,w=v.breakAll,T=KS(v,jie);if(!t_(n)||!t_(i))return null;var E=n+(q(b)?b:0),D=i+(q(x)?x:0),O;switch(m){case`start`:O=WS(`calc(${c})`);break;case`middle`:O=WS(`calc(${(y.length-1)/2} * -${o} + (${c} / 2))`);break;default:O=WS(`calc(${y.length-1} * -${o})`);break}var k=[];if(u){var A=y[0].width,j=v.width;k.push(`scale(${(q(j)?j/A:1)/A})`)}return S&&k.push(`rotate(${S}, ${E}, ${D})`),k.length&&(T.transform=k.join(` `)),_.createElement(`text`,GS({},J(T,!0),{x:E,y:D,className:Rt(`recharts-text`,C),textAnchor:f,fill:g.includes(`url`)?QS:g}),y.map(function(e,t){var n=e.words.join(w?``:` `);return _.createElement(`tspan`,{x:E,dy:t===0?O:o,key:`${n}-${t}`},n)}))};function eC(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function zie(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function tC(e){let t,n,r;e.length===2?(t=e===eC||e===zie?e:Bie,n=e,r=e):(t=eC,n=(t,n)=>eC(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function Bie(){return 0}function nC(e){return e===null?NaN:+e}function*Vie(e,t){if(t===void 0)for(let t of e)t!=null&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)(r=t(r,++n,e))!=null&&(r=+r)>=r&&(yield r)}}var rC=tC(eC),iC=rC.right;rC.left,tC(nC).center;var aC=class extends Map{constructor(e,t=Wie){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(let[t,n]of e)this.set(t,n)}get(e){return super.get(oC(this,e))}has(e){return super.has(oC(this,e))}set(e,t){return super.set(Hie(this,e),t)}delete(e){return super.delete(Uie(this,e))}};function oC({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function Hie({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Uie({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Wie(e){return typeof e==`object`&&e?e.valueOf():e}function Gie(e=eC){if(e===eC)return sC;if(typeof e!=`function`)throw TypeError(`compare is not a function`);return(t,n)=>{let r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function sC(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}var Kie=Math.sqrt(50),qie=Math.sqrt(10),Jie=Math.sqrt(2);function cC(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=Kie?10:a>=qie?5:a>=Jie?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?cC(e,t,n*2):[s,c,l]}function lC(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?cC(t,e,n):cC(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r)if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o;else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function uC(e,t,n){return t=+t,e=+e,n=+n,cC(e,t,n)[2]}function dC(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?uC(t,e,n):uC(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function fC(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n<t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function pC(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function mC(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?sC:Gie(i);r>n;){if(r-n>600){let a=r-n+1,o=t-n+1,s=Math.log(a),c=.5*Math.exp(2*s/3),l=.5*Math.sqrt(s*c*(a-c)/a)*(o-a/2<0?-1:1),u=Math.max(n,Math.floor(t-o*c/a+l)),d=Math.min(r,Math.floor(t+(a-o)*c/a+l));mC(e,t,u,d,i)}let a=e[t],o=n,s=r;for(hC(e,n,t),i(e[r],a)>0&&hC(e,n,r);o<s;){for(hC(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}i(e[n],a)===0?hC(e,n,s):(++s,hC(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function hC(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}function Yie(e,t,n){if(e=Float64Array.from(Vie(e,n)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return pC(e);if(t>=1)return fC(e);var r,i=(r-1)*t,a=Math.floor(i),o=fC(mC(e,a).subarray(0,a+1));return o+(pC(e.subarray(a+1))-o)*(i-a)}}function Xie(e,t,n=nC){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e);return o+(+n(e[a+1],a+1,e)-o)*(i-a)}}function Zie(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=Array(i);++r<i;)a[r]=e+r*n;return a}function gC(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function _C(e,t){switch(arguments.length){case 0:break;case 1:typeof e==`function`?this.interpolator(e):this.range(e);break;default:this.domain(e),typeof t==`function`?this.interpolator(t):this.range(t);break}return this}var vC=Symbol(`implicit`);function yC(){var e=new aC,t=[],n=[],r=vC;function i(i){let a=e.get(i);if(a===void 0){if(r!==vC)return r;e.set(i,a=t.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new aC;for(let r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return yC(t,n).unknown(r)},gC.apply(i,arguments),i}function bC(){var e=yC().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,c=0,l=0,u=.5;delete e.unknown;function d(){var e=t().length,d=i<r,f=d?i:r,p=d?r:i;a=(p-f)/Math.max(1,e-c+l*2),s&&(a=Math.floor(a)),f+=(p-f-a*(e-c))*u,o=a*(1-c),s&&(f=Math.round(f),o=Math.round(o));var m=Zie(e).map(function(e){return f+a*e});return n(d?m.reverse():m)}return e.domain=function(e){return arguments.length?(t(e),d()):t()},e.range=function(e){return arguments.length?([r,i]=e,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(e){return[r,i]=e,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(e){return arguments.length?(s=!!e,d()):s},e.padding=function(e){return arguments.length?(c=Math.min(1,l=+e),d()):c},e.paddingInner=function(e){return arguments.length?(c=Math.min(1,e),d()):c},e.paddingOuter=function(e){return arguments.length?(l=+e,d()):l},e.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},e.copy=function(){return bC(t(),[r,i]).round(s).paddingInner(c).paddingOuter(l).align(u)},gC.apply(d(),arguments)}function xC(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return xC(t())},e}function SC(){return xC(bC.apply(null,arguments).paddingInner(1))}function CC(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function wC(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function TC(){}var EC=.7,DC=1/EC,OC=`\\s*([+-]?\\d+)\\s*`,kC=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,AC=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,Qie=/^#([0-9a-f]{3,8})$/,$ie=RegExp(`^rgb\\(${OC},${OC},${OC}\\)$`),eae=RegExp(`^rgb\\(${AC},${AC},${AC}\\)$`),tae=RegExp(`^rgba\\(${OC},${OC},${OC},${kC}\\)$`),nae=RegExp(`^rgba\\(${AC},${AC},${AC},${kC}\\)$`),rae=RegExp(`^hsl\\(${kC},${AC},${AC}\\)$`),iae=RegExp(`^hsla\\(${kC},${AC},${AC},${kC}\\)$`),jC={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};CC(TC,PC,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:MC,formatHex:MC,formatHex8:aae,formatHsl:oae,formatRgb:NC,toString:NC});function MC(){return this.rgb().formatHex()}function aae(){return this.rgb().formatHex8()}function oae(){return GC(this).formatHsl()}function NC(){return this.rgb().formatRgb()}function PC(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=Qie.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?FC(t):n===3?new RC(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?IC(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?IC(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=$ie.exec(e))?new RC(t[1],t[2],t[3],1):(t=eae.exec(e))?new RC(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=tae.exec(e))?IC(t[1],t[2],t[3],t[4]):(t=nae.exec(e))?IC(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=rae.exec(e))?WC(t[1],t[2]/100,t[3]/100,1):(t=iae.exec(e))?WC(t[1],t[2]/100,t[3]/100,t[4]):jC.hasOwnProperty(e)?FC(jC[e]):e===`transparent`?new RC(NaN,NaN,NaN,0):null}function FC(e){return new RC(e>>16&255,e>>8&255,e&255,1)}function IC(e,t,n,r){return r<=0&&(e=t=n=NaN),new RC(e,t,n,r)}function sae(e){return e instanceof TC||(e=PC(e)),e?(e=e.rgb(),new RC(e.r,e.g,e.b,e.opacity)):new RC}function LC(e,t,n,r){return arguments.length===1?sae(e):new RC(e,t,n,r??1)}function RC(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}CC(RC,LC,wC(TC,{brighter(e){return e=e==null?DC:DC**+e,new RC(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?EC:EC**+e,new RC(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new RC(HC(this.r),HC(this.g),HC(this.b),VC(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:zC,formatHex:zC,formatHex8:cae,formatRgb:BC,toString:BC}));function zC(){return`#${UC(this.r)}${UC(this.g)}${UC(this.b)}`}function cae(){return`#${UC(this.r)}${UC(this.g)}${UC(this.b)}${UC((isNaN(this.opacity)?1:this.opacity)*255)}`}function BC(){let e=VC(this.opacity);return`${e===1?`rgb(`:`rgba(`}${HC(this.r)}, ${HC(this.g)}, ${HC(this.b)}${e===1?`)`:`, ${e})`}`}function VC(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function HC(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function UC(e){return e=HC(e),(e<16?`0`:``)+e.toString(16)}function WC(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new KC(e,t,n,r)}function GC(e){if(e instanceof KC)return new KC(e.h,e.s,e.l,e.opacity);if(e instanceof TC||(e=PC(e)),!e)return new KC;if(e instanceof KC)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new KC(o,s,c,e.opacity)}function lae(e,t,n,r){return arguments.length===1?GC(e):new KC(e,t,n,r??1)}function KC(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}CC(KC,lae,wC(TC,{brighter(e){return e=e==null?DC:DC**+e,new KC(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?EC:EC**+e,new KC(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new RC(YC(e>=240?e-240:e+120,i,r),YC(e,i,r),YC(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new KC(qC(this.h),JC(this.s),JC(this.l),VC(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=VC(this.opacity);return`${e===1?`hsl(`:`hsla(`}${qC(this.h)}, ${JC(this.s)*100}%, ${JC(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function qC(e){return e=(e||0)%360,e<0?e+360:e}function JC(e){return Math.max(0,Math.min(1,e||0))}function YC(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var XC=e=>()=>e;function uae(e,t){return function(n){return e+n*t}}function dae(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function fae(e){return(e=+e)==1?ZC:function(t,n){return n-t?dae(t,n,e):XC(isNaN(t)?n:t)}}function ZC(e,t){var n=t-e;return n?uae(e,n):XC(isNaN(e)?t:e)}var QC=(function e(t){var n=fae(t);function r(e,t){var r=n((e=LC(e)).r,(t=LC(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=ZC(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function pae(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function mae(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function hae(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=nw(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function gae(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function $C(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function _ae(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=nw(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var ew=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,tw=new RegExp(ew.source,`g`);function vae(e){return function(){return e}}function yae(e){return function(t){return e(t)+``}}function bae(e,t){var n=ew.lastIndex=tw.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=ew.exec(e))&&(i=tw.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:$C(r,i)})),n=tw.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?yae(c[0].x):vae(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function nw(e,t){var n=typeof t,r;return t==null||n===`boolean`?XC(t):(n===`number`?$C:n===`string`?(r=PC(t))?(t=r,QC):bae:t instanceof PC?QC:t instanceof Date?gae:mae(t)?pae:Array.isArray(t)?hae:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?_ae:$C)(e,t)}function rw(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function xae(e,t){t===void 0&&(t=e,e=nw);for(var n=0,r=t.length-1,i=t[0],a=Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return a[t](e-t)}}function Sae(e){return function(){return e}}function iw(e){return+e}var aw=[0,1];function ow(e){return e}function sw(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Sae(isNaN(t)?NaN:.5)}function Cae(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function wae(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=sw(i,r),a=n(o,a)):(r=sw(r,i),a=n(a,o)),function(e){return a(r(e))}}function Tae(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=sw(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=iC(e,t,1,r)-1;return a[n](i[n](t))}}function cw(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function lw(){var e=aw,t=aw,n=nw,r,i,a,o=ow,s,c,l;function u(){var n=Math.min(e.length,t.length);return o!==ow&&(o=Cae(e[0],e[n-1])),s=n>2?Tae:wae,c=l=null,d}function d(i){return i==null||isNaN(i=+i)?a:(c||=s(e.map(r),t,n))(r(o(i)))}return d.invert=function(n){return o(i((l||=s(t,e.map(r),$C))(n)))},d.domain=function(t){return arguments.length?(e=Array.from(t,iw),u()):e.slice()},d.range=function(e){return arguments.length?(t=Array.from(e),u()):t.slice()},d.rangeRound=function(e){return t=Array.from(e),n=rw,u()},d.clamp=function(e){return arguments.length?(o=e?!0:ow,u()):o!==ow},d.interpolate=function(e){return arguments.length?(n=e,u()):n},d.unknown=function(e){return arguments.length?(a=e,d):a},function(e,t){return r=e,i=t,u()}}function uw(){return lw()(ow,ow)}function Eae(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function dw(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function fw(e){return e=dw(Math.abs(e)),e?e[1]:NaN}function Dae(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function Oae(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var kae=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function pw(e){if(!(t=kae.exec(e)))throw Error(`invalid format: `+e);var t;return new mw({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}pw.prototype=mw.prototype;function mw(e){this.fill=e.fill===void 0?` `:e.fill+``,this.align=e.align===void 0?`>`:e.align+``,this.sign=e.sign===void 0?`-`:e.sign+``,this.symbol=e.symbol===void 0?``:e.symbol+``,this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?``:e.type+``}mw.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?`0`:``)+(this.width===void 0?``:Math.max(1,this.width|0))+(this.comma?`,`:``)+(this.precision===void 0?``:`.`+Math.max(0,this.precision|0))+(this.trim?`~`:``)+this.type};function hw(e){out:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case`.`:r=i=n;break;case`0`:r===0&&(r=n),i=n;break;default:if(!+e[n])break out;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var gw;function _w(e,t){var n=dw(e,t);if(!n)return gw=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(gw=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+dw(e,Math.max(0,t+a-1))[0]}function vw(e,t){var n=dw(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var yw={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:Eae,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>vw(e*100,t),r:vw,s:_w,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function bw(e){return e}var xw=Array.prototype.map,Sw=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function Cw(e){var t=e.grouping===void 0||e.thousands===void 0?bw:Dae(xw.call(e.grouping,Number),e.thousands+``),n=e.currency===void 0?``:e.currency[0]+``,r=e.currency===void 0?``:e.currency[1]+``,i=e.decimal===void 0?`.`:e.decimal+``,a=e.numerals===void 0?bw:Oae(xw.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?`−`:e.minus+``,c=e.nan===void 0?`NaN`:e.nan+``;function l(e,l){e=pw(e);var u=e.fill,d=e.align,f=e.sign,p=e.symbol,m=e.zero,h=e.width,g=e.comma,_=e.precision,v=e.trim,y=e.type;y===`n`?(g=!0,y=`g`):yw[y]||(_===void 0&&(_=12),v=!0,y=`g`),(m||u===`0`&&d===`=`)&&(m=!0,u=`0`,d=`=`);var b=(l&&l.prefix!==void 0?l.prefix:``)+(p===`$`?n:p===`#`&&/[boxX]/.test(y)?`0`+y.toLowerCase():``),x=(p===`$`?r:/[%p]/.test(y)?o:``)+(l&&l.suffix!==void 0?l.suffix:``),S=yw[y],C=/[defgprs%]/.test(y);_=_===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function w(e){var n=b,r=x,o,l,p;if(y===`c`)r=S(e)+r,e=``;else{e=+e;var w=e<0||1/e<0;if(e=isNaN(e)?c:S(Math.abs(e),_),v&&(e=hw(e)),w&&+e==0&&f!==`+`&&(w=!1),n=(w?f===`(`?f:s:f===`-`||f===`(`?``:f)+n,r=(y===`s`&&!isNaN(e)&&gw!==void 0?Sw[8+gw/3]:``)+r+(w&&f===`(`?`)`:``),C){for(o=-1,l=e.length;++o<l;)if(p=e.charCodeAt(o),48>p||p>57){r=(p===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}g&&!m&&(e=t(e,1/0));var T=n.length+e.length+r.length,E=T<h?Array(h-T+1).join(u):``;switch(g&&m&&(e=t(E+e,E.length?h-r.length:1/0),E=``),d){case`<`:e=n+e+r+E;break;case`=`:e=n+E+e+r;break;case`^`:e=E.slice(0,T=E.length>>1)+n+e+r+E.slice(T);break;default:e=E+n+e+r;break}return a(e)}return w.toString=function(){return e+``},w}function u(e,t){var n=Math.max(-8,Math.min(8,Math.floor(fw(t)/3)))*3,r=10**-n,i=l((e=pw(e),e.type=`f`,e),{suffix:Sw[8+n/3]});return function(e){return i(r*e)}}return{format:l,formatPrefix:u}}var ww,Tw,Ew;Dw({thousands:`,`,grouping:[3],currency:[`$`,``]});function Dw(e){return ww=Cw(e),Tw=ww.format,Ew=ww.formatPrefix,ww}function Ow(e){return Math.max(0,-fw(Math.abs(e)))}function kw(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(fw(t)/3)))*3-fw(Math.abs(e)))}function Aw(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,fw(t)-fw(e))+1}function jw(e,t,n,r){var i=dC(e,t,n),a;switch(r=pw(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=kw(i,o))&&(r.precision=a),Ew(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=Aw(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=Ow(i))&&(r.precision=a-(r.type===`%`)*2);break}return Tw(r)}function Mw(e){var t=e.domain;return e.ticks=function(e){var n=t();return lC(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return jw(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??=10;var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-- >0;){if(l=uC(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function Nw(){var e=uw();return e.copy=function(){return cw(e,Nw())},gC.apply(e,arguments),Mw(e)}function Pw(e){var t;function n(e){return e==null||isNaN(e=+e)?t:e}return n.invert=n,n.domain=n.range=function(t){return arguments.length?(e=Array.from(t,iw),n):e.slice()},n.unknown=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return Pw(e).unknown(t)},e=arguments.length?Array.from(e,iw):[0,1],Mw(n)}function Fw(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}function Iw(e){return Math.log(e)}function Lw(e){return Math.exp(e)}function Rw(e){return-Math.log(-e)}function zw(e){return-Math.exp(-e)}function Bw(e){return isFinite(e)?+(`1e`+e):e<0?0:e}function Vw(e){return e===10?Bw:e===Math.E?Math.exp:t=>e**+t}function Hw(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Uw(e){return(t,n)=>-e(-t,n)}function Ww(e){let t=e(Iw,Lw),n=t.domain,r=10,i,a;function o(){return i=Hw(r),a=Vw(r),n()[0]<0?(i=Uw(i),a=Uw(a),e(Rw,zw)):e(Iw,Lw),t}return t.base=function(e){return arguments.length?(r=+e,o()):r},t.domain=function(e){return arguments.length?(n(e),o()):n()},t.ticks=e=>{let t=n(),o=t[0],s=t[t.length-1],c=s<o;c&&([o,s]=[s,o]);let l=i(o),u=i(s),d,f,p=e==null?10:+e,m=[];if(!(r%1)&&u-l<p){if(l=Math.floor(l),u=Math.ceil(u),o>0){for(;l<=u;++l)for(d=1;d<r;++d)if(f=l<0?d/a(-l):d*a(l),!(f<o)){if(f>s)break;m.push(f)}}else for(;l<=u;++l)for(d=r-1;d>=1;--d)if(f=l>0?d/a(-l):d*a(l),!(f<o)){if(f>s)break;m.push(f)}m.length*2<p&&(m=lC(o,s,p))}else m=lC(l,u,Math.min(u-l,p)).map(a);return c?m.reverse():m},t.tickFormat=(e,n)=>{if(e??=10,n??=r===10?`s`:`,`,typeof n!=`function`&&(!(r%1)&&(n=pw(n)).precision==null&&(n.trim=!0),n=Tw(n)),e===1/0)return n;let o=Math.max(1,r*e/t.ticks().length);return e=>{let t=e/a(Math.round(i(e)));return t*r<r-.5&&(t*=r),t<=o?n(e):``}},t.nice=()=>n(Fw(n(),{floor:e=>a(Math.floor(i(e))),ceil:e=>a(Math.ceil(i(e)))})),t}function Gw(){let e=Ww(lw()).domain([1,10]);return e.copy=()=>cw(e,Gw()).base(e.base()),gC.apply(e,arguments),e}function Kw(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function qw(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Jw(e){var t=1,n=e(Kw(t),qw(t));return n.constant=function(n){return arguments.length?e(Kw(t=+n),qw(t)):t},Mw(n)}function Yw(){var e=Jw(lw());return e.copy=function(){return cw(e,Yw()).constant(e.constant())},gC.apply(e,arguments)}function Xw(e){return function(t){return t<0?-((-t)**+e):t**+e}}function Zw(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Qw(e){return e<0?-e*e:e*e}function $w(e){var t=e(ow,ow),n=1;function r(){return n===1?e(ow,ow):n===.5?e(Zw,Qw):e(Xw(n),Xw(1/n))}return t.exponent=function(e){return arguments.length?(n=+e,r()):n},Mw(t)}function eT(){var e=$w(lw());return e.copy=function(){return cw(e,eT()).exponent(e.exponent())},gC.apply(e,arguments),e}function tT(){return eT.apply(null,arguments).exponent(.5)}function nT(e){return Math.sign(e)*e*e}function rT(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function iT(){var e=uw(),t=[0,1],n=!1,r;function i(t){var i=rT(e(t));return isNaN(i)?r:n?Math.round(i):i}return i.invert=function(t){return e.invert(nT(t))},i.domain=function(t){return arguments.length?(e.domain(t),i):e.domain()},i.range=function(n){return arguments.length?(e.range((t=Array.from(n,iw)).map(nT)),i):t.slice()},i.rangeRound=function(e){return i.range(e).round(!0)},i.round=function(e){return arguments.length?(n=!!e,i):n},i.clamp=function(t){return arguments.length?(e.clamp(t),i):e.clamp()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return iT(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},gC.apply(i,arguments),Mw(i)}function aT(){var e=[],t=[],n=[],r;function i(){var r=0,i=Math.max(1,t.length);for(n=Array(i-1);++r<i;)n[r-1]=Xie(e,r/i);return a}function a(e){return e==null||isNaN(e=+e)?r:t[iC(n,e)]}return a.invertExtent=function(r){var i=t.indexOf(r);return i<0?[NaN,NaN]:[i>0?n[i-1]:e[0],i<n.length?n[i]:e[e.length-1]]},a.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)n!=null&&!isNaN(n=+n)&&e.push(n);return e.sort(eC),i()},a.range=function(e){return arguments.length?(t=Array.from(e),i()):t.slice()},a.unknown=function(e){return arguments.length?(r=e,a):r},a.quantiles=function(){return n.slice()},a.copy=function(){return aT().domain(e).range(t).unknown(r)},gC.apply(a,arguments)}function oT(){var e=0,t=1,n=1,r=[.5],i=[0,1],a;function o(e){return e!=null&&e<=e?i[iC(r,e,0,n)]:a}function s(){var i=-1;for(r=Array(n);++i<n;)r[i]=((i+1)*t-(i-n)*e)/(n+1);return o}return o.domain=function(n){return arguments.length?([e,t]=n,e=+e,t=+t,s()):[e,t]},o.range=function(e){return arguments.length?(n=(i=Array.from(e)).length-1,s()):i.slice()},o.invertExtent=function(a){var o=i.indexOf(a);return o<0?[NaN,NaN]:o<1?[e,r[0]]:o>=n?[r[n-1],t]:[r[o-1],r[o]]},o.unknown=function(e){return arguments.length&&(a=e),o},o.thresholds=function(){return r.slice()},o.copy=function(){return oT().domain([e,t]).range(i).unknown(a)},gC.apply(Mw(o),arguments)}function sT(){var e=[.5],t=[0,1],n,r=1;function i(i){return i!=null&&i<=i?t[iC(e,i,0,r)]:n}return i.domain=function(n){return arguments.length?(e=Array.from(n),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(n){return arguments.length?(t=Array.from(n),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(n){var r=t.indexOf(n);return[e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(n=e,i):n},i.copy=function(){return sT().domain(e).range(t).unknown(n)},gC.apply(i,arguments)}var cT=new Date,lT=new Date;function uT(e,t,n,r){function i(t){return e(t=arguments.length===0?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{let t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),n==null?1:Math.floor(n)),e),i.range=(n,r,a)=>{let o=[];if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n<r)||!(a>0))return o;let s;do o.push(s=new Date(+n)),t(n,a),e(n);while(s<n&&n<r);return o},i.filter=n=>uT(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(cT.setTime(+t),lT.setTime(+r),e(cT),e(lT),Math.floor(n(cT,lT))),i.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i)),i}var dT=uT(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);dT.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?uT(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):dT),dT.range;var fT=1e3,pT=fT*60,mT=pT*60,hT=mT*24,gT=hT*7,_T=hT*30,vT=hT*365,yT=uT(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*fT)},(e,t)=>(t-e)/fT,e=>e.getUTCSeconds());yT.range;var bT=uT(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*fT)},(e,t)=>{e.setTime(+e+t*pT)},(e,t)=>(t-e)/pT,e=>e.getMinutes());bT.range;var xT=uT(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*pT)},(e,t)=>(t-e)/pT,e=>e.getUTCMinutes());xT.range;var ST=uT(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*fT-e.getMinutes()*pT)},(e,t)=>{e.setTime(+e+t*mT)},(e,t)=>(t-e)/mT,e=>e.getHours());ST.range;var CT=uT(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*mT)},(e,t)=>(t-e)/mT,e=>e.getUTCHours());CT.range;var wT=uT(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*pT)/hT,e=>e.getDate()-1);wT.range;var TT=uT(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/hT,e=>e.getUTCDate()-1);TT.range;var ET=uT(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/hT,e=>Math.floor(e/hT));ET.range;function DT(e){return uT(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*pT)/gT)}var OT=DT(0),kT=DT(1),AT=DT(2),jT=DT(3),MT=DT(4),NT=DT(5),PT=DT(6);OT.range,kT.range,AT.range,jT.range,MT.range,NT.range,PT.range;function FT(e){return uT(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/gT)}var IT=FT(0),LT=FT(1),RT=FT(2),zT=FT(3),BT=FT(4),VT=FT(5),HT=FT(6);IT.range,LT.range,RT.range,zT.range,BT.range,VT.range,HT.range;var UT=uT(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());UT.range;var WT=uT(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());WT.range;var GT=uT(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());GT.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:uT(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),GT.range;var KT=uT(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());KT.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:uT(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),KT.range;function qT(e,t,n,r,i,a){let o=[[yT,1,fT],[yT,5,5*fT],[yT,15,15*fT],[yT,30,30*fT],[a,1,pT],[a,5,5*pT],[a,15,15*pT],[a,30,30*pT],[i,1,mT],[i,3,3*mT],[i,6,6*mT],[i,12,12*mT],[r,1,hT],[r,2,2*hT],[n,1,gT],[t,1,_T],[t,3,3*_T],[e,1,vT]];function s(e,t,n){let r=t<e;r&&([e,t]=[t,e]);let i=n&&typeof n.range==`function`?n:c(e,t,n),a=i?i.range(e,+t+1):[];return r?a.reverse():a}function c(t,n,r){let i=Math.abs(n-t)/r,a=tC(([,,e])=>e).right(o,i);if(a===o.length)return e.every(dC(t/vT,n/vT,r));if(a===0)return dT.every(Math.max(dC(t,n,r),1));let[s,c]=o[i/o[a-1][2]<o[a][2]/i?a-1:a];return s.every(c)}return[s,c]}var[JT,YT]=qT(KT,WT,IT,ET,CT,xT),[XT,ZT]=qT(GT,UT,OT,wT,ST,bT);function QT(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function $T(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function eE(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function tE(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,l=cE(i),u=lE(i),d=cE(a),f=lE(a),p=cE(o),m=lE(o),h=cE(s),g=lE(s),_=cE(c),v=lE(c),y={a:N,A:P,b:F,B:I,c:null,d:AE,e:AE,f:FE,g:KE,G:JE,H:jE,I:ME,j:NE,L:PE,m:IE,M:LE,p:L,q:R,Q:_D,s:vD,S:RE,u:zE,U:BE,V:HE,w:UE,W:WE,x:null,X:null,y:GE,Y:qE,Z:YE,"%":gD},b={a:ee,A:te,b:ne,B:re,c:null,d:XE,e:XE,f:tD,g:fD,G:mD,H:ZE,I:QE,j:$E,L:eD,m:nD,M:rD,p:ie,q:ae,Q:_D,s:vD,S:iD,u:aD,U:oD,V:cD,w:lD,W:uD,x:null,X:null,y:dD,Y:pD,Z:hD,"%":gD},x={a:E,A:D,b:O,B:k,c:A,d:bE,e:bE,f:EE,g:gE,G:hE,H:SE,I:SE,j:xE,L:TE,m:yE,M:CE,p:T,q:vE,Q:OE,s:kE,S:wE,u:dE,U:fE,V:pE,w:uE,W:mE,x:j,X:M,y:gE,Y:hE,Z:_E,"%":DE};y.x=S(n,y),y.X=S(r,y),y.c=S(t,y),b.x=S(n,b),b.X=S(r,b),b.c=S(t,b);function S(e,t){return function(n){var r=[],i=-1,a=0,o=e.length,s,c,l;for(n instanceof Date||(n=new Date(+n));++i<o;)e.charCodeAt(i)===37&&(r.push(e.slice(a,i)),(c=nE[s=e.charAt(++i)])==null?c=s===`e`?` `:`0`:s=e.charAt(++i),(l=t[s])&&(s=l(n,c)),r.push(s),a=i+1);return r.push(e.slice(a,i)),r.join(``)}}function C(e,t){return function(n){var r=eE(1900,void 0,1),i=w(r,e,n+=``,0),a,o;if(i!=n.length)return null;if(`Q`in r)return new Date(r.Q);if(`s`in r)return new Date(r.s*1e3+(`L`in r?r.L:0));if(t&&!(`Z`in r)&&(r.Z=0),`p`in r&&(r.H=r.H%12+r.p*12),r.m===void 0&&(r.m=`q`in r?r.q:0),`V`in r){if(r.V<1||r.V>53)return null;`w`in r||(r.w=1),`Z`in r?(a=$T(eE(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?LT.ceil(a):LT(a),a=TT.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=QT(eE(r.y,0,1)),o=a.getDay(),a=o>4||o===0?kT.ceil(a):kT(a),a=wT.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else (`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:`W`in r?1:0),o=`Z`in r?$T(eE(r.y,0,1)).getUTCDay():QT(eE(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,$T(r)):QT(r)}}function w(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i<a;){if(r>=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=x[s in nE?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function T(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function E(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}function k(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1}function A(e,n,r){return w(e,t,n,r)}function j(e,t,r){return w(e,n,t,r)}function M(e,t,n){return w(e,r,t,n)}function N(e){return o[e.getDay()]}function P(e){return a[e.getDay()]}function F(e){return c[e.getMonth()]}function I(e){return s[e.getMonth()]}function L(e){return i[+(e.getHours()>=12)]}function R(e){return 1+~~(e.getMonth()/3)}function ee(e){return o[e.getUTCDay()]}function te(e){return a[e.getUTCDay()]}function ne(e){return c[e.getUTCMonth()]}function re(e){return s[e.getUTCMonth()]}function ie(e){return i[+(e.getUTCHours()>=12)]}function ae(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var nE={"-":``,_:` `,0:`0`},rE=/^\s*\d+/,iE=/^%/,aE=/[\\^$*+?|[\]().{}]/g;function oE(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a<n?Array(n-a+1).join(t)+i:i)}function sE(e){return e.replace(aE,`\\$&`)}function cE(e){return RegExp(`^(?:`+e.map(sE).join(`|`)+`)`,`i`)}function lE(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function uE(e,t,n){var r=rE.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function dE(e,t,n){var r=rE.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function fE(e,t,n){var r=rE.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function pE(e,t,n){var r=rE.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function mE(e,t,n){var r=rE.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function hE(e,t,n){var r=rE.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function gE(e,t,n){var r=rE.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function _E(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||`00`)),n+r[0].length):-1}function vE(e,t,n){var r=rE.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function yE(e,t,n){var r=rE.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function bE(e,t,n){var r=rE.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function xE(e,t,n){var r=rE.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function SE(e,t,n){var r=rE.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function CE(e,t,n){var r=rE.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function wE(e,t,n){var r=rE.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function TE(e,t,n){var r=rE.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function EE(e,t,n){var r=rE.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function DE(e,t,n){var r=iE.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function OE(e,t,n){var r=rE.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function kE(e,t,n){var r=rE.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function AE(e,t){return oE(e.getDate(),t,2)}function jE(e,t){return oE(e.getHours(),t,2)}function ME(e,t){return oE(e.getHours()%12||12,t,2)}function NE(e,t){return oE(1+wT.count(GT(e),e),t,3)}function PE(e,t){return oE(e.getMilliseconds(),t,3)}function FE(e,t){return PE(e,t)+`000`}function IE(e,t){return oE(e.getMonth()+1,t,2)}function LE(e,t){return oE(e.getMinutes(),t,2)}function RE(e,t){return oE(e.getSeconds(),t,2)}function zE(e){var t=e.getDay();return t===0?7:t}function BE(e,t){return oE(OT.count(GT(e)-1,e),t,2)}function VE(e){var t=e.getDay();return t>=4||t===0?MT(e):MT.ceil(e)}function HE(e,t){return e=VE(e),oE(MT.count(GT(e),e)+(GT(e).getDay()===4),t,2)}function UE(e){return e.getDay()}function WE(e,t){return oE(kT.count(GT(e)-1,e),t,2)}function GE(e,t){return oE(e.getFullYear()%100,t,2)}function KE(e,t){return e=VE(e),oE(e.getFullYear()%100,t,2)}function qE(e,t){return oE(e.getFullYear()%1e4,t,4)}function JE(e,t){var n=e.getDay();return e=n>=4||n===0?MT(e):MT.ceil(e),oE(e.getFullYear()%1e4,t,4)}function YE(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+oE(t/60|0,`0`,2)+oE(t%60,`0`,2)}function XE(e,t){return oE(e.getUTCDate(),t,2)}function ZE(e,t){return oE(e.getUTCHours(),t,2)}function QE(e,t){return oE(e.getUTCHours()%12||12,t,2)}function $E(e,t){return oE(1+TT.count(KT(e),e),t,3)}function eD(e,t){return oE(e.getUTCMilliseconds(),t,3)}function tD(e,t){return eD(e,t)+`000`}function nD(e,t){return oE(e.getUTCMonth()+1,t,2)}function rD(e,t){return oE(e.getUTCMinutes(),t,2)}function iD(e,t){return oE(e.getUTCSeconds(),t,2)}function aD(e){var t=e.getUTCDay();return t===0?7:t}function oD(e,t){return oE(IT.count(KT(e)-1,e),t,2)}function sD(e){var t=e.getUTCDay();return t>=4||t===0?BT(e):BT.ceil(e)}function cD(e,t){return e=sD(e),oE(BT.count(KT(e),e)+(KT(e).getUTCDay()===4),t,2)}function lD(e){return e.getUTCDay()}function uD(e,t){return oE(LT.count(KT(e)-1,e),t,2)}function dD(e,t){return oE(e.getUTCFullYear()%100,t,2)}function fD(e,t){return e=sD(e),oE(e.getUTCFullYear()%100,t,2)}function pD(e,t){return oE(e.getUTCFullYear()%1e4,t,4)}function mD(e,t){var n=e.getUTCDay();return e=n>=4||n===0?BT(e):BT.ceil(e),oE(e.getUTCFullYear()%1e4,t,4)}function hD(){return`+0000`}function gD(){return`%`}function _D(e){return+e}function vD(e){return Math.floor(e/1e3)}var yD,bD,xD;SD({dateTime:`%x, %X`,date:`%-m/%-d/%Y`,time:`%-I:%M:%S %p`,periods:[`AM`,`PM`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`]});function SD(e){return yD=tE(e),bD=yD.format,yD.parse,xD=yD.utcFormat,yD.utcParse,yD}function CD(e){return new Date(e)}function wD(e){return e instanceof Date?+e:+new Date(+e)}function TD(e,t,n,r,i,a,o,s,c,l){var u=uw(),d=u.invert,f=u.domain,p=l(`.%L`),m=l(`:%S`),h=l(`%I:%M`),g=l(`%I %p`),_=l(`%a %d`),v=l(`%b %d`),y=l(`%B`),b=l(`%Y`);function x(e){return(c(e)<e?p:s(e)<e?m:o(e)<e?h:a(e)<e?g:r(e)<e?i(e)<e?_:v:n(e)<e?y:b)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?f(Array.from(e,wD)):f().map(CD)},u.ticks=function(t){var n=f();return e(n[0],n[n.length-1],t??10)},u.tickFormat=function(e,t){return t==null?x:l(t)},u.nice=function(e){var n=f();return(!e||typeof e.range!=`function`)&&(e=t(n[0],n[n.length-1],e??10)),e?f(Fw(n,e)):u},u.copy=function(){return cw(u,TD(e,t,n,r,i,a,o,s,c,l))},u}function ED(){return gC.apply(TD(XT,ZT,GT,UT,OT,wT,ST,bT,yT,bD).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function DD(){return gC.apply(TD(JT,YT,KT,WT,IT,TT,CT,xT,yT,xD).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function OD(){var e=0,t=1,n,r,i,a,o=ow,s=!1,c;function l(e){return e==null||isNaN(e=+e)?c:o(i===0?.5:(e=(a(e)-n)*i,s?Math.max(0,Math.min(1,e)):e))}l.domain=function(o){return arguments.length?([e,t]=o,n=a(e=+e),r=a(t=+t),i=n===r?0:1/(r-n),l):[e,t]},l.clamp=function(e){return arguments.length?(s=!!e,l):s},l.interpolator=function(e){return arguments.length?(o=e,l):o};function u(e){return function(t){var n,r;return arguments.length?([n,r]=t,o=e(n,r),l):[o(0),o(1)]}}return l.range=u(nw),l.rangeRound=u(rw),l.unknown=function(e){return arguments.length?(c=e,l):c},function(o){return a=o,n=o(e),r=o(t),i=n===r?0:1/(r-n),l}}function kD(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function AD(){var e=Mw(OD()(ow));return e.copy=function(){return kD(e,AD())},_C.apply(e,arguments)}function jD(){var e=Ww(OD()).domain([1,10]);return e.copy=function(){return kD(e,jD()).base(e.base())},_C.apply(e,arguments)}function MD(){var e=Jw(OD());return e.copy=function(){return kD(e,MD()).constant(e.constant())},_C.apply(e,arguments)}function ND(){var e=$w(OD());return e.copy=function(){return kD(e,ND()).exponent(e.exponent())},_C.apply(e,arguments)}function PD(){return ND.apply(null,arguments).exponent(.5)}function FD(){var e=[],t=ow;function n(n){if(n!=null&&!isNaN(n=+n))return t((iC(e,n,1)-1)/(e.length-1))}return n.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)n!=null&&!isNaN(n=+n)&&e.push(n);return e.sort(eC),n},n.interpolator=function(e){return arguments.length?(t=e,n):t},n.range=function(){return e.map((n,r)=>t(r/(e.length-1)))},n.quantiles=function(t){return Array.from({length:t+1},(n,r)=>Yie(e,r/t))},n.copy=function(){return FD(t).domain(e)},_C.apply(n,arguments)}function ID(){var e=0,t=.5,n=1,r=1,i,a,o,s,c,l=ow,u,d=!1,f;function p(e){return isNaN(e=+e)?f:(e=.5+((e=+u(e))-a)*(r*e<r*a?s:c),l(d?Math.max(0,Math.min(1,e)):e))}p.domain=function(l){return arguments.length?([e,t,n]=l,i=u(e=+e),a=u(t=+t),o=u(n=+n),s=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),r=a<i?-1:1,p):[e,t,n]},p.clamp=function(e){return arguments.length?(d=!!e,p):d},p.interpolator=function(e){return arguments.length?(l=e,p):l};function m(e){return function(t){var n,r,i;return arguments.length?([n,r,i]=t,l=xae(e,[n,r,i]),p):[l(0),l(.5),l(1)]}}return p.range=m(nw),p.rangeRound=m(rw),p.unknown=function(e){return arguments.length?(f=e,p):f},function(l){return u=l,i=l(e),a=l(t),o=l(n),s=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),r=a<i?-1:1,p}}function LD(){var e=Mw(ID()(ow));return e.copy=function(){return kD(e,LD())},_C.apply(e,arguments)}function RD(){var e=Ww(ID()).domain([.1,1,10]);return e.copy=function(){return kD(e,RD()).base(e.base())},_C.apply(e,arguments)}function zD(){var e=Jw(ID());return e.copy=function(){return kD(e,zD()).constant(e.constant())},_C.apply(e,arguments)}function BD(){var e=$w(ID());return e.copy=function(){return kD(e,BD()).exponent(e.exponent())},_C.apply(e,arguments)}function VD(){return BD.apply(null,arguments).exponent(.5)}var HD=s({scaleBand:()=>bC,scaleDiverging:()=>LD,scaleDivergingLog:()=>RD,scaleDivergingPow:()=>BD,scaleDivergingSqrt:()=>VD,scaleDivergingSymlog:()=>zD,scaleIdentity:()=>Pw,scaleImplicit:()=>vC,scaleLinear:()=>Nw,scaleLog:()=>Gw,scaleOrdinal:()=>yC,scalePoint:()=>SC,scalePow:()=>eT,scaleQuantile:()=>aT,scaleQuantize:()=>oT,scaleRadial:()=>iT,scaleSequential:()=>AD,scaleSequentialLog:()=>jD,scaleSequentialPow:()=>ND,scaleSequentialQuantile:()=>FD,scaleSequentialSqrt:()=>PD,scaleSequentialSymlog:()=>MD,scaleSqrt:()=>tT,scaleSymlog:()=>Yw,scaleThreshold:()=>sT,scaleTime:()=>ED,scaleUtc:()=>DD,tickFormat:()=>jw}),UD=o(((e,t)=>{var n=Og();function r(e,t,r){for(var i=-1,a=e.length;++i<a;){var o=e[i],s=t(o);if(s!=null&&(c===void 0?s===s&&!n(s):r(s,c)))var c=s,l=o}return l}t.exports=r})),WD=o(((e,t)=>{function n(e,t){return e>t}t.exports=n})),GD=o(((e,t)=>{var n=UD(),r=WD(),i=lx();function a(e){return e&&e.length?n(e,i,r):void 0}t.exports=a})),KD=o(((e,t)=>{function n(e,t){return e<t}t.exports=n})),qD=o(((e,t)=>{var n=UD(),r=KD(),i=lx();function a(e){return e&&e.length?n(e,i,r):void 0}t.exports=a})),JD=o(((e,t)=>{var n=Hg(),r=px(),i=zx(),a=Sg();function o(e,t){return(a(e)?n:i)(e,r(t,3))}t.exports=o})),YD=o(((e,t)=>{var n=Ix(),r=JD();function i(e,t){return n(r(e,t),1)}t.exports=i})),XD=o(((e,t)=>{var n=$b();function r(e,t){return n(e,t)}t.exports=r})),ZD=o(((e,t)=>{(function(e){var n=1e9,r={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:`2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286`},i=!0,a=`[DecimalError] `,o=a+`Invalid argument: `,s=a+`Exponent out of range: `,c=Math.floor,l=Math.pow,u=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,d,f=1e7,p=7,m=9007199254740991,h=c(m/p),g={};g.absoluteValue=g.abs=function(){var e=new this.constructor(this);return e.s&&=1,e},g.comparedTo=g.cmp=function(e){var t,n,r,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(r=a.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return r===i?0:r>i^a.s<0?1:-1},g.decimalPlaces=g.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*p;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n},g.dividedBy=g.div=function(e){return b(this,new this.constructor(e))},g.dividedToIntegerBy=g.idiv=function(e){var t=this,n=t.constructor;return D(b(t,new n(e),0,1),n.precision)},g.equals=g.eq=function(e){return!this.cmp(e)},g.exponent=function(){return S(this)},g.greaterThan=g.gt=function(e){return this.cmp(e)>0},g.greaterThanOrEqualTo=g.gte=function(e){return this.cmp(e)>=0},g.isInteger=g.isint=function(){return this.e>this.d.length-2},g.isNegative=g.isneg=function(){return this.s<0},g.isPositive=g.ispos=function(){return this.s>0},g.isZero=function(){return this.s===0},g.lessThan=g.lt=function(e){return this.cmp(e)<0},g.lessThanOrEqualTo=g.lte=function(e){return this.cmp(e)<1},g.logarithm=g.log=function(e){var t,n=this,r=n.constructor,o=r.precision,s=o+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(d))throw Error(a+`NaN`);if(n.s<1)throw Error(a+(n.s?`NaN`:`-Infinity`));return n.eq(d)?new r(0):(i=!1,t=b(T(n,s),T(e,s),s),i=!0,D(t,o))},g.minus=g.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?O(t,e):_(t,(e.s=-e.s,e))},g.modulo=g.mod=function(e){var t,n=this,r=n.constructor,o=r.precision;if(e=new r(e),!e.s)throw Error(a+`NaN`);return n.s?(i=!1,t=b(n,e,0,1).times(e),i=!0,n.minus(t)):D(new r(n),o)},g.naturalExponential=g.exp=function(){return x(this)},g.naturalLogarithm=g.ln=function(){return T(this)},g.negated=g.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},g.plus=g.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?_(t,e):O(t,(e.s=-e.s,e))},g.precision=g.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(o+e);if(t=S(i)+1,r=i.d.length-1,n=r*p+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},g.squareRoot=g.sqrt=function(){var e,t,n,r,o,s,l,u=this,d=u.constructor;if(u.s<1){if(!u.s)return new d(0);throw Error(a+`NaN`)}for(e=S(u),i=!1,o=Math.sqrt(+u),o==0||o==1/0?(t=y(u.d),(t.length+e)%2==0&&(t+=`0`),o=Math.sqrt(t),e=c((e+1)/2)-(e<0||e%2),o==1/0?t=`5e`+e:(t=o.toExponential(),t=t.slice(0,t.indexOf(`e`)+1)+e),r=new d(t)):r=new d(o.toString()),n=d.precision,o=l=n+3;;)if(s=r,r=s.plus(b(u,s,l+2)).times(.5),y(s.d).slice(0,l)===(t=y(r.d)).slice(0,l)){if(t=t.slice(l-3,l+1),o==l&&t==`4999`){if(D(s,n+1,0),s.times(s).eq(u)){r=s;break}}else if(t!=`9999`)break;l+=4}return i=!0,D(r,n)},g.times=g.mul=function(e){var t,n,r,a,o,s,c,l,u,d=this,p=d.constructor,m=d.d,h=(e=new p(e)).d;if(!d.s||!e.s)return new p(0);for(e.s*=d.s,n=d.e+e.e,l=m.length,u=h.length,l<u&&(o=m,m=h,h=o,s=l,l=u,u=s),o=[],s=l+u,r=s;r--;)o.push(0);for(r=u;--r>=0;){for(t=0,a=l+r;a>r;)c=o[a]+h[r]*m[a-r-1]+t,o[a--]=c%f|0,t=c/f|0;o[a]=(o[a]+t)%f|0}for(;!o[--s];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,i?D(e,p.precision):e},g.toDecimalPlaces=g.todp=function(e,t){var r=this,i=r.constructor;return r=new i(r),e===void 0?r:(v(e,0,n),t===void 0?t=i.rounding:v(t,0,8),D(r,e+S(r)+1,t))},g.toExponential=function(e,t){var r,i=this,a=i.constructor;return e===void 0?r=k(i,!0):(v(e,0,n),t===void 0?t=a.rounding:v(t,0,8),i=D(new a(i),e+1,t),r=k(i,!0,e+1)),r},g.toFixed=function(e,t){var r,i,a=this,o=a.constructor;return e===void 0?k(a):(v(e,0,n),t===void 0?t=o.rounding:v(t,0,8),i=D(new o(a),e+S(a)+1,t),r=k(i.abs(),!1,e+S(i)+1),a.isneg()&&!a.isZero()?`-`+r:r)},g.toInteger=g.toint=function(){var e=this,t=e.constructor;return D(new t(e),S(e)+1,t.rounding)},g.toNumber=function(){return+this},g.toPower=g.pow=function(e){var t,n,r,o,s,l,u=this,f=u.constructor,h=12,g=+(e=new f(e));if(!e.s)return new f(d);if(u=new f(u),!u.s){if(e.s<1)throw Error(a+`Infinity`);return u}if(u.eq(d))return u;if(r=f.precision,e.eq(d))return D(u,r);if(t=e.e,n=e.d.length-1,l=t>=n,s=u.s,!l){if(s<0)throw Error(a+`NaN`)}else if((n=g<0?-g:g)<=m){for(o=new f(d),t=Math.ceil(r/p+4),i=!1;n%2&&(o=o.times(u),A(o.d,t)),n=c(n/2),n!==0;)u=u.times(u),A(u.d,t);return i=!0,e.s<0?new f(d).div(o):D(o,r)}return s=s<0&&e.d[Math.max(t,n)]&1?-1:1,u.s=1,i=!1,o=e.times(T(u,r+h)),i=!0,o=x(o),o.s=s,o},g.toPrecision=function(e,t){var r,i,a=this,o=a.constructor;return e===void 0?(r=S(a),i=k(a,r<=o.toExpNeg||r>=o.toExpPos)):(v(e,1,n),t===void 0?t=o.rounding:v(t,0,8),a=D(new o(a),e,t),r=S(a),i=k(a,e<=r||r<=o.toExpNeg,e)),i},g.toSignificantDigits=g.tosd=function(e,t){var r=this,i=r.constructor;return e===void 0?(e=i.precision,t=i.rounding):(v(e,1,n),t===void 0?t=i.rounding:v(t,0,8)),D(new i(r),e,t)},g.toString=g.valueOf=g.val=g.toJSON=function(){var e=this,t=S(e),n=e.constructor;return k(e,t<=n.toExpNeg||t>=n.toExpPos)};function _(e,t){var n,r,a,o,s,c,l,u,d=e.constructor,m=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),i?D(t,m):t;if(l=e.d,u=t.d,s=e.e,a=t.e,l=l.slice(),o=s-a,o){for(o<0?(r=l,o=-o,c=u.length):(r=u,a=s,c=l.length),s=Math.ceil(m/p),c=s>c?s+1:c+1,o>c&&(o=c,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(c=l.length,o=u.length,c-o<0&&(o=c,r=u,u=l,l=r),n=0;o;)n=(l[--o]=l[o]+u[o]+n)/f|0,l[o]%=f;for(n&&(l.unshift(n),++a),c=l.length;l[--c]==0;)l.pop();return t.d=l,t.e=a,i?D(t,m):t}function v(e,t,n){if(e!==~~e||e<t||e>n)throw Error(o+e)}function y(e){var t,n,r,i=e.length-1,a=``,o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)r=e[t]+``,n=p-r.length,n&&(a+=w(n)),a+=r;o=e[t],r=o+``,n=p-r.length,n&&(a+=w(n))}else if(o===0)return`0`;for(;o%10==0;)o/=10;return a+o}var b=(function(){function e(e,t){var n,r=0,i=e.length;for(e=e.slice();i--;)n=e[i]*t+r,e[i]=n%f|0,r=n/f|0;return r&&e.unshift(r),e}function t(e,t,n,r){var i,a;if(n!=r)a=n>r?1:-1;else for(i=a=0;i<n;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=e[n]<t[n]?1:0,e[n]=r*f+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,o,s){var c,l,u,d,m,h,g,_,v,y,b,x,C,w,T,E,O,k,A=r.constructor,j=r.s==i.s?1:-1,M=r.d,N=i.d;if(!r.s)return new A(r);if(!i.s)throw Error(a+`Division by zero`);for(l=r.e-i.e,O=N.length,T=M.length,g=new A(j),_=g.d=[],u=0;N[u]==(M[u]||0);)++u;if(N[u]>(M[u]||0)&&--l,x=o==null?o=A.precision:s?o+(S(r)-S(i))+1:o,x<0)return new A(0);if(x=x/p+2|0,u=0,O==1)for(d=0,N=N[0],x++;(u<T||d)&&x--;u++)C=d*f+(M[u]||0),_[u]=C/N|0,d=C%N|0;else{for(d=f/(N[0]+1)|0,d>1&&(N=e(N,d),M=e(M,d),O=N.length,T=M.length),w=O,v=M.slice(0,O),y=v.length;y<O;)v[y++]=0;k=N.slice(),k.unshift(0),E=N[0],N[1]>=f/2&&++E;do d=0,c=t(N,v,O,y),c<0?(b=v[0],O!=y&&(b=b*f+(v[1]||0)),d=b/E|0,d>1?(d>=f&&(d=f-1),m=e(N,d),h=m.length,y=v.length,c=t(m,v,h,y),c==1&&(d--,n(m,O<h?k:N,h))):(d==0&&(c=d=1),m=N.slice()),h=m.length,h<y&&m.unshift(0),n(v,m,y),c==-1&&(y=v.length,c=t(N,v,O,y),c<1&&(d++,n(v,O<y?k:N,y))),y=v.length):c===0&&(d++,v=[0]),_[u++]=d,c&&v[0]?v[y++]=M[w]||0:(v=[M[w]],y=1);while((w++<T||v[0]!==void 0)&&x--)}return _[0]||_.shift(),g.e=l,D(g,s?o+S(g)+1:o)}})();function x(e,t){var n,r,a,o,c,u,f=0,p=0,m=e.constructor,h=m.precision;if(S(e)>16)throw Error(s+S(e));if(!e.s)return new m(d);for(t==null?(i=!1,u=h):u=t,c=new m(.03125);e.abs().gte(.1);)e=e.times(c),p+=5;for(r=Math.log(l(2,p))/Math.LN10*2+5|0,u+=r,n=a=o=new m(d),m.precision=u;;){if(a=D(a.times(e),u),n=n.times(++f),c=o.plus(b(a,n,u)),y(c.d).slice(0,u)===y(o.d).slice(0,u)){for(;p--;)o=D(o.times(o),u);return m.precision=h,t==null?(i=!0,D(o,h)):o}o=c}}function S(e){for(var t=e.e*p,n=e.d[0];n>=10;n/=10)t++;return t}function C(e,t,n){if(t>e.LN10.sd())throw i=!0,n&&(e.precision=n),Error(a+`LN10 precision limit exceeded`);return D(new e(e.LN10),t)}function w(e){for(var t=``;e--;)t+=`0`;return t}function T(e,t){var n,r,o,s,c,l,u,f,p,m=1,h=10,g=e,_=g.d,v=g.constructor,x=v.precision;if(g.s<1)throw Error(a+(g.s?`NaN`:`-Infinity`));if(g.eq(d))return new v(0);if(t==null?(i=!1,f=x):f=t,g.eq(10))return t??(i=!0),C(v,f);if(f+=h,v.precision=f,n=y(_),r=n.charAt(0),s=S(g),Math.abs(s)<0x5543df729c000){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)g=g.times(e),n=y(g.d),r=n.charAt(0),m++;s=S(g),r>1?(g=new v(`0.`+n),s++):g=new v(r+`.`+n.slice(1))}else return u=C(v,f+2,x).times(s+``),g=T(new v(r+`.`+n.slice(1)),f-h).plus(u),v.precision=x,t==null?(i=!0,D(g,x)):g;for(l=c=g=b(g.minus(d),g.plus(d),f),p=D(g.times(g),f),o=3;;){if(c=D(c.times(p),f),u=l.plus(b(c,new v(o),f)),y(u.d).slice(0,f)===y(l.d).slice(0,f))return l=l.times(2),s!==0&&(l=l.plus(C(v,f+2,x).times(s+``))),l=b(l,new v(m),f),v.precision=x,t==null?(i=!0,D(l,x)):l;l=u,o+=2}}function E(e,t){var n,r,a;for((n=t.indexOf(`.`))>-1&&(t=t.replace(`.`,``)),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(r,a),t){if(a-=r,n=n-r-1,e.e=c(n/p),e.d=[],r=(n+1)%p,n<0&&(r+=p),r<a){for(r&&e.d.push(+t.slice(0,r)),a-=p;r<a;)e.d.push(+t.slice(r,r+=p));t=t.slice(r),r=p-t.length}else r-=a;for(;r--;)t+=`0`;if(e.d.push(+t),i&&(e.e>h||e.e<-h))throw Error(s+n)}else e.s=0,e.e=0,e.d=[0];return e}function D(e,t,n){var r,a,o,u,d,m,g,_,v=e.d;for(u=1,o=v[0];o>=10;o/=10)u++;if(r=t-u,r<0)r+=p,a=t,g=v[_=0];else{if(_=Math.ceil((r+1)/p),o=v.length,_>=o)return e;for(g=o=v[_],u=1;o>=10;o/=10)u++;r%=p,a=r-p+u}if(n!==void 0&&(o=l(10,u-a-1),d=g/o%10|0,m=t<0||v[_+1]!==void 0||g%o,m=n<4?(d||m)&&(n==0||n==(e.s<0?3:2)):d>5||d==5&&(n==4||m||n==6&&(r>0?a>0?g/l(10,u-a):0:v[_-1])%10&1||n==(e.s<0?8:7))),t<1||!v[0])return m?(o=S(e),v.length=1,t=t-o-1,v[0]=l(10,(p-t%p)%p),e.e=c(-t/p)||0):(v.length=1,v[0]=e.e=e.s=0),e;if(r==0?(v.length=_,o=1,_--):(v.length=_+1,o=l(10,p-r),v[_]=a>0?(g/l(10,u-a)%l(10,a)|0)*o:0),m)for(;;)if(_==0){(v[0]+=o)==f&&(v[0]=1,++e.e);break}else{if(v[_]+=o,v[_]!=f)break;v[_--]=0,o=1}for(r=v.length;v[--r]===0;)v.pop();if(i&&(e.e>h||e.e<-h))throw Error(s+S(e));return e}function O(e,t){var n,r,a,o,s,c,l,u,d,m,h=e.constructor,g=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),i?D(t,g):t;if(l=e.d,m=t.d,r=t.e,u=e.e,l=l.slice(),s=u-r,s){for(d=s<0,d?(n=l,s=-s,c=m.length):(n=m,r=u,c=l.length),a=Math.max(Math.ceil(g/p),c)+2,s>a&&(s=a,n.length=1),n.reverse(),a=s;a--;)n.push(0);n.reverse()}else{for(a=l.length,c=m.length,d=a<c,d&&(c=a),a=0;a<c;a++)if(l[a]!=m[a]){d=l[a]<m[a];break}s=0}for(d&&(n=l,l=m,m=n,t.s=-t.s),c=l.length,a=m.length-c;a>0;--a)l[c++]=0;for(a=m.length;a>s;){if(l[--a]<m[a]){for(o=a;o&&l[--o]===0;)l[o]=f-1;--l[o],l[a]+=f}l[a]-=m[a]}for(;l[--c]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(t.d=l,t.e=r,i?D(t,g):t):new h(0)}function k(e,t,n){var r,i=S(e),a=y(e.d),o=a.length;return t?(n&&(r=n-o)>0?a=a.charAt(0)+`.`+a.slice(1)+w(r):o>1&&(a=a.charAt(0)+`.`+a.slice(1)),a=a+(i<0?`e`:`e+`)+i):i<0?(a=`0.`+w(-i-1)+a,n&&(r=n-o)>0&&(a+=w(r))):i>=o?(a+=w(i+1-o),n&&(r=n-i-1)>0&&(a=a+`.`+w(r))):((r=i+1)<o&&(a=a.slice(0,r)+`.`+a.slice(r)),n&&(r=n-o)>0&&(i+1===o&&(a+=`.`),a+=w(r))),e.s<0?`-`+a:a}function A(e,t){if(e.length>t)return e.length=t,!0}function j(e){var t,n,r;function i(e){var t=this;if(!(t instanceof i))return new i(e);if(t.constructor=i,e instanceof i){t.s=e.s,t.e=e.e,t.d=(e=e.d)?e.slice():e;return}if(typeof e==`number`){if(e*0!=0)throw Error(o+e);if(e>0)t.s=1;else if(e<0)e=-e,t.s=-1;else{t.s=0,t.e=0,t.d=[0];return}if(e===~~e&&e<1e7){t.e=0,t.d=[e];return}return E(t,e.toString())}else if(typeof e!=`string`)throw Error(o+e);if(e.charCodeAt(0)===45?(e=e.slice(1),t.s=-1):t.s=1,u.test(e))E(t,e);else throw Error(o+e)}if(i.prototype=g,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=j,i.config=i.set=M,e===void 0&&(e={}),e)for(r=[`precision`,`rounding`,`toExpNeg`,`toExpPos`,`LN10`],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function M(e){if(!e||typeof e!=`object`)throw Error(a+`Object expected`);var t,r,i,s=[`precision`,1,n,`rounding`,0,8,`toExpNeg`,-1/0,0,`toExpPos`,0,1/0];for(t=0;t<s.length;t+=3)if((i=e[r=s[t]])!==void 0)if(c(i)===i&&i>=s[t+1]&&i<=s[t+2])this[r]=i;else throw Error(o+r+`: `+i);if((i=e[r=`LN10`])!==void 0)if(i==Math.LN10)this[r]=new this(i);else throw Error(o+r+`: `+i);return this}r=j(r),r.default=r.Decimal=r,d=new r(1),typeof define==`function`&&define.amd?define(function(){return r}):t!==void 0&&t.exports?t.exports=r:(e||=typeof self<`u`&&self&&self.self==self?self:Function(`return this`)(),e.Decimal=r)})(e)}));function QD(e){return nO(e)||tO(e)||eO(e)||$D()}function $D(){throw TypeError(`Invalid attempt to spread non-iterable instance.
129
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eO(e,t){if(e){if(typeof e==`string`)return rO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rO(e,t)}}function tO(e){if(typeof Symbol<`u`&&Symbol.iterator in Object(e))return Array.from(e)}function nO(e){if(Array.isArray(e))return rO(e)}function rO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var iO=function(e){return e},aO={"@@functional/placeholder":!0},oO=function(e){return e===aO},sO=function(e){return function t(){return arguments.length===0||arguments.length===1&&oO(arguments.length<=0?void 0:arguments[0])?t:e.apply(void 0,arguments)}},cO=function e(t,n){return t===1?n:sO(function(){var r=[...arguments],i=r.filter(function(e){return e!==aO}).length;return i>=t?n.apply(void 0,r):e(t-i,sO(function(){var e=[...arguments],t=r.map(function(t){return oO(t)?e.shift():t});return n.apply(void 0,QD(t).concat(e))}))})},lO=function(e){return cO(e.length,e)},uO=function(e,t){for(var n=[],r=e;r<t;++r)n[r-e]=r;return n},dO=lO(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(e){return t[e]}).map(e)}),fO=function(){var e=[...arguments];if(!e.length)return iO;var t=e.reverse(),n=t[0],r=t.slice(1);return function(){return r.reduce(function(e,t){return t(e)},n.apply(void 0,arguments))}},pO=function(e){return Array.isArray(e)?e.reverse():e.split(``).reverse.join(``)},mO=function(e){var t=null,n=null;return function(){var r=[...arguments];return t&&r.every(function(e,n){return e===t[n]})?n:(t=r,n=e.apply(void 0,r),n)}},hO=l(ZD());function gO(e){return e===0?1:Math.floor(new hO.default(e).abs().log(10).toNumber())+1}function _O(e,t,n){for(var r=new hO.default(e),i=0,a=[];r.lt(t)&&i<1e5;)a.push(r.toNumber()),r=r.add(n),i++;return a}var vO={rangeStep:_O,getDigitCount:gO,interpolateNumber:lO(function(e,t,n){var r=+e;return r+n*(+t-r)}),uninterpolateNumber:lO(function(e,t,n){var r=t-+e;return r||=1/0,(n-e)/r}),uninterpolateTruncation:lO(function(e,t,n){var r=t-+e;return r||=1/0,Math.max(0,Math.min(1,(n-e)/r))})};function yO(e){return SO(e)||xO(e)||TO(e)||bO()}function bO(){throw TypeError(`Invalid attempt to spread non-iterable instance.
130
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xO(e){if(typeof Symbol<`u`&&Symbol.iterator in Object(e))return Array.from(e)}function SO(e){if(Array.isArray(e))return EO(e)}function CO(e,t){return OO(e)||DO(e,t)||TO(e,t)||wO()}function wO(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
131
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TO(e,t){if(e){if(typeof e==`string`)return EO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return EO(e,t)}}function EO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function DO(e,t){if(!(typeof Symbol>`u`||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(e){i=!0,a=e}finally{try{!r&&o.return!=null&&o.return()}finally{if(i)throw a}}return n}}function OO(e){if(Array.isArray(e))return e}function kO(e){var t=CO(e,2),n=t[0],r=t[1],i=n,a=r;return n>r&&(i=r,a=n),[i,a]}function AO(e,t,n){if(e.lte(0))return new hO.default(0);var r=vO.getDigitCount(e.toNumber()),i=new hO.default(10).pow(r),a=e.div(i),o=r===1?.1:.05,s=new hO.default(Math.ceil(a.div(o).toNumber())).add(n).mul(o).mul(i);return t?s:new hO.default(Math.ceil(s))}function jO(e,t,n){var r=1,i=new hO.default(e);if(!i.isint()&&n){var a=Math.abs(e);a<1?(r=new hO.default(10).pow(vO.getDigitCount(e)-1),i=new hO.default(Math.floor(i.div(r).toNumber())).mul(r)):a>1&&(i=new hO.default(Math.floor(e)))}else e===0?i=new hO.default(Math.floor((t-1)/2)):n||(i=new hO.default(Math.floor(e)));var o=Math.floor((t-1)/2);return fO(dO(function(e){return i.add(new hO.default(e-o).mul(r)).toNumber()}),uO)(0,t)}function MO(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new hO.default(0),tickMin:new hO.default(0),tickMax:new hO.default(0)};var a=AO(new hO.default(t).sub(e).div(n-1),r,i),o;e<=0&&t>=0?o=new hO.default(0):(o=new hO.default(e).add(t).div(2),o=o.sub(new hO.default(o).mod(a)));var s=Math.ceil(o.sub(e).div(a).toNumber()),c=Math.ceil(new hO.default(t).sub(o).div(a).toNumber()),l=s+c+1;return l>n?MO(e,t,n,r,i+1):(l<n&&(c=t>0?c+(n-l):c,s=t>0?s:s+(n-l)),{step:a,tickMin:o.sub(new hO.default(s).mul(a)),tickMax:o.add(new hO.default(c).mul(a))})}function NO(e){var t=CO(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),s=CO(kO([n,r]),2),c=s[0],l=s[1];if(c===-1/0||l===1/0){var u=l===1/0?[c].concat(yO(uO(0,i-1).map(function(){return 1/0}))):[].concat(yO(uO(0,i-1).map(function(){return-1/0})),[l]);return n>r?pO(u):u}if(c===l)return jO(c,i,a);var d=MO(c,l,o,a),f=d.step,p=d.tickMin,m=d.tickMax,h=vO.rangeStep(p,m.add(new hO.default(.1).mul(f)),f);return n>r?pO(h):h}function PO(e,t){var n=CO(e,2),r=n[0],i=n[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=CO(kO([r,i]),2),s=o[0],c=o[1];if(s===-1/0||c===1/0)return[r,i];if(s===c)return[s];var l=Math.max(t,2),u=AO(new hO.default(c).sub(s).div(l-1),a,0),d=[].concat(yO(vO.rangeStep(new hO.default(s),new hO.default(c).sub(new hO.default(.99).mul(u)),u)),[c]);return r>i?pO(d):d}var FO=mO(NO),IO=mO(PO),LO=!0,RO=`Invariant failed`;function zO(e,t){if(!e){if(LO)throw Error(RO);var n=typeof t==`function`?t():t,r=n?`${RO}: ${n}`:RO;throw Error(r)}}var BO=[`offset`,`layout`,`width`,`dataKey`,`data`,`dataPointFormatter`,`xAxis`,`yAxis`];function VO(e){"@babel/helpers - typeof";return VO=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},VO(e)}function HO(){return HO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},HO.apply(this,arguments)}function UO(e,t){return JO(e)||qO(e,t)||GO(e,t)||WO()}function WO(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
132
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GO(e,t){if(e){if(typeof e==`string`)return KO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return KO(e,t)}}function KO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function qO(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function JO(e){if(Array.isArray(e))return e}function YO(e,t){if(e==null)return{};var n=XO(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function XO(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function ZO(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function QO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,ck(r.key),r)}}function $O(e,t,n){return t&&QO(e.prototype,t),n&&QO(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function ek(e,t,n){return t=ik(t),tk(e,rk()?Reflect.construct(t,n||[],ik(e).constructor):t.apply(e,n))}function tk(e,t){if(t&&(VO(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return nk(e)}function nk(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function rk(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rk=function(){return!!e})()}function ik(e){return ik=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ik(e)}function ak(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,`prototype`,{writable:!1}),t&&ok(e,t)}function ok(e,t){return ok=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ok(e,t)}function sk(e,t,n){return t=ck(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ck(e){var t=lk(e,`string`);return VO(t)==`symbol`?t:t+``}function lk(e,t){if(VO(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(VO(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var uk=function(e){function t(){return ZO(this,t),ek(this,t,arguments)}return ak(t,e),$O(t,[{key:`render`,value:function(){var e=this.props,t=e.offset,n=e.layout,r=e.width,i=e.dataKey,a=e.data,o=e.dataPointFormatter,s=e.xAxis,c=e.yAxis,l=J(YO(e,BO),!1);this.props.direction===`x`&&s.type!==`number`&&zO(!1);var u=a.map(function(e){var a=o(e,i),u=a.x,d=a.y,f=a.value,p=a.errorVal;if(!p)return null;var m=[],h,g;if(Array.isArray(p)){var v=UO(p,2);h=v[0],g=v[1]}else h=g=p;if(n===`vertical`){var y=s.scale,b=d+t,x=b+r,S=b-r,C=y(f-h),w=y(f+g);m.push({x1:w,y1:x,x2:w,y2:S}),m.push({x1:C,y1:b,x2:w,y2:b}),m.push({x1:C,y1:x,x2:C,y2:S})}else if(n===`horizontal`){var T=c.scale,E=u+t,D=E-r,O=E+r,k=T(f-h),A=T(f+g);m.push({x1:D,y1:A,x2:O,y2:A}),m.push({x1:E,y1:k,x2:E,y2:A}),m.push({x1:D,y1:k,x2:O,y2:k})}return _.createElement(U_,HO({className:`recharts-errorBar`,key:`bar-${m.map(function(e){return`${e.x1}-${e.x2}-${e.y1}-${e.y2}`})}`},l),m.map(function(e){return _.createElement(`line`,HO({},e,{key:`line-${e.x1}-${e.x2}-${e.y1}-${e.y2}`}))}))});return _.createElement(U_,{className:`recharts-errorBars`},u)}}])}(_.Component);sk(uk,`defaultProps`,{stroke:`black`,strokeWidth:1.5,width:5,offset:0,layout:`horizontal`}),sk(uk,`displayName`,`ErrorBar`);function dk(e){"@babel/helpers - typeof";return dk=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},dk(e)}function fk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function pk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?fk(Object(n),!0).forEach(function(t){mk(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fk(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function mk(e,t,n){return t=hk(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hk(e){var t=gk(e,`string`);return dk(t)==`symbol`?t:t+``}function gk(e,t){if(dk(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(dk(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var _k=function(e){var t=e.children,n=e.formattedGraphicalItems,r=e.legendWidth,i=e.legendContent,a=C_(t,Fx);if(!a)return null;var o=Fx.defaultProps,s=o===void 0?{}:pk(pk({},o),a.props),c=a.props&&a.props.payload?a.props&&a.props.payload:i===`children`?(n||[]).reduce(function(e,t){var n=t.item,r=t.props,i=r.sectors||r.data||[];return e.concat(i.map(function(e){return{type:a.props.iconType||n.props.legendType,value:e.name,color:e.fill,payload:e}}))},[]):(n||[]).map(function(e){var t=e.item,n=t.type.defaultProps,r=n===void 0?{}:pk(pk({},n),t.props),i=r.dataKey,a=r.name,o=r.legendType;return{inactive:r.hide,dataKey:i,type:s.iconType||o||`square`,color:Lk(t),value:a||i,payload:r}});return pk(pk(pk({},s),Fx.getWithHeight(a,r)),{},{payload:c,item:a})},vk=l(GD()),yk=l(qD()),bk=l(YD()),xk=l(XD());function Sk(e){"@babel/helpers - typeof";return Sk=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Sk(e)}function Ck(e){return Dk(e)||Ek(e)||Tk(e)||wk()}function wk(){throw TypeError(`Invalid attempt to spread non-iterable instance.
133
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tk(e,t){if(e){if(typeof e==`string`)return Ok(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ok(e,t)}}function Ek(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Dk(e){if(Array.isArray(e))return Ok(e)}function Ok(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function kk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ak(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?kk(Object(n),!0).forEach(function(t){jk(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kk(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function jk(e,t,n){return t=Mk(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mk(e){var t=Nk(e,`string`);return Sk(t)==`symbol`?t:t+``}function Nk(e,t){if(Sk(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Sk(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Pk(e,t,n){return(0,Qg.default)(e)||(0,Qg.default)(t)?n:t_(t)?(0,Zg.default)(e,t,n):(0,m_.default)(t)?t(e):n}function Fk(e,t,n,r){var i=(0,bk.default)(e,function(e){return Pk(e,t)});if(n===`number`){var a=i.filter(function(e){return q(e)||parseFloat(e)});return a.length?[(0,yk.default)(a),(0,vk.default)(a)]:[1/0,-1/0]}return(r?i.filter(function(e){return!(0,Qg.default)(e)}):i).map(function(e){return t_(e)||e instanceof Date?e:``})}var Ik=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=-1,a=t?.length??0;if(a<=1)return 0;if(r&&r.axisType===`angleAxis`&&Math.abs(Math.abs(r.range[1]-r.range[0])-360)<=1e-6)for(var o=r.range,s=0;s<a;s++){var c=s>0?n[s-1].coordinate:n[a-1].coordinate,l=n[s].coordinate,u=s>=a-1?n[0].coordinate:n[s+1].coordinate,d=void 0;if($g(l-c)!==$g(u-l)){var f=[];if($g(u-l)===$g(o[1]-o[0])){d=u;var p=l+o[1]-o[0];f[0]=Math.min(p,(p+c)/2),f[1]=Math.max(p,(p+c)/2)}else{d=c;var m=u+o[1]-o[0];f[0]=Math.min(l,(m+l)/2),f[1]=Math.max(l,(m+l)/2)}var h=[Math.min(l,(d+l)/2),Math.max(l,(d+l)/2)];if(e>h[0]&&e<=h[1]||e>=f[0]&&e<=f[1]){i=n[s].index;break}}else{var g=Math.min(c,u),_=Math.max(c,u);if(e>(g+l)/2&&e<=(_+l)/2){i=n[s].index;break}}}else for(var v=0;v<a;v++)if(v===0&&e<=(t[v].coordinate+t[v+1].coordinate)/2||v>0&&v<a-1&&e>(t[v].coordinate+t[v-1].coordinate)/2&&e<=(t[v].coordinate+t[v+1].coordinate)/2||v===a-1&&e>(t[v].coordinate+t[v-1].coordinate)/2){i=t[v].index;break}return i},Lk=function(e){var t,n=e.type.displayName,r=(t=e.type)!=null&&t.defaultProps?Ak(Ak({},e.type.defaultProps),e.props):e.props,i=r.stroke,a=r.fill,o;switch(n){case`Line`:o=i;break;case`Area`:case`Radar`:o=i&&i!==`none`?i:a;break;default:o=a;break}return o},Rk=function(e){var t=e.barSize,n=e.totalSize,r=e.stackGroups,i=r===void 0?{}:r;if(!i)return{};for(var a={},o=Object.keys(i),s=0,c=o.length;s<c;s++)for(var l=i[o[s]].stackGroups,u=Object.keys(l),d=0,f=u.length;d<f;d++){var p=l[u[d]],m=p.items,h=p.cateAxisId,g=m.filter(function(e){return v_(e.type).indexOf(`Bar`)>=0});if(g&&g.length){var _=g[0].type.defaultProps,v=_===void 0?g[0].props:Ak(Ak({},_),g[0].props),y=v.barSize,b=v[h];a[b]||(a[b]=[]);var x=(0,Qg.default)(y)?t:y;a[b].push({item:g[0],stackList:g.slice(1),barSize:(0,Qg.default)(x)?void 0:r_(x,n,0)})}}return a},zk=function(e){var t=e.barGap,n=e.barCategoryGap,r=e.bandSize,i=e.sizeList,a=i===void 0?[]:i,o=e.maxBarSize,s=a.length;if(s<1)return null;var c=r_(t,r,0,!0),l,u=[];if(a[0].barSize===+a[0].barSize){var d=!1,f=r/s,p=a.reduce(function(e,t){return e+t.barSize||0},0);p+=(s-1)*c,p>=r&&(p-=(s-1)*c,c=0),p>=r&&f>0&&(d=!0,f*=.9,p=s*f);var m={offset:((r-p)/2>>0)-c,size:0};l=a.reduce(function(e,t){var n={item:t.item,position:{offset:m.offset+m.size+c,size:d?f:t.barSize}},r=[].concat(Ck(e),[n]);return m=r[r.length-1].position,t.stackList&&t.stackList.length&&t.stackList.forEach(function(e){r.push({item:e,position:m})}),r},u)}else{var h=r_(n,r,0,!0);r-2*h-(s-1)*c<=0&&(c=0);var g=(r-2*h-(s-1)*c)/s;g>1&&(g>>=0);var _=o===+o?Math.min(g,o):g;l=a.reduce(function(e,t,n){var r=[].concat(Ck(e),[{item:t.item,position:{offset:h+(g+c)*n+(g-_)/2,size:_}}]);return t.stackList&&t.stackList.length&&t.stackList.forEach(function(e){r.push({item:e,position:r[r.length-1].position})}),r},u)}return l},Bk=function(e,t,n,r){var i=n.children,a=n.width,o=n.margin,s=_k({children:i,legendWidth:a-(o.left||0)-(o.right||0)});if(s){var c=r||{},l=c.width,u=c.height,d=s.align,f=s.verticalAlign,p=s.layout;if((p===`vertical`||p===`horizontal`&&f===`middle`)&&d!==`center`&&q(e[d]))return Ak(Ak({},e),{},jk({},d,e[d]+(l||0)));if((p===`horizontal`||p===`vertical`&&d===`center`)&&f!==`middle`&&q(e[f]))return Ak(Ak({},e),{},jk({},f,e[f]+(u||0)))}return e},Vk=function(e,t,n){return(0,Qg.default)(t)?!0:e===`horizontal`?t===`yAxis`:e===`vertical`||n===`x`?t===`xAxis`:n===`y`?t===`yAxis`:!0},Hk=function(e,t,n,r,i){var a=t.props.children,o=S_(a,uk).filter(function(e){return Vk(r,i,e.props.direction)});if(o&&o.length){var s=o.map(function(e){return e.props.dataKey});return e.reduce(function(e,t){var r=Pk(t,n);if((0,Qg.default)(r))return e;var i=Array.isArray(r)?[(0,yk.default)(r),(0,vk.default)(r)]:[r,r],a=s.reduce(function(e,n){var r=Pk(t,n,0),a=i[0]-Math.abs(Array.isArray(r)?r[0]:r),o=i[1]+Math.abs(Array.isArray(r)?r[1]:r);return[Math.min(a,e[0]),Math.max(o,e[1])]},[1/0,-1/0]);return[Math.min(a[0],e[0]),Math.max(a[1],e[1])]},[1/0,-1/0])}return null},Uk=function(e,t,n,r,i){var a=t.map(function(t){return Hk(e,t,n,i,r)}).filter(function(e){return!(0,Qg.default)(e)});return a&&a.length?a.reduce(function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]},[1/0,-1/0]):null},Wk=function(e,t,n,r,i){var a=t.map(function(t){var a=t.props.dataKey;return n===`number`&&a&&Hk(e,t,a,r)||Fk(e,a,n,i)});if(n===`number`)return a.reduce(function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]},[1/0,-1/0]);var o={};return a.reduce(function(e,t){for(var n=0,r=t.length;n<r;n++)o[t[n]]||(o[t[n]]=!0,e.push(t[n]));return e},[])},Gk=function(e,t){return e===`horizontal`&&t===`xAxis`||e===`vertical`&&t===`yAxis`||e===`centric`&&t===`angleAxis`||e===`radial`&&t===`radiusAxis`},Kk=function(e,t,n,r){if(r)return e.map(function(e){return e.coordinate});var i,a,o=e.map(function(e){return e.coordinate===t&&(i=!0),e.coordinate===n&&(a=!0),e.coordinate});return i||o.push(t),a||o.push(n),o},qk=function(e,t,n){if(!e)return null;var r=e.scale,i=e.duplicateDomain,a=e.type,o=e.range,s=e.realScaleType===`scaleBand`?r.bandwidth()/2:2,c=(t||n)&&a===`category`&&r.bandwidth?r.bandwidth()/s:0;return c=e.axisType===`angleAxis`&&o?.length>=2?$g(o[0]-o[1])*2*c:c,t&&(e.ticks||e.niceTicks)?(e.ticks||e.niceTicks).map(function(e){return{coordinate:r(i?i.indexOf(e):e)+c,value:e,offset:c}}).filter(function(e){return!(0,Xg.default)(e.coordinate)}):e.isCategorical&&e.categoricalDomain?e.categoricalDomain.map(function(e,t){return{coordinate:r(e)+c,value:e,index:t,offset:c}}):r.ticks&&!n?r.ticks(e.tickCount).map(function(e){return{coordinate:r(e)+c,value:e,offset:c}}):r.domain().map(function(e,t){return{coordinate:r(e)+c,value:i?i[e]:e,index:t,offset:c}})},Jk=new WeakMap,Yk=function(e,t){if(typeof t!=`function`)return e;Jk.has(e)||Jk.set(e,new WeakMap);var n=Jk.get(e);if(n.has(t))return n.get(t);var r=function(){e.apply(void 0,arguments),t.apply(void 0,arguments)};return n.set(t,r),r},Xk=function(e,t,n){var r=e.scale,i=e.type,a=e.layout,o=e.axisType;if(r===`auto`)return a===`radial`&&o===`radiusAxis`?{scale:bC(),realScaleType:`band`}:a===`radial`&&o===`angleAxis`?{scale:Nw(),realScaleType:`linear`}:i===`category`&&t&&(t.indexOf(`LineChart`)>=0||t.indexOf(`AreaChart`)>=0||t.indexOf(`ComposedChart`)>=0&&!n)?{scale:SC(),realScaleType:`point`}:i===`category`?{scale:bC(),realScaleType:`band`}:{scale:Nw(),realScaleType:`linear`};if((0,Yg.default)(r)){var s=`scale${(0,wy.default)(r)}`;return{scale:(HD[s]||SC)(),realScaleType:HD[s]?s:`point`}}return(0,m_.default)(r)?{scale:r}:{scale:SC(),realScaleType:`point`}},Zk=1e-4,Qk=function(e){var t=e.domain();if(!(!t||t.length<=2)){var n=t.length,r=e.range(),i=Math.min(r[0],r[1])-Zk,a=Math.max(r[0],r[1])+Zk,o=e(t[0]),s=e(t[n-1]);(o<i||o>a||s<i||s>a)&&e.domain([t[0],t[n-1]])}},$k=function(e,t){if(!e)return null;for(var n=0,r=e.length;n<r;n++)if(e[n].item===t)return e[n].position;return null},eA=function(e,t){if(!t||t.length!==2||!q(t[0])||!q(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!q(e[0])||e[0]<n)&&(i[0]=n),(!q(e[1])||e[1]>r)&&(i[1]=r),i[0]>r&&(i[0]=r),i[1]<n&&(i[1]=n),i},tA={sign:function(e){var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var i=0,a=0,o=0;o<t;++o){var s=(0,Xg.default)(e[o][n][1])?e[o][n][0]:e[o][n][1];s>=0?(e[o][n][0]=i,e[o][n][1]=i+s,i=e[o][n][1]):(e[o][n][0]=a,e[o][n][1]=a+s,a=e[o][n][1])}},expand:xy,none:gy,silhouette:Sy,wiggle:Cy,positive:function(e){var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var i=0,a=0;a<t;++a){var o=(0,Xg.default)(e[a][n][1])?e[a][n][0]:e[a][n][1];o>=0?(e[a][n][0]=i,e[a][n][1]=i+o,i=e[a][n][1]):(e[a][n][0]=0,e[a][n][1]=0)}}},nA=function(e,t,n){var r=t.map(function(e){return e.props.dataKey}),i=tA[n];return by().keys(r).value(function(e,t){return+Pk(e,t,0)}).order(_y).offset(i)(e)},rA=function(e,t,n,r,i,a){if(!e)return null;var o=(a?t.reverse():t).reduce(function(e,t){var i,a=(i=t.type)!=null&&i.defaultProps?Ak(Ak({},t.type.defaultProps),t.props):t.props,o=a.stackId;if(a.hide)return e;var s=a[n],c=e[s]||{hasStack:!1,stackGroups:{}};if(t_(o)){var l=c.stackGroups[o]||{numericAxisId:n,cateAxisId:r,items:[]};l.items.push(t),c.hasStack=!0,c.stackGroups[o]=l}else c.stackGroups[n_(`_stackId_`)]={numericAxisId:n,cateAxisId:r,items:[t]};return Ak(Ak({},e),{},jk({},s,c))},{});return Object.keys(o).reduce(function(t,a){var s=o[a];return s.hasStack&&(s.stackGroups=Object.keys(s.stackGroups).reduce(function(t,a){var o=s.stackGroups[a];return Ak(Ak({},t),{},jk({},a,{numericAxisId:n,cateAxisId:r,items:o.items,stackedData:nA(e,o.items,i)}))},{})),Ak(Ak({},t),{},jk({},a,s))},{})},iA=function(e,t){var n=t.realScaleType,r=t.type,i=t.tickCount,a=t.originalDomain,o=t.allowDecimals,s=n||t.scale;if(s!==`auto`&&s!==`linear`)return null;if(i&&r===`number`&&a&&(a[0]===`auto`||a[1]===`auto`)){var c=e.domain();if(!c.length)return null;var l=FO(c,i,o);return e.domain([(0,yk.default)(l),(0,vk.default)(l)]),{niceTicks:l}}return i&&r===`number`?{niceTicks:IO(e.domain(),i,o)}:null};function aA(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type===`category`){if(!t.allowDuplicatedCategory&&t.dataKey&&!(0,Qg.default)(i[t.dataKey])){var s=o_(n,`value`,i[t.dataKey]);if(s)return s.coordinate+r/2}return n[a]?n[a].coordinate+r/2:null}var c=Pk(i,(0,Qg.default)(o)?t.dataKey:o);return(0,Qg.default)(c)?null:t.scale(c)}var oA=function(e){var t=e.axis,n=e.ticks,r=e.offset,i=e.bandSize,a=e.entry,o=e.index;if(t.type===`category`)return n[o]?n[o].coordinate+r:null;var s=Pk(a,t.dataKey,t.domain[o]);return(0,Qg.default)(s)?null:t.scale(s)-i/2+r},sA=function(e){var t=e.numericAxis,n=t.scale.domain();if(t.type===`number`){var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return r<=0&&i>=0?0:i<0?i:r}return n[0]},cA=function(e,t){var n,r=((n=e.type)!=null&&n.defaultProps?Ak(Ak({},e.type.defaultProps),e.props):e.props).stackId;if(t_(r)){var i=t[r];if(i){var a=i.items.indexOf(e);return a>=0?i.stackedData[a]:null}}return null},lA=function(e){return e.reduce(function(e,t){return[(0,yk.default)(t.concat([e[0]]).filter(q)),(0,vk.default)(t.concat([e[1]]).filter(q))]},[1/0,-1/0])},uA=function(e,t,n){return Object.keys(e).reduce(function(r,i){var a=e[i].stackedData.reduce(function(e,r){var i=lA(r.slice(t,n+1));return[Math.min(e[0],i[0]),Math.max(e[1],i[1])]},[1/0,-1/0]);return[Math.min(a[0],r[0]),Math.max(a[1],r[1])]},[1/0,-1/0]).map(function(e){return e===1/0||e===-1/0?0:e})},dA=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,fA=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,pA=function(e,t,n){if((0,m_.default)(e))return e(t,n);if(!Array.isArray(e))return t;var r=[];if(q(e[0]))r[0]=n?e[0]:Math.min(e[0],t[0]);else if(dA.test(e[0])){var i=+dA.exec(e[0])[1];r[0]=t[0]-i}else (0,m_.default)(e[0])?r[0]=e[0](t[0]):r[0]=t[0];if(q(e[1]))r[1]=n?e[1]:Math.max(e[1],t[1]);else if(fA.test(e[1])){var a=+fA.exec(e[1])[1];r[1]=t[1]+a}else (0,m_.default)(e[1])?r[1]=e[1](t[1]):r[1]=t[1];return r},mA=function(e,t,n){if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=(0,Hx.default)(t,function(e){return e.coordinate}),a=1/0,o=1,s=i.length;o<s;o++){var c=i[o],l=i[o-1];a=Math.min((c.coordinate||0)-(l.coordinate||0),a)}return a===1/0?0:a}return n?void 0:0},hA=function(e,t,n){return!e||!e.length||(0,xk.default)(e,(0,Zg.default)(n,`type.defaultProps.domain`))?t:e},gA=function(e,t){var n=e.type.defaultProps?Ak(Ak({},e.type.defaultProps),e.props):e.props,r=n.dataKey,i=n.name,a=n.unit,o=n.formatter,s=n.tooltipType,c=n.chartType,l=n.hide;return Ak(Ak({},J(e,!1)),{},{dataKey:r,unit:a,formatter:o,name:i||r,color:Lk(e),value:Pk(t,r),type:s,payload:t,chartType:c,hide:l})};function _A(e){"@babel/helpers - typeof";return _A=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},_A(e)}function vA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function yA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?vA(Object(n),!0).forEach(function(t){bA(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vA(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function bA(e,t,n){return t=xA(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xA(e){var t=SA(e,`string`);return _A(t)==`symbol`?t:t+``}function SA(e,t){if(_A(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(_A(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function CA(e,t){return OA(e)||DA(e,t)||TA(e,t)||wA()}function wA(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
134
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TA(e,t){if(e){if(typeof e==`string`)return EA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return EA(e,t)}}function EA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function DA(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function OA(e){if(Array.isArray(e))return e}var kA=Math.PI/180,AA=function(e){return e*180/Math.PI},jA=function(e,t,n,r){return{x:e+Math.cos(-kA*r)*n,y:t+Math.sin(-kA*r)*n}},MA=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(e-(n.left||0)-(n.right||0)),Math.abs(t-(n.top||0)-(n.bottom||0)))/2},NA=function(e,t,n,r,i){var a=e.width,o=e.height,s=e.startAngle,c=e.endAngle,l=r_(e.cx,a,a/2),u=r_(e.cy,o,o/2),d=MA(a,o,n),f=r_(e.innerRadius,d,0),p=r_(e.outerRadius,d,d*.8);return Object.keys(t).reduce(function(e,n){var a=t[n],o=a.domain,d=a.reversed,m;if((0,Qg.default)(a.range))r===`angleAxis`?m=[s,c]:r===`radiusAxis`&&(m=[f,p]),d&&(m=[m[1],m[0]]);else{m=a.range;var h=CA(m,2);s=h[0],c=h[1]}var g=Xk(a,i),_=g.realScaleType,v=g.scale;v.domain(o).range(m),Qk(v);var y=iA(v,yA(yA({},a),{},{realScaleType:_})),b=yA(yA(yA({},a),y),{},{range:m,radius:p,realScaleType:_,scale:v,cx:l,cy:u,innerRadius:f,outerRadius:p,startAngle:s,endAngle:c});return yA(yA({},e),{},bA({},n,b))},{})},PA=function(e,t){var n=e.x,r=e.y,i=t.x,a=t.y;return Math.sqrt((n-i)**2+(r-a)**2)},FA=function(e,t){var n=e.x,r=e.y,i=t.cx,a=t.cy,o=PA({x:n,y:r},{x:i,y:a});if(o<=0)return{radius:o};var s=(n-i)/o,c=Math.acos(s);return r>a&&(c=2*Math.PI-c),{radius:o,angle:AA(c),angleInRadian:c}},IA=function(e){var t=e.startAngle,n=e.endAngle,r=Math.floor(t/360),i=Math.floor(n/360),a=Math.min(r,i);return{startAngle:t-a*360,endAngle:n-a*360}},LA=function(e,t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),a=Math.floor(r/360);return e+Math.min(i,a)*360},RA=function(e,t){var n=e.x,r=e.y,i=FA({x:n,y:r},t),a=i.radius,o=i.angle,s=t.innerRadius,c=t.outerRadius;if(a<s||a>c)return!1;if(a===0)return!0;var l=IA(t),u=l.startAngle,d=l.endAngle,f=o,p;if(u<=d){for(;f>d;)f-=360;for(;f<u;)f+=360;p=f>=u&&f<=d}else{for(;f>u;)f-=360;for(;f<d;)f+=360;p=f>=d&&f<=u}return p?yA(yA({},t),{},{radius:a,angle:LA(f,t)}):null},zA=function(e){return!(0,_.isValidElement)(e)&&!(0,m_.default)(e)&&typeof e!=`boolean`?e.className:``};function BA(e){"@babel/helpers - typeof";return BA=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},BA(e)}var VA=[`offset`];function HA(e){return KA(e)||GA(e)||WA(e)||UA()}function UA(){throw TypeError(`Invalid attempt to spread non-iterable instance.
135
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WA(e,t){if(e){if(typeof e==`string`)return qA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qA(e,t)}}function GA(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function KA(e){if(Array.isArray(e))return qA(e)}function qA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function JA(e,t){if(e==null)return{};var n=YA(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function YA(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function XA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ZA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?XA(Object(n),!0).forEach(function(t){QA(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XA(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function QA(e,t,n){return t=$A(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $A(e){var t=ej(e,`string`);return BA(t)==`symbol`?t:t+``}function ej(e,t){if(BA(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(BA(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function tj(){return tj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tj.apply(this,arguments)}var nj=function(e){var t=e.value,n=e.formatter,r=(0,Qg.default)(e.children)?t:e.children;return(0,m_.default)(n)?n(r):r},rj=function(e,t){return $g(t-e)*Math.min(Math.abs(t-e),360)},ij=function(e,t,n){var r=e.position,i=e.viewBox,a=e.offset,o=e.className,s=i,c=s.cx,l=s.cy,u=s.innerRadius,d=s.outerRadius,f=s.startAngle,p=s.endAngle,m=s.clockWise,h=(u+d)/2,g=rj(f,p),v=g>=0?1:-1,y,b;r===`insideStart`?(y=f+v*a,b=m):r===`insideEnd`?(y=p-v*a,b=!m):r===`end`&&(y=p+v*a,b=m),b=g<=0?b:!b;var x=jA(c,l,h,y),S=jA(c,l,h,y+(b?1:-1)*359),C=`M${x.x},${x.y}
136
- A${h},${h},0,1,${b?0:1},
137
- ${S.x},${S.y}`,w=(0,Qg.default)(e.id)?n_(`recharts-radial-line-`):e.id;return _.createElement(`text`,tj({},n,{dominantBaseline:`central`,className:Rt(`recharts-radial-bar-label`,o)}),_.createElement(`defs`,null,_.createElement(`path`,{id:w,d:C})),_.createElement(`textPath`,{xlinkHref:`#${w}`},t))},aj=function(e){var t=e.viewBox,n=e.offset,r=e.position,i=t,a=i.cx,o=i.cy,s=i.innerRadius,c=i.outerRadius,l=(i.startAngle+i.endAngle)/2;if(r===`outside`){var u=jA(a,o,c+n,l),d=u.x;return{x:d,y:u.y,textAnchor:d>=a?`start`:`end`,verticalAnchor:`middle`}}if(r===`center`)return{x:a,y:o,textAnchor:`middle`,verticalAnchor:`middle`};if(r===`centerTop`)return{x:a,y:o,textAnchor:`middle`,verticalAnchor:`start`};if(r===`centerBottom`)return{x:a,y:o,textAnchor:`middle`,verticalAnchor:`end`};var f=jA(a,o,(s+c)/2,l);return{x:f.x,y:f.y,textAnchor:`middle`,verticalAnchor:`middle`}},oj=function(e){var t=e.viewBox,n=e.parentViewBox,r=e.offset,i=e.position,a=t,o=a.x,s=a.y,c=a.width,l=a.height,u=l>=0?1:-1,d=u*r,f=u>0?`end`:`start`,p=u>0?`start`:`end`,m=c>=0?1:-1,h=m*r,g=m>0?`end`:`start`,_=m>0?`start`:`end`;if(i===`top`)return ZA(ZA({},{x:o+c/2,y:s-u*r,textAnchor:`middle`,verticalAnchor:f}),n?{height:Math.max(s-n.y,0),width:c}:{});if(i===`bottom`)return ZA(ZA({},{x:o+c/2,y:s+l+d,textAnchor:`middle`,verticalAnchor:p}),n?{height:Math.max(n.y+n.height-(s+l),0),width:c}:{});if(i===`left`){var v={x:o-h,y:s+l/2,textAnchor:g,verticalAnchor:`middle`};return ZA(ZA({},v),n?{width:Math.max(v.x-n.x,0),height:l}:{})}if(i===`right`){var y={x:o+c+h,y:s+l/2,textAnchor:_,verticalAnchor:`middle`};return ZA(ZA({},y),n?{width:Math.max(n.x+n.width-y.x,0),height:l}:{})}var b=n?{width:c,height:l}:{};return i===`insideLeft`?ZA({x:o+h,y:s+l/2,textAnchor:_,verticalAnchor:`middle`},b):i===`insideRight`?ZA({x:o+c-h,y:s+l/2,textAnchor:g,verticalAnchor:`middle`},b):i===`insideTop`?ZA({x:o+c/2,y:s+d,textAnchor:`middle`,verticalAnchor:p},b):i===`insideBottom`?ZA({x:o+c/2,y:s+l-d,textAnchor:`middle`,verticalAnchor:f},b):i===`insideTopLeft`?ZA({x:o+h,y:s+d,textAnchor:_,verticalAnchor:p},b):i===`insideTopRight`?ZA({x:o+c-h,y:s+d,textAnchor:g,verticalAnchor:p},b):i===`insideBottomLeft`?ZA({x:o+h,y:s+l-d,textAnchor:_,verticalAnchor:f},b):i===`insideBottomRight`?ZA({x:o+c-h,y:s+l-d,textAnchor:g,verticalAnchor:f},b):(0,c_.default)(i)&&(q(i.x)||e_(i.x))&&(q(i.y)||e_(i.y))?ZA({x:o+r_(i.x,c),y:s+r_(i.y,l),textAnchor:`end`,verticalAnchor:`end`},b):ZA({x:o+c/2,y:s+l/2,textAnchor:`middle`,verticalAnchor:`middle`},b)},sj=function(e){return`cx`in e&&q(e.cx)};function cj(e){var t=e.offset,n=t===void 0?5:t,r=JA(e,VA),i=ZA({offset:n},r),a=i.viewBox,o=i.position,s=i.value,c=i.children,l=i.content,u=i.className,d=u===void 0?``:u,f=i.textBreakAll;if(!a||(0,Qg.default)(s)&&(0,Qg.default)(c)&&!(0,_.isValidElement)(l)&&!(0,m_.default)(l))return null;if((0,_.isValidElement)(l))return(0,_.cloneElement)(l,i);var p;if((0,m_.default)(l)){if(p=(0,_.createElement)(l,i),(0,_.isValidElement)(p))return p}else p=nj(i);var m=sj(a),h=J(i,!0);if(m&&(o===`insideStart`||o===`insideEnd`||o===`end`))return ij(i,p,h);var g=m?aj(i):oj(i);return _.createElement($S,tj({className:Rt(`recharts-label`,d)},h,g,{breakAll:f}),p)}cj.displayName=`Label`;var lj=function(e){var t=e.cx,n=e.cy,r=e.angle,i=e.startAngle,a=e.endAngle,o=e.r,s=e.radius,c=e.innerRadius,l=e.outerRadius,u=e.x,d=e.y,f=e.top,p=e.left,m=e.width,h=e.height,g=e.clockWise,_=e.labelViewBox;if(_)return _;if(q(m)&&q(h)){if(q(u)&&q(d))return{x:u,y:d,width:m,height:h};if(q(f)&&q(p))return{x:f,y:p,width:m,height:h}}return q(u)&&q(d)?{x:u,y:d,width:0,height:0}:q(t)&&q(n)?{cx:t,cy:n,startAngle:i||r||0,endAngle:a||r||0,innerRadius:c||0,outerRadius:l||s||o||0,clockWise:g}:e.viewBox?e.viewBox:{}},uj=function(e,t){return e?e===!0?_.createElement(cj,{key:`label-implicit`,viewBox:t}):t_(e)?_.createElement(cj,{key:`label-implicit`,viewBox:t,value:e}):(0,_.isValidElement)(e)?e.type===cj?(0,_.cloneElement)(e,{key:`label-implicit`,viewBox:t}):_.createElement(cj,{key:`label-implicit`,content:e,viewBox:t}):(0,m_.default)(e)?_.createElement(cj,{key:`label-implicit`,content:e,viewBox:t}):(0,c_.default)(e)?_.createElement(cj,tj({viewBox:t},e,{key:`label-implicit`})):null:null};cj.parseViewBox=lj,cj.renderCallByParent=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=lj(e),a=S_(r,cj).map(function(e,n){return(0,_.cloneElement)(e,{viewBox:t||i,key:`label-${n}`})});return n?[uj(e.label,t||i)].concat(HA(a)):a};var dj=l(o(((e,t)=>{function n(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}t.exports=n}))());function fj(e){"@babel/helpers - typeof";return fj=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},fj(e)}var pj=[`valueAccessor`],mj=[`data`,`dataKey`,`clockWise`,`id`,`textBreakAll`];function hj(e){return yj(e)||vj(e)||_j(e)||gj()}function gj(){throw TypeError(`Invalid attempt to spread non-iterable instance.
138
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _j(e,t){if(e){if(typeof e==`string`)return bj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bj(e,t)}}function vj(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function yj(e){if(Array.isArray(e))return bj(e)}function bj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function xj(){return xj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xj.apply(this,arguments)}function Sj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Cj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Sj(Object(n),!0).forEach(function(t){wj(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sj(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function wj(e,t,n){return t=Tj(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tj(e){var t=Ej(e,`string`);return fj(t)==`symbol`?t:t+``}function Ej(e,t){if(fj(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(fj(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Dj(e,t){if(e==null)return{};var n=Oj(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Oj(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var kj=function(e){return Array.isArray(e.value)?(0,dj.default)(e.value):e.value};function Aj(e){var t=e.valueAccessor,n=t===void 0?kj:t,r=Dj(e,pj),i=r.data,a=r.dataKey,o=r.clockWise,s=r.id,c=r.textBreakAll,l=Dj(r,mj);return!i||!i.length?null:_.createElement(U_,{className:`recharts-label-list`},i.map(function(e,t){var r=(0,Qg.default)(a)?n(e,t):Pk(e&&e.payload,a),i=(0,Qg.default)(s)?{}:{id:`${s}-${t}`};return _.createElement(cj,xj({},J(e,!0),l,i,{parentViewBox:e.parentViewBox,value:r,textBreakAll:c,viewBox:cj.parseViewBox((0,Qg.default)(o)?e:Cj(Cj({},e),{},{clockWise:o})),key:`label-${t}`,index:t}))}))}Aj.displayName=`LabelList`;function jj(e,t){return e?e===!0?_.createElement(Aj,{key:`labelList-implicit`,data:t}):_.isValidElement(e)||(0,m_.default)(e)?_.createElement(Aj,{key:`labelList-implicit`,data:t,content:e}):(0,c_.default)(e)?_.createElement(Aj,xj({data:t},e,{key:`labelList-implicit`})):null:null}function Mj(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=S_(r,Aj).map(function(e,n){return(0,_.cloneElement)(e,{data:t,key:`labelList-${n}`})});return n?[jj(e.label,t)].concat(hj(i)):i}Aj.renderCallByParent=Mj;function Nj(e){"@babel/helpers - typeof";return Nj=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Nj(e)}function Pj(){return Pj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pj.apply(this,arguments)}function Fj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ij(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Fj(Object(n),!0).forEach(function(t){Lj(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fj(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Lj(e,t,n){return t=Rj(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rj(e){var t=zj(e,`string`);return Nj(t)==`symbol`?t:t+``}function zj(e,t){if(Nj(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Nj(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Bj=function(e,t){return $g(t-e)*Math.min(Math.abs(t-e),359.999)},Vj=function(e){var t=e.cx,n=e.cy,r=e.radius,i=e.angle,a=e.sign,o=e.isExternal,s=e.cornerRadius,c=e.cornerIsExternal,l=s*(o?1:-1)+r,u=Math.asin(s/l)/kA,d=c?i:i+a*u,f=jA(t,n,l,d),p=jA(t,n,r,d),m=c?i-a*u:i;return{center:f,circleTangency:p,lineTangency:jA(t,n,l*Math.cos(u*kA),m),theta:u}},Hj=function(e){var t=e.cx,n=e.cy,r=e.innerRadius,i=e.outerRadius,a=e.startAngle,o=e.endAngle,s=Bj(a,o),c=a+s,l=jA(t,n,i,a),u=jA(t,n,i,c),d=`M ${l.x},${l.y}
139
- A ${i},${i},0,
140
- ${+(Math.abs(s)>180)},${+(a>c)},
141
- ${u.x},${u.y}
142
- `;if(r>0){var f=jA(t,n,r,a),p=jA(t,n,r,c);d+=`L ${p.x},${p.y}
143
- A ${r},${r},0,
144
- ${+(Math.abs(s)>180)},${+(a<=c)},
145
- ${f.x},${f.y} Z`}else d+=`L ${t},${n} Z`;return d},Uj=function(e){var t=e.cx,n=e.cy,r=e.innerRadius,i=e.outerRadius,a=e.cornerRadius,o=e.forceCornerRadius,s=e.cornerIsExternal,c=e.startAngle,l=e.endAngle,u=$g(l-c),d=Vj({cx:t,cy:n,radius:i,angle:c,sign:u,cornerRadius:a,cornerIsExternal:s}),f=d.circleTangency,p=d.lineTangency,m=d.theta,h=Vj({cx:t,cy:n,radius:i,angle:l,sign:-u,cornerRadius:a,cornerIsExternal:s}),g=h.circleTangency,_=h.lineTangency,v=h.theta,y=s?Math.abs(c-l):Math.abs(c-l)-m-v;if(y<0)return o?`M ${p.x},${p.y}
146
- a${a},${a},0,0,1,${a*2},0
147
- a${a},${a},0,0,1,${-a*2},0
148
- `:Hj({cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:c,endAngle:l});var b=`M ${p.x},${p.y}
149
- A${a},${a},0,0,${+(u<0)},${f.x},${f.y}
150
- A${i},${i},0,${+(y>180)},${+(u<0)},${g.x},${g.y}
151
- A${a},${a},0,0,${+(u<0)},${_.x},${_.y}
152
- `;if(r>0){var x=Vj({cx:t,cy:n,radius:r,angle:c,sign:u,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),S=x.circleTangency,C=x.lineTangency,w=x.theta,T=Vj({cx:t,cy:n,radius:r,angle:l,sign:-u,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),E=T.circleTangency,D=T.lineTangency,O=T.theta,k=s?Math.abs(c-l):Math.abs(c-l)-w-O;if(k<0&&a===0)return`${b}L${t},${n}Z`;b+=`L${D.x},${D.y}
153
- A${a},${a},0,0,${+(u<0)},${E.x},${E.y}
154
- A${r},${r},0,${+(k>180)},${+(u>0)},${S.x},${S.y}
155
- A${a},${a},0,0,${+(u<0)},${C.x},${C.y}Z`}else b+=`L${t},${n}Z`;return b},Wj={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Gj=function(e){var t=Ij(Ij({},Wj),e),n=t.cx,r=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,c=t.cornerIsExternal,l=t.startAngle,u=t.endAngle,d=t.className;if(a<i||l===u)return null;var f=Rt(`recharts-sector`,d),p=a-i,m=r_(o,p,0,!0),h=m>0&&Math.abs(l-u)<360?Uj({cx:n,cy:r,innerRadius:i,outerRadius:a,cornerRadius:Math.min(m,p/2),forceCornerRadius:s,cornerIsExternal:c,startAngle:l,endAngle:u}):Hj({cx:n,cy:r,innerRadius:i,outerRadius:a,startAngle:l,endAngle:u});return _.createElement(`path`,Pj({},J(t,!0),{className:f,d:h,role:`img`}))};function Kj(e){"@babel/helpers - typeof";return Kj=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Kj(e)}function qj(){return qj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qj.apply(this,arguments)}function Jj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Yj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Jj(Object(n),!0).forEach(function(t){Xj(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jj(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Xj(e,t,n){return t=Zj(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zj(e){var t=Qj(e,`string`);return Kj(t)==`symbol`?t:t+``}function Qj(e,t){if(Kj(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Kj(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var $j={curveBasisClosed:Yv,curveBasisOpen:Zv,curveBasis:qv,curveBumpX:Cv,curveBumpY:wv,curveLinearClosed:$v,curveLinear:_v,curveMonotoneX:sy,curveMonotoneY:cy,curveNatural:dy,curveStep:py,curveStepAfter:hy,curveStepBefore:my},eM=function(e){return e.x===+e.x&&e.y===+e.y},tM=function(e){return e.x},nM=function(e){return e.y},rM=function(e,t){if((0,m_.default)(e))return e;var n=`curve${(0,wy.default)(e)}`;return(n===`curveMonotone`||n===`curveBump`)&&t?$j[`${n}${t===`vertical`?`Y`:`X`}`]:$j[n]||_v},iM=function(e){var t=e.type,n=t===void 0?`linear`:t,r=e.points,i=r===void 0?[]:r,a=e.baseLine,o=e.layout,s=e.connectNulls,c=s===void 0?!1:s,l=rM(n,o),u=c?i.filter(function(e){return eM(e)}):i,d;if(Array.isArray(a)){var f=c?a.filter(function(e){return eM(e)}):a,p=u.map(function(e,t){return Yj(Yj({},e),{},{base:f[t]})});return d=o===`vertical`?xv().y(nM).x1(tM).x0(function(e){return e.base.x}):xv().x(tM).y1(nM).y0(function(e){return e.base.y}),d.defined(eM).curve(l),d(p)}return d=o===`vertical`&&q(a)?xv().y(nM).x1(tM).x0(a):q(a)?xv().x(tM).y1(nM).y0(a):bv().x(tM).y(nM),d.defined(eM).curve(l),d(u)},aM=function(e){var t=e.className,n=e.points,r=e.path,i=e.pathRef;if((!n||!n.length)&&!r)return null;var a=n&&n.length?iM(e):r;return _.createElement(`path`,qj({},J(e,!1),f_(e),{className:Rt(`recharts-curve`,t),d:a,ref:i}))},oM=o(((e,t)=>{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),sM=o(((e,t)=>{var n=oM();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),cM=o(((e,t)=>{t.exports=sM()()})),{getOwnPropertyNames:lM,getOwnPropertySymbols:uM}=Object,{hasOwnProperty:dM}=Object.prototype;function fM(e,t){return function(n,r,i){return e(n,r,i)&&t(n,r,i)}}function pM(e){return function(t,n,r){if(!t||!n||typeof t!=`object`||typeof n!=`object`)return e(t,n,r);let{cache:i}=r,a=i.get(t),o=i.get(n);if(a&&o)return a===n&&o===t;i.set(t,n),i.set(n,t);let s=e(t,n,r);return i.delete(t),i.delete(n),s}}function mM(e){return e?.[Symbol.toStringTag]}function hM(e){return lM(e).concat(uM(e))}var gM=Object.hasOwn||((e,t)=>dM.call(e,t));function _M(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var vM=`__v`,yM=`__o`,bM=`_owner`,{getOwnPropertyDescriptor:xM,keys:SM}=Object;function Aae(e,t){return e.byteLength===t.byteLength&&EM(new Uint8Array(e),new Uint8Array(t))}function jae(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function Mae(e,t){return e.byteLength===t.byteLength&&EM(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function Nae(e,t){return _M(e.getTime(),t.getTime())}function Pae(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function Fae(e,t){return e===t}function CM(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.entries(),o,s,c=0;for(;(o=a.next())&&!o.done;){let r=t.entries(),a=!1,l=0;for(;(s=r.next())&&!s.done;){if(i[l]){l++;continue}let r=o.value,u=s.value;if(n.equals(r[0],u[0],c,l,e,t,n)&&n.equals(r[1],u[1],r[0],u[0],e,t,n)){a=i[l]=!0;break}l++}if(!a)return!1;c++}return!0}var Iae=_M;function Lae(e,t,n){let r=SM(e),i=r.length;if(SM(t).length!==i)return!1;for(;i-- >0;)if(!DM(e,t,n,r[i]))return!1;return!0}function wM(e,t,n){let r=hM(e),i=r.length;if(hM(t).length!==i)return!1;let a,o,s;for(;i-- >0;)if(a=r[i],!DM(e,t,n,a)||(o=xM(e,a),s=xM(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function Rae(e,t){return _M(e.valueOf(),t.valueOf())}function zae(e,t){return e.source===t.source&&e.flags===t.flags}function TM(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.values(),o,s;for(;(o=a.next())&&!o.done;){let r=t.values(),a=!1,c=0;for(;(s=r.next())&&!s.done;){if(!i[c]&&n.equals(o.value,s.value,o.value,s.value,e,t,n)){a=i[c]=!0;break}c++}if(!a)return!1}return!0}function EM(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function Bae(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function DM(e,t,n,r){return(r===bM||r===yM||r===vM)&&(e.$$typeof||t.$$typeof)?!0:gM(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var Vae=`[object ArrayBuffer]`,Hae=`[object Arguments]`,Uae=`[object Boolean]`,Wae=`[object DataView]`,Gae=`[object Date]`,Kae=`[object Error]`,qae=`[object Map]`,Jae=`[object Number]`,Yae=`[object Object]`,Xae=`[object RegExp]`,Zae=`[object Set]`,Qae=`[object String]`,$ae={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},eoe=`[object URL]`,toe=Object.prototype.toString;function noe({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:c,arePrimitiveWrappersEqual:l,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:f,areUrlsEqual:p,unknownTagComparators:m}){return function(h,g,_){if(h===g)return!0;if(h==null||g==null)return!1;let v=typeof h;if(v!==typeof g)return!1;if(v!==`object`)return v===`number`?s(h,g,_):v===`function`?a(h,g,_):!1;let y=h.constructor;if(y!==g.constructor)return!1;if(y===Object)return c(h,g,_);if(Array.isArray(h))return t(h,g,_);if(y===Date)return r(h,g,_);if(y===RegExp)return u(h,g,_);if(y===Map)return o(h,g,_);if(y===Set)return d(h,g,_);let b=toe.call(h);if(b===Gae)return r(h,g,_);if(b===Xae)return u(h,g,_);if(b===qae)return o(h,g,_);if(b===Zae)return d(h,g,_);if(b===Yae)return typeof h.then!=`function`&&typeof g.then!=`function`&&c(h,g,_);if(b===eoe)return p(h,g,_);if(b===Kae)return i(h,g,_);if(b===Hae)return c(h,g,_);if($ae[b])return f(h,g,_);if(b===Vae)return e(h,g,_);if(b===Wae)return n(h,g,_);if(b===Uae||b===Jae||b===Qae)return l(h,g,_);if(m){let e=m[b];if(!e){let t=mM(h);t&&(e=m[t])}if(e)return e(h,g,_)}return!1}}function roe({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:Aae,areArraysEqual:n?wM:jae,areDataViewsEqual:Mae,areDatesEqual:Nae,areErrorsEqual:Pae,areFunctionsEqual:Fae,areMapsEqual:n?fM(CM,wM):CM,areNumbersEqual:Iae,areObjectsEqual:n?wM:Lae,arePrimitiveWrappersEqual:Rae,areRegExpsEqual:zae,areSetsEqual:n?fM(TM,wM):TM,areTypedArraysEqual:n?fM(EM,wM):EM,areUrlsEqual:Bae,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){let e=pM(r.areArraysEqual),t=pM(r.areMapsEqual),n=pM(r.areObjectsEqual),i=pM(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:e,areMapsEqual:t,areObjectsEqual:n,areSetsEqual:i})}return r}function ioe(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function aoe({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(a,o){let{cache:s=e?new WeakMap:void 0,meta:c}=n();return t(a,o,{cache:s,equals:r,meta:c,strict:i})};if(e)return function(e,n){return t(e,n,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};let a={cache:void 0,equals:r,meta:void 0,strict:i};return function(e,n){return t(e,n,a)}}var ooe=OM();OM({strict:!0}),OM({circular:!0}),OM({circular:!0,strict:!0}),OM({createInternalComparator:()=>_M}),OM({strict:!0,createInternalComparator:()=>_M}),OM({circular:!0,createInternalComparator:()=>_M}),OM({circular:!0,createInternalComparator:()=>_M,strict:!0});function OM(e={}){let{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,a=noe(roe(e));return aoe({circular:t,comparator:a,createState:r,equals:n?n(a):ioe(a),strict:i})}function soe(e){typeof requestAnimationFrame<`u`&&requestAnimationFrame(e)}function kM(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1;requestAnimationFrame(function r(i){n<0&&(n=i),i-n>t?(e(i),n=-1):soe(r)})}function AM(e){"@babel/helpers - typeof";return AM=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},AM(e)}function coe(e){return foe(e)||doe(e)||uoe(e)||loe()}function loe(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
156
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uoe(e,t){if(e){if(typeof e==`string`)return jM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jM(e,t)}}function jM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function doe(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function foe(e){if(Array.isArray(e))return e}function poe(){var e={},t=function(){return null},n=!1,r=function r(i){if(!n){if(Array.isArray(i)){if(!i.length)return;var a=coe(i),o=a[0],s=a.slice(1);if(typeof o==`number`){kM(r.bind(null,s),o);return}r(o),kM(r.bind(null,s));return}AM(i)===`object`&&(e=i,t(e)),typeof i==`function`&&i()}};return{stop:function(){n=!0},start:function(e){n=!1,r(e)},subscribe:function(e){return t=e,function(){t=function(){return null}}}}}function MM(e){"@babel/helpers - typeof";return MM=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},MM(e)}function NM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function PM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?NM(Object(n),!0).forEach(function(t){FM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function FM(e,t,n){return t=moe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function moe(e){var t=hoe(e,`string`);return MM(t)===`symbol`?t:String(t)}function hoe(e,t){if(MM(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(MM(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var goe=function(e,t){return[Object.keys(e),Object.keys(t)].reduce(function(e,t){return e.filter(function(e){return t.includes(e)})})},_oe=function(e){return e},voe=function(e){return e.replace(/([A-Z])/g,function(e){return`-${e.toLowerCase()}`})},IM=function(e,t){return Object.keys(t).reduce(function(n,r){return PM(PM({},n),{},FM({},r,e(r,t[r])))},{})},LM=function(e,t,n){return e.map(function(e){return`${voe(e)} ${t}ms ${n}`}).join(`,`)},yoe=!1,RM=function(e,t,n,r,i,a,o,s){if(yoe&&typeof console<`u`&&console.warn&&(t===void 0&&console.warn(`LogUtils requires an error message argument`),!e))if(t===void 0)console.warn(`Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.`);else{var c=[n,r,i,a,o,s],l=0;console.warn(t.replace(/%s/g,function(){return c[l++]}))}};function boe(e,t){return Coe(e)||Soe(e,t)||zM(e,t)||xoe()}function xoe(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
157
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Soe(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Coe(e){if(Array.isArray(e))return e}function woe(e){return Doe(e)||Eoe(e)||zM(e)||Toe()}function Toe(){throw TypeError(`Invalid attempt to spread non-iterable instance.
158
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zM(e,t){if(e){if(typeof e==`string`)return BM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return BM(e,t)}}function Eoe(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Doe(e){if(Array.isArray(e))return BM(e)}function BM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var VM=1e-4,HM=function(e,t){return[0,3*e,3*t-6*e,3*e-3*t+1]},UM=function(e,t){return e.map(function(e,n){return e*t**+n}).reduce(function(e,t){return e+t})},WM=function(e,t){return function(n){return UM(HM(e,t),n)}},Ooe=function(e,t){return function(n){var r=HM(e,t);return UM([].concat(woe(r.map(function(e,t){return e*t}).slice(1)),[0]),n)}},GM=function(){var e=[...arguments],t=e[0],n=e[1],r=e[2],i=e[3];if(e.length===1)switch(e[0]){case`linear`:t=0,n=0,r=1,i=1;break;case`ease`:t=.25,n=.1,r=.25,i=1;break;case`ease-in`:t=.42,n=0,r=1,i=1;break;case`ease-out`:t=.42,n=0,r=.58,i=1;break;case`ease-in-out`:t=0,n=0,r=.58,i=1;break;default:var a=e[0].split(`(`);if(a[0]===`cubic-bezier`&&a[1].split(`)`)[0].split(`,`).length===4){var o=boe(a[1].split(`)`)[0].split(`,`).map(function(e){return parseFloat(e)}),4);t=o[0],n=o[1],r=o[2],i=o[3]}else RM(!1,`[configBezier]: arguments should be one of oneOf 'linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out','cubic-bezier(x1,y1,x2,y2)', instead received %s`,e)}RM([t,r,n,i].every(function(e){return typeof e==`number`&&e>=0&&e<=1}),`[configBezier]: arguments should be x1, y1, x2, y2 of [0, 1] instead received %s`,e);var s=WM(t,r),c=WM(n,i),l=Ooe(t,r),u=function(e){return e>1?1:e<0?0:e},d=function(e){for(var t=e>1?1:e,n=t,r=0;r<8;++r){var i=s(n)-t,a=l(n);if(Math.abs(i-t)<VM||a<VM)return c(n);n=u(n-i/a)}return c(n)};return d.isStepper=!1,d},koe=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.stiff,n=t===void 0?100:t,r=e.damping,i=r===void 0?8:r,a=e.dt,o=a===void 0?17:a,s=function(e,t,r){var a=r+(-(e-t)*n-r*i)*o/1e3,s=r*o/1e3+e;return Math.abs(s-t)<VM&&Math.abs(a)<VM?[t,0]:[s,a]};return s.isStepper=!0,s.dt=o,s},Aoe=function(){var e=[...arguments],t=e[0];if(typeof t==`string`)switch(t){case`ease`:case`ease-in-out`:case`ease-out`:case`ease-in`:case`linear`:return GM(t);case`spring`:return koe();default:if(t.split(`(`)[0]===`cubic-bezier`)return GM(t);RM(!1,`[configEasing]: first argument should be one of 'ease', 'ease-in', 'ease-out', 'ease-in-out','cubic-bezier(x1,y1,x2,y2)', 'linear' and 'spring', instead received %s`,e)}return typeof t==`function`?t:(RM(!1,`[configEasing]: first argument type should be function or string, instead received %s`,e),null)};function KM(e){"@babel/helpers - typeof";return KM=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},KM(e)}function qM(e){return Noe(e)||Moe(e)||ZM(e)||joe()}function joe(){throw TypeError(`Invalid attempt to spread non-iterable instance.
159
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Moe(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Noe(e){if(Array.isArray(e))return QM(e)}function JM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function YM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?JM(Object(n),!0).forEach(function(t){XM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function XM(e,t,n){return t=Poe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Poe(e){var t=Foe(e,`string`);return KM(t)===`symbol`?t:String(t)}function Foe(e,t){if(KM(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(KM(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Ioe(e,t){return zoe(e)||Roe(e,t)||ZM(e,t)||Loe()}function Loe(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
160
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZM(e,t){if(e){if(typeof e==`string`)return QM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return QM(e,t)}}function QM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Roe(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function zoe(e){if(Array.isArray(e))return e}var $M=function(e,t,n){return e+(t-e)*n},eN=function(e){return e.from!==e.to},Boe=function e(t,n,r){var i=IM(function(e,n){if(eN(n)){var r=Ioe(t(n.from,n.to,n.velocity),2),i=r[0],a=r[1];return YM(YM({},n),{},{from:i,velocity:a})}return n},n);return r<1?IM(function(e,t){return eN(t)?YM(YM({},t),{},{velocity:$M(t.velocity,i[e].velocity,r),from:$M(t.from,i[e].from,r)}):t},n):e(t,i,r-1)},Voe=(function(e,t,n,r,i){var a=goe(e,t),o=a.reduce(function(n,r){return YM(YM({},n),{},XM({},r,[e[r],t[r]]))},{}),s=a.reduce(function(n,r){return YM(YM({},n),{},XM({},r,{from:e[r],velocity:0,to:t[r]}))},{}),c=-1,l,u,d=function(){return null},f=function(){return IM(function(e,t){return t.from},s)},p=function(){return!Object.values(s).filter(eN).length};return d=n.isStepper?function(r){l||=r;var a=(r-l)/n.dt;s=Boe(n,s,a),i(YM(YM(YM({},e),t),f(s))),l=r,p()||(c=requestAnimationFrame(d))}:function(a){u||=a;var s=(a-u)/r,l=IM(function(e,t){return $M.apply(void 0,qM(t).concat([n(s)]))},o);if(i(YM(YM(YM({},e),t),l)),s<1)c=requestAnimationFrame(d);else{var f=IM(function(e,t){return $M.apply(void 0,qM(t).concat([n(1)]))},o);i(YM(YM(YM({},e),t),f))}},function(){return requestAnimationFrame(d),function(){cancelAnimationFrame(c)}}}),tN=l(cM());function nN(e){"@babel/helpers - typeof";return nN=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},nN(e)}var Hoe=[`children`,`begin`,`duration`,`attributeName`,`easing`,`isActive`,`steps`,`from`,`to`,`canBegin`,`onAnimationEnd`,`shouldReAnimate`,`onAnimationReStart`];function Uoe(e,t){if(e==null)return{};var n=Woe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Woe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function rN(e){return Joe(e)||qoe(e)||Koe(e)||Goe()}function Goe(){throw TypeError(`Invalid attempt to spread non-iterable instance.
161
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Koe(e,t){if(e){if(typeof e==`string`)return iN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return iN(e,t)}}function qoe(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Joe(e){if(Array.isArray(e))return iN(e)}function iN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function aN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function oN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?aN(Object(n),!0).forEach(function(t){sN(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function sN(e,t,n){return t=lN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yoe(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function cN(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,lN(r.key),r)}}function Xoe(e,t,n){return t&&cN(e.prototype,t),n&&cN(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function lN(e){var t=Zoe(e,`string`);return nN(t)===`symbol`?t:String(t)}function Zoe(e,t){if(nN(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(nN(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Qoe(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,`prototype`,{writable:!1}),t&&uN(e,t)}function uN(e,t){return uN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},uN(e,t)}function $oe(e){var t=ese();return function(){var n=pN(e),r;if(t){var i=pN(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return dN(this,r)}}function dN(e,t){if(t&&(nN(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return fN(e)}function fN(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function ese(){if(typeof Reflect>`u`||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function pN(e){return pN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},pN(e)}var mN=function(e){Qoe(n,e);var t=$oe(n);function n(e,r){var i;Yoe(this,n),i=t.call(this,e,r);var a=i.props,o=a.isActive,s=a.attributeName,c=a.from,l=a.to,u=a.steps,d=a.children,f=a.duration;if(i.handleStyleChange=i.handleStyleChange.bind(fN(i)),i.changeStyle=i.changeStyle.bind(fN(i)),!o||f<=0)return i.state={style:{}},typeof d==`function`&&(i.state={style:l}),dN(i);if(u&&u.length)i.state={style:u[0].style};else if(c){if(typeof d==`function`)return i.state={style:c},dN(i);i.state={style:s?sN({},s,c):c}}else i.state={style:{}};return i}return Xoe(n,[{key:`componentDidMount`,value:function(){var e=this.props,t=e.isActive,n=e.canBegin;this.mounted=!0,!(!t||!n)&&this.runAnimation(this.props)}},{key:`componentDidUpdate`,value:function(e){var t=this.props,n=t.isActive,r=t.canBegin,i=t.attributeName,a=t.shouldReAnimate,o=t.to,s=t.from,c=this.state.style;if(r){if(!n){var l={style:i?sN({},i,o):o};this.state&&c&&(i&&c[i]!==o||!i&&c!==o)&&this.setState(l);return}if(!(ooe(e.to,o)&&e.canBegin&&e.isActive)){var u=!e.canBegin||!e.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var d=u||a?s:e.to;if(this.state&&c){var f={style:i?sN({},i,d):d};(i&&c[i]!==d||!i&&c!==d)&&this.setState(f)}this.runAnimation(oN(oN({},this.props),{},{from:d,begin:0}))}}}},{key:`componentWillUnmount`,value:function(){this.mounted=!1;var e=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&=(this.manager.stop(),null),this.stopJSAnimation&&this.stopJSAnimation(),e&&e()}},{key:`handleStyleChange`,value:function(e){this.changeStyle(e)}},{key:`changeStyle`,value:function(e){this.mounted&&this.setState({style:e})}},{key:`runJSAnimation`,value:function(e){var t=this,n=e.from,r=e.to,i=e.duration,a=e.easing,o=e.begin,s=e.onAnimationEnd,c=e.onAnimationStart,l=Voe(n,r,Aoe(a),i,this.changeStyle);this.manager.start([c,o,function(){t.stopJSAnimation=l()},i,s])}},{key:`runStepAnimation`,value:function(e){var t=this,n=e.steps,r=e.begin,i=e.onAnimationStart,a=n[0],o=a.style,s=a.duration,c=s===void 0?0:s;return this.manager.start([i].concat(rN(n.reduce(function(e,r,i){if(i===0)return e;var a=r.duration,o=r.easing,s=o===void 0?`ease`:o,c=r.style,l=r.properties,u=r.onAnimationEnd,d=i>0?n[i-1]:r,f=l||Object.keys(c);if(typeof s==`function`||s===`spring`)return[].concat(rN(e),[t.runJSAnimation.bind(t,{from:d.style,to:c,duration:a,easing:s}),a]);var p=LM(f,a,s),m=oN(oN(oN({},d.style),c),{},{transition:p});return[].concat(rN(e),[m,a,u]).filter(_oe)},[o,Math.max(c,r)])),[e.onAnimationEnd]))}},{key:`runAnimation`,value:function(e){this.manager||=poe();var t=e.begin,n=e.duration,r=e.attributeName,i=e.to,a=e.easing,o=e.onAnimationStart,s=e.onAnimationEnd,c=e.steps,l=e.children,u=this.manager;if(this.unSubscribe=u.subscribe(this.handleStyleChange),typeof a==`function`||typeof l==`function`||a===`spring`){this.runJSAnimation(e);return}if(c.length>1){this.runStepAnimation(e);return}var d=r?sN({},r,i):i,f=LM(Object.keys(d),n,a);u.start([o,t,oN(oN({},d),{},{transition:f}),n,s])}},{key:`render`,value:function(){var e=this.props,t=e.children;e.begin;var n=e.duration;e.attributeName,e.easing;var r=e.isActive;e.steps,e.from,e.to,e.canBegin,e.onAnimationEnd,e.shouldReAnimate,e.onAnimationReStart;var i=Uoe(e,Hoe),a=_.Children.count(t),o=this.state.style;if(typeof t==`function`)return t(o);if(!r||a===0||n<=0)return t;var s=function(e){var t=e.props,n=t.style,r=n===void 0?{}:n,a=t.className;return(0,_.cloneElement)(e,oN(oN({},i),{},{style:oN(oN({},r),o),className:a}))};return a===1?s(_.Children.only(t)):_.createElement(`div`,null,_.Children.map(t,function(e){return s(e)}))}}]),n}(_.PureComponent);mN.displayName=`Animate`,mN.defaultProps={begin:0,duration:1e3,from:``,to:``,attributeName:``,easing:`ease`,isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}},mN.propTypes={from:tN.default.oneOfType([tN.default.object,tN.default.string]),to:tN.default.oneOfType([tN.default.object,tN.default.string]),attributeName:tN.default.string,duration:tN.default.number,begin:tN.default.number,easing:tN.default.oneOfType([tN.default.string,tN.default.func]),steps:tN.default.arrayOf(tN.default.shape({duration:tN.default.number.isRequired,style:tN.default.object.isRequired,easing:tN.default.oneOfType([tN.default.oneOf([`ease`,`ease-in`,`ease-out`,`ease-in-out`,`linear`]),tN.default.func]),properties:tN.default.arrayOf(`string`),onAnimationEnd:tN.default.func})),children:tN.default.oneOfType([tN.default.node,tN.default.func]),isActive:tN.default.bool,canBegin:tN.default.bool,onAnimationEnd:tN.default.func,shouldReAnimate:tN.default.bool,onAnimationStart:tN.default.func,onAnimationReStart:tN.default.func};var hN=mN;function gN(e){"@babel/helpers - typeof";return gN=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},gN(e)}function _N(){return _N=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_N.apply(this,arguments)}function tse(e,t){return ase(e)||ise(e,t)||rse(e,t)||nse()}function nse(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
162
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rse(e,t){if(e){if(typeof e==`string`)return vN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vN(e,t)}}function vN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ise(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function ase(e){if(Array.isArray(e))return e}function yN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function bN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?yN(Object(n),!0).forEach(function(t){ose(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ose(e,t,n){return t=sse(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sse(e){var t=cse(e,`string`);return gN(t)==`symbol`?t:t+``}function cse(e,t){if(gN(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(gN(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var xN=function(e,t,n,r,i){var a=Math.min(Math.abs(n)/2,Math.abs(r)/2),o=r>=0?1:-1,s=n>=0?1:-1,c=r>=0&&n>=0||r<0&&n<0?1:0,l;if(a>0&&i instanceof Array){for(var u=[0,0,0,0],d=0,f=4;d<f;d++)u[d]=i[d]>a?a:i[d];l=`M${e},${t+o*u[0]}`,u[0]>0&&(l+=`A ${u[0]},${u[0]},0,0,${c},${e+s*u[0]},${t}`),l+=`L ${e+n-s*u[1]},${t}`,u[1]>0&&(l+=`A ${u[1]},${u[1]},0,0,${c},
163
- ${e+n},${t+o*u[1]}`),l+=`L ${e+n},${t+r-o*u[2]}`,u[2]>0&&(l+=`A ${u[2]},${u[2]},0,0,${c},
164
- ${e+n-s*u[2]},${t+r}`),l+=`L ${e+s*u[3]},${t+r}`,u[3]>0&&(l+=`A ${u[3]},${u[3]},0,0,${c},
165
- ${e},${t+r-o*u[3]}`),l+=`Z`}else if(a>0&&i===+i&&i>0){var p=Math.min(a,i);l=`M ${e},${t+o*p}
166
- A ${p},${p},0,0,${c},${e+s*p},${t}
167
- L ${e+n-s*p},${t}
168
- A ${p},${p},0,0,${c},${e+n},${t+o*p}
169
- L ${e+n},${t+r-o*p}
170
- A ${p},${p},0,0,${c},${e+n-s*p},${t+r}
171
- L ${e+s*p},${t+r}
172
- A ${p},${p},0,0,${c},${e},${t+r-o*p} Z`}else l=`M ${e},${t} h ${n} v ${r} h ${-n} Z`;return l},lse=function(e,t){if(!e||!t)return!1;var n=e.x,r=e.y,i=t.x,a=t.y,o=t.width,s=t.height;if(Math.abs(o)>0&&Math.abs(s)>0){var c=Math.min(i,i+o),l=Math.max(i,i+o),u=Math.min(a,a+s),d=Math.max(a,a+s);return n>=c&&n<=l&&r>=u&&r<=d}return!1},use={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:`ease`},SN=function(e){var t=bN(bN({},use),e),n=(0,_.useRef)(),r=tse((0,_.useState)(-1),2),i=r[0],a=r[1];(0,_.useEffect)(function(){if(n.current&&n.current.getTotalLength)try{var e=n.current.getTotalLength();e&&a(e)}catch{}},[]);var o=t.x,s=t.y,c=t.width,l=t.height,u=t.radius,d=t.className,f=t.animationEasing,p=t.animationDuration,m=t.animationBegin,h=t.isAnimationActive,g=t.isUpdateAnimationActive;if(o!==+o||s!==+s||c!==+c||l!==+l||c===0||l===0)return null;var v=Rt(`recharts-rectangle`,d);return g?_.createElement(hN,{canBegin:i>0,from:{width:c,height:l,x:o,y:s},to:{width:c,height:l,x:o,y:s},duration:p,animationEasing:f,isActive:g},function(e){var r=e.width,a=e.height,o=e.x,s=e.y;return _.createElement(hN,{canBegin:i>0,from:`0px ${i===-1?1:i}px`,to:`${i}px 0px`,attributeName:`strokeDasharray`,begin:m,duration:p,isActive:h,easing:f},_.createElement(`path`,_N({},J(t,!0),{className:v,d:xN(o,s,r,a,u),ref:n})))}):_.createElement(`path`,_N({},J(t,!0),{className:v,d:xN(o,s,c,l,u)}))},dse=[`points`,`className`,`baseLinePoints`,`connectNulls`];function CN(){return CN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},CN.apply(this,arguments)}function fse(e,t){if(e==null)return{};var n=pse(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function pse(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function wN(e){return _se(e)||gse(e)||hse(e)||mse()}function mse(){throw TypeError(`Invalid attempt to spread non-iterable instance.
173
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hse(e,t){if(e){if(typeof e==`string`)return TN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return TN(e,t)}}function gse(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function _se(e){if(Array.isArray(e))return TN(e)}function TN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var EN=function(e){return e&&e.x===+e.x&&e.y===+e.y},vse=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=[[]];return e.forEach(function(e){EN(e)?t[t.length-1].push(e):t[t.length-1].length>0&&t.push([])}),EN(e[0])&&t[t.length-1].push(e[0]),t[t.length-1].length<=0&&(t=t.slice(0,-1)),t},DN=function(e,t){var n=vse(e);t&&(n=[n.reduce(function(e,t){return[].concat(wN(e),wN(t))},[])]);var r=n.map(function(e){return e.reduce(function(e,t,n){return`${e}${n===0?`M`:`L`}${t.x},${t.y}`},``)}).join(``);return n.length===1?`${r}Z`:r},yse=function(e,t,n){var r=DN(e,n);return`${r.slice(-1)===`Z`?r.slice(0,-1):r}L${DN(t.reverse(),n).slice(1)}`},bse=function(e){var t=e.points,n=e.className,r=e.baseLinePoints,i=e.connectNulls,a=fse(e,dse);if(!t||!t.length)return null;var o=Rt(`recharts-polygon`,n);if(r&&r.length){var s=a.stroke&&a.stroke!==`none`,c=yse(t,r,i);return _.createElement(`g`,{className:o},_.createElement(`path`,CN({},J(a,!0),{fill:c.slice(-1)===`Z`?a.fill:`none`,stroke:`none`,d:c})),s?_.createElement(`path`,CN({},J(a,!0),{fill:`none`,d:DN(t,i)})):null,s?_.createElement(`path`,CN({},J(a,!0),{fill:`none`,d:DN(r,i)})):null)}var l=DN(t,i);return _.createElement(`path`,CN({},J(a,!0),{fill:l.slice(-1)===`Z`?a.fill:`none`,className:o,d:l}))};function ON(){return ON=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ON.apply(this,arguments)}var kN=function(e){var t=e.cx,n=e.cy,r=e.r,i=e.className,a=Rt(`recharts-dot`,i);return t===+t&&n===+n&&r===+r?_.createElement(`circle`,ON({},J(e,!1),f_(e),{className:a,cx:t,cy:n,r})):null};function AN(e){"@babel/helpers - typeof";return AN=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},AN(e)}var xse=[`x`,`y`,`top`,`left`,`width`,`height`,`className`];function jN(){return jN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jN.apply(this,arguments)}function MN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Sse(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?MN(Object(n),!0).forEach(function(t){Cse(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Cse(e,t,n){return t=wse(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wse(e){var t=Tse(e,`string`);return AN(t)==`symbol`?t:t+``}function Tse(e,t){if(AN(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(AN(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Ese(e,t){if(e==null)return{};var n=Dse(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Dse(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Ose=function(e,t,n,r,i,a){return`M${e},${i}v${r}M${a},${t}h${n}`},kse=function(e){var t=e.x,n=t===void 0?0:t,r=e.y,i=r===void 0?0:r,a=e.top,o=a===void 0?0:a,s=e.left,c=s===void 0?0:s,l=e.width,u=l===void 0?0:l,d=e.height,f=d===void 0?0:d,p=e.className,m=Ese(e,xse),h=Sse({x:n,y:i,top:o,left:c,width:u,height:f},m);return!q(n)||!q(i)||!q(u)||!q(f)||!q(o)||!q(c)?null:_.createElement(`path`,jN({},J(h,!0),{className:Rt(`recharts-cross`,p),d:Ose(n,i,u,f,o,c)}))},Ase=o(((e,t)=>{var n=UD(),r=WD(),i=px();function a(e,t){return e&&e.length?n(e,i(t,2),r):void 0}t.exports=a})),jse=o(((e,t)=>{var n=UD(),r=px(),i=KD();function a(e,t){return e&&e.length?n(e,r(t,2),i):void 0}t.exports=a})),Mse=l(Ase()),Nse=l(jse()),Pse=[`cx`,`cy`,`angle`,`ticks`,`axisLine`],Fse=[`ticks`,`tick`,`angle`,`tickFormatter`,`stroke`];function NN(e){"@babel/helpers - typeof";return NN=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},NN(e)}function PN(){return PN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},PN.apply(this,arguments)}function FN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function IN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?FN(Object(n),!0).forEach(function(t){HN(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function LN(e,t){if(e==null)return{};var n=Ise(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ise(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Lse(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function RN(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,UN(r.key),r)}}function Rse(e,t,n){return t&&RN(e.prototype,t),n&&RN(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function zse(e,t,n){return t=BN(t),Bse(e,zN()?Reflect.construct(t,n||[],BN(e).constructor):t.apply(e,n))}function Bse(e,t){if(t&&(NN(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return Vse(e)}function Vse(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function zN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(zN=function(){return!!e})()}function BN(e){return BN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},BN(e)}function Hse(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,`prototype`,{writable:!1}),t&&VN(e,t)}function VN(e,t){return VN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},VN(e,t)}function HN(e,t,n){return t=UN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function UN(e){var t=Use(e,`string`);return NN(t)==`symbol`?t:t+``}function Use(e,t){if(NN(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(NN(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var WN=function(e){function t(){return Lse(this,t),zse(this,t,arguments)}return Hse(t,e),Rse(t,[{key:`getTickValueCoord`,value:function(e){var t=e.coordinate,n=this.props,r=n.angle,i=n.cx,a=n.cy;return jA(i,a,t,r)}},{key:`getTickTextAnchor`,value:function(){var e=this.props.orientation,t;switch(e){case`left`:t=`end`;break;case`right`:t=`start`;break;default:t=`middle`;break}return t}},{key:`getViewBox`,value:function(){var e=this.props,t=e.cx,n=e.cy,r=e.angle,i=e.ticks,a=(0,Mse.default)(i,function(e){return e.coordinate||0});return{cx:t,cy:n,startAngle:r,endAngle:r,innerRadius:(0,Nse.default)(i,function(e){return e.coordinate||0}).coordinate||0,outerRadius:a.coordinate||0}}},{key:`renderAxisLine`,value:function(){var e=this.props,t=e.cx,n=e.cy,r=e.angle,i=e.ticks,a=e.axisLine,o=LN(e,Pse),s=i.reduce(function(e,t){return[Math.min(e[0],t.coordinate),Math.max(e[1],t.coordinate)]},[1/0,-1/0]),c=jA(t,n,s[0],r),l=jA(t,n,s[1],r),u=IN(IN(IN({},J(o,!1)),{},{fill:`none`},J(a,!1)),{},{x1:c.x,y1:c.y,x2:l.x,y2:l.y});return _.createElement(`line`,PN({className:`recharts-polar-radius-axis-line`},u))}},{key:`renderTicks`,value:function(){var e=this,n=this.props,r=n.ticks,i=n.tick,a=n.angle,o=n.tickFormatter,s=n.stroke,c=LN(n,Fse),l=this.getTickTextAnchor(),u=J(c,!1),d=J(i,!1),f=r.map(function(n,r){var c=e.getTickValueCoord(n),f=IN(IN(IN(IN({textAnchor:l,transform:`rotate(${90-a}, ${c.x}, ${c.y})`},u),{},{stroke:`none`,fill:s},d),{},{index:r},c),{},{payload:n});return _.createElement(U_,PN({className:Rt(`recharts-polar-radius-axis-tick`,zA(i)),key:`tick-${n.coordinate}`},p_(e.props,n,r)),t.renderTickItem(i,f,o?o(n.value,r):n.value))});return _.createElement(U_,{className:`recharts-polar-radius-axis-ticks`},f)}},{key:`render`,value:function(){var e=this.props,t=e.ticks,n=e.axisLine,r=e.tick;return!t||!t.length?null:_.createElement(U_,{className:Rt(`recharts-polar-radius-axis`,this.props.className)},n&&this.renderAxisLine(),r&&this.renderTicks(),cj.renderCallByParent(this.props,this.getViewBox()))}}],[{key:`renderTickItem`,value:function(e,t,n){return _.isValidElement(e)?_.cloneElement(e,t):(0,m_.default)(e)?e(t):_.createElement($S,PN({},t,{className:`recharts-polar-radius-axis-tick-value`}),n)}}])}(_.PureComponent);HN(WN,`displayName`,`PolarRadiusAxis`),HN(WN,`axisType`,`radiusAxis`),HN(WN,`defaultProps`,{type:`number`,radiusAxisId:0,cx:0,cy:0,angle:0,orientation:`right`,stroke:`#ccc`,axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:`auto`,allowDuplicatedCategory:!0});function GN(e){"@babel/helpers - typeof";return GN=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},GN(e)}function KN(){return KN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},KN.apply(this,arguments)}function qN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function JN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?qN(Object(n),!0).forEach(function(t){$N(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Wse(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function YN(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,eP(r.key),r)}}function Gse(e,t,n){return t&&YN(e.prototype,t),n&&YN(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function Kse(e,t,n){return t=ZN(t),qse(e,XN()?Reflect.construct(t,n||[],ZN(e).constructor):t.apply(e,n))}function qse(e,t){if(t&&(GN(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return Jse(e)}function Jse(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function XN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(XN=function(){return!!e})()}function ZN(e){return ZN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ZN(e)}function Yse(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,`prototype`,{writable:!1}),t&&QN(e,t)}function QN(e,t){return QN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},QN(e,t)}function $N(e,t,n){return t=eP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eP(e){var t=Xse(e,`string`);return GN(t)==`symbol`?t:t+``}function Xse(e,t){if(GN(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(GN(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Zse=Math.PI/180,tP=1e-5,nP=function(e){function t(){return Wse(this,t),Kse(this,t,arguments)}return Yse(t,e),Gse(t,[{key:`getTickLineCoord`,value:function(e){var t=this.props,n=t.cx,r=t.cy,i=t.radius,a=t.orientation,o=t.tickSize||8,s=jA(n,r,i,e.coordinate),c=jA(n,r,i+(a===`inner`?-1:1)*o,e.coordinate);return{x1:s.x,y1:s.y,x2:c.x,y2:c.y}}},{key:`getTickTextAnchor`,value:function(e){var t=this.props.orientation,n=Math.cos(-e.coordinate*Zse);return n>tP?t===`outer`?`start`:`end`:n<-tP?t===`outer`?`end`:`start`:`middle`}},{key:`renderAxisLine`,value:function(){var e=this.props,t=e.cx,n=e.cy,r=e.radius,i=e.axisLine,a=e.axisLineType,o=JN(JN({},J(this.props,!1)),{},{fill:`none`},J(i,!1));if(a===`circle`)return _.createElement(kN,KN({className:`recharts-polar-angle-axis-line`},o,{cx:t,cy:n,r}));var s=this.props.ticks.map(function(e){return jA(t,n,r,e.coordinate)});return _.createElement(bse,KN({className:`recharts-polar-angle-axis-line`},o,{points:s}))}},{key:`renderTicks`,value:function(){var e=this,n=this.props,r=n.ticks,i=n.tick,a=n.tickLine,o=n.tickFormatter,s=n.stroke,c=J(this.props,!1),l=J(i,!1),u=JN(JN({},c),{},{fill:`none`},J(a,!1)),d=r.map(function(n,r){var d=e.getTickLineCoord(n),f=JN(JN(JN({textAnchor:e.getTickTextAnchor(n)},c),{},{stroke:`none`,fill:s},l),{},{index:r,payload:n,x:d.x2,y:d.y2});return _.createElement(U_,KN({className:Rt(`recharts-polar-angle-axis-tick`,zA(i)),key:`tick-${n.coordinate}`},p_(e.props,n,r)),a&&_.createElement(`line`,KN({className:`recharts-polar-angle-axis-tick-line`},u,d)),i&&t.renderTickItem(i,f,o?o(n.value,r):n.value))});return _.createElement(U_,{className:`recharts-polar-angle-axis-ticks`},d)}},{key:`render`,value:function(){var e=this.props,t=e.ticks,n=e.radius,r=e.axisLine;return n<=0||!t||!t.length?null:_.createElement(U_,{className:Rt(`recharts-polar-angle-axis`,this.props.className)},r&&this.renderAxisLine(),this.renderTicks())}}],[{key:`renderTickItem`,value:function(e,t,n){return _.isValidElement(e)?_.cloneElement(e,t):(0,m_.default)(e)?e(t):_.createElement($S,KN({},t,{className:`recharts-polar-angle-axis-tick-value`}),n)}}])}(_.PureComponent);$N(nP,`displayName`,`PolarAngleAxis`),$N(nP,`axisType`,`angleAxis`),$N(nP,`defaultProps`,{type:`category`,angleAxisId:0,scale:`auto`,cx:0,cy:0,orientation:`outer`,axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var Qse=o(((e,t)=>{t.exports=Bb()(Object.getPrototypeOf,Object)})),$se=o(((e,t)=>{var n=Eg(),r=Qse(),i=Dg(),a=`[object Object]`,o=Function.prototype,s=Object.prototype,c=o.toString,l=s.hasOwnProperty,u=c.call(Object);function d(e){if(!i(e)||n(e)!=a)return!1;var t=r(e);if(t===null)return!0;var o=l.call(t,`constructor`)&&t.constructor;return typeof o==`function`&&o instanceof o&&c.call(o)==u}t.exports=d})),ece=o(((e,t)=>{var n=Eg(),r=Dg(),i=`[object Boolean]`;function a(e){return e===!0||e===!1||r(e)&&n(e)==i}t.exports=a}));function rP(e){"@babel/helpers - typeof";return rP=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},rP(e)}function iP(){return iP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},iP.apply(this,arguments)}function tce(e,t){return ace(e)||ice(e,t)||rce(e,t)||nce()}function nce(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
174
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rce(e,t){if(e){if(typeof e==`string`)return aP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return aP(e,t)}}function aP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ice(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function ace(e){if(Array.isArray(e))return e}function oP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function sP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?oP(Object(n),!0).forEach(function(t){oce(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function oce(e,t,n){return t=sce(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sce(e){var t=cce(e,`string`);return rP(t)==`symbol`?t:t+``}function cce(e,t){if(rP(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(rP(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var cP=function(e,t,n,r,i){var a=n-r,o=`M ${e},${t}`;return o+=`L ${e+n},${t}`,o+=`L ${e+n-a/2},${t+i}`,o+=`L ${e+n-a/2-r},${t+i}`,o+=`L ${e},${t} Z`,o},lce={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:`ease`},uce=function(e){var t=sP(sP({},lce),e),n=(0,_.useRef)(),r=tce((0,_.useState)(-1),2),i=r[0],a=r[1];(0,_.useEffect)(function(){if(n.current&&n.current.getTotalLength)try{var e=n.current.getTotalLength();e&&a(e)}catch{}},[]);var o=t.x,s=t.y,c=t.upperWidth,l=t.lowerWidth,u=t.height,d=t.className,f=t.animationEasing,p=t.animationDuration,m=t.animationBegin,h=t.isUpdateAnimationActive;if(o!==+o||s!==+s||c!==+c||l!==+l||u!==+u||c===0&&l===0||u===0)return null;var g=Rt(`recharts-trapezoid`,d);return h?_.createElement(hN,{canBegin:i>0,from:{upperWidth:0,lowerWidth:0,height:u,x:o,y:s},to:{upperWidth:c,lowerWidth:l,height:u,x:o,y:s},duration:p,animationEasing:f,isActive:h},function(e){var r=e.upperWidth,a=e.lowerWidth,o=e.height,s=e.x,c=e.y;return _.createElement(hN,{canBegin:i>0,from:`0px ${i===-1?1:i}px`,to:`${i}px 0px`,attributeName:`strokeDasharray`,begin:m,duration:p,easing:f},_.createElement(`path`,iP({},J(t,!0),{className:g,d:cP(s,c,r,a,o),ref:n})))}):_.createElement(`g`,null,_.createElement(`path`,iP({},J(t,!0),{className:g,d:cP(o,s,c,l,u)})))},dce=l($se()),fce=l(ece()),pce=[`option`,`shapeType`,`propTransformer`,`activeClassName`,`isActive`];function lP(e){"@babel/helpers - typeof";return lP=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},lP(e)}function mce(e,t){if(e==null)return{};var n=hce(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hce(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function uP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function dP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?uP(Object(n),!0).forEach(function(t){gce(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function gce(e,t,n){return t=_ce(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _ce(e){var t=vce(e,`string`);return lP(t)==`symbol`?t:t+``}function vce(e,t){if(lP(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(lP(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function yce(e,t){return dP(dP({},t),e)}function bce(e,t){return e===`symbols`}function fP(e){var t=e.shapeType,n=e.elementProps;switch(t){case`rectangle`:return _.createElement(SN,n);case`trapezoid`:return _.createElement(uce,n);case`sector`:return _.createElement(Gj,n);case`symbols`:if(bce(t,n))return _.createElement(By,n);break;default:return null}}function xce(e){return(0,_.isValidElement)(e)?e.props:e}function pP(e){var t=e.option,n=e.shapeType,r=e.propTransformer,i=r===void 0?yce:r,a=e.activeClassName,o=a===void 0?`recharts-active-shape`:a,s=e.isActive,c=mce(e,pce),l;if((0,_.isValidElement)(t))l=(0,_.cloneElement)(t,dP(dP({},c),xce(t)));else if((0,m_.default)(t))l=t(c);else if((0,dce.default)(t)&&!(0,fce.default)(t)){var u=i(t,c);l=_.createElement(fP,{shapeType:n,elementProps:u})}else{var d=c;l=_.createElement(fP,{shapeType:n,elementProps:d})}return s?_.createElement(U_,{className:o},l):l}function mP(e,t){return t!=null&&`trapezoids`in e.props}function hP(e,t){return t!=null&&`sectors`in e.props}function gP(e,t){return t!=null&&`points`in e.props}function Sce(e,t){var n,r,i=e.x===(t==null||(n=t.labelViewBox)==null?void 0:n.x)||e.x===t.x,a=e.y===(t==null||(r=t.labelViewBox)==null?void 0:r.y)||e.y===t.y;return i&&a}function Cce(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function wce(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function Tce(e,t){var n;return mP(e,t)?n=Sce:hP(e,t)?n=Cce:gP(e,t)&&(n=wce),n}function Ece(e,t){var n;return mP(e,t)?n=`trapezoids`:hP(e,t)?n=`sectors`:gP(e,t)&&(n=`points`),n}function Dce(e,t){if(mP(e,t)){var n;return(n=t.tooltipPayload)==null||(n=n[0])==null||(n=n.payload)==null?void 0:n.payload}if(hP(e,t)){var r;return(r=t.tooltipPayload)==null||(r=r[0])==null||(r=r.payload)==null?void 0:r.payload}return gP(e,t)?t.payload:{}}function Oce(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=Ece(n,t),a=Dce(n,t),o=r.filter(function(e,r){var o=(0,xk.default)(a,e),s=n.props[i].filter(function(e){return Tce(n,t)(e,t)}),c=r===n.props[i].indexOf(s[s.length-1]);return o&&c});return r.indexOf(o[o.length-1])}var _P;function vP(e){"@babel/helpers - typeof";return vP=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},vP(e)}function yP(){return yP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yP.apply(this,arguments)}function bP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function xP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?bP(Object(n),!0).forEach(function(t){EP(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function kce(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function SP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,DP(r.key),r)}}function Ace(e,t,n){return t&&SP(e.prototype,t),n&&SP(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function jce(e,t,n){return t=wP(t),Mce(e,CP()?Reflect.construct(t,n||[],wP(e).constructor):t.apply(e,n))}function Mce(e,t){if(t&&(vP(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return Nce(e)}function Nce(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function CP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(CP=function(){return!!e})()}function wP(e){return wP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},wP(e)}function Pce(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,`prototype`,{writable:!1}),t&&TP(e,t)}function TP(e,t){return TP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},TP(e,t)}function EP(e,t,n){return t=DP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DP(e){var t=Fce(e,`string`);return vP(t)==`symbol`?t:t+``}function Fce(e,t){if(vP(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(vP(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var OP=function(e){function t(e){var n;return kce(this,t),n=jce(this,t,[e]),EP(n,`pieRef`,null),EP(n,`sectorRefs`,[]),EP(n,`id`,n_(`recharts-pie-`)),EP(n,`handleAnimationEnd`,function(){var e=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),(0,m_.default)(e)&&e()}),EP(n,`handleAnimationStart`,function(){var e=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),(0,m_.default)(e)&&e()}),n.state={isAnimationFinished:!e.isAnimationActive,prevIsAnimationActive:e.isAnimationActive,prevAnimationId:e.animationId,sectorToFocus:0},n}return Pce(t,e),Ace(t,[{key:`isActiveIndex`,value:function(e){var t=this.props.activeIndex;return Array.isArray(t)?t.indexOf(e)!==-1:e===t}},{key:`hasActiveIndex`,value:function(){var e=this.props.activeIndex;return Array.isArray(e)?e.length!==0:e||e===0}},{key:`renderLabels`,value:function(e){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var n=this.props,r=n.label,i=n.labelLine,a=n.dataKey,o=n.valueKey,s=J(this.props,!1),c=J(r,!1),l=J(i,!1),u=r&&r.offsetRadius||20,d=e.map(function(e,n){var d=(e.startAngle+e.endAngle)/2,f=jA(e.cx,e.cy,e.outerRadius+u,d),p=xP(xP(xP(xP({},s),e),{},{stroke:`none`},c),{},{index:n,textAnchor:t.getTextAnchor(f.x,e.cx)},f),m=xP(xP(xP(xP({},s),e),{},{fill:`none`,stroke:e.fill},l),{},{index:n,points:[jA(e.cx,e.cy,e.outerRadius,d),f]}),h=a;return(0,Qg.default)(a)&&(0,Qg.default)(o)?h=`value`:(0,Qg.default)(a)&&(h=o),_.createElement(U_,{key:`label-${e.startAngle}-${e.endAngle}-${e.midAngle}-${n}`},i&&t.renderLabelLineItem(i,m,`line`),t.renderLabelItem(r,p,Pk(e,h)))});return _.createElement(U_,{className:`recharts-pie-labels`},d)}},{key:`renderSectorsStatically`,value:function(e){var t=this,n=this.props,r=n.activeShape,i=n.blendStroke,a=n.inactiveShape;return e.map(function(n,o){if(n?.startAngle===0&&n?.endAngle===0&&e.length!==1)return null;var s=t.isActiveIndex(o),c=a&&t.hasActiveIndex()?a:null,l=s?r:c,u=xP(xP({},n),{},{stroke:i?n.fill:n.stroke,tabIndex:-1});return _.createElement(U_,yP({ref:function(e){e&&!t.sectorRefs.includes(e)&&t.sectorRefs.push(e)},tabIndex:-1,className:`recharts-pie-sector`},p_(t.props,n,o),{key:`sector-${n?.startAngle}-${n?.endAngle}-${n.midAngle}-${o}`}),_.createElement(pP,yP({option:l,isActive:s,shapeType:`sector`},u)))})}},{key:`renderSectorsWithAnimation`,value:function(){var e=this,t=this.props,n=t.sectors,r=t.isAnimationActive,i=t.animationBegin,a=t.animationDuration,o=t.animationEasing,s=t.animationId,c=this.state,l=c.prevSectors,u=c.prevIsAnimationActive;return _.createElement(hN,{begin:i,duration:a,isActive:r,easing:o,from:{t:0},to:{t:1},key:`pie-${s}-${u}`,onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(t){var r=t.t,i=[],a=(n&&n[0]).startAngle;return n.forEach(function(e,t){var n=l&&l[t],o=t>0?(0,Zg.default)(e,`paddingAngle`,0):0;if(n){var s=a_(n.endAngle-n.startAngle,e.endAngle-e.startAngle),c=xP(xP({},e),{},{startAngle:a+o,endAngle:a+s(r)+o});i.push(c),a=c.endAngle}else{var u=e.endAngle,d=e.startAngle,f=a_(0,u-d)(r),p=xP(xP({},e),{},{startAngle:a+o,endAngle:a+f+o});i.push(p),a=p.endAngle}}),_.createElement(U_,null,e.renderSectorsStatically(i))})}},{key:`attachKeyboardHandlers`,value:function(e){var t=this;e.onkeydown=function(e){if(!e.altKey)switch(e.key){case`ArrowLeft`:var n=++t.state.sectorToFocus%t.sectorRefs.length;t.sectorRefs[n].focus(),t.setState({sectorToFocus:n});break;case`ArrowRight`:var r=--t.state.sectorToFocus<0?t.sectorRefs.length-1:t.state.sectorToFocus%t.sectorRefs.length;t.sectorRefs[r].focus(),t.setState({sectorToFocus:r});break;case`Escape`:t.sectorRefs[t.state.sectorToFocus].blur(),t.setState({sectorToFocus:0});break;default:}}}},{key:`renderSectors`,value:function(){var e=this.props,t=e.sectors,n=e.isAnimationActive,r=this.state.prevSectors;return n&&t&&t.length&&(!r||!(0,xk.default)(r,t))?this.renderSectorsWithAnimation():this.renderSectorsStatically(t)}},{key:`componentDidMount`,value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:`render`,value:function(){var e=this,t=this.props,n=t.hide,r=t.sectors,i=t.className,a=t.label,o=t.cx,s=t.cy,c=t.innerRadius,l=t.outerRadius,u=t.isAnimationActive,d=this.state.isAnimationFinished;if(n||!r||!r.length||!q(o)||!q(s)||!q(c)||!q(l))return null;var f=Rt(`recharts-pie`,i);return _.createElement(U_,{tabIndex:this.props.rootTabIndex,className:f,ref:function(t){e.pieRef=t}},this.renderSectors(),a&&this.renderLabels(r),cj.renderCallByParent(this.props,null,!1),(!u||d)&&Aj.renderCallByParent(this.props,r,!1))}}],[{key:`getDerivedStateFromProps`,value:function(e,t){return t.prevIsAnimationActive===e.isAnimationActive?e.isAnimationActive&&e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curSectors:e.sectors,prevSectors:t.curSectors,isAnimationFinished:!0}:e.sectors===t.curSectors?null:{curSectors:e.sectors,isAnimationFinished:!0}:{prevIsAnimationActive:e.isAnimationActive,prevAnimationId:e.animationId,curSectors:e.sectors,prevSectors:[],isAnimationFinished:!0}}},{key:`getTextAnchor`,value:function(e,t){return e>t?`start`:e<t?`end`:`middle`}},{key:`renderLabelLineItem`,value:function(e,t,n){if(_.isValidElement(e))return _.cloneElement(e,t);if((0,m_.default)(e))return e(t);var r=Rt(`recharts-pie-label-line`,typeof e==`boolean`?``:e.className);return _.createElement(aM,yP({},t,{key:n,type:`linear`,className:r}))}},{key:`renderLabelItem`,value:function(e,t,n){if(_.isValidElement(e))return _.cloneElement(e,t);var r=n;if((0,m_.default)(e)&&(r=e(t),_.isValidElement(r)))return r;var i=Rt(`recharts-pie-label-text`,typeof e!=`boolean`&&!(0,m_.default)(e)?e.className:``);return _.createElement($S,yP({},t,{alignmentBaseline:`middle`,className:i}),r)}}])}(_.PureComponent);_P=OP,EP(OP,`displayName`,`Pie`),EP(OP,`defaultProps`,{stroke:`#fff`,fill:`#808080`,legendType:`rect`,cx:`50%`,cy:`50%`,startAngle:0,endAngle:360,innerRadius:0,outerRadius:`80%`,paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!cS.isSsr,animationBegin:400,animationDuration:1500,animationEasing:`ease`,nameKey:`name`,blendStroke:!1,rootTabIndex:0}),EP(OP,`parseDeltaAngle`,function(e,t){return $g(t-e)*Math.min(Math.abs(t-e),360)}),EP(OP,`getRealPieData`,function(e){var t=e.data,n=e.children,r=J(e,!1),i=S_(n,ES);return t&&t.length?t.map(function(e,t){return xP(xP(xP({payload:e},r),e),i&&i[t]&&i[t].props)}):i&&i.length?i.map(function(e){return xP(xP({},r),e.props)}):[]}),EP(OP,`parseCoordinateOfPie`,function(e,t){var n=t.top,r=t.left,i=t.width,a=t.height,o=MA(i,a);return{cx:r+r_(e.cx,i,i/2),cy:n+r_(e.cy,a,a/2),innerRadius:r_(e.innerRadius,o,0),outerRadius:r_(e.outerRadius,o,o*.8),maxRadius:e.maxRadius||Math.sqrt(i*i+a*a)/2}}),EP(OP,`getComposedData`,function(e){var t=e.item,n=e.offset,r=t.type.defaultProps===void 0?t.props:xP(xP({},t.type.defaultProps),t.props),i=_P.getRealPieData(r);if(!i||!i.length)return null;var a=r.cornerRadius,o=r.startAngle,s=r.endAngle,c=r.paddingAngle,l=r.dataKey,u=r.nameKey,d=r.valueKey,f=r.tooltipType,p=Math.abs(r.minAngle),m=_P.parseCoordinateOfPie(r,n),h=_P.parseDeltaAngle(o,s),g=Math.abs(h),_=l;(0,Qg.default)(l)&&(0,Qg.default)(d)?(G_(!1,`Use "dataKey" to specify the value of pie,
175
- the props "valueKey" will be deprecated in 1.1.0`),_=`value`):(0,Qg.default)(l)&&(G_(!1,`Use "dataKey" to specify the value of pie,
176
- the props "valueKey" will be deprecated in 1.1.0`),_=d);var v=i.filter(function(e){return Pk(e,_,0)!==0}).length,y=(g>=360?v:v-1)*c,b=g-v*p-y,x=i.reduce(function(e,t){var n=Pk(t,_,0);return e+(q(n)?n:0)},0),S;if(x>0){var C;S=i.map(function(e,t){var n=Pk(e,_,0),r=Pk(e,u,t),i=(q(n)?n:0)/x,s=t?C.endAngle+$g(h)*c*(n===0?0:1):o,l=s+$g(h)*((n===0?0:p)+i*b),d=(s+l)/2,g=(m.innerRadius+m.outerRadius)/2;return C=xP(xP(xP({percent:i,cornerRadius:a,name:r,tooltipPayload:[{name:r,value:n,payload:e,dataKey:_,type:f}],midAngle:d,middleRadius:g,tooltipPosition:jA(m.cx,m.cy,g,d)},e),m),{},{value:Pk(e,_),startAngle:s,endAngle:l,payload:e,paddingAngle:$g(h)*c}),C})}return xP(xP({},m),{},{sectors:S,data:i})});var Ice=o(((e,t)=>{var n=Math.ceil,r=Math.max;function i(e,t,i,a){for(var o=-1,s=r(n((t-e)/(i||1)),0),c=Array(s);s--;)c[a?s:++o]=e,e+=i;return c}t.exports=i})),kP=o(((e,t)=>{var n=yS(),r=1/0,i=17976931348623157e292;function a(e){return e?(e=n(e),e===r||e===-r?(e<0?-1:1)*i:e===e?e:0):e===0?e:0}t.exports=a})),Lce=o(((e,t)=>{var n=Ice(),r=Vx(),i=kP();function a(e){return function(t,a,o){return o&&typeof o!=`number`&&r(t,a,o)&&(a=o=void 0),t=i(t),a===void 0?(a=t,t=0):a=i(a),o=o===void 0?t<a?1:-1:i(o),n(t,a,o,e)}}t.exports=a})),Rce=o(((e,t)=>{t.exports=Lce()()}));function AP(e){"@babel/helpers - typeof";return AP=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},AP(e)}function jP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function MP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?jP(Object(n),!0).forEach(function(t){NP(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function NP(e,t,n){return t=zce(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zce(e){var t=Bce(e,`string`);return AP(t)==`symbol`?t:t+``}function Bce(e,t){if(AP(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(AP(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Vce=[`Webkit`,`Moz`,`O`,`ms`],Hce=function(e,t){if(!e)return null;var n=e.replace(/(\w)/,function(e){return e.toUpperCase()}),r=Vce.reduce(function(e,r){return MP(MP({},e),{},NP({},r+n,t))},{});return r[e]=t,r},PP=l(Rce());function FP(e){"@babel/helpers - typeof";return FP=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},FP(e)}function IP(){return IP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},IP.apply(this,arguments)}function LP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function RP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?LP(Object(n),!0).forEach(function(t){UP(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Uce(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function zP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,WP(r.key),r)}}function Wce(e,t,n){return t&&zP(e.prototype,t),n&&zP(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function Gce(e,t,n){return t=VP(t),Kce(e,BP()?Reflect.construct(t,n||[],VP(e).constructor):t.apply(e,n))}function Kce(e,t){if(t&&(FP(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return qce(e)}function qce(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function BP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(BP=function(){return!!e})()}function VP(e){return VP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},VP(e)}function Jce(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,`prototype`,{writable:!1}),t&&HP(e,t)}function HP(e,t){return HP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},HP(e,t)}function UP(e,t,n){return t=WP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WP(e){var t=Yce(e,`string`);return FP(t)==`symbol`?t:t+``}function Yce(e,t){if(FP(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(FP(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Xce=function(e){var t=e.data,n=e.startIndex,r=e.endIndex,i=e.x,a=e.width,o=e.travellerWidth;if(!t||!t.length)return{};var s=t.length,c=SC().domain((0,PP.default)(0,s)).range([i,i+a-o]),l=c.domain().map(function(e){return c(e)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:c(n),endX:c(r),scale:c,scaleValues:l}},GP=function(e){return e.changedTouches&&!!e.changedTouches.length},KP=function(e){function t(e){var n;return Uce(this,t),n=Gce(this,t,[e]),UP(n,`handleDrag`,function(e){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(e):n.state.isSlideMoving&&n.handleSlideDrag(e)}),UP(n,`handleTouchMove`,function(e){e.changedTouches!=null&&e.changedTouches.length>0&&n.handleDrag(e.changedTouches[0])}),UP(n,`handleDragEnd`,function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var e=n.props,t=e.endIndex,r=e.onDragEnd,i=e.startIndex;r?.({endIndex:t,startIndex:i})}),n.detachDragEndListener()}),UP(n,`handleLeaveWrapper`,function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),UP(n,`handleEnterSlideOrTraveller`,function(){n.setState({isTextActive:!0})}),UP(n,`handleLeaveSlideOrTraveller`,function(){n.setState({isTextActive:!1})}),UP(n,`handleSlideDragStart`,function(e){var t=GP(e)?e.changedTouches[0]:e;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:t.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,`startX`),endX:n.handleTravellerDragStart.bind(n,`endX`)},n.state={},n}return Jce(t,e),Wce(t,[{key:`componentWillUnmount`,value:function(){this.leaveTimer&&=(clearTimeout(this.leaveTimer),null),this.detachDragEndListener()}},{key:`getIndex`,value:function(e){var n=e.startX,r=e.endX,i=this.state.scaleValues,a=this.props,o=a.gap,s=a.data.length-1,c=Math.min(n,r),l=Math.max(n,r),u=t.getIndexInRange(i,c),d=t.getIndexInRange(i,l);return{startIndex:u-u%o,endIndex:d===s?s:d-d%o}}},{key:`getTextOfTick`,value:function(e){var t=this.props,n=t.data,r=t.tickFormatter,i=t.dataKey,a=Pk(n[e],i,e);return(0,m_.default)(r)?r(a,e):a}},{key:`attachDragEndListener`,value:function(){window.addEventListener(`mouseup`,this.handleDragEnd,!0),window.addEventListener(`touchend`,this.handleDragEnd,!0),window.addEventListener(`mousemove`,this.handleDrag,!0)}},{key:`detachDragEndListener`,value:function(){window.removeEventListener(`mouseup`,this.handleDragEnd,!0),window.removeEventListener(`touchend`,this.handleDragEnd,!0),window.removeEventListener(`mousemove`,this.handleDrag,!0)}},{key:`handleSlideDrag`,value:function(e){var t=this.state,n=t.slideMoveStartX,r=t.startX,i=t.endX,a=this.props,o=a.x,s=a.width,c=a.travellerWidth,l=a.startIndex,u=a.endIndex,d=a.onChange,f=e.pageX-n;f>0?f=Math.min(f,o+s-c-i,o+s-c-r):f<0&&(f=Math.max(f,o-r,o-i));var p=this.getIndex({startX:r+f,endX:i+f});(p.startIndex!==l||p.endIndex!==u)&&d&&d(p),this.setState({startX:r+f,endX:i+f,slideMoveStartX:e.pageX})}},{key:`handleTravellerDragStart`,value:function(e,t){var n=GP(t)?t.changedTouches[0]:t;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:e,brushMoveStartX:n.pageX}),this.attachDragEndListener()}},{key:`handleTravellerMove`,value:function(e){var t=this.state,n=t.brushMoveStartX,r=t.movingTravellerId,i=t.endX,a=t.startX,o=this.state[r],s=this.props,c=s.x,l=s.width,u=s.travellerWidth,d=s.onChange,f=s.gap,p=s.data,m={startX:this.state.startX,endX:this.state.endX},h=e.pageX-n;h>0?h=Math.min(h,c+l-u-o):h<0&&(h=Math.max(h,c-o)),m[r]=o+h;var g=this.getIndex(m),_=g.startIndex,v=g.endIndex,y=function(){var e=p.length-1;return r===`startX`&&(i>a?_%f===0:v%f===0)||i<a&&v===e||r===`endX`&&(i>a?v%f===0:_%f===0)||i>a&&v===e};this.setState(UP(UP({},r,o+h),`brushMoveStartX`,e.pageX),function(){d&&y()&&d(g)})}},{key:`handleTravellerMoveKeyboard`,value:function(e,t){var n=this,r=this.state,i=r.scaleValues,a=r.startX,o=r.endX,s=this.state[t],c=i.indexOf(s);if(c!==-1){var l=c+e;if(!(l===-1||l>=i.length)){var u=i[l];t===`startX`&&u>=o||t===`endX`&&u<=a||this.setState(UP({},t,u),function(){n.props.onChange(n.getIndex({startX:n.state.startX,endX:n.state.endX}))})}}}},{key:`renderBackground`,value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,i=e.height,a=e.fill,o=e.stroke;return _.createElement(`rect`,{stroke:o,fill:a,x:t,y:n,width:r,height:i})}},{key:`renderPanorama`,value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,i=e.height,a=e.data,o=e.children,s=e.padding,c=_.Children.only(o);return c?_.cloneElement(c,{x:t,y:n,width:r,height:i,margin:s,compact:!0,data:a}):null}},{key:`renderTravellerLayer`,value:function(e,n){var r=this,i=this.props,a=i.y,o=i.travellerWidth,s=i.height,c=i.traveller,l=i.ariaLabel,u=i.data,d=i.startIndex,f=i.endIndex,p=Math.max(e,this.props.x),m=RP(RP({},J(this.props,!1)),{},{x:p,y:a,width:o,height:s}),h=l||`Min value: ${u[d]?.name}, Max value: ${u[f]?.name}`;return _.createElement(U_,{tabIndex:0,role:`slider`,"aria-label":h,"aria-valuenow":e,className:`recharts-brush-traveller`,onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[n],onTouchStart:this.travellerDragStartHandlers[n],onKeyDown:function(e){[`ArrowLeft`,`ArrowRight`].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),r.handleTravellerMoveKeyboard(e.key===`ArrowRight`?1:-1,n))},onFocus:function(){r.setState({isTravellerFocused:!0})},onBlur:function(){r.setState({isTravellerFocused:!1})},style:{cursor:`col-resize`}},t.renderTraveller(c,m))}},{key:`renderSlide`,value:function(e,t){var n=this.props,r=n.y,i=n.height,a=n.stroke,o=n.travellerWidth,s=Math.min(e,t)+o,c=Math.max(Math.abs(t-e)-o,0);return _.createElement(`rect`,{className:`recharts-brush-slide`,onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:`move`},stroke:`none`,fill:a,fillOpacity:.2,x:s,y:r,width:c,height:i})}},{key:`renderText`,value:function(){var e=this.props,t=e.startIndex,n=e.endIndex,r=e.y,i=e.height,a=e.travellerWidth,o=e.stroke,s=this.state,c=s.startX,l=s.endX,u=5,d={pointerEvents:`none`,fill:o};return _.createElement(U_,{className:`recharts-brush-texts`},_.createElement($S,IP({textAnchor:`end`,verticalAnchor:`middle`,x:Math.min(c,l)-u,y:r+i/2},d),this.getTextOfTick(t)),_.createElement($S,IP({textAnchor:`start`,verticalAnchor:`middle`,x:Math.max(c,l)+a+u,y:r+i/2},d),this.getTextOfTick(n)))}},{key:`render`,value:function(){var e=this.props,t=e.data,n=e.className,r=e.children,i=e.x,a=e.y,o=e.width,s=e.height,c=e.alwaysShowText,l=this.state,u=l.startX,d=l.endX,f=l.isTextActive,p=l.isSlideMoving,m=l.isTravellerMoving,h=l.isTravellerFocused;if(!t||!t.length||!q(i)||!q(a)||!q(o)||!q(s)||o<=0||s<=0)return null;var g=Rt(`recharts-brush`,n),v=_.Children.count(r)===1,y=Hce(`userSelect`,`none`);return _.createElement(U_,{className:g,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:y},this.renderBackground(),v&&this.renderPanorama(),this.renderSlide(u,d),this.renderTravellerLayer(u,`startX`),this.renderTravellerLayer(d,`endX`),(f||p||m||h||c)&&this.renderText())}}],[{key:`renderDefaultTraveller`,value:function(e){var t=e.x,n=e.y,r=e.width,i=e.height,a=e.stroke,o=Math.floor(n+i/2)-1;return _.createElement(_.Fragment,null,_.createElement(`rect`,{x:t,y:n,width:r,height:i,fill:a,stroke:`none`}),_.createElement(`line`,{x1:t+1,y1:o,x2:t+r-1,y2:o,fill:`none`,stroke:`#fff`}),_.createElement(`line`,{x1:t+1,y1:o+2,x2:t+r-1,y2:o+2,fill:`none`,stroke:`#fff`}))}},{key:`renderTraveller`,value:function(e,n){return _.isValidElement(e)?_.cloneElement(e,n):(0,m_.default)(e)?e(n):t.renderDefaultTraveller(n)}},{key:`getDerivedStateFromProps`,value:function(e,t){var n=e.data,r=e.width,i=e.x,a=e.travellerWidth,o=e.updateId,s=e.startIndex,c=e.endIndex;if(n!==t.prevData||o!==t.prevUpdateId)return RP({prevData:n,prevTravellerWidth:a,prevUpdateId:o,prevX:i,prevWidth:r},n&&n.length?Xce({data:n,width:r,x:i,travellerWidth:a,startIndex:s,endIndex:c}):{scale:null,scaleValues:null});if(t.scale&&(r!==t.prevWidth||i!==t.prevX||a!==t.prevTravellerWidth)){t.scale.range([i,i+r-a]);var l=t.scale.domain().map(function(e){return t.scale(e)});return{prevData:n,prevTravellerWidth:a,prevUpdateId:o,prevX:i,prevWidth:r,startX:t.scale(e.startIndex),endX:t.scale(e.endIndex),scaleValues:l}}return null}},{key:`getIndexInRange`,value:function(e,t){for(var n=e.length,r=0,i=n-1;i-r>1;){var a=Math.floor((r+i)/2);e[a]>t?i=a:r=a}return t>=e[i]?i:r}}])}(_.PureComponent);UP(KP,`displayName`,`Brush`),UP(KP,`defaultProps`,{height:40,travellerWidth:5,gap:1,fill:`#fff`,stroke:`#666`,padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var Zce=o(((e,t)=>{var n=Rx();function r(e,t){var r;return n(e,function(e,n,i){return r=t(e,n,i),!r}),!!r}t.exports=r})),Qce=o(((e,t)=>{var n=hb(),r=px(),i=Zce(),a=Sg(),o=Vx();function s(e,t,s){var c=a(e)?n:i;return s&&o(e,t,s)&&(t=void 0),c(e,r(t,3))}t.exports=s})),qP=function(e,t){var n=e.alwaysShow,r=e.ifOverflow;return n&&(r=`extendDomain`),r===t},$ce=o(((e,t)=>{var n=Bx();function r(e,t,r){t==`__proto__`&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}t.exports=r})),ele=o(((e,t)=>{var n=$ce(),r=Lx(),i=px();function a(e,t){var a={};return t=i(t,3),r(e,function(e,r,i){n(a,r,t(e,r,i))}),a}t.exports=a})),tle=o(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}t.exports=n})),nle=o(((e,t)=>{var n=Rx();function r(e,t){var r=!0;return n(e,function(e,n,i){return r=!!t(e,n,i),r}),r}t.exports=r})),rle=o(((e,t)=>{var n=tle(),r=nle(),i=px(),a=Sg(),o=Vx();function s(e,t,s){var c=a(e)?n:r;return s&&o(e,t,s)&&(t=void 0),c(e,i(t,3))}t.exports=s})),ile=[`x`,`y`];function JP(e){"@babel/helpers - typeof";return JP=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},JP(e)}function YP(){return YP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},YP.apply(this,arguments)}function XP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ZP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?XP(Object(n),!0).forEach(function(t){ale(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ale(e,t,n){return t=ole(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ole(e){var t=sle(e,`string`);return JP(t)==`symbol`?t:t+``}function sle(e,t){if(JP(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(JP(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function cle(e,t){if(e==null)return{};var n=lle(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function lle(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function ule(e,t){var n=e.x,r=e.y,i=cle(e,ile),a=`${n}`,o=parseInt(a,10),s=`${r}`,c=parseInt(s,10),l=`${t.height||i.height}`,u=parseInt(l,10),d=`${t.width||i.width}`,f=parseInt(d,10);return ZP(ZP(ZP(ZP(ZP({},t),i),o?{x:o}:{}),c?{y:c}:{}),{},{height:u,width:f,name:t.name,radius:t.radius})}function QP(e){return _.createElement(pP,YP({shapeType:`rectangle`,propTransformer:ule,activeClassName:`recharts-active-bar`},e))}var dle=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,r){if(typeof e==`number`)return e;var i=q(n)||Mne(n);return i?e(n,r):(!i&&zO(!1),t)}},fle=[`value`,`background`],$P;function eF(e){"@babel/helpers - typeof";return eF=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},eF(e)}function ple(e,t){if(e==null)return{};var n=mle(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mle(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function tF(){return tF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tF.apply(this,arguments)}function nF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function rF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?nF(Object(n),!0).forEach(function(t){cF(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nF(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function hle(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function iF(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,lF(r.key),r)}}function gle(e,t,n){return t&&iF(e.prototype,t),n&&iF(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function _le(e,t,n){return t=oF(t),vle(e,aF()?Reflect.construct(t,n||[],oF(e).constructor):t.apply(e,n))}function vle(e,t){if(t&&(eF(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return yle(e)}function yle(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function aF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(aF=function(){return!!e})()}function oF(e){return oF=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},oF(e)}function ble(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,`prototype`,{writable:!1}),t&&sF(e,t)}function sF(e,t){return sF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},sF(e,t)}function cF(e,t,n){return t=lF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lF(e){var t=xle(e,`string`);return eF(t)==`symbol`?t:t+``}function xle(e,t){if(eF(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(eF(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var uF=function(e){function t(){var e;hle(this,t);var n=[...arguments];return e=_le(this,t,[].concat(n)),cF(e,`state`,{isAnimationFinished:!1}),cF(e,`id`,n_(`recharts-bar-`)),cF(e,`handleAnimationEnd`,function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),t&&t()}),cF(e,`handleAnimationStart`,function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),t&&t()}),e}return ble(t,e),gle(t,[{key:`renderRectanglesStatically`,value:function(e){var t=this,n=this.props,r=n.shape,i=n.dataKey,a=n.activeIndex,o=n.activeBar,s=J(this.props,!1);return e&&e.map(function(e,n){var c=n===a,l=c?o:r,u=rF(rF(rF({},s),e),{},{isActive:c,option:l,index:n,dataKey:i,onAnimationStart:t.handleAnimationStart,onAnimationEnd:t.handleAnimationEnd});return _.createElement(U_,tF({className:`recharts-bar-rectangle`},p_(t.props,e,n),{key:`rectangle-${e?.x}-${e?.y}-${e?.value}-${n}`}),_.createElement(QP,u))})}},{key:`renderRectanglesWithAnimation`,value:function(){var e=this,t=this.props,n=t.data,r=t.layout,i=t.isAnimationActive,a=t.animationBegin,o=t.animationDuration,s=t.animationEasing,c=t.animationId,l=this.state.prevData;return _.createElement(hN,{begin:a,duration:o,isActive:i,easing:s,from:{t:0},to:{t:1},key:`bar-${c}`,onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(t){var i=t.t,a=n.map(function(e,t){var n=l&&l[t];if(n){var a=a_(n.x,e.x),o=a_(n.y,e.y),s=a_(n.width,e.width),c=a_(n.height,e.height);return rF(rF({},e),{},{x:a(i),y:o(i),width:s(i),height:c(i)})}if(r===`horizontal`){var u=a_(0,e.height)(i);return rF(rF({},e),{},{y:e.y+e.height-u,height:u})}var d=a_(0,e.width)(i);return rF(rF({},e),{},{width:d})});return _.createElement(U_,null,e.renderRectanglesStatically(a))})}},{key:`renderRectangles`,value:function(){var e=this.props,t=e.data,n=e.isAnimationActive,r=this.state.prevData;return n&&t&&t.length&&(!r||!(0,xk.default)(r,t))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(t)}},{key:`renderBackground`,value:function(){var e=this,t=this.props,n=t.data,r=t.dataKey,i=t.activeIndex,a=J(this.props.background,!1);return n.map(function(t,n){t.value;var o=t.background,s=ple(t,fle);if(!o)return null;var c=rF(rF(rF(rF(rF({},s),{},{fill:`#eee`},o),a),p_(e.props,t,n)),{},{onAnimationStart:e.handleAnimationStart,onAnimationEnd:e.handleAnimationEnd,dataKey:r,index:n,className:`recharts-bar-background-rectangle`});return _.createElement(QP,tF({key:`background-bar-${n}`,option:e.props.background,isActive:n===i},c))})}},{key:`renderErrorBar`,value:function(e,t){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var n=this.props,r=n.data,i=n.xAxis,a=n.yAxis,o=n.layout,s=n.children,c=S_(s,uk);if(!c)return null;var l=o===`vertical`?r[0].height/2:r[0].width/2,u=function(e,t){var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:Pk(e,t)}},d={clipPath:e?`url(#clipPath-${t})`:null};return _.createElement(U_,d,c.map(function(e){return _.cloneElement(e,{key:`error-bar-${t}-${e.props.dataKey}`,data:r,xAxis:i,yAxis:a,layout:o,offset:l,dataPointFormatter:u})}))}},{key:`render`,value:function(){var e=this.props,t=e.hide,n=e.data,r=e.className,i=e.xAxis,a=e.yAxis,o=e.left,s=e.top,c=e.width,l=e.height,u=e.isAnimationActive,d=e.background,f=e.id;if(t||!n||!n.length)return null;var p=this.state.isAnimationFinished,m=Rt(`recharts-bar`,r),h=i&&i.allowDataOverflow,g=a&&a.allowDataOverflow,v=h||g,y=(0,Qg.default)(f)?this.id:f;return _.createElement(U_,{className:m},h||g?_.createElement(`defs`,null,_.createElement(`clipPath`,{id:`clipPath-${y}`},_.createElement(`rect`,{x:h?o:o-c/2,y:g?s:s-l/2,width:h?c:c*2,height:g?l:l*2}))):null,_.createElement(U_,{className:`recharts-bar-rectangles`,clipPath:v?`url(#clipPath-${y})`:null},d?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(v,y),(!u||p)&&Aj.renderCallByParent(this.props,n))}}],[{key:`getDerivedStateFromProps`,value:function(e,t){return e.animationId===t.prevAnimationId?e.data===t.curData?null:{curData:e.data}:{prevAnimationId:e.animationId,curData:e.data,prevData:t.curData}}}])}(_.PureComponent);$P=uF,cF(uF,`displayName`,`Bar`),cF(uF,`defaultProps`,{xAxisId:0,yAxisId:0,legendType:`rect`,minPointSize:0,hide:!1,data:[],layout:`vertical`,activeBar:!1,isAnimationActive:!cS.isSsr,animationBegin:0,animationDuration:400,animationEasing:`ease`}),cF(uF,`getComposedData`,function(e){var t=e.props,n=e.item,r=e.barPosition,i=e.bandSize,a=e.xAxis,o=e.yAxis,s=e.xAxisTicks,c=e.yAxisTicks,l=e.stackedData,u=e.dataStartIndex,d=e.displayedData,f=e.offset,p=$k(r,n);if(!p)return null;var m=t.layout,h=n.type.defaultProps,g=h===void 0?n.props:rF(rF({},h),n.props),_=g.dataKey,v=g.children,y=g.minPointSize,b=m===`horizontal`?o:a,x=l?b.scale.domain():null,S=sA({numericAxis:b}),C=S_(v,ES);return rF({data:d.map(function(e,t){var r,d,f,h,g,v;l?r=eA(l[u+t],x):(r=Pk(e,_),Array.isArray(r)||(r=[S,r]));var b=dle(y,$P.defaultProps.minPointSize)(r[1],t);if(m===`horizontal`){var w=[o.scale(r[0]),o.scale(r[1])],T=w[0],E=w[1];d=oA({axis:a,ticks:s,bandSize:i,offset:p.offset,entry:e,index:t}),f=E??T??void 0,h=p.size;var D=T-E;if(g=Number.isNaN(D)?0:D,v={x:d,y:o.y,width:h,height:o.height},Math.abs(b)>0&&Math.abs(g)<Math.abs(b)){var O=$g(g||b)*(Math.abs(b)-Math.abs(g));f-=O,g+=O}}else{var k=[a.scale(r[0]),a.scale(r[1])],A=k[0],j=k[1];if(d=A,f=oA({axis:o,ticks:c,bandSize:i,offset:p.offset,entry:e,index:t}),h=j-A,g=p.size,v={x:a.x,y:f,width:a.width,height:g},Math.abs(b)>0&&Math.abs(h)<Math.abs(b)){var M=$g(h||b)*(Math.abs(b)-Math.abs(h));h+=M}}return rF(rF(rF({},e),{},{x:d,y:f,width:h,height:g,value:l?r:r[1],payload:e,background:v},C&&C[t]&&C[t].props),{},{tooltipPayload:[gA(n,e)],tooltipPosition:{x:d+h/2,y:f+g/2}})}),layout:m},f)});var Sle=l(ele()),dF=l(rle());function fF(e){"@babel/helpers - typeof";return fF=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},fF(e)}function Cle(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function pF(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,_F(r.key),r)}}function wle(e,t,n){return t&&pF(e.prototype,t),n&&pF(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function mF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function hF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?mF(Object(n),!0).forEach(function(t){gF(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mF(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function gF(e,t,n){return t=_F(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _F(e){var t=Tle(e,`string`);return fF(t)==`symbol`?t:t+``}function Tle(e,t){if(fF(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(fF(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var vF=function(e,t,n,r,i){var a=e.width,o=e.height,s=e.layout,c=e.children,l=Object.keys(t),u={left:n.left,leftMirror:n.left,right:a-n.right,rightMirror:a-n.right,top:n.top,topMirror:n.top,bottom:o-n.bottom,bottomMirror:o-n.bottom},d=!!C_(c,uF);return l.reduce(function(a,o){var c=t[o],l=c.orientation,f=c.domain,p=c.padding,m=p===void 0?{}:p,h=c.mirror,g=c.reversed,_=`${l}${h?`Mirror`:``}`,v,y,b,x,S;if(c.type===`number`&&(c.padding===`gap`||c.padding===`no-gap`)){var C=f[1]-f[0],w=1/0,T=c.categoricalDomain.sort(Fne);if(T.forEach(function(e,t){t>0&&(w=Math.min((e||0)-(T[t-1]||0),w))}),Number.isFinite(w)){var E=w/C,D=c.layout===`vertical`?n.height:n.width;if(c.padding===`gap`&&(v=E*D/2),c.padding===`no-gap`){var O=r_(e.barCategoryGap,E*D),k=E*D/2;v=k-O-(k-O)/D*O}}}y=r===`xAxis`?[n.left+(m.left||0)+(v||0),n.left+n.width-(m.right||0)-(v||0)]:r===`yAxis`?s===`horizontal`?[n.top+n.height-(m.bottom||0),n.top+(m.top||0)]:[n.top+(m.top||0)+(v||0),n.top+n.height-(m.bottom||0)-(v||0)]:c.range,g&&(y=[y[1],y[0]]);var A=Xk(c,i,d),j=A.scale,M=A.realScaleType;j.domain(f).range(y),Qk(j);var N=iA(j,hF(hF({},c),{},{realScaleType:M}));r===`xAxis`?(S=l===`top`&&!h||l===`bottom`&&h,b=n.left,x=u[_]-S*c.height):r===`yAxis`&&(S=l===`left`&&!h||l===`right`&&h,b=u[_]-S*c.width,x=n.top);var P=hF(hF(hF({},c),N),{},{realScaleType:M,x:b,y:x,scale:j,width:r===`xAxis`?n.width:c.width,height:r===`yAxis`?n.height:c.height});return P.bandSize=mA(P,N),!c.hide&&r===`xAxis`?u[_]+=(S?-1:1)*P.height:c.hide||(u[_]+=(S?-1:1)*P.width),hF(hF({},a),{},gF({},o,P))},{})},yF=function(e,t){var n=e.x,r=e.y,i=t.x,a=t.y;return{x:Math.min(n,i),y:Math.min(r,a),width:Math.abs(i-n),height:Math.abs(a-r)}},Ele=function(e){var t=e.x1,n=e.y1,r=e.x2,i=e.y2;return yF({x:t,y:n},{x:r,y:i})},bF=function(){function e(t){Cle(this,e),this.scale=t}return wle(e,[{key:`domain`,get:function(){return this.scale.domain}},{key:`range`,get:function(){return this.scale.range}},{key:`rangeMin`,get:function(){return this.range()[0]}},{key:`rangeMax`,get:function(){return this.range()[1]}},{key:`bandwidth`,get:function(){return this.scale.bandwidth}},{key:`apply`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.bandAware,r=t.position;if(e!==void 0){if(r)switch(r){case`start`:return this.scale(e);case`middle`:var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+i;case`end`:var a=this.bandwidth?this.bandwidth():0;return this.scale(e)+a;default:return this.scale(e)}if(n){var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+o}return this.scale(e)}}},{key:`isInRange`,value:function(e){var t=this.range(),n=t[0],r=t[t.length-1];return n<=r?e>=n&&e<=r:e>=r&&e<=n}}],[{key:`create`,value:function(t){return new e(t)}}])}();gF(bF,`EPS`,1e-4);var xF=function(e){var t=Object.keys(e).reduce(function(t,n){return hF(hF({},t),{},gF({},n,bF.create(e[n])))},{});return hF(hF({},t),{},{apply:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.bandAware,i=n.position;return(0,Sle.default)(e,function(e,n){return t[n].apply(e,{bandAware:r,position:i})})},isInRange:function(e){return(0,dF.default)(e,function(e,n){return t[n].isInRange(e)})}})};function Dle(e){return(e%180+180)%180}var Ole=function(e){var t=e.width,n=e.height,r=Dle(arguments.length>1&&arguments[1]!==void 0?arguments[1]:0)*Math.PI/180,i=Math.atan(n/t),a=r>i&&r<Math.PI-i?n/Math.sin(r):t/Math.cos(r);return Math.abs(a)},kle=o(((e,t)=>{var n=px(),r=Ub(),i=Wb();function a(e){return function(t,a,o){var s=Object(t);if(!r(t)){var c=n(a,3);t=i(t),a=function(e){return c(s[e],e,s)}}var l=e(t,a,o);return l>-1?s[c?t[l]:l]:void 0}}t.exports=a})),Ale=o(((e,t)=>{var n=kP();function r(e){var t=n(e),r=t%1;return t===t?r?t-r:t:0}t.exports=r})),jle=o(((e,t)=>{var n=mx(),r=px(),i=Ale(),a=Math.max;function o(e,t,o){var s=e==null?0:e.length;if(!s)return-1;var c=o==null?0:i(o);return c<0&&(c=a(s+c,0)),n(e,r(t,3),c)}t.exports=o})),Mle=o(((e,t)=>{t.exports=kle()(jle())})),Nle=(0,l(Vg()).default)(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return[`l`,e.left,`t`,e.top,`w`,e.width,`h`,e.height].join(``)}),Ple=l(Mle()),SF=(0,_.createContext)(void 0),CF=(0,_.createContext)(void 0),wF=(0,_.createContext)(void 0),TF=(0,_.createContext)({}),EF=(0,_.createContext)(void 0),DF=(0,_.createContext)(0),OF=(0,_.createContext)(0),kF=function(e){var t=e.state,n=t.xAxisMap,r=t.yAxisMap,i=t.offset,a=e.clipPathId,o=e.children,s=e.width,c=e.height,l=Nle(i);return _.createElement(SF.Provider,{value:n},_.createElement(CF.Provider,{value:r},_.createElement(TF.Provider,{value:i},_.createElement(wF.Provider,{value:l},_.createElement(EF.Provider,{value:a},_.createElement(DF.Provider,{value:c},_.createElement(OF.Provider,{value:s},o)))))))},Fle=function(){return(0,_.useContext)(EF)},AF=function(e){var t=(0,_.useContext)(SF);t??zO(!1);var n=t[e];return n??zO(!1),n},Ile=function(){return i_((0,_.useContext)(SF))},Lle=function(){var e=(0,_.useContext)(CF);return(0,Ple.default)(e,function(e){return(0,dF.default)(e.domain,Number.isFinite)})||i_(e)},jF=function(e){var t=(0,_.useContext)(CF);t??zO(!1);var n=t[e];return n??zO(!1),n},Rle=function(){return(0,_.useContext)(wF)},zle=function(){return(0,_.useContext)(TF)},MF=function(){return(0,_.useContext)(OF)},NF=function(){return(0,_.useContext)(DF)},Ble=l(Qce());function PF(e){"@babel/helpers - typeof";return PF=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},PF(e)}function Vle(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function FF(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,HF(r.key),r)}}function Hle(e,t,n){return t&&FF(e.prototype,t),n&&FF(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function Ule(e,t,n){return t=LF(t),Wle(e,IF()?Reflect.construct(t,n||[],LF(e).constructor):t.apply(e,n))}function Wle(e,t){if(t&&(PF(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return Gle(e)}function Gle(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function IF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(IF=function(){return!!e})()}function LF(e){return LF=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},LF(e)}function Kle(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,`prototype`,{writable:!1}),t&&RF(e,t)}function RF(e,t){return RF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},RF(e,t)}function zF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function BF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?zF(Object(n),!0).forEach(function(t){VF(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zF(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function VF(e,t,n){return t=HF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HF(e){var t=qle(e,`string`);return PF(t)==`symbol`?t:t+``}function qle(e,t){if(PF(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(PF(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Jle(e,t){return Qle(e)||Zle(e,t)||Xle(e,t)||Yle()}function Yle(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
177
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xle(e,t){if(e){if(typeof e==`string`)return UF(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return UF(e,t)}}function UF(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Zle(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Qle(e){if(Array.isArray(e))return e}function WF(){return WF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},WF.apply(this,arguments)}var $le=function(e,t){return _.isValidElement(e)?_.cloneElement(e,t):(0,m_.default)(e)?e(t):_.createElement(`line`,WF({},t,{className:`recharts-reference-line-line`}))},eue=function(e,t,n,r,i,a,o,s,c){var l=i.x,u=i.y,d=i.width,f=i.height;if(n){var p=c.y,m=e.y.apply(p,{position:a});if(qP(c,`discard`)&&!e.y.isInRange(m))return null;var h=[{x:l+d,y:m},{x:l,y:m}];return s===`left`?h.reverse():h}if(t){var g=c.x,_=e.x.apply(g,{position:a});if(qP(c,`discard`)&&!e.x.isInRange(_))return null;var v=[{x:_,y:u+f},{x:_,y:u}];return o===`top`?v.reverse():v}if(r){var y=c.segment.map(function(t){return e.apply(t,{position:a})});return qP(c,`discard`)&&(0,Ble.default)(y,function(t){return!e.isInRange(t)})?null:y}return null};function tue(e){var t=e.x,n=e.y,r=e.segment,i=e.xAxisId,a=e.yAxisId,o=e.shape,s=e.className,c=e.alwaysShow,l=Fle(),u=AF(i),d=jF(a),f=Rle();if(!l||!f)return null;G_(c===void 0,`The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.`);var p=eue(xF({x:u.scale,y:d.scale}),t_(t),t_(n),r&&r.length===2,f,e.position,u.orientation,d.orientation,e);if(!p)return null;var m=Jle(p,2),h=m[0],g=h.x,v=h.y,y=m[1],b=y.x,x=y.y,S=BF(BF({clipPath:qP(e,`hidden`)?`url(#${l})`:void 0},J(e,!0)),{},{x1:g,y1:v,x2:b,y2:x});return _.createElement(U_,{className:Rt(`recharts-reference-line`,s)},$le(o,S),cj.renderCallByParent(e,Ele({x1:g,y1:v,x2:b,y2:x})))}var GF=function(e){function t(){return Vle(this,t),Ule(this,t,arguments)}return Kle(t,e),Hle(t,[{key:`render`,value:function(){return _.createElement(tue,this.props)}}])}(_.Component);VF(GF,`displayName`,`ReferenceLine`),VF(GF,`defaultProps`,{isFront:!1,ifOverflow:`discard`,xAxisId:0,yAxisId:0,fill:`none`,stroke:`#ccc`,fillOpacity:1,strokeWidth:1,position:`middle`});function KF(){return KF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},KF.apply(this,arguments)}function qF(e){"@babel/helpers - typeof";return qF=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},qF(e)}function JF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function YF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?JF(Object(n),!0).forEach(function(t){eI(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JF(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function nue(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function XF(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,tI(r.key),r)}}function rue(e,t,n){return t&&XF(e.prototype,t),n&&XF(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function iue(e,t,n){return t=QF(t),aue(e,ZF()?Reflect.construct(t,n||[],QF(e).constructor):t.apply(e,n))}function aue(e,t){if(t&&(qF(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return oue(e)}function oue(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function ZF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ZF=function(){return!!e})()}function QF(e){return QF=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},QF(e)}function sue(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,`prototype`,{writable:!1}),t&&$F(e,t)}function $F(e,t){return $F=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$F(e,t)}function eI(e,t,n){return t=tI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tI(e){var t=cue(e,`string`);return qF(t)==`symbol`?t:t+``}function cue(e,t){if(qF(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(qF(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var lue=function(e){var t=e.x,n=e.y,r=e.xAxis,i=e.yAxis,a=xF({x:r.scale,y:i.scale}),o=a.apply({x:t,y:n},{bandAware:!0});return qP(e,`discard`)&&!a.isInRange(o)?null:o},nI=function(e){function t(){return nue(this,t),iue(this,t,arguments)}return sue(t,e),rue(t,[{key:`render`,value:function(){var e=this.props,n=e.x,r=e.y,i=e.r,a=e.alwaysShow,o=e.clipPathId,s=t_(n),c=t_(r);if(G_(a===void 0,`The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.`),!s||!c)return null;var l=lue(this.props);if(!l)return null;var u=l.x,d=l.y,f=this.props,p=f.shape,m=f.className,h=YF(YF({clipPath:qP(this.props,`hidden`)?`url(#${o})`:void 0},J(this.props,!0)),{},{cx:u,cy:d});return _.createElement(U_,{className:Rt(`recharts-reference-dot`,m)},t.renderDot(p,h),cj.renderCallByParent(this.props,{x:u-i,y:d-i,width:2*i,height:2*i}))}}])}(_.Component);eI(nI,`displayName`,`ReferenceDot`),eI(nI,`defaultProps`,{isFront:!1,ifOverflow:`discard`,xAxisId:0,yAxisId:0,r:10,fill:`#fff`,stroke:`#ccc`,fillOpacity:1,strokeWidth:1}),eI(nI,`renderDot`,function(e,t){return _.isValidElement(e)?_.cloneElement(e,t):(0,m_.default)(e)?e(t):_.createElement(kN,KF({},t,{cx:t.cx,cy:t.cy,className:`recharts-reference-dot-dot`}))});function rI(){return rI=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rI.apply(this,arguments)}function iI(e){"@babel/helpers - typeof";return iI=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},iI(e)}function aI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function oI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?aI(Object(n),!0).forEach(function(t){dI(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aI(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function uue(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function sI(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,fI(r.key),r)}}function due(e,t,n){return t&&sI(e.prototype,t),n&&sI(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function fue(e,t,n){return t=lI(t),pue(e,cI()?Reflect.construct(t,n||[],lI(e).constructor):t.apply(e,n))}function pue(e,t){if(t&&(iI(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return mue(e)}function mue(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function cI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(cI=function(){return!!e})()}function lI(e){return lI=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},lI(e)}function hue(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,`prototype`,{writable:!1}),t&&uI(e,t)}function uI(e,t){return uI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},uI(e,t)}function dI(e,t,n){return t=fI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fI(e){var t=gue(e,`string`);return iI(t)==`symbol`?t:t+``}function gue(e,t){if(iI(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(iI(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var _ue=function(e,t,n,r,i){var a=i.x1,o=i.x2,s=i.y1,c=i.y2,l=i.xAxis,u=i.yAxis;if(!l||!u)return null;var d=xF({x:l.scale,y:u.scale}),f={x:e?d.x.apply(a,{position:`start`}):d.x.rangeMin,y:n?d.y.apply(s,{position:`start`}):d.y.rangeMin},p={x:t?d.x.apply(o,{position:`end`}):d.x.rangeMax,y:r?d.y.apply(c,{position:`end`}):d.y.rangeMax};return qP(i,`discard`)&&(!d.isInRange(f)||!d.isInRange(p))?null:yF(f,p)},pI=function(e){function t(){return uue(this,t),fue(this,t,arguments)}return hue(t,e),due(t,[{key:`render`,value:function(){var e=this.props,n=e.x1,r=e.x2,i=e.y1,a=e.y2,o=e.className,s=e.alwaysShow,c=e.clipPathId;G_(s===void 0,`The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.`);var l=t_(n),u=t_(r),d=t_(i),f=t_(a),p=this.props.shape;if(!l&&!u&&!d&&!f&&!p)return null;var m=_ue(l,u,d,f,this.props);if(!m&&!p)return null;var h=qP(this.props,`hidden`)?`url(#${c})`:void 0;return _.createElement(U_,{className:Rt(`recharts-reference-area`,o)},t.renderRect(p,oI(oI({clipPath:h},J(this.props,!0)),m)),cj.renderCallByParent(this.props,m))}}])}(_.Component);dI(pI,`displayName`,`ReferenceArea`),dI(pI,`defaultProps`,{isFront:!1,ifOverflow:`discard`,xAxisId:0,yAxisId:0,r:10,fill:`#ccc`,fillOpacity:.5,stroke:`none`,strokeWidth:1}),dI(pI,`renderRect`,function(e,t){return _.isValidElement(e)?_.cloneElement(e,t):(0,m_.default)(e)?e(t):_.createElement(SN,rI({},t,{className:`recharts-reference-area-rect`}))});function mI(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],i=0;i<e.length;i+=t)if(n===void 0||n(e[i])===!0)r.push(e[i]);else return;return r}function vue(e,t,n){return Ole({width:e.width+t.width,height:e.height+t.height},n)}function yue(e,t,n){var r=n===`width`,i=e.x,a=e.y,o=e.width,s=e.height;return t===1?{start:r?i:a,end:r?i+o:a+s}:{start:r?i+o:a+s,end:r?i:a}}function hI(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var a=n();return e*(t-e*a/2-r)>=0&&e*(t+e*a/2-i)<=0}function bue(e,t){return mI(e,t+1)}function xue(e,t,n,r,i){for(var a=(r||[]).slice(),o=t.start,s=t.end,c=0,l=1,u=o,d=function(){var t=r?.[c];if(t===void 0)return{v:mI(r,l)};var a=c,d,f=function(){return d===void 0&&(d=n(t,a)),d},p=t.coordinate,m=c===0||hI(e,p,f,u,s);m||(c=0,u=o,l+=1),m&&(u=p+e*(f()/2+i),c+=l)},f;l<=a.length;)if(f=d(),f)return f.v;return[]}function gI(e){"@babel/helpers - typeof";return gI=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},gI(e)}function _I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function vI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?_I(Object(n),!0).forEach(function(t){Sue(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_I(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Sue(e,t,n){return t=Cue(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cue(e){var t=wue(e,`string`);return gI(t)==`symbol`?t:t+``}function wue(e,t){if(gI(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(gI(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Tue(e,t,n,r,i){for(var a=(r||[]).slice(),o=a.length,s=t.start,c=t.end,l=function(t){var r=a[t],l,u=function(){return l===void 0&&(l=n(r,t)),l};if(t===o-1){var d=e*(r.coordinate+e*u()/2-c);a[t]=r=vI(vI({},r),{},{tickCoord:d>0?r.coordinate-d*e:r.coordinate})}else a[t]=r=vI(vI({},r),{},{tickCoord:r.coordinate});hI(e,r.tickCoord,u,s,c)&&(c=r.tickCoord-e*(u()/2+i),a[t]=vI(vI({},r),{},{isShow:!0}))},u=o-1;u>=0;u--)l(u);return a}function Eue(e,t,n,r,i,a){var o=(r||[]).slice(),s=o.length,c=t.start,l=t.end;if(a){var u=r[s-1],d=n(u,s-1),f=e*(u.coordinate+e*d/2-l);o[s-1]=u=vI(vI({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate}),hI(e,u.tickCoord,function(){return d},c,l)&&(l=u.tickCoord-e*(d/2+i),o[s-1]=vI(vI({},u),{},{isShow:!0}))}for(var p=a?s-1:s,m=function(t){var r=o[t],a,s=function(){return a===void 0&&(a=n(r,t)),a};if(t===0){var u=e*(r.coordinate-e*s()/2-c);o[t]=r=vI(vI({},r),{},{tickCoord:u<0?r.coordinate-u*e:r.coordinate})}else o[t]=r=vI(vI({},r),{},{tickCoord:r.coordinate});hI(e,r.tickCoord,s,c,l)&&(c=r.tickCoord+e*(s()/2+i),o[t]=vI(vI({},r),{},{isShow:!0}))},h=0;h<p;h++)m(h);return o}function yI(e,t,n){var r=e.tick,i=e.ticks,a=e.viewBox,o=e.minTickGap,s=e.orientation,c=e.interval,l=e.tickFormatter,u=e.unit,d=e.angle;if(!i||!i.length||!r)return[];if(q(c)||cS.isSsr)return bue(i,typeof c==`number`&&q(c)?c:0);var f=[],p=s===`top`||s===`bottom`?`width`:`height`,m=u&&p===`width`?MS(u,{fontSize:t,letterSpacing:n}):{width:0,height:0},h=function(e,r){var i=(0,m_.default)(l)?l(e.value,r):e.value;return p===`width`?vue(MS(i,{fontSize:t,letterSpacing:n}),m,d):MS(i,{fontSize:t,letterSpacing:n})[p]},g=i.length>=2?$g(i[1].coordinate-i[0].coordinate):1,_=yue(a,g,p);return c===`equidistantPreserveStart`?xue(g,_,h,i,o):(f=c===`preserveStart`||c===`preserveStartEnd`?Eue(g,_,h,i,o,c===`preserveStartEnd`):Tue(g,_,h,i,o),f.filter(function(e){return e.isShow}))}var Due=[`viewBox`],Oue=[`viewBox`],kue=[`ticks`];function bI(e){"@babel/helpers - typeof";return bI=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},bI(e)}function xI(){return xI=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xI.apply(this,arguments)}function SI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function CI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?SI(Object(n),!0).forEach(function(t){kI(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SI(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function wI(e,t){if(e==null)return{};var n=Aue(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Aue(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function jue(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function TI(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,AI(r.key),r)}}function Mue(e,t,n){return t&&TI(e.prototype,t),n&&TI(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function Nue(e,t,n){return t=DI(t),Pue(e,EI()?Reflect.construct(t,n||[],DI(e).constructor):t.apply(e,n))}function Pue(e,t){if(t&&(bI(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return Fue(e)}function Fue(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function EI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(EI=function(){return!!e})()}function DI(e){return DI=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},DI(e)}function Iue(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,`prototype`,{writable:!1}),t&&OI(e,t)}function OI(e,t){return OI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},OI(e,t)}function kI(e,t,n){return t=AI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AI(e){var t=Lue(e,`string`);return bI(t)==`symbol`?t:t+``}function Lue(e,t){if(bI(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(bI(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var jI=function(e){function t(e){var n;return jue(this,t),n=Nue(this,t,[e]),n.state={fontSize:``,letterSpacing:``},n}return Iue(t,e),Mue(t,[{key:`shouldComponentUpdate`,value:function(e,t){var n=e.viewBox,r=wI(e,Due),i=this.props,a=i.viewBox,o=wI(i,Oue);return!s_(n,a)||!s_(r,o)||!s_(t,this.state)}},{key:`componentDidMount`,value:function(){var e=this.layerReference;if(e){var t=e.getElementsByClassName(`recharts-cartesian-axis-tick-value`)[0];t&&this.setState({fontSize:window.getComputedStyle(t).fontSize,letterSpacing:window.getComputedStyle(t).letterSpacing})}}},{key:`getTickLineCoord`,value:function(e){var t=this.props,n=t.x,r=t.y,i=t.width,a=t.height,o=t.orientation,s=t.tickSize,c=t.mirror,l=t.tickMargin,u,d,f,p,m,h,g=c?-1:1,_=e.tickSize||s,v=q(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case`top`:u=d=e.coordinate,p=r+ +!c*a,f=p-g*_,h=f-g*l,m=v;break;case`left`:f=p=e.coordinate,d=n+ +!c*i,u=d-g*_,m=u-g*l,h=v;break;case`right`:f=p=e.coordinate,d=n+ +c*i,u=d+g*_,m=u+g*l,h=v;break;default:u=d=e.coordinate,p=r+ +c*a,f=p+g*_,h=f+g*l,m=v;break}return{line:{x1:u,y1:f,x2:d,y2:p},tick:{x:m,y:h}}}},{key:`getTickTextAnchor`,value:function(){var e=this.props,t=e.orientation,n=e.mirror,r;switch(t){case`left`:r=n?`start`:`end`;break;case`right`:r=n?`end`:`start`;break;default:r=`middle`;break}return r}},{key:`getTickVerticalAnchor`,value:function(){var e=this.props,t=e.orientation,n=e.mirror,r=`end`;switch(t){case`left`:case`right`:r=`middle`;break;case`top`:r=n?`start`:`end`;break;default:r=n?`end`:`start`;break}return r}},{key:`renderAxisLine`,value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,i=e.height,a=e.orientation,o=e.mirror,s=e.axisLine,c=CI(CI(CI({},J(this.props,!1)),J(s,!1)),{},{fill:`none`});if(a===`top`||a===`bottom`){var l=+(a===`top`&&!o||a===`bottom`&&o);c=CI(CI({},c),{},{x1:t,y1:n+l*i,x2:t+r,y2:n+l*i})}else{var u=+(a===`left`&&!o||a===`right`&&o);c=CI(CI({},c),{},{x1:t+u*r,y1:n,x2:t+u*r,y2:n+i})}return _.createElement(`line`,xI({},c,{className:Rt(`recharts-cartesian-axis-line`,(0,Zg.default)(s,`className`))}))}},{key:`renderTicks`,value:function(e,n,r){var i=this,a=this.props,o=a.tickLine,s=a.stroke,c=a.tick,l=a.tickFormatter,u=a.unit,d=yI(CI(CI({},this.props),{},{ticks:e}),n,r),f=this.getTickTextAnchor(),p=this.getTickVerticalAnchor(),m=J(this.props,!1),h=J(c,!1),g=CI(CI({},m),{},{fill:`none`},J(o,!1)),v=d.map(function(e,n){var r=i.getTickLineCoord(e),a=r.line,v=r.tick,y=CI(CI(CI(CI({textAnchor:f,verticalAnchor:p},m),{},{stroke:`none`,fill:s},h),v),{},{index:n,payload:e,visibleTicksCount:d.length,tickFormatter:l});return _.createElement(U_,xI({className:`recharts-cartesian-axis-tick`,key:`tick-${e.value}-${e.coordinate}-${e.tickCoord}`},p_(i.props,e,n)),o&&_.createElement(`line`,xI({},g,a,{className:Rt(`recharts-cartesian-axis-tick-line`,(0,Zg.default)(o,`className`))})),c&&t.renderTickItem(c,y,`${(0,m_.default)(l)?l(e.value,n):e.value}${u||``}`))});return _.createElement(`g`,{className:`recharts-cartesian-axis-ticks`},v)}},{key:`render`,value:function(){var e=this,t=this.props,n=t.axisLine,r=t.width,i=t.height,a=t.ticksGenerator,o=t.className;if(t.hide)return null;var s=this.props,c=s.ticks,l=wI(s,kue),u=c;return(0,m_.default)(a)&&(u=c&&c.length>0?a(this.props):a(l)),r<=0||i<=0||!u||!u.length?null:_.createElement(U_,{className:Rt(`recharts-cartesian-axis`,o),ref:function(t){e.layerReference=t}},n&&this.renderAxisLine(),this.renderTicks(u,this.state.fontSize,this.state.letterSpacing),cj.renderCallByParent(this.props))}}],[{key:`renderTickItem`,value:function(e,t,n){var r,i=Rt(t.className,`recharts-cartesian-axis-tick-value`);return r=_.isValidElement(e)?_.cloneElement(e,CI(CI({},t),{},{className:i})):(0,m_.default)(e)?e(CI(CI({},t),{},{className:i})):_.createElement($S,xI({},t,{className:`recharts-cartesian-axis-tick-value`}),n),r}}])}(_.Component);kI(jI,`displayName`,`CartesianAxis`),kI(jI,`defaultProps`,{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:`bottom`,ticks:[],stroke:`#666`,tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:`preserveEnd`});var Rue=[`x1`,`y1`,`x2`,`y2`,`key`],zue=[`offset`];function MI(e){"@babel/helpers - typeof";return MI=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},MI(e)}function NI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function PI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?NI(Object(n),!0).forEach(function(t){Bue(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NI(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Bue(e,t,n){return t=Vue(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vue(e){var t=Hue(e,`string`);return MI(t)==`symbol`?t:t+``}function Hue(e,t){if(MI(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(MI(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function FI(){return FI=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},FI.apply(this,arguments)}function II(e,t){if(e==null)return{};var n=Uue(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Uue(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Wue=function(e){var t=e.fill;if(!t||t===`none`)return null;var n=e.fillOpacity,r=e.x,i=e.y,a=e.width,o=e.height,s=e.ry;return _.createElement(`rect`,{x:r,y:i,ry:s,width:a,height:o,stroke:`none`,fill:t,fillOpacity:n,className:`recharts-cartesian-grid-bg`})};function LI(e,t){var n;if(_.isValidElement(e))n=_.cloneElement(e,t);else if((0,m_.default)(e))n=e(t);else{var r=t.x1,i=t.y1,a=t.x2,o=t.y2,s=t.key,c=J(II(t,Rue),!1);c.offset;var l=II(c,zue);n=_.createElement(`line`,FI({},l,{x1:r,y1:i,x2:a,y2:o,fill:`none`,key:s}))}return n}function Gue(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,a=e.horizontalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(r,a){return LI(i,PI(PI({},e),{},{x1:t,y1:r,x2:t+n,y2:r,key:`line-${a}`,index:a}))});return _.createElement(`g`,{className:`recharts-cartesian-grid-horizontal`},o)}function Kue(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,a=e.verticalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(r,a){return LI(i,PI(PI({},e),{},{x1:r,y1:t,x2:r,y2:t+n,key:`line-${a}`,index:a}))});return _.createElement(`g`,{className:`recharts-cartesian-grid-vertical`},o)}function que(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,a=e.width,o=e.height,s=e.horizontalPoints,c=e.horizontal;if(!(c===void 0||c)||!t||!t.length)return null;var l=s.map(function(e){return Math.round(e+i-i)}).sort(function(e,t){return e-t});i!==l[0]&&l.unshift(0);var u=l.map(function(e,s){var c=l[s+1]?l[s+1]-e:i+o-e;if(c<=0)return null;var u=s%t.length;return _.createElement(`rect`,{key:`react-${s}`,y:e,x:r,height:c,width:a,stroke:`none`,fill:t[u],fillOpacity:n,className:`recharts-cartesian-grid-bg`})});return _.createElement(`g`,{className:`recharts-cartesian-gridstripes-horizontal`},u)}function Jue(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,a=e.x,o=e.y,s=e.width,c=e.height,l=e.verticalPoints;if(!n||!r||!r.length)return null;var u=l.map(function(e){return Math.round(e+a-a)}).sort(function(e,t){return e-t});a!==u[0]&&u.unshift(0);var d=u.map(function(e,t){var n=u[t+1]?u[t+1]-e:a+s-e;if(n<=0)return null;var l=t%r.length;return _.createElement(`rect`,{key:`react-${t}`,x:e,y:o,width:n,height:c,stroke:`none`,fill:r[l],fillOpacity:i,className:`recharts-cartesian-grid-bg`})});return _.createElement(`g`,{className:`recharts-cartesian-gridstripes-vertical`},d)}var Yue=function(e,t){var n=e.xAxis,r=e.width,i=e.height,a=e.offset;return Kk(yI(PI(PI(PI({},jI.defaultProps),n),{},{ticks:qk(n,!0),viewBox:{x:0,y:0,width:r,height:i}})),a.left,a.left+a.width,t)},Xue=function(e,t){var n=e.yAxis,r=e.width,i=e.height,a=e.offset;return Kk(yI(PI(PI(PI({},jI.defaultProps),n),{},{ticks:qk(n,!0),viewBox:{x:0,y:0,width:r,height:i}})),a.top,a.top+a.height,t)},RI={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:`#ccc`,fill:`none`,verticalFill:[],horizontalFill:[]};function zI(e){var t=MF(),n=NF(),r=zle(),i=PI(PI({},e),{},{stroke:e.stroke??RI.stroke,fill:e.fill??RI.fill,horizontal:e.horizontal??RI.horizontal,horizontalFill:e.horizontalFill??RI.horizontalFill,vertical:e.vertical??RI.vertical,verticalFill:e.verticalFill??RI.verticalFill,x:q(e.x)?e.x:r.left,y:q(e.y)?e.y:r.top,width:q(e.width)?e.width:r.width,height:q(e.height)?e.height:r.height}),a=i.x,o=i.y,s=i.width,c=i.height,l=i.syncWithTicks,u=i.horizontalValues,d=i.verticalValues,f=Ile(),p=Lle();if(!q(s)||s<=0||!q(c)||c<=0||!q(a)||a!==+a||!q(o)||o!==+o)return null;var m=i.verticalCoordinatesGenerator||Yue,h=i.horizontalCoordinatesGenerator||Xue,g=i.horizontalPoints,v=i.verticalPoints;if((!g||!g.length)&&(0,m_.default)(h)){var y=u&&u.length,b=h({yAxis:p?PI(PI({},p),{},{ticks:y?u:p.ticks}):void 0,width:t,height:n,offset:r},y?!0:l);G_(Array.isArray(b),`horizontalCoordinatesGenerator should return Array but instead it returned [${MI(b)}]`),Array.isArray(b)&&(g=b)}if((!v||!v.length)&&(0,m_.default)(m)){var x=d&&d.length,S=m({xAxis:f?PI(PI({},f),{},{ticks:x?d:f.ticks}):void 0,width:t,height:n,offset:r},x?!0:l);G_(Array.isArray(S),`verticalCoordinatesGenerator should return Array but instead it returned [${MI(S)}]`),Array.isArray(S)&&(v=S)}return _.createElement(`g`,{className:`recharts-cartesian-grid`},_.createElement(Wue,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),_.createElement(Gue,FI({},i,{offset:r,horizontalPoints:g,xAxis:f,yAxis:p})),_.createElement(Kue,FI({},i,{offset:r,verticalPoints:v,xAxis:f,yAxis:p})),_.createElement(que,FI({},i,{horizontalPoints:g})),_.createElement(Jue,FI({},i,{verticalPoints:v})))}zI.displayName=`CartesianGrid`;var Zue=[`type`,`layout`,`connectNulls`,`ref`],Que=[`key`];function BI(e){"@babel/helpers - typeof";return BI=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},BI(e)}function VI(e,t){if(e==null)return{};var n=$ue(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $ue(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function HI(){return HI=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},HI.apply(this,arguments)}function UI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function WI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?UI(Object(n),!0).forEach(function(t){ZI(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UI(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function GI(e){return rde(e)||nde(e)||tde(e)||ede()}function ede(){throw TypeError(`Invalid attempt to spread non-iterable instance.
178
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tde(e,t){if(e){if(typeof e==`string`)return KI(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return KI(e,t)}}function nde(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function rde(e){if(Array.isArray(e))return KI(e)}function KI(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ide(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function qI(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,QI(r.key),r)}}function ade(e,t,n){return t&&qI(e.prototype,t),n&&qI(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function ode(e,t,n){return t=YI(t),sde(e,JI()?Reflect.construct(t,n||[],YI(e).constructor):t.apply(e,n))}function sde(e,t){if(t&&(BI(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return cde(e)}function cde(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function JI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(JI=function(){return!!e})()}function YI(e){return YI=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},YI(e)}function lde(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,`prototype`,{writable:!1}),t&&XI(e,t)}function XI(e,t){return XI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},XI(e,t)}function ZI(e,t,n){return t=QI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QI(e){var t=ude(e,`string`);return BI(t)==`symbol`?t:t+``}function ude(e,t){if(BI(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(BI(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var $I=function(e){function t(){var e;ide(this,t);var n=[...arguments];return e=ode(this,t,[].concat(n)),ZI(e,`state`,{isAnimationFinished:!0,totalLength:0}),ZI(e,`generateSimpleStrokeDasharray`,function(e,t){return`${t}px ${e-t}px`}),ZI(e,`getStrokeDasharray`,function(n,r,i){var a=i.reduce(function(e,t){return e+t});if(!a)return e.generateSimpleStrokeDasharray(r,n);for(var o=Math.floor(n/a),s=n%a,c=r-n,l=[],u=0,d=0;u<i.length;d+=i[u],++u)if(d+i[u]>s){l=[].concat(GI(i.slice(0,u)),[s-d]);break}var f=l.length%2==0?[0,c]:[c];return[].concat(GI(t.repeat(i,o)),GI(l),f).map(function(e){return`${e}px`}).join(`, `)}),ZI(e,`id`,n_(`recharts-line-`)),ZI(e,`pathRef`,function(t){e.mainCurve=t}),ZI(e,`handleAnimationEnd`,function(){e.setState({isAnimationFinished:!0}),e.props.onAnimationEnd&&e.props.onAnimationEnd()}),ZI(e,`handleAnimationStart`,function(){e.setState({isAnimationFinished:!1}),e.props.onAnimationStart&&e.props.onAnimationStart()}),e}return lde(t,e),ade(t,[{key:`componentDidMount`,value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();this.setState({totalLength:e})}}},{key:`componentDidUpdate`,value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();e!==this.state.totalLength&&this.setState({totalLength:e})}}},{key:`getTotalLength`,value:function(){var e=this.mainCurve;try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}},{key:`renderErrorBar`,value:function(e,t){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var n=this.props,r=n.points,i=n.xAxis,a=n.yAxis,o=n.layout,s=n.children,c=S_(s,uk);if(!c)return null;var l=function(e,t){return{x:e.x,y:e.y,value:e.value,errorVal:Pk(e.payload,t)}},u={clipPath:e?`url(#clipPath-${t})`:null};return _.createElement(U_,u,c.map(function(e){return _.cloneElement(e,{key:`bar-${e.props.dataKey}`,data:r,xAxis:i,yAxis:a,layout:o,dataPointFormatter:l})}))}},{key:`renderDots`,value:function(e,n,r){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,a=i.dot,o=i.points,s=i.dataKey,c=J(this.props,!1),l=J(a,!0),u=o.map(function(e,n){var r=WI(WI(WI({key:`dot-${n}`,r:3},c),l),{},{index:n,cx:e.x,cy:e.y,value:e.value,dataKey:s,payload:e.payload,points:o});return t.renderDotItem(a,r)}),d={clipPath:e?`url(#clipPath-${n?``:`dots-`}${r})`:null};return _.createElement(U_,HI({className:`recharts-line-dots`,key:`dots`},d),u)}},{key:`renderCurveStatically`,value:function(e,t,n,r){var i=this.props,a=i.type,o=i.layout,s=i.connectNulls;i.ref;var c=WI(WI(WI({},J(VI(i,Zue),!0)),{},{fill:`none`,className:`recharts-line-curve`,clipPath:t?`url(#clipPath-${n})`:null,points:e},r),{},{type:a,layout:o,connectNulls:s});return _.createElement(aM,HI({},c,{pathRef:this.pathRef}))}},{key:`renderCurveWithAnimation`,value:function(e,t){var n=this,r=this.props,i=r.points,a=r.strokeDasharray,o=r.isAnimationActive,s=r.animationBegin,c=r.animationDuration,l=r.animationEasing,u=r.animationId,d=r.animateNewValues,f=r.width,p=r.height,m=this.state,h=m.prevPoints,g=m.totalLength;return _.createElement(hN,{begin:s,duration:c,isActive:o,easing:l,from:{t:0},to:{t:1},key:`line-${u}`,onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(r){var o=r.t;if(h){var s=h.length/i.length,c=i.map(function(e,t){var n=Math.floor(t*s);if(h[n]){var r=h[n],i=a_(r.x,e.x),a=a_(r.y,e.y);return WI(WI({},e),{},{x:i(o),y:a(o)})}if(d){var c=a_(f*2,e.x),l=a_(p/2,e.y);return WI(WI({},e),{},{x:c(o),y:l(o)})}return WI(WI({},e),{},{x:e.x,y:e.y})});return n.renderCurveStatically(c,e,t)}var l=a_(0,g)(o),u;if(a){var m=`${a}`.split(/[,\s]+/gim).map(function(e){return parseFloat(e)});u=n.getStrokeDasharray(l,g,m)}else u=n.generateSimpleStrokeDasharray(g,l);return n.renderCurveStatically(i,e,t,{strokeDasharray:u})})}},{key:`renderCurve`,value:function(e,t){var n=this.props,r=n.points,i=n.isAnimationActive,a=this.state,o=a.prevPoints,s=a.totalLength;return i&&r&&r.length&&(!o&&s>0||!(0,xk.default)(o,r))?this.renderCurveWithAnimation(e,t):this.renderCurveStatically(r,e,t)}},{key:`render`,value:function(){var e=this.props,t=e.hide,n=e.dot,r=e.points,i=e.className,a=e.xAxis,o=e.yAxis,s=e.top,c=e.left,l=e.width,u=e.height,d=e.isAnimationActive,f=e.id;if(t||!r||!r.length)return null;var p=this.state.isAnimationFinished,m=r.length===1,h=Rt(`recharts-line`,i),g=a&&a.allowDataOverflow,v=o&&o.allowDataOverflow,y=g||v,b=(0,Qg.default)(f)?this.id:f,x=J(n,!1)??{r:3,strokeWidth:2},S=x.r,C=S===void 0?3:S,w=x.strokeWidth,T=w===void 0?2:w,E=(D_(n)?n:{}).clipDot,D=E===void 0?!0:E,O=C*2+T;return _.createElement(U_,{className:h},g||v?_.createElement(`defs`,null,_.createElement(`clipPath`,{id:`clipPath-${b}`},_.createElement(`rect`,{x:g?c:c-l/2,y:v?s:s-u/2,width:g?l:l*2,height:v?u:u*2})),!D&&_.createElement(`clipPath`,{id:`clipPath-dots-${b}`},_.createElement(`rect`,{x:c-O/2,y:s-O/2,width:l+O,height:u+O}))):null,!m&&this.renderCurve(y,b),this.renderErrorBar(y,b),(m||n)&&this.renderDots(y,D,b),(!d||p)&&Aj.renderCallByParent(this.props,r))}}],[{key:`getDerivedStateFromProps`,value:function(e,t){return e.animationId===t.prevAnimationId?e.points===t.curPoints?null:{curPoints:e.points}:{prevAnimationId:e.animationId,curPoints:e.points,prevPoints:t.curPoints}}},{key:`repeat`,value:function(e,t){for(var n=e.length%2==0?e:[].concat(GI(e),[0]),r=[],i=0;i<t;++i)r=[].concat(GI(r),GI(n));return r}},{key:`renderDotItem`,value:function(e,t){var n;if(_.isValidElement(e))n=_.cloneElement(e,t);else if((0,m_.default)(e))n=e(t);else{var r=t.key,i=VI(t,Que),a=Rt(`recharts-line-dot`,typeof e==`boolean`?``:e.className);n=_.createElement(kN,HI({key:r},i,{className:a}))}return n}}])}(_.PureComponent);ZI($I,`displayName`,`Line`),ZI($I,`defaultProps`,{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:`line`,stroke:`#3182bd`,strokeWidth:1,fill:`#fff`,points:[],isAnimationActive:!cS.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:`ease`,hide:!1,label:!1}),ZI($I,`getComposedData`,function(e){var t=e.props,n=e.xAxis,r=e.yAxis,i=e.xAxisTicks,a=e.yAxisTicks,o=e.dataKey,s=e.bandSize,c=e.displayedData,l=e.offset,u=t.layout;return WI({points:c.map(function(e,t){var c=Pk(e,o);return u===`horizontal`?{x:aA({axis:n,ticks:i,bandSize:s,entry:e,index:t}),y:(0,Qg.default)(c)?null:r.scale(c),value:c,payload:e}:{x:(0,Qg.default)(c)?null:n.scale(c),y:aA({axis:r,ticks:a,bandSize:s,entry:e,index:t}),value:c,payload:e}}),layout:u},l)});var dde=[`layout`,`type`,`stroke`,`connectNulls`,`isRange`,`ref`],fde=[`key`],eL;function tL(e){"@babel/helpers - typeof";return tL=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},tL(e)}function nL(e,t){if(e==null)return{};var n=pde(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function pde(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function rL(){return rL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rL.apply(this,arguments)}function iL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function aL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?iL(Object(n),!0).forEach(function(t){uL(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iL(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function mde(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function oL(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,dL(r.key),r)}}function hde(e,t,n){return t&&oL(e.prototype,t),n&&oL(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function gde(e,t,n){return t=cL(t),_de(e,sL()?Reflect.construct(t,n||[],cL(e).constructor):t.apply(e,n))}function _de(e,t){if(t&&(tL(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return vde(e)}function vde(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function sL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(sL=function(){return!!e})()}function cL(e){return cL=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},cL(e)}function yde(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,`prototype`,{writable:!1}),t&&lL(e,t)}function lL(e,t){return lL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},lL(e,t)}function uL(e,t,n){return t=dL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dL(e){var t=bde(e,`string`);return tL(t)==`symbol`?t:t+``}function bde(e,t){if(tL(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(tL(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var fL=function(e){function t(){var e;mde(this,t);var n=[...arguments];return e=gde(this,t,[].concat(n)),uL(e,`state`,{isAnimationFinished:!0}),uL(e,`id`,n_(`recharts-area-`)),uL(e,`handleAnimationEnd`,function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),(0,m_.default)(t)&&t()}),uL(e,`handleAnimationStart`,function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),(0,m_.default)(t)&&t()}),e}return yde(t,e),hde(t,[{key:`renderDots`,value:function(e,n,r){var i=this.props.isAnimationActive,a=this.state.isAnimationFinished;if(i&&!a)return null;var o=this.props,s=o.dot,c=o.points,l=o.dataKey,u=J(this.props,!1),d=J(s,!0),f=c.map(function(e,n){var r=aL(aL(aL({key:`dot-${n}`,r:3},u),d),{},{index:n,cx:e.x,cy:e.y,dataKey:l,value:e.value,payload:e.payload,points:c});return t.renderDotItem(s,r)}),p={clipPath:e?`url(#clipPath-${n?``:`dots-`}${r})`:null};return _.createElement(U_,rL({className:`recharts-area-dots`},p),f)}},{key:`renderHorizontalRect`,value:function(e){var t=this.props,n=t.baseLine,r=t.points,i=t.strokeWidth,a=r[0].x,o=r[r.length-1].x,s=e*Math.abs(a-o),c=(0,vk.default)(r.map(function(e){return e.y||0}));return q(n)&&typeof n==`number`?c=Math.max(n,c):n&&Array.isArray(n)&&n.length&&(c=Math.max((0,vk.default)(n.map(function(e){return e.y||0})),c)),q(c)?_.createElement(`rect`,{x:a<o?a:a-s,y:0,width:s,height:Math.floor(c+(i?parseInt(`${i}`,10):1))}):null}},{key:`renderVerticalRect`,value:function(e){var t=this.props,n=t.baseLine,r=t.points,i=t.strokeWidth,a=r[0].y,o=r[r.length-1].y,s=e*Math.abs(a-o),c=(0,vk.default)(r.map(function(e){return e.x||0}));return q(n)&&typeof n==`number`?c=Math.max(n,c):n&&Array.isArray(n)&&n.length&&(c=Math.max((0,vk.default)(n.map(function(e){return e.x||0})),c)),q(c)?_.createElement(`rect`,{x:0,y:a<o?a:a-s,width:c+(i?parseInt(`${i}`,10):1),height:Math.floor(s)}):null}},{key:`renderClipRect`,value:function(e){return this.props.layout===`vertical`?this.renderVerticalRect(e):this.renderHorizontalRect(e)}},{key:`renderAreaStatically`,value:function(e,t,n,r){var i=this.props,a=i.layout,o=i.type,s=i.stroke,c=i.connectNulls,l=i.isRange;i.ref;var u=nL(i,dde);return _.createElement(U_,{clipPath:n?`url(#clipPath-${r})`:null},_.createElement(aM,rL({},J(u,!0),{points:e,connectNulls:c,type:o,baseLine:t,layout:a,stroke:`none`,className:`recharts-area-area`})),s!==`none`&&_.createElement(aM,rL({},J(this.props,!1),{className:`recharts-area-curve`,layout:a,type:o,connectNulls:c,fill:`none`,points:e})),s!==`none`&&l&&_.createElement(aM,rL({},J(this.props,!1),{className:`recharts-area-curve`,layout:a,type:o,connectNulls:c,fill:`none`,points:t})))}},{key:`renderAreaWithAnimation`,value:function(e,t){var n=this,r=this.props,i=r.points,a=r.baseLine,o=r.isAnimationActive,s=r.animationBegin,c=r.animationDuration,l=r.animationEasing,u=r.animationId,d=this.state,f=d.prevPoints,p=d.prevBaseLine;return _.createElement(hN,{begin:s,duration:c,isActive:o,easing:l,from:{t:0},to:{t:1},key:`area-${u}`,onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(r){var o=r.t;if(f){var s=f.length/i.length,c=i.map(function(e,t){var n=Math.floor(t*s);if(f[n]){var r=f[n],i=a_(r.x,e.x),a=a_(r.y,e.y);return aL(aL({},e),{},{x:i(o),y:a(o)})}return e}),l=q(a)&&typeof a==`number`?a_(p,a)(o):(0,Qg.default)(a)||(0,Xg.default)(a)?a_(p,0)(o):a.map(function(e,t){var n=Math.floor(t*s);if(p[n]){var r=p[n],i=a_(r.x,e.x),a=a_(r.y,e.y);return aL(aL({},e),{},{x:i(o),y:a(o)})}return e});return n.renderAreaStatically(c,l,e,t)}return _.createElement(U_,null,_.createElement(`defs`,null,_.createElement(`clipPath`,{id:`animationClipPath-${t}`},n.renderClipRect(o))),_.createElement(U_,{clipPath:`url(#animationClipPath-${t})`},n.renderAreaStatically(i,a,e,t)))})}},{key:`renderArea`,value:function(e,t){var n=this.props,r=n.points,i=n.baseLine,a=n.isAnimationActive,o=this.state,s=o.prevPoints,c=o.prevBaseLine,l=o.totalLength;return a&&r&&r.length&&(!s&&l>0||!(0,xk.default)(s,r)||!(0,xk.default)(c,i))?this.renderAreaWithAnimation(e,t):this.renderAreaStatically(r,i,e,t)}},{key:`render`,value:function(){var e=this.props,t=e.hide,n=e.dot,r=e.points,i=e.className,a=e.top,o=e.left,s=e.xAxis,c=e.yAxis,l=e.width,u=e.height,d=e.isAnimationActive,f=e.id;if(t||!r||!r.length)return null;var p=this.state.isAnimationFinished,m=r.length===1,h=Rt(`recharts-area`,i),g=s&&s.allowDataOverflow,v=c&&c.allowDataOverflow,y=g||v,b=(0,Qg.default)(f)?this.id:f,x=J(n,!1)??{r:3,strokeWidth:2},S=x.r,C=S===void 0?3:S,w=x.strokeWidth,T=w===void 0?2:w,E=(D_(n)?n:{}).clipDot,D=E===void 0?!0:E,O=C*2+T;return _.createElement(U_,{className:h},g||v?_.createElement(`defs`,null,_.createElement(`clipPath`,{id:`clipPath-${b}`},_.createElement(`rect`,{x:g?o:o-l/2,y:v?a:a-u/2,width:g?l:l*2,height:v?u:u*2})),!D&&_.createElement(`clipPath`,{id:`clipPath-dots-${b}`},_.createElement(`rect`,{x:o-O/2,y:a-O/2,width:l+O,height:u+O}))):null,m?null:this.renderArea(y,b),(n||m)&&this.renderDots(y,D,b),(!d||p)&&Aj.renderCallByParent(this.props,r))}}],[{key:`getDerivedStateFromProps`,value:function(e,t){return e.animationId===t.prevAnimationId?e.points!==t.curPoints||e.baseLine!==t.curBaseLine?{curPoints:e.points,curBaseLine:e.baseLine}:null:{prevAnimationId:e.animationId,curPoints:e.points,curBaseLine:e.baseLine,prevPoints:t.curPoints,prevBaseLine:t.curBaseLine}}}])}(_.PureComponent);eL=fL,uL(fL,`displayName`,`Area`),uL(fL,`defaultProps`,{stroke:`#3182bd`,fill:`#3182bd`,fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:`line`,connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!cS.isSsr,animationBegin:0,animationDuration:1500,animationEasing:`ease`}),uL(fL,`getBaseValue`,function(e,t,n,r){var i=e.layout,a=e.baseValue,o=t.props.baseValue??a;if(q(o)&&typeof o==`number`)return o;var s=i===`horizontal`?r:n,c=s.scale.domain();if(s.type===`number`){var l=Math.max(c[0],c[1]),u=Math.min(c[0],c[1]);return o===`dataMin`?u:o===`dataMax`||l<0?l:Math.max(Math.min(c[0],c[1]),0)}return o===`dataMin`?c[0]:o===`dataMax`?c[1]:c[0]}),uL(fL,`getComposedData`,function(e){var t=e.props,n=e.item,r=e.xAxis,i=e.yAxis,a=e.xAxisTicks,o=e.yAxisTicks,s=e.bandSize,c=e.dataKey,l=e.stackedData,u=e.dataStartIndex,d=e.displayedData,f=e.offset,p=t.layout,m=l&&l.length,h=eL.getBaseValue(t,n,r,i),g=p===`horizontal`,_=!1,v=d.map(function(e,t){var n;m?n=l[u+t]:(n=Pk(e,c),Array.isArray(n)?_=!0:n=[h,n]);var d=n[1]==null||m&&Pk(e,c)==null;return g?{x:aA({axis:r,ticks:a,bandSize:s,entry:e,index:t}),y:d?null:i.scale(n[1]),value:n,payload:e}:{x:d?null:r.scale(n[1]),y:aA({axis:i,ticks:o,bandSize:s,entry:e,index:t}),value:n,payload:e}});return aL({points:v,baseLine:m||_?v.map(function(e){var t=Array.isArray(e.value)?e.value[0]:null;return g?{x:e.x,y:t!=null&&e.y!=null?i.scale(t):null}:{x:t==null?null:r.scale(t),y:e.y}}):g?i.scale(h):r.scale(h),layout:p,isRange:_},f)}),uL(fL,`renderDotItem`,function(e,t){var n;if(_.isValidElement(e))n=_.cloneElement(e,t);else if((0,m_.default)(e))n=e(t);else{var r=Rt(`recharts-area-dot`,typeof e==`boolean`?``:e.className),i=t.key,a=nL(t,fde);n=_.createElement(kN,rL({},a,{key:i,className:r}))}return n});function pL(e){"@babel/helpers - typeof";return pL=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},pL(e)}function xde(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function mL(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,yL(r.key),r)}}function Sde(e,t,n){return t&&mL(e.prototype,t),n&&mL(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function Cde(e,t,n){return t=gL(t),wde(e,hL()?Reflect.construct(t,n||[],gL(e).constructor):t.apply(e,n))}function wde(e,t){if(t&&(pL(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return Tde(e)}function Tde(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function hL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hL=function(){return!!e})()}function gL(e){return gL=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},gL(e)}function Ede(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,`prototype`,{writable:!1}),t&&_L(e,t)}function _L(e,t){return _L=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_L(e,t)}function vL(e,t,n){return t=yL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yL(e){var t=Dde(e,`string`);return pL(t)==`symbol`?t:t+``}function Dde(e,t){if(pL(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(pL(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function bL(){return bL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bL.apply(this,arguments)}function Ode(e){var t=e.xAxisId,n=MF(),r=NF(),i=AF(t);return i==null?null:_.createElement(jI,bL({},i,{className:Rt(`recharts-${i.axisType} ${i.axisType}`,i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(e){return qk(e,!0)}}))}var xL=function(e){function t(){return xde(this,t),Cde(this,t,arguments)}return Ede(t,e),Sde(t,[{key:`render`,value:function(){return _.createElement(Ode,this.props)}}])}(_.Component);vL(xL,`displayName`,`XAxis`),vL(xL,`defaultProps`,{allowDecimals:!0,hide:!1,orientation:`bottom`,width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:`category`,padding:{left:0,right:0},allowDataOverflow:!1,scale:`auto`,reversed:!1,allowDuplicatedCategory:!0});function SL(e){"@babel/helpers - typeof";return SL=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},SL(e)}function kde(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function CL(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,OL(r.key),r)}}function Ade(e,t,n){return t&&CL(e.prototype,t),n&&CL(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function jde(e,t,n){return t=TL(t),Mde(e,wL()?Reflect.construct(t,n||[],TL(e).constructor):t.apply(e,n))}function Mde(e,t){if(t&&(SL(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return Nde(e)}function Nde(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function wL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(wL=function(){return!!e})()}function TL(e){return TL=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},TL(e)}function Pde(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,`prototype`,{writable:!1}),t&&EL(e,t)}function EL(e,t){return EL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},EL(e,t)}function DL(e,t,n){return t=OL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OL(e){var t=Fde(e,`string`);return SL(t)==`symbol`?t:t+``}function Fde(e,t){if(SL(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(SL(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function kL(){return kL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kL.apply(this,arguments)}var Ide=function(e){var t=e.yAxisId,n=MF(),r=NF(),i=jF(t);return i==null?null:_.createElement(jI,kL({},i,{className:Rt(`recharts-${i.axisType} ${i.axisType}`,i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(e){return qk(e,!0)}}))},AL=function(e){function t(){return kde(this,t),jde(this,t,arguments)}return Pde(t,e),Ade(t,[{key:`render`,value:function(){return _.createElement(Ide,this.props)}}])}(_.Component);DL(AL,`displayName`,`YAxis`),DL(AL,`defaultProps`,{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:`left`,width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:`number`,padding:{top:0,bottom:0},allowDataOverflow:!1,scale:`auto`,reversed:!1});function jL(e){return Bde(e)||zde(e)||Rde(e)||Lde()}function Lde(){throw TypeError(`Invalid attempt to spread non-iterable instance.
179
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rde(e,t){if(e){if(typeof e==`string`)return ML(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ML(e,t)}}function zde(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Bde(e){if(Array.isArray(e))return ML(e)}function ML(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var NL=function(e,t,n,r,i){var a=S_(e,GF),o=S_(e,nI),s=[].concat(jL(a),jL(o)),c=S_(e,pI),l=`${r}Id`,u=r[0],d=t;if(s.length&&(d=s.reduce(function(e,t){if(t.props[l]===n&&qP(t.props,`extendDomain`)&&q(t.props[u])){var r=t.props[u];return[Math.min(e[0],r),Math.max(e[1],r)]}return e},d)),c.length){var f=`${u}1`,p=`${u}2`;d=c.reduce(function(e,t){if(t.props[l]===n&&qP(t.props,`extendDomain`)&&q(t.props[f])&&q(t.props[p])){var r=t.props[f],i=t.props[p];return[Math.min(e[0],r,i),Math.max(e[1],r,i)]}return e},d)}return i&&i.length&&(d=i.reduce(function(e,t){return q(t)?[Math.min(e[0],t),Math.max(e[1],t)]:e},d)),d},PL=new(l(o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=`~`;function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1));function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,n,i,o){if(typeof n!=`function`)throw TypeError(`The listener must be a function`);var s=new a(n,i||e,o),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function s(e,t){--e._eventsCount===0?e._events=new i:delete e._events[t]}function c(){this._events=new i,this._eventsCount=0}c.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)n.call(t,i)&&e.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},c.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=Array(a);i<a;i++)o[i]=n[i].fn;return o},c.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},c.prototype.emit=function(e,t,n,i,a,o){var s=r?r+e:e;if(!this._events[s])return!1;var c=this._events[s],l=arguments.length,u,d;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,a),!0;case 6:return c.fn.call(c.context,t,n,i,a,o),!0}for(d=1,u=Array(l-1);d<l;d++)u[d-1]=arguments[d];c.fn.apply(c.context,u)}else{var f=c.length,p;for(d=0;d<f;d++)switch(c[d].once&&this.removeListener(e,c[d].fn,void 0,!0),l){case 1:c[d].fn.call(c[d].context);break;case 2:c[d].fn.call(c[d].context,t);break;case 3:c[d].fn.call(c[d].context,t,n);break;case 4:c[d].fn.call(c[d].context,t,n,i);break;default:if(!u)for(p=1,u=Array(l-1);p<l;p++)u[p-1]=arguments[p];c[d].fn.apply(c[d].context,u)}}return!0},c.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},c.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},c.prototype.removeListener=function(e,t,n,i){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return s(this,a),this;var o=this._events[a];if(o.fn)o.fn===t&&(!i||o.once)&&(!n||o.context===n)&&s(this,a);else{for(var c=0,l=[],u=o.length;c<u;c++)(o[c].fn!==t||i&&!o[c].once||n&&o[c].context!==n)&&l.push(o[c]);l.length?this._events[a]=l.length===1?l[0]:l:s(this,a)}return this},c.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new i,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=r,c.EventEmitter=c,t!==void 0&&(t.exports=c)}))())).default,FL=`recharts.syncMouseEvents`;function IL(e){"@babel/helpers - typeof";return IL=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},IL(e)}function Vde(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function LL(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,zL(r.key),r)}}function Hde(e,t,n){return t&&LL(e.prototype,t),n&&LL(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function RL(e,t,n){return t=zL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zL(e){var t=Ude(e,`string`);return IL(t)==`symbol`?t:t+``}function Ude(e,t){if(IL(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(IL(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Wde=function(){function e(){Vde(this,e),RL(this,`activeIndex`,0),RL(this,`coordinateList`,[]),RL(this,`layout`,`horizontal`)}return Hde(e,[{key:`setDetails`,value:function(e){var t=e.coordinateList,n=t===void 0?null:t,r=e.container,i=r===void 0?null:r,a=e.layout,o=a===void 0?null:a,s=e.offset,c=s===void 0?null:s,l=e.mouseHandlerCallback,u=l===void 0?null:l;this.coordinateList=n??this.coordinateList??[],this.container=i??this.container,this.layout=o??this.layout,this.offset=c??this.offset,this.mouseHandlerCallback=u??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:`focus`,value:function(){this.spoofMouse()}},{key:`keyboardEvent`,value:function(e){if(this.coordinateList.length!==0)switch(e.key){case`ArrowRight`:if(this.layout!==`horizontal`)return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break;case`ArrowLeft`:if(this.layout!==`horizontal`)return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break;default:break}}},{key:`setIndex`,value:function(e){this.activeIndex=e}},{key:`spoofMouse`,value:function(){if(this.layout===`horizontal`&&this.coordinateList.length!==0){var e=this.container.getBoundingClientRect(),t=e.x,n=e.y,r=e.height,i=this.coordinateList[this.activeIndex].coordinate,a=window?.scrollX||0,o=window?.scrollY||0,s=t+i+a,c=n+this.offset.top+r/2+o;this.mouseHandlerCallback({pageX:s,pageY:c})}}}])}();function Gde(e,t,n){if(n===`number`&&t===!0&&Array.isArray(e)){var r=e?.[0],i=e?.[1];if(r&&i&&q(r)&&q(i))return!0}return!1}function Kde(e,t,n,r){var i=r/2;return{stroke:`none`,fill:`#ccc`,x:e===`horizontal`?t.x-i:n.left+.5,y:e===`horizontal`?n.top+.5:t.y-i,width:e===`horizontal`?r:n.width-1,height:e===`horizontal`?n.height-1:r}}function BL(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,a=e.endAngle;return{points:[jA(t,n,r,i),jA(t,n,r,a)],cx:t,cy:n,radius:r,startAngle:i,endAngle:a}}function qde(e,t,n){var r,i,a,o;if(e===`horizontal`)r=t.x,a=r,i=n.top,o=n.top+n.height;else if(e===`vertical`)i=t.y,o=i,r=n.left,a=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e===`centric`){var s=t.cx,c=t.cy,l=t.innerRadius,u=t.outerRadius,d=t.angle,f=jA(s,c,l,d),p=jA(s,c,u,d);r=f.x,i=f.y,a=p.x,o=p.y}else return BL(t);return[{x:r,y:i},{x:a,y:o}]}function VL(e){"@babel/helpers - typeof";return VL=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},VL(e)}function HL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function UL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?HL(Object(n),!0).forEach(function(t){Jde(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HL(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Jde(e,t,n){return t=Yde(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yde(e){var t=Xde(e,`string`);return VL(t)==`symbol`?t:t+``}function Xde(e,t){if(VL(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(VL(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Zde(e){var t=e.element,n=e.tooltipEventType,r=e.isActive,i=e.activeCoordinate,a=e.activePayload,o=e.offset,s=e.activeTooltipIndex,c=e.tooltipAxisBandSize,l=e.layout,u=e.chartName,d=t.props.cursor??t.type.defaultProps?.cursor;if(!t||!d||!r||!i||u!==`ScatterChart`&&n!==`axis`)return null;var f,p=aM;if(u===`ScatterChart`)f=i,p=kse;else if(u===`BarChart`)f=Kde(l,i,o,c),p=SN;else if(l===`radial`){var m=BL(i),h=m.cx,g=m.cy,v=m.radius;f={cx:h,cy:g,startAngle:m.startAngle,endAngle:m.endAngle,innerRadius:v,outerRadius:v},p=Gj}else f={points:qde(l,i,o)},p=aM;var y=UL(UL(UL(UL({stroke:`#ccc`,pointerEvents:`none`},o),f),J(d,!1)),{},{payload:a,payloadIndex:s,className:Rt(`recharts-tooltip-cursor`,d.className)});return(0,_.isValidElement)(d)?(0,_.cloneElement)(d,y):(0,_.createElement)(p,y)}var Qde=[`item`],$de=[`children`,`className`,`width`,`height`,`style`,`compact`,`title`,`desc`];function WL(e){"@babel/helpers - typeof";return WL=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},WL(e)}function GL(){return GL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},GL.apply(this,arguments)}function KL(e,t){return nfe(e)||tfe(e,t)||eR(e,t)||efe()}function efe(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
180
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tfe(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function nfe(e){if(Array.isArray(e))return e}function qL(e,t){if(e==null)return{};var n=rfe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rfe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function ife(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function JL(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,oR(r.key),r)}}function afe(e,t,n){return t&&JL(e.prototype,t),n&&JL(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function ofe(e,t,n){return t=XL(t),sfe(e,YL()?Reflect.construct(t,n||[],XL(e).constructor):t.apply(e,n))}function sfe(e,t){if(t&&(WL(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return cfe(e)}function cfe(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function YL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(YL=function(){return!!e})()}function XL(e){return XL=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},XL(e)}function lfe(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,`prototype`,{writable:!1}),t&&ZL(e,t)}function ZL(e,t){return ZL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ZL(e,t)}function QL(e){return nR(e)||tR(e)||eR(e)||$L()}function $L(){throw TypeError(`Invalid attempt to spread non-iterable instance.
181
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eR(e,t){if(e){if(typeof e==`string`)return rR(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rR(e,t)}}function tR(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function nR(e){if(Array.isArray(e))return rR(e)}function rR(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function iR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Y(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?iR(Object(n),!0).forEach(function(t){aR(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iR(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function aR(e,t,n){return t=oR(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oR(e){var t=sR(e,`string`);return WL(t)==`symbol`?t:t+``}function sR(e,t){if(WL(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(WL(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var cR={xAxis:[`bottom`,`top`],yAxis:[`left`,`right`]},lR={width:`100%`,height:`100%`},uR={x:0,y:0};function dR(e){return e}var fR=function(e,t){return t===`horizontal`?e.x:t===`vertical`?e.y:t===`centric`?e.angle:e.radius},pR=function(e,t,n,r){var i=t.find(function(e){return e&&e.index===n});if(i){if(e===`horizontal`)return{x:i.coordinate,y:r.y};if(e===`vertical`)return{x:r.x,y:i.coordinate};if(e===`centric`){var a=i.coordinate,o=r.radius;return Y(Y(Y({},r),jA(r.cx,r.cy,o,a)),{},{angle:a,radius:o})}var s=i.coordinate,c=r.angle;return Y(Y(Y({},r),jA(r.cx,r.cy,s,c)),{},{angle:c,radius:s})}return uR},mR=function(e,t){var n=t.graphicalItems,r=t.dataStartIndex,i=t.dataEndIndex,a=(n??[]).reduce(function(e,t){var n=t.props.data;return n&&n.length?[].concat(QL(e),QL(n)):e},[]);return a.length>0?a:e&&e.length&&q(r)&&q(i)?e.slice(r,i+1):[]};function hR(e){return e===`number`?[0,`auto`]:void 0}var gR=function(e,t,n,r){var i=e.graphicalItems,a=e.tooltipAxis,o=mR(t,e);return n<0||!i||!i.length||n>=o.length?null:i.reduce(function(i,s){var c=s.props.data??t;c&&e.dataStartIndex+e.dataEndIndex!==0&&e.dataEndIndex-e.dataStartIndex>=n&&(c=c.slice(e.dataStartIndex,e.dataEndIndex+1));var l=a.dataKey&&!a.allowDuplicatedCategory?o_(c===void 0?o:c,a.dataKey,r):c&&c[n]||o[n];return l?[].concat(QL(i),[gA(s,l)]):i},[])},_R=function(e,t,n,r){var i=r||{x:e.chartX,y:e.chartY},a=fR(i,n),o=e.orderedTooltipTicks,s=e.tooltipAxis,c=e.tooltipTicks,l=Ik(a,o,c,s);if(l>=0&&c){var u=c[l]&&c[l].value;return{activeTooltipIndex:l,activeLabel:u,activePayload:gR(e,t,l,u),activeCoordinate:pR(n,o,l,i)}}return null},vR=function(e,t){var n=t.axes,r=t.graphicalItems,i=t.axisType,a=t.axisIdKey,o=t.stackGroups,s=t.dataStartIndex,c=t.dataEndIndex,l=e.layout,u=e.children,d=e.stackOffset,f=Gk(l,i);return n.reduce(function(t,n){var p=n.type.defaultProps===void 0?n.props:Y(Y({},n.type.defaultProps),n.props),m=p.type,h=p.dataKey,g=p.allowDataOverflow,_=p.allowDuplicatedCategory,v=p.scale,y=p.ticks,b=p.includeHidden,x=p[a];if(t[x])return t;var S=mR(e.data,{graphicalItems:r.filter(function(e){return(a in e.props?e.props[a]:e.type.defaultProps?.[a])===x}),dataStartIndex:s,dataEndIndex:c}),C=S.length,w,T,E;Gde(p.domain,g,m)&&(w=pA(p.domain,null,g),f&&(m===`number`||v!==`auto`)&&(E=Fk(S,h,`category`)));var D=hR(m);if(!w||w.length===0){var O=p.domain??D;if(h){if(w=Fk(S,h,m),m===`category`&&f){var k=Pne(w);_&&k?(T=w,w=(0,PP.default)(0,C)):_||(w=hA(O,w,n).reduce(function(e,t){return e.indexOf(t)>=0?e:[].concat(QL(e),[t])},[]))}else if(m===`category`)w=_?w.filter(function(e){return e!==``&&!(0,Qg.default)(e)}):hA(O,w,n).reduce(function(e,t){return e.indexOf(t)>=0||t===``||(0,Qg.default)(t)?e:[].concat(QL(e),[t])},[]);else if(m===`number`){var A=Uk(S,r.filter(function(e){var t=a in e.props?e.props[a]:e.type.defaultProps?.[a],n=`hide`in e.props?e.props.hide:e.type.defaultProps?.hide;return t===x&&(b||!n)}),h,i,l);A&&(w=A)}f&&(m===`number`||v!==`auto`)&&(E=Fk(S,h,`category`))}else w=f?(0,PP.default)(0,C):o&&o[x]&&o[x].hasStack&&m===`number`?d===`expand`?[0,1]:uA(o[x].stackGroups,s,c):Wk(S,r.filter(function(e){var t=a in e.props?e.props[a]:e.type.defaultProps[a],n=`hide`in e.props?e.props.hide:e.type.defaultProps.hide;return t===x&&(b||!n)}),m,l,!0);if(m===`number`)w=NL(u,w,x,i,y),O&&(w=pA(O,w,g));else if(m===`category`&&O){var j=O;w.every(function(e){return j.indexOf(e)>=0})&&(w=j)}}return Y(Y({},t),{},aR({},x,Y(Y({},p),{},{axisType:i,domain:w,categoricalDomain:E,duplicateDomain:T,originalDomain:p.domain??D,isCategorical:f,layout:l})))},{})},yR=function(e,t){var n=t.graphicalItems,r=t.Axis,i=t.axisType,a=t.axisIdKey,o=t.stackGroups,s=t.dataStartIndex,c=t.dataEndIndex,l=e.layout,u=e.children,d=mR(e.data,{graphicalItems:n,dataStartIndex:s,dataEndIndex:c}),f=d.length,p=Gk(l,i),m=-1;return n.reduce(function(e,t){var h=(t.type.defaultProps===void 0?t.props:Y(Y({},t.type.defaultProps),t.props))[a],g=hR(`number`);if(!e[h]){m++;var _;return p?_=(0,PP.default)(0,f):o&&o[h]&&o[h].hasStack?(_=uA(o[h].stackGroups,s,c),_=NL(u,_,h,i)):(_=pA(g,Wk(d,n.filter(function(e){var t=a in e.props?e.props[a]:e.type.defaultProps?.[a],n=`hide`in e.props?e.props.hide:e.type.defaultProps?.hide;return t===h&&!n}),`number`,l),r.defaultProps.allowDataOverflow),_=NL(u,_,h,i)),Y(Y({},e),{},aR({},h,Y(Y({axisType:i},r.defaultProps),{},{hide:!0,orientation:(0,Zg.default)(cR,`${i}.${m%2}`,null),domain:_,originalDomain:g,isCategorical:p,layout:l})))}return e},{})},bR=function(e,t){var n=t.axisType,r=n===void 0?`xAxis`:n,i=t.AxisComp,a=t.graphicalItems,o=t.stackGroups,s=t.dataStartIndex,c=t.dataEndIndex,l=e.children,u=`${r}Id`,d=S_(l,i),f={};return d&&d.length?f=vR(e,{axes:d,graphicalItems:a,axisType:r,axisIdKey:u,stackGroups:o,dataStartIndex:s,dataEndIndex:c}):a&&a.length&&(f=yR(e,{Axis:i,graphicalItems:a,axisType:r,axisIdKey:u,stackGroups:o,dataStartIndex:s,dataEndIndex:c})),f},xR=function(e){var t=i_(e),n=qk(t,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:(0,Hx.default)(n,function(e){return e.coordinate}),tooltipAxis:t,tooltipAxisBandSize:mA(t,n)}},SR=function(e){var t=e.children,n=e.defaultShowTooltip,r=C_(t,KP),i=0,a=0;return e.data&&e.data.length!==0&&(a=e.data.length-1),r&&r.props&&(r.props.startIndex>=0&&(i=r.props.startIndex),r.props.endIndex>=0&&(a=r.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!n}},CR=function(e){return!e||!e.length?!1:e.some(function(e){var t=v_(e&&e.type);return t&&t.indexOf(`Bar`)>=0})},wR=function(e){return e===`horizontal`?{numericAxisName:`yAxis`,cateAxisName:`xAxis`}:e===`vertical`?{numericAxisName:`xAxis`,cateAxisName:`yAxis`}:e===`centric`?{numericAxisName:`radiusAxis`,cateAxisName:`angleAxis`}:{numericAxisName:`angleAxis`,cateAxisName:`radiusAxis`}},TR=function(e,t){var n=e.props,r=e.graphicalItems,i=e.xAxisMap,a=i===void 0?{}:i,o=e.yAxisMap,s=o===void 0?{}:o,c=n.width,l=n.height,u=n.children,d=n.margin||{},f=C_(u,KP),p=C_(u,Fx),m=Object.keys(s).reduce(function(e,t){var n=s[t],r=n.orientation;return!n.mirror&&!n.hide?Y(Y({},e),{},aR({},r,e[r]+n.width)):e},{left:d.left||0,right:d.right||0}),h=Y(Y({},Object.keys(a).reduce(function(e,t){var n=a[t],r=n.orientation;return!n.mirror&&!n.hide?Y(Y({},e),{},aR({},r,(0,Zg.default)(e,`${r}`)+n.height)):e},{top:d.top||0,bottom:d.bottom||0})),m),g=h.bottom;f&&(h.bottom+=f.props.height||KP.defaultProps.height),p&&t&&(h=Bk(h,r,n,t));var _=c-h.left-h.right,v=l-h.top-h.bottom;return Y(Y({brushBottom:g},h),{},{width:Math.max(_,0),height:Math.max(v,0)})},ER=function(e,t){if(t===`xAxis`)return e[t].width;if(t===`yAxis`)return e[t].height},DR=function(e){var t=e.chartName,n=e.GraphicalChild,r=e.defaultTooltipEventType,i=r===void 0?`axis`:r,a=e.validateTooltipEventTypes,o=a===void 0?[`axis`]:a,s=e.axisComponents,c=e.legendContent,l=e.formatAxisMap,u=e.defaultProps,d=function(e,t){var n=t.graphicalItems,r=t.stackGroups,i=t.offset,a=t.updateId,o=t.dataStartIndex,c=t.dataEndIndex,l=e.barSize,u=e.layout,d=e.barGap,f=e.barCategoryGap,p=e.maxBarSize,m=wR(u),h=m.numericAxisName,g=m.cateAxisName,_=CR(n),v=[];return n.forEach(function(n,m){var y=mR(e.data,{graphicalItems:[n],dataStartIndex:o,dataEndIndex:c}),b=n.type.defaultProps===void 0?n.props:Y(Y({},n.type.defaultProps),n.props),x=b.dataKey,S=b.maxBarSize,C=b[`${h}Id`],w=b[`${g}Id`],T=s.reduce(function(e,n){var r=t[`${n.axisType}Map`],i=b[`${n.axisType}Id`];!(r&&r[i]||n.axisType===`zAxis`)&&zO(!1);var a=r[i];return Y(Y({},e),{},aR(aR({},n.axisType,a),`${n.axisType}Ticks`,qk(a)))},{}),E=T[g],D=T[`${g}Ticks`],O=r&&r[C]&&r[C].hasStack&&cA(n,r[C].stackGroups),k=v_(n.type).indexOf(`Bar`)>=0,A=mA(E,D),j=[],M=_&&Rk({barSize:l,stackGroups:r,totalSize:ER(T,g)});if(k){var N=(0,Qg.default)(S)?p:S,P=mA(E,D,!0)??N??0;j=zk({barGap:d,barCategoryGap:f,bandSize:P===A?A:P,sizeList:M[w],maxBarSize:N}),P!==A&&(j=j.map(function(e){return Y(Y({},e),{},{position:Y(Y({},e.position),{},{offset:e.position.offset-P/2})})}))}var F=n&&n.type&&n.type.getComposedData;F&&v.push({props:Y(Y({},F(Y(Y({},T),{},{displayedData:y,props:e,dataKey:x,item:n,bandSize:A,barPosition:j,offset:i,stackedData:O,layout:u,dataStartIndex:o,dataEndIndex:c}))),{},aR(aR(aR({key:n.key||`item-${m}`},h,T[h]),g,T[g]),`animationId`,a)),childIndex:N_(n,e.children),item:n})}),v},f=function(e,r){var i=e.props,a=e.dataStartIndex,o=e.dataEndIndex,c=e.updateId;if(!w_({props:i}))return null;var u=i.children,f=i.layout,p=i.stackOffset,m=i.data,h=i.reverseStackOrder,g=wR(f),_=g.numericAxisName,v=g.cateAxisName,y=S_(u,n),b=rA(m,y,`${_}Id`,`${v}Id`,p,h),x=s.reduce(function(e,t){var n=`${t.axisType}Map`;return Y(Y({},e),{},aR({},n,bR(i,Y(Y({},t),{},{graphicalItems:y,stackGroups:t.axisType===_&&b,dataStartIndex:a,dataEndIndex:o}))))},{}),S=TR(Y(Y({},x),{},{props:i,graphicalItems:y}),r?.legendBBox);Object.keys(x).forEach(function(e){x[e]=l(i,x[e],S,e.replace(`Map`,``),t)});var C=x[`${v}Map`],w=xR(C);return Y(Y({formattedGraphicalItems:d(i,Y(Y({},x),{},{dataStartIndex:a,dataEndIndex:o,updateId:c,graphicalItems:y,stackGroups:b,offset:S})),graphicalItems:y,offset:S,stackGroups:b},w),x)},p=function(e){function n(e){var r;return ife(this,n),r=ofe(this,n,[e]),aR(r,`eventEmitterSymbol`,Symbol(`rechartsEventEmitter`)),aR(r,`accessibilityManager`,new Wde),aR(r,`handleLegendBBoxUpdate`,function(e){if(e){var t=r.state,n=t.dataStartIndex,i=t.dataEndIndex,a=t.updateId;r.setState(Y({legendBBox:e},f({props:r.props,dataStartIndex:n,dataEndIndex:i,updateId:a},Y(Y({},r.state),{},{legendBBox:e}))))}}),aR(r,`handleReceiveSyncEvent`,function(e,t,n){if(r.props.syncId===e){if(n===r.eventEmitterSymbol&&typeof r.props.syncMethod!=`function`)return;r.applySyncEvent(t)}}),aR(r,`handleBrushChange`,function(e){var t=e.startIndex,n=e.endIndex;if(t!==r.state.dataStartIndex||n!==r.state.dataEndIndex){var i=r.state.updateId;r.setState(function(){return Y({dataStartIndex:t,dataEndIndex:n},f({props:r.props,dataStartIndex:t,dataEndIndex:n,updateId:i},r.state))}),r.triggerSyncEvent({dataStartIndex:t,dataEndIndex:n})}}),aR(r,`handleMouseEnter`,function(e){var t=r.getMouseInfo(e);if(t){var n=Y(Y({},t),{},{isTooltipActive:!0});r.setState(n),r.triggerSyncEvent(n);var i=r.props.onMouseEnter;(0,m_.default)(i)&&i(n,e)}}),aR(r,`triggeredAfterMouseMove`,function(e){var t=r.getMouseInfo(e),n=t?Y(Y({},t),{},{isTooltipActive:!0}):{isTooltipActive:!1};r.setState(n),r.triggerSyncEvent(n);var i=r.props.onMouseMove;(0,m_.default)(i)&&i(n,e)}),aR(r,`handleItemMouseEnter`,function(e){r.setState(function(){return{isTooltipActive:!0,activeItem:e,activePayload:e.tooltipPayload,activeCoordinate:e.tooltipPosition||{x:e.cx,y:e.cy}}})}),aR(r,`handleItemMouseLeave`,function(){r.setState(function(){return{isTooltipActive:!1}})}),aR(r,`handleMouseMove`,function(e){e.persist(),r.throttleTriggeredAfterMouseMove(e)}),aR(r,`handleMouseLeave`,function(e){r.throttleTriggeredAfterMouseMove.cancel();var t={isTooltipActive:!1};r.setState(t),r.triggerSyncEvent(t);var n=r.props.onMouseLeave;(0,m_.default)(n)&&n(t,e)}),aR(r,`handleOuterEvent`,function(e){var t=M_(e),n=(0,Zg.default)(r.props,`${t}`);t&&(0,m_.default)(n)&&n((/.*touch.*/i.test(t)?r.getMouseInfo(e.changedTouches[0]):r.getMouseInfo(e))??{},e)}),aR(r,`handleClick`,function(e){var t=r.getMouseInfo(e);if(t){var n=Y(Y({},t),{},{isTooltipActive:!0});r.setState(n),r.triggerSyncEvent(n);var i=r.props.onClick;(0,m_.default)(i)&&i(n,e)}}),aR(r,`handleMouseDown`,function(e){var t=r.props.onMouseDown;(0,m_.default)(t)&&t(r.getMouseInfo(e),e)}),aR(r,`handleMouseUp`,function(e){var t=r.props.onMouseUp;(0,m_.default)(t)&&t(r.getMouseInfo(e),e)}),aR(r,`handleTouchMove`,function(e){e.changedTouches!=null&&e.changedTouches.length>0&&r.throttleTriggeredAfterMouseMove(e.changedTouches[0])}),aR(r,`handleTouchStart`,function(e){e.changedTouches!=null&&e.changedTouches.length>0&&r.handleMouseDown(e.changedTouches[0])}),aR(r,`handleTouchEnd`,function(e){e.changedTouches!=null&&e.changedTouches.length>0&&r.handleMouseUp(e.changedTouches[0])}),aR(r,`handleDoubleClick`,function(e){var t=r.props.onDoubleClick;(0,m_.default)(t)&&t(r.getMouseInfo(e),e)}),aR(r,`handleContextMenu`,function(e){var t=r.props.onContextMenu;(0,m_.default)(t)&&t(r.getMouseInfo(e),e)}),aR(r,`triggerSyncEvent`,function(e){r.props.syncId!==void 0&&PL.emit(FL,r.props.syncId,e,r.eventEmitterSymbol)}),aR(r,`applySyncEvent`,function(e){var t=r.props,n=t.layout,i=t.syncMethod,a=r.state.updateId,o=e.dataStartIndex,s=e.dataEndIndex;if(e.dataStartIndex!==void 0||e.dataEndIndex!==void 0)r.setState(Y({dataStartIndex:o,dataEndIndex:s},f({props:r.props,dataStartIndex:o,dataEndIndex:s,updateId:a},r.state)));else if(e.activeTooltipIndex!==void 0){var c=e.chartX,l=e.chartY,u=e.activeTooltipIndex,d=r.state,p=d.offset,m=d.tooltipTicks;if(!p)return;if(typeof i==`function`)u=i(m,e);else if(i===`value`){u=-1;for(var h=0;h<m.length;h++)if(m[h].value===e.activeLabel){u=h;break}}var g=Y(Y({},p),{},{x:p.left,y:p.top}),_=Math.min(c,g.x+g.width),v=Math.min(l,g.y+g.height),y=m[u]&&m[u].value,b=gR(r.state,r.props.data,u),x=m[u]?{x:n===`horizontal`?m[u].coordinate:_,y:n===`horizontal`?v:m[u].coordinate}:uR;r.setState(Y(Y({},e),{},{activeLabel:y,activeCoordinate:x,activePayload:b,activeTooltipIndex:u}))}else r.setState(e)}),aR(r,`renderCursor`,function(e){var n=r.state,i=n.isTooltipActive,a=n.activeCoordinate,o=n.activePayload,s=n.offset,c=n.activeTooltipIndex,l=n.tooltipAxisBandSize,u=r.getTooltipEventType(),d=e.props.active??i,f=r.props.layout,p=e.key||`_recharts-cursor`;return _.createElement(Zde,{key:p,activeCoordinate:a,activePayload:o,activeTooltipIndex:c,chartName:t,element:e,isActive:d,layout:f,offset:s,tooltipAxisBandSize:l,tooltipEventType:u})}),aR(r,`renderPolarAxis`,function(e,t,n){var i=(0,Zg.default)(e,`type.axisType`),a=(0,Zg.default)(r.state,`${i}Map`),o=e.type.defaultProps,s=o===void 0?e.props:Y(Y({},o),e.props),c=a&&a[s[`${i}Id`]];return(0,_.cloneElement)(e,Y(Y({},c),{},{className:Rt(i,c.className),key:e.key||`${t}-${n}`,ticks:qk(c,!0)}))}),aR(r,`renderPolarGrid`,function(e){var t=e.props,n=t.radialLines,i=t.polarAngles,a=t.polarRadius,o=r.state,s=o.radiusAxisMap,c=o.angleAxisMap,l=i_(s),u=i_(c),d=u.cx,f=u.cy,p=u.innerRadius,m=u.outerRadius;return(0,_.cloneElement)(e,{polarAngles:Array.isArray(i)?i:qk(u,!0).map(function(e){return e.coordinate}),polarRadius:Array.isArray(a)?a:qk(l,!0).map(function(e){return e.coordinate}),cx:d,cy:f,innerRadius:p,outerRadius:m,key:e.key||`polar-grid`,radialLines:n})}),aR(r,`renderLegend`,function(){var e=r.state.formattedGraphicalItems,t=r.props,n=t.children,i=t.width,a=t.height,o=r.props.margin||{},s=_k({children:n,formattedGraphicalItems:e,legendWidth:i-(o.left||0)-(o.right||0),legendContent:c});if(!s)return null;var l=s.item;return(0,_.cloneElement)(l,Y(Y({},qL(s,Qde)),{},{chartWidth:i,chartHeight:a,margin:o,onBBoxUpdate:r.handleLegendBBoxUpdate}))}),aR(r,`renderTooltip`,function(){var e=r.props,t=e.children,n=e.accessibilityLayer,i=C_(t,vS);if(!i)return null;var a=r.state,o=a.isTooltipActive,s=a.activeCoordinate,c=a.activePayload,l=a.activeLabel,u=a.offset,d=i.props.active??o;return(0,_.cloneElement)(i,{viewBox:Y(Y({},u),{},{x:u.left,y:u.top}),active:d,label:l,payload:d?c:[],coordinate:s,accessibilityLayer:n})}),aR(r,`renderBrush`,function(e){var t=r.props,n=t.margin,i=t.data,a=r.state,o=a.offset,s=a.dataStartIndex,c=a.dataEndIndex,l=a.updateId;return(0,_.cloneElement)(e,{key:e.key||`_recharts-brush`,onChange:Yk(r.handleBrushChange,e.props.onChange),data:i,x:q(e.props.x)?e.props.x:o.left,y:q(e.props.y)?e.props.y:o.top+o.height+o.brushBottom-(n.bottom||0),width:q(e.props.width)?e.props.width:o.width,startIndex:s,endIndex:c,updateId:`brush-${l}`})}),aR(r,`renderReferenceElement`,function(e,t,n){if(!e)return null;var i=r.clipPathId,a=r.state,o=a.xAxisMap,s=a.yAxisMap,c=a.offset,l=e.type.defaultProps||{},u=e.props,d=u.xAxisId,f=d===void 0?l.xAxisId:d,p=u.yAxisId,m=p===void 0?l.yAxisId:p;return(0,_.cloneElement)(e,{key:e.key||`${t}-${n}`,xAxis:o[f],yAxis:s[m],viewBox:{x:c.left,y:c.top,width:c.width,height:c.height},clipPathId:i})}),aR(r,`renderActivePoints`,function(e){var t=e.item,r=e.activePoint,i=e.basePoint,a=e.childIndex,o=e.isRange,s=[],c=t.props.key,l=t.item.type.defaultProps===void 0?t.item.props:Y(Y({},t.item.type.defaultProps),t.item.props),u=l.activeDot,d=l.dataKey,f=Y(Y({index:a,dataKey:d,cx:r.x,cy:r.y,r:4,fill:Lk(t.item),strokeWidth:2,stroke:`#fff`,payload:r.payload,value:r.value},J(u,!1)),f_(u));return s.push(n.renderActiveDot(u,f,`${c}-activePoint-${a}`)),i?s.push(n.renderActiveDot(u,Y(Y({},f),{},{cx:i.x,cy:i.y}),`${c}-basePoint-${a}`)):o&&s.push(null),s}),aR(r,`renderGraphicChild`,function(e,t,n){var i=r.filterFormatItem(e,t,n);if(!i)return null;var a=r.getTooltipEventType(),o=r.state,s=o.isTooltipActive,c=o.tooltipAxis,l=o.activeTooltipIndex,u=o.activeLabel,d=r.props.children,f=C_(d,vS),p=i.props,m=p.points,h=p.isRange,g=p.baseLine,v=i.item.type.defaultProps===void 0?i.item.props:Y(Y({},i.item.type.defaultProps),i.item.props),y=v.activeDot,b=v.hide,x=v.activeBar,S=v.activeShape,C=!!(!b&&s&&f&&(y||x||S)),w={};a!==`axis`&&f&&f.props.trigger===`click`?w={onClick:Yk(r.handleItemMouseEnter,e.props.onClick)}:a!==`axis`&&(w={onMouseLeave:Yk(r.handleItemMouseLeave,e.props.onMouseLeave),onMouseEnter:Yk(r.handleItemMouseEnter,e.props.onMouseEnter)});var T=(0,_.cloneElement)(e,Y(Y({},i.props),w));function E(e){return typeof c.dataKey==`function`?c.dataKey(e.payload):null}if(C)if(l>=0){var D,O;if(c.dataKey&&!c.allowDuplicatedCategory){var k=typeof c.dataKey==`function`?E:`payload.${c.dataKey.toString()}`;D=o_(m,k,u),O=h&&g&&o_(g,k,u)}else D=m?.[l],O=h&&g&&g[l];if(S||x){var A=e.props.activeIndex===void 0?l:e.props.activeIndex;return[(0,_.cloneElement)(e,Y(Y(Y({},i.props),w),{},{activeIndex:A})),null,null]}if(!(0,Qg.default)(D))return[T].concat(QL(r.renderActivePoints({item:i,activePoint:D,basePoint:O,childIndex:l,isRange:h})))}else{var j=(r.getItemByXY(r.state.activeCoordinate)??{graphicalItem:T}).graphicalItem,M=j.item,N=M===void 0?e:M,P=j.childIndex;return[(0,_.cloneElement)(N,Y(Y(Y({},i.props),w),{},{activeIndex:P})),null,null]}return h?[T,null,null]:[T,null]}),aR(r,`renderCustomized`,function(e,t,n){return(0,_.cloneElement)(e,Y(Y({key:`recharts-customized-${n}`},r.props),r.state))}),aR(r,`renderMap`,{CartesianGrid:{handler:dR,once:!0},ReferenceArea:{handler:r.renderReferenceElement},ReferenceLine:{handler:dR},ReferenceDot:{handler:r.renderReferenceElement},XAxis:{handler:dR},YAxis:{handler:dR},Brush:{handler:r.renderBrush,once:!0},Bar:{handler:r.renderGraphicChild},Line:{handler:r.renderGraphicChild},Area:{handler:r.renderGraphicChild},Radar:{handler:r.renderGraphicChild},RadialBar:{handler:r.renderGraphicChild},Scatter:{handler:r.renderGraphicChild},Pie:{handler:r.renderGraphicChild},Funnel:{handler:r.renderGraphicChild},Tooltip:{handler:r.renderCursor,once:!0},PolarGrid:{handler:r.renderPolarGrid,once:!0},PolarAngleAxis:{handler:r.renderPolarAxis},PolarRadiusAxis:{handler:r.renderPolarAxis},Customized:{handler:r.renderCustomized}}),r.clipPathId=`${e.id??n_(`recharts`)}-clip`,r.throttleTriggeredAfterMouseMove=(0,bS.default)(r.triggeredAfterMouseMove,e.throttleDelay??1e3/60),r.state={},r}return lfe(n,e),afe(n,[{key:`componentDidMount`,value:function(){this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:this.props.margin.left??0,top:this.props.margin.top??0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:`displayDefaultTooltip`,value:function(){var e=this.props,t=e.children,n=e.data,r=e.height,i=e.layout,a=C_(t,vS);if(a){var o=a.props.defaultIndex;if(!(typeof o!=`number`||o<0||o>this.state.tooltipTicks.length-1)){var s=this.state.tooltipTicks[o]&&this.state.tooltipTicks[o].value,c=gR(this.state,n,o,s),l=this.state.tooltipTicks[o].coordinate,u=(this.state.offset.top+r)/2,d=i===`horizontal`?{x:l,y:u}:{y:l,x:u},f=this.state.formattedGraphicalItems.find(function(e){return e.item.type.name===`Scatter`});f&&(d=Y(Y({},d),f.props.points[o].tooltipPosition),c=f.props.points[o].tooltipPayload);var p={activeTooltipIndex:o,isTooltipActive:!0,activeLabel:s,activePayload:c,activeCoordinate:d};this.setState(p),this.renderCursor(a),this.accessibilityManager.setIndex(o)}}}},{key:`getSnapshotBeforeUpdate`,value:function(e,t){return this.props.accessibilityLayer?(this.state.tooltipTicks!==t.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==e.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==e.margin&&this.accessibilityManager.setDetails({offset:{left:this.props.margin.left??0,top:this.props.margin.top??0}}),null):null}},{key:`componentDidUpdate`,value:function(e){k_([C_(e.children,vS)],[C_(this.props.children,vS)])||this.displayDefaultTooltip()}},{key:`componentWillUnmount`,value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:`getTooltipEventType`,value:function(){var e=C_(this.props.children,vS);if(e&&typeof e.props.shared==`boolean`){var t=e.props.shared?`axis`:`item`;return o.indexOf(t)>=0?t:i}return i}},{key:`getMouseInfo`,value:function(e){if(!this.container)return null;var t=this.container,n=t.getBoundingClientRect(),r=mie(n),i={chartX:Math.round(e.pageX-r.left),chartY:Math.round(e.pageY-r.top)},a=n.width/t.offsetWidth||1,o=this.inRange(i.chartX,i.chartY,a);if(!o)return null;var s=this.state,c=s.xAxisMap,l=s.yAxisMap,u=this.getTooltipEventType(),d=_R(this.state,this.props.data,this.props.layout,o);if(u!==`axis`&&c&&l){var f=i_(c).scale,p=i_(l).scale,m=f&&f.invert?f.invert(i.chartX):null,h=p&&p.invert?p.invert(i.chartY):null;return Y(Y({},i),{},{xValue:m,yValue:h},d)}return d?Y(Y({},i),d):null}},{key:`inRange`,value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,r=this.props.layout,i=e/n,a=t/n;if(r===`horizontal`||r===`vertical`){var o=this.state.offset;return i>=o.left&&i<=o.left+o.width&&a>=o.top&&a<=o.top+o.height?{x:i,y:a}:null}var s=this.state,c=s.angleAxisMap,l=s.radiusAxisMap;if(c&&l){var u=i_(c);return RA({x:i,y:a},u)}return null}},{key:`parseEventsOfWrapper`,value:function(){var e=this.props.children,t=this.getTooltipEventType(),n=C_(e,vS),r={};return n&&t===`axis`&&(r=n.props.trigger===`click`?{onClick:this.handleClick}:{onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu}),Y(Y({},f_(this.props,this.handleOuterEvent)),r)}},{key:`addListener`,value:function(){PL.on(FL,this.handleReceiveSyncEvent)}},{key:`removeListener`,value:function(){PL.removeListener(FL,this.handleReceiveSyncEvent)}},{key:`filterFormatItem`,value:function(e,t,n){for(var r=this.state.formattedGraphicalItems,i=0,a=r.length;i<a;i++){var o=r[i];if(o.item===e||o.props.key===e.key||t===v_(o.item.type)&&n===o.childIndex)return o}return null}},{key:`renderClipPath`,value:function(){var e=this.clipPathId,t=this.state.offset,n=t.left,r=t.top,i=t.height,a=t.width;return _.createElement(`defs`,null,_.createElement(`clipPath`,{id:e},_.createElement(`rect`,{x:n,y:r,height:i,width:a})))}},{key:`getXScales`,value:function(){var e=this.state.xAxisMap;return e?Object.entries(e).reduce(function(e,t){var n=KL(t,2),r=n[0],i=n[1];return Y(Y({},e),{},aR({},r,i.scale))},{}):null}},{key:`getYScales`,value:function(){var e=this.state.yAxisMap;return e?Object.entries(e).reduce(function(e,t){var n=KL(t,2),r=n[0],i=n[1];return Y(Y({},e),{},aR({},r,i.scale))},{}):null}},{key:`getXScaleByAxisId`,value:function(e){var t;return(t=this.state.xAxisMap)==null||(t=t[e])==null?void 0:t.scale}},{key:`getYScaleByAxisId`,value:function(e){var t;return(t=this.state.yAxisMap)==null||(t=t[e])==null?void 0:t.scale}},{key:`getItemByXY`,value:function(e){var t=this.state,n=t.formattedGraphicalItems,r=t.activeItem;if(n&&n.length)for(var i=0,a=n.length;i<a;i++){var o=n[i],s=o.props,c=o.item,l=c.type.defaultProps===void 0?c.props:Y(Y({},c.type.defaultProps),c.props),u=v_(c.type);if(u===`Bar`){var d=(s.data||[]).find(function(t){return lse(e,t)});if(d)return{graphicalItem:o,payload:d}}else if(u===`RadialBar`){var f=(s.data||[]).find(function(t){return RA(e,t)});if(f)return{graphicalItem:o,payload:f}}else if(mP(o,r)||hP(o,r)||gP(o,r)){var p=Oce({graphicalItem:o,activeTooltipItem:r,itemData:l.data}),m=l.activeIndex===void 0?p:l.activeIndex;return{graphicalItem:Y(Y({},o),{},{childIndex:m}),payload:gP(o,r)?l.data[p]:o.props.data[p]}}}return null}},{key:`render`,value:function(){var e=this;if(!w_(this))return null;var t=this.props,n=t.children,r=t.className,i=t.width,a=t.height,o=t.style,s=t.compact,c=t.title,l=t.desc,u=J(qL(t,$de),!1);if(s)return _.createElement(kF,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},_.createElement(R_,GL({},u,{width:i,height:a,title:c,desc:l}),this.renderClipPath(),j_(n,this.renderMap)));this.props.accessibilityLayer&&(u.tabIndex=this.props.tabIndex??0,u.role=this.props.role??`application`,u.onKeyDown=function(t){e.accessibilityManager.keyboardEvent(t)},u.onFocus=function(){e.accessibilityManager.focus()});var d=this.parseEventsOfWrapper();return _.createElement(kF,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},_.createElement(`div`,GL({className:Rt(`recharts-wrapper`,r),style:Y({position:`relative`,cursor:`default`,width:i,height:a},o)},d,{ref:function(t){e.container=t}}),_.createElement(R_,GL({},u,{width:i,height:a,title:c,desc:l,style:lR}),this.renderClipPath(),j_(n,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(_.Component);aR(p,`displayName`,t),aR(p,`defaultProps`,Y({layout:`horizontal`,stackOffset:`none`,barCategoryGap:`10%`,barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:`index`},u)),aR(p,`getDerivedStateFromProps`,function(e,t){var n=e.dataKey,r=e.data,i=e.children,a=e.width,o=e.height,s=e.layout,c=e.stackOffset,l=e.margin,u=t.dataStartIndex,d=t.dataEndIndex;if(t.updateId===void 0){var p=SR(e);return Y(Y(Y({},p),{},{updateId:0},f(Y(Y({props:e},p),{},{updateId:0}),t)),{},{prevDataKey:n,prevData:r,prevWidth:a,prevHeight:o,prevLayout:s,prevStackOffset:c,prevMargin:l,prevChildren:i})}if(n!==t.prevDataKey||r!==t.prevData||a!==t.prevWidth||o!==t.prevHeight||s!==t.prevLayout||c!==t.prevStackOffset||!s_(l,t.prevMargin)){var m=SR(e),h={chartX:t.chartX,chartY:t.chartY,isTooltipActive:t.isTooltipActive},g=Y(Y({},_R(t,r,s)),{},{updateId:t.updateId+1}),_=Y(Y(Y({},m),h),g);return Y(Y(Y({},_),f(Y({props:e},_),t)),{},{prevDataKey:n,prevData:r,prevWidth:a,prevHeight:o,prevLayout:s,prevStackOffset:c,prevMargin:l,prevChildren:i})}if(!k_(i,t.prevChildren)){var v=C_(i,KP),y=v?v.props?.startIndex??u:u,b=v?v.props?.endIndex??d:d,x=y!==u||b!==d,S=!(0,Qg.default)(r)&&!x?t.updateId:t.updateId+1;return Y(Y({updateId:S},f(Y(Y({props:e},t),{},{updateId:S,dataStartIndex:y,dataEndIndex:b}),t)),{},{prevChildren:i,dataStartIndex:y,dataEndIndex:b})}return null}),aR(p,`renderActiveDot`,function(e,t,n){var r=(0,_.isValidElement)(e)?(0,_.cloneElement)(e,t):(0,m_.default)(e)?e(t):_.createElement(kN,t);return _.createElement(U_,{className:`recharts-active-dot`,key:n},r)});var m=(0,_.forwardRef)(function(e,t){return _.createElement(p,GL({},e,{ref:t}))});return m.displayName=p.displayName,m},OR=DR({chartName:`LineChart`,GraphicalChild:$I,axisComponents:[{axisType:`xAxis`,AxisComp:xL},{axisType:`yAxis`,AxisComp:AL}],formatAxisMap:vF}),kR=DR({chartName:`BarChart`,GraphicalChild:uF,defaultTooltipEventType:`axis`,validateTooltipEventTypes:[`axis`,`item`],axisComponents:[{axisType:`xAxis`,AxisComp:xL},{axisType:`yAxis`,AxisComp:AL}],formatAxisMap:vF}),AR=DR({chartName:`PieChart`,GraphicalChild:OP,validateTooltipEventTypes:[`item`],defaultTooltipEventType:`item`,legendContent:`children`,axisComponents:[{axisType:`angleAxis`,AxisComp:nP},{axisType:`radiusAxis`,AxisComp:WN}],formatAxisMap:NA,defaultProps:{layout:`centric`,startAngle:0,endAngle:360,cx:`50%`,cy:`50%`,innerRadius:0,outerRadius:`80%`}}),jR=DR({chartName:`AreaChart`,GraphicalChild:fL,axisComponents:[{axisType:`xAxis`,AxisComp:xL},{axisType:`yAxis`,AxisComp:AL}],formatAxisMap:vF}),MR=()=>({providers:[],activeProviders:[],isLoading:!1,fetchProviders:async()=>{try{let e=(await K(`/api/providers`)).providers;return{providers:e,activeProviders:e.filter(e=>e.enabled&&e.active)}}catch(e){return console.error(`Failed to fetch providers:`,e),{providers:[],activeProviders:[]}}},toggleProvider:async(e,t)=>{try{await K(`/api/providers/${e}/toggle`,{method:`POST`,body:{active:t},showLoader:t?`Activando proveedor...`:`Desactivando proveedor...`,showError:!0});let n=X.getState().providers.map(n=>n.id===e?{...n,active:t,enabled:t}:n);X.setState({providers:n,activeProviders:n.filter(e=>e.enabled&&e.active)})}catch(e){throw console.error(`Failed to toggle provider:`,e),e}},updateProvider:async(e,t)=>{try{let n=await K(`/api/providers/${e}`,{method:`PUT`,body:t,showLoader:`Actualizando proveedor...`,showError:!0,showSuccess:`Proveedor actualizado`});if(n?.provider){let t=X.getState().providers.map(t=>t.id===e?{...t,...n.provider}:t);X.setState({providers:t,activeProviders:t.filter(e=>e.enabled&&e.active)})}}catch(e){throw console.error(`Failed to update provider:`,e),e}}}),NR=()=>({models:[],availableModels:[],fetchModels:async()=>{try{let e=(await K(`/api/models`)).models;return{models:e,availableModels:e.filter(e=>e.enabled||e.active)}}catch(e){return console.error(`Failed to fetch models:`,e),{models:[],availableModels:[]}}},toggleModel:async(e,t)=>{try{await K(`/api/models/${e}/toggle`,{method:`POST`,body:{active:t},showLoader:t?`Activando modelo...`:`Desactivando modelo...`,showError:!0});let n=X.getState().models.map(n=>n.id===e?{...n,active:t,enabled:t}:n);X.setState({models:n,availableModels:n.filter(e=>e.enabled||e.active)})}catch(e){throw console.error(`Failed to toggle model:`,e),e}},syncModels:async e=>{try{let t=await K(`/api/providers/${e}/sync-models`,{method:`POST`,showLoader:`Sincronizando modelos desde Ollama...`,showError:!0,showSuccess:e=>`${e.synced} modelos sincronizados`}),n=[...X.getState().models.filter(t=>(t.provider_id||t.providerId)!==e),...t.models||[]];return X.setState({models:n,availableModels:n.filter(e=>e.enabled||e.active)}),{synced:t.synced}}catch(e){throw console.error(`Failed to sync models:`,e),e}},createModel:async(e,t)=>{try{let n=await K(`/api/models`,{method:`POST`,body:{provider_id:e,name:t},showLoader:`Agregando modelo...`,showError:!0,showSuccess:`Modelo agregado`});if(n?.model){let e=[...X.getState().models,n.model];X.setState({models:e,availableModels:e.filter(e=>e.enabled||e.active)})}else{let e=await NR().fetchModels();X.setState(e)}}catch(e){throw console.error(`Failed to create model:`,e),e}},getModelsByProvider:e=>{let{models:t}=X.getState();return t.filter(t=>(t.providerId||t.provider_id)===e&&(t.enabled||t.active))},deleteModel:async e=>{try{await K(`/api/models/${encodeURIComponent(e)}`,{method:`DELETE`,showLoader:`Eliminando modelo...`,showError:!0,showSuccess:`Modelo eliminado`});let t=X.getState().models.filter(t=>t.id!==e);X.setState({models:t,availableModels:t.filter(e=>e.enabled||e.active)})}catch(e){throw console.error(`Failed to delete model:`,e),e}},updateModel:async(e,t)=>{try{let n=await K(`/api/models/${encodeURIComponent(e)}`,{method:`PUT`,body:t,showLoader:`Actualizando modelo...`,showError:!0,showSuccess:`Modelo actualizado`});if(n?.model){let t=X.getState().models.map(t=>t.id===e?{...t,...n.model}:t);X.setState({models:t,availableModels:t.filter(e=>e.enabled||e.active)})}}catch(e){throw console.error(`Failed to update model:`,e),e}}}),PR=()=>({agents:[],isLoading:!1,fetchAgents:async()=>{try{return{agents:(await K(`/api/agents`)).agents}}catch(e){return console.error(`Failed to fetch agents:`,e),{agents:[]}}},createAgent:async e=>{try{let t=await K(`/api/agents`,{method:`POST`,body:e,showLoader:`Creando agente...`,showError:!0,showSuccess:`Agente creado con éxito`}),{fetchAgents:n}=X.getState();return await n(),t.agent}catch(e){throw console.error(`Failed to create agent:`,e),e}},updateAgent:async(e,t)=>{try{await K(`/api/agents/${e}`,{method:`PUT`,body:t,showLoader:`Guardando cambios...`,showError:!0,showSuccess:`Perfil del agente sincronizado`});let{fetchAgents:n}=X.getState();await n()}catch(e){throw console.error(`Failed to update agent:`,e),e}},deleteAgent:async e=>{try{await K(`/api/agents/${e}`,{method:`DELETE`,showLoader:`Eliminando agente...`,showError:!0,showSuccess:`Agente eliminado`});let{fetchAgents:t}=X.getState();await t()}catch(e){throw console.error(`Failed to delete agent:`,e),e}}}),FR=()=>({tools:[],activeTools:[],fetchTools:async()=>{try{let e=(await K(`/api/tools`)).tools;return{tools:e,activeTools:e.filter(e=>e.active).map(e=>({id:e.id,name:e.name,description:e.description,category:e.category}))}}catch(e){return console.error(`Failed to fetch tools:`,e),{tools:[],activeTools:[]}}},toggleTool:async(e,t)=>{let n=X.getState(),r=n.tools,i=n.tools.map(n=>n.id===e?{...n,active:t}:n);X.setState({tools:i,activeTools:i.filter(e=>e.active).map(e=>({id:e.id,name:e.name,description:e.description,category:e.category}))});try{await K(`/api/tools/${e}/toggle`,{method:`POST`,body:{active:t}})}catch(e){throw X.setState({tools:r,activeTools:r.filter(e=>e.active).map(e=>({id:e.id,name:e.name,description:e.description,category:e.category}))}),console.error(`Failed to toggle tool:`,e),e}},updateTool:async(e,t)=>{try{await K(`/api/tools/${e}`,{method:`PUT`,body:t});let n=X.getState().tools.map(n=>n.id===e?{...n,...t}:n);X.setState({tools:n,activeTools:n.filter(e=>e.active).map(e=>({id:e.id,name:e.name,description:e.description,category:e.category}))})}catch(e){throw console.error(`Failed to update tool:`,e),e}}}),IR=()=>({skills:[],activeSkills:[],fetchSkills:async()=>{try{let e=(await K(`/api/skills`)).skills;return{skills:e,activeSkills:e.filter(e=>e.active)}}catch(e){return console.error(`Failed to fetch skills:`,e),{skills:[],activeSkills:[]}}},toggleSkill:async(e,t)=>{try{await K(`/api/skills/${e}/toggle`,{method:`POST`,body:{active:t}})}catch(e){throw console.error(`Failed to toggle skill:`,e),e}},updateSkill:async(e,t)=>{try{await K(`/api/skills/${e}`,{method:`PUT`,body:t})}catch(e){throw console.error(`Failed to update skill:`,e),e}}}),LR=()=>({servers:[],activeServers:[],fetchMCPServers:async()=>{try{let e=(await K(`/api/mcp/servers`)).map(e=>{let t=e.config||{};return{id:e.id||e.name,name:e.name,status:e.status,enabled:e.enabled,active:e.enabled&&e.status===`connected`,builtin:e.builtin||!1,transport:t.transport||`stdio`,command:t.command,args:t.args,url:t.url,tools_count:e.tools_count||0,tools:e.tools||[]}});return{servers:e,activeServers:e.filter(e=>e.active).map(e=>({id:e.id,name:e.name,transport:e.transport,status:e.status}))}}catch(e){return console.error(`Failed to fetch MCP servers:`,e),{servers:[],activeServers:[]}}},toggleMCPServer:async(e,t)=>{try{await K(`/api/mcp/servers/${e}`,{method:`POST`,body:{action:t?`connect`:`disconnect`},showLoader:t?`Conectando servidor...`:`Desconectando servidor...`,showError:!0,showSuccess:t?`Servidor conectado`:`Servidor desconectado`});let{fetchMCPServers:n}=X.getState();await n()}catch(e){throw console.error(`Failed to toggle MCP server:`,e),e}},updateMCPServer:async(e,t)=>{try{await K(`/api/mcp/servers/${e}`,{method:`PUT`,body:t,showLoader:`Guardando configuración...`,showError:!0,showSuccess:`Configuración guardada`});let{fetchMCPServers:n}=X.getState();await n()}catch(e){throw console.error(`Failed to update MCP server:`,e),e}},deleteMCPServer:async e=>{try{await K(`/api/mcp/servers/${e}`,{method:`DELETE`,showLoader:`Eliminando servidor...`,showError:!0,showSuccess:`Servidor eliminado`});let t=X.getState().servers.filter(t=>t.id!==e);X.setState({servers:t,activeServers:t.filter(e=>e.active).map(e=>({id:e.id,name:e.name,transport:e.transport,status:e.status}))})}catch(e){throw console.error(`Failed to delete MCP server:`,e),e}}}),RR=()=>({channels:[],activeChannels:[],fetchChannels:async()=>{try{let e=(await K(`/api/channels`)).channels;return{channels:e,activeChannels:e.filter(e=>e.active)}}catch(e){return console.error(`Failed to fetch channels:`,e),{channels:[],activeChannels:[]}}},createChannel:async(e,t)=>{let n=await K(`/api/channels`,{method:`POST`,body:{type:e,config:t||{}}});return{id:n.id,status:n.status}},reconnectChannel:async(e,t)=>{await K(`/api/channels/${e}/reconnect`,{method:`POST`,body:{config:t||{}}})},toggleChannel:async(e,t)=>{try{await K(`/api/channels/${e}/toggle`,{method:`POST`,body:{active:t}})}catch(e){throw console.error(`Failed to toggle channel:`,e),e}},updateChannel:async(e,t)=>{try{await K(`/api/channels/${e}`,{method:`PUT`,body:t});let{fetchChannels:n}=X.getState();await n()}catch(e){throw console.error(`Failed to update channel:`,e),e}}}),zR=()=>({voiceProviders:[],configuredVoiceProviders:{},fetchVoiceProviders:async()=>{try{return{voiceProviders:(await K(`/api/voice/providers`)).providers,configuredVoiceProviders:{}}}catch(e){return console.error(`Failed to fetch voice providers:`,e),{voiceProviders:[],configuredVoiceProviders:{}}}},fetchConfiguredVoiceProviders:async()=>{try{return{configuredVoiceProviders:await K(`/api/voice/configured-providers`)}}catch(e){return console.error(`Failed to fetch configured voice providers:`,e),{configuredVoiceProviders:{}}}},saveVoiceProviderKey:async(e,t)=>{try{await K(`/api/voice/providers/${e}/key`,{method:`POST`,body:{apiKey:t}});let n=await zR().fetchConfiguredVoiceProviders();X.setState(n)}catch(e){throw console.error(`Failed to save voice provider key:`,e),e}}}),X=Gh((e,t)=>({providers:[],activeProviders:[],models:[],availableModels:[],agents:[],tools:[],activeTools:[],skills:[],activeSkills:[],servers:[],activeServers:[],channels:[],activeChannels:[],voiceProviders:[],configuredVoiceProviders:{},isLoading:!1,isInitialized:!1,error:null,fetchAll:async()=>{if(t().isInitialized)return;let{showLoader:n,hideLoader:r}=(await Fu(async()=>{let{useLoaderStore:e}=await Promise.resolve().then(()=>Yte);return{useLoaderStore:e}},void 0)).useLoaderStore.getState();n(`Sincronizando la Colmena...`),e({isLoading:!0,error:null});try{let[t,n,i,a,o,s,c,l]=await Promise.all([MR().fetchProviders(),NR().fetchModels(),PR().fetchAgents(),FR().fetchTools(),IR().fetchSkills(),LR().fetchMCPServers(),RR().fetchChannels(),zR().fetchVoiceProviders()]),u=await zR().fetchConfiguredVoiceProviders();e({...t,...n,...i,...a,...o,...s,...c,...l,...u,isLoading:!1,isInitialized:!0}),r()}catch(t){r(),e({isLoading:!1,error:t instanceof Error?t.message:`Failed to fetch config`})}},refresh:async t=>{try{let n;switch(t){case`providers`:n=await MR().fetchProviders(),e(n);break;case`models`:n=await NR().fetchModels(),e(n);break;case`agents`:n=await PR().fetchAgents(),e(n);break;case`tools`:{let t=await FR().fetchTools();t&&e(t);break}case`skills`:n=await IR().fetchSkills(),e(n);break;case`mcp`:n=await LR().fetchMCPServers(),e(n);break;case`channels`:n=await RR().fetchChannels(),e(n);break}}catch(e){console.error(`Failed to refresh ${t}:`,e)}},fetchProviders:async()=>{e(await MR().fetchProviders())},toggleProvider:MR().toggleProvider,updateProvider:MR().updateProvider,fetchModels:async()=>{e(await NR().fetchModels())},toggleModel:NR().toggleModel,createModel:NR().createModel,syncModels:NR().syncModels,getModelsByProvider:NR().getModelsByProvider,deleteModel:NR().deleteModel,updateModel:NR().updateModel,fetchAgents:async()=>{e(await PR().fetchAgents())},createAgent:PR().createAgent,updateAgent:PR().updateAgent,deleteAgent:PR().deleteAgent,fetchTools:async()=>{let t=await FR().fetchTools();t&&e(t)},toggleTool:FR().toggleTool,updateTool:FR().updateTool,fetchSkills:async()=>{e(await IR().fetchSkills())},toggleSkill:IR().toggleSkill,updateSkill:IR().updateSkill,fetchMCPServers:async()=>{e(await LR().fetchMCPServers())},toggleMCPServer:LR().toggleMCPServer,updateMCPServer:LR().updateMCPServer,deleteMCPServer:LR().deleteMCPServer,fetchChannels:async()=>{e(await RR().fetchChannels())},createChannel:RR().createChannel,reconnectChannel:RR().reconnectChannel,toggleChannel:RR().toggleChannel,updateChannel:RR().updateChannel,fetchVoiceProviders:async()=>{let t=await zR().fetchVoiceProviders();return e(t),t},fetchConfiguredVoiceProviders:async()=>{let t=await zR().fetchConfiguredVoiceProviders();return e(t),t},saveVoiceProviderKey:async(t,n)=>{await K(`/api/voice/providers/${t}/key`,{method:`POST`,body:{apiKey:n}}),e(await zR().fetchConfiguredVoiceProviders())}}));function BR(e=!0){let t=X(e=>e.fetchAll),n=X(e=>e.isInitialized),r=_.useRef(!1);_.useEffect(()=>{e&&!n&&!r.current&&(r.current=!0,t())},[e,n,t])}function VR(){let e=X(e=>e.providers),t=X(e=>e.activeProviders),n=X(e=>e.models),r=X(e=>e.availableModels),i=X(e=>e.isLoading),a=X(e=>e.fetchProviders),o=X(e=>e.fetchModels),s=X(e=>e.toggleProvider),c=X(e=>e.updateProvider),l=X(e=>e.getModelsByProvider);return{providers:e,activeProviders:t,models:n,availableModels:r,isLoading:i,error:X(e=>e.error),fetchProviders:a,fetchModels:o,toggleProvider:s,updateProvider:c,getModelsByProvider:l}}function HR(){let e=X(e=>e.models),t=X(e=>e.availableModels),n=X(e=>e.isLoading),r=X(e=>e.fetchModels),i=X(e=>e.toggleModel),a=X(e=>e.createModel),o=X(e=>e.syncModels),s=X(e=>e.getModelsByProvider),c=X(e=>e.deleteModel),l=X(e=>e.updateModel);return{models:e,availableModels:t,isLoading:n,error:X(e=>e.error),fetchModels:r,toggleModel:i,createModel:a,syncModels:o,getModelsByProvider:s,deleteModel:c,updateModel:l}}function UR(){let e=X(e=>e.agents),t=X(e=>e.isLoading),n=X(e=>e.fetchAgents),r=X(e=>e.createAgent),i=X(e=>e.updateAgent),a=X(e=>e.deleteAgent);return{agents:e,isLoading:t,error:X(e=>e.error),fetchAgents:n,createAgent:r,updateAgent:i,deleteAgent:a}}function WR(){let e=X(e=>e.tools),t=X(e=>e.activeTools),n=X(e=>e.isLoading),r=X(e=>e.fetchTools),i=X(e=>e.toggleTool),a=X(e=>e.updateTool);return{tools:e,activeTools:t,isLoading:n,error:X(e=>e.error),fetchTools:r,toggleTool:i,updateTool:a}}function GR(){let e=X(e=>e.skills),t=X(e=>e.activeSkills),n=X(e=>e.isLoading),r=X(e=>e.fetchSkills),i=X(e=>e.toggleSkill),a=X(e=>e.updateSkill);return{skills:e,activeSkills:t,isLoading:n,error:X(e=>e.error),fetchSkills:r,toggleSkill:i,updateSkill:a}}function KR(){let e=X(e=>e.servers),t=X(e=>e.activeServers),n=X(e=>e.isLoading),r=X(e=>e.fetchMCPServers),i=X(e=>e.toggleMCPServer),a=X(e=>e.updateMCPServer),o=X(e=>e.deleteMCPServer);return{servers:e,activeServers:t,isLoading:n,error:X(e=>e.error),fetchMCPServers:r,toggleMCPServer:i,updateMCPServer:a,deleteMCPServer:o}}function qR(){let e=X(e=>e.channels),t=X(e=>e.activeChannels),n=X(e=>e.isLoading),r=X(e=>e.fetchChannels),i=X(e=>e.createChannel),a=X(e=>e.reconnectChannel),o=X(e=>e.toggleChannel);return{channels:e,activeChannels:t,isLoading:n,error:X(e=>e.error),fetchChannels:r,createChannel:i,reconnectChannel:a,toggleChannel:o,updateChannel:X(e=>e.updateChannel)}}function JR(){let e=X(e=>e.voiceProviders),t=X(e=>e.configuredVoiceProviders),n=X(e=>e.isLoading),r=X(e=>e.fetchVoiceProviders),i=X(e=>e.fetchConfiguredVoiceProviders),a=X(e=>e.saveVoiceProviderKey);return{voiceProviders:e,configuredVoiceProviders:t,isLoading:n,error:X(e=>e.error),fetchVoiceProviders:r,fetchConfiguredVoiceProviders:i,saveVoiceProviderKey:a}}function YR(){let{agents:e,isLoading:t,error:n,fetchAgents:r,createAgent:i,updateAgent:a,deleteAgent:o}=UR(),[s,c]=(0,_.useState)(`all`);return(0,_.useEffect)(()=>{r()},[r]),{agents:(0,_.useMemo)(()=>Array.isArray(e)?s===`all`?e:e.filter(e=>e.status===s):[],[e,s]),allAgents:e||[],filter:s,setFilter:c,createAgent:i,updateAgent:a,deleteAgent:o,isLoading:t,error:n,refreshAgents:r}}var XR=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(`div`,{ref:n,className:H(`rounded-lg border bg-card text-card-foreground shadow-sm`,e),...t}));XR.displayName=`Card`;var ZR=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(`div`,{ref:n,className:H(`flex flex-col space-y-1.5 p-6`,e),...t}));ZR.displayName=`CardHeader`;var QR=_.forwardRef(({className:e,children:t,...n},r)=>(0,I.jsx)(`h3`,{ref:r,className:H(`text-2xl font-semibold leading-none tracking-tight`,e),...n,children:t}));QR.displayName=`CardTitle`;var $R=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(`p`,{ref:n,className:H(`text-sm text-muted-foreground`,e),...t}));$R.displayName=`CardDescription`;var ez=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(`div`,{ref:n,className:H(`p-6 pt-0`,e),...t}));ez.displayName=`CardContent`;var tz=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(`div`,{ref:n,className:H(`flex items-center p-6 pt-0`,e),...t}));tz.displayName=`CardFooter`;function nz(e){return e<50?`#22c55e`:e<80?`#eab308`:`#ef4444`}function rz(){let[e,t]=(0,_.useState)(()=>{let e=new Date;return Array.from({length:12},(t,n)=>({time:new Date(e.getTime()-(11-n)*5e3).toLocaleTimeString(`es`,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`}),msgs:0,rss:0}))}),[n,r]=(0,_.useState)([]),{data:i}=Au({queryKey:[`system-stats`],queryFn:()=>K(`/api/system-stats`),refetchInterval:5e3}),a=(0,_.useRef)(i);(0,_.useEffect)(()=>{a.current=i},[i]),(0,_.useEffect)(()=>{let e=setInterval(()=>{let e=a.current;if(!e)return;let n=new Date().toLocaleTimeString(`es`,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`});t(t=>[...t,{time:n,msgs:e.recentMessages,rss:e.memory.rss}].slice(-20))},5e3);return()=>clearInterval(e)},[]);let o=i?.memory.rss??0,s=i?.memory.heapUsed??0,c=i?.memory.external??0,l=i?.recentMessages??0;return(0,I.jsxs)(`div`,{className:`flex flex-col gap-4 mb-4`,children:[(0,I.jsxs)(XR,{className:`overflow-hidden border-primary/10`,children:[(0,I.jsx)(ZR,{className:`pb-2 bg-gradient-to-r from-primary/5 to-transparent`,children:(0,I.jsx)(`div`,{className:`flex items-center justify-between`,children:(0,I.jsxs)(QR,{className:`text-base flex items-center gap-2`,children:[(0,I.jsx)(Pn,{className:`h-4 w-4 text-primary`}),`Monitor del Proceso Hive`]})})}),(0,I.jsxs)(ez,{className:`grid gap-4 sm:grid-cols-2 lg:grid-cols-4 pt-4`,children:[(0,I.jsx)(iz,{icon:tr,label:`Actividad reciente`,value:`${l}`,subValue:`mensajes últimos 5 min`,color:l>0?`#22c55e`:`hsl(var(--muted-foreground))`,progress:Math.min(100,l*10)}),(0,I.jsx)(iz,{icon:zn,label:`Memoria Hive (RSS)`,value:`${o} MB`,subValue:`Heap JS: ${s} MB usados`,color:nz(Math.min(100,Math.round(o/1024*100))),progress:Math.min(100,Math.round(o/1024*100))}),(0,I.jsx)(iz,{icon:$n,label:`Heap JS`,value:`${s} MB`,subValue:`External: ${c} MB`,color:`#3b82f6`,progress:Math.min(100,Math.round(s/512*100))}),(0,I.jsx)(iz,{icon:yr,label:`Sesiones WS activas`,value:`${i?.connections??0}`,subValue:`conexiones WebSocket`,color:`#a855f7`,progress:Math.min(100,(i?.connections??0)*10)})]})]}),(0,I.jsxs)(XR,{className:`border-primary/10`,children:[(0,I.jsx)(ZR,{className:`pb-2`,children:(0,I.jsxs)(QR,{className:`text-sm flex items-center gap-2`,children:[(0,I.jsx)(Kt,{className:`h-4 w-4 text-primary`}),`Historial — `,(0,I.jsx)(`span`,{className:`text-green-400`,children:`Mensajes`}),` · `,(0,I.jsx)(`span`,{className:`text-purple-400`,children:`RSS MB`})]})}),(0,I.jsx)(ez,{className:`h-[160px]`,children:(0,I.jsx)(TS,{width:`100%`,height:`100%`,children:(0,I.jsxs)(jR,{data:e,children:[(0,I.jsxs)(`defs`,{children:[(0,I.jsxs)(`linearGradient`,{id:`gMsgs`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,I.jsx)(`stop`,{offset:`5%`,stopColor:`#22c55e`,stopOpacity:.3}),(0,I.jsx)(`stop`,{offset:`95%`,stopColor:`#22c55e`,stopOpacity:0})]}),(0,I.jsxs)(`linearGradient`,{id:`gHeap`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,I.jsx)(`stop`,{offset:`5%`,stopColor:`#8b5cf6`,stopOpacity:.3}),(0,I.jsx)(`stop`,{offset:`95%`,stopColor:`#8b5cf6`,stopOpacity:0})]})]}),(0,I.jsx)(xL,{dataKey:`time`,axisLine:!1,tickLine:!1,tick:{fill:`hsl(var(--muted-foreground))`,fontSize:9},interval:`preserveStartEnd`}),(0,I.jsx)(AL,{axisLine:!1,tickLine:!1,tick:{fill:`hsl(var(--muted-foreground))`,fontSize:9}}),(0,I.jsx)(fL,{type:`monotone`,dataKey:`msgs`,stroke:`#22c55e`,strokeWidth:2,fillOpacity:1,fill:`url(#gMsgs)`,name:`Mensajes`}),(0,I.jsx)(fL,{type:`monotone`,dataKey:`rss`,stroke:`#8b5cf6`,strokeWidth:2,fillOpacity:1,fill:`url(#gHeap)`,name:`RSS MB`})]})})})]})]})}function iz({icon:e,label:t,value:n,subValue:r,color:i,progress:a}){return(0,I.jsxs)(`div`,{className:`rounded-lg border bg-card/50 p-3 space-y-2`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`span`,{style:{color:i},children:(0,I.jsx)(e,{className:`h-4 w-4`})}),(0,I.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:t})]}),(0,I.jsx)(`span`,{className:`text-lg font-bold font-mono`,style:{color:i},children:n})]}),(0,I.jsxs)(`div`,{className:`space-y-1`,children:[(0,I.jsx)(`div`,{className:`h-1.5 w-full rounded-full bg-muted overflow-hidden`,children:(0,I.jsx)(`div`,{className:`h-full rounded-full transition-all duration-500`,style:{width:`${Math.min(a,100)}%`,backgroundColor:i}})}),(0,I.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:r})]})]})}var az={anthropic:`#d97706`,openai:`#10b981`,google:`#3b82f6`,gemini:`#3b82f6`,deepseek:`#8b5cf6`,kimi:`#ec4899`,ollama:`#14b8a6`,openrouter:`#f59e0b`,mistral:`#6366f1`};function oz(e){return e>=1e6?(e/1e6).toFixed(2)+`M`:e>=1e3?(e/1e3).toFixed(1)+`K`:e.toString()}function sz(e){return e>=1?`$`+e.toFixed(2):e>=.01?`$`+e.toFixed(3):e>0?`$`+e.toFixed(5):`$0.00`}function cz(e){return e>=10?e.toFixed(1)+`%`:e>=1?e.toFixed(2)+`%`:e>0?e.toFixed(3)+`%`:`0%`}function lz(){let[e,t]=(0,_.useState)(24),{data:n,isLoading:r}=Au({queryKey:[`usage-stats`,e],queryFn:async()=>{let t=await K(`/api/usage-stats?hours=${e}`);return console.log(`[UsageStatsPanel] Received stats:`,{totalTokens:t.totalTokens,totalCostUsd:t.totalCostUsd,providers:Object.keys(t.byProvider||{}).length}),t},refetchInterval:6e4});if(r&&!n)return(0,I.jsxs)(XR,{className:`border-primary/10`,children:[(0,I.jsx)(ZR,{children:(0,I.jsxs)(QR,{className:`flex items-center gap-2`,children:[(0,I.jsx)(xn,{className:`h-5 w-5 text-primary`}),`Uso y Costos de API`]})}),(0,I.jsx)(ez,{children:(0,I.jsx)(`div`,{className:`h-40 flex items-center justify-center text-muted-foreground animate-pulse`,children:`Cargando estadísticas de uso...`})})]});let i=n&&(n.totalTokens>0||n.totalCostUsd>0),a=n?Object.entries(n.byProvider).map(([e,t])=>({name:e.charAt(0).toUpperCase()+e.slice(1),value:t.tokens,cost:t.costUsd,color:az[e.toLowerCase()]||`#6b7280`})):[],o=n?Object.entries(n.byModel).slice(0,8).map(([e,t])=>({name:e.length>20?e.slice(0,18)+`...`:e,tokens:t.tokens,cost:t.costUsd,fullName:e})):[];return(0,I.jsxs)(XR,{className:`border-primary/10`,children:[(0,I.jsx)(ZR,{className:`pb-2`,children:(0,I.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsxs)(QR,{className:`text-base flex items-center gap-2`,children:[(0,I.jsx)(xn,{className:`h-5 w-5 text-primary`}),`Uso y Costos de API`]}),(0,I.jsx)($R,{children:`Tokens consumidos y costos por provider/modelo`})]}),(0,I.jsx)(`div`,{className:`flex gap-1`,children:[6,24,168].map(n=>(0,I.jsx)(`button`,{onClick:()=>t(n),className:`px-2 py-1 text-xs rounded-md transition-colors ${e===n?`bg-primary text-primary-foreground`:`bg-muted hover:bg-muted/80`}`,children:n===6?`6h`:n===24?`24h`:`7d`},n))})]})}),(0,I.jsxs)(ez,{className:`space-y-4`,children:[(0,I.jsxs)(`div`,{className:`rounded-lg border p-3 ${n?.toonSavedTokens?`border-emerald-500/30 bg-emerald-500/5`:`bg-card/50`}`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,I.jsx)(Vr,{className:`h-3 w-3 ${n?.toonSavedTokens?`text-emerald-400`:``}`}),(0,I.jsx)(`span`,{className:`font-medium`,children:`TOON Optimización de Tokens`})]}),n?.toonSavingsPercent&&n.toonSavingsPercent>0?(0,I.jsxs)(`span`,{className:`text-xs font-bold text-emerald-400`,children:[cz(n.toonSavingsPercent),` reducción`]}):null]}),(0,I.jsxs)(`div`,{className:`mt-3 grid grid-cols-2 md:grid-cols-4 gap-3`,children:[(0,I.jsxs)(`div`,{className:`bg-emerald-500/5 rounded-md p-2`,children:[(0,I.jsx)(`div`,{className:`text-xs text-muted-foreground mb-1`,children:`Tokens Ahorrados`}),(0,I.jsx)(`div`,{className:`text-lg font-bold ${n?.toonSavedTokens?`text-emerald-400`:`text-muted-foreground`}`,children:n?oz(n.toonSavedTokens):`—`})]}),(0,I.jsxs)(`div`,{className:`bg-emerald-500/5 rounded-md p-2`,children:[(0,I.jsx)(`div`,{className:`text-xs text-muted-foreground mb-1`,children:`Costo Ahorrado`}),(0,I.jsx)(`div`,{className:`text-lg font-bold text-emerald-400`,children:n?sz(n.toonSavedCost):`—`})]}),(0,I.jsxs)(`div`,{className:`bg-emerald-500/5 rounded-md p-2`,children:[(0,I.jsx)(`div`,{className:`text-xs text-muted-foreground mb-1`,children:`Bytes Ahorrados`}),(0,I.jsx)(`div`,{className:`text-lg font-bold text-emerald-400`,children:n&&n.toonSavedBytes>0?oz(n.toonSavedBytes):`—`})]}),(0,I.jsxs)(`div`,{className:`bg-emerald-500/5 rounded-md p-2`,children:[(0,I.jsx)(`div`,{className:`text-xs text-muted-foreground mb-1`,children:`Reducción Bytes`}),(0,I.jsx)(`div`,{className:`text-lg font-bold text-emerald-400`,children:n?.toonSavedBytesPercent&&n.toonSavedBytesPercent>0?cz(n.toonSavedBytesPercent):`—`})]})]}),n&&(n.toonJsonTokens>0||n.toonToonTokens>0)&&(0,I.jsx)(`div`,{className:`mt-3 pt-3 border-t border-emerald-500/20`,children:(0,I.jsxs)(`div`,{className:`flex items-center justify-between text-xs`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,I.jsxs)(`span`,{className:`text-muted-foreground`,children:[(0,I.jsx)(`span`,{className:`text-muted-foreground`,children:`JSON:`}),` `,(0,I.jsx)(`span`,{className:`font-medium`,children:n.toonJsonTokens>0?oz(n.toonJsonTokens):`—`}),` `,(0,I.jsx)(`span`,{className:`text-muted-foreground`,children:`tokens`})]}),(0,I.jsx)(`span`,{className:`text-muted-foreground`,children:`→`}),(0,I.jsxs)(`span`,{className:`text-muted-foreground`,children:[(0,I.jsx)(`span`,{className:`text-emerald-400`,children:`TOON:`}),` `,(0,I.jsx)(`span`,{className:`font-medium text-emerald-400`,children:n.toonToonTokens>0?oz(n.toonToonTokens):`—`}),` `,(0,I.jsx)(`span`,{className:`text-muted-foreground`,children:`tokens`})]})]}),n?.toonSavingsPercent&&n.toonSavingsPercent>0?(0,I.jsxs)(`span`,{className:`text-xs font-bold text-emerald-400`,children:[cz(n.toonSavingsPercent),` menos tokens`]}):null]})}),n&&!n.toonSavedTokens&&(0,I.jsx)(`div`,{className:`mt-2 text-xs text-muted-foreground italic`,children:`Sin optimizaciones TOON registradas aún`})]}),i?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2 lg:grid-cols-4`,children:[(0,I.jsxs)(`div`,{className:`rounded-lg border bg-card/50 p-3`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted-foreground mb-1`,children:[(0,I.jsx)(xn,{className:`h-3 w-3`}),`Costo Total`]}),(0,I.jsx)(`div`,{className:`text-2xl font-bold text-green-500`,children:sz(n.totalCostUsd)})]}),(0,I.jsxs)(`div`,{className:`rounded-lg border bg-card/50 p-3`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted-foreground mb-1`,children:[(0,I.jsx)(Bn,{className:`h-3 w-3`}),`Total Tokens`]}),(0,I.jsx)(`div`,{className:`text-2xl font-bold`,children:oz(n.totalTokens)})]}),(0,I.jsxs)(`div`,{className:`rounded-lg border bg-card/50 p-3`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted-foreground mb-1`,children:[(0,I.jsx)(Mr,{className:`h-3 w-3`}),`Input / Output`]}),(0,I.jsxs)(`div`,{className:`text-lg font-semibold`,children:[(0,I.jsx)(`span`,{className:`text-blue-500`,children:oz(n.totalInputTokens)}),(0,I.jsx)(`span`,{className:`text-muted-foreground`,children:` / `}),(0,I.jsx)(`span`,{className:`text-purple-500`,children:oz(n.totalOutputTokens)})]})]}),(0,I.jsxs)(`div`,{className:`rounded-lg border bg-card/50 p-3`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted-foreground mb-1`,children:[(0,I.jsx)(yr,{className:`h-3 w-3`}),`Providers`]}),(0,I.jsx)(`div`,{className:`text-2xl font-bold`,children:Object.keys(n.byProvider).length})]})]}),(0,I.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-2`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsxs)(`h4`,{className:`text-sm font-medium mb-2 flex items-center gap-2`,children:[(0,I.jsx)(yr,{className:`h-4 w-4 text-muted-foreground`}),`Por Provider`]}),(0,I.jsx)(`div`,{className:`h-[180px]`,children:(0,I.jsx)(TS,{width:`100%`,height:`100%`,children:(0,I.jsxs)(kR,{data:a,layout:`vertical`,children:[(0,I.jsx)(xL,{type:`number`,hide:!0}),(0,I.jsx)(AL,{type:`category`,dataKey:`name`,axisLine:!1,tickLine:!1,tick:{fill:`hsl(var(--muted-foreground))`,fontSize:11},width:70}),(0,I.jsx)(vS,{contentStyle:{backgroundColor:`hsl(var(--card))`,border:`1px solid hsl(var(--border))`,borderRadius:`8px`},formatter:(e,t)=>[t===`cost`?sz(e):oz(e),t===`cost`?`Costo`:`Tokens`]}),(0,I.jsx)(uF,{dataKey:`value`,radius:[0,4,4,0],barSize:16,children:a.map(e=>(0,I.jsx)(ES,{fill:e.color},e.name))})]})})})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsxs)(`h4`,{className:`text-sm font-medium mb-2 flex items-center gap-2`,children:[(0,I.jsx)(Zt,{className:`h-4 w-4 text-muted-foreground`}),`Por Modelo (Top 8)`]}),(0,I.jsx)(`div`,{className:`h-[180px]`,children:(0,I.jsx)(TS,{width:`100%`,height:`100%`,children:(0,I.jsxs)(kR,{data:o,children:[(0,I.jsx)(xL,{dataKey:`name`,axisLine:!1,tickLine:!1,tick:{fill:`hsl(var(--muted-foreground))`,fontSize:10},angle:-45,textAnchor:`end`,height:60}),(0,I.jsx)(AL,{axisLine:!1,tickLine:!1,tick:{fill:`hsl(var(--muted-foreground))`,fontSize:10}}),(0,I.jsx)(vS,{contentStyle:{backgroundColor:`hsl(var(--card))`,border:`1px solid hsl(var(--border))`,borderRadius:`8px`},formatter:e=>sz(e),labelFormatter:e=>o.find(t=>t.name===e)?.fullName||e}),(0,I.jsx)(uF,{dataKey:`cost`,radius:[4,4,0,0],children:o.map(e=>(0,I.jsx)(ES,{fill:az[e.fullName.split(`-`)[0]?.toLowerCase()]||`#6b7280`},e.fullName))})]})})})]})]}),a.length>0&&(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h4`,{className:`text-sm font-medium mb-2`,children:`Detalle por Provider`}),(0,I.jsx)(`div`,{className:`rounded-lg border overflow-hidden`,children:(0,I.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,I.jsx)(`thead`,{className:`bg-muted/50`,children:(0,I.jsxs)(`tr`,{children:[(0,I.jsx)(`th`,{className:`text-left p-2 font-medium`,children:`Provider`}),(0,I.jsx)(`th`,{className:`text-right p-2 font-medium`,children:`Input`}),(0,I.jsx)(`th`,{className:`text-right p-2 font-medium`,children:`Output`}),(0,I.jsx)(`th`,{className:`text-right p-2 font-medium`,children:`Total`}),(0,I.jsx)(`th`,{className:`text-right p-2 font-medium`,children:`Costo`})]})}),(0,I.jsx)(`tbody`,{children:Object.entries(n.byProvider).map(([e,t])=>(0,I.jsxs)(`tr`,{className:`border-t`,children:[(0,I.jsx)(`td`,{className:`p-2 font-medium`,children:e}),(0,I.jsx)(`td`,{className:`p-2 text-right text-blue-500`,children:oz(t.inputTokens)}),(0,I.jsx)(`td`,{className:`p-2 text-right text-purple-500`,children:oz(t.outputTokens)}),(0,I.jsx)(`td`,{className:`p-2 text-right`,children:oz(t.tokens)}),(0,I.jsx)(`td`,{className:`p-2 text-right font-medium text-green-500`,children:sz(t.costUsd)})]},e))})]})})]})]}):(0,I.jsx)(`div`,{className:`h-32 flex items-center justify-center text-muted-foreground`,children:(0,I.jsxs)(`div`,{className:`text-center`,children:[(0,I.jsx)(Kt,{className:`h-8 w-8 mx-auto mb-2 opacity-50`}),(0,I.jsx)(`p`,{children:`No hay datos de uso aún`}),(0,I.jsx)(`p`,{className:`text-xs`,children:`Los tokens se registrarán automáticamente`})]})})]})]})}var uz=`AlertDialog`,[dz,ufe]=R(uz,[dm]),fz=dm(),pz=e=>{let{__scopeAlertDialog:t,...n}=e,r=fz(t);return(0,I.jsx)(Um,{...r,...n,modal:!0})};pz.displayName=uz;var mz=`AlertDialogTrigger`,hz=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=fz(n);return(0,I.jsx)(Wm,{...i,...r,ref:t})});hz.displayName=mz;var gz=`AlertDialogPortal`,_z=e=>{let{__scopeAlertDialog:t,...n}=e,r=fz(t);return(0,I.jsx)(Gm,{...r,...n})};_z.displayName=gz;var vz=`AlertDialogOverlay`,yz=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=fz(n);return(0,I.jsx)(Km,{...i,...r,ref:t})});yz.displayName=vz;var bz=`AlertDialogContent`,[xz,Sz]=dz(bz),Cz=ie(`AlertDialogContent`),wz=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,children:r,...i}=e,a=fz(n),o=_.useRef(null),s=P(t,o),c=_.useRef(null);return(0,I.jsx)(Rm,{contentName:bz,titleName:Tz,docsSlug:`alert-dialog`,children:(0,I.jsx)(xz,{scope:n,cancelRef:c,children:(0,I.jsxs)(qm,{role:`alertdialog`,...a,...i,ref:s,onOpenAutoFocus:j(i.onOpenAutoFocus,e=>{e.preventDefault(),c.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[(0,I.jsx)(Cz,{children:r}),(0,I.jsx)(Nz,{contentRef:o})]})})})});wz.displayName=bz;var Tz=`AlertDialogTitle`,Ez=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=fz(n);return(0,I.jsx)(Jm,{...i,...r,ref:t})});Ez.displayName=Tz;var Dz=`AlertDialogDescription`,Oz=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=fz(n);return(0,I.jsx)(Ym,{...i,...r,ref:t})});Oz.displayName=Dz;var kz=`AlertDialogAction`,Az=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=fz(n);return(0,I.jsx)(Xm,{...i,...r,ref:t})});Az.displayName=kz;var jz=`AlertDialogCancel`,Mz=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=Sz(jz,n),a=fz(n),o=P(t,i);return(0,I.jsx)(Xm,{...a,...r,ref:o})});Mz.displayName=jz;var Nz=({contentRef:e})=>{let t=`\`${bz}\` requires a description for the component to be accessible for screen reader users.
182
-
183
- You can add a description to the \`${bz}\` by passing a \`${Dz}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
184
-
185
- Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${bz}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
186
-
187
- For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return _.useEffect(()=>{document.getElementById(e.current?.getAttribute(`aria-describedby`))||console.warn(t)},[t,e]),null},Pz=pz,Fz=_z,Iz=yz,Lz=wz,Rz=Az,zz=Mz,Bz=Ez,Vz=Oz,Hz=Pz,Uz=Fz,Wz=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(Iz,{className:H(`fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),...t,ref:n}));Wz.displayName=Iz.displayName;var Gz=_.forwardRef(({className:e,...t},n)=>(0,I.jsxs)(Uz,{children:[(0,I.jsx)(Wz,{}),(0,I.jsx)(Lz,{ref:n,className:H(`fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg`,e),...t})]}));Gz.displayName=Lz.displayName;var Kz=({className:e,...t})=>(0,I.jsx)(`div`,{className:H(`flex flex-col space-y-2 text-center sm:text-left`,e),...t});Kz.displayName=`AlertDialogHeader`;var qz=({className:e,...t})=>(0,I.jsx)(`div`,{className:H(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,e),...t});qz.displayName=`AlertDialogFooter`;var Jz=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(Bz,{ref:n,className:H(`text-lg font-semibold`,e),...t}));Jz.displayName=Bz.displayName;var Yz=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(Vz,{ref:n,className:H(`text-sm text-muted-foreground`,e),...t}));Yz.displayName=Vz.displayName;var Xz=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(Rz,{ref:n,className:H(lp(),e),...t}));Xz.displayName=Rz.displayName;var Zz=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(zz,{ref:n,className:H(lp({variant:`outline`}),`mt-2 sm:mt-0`,e),...t}));Zz.displayName=zz.displayName;var Qz=Vt(`inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2`,{variants:{variant:{default:`border-transparent bg-primary text-primary-foreground hover:bg-primary/80`,secondary:`border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80`,destructive:`border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80`,outline:`text-foreground`}},defaultVariants:{variant:`default`}});function $z({className:e,variant:t,...n}){return(0,I.jsx)(`div`,{className:H(Qz({variant:t}),e),...n})}function eB(e,t=[]){let n=[];function r(t,r){let i=_.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=_.useMemo(()=>o,Object.values(o));return(0,I.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=_.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>_.createContext(e));return function(n){let r=n?.[e]||t;return _.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,tB(i,...t)]}function tB(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return _.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var nB=`Progress`,rB=100,[iB,dfe]=eB(nB),[aB,oB]=iB(nB),sB=_.forwardRef((e,t)=>{let{__scopeProgress:n,value:r=null,max:i,getValueLabel:a=uB,...o}=e;(i||i===0)&&!pB(i)&&console.error(hB(`${i}`,`Progress`));let s=pB(i)?i:rB;r!==null&&!mB(r,s)&&console.error(gB(`${r}`,`Progress`));let c=mB(r,s)?r:null,l=fB(c)?a(c,s):void 0;return(0,I.jsx)(aB,{scope:n,value:c,max:s,children:(0,I.jsx)(up.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":fB(c)?c:void 0,"aria-valuetext":l,role:`progressbar`,"data-state":dB(c,s),"data-value":c??void 0,"data-max":s,...o,ref:t})})});sB.displayName=nB;var cB=`ProgressIndicator`,lB=_.forwardRef((e,t)=>{let{__scopeProgress:n,...r}=e,i=oB(cB,n);return(0,I.jsx)(up.div,{"data-state":dB(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})});lB.displayName=cB;function uB(e,t){return`${Math.round(e/t*100)}%`}function dB(e,t){return e==null?`indeterminate`:e===t?`complete`:`loading`}function fB(e){return typeof e==`number`}function pB(e){return fB(e)&&!isNaN(e)&&e>0}function mB(e,t){return fB(e)&&!isNaN(e)&&e<=t&&e>=0}function hB(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${rB}\`.`}function gB(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
188
- - a positive number
189
- - less than the value passed to \`max\` (or ${rB} if no \`max\` prop is set)
190
- - \`null\` or \`undefined\` if the progress is indeterminate.
191
-
192
- Defaulting to \`null\`.`}var _B=sB,vB=lB,yB=_.forwardRef(({className:e,value:t,...n},r)=>(0,I.jsx)(_B,{ref:r,className:H(`relative h-4 w-full overflow-hidden rounded-full bg-secondary`,e),...n,children:(0,I.jsx)(vB,{className:`h-full w-full flex-1 bg-primary transition-all`,style:{transform:`translateX(-${100-(t||0)}%)`}})}));yB.displayName=_B.displayName;function bB(){let[e,t]=(0,_.useState)(!1),[n,r]=(0,_.useState)(0),[i,a]=(0,_.useState)([]),o=hu(),{data:s,isLoading:c}=Au({queryKey:[`version-check`],queryFn:()=>K(`/api/version`),refetchInterval:3e5,retry:2}),l=ju({mutationFn:()=>K(`/api/update`,{method:`POST`,showLoader:`Actualizando Hive...`}),onSuccess:e=>{r(100),e.success?(a(e.instructions||[]),yg.fire({title:`¡Actualización Completada!`,text:e.message||`Hive ha sido actualizado exitosamente.`,icon:`success`,confirmButtonText:`Continuar`})):(e.instructions&&a(e.instructions),yg.fire({title:`Información de Actualización`,html:`
193
- <div class="text-left space-y-2">
194
- ${e.error?`<p class="mb-2">${e.error}</p>`:``}
195
- ${e.output?`<pre class="bg-muted p-2 rounded text-xs overflow-auto max-h-40">${e.output}</pre>`:``}
196
- </div>
197
- `,icon:e.instructions?`info`:`error`,confirmButtonText:`Entendido`})),setTimeout(()=>{o.invalidateQueries({queryKey:[`version-check`]})},2e3)},onError:e=>{r(0),console.error(`[UpdateChecker] Error:`,e)}}),u=()=>{t(!0)},d=()=>{t(!1),r(10),l.mutate();let e=setInterval(()=>{r(t=>t>=90?(clearInterval(e),t):t+10)},500)},f=e=>{switch(e){case`docker`:return`Docker`;case`binary`:return`Binario`;case`npm`:return`npm`;case`bun`:return`Bun`;default:return`Desconocida`}},p=()=>{if(!s)return null;switch(s.status){case`up-to-date`:return(0,I.jsxs)($z,{variant:`outline`,className:`flex items-center gap-1 bg-green-500/10 text-green-400 border-green-500/20`,children:[(0,I.jsx)(dn,{className:`h-3 w-3`}),`Actualizado`]});case`update-available`:return(0,I.jsxs)($z,{className:`flex items-center gap-1 bg-blue-500 text-white border-blue-400 hover:bg-blue-600`,children:[(0,I.jsx)(un,{className:`h-3 w-3`}),`v`,s.latest,` disponible`]});case`checking`:return(0,I.jsxs)($z,{variant:`outline`,className:`flex items-center gap-1`,children:[(0,I.jsx)(Xn,{className:`h-3 w-3 animate-spin`}),`Verificando...`]});case`error`:return(0,I.jsxs)($z,{variant:`destructive`,className:`flex items-center gap-1`,children:[(0,I.jsx)(Nr,{className:`h-3 w-3`}),`Error`]})}},m=s?.status===`update-available`;return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`flex flex-col items-end gap-1`,children:[(0,I.jsx)(`span`,{className:`hive-label mb-1`,children:`Versión`}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[p(),s&&(0,I.jsxs)(`span`,{className:`text-xs text-white/40 font-mono`,children:[`v`,s.current,` · `,f(s.installationType)]})]})]}),m&&(0,I.jsx)(W,{size:`sm`,onClick:u,disabled:l.isPending,className:`bg-blue-600 hover:bg-blue-700 text-white shadow-lg shadow-blue-500/20`,children:l.isPending?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Xn,{className:`h-4 w-4 mr-2 animate-spin`}),`Actualizando...`]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Cn,{className:`h-4 w-4 mr-2`}),`Actualizar a v`,s.latest]})}),(0,I.jsx)(Hz,{open:e,onOpenChange:t,children:(0,I.jsxs)(Gz,{children:[(0,I.jsxs)(Kz,{children:[(0,I.jsxs)(Jz,{className:`flex items-center gap-2`,children:[(0,I.jsx)(Cn,{className:`h-5 w-5 text-blue-500`}),`Actualizar Hive`]}),(0,I.jsxs)(Yz,{className:`space-y-3`,children:[(0,I.jsxs)(`p`,{children:[`Se ha detectado una nueva versión disponible (`,(0,I.jsxs)(`strong`,{children:[`v`,s?.latest]}),`). Tu versión actual es `,(0,I.jsxs)(`strong`,{children:[`v`,s?.current]}),`.`]}),(0,I.jsx)(`div`,{className:`bg-muted p-3 rounded-lg space-y-2`,children:(0,I.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,I.jsx)(Un,{className:`h-4 w-4 text-blue-500 mt-0.5`}),(0,I.jsxs)(`div`,{className:`text-sm`,children:[(0,I.jsxs)(`p`,{className:`font-semibold mb-1`,children:[`Tipo de instalación: `,f(s?.installationType)]}),s?.installationType===`docker`&&(0,I.jsx)(`p`,{className:`text-muted-foreground`,children:`Para Docker, deberás ejecutar manualmente los comandos en tu terminal.`}),s?.installationType===`binary`&&(0,I.jsx)(`p`,{className:`text-muted-foreground`,children:`Para el binario, serás redirigido a GitHub Releases para descargar la nueva versión.`}),(s?.installationType===`npm`||s?.installationType===`bun`)&&(0,I.jsx)(`p`,{className:`text-muted-foreground`,children:`La actualización se realizará automáticamente. Deberás reiniciar el gateway después.`})]})]})}),l.isPending&&(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between text-sm`,children:[(0,I.jsx)(`span`,{children:`Progreso de actualización...`}),(0,I.jsxs)(`span`,{className:`text-muted-foreground`,children:[n,`%`]})]}),(0,I.jsx)(yB,{value:n,className:`h-2`})]})]})]}),(0,I.jsxs)(qz,{children:[(0,I.jsx)(Zz,{disabled:l.isPending,children:`Cancelar`}),(0,I.jsx)(Xz,{onClick:d,disabled:l.isPending,className:`bg-blue-600 hover:bg-blue-700`,children:l.isPending?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Xn,{className:`h-4 w-4 mr-2 animate-spin`}),`Actualizando...`]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Cn,{className:`h-4 w-4 mr-2`}),`Confirmar actualización`]})})]})]})}),i.length>0&&(0,I.jsx)(Hz,{open:!0,onOpenChange:()=>a([]),children:(0,I.jsxs)(Gz,{children:[(0,I.jsxs)(Kz,{children:[(0,I.jsx)(Jz,{children:`Instrucciones de Actualización`}),(0,I.jsxs)(Yz,{className:`space-y-3`,children:[(0,I.jsx)(`p`,{children:`Sigue estos pasos para completar la actualización:`}),(0,I.jsx)(`ol`,{className:`list-decimal list-inside space-y-2 bg-muted p-4 rounded-lg`,children:i.map((e,t)=>(0,I.jsx)(`li`,{className:`text-sm`,children:e},t))}),(0,I.jsxs)(`div`,{className:`flex items-start gap-2 text-xs text-muted-foreground`,children:[(0,I.jsx)(Dn,{className:`h-4 w-4 mt-0.5`}),(0,I.jsx)(`p`,{children:`Después de completar los pasos, recarga esta página para ver la nueva versión.`})]})]})]}),(0,I.jsx)(qz,{children:(0,I.jsx)(Xz,{children:`Entendido`})})]})})]})}function xB({icon:e,...t}){return(0,I.jsx)(e,{...t})}function SB(){let{status:e}=tg(),{allAgents:t}=YR(),{data:n}=Au({queryKey:[`system-stats`],queryFn:()=>K(`/api/system-stats`),refetchInterval:5e3}),{data:r=[]}=Au({queryKey:[`activity-stats`],queryFn:()=>K(`/api/activity-stats?hours=12`),refetchInterval:6e4}),i=(0,_.useMemo)(()=>t||[],[t]),a=[{label:`Agentes Activos`,value:i.length,icon:Zt,color:`text-blue-500`,trend:`${i.filter(e=>e.status===`active`||e.status===`thinking`).length} en uso`},{label:`Sesiones Canvas`,value:n?.connections??0,icon:qn,color:`text-orange-500`,trend:`Live`},{label:`Procesos Bridge`,value:i.filter(e=>e.status===`thinking`).length,icon:en,color:`text-purple-500`,trend:`Estable`},{label:`Mensajes / 1h`,value:r.at(-1)?.count??0,icon:Kt,color:`text-green-500`,trend:`Última hora`}],o=(0,_.useMemo)(()=>{let e=i.filter(e=>e.status===`idle`||e.status===`hibernated`).length,t=i.filter(e=>e.status===`active`).length,n=i.filter(e=>e.status===`thinking`).length,r=i.filter(e=>e.status===`error`).length;return[{name:`Idle`,value:e||0,color:`hsl(var(--muted))`},{name:`Active`,value:t||0,color:`hsl(var(--primary))`},{name:`Thinking`,value:n||0,color:`hsl(var(--accent))`},...r>0?[{name:`Error`,value:r,color:`#ef4444`}]:[]].filter(e=>e.value>0||e.name===`Idle`)},[i]),s=r.reduce((e,t)=>e+t.count,0);return n?.memory?.percentage&&Math.max(0,Math.round(100-n.memory.percentage*.3-(n.cpu||0)*.2)),(0,I.jsxs)(`div`,{className:`hive-page-container`,children:[(0,I.jsxs)(`div`,{className:`hive-page-header`,children:[(0,I.jsxs)(`div`,{className:`relative z-10`,children:[(0,I.jsxs)(`div`,{className:`hive-page-header__eyebrow`,children:[(0,I.jsx)(`div`,{className:`hive-page-header__dot`}),(0,I.jsx)(`span`,{className:`hive-page-header__label`,children:`SISTEMA OPERATIVO HIVE`})]}),(0,I.jsxs)(`h2`,{className:`hive-title-page`,children:[`Centro de `,(0,I.jsx)(`span`,{className:`hive-title-page__accent`,children:`Control`})]}),(0,I.jsx)(`p`,{className:`hive-subtitle`,children:`Monitoreo en tiempo real del enjambre y estado de los nodos cognitivos.`})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-6 relative z-10`,children:[(0,I.jsxs)(`div`,{className:`flex flex-col items-end`,children:[(0,I.jsx)(`span`,{className:`hive-label mb-1`,children:`Estado Hive`}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`div`,{className:e===`connected`?`hive-status-dot--active`:`hive-status-dot--disabled`}),(0,I.jsx)(`span`,{className:e===`connected`?`hive-status-label--active`:`hive-status-label--disabled`,children:e===`connected`?`EN LÍNEA`:`DESCONECTADO`})]})]}),(0,I.jsx)(`div`,{className:`h-10 w-px bg-white/10 hidden sm:block`}),(0,I.jsx)(bB,{})]})]}),(0,I.jsx)(`div`,{className:`grid gap-6 sm:grid-cols-2 lg:grid-cols-4 mb-8`,children:a.map(e=>(0,I.jsxs)(`div`,{className:`hive-card hive-card--active group`,children:[(0,I.jsxs)(`div`,{className:`hive-card-body`,children:[(0,I.jsxs)(`div`,{className:`flex flex-row items-center justify-between mb-4`,children:[(0,I.jsx)(`span`,{className:`hive-title-section`,children:e.label}),(0,I.jsx)(`div`,{className:`p-2 rounded-lg bg-white/5 border border-white/5`,children:(0,I.jsx)(xB,{icon:e.icon,className:`h-4 w-4 ${e.color}`})})]}),(0,I.jsxs)(`div`,{className:`flex items-end justify-between`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:`text-3xl font-black text-white group-hover:text-blue-400 transition-colors`,children:e.value}),(0,I.jsxs)(`p`,{className:`text-[10px] font-bold text-white/30 uppercase tracking-widest mt-1 flex items-center gap-1`,children:[(0,I.jsx)(Yt,{className:`h-2.5 w-2.5 text-green-500`}),e.trend]})]}),(0,I.jsx)(`div`,{className:`h-8 w-8 rounded-full border border-white/5 bg-white/5 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity`,children:(0,I.jsx)(Yt,{className:`h-4 w-4 text-blue-400`})})]})]}),(0,I.jsx)(`div`,{className:`hive-strip--bottom`})]},e.label))}),(0,I.jsx)(rz,{}),(0,I.jsx)(lz,{}),(0,I.jsxs)(`div`,{className:`grid gap-6 lg:grid-cols-3 mb-8`,children:[(0,I.jsx)(`div`,{className:`lg:col-span-2 hive-card`,children:(0,I.jsxs)(`div`,{className:`hive-card-body !pb-0`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between mb-6`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h3`,{className:`hive-title-section`,children:`Actividad del Enjambre`}),(0,I.jsxs)(`p`,{className:`text-[10px] text-white/40 uppercase tracking-widest font-bold`,children:[`Últimas 12 horas · `,s,` mensajes`]})]}),(0,I.jsx)(Kt,{className:`h-5 w-5 text-blue-500 animate-pulse shadow-blue-glow`})]}),(0,I.jsx)(`div`,{className:`h-[280px] w-full`,children:r.length>0?(0,I.jsx)(TS,{width:`100%`,height:`100%`,children:(0,I.jsxs)(jR,{data:r,children:[(0,I.jsx)(`defs`,{children:(0,I.jsxs)(`linearGradient`,{id:`colorCount`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,I.jsx)(`stop`,{offset:`5%`,stopColor:`#3b82f6`,stopOpacity:.2}),(0,I.jsx)(`stop`,{offset:`95%`,stopColor:`#3b82f6`,stopOpacity:0})]})}),(0,I.jsx)(zI,{strokeDasharray:`3 3`,vertical:!1,stroke:`rgba(255,255,255,0.05)`}),(0,I.jsx)(xL,{dataKey:`time`,axisLine:!1,tickLine:!1,tick:{fill:`rgba(255,255,255,0.3)`,fontSize:10,fontWeight:`bold`}}),(0,I.jsx)(AL,{axisLine:!1,tickLine:!1,tick:{fill:`rgba(255,255,255,0.3)`,fontSize:10,fontWeight:`bold`},allowDecimals:!1}),(0,I.jsx)(vS,{contentStyle:{backgroundColor:`#09090b`,borderRadius:`12px`,border:`1px solid rgba(255,255,255,0.1)`,color:`#fff`},itemStyle:{color:`#3b82f6`},formatter:e=>[e,`Mensajes`]}),(0,I.jsx)(fL,{type:`monotone`,dataKey:`count`,stroke:`#3b82f6`,strokeWidth:4,fillOpacity:1,fill:`url(#colorCount)`})]})}):(0,I.jsx)(`div`,{className:`h-full flex items-center justify-center text-white/30 text-sm`,children:`Cargando actividad...`})})]})}),(0,I.jsx)(`div`,{className:`hive-card`,children:(0,I.jsxs)(`div`,{className:`hive-card-body`,children:[(0,I.jsx)(`h3`,{className:`hive-title-section mb-6`,children:`Distribución de Agentes`}),(0,I.jsx)(`div`,{className:`h-[210px]`,children:o.length>0?(0,I.jsx)(TS,{width:`100%`,height:`100%`,children:(0,I.jsxs)(kR,{data:o,layout:`vertical`,children:[(0,I.jsx)(xL,{type:`number`,hide:!0,allowDecimals:!1}),(0,I.jsx)(AL,{dataKey:`name`,type:`category`,axisLine:!1,tickLine:!1,tick:{fill:`rgba(255,255,255,0.5)`,fontSize:10,fontWeight:`bold`},width:70}),(0,I.jsx)(vS,{cursor:{fill:`rgba(255,255,255,0.02)`}}),(0,I.jsx)(uF,{dataKey:`value`,radius:[0,8,8,0],barSize:16,children:o.map(e=>(0,I.jsx)(ES,{fill:e.color},e.name))})]})}):(0,I.jsx)(`div`,{className:`h-full flex items-center justify-center text-white/30 text-sm`,children:`Sin agentes configurados`})}),(0,I.jsxs)(`div`,{className:`mt-4 pt-4 border-t border-white/5 grid grid-cols-2 gap-4`,children:[(0,I.jsxs)(`div`,{className:`hive-stat`,children:[(0,I.jsx)(`span`,{className:`hive-stat__label`,children:`Salud Monitor`}),(0,I.jsx)(`span`,{className:`hive-stat__value hive-stat__value--active`,children:`Óptima`})]}),(0,I.jsxs)(`div`,{className:`hive-stat`,children:[(0,I.jsx)(`span`,{className:`hive-stat__label`,children:`Uptime`}),(0,I.jsx)(`span`,{className:`hive-stat__value hive-stat__value--active`,children:n?.uptime??`—`})]})]})]})})]})]})}var CB={active:{label:`Activo`,className:`bg-hive-connected/15 text-hive-connected border-hive-connected/30`},idle:{label:`Activo`,className:`bg-hive-connected/10 text-hive-connected/80 border-hive-connected/20`},hibernated:{label:`Hibernado`,className:`bg-secondary text-secondary-foreground border-border`},error:{label:`Error`,className:`bg-destructive/15 text-destructive border-destructive/30`},thinking:{label:`Pensando`,className:`bg-hive-thinking/15 text-hive-thinking border-hive-thinking/30 animate-pulse-slow`}};function wB({status:e,className:t}){if(!e||!CB[e])return(0,I.jsxs)($z,{variant:`outline`,className:t,children:[(0,I.jsx)(`span`,{className:`mr-1.5 inline-block h-1.5 w-1.5 rounded-full bg-current`}),`Desconocido`]});let n=CB[e];return(0,I.jsxs)($z,{variant:`outline`,className:H(n.className,t),children:[(0,I.jsx)(`span`,{className:`mr-1.5 inline-block h-1.5 w-1.5 rounded-full bg-current`}),n.label]})}var TB=_.createContext(void 0);function EB(e){let t=_.useContext(TB);return e||t||`ltr`}var DB=`rovingFocusGroup.onEntryFocus`,OB={bubbles:!1,cancelable:!0},kB=`RovingFocusGroup`,[AB,jB,MB]=ce(kB),[NB,PB]=R(kB,[MB]),[FB,IB]=NB(kB),LB=_.forwardRef((e,t)=>(0,I.jsx)(AB.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,I.jsx)(AB.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,I.jsx)(RB,{...e,ref:t})})}));LB.displayName=kB;var RB=_.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=_.useRef(null),p=P(t,f),m=EB(a),[h,g]=Fe({prop:o,defaultProp:s??null,onChange:c,caller:kB}),[v,y]=_.useState(!1),b=B(l),x=jB(n),S=_.useRef(!1),[C,w]=_.useState(0);return _.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(DB,b),()=>e.removeEventListener(DB,b)},[b]),(0,I.jsx)(FB,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:_.useCallback(e=>g(e),[g]),onItemShiftTab:_.useCallback(()=>y(!0),[]),onFocusableItemAdd:_.useCallback(()=>w(e=>e+1),[]),onFocusableItemRemove:_.useCallback(()=>w(e=>e-1),[]),children:(0,I.jsx)(z.div,{tabIndex:v||C===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:j(e.onMouseDown,()=>{S.current=!0}),onFocus:j(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!v){let t=new CustomEvent(DB,OB);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>e.focusable);WB([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}S.current=!1}),onBlur:j(e.onBlur,()=>y(!1))})})}),zB=`RovingFocusGroupItem`,BB=_.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=Na(),l=a||c,u=IB(zB,n),d=u.currentTabStopId===l,f=jB(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return _.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),(0,I.jsx)(AB.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,I.jsx)(z.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:j(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:j(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:j(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=UB(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?GB(n,r+1):n.slice(r+1)}setTimeout(()=>WB(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});BB.displayName=zB;var VB={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function HB(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function UB(e,t,n){let r=HB(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return VB[r]}function WB(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function GB(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var KB=LB,qB=BB,JB=[`Enter`,` `],YB=[`ArrowDown`,`PageUp`,`Home`],XB=[`ArrowUp`,`PageDown`,`End`],ZB=[...YB,...XB],QB={ltr:[...JB,`ArrowRight`],rtl:[...JB,`ArrowLeft`]},$B={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},eV=`Menu`,[tV,nV,rV]=ce(eV),[iV,aV]=R(eV,[rV,$s,PB]),oV=$s(),sV=PB(),[cV,lV]=iV(eV),[uV,dV]=iV(eV),fV=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=oV(t),[c,l]=_.useState(null),u=_.useRef(!1),d=B(a),f=EB(i);return _.useEffect(()=>{let e=()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),(0,I.jsx)(hc,{...s,children:(0,I.jsx)(cV,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,I.jsx)(uV,{scope:t,onClose:_.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})};fV.displayName=eV;var pV=`MenuAnchor`,mV=_.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=oV(n);return(0,I.jsx)(gc,{...i,...r,ref:t})});mV.displayName=pV;var hV=`MenuPortal`,[gV,_V]=iV(hV,{forceMount:void 0}),vV=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=lV(hV,t);return(0,I.jsx)(gV,{scope:t,forceMount:n,children:(0,I.jsx)(Ae,{present:n||a.open,children:(0,I.jsx)(Oe,{asChild:!0,container:i,children:r})})})};vV.displayName=hV;var yV=`MenuContent`,[bV,xV]=iV(yV),SV=_.forwardRef((e,t)=>{let n=_V(yV,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=lV(yV,e.__scopeMenu),o=dV(yV,e.__scopeMenu);return(0,I.jsx)(tV.Provider,{scope:e.__scopeMenu,children:(0,I.jsx)(Ae,{present:r||a.open,children:(0,I.jsx)(tV.Slot,{scope:e.__scopeMenu,children:o.modal?(0,I.jsx)(CV,{...i,ref:t}):(0,I.jsx)(wV,{...i,ref:t})})})})}),CV=_.forwardRef((e,t)=>{let n=lV(yV,e.__scopeMenu),r=_.useRef(null),i=P(t,r);return _.useEffect(()=>{let e=r.current;if(e)return cm(e)},[]),(0,I.jsx)(EV,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:j(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),wV=_.forwardRef((e,t)=>{let n=lV(yV,e.__scopeMenu);return(0,I.jsx)(EV,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),TV=te(`MenuContent.ScrollLock`),EV=_.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=lV(yV,n),v=dV(yV,n),y=oV(n),b=sV(n),x=nV(n),[S,C]=_.useState(null),w=_.useRef(null),T=P(t,w,g.onContentChange),E=_.useRef(0),D=_.useRef(``),O=_.useRef(0),k=_.useRef(null),A=_.useRef(`right`),M=_.useRef(0),N=m?em:_.Fragment,F=m?{as:TV,allowPinchZoom:!0}:void 0,L=e=>{let t=D.current+e,n=x().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=uH(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){D.current=t,window.clearTimeout(E.current),t!==``&&(E.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};_.useEffect(()=>()=>window.clearTimeout(E.current),[]),Ep();let R=_.useCallback(e=>A.current===k.current?.side&&fH(e,k.current?.area),[]);return(0,I.jsx)(bV,{scope:n,searchRef:D,onItemEnter:_.useCallback(e=>{R(e)&&e.preventDefault()},[R]),onItemLeave:_.useCallback(e=>{R(e)||(w.current?.focus(),C(null))},[R]),onTriggerLeave:_.useCallback(e=>{R(e)&&e.preventDefault()},[R]),pointerGraceTimerRef:O,onPointerGraceIntentChange:_.useCallback(e=>{k.current=e},[]),children:(0,I.jsx)(N,{...F,children:(0,I.jsx)(yp,{asChild:!0,trapped:i,onMountAutoFocus:j(a,e=>{e.preventDefault(),w.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,I.jsx)(_e,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,I.jsx)(KB,{asChild:!0,...b,dir:v.dir,orientation:`vertical`,loop:r,currentTabStopId:S,onCurrentTabStopIdChange:C,onEntryFocus:j(c,e=>{v.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,I.jsx)(_c,{role:`menu`,"aria-orientation":`vertical`,"data-state":aH(g.open),"data-radix-menu-content":``,dir:v.dir,...y,...h,ref:T,style:{outline:`none`,...h.style},onKeyDown:j(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&L(e.key));let i=w.current;if(e.target!==i||!ZB.includes(e.key))return;e.preventDefault();let a=x().filter(e=>!e.disabled).map(e=>e.ref.current);XB.includes(e.key)&&a.reverse(),cH(a)}),onBlur:j(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(E.current),D.current=``)}),onPointerMove:j(e.onPointerMove,pH(e=>{let t=e.target,n=M.current!==e.clientX;e.currentTarget.contains(t)&&n&&(A.current=e.clientX>M.current?`right`:`left`,M.current=e.clientX)}))})})})})})})});SV.displayName=yV;var DV=`MenuGroup`,OV=_.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,I.jsx)(z.div,{role:`group`,...r,ref:t})});OV.displayName=DV;var kV=`MenuLabel`,AV=_.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,I.jsx)(z.div,{...r,ref:t})});AV.displayName=kV;var jV=`MenuItem`,MV=`menu.itemSelect`,NV=_.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=_.useRef(null),o=dV(jV,e.__scopeMenu),s=xV(jV,e.__scopeMenu),c=P(t,a),l=_.useRef(!1),u=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(MV,{bubbles:!0,cancelable:!0});e.addEventListener(MV,e=>r?.(e),{once:!0}),le(e,t),t.defaultPrevented?l.current=!1:o.onClose()}};return(0,I.jsx)(PV,{...i,ref:c,disabled:n,onClick:j(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:j(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:j(e.onKeyDown,e=>{let t=s.searchRef.current!==``;n||t&&e.key===` `||JB.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});NV.displayName=jV;var PV=_.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=xV(jV,n),s=sV(n),c=_.useRef(null),l=P(t,c),[u,d]=_.useState(!1),[f,p]=_.useState(``);return _.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,I.jsx)(tV.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,I.jsx)(qB,{asChild:!0,...s,focusable:!r,children:(0,I.jsx)(z.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:j(e.onPointerMove,pH(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:j(e.onPointerLeave,pH(e=>o.onItemLeave(e))),onFocus:j(e.onFocus,()=>d(!0)),onBlur:j(e.onBlur,()=>d(!1))})})})}),FV=`MenuCheckboxItem`,IV=_.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,I.jsx)(WV,{scope:e.__scopeMenu,checked:n,children:(0,I.jsx)(NV,{role:`menuitemcheckbox`,"aria-checked":oH(n)?`mixed`:n,...i,ref:t,"data-state":sH(n),onSelect:j(i.onSelect,()=>r?.(oH(n)?!0:!n),{checkForDefaultPrevented:!1})})})});IV.displayName=FV;var LV=`MenuRadioGroup`,[RV,zV]=iV(LV,{value:void 0,onValueChange:()=>{}}),BV=_.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=B(r);return(0,I.jsx)(RV,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,I.jsx)(OV,{...i,ref:t})})});BV.displayName=LV;var VV=`MenuRadioItem`,HV=_.forwardRef((e,t)=>{let{value:n,...r}=e,i=zV(VV,e.__scopeMenu),a=n===i.value;return(0,I.jsx)(WV,{scope:e.__scopeMenu,checked:a,children:(0,I.jsx)(NV,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":sH(a),onSelect:j(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});HV.displayName=VV;var UV=`MenuItemIndicator`,[WV,GV]=iV(UV,{checked:!1}),KV=_.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=GV(UV,n);return(0,I.jsx)(Ae,{present:r||oH(a.checked)||a.checked===!0,children:(0,I.jsx)(z.span,{...i,ref:t,"data-state":sH(a.checked)})})});KV.displayName=UV;var qV=`MenuSeparator`,JV=_.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,I.jsx)(z.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});JV.displayName=qV;var YV=`MenuArrow`,XV=_.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=oV(n);return(0,I.jsx)(vc,{...i,...r,ref:t})});XV.displayName=YV;var ZV=`MenuSub`,[QV,$V]=iV(ZV),eH=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=lV(ZV,t),o=oV(t),[s,c]=_.useState(null),[l,u]=_.useState(null),d=B(i);return _.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,I.jsx)(hc,{...o,children:(0,I.jsx)(cV,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,I.jsx)(QV,{scope:t,contentId:Na(),triggerId:Na(),trigger:s,onTriggerChange:c,children:n})})})};eH.displayName=ZV;var tH=`MenuSubTrigger`,nH=_.forwardRef((e,t)=>{let n=lV(tH,e.__scopeMenu),r=dV(tH,e.__scopeMenu),i=$V(tH,e.__scopeMenu),a=xV(tH,e.__scopeMenu),o=_.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,l={__scopeMenu:e.__scopeMenu},u=_.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return _.useEffect(()=>u,[u]),_.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]),(0,I.jsx)(mV,{asChild:!0,...l,children:(0,I.jsx)(PV,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":i.contentId,"data-state":aH(n.open),...e,ref:N(t,i.onTriggerChange),onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:j(e.onPointerMove,pH(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:j(e.onPointerLeave,pH(e=>{u();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:j(e.onKeyDown,t=>{let i=a.searchRef.current!==``;e.disabled||i&&t.key===` `||QB[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});nH.displayName=tH;var rH=`MenuSubContent`,iH=_.forwardRef((e,t)=>{let n=_V(yV,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=lV(yV,e.__scopeMenu),o=dV(yV,e.__scopeMenu),s=$V(rH,e.__scopeMenu),c=_.useRef(null),l=P(t,c);return(0,I.jsx)(tV.Provider,{scope:e.__scopeMenu,children:(0,I.jsx)(Ae,{present:r||a.open,children:(0,I.jsx)(tV.Slot,{scope:e.__scopeMenu,children:(0,I.jsx)(EV,{id:s.contentId,"aria-labelledby":s.triggerId,...i,ref:l,align:`start`,side:o.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{o.isUsingKeyboardRef.current&&c.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:j(e.onFocusOutside,e=>{e.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:j(e.onEscapeKeyDown,e=>{o.onClose(),e.preventDefault()}),onKeyDown:j(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=$B[o.dir].includes(e.key);t&&n&&(a.onOpenChange(!1),s.trigger?.focus(),e.preventDefault())})})})})})});iH.displayName=rH;function aH(e){return e?`open`:`closed`}function oH(e){return e===`indeterminate`}function sH(e){return oH(e)?`indeterminate`:e?`checked`:`unchecked`}function cH(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function lH(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function uH(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=lH(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function dH(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function fH(e,t){return t?dH({x:e.clientX,y:e.clientY},t):!1}function pH(e){return t=>t.pointerType===`mouse`?e(t):void 0}var mH=fV,hH=mV,gH=vV,_H=SV,vH=OV,yH=AV,bH=NV,xH=IV,SH=BV,CH=HV,wH=KV,TH=JV,EH=XV,DH=eH,OH=nH,kH=iH,AH=`DropdownMenu`,[jH,ffe]=R(AH,[aV]),MH=aV(),[NH,PH]=jH(AH),FH=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=MH(t),l=_.useRef(null),[u,d]=Fe({prop:i,defaultProp:a??!1,onChange:o,caller:AH});return(0,I.jsx)(NH,{scope:t,triggerId:Na(),triggerRef:l,contentId:Na(),open:u,onOpenChange:d,onOpenToggle:_.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,I.jsx)(mH,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};FH.displayName=AH;var IH=`DropdownMenuTrigger`,LH=_.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=PH(IH,n),o=MH(n);return(0,I.jsx)(hH,{asChild:!0,...o,children:(0,I.jsx)(z.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:N(t,a.triggerRef),onPointerDown:j(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:j(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});LH.displayName=IH;var RH=`DropdownMenuPortal`,zH=e=>{let{__scopeDropdownMenu:t,...n}=e,r=MH(t);return(0,I.jsx)(gH,{...r,...n})};zH.displayName=RH;var BH=`DropdownMenuContent`,VH=_.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=PH(BH,n),a=MH(n),o=_.useRef(!1);return(0,I.jsx)(_H,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:j(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:j(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});VH.displayName=BH;var HH=`DropdownMenuGroup`,UH=_.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=MH(n);return(0,I.jsx)(vH,{...i,...r,ref:t})});UH.displayName=HH;var WH=`DropdownMenuLabel`,GH=_.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=MH(n);return(0,I.jsx)(yH,{...i,...r,ref:t})});GH.displayName=WH;var KH=`DropdownMenuItem`,qH=_.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=MH(n);return(0,I.jsx)(bH,{...i,...r,ref:t})});qH.displayName=KH;var JH=`DropdownMenuCheckboxItem`,YH=_.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=MH(n);return(0,I.jsx)(xH,{...i,...r,ref:t})});YH.displayName=JH;var XH=`DropdownMenuRadioGroup`,ZH=_.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=MH(n);return(0,I.jsx)(SH,{...i,...r,ref:t})});ZH.displayName=XH;var QH=`DropdownMenuRadioItem`,$H=_.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=MH(n);return(0,I.jsx)(CH,{...i,...r,ref:t})});$H.displayName=QH;var eU=`DropdownMenuItemIndicator`,tU=_.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=MH(n);return(0,I.jsx)(wH,{...i,...r,ref:t})});tU.displayName=eU;var nU=`DropdownMenuSeparator`,rU=_.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=MH(n);return(0,I.jsx)(TH,{...i,...r,ref:t})});rU.displayName=nU;var iU=`DropdownMenuArrow`,aU=_.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=MH(n);return(0,I.jsx)(EH,{...i,...r,ref:t})});aU.displayName=iU;var oU=`DropdownMenuSubTrigger`,sU=_.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=MH(n);return(0,I.jsx)(OH,{...i,...r,ref:t})});sU.displayName=oU;var cU=`DropdownMenuSubContent`,lU=_.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=MH(n);return(0,I.jsx)(kH,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});lU.displayName=cU;var uU=FH,dU=LH,fU=zH,pU=VH,mU=GH,hU=qH,gU=YH,_U=$H,vU=tU,yU=rU,bU=sU,xU=lU,SU=uU,CU=dU,wU=_.forwardRef(({className:e,inset:t,children:n,...r},i)=>(0,I.jsxs)(bU,{ref:i,className:H(`flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent`,t&&`pl-8`,e),...r,children:[n,(0,I.jsx)(sn,{className:`ml-auto h-4 w-4`})]}));wU.displayName=bU.displayName;var TU=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(xU,{ref:n,className:H(`z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,e),...t}));TU.displayName=xU.displayName;var EU=_.forwardRef(({className:e,sideOffset:t=4,...n},r)=>(0,I.jsx)(fU,{children:(0,I.jsx)(pU,{ref:r,sideOffset:t,className:H(`z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,e),...n})}));EU.displayName=pU.displayName;var DU=_.forwardRef(({className:e,inset:t,...n},r)=>(0,I.jsx)(hU,{ref:r,className:H(`relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground`,t&&`pl-8`,e),...n}));DU.displayName=hU.displayName;var OU=_.forwardRef(({className:e,children:t,checked:n,...r},i)=>(0,I.jsxs)(gU,{ref:i,className:H(`relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground`,e),checked:n,...r,children:[(0,I.jsx)(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,I.jsx)(vU,{children:(0,I.jsx)(rn,{className:`h-4 w-4`})})}),t]}));OU.displayName=gU.displayName;var kU=_.forwardRef(({className:e,children:t,...n},r)=>(0,I.jsxs)(_U,{ref:r,className:H(`relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground`,e),...n,children:[(0,I.jsx)(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,I.jsx)(vU,{children:(0,I.jsx)(hn,{className:`h-2 w-2 fill-current`})})}),t]}));kU.displayName=_U.displayName;var AU=_.forwardRef(({className:e,inset:t,...n},r)=>(0,I.jsx)(mU,{ref:r,className:H(`px-2 py-1.5 text-sm font-semibold`,t&&`pl-8`,e),...n}));AU.displayName=mU.displayName;var jU=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(yU,{ref:n,className:H(`-mx-1 my-1 h-px bg-muted`,e),...t}));jU.displayName=yU.displayName;var MU=({className:e,...t})=>(0,I.jsx)(`span`,{className:H(`ml-auto text-xs tracking-widest opacity-60`,e),...t});MU.displayName=`DropdownMenuShortcut`;function NU(e){let t=Object.prototype.toString.call(e);return e instanceof Date||typeof e==`object`&&t===`[object Date]`?new e.constructor(+e):typeof e==`number`||t===`[object Number]`||typeof e==`string`||t===`[object String]`?new Date(e):new Date(NaN)}function PU(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function FU(e,t){let n=NU(e);return isNaN(t)?PU(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function IU(e,t){let n=NU(e);if(isNaN(t))return PU(e,NaN);if(!t)return n;let r=n.getDate(),i=PU(e,n.getTime());return i.setMonth(n.getMonth()+t+1,0),r>=i.getDate()?i:(n.setFullYear(i.getFullYear(),i.getMonth(),r),n)}var LU=365.2425,RU=6048e5,zU=864e5,BU=3600*24;BU*7,BU*LU/12*3;var VU={};function HU(){return VU}function UU(e,t){let n=HU(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=NU(e),a=i.getDay(),o=(a<r?7:0)+a-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function WU(e){return UU(e,{weekStartsOn:1})}function GU(e){let t=NU(e),n=t.getFullYear(),r=PU(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);let i=WU(r),a=PU(e,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);let o=WU(a);return t.getTime()>=i.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function KU(e){let t=NU(e);return t.setHours(0,0,0,0),t}function qU(e){let t=NU(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),e-+n}function JU(e,t){let n=KU(e),r=KU(t),i=+n-qU(n),a=+r-qU(r);return Math.round((i-a)/zU)}function YU(e){let t=GU(e),n=PU(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),WU(n)}function XU(e,t){return FU(e,t*7)}function ZU(e,t){return IU(e,t*12)}function QU(e){let t;return e.forEach(function(e){let n=NU(e);(t===void 0||t<n||isNaN(Number(n)))&&(t=n)}),t||new Date(NaN)}function $U(e){let t;return e.forEach(e=>{let n=NU(e);(!t||t>n||isNaN(+n))&&(t=n)}),t||new Date(NaN)}function eW(e,t){let n=KU(e),r=KU(t);return+n==+r}function tW(e){return e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`}function nW(e){if(!tW(e)&&typeof e!=`number`)return!1;let t=NU(e);return!isNaN(Number(t))}function rW(e,t){let n=NU(e),r=NU(t),i=n.getFullYear()-r.getFullYear(),a=n.getMonth()-r.getMonth();return i*12+a}function iW(e,t,n){let r=UU(e,n),i=UU(t,n),a=+r-qU(r),o=+i-qU(i);return Math.round((a-o)/RU)}function aW(e){let t=NU(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function oW(e){let t=NU(e);return t.setDate(1),t.setHours(0,0,0,0),t}function sW(e){let t=NU(e),n=PU(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function cW(e,t){let n=HU(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=NU(e),a=i.getDay(),o=(a<r?-7:0)+6-(a-r);return i.setDate(i.getDate()+o),i.setHours(23,59,59,999),i}function lW(e){return cW(e,{weekStartsOn:1})}var uW={lessThanXSeconds:{one:`less than a second`,other:`less than {{count}} seconds`},xSeconds:{one:`1 second`,other:`{{count}} seconds`},halfAMinute:`half a minute`,lessThanXMinutes:{one:`less than a minute`,other:`less than {{count}} minutes`},xMinutes:{one:`1 minute`,other:`{{count}} minutes`},aboutXHours:{one:`about 1 hour`,other:`about {{count}} hours`},xHours:{one:`1 hour`,other:`{{count}} hours`},xDays:{one:`1 day`,other:`{{count}} days`},aboutXWeeks:{one:`about 1 week`,other:`about {{count}} weeks`},xWeeks:{one:`1 week`,other:`{{count}} weeks`},aboutXMonths:{one:`about 1 month`,other:`about {{count}} months`},xMonths:{one:`1 month`,other:`{{count}} months`},aboutXYears:{one:`about 1 year`,other:`about {{count}} years`},xYears:{one:`1 year`,other:`{{count}} years`},overXYears:{one:`over 1 year`,other:`over {{count}} years`},almostXYears:{one:`almost 1 year`,other:`almost {{count}} years`}},dW=(e,t,n)=>{let r,i=uW[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r};function fW(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var pW={date:fW({formats:{full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},defaultWidth:`full`}),time:fW({formats:{full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},defaultWidth:`full`}),dateTime:fW({formats:{full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},mW={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},hW=(e,t,n,r)=>mW[e];function gW(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}var _W={ordinalNumber:(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},era:gW({values:{narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},defaultWidth:`wide`}),quarter:gW({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},defaultWidth:`wide`,argumentCallback:e=>e-1}),month:gW({values:{narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],wide:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},defaultWidth:`wide`}),day:gW({values:{narrow:[`S`,`M`,`T`,`W`,`T`,`F`,`S`],short:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],abbreviated:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],wide:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},defaultWidth:`wide`}),dayPeriod:gW({values:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`}},defaultFormattingWidth:`wide`})};function vW(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?bW(s,e=>e.test(o)):yW(s,e=>e.test(o)),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;let u=t.slice(o.length);return{value:l,rest:u}}}function yW(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function bW(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function xW(e){return(t,n={})=>{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}var SW={code:`en-US`,formatDistance:dW,formatLong:pW,formatRelative:hW,localize:_W,match:{ordinalNumber:xW({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:vW({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:`any`}),quarter:vW({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:vW({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:vW({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:vW({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:`any`})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function CW(e){let t=NU(e);return JU(t,sW(t))+1}function wW(e){let t=NU(e),n=WU(t)-+YU(t);return Math.round(n/RU)+1}function TW(e,t){let n=NU(e),r=n.getFullYear(),i=HU(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=PU(e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);let s=UU(o,t),c=PU(e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);let l=UU(c,t);return n.getTime()>=s.getTime()?r+1:n.getTime()>=l.getTime()?r:r-1}function EW(e,t){let n=HU(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=TW(e,t),a=PU(e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),UU(a,t)}function DW(e,t){let n=NU(e),r=UU(n,t)-+EW(n,t);return Math.round(r/RU)+1}function OW(e,t){return(e<0?`-`:``)+Math.abs(e).toString().padStart(t,`0`)}var kW={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return OW(t===`yy`?r%100:r,t.length)},M(e,t){let n=e.getMonth();return t===`M`?String(n+1):OW(n+1,2)},d(e,t){return OW(e.getDate(),t.length)},a(e,t){let n=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.toUpperCase();case`aaa`:return n;case`aaaaa`:return n[0];default:return n===`am`?`a.m.`:`p.m.`}},h(e,t){return OW(e.getHours()%12||12,t.length)},H(e,t){return OW(e.getHours(),t.length)},m(e,t){return OW(e.getMinutes(),t.length)},s(e,t){return OW(e.getSeconds(),t.length)},S(e,t){let n=t.length,r=e.getMilliseconds();return OW(Math.trunc(r*10**(n-3)),t.length)}},AW={am:`am`,pm:`pm`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},jW={G:function(e,t,n){let r=e.getFullYear()>0?1:0;switch(t){case`G`:case`GG`:case`GGG`:return n.era(r,{width:`abbreviated`});case`GGGGG`:return n.era(r,{width:`narrow`});default:return n.era(r,{width:`wide`})}},y:function(e,t,n){if(t===`yo`){let t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:`year`})}return kW.y(e,t)},Y:function(e,t,n,r){let i=TW(e,r),a=i>0?i:1-i;return t===`YY`?OW(a%100,2):t===`Yo`?n.ordinalNumber(a,{unit:`year`}):OW(a,t.length)},R:function(e,t){return OW(GU(e),t.length)},u:function(e,t){return OW(e.getFullYear(),t.length)},Q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`Q`:return String(r);case`QQ`:return OW(r,2);case`Qo`:return n.ordinalNumber(r,{unit:`quarter`});case`QQQ`:return n.quarter(r,{width:`abbreviated`,context:`formatting`});case`QQQQQ`:return n.quarter(r,{width:`narrow`,context:`formatting`});default:return n.quarter(r,{width:`wide`,context:`formatting`})}},q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`q`:return String(r);case`qq`:return OW(r,2);case`qo`:return n.ordinalNumber(r,{unit:`quarter`});case`qqq`:return n.quarter(r,{width:`abbreviated`,context:`standalone`});case`qqqqq`:return n.quarter(r,{width:`narrow`,context:`standalone`});default:return n.quarter(r,{width:`wide`,context:`standalone`})}},M:function(e,t,n){let r=e.getMonth();switch(t){case`M`:case`MM`:return kW.M(e,t);case`Mo`:return n.ordinalNumber(r+1,{unit:`month`});case`MMM`:return n.month(r,{width:`abbreviated`,context:`formatting`});case`MMMMM`:return n.month(r,{width:`narrow`,context:`formatting`});default:return n.month(r,{width:`wide`,context:`formatting`})}},L:function(e,t,n){let r=e.getMonth();switch(t){case`L`:return String(r+1);case`LL`:return OW(r+1,2);case`Lo`:return n.ordinalNumber(r+1,{unit:`month`});case`LLL`:return n.month(r,{width:`abbreviated`,context:`standalone`});case`LLLLL`:return n.month(r,{width:`narrow`,context:`standalone`});default:return n.month(r,{width:`wide`,context:`standalone`})}},w:function(e,t,n,r){let i=DW(e,r);return t===`wo`?n.ordinalNumber(i,{unit:`week`}):OW(i,t.length)},I:function(e,t,n){let r=wW(e);return t===`Io`?n.ordinalNumber(r,{unit:`week`}):OW(r,t.length)},d:function(e,t,n){return t===`do`?n.ordinalNumber(e.getDate(),{unit:`date`}):kW.d(e,t)},D:function(e,t,n){let r=CW(e);return t===`Do`?n.ordinalNumber(r,{unit:`dayOfYear`}):OW(r,t.length)},E:function(e,t,n){let r=e.getDay();switch(t){case`E`:case`EE`:case`EEE`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`EEEEE`:return n.day(r,{width:`narrow`,context:`formatting`});case`EEEEEE`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},e:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`e`:return String(a);case`ee`:return OW(a,2);case`eo`:return n.ordinalNumber(a,{unit:`day`});case`eee`:return n.day(i,{width:`abbreviated`,context:`formatting`});case`eeeee`:return n.day(i,{width:`narrow`,context:`formatting`});case`eeeeee`:return n.day(i,{width:`short`,context:`formatting`});default:return n.day(i,{width:`wide`,context:`formatting`})}},c:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`c`:return String(a);case`cc`:return OW(a,t.length);case`co`:return n.ordinalNumber(a,{unit:`day`});case`ccc`:return n.day(i,{width:`abbreviated`,context:`standalone`});case`ccccc`:return n.day(i,{width:`narrow`,context:`standalone`});case`cccccc`:return n.day(i,{width:`short`,context:`standalone`});default:return n.day(i,{width:`wide`,context:`standalone`})}},i:function(e,t,n){let r=e.getDay(),i=r===0?7:r;switch(t){case`i`:return String(i);case`ii`:return OW(i,t.length);case`io`:return n.ordinalNumber(i,{unit:`day`});case`iii`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`iiiii`:return n.day(r,{width:`narrow`,context:`formatting`});case`iiiiii`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},a:function(e,t,n){let r=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`});case`aaa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`aaaaa`:return n.dayPeriod(r,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(r,{width:`wide`,context:`formatting`})}},b:function(e,t,n){let r=e.getHours(),i;switch(i=r===12?AW.noon:r===0?AW.midnight:r/12>=1?`pm`:`am`,t){case`b`:case`bb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`bbb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`bbbbb`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},B:function(e,t,n){let r=e.getHours(),i;switch(i=r>=17?AW.evening:r>=12?AW.afternoon:r>=4?AW.morning:AW.night,t){case`B`:case`BB`:case`BBB`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`BBBBB`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},h:function(e,t,n){if(t===`ho`){let t=e.getHours()%12;return t===0&&(t=12),n.ordinalNumber(t,{unit:`hour`})}return kW.h(e,t)},H:function(e,t,n){return t===`Ho`?n.ordinalNumber(e.getHours(),{unit:`hour`}):kW.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return t===`Ko`?n.ordinalNumber(r,{unit:`hour`}):OW(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t===`ko`?n.ordinalNumber(r,{unit:`hour`}):OW(r,t.length)},m:function(e,t,n){return t===`mo`?n.ordinalNumber(e.getMinutes(),{unit:`minute`}):kW.m(e,t)},s:function(e,t,n){return t===`so`?n.ordinalNumber(e.getSeconds(),{unit:`second`}):kW.s(e,t)},S:function(e,t){return kW.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(r===0)return`Z`;switch(t){case`X`:return NW(r);case`XXXX`:case`XX`:return PW(r);default:return PW(r,`:`)}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`x`:return NW(r);case`xxxx`:case`xx`:return PW(r);default:return PW(r,`:`)}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+MW(r,`:`);default:return`GMT`+PW(r,`:`)}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`z`:case`zz`:case`zzz`:return`GMT`+MW(r,`:`);default:return`GMT`+PW(r,`:`)}},t:function(e,t,n){return OW(Math.trunc(e.getTime()/1e3),t.length)},T:function(e,t,n){return OW(e.getTime(),t.length)}};function MW(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+OW(a,2)}function NW(e,t){return e%60==0?(e>0?`-`:`+`)+OW(Math.abs(e)/60,2):PW(e,t)}function PW(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=OW(Math.trunc(r/60),2),a=OW(r%60,2);return n+i+t+a}var FW=(e,t)=>{switch(e){case`P`:return t.date({width:`short`});case`PP`:return t.date({width:`medium`});case`PPP`:return t.date({width:`long`});default:return t.date({width:`full`})}},IW=(e,t)=>{switch(e){case`p`:return t.time({width:`short`});case`pp`:return t.time({width:`medium`});case`ppp`:return t.time({width:`long`});default:return t.time({width:`full`})}},LW={p:IW,P:(e,t)=>{let n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return FW(e,t);let a;switch(r){case`P`:a=t.dateTime({width:`short`});break;case`PP`:a=t.dateTime({width:`medium`});break;case`PPP`:a=t.dateTime({width:`long`});break;default:a=t.dateTime({width:`full`});break}return a.replace(`{{date}}`,FW(r,t)).replace(`{{time}}`,IW(i,t))}},RW=/^D+$/,zW=/^Y+$/,BW=[`D`,`DD`,`YY`,`YYYY`];function VW(e){return RW.test(e)}function HW(e){return zW.test(e)}function UW(e,t,n){let r=WW(e,t,n);if(console.warn(r),BW.includes(e))throw RangeError(r)}function WW(e,t,n){let r=e[0]===`Y`?`years`:`days of the month`;return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var GW=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,KW=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,qW=/^'([^]*?)'?$/,JW=/''/g,YW=/[a-zA-Z]/;function XW(e,t,n){let r=HU(),i=n?.locale??r.locale??SW,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=NU(e);if(!nW(s))throw RangeError(`Invalid time value`);let c=t.match(KW).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=LW[t];return n(e,i.formatLong)}return e}).join(``).match(GW).map(e=>{if(e===`''`)return{isToken:!1,value:`'`};let t=e[0];if(t===`'`)return{isToken:!1,value:ZW(e)};if(jW[t])return{isToken:!0,value:e};if(t.match(YW))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});i.localize.preprocessor&&(c=i.localize.preprocessor(s,c));let l={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return c.map(r=>{if(!r.isToken)return r.value;let a=r.value;(!n?.useAdditionalWeekYearTokens&&HW(a)||!n?.useAdditionalDayOfYearTokens&&VW(a))&&UW(a,t,String(e));let o=jW[a[0]];return o(s,a,i.localize,l)}).join(``)}function ZW(e){let t=e.match(qW);return t?t[1].replace(JW,`'`):e}function QW(e){let t=NU(e),n=t.getFullYear(),r=t.getMonth(),i=PU(e,0);return i.setFullYear(n,r+1,0),i.setHours(0,0,0,0),i.getDate()}function $W(e){return Math.trunc(NU(e)/1e3)}function eG(e){let t=NU(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(0,0,0,0),t}function tG(e,t){return iW(eG(e),oW(e),t)+1}function nG(e,t){let n=NU(e),r=NU(t);return n.getTime()>r.getTime()}function rG(e,t){let n=NU(e),r=NU(t);return+n<+r}function iG(e,t){let n=NU(e),r=NU(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function aG(e,t){let n=NU(e),r=NU(t);return n.getFullYear()===r.getFullYear()}function oG(e,t){return FU(e,-t)}function sG(e,t){let n=NU(e),r=n.getFullYear(),i=n.getDate(),a=PU(e,0);a.setFullYear(r,t,15),a.setHours(0,0,0,0);let o=QW(a);return n.setMonth(t,Math.min(i,o)),n}function cG(e,t){let n=NU(e);return isNaN(+n)?PU(e,NaN):(n.setFullYear(t),n)}var lG={lessThanXSeconds:{one:`menos de un segundo`,other:`menos de {{count}} segundos`},xSeconds:{one:`1 segundo`,other:`{{count}} segundos`},halfAMinute:`medio minuto`,lessThanXMinutes:{one:`menos de un minuto`,other:`menos de {{count}} minutos`},xMinutes:{one:`1 minuto`,other:`{{count}} minutos`},aboutXHours:{one:`alrededor de 1 hora`,other:`alrededor de {{count}} horas`},xHours:{one:`1 hora`,other:`{{count}} horas`},xDays:{one:`1 día`,other:`{{count}} días`},aboutXWeeks:{one:`alrededor de 1 semana`,other:`alrededor de {{count}} semanas`},xWeeks:{one:`1 semana`,other:`{{count}} semanas`},aboutXMonths:{one:`alrededor de 1 mes`,other:`alrededor de {{count}} meses`},xMonths:{one:`1 mes`,other:`{{count}} meses`},aboutXYears:{one:`alrededor de 1 año`,other:`alrededor de {{count}} años`},xYears:{one:`1 año`,other:`{{count}} años`},overXYears:{one:`más de 1 año`,other:`más de {{count}} años`},almostXYears:{one:`casi 1 año`,other:`casi {{count}} años`}},uG=(e,t,n)=>{let r,i=lG[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`en `+r:`hace `+r:r},dG={date:fW({formats:{full:`EEEE, d 'de' MMMM 'de' y`,long:`d 'de' MMMM 'de' y`,medium:`d MMM y`,short:`dd/MM/y`},defaultWidth:`full`}),time:fW({formats:{full:`HH:mm:ss zzzz`,long:`HH:mm:ss z`,medium:`HH:mm:ss`,short:`HH:mm`},defaultWidth:`full`}),dateTime:fW({formats:{full:`{{date}} 'a las' {{time}}`,long:`{{date}} 'a las' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},fG={lastWeek:`'el' eeee 'pasado a la' p`,yesterday:`'ayer a la' p`,today:`'hoy a la' p`,tomorrow:`'mañana a la' p`,nextWeek:`eeee 'a la' p`,other:`P`},pG={lastWeek:`'el' eeee 'pasado a las' p`,yesterday:`'ayer a las' p`,today:`'hoy a las' p`,tomorrow:`'mañana a las' p`,nextWeek:`eeee 'a las' p`,other:`P`},mG={code:`es`,formatDistance:uG,formatLong:dG,formatRelative:(e,t,n,r)=>t.getHours()===1?fG[e]:pG[e],localize:{ordinalNumber:(e,t)=>Number(e)+`º`,era:gW({values:{narrow:[`AC`,`DC`],abbreviated:[`AC`,`DC`],wide:[`antes de cristo`,`después de cristo`]},defaultWidth:`wide`}),quarter:gW({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`T1`,`T2`,`T3`,`T4`],wide:[`1º trimestre`,`2º trimestre`,`3º trimestre`,`4º trimestre`]},defaultWidth:`wide`,argumentCallback:e=>Number(e)-1}),month:gW({values:{narrow:[`e`,`f`,`m`,`a`,`m`,`j`,`j`,`a`,`s`,`o`,`n`,`d`],abbreviated:[`ene`,`feb`,`mar`,`abr`,`may`,`jun`,`jul`,`ago`,`sep`,`oct`,`nov`,`dic`],wide:[`enero`,`febrero`,`marzo`,`abril`,`mayo`,`junio`,`julio`,`agosto`,`septiembre`,`octubre`,`noviembre`,`diciembre`]},defaultWidth:`wide`}),day:gW({values:{narrow:[`d`,`l`,`m`,`m`,`j`,`v`,`s`],short:[`do`,`lu`,`ma`,`mi`,`ju`,`vi`,`sá`],abbreviated:[`dom`,`lun`,`mar`,`mié`,`jue`,`vie`,`sáb`],wide:[`domingo`,`lunes`,`martes`,`miércoles`,`jueves`,`viernes`,`sábado`]},defaultWidth:`wide`}),dayPeriod:gW({values:{narrow:{am:`a`,pm:`p`,midnight:`mn`,noon:`md`,morning:`mañana`,afternoon:`tarde`,evening:`tarde`,night:`noche`},abbreviated:{am:`AM`,pm:`PM`,midnight:`medianoche`,noon:`mediodia`,morning:`mañana`,afternoon:`tarde`,evening:`tarde`,night:`noche`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`medianoche`,noon:`mediodia`,morning:`mañana`,afternoon:`tarde`,evening:`tarde`,night:`noche`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`a`,pm:`p`,midnight:`mn`,noon:`md`,morning:`de la mañana`,afternoon:`de la tarde`,evening:`de la tarde`,night:`de la noche`},abbreviated:{am:`AM`,pm:`PM`,midnight:`medianoche`,noon:`mediodia`,morning:`de la mañana`,afternoon:`de la tarde`,evening:`de la tarde`,night:`de la noche`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`medianoche`,noon:`mediodia`,morning:`de la mañana`,afternoon:`de la tarde`,evening:`de la tarde`,night:`de la noche`}},defaultFormattingWidth:`wide`})},match:{ordinalNumber:xW({matchPattern:/^(\d+)(º)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:vW({matchPatterns:{narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes de la era com[uú]n)/i,/^(despu[eé]s de cristo|era com[uú]n)/i]},defaultParseWidth:`any`}),quarter:vW({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:vW({matchPatterns:{narrow:/^[efmajsond]/i,abbreviated:/^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,wide:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^e/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^en/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i]},defaultParseWidth:`any`}),day:vW({matchPatterns:{narrow:/^[dlmjvs]/i,short:/^(do|lu|ma|mi|ju|vi|s[áa])/i,abbreviated:/^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,wide:/^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^do/i,/^lu/i,/^ma/i,/^mi/i,/^ju/i,/^vi/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:vW({matchPatterns:{narrow:/^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,any:/^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/^md/i,morning:/mañana/i,afternoon:/tarde/i,evening:/tarde/i,night:/noche/i}},defaultParseWidth:`any`})},options:{weekStartsOn:1,firstWeekContainsDate:1}};function hG({agent:e,onEdit:t}){let n=Id(),{deleteAgent:r}=UR(),{providers:i}=VR(),{models:a}=HR(),o=t=>{t.target.closest(`[role="menuitem"]`)||t.target.closest(`button`)||n(`/agents/${e.id}`)},s=async t=>{if(t.stopPropagation(),(await yg.fire({title:`¿Eliminar Agente?`,text:`¿Estás seguro de que deseas eliminar al agente "${e.name}"? Esta acción eliminará permanentemente su configuración.`,icon:`warning`,showCancelButton:!0,confirmButtonText:`Sí, eliminar`,cancelButtonText:`Cancelar`,reverseButtons:!0,background:`#09090b`,color:`#fff`,customClass:{popup:`border border-white/10 rounded-xl`,confirmButton:`bg-red-500 hover:bg-red-600 text-white`,cancelButton:`bg-white/10 hover:bg-white/20 text-white`}})).isConfirmed)try{await r(e.id)}catch(e){console.error(e)}},c=e.role===`coordinator`,l=e.provider_id||e.providerId,u=e.model_id||e.modelId,d=i.find(e=>e.id===l)?.name||l,f=a.find(e=>e.id===u)?.name||u,p=e.enabled?e.status:`hibernated`,m=e.toolsJson?JSON.parse(e.toolsJson):[],h=e.skillsJson?JSON.parse(e.skillsJson):[],g=m.length||0,_=h.length||0,v=!!e.systemPrompt,y=e.maxIterations||10,b=(e=>{if(!e)return null;try{return XW(new Date(e),`dd MMM yyyy`,{locale:mG})}catch{return null}})(e.created_at||e.createdAt);return(0,I.jsxs)(`div`,{role:`button`,tabIndex:0,className:`group relative overflow-hidden rounded-2xl border bg-black/40 backdrop-blur-xl transition-all duration-500 cursor-pointer flex flex-col h-full
198
- ${e.enabled?c?`border-purple-500/20 hover:border-purple-500/50 hover:bg-white/[0.03] hover:shadow-[0_0_30px_rgba(168,85,247,0.15)]`:`border-white/10 hover:border-blue-500/50 hover:bg-white/[0.03] hover:shadow-[0_0_30px_rgba(59,130,246,0.15)]`:`border-white/5 opacity-70 grayscale hover:grayscale-0`}
199
- `,onClick:o,onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&n(`/agents/${e.id}`)},children:[e.enabled&&(0,I.jsx)(`div`,{className:`absolute top-0 left-0 right-0 h-px bg-gradient-to-r from-transparent ${c?`via-purple-500/60`:`via-blue-500/50`} to-transparent`}),e.enabled&&(0,I.jsx)(`div`,{className:`absolute inset-0 bg-gradient-to-br ${c?`from-purple-500/10 via-transparent to-blue-500/5`:`from-blue-500/10 via-transparent to-purple-500/10`} opacity-0 transition-opacity duration-500 group-hover:opacity-100 pointer-events-none`}),(0,I.jsxs)(`div`,{className:`p-5 flex flex-col flex-1 relative z-10`,children:[(0,I.jsxs)(`div`,{className:`flex items-start justify-between gap-3 mb-4`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,I.jsx)(`div`,{className:`w-11 h-11 rounded-xl flex items-center justify-center shrink-0 border transition-colors
200
- ${c?`bg-purple-500/10 border-purple-500/20 group-hover:border-purple-500/40`:`bg-blue-500/10 border-blue-500/20 group-hover:border-blue-500/40`}`,children:c?(0,I.jsx)(Tr,{className:`h-5 w-5 text-purple-400`}):(0,I.jsx)(bn,{className:`h-5 w-5 text-blue-400`})}),(0,I.jsxs)(`div`,{className:`min-w-0`,children:[(0,I.jsx)(`h3`,{className:`text-base font-bold tracking-tight transition-colors truncate ${e.enabled?`text-white/95 group-hover:text-white`:`text-white/40`}`,children:e.name}),(0,I.jsxs)(`div`,{className:`flex items-center gap-1.5 mt-0.5 flex-wrap`,children:[(0,I.jsx)(`span`,{className:`text-[9px] px-2 py-0.5 rounded-full font-bold uppercase border
201
- ${c?`bg-purple-500/10 text-purple-400 border-purple-500/20`:`bg-blue-500/10 text-blue-400 border-blue-500/20`}`,children:c?`Coordinador`:`Worker`}),e.hasHeaders&&(0,I.jsx)(`span`,{title:`Credenciales Mapeadas`,className:`flex items-center justify-center p-0.5 rounded bg-emerald-500/10 border border-emerald-500/20`,children:(0,I.jsx)(Qn,{className:`h-2.5 w-2.5 text-emerald-400`})}),e.parentId&&(0,I.jsx)(`span`,{title:`Sub-agente`,className:`flex items-center justify-center p-0.5 rounded bg-amber-500/10 border border-amber-500/20`,children:(0,I.jsx)(Fn,{className:`h-2.5 w-2.5 text-amber-400`})})]})]})]}),(0,I.jsxs)(`div`,{className:`flex flex-col items-end gap-2 shrink-0`,children:[(0,I.jsx)(wB,{status:p}),(0,I.jsxs)(SU,{children:[(0,I.jsx)(CU,{asChild:!0,children:(0,I.jsx)(W,{variant:`ghost`,size:`icon`,className:`h-8 w-8 text-white/40 hover:text-white hover:bg-white/10 rounded-full transition-colors`,children:(0,I.jsx)(Tn,{className:`h-4 w-4`})})}),(0,I.jsxs)(EU,{align:`end`,className:`w-48 bg-black/90 backdrop-blur-xl border-white/10 text-white p-1 rounded-xl shadow-2xl`,children:[(0,I.jsxs)(DU,{onClick:()=>t?.(e),className:`gap-2 cursor-pointer focus:bg-white/10 focus:text-white rounded-lg px-3 py-2 text-sm transition-colors`,children:[(0,I.jsx)(or,{className:`h-4 w-4 text-blue-400`}),(0,I.jsx)(`span`,{children:`Editar Configuración`})]}),(0,I.jsxs)(DU,{onClick:s,className:`gap-2 cursor-pointer focus:bg-red-500/20 focus:text-red-400 rounded-lg px-3 py-2 text-sm text-red-400 transition-colors`,children:[(0,I.jsx)(jr,{className:`h-4 w-4`}),(0,I.jsx)(`span`,{children:`Eliminar Agente`})]})]})]})]})]}),(0,I.jsx)(`p`,{className:`text-xs text-white/50 line-clamp-2 leading-relaxed font-light mb-1`,children:e.description||`Sin descripción`}),(0,I.jsxs)(`div`,{className:`mt-5 flex flex-wrap gap-2`,children:[l&&(0,I.jsxs)(`div`,{className:`px-2.5 py-1 rounded-md text-[10px] font-medium uppercase tracking-wider flex items-center gap-1.5 border backdrop-blur-md transition-colors
202
- ${e.enabled?`bg-white/5 border-white/10 text-white/80 group-hover:bg-white/10 group-hover:border-white/20`:`bg-transparent border-white/5 text-white/30`}`,children:[(0,I.jsx)(bn,{className:`h-3 w-3`}),d]}),u&&(0,I.jsx)(`div`,{className:`px-2.5 py-1 rounded-md text-[10px] font-medium tracking-wider border backdrop-blur-md transition-colors truncate max-w-[120px]
203
- ${e.enabled?`bg-white/5 border-white/10 text-white/80 group-hover:bg-white/10 group-hover:border-white/20`:`bg-transparent border-white/5 text-white/30`}`,title:f,children:f}),e.tone&&(0,I.jsxs)(`div`,{className:`px-2.5 py-1 rounded-md text-[10px] font-medium uppercase tracking-wider flex items-center gap-1.5 border backdrop-blur-md transition-colors
204
- ${e.enabled?`bg-white/5 border-white/10 text-white/80 group-hover:bg-white/10 group-hover:border-white/20`:`bg-transparent border-white/5 text-white/30`}`,children:[(0,I.jsx)(Kt,{className:`h-3 w-3`}),e.tone]}),e.workspace&&(0,I.jsxs)(`div`,{className:`px-2.5 py-1 rounded-md text-[10px] font-medium uppercase tracking-wider flex items-center gap-1.5 border backdrop-blur-md transition-colors
205
- ${e.enabled?`bg-emerald-500/5 border-emerald-500/20 text-emerald-300 group-hover:bg-emerald-500/10 group-hover:border-emerald-500/30`:`bg-transparent border-white/5 text-white/30`}`,title:`Workspace: ${e.workspace}`,children:[(0,I.jsx)(Nn,{className:`h-3 w-3`}),(0,I.jsx)(`span`,{className:`truncate max-w-[100px]`,children:`Workspace`})]})]}),(0,I.jsxs)(`div`,{className:`mt-6 pt-5 border-t border-white/5 grid grid-cols-4 gap-2`,children:[(0,I.jsxs)(`div`,{className:`flex flex-col gap-1 items-start bg-white/[0.02] rounded-lg p-2.5 border border-white/5 group-hover:border-white/10 transition-colors`,children:[(0,I.jsxs)(`span`,{className:`text-[10px] font-medium uppercase tracking-wider text-white/40 flex items-center gap-1.5`,children:[(0,I.jsx)(zr,{className:`h-3 w-3 text-emerald-400/70`}),`Tools`]}),(0,I.jsx)(`span`,{className:`text-sm font-semibold font-mono ${e.enabled?`text-white/90`:`text-white/30`}`,children:g})]}),(0,I.jsxs)(`div`,{className:`flex flex-col gap-1 items-start bg-white/[0.02] rounded-lg p-2.5 border border-white/5 group-hover:border-white/10 transition-colors`,children:[(0,I.jsxs)(`span`,{className:`text-[10px] font-medium uppercase tracking-wider text-white/40 flex items-center gap-1.5`,children:[(0,I.jsx)(Vr,{className:`h-3 w-3 text-amber-400/70`}),`Skills`]}),(0,I.jsx)(`span`,{className:`text-sm font-semibold font-mono ${e.enabled?`text-white/90`:`text-white/30`}`,children:_})]}),(0,I.jsxs)(`div`,{className:`flex flex-col gap-1 items-start bg-white/[0.02] rounded-lg p-2.5 border border-white/5 group-hover:border-white/10 transition-colors`,children:[(0,I.jsxs)(`span`,{className:`text-[10px] font-medium uppercase tracking-wider text-white/40 flex items-center gap-1.5`,children:[(0,I.jsx)(An,{className:`h-3 w-3 text-blue-400/70`}),`Prompt`]}),(0,I.jsx)(`span`,{className:`text-sm font-bold ${e.enabled?v?`text-emerald-400`:`text-white/30`:`text-white/20`}`,children:v?`✓`:`—`})]}),(0,I.jsxs)(`div`,{className:`flex flex-col gap-1 items-start bg-white/[0.02] rounded-lg p-2.5 border border-white/5 group-hover:border-white/10 transition-colors`,children:[(0,I.jsxs)(`span`,{className:`text-[10px] font-medium uppercase tracking-wider text-white/40 flex items-center gap-1.5`,children:[(0,I.jsx)(Pn,{className:`h-3 w-3 text-purple-400/70`}),`Iters`]}),(0,I.jsx)(`span`,{className:`text-sm font-semibold font-mono ${e.enabled?`text-white/90`:`text-white/30`}`,children:y})]})]}),e.systemPrompt&&(0,I.jsxs)(`div`,{className:`mt-3 bg-white/[0.02] rounded-lg p-3 border border-white/5 group-hover:border-white/10 transition-colors`,children:[(0,I.jsxs)(`span`,{className:`text-[10px] font-medium tracking-wider text-white/40 uppercase mb-1.5 flex items-center gap-1.5`,children:[(0,I.jsx)(An,{className:`h-3 w-3 text-blue-400/70`}),`System Prompt`]}),(0,I.jsxs)(`p`,{className:`text-xs text-white/60 font-mono line-clamp-2 leading-relaxed italic`,children:[`"`,e.systemPrompt,`"`]})]}),(0,I.jsxs)(`div`,{className:`mt-3 grid grid-cols-2 gap-2`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between bg-white/[0.02] rounded-lg p-2.5 border border-white/5 group-hover:border-white/10 transition-colors`,children:[(0,I.jsx)(`span`,{className:`text-[10px] font-medium tracking-wider text-white/40 uppercase`,children:`Tareas`}),(0,I.jsx)(`span`,{className:`text-sm font-semibold font-mono ${e.enabled?`text-white/90`:`text-white/30`}`,children:e.taskCount||0})]}),(0,I.jsxs)(`div`,{className:`flex items-center justify-between bg-white/[0.02] rounded-lg p-2.5 border border-white/5 group-hover:border-white/10 transition-colors`,children:[(0,I.jsx)(`span`,{className:`text-[10px] font-medium tracking-wider text-white/40 uppercase`,children:`Éxito`}),(0,I.jsxs)(`span`,{className:`text-sm font-semibold font-mono ${e.enabled?`text-emerald-400/90`:`text-white/30`}`,children:[e.successRate||0,`%`]})]})]}),(0,I.jsxs)(`div`,{className:`mt-auto pt-5 flex items-center justify-between`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`div`,{className:`h-2 w-2 rounded-full ${e.enabled?`bg-blue-400 shadow-[0_0_8px_rgba(96,165,250,0.8)] animate-pulse`:`bg-white/20`}`}),(0,I.jsx)(`span`,{className:`text-[10px] font-bold tracking-widest uppercase ${e.enabled?`text-blue-400`:`text-white/30`}`,children:e.enabled?`ACTIVO`:`INACTIVO`})]}),b&&(0,I.jsxs)(`div`,{className:`flex items-center gap-1.5 text-[10px] text-white/30 font-medium tracking-wider pl-3 border-l border-white/10`,children:[(0,I.jsx)(tn,{className:`h-3 w-3`}),b]})]}),(0,I.jsxs)(`div`,{className:`text-xs font-semibold tracking-wide flex items-center gap-1.5 transition-all
206
- ${e.enabled?`text-white/70 group-hover:text-blue-400 translate-x-1 group-hover:translate-x-0`:`text-white/20`}`,children:[`INGRESAR`,(0,I.jsx)(`span`,{className:`transition-transform group-hover:translate-x-1 opacity-0 group-hover:opacity-100 hidden sm:inline-block`,children:`→`})]})]})]})]})}function gG({agents:e,onEdit:t}){return e.length===0?(0,I.jsxs)(`div`,{className:`hive-empty-state`,children:[(0,I.jsx)(`div`,{className:`p-4 rounded-full bg-white/5 mb-4`,children:(0,I.jsx)(`div`,{className:`h-10 w-10 border-2 border-dashed border-white/20 rounded-full`})}),(0,I.jsx)(`p`,{className:`hive-label uppercase`,children:`No se detectaron nodos activos`}),(0,I.jsx)(`p`,{className:`text-xs text-white/20 mt-1`,children:`Comienza desplegando un nuevo agente en tu red.`})]}):(0,I.jsx)(`div`,{className:`grid gap-6 sm:grid-cols-2 lg:grid-cols-3 pb-20`,children:e.map(e=>(0,I.jsx)(hG,{agent:e,onEdit:t},e.id))})}var _G=`Label`,vG=_.forwardRef((e,t)=>(0,I.jsx)(up.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));vG.displayName=_G;var yG=vG,bG=Vt(`text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70`),Z=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(yG,{ref:n,className:H(bG(),e),...t}));Z.displayName=yG.displayName;var xG=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(`textarea`,{className:H(`flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50`,e),ref:n,...t}));xG.displayName=`Textarea`;function SG(e,[t,n]){return Math.min(n,Math.max(t,e))}function CG(e){let t=_.useRef({value:e,previous:e});return _.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var wG=[` `,`Enter`,`ArrowUp`,`ArrowDown`],TG=[` `,`Enter`],EG=`Select`,[DG,OG,kG]=ce(EG),[AG,pfe]=R(EG,[kG,$s]),jG=$s(),[MG,NG]=AG(EG),[PG,FG]=AG(EG),IG=e=>{let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m}=e,h=jG(t),[g,v]=_.useState(null),[y,b]=_.useState(null),[x,S]=_.useState(!1),C=EB(l),[w,T]=Fe({prop:r,defaultProp:i??!1,onChange:a,caller:EG}),[E,D]=Fe({prop:o,defaultProp:s,onChange:c,caller:EG}),O=_.useRef(null),k=g?m||!!g.closest(`form`):!0,[A,j]=_.useState(new Set),M=Array.from(A).map(e=>e.props.value).join(`;`);return(0,I.jsx)(hc,{...h,children:(0,I.jsxs)(MG,{required:p,scope:t,trigger:g,onTriggerChange:v,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:x,onValueNodeHasChildrenChange:S,contentId:Na(),value:E,onValueChange:D,open:w,onOpenChange:T,dir:C,triggerPointerDownPosRef:O,disabled:f,children:[(0,I.jsx)(DG.Provider,{scope:t,children:(0,I.jsx)(PG,{scope:e.__scopeSelect,onNativeOptionAdd:_.useCallback(e=>{j(t=>new Set(t).add(e))},[]),onNativeOptionRemove:_.useCallback(e=>{j(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),k?(0,I.jsxs)(jK,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:d,value:E,onChange:e=>D(e.target.value),disabled:f,form:m,children:[E===void 0?(0,I.jsx)(`option`,{value:``}):null,Array.from(A)]},M):null]})})};IG.displayName=EG;var LG=`SelectTrigger`,RG=_.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=jG(n),o=NG(LG,n),s=o.disabled||r,c=P(t,o.onTriggerChange),l=OG(n),u=_.useRef(`touch`),[d,f,p]=NK(e=>{let t=l().filter(e=>!e.disabled),n=PK(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,I.jsx)(gc,{asChild:!0,...a,children:(0,I.jsx)(z.button,{type:`button`,role:`combobox`,"aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":MK(o.value)?``:void 0,...i,ref:c,onClick:j(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:j(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:j(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&wG.includes(e.key)&&(m(),e.preventDefault())})})})});RG.displayName=LG;var zG=`SelectValue`,BG=_.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=NG(zG,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=P(t,c.onValueNodeChange);return Ee(()=>{l(u)},[l,u]),(0,I.jsx)(z.span,{...s,ref:d,style:{pointerEvents:`none`},children:MK(c.value)?(0,I.jsx)(I.Fragment,{children:o}):a})});BG.displayName=zG;var VG=`SelectIcon`,HG=_.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,I.jsx)(z.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});HG.displayName=VG;var UG=`SelectPortal`,WG=e=>(0,I.jsx)(Oe,{asChild:!0,...e});WG.displayName=UG;var GG=`SelectContent`,KG=_.forwardRef((e,t)=>{let n=NG(GG,e.__scopeSelect),[r,i]=_.useState();if(Ee(()=>{i(new DocumentFragment)},[]),!n.open){let t=r;return t?A.createPortal((0,I.jsx)(JG,{scope:e.__scopeSelect,children:(0,I.jsx)(DG.Slot,{scope:e.__scopeSelect,children:(0,I.jsx)(`div`,{children:e.children})})}),t):null}return(0,I.jsx)(QG,{...e,ref:t})});KG.displayName=GG;var qG=10,[JG,YG]=AG(GG),XG=`SelectContentImpl`,ZG=te(`SelectContent.RemoveScroll`),QG=_.forwardRef((e,t)=>{let{__scopeSelect:n,position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,...v}=e,y=NG(GG,n),[b,x]=_.useState(null),[S,C]=_.useState(null),w=P(t,e=>x(e)),[T,E]=_.useState(null),[D,O]=_.useState(null),k=OG(n),[A,M]=_.useState(!1),N=_.useRef(!1);_.useEffect(()=>{if(b)return cm(b)},[b]),Ep();let F=_.useCallback(e=>{let[t,...n]=k().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&S&&(S.scrollTop=0),n===r&&S&&(S.scrollTop=S.scrollHeight),n?.focus(),document.activeElement!==i))return},[k,S]),L=_.useCallback(()=>F([T,b]),[F,T,b]);_.useEffect(()=>{A&&L()},[A,L]);let{onOpenChange:R,triggerPointerDownPosRef:ee}=y;_.useEffect(()=>{if(b){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(ee.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(ee.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():b.contains(n.target)||R(!1),document.removeEventListener(`pointermove`,t),ee.current=null};return ee.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[b,R,ee]),_.useEffect(()=>{let e=()=>R(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[R]);let[te,ne]=NK(e=>{let t=k().filter(e=>!e.disabled),n=PK(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),re=_.useCallback((e,t,n)=>{let r=!N.current&&!n;(y.value!==void 0&&y.value===t||r)&&(E(e),r&&(N.current=!0))},[y.value]),ie=_.useCallback(()=>b?.focus(),[b]),ae=_.useCallback((e,t,n)=>{let r=!N.current&&!n;(y.value!==void 0&&y.value===t||r)&&O(e)},[y.value]),oe=r===`popper`?nK:eK,se=oe===nK?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,I.jsx)(JG,{scope:n,content:b,viewport:S,onViewportChange:C,itemRefCallback:re,selectedItem:T,onItemLeave:ie,itemTextRefCallback:ae,focusSelectedItem:L,selectedItemText:D,position:r,isPositioned:A,searchRef:te,children:(0,I.jsx)(em,{as:ZG,allowPinchZoom:!0,children:(0,I.jsx)(yp,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:j(i,e=>{y.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,I.jsx)(_e,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:(0,I.jsx)(oe,{role:`listbox`,id:y.contentId,"data-state":y.open?`open`:`closed`,dir:y.dir,onContextMenu:e=>e.preventDefault(),...v,...se,onPlaced:()=>M(!0),ref:w,style:{display:`flex`,flexDirection:`column`,outline:`none`,...v.style},onKeyDown:j(v.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ne(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=k().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>F(t)),e.preventDefault()}})})})})})})});QG.displayName=XG;var $G=`SelectItemAlignedPosition`,eK=_.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=NG(GG,n),o=YG(GG,n),[s,c]=_.useState(null),[l,u]=_.useState(null),d=P(t,e=>u(e)),f=OG(n),p=_.useRef(!1),m=_.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:v,focusSelectedItem:y}=o,b=_.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&v){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=v.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-qG,d=SG(a,[qG,Math.max(qG,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-qG,d=SG(a,[qG,Math.max(qG,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-qG*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),_=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+_+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-qG,D=c-E,O=g.offsetHeight/2,k=g.offsetTop+O,A=m+_+k,j=x-A;if(A<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,h.scrollTop=A-E+h.offsetTop}s.style.margin=`${qG}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,v,a.dir,r]);Ee(()=>b(),[b]);let[x,S]=_.useState();return Ee(()=>{l&&S(window.getComputedStyle(l).zIndex)},[l]),(0,I.jsx)(rK,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:_.useCallback(e=>{e&&m.current===!0&&(b(),y?.(),m.current=!1)},[b,y]),children:(0,I.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:x},children:(0,I.jsx)(z.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});eK.displayName=$G;var tK=`SelectPopperPosition`,nK=_.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=qG,...a}=e,o=jG(n);return(0,I.jsx)(_c,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})});nK.displayName=tK;var[rK,iK]=AG(GG,{}),aK=`SelectViewport`,oK=_.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=YG(aK,n),o=iK(aK,n),s=P(t,a.onViewportChange),c=_.useRef(0);return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,I.jsx)(DG.Slot,{scope:n,children:(0,I.jsx)(z.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:j(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-qG*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})});oK.displayName=aK;var sK=`SelectGroup`,[cK,lK]=AG(sK),uK=_.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Na();return(0,I.jsx)(cK,{scope:n,id:i,children:(0,I.jsx)(z.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});uK.displayName=sK;var dK=`SelectLabel`,fK=_.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=lK(dK,n);return(0,I.jsx)(z.div,{id:i.id,...r,ref:t})});fK.displayName=dK;var pK=`SelectItem`,[mK,hK]=AG(pK),gK=_.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=NG(pK,n),c=YG(pK,n),l=s.value===r,[u,d]=_.useState(a??``),[f,p]=_.useState(!1),m=P(t,e=>c.itemRefCallback?.(e,r,i)),h=Na(),g=_.useRef(`touch`),v=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};if(r===``)throw Error(`A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.`);return(0,I.jsx)(mK,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:_.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,I.jsx)(DG.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,I.jsx)(z.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:j(o.onFocus,()=>p(!0)),onBlur:j(o.onBlur,()=>p(!1)),onClick:j(o.onClick,()=>{g.current!==`mouse`&&v()}),onPointerUp:j(o.onPointerUp,()=>{g.current===`mouse`&&v()}),onPointerDown:j(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:j(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:j(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:j(o.onKeyDown,e=>{c.searchRef?.current!==``&&e.key===` `||(TG.includes(e.key)&&v(),e.key===` `&&e.preventDefault())})})})})});gK.displayName=pK;var _K=`SelectItemText`,vK=_.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=NG(_K,n),s=YG(_K,n),c=hK(_K,n),l=FG(_K,n),[u,d]=_.useState(null),f=P(t,e=>d(e),c.onItemTextChange,e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=u?.textContent,m=_.useMemo(()=>(0,I.jsx)(`option`,{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=l;return Ee(()=>(h(m),()=>g(m)),[h,g,m]),(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(z.span,{id:c.textId,...a,ref:f}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?A.createPortal(a.children,o.valueNode):null]})});vK.displayName=_K;var yK=`SelectItemIndicator`,bK=_.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return hK(yK,n).isSelected?(0,I.jsx)(z.span,{"aria-hidden":!0,...r,ref:t}):null});bK.displayName=yK;var xK=`SelectScrollUpButton`,SK=_.forwardRef((e,t)=>{let n=YG(xK,e.__scopeSelect),r=iK(xK,e.__scopeSelect),[i,a]=_.useState(!1),o=P(t,r.onScrollButtonChange);return Ee(()=>{if(n.viewport&&n.isPositioned){let e=function(){a(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,I.jsx)(TK,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});SK.displayName=xK;var CK=`SelectScrollDownButton`,wK=_.forwardRef((e,t)=>{let n=YG(CK,e.__scopeSelect),r=iK(CK,e.__scopeSelect),[i,a]=_.useState(!1),o=P(t,r.onScrollButtonChange);return Ee(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,I.jsx)(TK,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});wK.displayName=CK;var TK=_.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=YG(`SelectScrollButton`,n),o=_.useRef(null),s=OG(n),c=_.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return _.useEffect(()=>()=>c(),[c]),Ee(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,I.jsx)(z.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:j(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:j(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:j(i.onPointerLeave,()=>{c()})})}),EK=`SelectSeparator`,DK=_.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,I.jsx)(z.div,{"aria-hidden":!0,...r,ref:t})});DK.displayName=EK;var OK=`SelectArrow`,kK=_.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=jG(n),a=NG(OK,n),o=YG(OK,n);return a.open&&o.position===`popper`?(0,I.jsx)(vc,{...i,...r,ref:t}):null});kK.displayName=OK;var AK=`SelectBubbleInput`,jK=_.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{let i=_.useRef(null),a=P(r,i),o=CG(t);return _.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(o!==t&&r){let n=new Event(`change`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[o,t]),(0,I.jsx)(z.select,{...n,style:{...Re,...n.style},ref:a,defaultValue:t})});jK.displayName=AK;function MK(e){return e===``||e===void 0}function NK(e){let t=B(e),n=_.useRef(``),r=_.useRef(0),i=_.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=_.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return _.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function PK(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=FK(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function FK(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var IK=IG,LK=RG,RK=BG,zK=HG,BK=WG,VK=KG,HK=oK,UK=uK,WK=fK,GK=gK,KK=vK,qK=bK,JK=SK,YK=wK,XK=DK,ZK=IK,QK=UK,$K=RK,eq=_.forwardRef(({className:e,children:t,...n},r)=>(0,I.jsxs)(LK,{ref:r,className:H(`flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1`,e),...n,children:[t,(0,I.jsx)(zK,{asChild:!0,children:(0,I.jsx)(an,{className:`h-4 w-4 opacity-50`})})]}));eq.displayName=LK.displayName;var tq=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(JK,{ref:n,className:H(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,I.jsx)(cn,{className:`h-4 w-4`})}));tq.displayName=JK.displayName;var nq=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(YK,{ref:n,className:H(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,I.jsx)(an,{className:`h-4 w-4`})}));nq.displayName=YK.displayName;var rq=_.forwardRef(({className:e,children:t,position:n=`popper`,...r},i)=>(0,I.jsx)(BK,{children:(0,I.jsxs)(VK,{ref:i,className:H(`relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,n===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:n,...r,children:[(0,I.jsx)(tq,{}),(0,I.jsx)(HK,{className:H(`p-1`,n===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]`),children:t}),(0,I.jsx)(nq,{})]})}));rq.displayName=VK.displayName;var iq=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(WK,{ref:n,className:H(`py-1.5 pl-8 pr-2 text-sm font-semibold`,e),...t}));iq.displayName=WK.displayName;var Q=_.forwardRef(({className:e,children:t,...n},r)=>(0,I.jsxs)(GK,{ref:r,className:H(`relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground`,e),...n,children:[(0,I.jsx)(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,I.jsx)(qK,{children:(0,I.jsx)(rn,{className:`h-4 w-4`})})}),(0,I.jsx)(KK,{children:t})]}));Q.displayName=GK.displayName;var aq=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(XK,{ref:n,className:H(`-mx-1 my-1 h-px bg-muted`,e),...t}));aq.displayName=XK.displayName;var oq=`Switch`,[sq,mfe]=R(oq),[cq,lq]=sq(oq),uq=_.forwardRef((e,t)=>{let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c=`on`,onCheckedChange:l,form:u,...d}=e,[f,p]=_.useState(null),m=P(t,e=>p(e)),h=_.useRef(!1),g=f?u||!!f.closest(`form`):!0,[v,y]=Fe({prop:i,defaultProp:a??!1,onChange:l,caller:oq});return(0,I.jsxs)(cq,{scope:n,checked:v,disabled:s,children:[(0,I.jsx)(z.button,{type:`button`,role:`switch`,"aria-checked":v,"aria-required":o,"data-state":hq(v),"data-disabled":s?``:void 0,disabled:s,value:c,...d,ref:m,onClick:j(e.onClick,e=>{y(e=>!e),g&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())})}),g&&(0,I.jsx)(mq,{control:f,bubbles:!h.current,name:r,value:c,checked:v,required:o,disabled:s,form:u,style:{transform:`translateX(-100%)`}})]})});uq.displayName=oq;var dq=`SwitchThumb`,fq=_.forwardRef((e,t)=>{let{__scopeSwitch:n,...r}=e,i=lq(dq,n);return(0,I.jsx)(z.span,{"data-state":hq(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})});fq.displayName=dq;var pq=`SwitchBubbleInput`,mq=_.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...i},a)=>{let o=_.useRef(null),s=P(o,a),c=CG(n),l=Xs(t);return _.useEffect(()=>{let e=o.current;if(!e)return;let t=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(t,`checked`).set;if(c!==n&&i){let t=new Event(`click`,{bubbles:r});i.call(e,n),e.dispatchEvent(t)}},[c,n,r]),(0,I.jsx)(`input`,{type:`checkbox`,"aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:s,style:{...i.style,...l,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}})});mq.displayName=pq;function hq(e){return e?`checked`:`unchecked`}var gq=uq,_q=fq,vq=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(gq,{className:H(`peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50`,e),...t,ref:n,children:(0,I.jsx)(_q,{className:H(`pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0`)})}));vq.displayName=gq.displayName;var yq=Um,bq=Wm,xq=Gm,Sq=Xm,Cq=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(Km,{ref:n,className:H(`fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),...t}));Cq.displayName=Km.displayName;var wq=_.forwardRef(({className:e,children:t,...n},r)=>(0,I.jsxs)(xq,{children:[(0,I.jsx)(Cq,{}),(0,I.jsxs)(qm,{ref:r,className:H(`fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg`,e),...n,children:[t,(0,I.jsxs)(Xm,{className:`absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none`,children:[(0,I.jsx)(Br,{className:`h-4 w-4`}),(0,I.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]}));wq.displayName=qm.displayName;var Tq=({className:e,...t})=>(0,I.jsx)(`div`,{className:H(`flex flex-col space-y-1.5 text-center sm:text-left`,e),...t});Tq.displayName=`DialogHeader`;var Eq=({className:e,...t})=>(0,I.jsx)(`div`,{className:H(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,e),...t});Eq.displayName=`DialogFooter`;var Dq=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(Jm,{ref:n,className:H(`text-lg font-semibold leading-none tracking-tight`,e),...t}));Dq.displayName=Jm.displayName;var Oq=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(Ym,{ref:n,className:H(`text-sm text-muted-foreground`,e),...t}));Oq.displayName=Ym.displayName;function kq({selectedProviderId:e,selectedModelId:t,onProviderChange:n,onModelChange:r,disabled:i=!1}){let{activeProviders:a,getModelsByProvider:o}=VR(),s=(0,_.useMemo)(()=>e?o(e):[],[e,o]);(0,_.useEffect)(()=>{t&&s.length>0&&!s.find(e=>e.id===t)&&r(``)},[s,t,r]);let c=e=>{if(!e)return[];try{return JSON.parse(e)}catch{return[]}};return(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`provider`,children:`Proveedor de IA`}),(0,I.jsxs)(ZK,{value:e||``,onValueChange:n,disabled:i||a.length===0,children:[(0,I.jsx)(eq,{id:`provider`,className:`w-full`,children:(0,I.jsx)($K,{placeholder:`Selecciona un proveedor`})}),(0,I.jsx)(rq,{children:a.length===0?(0,I.jsx)(Q,{value:`none`,disabled:!0,children:`No hay proveedores configurados`}):a.map(e=>(0,I.jsx)(Q,{value:e.id,children:e.name},e.id))})]}),a.length===0&&(0,I.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Configura un proveedor en`,` `,(0,I.jsx)(`a`,{href:`/providers`,className:`text-primary underline`,children:`Settings > Providers`})]})]}),e&&(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`model`,children:`Modelo`}),(0,I.jsxs)(ZK,{value:t||``,onValueChange:r,disabled:i||s.length===0,children:[(0,I.jsx)(eq,{id:`model`,className:`w-full`,children:(0,I.jsx)($K,{placeholder:`Selecciona un modelo`})}),(0,I.jsx)(rq,{children:s.length===0?(0,I.jsx)(Q,{value:`none`,disabled:!0,children:`No hay modelos disponibles`}):s.map(e=>(0,I.jsx)(Q,{value:e.id,children:(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`span`,{children:e.name}),e.contextWindow&&(0,I.jsxs)($z,{variant:`secondary`,className:`text-[10px]`,children:[(e.contextWindow/1e3).toFixed(0),`K ctx`]})]})},e.id))})]}),t&&s.find(e=>e.id===t)&&(0,I.jsx)(XR,{className:`mt-2`,children:(0,I.jsxs)(ez,{className:`p-3 space-y-2`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,I.jsx)(`span`,{className:`text-sm font-medium`,children:s.find(e=>e.id===t)?.name}),(0,I.jsx)($z,{variant:`outline`,children:a.find(t=>t.id===e)?.name})]}),(()=>{let e=c(s.find(e=>e.id===t)?.capabilities);return e.length>0?(0,I.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:e.slice(0,5).map(e=>(0,I.jsx)($z,{variant:`secondary`,className:`text-[10px]`,children:e},e))}):null})()]})})]})]})}var Aq=[{value:`friendly`,label:`Amigable`},{value:`professional`,label:`Profesional`},{value:`casual`,label:`Casual`},{value:`formal`,label:`Formal`},{value:`creative`,label:`Creativo`}];function jq({initialData:e,onSuccess:t,onCancel:n}){let{createAgent:r,updateAgent:i,isLoading:a,error:o}=UR(),{activeProviders:s}=VR(),[c,l]=(0,_.useState)({isValidating:!1,exists:!1,accessible:!1}),[u,d]=(0,_.useState)({name:``,description:``,tone:`professional`,provider_id:``,model_id:``,role:`coordinator`,enabled:!0,systemPrompt:``,workspace:e?.workspace||``});(0,_.useEffect)(()=>{e&&d({...e})},[e]);let f=async e=>{if(!e||e.trim()===``){l({isValidating:!1,exists:!1,accessible:!1});return}l({isValidating:!0,exists:!1,accessible:!1});try{let t=await K(`/api/workspace/validate`,{method:`POST`,body:{path:e}});l({isValidating:!1,exists:t.exists,accessible:t.accessible,error:t.error,message:t.message})}catch(e){l({isValidating:!1,exists:!1,accessible:!1,error:e.message})}},p=async()=>{if(u.workspace)try{await K(`/api/workspace/create`,{method:`POST`,body:{path:u.workspace},showLoader:`Creando directorio...`,showSuccess:`Directorio creado exitosamente`}),await f(u.workspace)}catch(e){yg.fire(`Error`,e.message,`error`)}},m=async()=>{if(u.workspace)try{await K(`/api/workspace/open?path=${encodeURIComponent(u.workspace)}`,{method:`GET`})}catch(e){yg.fire(`Error`,e.message,`error`)}},h=async n=>{if(n.preventDefault(),!u.provider_id||!u.model_id){yg.fire(`Incompleto`,`Por favor selecciona un proveedor y modelo`,`warning`);return}try{e?.id?await i(e.id,u):await r(u),t&&t()}catch(e){console.error(e)}},g=!!e?.id;return(0,I.jsxs)(XR,{className:`hive-card--form group`,children:[(0,I.jsx)(`div`,{className:`hive-glow-blob--card absolute -top-24 -right-24 h-48 w-48 bg-blue-600/10 group-hover:bg-blue-600/20`,style:{borderRadius:`50%`,filter:`blur(80px)`}}),(0,I.jsx)(ZR,{className:`relative`,children:(0,I.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,I.jsx)(`div`,{className:`hive-icon-wrap hive-icon-wrap--primary`,children:g?(0,I.jsx)(mr,{className:`h-5 w-5`}):(0,I.jsx)(Dr,{className:`h-5 w-5`})}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(QR,{className:`text-xl font-bold text-white/90`,children:g?`Configurar Nodo`:`Desplegar Nuevo Nodo`}),(0,I.jsx)($R,{className:`text-white/40`,children:g?`Ajusta los parámetros de tu agente inteligente.`:`Crea una nueva entidad inteligente para tu colmena.`})]})]}),n&&(0,I.jsx)(W,{variant:`ghost`,size:`icon`,onClick:n,className:`text-white/40 hover:text-white hover:bg-white/5`,children:(0,I.jsx)(Br,{className:`h-5 w-5`})})]})}),(0,I.jsx)(ez,{className:`relative space-y-6 pt-2`,children:(0,I.jsxs)(`form`,{onSubmit:h,className:`space-y-8`,children:[(0,I.jsxs)(`div`,{className:`grid gap-6`,children:[(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`name`,className:`hive-label--field`,children:`Nombre del Agente`}),(0,I.jsx)(G,{id:`name`,placeholder:`Ej: Analista de Mercado`,className:`hive-input`,value:u.name,onChange:e=>d({...u,name:e.target.value}),disabled:a,required:!0})]}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`description`,className:`hive-label--field`,children:`Descripción / Rol`}),(0,I.jsx)(xG,{id:`description`,placeholder:`Describe qué hace este agente y cuáles son sus objetivos...`,className:`hive-textarea`,value:u.description,onChange:e=>d({...u,description:e.target.value}),disabled:a})]})]}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,I.jsx)(Z,{htmlFor:`systemPrompt`,className:`hive-label--field`,children:`System Prompt`}),(0,I.jsxs)(yq,{children:[(0,I.jsx)(bq,{asChild:!0,children:(0,I.jsx)(W,{type:`button`,variant:`outline`,size:`sm`,className:`h-7 px-3 text-xs bg-blue-500/10 hover:bg-blue-500/20 text-blue-400 border-blue-500/30 transition-colors`,children:`Modifica acá el System Prompt`})}),(0,I.jsxs)(wq,{className:`sm:max-w-3xl bg-[#0a0a0c] border-white/10 text-white shadow-2xl [&>button]:text-white/50 hover:[&>button]:text-white`,children:[(0,I.jsxs)(Tq,{children:[(0,I.jsx)(Dq,{className:`text-xl`,children:`Editar System Prompt`}),(0,I.jsx)(Oq,{className:`text-sm text-white/50`,children:`El prompt base de comportamiento del agente. Se recomienda formato Markdown.`})]}),(0,I.jsx)(`div`,{className:`py-2`,children:(0,I.jsx)(xG,{value:u.systemPrompt||``,onChange:e=>d({...u,systemPrompt:e.target.value}),className:`min-h-[400px] font-mono text-sm bg-black/40 border-white/10 text-white/90 focus-visible:ring-blue-500/50 resize-y`,placeholder:`Escribe el system prompt detallado aquí...`,disabled:a})}),(0,I.jsx)(Eq,{children:(0,I.jsx)(Sq,{asChild:!0,children:(0,I.jsx)(W,{type:`button`,className:`bg-blue-600 hover:bg-blue-500 text-white shadow-[0_0_15px_rgba(37,99,235,0.3)]`,children:`Guardar Cambios`})})})]})]})]}),u.systemPrompt?(0,I.jsxs)(`p`,{className:`text-xs text-white/40 line-clamp-1 italic border border-white/5 bg-white/[0.02] p-2 rounded-md`,children:[`"`,u.systemPrompt,`"`]}):(0,I.jsx)(`p`,{className:`text-xs text-white/30 italic`,children:`Sin system prompt configurado...`})]}),(0,I.jsxs)(`div`,{className:`space-y-3`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,I.jsx)(Nn,{className:`h-4 w-4 text-emerald-400`}),(0,I.jsx)(`h3`,{className:`hive-title-section`,children:`Workspace Directory`})]}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`workspace`,className:`hive-label--field`,children:`Directorio de Trabajo del Agente`}),(0,I.jsxs)(`div`,{className:`flex gap-2`,children:[(0,I.jsx)(G,{id:`workspace`,placeholder:`Ej: /home/user/proyectos, D:\\Work, /Volumes/USB`,className:`hive-input flex-1 font-mono text-sm`,value:u.workspace,onChange:e=>{d({...u,workspace:e.target.value}),f(e.target.value)},disabled:a}),u.workspace&&c.exists&&c.accessible&&(0,I.jsx)(W,{type:`button`,variant:`outline`,size:`icon`,onClick:m,className:`shrink-0 border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10`,title:`Abrir en el explorador`,children:(0,I.jsx)(Dn,{className:`h-4 w-4`})})]}),(0,I.jsx)(`p`,{className:`text-xs text-white/40 leading-relaxed`,children:`Directorio donde el agente creará archivos, carpetas y ejecutará comandos. Puede ser cualquier ubicación en tu sistema (disco duro, USB, red, etc.).`}),u.workspace&&u.workspace.trim()!==``&&(0,I.jsxs)(`div`,{className:H(`flex items-center gap-2 text-xs p-2.5 rounded-lg border backdrop-blur-md transition-all`,c.isValidating&&`bg-blue-500/10 border-blue-500/20 text-blue-400`,!c.isValidating&&c.exists&&c.accessible&&`bg-emerald-500/10 border-emerald-500/20 text-emerald-400`,!c.isValidating&&c.exists&&!c.accessible&&`bg-amber-500/10 border-amber-500/20 text-amber-400`,!c.isValidating&&!c.exists&&`bg-purple-500/10 border-purple-500/20 text-purple-400`),children:[c.isValidating&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Xn,{className:`h-3.5 w-3.5 animate-spin`}),(0,I.jsx)(`span`,{children:`Validando directorio...`})]}),!c.isValidating&&c.exists&&c.accessible&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(rn,{className:`h-3.5 w-3.5`}),(0,I.jsx)(`span`,{children:c.message||`Directorio válido y accesible`})]}),!c.isValidating&&c.exists&&!c.accessible&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(ln,{className:`h-3.5 w-3.5`}),(0,I.jsx)(`span`,{children:c.message||`El directorio existe pero no tiene permisos de lectura/escritura`})]}),!c.isValidating&&!c.exists&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Nn,{className:`h-3.5 w-3.5`}),(0,I.jsx)(`span`,{children:c.message||`El directorio no existe`}),!c.error&&(0,I.jsx)(W,{type:`button`,variant:`outline`,size:`sm`,onClick:p,className:`ml-auto h-6 px-2 text-xs bg-purple-500/20 hover:bg-purple-500/30 text-purple-300 border-purple-500/30`,children:`Crear directorio`})]})]})]})]}),(0,I.jsx)(`div`,{className:`hive-card-divider`}),(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,I.jsx)(bn,{className:`h-4 w-4 text-blue-400`}),(0,I.jsx)(`h3`,{className:`hive-title-section`,children:`Motor de Inteligencia`})]}),(0,I.jsx)(kq,{selectedProviderId:u.provider_id||void 0,selectedModelId:u.model_id||void 0,onProviderChange:e=>d({...u,provider_id:e,model_id:``}),onModelChange:e=>d({...u,model_id:e}),disabled:a})]}),(0,I.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-6`,children:[(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`tone`,className:`hive-label--field`,children:`Tono de Voz`}),(0,I.jsxs)(ZK,{value:u.tone,onValueChange:e=>d({...u,tone:e}),disabled:a,children:[(0,I.jsx)(eq,{className:`hive-select-trigger`,children:(0,I.jsx)($K,{placeholder:`Selecciona un tono`})}),(0,I.jsx)(rq,{className:`hive-select-content`,children:Aq.map(e=>(0,I.jsx)(Q,{value:e.value,className:`hive-select-item`,children:e.label},e.value))})]})]}),(0,I.jsxs)(`div`,{className:`hive-toggle-panel`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(Tr,{className:`h-3.5 w-3.5 text-purple-400`}),(0,I.jsx)(Z,{htmlFor:`role`,className:`text-xs font-medium text-white/70`,children:`Rol`})]}),(0,I.jsxs)(ZK,{value:u.role,onValueChange:e=>d({...u,role:e}),disabled:a,children:[(0,I.jsx)(eq,{className:`w-[120px] bg-white/5 border-white/10 text-white`,children:(0,I.jsx)($K,{})}),(0,I.jsxs)(rq,{className:`bg-zinc-900 border-white/10`,children:[(0,I.jsx)(Q,{value:`coordinator`,children:`Coordinador`}),(0,I.jsx)(Q,{value:`worker`,children:`Worker`})]})]})]}),(0,I.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`div`,{className:`h-2 w-2 rounded-full ${u.enabled?`bg-blue-400`:`bg-zinc-600`}`}),(0,I.jsx)(Z,{htmlFor:`enabled`,className:`text-xs font-medium text-white/70`,children:`Habilitado`})]}),(0,I.jsx)(vq,{id:`enabled`,checked:u.enabled,onCheckedChange:e=>d({...u,enabled:e}),disabled:a})]})]})]}),o&&(0,I.jsx)(`div`,{className:`hive-form-error`,children:o}),(0,I.jsxs)(`div`,{className:`flex items-center gap-3 pt-4`,children:[n&&(0,I.jsx)(W,{type:`button`,variant:`outline`,onClick:n,disabled:a,className:`hive-btn--form-cancel`,children:`Cancelar`}),(0,I.jsx)(W,{type:`submit`,disabled:a,className:`hive-btn--form-submit`,children:a?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Xn,{className:`mr-2 h-4 w-4 animate-spin`}),`Procesando...`]}):(0,I.jsx)(I.Fragment,{children:g?`Actualizar Agente`:`Desplegar Agente`})})]})]})})]})}function Mq(){let{agents:e,isLoading:t,error:n,fetchAgents:r}=UR(),{fetchProviders:i}=VR(),{fetchModels:a}=HR(),[o,s]=(0,_.useState)(!1),[c,l]=(0,_.useState)(void 0);(0,_.useEffect)(()=>{r(),i(),a()},[r,i,a]);let u=e=>{l(e),s(!0)},d=()=>{l(void 0),s(!0)};return(0,I.jsxs)(`div`,{className:`hive-page mt-10 animate-in fade-in duration-700`,children:[(0,I.jsxs)(`div`,{className:`hive-page-container`,children:[(0,I.jsxs)(`div`,{className:`hive-page-header flex flex-col sm:flex-row sm:items-end justify-between gap-6 relative z-10 mb-8`,children:[(0,I.jsxs)(`div`,{className:`relative z-10 animate-in slide-in-from-left-8 duration-700`,children:[(0,I.jsxs)(`div`,{className:`hive-page-header__eyebrow mb-3 opacity-80`,children:[(0,I.jsx)(`div`,{className:`hive-page-header__dot animate-pulse shadow-[0_0_10px_rgba(59,130,246,0.6)]`}),(0,I.jsx)(`span`,{className:`hive-page-header__label tracking-widest font-semibold text-blue-400`,children:`NEXO CENTRAL`})]}),(0,I.jsxs)(`h2`,{className:`text-4xl md:text-5xl font-black tracking-tight text-white drop-shadow-lg mb-4`,children:[`Agentes `,(0,I.jsx)(`span`,{className:`text-transparent bg-clip-text bg-gradient-to-r from-blue-400 to-purple-500`,children:`Inteligentes`})]}),(0,I.jsx)(`p`,{className:`text-white/60 text-sm max-w-xl leading-relaxed font-light`,children:`Configura y despliega inteligencias autónomas. Cada nodo amplía las capacidades de tu infraestructura personal y de negocio con precisión absoluta.`})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-3 relative z-10 animate-in slide-in-from-right-8 duration-700`,children:[(0,I.jsxs)(`button`,{className:`px-4 py-2 bg-white/5 hover:bg-white/10 text-white/70 hover:text-white rounded-lg border border-white/10 hover:border-white/20 transition-all duration-300 flex items-center gap-2 font-medium text-sm backdrop-blur-sm group`,onClick:()=>r(),disabled:t,children:[(0,I.jsx)(fr,{className:`h-4 w-4 transition-transform duration-500 group-hover:rotate-180 text-blue-400 ${t?`animate-spin`:``}`}),(0,I.jsx)(`span`,{children:`Sincronizar`})]}),(0,I.jsxs)(`button`,{onClick:d,className:`px-4 py-2 bg-blue-600 hover:bg-blue-500 text-white rounded-lg border border-blue-500/50 hover:border-blue-400/50 shadow-[0_0_15px_rgba(37,99,235,0.3)] hover:shadow-[0_0_25px_rgba(59,130,246,0.5)] transition-all duration-300 flex items-center gap-2 font-medium text-sm group`,children:[(0,I.jsx)(lr,{className:`h-4 w-4 transition-transform duration-300 group-hover:rotate-90`}),(0,I.jsx)(`span`,{children:`Desplegar Nodo`})]})]})]}),(0,I.jsxs)(`div`,{className:`relative mt-8`,children:[(0,I.jsx)(`div`,{className:`absolute -top-40 -left-40 h-[500px] w-[500px] bg-blue-600/10 rounded-full blur-[120px] pointer-events-none mix-blend-screen opacity-50`}),(0,I.jsx)(`div`,{className:`absolute top-40 -right-40 h-[400px] w-[400px] bg-purple-600/10 rounded-full blur-[100px] pointer-events-none mix-blend-screen opacity-50`}),n?(0,I.jsxs)(`div`,{className:`relative overflow-hidden rounded-2xl border border-red-500/20 bg-red-500/5 backdrop-blur-lg`,children:[(0,I.jsx)(`div`,{className:`absolute top-0 left-0 w-1 h-full bg-red-500`}),(0,I.jsxs)(`div`,{className:`px-6 py-5 flex items-center gap-4 text-red-400 relative z-10`,children:[(0,I.jsx)(`div`,{className:`p-3 rounded-xl bg-red-500/10 border border-red-500/20 shadow-[0_0_15px_rgba(239,68,68,0.15)]`,children:(0,I.jsx)(Br,{className:`h-6 w-6`})}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`p`,{className:`text-sm font-bold uppercase tracking-widest drop-shadow-sm`,children:`Error de Enlace`}),(0,I.jsx)(`p`,{className:`text-sm text-red-300/70 mt-1 font-light`,children:n})]})]})]}):(0,I.jsx)(`div`,{className:`relative z-10`,children:t&&e.length===0?(0,I.jsx)(`div`,{className:`grid gap-6 sm:grid-cols-2 lg:grid-cols-3`,children:[1,2,3].map(e=>(0,I.jsx)(`div`,{className:`h-64 rounded-2xl border border-white/5 bg-white/[0.02] animate-pulse`},e))}):e.length===0?(0,I.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-20 px-4 text-center border border-white/5 rounded-3xl bg-black/20 backdrop-blur-sm animate-in fade-in duration-1000`,children:[(0,I.jsx)(`div`,{className:`h-20 w-20 rounded-full bg-blue-500/10 border border-blue-500/20 flex items-center justify-center mb-6 shadow-[0_0_30px_rgba(59,130,246,0.15)]`,children:(0,I.jsx)(Zt,{className:`h-10 w-10 text-blue-400`})}),(0,I.jsx)(`h3`,{className:`text-xl font-bold text-white mb-2`,children:`Colmena inactiva`}),(0,I.jsx)(`p`,{className:`text-white/50 max-w-md mx-auto mb-8 leading-relaxed`,children:`La red neuronal está esperando ser poblada. Despliega tu primer nodo agente para comenzar a automatizar tus operaciones.`}),(0,I.jsxs)(`button`,{onClick:d,className:`px-6 py-3 bg-blue-600 hover:bg-blue-500 text-white rounded-xl border border-blue-500/50 hover:border-blue-400/50 shadow-[0_0_20px_rgba(37,99,235,0.4)] transition-all duration-300 flex items-center gap-2 font-bold group`,children:[(0,I.jsx)(lr,{className:`h-5 w-5 transition-transform duration-300 group-hover:scale-125`}),(0,I.jsx)(`span`,{children:`INICIAR DESPLIEGUE`})]})]}):(0,I.jsx)(`div`,{className:`animate-in slide-in-from-bottom-8 duration-1000 fade-in fill-mode-both`,children:(0,I.jsx)(gG,{agents:e,onEdit:u})})})]})]}),o&&(0,I.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6 animate-in fade-in duration-300`,children:[(0,I.jsx)(`div`,{className:`absolute inset-0 bg-black/60 backdrop-blur-md transition-opacity`,onClick:()=>s(!1)}),(0,I.jsx)(`div`,{className:`relative w-full max-w-4xl max-h-[90vh] overflow-y-auto bg-[#09090b] border border-white/10 rounded-2xl shadow-2xl animate-in zoom-in-95 duration-300`,children:(0,I.jsx)(jq,{initialData:c,onSuccess:()=>{s(!1),l(void 0)},onCancel:()=>s(!1)})})]})]})}function Nq({icon:e,...t}){return(0,I.jsx)(e,{...t})}function Pq({agentId:e}){let{agents:t,updateAgent:n,fetchAgents:r}=UR(),{providers:i,fetchProviders:a}=VR(),{models:o,fetchModels:s}=HR();(0,_.useEffect)(()=>{r(),a(),s()},[r,a,s]);let c=t.find(t=>t.id===e),[l,u]=(0,_.useState)({name:``,description:``,provider_id:``,model_id:``,tone:``,role:`coordinator`,enabled:!0,headers:``,systemPrompt:``,workspace:``}),[d,f]=(0,_.useState)({isValidating:!1,exists:!1,accessible:!1});(0,_.useEffect)(()=>{c&&(u({name:c.name||``,description:c.description||``,provider_id:c.provider_id||c.providerId||``,model_id:c.model_id||c.modelId||``,tone:c.tone||``,role:c.role||`coordinator`,enabled:!!c.enabled,headers:``,systemPrompt:c.systemPrompt||``,workspace:c.workspace||``}),c.workspace&&p(c.workspace))},[c]);let p=async e=>{if(!e||e.trim()===``){f({isValidating:!1,exists:!1,accessible:!1});return}f({isValidating:!0,exists:!1,accessible:!1});try{let t=await K(`/api/workspace/validate`,{method:`POST`,body:{path:e}});f({isValidating:!1,exists:t.exists,accessible:t.accessible,error:t.error,message:t.message})}catch(e){f({isValidating:!1,exists:!1,accessible:!1,error:e.message})}},m=async()=>{if(l.workspace)try{await K(`/api/workspace/create`,{method:`POST`,body:{path:l.workspace},showLoader:`Creando directorio...`,showSuccess:`Directorio creado exitosamente`}),await p(l.workspace)}catch(e){bg.fire({icon:`error`,title:e.message})}},h=async()=>{if(l.workspace)try{await K(`/api/workspace/open?path=${encodeURIComponent(l.workspace)}`,{method:`GET`})}catch(e){bg.fire({icon:`error`,title:e.message})}},g=async()=>{_g.show(`Sincronizando configuración del agente...`);try{await n(e,{...l,role:l.role,enabled:l.enabled?1:0,workspace:l.workspace||null}),bg.fire({icon:`success`,title:`Cambios sincronizados correctamente`})}catch(e){bg.fire({icon:`error`,title:e instanceof Error?e.message:`Error al sincronizar cambios`})}finally{_g.hide()}};if(!c)return(0,I.jsxs)(`div`,{className:`flex flex-col items-center justify-center p-12 text-center space-y-4 rounded-3xl border border-dashed border-white/10 bg-white/5`,children:[(0,I.jsx)(Nq,{icon:Kt,className:`h-12 w-12 text-white/10 animate-pulse`}),(0,I.jsx)(`p`,{className:`text-white/40 font-medium`,children:`Buscando nodo en la colmena...`})]});let v=i.filter(e=>{if(!e.active)return!1;let t=e.base_url||e.baseUrl||``,n=e.id===`ollama`||t.includes(`localhost`)||t.includes(`127.0.0.1`);return e.has_api_key||n}),y=o.filter(e=>(e.provider_id||e.providerId)===l.provider_id&&(e.active||e.enabled));return(0,I.jsx)(`div`,{className:`space-y-8 animate-in fade-in slide-in-from-bottom-4 duration-500`,children:(0,I.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-3 gap-8`,children:[(0,I.jsxs)(`div`,{className:`lg:col-span-1 space-y-6`,children:[(0,I.jsxs)(`div`,{className:`p-6 rounded-3xl border border-white/10 bg-black/20 backdrop-blur-md space-y-6`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,I.jsx)(`div`,{className:`p-2 rounded-xl bg-blue-500/10 border border-blue-500/20`,children:(0,I.jsx)(Nq,{icon:Pr,className:`h-4 w-4 text-blue-400`})}),(0,I.jsx)(`h3`,{className:`font-bold text-white uppercase tracking-wider text-xs`,children:`Identidad Base`})]}),(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`name`,className:`text-xs text-white/40 uppercase tracking-widest pl-1`,children:`Nombre Público`}),(0,I.jsx)(G,{id:`name`,value:l.name,onChange:e=>u(t=>({...t,name:e.target.value})),className:`bg-white/5 border-white/10 focus:border-blue-500/50 rounded-xl h-11`,placeholder:`Nombre del nodo`})]}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`tone`,className:`text-xs text-white/40 uppercase tracking-widest pl-1`,children:`Tono Cognitivo`}),(0,I.jsx)(G,{id:`tone`,value:l.tone,onChange:e=>u(t=>({...t,tone:e.target.value})),className:`bg-white/5 border-white/10 focus:border-blue-500/50 rounded-xl h-11`,placeholder:`Ej: Analítico, Conciso...`})]})]})]}),(0,I.jsxs)(`div`,{className:`p-6 rounded-3xl border border-white/10 bg-black/20 backdrop-blur-md space-y-6`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,I.jsx)(`div`,{className:`p-2 rounded-xl bg-purple-500/10 border border-purple-500/20`,children:(0,I.jsx)(Nq,{icon:Tr,className:`h-4 w-4 text-purple-400`})}),(0,I.jsx)(`h3`,{className:`font-bold text-white uppercase tracking-wider text-xs`,children:`Permisos de Red`})]}),(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between p-3 rounded-2xl bg-white/5 hover:bg-white/10 transition-colors`,children:[(0,I.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,I.jsx)(Z,{className:`text-sm font-semibold`,children:`Rol`}),(0,I.jsx)(`p`,{className:`text-[10px] text-white/30`,children:`Coordinador o Worker`})]}),(0,I.jsxs)(ZK,{value:l.role,onValueChange:e=>u(t=>({...t,role:e})),children:[(0,I.jsx)(eq,{className:`w-[120px] bg-white/5 border-white/10 text-white`,children:(0,I.jsx)($K,{})}),(0,I.jsxs)(rq,{className:`bg-zinc-900 border-white/10`,children:[(0,I.jsx)(Q,{value:`coordinator`,children:`Coordinador`}),(0,I.jsx)(Q,{value:`worker`,children:`Worker`})]})]})]}),(0,I.jsxs)(`div`,{className:`flex items-center justify-between p-3 rounded-2xl bg-white/5 hover:bg-white/10 transition-colors`,children:[(0,I.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,I.jsx)(Z,{className:`text-sm font-semibold`,children:`Nodo Activo`}),(0,I.jsx)(`p`,{className:`text-[10px] text-white/30`,children:`Disponible para la colmena`})]}),(0,I.jsx)(vq,{checked:l.enabled,onCheckedChange:e=>u(t=>({...t,enabled:e}))})]})]})]}),(0,I.jsxs)(`div`,{className:`p-6 rounded-3xl border border-white/10 bg-black/20 backdrop-blur-md space-y-6`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,I.jsx)(`div`,{className:`p-2 rounded-xl bg-emerald-500/10 border border-emerald-500/20`,children:(0,I.jsx)(Nq,{icon:Nn,className:`h-4 w-4 text-emerald-400`})}),(0,I.jsx)(`h3`,{className:`font-bold text-white uppercase tracking-wider text-xs`,children:`Workspace Directory`})]}),(0,I.jsx)(`div`,{className:`space-y-4`,children:(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`workspace`,className:`text-xs text-white/40 uppercase tracking-widest pl-1`,children:`Directorio de Trabajo`}),(0,I.jsxs)(`div`,{className:`flex gap-2`,children:[(0,I.jsx)(G,{id:`workspace`,value:l.workspace,onChange:e=>{u(t=>({...t,workspace:e.target.value})),p(e.target.value)},className:`bg-white/5 border-white/10 focus:border-emerald-500/50 rounded-xl h-11 font-mono text-sm flex-1`,placeholder:`Ej: /home/user/proyectos, D:\\Work`}),l.workspace&&d.exists&&d.accessible&&(0,I.jsx)(W,{type:`button`,variant:`outline`,size:`icon`,onClick:h,className:`shrink-0 border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10 h-11 w-11`,title:`Abrir en el explorador`,children:(0,I.jsx)(Dn,{className:`h-4 w-4`})})]}),(0,I.jsx)(`p`,{className:`text-xs text-white/40 leading-relaxed`,children:`Directorio donde el agente operará. Puede ser cualquier ubicación (disco, USB, red).`}),l.workspace&&l.workspace.trim()!==``&&(0,I.jsxs)(`div`,{className:H(`flex items-center gap-2 text-xs p-2.5 rounded-lg border backdrop-blur-md transition-all`,d.isValidating&&`bg-blue-500/10 border-blue-500/20 text-blue-400`,!d.isValidating&&d.exists&&d.accessible&&`bg-emerald-500/10 border-emerald-500/20 text-emerald-400`,!d.isValidating&&d.exists&&!d.accessible&&`bg-amber-500/10 border-amber-500/20 text-amber-400`,!d.isValidating&&!d.exists&&`bg-purple-500/10 border-purple-500/20 text-purple-400`),children:[d.isValidating&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Xn,{className:`h-3.5 w-3.5 animate-spin`}),(0,I.jsx)(`span`,{children:`Validando directorio...`})]}),!d.isValidating&&d.exists&&d.accessible&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(rn,{className:`h-3.5 w-3.5`}),(0,I.jsx)(`span`,{children:d.message||`Directorio válido y accesible`})]}),!d.isValidating&&d.exists&&!d.accessible&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(ln,{className:`h-3.5 w-3.5`}),(0,I.jsx)(`span`,{children:d.message||`Sin permisos de lectura/escritura`})]}),!d.isValidating&&!d.exists&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Nn,{className:`h-3.5 w-3.5`}),(0,I.jsx)(`span`,{children:d.message||`El directorio no existe`}),!d.error&&(0,I.jsx)(W,{type:`button`,variant:`outline`,size:`sm`,onClick:m,className:`ml-auto h-6 px-2 text-xs bg-purple-500/20 hover:bg-purple-500/30 text-purple-300 border-purple-500/30`,children:`Crear`})]})]})]})})]})]}),(0,I.jsx)(`div`,{className:`lg:col-span-2 space-y-6`,children:(0,I.jsxs)(`div`,{className:`p-8 rounded-3xl border border-white/10 bg-black/20 backdrop-blur-md space-y-8`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,I.jsx)(`div`,{className:`p-2 rounded-xl bg-amber-500/10 border border-amber-500/20`,children:(0,I.jsx)(Nq,{icon:Dr,className:`h-4 w-4 text-amber-400`})}),(0,I.jsx)(`h3`,{className:`font-bold text-white uppercase tracking-wider text-xs`,children:`Configuración Cognitiva`})]}),(0,I.jsxs)(W,{onClick:g,className:`bg-blue-600 hover:bg-blue-500 text-white font-bold rounded-xl px-6 shadow-[0_4px_15px_rgba(37,99,235,0.3)] transition-all active:scale-95 gap-2`,children:[(0,I.jsx)(Nq,{icon:mr,className:`h-4 w-4`}),`Sincronizar Cambios`]})]}),(0,I.jsxs)(`div`,{className:`space-y-6`,children:[(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`description`,className:`text-xs text-white/40 uppercase tracking-widest pl-1`,children:`Directiva de Misión (Descripción)`}),(0,I.jsx)(xG,{id:`description`,value:l.description,onChange:e=>u(t=>({...t,description:e.target.value})),className:`bg-white/5 border-white/10 focus:border-blue-500/50 rounded-2xl min-h-[80px] resize-none`,placeholder:`Define el propósito general de este nodo...`})]}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between pl-1`,children:[(0,I.jsx)(Z,{className:`text-xs text-white/40 uppercase tracking-widest`,children:`System Prompt (Markdown)`}),(0,I.jsxs)(yq,{children:[(0,I.jsx)(bq,{asChild:!0,children:(0,I.jsx)(W,{type:`button`,variant:`outline`,size:`sm`,className:`h-7 px-3 text-xs bg-blue-500/10 hover:bg-blue-500/20 text-blue-400 border-blue-500/30 transition-colors`,children:`Modifica acá el System Prompt`})}),(0,I.jsxs)(wq,{className:`sm:max-w-3xl bg-[#0a0a0c] border-white/10 text-white shadow-2xl [&>button]:text-white/50 hover:[&>button]:text-white`,children:[(0,I.jsxs)(Tq,{children:[(0,I.jsx)(Dq,{className:`text-xl`,children:`Editar System Prompt`}),(0,I.jsx)(Oq,{className:`text-sm text-white/50`,children:`El comportamiento principal del agente. Se recomienda usar Markdown.`})]}),(0,I.jsx)(`div`,{className:`py-2`,children:(0,I.jsx)(xG,{value:l.systemPrompt,onChange:e=>u(t=>({...t,systemPrompt:e.target.value})),className:`min-h-[400px] font-mono text-sm bg-black/40 border-white/10 text-white/90 focus-visible:ring-blue-500/50 resize-y`,placeholder:`Escribe el system prompt detallado aquí...`})}),(0,I.jsx)(Eq,{children:(0,I.jsx)(Sq,{asChild:!0,children:(0,I.jsx)(W,{type:`button`,className:`bg-blue-600 hover:bg-blue-500 text-white shadow-[0_0_15px_rgba(37,99,235,0.3)]`,children:`Listo`})})})]})]})]}),l.systemPrompt?(0,I.jsx)(`div`,{className:`bg-white/[0.02] border border-white/5 rounded-2xl p-4 max-h-[120px] overflow-y-auto custom-scrollbar`,children:(0,I.jsx)(`p`,{className:`text-xs text-white/60 font-mono whitespace-pre-wrap italic`,children:l.systemPrompt})}):(0,I.jsx)(`div`,{className:`bg-white/[0.02] border border-white/5 rounded-2xl p-4`,children:(0,I.jsx)(`p`,{className:`text-xs text-white/30 italic`,children:`Sin system prompt configurado...`})})]}),(0,I.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-6`,children:[(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between pl-1`,children:[(0,I.jsx)(Z,{className:`text-xs text-white/40 uppercase tracking-widest`,children:`Proveedor`}),v.length===0&&(0,I.jsx)(`span`,{className:`text-[10px] text-amber-400/80`,children:`Sin providers activos`})]}),(0,I.jsxs)(ZK,{value:l.provider_id,onValueChange:e=>u(t=>({...t,provider_id:e,model_id:``})),children:[(0,I.jsx)(eq,{className:`bg-white/5 border-white/10 rounded-xl h-11`,children:(0,I.jsx)($K,{placeholder:`Seleccionar proveedor`})}),(0,I.jsxs)(rq,{className:`bg-zinc-900 border-white/10 text-white`,children:[v.length===0&&(0,I.jsx)(`div`,{className:`px-3 py-4 text-center text-xs text-white/30`,children:`Activa al menos un provider en la sección de Providers`}),v.map(e=>{let t=e.base_url||e.baseUrl||``,n=e.id===`ollama`||t.includes(`localhost`)||t.includes(`127.0.0.1`);return(0,I.jsx)(Q,{value:e.id,children:(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`span`,{children:e.name}),(0,I.jsx)(`span`,{className:`text-[9px] font-bold px-1.5 py-0.5 rounded-full ${n?`bg-amber-500/20 text-amber-400`:`bg-emerald-500/20 text-emerald-400`}`,children:n?`LOCAL`:`API`})]})},e.id)})]})]})]}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between pl-1`,children:[(0,I.jsx)(Z,{className:`text-xs text-white/40 uppercase tracking-widest`,children:`Modelo`}),l.provider_id&&y.length===0&&(0,I.jsx)(`span`,{className:`text-[10px] text-amber-400/80`,children:`Sin modelos activos`})]}),(0,I.jsxs)(ZK,{value:l.model_id,onValueChange:e=>u(t=>({...t,model_id:e})),disabled:!l.provider_id||y.length===0,children:[(0,I.jsx)(eq,{className:`bg-white/5 border-white/10 rounded-xl h-11 disabled:opacity-50`,children:(0,I.jsx)($K,{placeholder:l.provider_id?y.length===0?`Activa modelos en el provider`:`Seleccionar modelo`:`Primero selecciona un proveedor`})}),(0,I.jsx)(rq,{className:`bg-zinc-900 border-white/10 text-white`,children:y.map(e=>(0,I.jsx)(Q,{value:e.id,children:(0,I.jsx)(`span`,{className:`font-mono text-sm`,children:e.name})},e.id))})]})]})]})]}),(0,I.jsxs)(`div`,{className:`mt-8 p-4 rounded-2xl bg-white/[0.03] border border-white/5 flex items-start gap-4 italic`,children:[(0,I.jsx)(Nq,{icon:In,className:`h-5 w-5 text-white/20 mt-0.5`}),(0,I.jsx)(`p`,{className:`text-[11px] text-white/30 leading-relaxed`,children:`Las credenciales de acceso y llaves de cifrado para los headers personalizados se gestionan en una capa segura y no son visibles en texto plano para mantener la integridad de la red.`})]})]})})]})})}function Fq({agent:e}){let{providers:t}=VR(),{models:n}=HR(),r=e.role===`coordinator`,i=e.provider_id||e.providerId,a=e.model_id||e.modelId,o=e.created_at||e.createdAt,s=o?XW(typeof o==`string`?new Date(o):new Date(o*1e3),`PPP`,{locale:mG}):`Fecha desconocida`,c=t.find(e=>e.id===i)?.name||i,l=n.find(e=>e.id===a)?.name||a;return(0,I.jsxs)(`div`,{className:`hive-card--internal group ${e.enabled?`hive-card--internal-active`:`hive-card--internal-disabled`}`,children:[e.enabled&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`absolute -top-24 -right-24 h-64 w-64 bg-blue-600/10 rounded-full blur-[100px] pointer-events-none group-hover:bg-blue-600/20 transition-all duration-700`}),(0,I.jsx)(`div`,{className:`absolute -bottom-24 -left-24 h-64 w-64 bg-purple-600/10 rounded-full blur-[100px] pointer-events-none group-hover:bg-purple-600/20 transition-all duration-700`})]}),(0,I.jsxs)(`div`,{className:`relative flex flex-col md:flex-row gap-8 items-start justify-between`,children:[(0,I.jsxs)(`div`,{className:`flex-1 space-y-6`,children:[(0,I.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,I.jsx)(`div`,{className:`hive-icon-wrap--internal ${e.enabled?`hive-icon-wrap--internal-active`:`hive-icon-wrap--internal-disabled`}`,children:(0,I.jsx)(jn,{className:`h-6 w-6 ${e.enabled?`text-blue-400`:`text-white/20`}`})}),(0,I.jsxs)(`div`,{children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 mb-1`,children:[(0,I.jsx)(`span`,{className:`hive-page-header__label ${!e.enabled&&`text-white/20`}`,children:`Identidad de Nodo`}),r&&(0,I.jsx)($z,{className:`hive-tag--coordinator ${!e.enabled&&`bg-white/5 text-white/20 border-white/10`}`,children:`Coordinador`})]}),(0,I.jsx)(`h1`,{className:`text-4xl font-black tracking-tighter ${e.enabled?`text-white`:`text-white/40`}`,children:e.name})]})]}),(0,I.jsxs)(`p`,{className:`text-lg leading-relaxed max-w-2xl font-light italic ${e.enabled?`text-white/60`:`text-white/20`}`,children:[`"`,e.description||`Este agente no tiene una descripción definida aún.`,`"`]})]}),(0,I.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4`,children:[(0,I.jsx)(Iq,{icon:bn,label:`Infraestructura`,value:c,subValue:l,color:e.enabled?`text-blue-400`:`text-white/20`,enabled:e.enabled}),(0,I.jsx)(Iq,{icon:Vr,label:`Personalidad`,value:e.tone||`Neutral`,color:e.enabled?`text-purple-400`:`text-white/20`,enabled:e.enabled}),(0,I.jsx)(Iq,{icon:tn,label:`Desplegado el`,value:s,color:e.enabled?`text-emerald-400`:`text-white/20`,enabled:e.enabled})]})]}),(0,I.jsxs)(`div`,{className:`flex flex-col items-center md:items-end gap-6 min-w-[200px]`,children:[(0,I.jsxs)(`div`,{className:`text-center md:text-right space-y-2`,children:[(0,I.jsx)(`span`,{className:`hive-label block`,children:`Estado Operativo`}),(0,I.jsx)(wB,{status:e.enabled?e.status:`hibernated`,className:`px-6 py-2 text-sm border-2`})]}),(0,I.jsxs)(`div`,{className:`hive-network-panel md:w-auto`,children:[(0,I.jsxs)(`div`,{className:`flex-1`,children:[(0,I.jsx)(`p`,{className:`hive-label mb-1`,children:`Carga de Red`}),(0,I.jsx)(`div`,{className:`hive-network-track`,children:e.enabled&&(0,I.jsx)(`div`,{className:`hive-network-fill`})})]}),(0,I.jsx)(Kt,{className:`h-5 w-5 ${e.enabled?`text-blue-400 animate-pulse`:`text-white/10`}`})]})]})]}),(0,I.jsx)(`div`,{className:`hive-strip--bottom ${!e.enabled&&`opacity-20`}`}),(0,I.jsxs)(`div`,{className:`absolute top-4 right-8 hive-mono hidden md:block`,children:[`NODE_UID: `,e.id]})]})}function Iq({icon:e,label:t,value:n,subValue:r,color:i,enabled:a}){return(0,I.jsxs)(`div`,{className:`hive-info-card ${a?`hive-info-card--active`:`hive-info-card--disabled`}`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,I.jsx)(e,{className:`h-3.5 w-3.5 ${i}`}),(0,I.jsx)(`span`,{className:`hive-info-card__label`,children:t})]}),(0,I.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,I.jsx)(`p`,{className:`hive-info-card__value ${a?`text-white/80 group-hover/item:text-white`:`text-white/20`}`,children:n}),r&&(0,I.jsx)(`p`,{className:`hive-info-card__sub ${a?`text-white/40`:`text-white/10`}`,children:r})]})]})}function Lq(){let{id:e}=Bd(),t=Id(),n=e??`unknown`,{agents:r,fetchAgents:i,isLoading:a}=UR();(0,_.useEffect)(()=>{i()},[i]);let o=r.find(e=>e.id===n);return(0,I.jsx)(`div`,{className:`min-h-screen bg-transparent pb-20`,children:(0,I.jsxs)(`div`,{className:`max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 animate-in fade-in slide-in-from-bottom-4 duration-700`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between mb-8`,children:[(0,I.jsxs)(W,{variant:`ghost`,onClick:()=>t(`/agents`),className:`group flex items-center gap-2 text-white/40 hover:text-white hover:bg-white/5 px-4 py-2 rounded-xl transition-all`,children:[(0,I.jsx)(on,{className:`h-4 w-4 transition-transform group-hover:-translate-x-1`}),(0,I.jsx)(`span`,{className:`text-sm font-bold uppercase tracking-widest`,children:`Volver a la Colmena`})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-4 text-white/20`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(Yn,{className:`h-4 w-4`}),(0,I.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-widest`,children:`Agentes`})]}),(0,I.jsx)(`div`,{className:`h-4 w-px bg-white/10`}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(Kt,{className:`h-4 w-4`}),(0,I.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-widest`,children:`Detalles Operativos`})]})]})]}),o?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Fq,{agent:o}),(0,I.jsx)(`div`,{className:`grid grid-cols-1 gap-8`,children:(0,I.jsx)(Pq,{agentId:n})})]}):(0,I.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-[60vh] text-center space-y-6`,children:[(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsx)(`div`,{className:`h-24 w-24 rounded-full border-4 border-t-blue-500 border-white/5 animate-spin`}),(0,I.jsx)(Kt,{className:`absolute inset-0 m-auto h-8 w-8 text-blue-400 animate-pulse`})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h3`,{className:`text-xl font-bold text-white mb-2`,children:`Sincronizando con el Nodo`}),(0,I.jsx)(`p`,{className:`text-white/40 max-w-xs mx-auto`,children:`Estamos recuperando la configuración cuántica de este agente desde la base de datos central.`})]})]})]})})}var Rq=Gh((e,t)=>({isLoading:!1,error:null,configs:[],conflicts:[],templates:[],setLoading:t=>e({isLoading:t}),setError:t=>e({error:t}),fetchEthics:async()=>{e({isLoading:!0,error:null});try{let t=(await K(`/api/ethics`)).ethics||[],n=t.find(e=>e.active)||t[0];return e({configs:t,isLoading:!1}),n?.content||``}catch(t){throw e({isLoading:!1,error:t instanceof Error?t.message:`Failed to fetch ethics`}),t}},saveEthics:async n=>{e({isLoading:!0,error:null});try{let r=t(),i=r.configs.find(e=>e.active)||r.configs[0],a;return a=i?await K(`/api/ethics/${i.id}`,{method:`PUT`,body:{content:n}}):await K(`/api/ethics`,{method:`POST`,body:{name:`Default`,content:n,active:!0}}),e({isLoading:!1}),a.message||`Guardado correctamente`}catch(t){throw e({isLoading:!1,error:t instanceof Error?t.message:`Failed to save ethics`}),t}},fetchConfigs:async()=>{e({isLoading:!0,error:null});try{e({configs:await K(`/api/workspace/ethics/configs`),isLoading:!1})}catch(t){e({isLoading:!1,error:t instanceof Error?t.message:`Failed to fetch configs`})}},fetchConflicts:async()=>{e({isLoading:!0,error:null});try{e({conflicts:await K(`/api/workspace/ethics/conflicts`),isLoading:!1})}catch(t){e({isLoading:!1,error:t instanceof Error?t.message:`Failed to fetch conflicts`})}},fetchTemplates:async()=>{e({isLoading:!0,error:null});try{e({templates:await K(`/api/workspace/ethics/templates`),isLoading:!1})}catch(t){e({isLoading:!1,error:t instanceof Error?t.message:`Failed to fetch templates`})}},updateConfig:(t,n)=>{e(e=>({configs:e.configs.map(e=>e.id===t?{...e,...n,updatedAt:new Date().toISOString(),version:e.version+1}:e)}))},addConfig:t=>{let n={...t,id:Bi(),version:1,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};e(e=>({configs:[...e.configs,n]}))},removeConfig:t=>{e(e=>({configs:e.configs.filter(e=>e.id!==t)}))}}));function zq(){let{configs:e,fetchEthics:t,isLoading:n}=Rq(),[r,i]=(0,_.useState)(null),[a,o]=(0,_.useState)(!1),[s,c]=(0,_.useState)({name:``,description:``,content:``}),[l,u]=(0,_.useState)(!1),d=(0,_.useRef)(null),f=()=>{let e=d.current;e&&(e.style.height=`auto`,e.style.height=`${e.scrollHeight}px`)};(0,_.useEffect)(()=>{a&&setTimeout(f,0)},[a,s.content]),(0,_.useEffect)(()=>{t().catch(console.error)},[t]),(0,_.useEffect)(()=>{if(e.length===0)return;let t=e,n=t.find(e=>e.active)||t[0];r||(i(n.id),c({name:n.name,description:n.description||``,content:n.content}))},[e,r]);let p=e.find(e=>e.id===r),m=e=>{i(e.id),c({name:e.name,description:e.description||``,content:e.content}),o(!0)},h=async n=>{_g.show(`Activando registro de ética...`);let r=e;try{let e=await Promise.all(r.map(e=>K(`/api/ethics/${e.id}`,{method:`PUT`,body:{active:e.id===n?1:0}}).catch(()=>({}))));await t();let i=e.find((e,t)=>r[t].id===n);bg.fire({icon:`success`,title:i?.message||`Registro de ética activado`})}catch(e){bg.fire({icon:`error`,title:e instanceof Error?e.message:`Error al activar registro`})}finally{_g.hide()}};return n&&e.length===0?(0,I.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-20 border border-white/5 bg-zinc-950/30 rounded-2xl`,children:[(0,I.jsx)(Xn,{className:`h-8 w-8 animate-spin text-amber-500 mb-4 opacity-50`}),(0,I.jsx)(`span`,{className:`hive-label`,children:`Cargando lineamientos operativos...`})]}):(0,I.jsxs)(`div`,{className:`space-y-8 animate-fade-in`,children:[(0,I.jsxs)(`div`,{className:`flex flex-col sm:flex-row sm:items-center justify-between gap-4`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,I.jsx)(`h3`,{className:`hive-title-section !text-lg`,children:`Protocolos Éticos`}),(0,I.jsxs)(`span`,{className:`hive-tag hive-tag--provider`,children:[e.length,` REGISTROS`]})]}),(0,I.jsx)(`p`,{className:`hive-subtitle !mt-0 !text-xs`,children:`Define la capa moral y los límites operacionales de tus agentes inteligentes.`})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2 text-[10px] uppercase tracking-widest font-black text-white/20 bg-white/5 px-4 py-2 rounded-xl border border-white/5`,children:[(0,I.jsx)(Tr,{className:`h-3.5 w-3.5`}),(0,I.jsx)(`span`,{children:`Configuración del Núcleo`})]})]}),e.length===0?(0,I.jsx)(`div`,{className:`hive-card border-dashed border-white/10 bg-white/[0.02]`,children:(0,I.jsxs)(`div`,{className:`hive-card-body flex flex-col items-center justify-center py-16 px-4`,children:[(0,I.jsx)(`div`,{className:`h-16 w-16 rounded-2xl bg-white/5 flex items-center justify-center mb-6`,children:(0,I.jsx)(Nr,{className:`h-8 w-8 text-white/20`})}),(0,I.jsxs)(`div`,{className:`text-center`,children:[(0,I.jsx)(`p`,{className:`hive-title-section text-center mb-2`,children:`Sin Protocolos Base`}),(0,I.jsx)(`p`,{className:`text-xs text-white/40 mb-8 max-w-[300px] mx-auto leading-relaxed`,children:`No se han detectado lineamientos éticos en el sistema. Selecciona una de las plantillas inferiores para comenzar.`})]})]})}):(0,I.jsx)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6`,children:e.map(e=>{let t=!!e.active,n=r===e.id;return(0,I.jsxs)(`div`,{onClick:()=>m(e),className:`hive-card group transition-all duration-500 cursor-pointer ${n?`hive-card--active`:`opacity-60 grayscale-[0.8] hover:opacity-100 hover:grayscale-0`}`,children:[(0,I.jsxs)(`div`,{className:`hive-card-body relative overflow-hidden`,children:[(0,I.jsxs)(`div`,{className:`flex items-start justify-between mb-6`,children:[(0,I.jsx)(`div`,{className:`hive-icon-wrap--internal ${n?`hive-icon-wrap--internal-active`:`hive-icon-wrap--internal-disabled`}`,children:(0,I.jsx)(Sr,{className:`h-6 w-6`})}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[t&&(0,I.jsx)(`span`,{className:`hive-status-label--active`,children:`ACTIVO`}),(0,I.jsx)(`div`,{className:t?`hive-status-dot--active`:`hive-status-dot--disabled`})]})]}),(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h3`,{className:`text-lg font-black text-white uppercase tracking-tighter mb-1 line-clamp-1 group-hover:text-blue-400 transition-colors text-ellipsis`,children:e.name}),(0,I.jsx)(`p`,{className:`text-xs text-white/40 font-medium leading-relaxed line-clamp-1 h-4`,children:e.description||`Sin descripción adicional`})]}),(0,I.jsxs)(`div`,{className:`pt-4 border-t border-white/5 flex items-center gap-4`,children:[(0,I.jsxs)(`div`,{className:`hive-stat`,children:[(0,I.jsx)(`span`,{className:`hive-stat__label`,children:`CONFIG`}),(0,I.jsx)(`span`,{className:`hive-stat__value`,children:e.is_default?`DEFAULT`:`CUSTOM`})]}),(0,I.jsxs)(`div`,{className:`hive-stat`,children:[(0,I.jsx)(`span`,{className:`hive-stat__label`,children:`PRECEDENCIA`}),(0,I.jsx)(`span`,{className:`hive-stat__value`,children:t?`ALTA`:`NORMAL`})]})]})]}),n&&(0,I.jsx)(`div`,{className:`hive-glow-blob--card hive-glow-blob--blue -bottom-10 -right-10 h-24 w-24 opacity-20`})]}),(0,I.jsx)(`div`,{className:`hive-strip--bottom ${t?``:`opacity-20`}`})]},e.id)})}),(0,I.jsx)(yq,{open:a,onOpenChange:o,children:(0,I.jsx)(wq,{className:`max-w-4xl border-white/10 !bg-[#09090b] p-0 overflow-hidden shadow-2xl`,children:p&&(0,I.jsxs)(`div`,{className:`flex flex-col h-full`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between p-6 border-b border-white/5 bg-white/5 relative overflow-hidden`,children:[(0,I.jsx)(`div`,{className:`hive-glow-blob hive-glow-blob--blue -top-10 -right-10 h-32 w-32 opacity-20`}),(0,I.jsxs)(`div`,{className:`flex items-center gap-4 relative z-10`,children:[(0,I.jsx)(`div`,{className:`hive-icon-wrap--internal hive-icon-wrap--internal-active`,children:(0,I.jsx)(Tr,{className:`h-6 w-6`})}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(Dq,{className:`hive-title-page !text-2xl uppercase tracking-tighter`,children:p.name}),(0,I.jsx)(Oq,{className:`hive-subtitle !mt-0`,children:`Sintonización de la capa moral y operativa del agente.`})]})]}),(0,I.jsx)(`div`,{className:`flex items-center gap-3 relative z-10`,children:!p.active&&(0,I.jsx)(`button`,{className:`hive-btn hive-btn--ghost px-6 text-[10px]`,onClick:()=>h(p.id),children:`ESTABLECER COMO ACTIVO`})})]}),(0,I.jsx)(`div`,{className:`p-6 space-y-4 border-b border-white/5`,children:(0,I.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-4`,children:[(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{className:`hive-label uppercase !text-[10px]`,children:`Nombre del Protocolo`}),(0,I.jsx)(G,{value:s.name,onChange:e=>c(t=>({...t,name:e.target.value})),className:`bg-white/5 border-white/5 focus-visible:ring-blue-500/30 text-white font-bold`})]}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{className:`hive-label uppercase !text-[10px]`,children:`Descripción / Meta`}),(0,I.jsx)(G,{value:s.description,onChange:e=>c(t=>({...t,description:e.target.value})),className:`bg-white/5 border-white/5 focus-visible:ring-blue-500/30 text-white/60 text-xs italic`})]})]})}),(0,I.jsxs)(`div`,{className:`p-0 bg-[#09090b]`,children:[(0,I.jsx)(`div`,{className:`px-6 pt-4`,children:(0,I.jsx)(Z,{className:`hive-label uppercase !text-[10px]`,children:`Lineamientos de Capa (Markdown)`})}),(0,I.jsx)(xG,{ref:d,placeholder:`Define los lineamientos éticos del agente...`,value:s.content,onChange:e=>{c(t=>({...t,content:e.target.value})),f()},className:`hive-textarea w-full !bg-zinc-950/50 border-none focus-visible:ring-0 text-amber-50/90 font-mono text-xs leading-relaxed min-h-[400px] p-8 resize-none placeholder:text-white/10 overflow-hidden`})]}),(0,I.jsxs)(`div`,{className:`p-6 bg-white/[0.02] border-t border-white/5 flex items-center justify-between`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-6`,children:[(0,I.jsxs)(`div`,{className:`hive-stat`,children:[(0,I.jsx)(`span`,{className:`hive-stat__label`,children:`IDENTIFICADOR`}),(0,I.jsx)(`span`,{className:`hive-stat__value`,children:p.id})]}),(0,I.jsxs)(`div`,{className:`hive-stat`,children:[(0,I.jsx)(`span`,{className:`hive-stat__label`,children:`ESTADO DE CAPA`}),(0,I.jsx)(`span`,{className:`hive-stat__value hive-stat__value--active`,children:p.active?`SISTEMA ACTIVO`:`PENDIENTE`})]})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,I.jsx)(`button`,{className:`hive-btn hive-btn--ghost px-6 text-[10px]`,onClick:()=>o(!1),children:`CANCELAR`}),(0,I.jsx)(`button`,{onClick:async()=>{if(p){u(!0),_g.show(`Guardando lineamientos éticos...`);try{let e=await K(`/api/ethics/${p.id}`,{method:`PUT`,body:s});await t(),bg.fire({icon:`success`,title:e.message||`Contenido ético guardado`})}catch(e){bg.fire({icon:`error`,title:e instanceof Error?e.message:`Error al guardar`})}finally{u(!1),_g.hide(),o(!1)}}},disabled:l,className:`hive-btn hive-btn--primary px-8 text-[10px]`,children:l?`SINCRONIZANDO...`:`GUARDAR LINEAMIENTOS`})]})]})]})})})]})}var Bq={filesystem:`Sistema de archivos`,web:`Web`,codebridge:`Code Bridge`,schedule:`Cron`,projects:`Proyectos`,cli:`CLI`,agents:`Agentes`,canvas:`Canvas`,voice:`Voz`};function Vq(){let{tools:e,isLoading:t,fetchTools:n,toggleTool:r,updateTool:i}=WR(),[a,o]=(0,_.useState)(`all`),[s,c]=(0,_.useState)(null),[l,u]=(0,_.useState)(null),[d,f]=(0,_.useState)(!1);(0,_.useEffect)(()=>{n()},[n]);let p=async(e,t)=>{if(!l){u(e);try{await r(e,t),n(),bg.fire({icon:`success`,title:`Herramienta ${t?`activada`:`desactivada`}`})}catch{bg.fire({icon:`error`,title:`Error al actualizar estado de la herramienta`})}finally{u(null)}}},m=async()=>{if(s){f(!0),_g.show(`Guardando herramienta...`);try{await i(s.id,{name:s.name,description:s.description}),bg.fire({icon:`success`,title:`Herramienta actualizada`}),n(),c(null)}catch{bg.fire({icon:`error`,title:`Error al guardar cambios`})}finally{f(!1),_g.hide()}}};if(t&&e.length===0)return(0,I.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-20 border border-white/5 bg-zinc-950/30 rounded-2xl`,children:[(0,I.jsx)(Xn,{className:`h-8 w-8 animate-spin text-violet-500 mb-4 opacity-50`}),(0,I.jsx)(`span`,{className:`text-xs uppercase font-bold tracking-[0.2em] text-zinc-500`,children:`Cargando herramientas...`})]});let h=e.filter(e=>a===`all`?!0:e.category===a);return(0,I.jsxs)(`div`,{className:`space-y-8 animate-fade-in`,children:[(0,I.jsxs)(`div`,{className:`flex flex-col sm:flex-row sm:items-center justify-between gap-4`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,I.jsx)(`h3`,{className:`hive-title-section !text-lg !text-white/80`,children:`Herramientas`}),(0,I.jsxs)(`span`,{className:`hive-tag bg-white/5 text-white/40 border-white/10`,children:[h.length,` DISPONIBLES`]})]}),(0,I.jsx)(`p`,{className:`hive-subtitle !mt-0 !text-xs`,children:`Gestiona las capacidades externas y el arsenal tecnológico de tu agente.`})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2 text-[10px] uppercase tracking-widest font-black text-white/20 bg-white/5 px-4 py-2 rounded-xl border border-white/5`,children:[(0,I.jsx)(zr,{className:`h-3.5 w-3.5`}),(0,I.jsx)(`span`,{children:`Arsenal Operativo`})]})]}),(0,I.jsx)(`div`,{className:`flex items-center gap-1.5 p-1 bg-white/5 rounded-2xl w-fit border border-white/5`,children:[`all`,`filesystem`,`web`,`schedule`,`codebridge`,`cli`,`agents`,`canvas`,`voice`].map(e=>(0,I.jsx)(`button`,{onClick:()=>o(e),className:`px-6 py-2 rounded-xl text-[10px] font-black tracking-widest uppercase transition-all duration-300 ${a===e?`bg-blue-600 text-white shadow-btn-primary`:`text-white/20 hover:text-white/40 hover:bg-white/5`}`,children:e===`all`?`TODAS`:Bq[e]||e},e))}),h.length===0?(0,I.jsxs)(`div`,{className:`py-16 flex flex-col items-center justify-center border border-dashed border-white/10 rounded-2xl bg-zinc-950/20 group hover:border-violet-500/20 transition-colors`,children:[(0,I.jsx)(`div`,{className:`p-4 rounded-full bg-zinc-900 mb-4 group-hover:scale-110 transition-transform`,children:(0,I.jsx)(Nr,{className:`h-8 w-8 text-zinc-700 group-hover:text-violet-500/50 transition-colors`})}),(0,I.jsx)(`p`,{className:`text-xs text-zinc-500 font-medium`,children:`Sin herramientas en esta categoría.`})]}):(0,I.jsx)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6`,children:h.map(e=>{let t=e.active,n=e.core;return(0,I.jsxs)(`div`,{onClick:()=>c({...e}),className:`hive-card group cursor-pointer transition-all duration-500 ${t?`hive-card--active`:`hive-card--disabled`}`,children:[(0,I.jsxs)(`div`,{className:`hive-card-body relative overflow-hidden`,children:[(0,I.jsxs)(`div`,{className:`flex items-start justify-between mb-6`,children:[(0,I.jsxs)(`div`,{className:`hive-icon-wrap--internal ${t?`hive-icon-wrap--internal-active`:`hive-icon-wrap--internal-disabled`}`,children:[e.category===`filesystem`&&(0,I.jsx)(wn,{className:`h-6 w-6`}),e.category===`web`&&(0,I.jsx)(wn,{className:`h-6 w-6`}),e.category===`schedule`&&(0,I.jsx)(gr,{className:`h-6 w-6`}),e.category===`cli`&&(0,I.jsx)(Ar,{className:`h-6 w-6`}),e.category===`codebridge`&&(0,I.jsx)(Ar,{className:`h-6 w-6`}),e.category===`agents`&&(0,I.jsx)(br,{className:`h-6 w-6`}),e.category===`projects`&&(0,I.jsx)(Ar,{className:`h-6 w-6`}),e.category===`canvas`&&(0,I.jsx)(Ar,{className:`h-6 w-6`}),e.category===`voice`&&(0,I.jsx)(br,{className:`h-6 w-6`})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[n&&(0,I.jsx)(`span`,{className:`hive-status-label--active`,children:`NATIVO`}),(0,I.jsx)(vq,{checked:t,onCheckedChange:()=>p(e.id,!t),onClick:e=>e.stopPropagation(),className:`data-[state=checked]:bg-blue-500 scale-75 origin-right`})]})]}),(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h3`,{className:`text-lg font-black text-white uppercase tracking-tighter mb-1 line-clamp-1 group-hover:text-blue-400 transition-colors`,children:e.name}),(0,I.jsx)(`p`,{className:`hive-subtitle !mt-0 !text-[11px] h-8 line-clamp-2`,children:e.description||`Sin descripción disponible`})]}),(0,I.jsxs)(`div`,{className:`pt-4 border-t border-white/5 flex items-center gap-4`,children:[(0,I.jsxs)(`div`,{className:`hive-stat`,children:[(0,I.jsx)(`span`,{className:`hive-stat__label`,children:`TIPO`}),(0,I.jsx)(`span`,{className:`hive-stat__value truncate max-w-[80px]`,children:e.category})]}),(0,I.jsxs)(`div`,{className:`hive-stat`,children:[(0,I.jsx)(`span`,{className:`hive-stat__label`,children:`ESTADO`}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`div`,{className:t?`hive-status-dot--active`:`hive-status-dot--disabled`}),(0,I.jsx)(`span`,{className:t?`hive-status-label--active`:`hive-status-label--disabled`,children:t?`ACTIVE`:`STANDBY`})]})]})]})]}),t&&(0,I.jsx)(`div`,{className:`hive-glow-blob--card hive-glow-blob--blue -bottom-10 -right-10 h-24 w-24 opacity-20`})]}),(0,I.jsx)(`div`,{className:`hive-strip--bottom ${t?``:`opacity-20`}`})]},e.id)})}),(0,I.jsx)(yq,{open:!!s,onOpenChange:e=>!e&&c(null),children:(0,I.jsxs)(wq,{className:`sm:max-w-sm bg-zinc-950 border-white/10`,children:[(0,I.jsxs)(Tq,{children:[(0,I.jsxs)(Dq,{className:`flex items-center gap-2 text-sm`,children:[(0,I.jsx)(`div`,{className:`p-1.5 rounded-lg bg-violet-500/10 text-violet-400`,children:(0,I.jsx)(br,{className:`h-3.5 w-3.5`})}),`Editar herramienta`]}),(0,I.jsx)(Oq,{className:`text-[10px] text-zinc-500 font-medium`,children:`Modifica los parámetros y la descripción de la herramienta seleccionada.`})]}),(0,I.jsxs)(`div`,{className:`space-y-3 py-2`,children:[(0,I.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,I.jsx)(Z,{className:`text-[10px] text-zinc-500 uppercase tracking-widest font-bold`,children:`Nombre`}),(0,I.jsx)(G,{value:s?.name||``,onChange:e=>c({...s,name:e.target.value}),className:`h-9 text-sm bg-white/5 border-white/10 focus:border-violet-500/50`})]}),(0,I.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,I.jsx)(Z,{className:`text-[10px] text-zinc-500 uppercase tracking-widest font-bold`,children:`Descripción`}),(0,I.jsx)(xG,{value:s?.description||``,onChange:e=>c({...s,description:e.target.value}),className:`text-sm min-h-[80px] resize-none bg-white/5 border-white/10 focus:border-violet-500/50 font-mono`})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2 pt-1 border-t border-white/5`,children:[(0,I.jsx)(`span`,{className:`font-mono text-[10px] bg-zinc-900 border border-white/5 text-zinc-500 px-2 py-0.5 rounded truncate max-w-[180px]`,children:s?.id}),(0,I.jsx)($z,{variant:`outline`,className:`text-[9px] border-zinc-800 text-zinc-500 uppercase`,children:s?.category})]})]}),(0,I.jsxs)(Eq,{className:`gap-2 sm:gap-0`,children:[(0,I.jsx)(W,{variant:`outline`,size:`sm`,onClick:()=>c(null),className:`hive-btn--form-cancel h-10`,children:`Cancelar`}),(0,I.jsxs)(W,{size:`sm`,onClick:m,disabled:d,className:`hive-btn--form-submit h-10`,children:[d&&(0,I.jsx)(Xn,{className:`h-3.5 w-3.5 animate-spin`}),`Guardar Cambios`]})]})]})})]})}function Hq({server:e,onClick:t,isConnected:n,isLoading:r}){let i=n||e.status===`connected`,a=e.transport===`stdio`;return(0,I.jsxs)(XR,{onClick:t,className:`group relative overflow-hidden transition-all hover:border-cyan-500/50 hover:shadow-lg hover:shadow-cyan-500/5 cursor-pointer border-white/5 bg-zinc-950/50 backdrop-blur-sm ${i?`border-cyan-500/20 bg-cyan-500/[0.02]`:`opacity-80 grayscale-[0.2]`} ${r?`pointer-events-none opacity-50`:``}`,children:[(0,I.jsx)(`div`,{className:`absolute top-0 left-0 w-1 h-full transition-colors ${i?`bg-cyan-500`:`bg-zinc-800`}`}),(0,I.jsxs)(ZR,{className:`pb-2`,children:[(0,I.jsxs)(`div`,{className:`flex items-start justify-between mb-2`,children:[(0,I.jsx)(`div`,{className:`p-2 rounded-lg transition-colors ${i?`bg-cyan-500/10 text-cyan-400`:`bg-zinc-800 text-zinc-500`}`,children:a?(0,I.jsx)(bn,{className:`h-5 w-5`}):(0,I.jsx)(In,{className:`h-5 w-5`})}),(0,I.jsx)(`div`,{className:`flex items-center gap-2`,children:i?(0,I.jsxs)(`div`,{className:`flex items-center gap-1.5 px-2 py-0.5 rounded-full bg-cyan-500/10 border border-cyan-500/20`,children:[(0,I.jsx)(`div`,{className:`h-1.5 w-1.5 rounded-full bg-cyan-500 animate-pulse`}),(0,I.jsx)(`span`,{className:`text-[10px] font-bold text-cyan-500 uppercase tracking-wider`,children:`LIVE`})]}):(0,I.jsx)($z,{variant:`outline`,className:`text-[10px] border-zinc-800 text-zinc-500 uppercase tracking-tighter`,children:`OFFLINE`})})]}),(0,I.jsx)(QR,{className:`text-sm font-bold truncate group-hover:text-cyan-400 transition-colors`,children:e.name}),(0,I.jsx)($R,{className:`text-[10px] font-mono opacity-50 truncate mt-0.5`,children:e.url||`stdio: ${e.transport}`})]}),(0,I.jsxs)(ez,{className:`pt-0 pb-4`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3 mt-2`,children:[(0,I.jsxs)(`div`,{className:`flex flex-col`,children:[(0,I.jsx)(`span`,{className:`text-[9px] text-zinc-500 uppercase font-bold tracking-widest`,children:`Transport`}),(0,I.jsx)(`span`,{className:`text-xs font-semibold text-zinc-300`,children:e.transport})]}),(0,I.jsx)(`div`,{className:`h-4 w-px bg-white/10`}),(0,I.jsxs)(`div`,{className:`flex flex-col`,children:[(0,I.jsx)(`span`,{className:`text-[9px] text-zinc-500 uppercase font-bold tracking-widest`,children:`Tools`}),(0,I.jsxs)(`span`,{className:`text-xs font-semibold text-zinc-300`,children:[e.tools?.length||e.tools_count||0,` expuestas`]})]})]}),e.builtin&&(0,I.jsx)($z,{variant:`outline`,className:`mt-3 text-[9px] border-amber-500/20 text-amber-500/70 bg-amber-500/5`,children:`BUILTIN`})]}),i&&(0,I.jsx)(`div`,{className:`absolute -bottom-6 -right-6 w-12 h-12 bg-cyan-500/10 blur-2xl rounded-full`})]})}function Uq({serverId:e,serverName:t,tools:n=[]}){let[r,i]=(0,_.useState)(``),a=n.filter(e=>e.name.toLowerCase().includes(r.toLowerCase())||e.description.toLowerCase().includes(r.toLowerCase()));return(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 relative`,children:[(0,I.jsx)(gr,{className:`absolute left-2.5 top-2.5 h-3.5 w-3.5 text-zinc-500`}),(0,I.jsx)(G,{placeholder:`Buscar herramientas...`,className:`pl-8 h-8 text-[11px] bg-white/5 border-white/10 focus:border-cyan-500/30`,value:r,onChange:e=>i(e.target.value)})]}),(0,I.jsx)(`div`,{className:`space-y-2 max-h-[300px] overflow-y-auto pr-1 custom-scrollbar`,children:a.length===0?(0,I.jsx)(`div`,{className:`py-8 text-center text-[10px] text-zinc-500 italic`,children:r?`No se encontraron herramientas que coincidan.`:`Este servidor no expone herramientas actualmente.`}):a.map(e=>(0,I.jsxs)(`div`,{className:`p-3 rounded-lg bg-zinc-900/50 border border-white/5 hover:border-cyan-500/20 transition-all group`,children:[(0,I.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`div`,{className:`p-1.5 rounded bg-cyan-500/5 text-cyan-400 group-hover:bg-cyan-500/10 transition-colors`,children:(0,I.jsx)(Rn,{className:`h-3.5 w-3.5`})}),(0,I.jsx)(`h5`,{className:`text-[11px] font-bold text-zinc-200 group-hover:text-cyan-400 transition-colors`,children:e.name})]}),e.inputSchema&&(0,I.jsx)($z,{variant:`outline`,className:`text-[9px] border-zinc-800 text-zinc-600 h-4`,children:`JSON Schema`})]}),(0,I.jsx)(`p`,{className:`mt-1.5 text-[10px] text-zinc-500 leading-relaxed line-clamp-2`,children:e.description})]},e.name))}),(0,I.jsxs)(`div`,{className:`p-2 rounded bg-cyan-500/5 border border-cyan-500/10 flex items-center gap-2`,children:[(0,I.jsx)(Un,{className:`h-3 w-3 text-cyan-500`}),(0,I.jsxs)(`span`,{className:`text-[9px] text-cyan-200/50`,children:[`Estas herramientas son gestionadas directamente por `,(0,I.jsx)(`span`,{className:`text-cyan-400 font-mono`,children:t}),`.`]})]})]})}function Wq(e){return e?e[`x-api-key`]?{authType:`api-key`,authToken:e[`x-api-key`]}:e.Authorization?.startsWith(`Bearer `)?{authType:`bearer`,authToken:e.Authorization.replace(`Bearer `,``)}:Object.keys(e).length>0?{authType:`custom`,authToken:``}:{authType:`none`,authToken:``}:{authType:`none`,authToken:``}}function Gq({server:e,onClose:t}){let{updateMCPServer:n,toggleMCPServer:r,deleteMCPServer:i,fetchMCPServers:a}=KR(),[o,s]=(0,_.useState)(e.transport||`stdio`),[c,l]=(0,_.useState)(e.command||``),[u,d]=(0,_.useState)(e.args?.join(` `)||``),[f,p]=(0,_.useState)(e.url||``),[m,h]=(0,_.useState)(()=>Wq(e.headers).authType),[g,v]=(0,_.useState)(()=>Wq(e.headers).authToken),[y,b]=(0,_.useState)(e.headers?JSON.stringify(e.headers,null,2):``),[x,S]=(0,_.useState)(!1),[C,w]=(0,_.useState)(!1),[T,E]=(0,_.useState)(!1),[D,O]=(0,_.useState)(!0),[k,A]=(0,_.useState)(!1),[j,M]=(0,_.useState)(`config`),[N,P]=(0,_.useState)(e.status),[F,L]=(0,_.useState)(e.active),R=N===`connected`||F===1||F===!0;return(0,_.useEffect)(()=>{let t=!1;return(async()=>{O(!0);try{let n=await K(`/api/mcp/servers/${e.id}`);if(t)return;s(n.transport||`stdio`),l(n.command||``),d(Array.isArray(n.args)?n.args.join(` `):``),p(n.url||``);let r=Wq(n.headers);h(r.authType),v(r.authToken),b(n.headers?JSON.stringify(n.headers,null,2):``),P(n.status||e.status),L(n.enabled?1:0)}catch{}finally{t||O(!1)}})(),()=>{t=!0}},[e.id]),(0,I.jsx)(yq,{open:!0,onOpenChange:e=>!e&&t(),children:(0,I.jsxs)(wq,{className:`sm:max-w-[500px] border-cyan-500/20 bg-zinc-950/95 backdrop-blur-xl p-0 overflow-hidden`,children:[(0,I.jsx)(`div`,{className:`absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-transparent via-cyan-500/50 to-transparent`}),(0,I.jsxs)(Tq,{className:`p-6 pb-0`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,I.jsx)(`div`,{className:`p-2 rounded-lg ${R?`bg-cyan-500/10 text-cyan-400`:`bg-zinc-800 text-zinc-500`}`,children:(0,I.jsx)(br,{className:`h-5 w-5`})}),(0,I.jsxs)(`div`,{children:[(0,I.jsxs)(Dq,{className:`text-white flex items-center gap-2`,children:[`Configurar `,e.name,R&&(0,I.jsx)(`div`,{className:`h-1.5 w-1.5 rounded-full bg-cyan-500 animate-pulse`})]}),(0,I.jsxs)(Oq,{className:`text-[10px] font-mono opacity-50 uppercase tracking-widest mt-0.5`,children:[`ID: `,e.id,` • `,e.transport]})]})]}),!e.builtin&&(0,I.jsx)(W,{variant:`ghost`,size:`icon`,onClick:()=>A(!0),disabled:C||k,className:`text-zinc-600 hover:text-red-400 hover:bg-red-400/10 h-8 w-8 transition-colors`,title:`Eliminar Servidor`,children:(0,I.jsx)(jr,{className:`h-4 w-4`})})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-1 mt-6 border-b border-white/5`,children:[(0,I.jsxs)(`button`,{onClick:()=>M(`config`),className:`px-4 py-2 text-[10px] uppercase font-bold tracking-widest transition-all relative ${j===`config`?`text-cyan-400`:`text-zinc-500 hover:text-zinc-300`}`,children:[`Configuración`,j===`config`&&(0,I.jsx)(`div`,{className:`absolute bottom-0 left-0 w-full h-0.5 bg-cyan-500`})]}),(0,I.jsxs)(`button`,{onClick:()=>M(`tools`),className:`px-4 py-2 text-[10px] uppercase font-bold tracking-widest transition-all relative ${j===`tools`?`text-cyan-400`:`text-zinc-500 hover:text-zinc-300`}`,children:[`Herramientas`,j===`tools`&&(0,I.jsx)(`div`,{className:`absolute bottom-0 left-0 w-full h-0.5 bg-cyan-500`})]})]})]}),k&&(0,I.jsxs)(`div`,{className:`mx-6 mt-4 p-3 rounded-lg bg-red-500/10 border border-red-500/30 animate-in fade-in slide-in-from-top-2 duration-200`,children:[(0,I.jsxs)(`p`,{className:`text-xs text-red-400 font-medium mb-3`,children:[`¿Eliminar `,(0,I.jsx)(`span`,{className:`font-bold`,children:e.name}),`? Esta acción no se puede deshacer.`]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2 justify-end`,children:[(0,I.jsx)(W,{variant:`ghost`,size:`sm`,onClick:()=>A(!1),disabled:C,className:`h-7 px-3 text-[10px] font-bold uppercase tracking-wider text-zinc-400 hover:text-white`,children:`Cancelar`}),(0,I.jsx)(W,{size:`sm`,onClick:async()=>{w(!0);try{await K(`/api/mcp/servers/${e.id}`,{method:`DELETE`,showLoader:`Eliminando servidor...`,showError:!0}),await a(),t()}catch{}finally{w(!1),A(!1)}},disabled:C,className:`h-7 px-3 text-[10px] font-bold uppercase tracking-wider bg-red-600 hover:bg-red-500 text-white`,children:C?(0,I.jsx)(Xn,{className:`h-3 w-3 animate-spin`}):`Sí, eliminar`})]})]}),(0,I.jsx)(`div`,{className:`p-6`,children:j===`config`?(0,I.jsxs)(`div`,{className:`space-y-4 animate-in fade-in duration-300`,children:[D&&(0,I.jsxs)(`div`,{className:`flex items-center gap-2 text-[10px] text-zinc-500`,children:[(0,I.jsx)(Xn,{className:`h-3 w-3 animate-spin`}),(0,I.jsx)(`span`,{children:`Cargando configuración...`})]}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{className:`text-[10px] font-bold text-zinc-500 uppercase tracking-widest`,children:`Transporte`}),(0,I.jsxs)(ZK,{value:o,onValueChange:s,children:[(0,I.jsx)(eq,{className:`bg-white/5 border-white/10 h-9`,children:(0,I.jsx)($K,{})}),(0,I.jsxs)(rq,{className:`bg-zinc-900 border-white/10`,children:[(0,I.jsx)(Q,{value:`stdio`,className:`focus:bg-cyan-500/20 focus:text-cyan-400`,children:(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(Ar,{className:`h-3.5 w-3.5`}),(0,I.jsx)(`span`,{children:`stdio (Binario Local)`})]})}),(0,I.jsx)(Q,{value:`sse`,className:`focus:bg-cyan-500/20 focus:text-cyan-400`,children:(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(In,{className:`h-3.5 w-3.5`}),(0,I.jsx)(`span`,{children:`SSE (Remote HTTP)`})]})})]})]})]}),o===`stdio`?(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{className:`text-[10px] font-bold text-zinc-500 uppercase tracking-widest`,children:`Comando`}),(0,I.jsx)(G,{value:c,onChange:e=>l(e.target.value),className:`bg-white/5 border-white/10 focus:border-cyan-500/50 h-9`})]}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{className:`text-[10px] font-bold text-zinc-500 uppercase tracking-widest`,children:`Argumentos`}),(0,I.jsx)(G,{value:u,onChange:e=>d(e.target.value),className:`bg-white/5 border-white/10 focus:border-cyan-500/50 h-9`})]})]}):(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{className:`text-[10px] font-bold text-zinc-500 uppercase tracking-widest`,children:`Endpoint URL`}),(0,I.jsx)(G,{value:f,onChange:e=>p(e.target.value),className:`bg-white/5 border-white/10 focus:border-cyan-500/50 h-9`})]}),(0,I.jsxs)(`div`,{className:`space-y-4 pt-2 border-t border-white/5`,children:[(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{className:`text-[10px] font-bold text-zinc-500 uppercase tracking-widest`,children:`Autenticación`}),(0,I.jsxs)(ZK,{value:m,onValueChange:h,children:[(0,I.jsx)(eq,{className:`bg-white/5 border-white/10 focus:border-cyan-500/50 h-9`,children:(0,I.jsx)($K,{})}),(0,I.jsxs)(rq,{className:`bg-zinc-900 border-white/10`,children:[(0,I.jsx)(Q,{value:`none`,className:`focus:bg-cyan-500/20 focus:text-cyan-400`,children:(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(In,{className:`h-3.5 w-3.5`}),(0,I.jsx)(`span`,{children:`Ninguna`})]})}),(0,I.jsx)(Q,{value:`api-key`,className:`focus:bg-cyan-500/20 focus:text-cyan-400`,children:(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(Gn,{className:`h-3.5 w-3.5`}),(0,I.jsx)(`span`,{children:`API Key (x-api-key)`})]})}),(0,I.jsx)(Q,{value:`bearer`,className:`focus:bg-cyan-500/20 focus:text-cyan-400`,children:(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(Cr,{className:`h-3.5 w-3.5`}),(0,I.jsx)(`span`,{children:`Bearer Token (Authorization)`})]})}),(0,I.jsx)(Q,{value:`custom`,className:`focus:bg-cyan-500/20 focus:text-cyan-400`,children:(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(vn,{className:`h-3.5 w-3.5`}),(0,I.jsx)(`span`,{children:`Custom Headers (JSON)`})]})})]})]})]}),(m===`api-key`||m===`bearer`)&&(0,I.jsxs)(`div`,{className:`space-y-2 animate-in fade-in slide-in-from-top-1 duration-200`,children:[(0,I.jsx)(Z,{className:`text-[10px] font-bold text-zinc-500 uppercase tracking-widest`,children:m===`api-key`?`API Key`:`Bearer Token`}),(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsx)(G,{type:`password`,placeholder:`sk-...`,value:g,onChange:e=>v(e.target.value),className:`bg-white/5 border-white/10 focus:border-cyan-500/50 transition-all h-9 pl-9`}),(0,I.jsx)(Qn,{className:`absolute left-3 top-2.5 h-3.5 w-3.5 text-zinc-500`})]})]}),m===`custom`&&(0,I.jsxs)(`div`,{className:`space-y-2 animate-in fade-in slide-in-from-top-1 duration-200`,children:[(0,I.jsx)(`div`,{className:`flex items-center justify-between`,children:(0,I.jsx)(Z,{className:`text-[10px] font-bold text-zinc-500 uppercase tracking-widest`,children:`Headers JSON`})}),(0,I.jsx)(`textarea`,{value:y,onChange:e=>b(e.target.value),placeholder:`{ "x-custom-auth": "secret" }`,rows:3,className:`w-full bg-white/5 border border-white/10 rounded-md p-2 text-xs text-zinc-300 focus:outline-none focus:border-cyan-500/50 transition-all font-mono`})]})]})]}),(0,I.jsxs)(`div`,{className:`p-3 rounded-lg bg-zinc-900 border border-white/5 flex items-center justify-between mt-6`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,I.jsx)(`div`,{className:`p-1.5 rounded-full ${R?`bg-green-500/10 text-green-400`:`bg-zinc-800 text-zinc-500`}`,children:(0,I.jsx)(ur,{className:`h-3.5 w-3.5 ${R?`animate-pulse`:``}`})}),(0,I.jsxs)(`div`,{className:`flex flex-col`,children:[(0,I.jsx)(`span`,{className:`text-[10px] font-bold text-zinc-300 uppercase tracking-tight`,children:`Estado del Nodo`}),(0,I.jsx)(`span`,{className:`text-[9px] font-mono ${R?`text-green-500`:`text-zinc-500`}`,children:R?`ACTIVE_CONNECTION`:`INACTIVE_NODE`})]})]}),(0,I.jsx)(W,{size:`sm`,variant:R?`outline`:`default`,onClick:async()=>{E(!0),_g.show(R?`Desconectando servidor...`:`Conectando servidor...`);try{await r(e.id,!R),L(R?0:1),P(R?`disconnected`:`connected`),bg.fire({icon:`success`,title:R?`Servidor desconectado`:`Servidor conectado`}),setTimeout(a,1500)}catch{bg.fire({icon:`error`,title:`Error al cambiar estado de conexión`})}finally{E(!1),_g.hide()}},disabled:T,className:`h-7 px-4 text-[10px] font-bold uppercase tracking-wider ${R?`border-zinc-800 text-zinc-400 hover:bg-zinc-800`:`bg-cyan-600 hover:bg-cyan-500 text-white`}`,children:T?(0,I.jsx)(Xn,{className:`h-3 w-3 animate-spin`}):R?`Desconectar`:`Conectar`})]})]}):(0,I.jsx)(`div`,{className:`animate-in fade-in duration-300`,children:(0,I.jsx)(Uq,{serverId:e.id,serverName:e.name,tools:e.tools||[]})})}),(0,I.jsxs)(Eq,{className:`p-6 bg-white/[0.02] border-t border-white/5`,children:[(0,I.jsx)(W,{variant:`ghost`,onClick:t,className:`text-zinc-500 hover:text-white`,children:`Cerrar`}),j===`config`&&(0,I.jsx)(W,{onClick:async()=>{S(!0),_g.show(`Actualizando configuración...`);try{let t={transport:o};if(o===`stdio`){if(!c){bg.fire({icon:`warning`,title:`El comando es obligatorio`});return}t.command=c;let e=u.trim();if(e.startsWith(`[`)&&e.endsWith(`]`))try{t.args=JSON.parse(e)}catch{t.args=e.match(/"[^"]*"|'[^']*'|[^\\s,]+/g)?.map(e=>e.replace(/^["']|["']$/g,``).replace(/,$/,``).trim()).filter(Boolean)||[]}else t.args=e.match(/"[^"]*"|'[^']*'|[^\\s,]+/g)?.map(e=>e.replace(/^["']|["']$/g,``).replace(/,$/,``).trim()).filter(Boolean)||[]}else if(o===`sse`){if(!f){bg.fire({icon:`warning`,title:`La URL es obligatoria`});return}t.url=f;let e={};if(m===`api-key`&&g)e[`x-api-key`]=g;else if(m===`bearer`&&g)e.Authorization=`Bearer ${g}`;else if(m===`custom`&&y.trim())try{e=JSON.parse(y.trim())}catch{bg.fire({icon:`error`,title:`JSON de Headers inválido`});return}Object.keys(e).length>0&&(t.headers=e)}await n(e.id,t),await a(),bg.fire({icon:`success`,title:`Configuración actualizada`})}catch(e){bg.fire({icon:`error`,title:e instanceof Error?e.message:`Error al actualizar configuración`})}finally{S(!1),_g.hide()}},disabled:x,className:`bg-cyan-600 hover:bg-cyan-500 text-white min-w-[120px]`,children:x?(0,I.jsx)(Xn,{className:`h-4 w-4 animate-spin`}):`Guardar Cambios`})]})]})})}function Kq(){let{fetchMCPServers:e}=KR(),[t,n]=(0,_.useState)(!1),[r,i]=(0,_.useState)(``),[a,o]=(0,_.useState)(``),[s,c]=(0,_.useState)(``),[l,u]=(0,_.useState)(`stdio`),[d,f]=(0,_.useState)(``),[p,m]=(0,_.useState)(`none`),[h,g]=(0,_.useState)(``),[v,y]=(0,_.useState)(``),[b,x]=(0,_.useState)(!1);return(0,I.jsxs)(yq,{open:t,onOpenChange:n,children:[(0,I.jsx)(bq,{asChild:!0,children:(0,I.jsxs)(W,{className:`bg-cyan-600 hover:bg-cyan-500 text-white shadow-lg shadow-cyan-600/20 gap-2`,children:[(0,I.jsx)(lr,{className:`h-4 w-4`}),`Añadir Servidor MCP`]})}),(0,I.jsxs)(wq,{className:`sm:max-w-[425px] border-cyan-500/20 bg-zinc-950/95 backdrop-blur-xl`,children:[(0,I.jsxs)(Tq,{children:[(0,I.jsxs)(Dq,{className:`flex items-center gap-2 text-white`,children:[(0,I.jsx)(`div`,{className:`p-1.5 rounded-md bg-cyan-500/10 text-cyan-400`,children:(0,I.jsx)(yr,{className:`h-4 w-4`})}),`Nuevo Servidor MCP`]}),(0,I.jsx)(Oq,{className:`text-zinc-400`,children:`Conecta una nueva fuente de herramientas para tus agentes mediante el protocolo MCP.`})]}),(0,I.jsxs)(`div`,{className:`grid gap-4 py-4`,children:[(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`mcp-name`,className:`text-[10px] font-bold text-zinc-500 uppercase tracking-widest`,children:`Nombre Identificador`}),(0,I.jsx)(G,{id:`mcp-name`,placeholder:`github-tools`,value:r,onChange:e=>i(e.target.value),className:`bg-white/5 border-white/10 focus:border-cyan-500/50 transition-all h-9`})]}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{className:`text-[10px] font-bold text-zinc-500 uppercase tracking-widest`,children:`Protocolo de Transporte`}),(0,I.jsxs)(ZK,{value:l,onValueChange:u,children:[(0,I.jsx)(eq,{className:`bg-white/5 border-white/10 focus:border-cyan-500/50 h-9`,children:(0,I.jsx)($K,{})}),(0,I.jsxs)(rq,{className:`bg-zinc-900 border-white/10`,children:[(0,I.jsx)(Q,{value:`stdio`,className:`focus:bg-cyan-500/20 focus:text-cyan-400`,children:(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(Ar,{className:`h-3.5 w-3.5`}),(0,I.jsx)(`span`,{children:`stdio (Binario Local)`})]})}),(0,I.jsx)(Q,{value:`sse`,className:`focus:bg-cyan-500/20 focus:text-cyan-400`,children:(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(In,{className:`h-3.5 w-3.5`}),(0,I.jsx)(`span`,{children:`SSE (Remote HTTP)`})]})})]})]})]}),l===`stdio`?(0,I.jsxs)(`div`,{className:`space-y-4 animate-in fade-in slide-in-from-top-2 duration-300`,children:[(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`mcp-cmd`,className:`text-[10px] font-bold text-zinc-500 uppercase tracking-widest`,children:`Comando Ejecutable`}),(0,I.jsx)(G,{id:`mcp-cmd`,placeholder:`npx`,value:a,onChange:e=>o(e.target.value),className:`bg-white/5 border-white/10 focus:border-cyan-500/50 transition-all h-9`})]}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`mcp-args`,className:`text-[10px] font-bold text-zinc-500 uppercase tracking-widest`,children:`Argumentos`}),(0,I.jsx)(G,{id:`mcp-args`,placeholder:`-y @modelcontextprotocol/server-github`,value:s,onChange:e=>c(e.target.value),className:`bg-white/5 border-white/10 focus:border-cyan-500/50 transition-all h-9`})]})]}):(0,I.jsxs)(`div`,{className:`space-y-4 animate-in fade-in slide-in-from-top-2 duration-300`,children:[(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`mcp-url`,className:`text-[10px] font-bold text-zinc-500 uppercase tracking-widest`,children:`Endpoint URL`}),(0,I.jsx)(G,{id:`mcp-url`,placeholder:`https://mcp-server.com/sse`,value:d,onChange:e=>f(e.target.value),className:`bg-white/5 border-white/10 focus:border-cyan-500/50 transition-all h-9`})]}),(0,I.jsxs)(`div`,{className:`space-y-4 pt-2 border-t border-white/5`,children:[(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{className:`text-[10px] font-bold text-zinc-500 uppercase tracking-widest`,children:`Autenticación`}),(0,I.jsxs)(ZK,{value:p,onValueChange:m,children:[(0,I.jsx)(eq,{className:`bg-white/5 border-white/10 focus:border-cyan-500/50 h-9`,children:(0,I.jsx)($K,{})}),(0,I.jsxs)(rq,{className:`bg-zinc-900 border-white/10`,children:[(0,I.jsx)(Q,{value:`none`,className:`focus:bg-cyan-500/20 focus:text-cyan-400`,children:(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(In,{className:`h-3.5 w-3.5`}),(0,I.jsx)(`span`,{children:`Ninguna`})]})}),(0,I.jsx)(Q,{value:`api-key`,className:`focus:bg-cyan-500/20 focus:text-cyan-400`,children:(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(Gn,{className:`h-3.5 w-3.5`}),(0,I.jsx)(`span`,{children:`API Key (x-api-key)`})]})}),(0,I.jsx)(Q,{value:`bearer`,className:`focus:bg-cyan-500/20 focus:text-cyan-400`,children:(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(Cr,{className:`h-3.5 w-3.5`}),(0,I.jsx)(`span`,{children:`Bearer Token (Authorization)`})]})}),(0,I.jsx)(Q,{value:`custom`,className:`focus:bg-cyan-500/20 focus:text-cyan-400`,children:(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(vn,{className:`h-3.5 w-3.5`}),(0,I.jsx)(`span`,{children:`Custom Headers (JSON)`})]})})]})]})]}),(p===`api-key`||p===`bearer`)&&(0,I.jsxs)(`div`,{className:`space-y-2 animate-in fade-in slide-in-from-top-1 duration-200`,children:[(0,I.jsx)(Z,{htmlFor:`mcp-token`,className:`text-[10px] font-bold text-zinc-500 uppercase tracking-widest`,children:p===`api-key`?`API Key`:`Bearer Token`}),(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsx)(G,{id:`mcp-token`,type:`password`,placeholder:`sk-...`,value:h,onChange:e=>g(e.target.value),className:`bg-white/5 border-white/10 focus:border-cyan-500/50 transition-all h-9 pl-9`}),(0,I.jsx)(Qn,{className:`absolute left-3 top-2.5 h-3.5 w-3.5 text-zinc-500`})]})]}),p===`custom`&&(0,I.jsxs)(`div`,{className:`space-y-2 animate-in fade-in slide-in-from-top-1 duration-200`,children:[(0,I.jsx)(`div`,{className:`flex items-center justify-between`,children:(0,I.jsx)(Z,{htmlFor:`mcp-headers`,className:`text-[10px] font-bold text-zinc-500 uppercase tracking-widest`,children:`Headers JSON`})}),(0,I.jsx)(`textarea`,{id:`mcp-headers`,placeholder:`{ "x-custom-auth": "secret" }`,rows:3,value:v,onChange:e=>{let t=e.target.value;y(t);try{t.trim()&&JSON.parse(t.trim()),e.target.style.borderColor=``}catch{t.trim()?e.target.style.borderColor=`rgba(239, 68, 68, 0.5)`:e.target.style.borderColor=``}},className:`w-full bg-white/5 border border-white/10 rounded-md p-2 text-xs text-zinc-300 focus:outline-none focus:border-cyan-500/50 transition-all font-mono`})]})]})]}),(0,I.jsxs)(`div`,{className:`p-3 rounded-lg bg-cyan-500/5 border border-cyan-500/10 flex items-center gap-3`,children:[(0,I.jsx)(dn,{className:`h-5 w-5 text-cyan-500 shrink-0`}),(0,I.jsx)(`div`,{className:`text-[10px] text-cyan-200/70`,children:`El servidor se inicializará y validará inmediatamente después de ser añadido.`})]})]}),(0,I.jsxs)(Eq,{children:[(0,I.jsx)(W,{variant:`ghost`,onClick:()=>n(!1),className:`hover:bg-white/5 text-zinc-400 h-9 text-xs`,children:`Cancelar`}),(0,I.jsx)(W,{onClick:async()=>{if(!r){bg.fire({icon:`error`,title:`El nombre es obligatorio`});return}x(!0);try{let t={transport:l};if(l===`stdio`){if(!a){bg.fire({icon:`error`,title:`El comando es obligatorio para transporte stdio`}),x(!1);return}t.command=a;let e=s.trim();if(e.startsWith(`[`)&&e.endsWith(`]`))try{t.args=JSON.parse(e)}catch{t.args=e.match(/"[^"]*"|'[^']*'|[^\\s,]+/g)?.map(e=>e.replace(/^["']|["']$/g,``).replace(/,$/,``).trim()).filter(Boolean)||[]}else t.args=e.match(/"[^"]*"|'[^']*'|[^\\s,]+/g)?.map(e=>e.replace(/^["']|["']$/g,``).replace(/,$/,``).trim()).filter(Boolean)||[]}else{if(!d){bg.fire({icon:`error`,title:`La URL es obligatoria para transporte SSE`}),x(!1);return}t.url=d;let e={};if(p===`api-key`&&h)e[`x-api-key`]=h;else if(p===`bearer`&&h)e.Authorization=`Bearer ${h}`;else if(p===`custom`&&v.trim())try{e=JSON.parse(v.trim())}catch{yg.fire(`Error`,`JSON de Headers inválido`,`error`),x(!1);return}Object.keys(e).length>0&&(t.headers=e)}await K(`/api/mcp/servers`,{method:`POST`,body:{name:r,config:t},showLoader:`Conectando servidor MCP...`,showError:!0}),bg.fire({icon:`success`,title:`Servidor "${r}" añadido correctamente`}),i(``),o(``),c(``),f(``),m(`none`),g(``),y(``),n(!1),await e()}catch{}finally{x(!1)}},disabled:b,className:`bg-cyan-600 hover:bg-cyan-500 text-white shadow-lg shadow-cyan-600/20 h-9 text-xs px-6`,children:b?`Conectando...`:`Conectar Servidor`})]})]})]})}function qq(){let{servers:e,activeServers:t,isLoading:n,fetchMCPServers:r}=KR(),[i,a]=(0,_.useState)(null),[o,s]=(0,_.useState)(``);(0,_.useEffect)(()=>{r()},[r]);let c=e.filter(e=>e.name.toLowerCase().includes(o.toLowerCase())),l=e=>{a({...e,args:typeof e.args==`string`?JSON.parse(e.args):e.args})};return(0,I.jsxs)(`div`,{className:`space-y-6`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between border-b border-white/5 pb-4`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,I.jsx)(`div`,{className:`p-2 rounded-lg bg-cyan-500/10 text-cyan-400`,children:(0,I.jsx)(yr,{className:`h-5 w-5`})}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h4`,{className:`text-sm font-bold text-white uppercase tracking-wider`,children:`MCP Ecosystem`}),(0,I.jsx)(`p`,{className:`text-[10px] text-zinc-500 font-mono`,children:`Model Context Protocol Servers`})]})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,I.jsxs)(`div`,{className:`relative group`,children:[(0,I.jsx)(gr,{className:`absolute left-3 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-zinc-500 group-focus-within:text-cyan-400 transition-colors`}),(0,I.jsx)(G,{placeholder:`Buscar servidor...`,value:o,onChange:e=>s(e.target.value),className:`pl-9 bg-zinc-900/50 border-white/5 focus:border-cyan-500/30 transition-all h-9 w-[260px] text-xs`})]}),(0,I.jsx)(Kq,{})]})]}),c.length===0?(0,I.jsxs)(`div`,{className:`py-16 flex flex-col items-center justify-center border border-dashed border-white/10 rounded-2xl bg-zinc-950/20 group hover:border-cyan-500/20 transition-colors`,children:[(0,I.jsx)(`div`,{className:`p-4 rounded-full bg-zinc-900 mb-4 group-hover:scale-110 transition-transform`,children:(0,I.jsx)(Nr,{className:`h-8 w-8 text-zinc-700 group-hover:text-cyan-500/50 transition-colors`})}),(0,I.jsx)(`p`,{className:`text-xs text-zinc-500 font-medium`,children:`No se detectan servidores MCP configurados.`}),(0,I.jsx)(`p`,{className:`text-[10px] text-zinc-600 mt-1`,children:`Añade uno para expandir las capacidades de tus agentes.`})]}):(0,I.jsx)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4`,children:c.map(e=>(0,I.jsx)(Hq,{server:e,isConnected:e.status===`connected`||e.active===1,onClick:()=>l(e)},e.id))}),i&&(0,I.jsx)(Gq,{server:i,onClose:()=>a(null)})]})}var Jq=[{value:`auto`,label:`Auto — detectar mejor canal`},{value:`webchat`,label:`Web Chat`},{value:`telegram`,label:`Telegram`},{value:`discord`,label:`Discord`}];function Yq(e){return e.split(` `).map(e=>e[0]).slice(0,2).join(``).toUpperCase()||`?`}function Xq(){let{fetchUser:e,saveUser:t,isLoading:n}=xg(),[r,i]=(0,_.useState)(!1),[a,o]=(0,_.useState)({name:``,occupation:``,language:``,timezone:``,preferred_cron_channel:`auto`,notes:``});(0,_.useEffect)(()=>{e().then(e=>{e&&o({name:e.name||``,occupation:e.occupation||``,language:e.language||``,timezone:e.timezone||``,preferred_cron_channel:e.preferred_cron_channel||`auto`,notes:e.notes||``})}).catch(console.error)},[e]);let s=(e,t)=>o(n=>({...n,[e]:t}));return(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsxs)(`div`,{className:`relative overflow-hidden rounded-2xl border border-white/10 bg-zinc-950/60 backdrop-blur-xl shadow-2xl`,children:[(0,I.jsxs)(`div`,{className:`absolute inset-0 pointer-events-none`,children:[(0,I.jsx)(`div`,{className:`absolute -top-10 -left-10 w-48 h-48 bg-blue-600/20 rounded-full blur-3xl`}),(0,I.jsx)(`div`,{className:`absolute -bottom-10 -right-10 w-48 h-48 bg-indigo-600/15 rounded-full blur-3xl`})]}),(0,I.jsx)(`div`,{className:`relative h-20 bg-gradient-to-r from-blue-600/30 via-indigo-600/20 to-violet-600/10`,children:(0,I.jsx)(`div`,{className:`absolute inset-0 bg-[repeating-linear-gradient(45deg,transparent,transparent_12px,rgba(255,255,255,0.015)_12px,rgba(255,255,255,0.015)_13px)]`})}),(0,I.jsxs)(`div`,{className:`relative px-6 pb-6`,children:[(0,I.jsxs)(`div`,{className:`relative -mt-8 mb-4 w-fit`,children:[(0,I.jsx)(`div`,{className:`h-16 w-16 rounded-2xl bg-gradient-to-br from-blue-500 to-indigo-600 flex items-center justify-center shadow-lg shadow-blue-500/30 ring-2 ring-zinc-950 text-white font-bold text-xl tracking-tight`,children:Yq(a.name)}),(0,I.jsx)(`span`,{className:`absolute -bottom-1 -right-1 h-4 w-4 rounded-full bg-emerald-500 border-2 border-zinc-950 shadow`})]}),(0,I.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,I.jsxs)(`div`,{className:`space-y-1 min-w-0`,children:[(0,I.jsx)(`h3`,{className:`text-lg font-bold text-white leading-tight truncate`,children:a.name||(0,I.jsx)(`span`,{className:`text-zinc-500 italic text-sm font-normal`,children:`Sin nombre`})}),a.occupation&&(0,I.jsx)(`p`,{className:`text-sm text-zinc-400`,children:a.occupation}),(0,I.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 pt-1`,children:[a.language&&(0,I.jsxs)(`span`,{className:`flex items-center gap-1 text-[11px] text-zinc-400 bg-white/5 border border-white/10 rounded-full px-2.5 py-0.5`,children:[(0,I.jsx)(In,{className:`h-3 w-3`}),a.language]}),a.timezone&&(0,I.jsxs)(`span`,{className:`flex items-center gap-1 text-[11px] text-zinc-400 bg-white/5 border border-white/10 rounded-full px-2.5 py-0.5`,children:[(0,I.jsx)(gn,{className:`h-3 w-3`}),a.timezone]}),a.preferred_cron_channel!==`auto`&&(0,I.jsxs)(`span`,{className:`flex items-center gap-1 text-[11px] text-zinc-400 bg-white/5 border border-white/10 rounded-full px-2.5 py-0.5`,children:[(0,I.jsx)(Xt,{className:`h-3 w-3`}),a.preferred_cron_channel]})]})]}),(0,I.jsxs)(W,{variant:`outline`,size:`sm`,onClick:()=>i(e=>!e),className:`shrink-0 border-white/10 bg-white/5 hover:bg-white/10 text-zinc-300 gap-1.5 h-8 text-xs`,children:[r?(0,I.jsx)(Br,{className:`h-3 w-3`}):(0,I.jsx)(sr,{className:`h-3 w-3`}),r?`Cancelar`:`Editar`]})]})]})]}),r&&(0,I.jsxs)(`div`,{className:`relative overflow-hidden rounded-2xl border border-white/10 bg-zinc-950/60 backdrop-blur-xl shadow-2xl animate-in fade-in slide-in-from-top-2 duration-200`,children:[(0,I.jsx)(`div`,{className:`absolute inset-0 pointer-events-none`,children:(0,I.jsx)(`div`,{className:`absolute -top-8 -right-8 w-40 h-40 bg-blue-600/10 rounded-full blur-3xl`})}),(0,I.jsxs)(`div`,{className:`relative flex items-center gap-3 px-6 pt-5 pb-4 border-b border-white/5`,children:[(0,I.jsx)(`div`,{className:`p-2 rounded-lg bg-blue-500/10 text-blue-400`,children:(0,I.jsx)(Pr,{className:`h-4 w-4`})}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`p`,{className:`text-sm font-bold text-white uppercase tracking-wider`,children:`Editar perfil`}),(0,I.jsx)(`p`,{className:`text-[10px] text-zinc-500`,children:`Datos personales y preferencias`})]})]}),(0,I.jsxs)(`div`,{className:`relative p-6 space-y-6`,children:[(0,I.jsxs)(`div`,{className:`space-y-3`,children:[(0,I.jsx)(`p`,{className:`text-[10px] font-bold text-zinc-500 uppercase tracking-widest`,children:`Identidad`}),(0,I.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-3`,children:[(0,I.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,I.jsxs)(Z,{className:`text-[10px] text-zinc-500 flex items-center gap-1.5`,children:[(0,I.jsx)(Pr,{className:`h-3 w-3`}),` Nombre completo`]}),(0,I.jsx)(G,{placeholder:`John Doe`,value:a.name,onChange:e=>s(`name`,e.target.value),className:`bg-white/5 border-white/10 focus:border-blue-500/50 h-9 text-sm transition-all`})]}),(0,I.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,I.jsxs)(Z,{className:`text-[10px] text-zinc-500 flex items-center gap-1.5`,children:[(0,I.jsx)($t,{className:`h-3 w-3`}),` Ocupación`]}),(0,I.jsx)(G,{placeholder:`AI Engineer`,value:a.occupation,onChange:e=>s(`occupation`,e.target.value),className:`bg-white/5 border-white/10 focus:border-blue-500/50 h-9 text-sm transition-all`})]})]})]}),(0,I.jsxs)(`div`,{className:`space-y-3`,children:[(0,I.jsx)(`p`,{className:`text-[10px] font-bold text-zinc-500 uppercase tracking-widest`,children:`Localización`}),(0,I.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-3`,children:[(0,I.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,I.jsxs)(Z,{className:`text-[10px] text-zinc-500 flex items-center gap-1.5`,children:[(0,I.jsx)(In,{className:`h-3 w-3`}),` Idioma`]}),(0,I.jsx)(G,{placeholder:`Spanish`,value:a.language,onChange:e=>s(`language`,e.target.value),className:`bg-white/5 border-white/10 focus:border-blue-500/50 h-9 text-sm transition-all`})]}),(0,I.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,I.jsxs)(Z,{className:`text-[10px] text-zinc-500 flex items-center gap-1.5`,children:[(0,I.jsx)(gn,{className:`h-3 w-3`}),` Zona horaria`]}),(0,I.jsx)(G,{placeholder:`America/Bogota`,value:a.timezone,onChange:e=>s(`timezone`,e.target.value),className:`bg-white/5 border-white/10 focus:border-blue-500/50 h-9 text-sm transition-all`})]})]})]}),(0,I.jsxs)(`div`,{className:`space-y-3`,children:[(0,I.jsx)(`p`,{className:`text-[10px] font-bold text-zinc-500 uppercase tracking-widest`,children:`Notificaciones`}),(0,I.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,I.jsxs)(Z,{className:`text-[10px] text-zinc-500 flex items-center gap-1.5`,children:[(0,I.jsx)(Xt,{className:`h-3 w-3`}),` Canal preferido para Cron Jobs`]}),(0,I.jsxs)(ZK,{value:a.preferred_cron_channel,onValueChange:e=>s(`preferred_cron_channel`,e),children:[(0,I.jsx)(eq,{className:`bg-white/5 border-white/10 focus:border-blue-500/50 h-9 text-sm`,children:(0,I.jsx)($K,{})}),(0,I.jsx)(rq,{className:`bg-zinc-900 border-white/10`,children:Jq.map(e=>(0,I.jsx)(Q,{value:e.value,className:`text-sm focus:bg-blue-500/20 focus:text-blue-400`,children:e.label},e.value))})]})]})]}),(0,I.jsxs)(`div`,{className:`space-y-3`,children:[(0,I.jsx)(`p`,{className:`text-[10px] font-bold text-zinc-500 uppercase tracking-widest`,children:`Contexto para el agente`}),(0,I.jsx)(xG,{placeholder:`Describe tu perfil, preferencias de trabajo, estilo de comunicación...`,value:a.notes,onChange:e=>s(`notes`,e.target.value),className:`bg-white/5 border-white/10 focus:border-blue-500/50 text-sm resize-none min-h-[100px] transition-all`})]}),(0,I.jsxs)(`div`,{className:`flex items-center justify-end gap-2 pt-1 border-t border-white/5`,children:[(0,I.jsx)(W,{variant:`ghost`,size:`sm`,onClick:()=>i(!1),className:`text-zinc-400 hover:bg-white/5 h-9 text-xs`,children:`Cancelar`}),(0,I.jsxs)(W,{onClick:async()=>{_g.show(`Guardando perfil de usuario...`);try{let e=await t(a);bg.fire({icon:`success`,title:e}),i(!1)}catch(e){bg.fire({icon:`error`,title:e instanceof Error?e.message:`Error al guardar el perfil`})}finally{_g.hide()}},disabled:n,className:`bg-blue-600 hover:bg-blue-500 text-white shadow-lg shadow-blue-600/20 gap-2 h-9 text-xs px-6`,children:[n?(0,I.jsx)(Xn,{className:`h-4 w-4 animate-spin`}):(0,I.jsx)(mr,{className:`h-4 w-4`}),`Guardar cambios`]})]})]})]})]})}var Zq=e=>{let t=e.toLowerCase();return t.includes(`code`)||t.includes(`program`)?(0,I.jsx)(_n,{className:`h-4 w-4`}):t.includes(`research`)||t.includes(`investiga`)?(0,I.jsx)(gr,{className:`h-4 w-4`}):t.includes(`write`)||t.includes(`escrib`)?(0,I.jsx)(tr,{className:`h-4 w-4`}):t.includes(`data`)||t.includes(`anal`)||t.includes(`estad`)?(0,I.jsx)(nn,{className:`h-4 w-4`}):t.includes(`trans`)||t.includes(`traduc`)?(0,I.jsx)(Kn,{className:`h-4 w-4`}):t.includes(`web`)||t.includes(`glob`)?(0,I.jsx)(In,{className:`h-4 w-4`}):(0,I.jsx)(Vr,{className:`h-4 w-4`})};function Qq({skill:e,onClick:t,className:n}){let r=!!e.active;return(0,I.jsxs)(`div`,{onClick:t,className:`hive-card group transition-all duration-500 cursor-pointer ${r?`hive-card--active border-blue-500/20`:`opacity-60 grayscale-[0.8] hover:opacity-100 hover:grayscale-0`} ${n}`,children:[(0,I.jsxs)(`div`,{className:`hive-card-body`,children:[(0,I.jsxs)(`div`,{className:`flex items-start justify-between mb-6`,children:[(0,I.jsx)(`div`,{className:`h-12 w-12 rounded-xl flex items-center justify-center border transition-all duration-500 ${r?`bg-blue-500/10 border-blue-500/30 text-blue-400 shadow-blue-glow`:`bg-white/5 border-white/10 text-white/30`}`,children:Zq(e.name)}),(0,I.jsx)(`div`,{className:`h-6 w-6 rounded-full border border-white/5 bg-white/5 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity`,children:(0,I.jsx)(Dr,{className:`h-3 w-3 text-blue-400`})})]}),(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h3`,{className:`text-lg font-black text-white uppercase tracking-tighter mb-1 line-clamp-1 group-hover:text-blue-400 transition-colors`,children:e.name}),(0,I.jsx)(`p`,{className:`text-xs text-white/40 font-medium leading-relaxed line-clamp-2 h-8`,children:e.body?.substring(0,100)||e.category})]}),(0,I.jsxs)(`div`,{className:`pt-4 border-t border-white/5 flex items-center justify-between`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,I.jsxs)(`div`,{className:`hive-stat`,children:[(0,I.jsx)(`span`,{className:`hive-stat__label`,children:`CATEGORY`}),(0,I.jsx)(`span`,{className:`hive-stat__value truncate max-w-[80px]`,children:e.category||`GENERAL`})]}),(0,I.jsxs)(`div`,{className:`hive-stat`,children:[(0,I.jsx)(`span`,{className:`hive-stat__label`,children:`TOOLS`}),(0,I.jsx)(`span`,{className:`hive-stat__value`,children:e.tools?e.tools.split(`,`).length:0})]})]}),(0,I.jsxs)(`div`,{className:`opacity-0 group-hover:opacity-100 transition-opacity flex items-center gap-1.5 text-[9px] font-black text-blue-400 uppercase tracking-widest`,children:[`DETALLES`,(0,I.jsx)(bn,{className:`h-3 w-3`})]})]})]})]}),(0,I.jsx)(`div`,{className:`hive-strip--bottom ${r?`bg-blue-500`:`bg-white/10`}`})]})}function $q(){let{skills:e,isLoading:t,fetchSkills:n,toggleSkill:r,updateSkill:i}=GR(),[a,o]=(0,_.useState)(null),[s,c]=(0,_.useState)({name:``,body:``,tools:``,triggers:``,category:``,version:1,active:!0}),[l,u]=(0,_.useState)(null),[d,f]=(0,_.useState)(!1),[p,m]=(0,_.useState)(!1),[h,g]=(0,_.useState)(!1),v=(0,_.useRef)(null),y=()=>{let e=v.current;e&&(e.style.height=`auto`,e.style.height=`${e.scrollHeight}px`)};(0,_.useEffect)(()=>{a&&setTimeout(y,0)},[a,s.body]),(0,_.useEffect)(()=>{n()},[n]);let b=async(e,t)=>{if(!l){u(e);try{await r(e,t),await n(),bg.fire({icon:`success`,title:t?`Skill habilitado`:`Skill deshabilitado`})}catch{bg.fire({icon:`error`,title:`Error al cambiar estado del skill`})}finally{u(null)}}},x=async()=>{if(a){g(!0);try{await K(`/api/skills/${a.id}`,{method:`DELETE`,showError:!0}),bg.fire({icon:`success`,title:`Skill eliminado`}),n(),o(null)}catch{bg.fire({icon:`error`,title:`Error al eliminar skill`})}finally{g(!1),m(!1)}}},S=e=>{m(!1),o(e),c({name:e.name,body:e.body||``,tools:e.tools||``,triggers:e.triggers||``,category:e.category||``,version:Number(e.version)||1,active:!!e.active})};return t&&e.length===0?(0,I.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-20 space-y-4`,children:[(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsx)(Xn,{className:`h-10 w-10 animate-spin text-primary/40`}),(0,I.jsx)(Dr,{className:`h-4 w-4 text-primary absolute -top-1 -right-1 animate-pulse`})]}),(0,I.jsx)(`p`,{className:`text-sm text-muted-foreground animate-pulse`,children:`Cargando habilidades premium...`})]}):(0,I.jsxs)(`div`,{className:`space-y-6 animate-in fade-in duration-500`,children:[(0,I.jsxs)(`div`,{className:`flex flex-col sm:flex-row sm:items-center justify-between gap-4 mb-8`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,I.jsx)(`h3`,{className:`hive-title-section !text-lg`,children:`Habilidades del Sistema`}),(0,I.jsxs)(`span`,{className:`hive-tag bg-blue-500/10 text-blue-400 border-blue-500/20`,children:[e.length,` ACTIVAS`]})]}),(0,I.jsx)(`p`,{className:`hive-subtitle !mt-0 !text-xs`,children:`Gestiona los módulos cognitivos que otorgan capacidades autónomas a tus agentes.`})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2 text-[10px] uppercase tracking-widest font-black text-white/20 bg-white/5 px-4 py-2 rounded-xl border border-white/5`,children:[(0,I.jsx)(Un,{className:`h-3.5 w-3.5`}),(0,I.jsx)(`span`,{children:`Click en skill para configurar`})]})]}),e.length===0?(0,I.jsx)(`div`,{className:`hive-card border-dashed border-white/10 bg-white/[0.02]`,children:(0,I.jsxs)(`div`,{className:`hive-card-body flex flex-col items-center justify-center py-16 px-4`,children:[(0,I.jsx)(`div`,{className:`h-16 w-16 rounded-2xl bg-white/5 flex items-center justify-center mb-6`,children:(0,I.jsx)(Ir,{className:`h-8 w-8 text-white/20`})}),(0,I.jsxs)(`div`,{className:`text-center`,children:[(0,I.jsx)(`p`,{className:`hive-title-section text-center mb-2`,children:`No se detectan habilidades`}),(0,I.jsx)(`p`,{className:`text-xs text-white/40 mb-8 max-w-[300px] mx-auto leading-relaxed`,children:`El repositorio de habilidades está vacío. Visita el Marketplace para descargar nuevos nodos cognitivos.`})]}),(0,I.jsx)(`button`,{className:`hive-btn hive-btn--primary px-8`,children:`Explorar Marketplace`})]})}):(0,I.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-6`,children:e.map(e=>(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsx)(Qq,{skill:e,onClick:()=>S(e)}),(0,I.jsxs)(`div`,{className:`absolute top-6 right-6 z-20 pointer-events-auto flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`text-[9px] font-black tracking-widest ${e.active?`text-blue-400`:`text-white/20`}`,children:e.active?`HABILITADO`:`DESACTIVADO`}),(0,I.jsx)(vq,{checked:!!e.active,disabled:l===e.id,onClick:e=>e.stopPropagation(),onCheckedChange:t=>b(e.id,t),className:`scale-75 data-[state=checked]:bg-blue-500`})]})]},e.id))}),(0,I.jsx)(yq,{open:!!a,onOpenChange:e=>{e||(o(null),m(!1))},children:(0,I.jsxs)(wq,{className:`max-w-3xl bg-zinc-950 border-white/10 text-white p-0 overflow-hidden shadow-2xl`,children:[(0,I.jsx)(`div`,{className:`p-6 border-b border-white/5 bg-white/5`,children:(0,I.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,I.jsx)(`div`,{className:`h-10 w-10 rounded-lg bg-blue-500/10 border border-blue-500/20 flex items-center justify-center`,children:(0,I.jsx)(bn,{className:`h-5 w-5 text-blue-400`})}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(Dq,{className:`text-lg font-bold text-white uppercase tracking-tight`,children:`Propiedades del Nodo de Habilidad`}),(0,I.jsx)(Oq,{className:`text-xs text-white/40`,children:`Editor granular de capacidades cognitivas y herramientas vinculadas.`})]})]}),(0,I.jsx)(W,{variant:`ghost`,size:`icon`,onClick:()=>m(!0),disabled:h||p,className:`text-zinc-600 hover:text-red-400 hover:bg-red-400/10 h-8 w-8 transition-colors shrink-0`,title:`Eliminar Skill`,children:(0,I.jsx)(jr,{className:`h-4 w-4`})})]})}),p&&(0,I.jsxs)(`div`,{className:`mx-6 mt-4 p-3 rounded-lg bg-red-500/10 border border-red-500/30 animate-in fade-in slide-in-from-top-2 duration-200`,children:[(0,I.jsxs)(`p`,{className:`text-xs text-red-400 font-medium mb-3`,children:[`¿Eliminar `,(0,I.jsx)(`span`,{className:`font-bold`,children:a?.name}),`? Esta acción no se puede deshacer.`]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2 justify-end`,children:[(0,I.jsx)(W,{variant:`ghost`,size:`sm`,onClick:()=>m(!1),disabled:h,className:`h-7 px-3 text-[10px] font-bold uppercase tracking-wider text-zinc-400 hover:text-white`,children:`Cancelar`}),(0,I.jsx)(W,{size:`sm`,onClick:x,disabled:h,className:`h-7 px-3 text-[10px] font-bold uppercase tracking-wider bg-red-600 hover:bg-red-500 text-white`,children:h?(0,I.jsx)(Xn,{className:`h-3 w-3 animate-spin`}):`Sí, eliminar`})]})]}),(0,I.jsxs)(`div`,{className:`p-8 space-y-8 max-h-[70vh] overflow-y-auto custom-scrollbar`,children:[(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,I.jsx)(`div`,{className:`h-1 w-8 bg-blue-500 rounded-full`}),(0,I.jsx)(`span`,{className:`text-[10px] font-black tracking-widest text-white/40 uppercase`,children:`Información General`})]}),(0,I.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-6`,children:[(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`skill-name`,className:`text-[10px] uppercase tracking-widest text-white/60`,children:`Nombre del Nodo`}),(0,I.jsx)(G,{id:`skill-name`,value:s.name,onChange:e=>c(t=>({...t,name:e.target.value})),className:`bg-white/5 border-white/10 focus-visible:ring-blue-500/30 text-white font-medium`,placeholder:`Ej: canvas_dashboard`})]}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`skill-category`,className:`text-[10px] uppercase tracking-widest text-white/60`,children:`Categoría Funcional`}),(0,I.jsx)(G,{id:`skill-category`,value:s.category,onChange:e=>c(t=>({...t,category:e.target.value})),className:`bg-white/5 border-white/10 focus-visible:ring-blue-500/30 text-white/70`,placeholder:`Ej: visualización, análisis...`})]})]})]}),(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,I.jsx)(`div`,{className:`h-1 w-8 bg-blue-500 rounded-full`}),(0,I.jsx)(`span`,{className:`text-[10px] font-black tracking-widest text-white/40 uppercase`,children:`Capacidades y Activación`})]}),(0,I.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-6`,children:[(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`skill-tools`,className:`text-[10px] uppercase tracking-widest text-white/60`,children:`Herramientas Vinculadas (CSV)`}),(0,I.jsx)(G,{id:`skill-tools`,value:s.tools,onChange:e=>c(t=>({...t,tools:e.target.value})),className:`bg-white/5 border-white/10 focus-visible:ring-blue-500/30 text-white/80 font-mono text-[11px]`,placeholder:`tool1, tool2, tool3...`})]}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`skill-triggers`,className:`text-[10px] uppercase tracking-widest text-white/60`,children:`Frases de Activación / Triggers (CSV)`}),(0,I.jsx)(G,{id:`skill-triggers`,value:s.triggers,onChange:e=>c(t=>({...t,triggers:e.target.value})),className:`bg-white/5 border-white/10 focus-visible:ring-blue-500/30 text-white/80 font-mono text-[11px]`,placeholder:`mostrar panel, dashboard...`})]})]})]}),(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,I.jsx)(`div`,{className:`h-1 w-8 bg-blue-500 rounded-full`}),(0,I.jsx)(`span`,{className:`text-[10px] font-black tracking-widest text-white/40 uppercase`,children:`Cuerpo / Lógica del Nodo`})]}),(0,I.jsx)(`div`,{className:`space-y-2`,children:(0,I.jsx)(xG,{ref:v,value:s.body,onChange:e=>{c(t=>({...t,body:e.target.value})),y()},className:`min-h-[160px] resize-none bg-white/5 border-white/10 focus-visible:ring-blue-500/30 text-white/80 text-sm overflow-hidden font-sans leading-relaxed p-4`,placeholder:`Instrucciones detalladas y lógica de ejecución...`})})]}),(0,I.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-white/5`,children:[(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`skill-version`,className:`text-[10px] uppercase tracking-widest text-white/60`,children:`Versión del Skill`}),(0,I.jsx)(G,{id:`skill-version`,type:`number`,step:`0.1`,value:s.version,onChange:e=>c(t=>({...t,version:Number(e.target.value)})),className:`bg-white/5 border-white/10 focus-visible:ring-blue-500/30 text-white w-32`})]}),(0,I.jsxs)(`div`,{className:`flex flex-col justify-center space-y-3`,children:[(0,I.jsx)(Z,{className:`text-[10px] uppercase tracking-widest text-white/60`,children:`Estado del Nodo`}),(0,I.jsxs)(`div`,{className:`flex items-center gap-4 bg-white/5 p-3 rounded-xl border border-white/10 w-fit`,children:[(0,I.jsx)(`div`,{className:`h-2 w-2 rounded-full ${s.active?`bg-blue-500 shadow-blue-glow animate-pulse`:`bg-white/20`}`}),(0,I.jsx)(`span`,{className:`text-[10px] font-black tracking-widest ${s.active?`text-white`:`text-white/40`}`,children:s.active?`OPERATIVO / ACTIVO`:`FUERA DE LÍNEA / INACTIVO`}),(0,I.jsx)(vq,{checked:s.active,onCheckedChange:e=>c(t=>({...t,active:e})),className:`data-[state=checked]:bg-blue-500`})]})]})]})]}),(0,I.jsxs)(Eq,{className:`p-6 bg-white/5 flex items-center justify-end gap-3 border-t border-white/5 sm:justify-end`,children:[(0,I.jsx)(W,{variant:`ghost`,className:`text-[10px] font-black tracking-widest hover:bg-white/5 hover:text-white text-white/40 uppercase`,onClick:()=>o(null),children:`Cancelar`}),(0,I.jsx)(W,{className:`bg-blue-600 hover:bg-blue-500 text-white font-black text-[10px] tracking-widest px-8 rounded-lg shadow-lg shadow-blue-900/20 uppercase`,onClick:async()=>{if(a){f(!0),_g.show(`Guardando skill...`);try{await i(a.id,s),bg.fire({icon:`success`,title:`Skill actualizado correctamente`}),n(),o(null)}catch{bg.fire({icon:`error`,title:`Error al actualizar skill`})}finally{f(!1),_g.hide()}}},disabled:d,children:d?`PROCESANDO...`:`Sincronizar Propiedades`})]})]})})]})}var eJ={groq:{name:`Groq`,description:`STT (Speech-to-Text) - Transcripción de audio ultra-rápida`,logo:`🔴`,consoleUrl:`https://console.groq.com/keys`},elevenlabs:{name:`ElevenLabs`,description:`TTS (Text-to-Speech) - Voces neuronales de alta calidad`,logo:`🎙️`,consoleUrl:`https://elevenlabs.io/app/settings/api-keys`},openai:{name:`OpenAI`,description:`STT/TTS - Whisper y TTS-1`,logo:`🟢`,consoleUrl:`https://platform.openai.com/api-keys`},gemini:{name:`Google Gemini`,description:`TTS - Voces de Gemini`,logo:`🔵`,consoleUrl:`https://aistudio.google.com/app/apikey`},qwen:{name:`Qwen (Alibaba)`,description:`TTS - Voces de Qwen`,logo:`🟣`,consoleUrl:`https://dashscope.console.aliyun.com/apiKey`}};function tJ(){let{voiceProviders:e,configuredVoiceProviders:t,fetchVoiceProviders:n,fetchConfiguredVoiceProviders:r,saveVoiceProviderKey:i}=JR(),[a,o]=(0,_.useState)(null),[s,c]=(0,_.useState)(``),[l,u]=(0,_.useState)(!1),[d,f]=(0,_.useState)(!1);(0,_.useEffect)(()=>{n(),r()},[n,r]);let p=async e=>{if(s.trim()){u(!0);try{await i(e,s.trim()),await r(),o(null),c(``)}catch(e){console.error(`Failed to save API key:`,e)}finally{u(!1)}}};return(0,I.jsxs)(`div`,{className:`space-y-6`,children:[(0,I.jsx)(`div`,{className:`grid gap-6 md:grid-cols-2`,children:(e.length>0?e:Object.keys(eJ)).map(e=>{let n=eJ[e]||{name:e,description:``,logo:`🔌`,consoleUrl:`#`},r=t[e]===!0,i=a===e;return(0,I.jsxs)(XR,{className:`relative overflow-hidden ${r?`border-green-500/30 bg-green-500/[0.02]`:``}`,children:[(0,I.jsx)(ZR,{children:(0,I.jsxs)(`div`,{className:`flex items-start justify-between`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,I.jsx)(`span`,{className:`text-3xl`,children:n.logo}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(QR,{className:`text-lg`,children:n.name}),(0,I.jsx)($R,{className:`text-xs`,children:n.description})]})]}),r?(0,I.jsxs)($z,{variant:`default`,className:`bg-green-500/20 text-green-400 border-green-500/30`,children:[(0,I.jsx)(rn,{className:`h-3 w-3 mr-1`}),`Configurado`]}):(0,I.jsx)($z,{variant:`secondary`,className:`bg-yellow-500/20 text-yellow-400 border-yellow-500/30`,children:`Sin configurar`})]})}),(0,I.jsx)(ez,{className:`space-y-4`,children:i?(0,I.jsxs)(`div`,{className:`space-y-3`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(Z,{htmlFor:`api-key-${e}`,children:`API Key`}),(0,I.jsxs)(`div`,{className:`flex gap-2 mt-1`,children:[(0,I.jsx)(G,{id:`api-key-${e}`,type:d?`text`:`password`,placeholder:`sk-...`,value:s,onChange:e=>c(e.target.value),className:`flex-1 font-mono text-sm`,autoFocus:!0}),(0,I.jsx)(W,{variant:`outline`,size:`icon`,onClick:()=>f(!d),title:d?`Ocultar`:`Mostrar`,children:d?(0,I.jsx)(Qn,{className:`h-4 w-4`}):(0,I.jsx)(Zn,{className:`h-4 w-4`})})]})]}),(0,I.jsxs)(`div`,{className:`flex gap-2`,children:[(0,I.jsx)(W,{size:`sm`,onClick:()=>p(e),disabled:l||!s.trim(),className:`flex-1`,children:l?`Guardando...`:`Guardar`}),(0,I.jsx)(W,{size:`sm`,variant:`outline`,onClick:()=>{o(null),c(``)},children:`Cancelar`})]})]}):(0,I.jsxs)(`div`,{className:`space-y-3`,children:[r?(0,I.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,I.jsx)(Gn,{className:`h-4 w-4`}),(0,I.jsx)(`span`,{children:`API key guardada de forma segura (encriptada)`})]}):(0,I.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Necesitas una API key de `,n.name,` para usar esta funcionalidad.`]}),(0,I.jsxs)(`div`,{className:`flex gap-2`,children:[r?(0,I.jsxs)(W,{size:`sm`,variant:`outline`,onClick:()=>{o(e),c(``)},className:`flex-1`,children:[(0,I.jsx)(Gn,{className:`h-3 w-3 mr-2`}),`Actualizar API Key`]}):(0,I.jsxs)(W,{size:`sm`,onClick:()=>{o(e),c(``)},className:`flex-1`,children:[(0,I.jsx)(Gn,{className:`h-3 w-3 mr-2`}),`Configurar API Key`]}),(0,I.jsx)(W,{size:`sm`,variant:`outline`,onClick:()=>window.open(n.consoleUrl,`_blank`),children:`Obtener Key`})]})]})})]},e)})}),(0,I.jsxs)(XR,{children:[(0,I.jsxs)(ZR,{children:[(0,I.jsx)(QR,{className:`text-lg`,children:`¿Cómo funciona?`}),(0,I.jsx)($R,{children:`Configura las API keys de los providers de voz para habilitar las funcionalidades de STT y TTS en tus canales.`})]}),(0,I.jsxs)(ez,{className:`space-y-4 text-sm text-muted-foreground`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`strong`,{className:`text-foreground`,children:`STT (Speech-to-Text):`}),` Convierte el audio entrante en texto. Groq Whisper es recomendado por su velocidad y precisión.`]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`strong`,{className:`text-foreground`,children:`TTS (Text-to-Speech):`}),` Convierte las respuestas de texto en audio. ElevenLabs ofrece las voces más naturales.`]}),(0,I.jsx)(`div`,{className:`pt-2 border-t`,children:(0,I.jsx)(`p`,{className:`text-xs`,children:`Las API keys se guardan encriptadas en la base de datos local de Hive. Nunca se comparten ni envían a servidores externos.`})})]})]})]})}var nJ=Gh((e,t)=>({notes:[],scheduledTasks:[],taskHistory:{},cronChannels:[],cronRecommended:`webchat`,cronUserPreference:`auto`,isLoading:!1,error:null,fetchNotes:async()=>{e({isLoading:!0,error:null});try{e({notes:(await K(`/api/notes`)).notes,isLoading:!1})}catch(t){e({error:t.message,isLoading:!1})}},fetchScheduledTasks:async t=>{e({isLoading:!0,error:null});try{e({scheduledTasks:(await K(t?`/api/scheduled-tasks?status=${t}`:`/api/scheduled-tasks`)).tasks??[],isLoading:!1})}catch(t){e({error:t.message,isLoading:!1,scheduledTasks:[]})}},pauseTask:async t=>{try{await K(`/api/scheduled-tasks/${t}/pause`,{method:`POST`}),e(e=>({scheduledTasks:e.scheduledTasks.map(e=>e.id===t?{...e,status:`paused`}:e)}))}catch(t){e({error:t.message})}},resumeTask:async t=>{try{await K(`/api/scheduled-tasks/${t}/resume`,{method:`POST`}),e(e=>({scheduledTasks:e.scheduledTasks.map(e=>e.id===t?{...e,status:`active`}:e)}))}catch(t){e({error:t.message})}},deleteTask:async t=>{try{await K(`/api/scheduled-tasks/${t}`,{method:`DELETE`}),e(e=>({scheduledTasks:e.scheduledTasks.filter(e=>e.id!==t)}))}catch(t){e({error:t.message})}},triggerTask:async t=>{try{await K(`/api/scheduled-tasks/${t}/trigger`,{method:`POST`})}catch(t){e({error:t.message})}},fetchTaskHistory:async(t,n=10)=>{try{let r=await K(`/api/scheduled-tasks/${t}/history?limit=${n}`);e(e=>({taskHistory:{...e.taskHistory,[t]:r.history??[]}}))}catch(t){e({error:t.message})}},fetchCronChannels:async()=>{try{let t=await K(`/api/cron-jobs/channels`),n=[];Array.isArray(t.channels)&&(n=t.channels.map(e=>typeof e==`string`?{id:e,type:e,active:!0,recommended:e===`webchat`||e===`telegram`}:e)),e({cronChannels:n,cronRecommended:`webchat`,cronUserPreference:`auto`})}catch{}},saveCronChannelPreference:async t=>{try{await K(`/api/user/settings`,{method:`PATCH`,body:{preferred_cron_channel:t}}),e({cronUserPreference:t})}catch(t){e({error:t.message})}}}));function rJ(e,t){return _.useReducer((e,n)=>t[e][n]??e,e)}var iJ=`ScrollArea`,[aJ,hfe]=R(iJ),[oJ,sJ]=aJ(iJ),cJ=_.forwardRef((e,t)=>{let{__scopeScrollArea:n,type:r=`hover`,dir:i,scrollHideDelay:a=600,...o}=e,[s,c]=_.useState(null),[l,u]=_.useState(null),[d,f]=_.useState(null),[p,m]=_.useState(null),[h,g]=_.useState(null),[v,y]=_.useState(0),[b,x]=_.useState(0),[S,C]=_.useState(!1),[w,T]=_.useState(!1),E=P(t,e=>c(e)),D=EB(i);return(0,I.jsx)(oJ,{scope:n,type:r,dir:D,scrollHideDelay:a,scrollArea:s,viewport:l,onViewportChange:u,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:S,onScrollbarXEnabledChange:C,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:w,onScrollbarYEnabledChange:T,onCornerWidthChange:y,onCornerHeightChange:x,children:(0,I.jsx)(z.div,{dir:D,...o,ref:E,style:{position:`relative`,"--radix-scroll-area-corner-width":v+`px`,"--radix-scroll-area-corner-height":b+`px`,...e.style}})})});cJ.displayName=iJ;var lJ=`ScrollAreaViewport`,uJ=_.forwardRef((e,t)=>{let{__scopeScrollArea:n,children:r,nonce:i,...a}=e,o=sJ(lJ,n),s=P(t,_.useRef(null),o.onViewportChange);return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}`},nonce:i}),(0,I.jsx)(z.div,{"data-radix-scroll-area-viewport":``,...a,ref:s,style:{overflowX:o.scrollbarXEnabled?`scroll`:`hidden`,overflowY:o.scrollbarYEnabled?`scroll`:`hidden`,...e.style},children:(0,I.jsx)(`div`,{ref:o.onContentChange,style:{minWidth:`100%`,display:`table`},children:r})})]})});uJ.displayName=lJ;var dJ=`ScrollAreaScrollbar`,fJ=_.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=sJ(dJ,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:o}=i,s=e.orientation===`horizontal`;return _.useEffect(()=>(s?a(!0):o(!0),()=>{s?a(!1):o(!1)}),[s,a,o]),i.type===`hover`?(0,I.jsx)(pJ,{...r,ref:t,forceMount:n}):i.type===`scroll`?(0,I.jsx)(mJ,{...r,ref:t,forceMount:n}):i.type===`auto`?(0,I.jsx)(hJ,{...r,ref:t,forceMount:n}):i.type===`always`?(0,I.jsx)(gJ,{...r,ref:t}):null});fJ.displayName=dJ;var pJ=_.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=sJ(dJ,e.__scopeScrollArea),[a,o]=_.useState(!1);return _.useEffect(()=>{let e=i.scrollArea,t=0;if(e){let n=()=>{window.clearTimeout(t),o(!0)},r=()=>{t=window.setTimeout(()=>o(!1),i.scrollHideDelay)};return e.addEventListener(`pointerenter`,n),e.addEventListener(`pointerleave`,r),()=>{window.clearTimeout(t),e.removeEventListener(`pointerenter`,n),e.removeEventListener(`pointerleave`,r)}}},[i.scrollArea,i.scrollHideDelay]),(0,I.jsx)(Ae,{present:n||a,children:(0,I.jsx)(hJ,{"data-state":a?`visible`:`hidden`,...r,ref:t})})}),mJ=_.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=sJ(dJ,e.__scopeScrollArea),a=e.orientation===`horizontal`,o=IJ(()=>c(`SCROLL_END`),100),[s,c]=rJ(`hidden`,{hidden:{SCROLL:`scrolling`},scrolling:{SCROLL_END:`idle`,POINTER_ENTER:`interacting`},interacting:{SCROLL:`interacting`,POINTER_LEAVE:`idle`},idle:{HIDE:`hidden`,SCROLL:`scrolling`,POINTER_ENTER:`interacting`}});return _.useEffect(()=>{if(s===`idle`){let e=window.setTimeout(()=>c(`HIDE`),i.scrollHideDelay);return()=>window.clearTimeout(e)}},[s,i.scrollHideDelay,c]),_.useEffect(()=>{let e=i.viewport,t=a?`scrollLeft`:`scrollTop`;if(e){let n=e[t],r=()=>{let r=e[t];n!==r&&(c(`SCROLL`),o()),n=r};return e.addEventListener(`scroll`,r),()=>e.removeEventListener(`scroll`,r)}},[i.viewport,a,c,o]),(0,I.jsx)(Ae,{present:n||s!==`hidden`,children:(0,I.jsx)(gJ,{"data-state":s===`hidden`?`hidden`:`visible`,...r,ref:t,onPointerEnter:j(e.onPointerEnter,()=>c(`POINTER_ENTER`)),onPointerLeave:j(e.onPointerLeave,()=>c(`POINTER_LEAVE`))})})}),hJ=_.forwardRef((e,t)=>{let n=sJ(dJ,e.__scopeScrollArea),{forceMount:r,...i}=e,[a,o]=_.useState(!1),s=e.orientation===`horizontal`,c=IJ(()=>{if(n.viewport){let e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;o(s?e:t)}},10);return LJ(n.viewport,c),LJ(n.content,c),(0,I.jsx)(Ae,{present:r||a,children:(0,I.jsx)(gJ,{"data-state":a?`visible`:`hidden`,...i,ref:t})})}),gJ=_.forwardRef((e,t)=>{let{orientation:n=`vertical`,...r}=e,i=sJ(dJ,e.__scopeScrollArea),a=_.useRef(null),o=_.useRef(0),[s,c]=_.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=kJ(s.viewport,s.content),u={...r,sizes:s,onSizesChange:c,hasThumb:l>0&&l<1,onThumbChange:e=>a.current=e,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:e=>o.current=e};function d(e,t){return jJ(e,o.current,s,t)}return n===`horizontal`?(0,I.jsx)(_J,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollLeft,t=MJ(e,s,i.dir);a.current.style.transform=`translate3d(${t}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=d(e,i.dir))}}):n===`vertical`?(0,I.jsx)(vJ,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollTop,t=MJ(e,s);a.current.style.transform=`translate3d(0, ${t}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=d(e))}}):null}),_J=_.forwardRef((e,t)=>{let{sizes:n,onSizesChange:r,...i}=e,a=sJ(dJ,e.__scopeScrollArea),[o,s]=_.useState(),c=_.useRef(null),l=P(t,c,a.onScrollbarXChange);return _.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),(0,I.jsx)(xJ,{"data-orientation":`horizontal`,...i,ref:l,sizes:n,style:{bottom:0,left:a.dir===`rtl`?`var(--radix-scroll-area-corner-width)`:0,right:a.dir===`ltr`?`var(--radix-scroll-area-corner-width)`:0,"--radix-scroll-area-thumb-width":AJ(n)+`px`,...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(a.viewport){let r=a.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),PJ(r,n)&&t.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:OJ(o.paddingLeft),paddingEnd:OJ(o.paddingRight)}})}})}),vJ=_.forwardRef((e,t)=>{let{sizes:n,onSizesChange:r,...i}=e,a=sJ(dJ,e.__scopeScrollArea),[o,s]=_.useState(),c=_.useRef(null),l=P(t,c,a.onScrollbarYChange);return _.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),(0,I.jsx)(xJ,{"data-orientation":`vertical`,...i,ref:l,sizes:n,style:{top:0,right:a.dir===`ltr`?0:void 0,left:a.dir===`rtl`?0:void 0,bottom:`var(--radix-scroll-area-corner-height)`,"--radix-scroll-area-thumb-height":AJ(n)+`px`,...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(a.viewport){let r=a.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),PJ(r,n)&&t.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:OJ(o.paddingTop),paddingEnd:OJ(o.paddingBottom)}})}})}),[yJ,bJ]=aJ(dJ),xJ=_.forwardRef((e,t)=>{let{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:a,onThumbPointerUp:o,onThumbPointerDown:s,onThumbPositionChange:c,onDragScroll:l,onWheelScroll:u,onResize:d,...f}=e,p=sJ(dJ,n),[m,h]=_.useState(null),g=P(t,e=>h(e)),v=_.useRef(null),y=_.useRef(``),b=p.viewport,x=r.content-r.viewport,S=B(u),C=B(c),w=IJ(d,10);function T(e){v.current&&l({x:e.clientX-v.current.left,y:e.clientY-v.current.top})}return _.useEffect(()=>{let e=e=>{let t=e.target;m?.contains(t)&&S(e,x)};return document.addEventListener(`wheel`,e,{passive:!1}),()=>document.removeEventListener(`wheel`,e,{passive:!1})},[b,m,x,S]),_.useEffect(C,[r,C]),LJ(m,w),LJ(p.content,w),(0,I.jsx)(yJ,{scope:n,scrollbar:m,hasThumb:i,onThumbChange:B(a),onThumbPointerUp:B(o),onThumbPositionChange:C,onThumbPointerDown:B(s),children:(0,I.jsx)(z.div,{...f,ref:g,style:{position:`absolute`,...f.style},onPointerDown:j(e.onPointerDown,e=>{e.button===0&&(e.target.setPointerCapture(e.pointerId),v.current=m.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect=`none`,p.viewport&&(p.viewport.style.scrollBehavior=`auto`),T(e))}),onPointerMove:j(e.onPointerMove,T),onPointerUp:j(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=y.current,p.viewport&&(p.viewport.style.scrollBehavior=``),v.current=null})})})}),SJ=`ScrollAreaThumb`,CJ=_.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=bJ(SJ,e.__scopeScrollArea);return(0,I.jsx)(Ae,{present:n||i.hasThumb,children:(0,I.jsx)(wJ,{ref:t,...r})})}),wJ=_.forwardRef((e,t)=>{let{__scopeScrollArea:n,style:r,...i}=e,a=sJ(SJ,n),o=bJ(SJ,n),{onThumbPositionChange:s}=o,c=P(t,e=>o.onThumbChange(e)),l=_.useRef(void 0),u=IJ(()=>{l.current&&=(l.current(),void 0)},100);return _.useEffect(()=>{let e=a.viewport;if(e){let t=()=>{u(),l.current||(l.current=FJ(e,s),s())};return s(),e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)}},[a.viewport,u,s]),(0,I.jsx)(z.div,{"data-state":o.hasThumb?`visible`:`hidden`,...i,ref:c,style:{width:`var(--radix-scroll-area-thumb-width)`,height:`var(--radix-scroll-area-thumb-height)`,...r},onPointerDownCapture:j(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;o.onThumbPointerDown({x:n,y:r})}),onPointerUp:j(e.onPointerUp,o.onThumbPointerUp)})});CJ.displayName=SJ;var TJ=`ScrollAreaCorner`,EJ=_.forwardRef((e,t)=>{let n=sJ(TJ,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!==`scroll`&&r?(0,I.jsx)(DJ,{...e,ref:t}):null});EJ.displayName=TJ;var DJ=_.forwardRef((e,t)=>{let{__scopeScrollArea:n,...r}=e,i=sJ(TJ,n),[a,o]=_.useState(0),[s,c]=_.useState(0),l=!!(a&&s);return LJ(i.scrollbarX,()=>{let e=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(e),c(e)}),LJ(i.scrollbarY,()=>{let e=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(e),o(e)}),l?(0,I.jsx)(z.div,{...r,ref:t,style:{width:a,height:s,position:`absolute`,right:i.dir===`ltr`?0:void 0,left:i.dir===`rtl`?0:void 0,bottom:0,...e.style}}):null});function OJ(e){return e?parseInt(e,10):0}function kJ(e,t){let n=e/t;return isNaN(n)?0:n}function AJ(e){let t=kJ(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function jJ(e,t,n,r=`ltr`){let i=AJ(n),a=i/2,o=t||a,s=i-o,c=n.scrollbar.paddingStart+o,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d=r===`ltr`?[0,u]:[u*-1,0];return NJ([c,l],d)(e)}function MJ(e,t,n=`ltr`){let r=AJ(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=SG(e,n===`ltr`?[0,o]:[o*-1,0]);return NJ([0,o],[0,s])(c)}function NJ(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function PJ(e,t){return e>0&&e<t}var FJ=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){let a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)};function IJ(e,t){let n=B(e),r=_.useRef(0);return _.useEffect(()=>()=>window.clearTimeout(r.current),[]),_.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function LJ(e,t){let n=B(t);Ee(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}var RJ=cJ,zJ=uJ,BJ=EJ,VJ=_.forwardRef(({className:e,children:t,...n},r)=>(0,I.jsxs)(RJ,{ref:r,className:H(`relative overflow-hidden`,e),...n,children:[(0,I.jsx)(zJ,{className:`h-full w-full rounded-[inherit]`,children:t}),(0,I.jsx)(HJ,{}),(0,I.jsx)(BJ,{})]}));VJ.displayName=RJ.displayName;var HJ=_.forwardRef(({className:e,orientation:t=`vertical`,...n},r)=>(0,I.jsx)(fJ,{ref:r,orientation:t,className:H(`flex touch-none select-none transition-colors`,t===`vertical`&&`h-full w-2.5 border-l border-l-transparent p-[1px]`,t===`horizontal`&&`h-2.5 flex-col border-t border-t-transparent p-[1px]`,e),...n,children:(0,I.jsx)(CJ,{className:`relative flex-1 rounded-full bg-border`})}));HJ.displayName=fJ.displayName;var UJ=()=>{let{notes:e,isLoading:t,fetchNotes:n}=nJ();return(0,_.useEffect)(()=>{n()},[n]),(0,I.jsxs)(XR,{className:`border-none bg-background/50 backdrop-blur-xl shadow-2xl overflow-hidden group border border-white/10`,children:[(0,I.jsx)(ZR,{className:`pb-2`,children:(0,I.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`div`,{className:`p-2 rounded-xl bg-primary/10 text-primary`,children:(0,I.jsx)(kr,{className:`w-5 h-5`})}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(QR,{className:`text-xl font-bold tracking-tight`,children:`Notas`}),(0,I.jsx)($R,{children:`Scratchpad del agente`})]})]}),t&&(0,I.jsx)(Xn,{className:`w-4 h-4 animate-spin text-muted-foreground`})]})}),(0,I.jsx)(ez,{children:(0,I.jsx)(VJ,{className:`h-[350px] pr-4`,children:(0,I.jsx)(`div`,{className:`space-y-4`,children:e.length===0?(0,I.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-[250px] text-muted-foreground space-y-2`,children:[(0,I.jsx)(kr,{className:`w-12 h-12 opacity-20`}),(0,I.jsx)(`p`,{className:`text-sm`,children:`No hay notas guardadas`}),(0,I.jsx)(`p`,{className:`text-[10px] opacity-70`,children:`El agente guardará notas con save_note`})]}):e.map(e=>(0,I.jsxs)(`div`,{className:`p-4 rounded-2xl border border-white/5 bg-card/40 hover:bg-card/60 transition-all duration-300 relative overflow-hidden`,children:[(0,I.jsx)(`h4`,{className:`font-semibold text-sm mb-1.5 line-clamp-1`,children:e.key}),(0,I.jsx)(`p`,{className:`text-xs text-muted-foreground line-clamp-3 leading-relaxed`,children:e.value}),(0,I.jsxs)(`div`,{className:`mt-4 flex items-center justify-between`,children:[(0,I.jsx)($z,{variant:`secondary`,className:`text-[10px] px-2 py-0.5 bg-primary/10 text-primary border-none font-medium font-mono truncate max-w-[120px]`,children:e.thread_id.slice(-8)}),(0,I.jsx)(`span`,{className:`text-[10px] text-muted-foreground font-mono`,children:new Date(e.updated_at*1e3).toLocaleDateString()})]})]},e.id))})})})]})};function WJ(e){if(!e)return`—`;try{return new Date(e).toLocaleString([],{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}catch{return e}}function GJ({status:e}){let t={active:{label:`Activa`,className:`bg-green-500/10 text-green-400 border-green-500/20`},paused:{label:`Pausada`,className:`bg-yellow-500/10 text-yellow-400 border-yellow-500/20`},completed:{label:`Completada`,className:`bg-blue-500/10 text-blue-400 border-blue-500/20`},failed:{label:`Fallida`,className:`bg-red-500/10 text-red-400 border-red-500/20`},cancelled:{label:`Cancelada`,className:`bg-muted/30 text-muted-foreground border-white/10`}},{label:n,className:r}=t[e]??t.cancelled;return(0,I.jsx)(`span`,{className:`inline-flex items-center text-[9px] font-bold uppercase tracking-wider px-1.5 py-0.5 rounded-full border ${r}`,children:n})}function KJ({type:e}){let t=e===`recurring`;return(0,I.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-[9px] font-bold uppercase tracking-wider px-1.5 py-0.5 rounded-full border ${t?`bg-violet-500/10 text-violet-400 border-violet-500/20`:`bg-teal-500/10 text-teal-400 border-teal-500/20`}`,children:[t?(0,I.jsx)(fr,{className:`w-2.5 h-2.5`}):(0,I.jsx)(tn,{className:`w-2.5 h-2.5`}),t?`Recurrente`:`Una vez`]})}function qJ({channel:e}){return!e||e===`system`?(0,I.jsx)(`span`,{className:`inline-flex items-center gap-1 text-[9px] font-bold uppercase tracking-wider px-1.5 py-0.5 rounded-full bg-muted/30 text-muted-foreground border border-white/10`,children:`System`}):e===`webchat`?(0,I.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-[9px] font-bold uppercase tracking-wider px-1.5 py-0.5 rounded-full bg-blue-500/10 text-blue-400 border border-blue-500/20`,children:[(0,I.jsx)(er,{className:`w-2.5 h-2.5`}),`Web`]}):e===`telegram`?(0,I.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-[9px] font-bold uppercase tracking-wider px-1.5 py-0.5 rounded-full bg-sky-500/10 text-sky-400 border border-sky-500/20`,children:[(0,I.jsx)(vr,{className:`w-2.5 h-2.5`}),`Telegram`]}):(0,I.jsx)(`span`,{className:`inline-flex items-center gap-1 text-[9px] font-bold uppercase tracking-wider px-1.5 py-0.5 rounded-full bg-muted/30 text-muted-foreground border border-white/10`,children:e})}function JJ({status:e}){return(0,I.jsx)(`span`,{className:`inline-block w-1.5 h-1.5 rounded-full ${{running:`bg-blue-400 animate-pulse`,success:`bg-green-400`,failed:`bg-red-400`,timeout:`bg-amber-400`}[e]??`bg-muted-foreground`}`})}function YJ(e,t){let n=e===`telegram`?`Telegram`:e===`webchat`?`Web Chat`:e;return e===t?`${n} (recomendado)`:n}function XJ({taskId:e,history:t}){return t?t.length===0?(0,I.jsx)(`p`,{className:`text-[10px] text-muted-foreground px-1`,children:`Sin ejecuciones registradas.`}):(0,I.jsx)(`div`,{className:`mt-2 space-y-1`,children:t.map(e=>(0,I.jsxs)(`div`,{className:`flex items-center gap-2 text-[10px] text-muted-foreground`,children:[(0,I.jsx)(JJ,{status:e.status}),(0,I.jsx)(`span`,{className:`font-mono`,children:WJ(e.started_at)}),e.duration_ms!=null&&(0,I.jsxs)(`span`,{className:`text-primary/70`,children:[e.duration_ms,`ms`]}),e.error_message&&(0,I.jsx)(`span`,{className:`text-red-400 truncate max-w-[160px]`,children:e.error_message})]},e.id))}):(0,I.jsx)(`p`,{className:`text-[10px] text-muted-foreground px-1`,children:`Cargando historial…`})}function ZJ({task:e,onPause:t,onResume:n,onDelete:r,onTrigger:i,onLoadHistory:a,history:o}){let[s,c]=(0,_.useState)(!1),[l,u]=(0,_.useState)(!1),d=e.status===`active`,f=e.status===`active`||e.status===`paused`;function p(){!s&&!o&&a(e.id),c(e=>!e)}function m(){l?r(e.id):(u(!0),setTimeout(()=>u(!1),3e3))}return(0,I.jsxs)(`div`,{className:`p-4 rounded-2xl border border-white/5 bg-card/40 hover:bg-card/60 transition-all duration-200`,children:[(0,I.jsxs)(`div`,{className:`flex items-start justify-between gap-2 mb-2`,children:[(0,I.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,I.jsx)(`h4`,{className:`font-semibold text-sm truncate`,children:e.name}),e.description&&(0,I.jsx)(`p`,{className:`text-[10px] text-muted-foreground truncate mt-0.5`,children:e.description})]}),(0,I.jsx)(`div`,{className:`flex items-center gap-1 shrink-0`,children:(0,I.jsx)(GJ,{status:e.status})})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-1.5 flex-wrap mb-2`,children:[(0,I.jsx)(KJ,{type:e.task_type}),(0,I.jsxs)(`div`,{className:`flex items-center gap-1 text-[10px] text-primary font-bold uppercase tracking-wider bg-primary/5 px-2 py-0.5 rounded-full`,children:[(0,I.jsx)(tn,{className:`w-3 h-3`}),e.task_type===`recurring`?e.cron_expression??`—`:e.fire_at?WJ(e.fire_at):`—`]}),(0,I.jsx)(qJ,{channel:e.channel})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-3 text-[10px] text-muted-foreground mb-2`,children:[(0,I.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,I.jsx)(Kt,{className:`w-3 h-3`}),e.run_count,` runs`]}),e.error_count>0&&(0,I.jsxs)(`span`,{className:`flex items-center gap-1 text-red-400`,children:[(0,I.jsx)(ln,{className:`w-3 h-3`}),e.error_count,` errores`]}),e.timezone&&e.timezone!==`UTC`&&(0,I.jsx)(`span`,{className:`font-mono`,children:e.timezone})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-3 text-[10px] text-muted-foreground mb-3`,children:[e.last_run_at&&(0,I.jsxs)(`span`,{children:[`Último: `,WJ(e.last_run_at)]}),e.next_run_at&&e.status===`active`&&(0,I.jsxs)(`span`,{className:`text-primary/70`,children:[`Próximo: `,WJ(e.next_run_at)]})]}),e.last_error&&(0,I.jsx)(`div`,{className:`mb-2 text-[10px] text-red-400 bg-red-500/5 border border-red-500/20 rounded-lg px-2 py-1 truncate`,children:e.last_error}),(0,I.jsxs)(`div`,{className:`flex items-center gap-1.5 flex-wrap`,children:[f&&(d?(0,I.jsxs)(W,{size:`sm`,variant:`outline`,className:`h-6 text-[10px] px-2 border-white/10 hover:bg-yellow-500/10 hover:text-yellow-400 hover:border-yellow-500/20`,onClick:()=>t(e.id),children:[(0,I.jsx)(ar,{className:`w-3 h-3 mr-1`}),`Pausar`]}):(0,I.jsxs)(W,{size:`sm`,variant:`outline`,className:`h-6 text-[10px] px-2 border-white/10 hover:bg-green-500/10 hover:text-green-400 hover:border-green-500/20`,onClick:()=>n(e.id),children:[(0,I.jsx)(cr,{className:`w-3 h-3 mr-1`}),`Reanudar`]})),d&&(0,I.jsxs)(W,{size:`sm`,variant:`outline`,className:`h-6 text-[10px] px-2 border-white/10 hover:bg-primary/10 hover:text-primary hover:border-primary/20`,onClick:()=>i(e.id),title:`Ejecutar ahora (sin afectar el schedule)`,children:[(0,I.jsx)(Vr,{className:`w-3 h-3 mr-1`}),`Ejecutar`]}),(0,I.jsxs)(W,{size:`sm`,variant:`ghost`,className:`h-6 text-[10px] px-2 text-muted-foreground hover:text-foreground`,onClick:p,children:[(0,I.jsx)(Hn,{className:`w-3 h-3 mr-1`}),`Historial`,s?(0,I.jsx)(cn,{className:`w-3 h-3 ml-1`}):(0,I.jsx)(an,{className:`w-3 h-3 ml-1`})]}),(0,I.jsxs)(W,{size:`sm`,variant:`ghost`,className:`h-6 text-[10px] px-2 ml-auto ${l?`text-red-400 bg-red-500/10 border border-red-500/20`:`text-muted-foreground hover:text-red-400`}`,onClick:m,title:l?`Confirmar eliminación`:`Eliminar tarea`,children:[(0,I.jsx)(jr,{className:`w-3 h-3 mr-1`}),l?`Confirmar`:`Eliminar`]})]}),s&&(0,I.jsx)(`div`,{className:`mt-2 pt-2 border-t border-white/5`,children:(0,I.jsx)(XJ,{taskId:e.id,history:o})})]})}var QJ=()=>{let{scheduledTasks:e,taskHistory:t,cronChannels:n,cronRecommended:r,cronUserPreference:i,isLoading:a,fetchScheduledTasks:o,fetchCronChannels:s,pauseTask:c,resumeTask:l,deleteTask:u,triggerTask:d,fetchTaskHistory:f,saveCronChannelPreference:p}=nJ(),[m,h]=(0,_.useState)(`all`);(0,_.useEffect)(()=>{o(),s()},[o,s]);let g=m===`all`?e:e.filter(e=>e.status===m),v=(n??[]).filter(e=>e.active),y=g.filter(e=>!e.name.startsWith(`_hive_`));return(0,I.jsxs)(XR,{className:`border-none bg-background/50 backdrop-blur-xl shadow-2xl overflow-hidden border border-white/10`,children:[(0,I.jsx)(ZR,{className:`pb-2`,children:(0,I.jsxs)(`div`,{className:`flex items-center justify-between gap-2 flex-wrap`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`div`,{className:`p-2 rounded-xl bg-primary/10 text-primary`,children:(0,I.jsx)(gn,{className:`w-5 h-5`})}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(QR,{className:`text-xl font-bold tracking-tight`,children:`Tareas Programadas`}),(0,I.jsx)($R,{children:`Scheduler basado en Croner`})]})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[a&&(0,I.jsx)(Xn,{className:`w-4 h-4 animate-spin text-muted-foreground`}),(0,I.jsxs)(ZK,{value:m,onValueChange:h,children:[(0,I.jsx)(eq,{className:`h-7 text-[10px] w-[110px] border-white/10 bg-card/40`,children:(0,I.jsx)($K,{})}),(0,I.jsxs)(rq,{children:[(0,I.jsx)(Q,{value:`all`,className:`text-xs`,children:`Todas`}),(0,I.jsx)(Q,{value:`active`,className:`text-xs`,children:`Activas`}),(0,I.jsx)(Q,{value:`paused`,className:`text-xs`,children:`Pausadas`}),(0,I.jsx)(Q,{value:`completed`,className:`text-xs`,children:`Completadas`}),(0,I.jsx)(Q,{value:`failed`,className:`text-xs`,children:`Fallidas`})]})]}),v.length>1&&(0,I.jsxs)(ZK,{value:i,onValueChange:p,children:[(0,I.jsx)(eq,{className:`h-7 text-[10px] w-[130px] border-white/10 bg-card/40`,children:(0,I.jsx)($K,{placeholder:`Canal`})}),(0,I.jsxs)(rq,{children:[(0,I.jsx)(Q,{value:`auto`,className:`text-xs`,children:`Auto`}),v.map(e=>(0,I.jsx)(Q,{value:e.id,className:`text-xs`,children:YJ(e.id,r)},e.id))]})]}),(0,I.jsx)(W,{size:`sm`,variant:`ghost`,className:`h-7 w-7 p-0 text-muted-foreground hover:text-foreground`,onClick:()=>o(m===`all`?void 0:m),disabled:a,title:`Refrescar`,children:(0,I.jsx)(fr,{className:`w-3.5 h-3.5`})})]})]})}),(0,I.jsx)(ez,{children:(0,I.jsx)(VJ,{className:`h-[420px] pr-4`,children:(0,I.jsx)(`div`,{className:`space-y-3`,children:y.length===0?(0,I.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-[280px] text-muted-foreground space-y-2`,children:[(0,I.jsx)(gn,{className:`w-12 h-12 opacity-20`}),(0,I.jsx)(`p`,{className:`text-sm`,children:`Sin tareas programadas`}),(0,I.jsxs)(`p`,{className:`text-[10px] opacity-70`,children:[`Crea tareas desde el chat o con `,(0,I.jsx)(`code`,{className:`font-mono`,children:`hive cron add`})]})]}):y.map(e=>(0,I.jsx)(ZJ,{task:e,onPause:c,onResume:l,onDelete:u,onTrigger:d,onLoadHistory:f,history:t[e.id]},e.id))})})})]})};function $J(){let[e,t]=(0,_.useState)(!1),[n,r]=(0,_.useState)(``),[i,a]=(0,_.useState)(!0),[o,s]=(0,_.useState)(`status`),[c,l]=(0,_.useState)(``),[u,d]=(0,_.useState)(!1),[f,p]=(0,_.useState)(``),[m,h]=(0,_.useState)(``),[g,v]=(0,_.useState)(``),[y,b]=(0,_.useState)(!1),[x,S]=(0,_.useState)(!1),[C,w]=(0,_.useState)(``),[T,E]=(0,_.useState)(``),[D,O]=(0,_.useState)(``),[k,A]=(0,_.useState)(!1),[j,M]=(0,_.useState)(!1),[N,P]=(0,_.useState)(!1);(0,_.useEffect)(()=>{F(),L()},[]);async function F(){a(!0);try{let e=await fetch(`/api/auth/status`).then(e=>e.json());t(e.hasCredentials),e.email&&r(e.email)}catch{}finally{a(!1)}}async function L(){try{l((await K(`/api/auth/recovery-key`)).recoveryKey)}catch{}}async function R(e){if(e.preventDefault(),m!==g){yg.fire({icon:`error`,title:`Error`,text:`Las contraseñas no coinciden`});return}if(m.length<8){yg.fire({icon:`error`,title:`Error`,text:`La contraseña debe tener al menos 8 caracteres`});return}S(!0);try{await K(`/api/auth/setup-credentials`,{method:`POST`,body:{email:f,password:m}}),yg.fire({icon:`success`,title:`Protección activada`,text:`La próxima vez que accedas necesitarás tu email y contraseña.`,timer:3e3,showConfirmButton:!1,toast:!0,position:`top-end`}),p(``),h(``),v(``),s(`status`),await F()}catch{}finally{S(!1)}}async function ee(){if((await yg.fire({title:`¿Desactivar protección?`,text:`Cualquiera con acceso a la URL podrá usar Hive sin contraseña.`,icon:`warning`,showCancelButton:!0,confirmButtonText:`Sí, desactivar`,cancelButtonText:`Cancelar`})).isConfirmed)try{await K(`/api/auth/disable`,{method:`POST`}),yg.fire({icon:`success`,title:`Protección desactivada`,timer:2e3,showConfirmButton:!1,toast:!0,position:`top-end`}),t(!1),r(``),s(`status`)}catch{}}async function te(e){if(e.preventDefault(),T!==D){yg.fire({icon:`error`,title:`Error`,text:`Las contraseñas no coinciden`});return}if(T.length<8){yg.fire({icon:`error`,title:`Error`,text:`La contraseña debe tener al menos 8 caracteres`});return}P(!0);try{await K(`/api/auth/change-password`,{method:`POST`,body:{currentPassword:C,newPassword:T}}),yg.fire({icon:`success`,title:`Contraseña actualizada`,timer:2e3,showConfirmButton:!1,toast:!0,position:`top-end`}),w(``),E(``),O(``),s(`status`)}catch{}finally{P(!1)}}function ne(){c&&(navigator.clipboard.writeText(c),d(!0),setTimeout(()=>d(!1),2e3))}return i?(0,I.jsxs)(`div`,{className:`flex items-center gap-2 text-muted-foreground`,children:[(0,I.jsx)(Xn,{className:`h-4 w-4 animate-spin`}),` Cargando...`]}):(0,I.jsxs)(`div`,{className:`space-y-8 max-w-xl`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,I.jsxs)(`div`,{className:`space-y-1`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[e?(0,I.jsx)(Cr,{className:`h-5 w-5 text-green-500`}):(0,I.jsx)(wr,{className:`h-5 w-5 text-muted-foreground`}),(0,I.jsx)(`span`,{className:`font-medium`,children:`Protección con contraseña`})]}),(0,I.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e?`Activa — ${n||`credenciales configuradas`}`:`Desactivada — acceso libre sin contraseña`})]}),(0,I.jsx)(vq,{checked:e,onCheckedChange:e=>{e?s(`enable`):ee()}})]}),o===`enable`&&!e&&(0,I.jsxs)(`form`,{onSubmit:R,className:`space-y-4 border rounded-lg p-4`,children:[(0,I.jsx)(`h3`,{className:`font-medium`,children:`Configurar credenciales`}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`sec-email`,children:`Email`}),(0,I.jsx)(G,{id:`sec-email`,type:`email`,placeholder:`tu@email.com`,value:f,onChange:e=>p(e.target.value),required:!0,disabled:x})]}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`sec-pwd`,children:`Contraseña`}),(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsx)(G,{id:`sec-pwd`,type:y?`text`:`password`,placeholder:`Mínimo 8 caracteres`,value:m,onChange:e=>h(e.target.value),required:!0,disabled:x,className:`pr-10`}),(0,I.jsx)(`button`,{type:`button`,className:`absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground`,onClick:()=>b(e=>!e),tabIndex:-1,children:y?(0,I.jsx)(On,{className:`h-4 w-4`}):(0,I.jsx)(kn,{className:`h-4 w-4`})})]})]}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`sec-confirm`,children:`Confirmar contraseña`}),(0,I.jsx)(G,{id:`sec-confirm`,type:y?`text`:`password`,placeholder:`Repite la contraseña`,value:g,onChange:e=>v(e.target.value),required:!0,disabled:x})]}),(0,I.jsxs)(`div`,{className:`flex gap-2`,children:[(0,I.jsxs)(W,{type:`submit`,disabled:x,children:[x&&(0,I.jsx)(Xn,{className:`mr-2 h-4 w-4 animate-spin`}),`Activar protección`]}),(0,I.jsx)(W,{type:`button`,variant:`ghost`,onClick:()=>s(`status`),disabled:x,children:`Cancelar`})]})]}),e&&o===`status`&&(0,I.jsx)(`div`,{className:`flex gap-2`,children:(0,I.jsx)(W,{variant:`outline`,size:`sm`,onClick:()=>s(`change-password`),children:`Cambiar contraseña`})}),o===`change-password`&&e&&(0,I.jsxs)(`form`,{onSubmit:te,className:`space-y-4 border rounded-lg p-4`,children:[(0,I.jsx)(`h3`,{className:`font-medium`,children:`Cambiar contraseña`}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`current-pwd`,children:`Contraseña actual`}),(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsx)(G,{id:`current-pwd`,type:k?`text`:`password`,placeholder:`••••••••`,value:C,onChange:e=>w(e.target.value),required:!0,disabled:N,className:`pr-10`}),(0,I.jsx)(`button`,{type:`button`,className:`absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground`,onClick:()=>A(e=>!e),tabIndex:-1,children:k?(0,I.jsx)(On,{className:`h-4 w-4`}):(0,I.jsx)(kn,{className:`h-4 w-4`})})]})]}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`new-pwd`,children:`Nueva contraseña`}),(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsx)(G,{id:`new-pwd`,type:j?`text`:`password`,placeholder:`Mínimo 8 caracteres`,value:T,onChange:e=>E(e.target.value),required:!0,disabled:N,className:`pr-10`}),(0,I.jsx)(`button`,{type:`button`,className:`absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground`,onClick:()=>M(e=>!e),tabIndex:-1,children:j?(0,I.jsx)(On,{className:`h-4 w-4`}):(0,I.jsx)(kn,{className:`h-4 w-4`})})]})]}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`confirm-new`,children:`Confirmar nueva contraseña`}),(0,I.jsx)(G,{id:`confirm-new`,type:j?`text`:`password`,placeholder:`••••••••`,value:D,onChange:e=>O(e.target.value),required:!0,disabled:N})]}),(0,I.jsxs)(`div`,{className:`flex gap-2`,children:[(0,I.jsxs)(W,{type:`submit`,disabled:N,children:[N&&(0,I.jsx)(Xn,{className:`mr-2 h-4 w-4 animate-spin`}),`Actualizar contraseña`]}),(0,I.jsx)(W,{type:`button`,variant:`ghost`,onClick:()=>s(`status`),disabled:N,children:`Cancelar`})]})]}),c&&(0,I.jsxs)(`div`,{className:`space-y-2 border rounded-lg p-4 bg-muted/30`,children:[(0,I.jsx)(`div`,{className:`flex items-center justify-between`,children:(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`p`,{className:`text-sm font-medium`,children:`Recovery Key`}),(0,I.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Úsalo para recuperar el acceso si olvidas tu contraseña`})]})}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`code`,{className:`flex-1 text-xs bg-muted rounded px-3 py-2 font-mono break-all`,children:c}),(0,I.jsx)(W,{variant:`ghost`,size:`icon`,onClick:ne,className:`shrink-0`,children:u?(0,I.jsx)(rn,{className:`h-4 w-4 text-green-500`}):(0,I.jsx)(yn,{className:`h-4 w-4`})})]})]})]})}function eY({panel:e}){switch(e){case`etica`:return(0,I.jsx)(`div`,{className:`p-4`,children:(0,I.jsx)(zq,{})});case`herramientas`:return(0,I.jsx)(`div`,{className:`p-4`,children:(0,I.jsx)(Vq,{})});case`mcp`:return(0,I.jsx)(`div`,{className:`p-4`,children:(0,I.jsx)(qq,{})});case`skills`:return(0,I.jsx)(`div`,{className:`p-4`,children:(0,I.jsx)($q,{})});case`perfil`:return(0,I.jsx)(`div`,{className:`p-4`,children:(0,I.jsx)(Xq,{})});case`notas`:return(0,I.jsx)(`div`,{className:`p-4`,children:(0,I.jsx)(UJ,{})});case`cron-jobs`:return(0,I.jsx)(`div`,{className:`p-4`,children:(0,I.jsx)(QJ,{})});case`voz`:return(0,I.jsx)(`div`,{className:`p-4`,children:(0,I.jsx)(tJ,{})});case`seguridad`:return(0,I.jsx)(`div`,{className:`p-4`,children:(0,I.jsx)($J,{})});default:return null}}var tY=[`etica`,`herramientas`,`mcp`,`skills`,`perfil`,`notas`,`cron-jobs`,`voz`,`seguridad`];function nY({forcePanel:e}){let{panel:t}=Bd(),{fetchSkills:n}=GR(),{fetchTools:r}=WR(),{fetchMCPServers:i}=KR();(0,_.useEffect)(()=>{n(),r(),i()},[n,r,i]);let a=e||(tY.includes(t)?t:`herramientas`),{title:o,subtitle:s,eyebrow:c}={etica:{eyebrow:`PROTOCOLOS DE CONDUCTA`,title:`Ética & Alineación`,subtitle:`Configura los límites morales y el comportamiento base de tus agentes.`},herramientas:{eyebrow:`CAPACIDADES DINÁMICAS`,title:`Gestión de Herramientas`,subtitle:`Habilita y configura las funciones que tus agentes pueden ejecutar.`},mcp:{eyebrow:`CONECTIVIDAD EXTERNA`,title:`Servidores MCP`,subtitle:`Conecta Hive con fuentes de datos externas y herramientas de terceros.`},skills:{eyebrow:`HABILIDADES ESPECIALIZADAS`,title:`Galería de Skills`,subtitle:`Nodos cognitivos preconfigurados para tareas específicas de alto nivel.`},perfil:{eyebrow:`IDENTIDAD DEL OPERADOR`,title:`Perfil de Usuario`,subtitle:`Gestiona tu información personal y preferencias de la interfaz.`},notas:{eyebrow:`MEMORIA OPERATIVA`,title:`Notas del Sistema`,subtitle:`Registro de información persistente y recordatorios del enjambre.`},"cron-jobs":{eyebrow:`AUTOMATIZACIÓN TEMPORAL`,title:`Tareas Programadas`,subtitle:`Gestión de ejecuciones recurrentes y disparadores cron.`},voz:{eyebrow:`INTERFAZ DE VOZ`,title:`Configuración de Voz`,subtitle:`Configura las API keys de los providers de STT (Speech-to-Text) y TTS (Text-to-Speech) para habilitar la comunicación por voz.`},seguridad:{eyebrow:`CONTROL DE ACCESO`,title:`Seguridad`,subtitle:`Protege tu instancia con email y contraseña. Esencial si despliegas Hive en un servidor público.`}}[a];return(0,I.jsxs)(`div`,{className:`hive-page-container`,children:[(0,I.jsx)(`div`,{className:`hive-page-header`,children:(0,I.jsxs)(`div`,{className:`relative z-10`,children:[(0,I.jsxs)(`div`,{className:`hive-page-header__eyebrow`,children:[(0,I.jsx)(`div`,{className:`hive-page-header__dot`}),(0,I.jsx)(`span`,{className:`hive-page-header__label`,children:c})]}),(0,I.jsxs)(`h2`,{className:`hive-title-page`,children:[o.split(` & `)[0],` `,o.includes(` & `)&&(0,I.jsxs)(`span`,{className:`hive-title-page__accent`,children:[`& `,o.split(` & `)[1]]}),o.includes(` `)&&!o.includes(` & `)&&(0,I.jsxs)(I.Fragment,{children:[o.split(` `)[0],` `,(0,I.jsx)(`span`,{className:`hive-title-page__accent`,children:o.split(` `).slice(1).join(` `)})]}),!o.includes(` `)&&o]}),(0,I.jsx)(`p`,{className:`hive-subtitle`,children:s})]})}),(0,I.jsx)(`div`,{className:`animate-fade-in`,children:(0,I.jsx)(eY,{panel:a})})]})}function rY(){return(0,I.jsx)(jq,{})}function iY(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var aY=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,oY=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,sY={};function cY(e,t){return((t||sY).jsx?oY:aY).test(e)}var lY=/[ \t\n\f\r]/g;function uY(e){return typeof e==`object`?e.type===`text`?dY(e.value):!1:dY(e)}function dY(e){return e.replace(lY,``)===``}var fY=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};fY.prototype.normal={},fY.prototype.property={},fY.prototype.space=void 0;function pY(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new fY(n,r,t)}function mY(e){return e.toLowerCase()}var hY=class{constructor(e,t){this.attribute=t,this.property=e}};hY.prototype.attribute=``,hY.prototype.booleanish=!1,hY.prototype.boolean=!1,hY.prototype.commaOrSpaceSeparated=!1,hY.prototype.commaSeparated=!1,hY.prototype.defined=!1,hY.prototype.mustUseProperty=!1,hY.prototype.number=!1,hY.prototype.overloadedBoolean=!1,hY.prototype.property=``,hY.prototype.spaceSeparated=!1,hY.prototype.space=void 0;var gY=s({boolean:()=>vY,booleanish:()=>yY,commaOrSpaceSeparated:()=>CY,commaSeparated:()=>SY,number:()=>$,overloadedBoolean:()=>bY,spaceSeparated:()=>xY}),_Y=0,vY=wY(),yY=wY(),bY=wY(),$=wY(),xY=wY(),SY=wY(),CY=wY();function wY(){return 2**++_Y}var TY=Object.keys(gY),EY=class extends hY{constructor(e,t,n,r){let i=-1;if(super(e,t),DY(this,`space`,r),typeof n==`number`)for(;++i<TY.length;){let e=TY[i];DY(this,TY[i],(n&gY[e])===gY[e])}}};EY.prototype.defined=!0;function DY(e,t,n){n&&(e[t]=n)}function OY(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new EY(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[mY(r)]=r,n[mY(a.attribute)]=r}return new fY(t,n,e.space)}var kY=OY({properties:{ariaActiveDescendant:null,ariaAtomic:yY,ariaAutoComplete:null,ariaBusy:yY,ariaChecked:yY,ariaColCount:$,ariaColIndex:$,ariaColSpan:$,ariaControls:xY,ariaCurrent:null,ariaDescribedBy:xY,ariaDetails:null,ariaDisabled:yY,ariaDropEffect:xY,ariaErrorMessage:null,ariaExpanded:yY,ariaFlowTo:xY,ariaGrabbed:yY,ariaHasPopup:null,ariaHidden:yY,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:xY,ariaLevel:$,ariaLive:null,ariaModal:yY,ariaMultiLine:yY,ariaMultiSelectable:yY,ariaOrientation:null,ariaOwns:xY,ariaPlaceholder:null,ariaPosInSet:$,ariaPressed:yY,ariaReadOnly:yY,ariaRelevant:null,ariaRequired:yY,ariaRoleDescription:xY,ariaRowCount:$,ariaRowIndex:$,ariaRowSpan:$,ariaSelected:yY,ariaSetSize:$,ariaSort:null,ariaValueMax:$,ariaValueMin:$,ariaValueNow:$,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function AY(e,t){return t in e?e[t]:t}function jY(e,t){return AY(e,t.toLowerCase())}var MY=OY({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:SY,acceptCharset:xY,accessKey:xY,action:null,allow:null,allowFullScreen:vY,allowPaymentRequest:vY,allowUserMedia:vY,alt:null,as:null,async:vY,autoCapitalize:null,autoComplete:xY,autoFocus:vY,autoPlay:vY,blocking:xY,capture:null,charSet:null,checked:vY,cite:null,className:xY,cols:$,colSpan:null,content:null,contentEditable:yY,controls:vY,controlsList:xY,coords:$|SY,crossOrigin:null,data:null,dateTime:null,decoding:null,default:vY,defer:vY,dir:null,dirName:null,disabled:vY,download:bY,draggable:yY,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:vY,formTarget:null,headers:xY,height:$,hidden:bY,high:$,href:null,hrefLang:null,htmlFor:xY,httpEquiv:xY,id:null,imageSizes:null,imageSrcSet:null,inert:vY,inputMode:null,integrity:null,is:null,isMap:vY,itemId:null,itemProp:xY,itemRef:xY,itemScope:vY,itemType:xY,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:vY,low:$,manifest:null,max:null,maxLength:$,media:null,method:null,min:null,minLength:$,multiple:vY,muted:vY,name:null,nonce:null,noModule:vY,noValidate:vY,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:vY,optimum:$,pattern:null,ping:xY,placeholder:null,playsInline:vY,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:vY,referrerPolicy:null,rel:xY,required:vY,reversed:vY,rows:$,rowSpan:$,sandbox:xY,scope:null,scoped:vY,seamless:vY,selected:vY,shadowRootClonable:vY,shadowRootDelegatesFocus:vY,shadowRootMode:null,shape:null,size:$,sizes:null,slot:null,span:$,spellCheck:yY,src:null,srcDoc:null,srcLang:null,srcSet:null,start:$,step:null,style:null,tabIndex:$,target:null,title:null,translate:null,type:null,typeMustMatch:vY,useMap:null,value:yY,width:$,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:xY,axis:null,background:null,bgColor:null,border:$,borderColor:null,bottomMargin:$,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:vY,declare:vY,event:null,face:null,frame:null,frameBorder:null,hSpace:$,leftMargin:$,link:null,longDesc:null,lowSrc:null,marginHeight:$,marginWidth:$,noResize:vY,noHref:vY,noShade:vY,noWrap:vY,object:null,profile:null,prompt:null,rev:null,rightMargin:$,rules:null,scheme:null,scrolling:yY,standby:null,summary:null,text:null,topMargin:$,valueType:null,version:null,vAlign:null,vLink:null,vSpace:$,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:vY,disableRemotePlayback:vY,prefix:null,property:null,results:$,security:null,unselectable:null},space:`html`,transform:jY}),NY=OY({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:CY,accentHeight:$,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:$,amplitude:$,arabicForm:null,ascent:$,attributeName:null,attributeType:null,azimuth:$,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:$,by:null,calcMode:null,capHeight:$,className:xY,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:$,diffuseConstant:$,direction:null,display:null,dur:null,divisor:$,dominantBaseline:null,download:vY,dx:null,dy:null,edgeMode:null,editable:null,elevation:$,enableBackground:null,end:null,event:null,exponent:$,externalResourcesRequired:null,fill:null,fillOpacity:$,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:SY,g2:SY,glyphName:SY,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:$,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:$,horizOriginX:$,horizOriginY:$,id:null,ideographic:$,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:$,k:$,k1:$,k2:$,k3:$,k4:$,kernelMatrix:CY,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:$,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:$,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:$,overlineThickness:$,paintOrder:null,panose1:null,path:null,pathLength:$,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:xY,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:$,pointsAtY:$,pointsAtZ:$,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:CY,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:CY,rev:CY,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:CY,requiredFeatures:CY,requiredFonts:CY,requiredFormats:CY,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:$,specularExponent:$,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:$,strikethroughThickness:$,string:null,stroke:null,strokeDashArray:CY,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:$,strokeOpacity:$,strokeWidth:null,style:null,surfaceScale:$,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:CY,tabIndex:$,tableValues:null,target:null,targetX:$,targetY:$,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:CY,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:$,underlineThickness:$,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:$,values:null,vAlphabetic:$,vMathematical:$,vectorEffect:null,vHanging:$,vIdeographic:$,version:null,vertAdvY:$,vertOriginX:$,vertOriginY:$,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:$,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:AY}),PY=OY({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()}}),FY=OY({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:jY}),IY=OY({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),LY={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`},RY=/[A-Z]/g,zY=/-[a-z]/g,BY=/^data[-\w.:]+$/i;function VY(e,t){let n=mY(t),r=t,i=hY;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&BY.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(zY,UY);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!zY.test(e)){let n=e.replace(RY,HY);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=EY}return new i(r,t)}function HY(e){return`-`+e.toLowerCase()}function UY(e){return e.charAt(1).toUpperCase()}var WY=pY([kY,MY,PY,FY,IY],`html`),GY=pY([kY,NY,PY,FY,IY],`svg`);function KY(e){return e.join(` `).trim()}var qY=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
207
- `,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function D(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),D()}function _(e){return e?e.replace(l,p):p}t.exports=g})),JY=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=t(qY());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),YY=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),XY=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(JY()),r=YY();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),ZY=$Y(`end`),QY=$Y(`start`);function $Y(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 eX(e){let t=QY(e),n=ZY(e);if(t&&n)return{start:t,end:n}}function tX(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?rX(e.position):`start`in e||`end`in e?rX(e):`line`in e||`column`in e?nX(e):``}function nX(e){return iX(e&&e.line)+`:`+iX(e&&e.column)}function rX(e){return nX(e&&e.start)+`-`+nX(e&&e.end)}function iX(e){return e&&typeof e==`number`?e:1}var aX=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&&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=tX(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}};aX.prototype.file=``,aX.prototype.name=``,aX.prototype.reason=``,aX.prototype.message=``,aX.prototype.stack=``,aX.prototype.column=void 0,aX.prototype.line=void 0,aX.prototype.ancestors=void 0,aX.prototype.cause=void 0,aX.prototype.fatal=void 0,aX.prototype.place=void 0,aX.prototype.ruleId=void 0,aX.prototype.source=void 0;var oX=l(XY(),1),sX={}.hasOwnProperty,cX=new Map,lX=/[A-Z]/g,uX=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),dX=new Set([`td`,`th`]),fX=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function pX(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=wX(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=CX(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`?GY:WY,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=mX(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function mX(e,t,n){if(t.type===`element`)return hX(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return gX(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return vX(e,t,n);if(t.type===`mdxjsEsm`)return _X(e,t);if(t.type===`root`)return yX(e,t,n);if(t.type===`text`)return bX(e,t)}function hX(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=GY,e.schema=i),e.ancestors.push(t);let a=AX(e,t.tagName,!1),o=TX(e,t),s=DX(e,t);return uX.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!uY(e):!0})),xX(e,o,a,t),SX(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function gX(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)}jX(e,t.position)}function _X(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);jX(e,t.position)}function vX(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=GY,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:AX(e,t.name,!0),o=EX(e,t),s=DX(e,t);return xX(e,o,a,t),SX(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function yX(e,t,n){let r={};return SX(r,DX(e,t)),e.create(t,e.Fragment,r,n)}function bX(e,t){return t.value}function xX(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function SX(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function CX(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 wX(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=QY(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 TX(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&sX.call(t.properties,i)){let a=OX(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&dX.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 EX(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 jX(e,t.position);else{let i=r.name,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 jX(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function DX(e,t){let n=[],r=-1,i=e.passKeys?new Map:cX;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=mX(e,a,o);s!==void 0&&n.push(s)}return n}function OX(e,t,n){let r=VY(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?iY(n):KY(n)),r.property===`style`){let t=typeof n==`object`?n:kX(e,String(n));return e.stylePropertyNameCase===`css`&&(t=MX(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?LY[r.property]||r.property:r.attribute,n]}}function kX(e,t){try{return(0,oX.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new aX("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=fX+`#cannot-parse-style-attribute`,r}}function AX(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=cY(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=cY(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return sX.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);jX(e)}function jX(e,t){let n=new aX("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=fX+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function MX(e){let t={},n;for(n in e)sX.call(e,n)&&(t[NX(n)]=e[n]);return t}function NX(e){let t=e.replace(lX,PX);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function PX(e){return`-`+e.toLowerCase()}var FX={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`]},IX={};function LX(e,t){let n=t||IX;return RX(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function RX(e,t,n){if(BX(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 zX(e.children,t,n)}return Array.isArray(e)?zX(e,t,n):``}function zX(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=RX(e[i],t,n);return r.join(``)}function BX(e){return!!(e&&typeof e==`object`)}var VX=document.createElement(`i`);function HX(e){let t=`&`+e+`;`;VX.innerHTML=t;let n=VX.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function UX(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 WX(e,t){return e.length>0?(UX(e,e.length,0,t),e):t}var GX={}.hasOwnProperty;function KX(e){let t={},n=-1;for(;++n<e.length;)qX(t,e[n]);return t}function qX(e,t){let n;for(n in t){let r=(GX.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){GX.call(r,a)||(r[a]=[]);let e=i[a];JX(r[a],Array.isArray(e)?e:e?[e]:[])}}}function JX(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);UX(e,0,0,r)}function YX(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 XX(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var ZX=lZ(/[A-Za-z]/),QX=lZ(/[\dA-Za-z]/),$X=lZ(/[#-'*+\--9=?A-Z^-~]/);function eZ(e){return e!==null&&(e<32||e===127)}var tZ=lZ(/\d/),nZ=lZ(/[\dA-Fa-f]/),rZ=lZ(/[!-/:-@[-`{-~]/);function iZ(e){return e!==null&&e<-2}function aZ(e){return e!==null&&(e<0||e===32)}function oZ(e){return e===-2||e===-1||e===32}var sZ=lZ(/\p{P}|\p{S}/u),cZ=lZ(/\s/);function lZ(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function uZ(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&QX(e.charCodeAt(n+1))&&QX(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 dZ(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return oZ(r)?(e.enter(n),s(r)):t(r)}function s(r){return oZ(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var fZ={tokenize:pZ};function pZ(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),dZ(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);return}return iZ(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var mZ={tokenize:gZ},hZ={tokenize:_Z};function gZ(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++;return UX(t.events,a+1,0,t.events.slice(n)),t.events.length=s,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(hZ,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(hZ,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);return}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);return}return iZ(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++;UX(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}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 _Z(e,t,n){return dZ(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function vZ(e){if(e===null||aZ(e)||cZ(e))return 1;if(sZ(e))return 2}function yZ(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 bZ={name:`attention`,resolveAll:xZ,tokenize:SZ};function xZ(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};CZ(d,-c),CZ(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=WX(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=WX(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=WX(l,yZ(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=WX(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=WX(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,UX(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function SZ(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=vZ(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=vZ(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function CZ(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var wZ={name:`autolink`,tokenize:TZ};function TZ(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 ZX(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||QX(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||QX(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||eZ(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):$X(t)?(e.consume(t),l):n(t)}function u(e){return QX(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||QX(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var EZ={partial:!0,tokenize:DZ};function DZ(e,t,n){return r;function r(t){return oZ(t)?dZ(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||iZ(e)?t(e):n(e)}}var OZ={continuation:{tokenize:AZ},exit:jZ,name:`blockQuote`,tokenize:kZ};function kZ(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 oZ(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function AZ(e,t,n){let r=this;return i;function i(t){return oZ(t)?dZ(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(OZ,t,n)(r)}}function jZ(e){e.exit(`blockQuote`)}var MZ={name:`characterEscape`,tokenize:NZ};function NZ(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 rZ(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var PZ={name:`characterReference`,tokenize:FZ};function FZ(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=QX,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=nZ,u):(e.enter(`characterReferenceValue`),a=7,o=tZ,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===QX&&!HX(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 IZ={partial:!0,tokenize:zZ},LZ={concrete:!0,name:`codeFenced`,tokenize:RZ};function RZ(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`),oZ(t)?dZ(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||iZ(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(IZ,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||iZ(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):oZ(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),dZ(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||iZ(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||iZ(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&&oZ(t)?dZ(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||iZ(t)?e.check(IZ,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||iZ(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`),oZ(t)?dZ(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`),oZ(t)?dZ(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||iZ(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function zZ(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 BZ={name:`codeIndented`,tokenize:HZ},VZ={partial:!0,tokenize:UZ};function HZ(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),dZ(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):iZ(t)?e.attempt(VZ,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||iZ(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function UZ(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):iZ(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):dZ(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):iZ(e)?i(e):n(e)}}var WZ={name:`codeText`,previous:_fe,resolve:gfe,tokenize:vfe};function gfe(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 _fe(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function vfe(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)):iZ(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||iZ(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 yfe=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&&GZ(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),GZ(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),GZ(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);GZ(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);GZ(this.left,t.reverse())}}};function GZ(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 KZ(e){let t={},n=-1,r,i,a,o,s,c,l,u=new yfe(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,bfe(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 UX(e,0,1/0,u.slice(0)),!l}function bfe(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 xfe={resolve:Cfe,tokenize:wfe},Sfe={partial:!0,tokenize:Tfe};function Cfe(e){return KZ(e),e}function wfe(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):iZ(t)?e.check(Sfe,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 Tfe(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),dZ(e,a,`linePrefix`)}function a(i){if(i===null||iZ(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 qZ(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||eZ(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||iZ(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||aZ(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||eZ(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 JZ(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):iZ(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||iZ(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!oZ(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function YZ(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):iZ(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),dZ(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||iZ(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 XZ(e,t){let n;return r;function r(i){return iZ(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):oZ(i)?dZ(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Efe={name:`definition`,tokenize:Ofe},Dfe={partial:!0,tokenize:kfe};function Ofe(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return JZ.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=XX(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 aZ(t)?XZ(e,l)(t):l(t)}function l(t){return qZ(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Dfe,d,d)(t)}function d(t){return oZ(t)?dZ(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||iZ(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function kfe(e,t,n){return r;function r(t){return aZ(t)?XZ(e,i)(t):n(t)}function i(t){return YZ(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return oZ(t)?dZ(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||iZ(e)?t(e):n(e)}}var Afe={name:`hardBreakEscape`,tokenize:jfe};function jfe(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return iZ(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Mfe={name:`headingAtx`,resolve:Nfe,tokenize:Pfe};function Nfe(e,t){let n=e.length-2,r=3,i,a;return 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&&(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`},UX(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Pfe(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||aZ(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||iZ(n)?(e.exit(`atxHeading`),t(n)):oZ(n)?dZ(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||aZ(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Ffe=`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(`.`),ZZ=[`pre`,`script`,`style`,`textarea`],Ife={concrete:!0,name:`htmlFlow`,resolveTo:zfe,tokenize:Bfe},Lfe={partial:!0,tokenize:Hfe},Rfe={partial:!0,tokenize:Vfe};function zfe(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 Bfe(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):ZX(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):ZX(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 ZX(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||aZ(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&ZZ.includes(l)?(i=1,r.interrupt?t(s):O(s)):Ffe.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||QX(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 oZ(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||ZX(t)?(e.consume(t),b):oZ(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||QX(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):oZ(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):oZ(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||iZ(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||aZ(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||oZ(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||iZ(t)?O(t):oZ(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):iZ(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Lfe,R,k)(t)):t===null||iZ(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(Rfe,A,R)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||iZ(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 ZZ.includes(n)?(e.consume(t),L):O(t)}return ZX(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||iZ(t)?(e.exit(`htmlFlowData`),R(t)):(e.consume(t),L)}function R(n){return e.exit(`htmlFlow`),t(n)}}function Vfe(e,t,n){let r=this;return i;function i(t){return iZ(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Hfe(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(EZ,t,n)}}var Ufe={name:`htmlText`,tokenize:Wfe};function Wfe(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):ZX(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):ZX(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):iZ(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):iZ(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):iZ(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):iZ(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return ZX(t)?(e.consume(t),S):n(t)}function S(t){return t===45||QX(t)?(e.consume(t),S):C(t)}function C(t){return iZ(t)?(o=C,N(t)):oZ(t)?(e.consume(t),C):M(t)}function w(t){return t===45||QX(t)?(e.consume(t),w):t===47||t===62||aZ(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||ZX(t)?(e.consume(t),E):iZ(t)?(o=T,N(t)):oZ(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||QX(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):iZ(t)?(o=D,N(t)):oZ(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):iZ(t)?(o=O,N(t)):oZ(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):iZ(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||aZ(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||aZ(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 oZ(t)?dZ(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 QZ={name:`labelEnd`,resolveAll:Jfe,resolveTo:Yfe,tokenize:Xfe},Gfe={tokenize:Zfe},Kfe={tokenize:Qfe},qfe={tokenize:$fe};function Jfe(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&&UX(e,0,e.length,n),e}function Yfe(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=WX(s,e.slice(a+1,a+r+3)),s=WX(s,[[`enter`,u,t]]),s=WX(s,yZ(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=WX(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=WX(s,e.slice(o+1)),s=WX(s,[[`exit`,c,t]]),UX(e,a,e.length,s),e}function Xfe(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(XX(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(Gfe,u,o?u:d)(t):t===91?e.attempt(Kfe,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(qfe,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function Zfe(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 aZ(t)?XZ(e,a)(t):a(t)}function a(t){return t===41?u(t):qZ(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return aZ(t)?XZ(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?YZ(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return aZ(t)?XZ(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 Qfe(e,t,n){let r=this;return i;function i(t){return JZ.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(XX(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function $fe(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 epe={name:`labelStartImage`,resolveAll:QZ.resolveAll,tokenize:tpe};function tpe(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var npe={name:`labelStartLink`,resolveAll:QZ.resolveAll,tokenize:rpe};function rpe(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var $Z={name:`lineEnding`,tokenize:ipe};function ipe(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),dZ(e,t,`linePrefix`)}}var eQ={name:`thematicBreak`,tokenize:ape};function ape(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||iZ(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),oZ(t)?dZ(e,s,`whitespace`)(t):s(t))}}var tQ={continuation:{tokenize:lpe},exit:dpe,name:`list`,tokenize:cpe},ope={partial:!0,tokenize:fpe},spe={partial:!0,tokenize:upe};function cpe(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:tZ(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(eQ,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 tZ(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(EZ,r.interrupt?n:u,e.attempt(ope,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return oZ(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 lpe(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(EZ,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,dZ(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!oZ(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(spe,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,dZ(e,e.attempt(tQ,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function upe(e,t,n){let r=this;return dZ(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 dpe(e){e.exit(this.containerState.type)}function fpe(e,t,n){let r=this;return dZ(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!oZ(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var nQ={name:`setextUnderline`,resolveTo:ppe,tokenize:mpe};function ppe(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function mpe(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`),oZ(t)?dZ(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||iZ(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var hpe={tokenize:gpe};function gpe(e){let t=this,n=e.attempt(EZ,r,e.attempt(this.parser.constructs.flowInitial,i,dZ(e,e.attempt(this.parser.constructs.flow,i,e.attempt(xfe,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var _pe={resolveAll:iQ()},vpe=rQ(`string`),ype=rQ(`text`);function rQ(e){return{resolveAll:iQ(e===`text`?bpe: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);return}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 iQ(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 bpe(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var xpe=s({attentionMarkers:()=>kpe,contentInitial:()=>Cpe,disable:()=>Ape,document:()=>Spe,flow:()=>Tpe,flowInitial:()=>wpe,insideSpan:()=>Ope,string:()=>Epe,text:()=>Dpe}),Spe={42:tQ,43:tQ,45:tQ,48:tQ,49:tQ,50:tQ,51:tQ,52:tQ,53:tQ,54:tQ,55:tQ,56:tQ,57:tQ,62:OZ},Cpe={91:Efe},wpe={[-2]:BZ,[-1]:BZ,32:BZ},Tpe={35:Mfe,42:eQ,45:[nQ,eQ],60:Ife,61:nQ,95:eQ,96:LZ,126:LZ},Epe={38:PZ,92:MZ},Dpe={[-5]:$Z,[-4]:$Z,[-3]:$Z,33:epe,38:PZ,42:bZ,60:[wZ,Ufe],91:npe,92:[Afe,MZ],93:QZ,95:bZ,96:WZ},Ope={null:[bZ,_pe]},kpe={null:[42,95]},Ape={null:[]};function jpe(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=WX(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=yZ(a,l.events,l),l.events):[]}function f(e,t){return Npe(p(e),t)}function p(e){return Mpe(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(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){iZ(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&&UX(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 Mpe(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 Npe(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=`
208
- `;break;case-3:o=`\r
209
- `;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 Ppe(e){let t={constructs:KX([xpe,...(e||{}).extensions||[]]),content:n(fZ),defined:[],document:n(mZ),flow:n(hpe),lazy:{},string:n(vpe),text:n(ype)};return t;function n(e){return n;function n(n){return jpe(t,e,n)}}}function Fpe(e){for(;!KZ(e););return e}var aQ=/[\0\t\n\r]/g;function Ipe(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(aQ.lastIndex=u,c=aQ.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var Lpe=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Rpe(e){return e.replace(Lpe,zpe)}function zpe(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return YX(n.slice(t?2:1),t?16:10)}return HX(n)||e}var oQ={}.hasOwnProperty;function Bpe(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),Vpe(n)(Fpe(Ppe(n).document().write(Ipe()(e,t,!0))))}function Vpe(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(me),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(ue),blockQuote:a(se),characterEscape:T,characterReference:T,codeFenced:a(ce),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ce,o),codeText:a(z,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(le),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(B),hardBreakEscape:a(de),hardBreakTrailing:a(de),htmlFlow:a(fe,o),htmlFlowData:T,htmlText:a(fe,o),htmlTextData:T,image:a(pe),label:o,link:a(me),listItem:a(ge),listItemValue:f,listOrdered:a(he,d),listUnordered:a(he),paragraph:a(_e),reference:ee,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(ue),strong:a(ve),thematicBreak:a(be)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:oe,autolinkProtocol:ae,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:ne,characterReferenceMarkerNumeric:ne,characterReferenceValue:re,characterReference:ie,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(j),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(N),label:F,labelText:P,lineEnding:D,link:c(M),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:te,resourceDestinationString:I,resourceTitleString:L,resource:R,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};cQ(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];oQ.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||lQ).call(a,void 0,e[0])}for(r.position={start:sQ(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:sQ(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;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 i=r;for(s=void 0;i--;){let t=e[i];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=i}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),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(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:sQ(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||lQ).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+tX({start:e.start,end:e.end})+`): it’s not open`);n.position.end=sQ(e.end)}function u(){return LX(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(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 p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){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 _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=XX(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=ye(),n.position={start:sQ(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=sQ(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=sQ(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}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.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 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(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=Rpe(t),n.identifier=XX(t).toLowerCase()}function F(){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 I(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function L(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function R(){this.data.inReference=void 0}function ee(){this.data.referenceType=`collapsed`}function te(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=XX(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ne(e){this.data.characterReferenceType=e.type}function re(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=YX(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=HX(t);let i=this.stack[this.stack.length-1];i.value+=r}function ie(e){let t=this.stack.pop();t.position.end=sQ(e.end)}function ae(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function oe(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function se(){return{type:`blockquote`,children:[]}}function ce(){return{type:`code`,lang:null,meta:null,value:``}}function z(){return{type:`inlineCode`,value:``}}function le(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function B(){return{type:`emphasis`,children:[]}}function ue(){return{type:`heading`,depth:0,children:[]}}function de(){return{type:`break`}}function fe(){return{type:`html`,value:``}}function pe(){return{type:`image`,title:null,url:``,alt:null}}function me(){return{type:`link`,title:null,url:``,children:[]}}function he(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function ge(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function _e(){return{type:`paragraph`,children:[]}}function ve(){return{type:`strong`,children:[]}}function ye(){return{type:`text`,value:``}}function be(){return{type:`thematicBreak`}}}function sQ(e){return{line:e.line,column:e.column,offset:e.offset}}function cQ(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?cQ(e,r):Hpe(e,r)}}function Hpe(e,t){let n;for(n in t)if(oQ.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`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function lQ(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+tX({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+tX({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+tX({start:t.start,end:t.end})+`) is still open`)}function Upe(e){let t=this;t.parser=n;function n(n){return Bpe(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function Wpe(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 Gpe(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
210
- `}]}function Kpe(e,t){let n=t.value?t.value+`
211
- `:``,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 qpe(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Jpe(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ype(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=uZ(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 Xpe(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 Zpe(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function uQ(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 Qpe(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return uQ(e,t);let i={src:uZ(r.url||``),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 $pe(e,t){let n={src:uZ(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 eme(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 tme(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return uQ(e,t);let i={href:uZ(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 nme(e,t){let n={href:uZ(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 rme(e,t,n){let r=e.all(t),i=n?ime(n):dQ(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:`
212
- `}),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:`
213
- `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function ime(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=dQ(n[r])}return t}function dQ(e){return e.spread??e.children.length>1}function ame(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 ome(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function sme(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function cme(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function lme(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=QY(t.children[1]),o=ZY(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 ume(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 dme(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var fQ=9,pQ=32;function fme(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(mQ(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(mQ(t.slice(i),i>0,!1)),a.join(``)}function mQ(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===fQ||t===pQ;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===fQ||t===pQ;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function pme(e,t){let n={type:`text`,value:fme(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function mme(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var hme={blockquote:Wpe,break:Gpe,code:Kpe,delete:qpe,emphasis:Jpe,footnoteReference:Ype,heading:Xpe,html:Zpe,imageReference:Qpe,image:$pe,inlineCode:eme,linkReference:tme,link:nme,listItem:rme,list:ame,paragraph:ome,root:sme,strong:cme,table:lme,tableCell:dme,tableRow:ume,text:pme,thematicBreak:mme,toml:hQ,yaml:hQ,definition:hQ,footnoteDefinition:hQ};function hQ(){}var gQ=typeof self==`object`?self:globalThis,gme=(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)e[r(t)]=r(n);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(new gQ[e](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)}}return n(new gQ[a](o),i)};return r},_Q=e=>gme(new Map,e)(0),vQ=``,{toString:_me}={},{keys:vme}=Object,yQ=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=_me.call(e).slice(8,-1);switch(n){case`Array`:return[1,vQ];case`Object`:return[2,vQ];case`Date`:return[3,vQ];case`RegExp`:return[4,vQ];case`Map`:return[5,vQ];case`Set`:return[6,vQ];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},bQ=([e,t])=>e===0&&(t===`function`||t===`symbol`),yme=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=yQ(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of vme(r))(e||!bQ(yQ(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(bQ(yQ(n))||bQ(yQ(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!bQ(yQ(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},xQ=(e,{json:t,lossy:n}={})=>{let r=[];return yme(!(t||n),!!t,new Map,r)(e),r},SQ=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?_Q(xQ(e,t)):structuredClone(e):(e,t)=>_Q(xQ(e,t));function bme(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 xme(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function Sme(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||bme,r=e.options.footnoteBackLabel||xme,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=uZ(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...SQ(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
214
- `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
215
- `}]}}var CQ=(function(e){if(e==null)return Eme;if(typeof e==`function`)return wQ(e);if(typeof e==`object`)return Array.isArray(e)?Cme(e):wme(e);if(typeof e==`string`)return Tme(e);throw Error(`Expected function, string, or object as test`)});function Cme(e){let t=[],n=-1;for(;++n<e.length;)t[n]=CQ(e[n]);return wQ(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function wme(e){let t=e;return wQ(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function Tme(e){return wQ(t);function t(t){return t&&t.type===e}}function wQ(e){return t;function t(t,n,r){return!!(Dme(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function Eme(){return!0}function Dme(e){return typeof e==`object`&&!!e&&`type`in e}function Ome(e){return e}var TQ=[];function EQ(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=CQ(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,`name`,{value:`node (`+Ome(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=TQ,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=kme(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function kme(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?TQ:[e]}function DQ(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),EQ(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var OQ={}.hasOwnProperty,Ame={};function jme(e,t){let n=t||Ame,r=new Map,i=new Map,a={all:s,applyData:Nme,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...hme,...n.handlers},one:o,options:n,patch:Mme,wrap:Fme};return DQ(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(OQ.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,r=SQ(n);return r.children=a.all(e),r}return SQ(e)}return(a.options.unknownHandler||Pme)(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=kQ(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=kQ(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function Mme(e,t){e.position&&(t.position=eX(e))}function Nme(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,SQ(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function Pme(e,t){let n=t.data||{},r=`value`in t&&!(OQ.call(n,`hProperties`)||OQ.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 Fme(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
216
- `});++r<e.length;)r&&n.push({type:`text`,value:`
217
- `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
218
- `}),n}function kQ(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function AQ(e,t){let n=jme(e,t),r=n.one(e,void 0),i=Sme(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
219
- `},i)),a}function Ime(e,t){return e&&`run`in e?async function(n,r){let i=AQ(n,{file:r,...t});await e.run(i,r)}:function(n,r){return AQ(n,{file:r,...e||t})}}function jQ(e){if(e)throw e}var Lme=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 MQ(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 Rme(){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);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?zme(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 zme(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 NQ={basename:Bme,dirname:Vme,extname:Hme,join:Ume,sep:`/`};function Bme(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);PQ(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 Vme(e){if(PQ(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 Hme(e){PQ(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}continue}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 Ume(...e){let t=-1,n;for(;++t<e.length;)PQ(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:Wme(n)}function Wme(e){PQ(e);let t=e.codePointAt(0)===47,n=Gme(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function Gme(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 PQ(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var Kme={cwd:qme};function qme(){return`/`}function FQ(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function Jme(e){if(typeof e==`string`)e=new URL(e);else if(!FQ(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 Yme(e)}function Yme(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 IQ=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],LQ=class{constructor(e){let t;t=e?FQ(e)?{path:e}:typeof e==`string`||Xme(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:Kme.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<IQ.length;){let e=IQ[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)IQ.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?NQ.basename(this.path):void 0}set basename(e){zQ(e,`basename`),RQ(e,`basename`),this.path=NQ.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?NQ.dirname(this.path):void 0}set dirname(e){BQ(this.basename,`dirname`),this.path=NQ.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?NQ.extname(this.path):void 0}set extname(e){if(RQ(e,`extname`),BQ(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=NQ.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){FQ(e)&&(e=Jme(e)),zQ(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?NQ.basename(this.path,this.extname):void 0}set stem(e){zQ(e,`stem`),RQ(e,`stem`),this.path=NQ.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 aX(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 RQ(e,t){if(e&&e.includes(NQ.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+NQ.sep+"`")}function zQ(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function BQ(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function Xme(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Zme=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),VQ=l(Lme(),1),Qme={}.hasOwnProperty,$me=new class e extends Zme{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=Rme()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,VQ.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(WQ(`data`,this.frozen),this.namespace[e]=t,this):Qme.call(this.namespace,e)&&this.namespace[e]||void 0:e?(WQ(`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=qQ(e),n=this.parser||this.Parser;return HQ(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),HQ(`process`,this.parser||this.Parser),UQ(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=qQ(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);the(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(),HQ(`processSync`,this.parser||this.Parser),UQ(`processSync`,this.compiler||this.Compiler),this.process(e,r),KQ(`processSync`,`process`,t),n;function r(e,r){t=!0,jQ(e),n=r}}run(e,t,n){GQ(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=qQ(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),KQ(`runSync`,`run`,n),r;function i(e,t){jQ(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=qQ(t),r=this.compiler||this.Compiler;return UQ(`stringify`,r),GQ(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(WQ(`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,VQ.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];MQ(o)&&MQ(r)&&(r=(0,VQ.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function HQ(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function UQ(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function WQ(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 GQ(e){if(!MQ(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function KQ(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function qQ(e){return ehe(e)?e:new LQ(e)}function ehe(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function the(e){return typeof e==`string`||nhe(e)}function nhe(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var JQ=[],YQ={allowDangerousHtml:!0},rhe=/^(https?|ircs?|mailto|xmpp)$/i,ihe=[{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 XQ(e){let t=ahe(e),n=ohe(e);return she(t.runSync(t.parse(n),n),e)}function ahe(e){let t=e.rehypePlugins||JQ,n=e.remarkPlugins||JQ,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...YQ}:YQ;return $me().use(Upe).use(n).use(Ime,r).use(t)}function ohe(e){let t=e.children||``,n=new LQ;return typeof t==`string`?n.value=t:``+t,n}function she(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||che;for(let e of ihe)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return DQ(e,l),pX(e,{Fragment:I.Fragment,components:i,ignoreInvalidStyle:!0,jsx:I.jsx,jsxs:I.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 FX)if(Object.hasOwn(FX,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=FX[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 che(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||rhe.test(e.slice(0,t))?e:``}var lhe=Vt(`relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground`,{variants:{variant:{default:`bg-background text-foreground`,destructive:`border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive`}},defaultVariants:{variant:`default`}}),ZQ=_.forwardRef(({className:e,variant:t,...n},r)=>(0,I.jsx)(`div`,{ref:r,role:`alert`,className:H(lhe({variant:t}),e),...n}));ZQ.displayName=`Alert`;var QQ=_.forwardRef(({className:e,children:t,...n},r)=>(0,I.jsx)(`h5`,{ref:r,className:H(`mb-1 font-medium leading-none tracking-tight`,e),...n,children:t}));QQ.displayName=`AlertTitle`;var $Q=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(`div`,{ref:n,className:H(`text-sm [&_p]:leading-relaxed`,e),...t}));$Q.displayName=`AlertDescription`;var e$=`Checkbox`,[uhe,dhe]=R(e$),[fhe,t$]=uhe(e$);function phe(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=Fe({prop:n,defaultProp:i??!1,onChange:c,caller:e$}),[m,h]=_.useState(null),[g,v]=_.useState(null),y=_.useRef(!1),b=m?!!o||!!m.closest(`form`):!0,x={checked:f,disabled:a,setChecked:p,control:m,setControl:h,name:s,form:o,value:u,hasConsumerStoppedPropagationRef:y,required:l,defaultChecked:l$(i)?!1:i,isFormControl:b,bubbleInput:g,setBubbleInput:v};return(0,I.jsx)(fhe,{scope:t,...x,children:mhe(d)?d(x):r})}var n$=`CheckboxTrigger`,r$=_.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{let{control:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:m}=t$(n$,e),h=P(i,u),g=_.useRef(c);return _.useEffect(()=>{let e=a?.form;if(e){let t=()=>d(g.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[a,d]),(0,I.jsx)(z.button,{type:`button`,role:`checkbox`,"aria-checked":l$(c)?`mixed`:c,"aria-required":l,"data-state":u$(c),"data-disabled":s?``:void 0,disabled:s,value:o,...r,ref:h,onKeyDown:j(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:j(n,e=>{d(e=>l$(e)?!0:!e),m&&p&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})});r$.displayName=n$;var i$=_.forwardRef((e,t)=>{let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,I.jsx)(phe,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(r$,{...d,ref:t,__scopeCheckbox:n}),e&&(0,I.jsx)(c$,{__scopeCheckbox:n})]})})});i$.displayName=e$;var a$=`CheckboxIndicator`,o$=_.forwardRef((e,t)=>{let{__scopeCheckbox:n,forceMount:r,...i}=e,a=t$(a$,n);return(0,I.jsx)(Ae,{present:r||l$(a.checked)||a.checked===!0,children:(0,I.jsx)(z.span,{"data-state":u$(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})});o$.displayName=a$;var s$=`CheckboxBubbleInput`,c$=_.forwardRef(({__scopeCheckbox:e,...t},n)=>{let{control:r,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:o,required:s,disabled:c,name:l,value:u,form:d,bubbleInput:f,setBubbleInput:p}=t$(s$,e),m=P(n,p),h=CG(a),g=Xs(r);_.useEffect(()=>{let e=f;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!i.current;if(h!==a&&n){let t=new Event(`click`,{bubbles:r});e.indeterminate=l$(a),n.call(e,l$(a)?!1:a),e.dispatchEvent(t)}},[f,h,a,i]);let v=_.useRef(l$(a)?!1:a);return(0,I.jsx)(z.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:o??v.current,required:s,disabled:c,name:l,value:u,form:d,...t,tabIndex:-1,ref:m,style:{...t.style,...g,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});c$.displayName=s$;function mhe(e){return typeof e==`function`}function l$(e){return e===`indeterminate`}function u$(e){return l$(e)?`indeterminate`:e?`checked`:`unchecked`}var d$=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(i$,{ref:n,className:H(`peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50`,e),...t,children:(0,I.jsx)(o$,{className:H(`flex items-center justify-center text-current`),children:(0,I.jsx)(rn,{className:`h-4 w-4`})})}));d$.displayName=i$.displayName;var f$=`Radio`,[hhe,p$]=R(f$),[ghe,_he]=hhe(f$),m$=_.forwardRef((e,t)=>{let{__scopeRadio:n,name:r,checked:i=!1,required:a,disabled:o,value:s=`on`,onCheck:c,form:l,...u}=e,[d,f]=_.useState(null),p=P(t,e=>f(e)),m=_.useRef(!1),h=d?l||!!d.closest(`form`):!0;return(0,I.jsxs)(ghe,{scope:n,checked:i,disabled:o,children:[(0,I.jsx)(z.button,{type:`button`,role:`radio`,"aria-checked":i,"data-state":v$(i),"data-disabled":o?``:void 0,disabled:o,value:s,...u,ref:p,onClick:j(e.onClick,e=>{i||c?.(),h&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())})}),h&&(0,I.jsx)(_$,{control:d,bubbles:!m.current,name:r,value:s,checked:i,required:a,disabled:o,form:l,style:{transform:`translateX(-100%)`}})]})});m$.displayName=f$;var h$=`RadioIndicator`,g$=_.forwardRef((e,t)=>{let{__scopeRadio:n,forceMount:r,...i}=e,a=_he(h$,n);return(0,I.jsx)(Ae,{present:r||a.checked,children:(0,I.jsx)(z.span,{"data-state":v$(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t})})});g$.displayName=h$;var vhe=`RadioBubbleInput`,_$=_.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...i},a)=>{let o=_.useRef(null),s=P(o,a),c=CG(n),l=Xs(t);return _.useEffect(()=>{let e=o.current;if(!e)return;let t=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(t,`checked`).set;if(c!==n&&i){let t=new Event(`click`,{bubbles:r});i.call(e,n),e.dispatchEvent(t)}},[c,n,r]),(0,I.jsx)(z.input,{type:`radio`,"aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:s,style:{...i.style,...l,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}})});_$.displayName=vhe;function v$(e){return e?`checked`:`unchecked`}var yhe=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],y$=`RadioGroup`,[bhe,xhe]=R(y$,[PB,p$]),b$=PB(),x$=p$(),[She,Che]=bhe(y$),S$=_.forwardRef((e,t)=>{let{__scopeRadioGroup:n,name:r,defaultValue:i,value:a,required:o=!1,disabled:s=!1,orientation:c,dir:l,loop:u=!0,onValueChange:d,...f}=e,p=b$(n),m=EB(l),[h,g]=Fe({prop:a,defaultProp:i??null,onChange:d,caller:y$});return(0,I.jsx)(She,{scope:n,name:r,required:o,disabled:s,value:h,onValueChange:g,children:(0,I.jsx)(KB,{asChild:!0,...p,orientation:c,dir:m,loop:u,children:(0,I.jsx)(z.div,{role:`radiogroup`,"aria-required":o,"aria-orientation":c,"data-disabled":s?``:void 0,dir:m,...f,ref:t})})})});S$.displayName=y$;var C$=`RadioGroupItem`,w$=_.forwardRef((e,t)=>{let{__scopeRadioGroup:n,disabled:r,...i}=e,a=Che(C$,n),o=a.disabled||r,s=b$(n),c=x$(n),l=_.useRef(null),u=P(t,l),d=a.value===i.value,f=_.useRef(!1);return _.useEffect(()=>{let e=e=>{yhe.includes(e.key)&&(f.current=!0)},t=()=>f.current=!1;return document.addEventListener(`keydown`,e),document.addEventListener(`keyup`,t),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`keyup`,t)}},[]),(0,I.jsx)(qB,{asChild:!0,...s,focusable:!o,active:d,children:(0,I.jsx)(m$,{disabled:o,required:a.required,checked:d,...c,...i,name:a.name,ref:u,onCheck:()=>a.onValueChange(i.value),onKeyDown:j(e=>{e.key===`Enter`&&e.preventDefault()}),onFocus:j(i.onFocus,()=>{f.current&&l.current?.click()})})})});w$.displayName=C$;var whe=`RadioGroupIndicator`,T$=_.forwardRef((e,t)=>{let{__scopeRadioGroup:n,...r}=e;return(0,I.jsx)(g$,{...x$(n),...r,ref:t})});T$.displayName=whe;var E$=S$,D$=w$,The=T$,O$=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(E$,{className:H(`grid gap-2`,e),...t,ref:n}));O$.displayName=E$.displayName;var k$=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(D$,{ref:n,className:H(`aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50`,e),...t,children:(0,I.jsx)(The,{className:`flex items-center justify-center`,children:(0,I.jsx)(hn,{className:`h-2.5 w-2.5 fill-current text-current`})})}));k$.displayName=D$.displayName;var A$=[`PageUp`,`PageDown`],j$=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],M$={"from-left":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-right":[`Home`,`PageDown`,`ArrowDown`,`ArrowRight`],"from-bottom":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-top":[`Home`,`PageDown`,`ArrowUp`,`ArrowLeft`]},N$=`Slider`,[P$,Ehe,Dhe]=ce(N$),[F$,Ohe]=R(N$,[Dhe]),[khe,I$]=F$(N$),L$=_.forwardRef((e,t)=>{let{name:n,min:r=0,max:i=100,step:a=1,orientation:o=`horizontal`,disabled:s=!1,minStepsBetweenThumbs:c=0,defaultValue:l=[r],value:u,onValueChange:d=()=>{},onValueCommit:f=()=>{},inverted:p=!1,form:m,...h}=e,g=_.useRef(new Set),v=_.useRef(0),y=o===`horizontal`?Ahe:jhe,[b=[],x]=Fe({prop:u,defaultProp:l,onChange:e=>{[...g.current][v.current]?.focus(),d(e)}}),S=_.useRef(b);function C(e){E(e,Ihe(b,e))}function w(e){E(e,v.current)}function T(){let e=S.current[v.current];b[v.current]!==e&&f(b)}function E(e,t,{commit:n}={commit:!1}){let o=Bhe(a),s=SG(Vhe(Math.round((e-r)/a)*a+r,o),[r,i]);x((e=[])=>{let r=Phe(e,s,t);if(zhe(r,c*a)){v.current=r.indexOf(s);let t=String(r)!==String(e);return t&&n&&f(r),t?r:e}else return e})}return(0,I.jsx)(khe,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:i,valueIndexToChangeRef:v,thumbs:g.current,values:b,orientation:o,form:m,children:(0,I.jsx)(P$.Provider,{scope:e.__scopeSlider,children:(0,I.jsx)(P$.Slot,{scope:e.__scopeSlider,children:(0,I.jsx)(y,{"aria-disabled":s,"data-disabled":s?``:void 0,...h,ref:t,onPointerDown:j(h.onPointerDown,()=>{s||(S.current=b)}),min:r,max:i,inverted:p,onSlideStart:s?void 0:C,onSlideMove:s?void 0:w,onSlideEnd:s?void 0:T,onHomeKeyDown:()=>!s&&E(r,0,{commit:!0}),onEndKeyDown:()=>!s&&E(i,b.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!s){let n=A$.includes(e.key)||e.shiftKey&&j$.includes(e.key)?10:1,r=v.current,i=b[r];E(i+a*n*t,r,{commit:!0})}}})})})})});L$.displayName=N$;var[R$,z$]=F$(N$,{startEdge:`left`,endEdge:`right`,size:`width`,direction:1}),Ahe=_.forwardRef((e,t)=>{let{min:n,max:r,dir:i,inverted:a,onSlideStart:o,onSlideMove:s,onSlideEnd:c,onStepKeyDown:l,...u}=e,[d,f]=_.useState(null),p=P(t,e=>f(e)),m=_.useRef(void 0),h=EB(i),g=h===`ltr`,v=g&&!a||!g&&a;function y(e){let t=m.current||d.getBoundingClientRect(),i=Y$([0,t.width],v?[n,r]:[r,n]);return m.current=t,i(e-t.left)}return(0,I.jsx)(R$,{scope:e.__scopeSlider,startEdge:v?`left`:`right`,endEdge:v?`right`:`left`,direction:v?1:-1,size:`width`,children:(0,I.jsx)(B$,{dir:h,"data-orientation":`horizontal`,...u,ref:p,style:{...u.style,"--radix-slider-thumb-transform":`translateX(-50%)`},onSlideStart:e=>{let t=y(e.clientX);o?.(t)},onSlideMove:e=>{let t=y(e.clientX);s?.(t)},onSlideEnd:()=>{m.current=void 0,c?.()},onStepKeyDown:e=>{let t=M$[v?`from-left`:`from-right`].includes(e.key);l?.({event:e,direction:t?-1:1})}})})}),jhe=_.forwardRef((e,t)=>{let{min:n,max:r,inverted:i,onSlideStart:a,onSlideMove:o,onSlideEnd:s,onStepKeyDown:c,...l}=e,u=_.useRef(null),d=P(t,u),f=_.useRef(void 0),p=!i;function m(e){let t=f.current||u.current.getBoundingClientRect(),i=Y$([0,t.height],p?[r,n]:[n,r]);return f.current=t,i(e-t.top)}return(0,I.jsx)(R$,{scope:e.__scopeSlider,startEdge:p?`bottom`:`top`,endEdge:p?`top`:`bottom`,size:`height`,direction:p?1:-1,children:(0,I.jsx)(B$,{"data-orientation":`vertical`,...l,ref:d,style:{...l.style,"--radix-slider-thumb-transform":`translateY(50%)`},onSlideStart:e=>{let t=m(e.clientY);a?.(t)},onSlideMove:e=>{let t=m(e.clientY);o?.(t)},onSlideEnd:()=>{f.current=void 0,s?.()},onStepKeyDown:e=>{let t=M$[p?`from-bottom`:`from-top`].includes(e.key);c?.({event:e,direction:t?-1:1})}})})}),B$=_.forwardRef((e,t)=>{let{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:c,...l}=e,u=I$(N$,n);return(0,I.jsx)(z.span,{...l,ref:t,onKeyDown:j(e.onKeyDown,e=>{e.key===`Home`?(o(e),e.preventDefault()):e.key===`End`?(s(e),e.preventDefault()):A$.concat(j$).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:j(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():r(e)}),onPointerMove:j(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:j(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))})})}),V$=`SliderTrack`,H$=_.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=I$(V$,n);return(0,I.jsx)(z.span,{"data-disabled":i.disabled?``:void 0,"data-orientation":i.orientation,...r,ref:t})});H$.displayName=V$;var U$=`SliderRange`,W$=_.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=I$(U$,n),a=z$(U$,n),o=P(t,_.useRef(null)),s=i.values.length,c=i.values.map(e=>J$(e,i.min,i.max)),l=s>1?Math.min(...c):0,u=100-Math.max(...c);return(0,I.jsx)(z.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?``:void 0,...r,ref:o,style:{...e.style,[a.startEdge]:l+`%`,[a.endEdge]:u+`%`}})});W$.displayName=U$;var G$=`SliderThumb`,K$=_.forwardRef((e,t)=>{let n=Ehe(e.__scopeSlider),[r,i]=_.useState(null),a=P(t,e=>i(e)),o=_.useMemo(()=>r?n().findIndex(e=>e.ref.current===r):-1,[n,r]);return(0,I.jsx)(Mhe,{...e,ref:a,index:o})}),Mhe=_.forwardRef((e,t)=>{let{__scopeSlider:n,index:r,name:i,...a}=e,o=I$(G$,n),s=z$(G$,n),[c,l]=_.useState(null),u=P(t,e=>l(e)),d=c?o.form||!!c.closest(`form`):!0,f=Xs(c),p=o.values[r],m=p===void 0?0:J$(p,o.min,o.max),h=Fhe(r,o.values.length),g=f?.[s.size],v=g?Lhe(g,m,s.direction):0;return _.useEffect(()=>{if(c)return o.thumbs.add(c),()=>{o.thumbs.delete(c)}},[c,o.thumbs]),(0,I.jsxs)(`span`,{style:{transform:`var(--radix-slider-thumb-transform)`,position:`absolute`,[s.startEdge]:`calc(${m}% + ${v}px)`},children:[(0,I.jsx)(P$.ItemSlot,{scope:e.__scopeSlider,children:(0,I.jsx)(z.span,{role:`slider`,"aria-label":e[`aria-label`]||h,"aria-valuemin":o.min,"aria-valuenow":p,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?``:void 0,tabIndex:o.disabled?void 0:0,...a,ref:u,style:p===void 0?{display:`none`}:e.style,onFocus:j(e.onFocus,()=>{o.valueIndexToChangeRef.current=r})})}),d&&(0,I.jsx)(q$,{name:i??(o.name?o.name+(o.values.length>1?`[]`:``):void 0),form:o.form,value:p},r)]})});K$.displayName=G$;var Nhe=`RadioBubbleInput`,q$=_.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{let i=_.useRef(null),a=P(i,r),o=CG(t);return _.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(o!==t&&r){let n=new Event(`input`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[o,t]),(0,I.jsx)(z.input,{style:{display:`none`},...n,ref:a,defaultValue:t})});q$.displayName=Nhe;function Phe(e=[],t,n){let r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}function J$(e,t,n){return SG(100/(n-t)*(e-t),[0,100])}function Fhe(e,t){if(t>2)return`Value ${e+1} of ${t}`;if(t===2)return[`Minimum`,`Maximum`][e]}function Ihe(e,t){if(e.length===1)return 0;let n=e.map(e=>Math.abs(e-t)),r=Math.min(...n);return n.indexOf(r)}function Lhe(e,t,n){let r=e/2;return(r-Y$([0,50],[0,r])(t)*n)*n}function Rhe(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function zhe(e,t){if(t>0){let n=Rhe(e);return Math.min(...n)>=t}return!0}function Y$(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Bhe(e){return(String(e).split(`.`)[1]||``).length}function Vhe(e,t){let n=10**t;return Math.round(e*n)/n}var X$=L$,Hhe=H$,Uhe=W$,Whe=K$,Z$=_.forwardRef(({className:e,...t},n)=>(0,I.jsxs)(X$,{ref:n,className:H(`relative flex w-full touch-none select-none items-center`,e),...t,children:[(0,I.jsx)(Hhe,{className:`relative h-2 w-full grow overflow-hidden rounded-full bg-secondary`,children:(0,I.jsx)(Uhe,{className:`absolute h-full bg-primary`})}),(0,I.jsx)(Whe,{className:`block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50`})]}));Z$.displayName=X$.displayName;var Q$=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(`div`,{className:`relative w-full overflow-auto`,children:(0,I.jsx)(`table`,{ref:n,className:H(`w-full caption-bottom text-sm`,e),...t})}));Q$.displayName=`Table`;var $$=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(`thead`,{ref:n,className:H(`[&_tr]:border-b`,e),...t}));$$.displayName=`TableHeader`;var e1=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(`tbody`,{ref:n,className:H(`[&_tr:last-child]:border-0`,e),...t}));e1.displayName=`TableBody`;var Ghe=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(`tfoot`,{ref:n,className:H(`border-t bg-muted/50 font-medium [&>tr]:last:border-b-0`,e),...t}));Ghe.displayName=`TableFooter`;var t1=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(`tr`,{ref:n,className:H(`border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50`,e),...t}));t1.displayName=`TableRow`;var n1=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(`th`,{ref:n,className:H(`h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0`,e),...t}));n1.displayName=`TableHead`;var r1=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(`td`,{ref:n,className:H(`p-4 align-middle [&:has([role=checkbox])]:pr-0`,e),...t}));r1.displayName=`TableCell`;var Khe=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(`caption`,{ref:n,className:H(`mt-4 text-sm text-muted-foreground`,e),...t}));Khe.displayName=`TableCaption`;var i1=`Tabs`,[qhe,Jhe]=R(i1,[PB]),a1=PB(),[Yhe,o1]=qhe(i1),s1=_.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=EB(s),[d,f]=Fe({prop:r,onChange:i,defaultProp:a??``,caller:i1});return(0,I.jsx)(Yhe,{scope:n,baseId:Na(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,I.jsx)(z.div,{dir:u,"data-orientation":o,...l,ref:t})})});s1.displayName=i1;var c1=`TabsList`,l1=_.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=o1(c1,n),o=a1(n);return(0,I.jsx)(KB,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,I.jsx)(z.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});l1.displayName=c1;var u1=`TabsTrigger`,d1=_.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=o1(u1,n),s=a1(n),c=m1(o.baseId,r),l=h1(o.baseId,r),u=r===o.value;return(0,I.jsx)(qB,{asChild:!0,...s,focusable:!i,active:u,children:(0,I.jsx)(z.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:j(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:j(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:j(e.onFocus,()=>{let e=o.activationMode!==`manual`;!u&&!i&&e&&o.onValueChange(r)})})})});d1.displayName=u1;var f1=`TabsContent`,p1=_.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=o1(f1,n),c=m1(s.baseId,r),l=h1(s.baseId,r),u=r===s.value,d=_.useRef(u);return _.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,I.jsx)(Ae,{present:i||u,children:({present:n})=>(0,I.jsx)(z.div,{"data-state":u?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":c,hidden:!n,id:l,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?`0s`:void 0},children:n&&a})})});p1.displayName=f1;function m1(e,t){return`${e}-trigger-${t}`}function h1(e,t){return`${e}-content-${t}`}var Xhe=s1,g1=l1,_1=d1,v1=p1,Zhe=Xhe,y1=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(g1,{ref:n,className:H(`inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground`,e),...t}));y1.displayName=g1.displayName;var b1=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(_1,{ref:n,className:H(`inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50`,e),...t}));b1.displayName=_1.displayName;var x1=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(v1,{ref:n,className:H(`mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2`,e),...t}));x1.displayName=v1.displayName;var Qhe=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})),$he=o(((e,t)=>{t.exports=Qhe()}))();function ege(){return(0,$he.useSyncExternalStore)(tge,()=>!0,()=>!1)}function tge(){return()=>{}}var S1=`Avatar`,[nge,rge]=eB(S1),[ige,C1]=nge(S1),w1=_.forwardRef((e,t)=>{let{__scopeAvatar:n,...r}=e,[i,a]=_.useState(`idle`);return(0,I.jsx)(ige,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:a,children:(0,I.jsx)(up.span,{...r,ref:t})})});w1.displayName=S1;var T1=`AvatarImage`,E1=_.forwardRef((e,t)=>{let{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...a}=e,o=C1(T1,n),s=age(r,a),c=B(e=>{i(e),o.onImageLoadingStatusChange(e)});return Ee(()=>{s!==`idle`&&c(s)},[s,c]),s===`loaded`?(0,I.jsx)(up.img,{...a,ref:t,src:r}):null});E1.displayName=T1;var D1=`AvatarFallback`,O1=_.forwardRef((e,t)=>{let{__scopeAvatar:n,delayMs:r,...i}=e,a=C1(D1,n),[o,s]=_.useState(r===void 0);return _.useEffect(()=>{if(r!==void 0){let e=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(e)}},[r]),o&&a.imageLoadingStatus!==`loaded`?(0,I.jsx)(up.span,{...i,ref:t}):null});O1.displayName=D1;function k1(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?`loaded`:`loading`):`error`:`idle`}function age(e,{referrerPolicy:t,crossOrigin:n}){let r=ege(),i=_.useRef(null),a=r?(i.current||=new window.Image,i.current):null,[o,s]=_.useState(()=>k1(a,e));return Ee(()=>{s(k1(a,e))},[a,e]),Ee(()=>{let e=e=>()=>{s(e)};if(!a)return;let r=e(`loaded`),i=e(`error`);return a.addEventListener(`load`,r),a.addEventListener(`error`,i),t&&(a.referrerPolicy=t),typeof n==`string`&&(a.crossOrigin=n),()=>{a.removeEventListener(`load`,r),a.removeEventListener(`error`,i)}},[a,n,t]),o}var A1=w1,j1=E1,M1=O1,N1=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(A1,{ref:n,className:H(`relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full`,e),...t}));N1.displayName=A1.displayName;var P1=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(j1,{ref:n,className:H(`aspect-square h-full w-full`,e),...t}));P1.displayName=j1.displayName;var F1=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(M1,{ref:n,className:H(`flex h-full w-full items-center justify-center rounded-full bg-muted`,e),...t}));F1.displayName=M1.displayName;function oge(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var I1=_.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:`bottom`,shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),L1=()=>{let e=_.useContext(I1);if(!e)throw Error(`useDrawerContext must be used within a Drawer.Root`);return e};oge(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,100%,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,-100%,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(-100%,0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(100%,0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
220
- [data-state=closed]
221
- ){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,100%,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,100%,0)}}@keyframes slideFromTop{from{transform:translate3d(0,-100%,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,-100%,0)}}@keyframes slideFromLeft{from{transform:translate3d(-100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(-100%,0,0)}}@keyframes slideFromRight{from{transform:translate3d(100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(100%,0,0)}}`);var sge=24,cge=typeof window<`u`?_.useLayoutEffect:_.useEffect;function R1(...e){return(...t)=>{for(let n of e)typeof n==`function`&&n(...t)}}function lge(){return V1(/^Mac/)}function uge(){return V1(/^iPhone/)}function z1(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function dge(){return V1(/^iPad/)||lge()&&navigator.maxTouchPoints>1}function B1(){return uge()||dge()}function V1(e){return typeof window<`u`&&window.navigator!=null?e.test(window.navigator.platform):void 0}var H1=typeof document<`u`&&window.visualViewport;function U1(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function W1(e){for(U1(e)&&(e=e.parentElement);e&&!U1(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}var fge=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]),G1=0,K1;function pge(e={}){let{isDisabled:t}=e;cge(()=>{if(!t)return G1++,G1===1&&B1()&&(K1=mge()),()=>{G1--,G1===0&&K1?.()}},[t])}function mge(){let e,t=0,n=n=>{e=W1(n.target),!(e===document.documentElement&&e===document.body)&&(t=n.changedTouches[0].pageY)},r=n=>{if(!e||e===document.documentElement||e===document.body){n.preventDefault();return}let r=n.changedTouches[0].pageY,i=e.scrollTop,a=e.scrollHeight-e.clientHeight;a!==0&&((i<=0&&r>t||i>=a&&r<t)&&n.preventDefault(),t=r)},i=e=>{let t=e.target;Y1(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform=`translateY(-2000px)`,t.focus(),requestAnimationFrame(()=>{t.style.transform=``}))},a=e=>{let t=e.target;Y1(t)&&(t.style.transform=`translateY(-2000px)`,requestAnimationFrame(()=>{t.style.transform=``,H1&&(H1.height<window.innerHeight?requestAnimationFrame(()=>{J1(t)}):H1.addEventListener(`resize`,()=>J1(t),{once:!0}))}))},o=()=>{window.scrollTo(0,0)},s=window.pageXOffset,c=window.pageYOffset,l=R1(hge(document.documentElement,`paddingRight`,`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let u=R1(q1(document,`touchstart`,n,{passive:!1,capture:!0}),q1(document,`touchmove`,r,{passive:!1,capture:!0}),q1(document,`touchend`,i,{passive:!1,capture:!0}),q1(document,`focus`,a,!0),q1(window,`scroll`,o));return()=>{l(),u(),window.scrollTo(s,c)}}function hge(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function q1(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function J1(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=W1(e);if(t!==document.documentElement&&t!==document.body&&t!==e){let n=t.getBoundingClientRect().top,r=e.getBoundingClientRect().top;e.getBoundingClientRect().bottom>t.getBoundingClientRect().bottom+sge&&(t.scrollTop+=r-n)}e=t.parentElement}}function Y1(e){return e instanceof HTMLInputElement&&!fge.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function gge(e,t){typeof e==`function`?e(t):e!=null&&(e.current=t)}function _ge(...e){return t=>e.forEach(e=>gge(e,t))}function X1(...e){return _.useCallback(_ge(...e),e)}var Z1=new WeakMap;function Q1(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([t,n])=>{if(t.startsWith(`--`)){e.style.setProperty(t,n);return}r[t]=e.style[t],e.style[t]=n}),!n&&Z1.set(e,r)}function vge(e,t){if(!e||!(e instanceof HTMLElement))return;let n=Z1.get(e);n&&(e.style[t]=n[t])}var $1=e=>{switch(e){case`top`:case`bottom`:return!0;case`left`:case`right`:return!1;default:return e}};function e0(e,t){if(!e)return null;let n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform,i=r.match(/^matrix3d\((.+)\)$/);return i?parseFloat(i[1].split(`, `)[$1(t)?13:12]):(i=r.match(/^matrix\((.+)\)$/),i?parseFloat(i[1].split(`, `)[$1(t)?5:4]):null)}function yge(e){return 8*(Math.log(e+1)-2)}function t0(e,t){if(!e)return()=>{};let n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}var n0={DURATION:.5,EASE:[.32,.72,0,1]},r0=.4,bge=.25,xge=100,i0=8,a0=16,o0=26,s0=`vaul-dragging`;function c0(e){let t=_.useRef(e);return _.useEffect(()=>{t.current=e}),_.useMemo(()=>(...e)=>t.current==null?void 0:t.current.call(t,...e),[])}function Sge({defaultProp:e,onChange:t}){let n=_.useState(e),[r]=n,i=_.useRef(r),a=c0(t);return _.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}function l0({prop:e,defaultProp:t,onChange:n=()=>{}}){let[r,i]=Sge({defaultProp:t,onChange:n}),a=e!==void 0,o=a?e:r,s=c0(n);return[o,_.useCallback(t=>{if(a){let n=typeof t==`function`?t(e):t;n!==e&&s(n)}else i(t)},[a,e,i,s])]}function Cge({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:i,fadeFromIndex:a,onSnapPointChange:o,direction:s=`bottom`,container:c,snapToSequentialPoint:l}){let[u,d]=l0({prop:e,defaultProp:n?.[0],onChange:t}),[f,p]=_.useState(typeof window<`u`?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);_.useEffect(()=>{function e(){p({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let m=_.useMemo(()=>u===n?.[n.length-1]||null,[n,u]),h=_.useMemo(()=>n?.findIndex(e=>e===u),[n,u]),g=n&&n.length>0&&(a||a===0)&&!Number.isNaN(a)&&n[a]===u||!n,v=_.useMemo(()=>{let e=c?{width:c.getBoundingClientRect().width,height:c.getBoundingClientRect().height}:typeof window<`u`?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};return n?.map(t=>{let n=typeof t==`string`,r=0;if(n&&(r=parseInt(t,10)),$1(s)){let i=n?r:f?t*e.height:0;return f?s===`bottom`?e.height-i:-e.height+i:i}let i=n?r:f?t*e.width:0;return f?s===`right`?e.width-i:-e.width+i:i})??[]},[n,f,c]),y=_.useMemo(()=>h===null?null:v?.[h],[v,h]),b=_.useCallback(e=>{let t=v?.findIndex(t=>t===e)??null;o(t),Q1(r.current,{transition:`transform ${n0.DURATION}s cubic-bezier(${n0.EASE.join(`,`)})`,transform:$1(s)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),v&&t!==v.length-1&&t!==a&&t<a?Q1(i.current,{transition:`opacity ${n0.DURATION}s cubic-bezier(${n0.EASE.join(`,`)})`,opacity:`0`}):Q1(i.current,{transition:`opacity ${n0.DURATION}s cubic-bezier(${n0.EASE.join(`,`)})`,opacity:`1`}),d(n?.[Math.max(t,0)])},[r.current,n,v,a,i,d]);_.useEffect(()=>{if(u||e){let t=n?.findIndex(t=>t===e||t===u)??-1;v&&t!==-1&&typeof v[t]==`number`&&b(v[t])}},[u,e,n,v,b]);function x({draggedDistance:e,closeDrawer:t,velocity:r,dismissible:o}){if(a===void 0)return;let c=s===`bottom`||s===`right`?(y??0)-e:(y??0)+e,u=h===a-1,d=h===0,f=e>0;if(u&&Q1(i.current,{transition:`opacity ${n0.DURATION}s cubic-bezier(${n0.EASE.join(`,`)})`}),!l&&r>2&&!f){o?t():b(v[0]);return}if(!l&&r>2&&f&&v&&n){b(v[n.length-1]);return}let p=v?.reduce((e,t)=>typeof e!=`number`||typeof t!=`number`?e:Math.abs(t-c)<Math.abs(e-c)?t:e),g=$1(s)?window.innerHeight:window.innerWidth;if(r>r0&&Math.abs(e)<g*.4){let e=f?1:-1;if(e>0&&m){b(v[n.length-1]);return}if(d&&e<0&&o&&t(),h===null)return;b(v[h+e]);return}b(p)}function S({draggedDistance:e}){if(y===null)return;let t=s===`bottom`||s===`right`?y-e:y+e;(s===`bottom`||s===`right`)&&t<v[v.length-1]||(s===`top`||s===`left`)&&t>v[v.length-1]||Q1(r.current,{transform:$1(s)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})}function C(e,t){if(!n||typeof h!=`number`||!v||a===void 0)return null;let r=h===a-1;if(h>=a&&t)return 0;if(r&&!t)return 1;if(!g&&!r)return null;let i=r?h+1:h-1,o=r?v[i]-v[i-1]:v[i+1]-v[i],s=e/Math.abs(o);return r?1-s:s}return{isLastSnapPoint:m,activeSnapPoint:u,shouldFade:g,getPercentageDragged:C,setActiveSnapPoint:d,activeSnapPointIndex:h,onRelease:x,onDrag:S,snapPointsOffset:v}}function wge(){let{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:i}=L1(),a=_.useRef(null),o=(0,_.useMemo)(()=>document.body.style.backgroundColor,[]);function s(){return(window.innerWidth-o0)/window.innerWidth}_.useEffect(()=>{if(t&&n){a.current&&clearTimeout(a.current);let t=document.querySelector(`[data-vaul-drawer-wrapper]`)||document.querySelector(`[vaul-drawer-wrapper]`);if(!t)return;r&&!i&&t0(document.body,{background:`black`}),t0(t,{transformOrigin:$1(e)?`top`:`left`,transitionProperty:`transform, border-radius`,transitionDuration:`${n0.DURATION}s`,transitionTimingFunction:`cubic-bezier(${n0.EASE.join(`,`)})`});let n=t0(t,{borderRadius:`${i0}px`,overflow:`hidden`,...$1(e)?{transform:`scale(${s()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${s()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{n(),a.current=window.setTimeout(()=>{o?document.body.style.background=o:document.body.style.removeProperty(`background`)},n0.DURATION*1e3)}}},[t,n,o])}var u0=null;function Tge({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:i,noBodyStyles:a}){let[o,s]=_.useState(()=>typeof window<`u`?window.location.href:``),c=_.useRef(0),l=_.useCallback(()=>{if(z1()&&u0===null&&e&&!a){u0={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:`unset`};let{scrollX:e,innerHeight:t}=window;document.body.style.setProperty(`position`,`fixed`,`important`),Object.assign(document.body.style,{top:`${-c.current}px`,left:`${-e}px`,right:`0px`,height:`auto`}),window.setTimeout(()=>window.requestAnimationFrame(()=>{let e=t-window.innerHeight;e&&c.current>=t&&(document.body.style.top=`${-(c.current+e)}px`)}),300)}},[e]),u=_.useCallback(()=>{if(z1()&&u0!==null&&!a){let e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);Object.assign(document.body.style,u0),window.requestAnimationFrame(()=>{if(i&&o!==window.location.href){s(window.location.href);return}window.scrollTo(t,e)}),u0=null}},[o]);return _.useEffect(()=>{function e(){c.current=window.scrollY}return e(),window.addEventListener(`scroll`,e),()=>{window.removeEventListener(`scroll`,e)}},[]),_.useEffect(()=>{n||!r||(e?(!window.matchMedia(`(display-mode: standalone)`).matches&&l(),t||window.setTimeout(()=>{u()},500)):u())},[e,r,o,t,n,l,u]),{restorePositionSetting:u}}function d0({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:i,snapPoints:a,shouldScaleBackground:o=!1,setBackgroundColorOnScale:s=!0,closeThreshold:c=bge,scrollLockTimeout:l=xge,dismissible:u=!0,handleOnly:d=!1,fadeFromIndex:f=a&&a.length-1,activeSnapPoint:p,setActiveSnapPoint:m,fixed:h,modal:g=!0,onClose:v,nested:y,noBodyStyles:b,direction:x=`bottom`,defaultOpen:S=!1,disablePreventScroll:C=!0,snapToSequentialPoint:w=!1,preventScrollRestoration:T=!1,repositionInputs:E=!0,onAnimationEnd:D,container:O,autoFocus:k=!1}){let[A=!1,j]=l0({defaultProp:S,prop:e,onChange:e=>{t?.(e),!e&&!y&&ye(),setTimeout(()=>{D?.(e)},n0.DURATION*1e3),e&&!g&&typeof window<`u`&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents=`auto`}),e||(document.body.style.pointerEvents=`auto`)}}),[M,N]=_.useState(!1),[P,F]=_.useState(!1),[I,L]=_.useState(!1),R=_.useRef(null),ee=_.useRef(null),te=_.useRef(null),ne=_.useRef(null),re=_.useRef(null),ie=_.useRef(!1),ae=_.useRef(null),oe=_.useRef(0),se=_.useRef(!1),ce=_.useRef(0),z=_.useRef(null),le=_.useRef(z.current?.getBoundingClientRect().height||0),B=_.useRef(z.current?.getBoundingClientRect().width||0),ue=_.useRef(0),{activeSnapPoint:de,activeSnapPointIndex:fe,setActiveSnapPoint:pe,onRelease:me,snapPointsOffset:he,onDrag:ge,shouldFade:_e,getPercentageDragged:ve}=Cge({snapPoints:a,activeSnapPointProp:p,setActiveSnapPointProp:m,drawerRef:z,fadeFromIndex:f,overlayRef:R,onSnapPointChange:_.useCallback(e=>{a&&e===he.length-1&&(ee.current=new Date)},[]),direction:x,container:O,snapToSequentialPoint:w});pge({isDisabled:!A||P||!g||I||!M||!E||!C});let{restorePositionSetting:ye}=Tge({isOpen:A,modal:g,nested:y,hasBeenOpened:M,preventScrollRestoration:T,noBodyStyles:b});function be(){return(window.innerWidth-o0)/window.innerWidth}function xe(e){!u&&!a||z.current&&!z.current.contains(e.target)||(le.current=z.current?.getBoundingClientRect().height||0,B.current=z.current?.getBoundingClientRect().width||0,F(!0),te.current=new Date,B1()&&window.addEventListener(`touchend`,()=>ie.current=!1,{once:!0}),e.target.setPointerCapture(e.pointerId),oe.current=$1(x)?e.pageY:e.pageX)}function Se(e,t){let n=e,r=window.getSelection()?.toString(),i=z.current?e0(z.current,x):null,a=new Date;if(n.hasAttribute(`data-vaul-no-drag`)||n.closest(`[data-vaul-no-drag]`))return!1;if(x===`right`||x===`left`)return!0;if(ee.current&&a.getTime()-ee.current.getTime()<500)return!1;if(i!==null&&(x===`bottom`?i>0:i<0))return!0;if(r&&r.length>0)return!1;if(a.getTime()-re.current?.getTime()<l&&i===0||t)return re.current=a,!1;for(;n;){if(n.scrollHeight>n.clientHeight){if(n.scrollTop!==0)return re.current=new Date,!1;if(n.getAttribute(`role`)===`dialog`)return!0}n=n.parentNode}return!0}function Ce(e){if(z.current&&P){let t=x===`bottom`||x===`right`?1:-1,n=(oe.current-($1(x)?e.pageY:e.pageX))*t,i=n>0,s=a&&!u&&!i;if(s&&fe===0)return;let c=Math.abs(n),l=document.querySelector(`[data-vaul-drawer-wrapper]`),d=c/(x===`bottom`||x===`top`?le.current:B.current),p=ve(c,i);if(p!==null&&(d=p),s&&d>=1||!ie.current&&!Se(e.target,i))return;if(z.current.classList.add(s0),ie.current=!0,Q1(z.current,{transition:`none`}),Q1(R.current,{transition:`none`}),a&&ge({draggedDistance:n}),i&&!a){let e=yge(n),r=Math.min(e*-1,0)*t;Q1(z.current,{transform:$1(x)?`translate3d(0, ${r}px, 0)`:`translate3d(${r}px, 0, 0)`});return}let m=1-d;if((_e||f&&fe===f-1)&&(r?.(e,d),Q1(R.current,{opacity:`${m}`,transition:`none`},!0)),l&&R.current&&o){let e=Math.min(be()+d*(1-be()),1),t=8-d*8,n=Math.max(0,14-d*14);Q1(l,{borderRadius:`${t}px`,transform:$1(x)?`scale(${e}) translate3d(0, ${n}px, 0)`:`scale(${e}) translate3d(${n}px, 0, 0)`,transition:`none`},!0)}if(!a){let e=c*t;Q1(z.current,{transform:$1(x)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}}_.useEffect(()=>{var e;function t(){if(!z.current||!E)return;let e=document.activeElement;if(Y1(e)||se.current){let e=window.visualViewport?.height||0,t=window.innerHeight,n=t-e,r=z.current.getBoundingClientRect().height||0,i=r>t*.8;ue.current||=r;let o=z.current.getBoundingClientRect().top;if(Math.abs(ce.current-n)>60&&(se.current=!se.current),a&&a.length>0&&he&&fe){let e=he[fe]||0;n+=e}if(ce.current=n,r>e||se.current){let t=z.current.getBoundingClientRect().height,r=t;t>e&&(r=e-(i?o:o0)),h?z.current.style.height=`${t-Math.max(n,0)}px`:z.current.style.height=`${Math.max(r,e-o)}px`}else z.current.style.height=`${ue.current}px`;a&&a.length>0&&!se.current?z.current.style.bottom=`0px`:z.current.style.bottom=`${Math.max(n,0)}px`}}return(e=window.visualViewport)==null||e.addEventListener(`resize`,t),()=>window.visualViewport?.removeEventListener(`resize`,t)},[fe,a,he]);function we(e){Ee(),v?.(),e||j(!1),setTimeout(()=>{a&&pe(a[0])},n0.DURATION*1e3)}function Te(){if(!z.current)return;let e=document.querySelector(`[data-vaul-drawer-wrapper]`),t=e0(z.current,x);Q1(z.current,{transform:`translate3d(0, 0, 0)`,transition:`transform ${n0.DURATION}s cubic-bezier(${n0.EASE.join(`,`)})`}),Q1(R.current,{transition:`opacity ${n0.DURATION}s cubic-bezier(${n0.EASE.join(`,`)})`,opacity:`1`}),o&&t&&t>0&&A&&Q1(e,{borderRadius:`${i0}px`,overflow:`hidden`,...$1(x)?{transform:`scale(${be()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:`top`}:{transform:`scale(${be()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:`left`},transitionProperty:`transform, border-radius`,transitionDuration:`${n0.DURATION}s`,transitionTimingFunction:`cubic-bezier(${n0.EASE.join(`,`)})`},!0)}function Ee(){!P||!z.current||(z.current.classList.remove(s0),ie.current=!1,F(!1),ne.current=new Date)}function De(e){if(!P||!z.current)return;z.current.classList.remove(s0),ie.current=!1,F(!1),ne.current=new Date;let t=e0(z.current,x);if(!Se(e.target,!1)||!t||Number.isNaN(t)||te.current===null)return;let n=ne.current.getTime()-te.current.getTime(),r=oe.current-($1(x)?e.pageY:e.pageX),o=Math.abs(r)/n;if(o>.05&&(L(!0),setTimeout(()=>{L(!1)},200)),a){me({draggedDistance:r*(x===`bottom`||x===`right`?1:-1),closeDrawer:we,velocity:o,dismissible:u}),i?.(e,!0);return}if(x===`bottom`||x===`right`?r>0:r<0){Te(),i?.(e,!0);return}if(o>r0){we(),i?.(e,!1);return}let s=Math.min(z.current.getBoundingClientRect().height??0,window.innerHeight),l=Math.min(z.current.getBoundingClientRect().width??0,window.innerWidth);if(Math.abs(t)>=(x===`left`||x===`right`?l:s)*c){we(),i?.(e,!1);return}i?.(e,!0),Te()}_.useEffect(()=>(A&&(Q1(document.documentElement,{scrollBehavior:`auto`}),ee.current=new Date),()=>{vge(document.documentElement,`scrollBehavior`)}),[A]);function Oe(e){let t=e?(window.innerWidth-a0)/window.innerWidth:1,n=e?-a0:0;ae.current&&window.clearTimeout(ae.current),Q1(z.current,{transition:`transform ${n0.DURATION}s cubic-bezier(${n0.EASE.join(`,`)})`,transform:`scale(${t}) translate3d(0, ${n}px, 0)`}),!e&&z.current&&(ae.current=setTimeout(()=>{let e=e0(z.current,x);Q1(z.current,{transition:`none`,transform:$1(x)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})},500))}function ke(e,t){if(t<0)return;let n=(window.innerWidth-a0)/window.innerWidth,r=n+t*(1-n),i=-a0+t*a0;Q1(z.current,{transform:$1(x)?`scale(${r}) translate3d(0, ${i}px, 0)`:`scale(${r}) translate3d(${i}px, 0, 0)`,transition:`none`})}function Ae(e,t){let n=$1(x)?window.innerHeight:window.innerWidth,r=t?(n-a0)/n:1,i=t?-a0:0;t&&Q1(z.current,{transition:`transform ${n0.DURATION}s cubic-bezier(${n0.EASE.join(`,`)})`,transform:$1(x)?`scale(${r}) translate3d(0, ${i}px, 0)`:`scale(${r}) translate3d(${i}px, 0, 0)`})}return _.createElement(Um,{defaultOpen:S,onOpenChange:e=>{!u&&!e||(e?N(!0):we(!0),j(e))},open:A},_.createElement(I1.Provider,{value:{activeSnapPoint:de,snapPoints:a,setActiveSnapPoint:pe,drawerRef:z,overlayRef:R,onOpenChange:t,onPress:xe,onRelease:De,onDrag:Ce,dismissible:u,handleOnly:d,isOpen:A,isDragging:P,shouldFade:_e,closeDrawer:we,onNestedDrag:ke,onNestedOpenChange:Oe,onNestedRelease:Ae,keyboardIsOpen:se,modal:g,snapPointsOffset:he,direction:x,shouldScaleBackground:o,setBackgroundColorOnScale:s,noBodyStyles:b,container:O,autoFocus:k}},n))}var f0=_.forwardRef(function({...e},t){let{overlayRef:n,snapPoints:r,onRelease:i,shouldFade:a,isOpen:o,modal:s}=L1(),c=X1(t,n),l=r&&r.length>0;return s?_.createElement(Km,{onMouseUp:i,ref:c,"data-vaul-overlay":``,"data-vaul-snap-points":o&&l?`true`:`false`,"data-vaul-snap-points-overlay":o&&a?`true`:`false`,...e}):(typeof window<`u`&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents=`auto`}),null)});f0.displayName=`Drawer.Overlay`;var p0=_.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},i){let{drawerRef:a,onPress:o,onRelease:s,onDrag:c,keyboardIsOpen:l,snapPointsOffset:u,modal:d,isOpen:f,direction:p,snapPoints:m,container:h,handleOnly:g,autoFocus:v}=L1(),[y,b]=_.useState(!1),x=X1(i,a),S=_.useRef(null),C=_.useRef(null),w=_.useRef(!1),T=m&&m.length>0;wge();let E=(e,t,n=0)=>{if(w.current)return!0;let r=Math.abs(e.y),i=Math.abs(e.x),a=i>r,o=[`bottom`,`right`].includes(t)?1:-1;if(t===`left`||t===`right`){if(!(e.x*o<0)&&i>=0&&i<=n)return a}else if(!(e.y*o<0)&&r>=0&&r<=n)return!a;return w.current=!0,!0};_.useEffect(()=>{T&&window.requestAnimationFrame(()=>{b(!0)})},[]);function D(e){S.current=null,w.current=!1,s(e)}return _.createElement(qm,{"data-vaul-drawer-direction":p,"data-vaul-drawer":``,"data-vaul-delayed-snap-points":y?`true`:`false`,"data-vaul-snap-points":f&&T?`true`:`false`,"data-vaul-custom-container":h?`true`:`false`,...r,ref:x,style:u&&u.length>0?{"--snap-point-height":`${u[0]}px`,...t}:t,onPointerDown:e=>{g||(r.onPointerDown==null||r.onPointerDown.call(r,e),S.current={x:e.pageX,y:e.pageY},o(e))},onOpenAutoFocus:e=>{n?.(e),v||e.preventDefault()},onPointerDownOutside:t=>{if(e?.(t),!d||t.defaultPrevented){t.preventDefault();return}l.current&&=!1},onFocusOutside:e=>{if(!d){e.preventDefault();return}},onPointerMove:e=>{if(C.current=e,g||(r.onPointerMove==null||r.onPointerMove.call(r,e),!S.current))return;let t=e.pageY-S.current.y,n=e.pageX-S.current.x,i=e.pointerType===`touch`?10:2;E({x:n,y:t},p,i)?c(e):(Math.abs(n)>i||Math.abs(t)>i)&&(S.current=null)},onPointerUp:e=>{r.onPointerUp==null||r.onPointerUp.call(r,e),S.current=null,w.current=!1,s(e)},onPointerOut:e=>{r.onPointerOut==null||r.onPointerOut.call(r,e),D(C.current)},onContextMenu:e=>{r.onContextMenu==null||r.onContextMenu.call(r,e),D(C.current)}})});p0.displayName=`Drawer.Content`;var Ege=250,Dge=120,m0=_.forwardRef(function({preventCycle:e=!1,children:t,...n},r){let{closeDrawer:i,isDragging:a,snapPoints:o,activeSnapPoint:s,setActiveSnapPoint:c,dismissible:l,handleOnly:u,isOpen:d,onPress:f,onDrag:p}=L1(),m=_.useRef(null),h=_.useRef(!1);function g(){if(h.current){b();return}window.setTimeout(()=>{v()},Dge)}function v(){if(a||e||h.current){b();return}if(b(),(!o||o.length===0)&&l){i();return}if(s===o[o.length-1]&&l){i();return}let t=o.findIndex(e=>e===s);if(t===-1)return;let n=o[t+1];c(n)}function y(){m.current=window.setTimeout(()=>{h.current=!0},Ege)}function b(){window.clearTimeout(m.current),h.current=!1}return _.createElement(`div`,{onClick:g,onPointerCancel:b,onPointerDown:e=>{u&&f(e),y()},onPointerMove:e=>{u&&p(e)},ref:r,"data-vaul-drawer-visible":d?`true`:`false`,"data-vaul-handle":``,"aria-hidden":`true`,...n},_.createElement(`span`,{"data-vaul-handle-hitarea":``,"aria-hidden":`true`},t))});m0.displayName=`Drawer.Handle`;function Oge({onDrag:e,onOpenChange:t,...n}){let{onNestedDrag:r,onNestedOpenChange:i,onNestedRelease:a}=L1();if(!r)throw Error(`Drawer.NestedRoot must be placed in another drawer`);return _.createElement(d0,{nested:!0,onClose:()=>{i(!1)},onDrag:(t,n)=>{r(t,n),e?.(t,n)},onOpenChange:e=>{e&&i(e)},onRelease:a,...n})}function kge(e){let t=L1(),{container:n=t.container,...r}=e;return _.createElement(Gm,{container:n,...r})}var h0={Root:d0,NestedRoot:Oge,Content:p0,Overlay:f0,Trigger:Wm,Portal:kge,Handle:m0,Close:Xm,Title:Jm,Description:Ym},g0=({shouldScaleBackground:e=!0,...t})=>(0,I.jsx)(h0.Root,{shouldScaleBackground:e,...t});g0.displayName=`Drawer`;var Age=h0.Trigger,jge=h0.Portal;h0.Close;var _0=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(h0.Overlay,{ref:n,className:H(`fixed inset-0 z-50 bg-black/80`,e),...t}));_0.displayName=h0.Overlay.displayName;var v0=_.forwardRef(({className:e,children:t,...n},r)=>(0,I.jsxs)(jge,{children:[(0,I.jsx)(_0,{}),(0,I.jsxs)(h0.Content,{ref:r,className:H(`fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background`,e),...n,children:[(0,I.jsx)(`div`,{className:`mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted`}),t]})]}));v0.displayName=`DrawerContent`;var y0=({className:e,...t})=>(0,I.jsx)(`div`,{className:H(`grid gap-1.5 p-4 text-center sm:text-left`,e),...t});y0.displayName=`DrawerHeader`;var Mge=({className:e,...t})=>(0,I.jsx)(`div`,{className:H(`mt-auto flex flex-col gap-2 p-4`,e),...t});Mge.displayName=`DrawerFooter`;var b0=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(h0.Title,{ref:n,className:H(`text-lg font-semibold leading-none tracking-tight`,e),...t}));b0.displayName=h0.Title.displayName;var x0=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(h0.Description,{ref:n,className:H(`text-sm text-muted-foreground`,e),...t}));x0.displayName=h0.Description.displayName;var S0=1,Nge=.9,Pge=.8,Fge=.17,C0=.1,w0=.999,Ige=.9999,Lge=.99,Rge=/[\\\/_+.#"@\[\(\{&]/,zge=/[\\\/_+.#"@\[\(\{&]/g,Bge=/[\s-]/,T0=/[\s-]/g;function E0(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?S0:Lge;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=E0(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=S0:Rge.test(e.charAt(l-1))?(d*=Pge,p=e.slice(i,l-1).match(zge),p&&i>0&&(d*=w0**+p.length)):Bge.test(e.charAt(l-1))?(d*=Nge,m=e.slice(i,l-1).match(T0),m&&i>0&&(d*=w0**+m.length)):(d*=Fge,i>0&&(d*=w0**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=Ige)),(d<C0&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=E0(e,t,n,r,l+1,a+2,o),f*C0>d&&(d=f*C0)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function D0(e){return e.toLowerCase().replace(T0,` `)}function Vge(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,E0(e,t,D0(e),D0(t),0,0,{})}var O0=`[cmdk-group=""]`,k0=`[cmdk-group-items=""]`,Hge=`[cmdk-group-heading=""]`,A0=`[cmdk-item=""]`,j0=`${A0}:not([aria-disabled="true"])`,M0=`cmdk-item-select`,N0=`data-value`,Uge=(e,t,n)=>Vge(e,t,n),P0=_.createContext(void 0),F0=()=>_.useContext(P0),I0=_.createContext(void 0),L0=()=>_.useContext(I0),R0=_.createContext(void 0),z0=_.forwardRef((e,t)=>{let n=U0(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=U0(()=>new Set),i=U0(()=>new Map),a=U0(()=>new Map),o=U0(()=>new Set),s=V0(e),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:g=!0,...v}=e,y=Na(),b=Na(),x=Na(),S=_.useRef(null),C=e_e();H0(()=>{if(u!==void 0){let e=u.trim();n.current.value=e,w.emit()}},[u]),H0(()=>{C(6,A)},[]);let w=_.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)k(),D(),C(1,O);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(x);e?e.focus():(i=document.getElementById(y))==null||i.focus()}if(C(7,()=>{n.current.selectedItemId=j()?.id,w.emit()}),r||C(5,A),s.current?.value!==void 0){let e=t??``;(o=(a=s.current).onValueChange)==null||o.call(a,e);return}}w.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),T=_.useMemo(()=>({value:(e,t,r)=>{t!==a.current.get(e)?.value&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,E(t,r)),C(2,()=>{D(),w.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),C(3,()=>{k(),D(),n.current.value||O(),w.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=j();C(4,()=>{k(),t?.getAttribute(`id`)===e&&O(),w.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||e[`aria-label`],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:y,inputId:x,labelId:b,listInnerRef:S}),[]);function E(e,t){let r=s.current?.filter??Uge;return e?r(e,n.current.search,t):0}function D(){if(!n.current.search||s.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=S.current;M().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(k0);t?t.appendChild(e.parentElement===t?e:e.closest(`${k0} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${k0} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=S.current?.querySelector(`${O0}[${N0}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function O(){let e=M().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(N0);w.setState(`value`,e||void 0)}function k(){if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=E(a.current.get(t)?.value??``,a.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function A(){var e;let t=j();t&&(t.parentElement?.firstChild===t&&((e=t.closest(O0)?.querySelector(Hge))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function j(){return S.current?.querySelector(`${A0}[aria-selected="true"]`)}function M(){return Array.from(S.current?.querySelectorAll(j0)||[])}function N(e){let t=M()[e];t&&w.setState(`value`,t.getAttribute(N0))}function P(e){var t;let n=j(),r=M(),i=r.findIndex(e=>e===n),a=r[i+e];(t=s.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&w.setState(`value`,a.getAttribute(N0))}function F(e){let t=j()?.closest(O0),n;for(;t&&!n;)t=e>0?Qge(t,O0):$ge(t,O0),n=t?.querySelector(j0);n?w.setState(`value`,n.getAttribute(N0)):P(e)}let I=()=>N(M().length-1),L=e=>{e.preventDefault(),e.metaKey?I():e.altKey?F(1):P(1)},R=e=>{e.preventDefault(),e.metaKey?N(0):e.altKey?F(-1):P(-1)};return _.createElement(z.div,{ref:t,tabIndex:-1,...v,"cmdk-root":``,onKeyDown:e=>{var t;(t=v.onKeyDown)==null||t.call(v,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:g&&e.ctrlKey&&L(e);break;case`ArrowDown`:L(e);break;case`p`:case`k`:g&&e.ctrlKey&&R(e);break;case`ArrowUp`:R(e);break;case`Home`:e.preventDefault(),N(0);break;case`End`:e.preventDefault(),I();break;case`Enter`:{e.preventDefault();let t=j();if(t){let e=new Event(M0);t.dispatchEvent(e)}}}}},_.createElement(`label`,{"cmdk-label":``,htmlFor:T.inputId,id:T.labelId,style:n_e},c),K0(e,e=>_.createElement(I0.Provider,{value:w},_.createElement(P0.Provider,{value:T},e))))}),Wge=_.forwardRef((e,t)=>{let n=Na(),r=_.useRef(null),i=_.useContext(R0),a=F0(),o=V0(e),s=o.current?.forceMount??i?.forceMount;H0(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=G0(n,r,[e.value,e.children,r],e.keywords),l=L0(),u=W0(e=>e.value&&e.value===c.current),d=W0(e=>s||a.filter()===!1?!0:e.search?e.filtered.items.get(n)>0:!0);_.useEffect(()=>{let t=r.current;if(!(!t||e.disabled))return t.addEventListener(M0,f),()=>t.removeEventListener(M0,f)},[d,e.onSelect,e.disabled]);function f(){var e,t;p(),(t=(e=o.current).onSelect)==null||t.call(e,c.current)}function p(){l.setState(`value`,c.current,!0)}if(!d)return null;let{disabled:m,value:h,onSelect:g,forceMount:v,keywords:y,...b}=e;return _.createElement(z.div,{ref:N(r,t),...b,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!m,"aria-selected":!!u,"data-disabled":!!m,"data-selected":!!u,onPointerMove:m||a.getDisablePointerSelection()?void 0:p,onClick:m?void 0:f},e.children)}),Gge=_.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=Na(),s=_.useRef(null),c=_.useRef(null),l=Na(),u=F0(),d=W0(e=>i||u.filter()===!1?!0:e.search?e.filtered.groups.has(o):!0);H0(()=>u.group(o),[]),G0(o,s,[e.value,e.heading,c]);let f=_.useMemo(()=>({id:o,forceMount:i}),[i]);return _.createElement(z.div,{ref:N(s,t),...a,"cmdk-group":``,role:`presentation`,hidden:d?void 0:!0},n&&_.createElement(`div`,{ref:c,"cmdk-group-heading":``,"aria-hidden":!0,id:l},n),K0(e,e=>_.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?l:void 0},_.createElement(R0.Provider,{value:f},e))))}),Kge=_.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=_.useRef(null),a=W0(e=>!e.search);return!n&&!a?null:_.createElement(z.div,{ref:N(i,t),...r,"cmdk-separator":``,role:`separator`})}),qge=_.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=L0(),o=W0(e=>e.search),s=W0(e=>e.selectedItemId),c=F0();return _.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),_.createElement(z.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:`text`,value:i?e.value:o,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),Jge=_.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=_.useRef(null),o=_.useRef(null),s=W0(e=>e.selectedItemId),c=F0();return _.useEffect(()=>{if(o.current&&a.current){let e=o.current,t=a.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),_.createElement(z.div,{ref:N(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},K0(e,e=>_.createElement(`div`,{ref:N(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),Yge=_.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return _.createElement(Um,{open:n,onOpenChange:r},_.createElement(Gm,{container:o},_.createElement(Km,{"cmdk-overlay":``,className:i}),_.createElement(qm,{"aria-label":e.label,"cmdk-dialog":``,className:a},_.createElement(z0,{ref:t,...s}))))}),Xge=_.forwardRef((e,t)=>W0(e=>e.filtered.count===0)?_.createElement(z.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),Zge=_.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return _.createElement(z.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},K0(e,e=>_.createElement(`div`,{"aria-hidden":!0},e)))}),B0=Object.assign(z0,{List:Jge,Item:Wge,Input:qge,Group:Gge,Separator:Kge,Dialog:Yge,Empty:Xge,Loading:Zge});function Qge(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function $ge(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function V0(e){let t=_.useRef(e);return H0(()=>{t.current=e}),t}var H0=typeof window>`u`?_.useEffect:_.useLayoutEffect;function U0(e){let t=_.useRef();return t.current===void 0&&(t.current=e()),t}function W0(e){let t=L0(),n=()=>e(t.snapshot());return _.useSyncExternalStore(t.subscribe,n,n)}function G0(e,t,n,r=[]){let i=_.useRef(),a=F0();return H0(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(N0,s),i.current=s}),i}var e_e=()=>{let[e,t]=_.useState(),n=U0(()=>new Map);return H0(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function t_e(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function K0({asChild:e,children:t},n){return e&&_.isValidElement(t)?_.cloneElement(t_e(t),{ref:t.ref},n(t.props.children)):n(t)}var n_e={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`},q0=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(B0,{ref:n,className:H(`flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground`,e),...t}));q0.displayName=B0.displayName;var J0=_.forwardRef(({className:e,...t},n)=>(0,I.jsxs)(`div`,{className:`flex items-center border-b px-3`,"data-cmdk-input-wrapper":``,children:[(0,I.jsx)(gr,{className:`mr-2 h-4 w-4 shrink-0 opacity-50`}),(0,I.jsx)(B0.Input,{ref:n,className:H(`flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50`,e),...t})]}));J0.displayName=B0.Input.displayName;var Y0=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(B0.List,{ref:n,className:H(`max-h-[300px] overflow-y-auto overflow-x-hidden`,e),...t}));Y0.displayName=B0.List.displayName;var X0=_.forwardRef((e,t)=>(0,I.jsx)(B0.Empty,{ref:t,className:`py-6 text-center text-sm`,...e}));X0.displayName=B0.Empty.displayName;var Z0=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(B0.Group,{ref:n,className:H(`overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground`,e),...t}));Z0.displayName=B0.Group.displayName;var r_e=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(B0.Separator,{ref:n,className:H(`-mx-1 h-px bg-border`,e),...t}));r_e.displayName=B0.Separator.displayName;var Q0=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(B0.Item,{ref:n,className:H(`relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50`,e),...t}));Q0.displayName=B0.Item.displayName;var i_e=({className:e,...t})=>(0,I.jsx)(`span`,{className:H(`ml-auto text-xs tracking-widest text-muted-foreground`,e),...t});i_e.displayName=`CommandShortcut`;var $0=`ContextMenu`,[a_e,o_e]=R($0,[aV]),e2=aV(),[s_e,t2]=a_e($0),n2=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:a=!0}=e,[o,s]=_.useState(!1),c=e2(t),l=B(r),u=_.useCallback(e=>{s(e),l(e)},[l]);return(0,I.jsx)(s_e,{scope:t,open:o,onOpenChange:u,modal:a,children:(0,I.jsx)(mH,{...c,dir:i,open:o,onOpenChange:u,modal:a,children:n})})};n2.displayName=$0;var r2=`ContextMenuTrigger`,i2=_.forwardRef((e,t)=>{let{__scopeContextMenu:n,disabled:r=!1,...i}=e,a=t2(r2,n),o=e2(n),s=_.useRef({x:0,y:0}),c=_.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...s.current})}),l=_.useRef(0),u=_.useCallback(()=>window.clearTimeout(l.current),[]),d=e=>{s.current={x:e.clientX,y:e.clientY},a.onOpenChange(!0)};return _.useEffect(()=>u,[u]),_.useEffect(()=>void(r&&u()),[r,u]),(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(hH,{...o,virtualRef:c}),(0,I.jsx)(z.span,{"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,...i,ref:t,style:{WebkitTouchCallout:`none`,...e.style},onContextMenu:r?e.onContextMenu:j(e.onContextMenu,e=>{u(),d(e),e.preventDefault()}),onPointerDown:r?e.onPointerDown:j(e.onPointerDown,_2(e=>{u(),l.current=window.setTimeout(()=>d(e),700)})),onPointerMove:r?e.onPointerMove:j(e.onPointerMove,_2(u)),onPointerCancel:r?e.onPointerCancel:j(e.onPointerCancel,_2(u)),onPointerUp:r?e.onPointerUp:j(e.onPointerUp,_2(u))})]})});i2.displayName=r2;var c_e=`ContextMenuPortal`,a2=e=>{let{__scopeContextMenu:t,...n}=e,r=e2(t);return(0,I.jsx)(gH,{...r,...n})};a2.displayName=c_e;var o2=`ContextMenuContent`,s2=_.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=t2(o2,n),a=e2(n),o=_.useRef(!1);return(0,I.jsx)(_H,{...a,...r,ref:t,side:`right`,sideOffset:2,align:`start`,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),!t.defaultPrevented&&o.current&&t.preventDefault(),o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),!t.defaultPrevented&&!i.modal&&(o.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});s2.displayName=o2;var l_e=`ContextMenuGroup`,u_e=_.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=e2(n);return(0,I.jsx)(vH,{...i,...r,ref:t})});u_e.displayName=l_e;var d_e=`ContextMenuLabel`,c2=_.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=e2(n);return(0,I.jsx)(yH,{...i,...r,ref:t})});c2.displayName=d_e;var f_e=`ContextMenuItem`,l2=_.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=e2(n);return(0,I.jsx)(bH,{...i,...r,ref:t})});l2.displayName=f_e;var p_e=`ContextMenuCheckboxItem`,u2=_.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=e2(n);return(0,I.jsx)(xH,{...i,...r,ref:t})});u2.displayName=p_e;var m_e=`ContextMenuRadioGroup`,h_e=_.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=e2(n);return(0,I.jsx)(SH,{...i,...r,ref:t})});h_e.displayName=m_e;var g_e=`ContextMenuRadioItem`,d2=_.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=e2(n);return(0,I.jsx)(CH,{...i,...r,ref:t})});d2.displayName=g_e;var __e=`ContextMenuItemIndicator`,f2=_.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=e2(n);return(0,I.jsx)(wH,{...i,...r,ref:t})});f2.displayName=__e;var v_e=`ContextMenuSeparator`,p2=_.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=e2(n);return(0,I.jsx)(TH,{...i,...r,ref:t})});p2.displayName=v_e;var y_e=`ContextMenuArrow`,b_e=_.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=e2(n);return(0,I.jsx)(EH,{...i,...r,ref:t})});b_e.displayName=y_e;var m2=`ContextMenuSub`,x_e=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,open:i,defaultOpen:a}=e,o=e2(t),[s,c]=Fe({prop:i,defaultProp:a??!1,onChange:r,caller:m2});return(0,I.jsx)(DH,{...o,open:s,onOpenChange:c,children:n})};x_e.displayName=m2;var S_e=`ContextMenuSubTrigger`,h2=_.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=e2(n);return(0,I.jsx)(OH,{...i,...r,ref:t})});h2.displayName=S_e;var C_e=`ContextMenuSubContent`,g2=_.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=e2(n);return(0,I.jsx)(kH,{...i,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});g2.displayName=C_e;function _2(e){return t=>t.pointerType===`mouse`?void 0:e(t)}var w_e=n2,T_e=i2,E_e=a2,v2=s2,y2=c2,b2=l2,x2=u2,S2=d2,C2=f2,w2=p2,T2=h2,E2=g2,D_e=w_e,O_e=T_e,k_e=_.forwardRef(({className:e,inset:t,children:n,...r},i)=>(0,I.jsxs)(T2,{ref:i,className:H(`flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent data-[state=open]:text-accent-foreground focus:bg-accent focus:text-accent-foreground`,t&&`pl-8`,e),...r,children:[n,(0,I.jsx)(sn,{className:`ml-auto h-4 w-4`})]}));k_e.displayName=T2.displayName;var A_e=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(E2,{ref:n,className:H(`z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,e),...t}));A_e.displayName=E2.displayName;var D2=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(E_e,{children:(0,I.jsx)(v2,{ref:n,className:H(`z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,e),...t})}));D2.displayName=v2.displayName;var O2=_.forwardRef(({className:e,inset:t,...n},r)=>(0,I.jsx)(b2,{ref:r,className:H(`relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground`,t&&`pl-8`,e),...n}));O2.displayName=b2.displayName;var j_e=_.forwardRef(({className:e,children:t,checked:n,...r},i)=>(0,I.jsxs)(x2,{ref:i,className:H(`relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground`,e),checked:n,...r,children:[(0,I.jsx)(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,I.jsx)(C2,{children:(0,I.jsx)(rn,{className:`h-4 w-4`})})}),t]}));j_e.displayName=x2.displayName;var M_e=_.forwardRef(({className:e,children:t,...n},r)=>(0,I.jsxs)(S2,{ref:r,className:H(`relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground`,e),...n,children:[(0,I.jsx)(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,I.jsx)(C2,{children:(0,I.jsx)(hn,{className:`h-2 w-2 fill-current`})})}),t]}));M_e.displayName=S2.displayName;var k2=_.forwardRef(({className:e,inset:t,...n},r)=>(0,I.jsx)(y2,{ref:r,className:H(`px-2 py-1.5 text-sm font-semibold text-foreground`,t&&`pl-8`,e),...n}));k2.displayName=y2.displayName;var A2=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(w2,{ref:n,className:H(`-mx-1 my-1 h-px bg-border`,e),...t}));A2.displayName=w2.displayName;var N_e=({className:e,...t})=>(0,I.jsx)(`span`,{className:H(`ml-auto text-xs tracking-widest text-muted-foreground`,e),...t});N_e.displayName=`ContextMenuShortcut`;var j2=`Menubar`,[M2,P_e,F_e]=ce(j2),[N2,I_e]=R(j2,[F_e,PB]),P2=aV(),F2=PB(),[L_e,I2]=N2(j2),L2=_.forwardRef((e,t)=>{let{__scopeMenubar:n,value:r,onValueChange:i,defaultValue:a,loop:o=!0,dir:s,...c}=e,l=EB(s),u=F2(n),[d,f]=Fe({prop:r,onChange:i,defaultProp:a??``,caller:j2}),[p,m]=_.useState(null);return(0,I.jsx)(L_e,{scope:n,value:d,onMenuOpen:_.useCallback(e=>{f(e),m(e)},[f]),onMenuClose:_.useCallback(()=>f(``),[f]),onMenuToggle:_.useCallback(e=>{f(t=>t?``:e),m(e)},[f]),dir:l,loop:o,children:(0,I.jsx)(M2.Provider,{scope:n,children:(0,I.jsx)(M2.Slot,{scope:n,children:(0,I.jsx)(KB,{asChild:!0,...u,orientation:`horizontal`,loop:o,dir:l,currentTabStopId:p,onCurrentTabStopIdChange:m,children:(0,I.jsx)(z.div,{role:`menubar`,...c,ref:t})})})})})});L2.displayName=j2;var R2=`MenubarMenu`,[R_e,z2]=N2(R2),B2=e=>{let{__scopeMenubar:t,value:n,...r}=e,i=Na(),a=n||i||`LEGACY_REACT_AUTO_VALUE`,o=I2(R2,t),s=P2(t),c=_.useRef(null),l=_.useRef(!1),u=o.value===a;return _.useEffect(()=>{u||(l.current=!1)},[u]),(0,I.jsx)(R_e,{scope:t,value:a,triggerId:Na(),triggerRef:c,contentId:Na(),wasKeyboardTriggerOpenRef:l,children:(0,I.jsx)(mH,{...s,open:u,onOpenChange:e=>{e||o.onMenuClose()},modal:!1,dir:o.dir,...r})})};B2.displayName=R2;var V2=`MenubarTrigger`,H2=_.forwardRef((e,t)=>{let{__scopeMenubar:n,disabled:r=!1,...i}=e,a=F2(n),o=P2(n),s=I2(V2,n),c=z2(V2,n),l=_.useRef(null),u=P(t,l,c.triggerRef),[d,f]=_.useState(!1),p=s.value===c.value;return(0,I.jsx)(M2.ItemSlot,{scope:n,value:c.value,disabled:r,children:(0,I.jsx)(qB,{asChild:!0,...a,focusable:!r,tabStopId:c.value,children:(0,I.jsx)(hH,{asChild:!0,...o,children:(0,I.jsx)(z.button,{type:`button`,role:`menuitem`,id:c.triggerId,"aria-haspopup":`menu`,"aria-expanded":p,"aria-controls":p?c.contentId:void 0,"data-highlighted":d?``:void 0,"data-state":p?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:u,onPointerDown:j(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(s.onMenuOpen(c.value),p||e.preventDefault())}),onPointerEnter:j(e.onPointerEnter,()=>{s.value&&!p&&(s.onMenuOpen(c.value),l.current?.focus())}),onKeyDown:j(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&s.onMenuToggle(c.value),e.key===`ArrowDown`&&s.onMenuOpen(c.value),[`Enter`,` `,`ArrowDown`].includes(e.key)&&(c.wasKeyboardTriggerOpenRef.current=!0,e.preventDefault()))}),onFocus:j(e.onFocus,()=>f(!0)),onBlur:j(e.onBlur,()=>f(!1))})})})})});H2.displayName=V2;var z_e=`MenubarPortal`,U2=e=>{let{__scopeMenubar:t,...n}=e,r=P2(t);return(0,I.jsx)(gH,{...r,...n})};U2.displayName=z_e;var W2=`MenubarContent`,G2=_.forwardRef((e,t)=>{let{__scopeMenubar:n,align:r=`start`,...i}=e,a=P2(n),o=I2(W2,n),s=z2(W2,n),c=P_e(n),l=_.useRef(!1);return(0,I.jsx)(_H,{id:s.contentId,"aria-labelledby":s.triggerId,"data-radix-menubar-content":``,...a,...i,ref:t,align:r,onCloseAutoFocus:j(e.onCloseAutoFocus,e=>{!o.value&&!l.current&&s.triggerRef.current?.focus(),l.current=!1,e.preventDefault()}),onFocusOutside:j(e.onFocusOutside,e=>{let t=e.target;c().some(e=>e.ref.current?.contains(t))&&e.preventDefault()}),onInteractOutside:j(e.onInteractOutside,()=>{l.current=!0}),onEntryFocus:e=>{s.wasKeyboardTriggerOpenRef.current||e.preventDefault()},onKeyDown:j(e.onKeyDown,e=>{if([`ArrowRight`,`ArrowLeft`].includes(e.key)){let t=e.target,n=t.hasAttribute(`data-radix-menubar-subtrigger`),r=t.closest(`[data-radix-menubar-content]`)!==e.currentTarget,i=(o.dir===`rtl`?`ArrowRight`:`ArrowLeft`)===e.key;if(!i&&n||r&&i)return;let a=c().filter(e=>!e.disabled).map(e=>e.value);i&&a.reverse();let l=a.indexOf(s.value);a=o.loop?tve(a,l+1):a.slice(l+1);let[u]=a;u&&o.onMenuOpen(u)}},{checkForDefaultPrevented:!1}),style:{...e.style,"--radix-menubar-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-menubar-content-available-width":`var(--radix-popper-available-width)`,"--radix-menubar-content-available-height":`var(--radix-popper-available-height)`,"--radix-menubar-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-menubar-trigger-height":`var(--radix-popper-anchor-height)`}})});G2.displayName=W2;var B_e=`MenubarGroup`,V_e=_.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=P2(n);return(0,I.jsx)(vH,{...i,...r,ref:t})});V_e.displayName=B_e;var H_e=`MenubarLabel`,K2=_.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=P2(n);return(0,I.jsx)(yH,{...i,...r,ref:t})});K2.displayName=H_e;var U_e=`MenubarItem`,q2=_.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=P2(n);return(0,I.jsx)(bH,{...i,...r,ref:t})});q2.displayName=U_e;var W_e=`MenubarCheckboxItem`,J2=_.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=P2(n);return(0,I.jsx)(xH,{...i,...r,ref:t})});J2.displayName=W_e;var G_e=`MenubarRadioGroup`,K_e=_.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=P2(n);return(0,I.jsx)(SH,{...i,...r,ref:t})});K_e.displayName=G_e;var q_e=`MenubarRadioItem`,Y2=_.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=P2(n);return(0,I.jsx)(CH,{...i,...r,ref:t})});Y2.displayName=q_e;var J_e=`MenubarItemIndicator`,X2=_.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=P2(n);return(0,I.jsx)(wH,{...i,...r,ref:t})});X2.displayName=J_e;var Y_e=`MenubarSeparator`,Z2=_.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=P2(n);return(0,I.jsx)(TH,{...i,...r,ref:t})});Z2.displayName=Y_e;var X_e=`MenubarArrow`,Z_e=_.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=P2(n);return(0,I.jsx)(EH,{...i,...r,ref:t})});Z_e.displayName=X_e;var Q2=`MenubarSub`,Q_e=e=>{let{__scopeMenubar:t,children:n,open:r,onOpenChange:i,defaultOpen:a}=e,o=P2(t),[s,c]=Fe({prop:r,defaultProp:a??!1,onChange:i,caller:Q2});return(0,I.jsx)(DH,{...o,open:s,onOpenChange:c,children:n})};Q_e.displayName=Q2;var $_e=`MenubarSubTrigger`,$2=_.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=P2(n);return(0,I.jsx)(OH,{"data-radix-menubar-subtrigger":``,...i,...r,ref:t})});$2.displayName=$_e;var eve=`MenubarSubContent`,e4=_.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=P2(n);return(0,I.jsx)(kH,{...i,"data-radix-menubar-content":``,...r,ref:t,style:{...e.style,"--radix-menubar-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-menubar-content-available-width":`var(--radix-popper-available-width)`,"--radix-menubar-content-available-height":`var(--radix-popper-available-height)`,"--radix-menubar-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-menubar-trigger-height":`var(--radix-popper-anchor-height)`}})});e4.displayName=eve;function tve(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var t4=L2,nve=B2,n4=H2,rve=U2,r4=G2,i4=K2,a4=q2,o4=J2,s4=Y2,c4=X2,l4=Z2,u4=$2,d4=e4,ive=nve,f4=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(t4,{ref:n,className:H(`flex h-10 items-center space-x-1 rounded-md border bg-background p-1`,e),...t}));f4.displayName=t4.displayName;var p4=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(n4,{ref:n,className:H(`flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none data-[state=open]:bg-accent data-[state=open]:text-accent-foreground focus:bg-accent focus:text-accent-foreground`,e),...t}));p4.displayName=n4.displayName;var ave=_.forwardRef(({className:e,inset:t,children:n,...r},i)=>(0,I.jsxs)(u4,{ref:i,className:H(`flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent data-[state=open]:text-accent-foreground focus:bg-accent focus:text-accent-foreground`,t&&`pl-8`,e),...r,children:[n,(0,I.jsx)(sn,{className:`ml-auto h-4 w-4`})]}));ave.displayName=u4.displayName;var ove=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(d4,{ref:n,className:H(`z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,e),...t}));ove.displayName=d4.displayName;var m4=_.forwardRef(({className:e,align:t=`start`,alignOffset:n=-4,sideOffset:r=8,...i},a)=>(0,I.jsx)(rve,{children:(0,I.jsx)(r4,{ref:a,align:t,alignOffset:n,sideOffset:r,className:H(`z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,e),...i})}));m4.displayName=r4.displayName;var h4=_.forwardRef(({className:e,inset:t,...n},r)=>(0,I.jsx)(a4,{ref:r,className:H(`relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground`,t&&`pl-8`,e),...n}));h4.displayName=a4.displayName;var sve=_.forwardRef(({className:e,children:t,checked:n,...r},i)=>(0,I.jsxs)(o4,{ref:i,className:H(`relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground`,e),checked:n,...r,children:[(0,I.jsx)(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,I.jsx)(c4,{children:(0,I.jsx)(rn,{className:`h-4 w-4`})})}),t]}));sve.displayName=o4.displayName;var cve=_.forwardRef(({className:e,children:t,...n},r)=>(0,I.jsxs)(s4,{ref:r,className:H(`relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground`,e),...n,children:[(0,I.jsx)(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,I.jsx)(c4,{children:(0,I.jsx)(hn,{className:`h-2 w-2 fill-current`})})}),t]}));cve.displayName=s4.displayName;var lve=_.forwardRef(({className:e,inset:t,...n},r)=>(0,I.jsx)(i4,{ref:r,className:H(`px-2 py-1.5 text-sm font-semibold`,t&&`pl-8`,e),...n}));lve.displayName=i4.displayName;var g4=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(l4,{ref:n,className:H(`-mx-1 my-1 h-px bg-muted`,e),...t}));g4.displayName=l4.displayName;var _4=({className:e,...t})=>(0,I.jsx)(`span`,{className:H(`ml-auto text-xs tracking-widest text-muted-foreground`,e),...t});_4.displayname=`MenubarShortcut`;var v4=`NavigationMenu`,[y4,b4,uve]=ce(v4),[x4,dve,fve]=ce(v4),[S4,pve]=R(v4,[uve,fve]),[mve,C4]=S4(v4),[hve,gve]=S4(v4),w4=_.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,value:r,onValueChange:i,defaultValue:a,delayDuration:o=200,skipDelayDuration:s=300,orientation:c=`horizontal`,dir:l,...u}=e,[d,f]=_.useState(null),p=P(t,e=>f(e)),m=EB(l),h=_.useRef(0),g=_.useRef(0),v=_.useRef(0),[y,b]=_.useState(!0),[x,S]=Fe({prop:r,onChange:e=>{let t=e!==``,n=s>0;t?(window.clearTimeout(v.current),n&&b(!1)):(window.clearTimeout(v.current),v.current=window.setTimeout(()=>b(!0),s)),i?.(e)},defaultProp:a??``,caller:v4}),C=_.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>S(``),150)},[S]),w=_.useCallback(e=>{window.clearTimeout(g.current),S(e)},[S]),T=_.useCallback(e=>{x===e?window.clearTimeout(g.current):h.current=window.setTimeout(()=>{window.clearTimeout(g.current),S(e)},o)},[x,S,o]);return _.useEffect(()=>()=>{window.clearTimeout(h.current),window.clearTimeout(g.current),window.clearTimeout(v.current)},[]),(0,I.jsx)(E4,{scope:n,isRootMenu:!0,value:x,dir:m,orientation:c,rootNavigationMenu:d,onTriggerEnter:e=>{window.clearTimeout(h.current),y?T(e):w(e)},onTriggerLeave:()=>{window.clearTimeout(h.current),C()},onContentEnter:()=>window.clearTimeout(g.current),onContentLeave:C,onItemSelect:e=>{S(t=>t===e?``:e)},onItemDismiss:()=>S(``),children:(0,I.jsx)(z.nav,{"aria-label":`Main`,"data-orientation":c,dir:m,...u,ref:p})})});w4.displayName=v4;var T4=`NavigationMenuSub`,_ve=_.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,...s}=e,c=C4(T4,n),[l,u]=Fe({prop:r,onChange:i,defaultProp:a??``,caller:T4});return(0,I.jsx)(E4,{scope:n,isRootMenu:!1,value:l,dir:c.dir,orientation:o,rootNavigationMenu:c.rootNavigationMenu,onTriggerEnter:e=>u(e),onItemSelect:e=>u(e),onItemDismiss:()=>u(``),children:(0,I.jsx)(z.div,{"data-orientation":o,...s,ref:t})})});_ve.displayName=T4;var E4=e=>{let{scope:t,isRootMenu:n,rootNavigationMenu:r,dir:i,orientation:a,children:o,value:s,onItemSelect:c,onItemDismiss:l,onTriggerEnter:u,onTriggerLeave:d,onContentEnter:f,onContentLeave:p}=e,[m,h]=_.useState(null),[g,v]=_.useState(new Map),[y,b]=_.useState(null);return(0,I.jsx)(mve,{scope:t,isRootMenu:n,rootNavigationMenu:r,value:s,previousValue:CG(s),baseId:Na(),dir:i,orientation:a,viewport:m,onViewportChange:h,indicatorTrack:y,onIndicatorTrackChange:b,onTriggerEnter:B(u),onTriggerLeave:B(d),onContentEnter:B(f),onContentLeave:B(p),onItemSelect:B(c),onItemDismiss:B(l),onViewportContentChange:_.useCallback((e,t)=>{v(n=>(n.set(e,t),new Map(n)))},[]),onViewportContentRemove:_.useCallback(e=>{v(t=>t.has(e)?(t.delete(e),new Map(t)):t)},[]),children:(0,I.jsx)(y4.Provider,{scope:t,children:(0,I.jsx)(hve,{scope:t,items:g,children:o})})})},D4=`NavigationMenuList`,O4=_.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=C4(D4,n),a=(0,I.jsx)(z.ul,{"data-orientation":i.orientation,...r,ref:t});return(0,I.jsx)(z.div,{style:{position:`relative`},ref:i.onIndicatorTrackChange,children:(0,I.jsx)(y4.Slot,{scope:n,children:i.isRootMenu?(0,I.jsx)(W4,{asChild:!0,children:a}):a})})});O4.displayName=D4;var k4=`NavigationMenuItem`,[vve,A4]=S4(k4),j4=_.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,value:r,...i}=e,a=Na(),o=r||a||`LEGACY_REACT_AUTO_VALUE`,s=_.useRef(null),c=_.useRef(null),l=_.useRef(null),u=_.useRef(()=>{}),d=_.useRef(!1),f=_.useCallback((e=`start`)=>{if(s.current){u.current();let t=q4(s.current);t.length&&J4(e===`start`?t:t.reverse())}},[]),p=_.useCallback(()=>{if(s.current){let e=q4(s.current);e.length&&(u.current=Tve(e))}},[]);return(0,I.jsx)(vve,{scope:n,value:o,triggerRef:c,contentRef:s,focusProxyRef:l,wasEscapeCloseRef:d,onEntryKeyDown:f,onFocusProxyEnter:f,onRootContentClose:p,onContentFocusOutside:p,children:(0,I.jsx)(z.li,{...i,ref:t})})});j4.displayName=k4;var M4=`NavigationMenuTrigger`,N4=_.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,disabled:r,...i}=e,a=C4(M4,e.__scopeNavigationMenu),o=A4(M4,e.__scopeNavigationMenu),s=_.useRef(null),c=P(s,o.triggerRef,t),l=Z4(a.baseId,o.value),u=Q4(a.baseId,o.value),d=_.useRef(!1),f=_.useRef(!1),p=o.value===a.value;return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(y4.ItemSlot,{scope:n,value:o.value,children:(0,I.jsx)(K4,{asChild:!0,children:(0,I.jsx)(z.button,{id:l,disabled:r,"data-disabled":r?``:void 0,"data-state":X4(p),"aria-expanded":p,"aria-controls":u,...i,ref:c,onPointerEnter:j(e.onPointerEnter,()=>{f.current=!1,o.wasEscapeCloseRef.current=!1}),onPointerMove:j(e.onPointerMove,$4(()=>{r||f.current||o.wasEscapeCloseRef.current||d.current||(a.onTriggerEnter(o.value),d.current=!0)})),onPointerLeave:j(e.onPointerLeave,$4(()=>{r||(a.onTriggerLeave(),d.current=!1)})),onClick:j(e.onClick,()=>{a.onItemSelect(o.value),f.current=p}),onKeyDown:j(e.onKeyDown,e=>{let t={horizontal:`ArrowDown`,vertical:a.dir===`rtl`?`ArrowLeft`:`ArrowRight`}[a.orientation];p&&e.key===t&&(o.onEntryKeyDown(),e.preventDefault())})})})}),p&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Ve,{"aria-hidden":!0,tabIndex:0,ref:o.focusProxyRef,onFocus:e=>{let t=o.contentRef.current,n=e.relatedTarget,r=n===s.current,i=t?.contains(n);(r||!i)&&o.onFocusProxyEnter(r?`start`:`end`)}}),a.viewport&&(0,I.jsx)(`span`,{"aria-owns":u})]})]})});N4.displayName=M4;var yve=`NavigationMenuLink`,P4=`navigationMenu.linkSelect`,F4=_.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,active:r,onSelect:i,...a}=e;return(0,I.jsx)(K4,{asChild:!0,children:(0,I.jsx)(z.a,{"data-active":r?``:void 0,"aria-current":r?`page`:void 0,...a,ref:t,onClick:j(e.onClick,e=>{let t=e.target,n=new CustomEvent(P4,{bubbles:!0,cancelable:!0});t.addEventListener(P4,e=>i?.(e),{once:!0}),le(t,n),!n.defaultPrevented&&!e.metaKey&&le(t,new CustomEvent(B4,{bubbles:!0,cancelable:!0}))},{checkForDefaultPrevented:!1})})})});F4.displayName=yve;var I4=`NavigationMenuIndicator`,L4=_.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=C4(I4,e.__scopeNavigationMenu),a=!!i.value;return i.indicatorTrack?A.createPortal((0,I.jsx)(Ae,{present:n||a,children:(0,I.jsx)(bve,{...r,ref:t})}),i.indicatorTrack):null});L4.displayName=I4;var bve=_.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=C4(I4,n),a=b4(n),[o,s]=_.useState(null),[c,l]=_.useState(null),u=i.orientation===`horizontal`,d=!!i.value;_.useEffect(()=>{let e=a().find(e=>e.value===i.value)?.ref.current;e&&s(e)},[a,i.value]);let f=()=>{o&&l({size:u?o.offsetWidth:o.offsetHeight,offset:u?o.offsetLeft:o.offsetTop})};return Y4(o,f),Y4(i.indicatorTrack,f),c?(0,I.jsx)(z.div,{"aria-hidden":!0,"data-state":d?`visible`:`hidden`,"data-orientation":i.orientation,...r,ref:t,style:{position:`absolute`,...u?{left:0,width:c.size+`px`,transform:`translateX(${c.offset}px)`}:{top:0,height:c.size+`px`,transform:`translateY(${c.offset}px)`},...r.style}}):null}),R4=`NavigationMenuContent`,z4=_.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=C4(R4,e.__scopeNavigationMenu),a=A4(R4,e.__scopeNavigationMenu),o=P(a.contentRef,t),s=a.value===i.value,c={value:a.value,triggerRef:a.triggerRef,focusProxyRef:a.focusProxyRef,wasEscapeCloseRef:a.wasEscapeCloseRef,onContentFocusOutside:a.onContentFocusOutside,onRootContentClose:a.onRootContentClose,...r};return i.viewport?(0,I.jsx)(xve,{forceMount:n,...c,ref:o}):(0,I.jsx)(Ae,{present:n||s,children:(0,I.jsx)(V4,{"data-state":X4(s),...c,ref:o,onPointerEnter:j(e.onPointerEnter,i.onContentEnter),onPointerLeave:j(e.onPointerLeave,$4(i.onContentLeave)),style:{pointerEvents:!s&&i.isRootMenu?`none`:void 0,...c.style}})})});z4.displayName=R4;var xve=_.forwardRef((e,t)=>{let{onViewportContentChange:n,onViewportContentRemove:r}=C4(R4,e.__scopeNavigationMenu);return Ee(()=>{n(e.value,{ref:t,...e})},[e,t,n]),Ee(()=>()=>r(e.value),[e.value,r]),null}),B4=`navigationMenu.rootContentDismiss`,V4=_.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,value:r,triggerRef:i,focusProxyRef:a,wasEscapeCloseRef:o,onRootContentClose:s,onContentFocusOutside:c,...l}=e,u=C4(R4,n),d=_.useRef(null),f=P(d,t),p=Z4(u.baseId,r),m=Q4(u.baseId,r),h=b4(n),g=_.useRef(null),{onItemDismiss:v}=u;_.useEffect(()=>{let e=d.current;if(u.isRootMenu&&e){let t=()=>{v(),s(),e.contains(document.activeElement)&&i.current?.focus()};return e.addEventListener(B4,t),()=>e.removeEventListener(B4,t)}},[u.isRootMenu,e.value,i,v,s]);let y=_.useMemo(()=>{let e=h().map(e=>e.value);u.dir===`rtl`&&e.reverse();let t=e.indexOf(u.value),n=e.indexOf(u.previousValue),i=r===u.value,a=n===e.indexOf(r);if(!i&&!a)return g.current;let o=(()=>{if(t!==n){if(i&&n!==-1)return t>n?`from-end`:`from-start`;if(a&&t!==-1)return t>n?`to-start`:`to-end`}return null})();return g.current=o,o},[u.previousValue,u.value,u.dir,h,r]);return(0,I.jsx)(W4,{asChild:!0,children:(0,I.jsx)(_e,{id:m,"aria-labelledby":p,"data-motion":y,"data-orientation":u.orientation,...l,ref:f,disableOutsidePointerEvents:!1,onDismiss:()=>{let e=new Event(B4,{bubbles:!0,cancelable:!0});d.current?.dispatchEvent(e)},onFocusOutside:j(e.onFocusOutside,e=>{c();let t=e.target;u.rootNavigationMenu?.contains(t)&&e.preventDefault()}),onPointerDownOutside:j(e.onPointerDownOutside,e=>{let t=e.target,n=h().some(e=>e.ref.current?.contains(t)),r=u.isRootMenu&&u.viewport?.contains(t);(n||r||!u.isRootMenu)&&e.preventDefault()}),onKeyDown:j(e.onKeyDown,e=>{let t=e.altKey||e.ctrlKey||e.metaKey;if(e.key===`Tab`&&!t){let t=q4(e.currentTarget),n=document.activeElement,r=t.findIndex(e=>e===n);J4(e.shiftKey?t.slice(0,r).reverse():t.slice(r+1,t.length))?e.preventDefault():a.current?.focus()}}),onEscapeKeyDown:j(e.onEscapeKeyDown,e=>{o.current=!0})})})}),H4=`NavigationMenuViewport`,U4=_.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=!!C4(H4,e.__scopeNavigationMenu).value;return(0,I.jsx)(Ae,{present:n||i,children:(0,I.jsx)(Sve,{...r,ref:t})})});U4.displayName=H4;var Sve=_.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,children:r,...i}=e,a=C4(H4,n),o=P(t,a.onViewportChange),s=gve(R4,e.__scopeNavigationMenu),[c,l]=_.useState(null),[u,d]=_.useState(null),f=c?c?.width+`px`:void 0,p=c?c?.height+`px`:void 0,m=!!a.value,h=m?a.value:a.previousValue;return Y4(u,()=>{u&&l({width:u.offsetWidth,height:u.offsetHeight})}),(0,I.jsx)(z.div,{"data-state":X4(m),"data-orientation":a.orientation,...i,ref:o,style:{pointerEvents:!m&&a.isRootMenu?`none`:void 0,"--radix-navigation-menu-viewport-width":f,"--radix-navigation-menu-viewport-height":p,...i.style},onPointerEnter:j(e.onPointerEnter,a.onContentEnter),onPointerLeave:j(e.onPointerLeave,$4(a.onContentLeave)),children:Array.from(s.items).map(([e,{ref:t,forceMount:n,...r}])=>{let i=h===e;return(0,I.jsx)(Ae,{present:n||i,children:(0,I.jsx)(V4,{...r,ref:N(t,e=>{i&&e&&d(e)})})},e)})})}),Cve=`FocusGroup`,W4=_.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=C4(Cve,n);return(0,I.jsx)(x4.Provider,{scope:n,children:(0,I.jsx)(x4.Slot,{scope:n,children:(0,I.jsx)(z.div,{dir:i.dir,...r,ref:t})})})}),G4=[`ArrowRight`,`ArrowLeft`,`ArrowUp`,`ArrowDown`],wve=`FocusGroupItem`,K4=_.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=dve(n),a=C4(wve,n);return(0,I.jsx)(x4.ItemSlot,{scope:n,children:(0,I.jsx)(z.button,{...r,ref:t,onKeyDown:j(e.onKeyDown,e=>{if([`Home`,`End`,...G4].includes(e.key)){let t=i().map(e=>e.ref.current);if([a.dir===`rtl`?`ArrowRight`:`ArrowLeft`,`ArrowUp`,`End`].includes(e.key)&&t.reverse(),G4.includes(e.key)){let n=t.indexOf(e.currentTarget);t=t.slice(n+1)}setTimeout(()=>J4(t)),e.preventDefault()}})})})});function q4(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function J4(e){let t=document.activeElement;return e.some(e=>e===t?!0:(e.focus(),document.activeElement!==t))}function Tve(e){return e.forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)}),()=>{e.forEach(e=>{let t=e.dataset.tabindex;e.setAttribute(`tabindex`,t)})}}function Y4(e,t){let n=B(t);Ee(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}function X4(e){return e?`open`:`closed`}function Z4(e,t){return`${e}-trigger-${t}`}function Q4(e,t){return`${e}-content-${t}`}function $4(e){return t=>t.pointerType===`mouse`?e(t):void 0}var e3=w4,t3=O4,Eve=j4,n3=N4,Dve=F4,r3=L4,i3=z4,a3=U4,o3=_.forwardRef(({className:e,children:t,...n},r)=>(0,I.jsxs)(e3,{ref:r,className:H(`relative z-10 flex max-w-max flex-1 items-center justify-center`,e),...n,children:[t,(0,I.jsx)(d3,{})]}));o3.displayName=e3.displayName;var s3=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(t3,{ref:n,className:H(`group flex flex-1 list-none items-center justify-center space-x-1`,e),...t}));s3.displayName=t3.displayName;var c3=Eve,Ove=Vt(`group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50`),l3=_.forwardRef(({className:e,children:t,...n},r)=>(0,I.jsxs)(n3,{ref:r,className:H(Ove(),`group`,e),...n,children:[t,` `,(0,I.jsx)(an,{className:`relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180`,"aria-hidden":`true`})]}));l3.displayName=n3.displayName;var u3=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(i3,{ref:n,className:H(`left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto`,e),...t}));u3.displayName=i3.displayName;var kve=Dve,d3=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(`div`,{className:H(`absolute left-0 top-full flex justify-center`),children:(0,I.jsx)(a3,{className:H(`origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]`,e),ref:n,...t})}));d3.displayName=a3.displayName;var Ave=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(r3,{ref:n,className:H(`top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in`,e),...t,children:(0,I.jsx)(`div`,{className:`relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md`})}));Ave.displayName=r3.displayName;var f3=`Accordion`,jve=[`Home`,`End`,`ArrowDown`,`ArrowUp`,`ArrowLeft`,`ArrowRight`],[p3,Mve,Nve]=ce(f3),[m3,Pve]=R(f3,[Nve,ig]),h3=ig(),g3=_.forwardRef((e,t)=>{let{type:n,...r}=e,i=r,a=r;return(0,I.jsx)(p3.Provider,{scope:e.__scopeAccordion,children:n===`multiple`?(0,I.jsx)(Rve,{...a,ref:t}):(0,I.jsx)(Lve,{...i,ref:t})})});g3.displayName=f3;var[_3,Fve]=m3(f3),[v3,Ive]=m3(f3,{collapsible:!1}),Lve=_.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},collapsible:a=!1,...o}=e,[s,c]=Fe({prop:n,defaultProp:r??``,onChange:i,caller:f3});return(0,I.jsx)(_3,{scope:e.__scopeAccordion,value:_.useMemo(()=>s?[s]:[],[s]),onItemOpen:c,onItemClose:_.useCallback(()=>a&&c(``),[a,c]),children:(0,I.jsx)(v3,{scope:e.__scopeAccordion,collapsible:a,children:(0,I.jsx)(b3,{...o,ref:t})})})}),Rve=_.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,s]=Fe({prop:n,defaultProp:r??[],onChange:i,caller:f3}),c=_.useCallback(e=>s((t=[])=>[...t,e]),[s]),l=_.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return(0,I.jsx)(_3,{scope:e.__scopeAccordion,value:o,onItemOpen:c,onItemClose:l,children:(0,I.jsx)(v3,{scope:e.__scopeAccordion,collapsible:!0,children:(0,I.jsx)(b3,{...a,ref:t})})})}),[zve,y3]=m3(f3),b3=_.forwardRef((e,t)=>{let{__scopeAccordion:n,disabled:r,dir:i,orientation:a=`vertical`,...o}=e,s=P(_.useRef(null),t),c=Mve(n),l=EB(i)===`ltr`,u=j(e.onKeyDown,e=>{if(!jve.includes(e.key))return;let t=e.target,n=c().filter(e=>!e.ref.current?.disabled),r=n.findIndex(e=>e.ref.current===t),i=n.length;if(r===-1)return;e.preventDefault();let o=r,s=i-1,u=()=>{o=r+1,o>s&&(o=0)},d=()=>{o=r-1,o<0&&(o=s)};switch(e.key){case`Home`:o=0;break;case`End`:o=s;break;case`ArrowRight`:a===`horizontal`&&(l?u():d());break;case`ArrowDown`:a===`vertical`&&u();break;case`ArrowLeft`:a===`horizontal`&&(l?d():u());break;case`ArrowUp`:a===`vertical`&&d();break}n[o%i].ref.current?.focus()});return(0,I.jsx)(zve,{scope:n,disabled:r,direction:i,orientation:a,children:(0,I.jsx)(p3.Slot,{scope:n,children:(0,I.jsx)(z.div,{...o,"data-orientation":a,ref:s,onKeyDown:r?void 0:u})})})}),x3=`AccordionItem`,[Bve,S3]=m3(x3),C3=_.forwardRef((e,t)=>{let{__scopeAccordion:n,value:r,...i}=e,a=y3(x3,n),o=Fve(x3,n),s=h3(n),c=Na(),l=r&&o.value.includes(r)||!1,u=a.disabled||e.disabled;return(0,I.jsx)(Bve,{scope:n,open:l,disabled:u,triggerId:c,children:(0,I.jsx)(fg,{"data-orientation":a.orientation,"data-state":A3(l),...s,...i,ref:t,disabled:u,open:l,onOpenChange:e=>{e?o.onItemOpen(r):o.onItemClose(r)}})})});C3.displayName=x3;var w3=`AccordionHeader`,T3=_.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=y3(f3,n),a=S3(w3,n);return(0,I.jsx)(z.h3,{"data-orientation":i.orientation,"data-state":A3(a.open),"data-disabled":a.disabled?``:void 0,...r,ref:t})});T3.displayName=w3;var E3=`AccordionTrigger`,D3=_.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=y3(f3,n),a=S3(E3,n),o=Ive(E3,n),s=h3(n);return(0,I.jsx)(p3.ItemSlot,{scope:n,children:(0,I.jsx)(Hte,{"aria-disabled":a.open&&!o.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId,...s,...r,ref:t})})});D3.displayName=E3;var O3=`AccordionContent`,k3=_.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=y3(f3,n),a=S3(O3,n),o=h3(n);return(0,I.jsx)(Ute,{role:`region`,"aria-labelledby":a.triggerId,"data-orientation":i.orientation,...o,...r,ref:t,style:{"--radix-accordion-content-height":`var(--radix-collapsible-content-height)`,"--radix-accordion-content-width":`var(--radix-collapsible-content-width)`,...e.style}})});k3.displayName=O3;function A3(e){return e?`open`:`closed`}var Vve=g3,Hve=C3,Uve=T3,j3=D3,M3=k3,N3=Vve,P3=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(Hve,{ref:n,className:H(`border-b`,e),...t}));P3.displayName=`AccordionItem`;var F3=_.forwardRef(({className:e,children:t,...n},r)=>(0,I.jsx)(Uve,{className:`flex`,children:(0,I.jsxs)(j3,{ref:r,className:H(`flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180`,e),...n,children:[t,(0,I.jsx)(an,{className:`h-4 w-4 shrink-0 transition-transform duration-200`})]})}));F3.displayName=j3.displayName;var I3=_.forwardRef(({className:e,children:t,...n},r)=>(0,I.jsx)(M3,{ref:r,className:`overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down`,...n,children:(0,I.jsx)(`div`,{className:H(`pb-4 pt-0`,e),children:t})}));I3.displayName=M3.displayName;var L3=(0,_.createContext)(null);L3.displayName=`PanelGroupContext`;var R3={group:`data-panel-group`,groupDirection:`data-panel-group-direction`,groupId:`data-panel-group-id`,panel:`data-panel`,panelCollapsible:`data-panel-collapsible`,panelId:`data-panel-id`,panelSize:`data-panel-size`,resizeHandle:`data-resize-handle`,resizeHandleActive:`data-resize-handle-active`,resizeHandleEnabled:`data-panel-resize-handle-enabled`,resizeHandleId:`data-panel-resize-handle-id`,resizeHandleState:`data-resize-handle-state`},z3=10,B3=_.useLayoutEffect,V3=_.useId,Wve=typeof V3==`function`?V3:()=>null,Gve=0;function H3(e=null){let t=Wve(),n=(0,_.useRef)(e||t||null);return n.current===null&&(n.current=``+ Gve++),e??n.current}function U3({children:e,className:t=``,collapsedSize:n,collapsible:r,defaultSize:i,forwardedRef:a,id:o,maxSize:s,minSize:c,onCollapse:l,onExpand:u,onResize:d,order:f,style:p,tagName:m=`div`,...h}){let g=(0,_.useContext)(L3);if(g===null)throw Error(`Panel components must be rendered within a PanelGroup container`);let{collapsePanel:v,expandPanel:y,getPanelSize:b,getPanelStyle:x,groupId:S,isPanelCollapsed:C,reevaluatePanelConstraints:w,registerPanel:T,resizePanel:E,unregisterPanel:D}=g,O=H3(o),k=(0,_.useRef)({callbacks:{onCollapse:l,onExpand:u,onResize:d},constraints:{collapsedSize:n,collapsible:r,defaultSize:i,maxSize:s,minSize:c},id:O,idIsFromProps:o!==void 0,order:f});(0,_.useRef)({didLogMissingDefaultSizeWarning:!1}),B3(()=>{let{callbacks:e,constraints:t}=k.current,a={...t};k.current.id=O,k.current.idIsFromProps=o!==void 0,k.current.order=f,e.onCollapse=l,e.onExpand=u,e.onResize=d,t.collapsedSize=n,t.collapsible=r,t.defaultSize=i,t.maxSize=s,t.minSize=c,(a.collapsedSize!==t.collapsedSize||a.collapsible!==t.collapsible||a.maxSize!==t.maxSize||a.minSize!==t.minSize)&&w(k.current,a)}),B3(()=>{let e=k.current;return T(e),()=>{D(e)}},[f,O,T,D]),(0,_.useImperativeHandle)(a,()=>({collapse:()=>{v(k.current)},expand:e=>{y(k.current,e)},getId(){return O},getSize(){return b(k.current)},isCollapsed(){return C(k.current)},isExpanded(){return!C(k.current)},resize:e=>{E(k.current,e)}}),[v,y,b,C,O,E]);let A=x(k.current,i);return(0,_.createElement)(m,{...h,children:e,className:t,id:O,style:{...A,...p},[R3.groupId]:S,[R3.panel]:``,[R3.panelCollapsible]:r||void 0,[R3.panelId]:O,[R3.panelSize]:parseFloat(``+A.flexGrow).toFixed(1)})}var W3=(0,_.forwardRef)((e,t)=>(0,_.createElement)(U3,{...e,forwardedRef:t}));U3.displayName=`Panel`,W3.displayName=`forwardRef(Panel)`;var Kve;function qve(){return Kve}var G3=null,Jve=!0,K3=-1,q3=null;function Yve(e,t){if(t){let e=(t&r6)!==0,n=(t&i6)!==0,r=(t&a6)!==0,i=(t&o6)!==0;if(e)return r?`se-resize`:i?`ne-resize`:`e-resize`;if(n)return r?`sw-resize`:i?`nw-resize`:`w-resize`;if(r)return`s-resize`;if(i)return`n-resize`}switch(e){case`horizontal`:return`ew-resize`;case`intersection`:return`move`;case`vertical`:return`ns-resize`}}function Xve(){q3!==null&&(document.head.removeChild(q3),G3=null,q3=null,K3=-1)}function J3(e,t){if(!Jve)return;let n=Yve(e,t);if(G3!==n){if(G3=n,q3===null){q3=document.createElement(`style`);let e=qve();e&&q3.setAttribute(`nonce`,e),document.head.appendChild(q3)}if(K3>=0){var r;(r=q3.sheet)==null||r.removeRule(K3)}K3=q3.sheet?.insertRule(`*{cursor: ${n} !important;}`)??-1}}function Y3(e){return e.type===`keydown`}function X3(e){return e.type.startsWith(`pointer`)}function Z3(e){return e.type.startsWith(`mouse`)}function Q3(e){if(X3(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(Z3(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function Zve(){if(typeof matchMedia==`function`)return matchMedia(`(pointer:coarse)`).matches?`coarse`:`fine`}function Qve(e,t,n){return n?e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y:e.x<=t.x+t.width&&e.x+e.width>=t.x&&e.y<=t.y+t.height&&e.y+e.height>=t.y}function $ve(e,t){if(e===t)throw Error(`Cannot compare node with itself`);let n={a:t6(e),b:t6(t)},r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;x6(r,`Stacking order can only be calculated for elements with a common ancestor`);let i={a:e6($3(n.a)),b:e6($3(n.b))};if(i.a===i.b){let e=r.childNodes,t={a:n.a.at(-1),b:n.b.at(-1)},i=e.length;for(;i--;){let n=e[i];if(n===t.a)return 1;if(n===t.b)return-1}}return Math.sign(i.a-i.b)}var eye=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function tye(e){let t=getComputedStyle(n6(e)??e).display;return t===`flex`||t===`inline-flex`}function nye(e){let t=getComputedStyle(e);return!!(t.position===`fixed`||t.zIndex!==`auto`&&(t.position!==`static`||tye(e))||+t.opacity<1||`transform`in t&&t.transform!==`none`||`webkitTransform`in t&&t.webkitTransform!==`none`||`mixBlendMode`in t&&t.mixBlendMode!==`normal`||`filter`in t&&t.filter!==`none`||`webkitFilter`in t&&t.webkitFilter!==`none`||`isolation`in t&&t.isolation===`isolate`||eye.test(t.willChange)||t.webkitOverflowScrolling===`touch`)}function $3(e){let t=e.length;for(;t--;){let n=e[t];if(x6(n,`Missing node`),nye(n))return n}return null}function e6(e){return e&&Number(getComputedStyle(e).zIndex)||0}function t6(e){let t=[];for(;e;)t.push(e),e=n6(e);return t}function n6(e){let{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}var r6=1,i6=2,a6=4,o6=8,rye=Zve()===`coarse`,s6=[],c6=!1,l6=new Map,u6=new Map,d6=new Set;function iye(e,t,n,r,i){let{ownerDocument:a}=t,o={direction:n,element:t,hitAreaMargins:r,setResizeHandlerState:i},s=l6.get(a)??0;return l6.set(a,s+1),d6.add(o),y6(),function(){u6.delete(e),d6.delete(o);let t=l6.get(a)??1;if(l6.set(a,t-1),y6(),t===1&&l6.delete(a),s6.includes(o)){let e=s6.indexOf(o);e>=0&&s6.splice(e,1),_6(),i(`up`,!0,null)}}}function aye(e){let{target:t}=e,{x:n,y:r}=Q3(e);c6=!0,h6({target:t,x:n,y:r}),y6(),s6.length>0&&(b6(`down`,e),e.preventDefault(),m6(t)||e.stopImmediatePropagation())}function f6(e){let{x:t,y:n}=Q3(e);if(c6&&e.buttons===0&&(c6=!1,b6(`up`,e)),!c6){let{target:r}=e;h6({target:r,x:t,y:n})}b6(`move`,e),_6(),s6.length>0&&e.preventDefault()}function p6(e){let{target:t}=e,{x:n,y:r}=Q3(e);u6.clear(),c6=!1,s6.length>0&&(e.preventDefault(),m6(t)||e.stopImmediatePropagation()),b6(`up`,e),h6({target:t,x:n,y:r}),_6(),y6()}function m6(e){let t=e;for(;t;){if(t.hasAttribute(R3.resizeHandle))return!0;t=t.parentElement}return!1}function h6({target:e,x:t,y:n}){s6.splice(0);let r=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(r=e),d6.forEach(e=>{let{element:i,hitAreaMargins:a}=e,o=i.getBoundingClientRect(),{bottom:s,left:c,right:l,top:u}=o,d=rye?a.coarse:a.fine;if(t>=c-d&&t<=l+d&&n>=u-d&&n<=s+d){if(r!==null&&document.contains(r)&&i!==r&&!i.contains(r)&&!r.contains(i)&&$ve(r,i)>0){let e=r,t=!1;for(;e&&!e.contains(i);){if(Qve(e.getBoundingClientRect(),o,!0)){t=!0;break}e=e.parentElement}if(t)return}s6.push(e)}})}function g6(e,t){u6.set(e,t)}function _6(){let e=!1,t=!1;s6.forEach(n=>{let{direction:r}=n;r===`horizontal`?e=!0:t=!0});let n=0;u6.forEach(e=>{n|=e}),e&&t?J3(`intersection`,n):e?J3(`horizontal`,n):t?J3(`vertical`,n):Xve()}var v6=new AbortController;function y6(){v6.abort(),v6=new AbortController;let e={capture:!0,signal:v6.signal};d6.size&&(c6?(s6.length>0&&l6.forEach((t,n)=>{let{body:r}=n;t>0&&(r.addEventListener(`contextmenu`,p6,e),r.addEventListener(`pointerleave`,f6,e),r.addEventListener(`pointermove`,f6,e))}),window.addEventListener(`pointerup`,p6,e),window.addEventListener(`pointercancel`,p6,e)):l6.forEach((t,n)=>{let{body:r}=n;t>0&&(r.addEventListener(`pointerdown`,aye,e),r.addEventListener(`pointermove`,f6,e))}))}function b6(e,t){d6.forEach(n=>{let{setResizeHandlerState:r}=n;r(e,s6.includes(n),t)})}function oye(){let[e,t]=(0,_.useState)(0);return(0,_.useCallback)(()=>t(e=>e+1),[])}function x6(e,t){if(!e)throw console.error(t),Error(t)}function S6(e,t,n=z3){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function C6(e,t,n=z3){return S6(e,t,n)===0}function w6(e,t,n){return S6(e,t,n)===0}function sye(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],a=t[r];if(!w6(i,a,n))return!1}return!0}function T6({panelConstraints:e,panelIndex:t,size:n}){let r=e[t];x6(r!=null,`Panel constraints not found for index ${t}`);let{collapsedSize:i=0,collapsible:a,maxSize:o=100,minSize:s=0}=r;if(S6(n,s)<0)if(a){let e=(i+s)/2;n=S6(n,e)<0?i:s}else n=s;return n=Math.min(o,n),n=parseFloat(n.toFixed(z3)),n}function E6({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:a}){if(w6(e,0))return t;let o=[...t],[s,c]=r;x6(s!=null,`Invalid first pivot index`),x6(c!=null,`Invalid second pivot index`);let l=0;if(a===`keyboard`){{let r=e<0?c:s,i=n[r];x6(i,`Panel constraints not found for index ${r}`);let{collapsedSize:a=0,collapsible:o,minSize:l=0}=i;if(o){let n=t[r];if(x6(n!=null,`Previous layout not found for panel index ${r}`),w6(n,a)){let t=l-n;S6(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}{let r=e<0?s:c,i=n[r];x6(i,`No panel constraints found for index ${r}`);let{collapsedSize:a=0,collapsible:o,minSize:l=0}=i;if(o){let n=t[r];if(x6(n!=null,`Previous layout not found for panel index ${r}`),w6(n,l)){let t=n-a;S6(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}}{let r=e<0?1:-1,i=e<0?c:s,a=0;for(;;){let e=t[i];x6(e!=null,`Previous layout not found for panel index ${i}`);let o=T6({panelConstraints:n,panelIndex:i,size:100})-e;if(a+=o,i+=r,i<0||i>=n.length)break}let o=Math.min(Math.abs(e),Math.abs(a));e=e<0?0-o:o}{let r=e<0?s:c;for(;r>=0&&r<n.length;){let i=Math.abs(e)-Math.abs(l),a=t[r];x6(a!=null,`Previous layout not found for panel index ${r}`);let s=a-i,c=T6({panelConstraints:n,panelIndex:r,size:s});if(!w6(a,c)&&(l+=a-c,o[r]=c,l.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3),void 0,{numeric:!0})>=0))break;e<0?r--:r++}}if(sye(i,o))return i;{let r=e<0?c:s,i=t[r];x6(i!=null,`Previous layout not found for panel index ${r}`);let a=i+l,u=T6({panelConstraints:n,panelIndex:r,size:a});if(o[r]=u,!w6(u,a)){let t=a-u,r=e<0?c:s;for(;r>=0&&r<n.length;){let i=o[r];x6(i!=null,`Previous layout not found for panel index ${r}`);let a=i+t,s=T6({panelConstraints:n,panelIndex:r,size:a});if(w6(i,s)||(t-=s-i,o[r]=s),w6(t,0))break;e>0?r--:r++}}}return w6(o.reduce((e,t)=>t+e,0),100)?o:i}function cye({layout:e,panelsArray:t,pivotIndices:n}){let r=0,i=100,a=0,o=0,s=n[0];return x6(s!=null,`No pivot index found`),t.forEach((e,t)=>{let{constraints:n}=e,{maxSize:c=100,minSize:l=0}=n;t===s?(r=l,i=c):(a+=l,o+=c)}),{valueMax:Math.min(i,100-a),valueMin:Math.max(r,100-o),valueNow:e[s]}}function D6(e,t=document){return Array.from(t.querySelectorAll(`[${R3.resizeHandleId}][data-panel-group-id="${e}"]`))}function O6(e,t,n=document){return D6(e,n).findIndex(e=>e.getAttribute(R3.resizeHandleId)===t)??null}function k6(e,t,n){let r=O6(e,t,n);return r==null?[-1,-1]:[r,r+1]}function A6(e,t=document){return t instanceof HTMLElement&&t?.dataset?.panelGroupId==e?t:t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`)||null}function j6(e,t=document){return t.querySelector(`[${R3.resizeHandleId}="${e}"]`)||null}function lye(e,t,n,r=document){let i=j6(t,r),a=D6(e,r),o=i?a.indexOf(i):-1;return[n[o]?.id??null,n[o+1]?.id??null]}function uye({committedValuesRef:e,eagerValuesRef:t,groupId:n,layout:r,panelDataArray:i,panelGroupElement:a,setLayout:o}){(0,_.useRef)({didWarnAboutMissingResizeHandle:!1}),B3(()=>{if(!a)return;let e=D6(n,a);for(let t=0;t<i.length-1;t++){let{valueMax:n,valueMin:a,valueNow:o}=cye({layout:r,panelsArray:i,pivotIndices:[t,t+1]}),s=e[t];if(s!=null){let e=i[t];x6(e,`No panel data found for index "${t}"`),s.setAttribute(`aria-controls`,e.id),s.setAttribute(`aria-valuemax`,``+Math.round(n)),s.setAttribute(`aria-valuemin`,``+Math.round(a)),s.setAttribute(`aria-valuenow`,o==null?``:``+Math.round(o))}}return()=>{e.forEach((e,t)=>{e.removeAttribute(`aria-controls`),e.removeAttribute(`aria-valuemax`),e.removeAttribute(`aria-valuemin`),e.removeAttribute(`aria-valuenow`)})}},[n,r,i,a]),(0,_.useEffect)(()=>{if(!a)return;let e=t.current;x6(e,`Eager values not found`);let{panelDataArray:i}=e;x6(A6(n,a)!=null,`No group found for id "${n}"`);let s=D6(n,a);x6(s,`No resize handles found for group id "${n}"`);let c=s.map(e=>{let t=e.getAttribute(R3.resizeHandleId);x6(t,`Resize handle element has no handle id attribute`);let[s,c]=lye(n,t,i,a);if(s==null||c==null)return()=>{};let l=e=>{if(!e.defaultPrevented)switch(e.key){case`Enter`:{e.preventDefault();let c=i.findIndex(e=>e.id===s);if(c>=0){let e=i[c];x6(e,`No panel data found for index ${c}`);let s=r[c],{collapsedSize:l=0,collapsible:u,minSize:d=0}=e.constraints;if(s!=null&&u){let e=E6({delta:w6(s,l)?d-l:l-s,initialLayout:r,panelConstraints:i.map(e=>e.constraints),pivotIndices:k6(n,t,a),prevLayout:r,trigger:`keyboard`});r!==e&&o(e)}}break}}};return e.addEventListener(`keydown`,l),()=>{e.removeEventListener(`keydown`,l)}});return()=>{c.forEach(e=>e())}},[a,e,t,n,r,i,o])}function M6(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function N6(e,t){let n=e===`horizontal`,{x:r,y:i}=Q3(t);return n?r:i}function dye(e,t,n,r,i){let a=n===`horizontal`,o=j6(t,i);x6(o,`No resize handle element found for id "${t}"`);let s=o.getAttribute(R3.groupId);x6(s,`Resize handle element has no group id attribute`);let{initialCursorPosition:c}=r,l=N6(n,e),u=A6(s,i);x6(u,`No group element found for id "${s}"`);let d=u.getBoundingClientRect(),f=a?d.width:d.height;return(l-c)/f*100}function fye(e,t,n,r,i,a){if(Y3(e)){let t=n===`horizontal`,r=0;r=e.shiftKey?100:i??10;let a=0;switch(e.key){case`ArrowDown`:a=t?0:r;break;case`ArrowLeft`:a=t?-r:0;break;case`ArrowRight`:a=t?r:0;break;case`ArrowUp`:a=t?0:-r;break;case`End`:a=100;break;case`Home`:a=-100;break}return a}else return r==null?0:dye(e,t,n,r,a)}function pye({panelDataArray:e}){let t=Array(e.length),n=e.map(e=>e.constraints),r=0,i=100;for(let a=0;a<e.length;a++){let e=n[a];x6(e,`Panel constraints not found for index ${a}`);let{defaultSize:o}=e;o!=null&&(r++,t[a]=o,i-=o)}for(let a=0;a<e.length;a++){let o=n[a];x6(o,`Panel constraints not found for index ${a}`);let{defaultSize:s}=o;if(s!=null)continue;let c=e.length-r,l=i/c;r++,t[a]=l,i-=l}return t}function P6(e,t,n){t.forEach((t,r)=>{let i=e[r];x6(i,`Panel data not found for index ${r}`);let{callbacks:a,constraints:o,id:s}=i,{collapsedSize:c=0,collapsible:l}=o,u=n[s];if(u==null||t!==u){n[s]=t;let{onCollapse:e,onExpand:r,onResize:i}=a;i&&i(t,u),l&&(e||r)&&(r&&(u==null||C6(u,c))&&!C6(t,c)&&r(),e&&(u==null||!C6(u,c))&&C6(t,c)&&e())}})}function F6(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function mye({defaultSize:e,dragState:t,layout:n,panelData:r,panelIndex:i,precision:a=3}){let o=n[i],s;return s=o==null?e==null?`1`:e.toPrecision(a):r.length===1?`1`:o.toPrecision(a),{flexBasis:0,flexGrow:s,flexShrink:1,overflow:`hidden`,pointerEvents:t===null?void 0:`none`}}function hye(e,t=10){let n=null;return(...r)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}}function I6(e){try{if(typeof localStorage<`u`)e.getItem=e=>localStorage.getItem(e),e.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw Error(`localStorage not supported in this environment`)}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}function L6(e){return`react-resizable-panels:${e}`}function R6(e){return e.map(e=>{let{constraints:t,id:n,idIsFromProps:r,order:i}=e;return r?n:i?`${i}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(`,`)}function z6(e,t){try{let n=L6(e),r=t.getItem(n);if(r){let e=JSON.parse(r);if(typeof e==`object`&&e)return e}}catch{}return null}function gye(e,t,n){return(z6(e,n)??{})[R6(t)]??null}function _ye(e,t,n,r,i){let a=L6(e),o=R6(t),s=z6(e,i)??{};s[o]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{i.setItem(a,JSON.stringify(s))}catch(e){console.error(e)}}function B6({layout:e,panelConstraints:t}){let n=[...e],r=n.reduce((e,t)=>e+t,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(e=>`${e}%`).join(`, `)}`);if(!w6(r,100)&&n.length>0)for(let e=0;e<t.length;e++){let t=n[e];x6(t!=null,`No layout data found for index ${e}`),n[e]=100/r*t}let i=0;for(let e=0;e<t.length;e++){let r=n[e];x6(r!=null,`No layout data found for index ${e}`);let a=T6({panelConstraints:t,panelIndex:e,size:r});r!=a&&(i+=r-a,n[e]=a)}if(!w6(i,0))for(let e=0;e<t.length;e++){let r=n[e];x6(r!=null,`No layout data found for index ${e}`);let a=r+i,o=T6({panelConstraints:t,panelIndex:e,size:a});if(r!==o&&(i-=o-r,n[e]=o,w6(i,0)))break}return n}var vye=100,V6={getItem:e=>(I6(V6),V6.getItem(e)),setItem:(e,t)=>{I6(V6),V6.setItem(e,t)}},H6={};function U6({autoSaveId:e=null,children:t,className:n=``,direction:r,forwardedRef:i,id:a=null,onLayout:o=null,keyboardResizeBy:s=null,storage:c=V6,style:l,tagName:u=`div`,...d}){let f=H3(a),p=(0,_.useRef)(null),[m,h]=(0,_.useState)(null),[g,v]=(0,_.useState)([]),y=oye(),b=(0,_.useRef)({}),x=(0,_.useRef)(new Map),S=(0,_.useRef)(0),C=(0,_.useRef)({autoSaveId:e,direction:r,dragState:m,id:f,keyboardResizeBy:s,onLayout:o,storage:c}),w=(0,_.useRef)({layout:g,panelDataArray:[],panelDataArrayChanged:!1});(0,_.useRef)({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),(0,_.useImperativeHandle)(i,()=>({getId:()=>C.current.id,getLayout:()=>{let{layout:e}=w.current;return e},setLayout:e=>{let{onLayout:t}=C.current,{layout:n,panelDataArray:r}=w.current,i=B6({layout:e,panelConstraints:r.map(e=>e.constraints)});M6(n,i)||(v(i),w.current.layout=i,t&&t(i),P6(r,i,b.current))}}),[]),B3(()=>{C.current.autoSaveId=e,C.current.direction=r,C.current.dragState=m,C.current.id=f,C.current.onLayout=o,C.current.storage=c}),uye({committedValuesRef:C,eagerValuesRef:w,groupId:f,layout:g,panelDataArray:w.current.panelDataArray,setLayout:v,panelGroupElement:p.current}),(0,_.useEffect)(()=>{let{panelDataArray:t}=w.current;if(e){if(g.length===0||g.length!==t.length)return;let n=H6[e];n??(n=hye(_ye,vye),H6[e]=n);let r=[...t],i=new Map(x.current);n(e,r,i,g,c)}},[e,g,c]),(0,_.useEffect)(()=>{});let T=(0,_.useCallback)(e=>{let{onLayout:t}=C.current,{layout:n,panelDataArray:r}=w.current;if(e.constraints.collapsible){let i=r.map(e=>e.constraints),{collapsedSize:a=0,panelSize:o,pivotIndices:s}=K6(r,e,n);if(x6(o!=null,`Panel size not found for panel "${e.id}"`),!C6(o,a)){x.current.set(e.id,o);let c=E6({delta:G6(r,e)===r.length-1?o-a:a-o,initialLayout:n,panelConstraints:i,pivotIndices:s,prevLayout:n,trigger:`imperative-api`});F6(n,c)||(v(c),w.current.layout=c,t&&t(c),P6(r,c,b.current))}}},[]),E=(0,_.useCallback)((e,t)=>{let{onLayout:n}=C.current,{layout:r,panelDataArray:i}=w.current;if(e.constraints.collapsible){let a=i.map(e=>e.constraints),{collapsedSize:o=0,panelSize:s=0,minSize:c=0,pivotIndices:l}=K6(i,e,r),u=t??c;if(C6(s,o)){let t=x.current.get(e.id),o=t!=null&&t>=u?t:u,c=E6({delta:G6(i,e)===i.length-1?s-o:o-s,initialLayout:r,panelConstraints:a,pivotIndices:l,prevLayout:r,trigger:`imperative-api`});F6(r,c)||(v(c),w.current.layout=c,n&&n(c),P6(i,c,b.current))}}},[]),D=(0,_.useCallback)(e=>{let{layout:t,panelDataArray:n}=w.current,{panelSize:r}=K6(n,e,t);return x6(r!=null,`Panel size not found for panel "${e.id}"`),r},[]),O=(0,_.useCallback)((e,t)=>{let{panelDataArray:n}=w.current;return mye({defaultSize:t,dragState:m,layout:g,panelData:n,panelIndex:G6(n,e)})},[m,g]),k=(0,_.useCallback)(e=>{let{layout:t,panelDataArray:n}=w.current,{collapsedSize:r=0,collapsible:i,panelSize:a}=K6(n,e,t);return x6(a!=null,`Panel size not found for panel "${e.id}"`),i===!0&&C6(a,r)},[]),A=(0,_.useCallback)(e=>{let{layout:t,panelDataArray:n}=w.current,{collapsedSize:r=0,collapsible:i,panelSize:a}=K6(n,e,t);return x6(a!=null,`Panel size not found for panel "${e.id}"`),!i||S6(a,r)>0},[]),j=(0,_.useCallback)(e=>{let{panelDataArray:t}=w.current;t.push(e),t.sort((e,t)=>{let n=e.order,r=t.order;return n==null&&r==null?0:n==null?-1:r==null?1:n-r}),w.current.panelDataArrayChanged=!0,y()},[y]);B3(()=>{if(w.current.panelDataArrayChanged){w.current.panelDataArrayChanged=!1;let{autoSaveId:e,onLayout:t,storage:n}=C.current,{layout:r,panelDataArray:i}=w.current,a=null;if(e){let t=gye(e,i,n);t&&(x.current=new Map(Object.entries(t.expandToSizes)),a=t.layout)}a??=pye({panelDataArray:i});let o=B6({layout:a,panelConstraints:i.map(e=>e.constraints)});M6(r,o)||(v(o),w.current.layout=o,t&&t(o),P6(i,o,b.current))}}),B3(()=>{let e=w.current;return()=>{e.layout=[]}},[]);let M=(0,_.useCallback)(e=>{let t=!1,n=p.current;return n&&window.getComputedStyle(n,null).getPropertyValue(`direction`)===`rtl`&&(t=!0),function(n){n.preventDefault();let r=p.current;if(!r)return()=>null;let{direction:i,dragState:a,id:o,keyboardResizeBy:s,onLayout:c}=C.current,{layout:l,panelDataArray:u}=w.current,{initialLayout:d}=a??{},f=k6(o,e,r),m=fye(n,e,i,a,s,r),h=i===`horizontal`;h&&t&&(m=-m);let g=u.map(e=>e.constraints),_=E6({delta:m,initialLayout:d??l,panelConstraints:g,pivotIndices:f,prevLayout:l,trigger:Y3(n)?`keyboard`:`mouse-or-touch`}),y=!F6(l,_);(X3(n)||Z3(n))&&S.current!=m&&(S.current=m,!y&&m!==0?h?g6(e,m<0?r6:i6):g6(e,m<0?a6:o6):g6(e,0)),y&&(v(_),w.current.layout=_,c&&c(_),P6(u,_,b.current))}},[]),N=(0,_.useCallback)((e,t)=>{let{onLayout:n}=C.current,{layout:r,panelDataArray:i}=w.current,a=i.map(e=>e.constraints),{panelSize:o,pivotIndices:s}=K6(i,e,r);x6(o!=null,`Panel size not found for panel "${e.id}"`);let c=E6({delta:G6(i,e)===i.length-1?o-t:t-o,initialLayout:r,panelConstraints:a,pivotIndices:s,prevLayout:r,trigger:`imperative-api`});F6(r,c)||(v(c),w.current.layout=c,n&&n(c),P6(i,c,b.current))},[]),P=(0,_.useCallback)((e,t)=>{let{layout:n,panelDataArray:r}=w.current,{collapsedSize:i=0,collapsible:a}=t,{collapsedSize:o=0,collapsible:s,maxSize:c=100,minSize:l=0}=e.constraints,{panelSize:u}=K6(r,e,n);u!=null&&(a&&s&&C6(u,i)?C6(i,o)||N(e,o):u<l?N(e,l):u>c&&N(e,c))},[N]),F=(0,_.useCallback)((e,t)=>{let{direction:n}=C.current,{layout:r}=w.current;if(!p.current)return;let i=j6(e,p.current);x6(i,`Drag handle element not found for id "${e}"`);let a=N6(n,t);h({dragHandleId:e,dragHandleRect:i.getBoundingClientRect(),initialCursorPosition:a,initialLayout:r})},[]),I=(0,_.useCallback)(()=>{h(null)},[]),L=(0,_.useCallback)(e=>{let{panelDataArray:t}=w.current,n=G6(t,e);n>=0&&(t.splice(n,1),delete b.current[e.id],w.current.panelDataArrayChanged=!0,y())},[y]),R=(0,_.useMemo)(()=>({collapsePanel:T,direction:r,dragState:m,expandPanel:E,getPanelSize:D,getPanelStyle:O,groupId:f,isPanelCollapsed:k,isPanelExpanded:A,reevaluatePanelConstraints:P,registerPanel:j,registerResizeHandle:M,resizePanel:N,startDragging:F,stopDragging:I,unregisterPanel:L,panelGroupElement:p.current}),[T,m,r,E,D,O,f,k,A,P,j,M,N,F,I,L]),ee={display:`flex`,flexDirection:r===`horizontal`?`row`:`column`,height:`100%`,overflow:`hidden`,width:`100%`};return(0,_.createElement)(L3.Provider,{value:R},(0,_.createElement)(u,{...d,children:t,className:n,id:a,ref:p,style:{...ee,...l},[R3.group]:``,[R3.groupDirection]:r,[R3.groupId]:f}))}var W6=(0,_.forwardRef)((e,t)=>(0,_.createElement)(U6,{...e,forwardedRef:t}));U6.displayName=`PanelGroup`,W6.displayName=`forwardRef(PanelGroup)`;function G6(e,t){return e.findIndex(e=>e===t||e.id===t.id)}function K6(e,t,n){let r=G6(e,t),i=r===e.length-1?[r-1,r]:[r,r+1],a=n[r];return{...t.constraints,panelSize:a,pivotIndices:i}}function yye({disabled:e,handleId:t,resizeHandler:n,panelGroupElement:r}){(0,_.useEffect)(()=>{if(e||n==null||r==null)return;let i=j6(t,r);if(i==null)return;let a=e=>{if(!e.defaultPrevented)switch(e.key){case`ArrowDown`:case`ArrowLeft`:case`ArrowRight`:case`ArrowUp`:case`End`:case`Home`:e.preventDefault(),n(e);break;case`F6`:{e.preventDefault();let n=i.getAttribute(R3.groupId);x6(n,`No group element found for id "${n}"`);let a=D6(n,r),o=O6(n,t,r);x6(o!==null,`No resize element found for id "${t}"`),a[e.shiftKey?o>0?o-1:a.length-1:o+1<a.length?o+1:0].focus();break}}};return i.addEventListener(`keydown`,a),()=>{i.removeEventListener(`keydown`,a)}},[r,e,t,n])}function q6({children:e=null,className:t=``,disabled:n=!1,hitAreaMargins:r,id:i,onBlur:a,onClick:o,onDragging:s,onFocus:c,onPointerDown:l,onPointerUp:u,style:d={},tabIndex:f=0,tagName:p=`div`,...m}){let h=(0,_.useRef)(null),g=(0,_.useRef)({onClick:o,onDragging:s,onPointerDown:l,onPointerUp:u});(0,_.useEffect)(()=>{g.current.onClick=o,g.current.onDragging=s,g.current.onPointerDown=l,g.current.onPointerUp=u});let v=(0,_.useContext)(L3);if(v===null)throw Error(`PanelResizeHandle components must be rendered within a PanelGroup container`);let{direction:y,groupId:b,registerResizeHandle:x,startDragging:S,stopDragging:C,panelGroupElement:w}=v,T=H3(i),[E,D]=(0,_.useState)(`inactive`),[O,k]=(0,_.useState)(!1),[A,j]=(0,_.useState)(null),M=(0,_.useRef)({state:E});B3(()=>{M.current.state=E}),(0,_.useEffect)(()=>{if(n)j(null);else{let e=x(T);j(()=>e)}},[n,T,x]);let N=r?.coarse??15,P=r?.fine??5;(0,_.useEffect)(()=>{if(n||A==null)return;let e=h.current;x6(e,`Element ref not attached`);let t=!1;return iye(T,e,y,{coarse:N,fine:P},(e,n,r)=>{if(!n){D(`inactive`);return}switch(e){case`down`:{D(`drag`),t=!1,x6(r,`Expected event to be defined for "down" action`),S(T,r);let{onDragging:e,onPointerDown:n}=g.current;e?.(!0),n?.();break}case`move`:{let{state:e}=M.current;t=!0,e!==`drag`&&D(`hover`),x6(r,`Expected event to be defined for "move" action`),A(r);break}case`up`:{D(`hover`),C();let{onClick:e,onDragging:n,onPointerUp:r}=g.current;n?.(!1),r?.(),t||e?.();break}}})},[N,y,n,P,x,T,A,S,C]),yye({disabled:n,handleId:T,resizeHandler:A,panelGroupElement:w});let F={touchAction:`none`,userSelect:`none`};return(0,_.createElement)(p,{...m,children:e,className:t,id:i,onBlur:()=>{k(!1),a?.()},onFocus:()=>{k(!0),c?.()},ref:h,role:`separator`,style:{...F,...d},tabIndex:f,[R3.groupDirection]:y,[R3.groupId]:b,[R3.resizeHandle]:``,[R3.resizeHandleActive]:E===`drag`?`pointer`:O?`keyboard`:void 0,[R3.resizeHandleEnabled]:!n,[R3.resizeHandleId]:T,[R3.resizeHandleState]:E})}q6.displayName=`PanelResizeHandle`;var bye=({className:e,...t})=>(0,I.jsx)(W6,{className:H(`flex h-full w-full data-[panel-group-direction=vertical]:flex-col`,e),...t}),xye=W3,Sye=({withHandle:e,className:t,...n})=>(0,I.jsx)(q6,{className:H(`relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 [&[data-panel-group-direction=vertical]>div]:rotate-90`,t),...n,children:e&&(0,I.jsx)(`div`,{className:`z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border`,children:(0,I.jsx)(Ln,{className:`h-2.5 w-2.5`})})}),J6=_.forwardRef(({...e},t)=>(0,I.jsx)(`nav`,{ref:t,"aria-label":`breadcrumb`,...e}));J6.displayName=`Breadcrumb`;var Y6=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(`ol`,{ref:n,className:H(`flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5`,e),...t}));Y6.displayName=`BreadcrumbList`;var X6=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(`li`,{ref:n,className:H(`inline-flex items-center gap-1.5`,e),...t}));X6.displayName=`BreadcrumbItem`;var Z6=_.forwardRef(({asChild:e,className:t,...n},r)=>(0,I.jsx)(e?tp:`a`,{ref:r,className:H(`transition-colors hover:text-foreground`,t),...n}));Z6.displayName=`BreadcrumbLink`;var Q6=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(`span`,{ref:n,role:`link`,"aria-disabled":`true`,"aria-current":`page`,className:H(`font-normal text-foreground`,e),...t}));Q6.displayName=`BreadcrumbPage`;var $6=({children:e,className:t,...n})=>(0,I.jsx)(`li`,{role:`presentation`,"aria-hidden":`true`,className:H(`[&>svg]:size-3.5`,t),...n,children:e??(0,I.jsx)(sn,{})});$6.displayName=`BreadcrumbSeparator`;var Cye=({className:e,...t})=>(0,I.jsxs)(`span`,{role:`presentation`,"aria-hidden":`true`,className:H(`flex h-9 w-9 items-center justify-center`,e),...t,children:[(0,I.jsx)(En,{className:`h-4 w-4`}),(0,I.jsx)(`span`,{className:`sr-only`,children:`More`})]});Cye.displayName=`BreadcrumbElipssis`;var e8=({className:e,...t})=>(0,I.jsx)(`nav`,{"aria-label":`pagination`,className:H(`mx-auto flex w-full justify-center`,e),...t});e8.displayName=`Pagination`;var t8=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(`ul`,{ref:n,className:H(`flex flex-row items-center gap-1`,e),...t}));t8.displayName=`PaginationContent`;var n8=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(`li`,{ref:n,className:H(``,e),...t}));n8.displayName=`PaginationItem`;var r8=({className:e,isActive:t,size:n=`icon`,...r})=>(0,I.jsx)(`a`,{"aria-current":t?`page`:void 0,className:H(lp({variant:t?`outline`:`ghost`,size:n}),e),...r});r8.displayName=`PaginationLink`;var i8=({className:e,...t})=>(0,I.jsxs)(r8,{"aria-label":`Go to previous page`,size:`default`,className:H(`gap-1 pl-2.5`,e),...t,children:[(0,I.jsx)(on,{className:`h-4 w-4`}),(0,I.jsx)(`span`,{children:`Previous`})]});i8.displayName=`PaginationPrevious`;var a8=({className:e,...t})=>(0,I.jsxs)(r8,{"aria-label":`Go to next page`,size:`default`,className:H(`gap-1 pr-2.5`,e),...t,children:[(0,I.jsx)(`span`,{children:`Next`}),(0,I.jsx)(sn,{className:`h-4 w-4`})]});a8.displayName=`PaginationNext`;var wye=({className:e,...t})=>(0,I.jsxs)(`span`,{"aria-hidden":!0,className:H(`flex h-9 w-9 items-center justify-center`,e),...t,children:[(0,I.jsx)(En,{className:`h-4 w-4`}),(0,I.jsx)(`span`,{className:`sr-only`,children:`More pages`})]});wye.displayName=`PaginationEllipsis`;var o8=`Toggle`,s8=_.forwardRef((e,t)=>{let{pressed:n,defaultPressed:r,onPressedChange:i,...a}=e,[o,s]=Fe({prop:n,onChange:i,defaultProp:r??!1,caller:o8});return(0,I.jsx)(z.button,{type:`button`,"aria-pressed":o,"data-state":o?`on`:`off`,"data-disabled":e.disabled?``:void 0,...a,ref:t,onClick:j(e.onClick,()=>{e.disabled||s(!o)})})});s8.displayName=o8;var c8=s8,l8=Vt(`inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground`,{variants:{variant:{default:`bg-transparent`,outline:`border border-input bg-transparent hover:bg-accent hover:text-accent-foreground`},size:{default:`h-10 px-3`,sm:`h-9 px-2.5`,lg:`h-11 px-5`}},defaultVariants:{variant:`default`,size:`default`}}),u8=_.forwardRef(({className:e,variant:t,size:n,...r},i)=>(0,I.jsx)(c8,{ref:i,className:H(l8({variant:t,size:n,className:e})),...r}));u8.displayName=c8.displayName;var d8=`ToggleGroup`,[f8,Tye]=R(d8,[PB]),p8=PB(),m8=_.forwardRef((e,t)=>{let{type:n,...r}=e;if(n===`single`)return(0,I.jsx)(Eye,{...r,ref:t});if(n===`multiple`)return(0,I.jsx)(Dye,{...r,ref:t});throw Error(`Missing prop \`type\` expected on \`${d8}\``)});m8.displayName=d8;var[h8,g8]=f8(d8),Eye=_.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,s]=Fe({prop:n,defaultProp:r??``,onChange:i,caller:d8});return(0,I.jsx)(h8,{scope:e.__scopeToggleGroup,type:`single`,value:_.useMemo(()=>o?[o]:[],[o]),onItemActivate:s,onItemDeactivate:_.useCallback(()=>s(``),[s]),children:(0,I.jsx)(_8,{...a,ref:t})})}),Dye=_.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,s]=Fe({prop:n,defaultProp:r??[],onChange:i,caller:d8}),c=_.useCallback(e=>s((t=[])=>[...t,e]),[s]),l=_.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return(0,I.jsx)(h8,{scope:e.__scopeToggleGroup,type:`multiple`,value:o,onItemActivate:c,onItemDeactivate:l,children:(0,I.jsx)(_8,{...a,ref:t})})});m8.displayName=d8;var[Oye,kye]=f8(d8),_8=_.forwardRef((e,t)=>{let{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:i=!0,orientation:a,dir:o,loop:s=!0,...c}=e,l=p8(n),u=EB(o),d={role:`group`,dir:u,...c};return(0,I.jsx)(Oye,{scope:n,rovingFocus:i,disabled:r,children:i?(0,I.jsx)(KB,{asChild:!0,...l,orientation:a,dir:u,loop:s,children:(0,I.jsx)(z.div,{...d,ref:t})}):(0,I.jsx)(z.div,{...d,ref:t})})}),v8=`ToggleGroupItem`,y8=_.forwardRef((e,t)=>{let n=g8(v8,e.__scopeToggleGroup),r=kye(v8,e.__scopeToggleGroup),i=p8(e.__scopeToggleGroup),a=n.value.includes(e.value),o=r.disabled||e.disabled,s={...e,pressed:a,disabled:o},c=_.useRef(null);return r.rovingFocus?(0,I.jsx)(qB,{asChild:!0,...i,focusable:!o,active:a,ref:c,children:(0,I.jsx)(b8,{...s,ref:t})}):(0,I.jsx)(b8,{...s,ref:t})});y8.displayName=v8;var b8=_.forwardRef((e,t)=>{let{__scopeToggleGroup:n,value:r,...i}=e,a=g8(v8,n),o={role:`radio`,"aria-checked":e.pressed,"aria-pressed":void 0};return(0,I.jsx)(s8,{...a.type===`single`?o:void 0,...i,ref:t,onPressedChange:e=>{e?a.onItemActivate(r):a.onItemDeactivate(r)}})}),x8=m8,S8=y8,C8=_.createContext({size:`default`,variant:`default`}),w8=_.forwardRef(({className:e,variant:t,size:n,children:r,...i},a)=>(0,I.jsx)(x8,{ref:a,className:H(`flex items-center justify-center gap-1`,e),...i,children:(0,I.jsx)(C8.Provider,{value:{variant:t,size:n},children:r})}));w8.displayName=x8.displayName;var T8=_.forwardRef(({className:e,children:t,variant:n,size:r,...i},a)=>{let o=_.useContext(C8);return(0,I.jsx)(S8,{ref:a,className:H(l8({variant:o.variant||n,size:o.size||r}),e),...i,children:t})});T8.displayName=S8.displayName;var E8=function(){return E8=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},E8.apply(this,arguments)};function Aye(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function D8(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}function O8(e){return e.mode===`multiple`}function k8(e){return e.mode===`range`}function A8(e){return e.mode===`single`}var jye={root:`rdp`,multiple_months:`rdp-multiple_months`,with_weeknumber:`rdp-with_weeknumber`,vhidden:`rdp-vhidden`,button_reset:`rdp-button_reset`,button:`rdp-button`,caption:`rdp-caption`,caption_start:`rdp-caption_start`,caption_end:`rdp-caption_end`,caption_between:`rdp-caption_between`,caption_label:`rdp-caption_label`,caption_dropdowns:`rdp-caption_dropdowns`,dropdown:`rdp-dropdown`,dropdown_month:`rdp-dropdown_month`,dropdown_year:`rdp-dropdown_year`,dropdown_icon:`rdp-dropdown_icon`,months:`rdp-months`,month:`rdp-month`,table:`rdp-table`,tbody:`rdp-tbody`,tfoot:`rdp-tfoot`,head:`rdp-head`,head_row:`rdp-head_row`,head_cell:`rdp-head_cell`,nav:`rdp-nav`,nav_button:`rdp-nav_button`,nav_button_previous:`rdp-nav_button_previous`,nav_button_next:`rdp-nav_button_next`,nav_icon:`rdp-nav_icon`,row:`rdp-row`,weeknumber:`rdp-weeknumber`,cell:`rdp-cell`,day:`rdp-day`,day_today:`rdp-day_today`,day_outside:`rdp-day_outside`,day_selected:`rdp-day_selected`,day_disabled:`rdp-day_disabled`,day_hidden:`rdp-day_hidden`,day_range_start:`rdp-day_range_start`,day_range_end:`rdp-day_range_end`,day_range_middle:`rdp-day_range_middle`};function Mye(e,t){return XW(e,`LLLL y`,t)}function Nye(e,t){return XW(e,`d`,t)}function Pye(e,t){return XW(e,`LLLL`,t)}function Fye(e){return`${e}`}function Iye(e,t){return XW(e,`cccccc`,t)}function Lye(e,t){return XW(e,`yyyy`,t)}var Rye=Object.freeze({__proto__:null,formatCaption:Mye,formatDay:Nye,formatMonthCaption:Pye,formatWeekNumber:Fye,formatWeekdayName:Iye,formatYearCaption:Lye}),zye=Object.freeze({__proto__:null,labelDay:function(e,t,n){return XW(e,`do MMMM (EEEE)`,n)},labelMonthDropdown:function(){return`Month: `},labelNext:function(){return`Go to next month`},labelPrevious:function(){return`Go to previous month`},labelWeekNumber:function(e){return`Week n. ${e}`},labelWeekday:function(e,t){return XW(e,`cccc`,t)},labelYearDropdown:function(){return`Year: `}});function Bye(){return{captionLayout:`buttons`,classNames:jye,formatters:Rye,labels:zye,locale:SW,modifiersClassNames:{},modifiers:{},numberOfMonths:1,styles:{},today:new Date,mode:`default`}}function Vye(e){var t=e.fromYear,n=e.toYear,r=e.fromMonth,i=e.toMonth,a=e.fromDate,o=e.toDate;return r?a=oW(r):t&&(a=new Date(t,0,1)),i?o=aW(i):n&&(o=new Date(n,11,31)),{fromDate:a?KU(a):void 0,toDate:o?KU(o):void 0}}var j8=(0,_.createContext)(void 0);function Hye(e){var t=e.initialProps,n=Bye(),r=Vye(t),i=r.fromDate,a=r.toDate,o=t.captionLayout??n.captionLayout;o!==`buttons`&&(!i||!a)&&(o=`buttons`);var s;(A8(t)||O8(t)||k8(t))&&(s=t.onSelect);var c=E8(E8(E8({},n),t),{captionLayout:o,classNames:E8(E8({},n.classNames),t.classNames),components:E8({},t.components),formatters:E8(E8({},n.formatters),t.formatters),fromDate:i,labels:E8(E8({},n.labels),t.labels),mode:t.mode||n.mode,modifiers:E8(E8({},n.modifiers),t.modifiers),modifiersClassNames:E8(E8({},n.modifiersClassNames),t.modifiersClassNames),onSelect:s,styles:E8(E8({},n.styles),t.styles),toDate:a});return(0,I.jsx)(j8.Provider,{value:c,children:e.children})}function M8(){var e=(0,_.useContext)(j8);if(!e)throw Error(`useDayPicker must be used within a DayPickerProvider.`);return e}function N8(e){var t=M8(),n=t.locale,r=t.classNames,i=t.styles,a=t.formatters.formatCaption;return(0,I.jsx)(`div`,{className:r.caption_label,style:i.caption_label,"aria-live":`polite`,role:`presentation`,id:e.id,children:a(e.displayMonth,{locale:n})})}function Uye(e){return(0,I.jsx)(`svg`,E8({width:`8px`,height:`8px`,viewBox:`0 0 120 120`,"data-testid":`iconDropdown`},e,{children:(0,I.jsx)(`path`,{d:`M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z`,fill:`currentColor`,fillRule:`nonzero`})}))}function P8(e){var t=e.onChange,n=e.value,r=e.children,i=e.caption,a=e.className,o=e.style,s=M8(),c=s.components?.IconDropdown??Uye;return(0,I.jsxs)(`div`,{className:a,style:o,children:[(0,I.jsx)(`span`,{className:s.classNames.vhidden,children:e[`aria-label`]}),(0,I.jsx)(`select`,{name:e.name,"aria-label":e[`aria-label`],className:s.classNames.dropdown,style:s.styles.dropdown,value:n,onChange:t,children:r}),(0,I.jsxs)(`div`,{className:s.classNames.caption_label,style:s.styles.caption_label,"aria-hidden":`true`,children:[i,(0,I.jsx)(c,{className:s.classNames.dropdown_icon,style:s.styles.dropdown_icon})]})]})}function Wye(e){var t=M8(),n=t.fromDate,r=t.toDate,i=t.styles,a=t.locale,o=t.formatters.formatMonthCaption,s=t.classNames,c=t.components,l=t.labels.labelMonthDropdown;if(!n||!r)return(0,I.jsx)(I.Fragment,{});var u=[];if(aG(n,r))for(var d=oW(n),f=n.getMonth();f<=r.getMonth();f++)u.push(sG(d,f));else for(var d=oW(new Date),f=0;f<=11;f++)u.push(sG(d,f));var p=function(t){var n=Number(t.target.value),r=sG(oW(e.displayMonth),n);e.onChange(r)};return(0,I.jsx)(c?.Dropdown??P8,{name:`months`,"aria-label":l(),className:s.dropdown_month,style:i.dropdown_month,onChange:p,value:e.displayMonth.getMonth(),caption:o(e.displayMonth,{locale:a}),children:u.map(function(e){return(0,I.jsx)(`option`,{value:e.getMonth(),children:o(e,{locale:a})},e.getMonth())})})}function Gye(e){var t=e.displayMonth,n=M8(),r=n.fromDate,i=n.toDate,a=n.locale,o=n.styles,s=n.classNames,c=n.components,l=n.formatters.formatYearCaption,u=n.labels.labelYearDropdown,d=[];if(!r||!i)return(0,I.jsx)(I.Fragment,{});for(var f=r.getFullYear(),p=i.getFullYear(),m=f;m<=p;m++)d.push(cG(sW(new Date),m));var h=function(n){var r=cG(oW(t),Number(n.target.value));e.onChange(r)};return(0,I.jsx)(c?.Dropdown??P8,{name:`years`,"aria-label":u(),className:s.dropdown_year,style:o.dropdown_year,onChange:h,value:t.getFullYear(),caption:l(t,{locale:a}),children:d.map(function(e){return(0,I.jsx)(`option`,{value:e.getFullYear(),children:l(e,{locale:a})},e.getFullYear())})})}function Kye(e,t){var n=(0,_.useState)(e),r=n[0],i=n[1];return[t===void 0?r:t,i]}function qye(e){var t=e.month,n=e.defaultMonth,r=e.today,i=t||n||r||new Date,a=e.toDate,o=e.fromDate,s=e.numberOfMonths,c=s===void 0?1:s;return a&&rW(a,i)<0&&(i=IU(a,-1*(c-1))),o&&rW(i,o)<0&&(i=o),oW(i)}function Jye(){var e=M8(),t=Kye(qye(e),e.month),n=t[0],r=t[1];return[n,function(t){var n;if(!e.disableNavigation){var i=oW(t);r(i),(n=e.onMonthChange)==null||n.call(e,i)}}]}function Yye(e,t){for(var n=t.reverseMonths,r=t.numberOfMonths,i=oW(e),a=rW(oW(IU(i,r)),i),o=[],s=0;s<a;s++){var c=IU(i,s);o.push(c)}return n&&(o=o.reverse()),o}function Xye(e,t){if(!t.disableNavigation){var n=t.toDate,r=t.pagedNavigation,i=t.numberOfMonths,a=i===void 0?1:i,o=r?a:1,s=oW(e);if(!n||!(rW(n,e)<a))return IU(s,o)}}function Zye(e,t){if(!t.disableNavigation){var n=t.fromDate,r=t.pagedNavigation,i=t.numberOfMonths,a=r?i===void 0?1:i:1,o=oW(e);if(!n||!(rW(o,n)<=0))return IU(o,-a)}}var F8=(0,_.createContext)(void 0);function Qye(e){var t=M8(),n=Jye(),r=n[0],i=n[1],a=Yye(r,t),o=Xye(r,t),s=Zye(r,t),c=function(e){return a.some(function(t){return iG(e,t)})},l={currentMonth:r,displayMonths:a,goToMonth:i,goToDate:function(e,n){c(e)||(n&&rG(e,n)?i(IU(e,1+t.numberOfMonths*-1)):i(e))},previousMonth:s,nextMonth:o,isDateDisplayed:c};return(0,I.jsx)(F8.Provider,{value:l,children:e.children})}function I8(){var e=(0,_.useContext)(F8);if(!e)throw Error(`useNavigation must be used within a NavigationProvider`);return e}function L8(e){var t=M8(),n=t.classNames,r=t.styles,i=t.components,a=I8().goToMonth,o=function(t){a(IU(t,e.displayIndex?-e.displayIndex:0))},s=(0,I.jsx)(i?.CaptionLabel??N8,{id:e.id,displayMonth:e.displayMonth});return(0,I.jsxs)(`div`,{className:n.caption_dropdowns,style:r.caption_dropdowns,children:[(0,I.jsx)(`div`,{className:n.vhidden,children:s}),(0,I.jsx)(Wye,{onChange:o,displayMonth:e.displayMonth}),(0,I.jsx)(Gye,{onChange:o,displayMonth:e.displayMonth})]})}function $ye(e){return(0,I.jsx)(`svg`,E8({width:`16px`,height:`16px`,viewBox:`0 0 120 120`},e,{children:(0,I.jsx)(`path`,{d:`M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z`,fill:`currentColor`,fillRule:`nonzero`})}))}function ebe(e){return(0,I.jsx)(`svg`,E8({width:`16px`,height:`16px`,viewBox:`0 0 120 120`},e,{children:(0,I.jsx)(`path`,{d:`M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z`,fill:`currentColor`})}))}var R8=(0,_.forwardRef)(function(e,t){var n=M8(),r=n.classNames,i=n.styles,a=[r.button_reset,r.button];e.className&&a.push(e.className);var o=a.join(` `),s=E8(E8({},i.button_reset),i.button);return e.style&&Object.assign(s,e.style),(0,I.jsx)(`button`,E8({},e,{ref:t,type:`button`,className:o,style:s}))});function tbe(e){var t=M8(),n=t.dir,r=t.locale,i=t.classNames,a=t.styles,o=t.labels,s=o.labelPrevious,c=o.labelNext,l=t.components;if(!e.nextMonth&&!e.previousMonth)return(0,I.jsx)(I.Fragment,{});var u=s(e.previousMonth,{locale:r}),d=[i.nav_button,i.nav_button_previous].join(` `),f=c(e.nextMonth,{locale:r}),p=[i.nav_button,i.nav_button_next].join(` `),m=l?.IconRight??ebe,h=l?.IconLeft??$ye;return(0,I.jsxs)(`div`,{className:i.nav,style:a.nav,children:[!e.hidePrevious&&(0,I.jsx)(R8,{name:`previous-month`,"aria-label":u,className:d,style:a.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:n===`rtl`?(0,I.jsx)(m,{className:i.nav_icon,style:a.nav_icon}):(0,I.jsx)(h,{className:i.nav_icon,style:a.nav_icon})}),!e.hideNext&&(0,I.jsx)(R8,{name:`next-month`,"aria-label":f,className:p,style:a.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:n===`rtl`?(0,I.jsx)(h,{className:i.nav_icon,style:a.nav_icon}):(0,I.jsx)(m,{className:i.nav_icon,style:a.nav_icon})})]})}function z8(e){var t=M8().numberOfMonths,n=I8(),r=n.previousMonth,i=n.nextMonth,a=n.goToMonth,o=n.displayMonths,s=o.findIndex(function(t){return iG(e.displayMonth,t)}),c=s===0,l=s===o.length-1,u=t>1&&(c||!l),d=t>1&&(l||!c);return(0,I.jsx)(tbe,{displayMonth:e.displayMonth,hideNext:u,hidePrevious:d,nextMonth:i,previousMonth:r,onPreviousClick:function(){r&&a(r)},onNextClick:function(){i&&a(i)}})}function nbe(e){var t=M8(),n=t.classNames,r=t.disableNavigation,i=t.styles,a=t.captionLayout,o=t.components?.CaptionLabel??N8,s=r?(0,I.jsx)(o,{id:e.id,displayMonth:e.displayMonth}):a===`dropdown`?(0,I.jsx)(L8,{displayMonth:e.displayMonth,id:e.id}):a===`dropdown-buttons`?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(L8,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),(0,I.jsx)(z8,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(o,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),(0,I.jsx)(z8,{displayMonth:e.displayMonth,id:e.id})]});return(0,I.jsx)(`div`,{className:n.caption,style:i.caption,children:s})}function rbe(e){var t=M8(),n=t.footer,r=t.styles,i=t.classNames.tfoot;return n?(0,I.jsx)(`tfoot`,{className:i,style:r.tfoot,children:(0,I.jsx)(`tr`,{children:(0,I.jsx)(`td`,{colSpan:8,children:n})})}):(0,I.jsx)(I.Fragment,{})}function ibe(e,t,n){for(var r=n?WU(new Date):UU(new Date,{locale:e,weekStartsOn:t}),i=[],a=0;a<7;a++){var o=FU(r,a);i.push(o)}return i}function abe(){var e=M8(),t=e.classNames,n=e.styles,r=e.showWeekNumber,i=e.locale,a=e.weekStartsOn,o=e.ISOWeek,s=e.formatters.formatWeekdayName,c=e.labels.labelWeekday,l=ibe(i,a,o);return(0,I.jsxs)(`tr`,{style:n.head_row,className:t.head_row,children:[r&&(0,I.jsx)(`td`,{style:n.head_cell,className:t.head_cell}),l.map(function(e,r){return(0,I.jsx)(`th`,{scope:`col`,className:t.head_cell,style:n.head_cell,"aria-label":c(e,{locale:i}),children:s(e,{locale:i})},r)})]})}function obe(){var e=M8(),t=e.classNames,n=e.styles,r=e.components?.HeadRow??abe;return(0,I.jsx)(`thead`,{style:n.head,className:t.head,children:(0,I.jsx)(r,{})})}function sbe(e){var t=M8(),n=t.locale,r=t.formatters.formatDay;return(0,I.jsx)(I.Fragment,{children:r(e.date,{locale:n})})}var B8=(0,_.createContext)(void 0);function cbe(e){return O8(e.initialProps)?(0,I.jsx)(lbe,{initialProps:e.initialProps,children:e.children}):(0,I.jsx)(B8.Provider,{value:{selected:void 0,modifiers:{disabled:[]}},children:e.children})}function lbe(e){var t=e.initialProps,n=e.children,r=t.selected,i=t.min,a=t.max,o=function(e,n,o){var s,c;if((s=t.onDayClick)==null||s.call(t,e,n,o),!(n.selected&&i&&r?.length===i)&&!(!n.selected&&a&&r?.length===a)){var l=r?D8([],r,!0):[];if(n.selected){var u=l.findIndex(function(t){return eW(e,t)});l.splice(u,1)}else l.push(e);(c=t.onSelect)==null||c.call(t,l,e,n,o)}},s={disabled:[]};r&&s.disabled.push(function(e){var t=a&&r.length>a-1,n=r.some(function(t){return eW(t,e)});return!!(t&&!n)});var c={selected:r,onDayClick:o,modifiers:s};return(0,I.jsx)(B8.Provider,{value:c,children:n})}function V8(){var e=(0,_.useContext)(B8);if(!e)throw Error(`useSelectMultiple must be used within a SelectMultipleProvider`);return e}function ube(e,t){var n=t||{},r=n.from,i=n.to;return r&&i?eW(i,e)&&eW(r,e)?void 0:eW(i,e)?{from:i,to:void 0}:eW(r,e)?void 0:nG(r,e)?{from:e,to:i}:{from:r,to:e}:i?nG(e,i)?{from:i,to:e}:{from:e,to:i}:r?rG(e,r)?{from:e,to:r}:{from:r,to:e}:{from:e,to:void 0}}var H8=(0,_.createContext)(void 0);function dbe(e){return k8(e.initialProps)?(0,I.jsx)(fbe,{initialProps:e.initialProps,children:e.children}):(0,I.jsx)(H8.Provider,{value:{selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}},children:e.children})}function fbe(e){var t=e.initialProps,n=e.children,r=t.selected,i=r||{},a=i.from,o=i.to,s=t.min,c=t.max,l=function(e,n,i){var a,o;(a=t.onDayClick)==null||a.call(t,e,n,i);var s=ube(e,r);(o=t.onSelect)==null||o.call(t,s,e,n,i)},u={range_start:[],range_end:[],range_middle:[],disabled:[]};if(a?(u.range_start=[a],o?(u.range_end=[o],eW(a,o)||(u.range_middle=[{after:a,before:o}])):u.range_end=[a]):o&&(u.range_start=[o],u.range_end=[o]),s&&(a&&!o&&u.disabled.push({after:oG(a,s-1),before:FU(a,s-1)}),a&&o&&u.disabled.push({after:a,before:FU(a,s-1)}),!a&&o&&u.disabled.push({after:oG(o,s-1),before:FU(o,s-1)})),c){if(a&&!o&&(u.disabled.push({before:FU(a,-c+1)}),u.disabled.push({after:FU(a,c-1)})),a&&o){var d=c-(JU(o,a)+1);u.disabled.push({before:oG(a,d)}),u.disabled.push({after:FU(o,d)})}!a&&o&&(u.disabled.push({before:FU(o,-c+1)}),u.disabled.push({after:FU(o,c-1)}))}return(0,I.jsx)(H8.Provider,{value:{selected:r,onDayClick:l,modifiers:u},children:n})}function U8(){var e=(0,_.useContext)(H8);if(!e)throw Error(`useSelectRange must be used within a SelectRangeProvider`);return e}function W8(e){return Array.isArray(e)?D8([],e,!0):e===void 0?[]:[e]}function pbe(e){var t={};return Object.entries(e).forEach(function(e){var n=e[0],r=e[1];t[n]=W8(r)}),t}var G8;(function(e){e.Outside=`outside`,e.Disabled=`disabled`,e.Selected=`selected`,e.Hidden=`hidden`,e.Today=`today`,e.RangeStart=`range_start`,e.RangeEnd=`range_end`,e.RangeMiddle=`range_middle`})(G8||={});var mbe=G8.Selected,K8=G8.Disabled,hbe=G8.Hidden,gbe=G8.Today,q8=G8.RangeEnd,J8=G8.RangeMiddle,Y8=G8.RangeStart,_be=G8.Outside;function vbe(e,t,n){var r,i=(r={},r[mbe]=W8(e.selected),r[K8]=W8(e.disabled),r[hbe]=W8(e.hidden),r[gbe]=[e.today],r[q8]=[],r[J8]=[],r[Y8]=[],r[_be]=[],r);return e.fromDate&&i[K8].push({before:e.fromDate}),e.toDate&&i[K8].push({after:e.toDate}),O8(e)?i[K8]=i[K8].concat(t.modifiers[K8]):k8(e)&&(i[K8]=i[K8].concat(n.modifiers[K8]),i[Y8]=n.modifiers[Y8],i[J8]=n.modifiers[J8],i[q8]=n.modifiers[q8]),i}var X8=(0,_.createContext)(void 0);function ybe(e){var t=M8(),n=vbe(t,V8(),U8()),r=pbe(t.modifiers),i=E8(E8({},n),r);return(0,I.jsx)(X8.Provider,{value:i,children:e.children})}function Z8(){var e=(0,_.useContext)(X8);if(!e)throw Error(`useModifiers must be used within a ModifiersProvider`);return e}function bbe(e){return!!(e&&typeof e==`object`&&`before`in e&&`after`in e)}function xbe(e){return!!(e&&typeof e==`object`&&`from`in e)}function Sbe(e){return!!(e&&typeof e==`object`&&`after`in e)}function Cbe(e){return!!(e&&typeof e==`object`&&`before`in e)}function wbe(e){return!!(e&&typeof e==`object`&&`dayOfWeek`in e)}function Tbe(e,t){var n,r=t.from,i=t.to;return r&&i?(JU(i,r)<0&&(n=[i,r],r=n[0],i=n[1]),JU(e,r)>=0&&JU(i,e)>=0):i?eW(i,e):r?eW(r,e):!1}function Ebe(e){return tW(e)}function Dbe(e){return Array.isArray(e)&&e.every(tW)}function Obe(e,t){return t.some(function(t){if(typeof t==`boolean`)return t;if(Ebe(t))return eW(e,t);if(Dbe(t))return t.includes(e);if(xbe(t))return Tbe(e,t);if(wbe(t))return t.dayOfWeek.includes(e.getDay());if(bbe(t)){var n=JU(t.before,e),r=JU(t.after,e),i=n>0,a=r<0;return nG(t.before,t.after)?a&&i:i||a}return Sbe(t)?JU(e,t.after)>0:Cbe(t)?JU(t.before,e)>0:typeof t==`function`?t(e):!1})}function Q8(e,t,n){var r=Object.keys(t).reduce(function(n,r){var i=t[r];return Obe(e,i)&&n.push(r),n},[]),i={};return r.forEach(function(e){return i[e]=!0}),n&&!iG(e,n)&&(i.outside=!0),i}function kbe(e,t){for(var n=oW(e[0]),r=aW(e[e.length-1]),i,a,o=n;o<=r;){var s=Q8(o,t);if(!(!s.disabled&&!s.hidden)){o=FU(o,1);continue}if(s.selected)return o;s.today&&!a&&(a=o),i||=o,o=FU(o,1)}return a||i}var Abe=365;function $8(e,t){var n=t.moveBy,r=t.direction,i=t.context,a=t.modifiers,o=t.retry,s=o===void 0?{count:0,lastFocused:e}:o,c=i.weekStartsOn,l=i.fromDate,u=i.toDate,d=i.locale,f={day:FU,week:XU,month:IU,year:ZU,startOfWeek:function(e){return i.ISOWeek?WU(e):UU(e,{locale:d,weekStartsOn:c})},endOfWeek:function(e){return i.ISOWeek?lW(e):cW(e,{locale:d,weekStartsOn:c})}}[n](e,r===`after`?1:-1);r===`before`&&l?f=QU([l,f]):r===`after`&&u&&(f=$U([u,f]));var p=!0;if(a){var m=Q8(f,a);p=!m.disabled&&!m.hidden}return p?f:s.count>Abe?s.lastFocused:$8(f,{moveBy:n,direction:r,context:i,modifiers:a,retry:E8(E8({},s),{count:s.count+1})})}var e5=(0,_.createContext)(void 0);function jbe(e){var t=I8(),n=Z8(),r=(0,_.useState)(),i=r[0],a=r[1],o=(0,_.useState)(),s=o[0],c=o[1],l=kbe(t.displayMonths,n),u=i??(s&&t.isDateDisplayed(s))?s:l,d=function(){c(i),a(void 0)},f=function(e){a(e)},p=M8(),m=function(e,r){if(i){var a=$8(i,{moveBy:e,direction:r,context:p,modifiers:n});eW(i,a)||(t.goToDate(a,i),f(a))}},h={focusedDay:i,focusTarget:u,blur:d,focus:f,focusDayAfter:function(){return m(`day`,`after`)},focusDayBefore:function(){return m(`day`,`before`)},focusWeekAfter:function(){return m(`week`,`after`)},focusWeekBefore:function(){return m(`week`,`before`)},focusMonthBefore:function(){return m(`month`,`before`)},focusMonthAfter:function(){return m(`month`,`after`)},focusYearBefore:function(){return m(`year`,`before`)},focusYearAfter:function(){return m(`year`,`after`)},focusStartOfWeek:function(){return m(`startOfWeek`,`before`)},focusEndOfWeek:function(){return m(`endOfWeek`,`after`)}};return(0,I.jsx)(e5.Provider,{value:h,children:e.children})}function t5(){var e=(0,_.useContext)(e5);if(!e)throw Error(`useFocusContext must be used within a FocusProvider`);return e}function Mbe(e,t){return Q8(e,Z8(),t)}var n5=(0,_.createContext)(void 0);function Nbe(e){return A8(e.initialProps)?(0,I.jsx)(Pbe,{initialProps:e.initialProps,children:e.children}):(0,I.jsx)(n5.Provider,{value:{selected:void 0},children:e.children})}function Pbe(e){var t=e.initialProps,n=e.children,r={selected:t.selected,onDayClick:function(e,n,r){var i,a,o;if((i=t.onDayClick)==null||i.call(t,e,n,r),n.selected&&!t.required){(a=t.onSelect)==null||a.call(t,void 0,e,n,r);return}(o=t.onSelect)==null||o.call(t,e,e,n,r)}};return(0,I.jsx)(n5.Provider,{value:r,children:n})}function r5(){var e=(0,_.useContext)(n5);if(!e)throw Error(`useSelectSingle must be used within a SelectSingleProvider`);return e}function Fbe(e,t){var n=M8(),r=r5(),i=V8(),a=U8(),o=t5(),s=o.focusDayAfter,c=o.focusDayBefore,l=o.focusWeekAfter,u=o.focusWeekBefore,d=o.blur,f=o.focus,p=o.focusMonthBefore,m=o.focusMonthAfter,h=o.focusYearBefore,g=o.focusYearAfter,_=o.focusStartOfWeek,v=o.focusEndOfWeek;return{onClick:function(o){var s,c,l,u;A8(n)?(s=r.onDayClick)==null||s.call(r,e,t,o):O8(n)?(c=i.onDayClick)==null||c.call(i,e,t,o):k8(n)?(l=a.onDayClick)==null||l.call(a,e,t,o):(u=n.onDayClick)==null||u.call(n,e,t,o)},onFocus:function(r){var i;f(e),(i=n.onDayFocus)==null||i.call(n,e,t,r)},onBlur:function(r){var i;d(),(i=n.onDayBlur)==null||i.call(n,e,t,r)},onKeyDown:function(r){var i;switch(r.key){case`ArrowLeft`:r.preventDefault(),r.stopPropagation(),n.dir===`rtl`?s():c();break;case`ArrowRight`:r.preventDefault(),r.stopPropagation(),n.dir===`rtl`?c():s();break;case`ArrowDown`:r.preventDefault(),r.stopPropagation(),l();break;case`ArrowUp`:r.preventDefault(),r.stopPropagation(),u();break;case`PageUp`:r.preventDefault(),r.stopPropagation(),r.shiftKey?h():p();break;case`PageDown`:r.preventDefault(),r.stopPropagation(),r.shiftKey?g():m();break;case`Home`:r.preventDefault(),r.stopPropagation(),_();break;case`End`:r.preventDefault(),r.stopPropagation(),v();break}(i=n.onDayKeyDown)==null||i.call(n,e,t,r)},onKeyUp:function(r){var i;(i=n.onDayKeyUp)==null||i.call(n,e,t,r)},onMouseEnter:function(r){var i;(i=n.onDayMouseEnter)==null||i.call(n,e,t,r)},onMouseLeave:function(r){var i;(i=n.onDayMouseLeave)==null||i.call(n,e,t,r)},onPointerEnter:function(r){var i;(i=n.onDayPointerEnter)==null||i.call(n,e,t,r)},onPointerLeave:function(r){var i;(i=n.onDayPointerLeave)==null||i.call(n,e,t,r)},onTouchCancel:function(r){var i;(i=n.onDayTouchCancel)==null||i.call(n,e,t,r)},onTouchEnd:function(r){var i;(i=n.onDayTouchEnd)==null||i.call(n,e,t,r)},onTouchMove:function(r){var i;(i=n.onDayTouchMove)==null||i.call(n,e,t,r)},onTouchStart:function(r){var i;(i=n.onDayTouchStart)==null||i.call(n,e,t,r)}}}function Ibe(){var e=M8(),t=r5(),n=V8(),r=U8();return A8(e)?t.selected:O8(e)?n.selected:k8(e)?r.selected:void 0}function Lbe(e){return Object.values(G8).includes(e)}function Rbe(e,t){var n=[e.classNames.day];return Object.keys(t).forEach(function(t){var r=e.modifiersClassNames[t];if(r)n.push(r);else if(Lbe(t)){var i=e.classNames[`day_${t}`];i&&n.push(i)}}),n}function zbe(e,t){var n=E8({},e.styles.day);return Object.keys(t).forEach(function(t){n=E8(E8({},n),e.modifiersStyles?.[t])}),n}function Bbe(e,t,n){var r,i=M8(),a=t5(),o=Mbe(e,t),s=Fbe(e,o),c=Ibe(),l=!!(i.onDayClick||i.mode!==`default`);(0,_.useEffect)(function(){var t;o.outside||a.focusedDay&&l&&eW(a.focusedDay,e)&&((t=n.current)==null||t.focus())},[a.focusedDay,e,n,l,o.outside]);var u=Rbe(i,o).join(` `),d=zbe(i,o),f=!!(o.outside&&!i.showOutsideDays||o.hidden),p={style:d,className:u,children:(0,I.jsx)(i.components?.DayContent??sbe,{date:e,displayMonth:t,activeModifiers:o}),role:`gridcell`},m=a.focusTarget&&eW(a.focusTarget,e)&&!o.outside,h=a.focusedDay&&eW(a.focusedDay,e);return{isButton:l,isHidden:f,activeModifiers:o,selectedDays:c,buttonProps:E8(E8(E8({},p),(r={disabled:o.disabled,role:`gridcell`},r[`aria-selected`]=o.selected,r.tabIndex=h||m?0:-1,r)),s),divProps:p}}function Vbe(e){var t=(0,_.useRef)(null),n=Bbe(e.date,e.displayMonth,t);return n.isHidden?(0,I.jsx)(`div`,{role:`gridcell`}):n.isButton?(0,I.jsx)(R8,E8({name:`day`,ref:t},n.buttonProps)):(0,I.jsx)(`div`,E8({},n.divProps))}function Hbe(e){var t=e.number,n=e.dates,r=M8(),i=r.onWeekNumberClick,a=r.styles,o=r.classNames,s=r.locale,c=r.labels.labelWeekNumber,l=r.formatters.formatWeekNumber,u=l(Number(t),{locale:s});if(!i)return(0,I.jsx)(`span`,{className:o.weeknumber,style:a.weeknumber,children:u});var d=c(Number(t),{locale:s}),f=function(e){i(t,n,e)};return(0,I.jsx)(R8,{name:`week-number`,"aria-label":d,className:o.weeknumber,style:a.weeknumber,onClick:f,children:u})}function Ube(e){var t=M8(),n=t.styles,r=t.classNames,i=t.showWeekNumber,a=t.components,o=a?.Day??Vbe,s=a?.WeekNumber??Hbe,c;return i&&(c=(0,I.jsx)(`td`,{className:r.cell,style:n.cell,children:(0,I.jsx)(s,{number:e.weekNumber,dates:e.dates})})),(0,I.jsxs)(`tr`,{className:r.row,style:n.row,children:[c,e.dates.map(function(t){return(0,I.jsx)(`td`,{className:r.cell,style:n.cell,role:`presentation`,children:(0,I.jsx)(o,{displayMonth:e.displayMonth,date:t})},$W(t))})]})}function i5(e,t,n){for(var r=n?.ISOWeek?lW(t):cW(t,n),i=n?.ISOWeek?WU(e):UU(e,n),a=JU(r,i),o=[],s=0;s<=a;s++)o.push(FU(i,s));return o.reduce(function(e,t){var r=n?.ISOWeek?wW(t):DW(t,n),i=e.find(function(e){return e.weekNumber===r});return i?(i.dates.push(t),e):(e.push({weekNumber:r,dates:[t]}),e)},[])}function Wbe(e,t){var n=i5(oW(e),aW(e),t);if(t?.useFixedWeeks){var r=tG(e,t);if(r<6){var i=n[n.length-1],a=i.dates[i.dates.length-1],o=XU(a,6-r),s=i5(XU(a,1),o,t);n.push.apply(n,s)}}return n}function Gbe(e){var t=M8(),n=t.locale,r=t.classNames,i=t.styles,a=t.hideHead,o=t.fixedWeeks,s=t.components,c=t.weekStartsOn,l=t.firstWeekContainsDate,u=t.ISOWeek,d=Wbe(e.displayMonth,{useFixedWeeks:!!o,ISOWeek:u,locale:n,weekStartsOn:c,firstWeekContainsDate:l}),f=s?.Head??obe,p=s?.Row??Ube,m=s?.Footer??rbe;return(0,I.jsxs)(`table`,{id:e.id,className:r.table,style:i.table,role:`grid`,"aria-labelledby":e[`aria-labelledby`],children:[!a&&(0,I.jsx)(f,{}),(0,I.jsx)(`tbody`,{className:r.tbody,style:i.tbody,children:d.map(function(t){return(0,I.jsx)(p,{displayMonth:e.displayMonth,dates:t.dates,weekNumber:t.weekNumber},t.weekNumber)})}),(0,I.jsx)(m,{displayMonth:e.displayMonth})]})}function Kbe(){return!!(typeof window<`u`&&window.document&&window.document.createElement)}var qbe=Kbe()?_.useLayoutEffect:_.useEffect,a5=!1,Jbe=0;function o5(){return`react-day-picker-${++Jbe}`}function Ybe(e){var t=(0,_.useState)(e??(a5?o5():null)),n=t[0],r=t[1];return qbe(function(){n===null&&r(o5())},[]),(0,_.useEffect)(function(){a5===!1&&(a5=!0)},[]),e??n??void 0}function Xbe(e){var t,n=M8(),r=n.dir,i=n.classNames,a=n.styles,o=n.components,s=I8().displayMonths,c=Ybe(n.id?`${n.id}-${e.displayIndex}`:void 0),l=n.id?`${n.id}-grid-${e.displayIndex}`:void 0,u=[i.month],d=a.month,f=e.displayIndex===0,p=e.displayIndex===s.length-1,m=!f&&!p;r===`rtl`&&(t=[f,p],p=t[0],f=t[1]),f&&(u.push(i.caption_start),d=E8(E8({},d),a.caption_start)),p&&(u.push(i.caption_end),d=E8(E8({},d),a.caption_end)),m&&(u.push(i.caption_between),d=E8(E8({},d),a.caption_between));var h=o?.Caption??nbe;return(0,I.jsxs)(`div`,{className:u.join(` `),style:d,children:[(0,I.jsx)(h,{id:c,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),(0,I.jsx)(Gbe,{id:l,"aria-labelledby":c,displayMonth:e.displayMonth})]},e.displayIndex)}function Zbe(e){var t=M8(),n=t.classNames,r=t.styles;return(0,I.jsx)(`div`,{className:n.months,style:r.months,children:e.children})}function Qbe(e){var t=e.initialProps,n=M8(),r=t5(),i=I8(),a=(0,_.useState)(!1),o=a[0],s=a[1];(0,_.useEffect)(function(){n.initialFocus&&r.focusTarget&&(o||(r.focus(r.focusTarget),s(!0)))},[n.initialFocus,o,r.focus,r.focusTarget,r]);var c=[n.classNames.root,n.className];n.numberOfMonths>1&&c.push(n.classNames.multiple_months),n.showWeekNumber&&c.push(n.classNames.with_weeknumber);var l=E8(E8({},n.styles.root),n.style),u=Object.keys(t).filter(function(e){return e.startsWith(`data-`)}).reduce(function(e,n){var r;return E8(E8({},e),(r={},r[n]=t[n],r))},{}),d=t.components?.Months??Zbe;return(0,I.jsx)(`div`,E8({className:c.join(` `),style:l,dir:n.dir,id:n.id,nonce:t.nonce,title:t.title,lang:t.lang},u,{children:(0,I.jsx)(d,{children:i.displayMonths.map(function(e,t){return(0,I.jsx)(Xbe,{displayIndex:t,displayMonth:e},t)})})}))}function $be(e){var t=e.children,n=Aye(e,[`children`]);return(0,I.jsx)(Hye,{initialProps:n,children:(0,I.jsx)(Qye,{children:(0,I.jsx)(Nbe,{initialProps:n,children:(0,I.jsx)(cbe,{initialProps:n,children:(0,I.jsx)(dbe,{initialProps:n,children:(0,I.jsx)(ybe,{children:(0,I.jsx)(jbe,{children:t})})})})})})})}function exe(e){return(0,I.jsx)($be,E8({},e,{children:(0,I.jsx)(Qbe,{initialProps:e})}))}function s5({className:e,classNames:t,showOutsideDays:n=!0,...r}){return(0,I.jsx)(exe,{showOutsideDays:n,className:H(`p-3`,e),classNames:{months:`flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0`,month:`space-y-4`,caption:`flex justify-center pt-1 relative items-center`,caption_label:`text-sm font-medium`,nav:`space-x-1 flex items-center`,nav_button:H(lp({variant:`outline`}),`h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100`),nav_button_previous:`absolute left-1`,nav_button_next:`absolute right-1`,table:`w-full border-collapse space-y-1`,head_row:`flex`,head_cell:`text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]`,row:`flex w-full mt-2`,cell:`h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20`,day:H(lp({variant:`ghost`}),`h-9 w-9 p-0 font-normal aria-selected:opacity-100`),day_range_end:`day-range-end`,day_selected:`bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground`,day_today:`bg-accent text-accent-foreground`,day_outside:`day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30`,day_disabled:`text-muted-foreground opacity-50`,day_range_middle:`aria-selected:bg-accent aria-selected:text-accent-foreground`,day_hidden:`invisible`,...t},components:{IconLeft:({...e})=>(0,I.jsx)(on,{className:`h-4 w-4`}),IconRight:({...e})=>(0,I.jsx)(sn,{className:`h-4 w-4`})},...r})}s5.displayName=`Calendar`;var txe=`AspectRatio`,c5=_.forwardRef((e,t)=>{let{ratio:n=1/1,style:r,...i}=e;return(0,I.jsx)(`div`,{style:{position:`relative`,width:`100%`,paddingBottom:`${100/n}%`},"data-radix-aspect-ratio-wrapper":``,children:(0,I.jsx)(up.div,{...i,ref:t,style:{...r,position:`absolute`,top:0,right:0,bottom:0,left:0}})})});c5.displayName=txe;var nxe=c5,l5,u5=`HoverCard`,[d5,rxe]=R(u5,[$s]),f5=$s(),[ixe,p5]=d5(u5),m5=e=>{let{__scopeHoverCard:t,children:n,open:r,defaultOpen:i,onOpenChange:a,openDelay:o=700,closeDelay:s=300}=e,c=f5(t),l=_.useRef(0),u=_.useRef(0),d=_.useRef(!1),f=_.useRef(!1),[p,m]=Fe({prop:r,defaultProp:i??!1,onChange:a,caller:u5}),h=_.useCallback(()=>{clearTimeout(u.current),l.current=window.setTimeout(()=>m(!0),o)},[o,m]),g=_.useCallback(()=>{clearTimeout(l.current),!d.current&&!f.current&&(u.current=window.setTimeout(()=>m(!1),s))},[s,m]),v=_.useCallback(()=>m(!1),[m]);return _.useEffect(()=>()=>{clearTimeout(l.current),clearTimeout(u.current)},[]),(0,I.jsx)(ixe,{scope:t,open:p,onOpenChange:m,onOpen:h,onClose:g,onDismiss:v,hasSelectionRef:d,isPointerDownOnContentRef:f,children:(0,I.jsx)(hc,{...c,children:n})})};m5.displayName=u5;var h5=`HoverCardTrigger`,g5=_.forwardRef((e,t)=>{let{__scopeHoverCard:n,...r}=e,i=p5(h5,n),a=f5(n);return(0,I.jsx)(gc,{asChild:!0,...a,children:(0,I.jsx)(z.a,{"data-state":i.open?`open`:`closed`,...r,ref:t,onPointerEnter:j(e.onPointerEnter,b5(i.onOpen)),onPointerLeave:j(e.onPointerLeave,b5(i.onClose)),onFocus:j(e.onFocus,i.onOpen),onBlur:j(e.onBlur,i.onClose),onTouchStart:j(e.onTouchStart,e=>e.preventDefault())})})});g5.displayName=h5;var _5=`HoverCardPortal`,[axe,oxe]=d5(_5,{forceMount:void 0}),sxe=e=>{let{__scopeHoverCard:t,forceMount:n,children:r,container:i}=e,a=p5(_5,t);return(0,I.jsx)(axe,{scope:t,forceMount:n,children:(0,I.jsx)(Ae,{present:n||a.open,children:(0,I.jsx)(Oe,{asChild:!0,container:i,children:r})})})};sxe.displayName=_5;var v5=`HoverCardContent`,y5=_.forwardRef((e,t)=>{let n=oxe(v5,e.__scopeHoverCard),{forceMount:r=n.forceMount,...i}=e,a=p5(v5,e.__scopeHoverCard);return(0,I.jsx)(Ae,{present:r||a.open,children:(0,I.jsx)(cxe,{"data-state":a.open?`open`:`closed`,...i,onPointerEnter:j(e.onPointerEnter,b5(a.onOpen)),onPointerLeave:j(e.onPointerLeave,b5(a.onClose)),ref:t})})});y5.displayName=v5;var cxe=_.forwardRef((e,t)=>{let{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,...s}=e,c=p5(v5,n),l=f5(n),u=_.useRef(null),d=P(t,u),[f,p]=_.useState(!1);return _.useEffect(()=>{if(f){let e=document.body;return l5=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect=`none`,e.style.webkitUserSelect=`none`,()=>{e.style.userSelect=l5,e.style.webkitUserSelect=l5}}},[f]),_.useEffect(()=>{if(u.current){let e=()=>{p(!1),c.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==``&&(c.hasSelectionRef.current=!0)})};return document.addEventListener(`pointerup`,e),()=>{document.removeEventListener(`pointerup`,e),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!1}}},[c.isPointerDownOnContentRef,c.hasSelectionRef]),_.useEffect(()=>{u.current&&dxe(u.current).forEach(e=>e.setAttribute(`tabindex`,`-1`))}),(0,I.jsx)(_e,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:o,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:j(a,e=>{e.preventDefault()}),onDismiss:c.onDismiss,children:(0,I.jsx)(_c,{...l,...s,onPointerDown:j(s.onPointerDown,e=>{e.currentTarget.contains(e.target)&&p(!0),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!0}),ref:d,style:{...s.style,userSelect:f?`text`:void 0,WebkitUserSelect:f?`text`:void 0,"--radix-hover-card-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-hover-card-content-available-width":`var(--radix-popper-available-width)`,"--radix-hover-card-content-available-height":`var(--radix-popper-available-height)`,"--radix-hover-card-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-hover-card-trigger-height":`var(--radix-popper-anchor-height)`}})})}),lxe=`HoverCardArrow`,uxe=_.forwardRef((e,t)=>{let{__scopeHoverCard:n,...r}=e,i=f5(n);return(0,I.jsx)(vc,{...i,...r,ref:t})});uxe.displayName=lxe;function b5(e){return t=>t.pointerType===`touch`?void 0:e()}function dxe(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var fxe=m5,pxe=g5,x5=y5,mxe=fxe,hxe=pxe,S5=_.forwardRef(({className:e,align:t=`center`,sideOffset:n=4,...r},i)=>(0,I.jsx)(x5,{ref:i,align:t,sideOffset:n,className:H(`z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,e),...r}));S5.displayName=x5.displayName;var gxe=Object.defineProperty,_xe=Object.defineProperties,vxe=Object.getOwnPropertyDescriptors,C5=Object.getOwnPropertySymbols,w5=Object.prototype.hasOwnProperty,T5=Object.prototype.propertyIsEnumerable,E5=(e,t,n)=>t in e?gxe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yxe=(e,t)=>{for(var n in t||={})w5.call(t,n)&&E5(e,n,t[n]);if(C5)for(var n of C5(t))T5.call(t,n)&&E5(e,n,t[n]);return e},bxe=(e,t)=>_xe(e,vxe(t)),xxe=(e,t)=>{var n={};for(var r in e)w5.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&C5)for(var r of C5(e))t.indexOf(r)<0&&T5.call(e,r)&&(n[r]=e[r]);return n};function Sxe(e){return[setTimeout(e,0),setTimeout(e,10),setTimeout(e,50)]}function Cxe(e){let t=_.useRef();return _.useEffect(()=>{t.current=e}),t.current}var wxe=18,D5=40,Txe=`${D5}px`,Exe=[`[data-lastpass-icon-root]`,`com-1password-button`,`[data-dashlanecreated]`,`[style$="2147483647 !important;"]`].join(`,`);function Dxe({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:r}){let[i,a]=_.useState(!1),[o,s]=_.useState(!1),[c,l]=_.useState(!1),u=_.useMemo(()=>n===`none`?!1:(n===`increase-width`||n===`experimental-no-flickering`)&&i&&o,[i,o,n]),d=_.useCallback(()=>{let r=e.current,i=t.current;if(!r||!i||c||n===`none`)return;let o=r,s=o.getBoundingClientRect().left+o.offsetWidth,u=o.getBoundingClientRect().top+o.offsetHeight/2,d=s-wxe,f=u;document.querySelectorAll(Exe).length===0&&document.elementFromPoint(d,f)===r||(a(!0),l(!0))},[e,t,c,n]);return _.useEffect(()=>{let t=e.current;if(!t||n===`none`)return;function r(){s(window.innerWidth-t.getBoundingClientRect().right>=D5)}r();let i=setInterval(r,1e3);return()=>{clearInterval(i)}},[e,n]),_.useEffect(()=>{let e=r||document.activeElement===t.current;if(n===`none`||!e)return;let i=setTimeout(d,0),a=setTimeout(d,2e3),o=setTimeout(d,5e3),s=setTimeout(()=>{l(!0)},6e3);return()=>{clearTimeout(i),clearTimeout(a),clearTimeout(o),clearTimeout(s)}},[t,r,n,d]),{hasPWMBadge:i,willPushPWMBadge:u,PWM_BADGE_SPACE_WIDTH:Txe}}var O5=_.createContext({}),k5=_.forwardRef((e,t)=>{var n=e,{value:r,onChange:i,maxLength:a,textAlign:o=`left`,pattern:s,placeholder:c,inputMode:l=`numeric`,onComplete:u,pushPasswordManagerStrategy:d=`increase-width`,pasteTransformer:f,containerClassName:p,noScriptCSSFallback:m=Oxe,render:h,children:g}=n,v=xxe(n,[`value`,`onChange`,`maxLength`,`textAlign`,`pattern`,`placeholder`,`inputMode`,`onComplete`,`pushPasswordManagerStrategy`,`pasteTransformer`,`containerClassName`,`noScriptCSSFallback`,`render`,`children`]),y;let[b,x]=_.useState(typeof v.defaultValue==`string`?v.defaultValue:``),S=r??b,C=Cxe(S),w=_.useCallback(e=>{i?.(e),x(e)},[i]),T=_.useMemo(()=>s?typeof s==`string`?new RegExp(s):s:null,[s]),E=_.useRef(null),D=_.useRef(null),O=_.useRef({value:S,onChange:w,isIOS:typeof window<`u`&&((y=window==null?void 0:window.CSS)?.supports)?.call(y,`-webkit-touch-callout`,`none`)}),k=_.useRef({prev:[E.current?.selectionStart,E.current?.selectionEnd,E.current?.selectionDirection]});_.useImperativeHandle(t,()=>E.current,[]),_.useEffect(()=>{let e=E.current,t=D.current;if(!e||!t)return;O.current.value!==e.value&&O.current.onChange(e.value),k.current.prev=[e.selectionStart,e.selectionEnd,e.selectionDirection];function n(){if(document.activeElement!==e){F(null),L(null);return}let t=e.selectionStart,n=e.selectionEnd,r=e.selectionDirection,i=e.maxLength,a=e.value,o=k.current.prev,s=-1,c=-1,l;if(a.length!==0&&t!==null&&n!==null){let e=t===n,r=t===a.length&&a.length<i;if(e&&!r){let e=t;if(e===0)s=0,c=1,l=`forward`;else if(e===i)s=e-1,c=e,l=`backward`;else if(i>1&&a.length>1){let t=0;if(o[0]!==null&&o[1]!==null){l=e<o[1]?`backward`:`forward`;let n=o[0]===o[1]&&o[0]<i;l===`backward`&&!n&&(t=-1)}s=t+e,c=t+e+1}}s!==-1&&c!==-1&&s!==c&&E.current.setSelectionRange(s,c,l)}let u=s===-1?t:s,d=c===-1?n:c,f=l??r;F(u),L(d),k.current.prev=[u,d,f]}if(document.addEventListener(`selectionchange`,n,{capture:!0}),n(),document.activeElement===e&&N(!0),!document.getElementById(`input-otp-style`)){let e=document.createElement(`style`);if(e.id=`input-otp-style`,document.head.appendChild(e),e.sheet){let t=`background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;`;A5(e.sheet,`[data-input-otp]::selection { background: transparent !important; color: transparent !important; }`),A5(e.sheet,`[data-input-otp]:autofill { ${t} }`),A5(e.sheet,`[data-input-otp]:-webkit-autofill { ${t} }`),A5(e.sheet,`@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }`),A5(e.sheet,`[data-input-otp] + * { pointer-events: all !important; }`)}}let r=()=>{t&&t.style.setProperty(`--root-height`,`${e.clientHeight}px`)};r();let i=new ResizeObserver(r);return i.observe(e),()=>{document.removeEventListener(`selectionchange`,n,{capture:!0}),i.disconnect()}},[]);let[A,j]=_.useState(!1),[M,N]=_.useState(!1),[P,F]=_.useState(null),[I,L]=_.useState(null);_.useEffect(()=>{Sxe(()=>{var e;(e=E.current)==null||e.dispatchEvent(new Event(`input`));let t=E.current?.selectionStart,n=E.current?.selectionEnd,r=E.current?.selectionDirection;t!==null&&n!==null&&(F(t),L(n),k.current.prev=[t,n,r])})},[S,M]),_.useEffect(()=>{C!==void 0&&S!==C&&C.length<a&&S.length===a&&u?.(S)},[a,u,C,S]);let R=Dxe({containerRef:D,inputRef:E,pushPasswordManagerStrategy:d,isFocused:M}),ee=_.useCallback(e=>{let t=e.currentTarget.value.slice(0,a);if(t.length>0&&T&&!T.test(t)){e.preventDefault();return}typeof C==`string`&&t.length<C.length&&document.dispatchEvent(new Event(`selectionchange`)),w(t)},[a,w,C,T]),te=_.useCallback(()=>{var e;if(E.current){let t=Math.min(E.current.value.length,a-1),n=E.current.value.length;(e=E.current)==null||e.setSelectionRange(t,n),F(t),L(n)}N(!0)},[a]),ne=_.useCallback(e=>{let t=E.current;if(!f&&(!O.current.isIOS||!e.clipboardData||!t))return;let n=e.clipboardData.getData(`text/plain`),r=f?f(n):n;e.preventDefault();let i=E.current?.selectionStart,o=E.current?.selectionEnd,s=(i===o?S.slice(0,i)+r+S.slice(i):S.slice(0,i)+r+S.slice(o)).slice(0,a);if(s.length>0&&T&&!T.test(s))return;t.value=s,w(s);let c=Math.min(s.length,a-1),l=s.length;t.setSelectionRange(c,l),F(c),L(l)},[a,w,T,S]),re=_.useMemo(()=>({position:`relative`,cursor:v.disabled?`default`:`text`,userSelect:`none`,WebkitUserSelect:`none`,pointerEvents:`none`}),[v.disabled]),ie=_.useMemo(()=>({position:`absolute`,inset:0,width:R.willPushPWMBadge?`calc(100% + ${R.PWM_BADGE_SPACE_WIDTH})`:`100%`,clipPath:R.willPushPWMBadge?`inset(0 ${R.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:`100%`,display:`flex`,textAlign:o,opacity:`1`,color:`transparent`,pointerEvents:`all`,background:`transparent`,caretColor:`transparent`,border:`0 solid transparent`,outline:`0 solid transparent`,boxShadow:`none`,lineHeight:`1`,letterSpacing:`-.5em`,fontSize:`var(--root-height)`,fontFamily:`monospace`,fontVariantNumeric:`tabular-nums`}),[R.PWM_BADGE_SPACE_WIDTH,R.willPushPWMBadge,o]),ae=_.useMemo(()=>_.createElement(`input`,bxe(yxe({autoComplete:v.autoComplete||`one-time-code`},v),{"data-input-otp":!0,"data-input-otp-placeholder-shown":S.length===0||void 0,"data-input-otp-mss":P,"data-input-otp-mse":I,inputMode:l,pattern:T?.source,"aria-placeholder":c,style:ie,maxLength:a,value:S,ref:E,onPaste:e=>{var t;ne(e),(t=v.onPaste)==null||t.call(v,e)},onChange:ee,onMouseOver:e=>{var t;j(!0),(t=v.onMouseOver)==null||t.call(v,e)},onMouseLeave:e=>{var t;j(!1),(t=v.onMouseLeave)==null||t.call(v,e)},onFocus:e=>{var t;te(),(t=v.onFocus)==null||t.call(v,e)},onBlur:e=>{var t;N(!1),(t=v.onBlur)==null||t.call(v,e)}})),[ee,te,ne,l,ie,a,I,P,v,T?.source,S]),oe=_.useMemo(()=>({slots:Array.from({length:a}).map((e,t)=>{let n=M&&P!==null&&I!==null&&(P===I&&t===P||t>=P&&t<I),r=S[t]===void 0?null:S[t];return{char:r,placeholderChar:S[0]===void 0?c?.[t]??null:null,isActive:n,hasFakeCaret:n&&r===null}}),isFocused:M,isHovering:!v.disabled&&A}),[M,A,a,I,P,v.disabled,S]),se=_.useMemo(()=>h?h(oe):_.createElement(O5.Provider,{value:oe},g),[g,oe,h]);return _.createElement(_.Fragment,null,m!==null&&_.createElement(`noscript`,null,_.createElement(`style`,null,m)),_.createElement(`div`,{ref:D,"data-input-otp-container":!0,style:re,className:p},se,_.createElement(`div`,{style:{position:`absolute`,inset:0,pointerEvents:`none`}},ae)))});k5.displayName=`Input`;function A5(e,t){try{e.insertRule(t)}catch{console.error(`input-otp could not insert CSS rule:`,t)}}var Oxe=`
222
- [data-input-otp] {
223
- --nojs-bg: white !important;
224
- --nojs-fg: black !important;
225
-
226
- background-color: var(--nojs-bg) !important;
227
- color: var(--nojs-fg) !important;
228
- caret-color: var(--nojs-fg) !important;
229
- letter-spacing: .25em !important;
230
- text-align: center !important;
231
- border: 1px solid var(--nojs-fg) !important;
232
- border-radius: 4px !important;
233
- width: 100% !important;
234
- }
235
- @media (prefers-color-scheme: dark) {
236
- [data-input-otp] {
237
- --nojs-bg: black !important;
238
- --nojs-fg: white !important;
239
- }
240
- }`,j5=_.forwardRef(({className:e,containerClassName:t,...n},r)=>(0,I.jsx)(k5,{ref:r,containerClassName:H(`flex items-center gap-2 has-[:disabled]:opacity-50`,t),className:H(`disabled:cursor-not-allowed`,e),...n}));j5.displayName=`InputOTP`;var M5=_.forwardRef(({className:e,...t},n)=>(0,I.jsx)(`div`,{ref:n,className:H(`flex items-center`,e),...t}));M5.displayName=`InputOTPGroup`;var N5=_.forwardRef(({index:e,className:t,...n},r)=>{let{char:i,hasFakeCaret:a,isActive:o}=_.useContext(O5).slots[e];return(0,I.jsxs)(`div`,{ref:r,className:H(`relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md`,o&&`z-10 ring-2 ring-ring ring-offset-background`,t),...n,children:[i,a&&(0,I.jsx)(`div`,{className:`pointer-events-none absolute inset-0 flex items-center justify-center`,children:(0,I.jsx)(`div`,{className:`animate-caret-blink h-4 w-px bg-foreground duration-1000`})})]})});N5.displayName=`InputOTPSlot`;var kxe=_.forwardRef(({...e},t)=>(0,I.jsx)(`div`,{ref:t,role:`separator`,...e,children:(0,I.jsx)(Sn,{})}));kxe.displayName=`InputOTPSeparator`;function Axe(e){return Object.prototype.toString.call(e)===`[object Object]`}function P5(e){return Axe(e)||Array.isArray(e)}function jxe(){return!!(typeof window<`u`&&window.document&&window.document.createElement)}function F5(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length!==r.length||JSON.stringify(Object.keys(e.breakpoints||{}))!==JSON.stringify(Object.keys(t.breakpoints||{}))?!1:n.every(n=>{let r=e[n],i=t[n];return typeof r==`function`?`${r}`==`${i}`:!P5(r)||!P5(i)?r===i:F5(r,i)})}function I5(e){return e.concat().sort((e,t)=>e.name>t.name?1:-1).map(e=>e.options)}function Mxe(e,t){if(e.length!==t.length)return!1;let n=I5(e),r=I5(t);return n.every((e,t)=>{let n=r[t];return F5(e,n)})}function L5(e){return typeof e==`number`}function R5(e){return typeof e==`string`}function z5(e){return typeof e==`boolean`}function B5(e){return Object.prototype.toString.call(e)===`[object Object]`}function V5(e){return Math.abs(e)}function H5(e){return Math.sign(e)}function U5(e,t){return V5(e-t)}function Nxe(e,t){return e===0||t===0||V5(e)<=V5(t)?0:V5(U5(V5(e),V5(t))/e)}function Pxe(e){return Math.round(e*100)/100}function W5(e){return Y5(e).map(Number)}function G5(e){return e[K5(e)]}function K5(e){return Math.max(0,e.length-1)}function q5(e,t){return t===K5(e)}function J5(e,t=0){return Array.from(Array(e),(e,n)=>t+n)}function Y5(e){return Object.keys(e)}function X5(e,t){return[e,t].reduce((e,t)=>(Y5(t).forEach(n=>{let r=e[n],i=t[n];e[n]=B5(r)&&B5(i)?X5(r,i):i}),e),{})}function Z5(e,t){return t.MouseEvent!==void 0&&e instanceof t.MouseEvent}function Fxe(e,t){let n={start:r,center:i,end:a};function r(){return 0}function i(e){return a(e)/2}function a(e){return t-e}function o(r,i){return R5(e)?n[e](r):e(t,r,i)}return{measure:o}}function Q5(){let e=[];function t(t,n,i,a={passive:!0}){let o;if(`addEventListener`in t)t.addEventListener(n,i,a),o=()=>t.removeEventListener(n,i,a);else{let e=t;e.addListener(i),o=()=>e.removeListener(i)}return e.push(o),r}function n(){e=e.filter(e=>e())}let r={add:t,clear:n};return r}function Ixe(e,t,n,r){let i=Q5(),a=1e3/60,o=null,s=0,c=0;function l(){i.add(e,`visibilitychange`,()=>{e.hidden&&m()})}function u(){p(),i.clear()}function d(e){if(!c)return;o||(o=e,n(),n());let i=e-o;for(o=e,s+=i;s>=a;)n(),s-=a;r(s/a),c&&=t.requestAnimationFrame(d)}function f(){c||=t.requestAnimationFrame(d)}function p(){t.cancelAnimationFrame(c),o=null,s=0,c=0}function m(){o=null,s=0}return{init:l,destroy:u,start:f,stop:p,update:n,render:r}}function Lxe(e,t){let n=t===`rtl`,r=e===`y`,i=r?`y`:`x`,a=r?`x`:`y`,o=!r&&n?-1:1,s=u(),c=d();function l(e){let{height:t,width:n}=e;return r?t:n}function u(){return r?`top`:n?`right`:`left`}function d(){return r?`bottom`:n?`left`:`right`}function f(e){return e*o}return{scroll:i,cross:a,startEdge:s,endEdge:c,measureSize:l,direction:f}}function $5(e=0,t=0){let n=V5(e-t);function r(t){return t<e}function i(e){return e>t}function a(e){return r(e)||i(e)}function o(n){return a(n)?r(n)?e:t:n}function s(e){return n?e-n*Math.ceil((e-t)/n):e}return{length:n,max:t,min:e,constrain:o,reachedAny:a,reachedMax:i,reachedMin:r,removeOffset:s}}function e7(e,t,n){let{constrain:r}=$5(0,e),i=e+1,a=o(t);function o(e){return n?V5((i+e)%i):r(e)}function s(){return a}function c(e){return a=o(e),d}function l(e){return u().set(s()+e)}function u(){return e7(e,s(),n)}let d={get:s,set:c,add:l,clone:u};return d}function Rxe(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v){let{cross:y,direction:b}=e,x=[`INPUT`,`SELECT`,`TEXTAREA`],S={passive:!1},C=Q5(),w=Q5(),T=$5(50,225).constrain(p.measure(20)),E={mouse:300,touch:400},D={mouse:500,touch:600},O=m?43:25,k=!1,A=0,j=0,M=!1,N=!1,P=!1,F=!1;function I(e){if(!v)return;function n(t){(z5(v)||v(e,t))&&re(t)}let r=t;C.add(r,`dragstart`,e=>e.preventDefault(),S).add(r,`touchmove`,()=>void 0,S).add(r,`touchend`,()=>void 0).add(r,`touchstart`,n).add(r,`mousedown`,n).add(r,`touchcancel`,ae).add(r,`contextmenu`,ae).add(r,`click`,oe,!0)}function L(){C.clear(),w.clear()}function R(){let e=F?n:t;w.add(e,`touchmove`,ie,S).add(e,`touchend`,ae).add(e,`mousemove`,ie,S).add(e,`mouseup`,ae)}function ee(e){let t=e.nodeName||``;return x.includes(t)}function te(){return(m?D:E)[F?`mouse`:`touch`]}function ne(e,t){let n=d.add(H5(e)*-1),r=u.byDistance(e,!m).distance;return m||V5(e)<T?r:g&&t?r*.5:u.byIndex(n.get(),0).distance}function re(e){let t=Z5(e,r);F=t,P=m&&t&&!e.buttons&&k,k=U5(i.get(),o.get())>=2,!(t&&e.button!==0)&&(ee(e.target)||(M=!0,a.pointerDown(e),l.useFriction(0).useDuration(0),i.set(o),R(),A=a.readPoint(e),j=a.readPoint(e,y),f.emit(`pointerDown`)))}function ie(e){if(!Z5(e,r)&&e.touches.length>=2)return ae(e);let t=a.readPoint(e),n=a.readPoint(e,y),o=U5(t,A),c=U5(n,j);if(!N&&!F&&(!e.cancelable||(N=o>c,!N)))return ae(e);let u=a.pointerMove(e);o>h&&(P=!0),l.useFriction(.3).useDuration(.75),s.start(),i.add(b(u)),e.preventDefault()}function ae(e){let t=u.byDistance(0,!1).index!==d.get(),n=a.pointerUp(e)*te(),r=ne(b(n),t),i=Nxe(n,r),o=O-10*i,s=_+i/50;N=!1,M=!1,w.clear(),l.useDuration(o).useFriction(s),c.distance(r,!m),F=!1,f.emit(`pointerUp`)}function oe(e){P&&=(e.stopPropagation(),e.preventDefault(),!1)}function se(){return M}return{init:I,destroy:L,pointerDown:se}}function zxe(e,t){let n,r;function i(e){return e.timeStamp}function a(n,r){let i=`client${(r||e.scroll)===`x`?`X`:`Y`}`;return(Z5(n,t)?n:n.touches[0])[i]}function o(e){return n=e,r=e,a(e)}function s(e){let t=a(e)-a(r),o=i(e)-i(n)>170;return r=e,o&&(n=e),t}function c(e){if(!n||!r)return 0;let t=a(r)-a(n),o=i(e)-i(n),s=i(e)-i(r)>170,c=t/o;return o&&!s&&V5(c)>.1?c:0}return{pointerDown:o,pointerMove:s,pointerUp:c,readPoint:a}}function Bxe(){function e(e){let{offsetTop:t,offsetLeft:n,offsetWidth:r,offsetHeight:i}=e;return{top:t,right:n+r,bottom:t+i,left:n,width:r,height:i}}return{measure:e}}function Vxe(e){function t(t){return t/100*e}return{measure:t}}function Hxe(e,t,n,r,i,a,o){let s=[e].concat(r),c,l,u=[],d=!1;function f(e){return i.measureSize(o.measure(e))}function p(i){if(!a)return;l=f(e),u=r.map(f);function o(n){for(let a of n){if(d)return;let n=a.target===e,o=r.indexOf(a.target),s=n?l:u[o];if(V5(f(n?e:r[o])-s)>=.5){i.reInit(),t.emit(`resize`);break}}}c=new ResizeObserver(e=>{(z5(a)||a(i,e))&&o(e)}),n.requestAnimationFrame(()=>{s.forEach(e=>c.observe(e))})}function m(){d=!0,c&&c.disconnect()}return{init:p,destroy:m}}function Uxe(e,t,n,r,i,a){let o=0,s=0,c=i,l=a,u=e.get(),d=0;function f(){let t=r.get()-e.get(),i=!c,a=0;return i?(o=0,n.set(r),e.set(r),a=t):(n.set(e),o+=t/c,o*=l,u+=o,e.add(o),a=u-d),s=H5(a),d=u,x}function p(){return V5(r.get()-t.get())<.001}function m(){return c}function h(){return s}function g(){return o}function _(){return y(i)}function v(){return b(a)}function y(e){return c=e,x}function b(e){return l=e,x}let x={direction:h,duration:m,velocity:g,seek:f,settled:p,useBaseFriction:v,useBaseDuration:_,useFriction:b,useDuration:y};return x}function Wxe(e,t,n,r,i){let a=i.measure(10),o=i.measure(50),s=$5(.1,.99),c=!1;function l(){return!(c||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function u(i){if(!l())return;let c=V5(e[e.reachedMin(t.get())?`min`:`max`]-t.get()),u=n.get()-t.get(),d=s.constrain(c/o);n.subtract(u*d),!i&&V5(u)<a&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function d(e){c=!e}return{shouldConstrain:l,constrain:u,toggleActive:d}}function Gxe(e,t,n,r,i){let a=$5(-t+e,0),o=d(),s=u(),c=f();function l(e,t){return U5(e,t)<=1}function u(){let e=o[0],t=G5(o);return $5(o.lastIndexOf(e),o.indexOf(t)+1)}function d(){return n.map((e,t)=>{let{min:r,max:i}=a,o=a.constrain(e),s=!t,c=q5(n,t);return s?i:c||l(r,o)?r:l(i,o)?i:o}).map(e=>parseFloat(e.toFixed(3)))}function f(){if(t<=e+i)return[a.max];if(r===`keepSnaps`)return o;let{min:n,max:c}=s;return o.slice(n,c)}return{snapsContained:c,scrollContainLimit:s}}function Kxe(e,t,n){let r=t[0];return{limit:$5(n?r-e:G5(t),r)}}function qxe(e,t,n,r){let i=.1,{reachedMin:a,reachedMax:o}=$5(t.min+i,t.max+i);function s(e){return e===1?o(n.get()):e===-1?a(n.get()):!1}function c(t){if(!s(t))return;let n=t*-1*e;r.forEach(e=>e.add(n))}return{loop:c}}function Jxe(e){let{max:t,length:n}=e;function r(e){let r=e-t;return n?r/-n:0}return{get:r}}function Yxe(e,t,n,r,i){let{startEdge:a,endEdge:o}=e,{groupSlides:s}=i,c=d().map(t.measure),l=f(),u=p();function d(){return s(r).map(e=>G5(e)[o]-e[0][a]).map(V5)}function f(){return r.map(e=>n[a]-e[a]).map(e=>-V5(e))}function p(){return s(l).map(e=>e[0]).map((e,t)=>e+c[t])}return{snaps:l,snapsAligned:u}}function Xxe(e,t,n,r,i,a){let{groupSlides:o}=i,{min:s,max:c}=r,l=u();function u(){let r=o(a),i=!e||t===`keepSnaps`;return n.length===1?[a]:i?r:r.slice(s,c).map((e,t,n)=>{let r=!t,i=q5(n,t);return r?J5(G5(n[0])+1):i?J5(K5(a)-G5(n)[0]+1,G5(n)[0]):e})}return{slideRegistry:l}}function Zxe(e,t,n,r,i){let{reachedAny:a,removeOffset:o,constrain:s}=r;function c(e){return e.concat().sort((e,t)=>V5(e)-V5(t))[0]}function l(n){let r=e?o(n):s(n),{index:i}=t.map((e,t)=>({diff:u(e-r,0),index:t})).sort((e,t)=>V5(e.diff)-V5(t.diff))[0];return{index:i,distance:r}}function u(t,r){let i=[t,t+n,t-n];if(!e)return t;if(!r)return c(i);let a=i.filter(e=>H5(e)===r);return a.length?c(a):G5(i)-n}function d(e,n){return{index:e,distance:u(t[e]-i.get(),n)}}function f(n,r){let o=i.get()+n,{index:s,distance:c}=l(o),d=!e&&a(o);return!r||d?{index:s,distance:n}:{index:s,distance:n+u(t[s]-c,0)}}return{byDistance:f,byIndex:d,shortcut:u}}function Qxe(e,t,n,r,i,a,o){function s(i){let s=i.distance,c=i.index!==t.get();a.add(s),s&&(r.duration()?e.start():(e.update(),e.render(1),e.update())),c&&(n.set(t.get()),t.set(i.index),o.emit(`select`))}function c(e,t){s(i.byDistance(e,t))}function l(e,n){let r=t.clone().set(e);s(i.byIndex(r.get(),n))}return{distance:c,index:l}}function $xe(e,t,n,r,i,a,o,s){let c={passive:!0,capture:!0},l=0;function u(u){if(!s)return;function f(t){if(new Date().getTime()-l>10)return;o.emit(`slideFocusStart`),e.scrollLeft=0;let a=n.findIndex(e=>e.includes(t));L5(a)&&(i.useDuration(0),r.index(a,0),o.emit(`slideFocus`))}a.add(document,`keydown`,d,!1),t.forEach((e,t)=>{a.add(e,`focus`,e=>{(z5(s)||s(u,e))&&f(t)},c)})}function d(e){e.code===`Tab`&&(l=new Date().getTime())}return{init:u}}function t7(e){let t=e;function n(){return t}function r(e){t=o(e)}function i(e){t+=o(e)}function a(e){t-=o(e)}function o(e){return L5(e)?e:e.get()}return{get:n,set:r,add:i,subtract:a}}function n7(e,t){let n=e.scroll===`x`?o:s,r=t.style,i=null,a=!1;function o(e){return`translate3d(${e}px,0px,0px)`}function s(e){return`translate3d(0px,${e}px,0px)`}function c(t){if(a)return;let o=Pxe(e.direction(t));o!==i&&(r.transform=n(o),i=o)}function l(e){a=!e}function u(){a||(r.transform=``,t.getAttribute(`style`)||t.removeAttribute(`style`))}return{clear:u,to:c,toggleActive:l}}function eSe(e,t,n,r,i,a,o,s,c){let l=.5,u=W5(i),d=W5(i).reverse(),f=_().concat(v());function p(e,t){return e.reduce((e,t)=>e-i[t],t)}function m(e,t){return e.reduce((e,n)=>p(e,t)>0?e.concat([n]):e,[])}function h(e){return a.map((n,i)=>({start:n-r[i]+l+e,end:n+t-l+e}))}function g(t,r,i){let a=h(r);return t.map(t=>{let r=i?0:-n,o=i?n:0,l=i?`end`:`start`,u=a[t][l];return{index:t,loopPoint:u,slideLocation:t7(-1),translate:n7(e,c[t]),target:()=>s.get()>u?r:o}})}function _(){let e=o[0];return g(m(d,e),n,!1)}function v(){return g(m(u,t-o[0]-1),-n,!0)}function y(){return f.every(({index:e})=>p(u.filter(t=>t!==e),t)<=.1)}function b(){f.forEach(e=>{let{target:t,translate:n,slideLocation:r}=e,i=t();i!==r.get()&&(n.to(i),r.set(i))})}function x(){f.forEach(e=>e.translate.clear())}return{canLoop:y,clear:x,loop:b,loopPoints:f}}function tSe(e,t,n){let r,i=!1;function a(a){if(!n)return;function o(e){for(let n of e)if(n.type===`childList`){a.reInit(),t.emit(`slidesChanged`);break}}r=new MutationObserver(e=>{i||(z5(n)||n(a,e))&&o(e)}),r.observe(e,{childList:!0})}function o(){r&&r.disconnect(),i=!0}return{init:a,destroy:o}}function nSe(e,t,n,r){let i={},a=null,o=null,s,c=!1;function l(){s=new IntersectionObserver(e=>{c||(e.forEach(e=>{let n=t.indexOf(e.target);i[n]=e}),a=null,o=null,n.emit(`slidesInView`))},{root:e.parentElement,threshold:r}),t.forEach(e=>s.observe(e))}function u(){s&&s.disconnect(),c=!0}function d(e){return Y5(i).reduce((t,n)=>{let r=parseInt(n),{isIntersecting:a}=i[r];return(e&&a||!e&&!a)&&t.push(r),t},[])}function f(e=!0){if(e&&a)return a;if(!e&&o)return o;let t=d(e);return e&&(a=t),e||(o=t),t}return{init:l,destroy:u,get:f}}function rSe(e,t,n,r,i,a){let{measureSize:o,startEdge:s,endEdge:c}=e,l=n[0]&&i,u=m(),d=h(),f=n.map(o),p=g();function m(){if(!l)return 0;let e=n[0];return V5(t[s]-e[s])}function h(){if(!l)return 0;let e=a.getComputedStyle(G5(r));return parseFloat(e.getPropertyValue(`margin-${c}`))}function g(){return n.map((e,t,n)=>{let r=!t,i=q5(n,t);return r?f[t]+u:i?f[t]+d:n[t+1][s]-e[s]}).map(V5)}return{slideSizes:f,slideSizesWithGaps:p,startGap:u,endGap:d}}function iSe(e,t,n,r,i,a,o,s,c){let{startEdge:l,endEdge:u,direction:d}=e,f=L5(n);function p(e,t){return W5(e).filter(e=>e%t===0).map(n=>e.slice(n,n+t))}function m(e){return e.length?W5(e).reduce((n,f,p)=>{let m=G5(n)||0,h=m===0,g=f===K5(e),_=i[l]-a[m][l],v=i[l]-a[f][u],y=!r&&h?d(o):0,b=V5(v-(!r&&g?d(s):0)-(_+y));return p&&b>t+c&&n.push(f),g&&n.push(e.length),n},[]).map((t,n,r)=>{let i=Math.max(r[n-1]||0);return e.slice(i,t)}):[]}function h(e){return f?p(e,n):m(e)}return{groupSlides:h}}function aSe(e,t,n,r,i,a,o){let{align:s,axis:c,direction:l,startIndex:u,loop:d,duration:f,dragFree:p,dragThreshold:m,inViewThreshold:h,slidesToScroll:g,skipSnaps:_,containScroll:v,watchResize:y,watchSlides:b,watchDrag:x,watchFocus:S}=a,C=Bxe(),w=C.measure(t),T=n.map(C.measure),E=Lxe(c,l),D=E.measureSize(w),O=Vxe(D),k=Fxe(s,D),A=!d&&!!v,{slideSizes:j,slideSizesWithGaps:M,startGap:N,endGap:P}=rSe(E,w,T,n,d||!!v,i),F=iSe(E,D,g,d,w,T,N,P,2),{snaps:I,snapsAligned:L}=Yxe(E,k,w,T,F),R=-G5(I)+G5(M),{snapsContained:ee,scrollContainLimit:te}=Gxe(D,R,L,v,2),ne=A?ee:L,{limit:re}=Kxe(R,ne,d),ie=e7(K5(ne),u,d),ae=ie.clone(),oe=W5(n),se=({dragHandler:e,scrollBody:t,scrollBounds:n,options:{loop:r}})=>{r||n.constrain(e.pointerDown()),t.seek()},ce=({scrollBody:e,translate:t,location:n,offsetLocation:r,previousLocation:i,scrollLooper:a,slideLooper:o,dragHandler:s,animation:c,eventHandler:l,scrollBounds:u,options:{loop:d}},f)=>{let p=e.settled(),m=!u.shouldConstrain(),h=d?p:p&&m,g=h&&!s.pointerDown();g&&c.stop();let _=n.get()*f+i.get()*(1-f);r.set(_),d&&(a.loop(e.direction()),o.loop()),t.to(r.get()),g&&l.emit(`settle`),h||l.emit(`scroll`)},z=Ixe(r,i,()=>se(Se),e=>ce(Se,e)),le=.68,B=ne[ie.get()],ue=t7(B),de=t7(B),fe=t7(B),pe=t7(B),me=Uxe(ue,fe,de,pe,f,le),he=Zxe(d,ne,R,re,pe),ge=Qxe(z,ie,ae,me,he,pe,o),_e=Jxe(re),ve=Q5(),ye=nSe(t,n,o,h),{slideRegistry:be}=Xxe(A,v,ne,te,F,oe),xe=$xe(e,n,be,ge,me,ve,o,S),Se={ownerDocument:r,ownerWindow:i,eventHandler:o,containerRect:w,slideRects:T,animation:z,axis:E,dragHandler:Rxe(E,e,r,i,pe,zxe(E,i),ue,z,ge,me,he,ie,o,O,p,m,_,le,x),eventStore:ve,percentOfView:O,index:ie,indexPrevious:ae,limit:re,location:ue,offsetLocation:fe,previousLocation:de,options:a,resizeHandler:Hxe(t,o,i,n,E,y,C),scrollBody:me,scrollBounds:Wxe(re,fe,pe,me,O),scrollLooper:qxe(R,re,fe,[ue,fe,de,pe]),scrollProgress:_e,scrollSnapList:ne.map(_e.get),scrollSnaps:ne,scrollTarget:he,scrollTo:ge,slideLooper:eSe(E,D,R,j,M,I,ne,fe,n),slideFocus:xe,slidesHandler:tSe(t,o,b),slidesInView:ye,slideIndexes:oe,slideRegistry:be,slidesToScroll:F,target:pe,translate:n7(E,t)};return Se}function oSe(){let e={},t;function n(e){t=e}function r(t){return e[t]||[]}function i(e){return r(e).forEach(n=>n(t,e)),c}function a(t,n){return e[t]=r(t).concat([n]),c}function o(t,n){return e[t]=r(t).filter(e=>e!==n),c}function s(){e={}}let c={init:n,emit:i,off:o,on:a,clear:s};return c}var sSe={align:`center`,axis:`x`,container:null,slides:null,containScroll:`trimSnaps`,direction:`ltr`,slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function cSe(e){function t(e,t){return X5(e,t||{})}function n(n){let r=n.breakpoints||{};return t(n,Y5(r).filter(t=>e.matchMedia(t).matches).map(e=>r[e]).reduce((e,n)=>t(e,n),{}))}function r(t){return t.map(e=>Y5(e.breakpoints||{})).reduce((e,t)=>e.concat(t),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function lSe(e){let t=[];function n(n,r){return t=r.filter(({options:t})=>e.optionsAtMedia(t).active!==!1),t.forEach(t=>t.init(n,e)),r.reduce((e,t)=>Object.assign(e,{[t.name]:t}),{})}function r(){t=t.filter(e=>e.destroy())}return{init:n,destroy:r}}function r7(e,t,n){let r=e.ownerDocument,i=r.defaultView,a=cSe(i),o=lSe(a),s=Q5(),c=oSe(),{mergeOptions:l,optionsAtMedia:u,optionsMediaQueries:d}=a,{on:f,off:p,emit:m}=c,h=D,g=!1,_,v=l(sSe,r7.globalOptions),y=l(v),b=[],x,S,C;function w(){let{container:t,slides:n}=y;S=(R5(t)?e.querySelector(t):t)||e.children[0];let r=R5(n)?S.querySelectorAll(n):n;C=[].slice.call(r||S.children)}function T(t){let n=aSe(e,S,C,r,i,t,c);return t.loop&&!n.slideLooper.canLoop()?T(Object.assign({},t,{loop:!1})):n}function E(e,t){g||(v=l(v,e),y=u(v),b=t||b,w(),_=T(y),d([v,...b.map(({options:e})=>e)]).forEach(e=>s.add(e,`change`,D)),y.active&&(_.translate.to(_.location.get()),_.animation.init(),_.slidesInView.init(),_.slideFocus.init(se),_.eventHandler.init(se),_.resizeHandler.init(se),_.slidesHandler.init(se),_.options.loop&&_.slideLooper.loop(),S.offsetParent&&C.length&&_.dragHandler.init(se),x=o.init(se,b)))}function D(e,t){let n=L();O(),E(l({startIndex:n},e),t),c.emit(`reInit`)}function O(){_.dragHandler.destroy(),_.eventStore.clear(),_.translate.clear(),_.slideLooper.clear(),_.resizeHandler.destroy(),_.slidesHandler.destroy(),_.slidesInView.destroy(),_.animation.destroy(),o.destroy(),s.clear()}function k(){g||(g=!0,s.clear(),O(),c.emit(`destroy`),c.clear())}function A(e,t,n){!y.active||g||(_.scrollBody.useBaseFriction().useDuration(t===!0?0:y.duration),_.scrollTo.index(e,n||0))}function j(e){A(_.index.add(1).get(),e,-1)}function M(e){A(_.index.add(-1).get(),e,1)}function N(){return _.index.add(1).get()!==L()}function P(){return _.index.add(-1).get()!==L()}function F(){return _.scrollSnapList}function I(){return _.scrollProgress.get(_.offsetLocation.get())}function L(){return _.index.get()}function R(){return _.indexPrevious.get()}function ee(){return _.slidesInView.get()}function te(){return _.slidesInView.get(!1)}function ne(){return x}function re(){return _}function ie(){return e}function ae(){return S}function oe(){return C}let se={canScrollNext:N,canScrollPrev:P,containerNode:ae,internalEngine:re,destroy:k,off:p,on:f,emit:m,plugins:ne,previousScrollSnap:R,reInit:h,rootNode:ie,scrollNext:j,scrollPrev:M,scrollProgress:I,scrollSnapList:F,scrollTo:A,selectedScrollSnap:L,slideNodes:oe,slidesInView:ee,slidesNotInView:te};return E(t,n),setTimeout(()=>c.emit(`init`),0),se}r7.globalOptions=void 0;function i7(e={},t=[]){let n=(0,_.useRef)(e),r=(0,_.useRef)(t),[i,a]=(0,_.useState)(),[o,s]=(0,_.useState)(),c=(0,_.useCallback)(()=>{i&&i.reInit(n.current,r.current)},[i]);return(0,_.useEffect)(()=>{F5(n.current,e)||(n.current=e,c())},[e,c]),(0,_.useEffect)(()=>{Mxe(r.current,t)||(r.current=t,c())},[t,c]),(0,_.useEffect)(()=>{if(jxe()&&o){r7.globalOptions=i7.globalOptions;let e=r7(o,n.current,r.current);return a(e),()=>e.destroy()}else a(void 0)},[o,a]),[s,i]}i7.globalOptions=void 0;var a7=_.createContext(null);function o7(){let e=_.useContext(a7);if(!e)throw Error(`useCarousel must be used within a <Carousel />`);return e}var s7=_.forwardRef(({orientation:e=`horizontal`,opts:t,setApi:n,plugins:r,className:i,children:a,...o},s)=>{let[c,l]=i7({...t,axis:e===`horizontal`?`x`:`y`},r),[u,d]=_.useState(!1),[f,p]=_.useState(!1),m=_.useCallback(e=>{e&&(d(e.canScrollPrev()),p(e.canScrollNext()))},[]),h=_.useCallback(()=>{l?.scrollPrev()},[l]),g=_.useCallback(()=>{l?.scrollNext()},[l]),v=_.useCallback(e=>{e.key===`ArrowLeft`?(e.preventDefault(),h()):e.key===`ArrowRight`&&(e.preventDefault(),g())},[h,g]);return _.useEffect(()=>{!l||!n||n(l)},[l,n]),_.useEffect(()=>{if(l)return m(l),l.on(`reInit`,m),l.on(`select`,m),()=>{l?.off(`select`,m)}},[l,m]),(0,I.jsx)(a7.Provider,{value:{carouselRef:c,api:l,opts:t,orientation:e||(t?.axis===`y`?`vertical`:`horizontal`),scrollPrev:h,scrollNext:g,canScrollPrev:u,canScrollNext:f},children:(0,I.jsx)(`div`,{ref:s,onKeyDownCapture:v,className:H(`relative`,i),role:`region`,"aria-roledescription":`carousel`,...o,children:a})})});s7.displayName=`Carousel`;var c7=_.forwardRef(({className:e,...t},n)=>{let{carouselRef:r,orientation:i}=o7();return(0,I.jsx)(`div`,{ref:r,className:`overflow-hidden`,children:(0,I.jsx)(`div`,{ref:n,className:H(`flex`,i===`horizontal`?`-ml-4`:`-mt-4 flex-col`,e),...t})})});c7.displayName=`CarouselContent`;var l7=_.forwardRef(({className:e,...t},n)=>{let{orientation:r}=o7();return(0,I.jsx)(`div`,{ref:n,role:`group`,"aria-roledescription":`slide`,className:H(`min-w-0 shrink-0 grow-0 basis-full`,r===`horizontal`?`pl-4`:`pt-4`,e),...t})});l7.displayName=`CarouselItem`;var u7=_.forwardRef(({className:e,variant:t=`outline`,size:n=`icon`,...r},i)=>{let{orientation:a,scrollPrev:o,canScrollPrev:s}=o7();return(0,I.jsxs)(W,{ref:i,variant:t,size:n,className:H(`absolute h-8 w-8 rounded-full`,a===`horizontal`?`-left-12 top-1/2 -translate-y-1/2`:`-top-12 left-1/2 -translate-x-1/2 rotate-90`,e),disabled:!s,onClick:o,...r,children:[(0,I.jsx)(qt,{className:`h-4 w-4`}),(0,I.jsx)(`span`,{className:`sr-only`,children:`Previous slide`})]})});u7.displayName=`CarouselPrevious`;var d7=_.forwardRef(({className:e,variant:t=`outline`,size:n=`icon`,...r},i)=>{let{orientation:a,scrollNext:o,canScrollNext:s}=o7();return(0,I.jsxs)(W,{ref:i,variant:t,size:n,className:H(`absolute h-8 w-8 rounded-full`,a===`horizontal`?`-right-12 top-1/2 -translate-y-1/2`:`-bottom-12 left-1/2 -translate-x-1/2 rotate-90`,e),disabled:!s,onClick:o,...r,children:[(0,I.jsx)(Jt,{className:`h-4 w-4`}),(0,I.jsx)(`span`,{className:`sr-only`,children:`Next slide`})]})});d7.displayName=`CarouselNext`;var f7=`Popover`,[p7,uSe]=R(f7,[$s]),m7=$s(),[dSe,h7]=p7(f7),g7=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=m7(t),c=_.useRef(null),[l,u]=_.useState(!1),[d,f]=Fe({prop:r,defaultProp:i??!1,onChange:a,caller:f7});return(0,I.jsx)(hc,{...s,children:(0,I.jsx)(dSe,{scope:t,contentId:Na(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:_.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:l,onCustomAnchorAdd:_.useCallback(()=>u(!0),[]),onCustomAnchorRemove:_.useCallback(()=>u(!1),[]),modal:o,children:n})})};g7.displayName=f7;var _7=`PopoverAnchor`,fSe=_.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=h7(_7,n),a=m7(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return _.useEffect(()=>(o(),()=>s()),[o,s]),(0,I.jsx)(gc,{...a,...r,ref:t})});fSe.displayName=_7;var v7=`PopoverTrigger`,y7=_.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=h7(v7,n),a=m7(n),o=P(t,i.triggerRef),s=(0,I.jsx)(z.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":E7(i.open),...r,ref:o,onClick:j(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,I.jsx)(gc,{asChild:!0,...a,children:s})});y7.displayName=v7;var b7=`PopoverPortal`,[pSe,mSe]=p7(b7,{forceMount:void 0}),x7=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=h7(b7,t);return(0,I.jsx)(pSe,{scope:t,forceMount:n,children:(0,I.jsx)(Ae,{present:n||a.open,children:(0,I.jsx)(Oe,{asChild:!0,container:i,children:r})})})};x7.displayName=b7;var S7=`PopoverContent`,C7=_.forwardRef((e,t)=>{let n=mSe(S7,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=h7(S7,e.__scopePopover);return(0,I.jsx)(Ae,{present:r||a.open,children:a.modal?(0,I.jsx)(gSe,{...i,ref:t}):(0,I.jsx)(_Se,{...i,ref:t})})});C7.displayName=S7;var hSe=te(`PopoverContent.RemoveScroll`),gSe=_.forwardRef((e,t)=>{let n=h7(S7,e.__scopePopover),r=_.useRef(null),i=P(t,r),a=_.useRef(!1);return _.useEffect(()=>{let e=r.current;if(e)return cm(e)},[]),(0,I.jsx)(em,{as:hSe,allowPinchZoom:!0,children:(0,I.jsx)(w7,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:j(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:j(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;a.current=t.button===2||n},{checkForDefaultPrevented:!1}),onFocusOutside:j(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),_Se=_.forwardRef((e,t)=>{let n=h7(S7,e.__scopePopover),r=_.useRef(!1),i=_.useRef(!1);return(0,I.jsx)(w7,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),w7=_.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=h7(S7,n),p=m7(n);return Ep(),(0,I.jsx)(yp,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,I.jsx)(_e,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),children:(0,I.jsx)(_c,{"data-state":E7(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),T7=`PopoverClose`,vSe=_.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=h7(T7,n);return(0,I.jsx)(z.button,{type:`button`,...r,ref:t,onClick:j(e.onClick,()=>i.onOpenChange(!1))})});vSe.displayName=T7;var ySe=`PopoverArrow`,bSe=_.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=m7(n);return(0,I.jsx)(vc,{...i,...r,ref:t})});bSe.displayName=ySe;function E7(e){return e?`open`:`closed`}var xSe=g7,SSe=y7,CSe=x7,D7=C7,wSe=xSe,TSe=SSe,O7=_.forwardRef(({className:e,align:t=`center`,sideOffset:n=4,...r},i)=>(0,I.jsx)(CSe,{children:(0,I.jsx)(D7,{ref:i,align:t,sideOffset:n,className:H(`z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,e),...r})}));O7.displayName=D7.displayName;function ESe(e){return(0,I.jsxs)(ZQ,{variant:e.variant||`default`,className:e.className,children:[e.title&&(0,I.jsx)(QQ,{children:String(e.title)}),e.description&&(0,I.jsx)($Q,{children:String(e.description)}),e.children&&(0,I.jsx)(`div`,{children:String(e.children)})]})}function DSe(e){let t=e.id,n=e.onInteraction;return(0,I.jsx)(W,{variant:e.variant,size:e.size,disabled:e.disabled,className:e.className,onClick:()=>n?.(t,`click`,{label:e.label}),children:e.label||e.children})}function OSe(e){return(0,I.jsx)($z,{variant:e.variant||`default`,className:e.className,children:String(e.children||e.label||``)})}function kSe(e){return(0,I.jsxs)(XR,{className:e.className||`bg-background/60 backdrop-blur-md border-primary/20`,children:[e.title&&(0,I.jsxs)(ZR,{children:[(0,I.jsx)(QR,{children:e.title}),e.description&&(0,I.jsx)($R,{children:e.description})]}),(0,I.jsx)(ez,{children:e.children?(0,I.jsx)(`div`,{children:String(e.children)}):null}),e.footer&&(0,I.jsx)(tz,{children:(0,I.jsx)(`div`,{children:String(e.footer)})})]})}function ASe(e){return(0,I.jsx)(G,{type:e.type,placeholder:e.placeholder,value:e.value,disabled:e.disabled,className:e.className})}function jSe(e){return(0,I.jsx)(Z,{htmlFor:e.htmlFor,className:e.className,children:String(e.children||e.label||``)})}function MSe(e){return(0,I.jsx)(xG,{placeholder:e.placeholder,value:e.value,disabled:e.disabled,className:e.className,rows:e.rows})}function NSe(e){return(0,I.jsx)(d$,{checked:e.checked,disabled:e.disabled})}function PSe(e){return(0,I.jsx)(vq,{checked:e.checked,disabled:e.disabled})}function FSe(e){return(0,I.jsx)(O$,{value:e.value,children:e.options?.map(e=>(0,I.jsxs)(`div`,{className:`flex items-center space-x-2`,children:[(0,I.jsx)(k$,{value:e.value}),(0,I.jsx)(Z,{children:e.label})]},e.value))})}function ISe(e){return(0,I.jsxs)(ZK,{value:e.value,children:[(0,I.jsx)(eq,{className:e.className,children:(0,I.jsx)($K,{placeholder:e.placeholder})}),(0,I.jsx)(rq,{children:e.options?.map(e=>(0,I.jsx)(Q,{value:e.value,children:e.label},e.value))})]})}function LSe(e){return(0,I.jsx)(Z$,{value:e.value||[50],min:e.min,max:e.max,step:e.step})}function RSe(e){return(0,I.jsx)(yB,{value:e.value,className:e.className})}function zSe(e){return(0,I.jsxs)(XR,{className:`border-primary/10 bg-background/40`,children:[e.title&&(0,I.jsx)(ZR,{children:(0,I.jsx)(QR,{className:`text-md font-semibold`,children:e.title})}),(0,I.jsx)(ez,{className:`p-0`,children:(0,I.jsxs)(Q$,{children:[(0,I.jsx)($$,{children:(0,I.jsx)(t1,{className:`bg-muted/50`,children:e.columns?.map(e=>(0,I.jsx)(n1,{className:`font-bold text-primary`,children:e.header},e.key))})}),(0,I.jsx)(e1,{children:e.data?.map((t,n)=>(0,I.jsx)(t1,{className:`hover:bg-primary/5 transition-colors`,children:e.columns?.map((e,n)=>(0,I.jsx)(r1,{className:`text-sm`,children:String(t[e.key])},n))},n))})]})})]})}function BSe(e){let t=e.tabs||[],n=t[0]?.value;return(0,I.jsxs)(Zhe,{defaultValue:e.defaultValue||n,children:[(0,I.jsx)(y1,{children:t.map(e=>(0,I.jsx)(b1,{value:e.value,children:e.label},e.value))}),t.map(e=>(0,I.jsx)(x1,{value:e.value,children:e.content?(0,I.jsx)(`div`,{className:`prose prose-invert max-w-none text-sm`,children:(0,I.jsx)(XQ,{children:String(e.content)})}):null},e.value))]})}function VSe(e){return(0,I.jsxs)(N1,{className:e.className,children:[e.src&&(0,I.jsx)(P1,{src:e.src}),(0,I.jsx)(F1,{children:e.fallback})]})}function HSe(e){return(0,I.jsx)(hp,{orientation:e.orientation,className:e.className})}function USe(e){return(0,I.jsx)(sh,{className:e.className})}function WSe(e){return(0,I.jsx)(VJ,{className:e.className,style:{height:e.height},children:e.children?(0,I.jsx)(`div`,{children:String(e.children)}):null})}function GSe(e){return(0,I.jsx)(tl,{children:(0,I.jsxs)(nl,{children:[(0,I.jsx)(rl,{asChild:!0,children:(0,I.jsx)(`span`,{children:String(e.children||e.trigger||`Hover`)})}),(0,I.jsx)(il,{children:String(e.content||``)})]})})}function KSe(e){let[t,n]=(0,_.useState)(!0);return(0,I.jsxs)(yq,{open:t,onOpenChange:n,children:[e.trigger&&(0,I.jsx)(bq,{asChild:!0,children:(0,I.jsx)(W,{variant:`outline`,children:String(e.trigger)})}),(0,I.jsxs)(wq,{children:[(0,I.jsxs)(Tq,{children:[(0,I.jsx)(Dq,{children:String(e.title||``)}),e.description&&(0,I.jsx)(Oq,{children:String(e.description)})]}),e.children&&(0,I.jsx)(`div`,{className:`py-2`,children:String(e.children)})]})]})}function qSe(e){let[t,n]=(0,_.useState)(!0);return(0,I.jsxs)(g0,{open:t,onOpenChange:n,children:[e.trigger&&(0,I.jsx)(Age,{asChild:!0,children:(0,I.jsx)(W,{variant:`outline`,children:String(e.trigger)})}),(0,I.jsxs)(v0,{children:[(0,I.jsxs)(y0,{children:[(0,I.jsx)(b0,{children:String(e.title||``)}),e.description&&(0,I.jsx)(x0,{children:String(e.description)})]}),e.children&&(0,I.jsx)(`div`,{className:`px-4 pb-4`,children:String(e.children)})]})]})}function JSe(e){let[t,n]=(0,_.useState)(!0);return(0,I.jsxs)(Zm,{open:t,onOpenChange:n,children:[e.trigger&&(0,I.jsx)(Qm,{asChild:!0,children:(0,I.jsx)(W,{variant:`outline`,children:String(e.trigger)})}),(0,I.jsxs)(nh,{side:e.side,children:[(0,I.jsxs)(rh,{children:[(0,I.jsx)(ah,{children:String(e.title||``)}),e.description&&(0,I.jsx)(oh,{children:String(e.description)})]}),e.children&&(0,I.jsx)(`div`,{className:`py-2`,children:String(e.children)})]})]})}function YSe(e){return(0,I.jsxs)(SU,{children:[(0,I.jsx)(CU,{asChild:!0,children:(0,I.jsx)(W,{variant:`outline`,children:String(e.trigger||`Open Menu`)})}),(0,I.jsxs)(EU,{children:[e.label&&(0,I.jsx)(AU,{children:String(e.label)}),e.items?.map((e,t)=>e.separator?(0,I.jsx)(jU,{},t):(0,I.jsx)(DU,{children:e.label},t))]})]})}function XSe(e){return(0,I.jsxs)(q0,{children:[(0,I.jsx)(J0,{placeholder:e.placeholder||`Search...`}),(0,I.jsxs)(Y0,{children:[(0,I.jsx)(X0,{children:String(e.empty||`No results found.`)}),e.items?.map((e,t)=>(0,I.jsx)(Z0,{heading:e.label,children:e.items?.map((e,t)=>(0,I.jsx)(Q0,{children:e.label},t))},t))]})]})}function ZSe(e){return(0,I.jsxs)(D_e,{children:[(0,I.jsx)(O_e,{className:`flex h-16 w-full items-center justify-center rounded-md border border-dashed text-sm`,children:String(e.trigger||`Right click here`)}),(0,I.jsxs)(D2,{children:[e.label&&(0,I.jsx)(k2,{children:String(e.label)}),e.items?.map((e,t)=>e.separator?(0,I.jsx)(A2,{},t):(0,I.jsx)(O2,{children:e.label},t))]})]})}function QSe(e){return(0,I.jsx)(f4,{children:e.menus?.map((e,t)=>(0,I.jsxs)(ive,{children:[(0,I.jsx)(p4,{children:e.label}),(0,I.jsx)(m4,{children:e.items?.map((e,t)=>e.separator?(0,I.jsx)(g4,{},t):(0,I.jsxs)(h4,{children:[e.label,e.shortcut&&(0,I.jsx)(_4,{children:e.shortcut})]},t))})]},t))})}function $Se(e){return(0,I.jsx)(o3,{children:(0,I.jsx)(s3,{children:e.items?.map((e,t)=>e.content?(0,I.jsxs)(c3,{children:[(0,I.jsx)(l3,{children:e.label}),(0,I.jsx)(u3,{children:(0,I.jsx)(`div`,{className:`p-4 w-48`,children:String(e.content)})})]},t):(0,I.jsx)(c3,{children:(0,I.jsx)(kve,{href:e.href||`#`,className:`px-3 py-2 text-sm font-medium`,children:e.label})},t))})})}function eCe(e){return(0,I.jsx)(N3,{type:e.type||`single`,collapsible:e.collapsible!==!1,children:e.items?.map(e=>(0,I.jsxs)(P3,{value:e.value,children:[(0,I.jsx)(F3,{children:e.title}),(0,I.jsx)(I3,{children:e.content?(0,I.jsx)(`div`,{className:`prose prose-invert max-w-none text-sm`,children:(0,I.jsx)(XQ,{children:String(e.content)})}):null})]},e.value))})}function tCe(e){let[t,n]=(0,_.useState)(e.open!==!1);return(0,I.jsxs)(pg,{open:t,onOpenChange:n,children:[(0,I.jsx)(Wte,{asChild:!0,children:(0,I.jsxs)(W,{variant:`ghost`,className:`w-full justify-between`,children:[String(e.trigger||`Toggle`),(0,I.jsx)(`span`,{children:t?`▲`:`▼`})]})}),(0,I.jsx)(mg,{className:`pt-2`,children:e.children?(0,I.jsx)(`div`,{className:`prose prose-invert max-w-none text-sm px-2`,children:(0,I.jsx)(XQ,{children:String(e.children)})}):null})]})}function nCe(e){return(0,I.jsx)(bye,{direction:e.direction||`horizontal`,className:`min-h-32 rounded-lg border`,children:e.panels?.map((e,t,n)=>(0,I.jsxs)(_.Fragment,{children:[(0,I.jsx)(xye,{defaultSize:e.size,children:(0,I.jsx)(`div`,{className:`flex h-full items-center justify-center p-3 text-sm`,children:String(e.content||``)})}),t<n.length-1&&(0,I.jsx)(Sye,{})]},t))})}function rCe(e){return(0,I.jsx)(J6,{children:(0,I.jsx)(Y6,{children:e.items?.map((t,n)=>(0,I.jsxs)(_.Fragment,{children:[(0,I.jsx)(X6,{children:t.href?(0,I.jsx)(Z6,{href:t.href,children:t.label}):(0,I.jsx)(Q6,{children:t.label})}),n<e.items.length-1&&(0,I.jsx)($6,{})]},`${t.label}-${t.href??``}`))})})}function iCe(e){return(0,I.jsx)(e8,{children:(0,I.jsxs)(t8,{children:[(0,I.jsx)(n8,{children:(0,I.jsx)(i8,{href:`#`})}),e.items?.map(e=>(0,I.jsx)(n8,{children:(0,I.jsx)(r8,{href:`#`,isActive:e.active,children:e.label})},e.value)),(0,I.jsx)(n8,{children:(0,I.jsx)(a8,{href:`#`})})]})})}function aCe(e){return(0,I.jsx)(u8,{pressed:e.pressed,children:String(e.children||e.label||`Toggle`)})}function oCe(e){return(0,I.jsx)(w8,{type:`single`,value:String(e.value||``),children:e.items?.map(e=>(0,I.jsx)(T8,{value:e.value,children:e.label},e.value))})}function sCe(e){return(0,I.jsx)(s5,{mode:e.mode,disabled:e.disabled})}function cCe(e){return(0,I.jsx)(nxe,{ratio:e.ratio||16/9,className:e.className,children:e.src?(0,I.jsx)(`img`,{src:e.src,alt:e.alt||``,className:`w-full h-full object-cover rounded-md`}):e.children?(0,I.jsx)(`div`,{className:`flex items-center justify-center w-full h-full`,children:String(e.children)}):null})}function lCe(e){return(0,I.jsxs)(mxe,{children:[(0,I.jsx)(hxe,{asChild:!0,children:(0,I.jsx)(`span`,{className:`cursor-pointer underline decoration-dotted`,children:String(e.children||e.trigger||`Hover me`)})}),(0,I.jsx)(S5,{children:String(e.content||``)})]})}function uCe(e){let t=e.maxLength||6;return(0,I.jsx)(j5,{maxLength:t,value:e.value,children:(0,I.jsx)(M5,{children:Array.from({length:t}).map((e,t)=>(0,I.jsx)(N5,{index:t},t))})})}function dCe(e){return(0,I.jsx)(`div`,{className:`prose prose-invert max-w-none p-4 bg-background/40 rounded-xl border`,children:(0,I.jsx)(XQ,{children:e.content})})}function fCe(e){let[t,n]=(0,_.useState)(!0),r=e.id,i=e.onInteraction;return(0,I.jsx)(Hz,{open:t,onOpenChange:n,children:(0,I.jsxs)(Gz,{children:[(0,I.jsxs)(Kz,{children:[(0,I.jsx)(Jz,{children:String(e.title||`Are you sure?`)}),e.description&&(0,I.jsx)(Yz,{children:String(e.description)})]}),(0,I.jsxs)(qz,{children:[(0,I.jsx)(Zz,{onClick:()=>{n(!1),i?.(r,`cancel`,{confirmed:!1})},children:String(e.cancelLabel||`Cancel`)}),(0,I.jsx)(Xz,{onClick:()=>{n(!1),i?.(r,`confirm`,{confirmed:!0})},children:String(e.actionLabel||e.confirmLabel||`Continue`)})]})]})})}function pCe(e){let t=e.items||[];return(0,I.jsxs)(s7,{orientation:e.orientation||`horizontal`,className:`w-full max-w-sm mx-auto`,children:[(0,I.jsx)(c7,{children:t.map((e,t)=>(0,I.jsx)(l7,{children:(0,I.jsx)(XR,{children:(0,I.jsxs)(ez,{className:`flex flex-col items-center justify-center p-6 gap-2`,children:[e.image&&(0,I.jsx)(`img`,{src:e.image,alt:e.title||``,className:`max-h-32 object-contain rounded`}),e.title&&(0,I.jsx)(`p`,{className:`font-semibold text-sm`,children:e.title}),e.content&&(0,I.jsx)(`p`,{className:`text-xs text-muted-foreground text-center`,children:e.content})]})})},t))}),(0,I.jsx)(u7,{}),(0,I.jsx)(d7,{})]})}var mCe=[`hsl(var(--primary))`,`#22c55e`,`#f59e0b`,`#ef4444`,`#8b5cf6`,`#06b6d4`];function hCe(e){let t=e.type||`bar`,n=e.data||[],r=e.xKey||`name`,i=e.keys||[],a=e.colors||mCe,o=t===`bar`?(0,I.jsxs)(kR,{data:n,children:[(0,I.jsx)(zI,{strokeDasharray:`3 3`,opacity:.3}),(0,I.jsx)(xL,{dataKey:r,tick:{fontSize:11}}),(0,I.jsx)(AL,{tick:{fontSize:11}}),(0,I.jsx)(vS,{}),i.length>1&&(0,I.jsx)(Fx,{}),i.map((e,t)=>(0,I.jsx)(uF,{dataKey:e,fill:a[t%a.length],radius:[4,4,0,0]},e))]}):t===`line`?(0,I.jsxs)(OR,{data:n,children:[(0,I.jsx)(zI,{strokeDasharray:`3 3`,opacity:.3}),(0,I.jsx)(xL,{dataKey:r,tick:{fontSize:11}}),(0,I.jsx)(AL,{tick:{fontSize:11}}),(0,I.jsx)(vS,{}),i.length>1&&(0,I.jsx)(Fx,{}),i.map((e,t)=>(0,I.jsx)($I,{type:`monotone`,dataKey:e,stroke:a[t%a.length],strokeWidth:2,dot:{r:4}},e))]}):t===`area`?(0,I.jsxs)(jR,{data:n,children:[(0,I.jsx)(zI,{strokeDasharray:`3 3`,opacity:.3}),(0,I.jsx)(xL,{dataKey:r,tick:{fontSize:11}}),(0,I.jsx)(AL,{tick:{fontSize:11}}),(0,I.jsx)(vS,{}),i.length>1&&(0,I.jsx)(Fx,{}),i.map((e,t)=>(0,I.jsx)(fL,{type:`monotone`,dataKey:e,stroke:a[t%a.length],fill:a[t%a.length],fillOpacity:.2,strokeWidth:2},e))]}):t===`pie`?(0,I.jsxs)(AR,{children:[(0,I.jsx)(OP,{data:n,dataKey:i[0]||`value`,nameKey:r,cx:`50%`,cy:`50%`,outerRadius:80,label:!0,children:n.map((e,t)=>(0,I.jsx)(ES,{fill:a[t%a.length]},t))}),(0,I.jsx)(vS,{}),(0,I.jsx)(Fx,{})]}):null;return(0,I.jsxs)(XR,{className:`bg-background/60 border-primary/20`,children:[e.title&&(0,I.jsx)(ZR,{className:`pb-2`,children:(0,I.jsx)(QR,{className:`text-sm font-semibold`,children:String(e.title)})}),(0,I.jsx)(ez,{className:`pt-0`,children:(0,I.jsx)(TS,{width:`100%`,height:260,children:o||(0,I.jsx)(kR,{data:[]})})})]})}function gCe(e){let t=e.id,n=e.onInteraction,r=e.fields||[],[i,a]=(0,_.useState)({}),o=(e,t)=>{a(n=>({...n,[e]:t}))};return(0,I.jsxs)(XR,{className:`bg-background/60 border-primary/20`,children:[e.title&&(0,I.jsx)(ZR,{children:(0,I.jsx)(QR,{className:`text-sm font-semibold`,children:String(e.title)})}),(0,I.jsx)(ez,{className:`space-y-4`,children:r.map(e=>(0,I.jsxs)(`div`,{className:`space-y-1`,children:[e.type!==`checkbox`&&(0,I.jsx)(Z,{htmlFor:e.name,children:e.label}),e.type===`textarea`?(0,I.jsx)(xG,{id:e.name,placeholder:e.placeholder,value:i[e.name]||``,onChange:t=>o(e.name,t.target.value)}):e.type===`select`?(0,I.jsxs)(ZK,{value:i[e.name]||``,onValueChange:t=>o(e.name,t),children:[(0,I.jsx)(eq,{id:e.name,children:(0,I.jsx)($K,{placeholder:e.placeholder||`Select ${e.label}`})}),(0,I.jsx)(rq,{children:e.options?.map(e=>(0,I.jsx)(Q,{value:e.value,children:e.label},e.value))})]}):e.type===`checkbox`?(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(d$,{id:e.name,checked:i[e.name]||!1,onCheckedChange:t=>o(e.name,t)}),(0,I.jsx)(Z,{htmlFor:e.name,children:e.label})]}):(0,I.jsx)(G,{id:e.name,type:e.type,placeholder:e.placeholder,value:i[e.name]||``,onChange:t=>o(e.name,t.target.value)})]},e.name))}),(0,I.jsx)(tz,{children:(0,I.jsx)(W,{className:`w-full`,onClick:()=>n?.(t,`submit`,i),children:String(e.submitLabel||`Submit`)})})]})}function _Ce(e){let[t,n]=(0,_.useState)(!0);return(0,I.jsxs)(wSe,{open:t,onOpenChange:n,children:[(0,I.jsx)(TSe,{asChild:!0,children:(0,I.jsx)(W,{variant:`outline`,children:String(e.triggerLabel||`Open`)})}),(0,I.jsx)(O7,{className:`w-64`,children:e.content?(0,I.jsx)(`div`,{className:`prose prose-invert max-w-none text-sm`,children:(0,I.jsx)(XQ,{children:String(e.content)})}):null})]})}function vCe(e){return(0,I.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-3 py-6`,children:[(0,I.jsx)(`div`,{className:`animate-bounce`,children:(0,I.jsxs)(`svg`,{width:`48`,height:`48`,viewBox:`0 0 48 48`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,I.jsx)(`ellipse`,{cx:`24`,cy:`28`,rx:`12`,ry:`10`,fill:`#F59E0B`}),(0,I.jsx)(`rect`,{x:`14`,y:`26`,width:`20`,height:`3`,rx:`1`,fill:`#1C1917`,opacity:`0.6`}),(0,I.jsx)(`rect`,{x:`14`,y:`31`,width:`20`,height:`3`,rx:`1`,fill:`#1C1917`,opacity:`0.6`}),(0,I.jsx)(`ellipse`,{cx:`24`,cy:`18`,rx:`7`,ry:`7`,fill:`#F59E0B`}),(0,I.jsx)(`circle`,{cx:`21`,cy:`17`,r:`1.5`,fill:`#1C1917`}),(0,I.jsx)(`circle`,{cx:`27`,cy:`17`,r:`1.5`,fill:`#1C1917`}),(0,I.jsx)(`line`,{x1:`22`,y1:`11`,x2:`18`,y2:`7`,stroke:`#1C1917`,strokeWidth:`1.5`,strokeLinecap:`round`}),(0,I.jsx)(`line`,{x1:`26`,y1:`11`,x2:`30`,y2:`7`,stroke:`#1C1917`,strokeWidth:`1.5`,strokeLinecap:`round`}),(0,I.jsx)(`circle`,{cx:`18`,cy:`7`,r:`1.5`,fill:`#1C1917`}),(0,I.jsx)(`circle`,{cx:`30`,cy:`7`,r:`1.5`,fill:`#1C1917`}),(0,I.jsx)(`ellipse`,{cx:`14`,cy:`22`,rx:`7`,ry:`4`,fill:`white`,opacity:`0.7`,transform:`rotate(-20 14 22)`}),(0,I.jsx)(`ellipse`,{cx:`34`,cy:`22`,rx:`7`,ry:`4`,fill:`white`,opacity:`0.7`,transform:`rotate(20 34 22)`}),(0,I.jsx)(`path`,{d:`M24 38 L21 44 L24 42 L27 44 Z`,fill:`#F59E0B`})]})}),e.message&&(0,I.jsx)(`p`,{className:`text-sm text-muted-foreground animate-pulse`,children:String(e.message)})]})}function k7(e){return(0,I.jsxs)(`div`,{className:`rounded-lg border bg-muted/20 p-4`,children:[(0,I.jsx)(`div`,{className:`mb-2 text-[10px] font-bold uppercase text-muted-foreground`,children:`JSON Data`}),(0,I.jsx)(`pre`,{className:`overflow-auto text-[10px] text-muted-foreground/80`,children:JSON.stringify(e,null,2)})]})}var yCe={alert:ESe,"alert-dialog":fCe,button:DSe,badge:OSe,card:kSe,carousel:pCe,chart:hCe,input:ASe,label:jSe,textarea:MSe,checkbox:NSe,switch:PSe,"radio-group":FSe,select:ISe,slider:LSe,progress:RSe,table:zSe,tabs:BSe,avatar:VSe,separator:HSe,skeleton:USe,"scroll-area":WSe,tooltip:GSe,dialog:KSe,drawer:qSe,sheet:JSe,"dropdown-menu":YSe,command:XSe,"context-menu":ZSe,menubar:QSe,"navigation-menu":$Se,accordion:eCe,collapsible:tCe,resizable:nCe,breadcrumb:rCe,pagination:iCe,toggle:aCe,"toggle-group":oCe,calendar:sCe,"aspect-ratio":cCe,"hover-card":lCe,"input-otp":uCe,form:gCe,popover:_Ce,"bee-loader":vCe,markdown:dCe,custom:k7};function bCe(e){return yCe[e]||k7}var xCe=({renderFn:e,...t})=>(0,I.jsx)(I.Fragment,{children:e(t)}),SCe=({component:e,onInteraction:t})=>{let{type:n,props:r,id:i}=e,a=bCe(n);return(0,I.jsx)(`div`,{"data-canvas-type":n,"data-canvas-id":i,children:(0,I.jsx)(xCe,{renderFn:a,...r,id:i,onInteraction:t})})},A7=Gh((e,t)=>({components:[],selectedComponentId:null,isConnected:!1,graphNodes:[],graphEdges:[],zoomLevel:1,panX:0,panY:0,setComponents:t=>e({components:t}),addComponent:t=>e(e=>({components:[...e.components,t]})),removeComponent:t=>e(e=>({components:e.components.filter(e=>e.id!==t)})),selectComponent:t=>e({selectedComponentId:t}),setIsConnected:t=>e({isConnected:t}),setGraphSnapshot:(t,n)=>e({graphNodes:t,graphEdges:n}),addGraphNode:t=>e(e=>e.graphNodes.find(e=>e.id===t.id)?{graphNodes:e.graphNodes.map(e=>e.id===t.id?t:e)}:{graphNodes:[...e.graphNodes,t]}),updateGraphNode:(t,n)=>e(e=>({graphNodes:e.graphNodes.map(e=>e.id===t?{...e,...n}:e)})),removeGraphNode:t=>e(e=>({graphNodes:e.graphNodes.filter(e=>e.id!==t),graphEdges:e.graphEdges.filter(e=>e.source!==t&&e.target!==t)})),addGraphEdge:t=>e(e=>e.graphEdges.find(e=>e.id===t.id)?e:{graphEdges:[...e.graphEdges,t]}),setZoomLevel:t=>e({zoomLevel:Math.max(.25,Math.min(2,t))}),zoomIn:()=>e(e=>({zoomLevel:Math.max(.25,Math.min(2,e.zoomLevel+.25))})),zoomOut:()=>e(e=>({zoomLevel:Math.max(.25,Math.min(2,e.zoomLevel-.25))})),resetView:()=>e({zoomLevel:1,panX:0,panY:0}),setPan:(t,n)=>e({panX:t,panY:n}),init:()=>{let n=eg.getState();e({isConnected:n.status===`connected`}),n.status===`connected`&&n.send({type:`canvas_subscribe`});let r=[eg.subscribe(t=>{e({isConnected:t.status===`connected`})}),n.subscribe(`canvas:snapshot`,t=>{let n=t.data;if(n&&Array.isArray(n.nodes)&&Array.isArray(n.edges)){let t={graphNodes:n.nodes,graphEdges:n.edges};Array.isArray(n.components)&&(t.components=n.components),e(t)}}),n.subscribe(`canvas:node_add`,e=>{let n=e.data;if(n?.id){let e=n.data??{},r={id:n.id,type:n.type,name:n.label??n.name??n.id,status:e.status??n.status??`pending`,data:e};t().addGraphNode(r)}}),n.subscribe(`canvas:node_update`,e=>{let n=e.data,r=n?.id??n?.nodeId;if(r){let e=n.data??n.changes??{},i={};e.status&&(i.status=e.status),i.data={...t().graphNodes.find(e=>e.id===r)?.data??{},...e},t().updateGraphNode(r,i)}}),n.subscribe(`canvas:node_remove`,e=>{let n=e.data;n?.id&&t().removeGraphNode(n.id)}),n.subscribe(`canvas:edge_add`,e=>{let n=e.data;n?.id&&t().addGraphEdge(n)}),n.subscribe(`canvas:render`,t=>{let n=t.data?.component??t.component;n&&e(e=>e.components.find(e=>e.id===n.id)?{components:e.components.map(e=>e.id===n.id?n:e)}:{components:[...e.components,n]})}),n.subscribe(`canvas:clear`,()=>e({components:[]})),n.subscribe(`canvas:ask`,t=>{let n=t.data??{},r={id:n.id||`ask_${Date.now()}`,type:`form`,props:{question:n.question,fields:n.fields??[],raw:n},position:{x:0,y:0},size:{width:400,height:300},agentId:n.agentId||``};e(e=>e.components.find(e=>e.id===r.id)?{components:e.components.map(e=>e.id===r.id?r:e)}:{components:[...e.components,r]})}),n.subscribe(`canvas:confirm`,t=>{let n=t.data??{},r={id:n.id||`confirm_${Date.now()}`,type:`alert-dialog`,props:{message:n.message,confirmLabel:n.confirmLabel??`Confirmar`,cancelLabel:n.cancelLabel??`Cancelar`,raw:n},position:{x:0,y:0},size:{width:400,height:200},agentId:n.agentId||``};e(e=>e.components.find(e=>e.id===r.id)?{components:e.components.map(e=>e.id===r.id?r:e)}:{components:[...e.components,r]})})];return()=>r.forEach(e=>e())},sendMessage:e=>{eg.getState().send(e)}})),CCe={active:`Activo`,pending:`Pendiente`,in_progress:`En progreso`,paused:`Pausado`,idle:`Disponible`,completed:`Completado`,done:`Completado`,failed:`Fallido`,blocked:`Bloqueado`,running:`Ejecutando`,thinking:`Pensando`,tool_call:`Usando Herramienta`};function wCe({status:e}){switch(e){case`completed`:return(0,I.jsx)(dn,{className:`h-3.5 w-3.5 text-green-400`});case`in_progress`:return(0,I.jsx)(Xn,{className:`h-3.5 w-3.5 text-yellow-400 animate-spin`});case`failed`:return(0,I.jsx)(mn,{className:`h-3.5 w-3.5 text-red-400`});case`blocked`:return(0,I.jsx)(fn,{className:`h-3.5 w-3.5 text-orange-400`});default:return(0,I.jsx)(hn,{className:`h-3.5 w-3.5 text-muted-foreground`})}}function TCe({node:e}){let t=e.data?.currentTool??null,n=e.status===`thinking`,r=e.status===`tool_call`,i=n||r,a=e.data?.role===`coordinator`;return(0,I.jsxs)(`div`,{className:`relative group w-64 rounded-xl p-5 flex flex-col gap-3 transition-all duration-300
241
- bg-[rgba(255,255,255,0.03)] backdrop-blur-xl border
242
- ${n?`border-purple-500/40 shadow-[0_0_20px_rgba(168,85,247,0.25)]`:a?`border-purple-500/20 shadow-[0_0_16px_rgba(168,85,247,0.1)] hover:border-purple-500/40`:`border-white/[0.08] hover:border-blue-500/30 hover:shadow-[0_0_15px_rgba(59,130,246,0.12)]`}
243
- `,children:[(0,I.jsxs)(`div`,{className:`flex justify-between items-start`,children:[(0,I.jsx)(`div`,{className:`p-2.5 rounded-lg ${a?`bg-purple-500/10`:`bg-blue-500/10`}`,children:a?(0,I.jsx)(Tr,{className:`h-6 w-6 text-purple-400`}):(0,I.jsx)(Zt,{className:`h-6 w-6 text-blue-400 ${i?`animate-pulse`:``}`})}),(0,I.jsx)(`span`,{className:`text-[9px] px-2 py-0.5 rounded-full font-bold uppercase border
244
- ${a?`bg-purple-500/10 text-purple-400 border-purple-500/20`:`bg-blue-500/10 text-blue-400 border-blue-500/20`}`,children:a?`Coordinador`:`Worker`})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h3`,{className:`font-bold text-white text-base leading-tight truncate`,children:e.name}),(0,I.jsxs)(`div`,{className:`flex items-center gap-1.5 mt-1.5`,children:[n?(0,I.jsxs)(`div`,{className:`flex gap-0.5`,children:[(0,I.jsx)(`span`,{className:`w-1 h-1 rounded-full bg-purple-400 animate-bounce`}),(0,I.jsx)(`span`,{className:`w-1 h-1 rounded-full bg-purple-400 animate-bounce [animation-delay:-0.15s]`}),(0,I.jsx)(`span`,{className:`w-1 h-1 rounded-full bg-purple-400 animate-bounce [animation-delay:-0.3s]`})]}):(0,I.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full shrink-0 ${e.status===`active`||e.status===`running`?`bg-green-400`:e.status===`idle`?`bg-emerald-400`:e.status===`tool_call`?`bg-cyan-400`:e.status===`error`?`bg-red-400`:`bg-gray-500`}`}),(0,I.jsx)(`span`,{className:`text-[10px] text-white/50 font-medium uppercase tracking-widest`,children:CCe[e.status]??e.status})]})]}),(r||n)&&t&&(0,I.jsxs)(`div`,{className:`flex items-center gap-1.5 bg-cyan-500/5 border border-cyan-500/10 rounded-md px-2 py-1`,children:[(0,I.jsx)(Ar,{className:`h-3 w-3 text-cyan-400/70 shrink-0`}),(0,I.jsxs)(`span`,{className:`text-[9px] font-mono text-cyan-400/80 truncate`,children:[`⚙ `,t]})]}),e.data?.model&&(0,I.jsxs)(`div`,{className:`absolute -top-[72px] left-1/2 -translate-x-1/2 w-44 p-3 bg-[#1c1b1d] border border-white/10 rounded-lg shadow-2xl opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none z-50`,children:[(0,I.jsxs)(`div`,{className:`text-[10px] text-white/50 flex justify-between mb-1`,children:[`Modelo: `,(0,I.jsx)(`span`,{className:`text-white font-mono text-[9px]`,children:e.data.model})]}),e.data?.tools!=null&&(0,I.jsxs)(`div`,{className:`text-[10px] text-white/50 flex justify-between`,children:[`Tools: `,(0,I.jsx)(`span`,{className:`text-white`,children:e.data.tools})]}),(0,I.jsx)(`div`,{className:`absolute bottom-[-5px] left-1/2 -translate-x-1/2 w-2.5 h-2.5 bg-[#1c1b1d] border-r border-b border-white/10 rotate-45`})]})]})}function ECe({node:e}){return(0,I.jsxs)(`div`,{className:`w-48 p-3 rounded-xl flex items-center gap-3 bg-[rgba(255,255,255,0.03)] backdrop-blur-xl border border-teal-500/20 hover:border-teal-500/40 transition-all duration-300`,children:[(0,I.jsx)(`div`,{className:`p-1.5 bg-teal-500/10 rounded-lg shrink-0`,children:(0,I.jsx)(yr,{className:`h-4 w-4 text-teal-400`})}),(0,I.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,I.jsx)(`div`,{className:`text-[9px] text-teal-400 font-bold uppercase tracking-tight`,children:`MCP Server`}),(0,I.jsx)(`div`,{className:`text-sm font-bold text-white truncate`,children:e.name})]}),(0,I.jsx)(`div`,{className:`h-1.5 w-1.5 rounded-full shrink-0 ${e.status===`connected`||e.status===`active`?`bg-teal-400`:`bg-gray-500`}`})]})}function DCe({node:e,tasks:t}){let[n,r]=(0,_.useState)(!0),i=e.data?.progress??0,a=e.data?.projectType??`general`;return(0,I.jsxs)(`div`,{className:`rounded-xl overflow-hidden bg-[rgba(255,255,255,0.03)] backdrop-blur-xl border border-blue-500/20 hover:border-blue-500/40 transition-all duration-300 w-72`,children:[(0,I.jsxs)(`button`,{className:`w-full flex items-center gap-3 p-4 text-left hover:bg-blue-500/5 transition-colors`,onClick:()=>r(!n),children:[(0,I.jsx)(`div`,{className:`p-1.5 bg-blue-500/10 rounded-lg shrink-0`,children:(0,I.jsx)(Nn,{className:`h-4 w-4 text-blue-400`})}),(0,I.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`text-sm font-bold text-white truncate`,children:e.name}),(0,I.jsx)(`span`,{className:`text-[9px] text-blue-400 font-bold uppercase tracking-tight shrink-0`,children:a})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2 mt-1.5`,children:[(0,I.jsx)(yB,{value:i,className:`h-1 flex-1`}),(0,I.jsxs)(`span`,{className:`text-[10px] text-white/40 shrink-0 font-mono`,children:[i,`%`]})]})]})]}),n&&t.length>0&&(0,I.jsx)(`div`,{className:`border-t border-white/[0.06] p-3 space-y-2`,children:t.map(e=>{let t=e.data?.progress??0;return(0,I.jsxs)(`div`,{className:`flex items-center gap-2.5 px-3 py-2 rounded-lg border ${e.status===`in_progress`?`bg-blue-500/10 border-blue-500/20`:e.status===`completed`?`bg-white/[0.03] border-white/5`:`bg-white/[0.02] border-white/5 opacity-50`}`,children:[(0,I.jsx)(wCe,{status:e.status}),(0,I.jsx)(`span`,{className:`text-[11px] flex-1 text-white/70 truncate`,children:e.name}),e.status===`in_progress`&&(0,I.jsx)(`div`,{className:`w-10 shrink-0`,children:(0,I.jsx)(yB,{value:t,className:`h-1`})}),(0,I.jsxs)(`span`,{className:`text-[10px] text-white/30 font-mono shrink-0`,children:[t,`%`]})]},e.id)})}),n&&t.length===0&&(0,I.jsx)(`div`,{className:`border-t border-white/[0.06] px-4 py-3 text-xs text-white/30`,children:`Sin tareas`})]})}function OCe({nodes:e,edges:t}){let n=e.filter(e=>e.type===`agent`),r=e.filter(e=>e.type===`mcp`),i=e.filter(e=>e.type===`project`),a=e.filter(e=>e.type===`task`),o=new Map;for(let e of t)if(e.edgeType===`contains`){let t=e.source,n=e.target,r=a.find(e=>e.id===n);r&&(o.has(t)||o.set(t,[]),o.get(t).push(r))}return e.length===0?(0,I.jsxs)(`div`,{className:`hive-empty-state`,children:[(0,I.jsx)(Kt,{className:`h-10 w-10 opacity-30`}),(0,I.jsx)(`p`,{className:`text-sm mt-3`,children:`Sin agentes ni proyectos activos`})]}):(0,I.jsxs)(`div`,{className:`flex gap-6 h-full`,children:[(0,I.jsxs)(`div`,{className:`flex-1 min-w-0 space-y-8`,children:[(0,I.jsx)(`div`,{className:`flex items-center gap-3 flex-wrap`,children:[{color:`bg-green-400`,label:`Activo`},{color:`bg-purple-400`,label:`Pensando`},{color:`bg-cyan-400`,label:`Herramienta`},{color:`bg-emerald-400`,label:`Disponible`},{color:`bg-red-400`,label:`Error`},{color:`bg-teal-400`,label:`MCP`}].map(({color:e,label:t})=>(0,I.jsxs)(`div`,{className:`flex items-center gap-1.5 bg-white/[0.03] backdrop-blur-md px-3 py-1.5 rounded-full border border-white/[0.06]`,children:[(0,I.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full ${e}`}),(0,I.jsx)(`span`,{className:`text-[10px] font-bold tracking-wider text-white/50 uppercase`,children:t})]},t))}),n.length>0&&(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`p`,{className:`hive-label mb-3`,children:`Agentes`}),(0,I.jsx)(`div`,{className:`flex flex-wrap gap-4`,children:n.map(e=>(0,I.jsx)(TCe,{node:e},e.id))})]}),i.length>0&&(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`p`,{className:`hive-label mb-3`,children:`Proyectos`}),(0,I.jsx)(`div`,{className:`flex flex-wrap gap-4`,children:i.map(e=>(0,I.jsx)(DCe,{node:e,tasks:o.get(e.id)??[]},e.id))})]})]}),r.length>0&&(0,I.jsxs)(`div`,{className:`shrink-0 w-52`,children:[(0,I.jsx)(`p`,{className:`hive-label mb-3`,children:`MCP Servers`}),(0,I.jsx)(`div`,{className:`flex flex-col gap-3`,children:r.map(e=>(0,I.jsx)(ECe,{node:e},e.id))})]})]})}function kCe({sessionId:e}){let t=xg(e=>e.currentUser),n=A7(e=>e.isConnected),r=A7(e=>e.components),i=A7(e=>e.graphNodes),a=A7(e=>e.graphEdges),o=A7(e=>e.zoomLevel),s=A7(e=>e.init),c=A7(e=>e.sendMessage),l=A7(e=>e.removeComponent),u=A7(e=>e.zoomIn),d=A7(e=>e.zoomOut),f=A7(e=>e.resetView),p=e||t?.id||`default`;(0,_.useEffect)(()=>s(),[s]);let m=(0,_.useCallback)((e,t,n)=>{c({type:`canvas:interact`,componentId:e,action:t,data:n}),l(e)},[c,l]);return(0,I.jsxs)(`div`,{className:`hive-card flex h-full flex-col shadow-2xl`,children:[(0,I.jsxs)(`div`,{className:`flex flex-row items-center justify-between space-y-0 border-b border-white/5 bg-white/5 px-6 py-4`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,I.jsx)(`div`,{className:`hive-icon-wrap hive-icon-wrap--primary`,children:(0,I.jsx)(ir,{className:`h-5 w-5`})}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h2`,{className:`hive-title-page !text-lg`,children:`Canvas`}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-white/40 mt-0.5`,children:[(0,I.jsx)(Pr,{className:`h-3 w-3`}),(0,I.jsx)(`span`,{className:`font-mono`,children:p})]})]})]}),(0,I.jsx)($z,{variant:`outline`,className:`flex items-center gap-1.5 px-3 py-1 transition-all duration-500 border ${n?`bg-emerald-500/15 text-emerald-500 border-emerald-500/20 hover:bg-emerald-500/20`:`bg-red-500/15 text-red-500 border-red-500/20 hover:bg-red-500/20`}`,children:n?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Rr,{className:`h-3.5 w-3.5 animate-pulse`}),(0,I.jsx)(`span`,{className:`font-semibold uppercase tracking-wider text-[10px]`,children:`Live`})]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Lr,{className:`h-3.5 w-3.5`}),(0,I.jsx)(`span`,{className:`font-semibold uppercase tracking-wider text-[10px]`,children:`Offline`})]})})]}),(0,I.jsxs)(`div`,{className:`relative flex flex-1 flex-col overflow-hidden`,style:{backgroundImage:`radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px)`,backgroundSize:`40px 40px`},children:[(0,I.jsxs)(VJ,{className:`flex-1 p-6`,children:[(0,I.jsx)(`div`,{className:`origin-top-left transition-transform duration-200 ease-out`,style:{transform:`translate(${o===1?0:o*20}px, 0) scale(${o})`},children:(0,I.jsx)(OCe,{nodes:i,edges:a})}),r.length>0&&(0,I.jsxs)(`div`,{className:`mt-8`,children:[(0,I.jsx)(`p`,{className:`hive-label mb-3`,children:`Componentes`}),(0,I.jsx)(`div`,{className:`grid grid-cols-1 gap-4 lg:grid-cols-2 xl:grid-cols-3`,children:r.map(e=>(0,I.jsx)(SCe,{component:e,onInteraction:m},e.id))})]})]}),(0,I.jsxs)(`div`,{className:`absolute bottom-12 left-1/2 -translate-x-1/2 flex items-center gap-1 px-4 py-2 rounded-full border border-white/10 bg-[#1c1b1d]/70 backdrop-blur-xl shadow-[0_0_20px_rgba(59,130,246,0.08)]`,children:[(0,I.jsx)(`button`,{className:`p-2 text-white/40 hover:text-white hover:scale-110 transition-all duration-150 active:scale-90`,onClick:u,title:`Acercar`,children:(0,I.jsx)(Hr,{className:`h-4 w-4`})}),(0,I.jsx)(`button`,{className:`p-2 text-white/40 hover:text-white hover:scale-110 transition-all duration-150 active:scale-90`,onClick:d,title:`Alejar`,children:(0,I.jsx)(Ur,{className:`h-4 w-4`})}),(0,I.jsx)(`div`,{className:`w-px h-4 bg-white/10 mx-1`}),(0,I.jsx)(`button`,{className:`p-2 text-blue-400 bg-blue-500/10 rounded-full hover:bg-blue-500/20 transition-all duration-150 active:scale-90`,onClick:f,title:`Centrar vista`,children:(0,I.jsx)(pr,{className:`h-4 w-4`})})]}),(0,I.jsx)(`div`,{className:`border-t border-white/5 bg-white/[0.02] px-6 py-2.5`,children:(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(Ar,{className:`h-3 w-3 text-white/30`}),(0,I.jsx)(`span`,{className:`hive-mono`,children:n?`Sincronizado · ${i.length} nodos · ${a.length} conexiones`:`Reconectando...`})]})})]})]})}function j7(){let{sessionId:e}=Bd(),{currentUser:t}=xg(),n=e&&e!==`default`?e:t?.id;return n?(0,I.jsx)(`div`,{className:`flex h-[calc(100vh-4rem)] flex-col bg-background/50 backdrop-blur-sm`,children:(0,I.jsx)(`div`,{className:`flex-1 overflow-hidden p-4 lg:p-8`,children:(0,I.jsx)(`div`,{className:`mx-auto h-full max-w-7xl`,children:(0,I.jsx)(kCe,{sessionId:n})})})}):(0,I.jsx)(`div`,{className:`flex h-[calc(100vh-4rem)] items-center justify-center`,children:(0,I.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[(0,I.jsx)(`div`,{className:`h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent`}),(0,I.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Cargando sesión...`})]})})}var ACe={connected:{label:`Conectado`,className:`bg-hive-connected/15 text-hive-connected border-hive-connected/30`},connecting:{label:`Conectando…`,className:`bg-hive-thinking/15 text-hive-thinking border-hive-thinking/30 animate-pulse-slow`},disconnected:{label:`Desconectado`,className:`bg-destructive/15 text-destructive border-destructive/30`},error:{label:`Error`,className:`bg-destructive/15 text-destructive border-destructive/30`}};function jCe({status:e}){let t=ACe[e];return(0,I.jsxs)($z,{variant:`outline`,className:t.className,children:[(0,I.jsx)(`span`,{className:`mr-1.5 inline-block h-1.5 w-1.5 rounded-full bg-current`}),t.label]})}var M7=window.location.hostname===`0.0.0.0`?`localhost`:window.location.hostname,N7=window.location.protocol===`https:`?`wss:`:`ws:`,MCe=`${N7}//${M7}:18791/ws`,NCe=`${$h()}/bridge-events`;function PCe(){return Math.random().toString(36).substring(2,15)}function P7(e,t,n=`system`){return{id:PCe(),processId:n,level:e,message:t,timestamp:new Date().toISOString()}}var F7=!1,I7=0,FCe=3,L7=!1,R7=null,z7=null,B7=Gh((e,t)=>({processes:[],logs:[],isConnected:!1,socket:null,gatewaySocket:null,addProcess:t=>e(e=>({processes:[...e.processes,t]})),removeProcess:t=>e(e=>({processes:e.processes.filter(e=>e.id!==t)})),updateProcess:(t,n)=>e(e=>({processes:e.processes.map(e=>e.id===t?{...e,...n}:e)})),addLog:t=>e(e=>({logs:[t,...e.logs].slice(0,500)})),clearLogs:()=>e({logs:[]}),sendCommand:e=>{let{socket:n,isConnected:r}=t();n&&r&&n.send(JSON.stringify(e))},connect:()=>{let{socket:n,isConnected:r}=t();if(!(n||r)&&N7!==`wss:`){F7=!0;try{let n=new WebSocket(MCe);n.onmessage=r=>{try{let i=JSON.parse(r.data);if(i.type===`ping`){n.send(JSON.stringify({cmd:`ping`}));return}if(i.type===`pong`){console.log(`[Bridge] ✅ Heartbeat acknowledged by server`);return}if(i.type===`code-bridge:status`&&Array.isArray(i.agents)&&e({processes:i.agents.map(e=>({id:e.taskId,name:e.role,command:e.cli,status:e.state,pid:e.pid,startedAt:new Date().toISOString(),output:[]}))}),i.type===`agent:started`){let e={id:i.taskId,name:i.role,command:i.cli,status:`running`,pid:i.pid,startedAt:new Date().toISOString(),output:[]};t().addProcess(e),t().addLog(P7(`info`,`Agent started: ${i.role} (PID: ${i.pid})`,i.taskId))}if(i.type===`agent:output`){let e=t().processes.find(e=>e.id===i.taskId);e&&t().updateProcess(i.taskId,{output:[...e.output,i.chunk]})}i.type===`agent:finished`&&(t().updateProcess(i.taskId,{status:`completed`}),t().addLog(P7(`info`,`Agent finished: ${i.role}`,i.taskId))),i.type===`agent:error`&&(t().updateProcess(i.taskId,{status:`error`}),t().addLog(P7(`error`,i.message,i.taskId))),i.type===`agent:cancelled`&&(t().updateProcess(i.taskId,{status:`stopped`}),t().addLog(P7(`warn`,`Agent cancelled: ${i.role}`,i.taskId)))}catch{}},n.onopen=()=>{I7=0,e({isConnected:!0,socket:n}),t().addLog(P7(`info`,`Connected to Code Bridge`)),t().sendCommand({cmd:`status`}),R7&&clearInterval(R7),R7=setInterval(()=>{n.readyState===WebSocket.OPEN&&(console.log(`[Bridge] 💓 Sending heartbeat...`),n.send(JSON.stringify({cmd:`ping`})))},15e3)},n.onerror=()=>{},n.onclose=()=>{if(R7&&=(clearInterval(R7),null),e({isConnected:!1,socket:null}),F7){if(I7++,I7>FCe){F7=!1;return}setTimeout(()=>{F7&&!t().isConnected&&t().connect()},5e3)}},e({socket:n})}catch{e({isConnected:!1,socket:null})}}},connectGateway:()=>{let{gatewaySocket:n}=t();if(!n){L7=!0;try{let n=new WebSocket(NCe);n.onopen=()=>{e({isConnected:!0}),t().addLog(P7(`info`,`Connected to gateway bridge events`)),z7&&clearInterval(z7),z7=setInterval(()=>{n.readyState===WebSocket.OPEN&&n.send(JSON.stringify({type:`ping`}))},3e4)},n.onmessage=e=>{try{let n=JSON.parse(e.data);if(n.type===`bridge:cmd_start`){let e=n.data,r={id:e.processId,name:e.name??`terminal`,command:e.command,status:`running`,pid:0,startedAt:new Date().toISOString(),output:[]};t().addProcess(r),t().addLog(P7(`info`,`$ ${e.command}${e.cwd?` (in ${e.cwd})`:``}`,e.processId))}if(n.type===`bridge:cmd_output`){let e=n.data,r=t().processes.find(t=>t.id===e.processId);r&&t().updateProcess(e.processId,{output:[...r.output,e.chunk]}),t().addLog(P7(e.stream===`stderr`?`warn`:`info`,e.chunk,e.processId))}if(n.type===`bridge:cmd_done`){let e=n.data;t().updateProcess(e.processId,{status:e.success?`completed`:`error`}),t().addLog(P7(e.success?`info`:`error`,`Exit code: ${e.exitCode}`,e.processId))}if(n.type===`bridge:cmd_error`){let e=n.data;t().updateProcess(e.processId,{status:`error`}),t().addLog(P7(`error`,e.message,e.processId))}}catch{}},n.onerror=()=>{},n.onclose=()=>{z7&&=(clearInterval(z7),null),e({gatewaySocket:null,isConnected:!1}),L7&&setTimeout(()=>{L7&&!t().gatewaySocket&&t().connectGateway()},5e3)},e({gatewaySocket:n})}catch{e({gatewaySocket:null})}}},disconnect:()=>{F7=!1,L7=!1,R7&&=(clearInterval(R7),null),z7&&=(clearInterval(z7),null);let{socket:n,gatewaySocket:r}=t();n&&(n.close(),e({socket:null,isConnected:!1})),r&&(r.close(),e({gatewaySocket:null}))}})),ICe={running:`bg-yellow-500/10 text-yellow-400 border-yellow-500/20`,completed:`bg-green-500/10 text-green-400 border-green-500/20`,finished:`bg-green-500/10 text-green-400 border-green-500/20`,error:`bg-red-500/10 text-red-400 border-red-500/20`,stopped:`bg-gray-500/10 text-gray-400 border-gray-500/20`};function LCe({status:e}){switch(e){case`running`:return(0,I.jsx)(Xn,{className:`h-3.5 w-3.5 text-yellow-400 animate-spin`});case`completed`:case`finished`:return(0,I.jsx)(dn,{className:`h-3.5 w-3.5 text-green-400`});case`error`:return(0,I.jsx)(mn,{className:`h-3.5 w-3.5 text-red-400`});case`stopped`:return(0,I.jsx)(pn,{className:`h-3.5 w-3.5 text-gray-400`});default:return(0,I.jsx)(Ar,{className:`h-3.5 w-3.5 text-muted-foreground`})}}function RCe(){let e=B7(e=>e.processes);return e.length===0?(0,I.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-8 text-center text-muted-foreground`,children:[(0,I.jsx)(Ar,{className:`h-8 w-8 opacity-30 mb-2`}),(0,I.jsx)(`p`,{className:`text-sm`,children:`Sin procesos activos`}),(0,I.jsx)(`p`,{className:`text-xs opacity-60 mt-1`,children:`Los comandos ejecutados por el agente aparecerán aquí`})]}):(0,I.jsx)(`div`,{className:`space-y-2 p-1`,children:e.map(e=>(0,I.jsxs)(`div`,{className:`rounded-lg border border-border bg-card/50 p-3`,children:[(0,I.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,I.jsx)(LCe,{status:e.status}),(0,I.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,I.jsx)(`span`,{className:`text-sm font-medium font-mono truncate`,children:e.name}),e.pid>0&&(0,I.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`PID: `,e.pid]}),(0,I.jsx)($z,{variant:`outline`,className:`text-[10px] px-1.5 py-0 ml-auto ${ICe[e.status]??``}`,children:e.status})]}),e.command&&(0,I.jsxs)(`p`,{className:`text-xs text-muted-foreground font-mono mt-0.5 truncate`,children:[`$ `,e.command]}),e.status===`running`&&(0,I.jsx)(yB,{value:void 0,className:`h-0.5 mt-2`})]})]}),e.output.length>0&&(0,I.jsx)(`div`,{className:`mt-2 rounded bg-black/30 px-2 py-1.5 max-h-24 overflow-y-auto`,children:(0,I.jsx)(`pre`,{className:`text-[10px] font-mono text-green-400/80 whitespace-pre-wrap break-all`,children:e.output.slice(-20).join(``)})})]},e.id))})}var zCe={info:`text-foreground/80`,warn:`text-yellow-400`,error:`text-red-400`,debug:`text-muted-foreground/60`},BCe={info:` `,warn:`! `,error:`✗ `,debug:`· `};function VCe(){let e=B7(e=>e.logs),t=B7(e=>e.clearLogs);return(0,I.jsxs)(`div`,{className:`flex flex-col h-full`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-2 border-b border-border`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,I.jsx)(Ar,{className:`h-3.5 w-3.5`}),(0,I.jsx)(`span`,{className:`font-mono uppercase tracking-wider`,children:`Terminal Log`}),(0,I.jsxs)(`span`,{className:`text-muted-foreground/50`,children:[`(`,e.length,`)`]})]}),e.length>0&&(0,I.jsxs)(W,{variant:`ghost`,size:`sm`,className:`h-6 px-2 text-xs`,onClick:t,children:[(0,I.jsx)(jr,{className:`h-3 w-3 mr-1`}),`Clear`]})]}),(0,I.jsx)(VJ,{className:`flex-1 font-mono text-xs`,children:e.length===0?(0,I.jsx)(`div`,{className:`flex items-center justify-center h-32 text-muted-foreground/50`,children:(0,I.jsx)(`p`,{children:`No logs yet — run a command to see output here`})}):(0,I.jsx)(`div`,{className:`p-3 space-y-0.5`,children:e.map(e=>(0,I.jsxs)(`div`,{className:`flex gap-2 ${zCe[e.level]??`text-foreground/80`}`,children:[(0,I.jsx)(`span`,{className:`text-muted-foreground/40 shrink-0 w-[72px] truncate`,children:new Date(e.timestamp).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}),(0,I.jsx)(`span`,{className:`shrink-0 w-4`,children:BCe[e.level]??` `}),(0,I.jsx)(`span`,{className:`break-all whitespace-pre-wrap`,children:e.message})]},e.id))})})]})}function HCe(){let{isConnected:e,connect:t,connectGateway:n,processes:r,logs:i}=B7();(0,_.useEffect)(()=>{t(),n()},[t,n]);let a=e?`connected`:`disconnected`,o=r.filter(e=>e.status===`running`).length;return(0,I.jsx)(`div`,{className:`hive-page mt-10`,children:(0,I.jsxs)(`div`,{className:`hive-page-container`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsxs)(`h1`,{className:`text-xl font-semibold flex items-center gap-2`,children:[(0,I.jsx)(Ar,{className:`h-5 w-5`}),`Code Bridge`]}),(0,I.jsx)(`p`,{className:`text-sm text-muted-foreground mt-0.5`,children:`Monitoreo de comandos CLI y procesos del agente`})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[o>0&&(0,I.jsxs)(`span`,{className:`text-xs text-yellow-400 font-mono`,children:[o,` proceso`,o>1?`s`:``,` activo`,o>1?`s`:``]}),(0,I.jsx)(jCe,{status:a}),(0,I.jsxs)(W,{variant:`outline`,size:`sm`,onClick:()=>{t(),n()},children:[(0,I.jsx)(fr,{className:`h-3.5 w-3.5 mr-1.5`}),`Reconectar`]})]})]}),(0,I.jsxs)(`div`,{className:`mt-4 grid grid-cols-1 lg:grid-cols-2 gap-4 h-[calc(100vh-14rem)]`,children:[(0,I.jsxs)(XR,{className:`flex flex-col overflow-hidden`,children:[(0,I.jsx)(ZR,{className:`py-3 px-4 border-b`,children:(0,I.jsxs)(QR,{className:`text-sm flex items-center justify-between`,children:[(0,I.jsx)(`span`,{children:`Procesos`}),(0,I.jsxs)(`span`,{className:`text-xs text-muted-foreground font-normal`,children:[r.length,` total`]})]})}),(0,I.jsx)(ez,{className:`flex-1 overflow-y-auto p-2`,children:(0,I.jsx)(RCe,{})})]}),(0,I.jsxs)(XR,{className:`flex flex-col overflow-hidden`,children:[(0,I.jsx)(ZR,{className:`py-3 px-4 border-b`,children:(0,I.jsxs)(QR,{className:`text-sm flex items-center justify-between`,children:[(0,I.jsx)(`span`,{children:`Logs`}),(0,I.jsxs)(`span`,{className:`text-xs text-muted-foreground font-normal`,children:[i.length,` entradas`]})]})}),(0,I.jsx)(ez,{className:`flex-1 overflow-hidden p-0`,children:(0,I.jsx)(VCe,{})})]})]})]})})}function UCe(){let[e,t]=(0,_.useState)([]),[n,r]=(0,_.useState)(!1),[i,a]=(0,_.useState)(``),[o,s]=(0,_.useState)([`info`,`warn`,`error`]),[c,l]=(0,_.useState)(!1),[u,d]=(0,_.useState)(!0),f=(0,_.useRef)(null),{url:p,status:m,subscribe:h,send:g}=tg();(0,_.useEffect)(()=>{if(m!==`connected`)return;g({type:`logs_subscribe`});let e=h(`log`,e=>{c||e.logEntry&&t(t=>[...t,e.logEntry].slice(-2e3))});return()=>{g({type:`logs_unsubscribe`}),e()}},[m,h,g,c]),(0,_.useEffect)(()=>{if(u&&f.current){let e=f.current.querySelector(`[data-radix-scroll-area-viewport]`);e&&(e.scrollTop=e.scrollHeight)}},[e,u]);let v=e=>{s(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},y=(0,_.useMemo)(()=>e.filter(e=>{let t=o.includes(e.level),n=e.message.toLowerCase().includes(i.toLowerCase())||e.meta&&JSON.stringify(e.meta).toLowerCase().includes(i.toLowerCase());return t&&n}),[e,o,i]),b=e=>{switch(e){case`error`:return`bg-red-500/10 text-red-500 border-red-500/20`;case`warn`:return`bg-yellow-500/10 text-yellow-500 border-yellow-500/20`;case`debug`:return`bg-slate-500/10 text-slate-500 border-slate-500/20`;default:return`bg-blue-500/10 text-blue-500 border-blue-500/20`}};return(0,I.jsxs)(`div`,{className:`flex flex-col h-[calc(100vh-8rem)] space-y-4 mt-10`,children:[(0,I.jsxs)(`div`,{className:`flex flex-col md:flex-row md:items-center justify-between gap-4`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h2`,{className:`text-2xl font-bold tracking-tight`,children:`Logs del Sistema`}),(0,I.jsx)(`p`,{className:`text-muted-foreground`,children:`Monitoreo en tiempo real de la actividad del enjambre.`})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsxs)(W,{variant:`outline`,size:`sm`,onClick:()=>l(!c),className:c?`text-yellow-500 border-yellow-500/50 hover:bg-yellow-500/10`:``,children:[c?(0,I.jsx)(cr,{className:`h-4 w-4 mr-2`}):(0,I.jsx)(ar,{className:`h-4 w-4 mr-2`}),c?`Renaudar`:`Pausar`]}),(0,I.jsxs)(W,{variant:`outline`,size:`sm`,onClick:()=>t([]),children:[(0,I.jsx)(jr,{className:`h-4 w-4 mr-2`}),`Limpiar`]}),(0,I.jsxs)(W,{variant:`outline`,size:`sm`,onClick:()=>{},disabled:!0,className:`opacity-50`,children:[(0,I.jsx)(fr,{className:`h-4 w-4 mr-2`}),`Sincronizado via WS`]})]})]}),(0,I.jsx)(XR,{className:`bg-muted/30`,children:(0,I.jsxs)(ez,{className:`p-3 flex flex-wrap items-center gap-4`,children:[(0,I.jsxs)(`div`,{className:`relative flex-1 min-w-[200px]`,children:[(0,I.jsx)(gr,{className:`absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground`}),(0,I.jsx)(G,{placeholder:`Buscar en logs...`,className:`pl-9 h-9 bg-background`,value:i,onChange:e=>a(e.target.value)})]}),(0,I.jsx)(`div`,{className:`flex items-center gap-1.5 p-1 bg-background rounded-md border text-xs`,children:[`debug`,`info`,`warn`,`error`].map(e=>(0,I.jsx)(`button`,{onClick:()=>v(e),className:H(`px-2 py-1 rounded capitalize transition-colors`,o.includes(e)?b(e).split(` `)[1]+` `+b(e).split(` `)[0]:`text-muted-foreground hover:bg-muted`),children:e},e))}),(0,I.jsxs)(`label`,{className:`flex items-center gap-2 text-xs cursor-pointer select-none`,children:[(0,I.jsx)(`input`,{type:`checkbox`,className:`sr-only`,checked:u,onChange:()=>d(!u)}),(0,I.jsx)(`div`,{className:H(`w-8 h-4 rounded-full relative transition-colors`,u?`bg-primary`:`bg-muted border shadow-inner`),children:(0,I.jsx)(`div`,{className:H(`absolute top-0.5 w-3 h-3 rounded-full bg-white transition-all shadow-sm`,u?`left-[17px]`:`left-0.5`)})}),`Auto-scroll`]}),(0,I.jsxs)(`div`,{className:`ml-auto flex items-center gap-2 text-[10px] text-muted-foreground`,children:[(0,I.jsx)(`div`,{className:H(`w-2 h-2 rounded-full`,m===`connected`?`bg-green-500 animate-pulse`:`bg-red-500`)}),m===`connected`?`STREAMING`:`OFFLINE`,(0,I.jsx)(`span`,{className:`mx-1 opacity-30`,children:`|`}),y.length,` de `,e.length,` entradas`]})]})}),(0,I.jsx)(XR,{className:`flex-1 overflow-hidden border-2`,children:(0,I.jsx)(ez,{className:`p-0 h-full bg-black/95`,children:(0,I.jsx)(VJ,{className:`h-full w-full`,ref:f,children:(0,I.jsxs)(`div`,{className:`p-4 font-mono text-[11px] leading-relaxed`,children:[y.length===0?(0,I.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-20 text-muted-foreground opacity-50`,children:[(0,I.jsx)(Kt,{className:`h-10 w-10 mb-4 stroke-[1]`}),(0,I.jsx)(`p`,{children:n?`Analizando registros...`:`No se encontraron logs con los filtros activos.`})]}):(0,I.jsx)(`div`,{className:`space-y-0.5`,children:y.map(e=>(0,I.jsxs)(`div`,{className:`group flex items-start gap-3 py-0.5 hover:bg-white/5 rounded px-1 transition-colors`,children:[(0,I.jsx)(`span`,{className:`text-slate-600 shrink-0 select-none hidden md:inline`,children:e.timestamp.includes(`T`)?e.timestamp.split(`T`)[1].split(`.`)[0]:e.timestamp}),(0,I.jsx)($z,{variant:`outline`,className:H(`px-1 py-0 h-4 text-[9px] uppercase font-bold shrink-0 border`,b(e.level)),children:e.level}),(0,I.jsxs)(`div`,{className:`flex-1 break-all text-slate-300`,children:[(0,I.jsxs)(`span`,{className:`text-slate-500 mr-2`,children:[`[`,e.source,`]`]}),e.message,e.meta&&(0,I.jsx)(`span`,{className:`text-slate-500 ml-2 italic opacity-60`,children:JSON.stringify(e.meta)})]})]},`${e.timestamp}-${e.source}-${e.message.slice(0,30)}`))}),(0,I.jsx)(`div`,{className:`h-4`}),` `]})})})})]})}function WCe({channel:e,onEdit:t,onToggle:n}){let r=e.status===`connected`,i=e.isConfigured===!1;return(0,I.jsxs)(`div`,{onClick:()=>t(e),className:`hive-card group transition-all duration-500 cursor-pointer ${r?`hive-card--active border-emerald-500/20`:i?`opacity-50 border-dashed hover:opacity-80 hover:border-blue-500/30`:`opacity-60 grayscale-[0.8] hover:opacity-100 hover:grayscale-0`}`,children:[(0,I.jsxs)(`div`,{className:`hive-card-body relative overflow-hidden`,children:[(0,I.jsxs)(`div`,{className:`flex items-start justify-between mb-8`,children:[(0,I.jsx)(`div`,{className:`h-12 w-12 rounded-xl flex items-center justify-center border transition-all duration-500 ${r?`bg-emerald-500/10 border-emerald-500/30 text-emerald-400 shadow-[0_0_15px_rgba(16,185,129,0.2)]`:i?`bg-blue-500/5 border-blue-500/20 text-blue-400/40`:`bg-white/5 border-white/10 text-white/30`}`,children:(0,I.jsx)(tr,{className:`h-6 w-6`})}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[r&&(0,I.jsx)(`span`,{className:`text-[9px] font-black tracking-widest text-emerald-500 shadow-emerald-glow`,children:`CONECTADO`}),i?(0,I.jsx)(`span`,{className:`text-[9px] font-black tracking-widest text-blue-400/60 uppercase`,children:`DISPONIBLE`}):(0,I.jsx)(vq,{checked:e.active,onCheckedChange:t=>n(e.id,t),onClick:e=>e.stopPropagation(),className:`data-[state=checked]:bg-emerald-500 scale-75 origin-right`})]})]}),(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h3`,{className:`text-xl font-black text-white uppercase tracking-tighter mb-1 line-clamp-1 group-hover:text-emerald-400 transition-colors`,children:e.type}),(0,I.jsx)(`p`,{className:`text-[10px] text-white/20 font-black tracking-[0.2em] mb-4`,children:i?`CLICK PARA CONFIGURAR`:`ID: ${e.id.substring(0,12).toUpperCase()}`})]}),(0,I.jsxs)(`div`,{className:`pt-4 border-t border-white/5 flex items-center gap-6`,children:[(0,I.jsxs)(`div`,{className:`hive-stat`,children:[(0,I.jsx)(`span`,{className:`hive-stat__label`,children:`VOZ`}),(0,I.jsx)(`span`,{className:`hive-stat__value ${e.voice_enabled?`text-emerald-500`:`text-white/20`}`,children:e.voice_enabled?`ON`:`OFF`})]}),(0,I.jsxs)(`div`,{className:`hive-stat`,children:[(0,I.jsx)(`span`,{className:`hive-stat__label`,children:`SÍNTESIS`}),(0,I.jsx)(`span`,{className:`hive-stat__value ${e.tts_enabled?`text-emerald-500`:`text-white/20`}`,children:e.tts_enabled?`ON`:`OFF`})]})]})]}),r&&(0,I.jsx)(`div`,{className:`hive-glow-blob hive-glow-blob--emerald -bottom-10 -right-10 h-24 w-24 opacity-20`})]}),(0,I.jsx)(`div`,{className:`hive-strip--bottom ${r?`bg-emerald-500`:i?`bg-blue-500/30`:`bg-white/10`}`})]})}var GCe=o(((e,t)=>{t.exports=function(){return typeof Promise==`function`&&Promise.prototype&&Promise.prototype.then}})),V7=o((e=>{var t,n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function(e){if(!e)throw Error(`"version" cannot be null or undefined`);if(e<1||e>40)throw Error(`"version" should be in range from 1 to 40`);return e*4+17},e.getSymbolTotalCodewords=function(e){return n[e]},e.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t},e.setToSJISFunction=function(e){if(typeof e!=`function`)throw Error(`"toSJISFunc" is not a valid function.`);t=e},e.isKanjiModeEnabled=function(){return t!==void 0},e.toSJIS=function(e){return t(e)}})),H7=o((e=>{e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(t){if(typeof t!=`string`)throw Error(`Param is not a string`);switch(t.toLowerCase()){case`l`:case`low`:return e.L;case`m`:case`medium`:return e.M;case`q`:case`quartile`:return e.Q;case`h`:case`high`:return e.H;default:throw Error(`Unknown EC Level: `+t)}}e.isValid=function(e){return e&&e.bit!==void 0&&e.bit>=0&&e.bit<4},e.from=function(n,r){if(e.isValid(n))return n;try{return t(n)}catch{return r}}})),KCe=o(((e,t)=>{function n(){this.buffer=[],this.length=0}n.prototype={get:function(e){let t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(let n=0;n<t;n++)this.putBit((e>>>t-n-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},t.exports=n})),qCe=o(((e,t)=>{function n(e){if(!e||e<1)throw Error(`BitMatrix size must be defined and greater than 0`);this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}n.prototype.set=function(e,t,n,r){let i=e*this.size+t;this.data[i]=n,r&&(this.reservedBit[i]=!0)},n.prototype.get=function(e,t){return this.data[e*this.size+t]},n.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},n.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},t.exports=n})),JCe=o((e=>{var t=V7().getSymbolSize;e.getRowColCoords=function(e){if(e===1)return[];let n=Math.floor(e/7)+2,r=t(e),i=r===145?26:Math.ceil((r-13)/(2*n-2))*2,a=[r-7];for(let e=1;e<n-1;e++)a[e]=a[e-1]-i;return a.push(6),a.reverse()},e.getPositions=function(t){let n=[],r=e.getRowColCoords(t),i=r.length;for(let e=0;e<i;e++)for(let t=0;t<i;t++)e===0&&t===0||e===0&&t===i-1||e===i-1&&t===0||n.push([r[e],r[t]]);return n}})),YCe=o((e=>{var t=V7().getSymbolSize,n=7;e.getPositions=function(e){let r=t(e);return[[0,0],[r-n,0],[0,r-n]]}})),XCe=o((e=>{e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(e){return e!=null&&e!==``&&!isNaN(e)&&e>=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){let n=e.size,r=0,i=0,a=0,o=null,s=null;for(let c=0;c<n;c++){i=a=0,o=s=null;for(let l=0;l<n;l++){let n=e.get(c,l);n===o?i++:(i>=5&&(r+=t.N1+(i-5)),o=n,i=1),n=e.get(l,c),n===s?a++:(a>=5&&(r+=t.N1+(a-5)),s=n,a=1)}i>=5&&(r+=t.N1+(i-5)),a>=5&&(r+=t.N1+(a-5))}return r},e.getPenaltyN2=function(e){let n=e.size,r=0;for(let t=0;t<n-1;t++)for(let i=0;i<n-1;i++){let n=e.get(t,i)+e.get(t,i+1)+e.get(t+1,i)+e.get(t+1,i+1);(n===4||n===0)&&r++}return r*t.N2},e.getPenaltyN3=function(e){let n=e.size,r=0,i=0,a=0;for(let t=0;t<n;t++){i=a=0;for(let o=0;o<n;o++)i=i<<1&2047|e.get(t,o),o>=10&&(i===1488||i===93)&&r++,a=a<<1&2047|e.get(o,t),o>=10&&(a===1488||a===93)&&r++}return r*t.N3},e.getPenaltyN4=function(e){let n=0,r=e.data.length;for(let t=0;t<r;t++)n+=e.data[t];return Math.abs(Math.ceil(n*100/r/5)-10)*t.N4};function n(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(n+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw Error(`bad maskPattern:`+t)}}e.applyMask=function(e,t){let r=t.size;for(let i=0;i<r;i++)for(let a=0;a<r;a++)t.isReserved(a,i)||t.xor(a,i,n(e,a,i))},e.getBestMask=function(t,n){let r=Object.keys(e.Patterns).length,i=0,a=1/0;for(let o=0;o<r;o++){n(o),e.applyMask(o,t);let r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(o,t),r<a&&(a=r,i=o)}return i}})),U7=o((e=>{var t=H7(),n=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e.getBlocksCount=function(e,r){switch(r){case t.L:return n[(e-1)*4+0];case t.M:return n[(e-1)*4+1];case t.Q:return n[(e-1)*4+2];case t.H:return n[(e-1)*4+3];default:return}},e.getTotalCodewordsCount=function(e,n){switch(n){case t.L:return r[(e-1)*4+0];case t.M:return r[(e-1)*4+1];case t.Q:return r[(e-1)*4+2];case t.H:return r[(e-1)*4+3];default:return}}})),ZCe=o((e=>{var t=new Uint8Array(512),n=new Uint8Array(256);(function(){let e=1;for(let r=0;r<255;r++)t[r]=e,n[e]=r,e<<=1,e&256&&(e^=285);for(let e=255;e<512;e++)t[e]=t[e-255]})(),e.log=function(e){if(e<1)throw Error(`log(`+e+`)`);return n[e]},e.exp=function(e){return t[e]},e.mul=function(e,r){return e===0||r===0?0:t[n[e]+n[r]]}})),QCe=o((e=>{var t=ZCe();e.mul=function(e,n){let r=new Uint8Array(e.length+n.length-1);for(let i=0;i<e.length;i++)for(let a=0;a<n.length;a++)r[i+a]^=t.mul(e[i],n[a]);return r},e.mod=function(e,n){let r=new Uint8Array(e);for(;r.length-n.length>=0;){let e=r[0];for(let i=0;i<n.length;i++)r[i]^=t.mul(n[i],e);let i=0;for(;i<r.length&&r[i]===0;)i++;r=r.slice(i)}return r},e.generateECPolynomial=function(n){let r=new Uint8Array([1]);for(let i=0;i<n;i++)r=e.mul(r,new Uint8Array([1,t.exp(i)]));return r}})),$Ce=o(((e,t)=>{var n=QCe();function r(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}r.prototype.initialize=function(e){this.degree=e,this.genPoly=n.generateECPolynomial(this.degree)},r.prototype.encode=function(e){if(!this.genPoly)throw Error(`Encoder not initialized`);let t=new Uint8Array(e.length+this.degree);t.set(e);let r=n.mod(t,this.genPoly),i=this.degree-r.length;if(i>0){let e=new Uint8Array(this.degree);return e.set(r,i),e}return r},t.exports=r})),W7=o((e=>{e.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}})),G7=o((e=>{var t=`[0-9]+`,n=`[A-Z $%*+\\-./:]+`,r=`(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+`;r=r.replace(/u/g,`\\u`);var i=`(?:(?![A-Z0-9 $%*+\\-./:]|`+r+`)(?:.|[\r
245
- ]))+`;e.KANJI=new RegExp(r,`g`),e.BYTE_KANJI=RegExp(`[^A-Z0-9 $%*+\\-./:]+`,`g`),e.BYTE=new RegExp(i,`g`),e.NUMERIC=new RegExp(t,`g`),e.ALPHANUMERIC=new RegExp(n,`g`);var a=RegExp(`^`+r+`$`),o=RegExp(`^`+t+`$`),s=RegExp(`^[A-Z0-9 $%*+\\-./:]+$`);e.testKanji=function(e){return a.test(e)},e.testNumeric=function(e){return o.test(e)},e.testAlphanumeric=function(e){return s.test(e)}})),K7=o((e=>{var t=W7(),n=G7();e.NUMERIC={id:`Numeric`,bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:`Alphanumeric`,bit:2,ccBits:[9,11,13]},e.BYTE={id:`Byte`,bit:4,ccBits:[8,16,16]},e.KANJI={id:`Kanji`,bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(e,n){if(!e.ccBits)throw Error(`Invalid mode: `+e);if(!t.isValid(n))throw Error(`Invalid version: `+n);return n>=1&&n<10?e.ccBits[0]:n<27?e.ccBits[1]:e.ccBits[2]},e.getBestModeForData=function(t){return n.testNumeric(t)?e.NUMERIC:n.testAlphanumeric(t)?e.ALPHANUMERIC:n.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(e){if(e&&e.id)return e.id;throw Error(`Invalid mode`)},e.isValid=function(e){return e&&e.bit&&e.ccBits};function r(t){if(typeof t!=`string`)throw Error(`Param is not a string`);switch(t.toLowerCase()){case`numeric`:return e.NUMERIC;case`alphanumeric`:return e.ALPHANUMERIC;case`kanji`:return e.KANJI;case`byte`:return e.BYTE;default:throw Error(`Unknown mode: `+t)}}e.from=function(t,n){if(e.isValid(t))return t;try{return r(t)}catch{return n}}})),ewe=o((e=>{var t=V7(),n=U7(),r=H7(),i=K7(),a=W7(),o=7973,s=t.getBCHDigit(o);function c(t,n,r){for(let i=1;i<=40;i++)if(n<=e.getCapacity(i,r,t))return i}function l(e,t){return i.getCharCountIndicator(e,t)+4}function u(e,t){let n=0;return e.forEach(function(e){let r=l(e.mode,t);n+=r+e.getBitsLength()}),n}function d(t,n){for(let r=1;r<=40;r++)if(u(t,r)<=e.getCapacity(r,n,i.MIXED))return r}e.from=function(e,t){return a.isValid(e)?parseInt(e,10):t},e.getCapacity=function(e,r,o){if(!a.isValid(e))throw Error(`Invalid QR Code version`);o===void 0&&(o=i.BYTE);let s=(t.getSymbolTotalCodewords(e)-n.getTotalCodewordsCount(e,r))*8;if(o===i.MIXED)return s;let c=s-l(o,e);switch(o){case i.NUMERIC:return Math.floor(c/10*3);case i.ALPHANUMERIC:return Math.floor(c/11*2);case i.KANJI:return Math.floor(c/13);case i.BYTE:default:return Math.floor(c/8)}},e.getBestVersionForData=function(e,t){let n,i=r.from(t,r.M);if(Array.isArray(e)){if(e.length>1)return d(e,i);if(e.length===0)return 1;n=e[0]}else n=e;return c(n.mode,n.getLength(),i)},e.getEncodedBits=function(e){if(!a.isValid(e)||e<7)throw Error(`Invalid QR Code version`);let n=e<<12;for(;t.getBCHDigit(n)-s>=0;)n^=o<<t.getBCHDigit(n)-s;return e<<12|n}})),twe=o((e=>{var t=V7(),n=1335,r=21522,i=t.getBCHDigit(n);e.getEncodedBits=function(e,a){let o=e.bit<<3|a,s=o<<10;for(;t.getBCHDigit(s)-i>=0;)s^=n<<t.getBCHDigit(s)-i;return(o<<10|s)^r}})),nwe=o(((e,t)=>{var n=K7();function r(e){this.mode=n.NUMERIC,this.data=e.toString()}r.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(e){let t,n,r;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),r=parseInt(n,10),e.put(r,10);let i=this.data.length-t;i>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,i*3+1))},t.exports=r})),rwe=o(((e,t)=>{var n=K7(),r=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:`.split(``);function i(e){this.mode=n.ALPHANUMERIC,this.data=e}i.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let n=r.indexOf(this.data[t])*45;n+=r.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(r.indexOf(this.data[t]),6)},t.exports=i})),iwe=o(((e,t)=>{var n=K7();function r(e){this.mode=n.BYTE,typeof e==`string`?this.data=new TextEncoder().encode(e):this.data=new Uint8Array(e)}r.getBitsLength=function(e){return e*8},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},t.exports=r})),awe=o(((e,t)=>{var n=K7(),r=V7();function i(e){this.mode=n.KANJI,this.data=e}i.getBitsLength=function(e){return e*13},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let n=r.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw Error(`Invalid SJIS character: `+this.data[t]+`
246
- Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}},t.exports=i})),owe=o(((e,t)=>{var n={single_source_shortest_paths:function(e,t,r){var i={},a={};a[t]=0;var o=n.PriorityQueue.make();o.push(t,0);for(var s,c,l,u,d,f,p,m,h;!o.empty();)for(l in s=o.pop(),c=s.value,u=s.cost,d=e[c]||{},d)d.hasOwnProperty(l)&&(f=d[l],p=u+f,m=a[l],h=a[l]===void 0,(h||m>p)&&(a[l]=p,o.push(l,p),i[l]=c));if(r!==void 0&&a[r]===void 0){var g=[`Could not find a path from `,t,` to `,r,`.`].join(``);throw Error(g)}return i},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],r=t;r;)n.push(r),e[r],r=e[r];return n.reverse(),n},find_path:function(e,t,r){var i=n.single_source_shortest_paths(e,t,r);return n.extract_shortest_path_from_predecessor_list(i,r)},PriorityQueue:{make:function(e){var t=n.PriorityQueue,r={},i;for(i in e||={},t)t.hasOwnProperty(i)&&(r[i]=t[i]);return r.queue=[],r.sorter=e.sorter||t.default_sorter,r},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t!==void 0&&(t.exports=n)})),swe=o((e=>{var t=K7(),n=nwe(),r=rwe(),i=iwe(),a=awe(),o=G7(),s=V7(),c=owe();function l(e){return unescape(encodeURIComponent(e)).length}function u(e,t,n){let r=[],i;for(;(i=e.exec(n))!==null;)r.push({data:i[0],index:i.index,mode:t,length:i[0].length});return r}function d(e){let n=u(o.NUMERIC,t.NUMERIC,e),r=u(o.ALPHANUMERIC,t.ALPHANUMERIC,e),i,a;return s.isKanjiModeEnabled()?(i=u(o.BYTE,t.BYTE,e),a=u(o.KANJI,t.KANJI,e)):(i=u(o.BYTE_KANJI,t.BYTE,e),a=[]),n.concat(r,i,a).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function f(e,o){switch(o){case t.NUMERIC:return n.getBitsLength(e);case t.ALPHANUMERIC:return r.getBitsLength(e);case t.KANJI:return a.getBitsLength(e);case t.BYTE:return i.getBitsLength(e)}}function p(e){return e.reduce(function(e,t){let n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)},[])}function m(e){let n=[];for(let r=0;r<e.length;r++){let i=e[r];switch(i.mode){case t.NUMERIC:n.push([i,{data:i.data,mode:t.ALPHANUMERIC,length:i.length},{data:i.data,mode:t.BYTE,length:i.length}]);break;case t.ALPHANUMERIC:n.push([i,{data:i.data,mode:t.BYTE,length:i.length}]);break;case t.KANJI:n.push([i,{data:i.data,mode:t.BYTE,length:l(i.data)}]);break;case t.BYTE:n.push([{data:i.data,mode:t.BYTE,length:l(i.data)}])}}return n}function h(e,n){let r={},i={start:{}},a=[`start`];for(let o=0;o<e.length;o++){let s=e[o],c=[];for(let e=0;e<s.length;e++){let l=s[e],u=``+o+e;c.push(u),r[u]={node:l,lastCount:0},i[u]={};for(let e=0;e<a.length;e++){let o=a[e];r[o]&&r[o].node.mode===l.mode?(i[o][u]=f(r[o].lastCount+l.length,l.mode)-f(r[o].lastCount,l.mode),r[o].lastCount+=l.length):(r[o]&&(r[o].lastCount=l.length),i[o][u]=f(l.length,l.mode)+4+t.getCharCountIndicator(l.mode,n))}}a=c}for(let e=0;e<a.length;e++)i[a[e]].end=0;return{map:i,table:r}}function g(e,o){let c,l=t.getBestModeForData(e);if(c=t.from(o,l),c!==t.BYTE&&c.bit<l.bit)throw Error(`"`+e+`" cannot be encoded with mode `+t.toString(c)+`.
247
- Suggested mode is: `+t.toString(l));switch(c===t.KANJI&&!s.isKanjiModeEnabled()&&(c=t.BYTE),c){case t.NUMERIC:return new n(e);case t.ALPHANUMERIC:return new r(e);case t.KANJI:return new a(e);case t.BYTE:return new i(e)}}e.fromArray=function(e){return e.reduce(function(e,t){return typeof t==`string`?e.push(g(t,null)):t.data&&e.push(g(t.data,t.mode)),e},[])},e.fromString=function(t,n){let r=h(m(d(t,s.isKanjiModeEnabled())),n),i=c.find_path(r.map,`start`,`end`),a=[];for(let e=1;e<i.length-1;e++)a.push(r.table[i[e]].node);return e.fromArray(p(a))},e.rawSplit=function(t){return e.fromArray(d(t,s.isKanjiModeEnabled()))}})),cwe=o((e=>{var t=V7(),n=H7(),r=KCe(),i=qCe(),a=JCe(),o=YCe(),s=XCe(),c=U7(),l=$Ce(),u=ewe(),d=twe(),f=K7(),p=swe();function m(e,t){let n=e.size,r=o.getPositions(t);for(let t=0;t<r.length;t++){let i=r[t][0],a=r[t][1];for(let t=-1;t<=7;t++)if(!(i+t<=-1||n<=i+t))for(let r=-1;r<=7;r++)a+r<=-1||n<=a+r||(t>=0&&t<=6&&(r===0||r===6)||r>=0&&r<=6&&(t===0||t===6)||t>=2&&t<=4&&r>=2&&r<=4?e.set(i+t,a+r,!0,!0):e.set(i+t,a+r,!1,!0))}}function h(e){let t=e.size;for(let n=8;n<t-8;n++){let t=n%2==0;e.set(n,6,t,!0),e.set(6,n,t,!0)}}function g(e,t){let n=a.getPositions(t);for(let t=0;t<n.length;t++){let r=n[t][0],i=n[t][1];for(let t=-2;t<=2;t++)for(let n=-2;n<=2;n++)t===-2||t===2||n===-2||n===2||t===0&&n===0?e.set(r+t,i+n,!0,!0):e.set(r+t,i+n,!1,!0)}}function _(e,t){let n=e.size,r=u.getEncodedBits(t),i,a,o;for(let t=0;t<18;t++)i=Math.floor(t/3),a=t%3+n-8-3,o=(r>>t&1)==1,e.set(i,a,o,!0),e.set(a,i,o,!0)}function v(e,t,n){let r=e.size,i=d.getEncodedBits(t,n),a,o;for(a=0;a<15;a++)o=(i>>a&1)==1,a<6?e.set(a,8,o,!0):a<8?e.set(a+1,8,o,!0):e.set(r-15+a,8,o,!0),a<8?e.set(8,r-a-1,o,!0):a<9?e.set(8,15-a-1+1,o,!0):e.set(8,15-a-1,o,!0);e.set(r-8,8,1,!0)}function y(e,t){let n=e.size,r=-1,i=n-1,a=7,o=0;for(let s=n-1;s>0;s-=2)for(s===6&&s--;;){for(let n=0;n<2;n++)if(!e.isReserved(i,s-n)){let r=!1;o<t.length&&(r=(t[o]>>>a&1)==1),e.set(i,s-n,r),a--,a===-1&&(o++,a=7)}if(i+=r,i<0||n<=i){i-=r,r=-r;break}}}function b(e,n,i){let a=new r;i.forEach(function(t){a.put(t.mode.bit,4),a.put(t.getLength(),f.getCharCountIndicator(t.mode,e)),t.write(a)});let o=(t.getSymbolTotalCodewords(e)-c.getTotalCodewordsCount(e,n))*8;for(a.getLengthInBits()+4<=o&&a.put(0,4);a.getLengthInBits()%8!=0;)a.putBit(0);let s=(o-a.getLengthInBits())/8;for(let e=0;e<s;e++)a.put(e%2?17:236,8);return x(a,e,n)}function x(e,n,r){let i=t.getSymbolTotalCodewords(n),a=i-c.getTotalCodewordsCount(n,r),o=c.getBlocksCount(n,r),s=o-i%o,u=Math.floor(i/o),d=Math.floor(a/o),f=d+1,p=u-d,m=new l(p),h=0,g=Array(o),_=Array(o),v=0,y=new Uint8Array(e.buffer);for(let e=0;e<o;e++){let t=e<s?d:f;g[e]=y.slice(h,h+t),_[e]=m.encode(g[e]),h+=t,v=Math.max(v,t)}let b=new Uint8Array(i),x=0,S,C;for(S=0;S<v;S++)for(C=0;C<o;C++)S<g[C].length&&(b[x++]=g[C][S]);for(S=0;S<p;S++)for(C=0;C<o;C++)b[x++]=_[C][S];return b}function S(e,n,r,a){let o;if(Array.isArray(e))o=p.fromArray(e);else if(typeof e==`string`){let t=n;if(!t){let n=p.rawSplit(e);t=u.getBestVersionForData(n,r)}o=p.fromString(e,t||40)}else throw Error(`Invalid data`);let c=u.getBestVersionForData(o,r);if(!c)throw Error(`The amount of data is too big to be stored in a QR Code`);if(!n)n=c;else if(n<c)throw Error(`
248
- The chosen QR Code version cannot contain this amount of data.
249
- Minimum version required to store current data is: `+c+`.
250
- `);let l=b(n,r,o),d=new i(t.getSymbolSize(n));return m(d,n),h(d),g(d,n),v(d,r,0),n>=7&&_(d,n),y(d,l),isNaN(a)&&(a=s.getBestMask(d,v.bind(null,d,r))),s.applyMask(a,d),v(d,r,a),{modules:d,version:n,errorCorrectionLevel:r,maskPattern:a,segments:o}}e.create=function(e,r){if(e===void 0||e===``)throw Error(`No input text`);let i=n.M,a,o;return r!==void 0&&(i=n.from(r.errorCorrectionLevel,n.M),a=u.from(r.version),o=s.from(r.maskPattern),r.toSJISFunc&&t.setToSJISFunction(r.toSJISFunc)),S(e,a,i,o)}})),q7=o((e=>{function t(e){if(typeof e==`number`&&(e=e.toString()),typeof e!=`string`)throw Error(`Color should be defined as hex string`);let t=e.slice().replace(`#`,``).split(``);if(t.length<3||t.length===5||t.length>8)throw Error(`Invalid hex color: `+e);(t.length===3||t.length===4)&&(t=Array.prototype.concat.apply([],t.map(function(e){return[e,e]}))),t.length===6&&t.push(`F`,`F`);let n=parseInt(t.join(``),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:`#`+t.slice(0,6).join(``)}}e.getOptions=function(e){e||={},e.color||={};let n=e.margin===void 0||e.margin===null||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:r,scale:r?4:i,margin:n,color:{dark:t(e.color.dark||`#000000ff`),light:t(e.color.light||`#ffffffff`)},type:e.type,rendererOpts:e.rendererOpts||{}}},e.getScale=function(e,t){return t.width&&t.width>=e+t.margin*2?t.width/(e+t.margin*2):t.scale},e.getImageWidth=function(t,n){let r=e.getScale(t,n);return Math.floor((t+n.margin*2)*r)},e.qrToImageData=function(t,n,r){let i=n.modules.size,a=n.modules.data,o=e.getScale(i,r),s=Math.floor((i+r.margin*2)*o),c=r.margin*o,l=[r.color.light,r.color.dark];for(let e=0;e<s;e++)for(let n=0;n<s;n++){let u=(e*s+n)*4,d=r.color.light;if(e>=c&&n>=c&&e<s-c&&n<s-c){let t=Math.floor((e-c)/o),r=Math.floor((n-c)/o);d=l[a[t*i+r]?1:0]}t[u++]=d.r,t[u++]=d.g,t[u++]=d.b,t[u]=d.a}}})),lwe=o((e=>{var t=q7();function n(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||={},t.height=n,t.width=n,t.style.height=n+`px`,t.style.width=n+`px`}function r(){try{return document.createElement(`canvas`)}catch{throw Error(`You need to specify a canvas element`)}}e.render=function(e,i,a){let o=a,s=i;o===void 0&&(!i||!i.getContext)&&(o=i,i=void 0),i||(s=r()),o=t.getOptions(o);let c=t.getImageWidth(e.modules.size,o),l=s.getContext(`2d`),u=l.createImageData(c,c);return t.qrToImageData(u.data,e,o),n(l,s,c),l.putImageData(u,0,0),s},e.renderToDataURL=function(t,n,r){let i=r;i===void 0&&(!n||!n.getContext)&&(i=n,n=void 0),i||={};let a=e.render(t,n,i),o=i.type||`image/png`,s=i.rendererOpts||{};return a.toDataURL(o,s.quality)}})),uwe=o((e=>{var t=q7();function n(e,t){let n=e.a/255,r=t+`="`+e.hex+`"`;return n<1?r+` `+t+`-opacity="`+n.toFixed(2).slice(1)+`"`:r}function r(e,t,n){let r=e+t;return n!==void 0&&(r+=` `+n),r}function i(e,t,n){let i=``,a=0,o=!1,s=0;for(let c=0;c<e.length;c++){let l=Math.floor(c%t),u=Math.floor(c/t);!l&&!o&&(o=!0),e[c]?(s++,c>0&&l>0&&e[c-1]||(i+=o?r(`M`,l+n,.5+u+n):r(`m`,a,0),a=0,o=!1),l+1<t&&e[c+1]||(i+=r(`h`,s),s=0)):a++}return i}e.render=function(e,r,a){let o=t.getOptions(r),s=e.modules.size,c=e.modules.data,l=s+o.margin*2,u=o.color.light.a?`<path `+n(o.color.light,`fill`)+` d="M0 0h`+l+`v`+l+`H0z"/>`:``,d=`<path `+n(o.color.dark,`stroke`)+` d="`+i(c,s,o.margin)+`"/>`,f=`viewBox="0 0 `+l+` `+l+`"`,p=`<svg xmlns="http://www.w3.org/2000/svg" `+(o.width?`width="`+o.width+`" height="`+o.width+`" `:``)+f+` shape-rendering="crispEdges">`+u+d+`</svg>
251
- `;return typeof a==`function`&&a(null,p),p}})),dwe=l(o((e=>{var t=GCe(),n=cwe(),r=lwe(),i=uwe();function a(e,r,i,a,o){let s=[].slice.call(arguments,1),c=s.length,l=typeof s[c-1]==`function`;if(!l&&!t())throw Error(`Callback required as last argument`);if(l){if(c<2)throw Error(`Too few arguments provided`);c===2?(o=i,i=r,r=a=void 0):c===3&&(r.getContext&&o===void 0?(o=a,a=void 0):(o=a,a=i,i=r,r=void 0))}else{if(c<1)throw Error(`Too few arguments provided`);return c===1?(i=r,r=a=void 0):c===2&&!r.getContext&&(a=i,i=r,r=void 0),new Promise(function(t,o){try{t(e(n.create(i,a),r,a))}catch(e){o(e)}})}try{let t=n.create(i,a);o(null,e(t,r,a))}catch(e){o(e)}}e.create=n.create,e.toCanvas=a.bind(null,r.render),e.toDataURL=a.bind(null,r.renderToDataURL),e.toString=a.bind(null,function(e,t,n){return i.render(e,n)})}))(),1),fwe=[{id:`whisper-large-v3-turbo`,name:`Whisper Large V3 Turbo (Groq)`,provider:`groq`},{id:`whisper-large-v3`,name:`Whisper Large V3 (Groq)`,provider:`groq`},{id:`distil-whisper-large-v3-en`,name:`Distil Whisper V3 EN (Groq)`,provider:`groq`},{id:`whisper-1`,name:`Whisper 1 (OpenAI)`,provider:`openai`}],pwe=[{group:`ElevenLabs`,provider:`elevenlabs`,models:[{id:`eleven_flash_v2_5`,name:`Flash v2.5`},{id:`eleven_turbo_v2_5`,name:`Turbo v2.5`},{id:`eleven_multilingual_v2`,name:`Multilingual v2`},{id:`eleven_v3`,name:`V3`}]},{group:`OpenAI`,provider:`openai`,models:[{id:`tts-1`,name:`TTS-1`},{id:`tts-1-hd`,name:`TTS-1 HD`},{id:`gpt-4o-mini-tts`,name:`GPT-4o Mini TTS`}]},{group:`Google Gemini`,provider:`gemini`,models:[{id:`gemini-2.5-flash-preview-tts`,name:`Gemini 2.5 Flash TTS`},{id:`gemini-2.5-pro-preview-tts`,name:`Gemini 2.5 Pro TTS`}]},{group:`Qwen`,provider:`qwen`,models:[{id:`qwen3-tts-instruct-flash`,name:`Qwen3 TTS Instruct Flash`},{id:`qwen3-tts-flash`,name:`Qwen3 TTS Flash`},{id:`qwen-tts`,name:`Qwen TTS`}]}];function mwe(e){return e.startsWith(`eleven`)?`elevenlabs`:e.startsWith(`tts-`)||e.startsWith(`gpt-`)?`openai`:e.startsWith(`gemini`)?`gemini`:e.startsWith(`qwen`)?`qwen`:null}function hwe({data:e}){let t=(0,_.useRef)(null);return(0,_.useEffect)(()=>{!e||!t.current||dwe.toCanvas(t.current,e,{width:220,margin:2,color:{dark:`#000000`,light:`#ffffff`}}).catch(console.error)},[e]),(0,I.jsxs)(`div`,{className:`flex flex-col items-center gap-3`,children:[(0,I.jsx)(`div`,{className:`rounded-xl overflow-hidden border-4 border-white shadow-lg`,children:(0,I.jsx)(`canvas`,{ref:t})}),(0,I.jsx)(`p`,{className:`text-xs text-white/40 text-center`,children:`Abre WhatsApp → Ajustes → Dispositivos vinculados → Vincular dispositivo`})]})}function gwe({channel:e,isOpen:t,onClose:n,onSave:r}){let i=Id(),{createChannel:a,reconnectChannel:o,fetchChannels:s}=qR(),{configuredVoiceProviders:c,fetchConfiguredVoiceProviders:l}=JR(),[u,d]=(0,_.useState)(e?`settings`:`type`),[f,p]=(0,_.useState)(`telegram`),[m,h]=(0,_.useState)(``),[g,v]=(0,_.useState)(``),[y,b]=(0,_.useState)(``),[x,S]=(0,_.useState)(!1),[C,w]=(0,_.useState)(!1),[T,E]=(0,_.useState)(null),[D,O]=(0,_.useState)(null),[k,A]=(0,_.useState)(!1),[j,M]=(0,_.useState)(null),[N,P]=(0,_.useState)(!1),F=(0,_.useRef)(null),[L,R]=(0,_.useState)({}),[ee,te]=(0,_.useState)(!1),[ne,re]=(0,_.useState)([]),[ie,ae]=(0,_.useState)(!1),[oe,se]=(0,_.useState)(!1),[ce,z]=(0,_.useState)(``),[le,B]=(0,_.useState)(!1),ue=e&&e.status!==`connected`,de=e&&e.isConfigured===!1;(0,_.useEffect)(()=>{t?e?(d(ue?`reconnect`:`settings`),p(e.type),h(``),v(``),b(``),E(e.id),O(null),A(!1),M(null),R(e),se(!1),z(``),B(!1)):(d(`type`),p(`telegram`),h(``),v(``),b(``),E(null),O(null),A(!1),M(null)):fe()},[t,e]),(0,_.useEffect)(()=>{l()},[l]),(0,_.useEffect)(()=>{let e=L.tts_provider?mwe(L.tts_provider):null;if(!e){re([]);return}ae(!0),K(`/api/voice/${e}/voices`,{showError:!1}).then(e=>re(e.voices||[])).catch(()=>re([])).finally(()=>ae(!1))},[L.tts_provider]);let fe=(0,_.useCallback)(()=>{F.current&&=(clearInterval(F.current),null)},[]),pe=(0,_.useCallback)((e,t)=>{fe(),F.current=setInterval(async()=>{try{let n=await K(`/api/channels/${e}/${t}/status`,{showError:!1});n.status===`qr`&&n.qrCode?(O(n.qrCode),A(!1),d(`qr`)):n.status===`connected`?(fe(),await s(),d(`success`)):n.status===`error`?(fe(),M(`Error de conexión. Intenta de nuevo.`),d(`credentials`)):(n.status===`disconnected`||n.status===`not_found`)&&A(!0)}catch{}},2e3)},[fe,s]),me=async()=>{if(e){P(!0),M(null);try{let t={};f===`telegram`&&m.trim()&&(t.botToken=m),f===`discord`&&(m.trim()&&(t.botToken=m),g.trim()&&(t.applicationId=g)),await o(e.id,Object.keys(t).length>0?t:void 0),d(`connecting`),pe(f,e.id)}catch(e){M(e.message||`Error al reconectar`)}finally{P(!1)}}},he=async()=>{P(!0),M(null);try{let e={};f===`telegram`&&(e.botToken=m),f===`discord`&&(e.botToken=m,e.applicationId=g),f===`slack`&&(e.botToken=m,e.signingSecret=y);let{id:t}=await a(f,e);E(t),f===`whatsapp`?(d(`connecting`),pe(`whatsapp`,t)):(d(`connecting`),pe(f,t))}catch(e){M(e.message||`Error al conectar`)}finally{P(!1)}},ge=async()=>{if(e?.id){te(!0);try{if(ce.trim().length>10&&(e.type===`telegram`||e.type===`discord`)){let t={botToken:ce.trim()};await o(e.id,t)}await r(e.id,L),n()}catch(e){console.error(`Save failed`,e)}finally{te(!1)}}},_e=()=>{fe(),n()},ve=f===`whatsapp`||f===`webchat`||f===`telegram`&&m.trim().length>10||f===`discord`&&m.trim().length>10&&g.trim().length>0||f===`slack`&&m.trim().length>10&&y.trim().length>10,ye=()=>u===`reconnect`?(0,I.jsxs)(`div`,{className:`space-y-4 py-2`,children:[j&&(0,I.jsxs)(ZQ,{variant:`destructive`,className:`bg-red-500/10 border-red-500/30`,children:[(0,I.jsx)(ln,{className:`h-4 w-4`}),(0,I.jsx)($Q,{children:j})]}),(0,I.jsxs)(`div`,{className:`p-4 rounded-xl ${de?`bg-blue-500/10 border border-blue-500/20`:`bg-amber-500/10 border border-amber-500/20`}`,children:[(0,I.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-widest mb-1 ${de?`text-blue-300`:`text-amber-300`}`,children:de?`Canal no configurado`:`Canal desconectado`}),(0,I.jsx)(`p`,{className:`text-xs ${de?`text-blue-200/70`:`text-amber-200/70`}`,children:de?f===`whatsapp`?`Haz clic en Conectar para generar el código QR.`:f===`webchat`?`Haz clic en Conectar para activar el canal web.`:`Ingresa las credenciales para activar este canal.`:f===`whatsapp`?`Haz clic en Reconectar para generar un nuevo código QR.`:f===`webchat`?`Haz clic en Reconectar para activar el canal.`:`Puedes reconectar con las credenciales existentes o ingresar un nuevo token.`})]}),(f===`telegram`||f===`discord`)&&(0,I.jsxs)(`div`,{className:`space-y-3`,children:[(0,I.jsx)(`p`,{className:`text-[10px] text-white/30 uppercase tracking-widest`,children:de?`Credenciales`:`Actualizar credenciales (opcional)`}),(0,I.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,I.jsx)(Z,{className:`text-xs text-white/50`,children:`Bot Token`}),(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsx)(G,{type:C?`text`:`password`,value:m,onChange:e=>h(e.target.value),placeholder:de?f===`telegram`?`123456789:AAF...`:`MTA5NDY...`:`Dejar vacío para usar el token actual`,className:`bg-white/5 border-white/10 pr-10 font-mono text-sm`}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>w(e=>!e),className:`absolute right-2 top-1/2 -translate-y-1/2 text-white/40 hover:text-white/70`,children:C?(0,I.jsx)(On,{className:`h-4 w-4`}):(0,I.jsx)(kn,{className:`h-4 w-4`})})]})]}),f===`discord`&&(0,I.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,I.jsx)(Z,{className:`text-xs text-white/50`,children:`Application ID`}),(0,I.jsx)(G,{value:g,onChange:e=>v(e.target.value),placeholder:de?`123456789012345678`:`Dejar vacío para usar el actual`,className:`bg-white/5 border-white/10 font-mono text-sm`})]})]})]}):u===`type`?(0,I.jsxs)(`div`,{className:`space-y-4 py-2`,children:[(0,I.jsx)(`p`,{className:`text-sm text-white/50`,children:`Selecciona el tipo de canal a conectar:`}),(0,I.jsx)(`div`,{className:`grid grid-cols-2 gap-3`,children:[{id:`telegram`,label:`Telegram`,icon:`✈️`},{id:`whatsapp`,label:`WhatsApp`,icon:`💬`},{id:`discord`,label:`Discord`,icon:`🎮`},{id:`slack`,label:`Slack`,icon:`💼`},{id:`webchat`,label:`WebChat`,icon:`🌐`}].map(e=>(0,I.jsxs)(`button`,{onClick:()=>p(e.id),className:`p-4 rounded-xl border text-left transition-all duration-200 ${f===e.id?`border-blue-500 bg-blue-500/10 text-white`:`border-white/10 bg-white/5 text-white/50 hover:border-white/20 hover:text-white/70`}`,children:[(0,I.jsx)(`div`,{className:`text-2xl mb-1`,children:e.icon}),(0,I.jsx)(`div`,{className:`text-sm font-semibold`,children:e.label})]},e.id))})]}):u===`credentials`?(0,I.jsxs)(`div`,{className:`space-y-4 py-2`,children:[j&&(0,I.jsxs)(ZQ,{variant:`destructive`,className:`bg-red-500/10 border-red-500/30`,children:[(0,I.jsx)(ln,{className:`h-4 w-4`}),(0,I.jsx)($Q,{children:j})]}),f===`whatsapp`&&(0,I.jsx)(`div`,{className:`p-4 rounded-xl bg-emerald-500/10 border border-emerald-500/20 text-sm text-emerald-300`,children:`WhatsApp no requiere token. Haz clic en "Conectar" y escanea el código QR con tu teléfono.`}),f===`webchat`&&(0,I.jsx)(`div`,{className:`p-4 rounded-xl bg-blue-500/10 border border-blue-500/20 text-sm text-blue-300`,children:`WebChat no requiere configuración. Haz clic en "Conectar" para activarlo.`}),(f===`telegram`||f===`discord`||f===`slack`)&&(0,I.jsxs)(`div`,{className:`space-y-3`,children:[(0,I.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,I.jsx)(Z,{className:`text-xs text-white/50 uppercase tracking-widest`,children:`Bot Token`}),(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsx)(G,{type:C?`text`:`password`,value:m,onChange:e=>h(e.target.value),placeholder:f===`telegram`?`123456789:AAF...`:f===`slack`?`xoxb-...`:`MTA5NDY...`,className:`bg-white/5 border-white/10 pr-10 font-mono text-sm`}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>w(e=>!e),className:`absolute right-2 top-1/2 -translate-y-1/2 text-white/40 hover:text-white/70`,children:C?(0,I.jsx)(On,{className:`h-4 w-4`}):(0,I.jsx)(kn,{className:`h-4 w-4`})})]})]}),f===`discord`&&(0,I.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,I.jsx)(Z,{className:`text-xs text-white/50 uppercase tracking-widest`,children:`Application ID`}),(0,I.jsx)(G,{value:g,onChange:e=>v(e.target.value),placeholder:`123456789012345678`,className:`bg-white/5 border-white/10 font-mono text-sm`})]}),f===`slack`&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,I.jsx)(Z,{className:`text-xs text-white/50 uppercase tracking-widest`,children:`Signing Secret`}),(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsx)(G,{type:x?`text`:`password`,value:y,onChange:e=>b(e.target.value),placeholder:`a1b2c3d4e5f6...`,className:`bg-white/5 border-white/10 pr-10 font-mono text-sm`}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>S(e=>!e),className:`absolute right-2 top-1/2 -translate-y-1/2 text-white/40 hover:text-white/70`,children:x?(0,I.jsx)(On,{className:`h-4 w-4`}):(0,I.jsx)(kn,{className:`h-4 w-4`})})]})]}),(0,I.jsxs)(`div`,{className:`p-3 rounded-lg bg-amber-500/10 border border-amber-500/20 text-xs text-amber-200/80`,children:[`Slack requiere una URL pública para webhooks. Usa ngrok, cloudflared o Tailscale y configura la Request URL en tu Slack App: `,(0,I.jsx)(`span`,{className:`font-mono`,children:`https://tu-url/slack/events`})]})]})]})]}):u===`connecting`?(0,I.jsxs)(`div`,{className:`flex flex-col items-center gap-4 py-8`,children:[(0,I.jsx)(`div`,{className:`relative`,children:(0,I.jsx)(`div`,{className:`h-16 w-16 rounded-full border-2 border-white/10 flex items-center justify-center`,children:(0,I.jsx)(Xn,{className:`h-8 w-8 animate-spin text-blue-400`})})}),(0,I.jsx)(`p`,{className:`text-sm text-white/60 text-center`,children:f===`whatsapp`?`Iniciando WhatsApp... Generando código QR`:`Conectando canal...`}),(0,I.jsx)(`p`,{className:`text-xs text-white/30`,children:`Esto puede tardar unos segundos`})]}):u===`qr`?(0,I.jsxs)(`div`,{className:`flex flex-col items-center gap-4 py-4`,children:[(0,I.jsxs)(`div`,{className:`relative`,children:[D?(0,I.jsx)(hwe,{data:D}):(0,I.jsxs)(`div`,{className:`flex flex-col items-center gap-3 py-6`,children:[(0,I.jsx)(dr,{className:`h-16 w-16 text-white/20`}),(0,I.jsx)(`p`,{className:`text-xs text-white/40`,children:`Generando QR...`})]}),k&&(0,I.jsxs)(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center rounded-xl bg-zinc-950/80 backdrop-blur-sm gap-2`,children:[(0,I.jsx)(Xn,{className:`h-8 w-8 animate-spin text-amber-400`}),(0,I.jsx)(`p`,{className:`text-xs text-amber-300 font-medium`,children:`QR expirado, renovando...`})]})]}),(0,I.jsx)(`div`,{className:`flex items-center gap-2 text-xs text-white/30`,children:k?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`h-1.5 w-1.5 rounded-full bg-amber-400 animate-pulse`}),`Renovando código QR...`]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse`}),`Esperando escaneo...`]})}),(0,I.jsx)(`p`,{className:`text-[11px] text-white/30 text-center`,children:`Abre WhatsApp → Ajustes → Dispositivos vinculados → Vincular dispositivo`})]}):u===`success`?(0,I.jsxs)(`div`,{className:`flex flex-col items-center gap-4 py-8`,children:[(0,I.jsx)(`div`,{className:`h-16 w-16 rounded-full bg-emerald-500/10 border border-emerald-500/30 flex items-center justify-center`,children:(0,I.jsx)(dn,{className:`h-8 w-8 text-emerald-400`})}),(0,I.jsxs)(`div`,{className:`text-center`,children:[(0,I.jsx)(`p`,{className:`text-sm font-semibold text-white`,children:`Canal conectado`}),(0,I.jsxs)(`p`,{className:`text-xs text-white/40 mt-1`,children:[f.charAt(0).toUpperCase()+f.slice(1),` está activo y listo para recibir mensajes.`]})]})]}):null,be=()=>(0,I.jsxs)(`div`,{className:`grid gap-4 py-4`,children:[(e?.type===`telegram`||e?.type===`discord`)&&(0,I.jsxs)(`div`,{className:`space-y-2 pb-2 border-b border-white/10`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,I.jsx)(Z,{className:`text-xs text-white/50 uppercase tracking-widest`,children:`Bot Token`}),!oe&&(0,I.jsx)(`button`,{type:`button`,onClick:()=>se(!0),className:`text-[11px] text-blue-400 hover:text-blue-300 transition-colors`,children:`Cambiar token`})]}),oe?(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsx)(G,{type:le?`text`:`password`,value:ce,onChange:e=>z(e.target.value),placeholder:e?.type===`telegram`?`123456789:AAF...`:`MTA5NDY...`,className:`bg-white/5 border-white/10 pr-10 font-mono text-sm`,autoFocus:!0}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>B(e=>!e),className:`absolute right-2 top-1/2 -translate-y-1/2 text-white/40 hover:text-white/70`,children:le?(0,I.jsx)(On,{className:`h-4 w-4`}):(0,I.jsx)(kn,{className:`h-4 w-4`})})]}),(0,I.jsxs)(`div`,{className:`flex gap-2`,children:[(0,I.jsx)(`button`,{type:`button`,onClick:()=>{se(!1),z(``),B(!1)},className:`text-[11px] text-white/40 hover:text-white/60 transition-colors`,children:`Cancelar`}),ce.trim().length>0&&(0,I.jsx)(`span`,{className:`text-[11px] text-amber-400/70`,children:`Se aplicará al guardar`})]})]}):(0,I.jsx)(`div`,{className:`flex items-center gap-2 px-3 py-2 rounded-lg bg-white/5 border border-white/10`,children:(0,I.jsx)(`span`,{className:`font-mono text-sm text-white/30 tracking-widest select-none`,children:`••••••••••••••••••••••••`})})]}),(0,I.jsxs)(`div`,{className:`grid grid-cols-4 items-center gap-4`,children:[(0,I.jsx)(Z,{className:`text-right text-xs`,children:`Voz (STT)`}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2 col-span-3`,children:[(0,I.jsx)(vq,{checked:L.voice_enabled,onCheckedChange:e=>R(t=>({...t,voice_enabled:e}))}),(0,I.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Procesar notas de voz`})]})]}),(0,I.jsxs)(`div`,{className:`grid grid-cols-4 items-center gap-4`,children:[(0,I.jsx)(Z,{className:`text-right text-xs`,children:`TTS`}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2 col-span-3`,children:[(0,I.jsx)(vq,{checked:L.tts_enabled,onCheckedChange:e=>R(t=>({...t,tts_enabled:e}))}),(0,I.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Responder por voz`})]})]}),L.voice_enabled&&(0,I.jsxs)(`div`,{className:`grid grid-cols-4 items-center gap-4`,children:[(0,I.jsx)(Z,{className:`text-right text-xs`,children:`Modelo STT`}),(0,I.jsxs)(ZK,{value:L.stt_provider||``,onValueChange:e=>R(t=>({...t,stt_provider:e})),children:[(0,I.jsx)(eq,{className:`col-span-3`,children:(0,I.jsx)($K,{placeholder:`Selecciona modelo STT`})}),(0,I.jsx)(rq,{children:fwe.filter(e=>c[e.provider]).map(e=>(0,I.jsx)(Q,{value:e.id,children:e.name},e.id))})]})]}),L.tts_enabled&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`grid grid-cols-4 items-center gap-4`,children:[(0,I.jsx)(Z,{className:`text-right text-xs`,children:`Modelo TTS`}),(0,I.jsxs)(ZK,{value:L.tts_provider||``,onValueChange:e=>R(t=>({...t,tts_provider:e,tts_voice_id:``})),children:[(0,I.jsx)(eq,{className:`col-span-3`,children:(0,I.jsx)($K,{placeholder:`Selecciona modelo TTS`})}),(0,I.jsx)(rq,{children:pwe.filter(e=>c[e.provider]).map(e=>(0,I.jsxs)(QK,{children:[(0,I.jsx)(iq,{children:e.group}),e.models.map(e=>(0,I.jsx)(Q,{value:e.id,children:e.name},e.id))]},e.group))})]})]}),L.tts_provider&&(0,I.jsxs)(`div`,{className:`grid grid-cols-4 items-center gap-4`,children:[(0,I.jsx)(Z,{className:`text-right text-xs`,children:`Voz`}),(0,I.jsxs)(ZK,{value:L.tts_voice_id||``,onValueChange:e=>R(t=>({...t,tts_voice_id:e})),disabled:ie||ne.length===0,children:[(0,I.jsx)(eq,{className:`col-span-3`,children:(0,I.jsx)($K,{placeholder:ie?`Cargando...`:`Selecciona una voz`})}),(0,I.jsx)(rq,{children:ne.map(e=>(0,I.jsx)(Q,{value:e.id,children:e.name},e.id))})]})]}),!c.elevenlabs&&!c.openai&&!c.gemini&&!c.qwen&&(0,I.jsxs)(ZQ,{variant:`destructive`,className:`bg-yellow-500/10 border-yellow-500/30 text-yellow-200`,children:[(0,I.jsx)(ln,{className:`h-4 w-4`}),(0,I.jsxs)($Q,{className:`text-yellow-200/80`,children:[`Configura un provider TTS.`,` `,(0,I.jsx)(`button`,{className:`underline`,onClick:()=>{n(),i(`/settings/voz`)},children:`Ir a Configuración de Voz`})]})]})]}),(0,I.jsxs)(`div`,{className:`grid grid-cols-4 items-center gap-4`,children:[(0,I.jsx)(Z,{className:`text-right text-xs`,children:`Entrega`}),(0,I.jsxs)(ZK,{value:L.step_delivery_mode,onValueChange:e=>R(t=>({...t,step_delivery_mode:e})),children:[(0,I.jsx)(eq,{className:`col-span-3`,children:(0,I.jsx)($K,{placeholder:`Modo de entrega`})}),(0,I.jsxs)(rq,{children:[(0,I.jsx)(Q,{value:`new_messages`,children:`Solo Mensajes Nuevos`}),(0,I.jsx)(Q,{value:`all`,children:`Todo (Sincronización)`})]})]})]})]}),xe=f===`whatsapp`||f===`webchat`||!de||f===`telegram`&&m.trim().length>10||f===`discord`&&m.trim().length>10&&g.trim().length>0;return(0,I.jsx)(yq,{open:t,onOpenChange:_e,children:(0,I.jsxs)(wq,{className:`sm:max-w-[480px] bg-zinc-950 border-white/10 text-white [&>button]:text-white/50 hover:[&>button]:text-white`,children:[(0,I.jsxs)(Tq,{children:[(0,I.jsxs)(Dq,{className:`flex items-center gap-2`,children:[(0,I.jsx)(xr,{className:`h-4 w-4 text-blue-400`}),{type:`Nuevo Canal`,credentials:`Conectar ${f.charAt(0).toUpperCase()+f.slice(1)}`,reconnect:de?`Configurar ${f.charAt(0).toUpperCase()+f.slice(1)}`:`Reconectar ${f.charAt(0).toUpperCase()+f.slice(1)}`,connecting:`Conectando...`,qr:`Escanea el código QR`,success:`¡Canal conectado!`,settings:`Configurar ${e?.type??`canal`}`}[u]??`Nuevo Canal`]}),(0,I.jsx)(Oq,{className:`text-white/40`,children:u===`settings`?`Ajusta el comportamiento y las opciones de voz del canal.`:u===`qr`?`Abre WhatsApp en tu teléfono y escanea el código para vincular el dispositivo.`:u===`reconnect`?de?`Ingresa las credenciales para activar este canal.`:`Reconecta el canal con las credenciales existentes o actualízalas.`:`Conecta un nuevo canal de comunicación a Hive.`})]}),e&&u===`settings`?be():ye(),(0,I.jsx)(Eq,{className:`gap-2`,children:e&&u===`settings`?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(W,{variant:`outline`,onClick:_e,disabled:ee,children:`Cancelar`}),(0,I.jsx)(W,{onClick:ge,disabled:ee,children:ee?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Xn,{className:`h-4 w-4 animate-spin mr-2`}),`Guardando...`]}):`Guardar Cambios`})]}):u===`reconnect`?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(W,{variant:`outline`,onClick:_e,children:`Cancelar`}),(0,I.jsx)(W,{onClick:me,disabled:N||!xe,children:N?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Xn,{className:`h-4 w-4 animate-spin mr-2`}),`Conectando...`]}):de?`Conectar`:`Reconectar`})]}):u===`type`?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(W,{variant:`outline`,onClick:_e,children:`Cancelar`}),(0,I.jsx)(W,{onClick:()=>d(`credentials`),children:`Siguiente →`})]}):u===`credentials`?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(W,{variant:`outline`,onClick:()=>d(`type`),children:`← Atrás`}),(0,I.jsx)(W,{onClick:he,disabled:N||!ve,children:N?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Xn,{className:`h-4 w-4 animate-spin mr-2`}),`Conectando...`]}):`Conectar`})]}):u===`connecting`?(0,I.jsx)(W,{variant:`outline`,onClick:_e,children:`Cancelar`}):u===`qr`?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(W,{variant:`outline`,size:`sm`,onClick:()=>{T&&pe(f,T)},children:[(0,I.jsx)(fr,{className:`h-3.5 w-3.5 mr-2`}),`Actualizar QR`]}),(0,I.jsx)(W,{variant:`outline`,onClick:_e,children:`Cancelar`})]}):u===`success`?(0,I.jsx)(W,{onClick:_e,children:`Cerrar`}):null})]})})}function _we(){let{channels:e,activeChannels:t,fetchChannels:n,isLoading:r,toggleChannel:i,updateChannel:a}=qR(),[o,s]=(0,_.useState)(`all`),[c,l]=(0,_.useState)(null),[u,d]=(0,_.useState)(!1);(0,_.useEffect)(()=>{n()},[]);let f=(0,_.useMemo)(()=>o===`all`?e:o===`active`?e.filter(e=>e.active):o===`inactive`?e.filter(e=>!e.active):e,[e,o]),p=e=>{l(e),d(!0)},m=()=>{l(null),d(!0)};return(0,I.jsxs)(`div`,{className:`hive-page-container animate-fade-in mt-10`,children:[(0,I.jsx)(`div`,{className:`hive-page-header`,children:(0,I.jsxs)(`div`,{className:`flex flex-col md:flex-row md:items-center justify-between gap-6`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3 mb-2`,children:[(0,I.jsx)(`div`,{className:`h-10 w-10 rounded-xl bg-blue-500/10 border border-blue-500/20 flex items-center justify-center text-blue-400`,children:(0,I.jsx)(qn,{className:`h-6 w-6`})}),(0,I.jsx)(`h1`,{className:`text-3xl font-black text-white uppercase tracking-tighter`,children:`Canales`})]}),(0,I.jsx)(`p`,{className:`hive-subtitle`,children:`Gestiona tus puntos de entrada y salida de comunicación en la red Hive.`})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,I.jsxs)(`button`,{onClick:()=>n(),disabled:r,className:`hive-btn hive-btn--ghost px-6 text-[10px]`,children:[(0,I.jsx)(fr,{className:`h-3.5 w-3.5 mr-2 ${r?`animate-spin`:``}`}),`SINCRONIZAR`]}),(0,I.jsxs)(`button`,{onClick:m,className:`hive-btn hive-btn--primary px-8 text-[10px]`,children:[(0,I.jsx)(lr,{className:`h-3.5 w-3.5 mr-2`}),`NUEVO CANAL`]})]})]})}),(0,I.jsxs)(`div`,{className:`hive-card border-blue-500/10 !bg-blue-500/[0.02] mb-8 overflow-hidden relative`,children:[(0,I.jsxs)(`div`,{className:`hive-card-body py-4 px-6 flex items-center justify-between relative z-10`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,I.jsx)(`div`,{className:`h-8 w-8 rounded-lg bg-blue-500/10 flex items-center justify-center text-blue-400`,children:(0,I.jsx)(Vr,{className:`h-4 w-4`})}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`p`,{className:`text-[10px] font-black tracking-widest text-blue-500/50 uppercase`,children:`Estado Operativo`}),(0,I.jsxs)(`p`,{className:`text-xs text-white/60`,children:[`Actualmente tienes `,(0,I.jsx)(`span`,{className:`text-blue-400 font-black`,children:t.length}),` canales procesando datos.`]})]})]}),(0,I.jsx)(`div`,{className:`text-[10px] text-white/20 font-black tracking-widest uppercase`,children:`HIVE NODE SECURE`})]}),(0,I.jsx)(`div`,{className:`hive-glow-blob hive-glow-blob--blue -top-10 -right-10 h-32 w-32 opacity-10`})]}),(0,I.jsx)(`div`,{className:`flex items-center gap-1.5 p-1 bg-white/5 rounded-2xl w-fit border border-white/5 mb-8`,children:[{id:`all`,label:`TODOS (${e.length})`},{id:`active`,label:`ACTIVOS (${e.filter(e=>e.active).length})`},{id:`inactive`,label:`INACTIVOS (${e.filter(e=>!e.active).length})`}].map(e=>(0,I.jsx)(`button`,{onClick:()=>s(e.id),className:`px-8 py-2.5 rounded-xl text-[10px] font-black tracking-widest uppercase transition-all duration-300 ${o===e.id?`bg-blue-500 text-white shadow-blue-glow`:`text-white/20 hover:text-white/40 hover:bg-white/5`}`,children:e.label},e.id))}),(0,I.jsx)(`div`,{className:`animate-fade-in`,children:f.length>0?(0,I.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6`,children:f.map(e=>(0,I.jsx)(WCe,{channel:e,onEdit:p,onToggle:i},e.id))}):(0,I.jsx)(`div`,{className:`hive-card border-dashed border-white/10 bg-white/[0.02]`,children:(0,I.jsxs)(`div`,{className:`hive-card-body flex flex-col items-center justify-center py-20 px-4`,children:[(0,I.jsx)(`div`,{className:`h-20 w-20 rounded-2xl bg-white/5 flex items-center justify-center mb-6`,children:(0,I.jsx)(qn,{className:`h-10 w-10 text-white/10`})}),(0,I.jsxs)(`div`,{className:`text-center`,children:[(0,I.jsx)(`p`,{className:`hive-title-section text-center mb-2`,children:`No se detectaron canales`}),(0,I.jsx)(`p`,{className:`text-xs text-white/40 mb-8 max-w-[300px] mx-auto leading-relaxed`,children:`Configura tu primer punto de enlace para empezar a recibir datos en tiempo real.`}),(0,I.jsx)(`button`,{onClick:m,className:`hive-btn hive-btn--primary px-10 text-[10px]`,children:`ESTABLECER CONEXIÓNHORA`})]})]})})}),(0,I.jsx)(gwe,{channel:c,isOpen:u,onClose:()=>d(!1),onSave:async(e,t)=>{await a(e,t)}})]})}var vwe=Gh((e,t)=>({projects:[],isLoading:!1,fetchProjects:async t=>{e({isLoading:!0});try{let n=await K(t?`/api/projects?status=${t}`:`/api/projects`,{showLoader:!1,showError:!0});console.log(`[ProjectsStore] fetchProjects - API Response:`,n);let r=[];Array.isArray(n)?(r=n,console.log(`[ProjectsStore] Response es array directo:`,r.length,`proyectos`)):`projects`in n?(r=n.projects,console.log(`[ProjectsStore] Response tiene propiedad 'projects':`,r.length,`proyectos`)):`project`in n?(r=n.project?[n.project]:[],console.log(`[ProjectsStore] Response tiene propiedad 'project':`,r.length,`proyecto(s)`)):n&&typeof n==`object`&&`id`in n?(r=[n],console.log(`[ProjectsStore] Response es un proyecto directo:`,r.length,`proyecto`)):console.warn(`[ProjectsStore] Formato de respuesta desconocido:`,n),e({projects:r})}catch(t){console.error(`[ProjectsStore] Error en fetchProjects:`,t),e({projects:[]})}finally{e({isLoading:!1})}},fetchActiveProjects:async()=>{e({isLoading:!0});try{let t=await K(`/api/projects/active`,{showLoader:!1,showError:!0});console.log(`[ProjectsStore] fetchActiveProjects - API Response:`,t);let n=[];Array.isArray(t)?(n=t,console.log(`[ProjectsStore] Response es array directo:`,n.length,`proyectos`)):`projects`in t?(n=t.projects,console.log(`[ProjectsStore] Response tiene propiedad 'projects':`,n.length,`proyectos`)):`project`in t?(n=t.project?[t.project]:[],console.log(`[ProjectsStore] Response tiene propiedad 'project':`,n.length,`proyecto(s)`)):t&&typeof t==`object`&&`id`in t?(n=[t],console.log(`[ProjectsStore] Response es un proyecto directo:`,n.length,`proyecto`)):console.warn(`[ProjectsStore] Formato de respuesta desconocido:`,t),e({projects:n})}catch(t){console.error(`[ProjectsStore] Error en fetchActiveProjects:`,t),e({projects:[]})}finally{e({isLoading:!1})}},updateTaskLocal:(t,n)=>{e(e=>({projects:e.projects.map(e=>({...e,tasks:e.tasks.map(e=>e.id===t?{...e,...n}:e)}))}))},updateProjectLocal:(t,n)=>{e(e=>({projects:e.projects.map(e=>e.id===t?{...e,...n}:e)}))}}));function J7({icon:e,...t}){return(0,I.jsx)(e,{...t})}var ywe={code:`Código`,research:`Investigación`,content:`Contenido`,data:`Datos`,general:`General`},Y7={code:`bg-blue-500/10 text-blue-400 border-blue-500/20`,research:`bg-purple-500/10 text-purple-400 border-purple-500/20`,content:`bg-green-500/10 text-green-400 border-green-500/20`,data:`bg-orange-500/10 text-orange-400 border-orange-500/20`,general:`bg-gray-500/10 text-gray-400 border-gray-500/20`},bwe={active:`bg-green-500/10 text-green-400 border-green-500/20`,pending:`bg-yellow-500/10 text-yellow-400 border-yellow-500/20`,paused:`bg-gray-500/10 text-gray-400 border-gray-500/20`,done:`bg-blue-500/10 text-blue-400 border-blue-500/20`,failed:`bg-red-500/10 text-red-400 border-red-500/20`},xwe={active:`Activo`,pending:`Pendiente`,paused:`Pausado`,done:`Completado`,failed:`Fallido`,in_progress:`En progreso`,completed:`Completada`,blocked:`Bloqueada`};function Swe({status:e}){switch(e){case`completed`:return(0,I.jsx)(J7,{icon:dn,className:`h-3.5 w-3.5 text-green-400`});case`in_progress`:return(0,I.jsx)(J7,{icon:Xn,className:`h-3.5 w-3.5 text-yellow-400 animate-spin`});case`failed`:return(0,I.jsx)(J7,{icon:mn,className:`h-3.5 w-3.5 text-red-400`});case`blocked`:return(0,I.jsx)(J7,{icon:fn,className:`h-3.5 w-3.5 text-orange-400`});default:return(0,I.jsx)(J7,{icon:hn,className:`h-3.5 w-3.5 text-muted-foreground`})}}function Cwe({task:e}){return(0,I.jsxs)(`div`,{className:`flex items-center gap-3 py-1.5 px-3 rounded-md hover:bg-white/5 transition-colors group`,children:[(0,I.jsx)(Swe,{status:e.status}),(0,I.jsx)(`span`,{className:`text-sm flex-1 text-white/40 group-hover:text-white/80 transition-colors`,children:e.name}),e.description&&(0,I.jsx)(`span`,{className:`text-xs text-white/20 hidden sm:block max-w-[200px] truncate`,children:e.description}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2 ml-auto`,children:[e.status===`in_progress`&&(0,I.jsx)(`div`,{className:`w-16`,children:(0,I.jsx)(yB,{value:e.progress,className:`h-1`})}),(0,I.jsxs)(`span`,{className:`text-[11px] text-white/30 w-8 text-right`,children:[e.progress,`%`]})]})]})}function wwe({project:e}){let[t,n]=(0,_.useState)(e.status===`active`||e.status===`pending`);return console.log(`[ProjectsPage] ProjectCard - Project:`,t),(0,I.jsxs)(`div`,{className:`hive-card group overflow-hidden mt-10`,children:[(0,I.jsxs)(`button`,{className:`w-full flex items-center gap-3 p-4 hover:bg-white/5 transition-colors text-left`,onClick:()=>n(!t),children:[(0,I.jsx)(J7,{icon:t?an:sn,className:`h-4 w-4 text-white/30 shrink-0`}),(0,I.jsx)(J7,{icon:Nn,className:`h-4 w-4 text-blue-400 shrink-0`}),(0,I.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,I.jsx)(`span`,{className:`font-medium text-sm text-white`,children:e.name}),(0,I.jsx)($z,{variant:`outline`,className:`text-[10px] px-1.5 py-0 ${Y7[e.type]??Y7.general}`,children:ywe[e.type]??e.type}),(0,I.jsx)($z,{variant:`outline`,className:`text-[10px] px-1.5 py-0 ${bwe[e.status]??``}`,children:xwe[e.status]??e.status})]}),e.description&&(0,I.jsx)(`p`,{className:`hive-subtitle !mt-0.5 truncate`,children:e.description})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-3 shrink-0`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,I.jsx)(`div`,{className:`w-20`,children:(0,I.jsx)(yB,{value:e.progress,className:`h-1.5`})}),(0,I.jsxs)(`span`,{className:`text-xs text-white/30 w-8 text-right`,children:[e.progress,`%`]})]}),(e.tasks??[]).length>0&&(0,I.jsxs)(`span`,{className:`text-xs text-white/30`,children:[(e.tasks??[]).filter(e=>e.status===`completed`).length,`/`,(e.tasks??[]).length]})]})]}),t&&(e.tasks??[]).length>0&&(0,I.jsx)(`div`,{className:`border-t border-white/5 px-2 py-2`,children:(e.tasks??[]).map(e=>(0,I.jsx)(Cwe,{task:e},e.id))}),t&&(e.tasks??[]).length===0&&(0,I.jsx)(`div`,{className:`border-t border-white/5 px-4 py-3 text-xs text-white/20`,children:`Sin tareas registradas`})]})}function Twe(){let{projects:e,isLoading:t,fetchProjects:n,fetchActiveProjects:r}=vwe(),[i,a]=(0,_.useState)(`active`),o=()=>{i===`active`?r():i===`done`?n(`done`):n()};return(0,_.useEffect)(()=>{o()},[i]),(0,I.jsx)(`div`,{className:`hive-page`,children:(0,I.jsxs)(`div`,{className:`hive-page-container`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3 mb-2`,children:[(0,I.jsx)(`div`,{className:`hive-page-header__dot`}),(0,I.jsx)(`span`,{className:`hive-page-header__label`,children:`GESTIÓN`})]}),(0,I.jsxs)(`h1`,{className:`hive-title-page`,children:[`Proyectos`,(0,I.jsx)(`span`,{className:`hive-title-page__accent`,children:`.`})]}),(0,I.jsx)(`p`,{className:`hive-subtitle`,children:`Seguimiento de tareas y proyectos activos del agente`})]}),(0,I.jsxs)(`button`,{className:`hive-btn hive-btn--primary`,onClick:o,disabled:t,children:[(0,I.jsx)(J7,{icon:fr,className:`h-3.5 w-3.5 mr-1.5 ${t?`animate-spin`:``}`}),`Actualizar`]})]}),(0,I.jsx)(`div`,{className:`flex gap-1 mt-6 bg-white/[0.02] rounded-xl p-1 border border-white/5`,children:[{key:`active`,label:`Activos`},{key:`all`,label:`Todos`},{key:`done`,label:`Completados`}].map(e=>(0,I.jsx)(`button`,{onClick:()=>a(e.key),className:`px-6 py-2 rounded-xl text-[10px] font-black tracking-widest uppercase transition-all duration-300 ${i===e.key?`bg-blue-600 text-white shadow-btn-primary`:`text-white/20 hover:text-white/40 hover:bg-white/5`}`,children:e.label},e.key))}),(0,I.jsx)(`div`,{className:`mt-6 space-y-3`,children:t?(0,I.jsxs)(`div`,{className:`hive-empty-state`,children:[(0,I.jsx)(J7,{icon:Xn,className:`h-5 w-5 animate-spin mr-2`}),`Cargando proyectos...`]}):e.length===0?(0,I.jsxs)(`div`,{className:`hive-empty-state`,children:[(0,I.jsx)(J7,{icon:Nn,className:`h-10 w-10 opacity-30 mb-3`}),(0,I.jsxs)(`p`,{className:`text-sm text-white/30`,children:[`No hay proyectos `,i===`active`?`activos`:``]}),(0,I.jsx)(`p`,{className:`text-xs text-white/15 mt-1`,children:`El agente creará proyectos automáticamente cuando reciba tareas complejas`})]}):e.filter(Boolean).map(e=>(0,I.jsx)(wwe,{project:e},e.id))})]})})}function X7({provider:e,onSave:t,onCancel:n}){let[r,i]=(0,_.useState)(!1),[a,o]=(0,_.useState)(``),[s,c]=(0,_.useState)(e?.baseUrl||e?.base_url||``),[l,u]=(0,_.useState)(e?.config?.headers?JSON.stringify(e.config.headers,null,2):``),[d,f]=(0,_.useState)(e?.num_ctx?String(e.num_ctx):``),p=s||e?.baseUrl||e?.base_url||``,m=e?.id===`ollama`||p.includes(`localhost`)||p.includes(`127.0.0.1`),h=!!e?.has_api_key,g=!!e?.has_headers;return(0,I.jsxs)(`div`,{className:`space-y-3`,children:[(0,I.jsxs)(`div`,{className:`space-y-1`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,I.jsx)(Z,{className:`hive-label`,children:`API Key`}),h&&(0,I.jsxs)(`span`,{className:`flex items-center gap-1 text-[10px] font-bold text-emerald-400`,children:[(0,I.jsx)(dn,{className:`h-3 w-3`}),`Configurada`]})]}),(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsx)(G,{type:r?`text`:`password`,value:a,onChange:e=>o(e.target.value),placeholder:h?`•••••••••••••••• (dejar vacío para conservar)`:`sk-...`,className:`hive-input !h-8 text-xs pr-8`}),(0,I.jsx)(W,{variant:`ghost`,size:`icon`,className:`absolute right-0 top-0 h-8 w-8 text-white/40 hover:text-white`,onClick:()=>i(!r),children:r?(0,I.jsx)(On,{className:`h-3 w-3`}):(0,I.jsx)(kn,{className:`h-3 w-3`})})]})]}),(0,I.jsxs)(`div`,{className:`space-y-1`,children:[(0,I.jsx)(Z,{className:`hive-label`,children:`Base URL (opcional)`}),(0,I.jsx)(G,{value:s,onChange:e=>c(e.target.value),placeholder:`https://api.example.com`,className:`hive-input !h-8 text-xs`})]}),m&&(0,I.jsxs)(`div`,{className:`space-y-1`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,I.jsx)(Z,{className:`hive-label`,children:`Context Window (num_ctx)`}),(0,I.jsx)(`span`,{className:`text-[10px] text-white/30`,children:`tokens — por defecto 32 768`})]}),(0,I.jsx)(G,{type:`number`,value:d,onChange:e=>f(e.target.value),placeholder:`8192`,min:512,step:512,className:`hive-input !h-8 text-xs font-mono`}),(0,I.jsx)(`p`,{className:`text-[10px] text-amber-400/60`,children:`Aumenta si ves errores de contexto. Tu modelo soporta hasta 262 144 tokens.`})]}),(0,I.jsxs)(`div`,{className:`space-y-1`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,I.jsx)(Z,{className:`hive-label`,children:`Custom Headers (JSON)`}),g&&(0,I.jsxs)(`span`,{className:`flex items-center gap-1 text-[10px] font-bold text-emerald-400`,children:[(0,I.jsx)(dn,{className:`h-3 w-3`}),`Configurados`]})]}),(0,I.jsx)(`textarea`,{value:l,onChange:e=>u(e.target.value),placeholder:g?`{ ... } (dejar vacío para conservar)`:`{ "x-custom-header": "value" }`,rows:3,className:`w-full bg-white/5 border border-white/10 rounded-md p-2 text-xs text-white/70 focus:outline-none focus:border-blue-500/50 transition-all font-mono`})]}),(0,I.jsxs)(`div`,{className:`flex gap-2 pt-2`,children:[(0,I.jsx)(`button`,{className:`hive-btn hive-btn--form-cancel flex-1`,onClick:n,children:`Cancelar`}),(0,I.jsx)(`button`,{className:`hive-btn hive-btn--form-submit flex-1`,onClick:()=>{let e;if(l.trim())try{e=JSON.parse(l.trim())}catch{yg.fire(`Error`,`JSON de Headers inválido`,`error`);return}t&&t({apiKey:a,baseUrl:s||void 0,headers:e,numCtx:d.trim()?Number(d.trim()):null})},children:`Guardar`})]}),(0,I.jsx)(`p`,{className:`text-[10px] text-white/20 pt-2`,children:`La API key se guarda cifrada en la base de datos.`})]})}var Ewe=xr,Dwe=an,Owe=sn,Z7=bn,kwe=lr,Awe=Wn,jwe=In,Mwe=fr,Nwe=sr,Pwe=jr,Fwe=rn,Iwe=Br;function Lwe({provider:e,updateProvider:t,onManageModels:n}){let[r,i]=(0,_.useState)(!1),[a,o]=(0,_.useState)(!1),[s,c]=(0,_.useState)(``),[l,u]=(0,_.useState)(!1),[d,f]=(0,_.useState)(!1),[p,m]=(0,_.useState)(null),[h,g]=(0,_.useState)(``),[v,y]=(0,_.useState)(``),[b,x]=(0,_.useState)(null),{models:S,toggleModel:C,createModel:w,syncModels:T,deleteModel:E,updateModel:D}=HR(),{toggleProvider:O}=VR(),k=(0,_.useMemo)(()=>{let t=S.filter(t=>(t.providerId||t.provider_id)===e.id);return t.length>0?t:e.models||[]},[S,e.id,e.models]),A=k.filter(e=>e.enabled||e.active),j=n=>{t(e.id,n),i(!1)},M=async t=>{try{await O(e.id,t)}catch(e){console.error(`Failed to toggle provider:`,e)}},N=async(e,t)=>{try{await C(e.id,t)}catch(e){console.error(`Failed to toggle model:`,e)}},P=async()=>{f(!0);try{await T(e.id),o(!0)}catch(e){console.error(`Failed to sync models:`,e)}finally{f(!1)}},F=e=>{m(e.id),g(e.name),y(e.id)},L=()=>{m(null),g(``),y(``)},R=async e=>{let t=h.trim()||e.name,n=v.trim()||e.id;if(t===e.name&&n===e.id){L();return}try{await D(e.id,{name:t,id:n}),L()}catch(e){console.error(`Failed to update model:`,e)}},ee=async e=>{x(e.id);try{await E(e.id)}catch(e){console.error(`Failed to delete model:`,e)}finally{x(null)}},te=async()=>{let t=s.trim();if(t){u(!0);try{await w(e.id,t),c(``)}catch(e){console.error(`Failed to add model:`,e)}finally{u(!1)}}},ne=!!e.active,re=e.base_url||e.baseUrl,ie=e.id===`ollama`||re?.includes(`localhost`)||re?.includes(`127.0.0.1`);return(0,I.jsxs)(`div`,{className:`hive-card group overflow-hidden flex flex-col gap-0 transition-all duration-500 ${ne?`hive-card--active`:`opacity-70 grayscale-[0.5] hover:grayscale-0 hover:opacity-100`}`,children:[(0,I.jsx)(`div`,{className:`hive-card-body pb-3`,children:(0,I.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3 min-w-0`,children:[(0,I.jsx)(`div`,{className:`shrink-0 h-10 w-10 sm:h-11 sm:w-11 rounded-xl flex items-center justify-center border transition-all duration-500 ${ne?`bg-blue-500/10 border-blue-500/30 text-blue-400 shadow-[0_0_16px_rgba(59,130,246,0.15)]`:`bg-white/5 border-white/10 text-white/30`}`,children:(0,I.jsx)(Z7,{className:`h-5 w-5`})}),(0,I.jsxs)(`div`,{className:`min-w-0`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 mb-0.5`,children:[(0,I.jsx)(`h3`,{className:`font-black text-white tracking-tight text-base sm:text-lg uppercase leading-none truncate`,children:e.name}),ne&&(0,I.jsx)(`div`,{className:`hive-status-dot--active h-1.5 w-1.5 shrink-0`})]}),(0,I.jsx)(`p`,{className:`text-[11px] text-white/35 font-medium leading-none truncate`,children:e.id})]})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2 shrink-0`,children:[(0,I.jsx)(`span`,{className:`hidden sm:block text-[10px] font-black tracking-widest ${ne?`text-blue-400`:`text-white/30`}`,children:ne?`ON`:`OFF`}),(0,I.jsx)(vq,{checked:ne,onCheckedChange:M,className:`data-[state=checked]:bg-blue-500`})]})]})}),(0,I.jsxs)(`div`,{className:`px-5 pb-3 space-y-2 border-b border-white/5`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,I.jsx)(Awe,{className:`h-3.5 w-3.5 shrink-0 ${e.has_api_key?`text-emerald-400`:ie?`text-amber-400`:`text-white/20`}`}),(0,I.jsx)(`span`,{className:`text-[11px] font-mono truncate`,children:e.masked_api_key?(0,I.jsx)(`span`,{className:`text-white/50`,children:e.masked_api_key}):e.has_api_key?(0,I.jsx)(`span`,{className:`text-white/50`,children:`••••••••••••••••`}):ie?(0,I.jsx)(`span`,{className:`text-amber-400/70`,children:`Local — sin API key`}):(0,I.jsx)(`span`,{className:`text-white/25`,children:`Sin API key`})})]}),re&&(0,I.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,I.jsx)(jwe,{className:`h-3.5 w-3.5 shrink-0 text-white/20`}),(0,I.jsx)(`span`,{className:`text-[11px] text-white/40 truncate font-mono`,children:re})]}),ie&&(0,I.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,I.jsx)(Z7,{className:`h-3.5 w-3.5 shrink-0 text-white/20`}),(0,I.jsxs)(`span`,{className:`text-[11px] text-white/40 font-mono`,children:[`ctx: `,(0,I.jsx)(`span`,{className:e.num_ctx?`text-amber-400/70`:`text-white/25`,children:e.num_ctx?`${e.num_ctx.toLocaleString()} tokens`:`32 768 (default)`})]})]})]}),(0,I.jsxs)(`div`,{className:`px-5 py-3 flex-1`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,I.jsxs)(`button`,{type:`button`,className:`flex items-center gap-2 flex-1 text-left text-[10px] font-black uppercase tracking-widest text-white/40 hover:text-white transition-colors`,onClick:()=>o(!a),children:[a?(0,I.jsx)(Dwe,{className:`h-3 w-3`}):(0,I.jsx)(Owe,{className:`h-3 w-3`}),`MODELOS`,(0,I.jsxs)(`span`,{className:`hive-tag scale-90 origin-left`,children:[A.length,`/`,k.length]})]}),ie&&(0,I.jsx)(`button`,{type:`button`,onClick:P,disabled:d,title:`Sincronizar modelos instalados en Ollama`,className:`h-6 w-6 flex items-center justify-center rounded-md text-white/30 hover:text-amber-400 hover:bg-amber-400/10 disabled:opacity-40 transition-colors`,children:(0,I.jsx)(Mwe,{className:`h-3 w-3 ${d?`animate-spin`:``}`})})]}),!a&&k.length>0&&(0,I.jsxs)(`div`,{className:`flex flex-wrap gap-1 mt-1`,children:[k.slice(0,3).map(e=>(0,I.jsx)(`span`,{className:`hive-tag text-[10px] ${e.enabled||e.active?``:`opacity-40`}`,children:e.name.split(`/`).pop()||e.name},e.id)),k.length>3&&(0,I.jsxs)(`span`,{className:`hive-tag text-[10px] text-white/30`,children:[`+`,k.length-3]})]}),a&&(0,I.jsxs)(`div`,{className:`space-y-1`,children:[(0,I.jsxs)(`div`,{className:`hive-scroll max-h-44 overflow-y-auto flex flex-col gap-0.5 pr-1`,children:[k.length===0&&(0,I.jsx)(`p`,{className:`text-[11px] text-white/25 py-2 text-center`,children:`Sin modelos configurados`}),k.map(e=>{let t=e.enabled||!!e.active,n=p===e.id;return(0,I.jsx)(`div`,{className:`rounded-lg transition-colors ${t&&!n||n?`bg-white/5`:`bg-transparent opacity-40`}`,children:n?(0,I.jsxs)(`div`,{className:`flex flex-col gap-1 px-2.5 py-1.5`,children:[(0,I.jsx)(`input`,{type:`text`,value:h,onChange:e=>g(e.target.value),placeholder:`Display name`,className:`w-full bg-white/5 border border-white/10 rounded-md px-2 h-7 text-[11px] text-white/70 placeholder-white/20 focus:outline-none focus:border-blue-500/50 transition-all`}),(0,I.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,I.jsx)(`input`,{type:`text`,value:v,onChange:e=>y(e.target.value),placeholder:`API model ID`,className:`flex-1 min-w-0 bg-white/5 border border-white/10 rounded-md px-2 h-7 text-[11px] text-white/70 placeholder-white/20 focus:outline-none focus:border-blue-500/50 transition-all font-mono`}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>R(e),className:`shrink-0 h-7 w-7 flex items-center justify-center rounded-md bg-emerald-500/10 border border-emerald-500/20 text-emerald-400 hover:bg-emerald-500/20 transition-colors`,children:(0,I.jsx)(Fwe,{className:`h-3 w-3`})}),(0,I.jsx)(`button`,{type:`button`,onClick:L,className:`shrink-0 h-7 w-7 flex items-center justify-center rounded-md bg-white/5 border border-white/10 text-white/40 hover:text-white hover:bg-white/10 transition-colors`,children:(0,I.jsx)(Iwe,{className:`h-3 w-3`})})]})]}):(0,I.jsxs)(`div`,{className:`flex items-center justify-between px-2.5 py-1.5`,children:[(0,I.jsx)(`span`,{className:`text-[11px] font-medium text-white truncate flex-1 mr-2`,children:e.name}),(0,I.jsxs)(`div`,{className:`flex items-center gap-1 shrink-0`,children:[(0,I.jsx)(`button`,{type:`button`,onClick:()=>F(e),title:`Editar modelo`,className:`h-5 w-5 flex items-center justify-center rounded text-white/25 hover:text-blue-400 hover:bg-blue-400/10 transition-colors`,children:(0,I.jsx)(Nwe,{className:`h-3 w-3`})}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>ee(e),disabled:b===e.id,title:`Eliminar modelo`,className:`h-5 w-5 flex items-center justify-center rounded text-white/25 hover:text-red-400 hover:bg-red-400/10 disabled:opacity-40 disabled:cursor-not-allowed transition-colors`,children:(0,I.jsx)(Pwe,{className:`h-3 w-3`})}),(0,I.jsx)(vq,{checked:t,onCheckedChange:t=>N(e,t),className:`scale-[0.7] origin-right data-[state=checked]:bg-blue-400 ml-0.5`})]})]})},e.id)})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-1.5 pt-1.5 border-t border-white/5`,children:[(0,I.jsx)(`input`,{type:`text`,value:s,onChange:e=>c(e.target.value),onKeyDown:e=>e.key===`Enter`&&te(),placeholder:`nombre-del-modelo`,className:`flex-1 min-w-0 bg-white/5 border border-white/10 rounded-md px-2 h-7 text-[11px] text-white/70 placeholder-white/20 focus:outline-none focus:border-blue-500/50 transition-all font-mono`}),(0,I.jsxs)(`button`,{type:`button`,onClick:te,disabled:l||!s.trim(),className:`shrink-0 h-7 px-2.5 flex items-center gap-1 rounded-md bg-blue-500/10 border border-blue-500/20 text-blue-400 text-[10px] font-black uppercase tracking-wider hover:bg-blue-500/20 disabled:opacity-40 disabled:cursor-not-allowed transition-colors`,children:[(0,I.jsx)(kwe,{className:`h-3 w-3`}),(0,I.jsx)(`span`,{className:`hidden xs:inline`,children:`ADD`})]})]})]})]}),(0,I.jsxs)(`div`,{className:`px-4 py-3 border-t border-white/5 flex items-center justify-between gap-2 overflow-hidden`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3 min-w-0 overflow-hidden`,children:[(0,I.jsxs)(`div`,{className:`hive-stat shrink-0`,children:[(0,I.jsx)(`span`,{className:`hive-stat__label`,children:`Uptime`}),(0,I.jsx)(`span`,{className:`hive-stat__value`,children:`99.9%`})]}),(0,I.jsxs)(`div`,{className:`hive-stat shrink-0`,children:[(0,I.jsx)(`span`,{className:`hive-stat__label`,children:`Estado`}),(0,I.jsx)(`span`,{className:`hive-stat__value ${ne?`text-emerald-400`:`text-white/30`}`,children:ne?`Activo`:`Inactivo`})]})]}),(0,I.jsxs)(yq,{open:r,onOpenChange:i,children:[(0,I.jsx)(bq,{asChild:!0,children:(0,I.jsxs)(`button`,{className:`hive-btn hive-btn--ghost h-8 px-2.5 text-[10px] font-black uppercase tracking-widest text-blue-400 shrink-0 flex items-center gap-1.5`,children:[(0,I.jsx)(Ewe,{className:`h-3 w-3`}),(0,I.jsx)(`span`,{children:`CONFIG`})]})}),(0,I.jsxs)(wq,{className:`rounded-xl border border-white/10 p-0 overflow-hidden w-[calc(100vw-2rem)] max-w-md bg-[#09090b]`,children:[(0,I.jsxs)(`div`,{className:`p-5 border-b border-white/5 bg-white/5 relative overflow-hidden`,children:[(0,I.jsx)(`div`,{className:`absolute -top-10 -right-10 h-32 w-32 bg-blue-600/10 rounded-full blur-[80px] pointer-events-none`}),(0,I.jsx)(Dq,{className:`text-lg font-black text-white uppercase tracking-tighter`,children:e.name}),(0,I.jsx)(Oq,{className:`text-xs text-white/40 font-medium mt-0.5`,children:`Autenticación y punto de enlace.`})]}),(0,I.jsx)(`div`,{className:`p-5`,children:(0,I.jsx)(X7,{provider:e,onSave:j,onCancel:()=>i(!1)})})]})]})]}),(0,I.jsx)(`div`,{className:`hive-strip--bottom ${ne?``:`opacity-20`}`})]})}function Rwe(){let{providers:e,updateProvider:t}=VR(),n=e.filter(e=>e.active).length;return(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,I.jsx)(`h3`,{className:`hive-title-section`,children:`Providers de IA`}),(0,I.jsxs)(`span`,{className:`hive-tag hive-tag--provider`,children:[n,` activos / `,e.length,` total`]})]}),(0,I.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 gap-4 sm:gap-5`,children:[e.map(e=>(0,I.jsx)(Lwe,{provider:e,updateProvider:t},e.id)),e.length===0&&(0,I.jsx)(`div`,{className:`hive-empty-state col-span-full`,children:`No hay providers disponibles.`})]})]})}var zwe=lr;function Bwe(){let{providers:e,updateProvider:t}=VR(),[n,r]=(0,_.useState)(!1),[i,a]=(0,_.useState)(null),o=e.filter(e=>!e.active);return(0,I.jsxs)(`div`,{className:`space-y-4 mt-6 sm:mt-10`,children:[(0,I.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3 mb-2`,children:[(0,I.jsx)(`div`,{className:`hive-page-header__dot`}),(0,I.jsx)(`span`,{className:`hive-page-header__label`,children:`INFRAESTRUCTURA`})]}),(0,I.jsxs)(`h2`,{className:`hive-title-page`,children:[`Providers de IA`,(0,I.jsx)(`span`,{className:`hive-title-page__accent`,children:`.`})]})]}),(0,I.jsxs)(yq,{open:n,onOpenChange:e=>{r(e),e||a(null)},children:[(0,I.jsx)(bq,{asChild:!0,children:(0,I.jsxs)(`button`,{className:`hive-btn hive-btn--primary`,disabled:o.length===0,children:[(0,I.jsx)(zwe,{className:`mr-1 h-4 w-4`}),`Añadir Provider`]})}),(0,I.jsxs)(wq,{className:`hive-card border-white/10 p-0 overflow-hidden max-w-md bg-[#09090b]`,children:[(0,I.jsxs)(`div`,{className:`p-6 border-b border-white/5 bg-white/5 relative overflow-hidden`,children:[(0,I.jsx)(`div`,{className:`hive-glow-blob hive-glow-blob--blue -top-10 -right-10 h-32 w-32 opacity-20`}),(0,I.jsx)(Dq,{className:`text-xl font-black text-white uppercase tracking-tighter`,children:`Añadir Provider`}),(0,I.jsx)(Oq,{className:`text-xs text-white/40 font-medium mt-1`,children:`Selecciona un provider inactivo para configurarlo y activarlo.`})]}),(0,I.jsxs)(`div`,{className:`space-y-4 p-6`,children:[(0,I.jsxs)(ZK,{value:i?.id||``,onValueChange:e=>a(o.find(t=>t.id===e)||null),children:[(0,I.jsx)(eq,{className:`hive-select-trigger`,children:(0,I.jsx)($K,{placeholder:`Selecciona un provider`})}),(0,I.jsxs)(rq,{className:`hive-select-content`,children:[o.length===0&&(0,I.jsx)(Q,{value:`none`,disabled:!0,className:`hive-select-item`,children:`Todos los providers están activos`}),o.map(e=>(0,I.jsx)(Q,{value:e.id,className:`hive-select-item`,children:e.name},e.id))]})]}),i&&(0,I.jsx)(`div`,{className:`pt-2 border-t border-white/5 mt-4`,children:(0,I.jsx)(X7,{provider:i,onSave:e=>{i&&(t(i.id,{active:!0,config:{...i.config,...e}}),r(!1),a(null))},onCancel:()=>{r(!1),a(null)}})})]})]})]})]}),(0,I.jsx)(Rwe,{})]})}var Q7=Gh(e=>({messages:[],isLoading:!1,currentSteps:[],addMessage:t=>e(e=>({messages:[...e.messages,t]})),addMessages:t=>e(e=>({messages:[...e.messages,...t]})),updateMessage:(t,n)=>e(e=>({messages:e.messages.map(e=>e.id===t?{...e,...n}:e)})),setMessages:t=>e({messages:t}),clearMessages:()=>e({messages:[]}),setLoading:t=>e({isLoading:t}),addStep:t=>e(e=>({currentSteps:[...e.currentSteps.slice(-4),t]})),clearSteps:()=>e({currentSteps:[]})}));function $7(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Vwe(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function Hwe(e,t,n){let r=CQ((n||{}).ignore||[]),i=Uwe(t),a=-1;for(;++a<i.length;)EQ(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function Uwe(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([Wwe(e[0]),Gwe(e[1])])}return t}function Wwe(e){return typeof e==`string`?new RegExp(Vwe(e),`g`):e}function Gwe(e){return typeof e==`function`?e:function(){return e}}var e9=`phrasing`,t9=[`autolink`,`link`,`image`,`label`];function Kwe(){return{transforms:[$we],enter:{literalAutolink:Jwe,literalAutolinkEmail:n9,literalAutolinkHttp:n9,literalAutolinkWww:n9},exit:{literalAutolink:Qwe,literalAutolinkEmail:Zwe,literalAutolinkHttp:Ywe,literalAutolinkWww:Xwe}}}function qwe(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:e9,notInConstruct:t9},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:e9,notInConstruct:t9},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:e9,notInConstruct:t9}]}}function Jwe(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function n9(e){this.config.enter.autolinkProtocol.call(this,e)}function Ywe(e){this.config.exit.autolinkProtocol.call(this,e)}function Xwe(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function Zwe(e){this.config.exit.autolinkEmail.call(this,e)}function Qwe(e){this.exit(e)}function $we(e){Hwe(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,eTe],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,tTe]],{ignore:[`link`,`linkReference`]})}function eTe(e,t,n,r,i){let a=``;if(!r9(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!nTe(n)))return!1;let o=rTe(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function tTe(e,t,n,r){return!r9(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function nTe(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function rTe(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=$7(e,`(`),a=$7(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function r9(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||cZ(n)||sZ(n))&&(!t||n!==47)}i9.peek=fTe;function iTe(){this.buffer()}function aTe(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function oTe(){this.buffer()}function sTe(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function cTe(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=XX(this.sliceSerialize(e)).toLowerCase(),n.label=t}function lTe(e){this.exit(e)}function uTe(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=XX(this.sliceSerialize(e)).toLowerCase(),n.label=t}function dTe(e){this.exit(e)}function fTe(){return`[`}function i9(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function pTe(){return{enter:{gfmFootnoteCallString:iTe,gfmFootnoteCall:aTe,gfmFootnoteDefinitionLabelString:oTe,gfmFootnoteDefinition:sTe},exit:{gfmFootnoteCallString:cTe,gfmFootnoteCall:lTe,gfmFootnoteDefinitionLabelString:uTe,gfmFootnoteDefinition:dTe}}}function mTe(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:i9},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
252
- `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?a9:hTe))),s(),o}}function hTe(e,t,n){return t===0?e:a9(e,t,n)}function a9(e,t,n){return(n?``:` `)+e}var gTe=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];o9.peek=xTe;function _Te(){return{canContainEols:[`delete`],enter:{strikethrough:yTe},exit:{strikethrough:bTe}}}function vTe(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:gTe}],handlers:{delete:o9}}}function yTe(e){this.enter({type:`delete`,children:[]},e)}function bTe(e){this.exit(e)}function o9(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function xTe(){return`~`}function STe(e){return e.length}function CTe(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||STe,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=wTe(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=s9(r[d]);else{let e=s9(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&!(n.alignDelimiters===!1&&i===``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
253
- `)}function wTe(e){return e==null?``:String(e)}function s9(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function TTe(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),ETe);return i(),o}function ETe(e,t,n){return`>`+(n?``:` `)+e}function DTe(e,t){return c9(e,t.inConstruct,!0)&&!c9(e,t.notInConstruct,!1)}function c9(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function l9(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
254
- `&&DTe(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
255
- `}function OTe(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function kTe(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function ATe(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function jTe(e,t,n,r){let i=ATe(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(kTe(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,MTe);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(OTe(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
256
- `,encode:["`"],...s.current()})),t()}return u+=s.move(`
257
- `),a&&(u+=s.move(a+`
258
- `)),u+=s.move(c),l(),u}function MTe(e,t,n){return(n?``:` `)+e}function u9(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function NTe(e,t,n,r){let i=u9(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
259
- `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function PTe(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function d9(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function f9(e,t,n){let r=vZ(e),i=vZ(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}p9.peek=FTe;function p9(e,t,n,r){let i=PTe(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=f9(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=d9(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=f9(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+d9(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function FTe(e,t,n){return n.options.emphasis||`*`}function ITe(e,t){let n=!1;return DQ(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&LX(e)&&(t.options.setext||n))}function LTe(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(ITe(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
260
- `,after:`
261
- `});return r(),t(),o+`
262
- `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
263
- `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
264
- `,...a.current()});return/^[\t ]/.test(l)&&(l=d9(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}m9.peek=RTe;function m9(e){return e.value||``}function RTe(){return`<`}h9.peek=zTe;function h9(e,t,n,r){let i=u9(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function zTe(){return`!`}g9.peek=BTe;function g9(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function BTe(){return`!`}_9.peek=VTe;function _9(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function VTe(){return"`"}function v9(e,t){let n=LX(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type===`text`&&(n===e.url||`mailto:`+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}y9.peek=HTe;function y9(e,t,n,r){let i=u9(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(v9(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function HTe(e,t,n){return v9(e,n)?`<`:`[`}b9.peek=UTe;function b9(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function UTe(){return`[`}function x9(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function WTe(e){let t=x9(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function GTe(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function S9(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function KTe(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?GTe(n):x9(n),s=e.ordered?o===`.`?`)`:`.`:WTe(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),S9(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function qTe(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function JTe(e,t,n,r){let i=qTe(n),a=n.bulletCurrent||x9(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function YTe(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var XTe=CQ([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function ZTe(e,t,n,r){return(e.children.some(function(e){return XTe(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function QTe(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}C9.peek=$Te;function C9(e,t,n,r){let i=QTe(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=f9(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=d9(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=f9(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+d9(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function $Te(e,t,n){return n.options.strong||`*`}function eEe(e,t,n,r){return n.safe(e.value,r)}function tEe(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function nEe(e,t,n){let r=(S9(n)+(n.options.ruleSpaces?` `:``)).repeat(tEe(n));return n.options.ruleSpaces?r.slice(0,-1):r}var w9={blockquote:TTe,break:l9,code:jTe,definition:NTe,emphasis:p9,hardBreak:l9,heading:LTe,html:m9,image:h9,imageReference:g9,inlineCode:_9,link:y9,linkReference:b9,list:KTe,listItem:JTe,paragraph:YTe,root:ZTe,strong:C9,text:eEe,thematicBreak:nEe};function rEe(){return{enter:{table:iEe,tableData:E9,tableHeader:E9,tableRow:oEe},exit:{codeText:sEe,table:aEe,tableData:T9,tableHeader:T9,tableRow:T9}}}function iEe(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function aEe(e){this.exit(e),this.data.inTable=void 0}function oEe(e){this.enter({type:`tableRow`,children:[]},e)}function T9(e){this.exit(e)}function E9(e){this.enter({type:`tableCell`,children:[]},e)}function sEe(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,cEe));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function cEe(e,t){return t===`|`?t:e}function lEe(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
265
- `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
266
- `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return CTe(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=w9.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function uEe(){return{exit:{taskListCheckValueChecked:D9,taskListCheckValueUnchecked:D9,paragraph:fEe}}}function dEe(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:pEe}}}function D9(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function fEe(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function pEe(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=w9.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function mEe(){return[Kwe(),pTe(),_Te(),rEe(),uEe()]}function hEe(e){return{extensions:[qwe(),mTe(e),vTe(),lEe(e),dEe()]}}var gEe={tokenize:SEe,partial:!0},O9={tokenize:CEe,partial:!0},k9={tokenize:wEe,partial:!0},A9={tokenize:TEe,partial:!0},_Ee={tokenize:EEe,partial:!0},j9={name:`wwwAutolink`,tokenize:bEe,previous:I9},M9={name:`protocolAutolink`,tokenize:xEe,previous:L9},N9={name:`emailAutolink`,tokenize:yEe,previous:R9},P9={};function vEe(){return{text:P9}}for(var F9=48;F9<123;)P9[F9]=N9,F9++,F9===58?F9=65:F9===91&&(F9=97);P9[43]=N9,P9[45]=N9,P9[46]=N9,P9[95]=N9,P9[72]=[N9,M9],P9[104]=[N9,M9],P9[87]=[N9,j9],P9[119]=[N9,j9];function yEe(e,t,n){let r=this,i,a;return o;function o(t){return!z9(t)||!R9.call(r,r.previous)||B9(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return z9(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(_Ee,u,l)(t):t===45||t===95||QX(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&ZX(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function bEe(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!I9.call(r,r.previous)||B9(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(gEe,e.attempt(O9,e.attempt(k9,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function xEe(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&L9.call(r,r.previous)&&!B9(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(ZX(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||eZ(t)||aZ(t)||cZ(t)||sZ(t)?n(t):e.attempt(O9,e.attempt(k9,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function SEe(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function CEe(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(A9,c,s)(t):t===null||aZ(t)||cZ(t)||t!==45&&sZ(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function wEe(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(A9,t,a)(o):o===null||aZ(o)||cZ(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function TEe(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||aZ(o)||cZ(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||aZ(e)||cZ(e)?t(e):r(e)}function a(e){return ZX(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):ZX(t)?(e.consume(t),o):n(t)}}function EEe(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return QX(e)?n(e):t(e)}}function I9(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||aZ(e)}function L9(e){return!ZX(e)}function R9(e){return!(e===47||z9(e))}function z9(e){return e===43||e===45||e===46||e===95||QX(e)}function B9(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var DEe={tokenize:FEe,partial:!0};function OEe(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:MEe,continuation:{tokenize:NEe},exit:PEe}},text:{91:{name:`gfmFootnoteCall`,tokenize:jEe},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:kEe,resolveTo:AEe}}}}function kEe(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=XX(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function AEe(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function jEe(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||aZ(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(XX(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return aZ(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function MEe(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||aZ(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=XX(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return aZ(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),dZ(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function NEe(e,t,n){return e.check(EZ,t,e.attempt(DEe,t,n))}function PEe(e){e.exit(`gfmFootnoteDefinition`)}function FEe(e,t,n){let r=this;return dZ(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function IEe(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&UX(o,o.length,0,yZ(s,e.slice(r+1,n),t)),UX(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),UX(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=vZ(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=vZ(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var LEe=class{constructor(){this.map=[]}add(e,t,n){REe(this,e,t,n)}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}};function REe(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function zEe(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function BEe(){return{flow:{null:{name:`table`,tokenize:VEe,resolveAll:HEe}}}}function VEe(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):iZ(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):oZ(t)?dZ(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||aZ(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,oZ(t)?dZ(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return oZ(t)?dZ(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||iZ(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return oZ(t)?dZ(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||iZ(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||iZ(n)?(e.exit(`tableRow`),t(n)):oZ(n)?dZ(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||aZ(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function HEe(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new LEe;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(H9(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=V9(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=V9(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=V9(f,t,o,i,n,d)):(o[0]=o[1],d=V9(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&H9(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=zEe(t.events,n))}return e}function V9(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},U9(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=U9(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=U9(t.events,n[2]),a=U9(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},U9(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function H9(e,t,n,r,i){let a=[],o=U9(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function U9(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var UEe={name:`tasklistCheck`,tokenize:GEe};function WEe(){return{text:{91:UEe}}}function GEe(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return aZ(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return iZ(r)?t(r):oZ(r)?e.check({tokenize:KEe},t,n)(r):n(r)}}function KEe(e,t,n){return dZ(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function qEe(e){return KX([vEe(),OEe(),IEe(e),BEe(),WEe()])}var JEe={};function YEe(e){let t=this,n=e||JEe,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(qEe(n)),a.push(mEe()),o.push(hEe(n))}function XEe(e){return e.split(` `).map(e=>e[0]).slice(0,2).join(``).toUpperCase()||`?`}function W9(e){return new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})}function G9({audio:e,mimeType:t=`audio/webm`}){let[n,r]=(0,_.useState)(!1),[i,a]=(0,_.useState)(null);return e?(0,I.jsxs)(`div`,{className:`flex items-center gap-2 mt-2`,children:[(0,I.jsx)(`button`,{onClick:n?()=>{r(!1)}:()=>{i||a(`data:${t};base64,${e}`),r(!0)},className:`h-8 w-8 rounded-full bg-cyan-600 hover:bg-cyan-500 flex items-center justify-center transition-colors`,children:n?(0,I.jsx)(ar,{className:`h-4 w-4 text-white`}):(0,I.jsx)(cr,{className:`h-4 w-4 text-white ml-0.5`})}),i&&(0,I.jsx)(`audio`,{src:i,onEnded:()=>r(!1),autoPlay:n,className:`hidden`}),(0,I.jsx)(`div`,{className:`flex-1 h-8 bg-zinc-800 rounded-lg overflow-hidden`,children:(0,I.jsxs)(`div`,{className:`h-full w-full flex items-center px-2`,children:[(0,I.jsx)(Fr,{className:`h-4 w-4 text-zinc-400 mr-2`}),(0,I.jsx)(`div`,{className:`flex-1 h-1.5 bg-zinc-700 rounded-full overflow-hidden`,children:(0,I.jsx)(`div`,{className:`h-full w-1/3 bg-cyan-500 rounded-full animate-pulse`})})]})})]}):null}function ZEe({message:e,userName:t=`Tú`,agentName:n=`Agente`}){let r=e.type===`user`,i=e.type===`error`,a=e.type===`system`,o=!!e.audio?.base64||!!e.audio?.url;return a?(0,I.jsx)(`div`,{className:`flex justify-center my-1`,children:(0,I.jsx)(`span`,{className:`text-[10px] text-zinc-600 bg-zinc-900/50 border border-white/5 px-3 py-1 rounded-full font-mono`,children:e.content})}):i?(0,I.jsx)(`div`,{className:`flex items-center gap-2 justify-center my-1`,children:(0,I.jsxs)(`div`,{className:`flex items-center gap-2 text-[11px] text-red-400 bg-red-500/10 border border-red-500/20 px-3 py-1.5 rounded-xl`,children:[(0,I.jsx)(Nr,{className:`h-3 w-3 shrink-0`}),e.content]})}):r?(0,I.jsxs)(`div`,{className:`flex items-end justify-end gap-2 group`,children:[(0,I.jsxs)(`div`,{className:`flex flex-col items-end gap-1 max-w-[72%]`,children:[(0,I.jsx)(`div`,{className:`bg-gradient-to-br from-blue-600 to-indigo-600 text-white px-4 py-2.5 rounded-2xl rounded-tr-sm shadow-lg shadow-blue-600/10 text-sm leading-relaxed whitespace-pre-wrap`,children:e.content}),o&&e.audio?.base64&&(0,I.jsx)(G9,{audio:e.audio.base64,mimeType:e.audio.mimeType}),(0,I.jsx)(`span`,{className:`text-[10px] text-zinc-600 pr-1 opacity-0 group-hover:opacity-100 transition-opacity`,children:W9(e.timestamp)})]}),(0,I.jsx)(`div`,{className:`h-8 w-8 rounded-full bg-gradient-to-br from-blue-500 to-indigo-600 flex items-center justify-center text-[11px] font-bold text-white shrink-0 shadow ring-2 ring-zinc-950`,children:XEe(t)})]}):(0,I.jsxs)(`div`,{className:`flex items-end gap-2 group`,children:[(0,I.jsx)(`div`,{className:`h-8 w-8 rounded-full bg-zinc-900 border border-cyan-500/20 flex items-center justify-center shrink-0 shadow ring-2 ring-zinc-950`,children:(0,I.jsx)(Zt,{className:`h-4 w-4 text-cyan-400`})}),(0,I.jsxs)(`div`,{className:`flex flex-col gap-1 max-w-[72%]`,children:[(0,I.jsx)(`span`,{className:`text-[10px] font-semibold text-cyan-500 pl-1 uppercase tracking-wider`,children:n}),(0,I.jsx)(`div`,{className:`bg-zinc-900 border border-white/5 text-zinc-100 px-4 py-2.5 rounded-2xl rounded-tl-sm text-sm leading-relaxed shadow prose prose-invert prose-p:leading-relaxed prose-pre:bg-black/50 prose-pre:border prose-pre:border-white/10 max-w-none prose-sm`,children:(0,I.jsx)(XQ,{remarkPlugins:[YEe],children:e.content})}),o&&e.audio?.base64&&(0,I.jsx)(G9,{audio:e.audio.base64,mimeType:e.audio.mimeType}),(0,I.jsx)(`span`,{className:`text-[10px] text-zinc-600 pl-1 opacity-0 group-hover:opacity-100 transition-opacity`,children:W9(e.timestamp)})]})]})}function QEe({messages:e,isLoading:t=!1,currentSteps:n=[],userName:r,agentName:i}){let a=(0,_.useRef)(null);return(0,_.useEffect)(()=>{a.current?.scrollIntoView({behavior:`smooth`})},[e,t,n]),e.length===0&&!t?(0,I.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center p-8 gap-4`,children:[(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsx)(`div`,{className:`h-16 w-16 rounded-2xl bg-zinc-900 border border-cyan-500/20 flex items-center justify-center shadow-xl`,children:(0,I.jsx)(Zt,{className:`h-8 w-8 text-cyan-400`})}),(0,I.jsx)(`span`,{className:`absolute -bottom-1 -right-1 h-4 w-4 rounded-full bg-emerald-500 border-2 border-zinc-950 shadow`})]}),(0,I.jsxs)(`div`,{className:`text-center space-y-1`,children:[(0,I.jsx)(`p`,{className:`text-sm font-semibold text-zinc-300`,children:i?`${i} está listo`:`Agente listo`}),(0,I.jsx)(`p`,{className:`text-xs text-zinc-600`,children:`Inicia la conversación escribiendo un mensaje`})]}),(0,I.jsx)(`div`,{className:`flex items-center gap-2 mt-2`,children:[`¿Qué puedes hacer?`,`Dame un resumen`,`Ayúdame con una tarea`].map(e=>(0,I.jsx)(`span`,{className:`text-[11px] text-zinc-600 border border-white/5 bg-zinc-900/50 px-3 py-1 rounded-full`,children:e},e))})]}):(0,I.jsxs)(`div`,{className:`flex flex-1 flex-col gap-4 p-4 min-h-0`,children:[e.map(e=>(0,I.jsx)(ZEe,{message:e,userName:r,agentName:i},e.id)),t&&(0,I.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,I.jsx)(`div`,{className:`h-8 w-8 rounded-full bg-zinc-900 border border-cyan-500/20 flex items-center justify-center shrink-0 ring-2 ring-zinc-950`,children:(0,I.jsx)(Zt,{className:`h-4 w-4 text-cyan-400`})}),(0,I.jsxs)(`div`,{className:`flex flex-col gap-1.5 max-w-[72%]`,children:[n.length>0&&(0,I.jsx)(`div`,{className:`flex flex-col gap-1`,children:n.map((e,t)=>{let r=t===n.length-1;return(0,I.jsxs)(`div`,{className:`flex items-center gap-1.5 px-3 py-1.5 rounded-xl border text-xs transition-all ${r?`bg-zinc-900 border-cyan-500/20 text-cyan-300`:`bg-zinc-950/50 border-white/5 text-zinc-600`}`,children:[(0,I.jsx)(Vr,{className:`h-3 w-3 shrink-0 ${r?`text-cyan-500 animate-pulse`:`text-zinc-700`}`}),(0,I.jsx)(`span`,{className:`leading-tight`,children:e})]},t)})}),(0,I.jsxs)(`div`,{className:`bg-zinc-900 border border-white/5 px-4 py-3 rounded-2xl rounded-tl-sm flex items-center gap-1.5 w-fit`,children:[(0,I.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-cyan-500 animate-bounce [animation-delay:0ms]`}),(0,I.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-cyan-500 animate-bounce [animation-delay:150ms]`}),(0,I.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-cyan-500 animate-bounce [animation-delay:300ms]`})]})]})]}),(0,I.jsx)(`div`,{ref:a,className:`h-0`})]})}function $Ee({onSendMessage:e,disabled:t=!1}){let[n,r]=(0,_.useState)(``),[i,a]=(0,_.useState)(!1),o=(0,_.useRef)(null),s=(0,_.useRef)([]),c=()=>{n.trim()&&!t&&(e(n.trim()),r(``))};return(0,I.jsxs)(`div`,{className:`px-4 py-3`,children:[(0,I.jsxs)(`div`,{className:`flex items-end gap-2 rounded-2xl border bg-zinc-900/50 backdrop-blur-sm px-3 py-2 transition-all ${t?`border-white/5 opacity-60`:`border-white/10 focus-within:border-blue-500/40 focus-within:shadow-lg focus-within:shadow-blue-500/5`}`,children:[(0,I.jsx)(`button`,{onClick:i?()=>{o.current&&i&&(o.current.stop(),a(!1))}:async()=>{try{let t=await navigator.mediaDevices.getUserMedia({audio:!0}),n=new MediaRecorder(t,{mimeType:`audio/webm`});o.current=n,s.current=[],n.ondataavailable=e=>{e.data.size>0&&s.current.push(e.data)},n.onstop=async()=>{let n=new Blob(s.current,{type:`audio/webm`}),r=new FileReader;r.readAsDataURL(n),r.onloadend=()=>{let t=r.result.split(`,`)[1];e(`[Audio mensaje]`,t)},t.getTracks().forEach(e=>e.stop())},n.start(),a(!0)}catch(e){console.error(`Error accessing microphone:`,e)}},disabled:t,className:`h-8 w-8 rounded-xl flex items-center justify-center shrink-0 mb-0.5 transition-all ${i?`bg-red-600 hover:bg-red-500 animate-pulse`:`bg-zinc-700 hover:bg-zinc-600`} disabled:opacity-30 disabled:cursor-not-allowed text-white`,children:i?(0,I.jsx)(Or,{className:`h-3.5 w-3.5`}):(0,I.jsx)(nr,{className:`h-3.5 w-3.5`})}),(0,I.jsx)(xG,{value:n,onChange:e=>r(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),c())},placeholder:t?`Conectando al agente...`:`Escribe un mensaje...`,disabled:t,className:`flex-1 min-h-[36px] max-h-[160px] resize-none border-0 bg-transparent p-0 text-sm text-zinc-100 placeholder:text-zinc-600 focus-visible:ring-0 focus-visible:ring-offset-0 leading-relaxed`,rows:1}),(0,I.jsx)(`button`,{onClick:c,disabled:!n.trim()||t,className:`h-8 w-8 rounded-xl flex items-center justify-center shrink-0 mb-0.5 transition-all disabled:opacity-30 disabled:cursor-not-allowed bg-blue-600 hover:bg-blue-500 disabled:bg-zinc-800 text-white shadow shadow-blue-600/20`,children:(0,I.jsx)(_r,{className:`h-3.5 w-3.5`})})]}),(0,I.jsx)(`p`,{className:`text-[10px] text-zinc-700 mt-1.5 text-center`,children:i?`Grabando... haz clic en ■ para enviar`:`Enter para enviar · Shift+Enter nueva línea · 🎤 para audio`})]})}function eDe(e){return e.split(` `).map(e=>e[0]).slice(0,2).join(``).toUpperCase()||`?`}function tDe({agentId:e=`agent_id`,sessionId:t=`user_id`}){let{messages:n,addMessage:r,setMessages:i,isLoading:a,setLoading:o,currentSteps:s,addStep:c,clearSteps:l}=Q7(),{status:u,send:d,subscribe:f}=tg(),{currentUser:p,fetchUser:m}=xg(),h=X(e=>e.agents),g=X(e=>e.fetchAgents),v=u===`connected`,y=u===`connecting`,b=h.find(e=>e.role===`coordinator`&&e.enabled)?.name??`Coordinador`,x=p?.name??`Usuario`;return(0,_.useEffect)(()=>{p||m(),h.length===0&&g()},[]),(0,_.useEffect)(()=>{t&&(async()=>{try{let n=await K(`/api/chat/history?sessionId=${t}`);n.messages&&i(n.messages.map(t=>({id:t.id,conversationId:t.session_id,type:t.role===`user`?`user`:`agent`,content:t.content,agentId:e,timestamp:t.created_at})))}catch(e){console.error(`Failed to fetch chat history:`,e)}})()},[t,e,i]),(0,_.useEffect)(()=>{let n=n=>{let r=n.id||`agent-streaming-id`,{messages:i,addMessage:a,updateMessage:o,setLoading:s,clearSteps:c}=Q7.getState(),l=i.find(e=>e.id===r);n.isChunk&&l?o(r,{content:(l.content||``)+n.content,timestamp:n.timestamp||l.timestamp}):n.isChunk&&!l?a({id:r,conversationId:t,type:`agent`,content:n.content||``,agentId:e,timestamp:n.timestamp||new Date().toISOString()}):l?o(r,{content:n.content||l.content,timestamp:n.timestamp||l.timestamp}):a({id:r,conversationId:t,type:`agent`,content:n.content||n.message||JSON.stringify(n),agentId:e,timestamp:n.timestamp||new Date().toISOString()}),n.isChunk||(c(),s(!1))},r=n=>{let r=n.id||Bi(),{addMessage:i,setLoading:a,clearSteps:o}=Q7.getState();i({id:r,conversationId:t,type:`agent`,content:n.content||``,agentId:e,timestamp:n.timestamp||new Date().toISOString(),audio:n.audio?{base64:n.audio,mimeType:n.mimeType}:void 0}),o(),a(!1)},i=e=>{e.content&&Q7.getState().addStep(e.content)},a=e=>{let{setLoading:t,clearSteps:n}=Q7.getState();e.isTyping===!1&&(n(),t(!1))},o=f(`message`,n),s=f(`response`,n),c=f(`audio`,r),l=f(`progress`,i),u=f(`typing`,a);return()=>{o(),s(),c(),l(),u()}},[f,t,e,r,o]),(0,I.jsxs)(`div`,{className:`flex h-full flex-col min-h-0`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between border-b border-white/5 px-5 py-3 shrink-0 bg-zinc-950/80 backdrop-blur-sm z-10`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsx)(`div`,{className:`h-9 w-9 rounded-xl bg-zinc-900 border border-cyan-500/20 flex items-center justify-center shadow`,children:(0,I.jsx)(Zt,{className:`h-4.5 w-4.5 text-cyan-400`})}),(0,I.jsx)(`span`,{className:`absolute -bottom-0.5 -right-0.5 h-2.5 w-2.5 rounded-full border-2 border-zinc-950 ${v?`bg-emerald-500`:y?`bg-yellow-500 animate-pulse`:`bg-zinc-600`}`})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`p`,{className:`text-sm font-bold text-white leading-tight`,children:b}),(0,I.jsx)(`p`,{className:`text-[10px] text-zinc-500 font-mono uppercase tracking-wider`,children:`Coordinador`})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-1.5 px-2 py-0.5 rounded-full border text-[10px] font-bold uppercase tracking-wider ml-1 ${v?`bg-emerald-500/10 border-emerald-500/20 text-emerald-400`:y?`bg-yellow-500/10 border-yellow-500/20 text-yellow-400`:`bg-zinc-800 border-zinc-700 text-zinc-500`}`,children:[(0,I.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full ${v?`bg-emerald-500 animate-pulse`:y?`bg-yellow-500 animate-pulse`:`bg-zinc-600`}`}),v?`En línea`:y?`Conectando`:`Desconectado`]})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,I.jsxs)(`div`,{className:`text-right`,children:[(0,I.jsx)(`p`,{className:`text-sm font-semibold text-zinc-200 leading-tight`,children:x}),(0,I.jsx)(`p`,{className:`text-[10px] text-zinc-600 font-mono`,children:`Usuario`})]}),(0,I.jsx)(`div`,{className:`h-9 w-9 rounded-xl bg-gradient-to-br from-blue-500 to-indigo-600 flex items-center justify-center text-[12px] font-bold text-white shadow ring-2 ring-zinc-950`,children:p?.name?eDe(p.name):(0,I.jsx)(Pr,{className:`h-4 w-4`})})]})]}),(0,I.jsx)(`div`,{className:`flex-1 overflow-y-auto min-h-0 bg-zinc-950/30`,children:(0,I.jsx)(QEe,{messages:n,isLoading:a,currentSteps:s,userName:x,agentName:b})}),(0,I.jsx)(`div`,{className:`shrink-0 border-t border-white/5 bg-zinc-950/80 backdrop-blur-sm`,children:(0,I.jsx)($Ee,{onSendMessage:(n,i)=>{let s=Bi();r(i?{id:s,conversationId:t,type:`user`,content:n,agentId:e,timestamp:new Date().toISOString(),audio:{base64:i,mimeType:`audio/webm`}}:{id:s,conversationId:t,type:`user`,content:n,agentId:e,timestamp:new Date().toISOString()}),o(!0),v?d(i?{type:`audio`,audio:i,sessionId:t,timestamp:new Date().toISOString()}:{type:`message`,content:n,sessionId:t,timestamp:new Date().toISOString()}):setTimeout(()=>{a&&(o(!1),r({id:Bi(),conversationId:t,type:`error`,content:`No se pudo conectar al agente. Verifica que el gateway esté funcionando.`,timestamp:new Date().toISOString()}))},3e3)},disabled:!v&&!y})})]})}function nDe(){let{currentUser:e}=xg();return(0,I.jsx)(`div`,{className:`h-full bg-zinc-950 overflow-hidden mt-10`,children:(0,I.jsx)(`div`,{className:`max-w-4xl mx-auto h-full flex flex-col border-x border-white/5`,children:(0,I.jsx)(tDe,{agentId:`main`,sessionId:e?.id||`default`})})})}var rDe={gemini:`🔵`,anthropic:`🟠`,openai:`🟢`,groq:`🔴`,ollama:`🟣`,openrouter:`🟡`,deepseek:`🔷`,mistral:`🔸`,kimi:`🌙`},K9={gemini:`https://aistudio.google.com/app/apikey`,anthropic:`https://console.anthropic.com/keys`,openai:`https://platform.openai.com/api-keys`,groq:`https://console.groq.com/keys`,openrouter:`https://openrouter.ai/keys`,deepseek:`https://platform.deepseek.com/api_keys`,mistral:`https://console.mistral.ai/api-keys`,kimi:`https://platform.moonshot.cn/console/api-keys`},q9=[{id:`webchat`,name:`WebChat`,description:`Chat web integrado`,icon:`💬`,required:!0},{id:`telegram`,name:`Telegram`,description:`Bot de Telegram`,icon:`✈️`,required:!1},{id:`discord`,name:`Discord`,description:`Bot de Discord`,icon:`🎮`,required:!1},{id:`whatsapp`,name:`WhatsApp`,description:`Bot de WhatsApp`,icon:`📱`,required:!1},{id:`slack`,name:`Slack`,description:`Bot de Slack`,icon:`💼`,required:!1}],J9=`hive_setup_wizard_data`;function iDe(){try{let e=sessionStorage.getItem(J9);if(e){let t=JSON.parse(e);return{...X9(),...t}}}catch(e){console.error(`Failed to load wizard data:`,e)}return null}function aDe(e){try{sessionStorage.setItem(J9,JSON.stringify(e))}catch(e){console.error(`Failed to save wizard data:`,e)}}function Y9(){try{sessionStorage.removeItem(J9)}catch(e){console.error(`Failed to clear wizard data:`,e)}}function X9(){return{userName:``,userLanguage:`es`,userTimezone:Intl.DateTimeFormat().resolvedOptions().timeZone||`UTC`,userOccupation:``,userNotes:``,agentName:`Bee`,agentDescription:``,agentTone:`friendly`,provider:``,apiKey:``,model:``,apiKeyVerified:!1,channels:{webchat:{enabled:!0},telegram:{enabled:!1},discord:{enabled:!1},whatsapp:{enabled:!1},slack:{enabled:!1}},voiceEnabled:!1,sttProvider:`groq-whisper`,ttsProvider:`elevenlabs`,ttsVoice:``,ethicsRules:{},customRules:[]}}function oDe(){let e=Id(),[t,n]=(0,_.useState)(1),[r,i]=(0,_.useState)(()=>iDe()||X9()),[a,o]=(0,_.useState)(!1),[s,c]=(0,_.useState)(!1),{showLoader:l,hideLoader:u}=gg(),[d,f]=(0,_.useState)(`idle`),[p,m]=(0,_.useState)(null),[h,g]=(0,_.useState)([]),[v,y]=(0,_.useState)(null),[b,x]=(0,_.useState)(!1),[S,C]=(0,_.useState)([]);(0,_.useEffect)(()=>{fetch(`${Qh()}/api/setup/providers`).then(e=>e.json()).then(e=>{Array.isArray(e)&&g(e)}).catch(()=>{}),fetch(`${Qh()}/api/setup/ethics`).then(e=>e.json()).then(e=>{Array.isArray(e)&&(C(e),i(t=>Object.keys(t.ethicsRules).length===0?{...t,ethicsRules:Object.fromEntries(e.map(e=>[e.id,!0]))}:t))}).catch(()=>{})},[]),(0,_.useEffect)(()=>{aDe(r)},[r]),(0,_.useEffect)(()=>{fetch(`${Qh()}/api/setup/status`).then(e=>e.json()).then(t=>{t.configured&&e(`/ui`)}).catch(()=>{})},[e]);let w=e=>{m(null),i(t=>({...t,...e}))},T=()=>{switch(t){case 1:return r.userName.trim()?r.userName.trim().length<2?`El nombre debe tener al menos 2 caracteres.`:null:`El nombre es obligatorio.`;case 2:return r.agentName.trim()?r.agentName.trim().length<2?`El nombre debe tener al menos 2 caracteres.`:null:`El nombre del agente es obligatorio.`;case 3:return r.provider?r.provider!==`ollama`&&!r.apiKey?`Ingresa tu API key.`:r.provider!==`ollama`&&!r.apiKeyVerified?`Verifica tu API key antes de continuar.`:r.model?null:`Selecciona un modelo.`:`Selecciona un proveedor LLM.`;default:return null}},E=()=>{let e=T();if(e){m(e);return}m(null),t<7&&n(e=>e+1)},D=()=>{t>1&&n(e=>e-1)},O=()=>{confirm(`¿Estás seguro de que quieres reiniciar la configuración? Se perderá todo el progreso.`)&&(Y9(),i(X9()),n(1))},k=async()=>{if(!(!r.apiKey||!r.provider)){f(`verifying`);try{(await K(`/api/setup/verify-provider`,{method:`POST`,body:{provider:r.provider,apiKey:r.apiKey},showLoader:`Verificando conexión...`,showError:!1})).success?(f(`success`),w({apiKeyVerified:!0})):(f(`error`),w({apiKeyVerified:!1}))}catch{f(`error`),w({apiKeyVerified:!1})}}},A=async()=>{o(!0);try{let t=await K(`/api/setup/complete`,{method:`POST`,body:r,showLoader:`Finalizando configuración...`,showError:!0});if(t.success){let n=t.authToken;n&&localStorage.setItem(`hive-auth-token`,n),c(!0),Y9(),(async()=>{await new Promise(e=>setTimeout(e,1500)),l(`Iniciando a ${r.agentName}... esto toma unos segundos`);for(let t=0;t<40;t++){try{let t=await fetch(`${Qh()}/api/setup/status`);if(t.ok){let{configured:r}=await t.json();if(r){u(),e(n?`/?token=${n}`:`/`);return}}}catch{}await new Promise(e=>setTimeout(e,1e3))}u(),e(n?`/?token=${n}`:`/`)})()}}catch{}finally{o(!1)}},j=()=>{switch(t){case 1:return M();case 2:return N();case 3:return P();case 4:return F();case 5:return L();case 6:return R();case 7:return ee();default:return null}},M=()=>(0,I.jsxs)(`div`,{className:`space-y-6`,children:[(0,I.jsxs)(`div`,{className:`text-center space-y-4`,children:[(0,I.jsx)(`div`,{className:`flex justify-center`,children:(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsx)(Vn,{className:`w-24 h-24 text-amber-500`,fill:`currentColor`}),(0,I.jsx)(Dr,{className:`w-8 h-8 text-amber-300 absolute -top-2 -right-2`})]})}),(0,I.jsx)(`h1`,{className:`text-3xl font-bold`,children:`Bienvenido a Hive`}),(0,I.jsx)(`p`,{className:`text-muted-foreground max-w-md mx-auto`,children:`Hive es tu colmena de agentes IA. Local-first. Multi-canal. Open source. En los próximos minutos configurarás tu agente personal Bee.`})]}),(0,I.jsxs)(XR,{children:[(0,I.jsxs)(ZR,{children:[(0,I.jsx)(QR,{children:`Tu información`}),(0,I.jsx)($R,{children:`Comencemos con tus datos básicos`})]}),(0,I.jsxs)(ez,{className:`space-y-4`,children:[(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`userName`,children:`Tu nombre`}),(0,I.jsx)(G,{id:`userName`,placeholder:`¿Cómo te llamas?`,value:r.userName,onChange:e=>w({userName:e.target.value})})]}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`userLanguage`,children:`Idioma preferido`}),(0,I.jsxs)(ZK,{value:r.userLanguage,onValueChange:e=>w({userLanguage:e}),children:[(0,I.jsx)(eq,{children:(0,I.jsx)($K,{})}),(0,I.jsxs)(rq,{children:[(0,I.jsx)(Q,{value:`es`,children:`Español`}),(0,I.jsx)(Q,{value:`en`,children:`English`}),(0,I.jsx)(Q,{value:`pt`,children:`Português`}),(0,I.jsx)(Q,{value:`fr`,children:`Français`})]})]})]}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`userTimezone`,children:`Zona horaria`}),(0,I.jsx)(G,{id:`userTimezone`,value:r.userTimezone,onChange:e=>w({userTimezone:e.target.value}),placeholder:`America/Bogota`}),(0,I.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Detectada automáticamente: `,Intl.DateTimeFormat().resolvedOptions().timeZone]})]}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsxs)(Z,{htmlFor:`userOccupation`,children:[`Ocupación `,(0,I.jsx)(`span`,{className:`text-muted-foreground font-normal`,children:`(opcional)`})]}),(0,I.jsx)(G,{id:`userOccupation`,value:r.userOccupation,onChange:e=>w({userOccupation:e.target.value}),placeholder:`Ej: Desarrollador de software, diseñador, estudiante...`})]}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsxs)(Z,{htmlFor:`userNotes`,children:[`Preferencias de comunicación `,(0,I.jsx)(`span`,{className:`text-muted-foreground font-normal`,children:`(opcional)`})]}),(0,I.jsx)(`textarea`,{id:`userNotes`,className:`w-full min-h-[80px] p-3 border rounded-md bg-background resize-none text-sm`,value:r.userNotes,onChange:e=>w({userNotes:e.target.value}),placeholder:`Ej: Prefiero respuestas cortas y directas. Usa ejemplos de código cuando expliques conceptos técnicos...`})]})]})]})]}),N=()=>(0,I.jsxs)(`div`,{className:`space-y-6`,children:[(0,I.jsxs)(`div`,{className:`text-center space-y-2`,children:[(0,I.jsx)(`h2`,{className:`text-2xl font-bold`,children:`Tu agente`}),(0,I.jsx)(`p`,{className:`text-muted-foreground`,children:`Personaliza a Bee, tu agente personal`})]}),(0,I.jsxs)(XR,{children:[(0,I.jsx)(ZR,{children:(0,I.jsx)(QR,{children:`Identidad del agente`})}),(0,I.jsxs)(ez,{className:`space-y-4`,children:[(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`agentName`,children:`Nombre del agente`}),(0,I.jsx)(G,{id:`agentName`,value:r.agentName,onChange:e=>w({agentName:e.target.value}),placeholder:`Bee`})]}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`agentDescription`,children:`Descripción / Personalidad`}),(0,I.jsx)(`textarea`,{id:`agentDescription`,className:`w-full min-h-[100px] p-3 border rounded-md bg-background resize-none`,value:r.agentDescription,onChange:e=>w({agentDescription:e.target.value}),placeholder:`Ej: Eres un asistente útil y amable. Respondes de forma concisa pero completa. Te especializas en ayudar con tareas de programación y productividad...`})]}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`agentTone`,children:`Tono de comunicación`}),(0,I.jsxs)(ZK,{value:r.agentTone,onValueChange:e=>w({agentTone:e}),children:[(0,I.jsx)(eq,{children:(0,I.jsx)($K,{placeholder:`Selecciona un tono`})}),(0,I.jsxs)(rq,{children:[(0,I.jsx)(Q,{value:`friendly`,children:`Amigable y cercano`}),(0,I.jsx)(Q,{value:`professional`,children:`Profesional y formal`}),(0,I.jsx)(Q,{value:`direct`,children:`Directo y conciso`}),(0,I.jsx)(Q,{value:`casual`,children:`Casual y relajado`})]})]}),(0,I.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Define cómo se comunicará tu agente contigo`})]})]})]})]}),P=()=>(0,I.jsxs)(`div`,{className:`space-y-6`,children:[(0,I.jsxs)(`div`,{className:`text-center space-y-2`,children:[(0,I.jsx)(`h2`,{className:`text-2xl font-bold`,children:`Proveedor LLM`}),(0,I.jsx)(`p`,{className:`text-muted-foreground`,children:`Selecciona el cerebro de tu agente`})]}),(0,I.jsx)(`div`,{className:`grid gap-3`,children:h.map(e=>(0,I.jsx)(XR,{className:H(`cursor-pointer transition-all hover:shadow-md`,r.provider===e.id&&`border-amber-500 ring-2 ring-amber-500`),onClick:()=>{w({provider:e.id,model:``,apiKeyVerified:!1}),e.id===`ollama`&&y(null)},children:(0,I.jsxs)(ez,{className:`flex items-center gap-4 p-4`,children:[(0,I.jsx)(`span`,{className:`text-3xl`,children:rDe[e.id]??`🤖`}),(0,I.jsxs)(`div`,{className:`flex-1`,children:[(0,I.jsx)(`h3`,{className:`font-semibold`,children:e.name}),(0,I.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[e.models.length,` modelo`,e.models.length===1?``:`s`,` disponible`,e.models.length===1?``:`s`]})]}),r.provider===e.id&&(0,I.jsx)(dn,{className:`w-5 h-5 text-amber-500`})]})},e.id))}),r.provider&&(()=>{let e=h.find(e=>e.id===r.provider);return(0,I.jsxs)(XR,{className:`mt-4`,children:[(0,I.jsx)(ZR,{children:(0,I.jsxs)(QR,{children:[`Configuración de `,e?.name]})}),(0,I.jsxs)(ez,{className:`space-y-4`,children:[r.provider!==`ollama`&&(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`apiKey`,children:`API Key`}),(0,I.jsxs)(`div`,{className:`flex gap-2`,children:[(0,I.jsx)(G,{id:`apiKey`,type:`password`,value:r.apiKey,onChange:e=>w({apiKey:e.target.value,apiKeyVerified:!1}),placeholder:`sk-...`,className:H(p?.includes(`API key`)&&!r.apiKey&&`border-red-500`)}),(0,I.jsx)(W,{variant:`outline`,onClick:k,disabled:!r.apiKey||d===`verifying`,children:d===`verifying`?(0,I.jsx)(Xn,{className:`w-4 h-4 animate-spin`}):d===`success`?(0,I.jsx)(dn,{className:`w-4 h-4 text-green-500`}):d===`error`?(0,I.jsx)(mn,{className:`w-4 h-4 text-red-500`}):`Verificar`})]}),d===`success`&&(0,I.jsxs)(`p`,{className:`text-sm text-green-600 flex items-center gap-1`,children:[(0,I.jsx)(dn,{className:`w-4 h-4`}),` API key verificada correctamente`]}),d===`error`&&(0,I.jsxs)(`p`,{className:`text-sm text-red-600 flex items-center gap-1`,children:[(0,I.jsx)(mn,{className:`w-4 h-4`}),` API key inválida o error de conexión`]}),K9[r.provider]&&(0,I.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`¿No tienes tu API key?`,` `,(0,I.jsx)(`a`,{href:K9[r.provider],target:`_blank`,rel:`noopener noreferrer`,className:`text-amber-500 hover:underline`,children:`Obtener aquí`})]})]}),r.provider===`ollama`&&(0,I.jsxs)(`div`,{className:`space-y-3`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(W,{type:`button`,variant:`outline`,size:`sm`,disabled:b,onClick:()=>{y(null),x(!0),w({model:``}),fetch(`${Qh()}/api/setup/ollama-models`).then(e=>e.json()).then(e=>{y(e.models??[]),x(!1)}).catch(()=>{y([]),x(!1)})},children:b?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Xn,{className:`w-3 h-3 animate-spin mr-1`}),`Detectando...`]}):`🔍 Detectar modelos`}),!b&&v!==null&&(0,I.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:v.length>0?`${v.length} modelo${v.length===1?``:`s`} encontrado${v.length===1?``:`s`}`:`Sin modelos — instala uno con ollama pull`})]}),v&&v.length>0&&(0,I.jsxs)(`div`,{className:`space-y-1`,children:[(0,I.jsx)(Z,{htmlFor:`model`,children:`Modelo`}),(0,I.jsxs)(ZK,{value:r.model,onValueChange:e=>w({model:e}),children:[(0,I.jsx)(eq,{className:H(!r.model&&p?.includes(`modelo`)&&`border-red-500`),children:(0,I.jsx)($K,{placeholder:`Selecciona un modelo`})}),(0,I.jsx)(rq,{children:v.map((e,t)=>(0,I.jsxs)(Q,{value:e.id,children:[e.name,t===0?` (Recomendado)`:``]},e.id))})]})]}),!b&&v!==null&&v.length===0&&(0,I.jsxs)(`p`,{className:`text-xs text-amber-600`,children:[`Asegúrate que Ollama esté corriendo (`,(0,I.jsx)(`code`,{children:`ollama serve`}),`) y tengas modelos (`,(0,I.jsx)(`code`,{children:`ollama pull llama3.2`}),`).`]})]}),r.provider!==`ollama`&&r.apiKeyVerified&&(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`model`,children:`Modelo`}),(0,I.jsxs)(ZK,{value:r.model,onValueChange:e=>w({model:e}),children:[(0,I.jsx)(eq,{className:H(!r.model&&p?.includes(`modelo`)&&`border-red-500`),children:(0,I.jsx)($K,{placeholder:`Selecciona un modelo`})}),(0,I.jsx)(rq,{children:(e?.models??[]).map((e,t)=>(0,I.jsxs)(Q,{value:e.id,children:[e.name||e.id,t===0?` (Recomendado)`:``]},e.id))})]})]})]})]})})()]}),F=()=>(0,I.jsxs)(`div`,{className:`space-y-6`,children:[(0,I.jsxs)(`div`,{className:`text-center space-y-2`,children:[(0,I.jsx)(`h2`,{className:`text-2xl font-bold`,children:`Canales`}),(0,I.jsx)(`p`,{className:`text-muted-foreground`,children:`¿Dónde quieres que Bee esté disponible?`})]}),(0,I.jsx)(`div`,{className:`grid gap-3`,children:q9.map(e=>(0,I.jsx)(XR,{className:H(`transition-all`,r.channels[e.id]?.enabled&&`border-amber-500`),children:(0,I.jsxs)(ez,{className:`p-4`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,I.jsx)(`span`,{className:`text-2xl`,children:e.icon}),(0,I.jsxs)(`div`,{children:[(0,I.jsxs)(`h3`,{className:`font-semibold flex items-center gap-2`,children:[e.name,e.required&&(0,I.jsx)($z,{variant:`secondary`,className:`text-xs`,children:`Requerido`})]}),(0,I.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e.description})]})]}),(0,I.jsx)(vq,{checked:r.channels[e.id]?.enabled,onCheckedChange:t=>{e.required&&!t||w({channels:{...r.channels,[e.id]:{enabled:t}}})},disabled:e.required})]}),!e.required&&r.channels[e.id]?.enabled&&(0,I.jsx)(N3,{type:`single`,collapsible:!0,className:`mt-4`,children:(0,I.jsxs)(P3,{value:`config`,children:[(0,I.jsx)(F3,{children:`Configuración`}),(0,I.jsx)(I3,{children:(0,I.jsxs)(`div`,{className:`space-y-3 pt-2`,children:[e.id===`telegram`&&(0,I.jsx)(I.Fragment,{children:(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`telegramToken`,children:`Token del Bot`}),(0,I.jsx)(G,{id:`telegramToken`,placeholder:`123456789:ABCdefGHIjklMNOpqrsTUVwxyz`,value:r.channels.telegram.config?.botToken||``,onChange:e=>w({channels:{...r.channels,telegram:{enabled:!0,config:{botToken:e.target.value}}}})}),(0,I.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:(0,I.jsx)(`a`,{href:`https://t.me/BotFather`,target:`_blank`,rel:`noopener noreferrer`,className:`text-amber-500 hover:underline`,children:`Obtén tu token en BotFather`})})]})}),e.id===`discord`&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`discordToken`,children:`Token del Bot`}),(0,I.jsx)(G,{id:`discordToken`,placeholder:`MTIzNDU2Nzg5MDEyMzQ1Njc4OQ.GJKlMn.OpQrStUvWxYz`,value:r.channels.discord.config?.botToken||``,onChange:e=>w({channels:{...r.channels,discord:{enabled:!0,config:{botToken:e.target.value}}}})})]}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`discordClientId`,children:`Client ID`}),(0,I.jsx)(G,{id:`discordClientId`,placeholder:`1234567890123456789`,value:r.channels.discord.config?.clientId||``,onChange:e=>w({channels:{...r.channels,discord:{enabled:!0,config:{clientId:e.target.value}}}})})]})]}),e.id===`whatsapp`&&(0,I.jsx)(I.Fragment,{children:(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`whatsappToken`,children:`Token de la API`}),(0,I.jsx)(G,{id:`whatsappToken`,placeholder:`...`,value:r.channels.whatsapp.config?.apiToken||``,onChange:e=>w({channels:{...r.channels,whatsapp:{enabled:!0,config:{apiToken:e.target.value}}}})})]})}),e.id===`slack`&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`slackToken`,children:`Bot Token`}),(0,I.jsx)(G,{id:`slackToken`,placeholder:`xoxb-...`,value:r.channels.slack.config?.botToken||``,onChange:e=>w({channels:{...r.channels,slack:{enabled:!0,config:{botToken:e.target.value}}}})})]}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`slackSigningSecret`,children:`Signing Secret`}),(0,I.jsx)(G,{id:`slackSigningSecret`,placeholder:`...`,value:r.channels.slack.config?.signingSecret||``,onChange:e=>w({channels:{...r.channels,slack:{enabled:!0,config:{signingSecret:e.target.value}}}})})]})]})]})})]})})]})},e.id))})]}),L=()=>(0,I.jsxs)(`div`,{className:`space-y-6`,children:[(0,I.jsxs)(`div`,{className:`text-center space-y-2`,children:[(0,I.jsx)(`h2`,{className:`text-2xl font-bold`,children:`Voz (opcional)`}),(0,I.jsx)(`p`,{className:`text-muted-foreground`,children:`Permite que Bee hable y escuche`})]}),(0,I.jsxs)(XR,{children:[(0,I.jsx)(ZR,{children:(0,I.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,I.jsx)(QR,{children:`Activar voz`}),(0,I.jsx)(vq,{checked:r.voiceEnabled,onCheckedChange:e=>w({voiceEnabled:e})})]})}),(0,I.jsx)(ez,{children:r.voiceEnabled?(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`sttProvider`,children:`Reconocimiento de voz (STT)`}),(0,I.jsxs)(ZK,{value:r.sttProvider,onValueChange:e=>w({sttProvider:e}),children:[(0,I.jsx)(eq,{children:(0,I.jsx)($K,{})}),(0,I.jsxs)(rq,{children:[(0,I.jsx)(Q,{value:`groq-whisper`,children:`Groq Whisper (Recomendado)`}),(0,I.jsx)(Q,{value:`openai-whisper`,children:`OpenAI Whisper`})]})]})]}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`ttsProvider`,children:`Síntesis de voz (TTS)`}),(0,I.jsxs)(ZK,{value:r.ttsProvider,onValueChange:e=>w({ttsProvider:e}),children:[(0,I.jsx)(eq,{children:(0,I.jsx)($K,{})}),(0,I.jsxs)(rq,{children:[(0,I.jsx)(Q,{value:`elevenlabs`,children:`ElevenLabs (Recomendado)`}),(0,I.jsx)(Q,{value:`openai`,children:`OpenAI TTS`}),(0,I.jsx)(Q,{value:`gemini`,children:`Google Gemini`})]})]})]}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`ttsVoice`,children:`Voz`}),(0,I.jsxs)(`div`,{className:`flex gap-2`,children:[(0,I.jsxs)(ZK,{value:r.ttsVoice,onValueChange:e=>w({ttsVoice:e}),children:[(0,I.jsx)(eq,{children:(0,I.jsx)($K,{placeholder:`Selecciona una voz`})}),(0,I.jsxs)(rq,{children:[(0,I.jsx)(Q,{value:`Rachel`,children:`Rachel (ElevenLabs)`}),(0,I.jsx)(Q,{value:`Adam`,children:`Adam (ElevenLabs)`}),(0,I.jsx)(Q,{value:`Antoni`,children:`Antoni (ElevenLabs)`}),(0,I.jsx)(Q,{value:`Elli`,children:`Elli (ElevenLabs)`}),(0,I.jsx)(Q,{value:`Josh`,children:`Josh (ElevenLabs)`}),(0,I.jsx)(Q,{value:`alloy`,children:`Alloy (OpenAI)`}),(0,I.jsx)(Q,{value:`echo`,children:`Echo (OpenAI)`}),(0,I.jsx)(Q,{value:`fable`,children:`Fable (OpenAI)`}),(0,I.jsx)(Q,{value:`onyx`,children:`Onyx (OpenAI)`}),(0,I.jsx)(Q,{value:`nova`,children:`Nova (OpenAI)`}),(0,I.jsx)(Q,{value:`shimmer`,children:`Shimmer (OpenAI)`})]})]}),(0,I.jsx)(W,{variant:`outline`,size:`icon`,children:(0,I.jsx)(Fr,{className:`w-4 h-4`})})]})]}),(0,I.jsx)(ZQ,{children:(0,I.jsx)($Q,{className:`text-sm`,children:r.provider===r.ttsProvider&&(0,I.jsxs)(`span`,{className:`text-green-600 flex items-center gap-1`,children:[(0,I.jsx)(dn,{className:`w-4 h-4`}),` Ya tienes la API key configurada`]})})})]}):(0,I.jsx)(`p`,{className:`text-muted-foreground text-center py-4`,children:`Puedes activar la voz más tarde en la configuración`})})]})]}),R=()=>(0,I.jsxs)(`div`,{className:`space-y-6`,children:[(0,I.jsxs)(`div`,{className:`text-center space-y-2`,children:[(0,I.jsx)(`h2`,{className:`text-2xl font-bold`,children:`Reglas éticas`}),(0,I.jsx)(`p`,{className:`text-muted-foreground`,children:`Define los límites de tu agente`})]}),(0,I.jsx)(ZQ,{children:(0,I.jsxs)($Q,{className:`text-sm`,children:[`Las reglas de categoría `,(0,I.jsx)(`strong`,{className:`text-red-500`,children:`NUNCA`}),` son las protecciones más importantes. Desactivarlas puede comprometer la seguridad.`]})}),(0,I.jsxs)(`div`,{className:`space-y-3`,children:[S.map(e=>{let t=r.ethicsRules[e.id]!==!1;return(0,I.jsx)(XR,{className:H(!t&&`opacity-60`),children:(0,I.jsx)(ez,{className:`p-4`,children:(0,I.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,I.jsx)(d$,{checked:t,onCheckedChange:t=>{e.isDefault&&!t&&!confirm(`¿Estás seguro de desactivar los lineamientos éticos por defecto?`)||w({ethicsRules:{...r.ethicsRules,[e.id]:t}})}}),(0,I.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`h3`,{className:`font-medium`,children:e.name}),e.isDefault&&(0,I.jsx)($z,{className:`text-xs bg-blue-500/10 text-blue-500`,children:`Por defecto`})]}),e.description&&(0,I.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:e.description}),(0,I.jsxs)(`details`,{className:`mt-2`,children:[(0,I.jsx)(`summary`,{className:`text-xs text-muted-foreground cursor-pointer hover:text-foreground`,children:`Ver contenido`}),(0,I.jsx)(`pre`,{className:`text-xs mt-2 p-2 bg-muted rounded whitespace-pre-wrap font-mono`,children:e.content})]})]})]})})},e.id)}),S.length===0&&(0,I.jsx)(`p`,{className:`text-sm text-muted-foreground text-center py-4`,children:`Cargando lineamientos éticos...`})]}),(0,I.jsx)(W,{variant:`outline`,className:`w-full`,onClick:()=>{let e=prompt(`Ingresa tu regla personalizada:`);if(e){let t=prompt(`Categoría (SIEMPRE/NUNCA/CONFIRMAR):`,`CONFIRMAR`);t&&[`SIEMPRE`,`NUNCA`,`CONFIRMAR`].includes(t.toUpperCase())&&w({customRules:[...r.customRules,{text:e,category:t.toUpperCase()}]})}},children:`+ Añadir regla personalizada`}),r.customRules.length>0&&(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{children:`Reglas personalizadas`}),r.customRules.map((e,t)=>(0,I.jsx)(XR,{children:(0,I.jsxs)(ez,{className:`p-4 flex items-center justify-between`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`p`,{className:`font-medium`,children:e.text}),(0,I.jsx)($z,{className:H(`text-xs mt-1`,e.category===`NUNCA`&&`text-red-500 bg-red-500/10`,e.category===`SIEMPRE`&&`text-green-500 bg-green-500/10`,e.category===`CONFIRMAR`&&`text-amber-500 bg-amber-500/10`),children:e.category})]}),(0,I.jsx)(W,{variant:`ghost`,size:`sm`,onClick:()=>{w({customRules:r.customRules.filter((e,n)=>n!==t)})},children:`Eliminar`})]})},t))]})]}),ee=()=>(0,I.jsxs)(`div`,{className:`space-y-6`,children:[(0,I.jsxs)(`div`,{className:`text-center space-y-2`,children:[(0,I.jsx)(`h2`,{className:`text-2xl font-bold`,children:`¡Todo listo!`}),(0,I.jsx)(`p`,{className:`text-muted-foreground`,children:`Revisa tu configuración antes de continuar`})]}),s?(0,I.jsx)(XR,{className:`border-green-500 bg-green-500/10`,children:(0,I.jsxs)(ez,{className:`p-8 text-center space-y-4`,children:[(0,I.jsx)(`div`,{className:`flex justify-center`,children:(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsx)(Vn,{className:`w-24 h-24 text-amber-500 animate-pulse`,fill:`currentColor`}),(0,I.jsx)(Dr,{className:`w-8 h-8 text-amber-300 absolute -top-2 -right-2 animate-bounce`})]})}),(0,I.jsx)(`h3`,{className:`text-xl font-bold`,children:`¡Bienvenido a Hive!`}),(0,I.jsxs)(`p`,{className:`text-muted-foreground`,children:[r.agentName,` está listo para ayudarte.`]})]})}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(XR,{children:[(0,I.jsxs)(ZR,{children:[(0,I.jsxs)(QR,{className:`flex items-center gap-3`,children:[(0,I.jsx)(`div`,{className:`w-10 h-10 rounded-lg flex items-center justify-center bg-amber-500`,children:(0,I.jsx)(Vn,{className:`w-6 h-6 text-white`,fill:`currentColor`})}),r.agentName]}),(0,I.jsx)($R,{children:r.agentDescription||`Sin descripción`})]}),(0,I.jsxs)(ez,{className:`space-y-4`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(Z,{className:`text-sm text-muted-foreground`,children:`Proveedor`}),(0,I.jsxs)(`p`,{className:`font-medium`,children:[h.find(e=>e.id===r.provider)?.name||r.provider,` — `,r.model]})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(Z,{className:`text-sm text-muted-foreground`,children:`Canales activos`}),(0,I.jsx)(`div`,{className:`flex gap-2 flex-wrap mt-1`,children:Object.entries(r.channels).filter(([e,t])=>t.enabled).map(([e])=>{let t=q9.find(t=>t.id===e);return(0,I.jsxs)($z,{variant:`secondary`,children:[t?.icon,` `,t?.name]},e)})})]}),r.voiceEnabled&&(0,I.jsxs)(`div`,{children:[(0,I.jsx)(Z,{className:`text-sm text-muted-foreground`,children:`Voz`}),(0,I.jsxs)(`p`,{className:`font-medium`,children:[`STT: `,r.sttProvider,` | TTS: `,r.ttsProvider,r.ttsVoice&&` (${r.ttsVoice})`]})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(Z,{className:`text-sm text-muted-foreground`,children:`Reglas éticas activas`}),(0,I.jsx)(`div`,{className:`flex gap-2 flex-wrap mt-1`,children:Object.entries(r.ethicsRules).filter(([e,t])=>t).map(([e])=>(0,I.jsx)($z,{variant:`outline`,children:S.find(t=>t.id===e)?.name??e},e))})]})]})]}),(0,I.jsx)(W,{className:`w-full h-14 text-lg bg-amber-500 hover:bg-amber-600`,onClick:A,disabled:a,children:a?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Xn,{className:`w-5 h-5 mr-2 animate-spin`}),`Configurando...`]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Dr,{className:`w-5 h-5 mr-2`}),`Iniciar a `,r.agentName]})})]})]});return(0,I.jsx)(`div`,{className:`min-h-screen bg-gradient-to-b from-background to-muted/20`,children:(0,I.jsxs)(`div`,{className:`container max-w-2xl mx-auto py-8 px-4`,children:[(0,I.jsxs)(`div`,{className:`mb-8 space-y-2`,children:[(0,I.jsxs)(`div`,{className:`flex justify-between text-sm text-muted-foreground`,children:[(0,I.jsxs)(`span`,{children:[`Paso `,t,` de 7`]}),(0,I.jsx)(`button`,{onClick:O,className:`text-xs text-muted-foreground hover:text-foreground`,children:`Reiniciar configuración`})]}),(0,I.jsx)(yB,{value:t/7*100,className:`h-2`})]}),j(),p&&(0,I.jsx)(ZQ,{variant:`destructive`,className:`mt-6`,children:(0,I.jsx)($Q,{children:p})}),!s&&(0,I.jsxs)(`div`,{className:`flex justify-between mt-6 pt-6 border-t`,children:[(0,I.jsx)(W,{variant:`outline`,onClick:D,disabled:t===1,children:`← Anterior`}),t<7?(0,I.jsx)(W,{onClick:E,className:`bg-amber-500 hover:bg-amber-600`,children:`Siguiente →`}):(0,I.jsx)(`div`,{})]})]})})}function sDe(){let e=Id(),[t,n]=(0,_.useState)(``),[r,i]=(0,_.useState)(``),[a,o]=(0,_.useState)(!1),[s,c]=(0,_.useState)(!1),[l,u]=(0,_.useState)(``);(0,_.useEffect)(()=>{fetch(`/api/auth/status`).then(e=>e.json()).then(({hasCredentials:t})=>{t||e(`/`,{replace:!0})}).catch(()=>{})},[]);async function d(n){n.preventDefault(),u(``),c(!0);try{let n=await fetch(`/api/auth/login`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({email:t,password:r})}),i=await n.json();if(!n.ok){u(i.error||`Credenciales inválidas`);return}localStorage.setItem(`hive-auth-token`,i.authToken),e(`/`,{replace:!0})}catch{u(`No se pudo conectar al servidor`)}finally{c(!1)}}return(0,I.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-background`,children:(0,I.jsxs)(`div`,{className:`w-full max-w-sm space-y-6 p-8`,children:[(0,I.jsxs)(`div`,{className:`text-center space-y-2`,children:[(0,I.jsx)(`div`,{className:`text-4xl`,children:`🐝`}),(0,I.jsx)(`h1`,{className:`text-2xl font-bold tracking-tight`,children:`Hive`}),(0,I.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Inicia sesión para continuar`})]}),(0,I.jsxs)(`form`,{onSubmit:d,className:`space-y-4`,children:[(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`email`,children:`Email`}),(0,I.jsx)(G,{id:`email`,type:`email`,autoComplete:`email`,placeholder:`tu@email.com`,value:t,onChange:e=>n(e.target.value),required:!0,disabled:s})]}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`password`,children:`Contraseña`}),(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsx)(G,{id:`password`,type:a?`text`:`password`,autoComplete:`current-password`,placeholder:`••••••••`,value:r,onChange:e=>i(e.target.value),required:!0,disabled:s,className:`pr-10`}),(0,I.jsx)(`button`,{type:`button`,className:`absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground`,onClick:()=>o(e=>!e),tabIndex:-1,children:a?(0,I.jsx)(On,{className:`h-4 w-4`}):(0,I.jsx)(kn,{className:`h-4 w-4`})})]})]}),l&&(0,I.jsx)(`p`,{className:`text-sm text-destructive`,children:l}),(0,I.jsxs)(W,{type:`submit`,className:`w-full`,disabled:s,children:[s&&(0,I.jsx)(Xn,{className:`mr-2 h-4 w-4 animate-spin`}),`Iniciar Sesión`]})]}),(0,I.jsx)(`div`,{className:`text-center`,children:(0,I.jsx)(`button`,{type:`button`,onClick:()=>e(`/recover`),className:`text-sm text-muted-foreground hover:text-foreground underline underline-offset-4`,children:`¿Olvidaste tu contraseña?`})})]})})}function cDe(){let e=Id(),[t,n]=(0,_.useState)(``),[r,i]=(0,_.useState)(``),[a,o]=(0,_.useState)(``),[s,c]=(0,_.useState)(!1),[l,u]=(0,_.useState)(!1),[d,f]=(0,_.useState)(``);async function p(n){if(n.preventDefault(),f(``),r!==a){f(`Las contraseñas no coinciden`);return}if(r.length<8){f(`La contraseña debe tener al menos 8 caracteres`);return}u(!0);try{let n=await fetch(`/api/auth/recover`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({recoveryKey:t,newPassword:r})}),i=await n.json();if(!n.ok){f(i.error||`Recovery key inválido`);return}localStorage.setItem(`hive-auth-token`,i.authToken),e(`/`,{replace:!0})}catch{f(`No se pudo conectar al servidor`)}finally{u(!1)}}return(0,I.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-background`,children:(0,I.jsxs)(`div`,{className:`w-full max-w-sm space-y-6 p-8`,children:[(0,I.jsxs)(`div`,{className:`text-center space-y-2`,children:[(0,I.jsx)(`div`,{className:`text-4xl`,children:`🐝`}),(0,I.jsx)(`h1`,{className:`text-2xl font-bold tracking-tight`,children:`Recuperar acceso`}),(0,I.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Usa tu recovery key para restablecer la contraseña`})]}),(0,I.jsxs)(`form`,{onSubmit:p,className:`space-y-4`,children:[(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`recoveryKey`,children:`Recovery Key`}),(0,I.jsx)(G,{id:`recoveryKey`,type:`text`,placeholder:`xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`,value:t,onChange:e=>n(e.target.value),required:!0,disabled:l,className:`font-mono text-sm`}),(0,I.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Encuéntralo en `,(0,I.jsx)(`code`,{className:`bg-muted px-1 rounded`,children:`~/.hive/.auth_token`})]})]}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`newPassword`,children:`Nueva contraseña`}),(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsx)(G,{id:`newPassword`,type:s?`text`:`password`,placeholder:`••••••••`,value:r,onChange:e=>i(e.target.value),required:!0,disabled:l,className:`pr-10`}),(0,I.jsx)(`button`,{type:`button`,className:`absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground`,onClick:()=>c(e=>!e),tabIndex:-1,children:s?(0,I.jsx)(On,{className:`h-4 w-4`}):(0,I.jsx)(kn,{className:`h-4 w-4`})})]})]}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(Z,{htmlFor:`confirmPassword`,children:`Confirmar contraseña`}),(0,I.jsx)(G,{id:`confirmPassword`,type:s?`text`:`password`,placeholder:`••••••••`,value:a,onChange:e=>o(e.target.value),required:!0,disabled:l})]}),d&&(0,I.jsx)(`p`,{className:`text-sm text-destructive`,children:d}),(0,I.jsxs)(W,{type:`submit`,className:`w-full`,disabled:l,children:[l&&(0,I.jsx)(Xn,{className:`mr-2 h-4 w-4 animate-spin`}),`Recuperar acceso`]})]}),(0,I.jsx)(`div`,{className:`text-center`,children:(0,I.jsxs)(`button`,{type:`button`,onClick:()=>e(`/login`),className:`text-sm text-muted-foreground hover:text-foreground inline-flex items-center gap-1`,children:[(0,I.jsx)(qt,{className:`h-3 w-3`}),`Volver al login`]})})]})})}var lDe=()=>{let e=Nd();return(0,_.useEffect)(()=>{console.error(`404 Error: User attempted to access non-existent route:`,e.pathname)},[e.pathname]),(0,I.jsx)(`div`,{className:`flex min-h-screen items-center justify-center bg-muted`,children:(0,I.jsxs)(`div`,{className:`text-center`,children:[(0,I.jsx)(`h1`,{className:`mb-4 text-4xl font-bold`,children:`404`}),(0,I.jsx)(`p`,{className:`mb-4 text-xl text-muted-foreground`,children:`Oops! Page not found`}),(0,I.jsx)(`a`,{href:`/`,className:`text-primary underline hover:text-primary/90`,children:`Return to Home`})]})})};function Z9({delay:e,startX:t,startY:n,duration:r}){return(0,I.jsxs)(`svg`,{style:{position:`absolute`,left:`${t}%`,top:`${n}%`,animation:`flyBee ${r}s ease-in-out ${e}s infinite`,opacity:0},width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,className:`drop-shadow-lg`,children:[(0,I.jsx)(`ellipse`,{cx:`12`,cy:`14`,rx:`6`,ry:`8`,fill:`#FBBF24`}),(0,I.jsx)(`ellipse`,{cx:`12`,cy:`14`,rx:`3`,ry:`6`,fill:`#1F2937`}),(0,I.jsx)(`circle`,{cx:`8`,cy:`10`,r:`2`,fill:`#1F2937`}),(0,I.jsx)(`circle`,{cx:`16`,cy:`10`,r:`2`,fill:`#1F2937`}),(0,I.jsx)(`path`,{d:`M6 8 Q4 4 8 6`,stroke:`#1F2937`,strokeWidth:`1`,fill:`none`}),(0,I.jsx)(`path`,{d:`M18 8 Q20 4 16 6`,stroke:`#1F2937`,strokeWidth:`1`,fill:`none`}),(0,I.jsx)(`path`,{d:`M9 18 L6 22 L9 20 Z`,fill:`#1F2937`}),(0,I.jsx)(`path`,{d:`M15 18 L18 22 L15 20 Z`,fill:`#1F2937`})]})}function Q9({delay:e,x:t,y:n}){return(0,I.jsx)(`svg`,{style:{position:`absolute`,left:`${t}%`,top:`${n}%`,animation:`sparkle 2s ease-in-out ${e}s infinite`},width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,children:(0,I.jsx)(`path`,{d:`M12 2 L14 10 L22 12 L14 14 L12 22 L10 14 L2 12 L10 10 Z`,fill:`#FCD34D`,className:`animate-pulse`})})}function uDe(){let{isOpen:e,data:t,close:n}=Kh(),[r,i]=(0,_.useState)(4);if((0,_.useEffect)(()=>{if(e){i(4);let e=setInterval(()=>{i(t=>t<=1?(clearInterval(e),n(),0):t-1)},1e3);return()=>clearInterval(e)}},[e,n]),!e||!t)return null;let a=t.channels?.length>0?t.channels.join(`, `):`WebChat`;return(0,I.jsxs)(Um,{open:e,onOpenChange:e=>!e&&n(),children:[(0,I.jsxs)(Gm,{children:[(0,I.jsx)(Km,{className:`fixed inset-0 bg-black/60 backdrop-blur-sm z-50 animate-fade-in`}),(0,I.jsxs)(qm,{className:`fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 z-50 w-full max-w-lg focus:outline-none`,children:[(0,I.jsx)(Jm,{className:`sr-only`,children:`Bienvenido al Enjambre`}),(0,I.jsxs)(`div`,{className:`relative bg-gradient-to-br from-amber-50 via-yellow-50 to-orange-100 rounded-3xl shadow-2xl overflow-hidden border-4 border-amber-300/50`,children:[(0,I.jsxs)(`div`,{className:`absolute inset-0 overflow-hidden pointer-events-none`,children:[(0,I.jsx)(`div`,{className:`absolute inset-0 bg-gradient-to-b from-amber-200/30 to-orange-200/30`}),(0,I.jsx)(Z9,{delay:0,startX:10,startY:20,duration:8}),(0,I.jsx)(Z9,{delay:1,startX:80,startY:30,duration:7}),(0,I.jsx)(Z9,{delay:2,startX:20,startY:60,duration:9}),(0,I.jsx)(Z9,{delay:.5,startX:70,startY:70,duration:8}),(0,I.jsx)(Z9,{delay:1.5,startX:40,startY:10,duration:10}),(0,I.jsx)(Z9,{delay:2.5,startX:60,startY:50,duration:7}),(0,I.jsx)(Q9,{delay:0,x:15,y:15}),(0,I.jsx)(Q9,{delay:.5,x:85,y:25}),(0,I.jsx)(Q9,{delay:1,x:25,y:75}),(0,I.jsx)(Q9,{delay:1.5,x:75,y:80}),(0,I.jsx)(Q9,{delay:2,x:50,y:10})]}),(0,I.jsxs)(`div`,{className:`relative p-8 text-center`,children:[(0,I.jsxs)(`div`,{className:`mb-6`,children:[(0,I.jsx)(`h1`,{className:`text-4xl font-black text-transparent bg-clip-text bg-gradient-to-r from-amber-600 via-orange-600 to-amber-700 drop-shadow-sm`,children:`🐝 BIENVENIDO AL ENJAMBRE 🐝`}),(0,I.jsx)(`p`,{className:`text-lg font-semibold text-amber-800 mt-2`,children:`✦在你的 Hive✦`})]}),(0,I.jsx)(`div`,{className:`w-full h-px bg-gradient-to-r from-transparent via-amber-400 to-transparent mb-6`}),(0,I.jsxs)(`div`,{className:`mb-6`,children:[t.user&&(0,I.jsxs)(`p`,{className:`text-2xl font-bold text-gray-800 mb-4`,children:[`👋 Hola, `,(0,I.jsx)(`span`,{className:`text-amber-700`,children:t.user.name}),`!`]}),(0,I.jsxs)(`div`,{className:`flex flex-col gap-2 text-left bg-white/60 rounded-xl p-4 backdrop-blur-sm`,children:[t.agent&&(0,I.jsxs)(`p`,{className:`text-gray-700`,children:[(0,I.jsx)(`span`,{className:`font-semibold`,children:`🤖 Tu agente:`}),` `,(0,I.jsx)(`span`,{className:`text-amber-700`,children:t.agent.name})]}),t.agent&&(0,I.jsxs)(`p`,{className:`text-gray-700`,children:[(0,I.jsx)(`span`,{className:`font-semibold`,children:`🧠 Provider:`}),` `,(0,I.jsxs)(`span`,{className:`text-amber-700`,children:[t.agent.provider,`/`,t.agent.model]})]}),(0,I.jsxs)(`p`,{className:`text-gray-700`,children:[(0,I.jsx)(`span`,{className:`font-semibold`,children:`📡 Canales:`}),` `,(0,I.jsx)(`span`,{className:`text-amber-700`,children:a})]}),t.voice?.enabled&&(0,I.jsxs)(`p`,{className:`text-gray-700`,children:[(0,I.jsx)(`span`,{className:`font-semibold`,children:`🎤 Voz:`}),` `,(0,I.jsxs)(`span`,{className:`text-amber-700`,children:[t.voice.sttProvider,` + `,t.voice.ttsProvider]})]})]})]}),(0,I.jsx)(`div`,{className:`w-full h-px bg-gradient-to-r from-transparent via-amber-400 to-transparent mb-6`}),(0,I.jsxs)(`div`,{className:`mb-6 text-left`,children:[(0,I.jsx)(`p`,{className:`text-lg font-bold text-gray-800 mb-3 text-center`,children:`💡 LO QUE PUEDES HACER CON HIVE:`}),(0,I.jsxs)(`div`,{className:`grid grid-cols-2 gap-2 text-sm`,children:[(0,I.jsx)($9,{icon:`🗣️`,text:`Voz en tiempo real (STT/TTS)`}),(0,I.jsx)($9,{icon:`🔧`,text:`Code Bridge (claude-code, gemini)`}),(0,I.jsx)($9,{icon:`🔌`,text:`MCP Servers`}),(0,I.jsx)($9,{icon:`🎨`,text:`Canvas visual`}),(0,I.jsx)($9,{icon:`📱`,text:`Múltiples canales`}),(0,I.jsx)($9,{icon:`🧠`,text:`Múltiples agentes`}),(0,I.jsx)($9,{icon:`💬`,text:`Memoria conversacional`}),(0,I.jsx)($9,{icon:`⚡`,text:`Ejecución de tools`})]})]}),(0,I.jsx)(`div`,{className:`mt-4`,children:(0,I.jsxs)(`p`,{className:`text-amber-600 font-medium animate-pulse`,children:[`🌐 Abriendo Dashboard en `,r,`s...`]})}),(0,I.jsx)(Xm,{asChild:!0,children:(0,I.jsx)(`button`,{className:`absolute top-4 right-4 p-2 rounded-full bg-amber-200/80 hover:bg-amber-300 transition-colors`,"aria-label":`Cerrar`,children:(0,I.jsx)(Br,{className:`w-5 h-5 text-amber-800`})})})]})]})]})]}),(0,I.jsx)(`style`,{children:`
267
- @keyframes flyBee {
268
- 0% {
269
- transform: translate(0, 0) rotate(0deg);
270
- opacity: 0;
271
- }
272
- 10% {
273
- opacity: 1;
274
- }
275
- 25% {
276
- transform: translate(100px, -50px) rotate(15deg);
277
- }
278
- 50% {
279
- transform: translate(50px, 50px) rotate(-10deg);
280
- }
281
- 75% {
282
- transform: translate(-80px, 20px) rotate(20deg);
283
- }
284
- 90% {
285
- opacity: 1;
286
- }
287
- 100% {
288
- transform: translate(0, 0) rotate(0deg);
289
- opacity: 0;
290
- }
291
- }
292
-
293
- @keyframes sparkle {
294
- 0%, 100% {
295
- opacity: 0;
296
- transform: scale(0.5);
297
- }
298
- 50% {
299
- opacity: 1;
300
- transform: scale(1.2);
301
- }
302
- }
303
-
304
- .animate-fade-in {
305
- animation: fadeIn 0.3s ease-out;
306
- }
307
-
308
- @keyframes fadeIn {
309
- from { opacity: 0; }
310
- to { opacity: 1; }
311
- }
312
- `})]})}function $9({icon:e,text:t}){return(0,I.jsxs)(`div`,{className:`flex items-center gap-2 bg-white/50 rounded-lg px-3 py-2`,children:[(0,I.jsx)(`span`,{className:`text-lg`,children:e}),(0,I.jsx)(`span`,{className:`text-gray-700 text-xs`,children:t})]})}var dDe=()=>{let{isLoading:e,message:t}=gg();return e?(0,I.jsxs)(`div`,{className:`fixed inset-0 z-[9999] flex flex-col items-center justify-center bg-background/60 backdrop-blur-md animate-in fade-in duration-300`,children:[(0,I.jsx)(`div`,{className:`relative h-32 w-32 animate-bounce duration-[2000ms]`,children:(0,I.jsxs)(`svg`,{viewBox:`0 0 100 100`,className:`h-full w-full drop-shadow-[0_0_15px_rgba(245,158,11,0.5)]`,children:[(0,I.jsxs)(`g`,{className:`animate-[wing-flap_0.1s_infinite]`,children:[(0,I.jsx)(`path`,{d:`M50 40 C30 20 10 30 20 50 C30 70 50 60 50 40`,fill:`rgba(255,255,255,0.7)`,stroke:`white`,strokeWidth:`1`}),(0,I.jsx)(`path`,{d:`M50 40 C70 20 90 30 80 50 C70 70 50 60 50 40`,fill:`rgba(255,255,255,0.7)`,stroke:`white`,strokeWidth:`1`})]}),(0,I.jsx)(`ellipse`,{cx:`50`,cy:`55`,rx:`20`,ry:`15`,fill:`#F59E0B`}),(0,I.jsx)(`path`,{d:`M40 45 Q50 40 60 45`,fill:`none`,stroke:`#1F2937`,strokeWidth:`2`,strokeLinecap:`round`}),(0,I.jsx)(`path`,{d:`M35 55 Q50 50 65 55`,fill:`none`,stroke:`#1F2937`,strokeWidth:`3`}),(0,I.jsx)(`path`,{d:`M40 65 Q50 60 60 65`,fill:`none`,stroke:`#1F2937`,strokeWidth:`2`}),(0,I.jsx)(`circle`,{cx:`68`,cy:`50`,r:`8`,fill:`#F59E0B`}),(0,I.jsx)(`circle`,{cx:`72`,cy:`48`,r:`1.5`,fill:`#1F2937`}),(0,I.jsx)(`path`,{d:`M70 42 Q75 35 80 38`,fill:`none`,stroke:`#1F2937`,strokeWidth:`1`}),(0,I.jsx)(`path`,{d:`M68 42 Q65 35 60 38`,fill:`none`,stroke:`#1F2937`,strokeWidth:`1`}),(0,I.jsx)(`path`,{d:`M30 55 L20 55`,stroke:`#1F2937`,strokeWidth:`2`,strokeLinecap:`round`})]})}),t&&(0,I.jsx)(`p`,{className:`mt-8 text-lg font-medium tracking-wide text-primary animate-pulse italic`,children:t}),(0,I.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`
313
- @keyframes wing-flap {
314
- 0%, 100% { transform: scaleY(1); }
315
- 50% { transform: scaleY(0.5); }
316
- }
317
- `}})]}):null},fDe=new pu;function pDe({children:e}){let t=localStorage.getItem(`hive-auth-token`),[n,r]=(0,_.useState)(`loading`);return(0,_.useEffect)(()=>{fetch(`/api/auth/status`).then(e=>e.json()).then(e=>r(e.hasCredentials?`protected`:`open`)).catch(()=>r(`open`))},[]),n===`loading`?null:n===`open`||t?(0,I.jsx)(I.Fragment,{children:e}):(0,I.jsx)(Aee,{to:`/login`,replace:!0})}var mDe=()=>{let e=xg(e=>e.fetchUser),t=Id(),n=Nd(),[r,i]=(0,_.useState)(!1),[a,o]=(0,_.useState)(!1),[s,c]=(0,_.useState)(!1);return BR(!s&&a&&r),(0,_.useEffect)(()=>{let e=!1,t=`${Qh()}/health`;async function n(){for(;!e;){try{if((await(await fetch(t)).json().catch(()=>({}))).status===`ok`){i(!0);return}}catch{}await new Promise(e=>setTimeout(e,1e3))}}return n(),()=>{e=!0}},[]),(0,_.useEffect)(()=>{if(!r)return;let i=new URLSearchParams(window.location.search).get(`token`);if(i){localStorage.setItem(`hive-auth-token`,i);let e=window.location.pathname+window.location.hash;window.history.replaceState({},``,e)}fetch(`/api/setup/status`).then(e=>e.json()).then(({setupMode:r})=>{c(!!r),r&&n.pathname!==`/setup`?t(`/setup`,{replace:!0}):!r&&n.pathname===`/setup`&&t(`/`,{replace:!0}),o(!0),r||localStorage.getItem(`hive-auth-token`)&&e()}).catch(()=>{o(!0),localStorage.getItem(`hive-auth-token`)&&e()})},[r]),!r||!a?(0,I.jsxs)(`div`,{className:`fixed inset-0 z-[9999] flex flex-col items-center justify-center bg-background/60 backdrop-blur-md`,children:[(0,I.jsx)(`div`,{className:`relative h-32 w-32 animate-bounce`,style:{animationDuration:`2000ms`},children:(0,I.jsxs)(`svg`,{viewBox:`0 0 100 100`,className:`h-full w-full`,style:{filter:`drop-shadow(0 0 15px rgba(245,158,11,0.5))`},children:[(0,I.jsx)(`ellipse`,{cx:`50`,cy:`55`,rx:`20`,ry:`15`,fill:`#F59E0B`}),(0,I.jsx)(`path`,{d:`M40 45 Q50 40 60 45`,fill:`none`,stroke:`#1F2937`,strokeWidth:`2`,strokeLinecap:`round`}),(0,I.jsx)(`path`,{d:`M35 55 Q50 50 65 55`,fill:`none`,stroke:`#1F2937`,strokeWidth:`3`}),(0,I.jsx)(`path`,{d:`M40 65 Q50 60 60 65`,fill:`none`,stroke:`#1F2937`,strokeWidth:`2`}),(0,I.jsx)(`circle`,{cx:`68`,cy:`50`,r:`8`,fill:`#F59E0B`}),(0,I.jsx)(`circle`,{cx:`72`,cy:`48`,r:`1.5`,fill:`#1F2937`}),(0,I.jsx)(`path`,{d:`M70 42 Q75 35 80 38`,fill:`none`,stroke:`#1F2937`,strokeWidth:`1`}),(0,I.jsx)(`path`,{d:`M68 42 Q65 35 60 38`,fill:`none`,stroke:`#1F2937`,strokeWidth:`1`}),(0,I.jsx)(`path`,{d:`M30 55 L20 55`,stroke:`#1F2937`,strokeWidth:`2`,strokeLinecap:`round`})]})}),(0,I.jsx)(`p`,{className:`mt-8 text-lg font-medium tracking-wide text-primary animate-pulse italic`,children:r?`Sincronizando...`:`Iniciando la colmena...`})]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(dDe,{}),(0,I.jsx)(uDe,{}),(0,I.jsxs)(Mee,{children:[(0,I.jsx)(Zd,{path:`/setup`,element:(0,I.jsx)(oDe,{})}),(0,I.jsx)(Zd,{path:`/login`,element:(0,I.jsx)(sDe,{})}),(0,I.jsx)(Zd,{path:`/recover`,element:(0,I.jsx)(cDe,{})}),(0,I.jsxs)(Zd,{element:(0,I.jsx)(pDe,{children:(0,I.jsx)($te,{})}),children:[(0,I.jsx)(Zd,{path:`/`,element:(0,I.jsx)(SB,{})}),(0,I.jsx)(Zd,{path:`/chat`,element:(0,I.jsx)(nDe,{})}),(0,I.jsx)(Zd,{path:`/agents`,element:(0,I.jsx)(Mq,{})}),(0,I.jsx)(Zd,{path:`/agents/new`,element:(0,I.jsx)(rY,{})}),(0,I.jsx)(Zd,{path:`/agents/:id`,element:(0,I.jsx)(Lq,{})}),(0,I.jsx)(Zd,{path:`/notas`,element:(0,I.jsx)(nY,{forcePanel:`notas`})}),(0,I.jsx)(Zd,{path:`/cron-jobs`,element:(0,I.jsx)(nY,{forcePanel:`cron-jobs`})}),(0,I.jsx)(Zd,{path:`/settings`,element:(0,I.jsx)(nY,{})}),(0,I.jsx)(Zd,{path:`/settings/:panel`,element:(0,I.jsx)(nY,{})}),(0,I.jsx)(Zd,{path:`/canvas`,element:(0,I.jsx)(j7,{})}),(0,I.jsx)(Zd,{path:`/canvas/:sessionId`,element:(0,I.jsx)(j7,{})}),(0,I.jsx)(Zd,{path:`/projects`,element:(0,I.jsx)(Twe,{})}),(0,I.jsx)(Zd,{path:`/bridge`,element:(0,I.jsx)(HCe,{})}),(0,I.jsx)(Zd,{path:`/channels`,element:(0,I.jsx)(_we,{})}),(0,I.jsx)(Zd,{path:`/providers`,element:(0,I.jsx)(Bwe,{})}),(0,I.jsx)(Zd,{path:`/logs`,element:(0,I.jsx)(UCe,{})})]}),(0,I.jsx)(Zd,{path:`*`,element:(0,I.jsx)(lDe,{})})]})]})};(0,g.createRoot)(document.getElementById(`root`)).render((0,I.jsx)(()=>(0,I.jsx)(gu,{client:fDe,children:(0,I.jsxs)(tl,{children:[(0,I.jsx)(Yi,{}),(0,I.jsx)(Aa,{}),(0,I.jsx)(kf,{children:(0,I.jsx)(mDe,{})})]})}),{}));