heyio 3.1.2 → 3.1.4
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.
- package/dist/api/routes/inbox.d.ts.map +1 -1
- package/dist/api/routes/inbox.js +52 -1
- package/dist/api/routes/inbox.js.map +1 -1
- package/dist/api/routes/squads.d.ts.map +1 -1
- package/dist/api/routes/squads.js +89 -1
- package/dist/api/routes/squads.js.map +1 -1
- package/dist/copilot/tools.js +2 -2
- package/dist/copilot/tools.js.map +1 -1
- package/dist/models/token-tracker.d.ts +1 -0
- package/dist/models/token-tracker.d.ts.map +1 -1
- package/dist/models/token-tracker.js +11 -10
- package/dist/models/token-tracker.js.map +1 -1
- package/dist/squad/agent.d.ts.map +1 -1
- package/dist/squad/agent.js +42 -0
- package/dist/squad/agent.js.map +1 -1
- package/dist/squad/hiring.d.ts.map +1 -1
- package/dist/squad/hiring.js +5 -12
- package/dist/squad/hiring.js.map +1 -1
- package/dist/squad/name-generator.d.ts.map +1 -1
- package/dist/squad/name-generator.js +5 -13
- package/dist/squad/name-generator.js.map +1 -1
- package/dist/store/inbox.d.ts +12 -0
- package/dist/store/inbox.d.ts.map +1 -1
- package/dist/store/inbox.js +36 -0
- package/dist/store/inbox.js.map +1 -1
- package/node_modules/@io/shared/package.json +1 -1
- package/package.json +1 -1
- package/public/assets/index-6xq4K7X_.css +9 -0
- package/public/assets/index-BjVuXYu6.js +505 -0
- package/public/assets/index-BjVuXYu6.js.map +1 -0
- package/public/index.html +2 -2
- package/public/assets/index-D1hU_jFl.js +0 -491
- package/public/assets/index-D1hU_jFl.js.map +0 -1
- package/public/assets/index-DjqmmXrU.css +0 -1
|
@@ -1,491 +0,0 @@
|
|
|
1
|
-
var lL=Object.defineProperty;var uL=(t,e,r)=>e in t?lL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Ze=(t,e,r)=>uL(t,typeof e!="symbol"?e+"":e,r);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var bf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qe(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Gm={exports:{}},Rl={},Xm={exports:{}},ze={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var ak;function cL(){if(ak)return ze;ak=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.iterator;function g(z){return z===null||typeof z!="object"?null:(z=h&&z[h]||z["@@iterator"],typeof z=="function"?z:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,x={};function y(z,B,J){this.props=z,this.context=B,this.refs=x,this.updater=J||v}y.prototype.isReactComponent={},y.prototype.setState=function(z,B){if(typeof z!="object"&&typeof z!="function"&&z!=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,z,B,"setState")},y.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function k(){}k.prototype=y.prototype;function O(z,B,J){this.props=z,this.context=B,this.refs=x,this.updater=J||v}var A=O.prototype=new k;A.constructor=O,b(A,y.prototype),A.isPureReactComponent=!0;var T=Array.isArray,E=Object.prototype.hasOwnProperty,P={current:null},C={key:!0,ref:!0,__self:!0,__source:!0};function N(z,B,J){var ae,se={},de=null,Ne=null;if(B!=null)for(ae in B.ref!==void 0&&(Ne=B.ref),B.key!==void 0&&(de=""+B.key),B)E.call(B,ae)&&!C.hasOwnProperty(ae)&&(se[ae]=B[ae]);var pe=arguments.length-2;if(pe===1)se.children=J;else if(1<pe){for(var ne=Array(pe),_e=0;_e<pe;_e++)ne[_e]=arguments[_e+2];se.children=ne}if(z&&z.defaultProps)for(ae in pe=z.defaultProps,pe)se[ae]===void 0&&(se[ae]=pe[ae]);return{$$typeof:t,type:z,key:de,ref:Ne,props:se,_owner:P.current}}function L(z,B){return{$$typeof:t,type:z.type,key:B,ref:z.ref,props:z.props,_owner:z._owner}}function V(z){return typeof z=="object"&&z!==null&&z.$$typeof===t}function $(z){var B={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(J){return B[J]})}var I=/\/+/g;function q(z,B){return typeof z=="object"&&z!==null&&z.key!=null?$(""+z.key):B.toString(36)}function U(z,B,J,ae,se){var de=typeof z;(de==="undefined"||de==="boolean")&&(z=null);var Ne=!1;if(z===null)Ne=!0;else switch(de){case"string":case"number":Ne=!0;break;case"object":switch(z.$$typeof){case t:case e:Ne=!0}}if(Ne)return Ne=z,se=se(Ne),z=ae===""?"."+q(Ne,0):ae,T(se)?(J="",z!=null&&(J=z.replace(I,"$&/")+"/"),U(se,B,J,"",function(_e){return _e})):se!=null&&(V(se)&&(se=L(se,J+(!se.key||Ne&&Ne.key===se.key?"":(""+se.key).replace(I,"$&/")+"/")+z)),B.push(se)),1;if(Ne=0,ae=ae===""?".":ae+":",T(z))for(var pe=0;pe<z.length;pe++){de=z[pe];var ne=ae+q(de,pe);Ne+=U(de,B,J,ne,se)}else if(ne=g(z),typeof ne=="function")for(z=ne.call(z),pe=0;!(de=z.next()).done;)de=de.value,ne=ae+q(de,pe++),Ne+=U(de,B,J,ne,se);else if(de==="object")throw B=String(z),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.");return Ne}function K(z,B,J){if(z==null)return z;var ae=[],se=0;return U(z,ae,"","",function(de){return B.call(J,de,se++)}),ae}function G(z){if(z._status===-1){var B=z._result;B=B(),B.then(function(J){(z._status===0||z._status===-1)&&(z._status=1,z._result=J)},function(J){(z._status===0||z._status===-1)&&(z._status=2,z._result=J)}),z._status===-1&&(z._status=0,z._result=B)}if(z._status===1)return z._result.default;throw z._result}var Z={current:null},X={transition:null},te={ReactCurrentDispatcher:Z,ReactCurrentBatchConfig:X,ReactCurrentOwner:P};function H(){throw Error("act(...) is not supported in production builds of React.")}return ze.Children={map:K,forEach:function(z,B,J){K(z,function(){B.apply(this,arguments)},J)},count:function(z){var B=0;return K(z,function(){B++}),B},toArray:function(z){return K(z,function(B){return B})||[]},only:function(z){if(!V(z))throw Error("React.Children.only expected to receive a single React element child.");return z}},ze.Component=y,ze.Fragment=r,ze.Profiler=i,ze.PureComponent=O,ze.StrictMode=n,ze.Suspense=c,ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=te,ze.act=H,ze.cloneElement=function(z,B,J){if(z==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+z+".");var ae=b({},z.props),se=z.key,de=z.ref,Ne=z._owner;if(B!=null){if(B.ref!==void 0&&(de=B.ref,Ne=P.current),B.key!==void 0&&(se=""+B.key),z.type&&z.type.defaultProps)var pe=z.type.defaultProps;for(ne in B)E.call(B,ne)&&!C.hasOwnProperty(ne)&&(ae[ne]=B[ne]===void 0&&pe!==void 0?pe[ne]:B[ne])}var ne=arguments.length-2;if(ne===1)ae.children=J;else if(1<ne){pe=Array(ne);for(var _e=0;_e<ne;_e++)pe[_e]=arguments[_e+2];ae.children=pe}return{$$typeof:t,type:z.type,key:se,ref:de,props:ae,_owner:Ne}},ze.createContext=function(z){return z={$$typeof:s,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},z.Provider={$$typeof:a,_context:z},z.Consumer=z},ze.createElement=N,ze.createFactory=function(z){var B=N.bind(null,z);return B.type=z,B},ze.createRef=function(){return{current:null}},ze.forwardRef=function(z){return{$$typeof:u,render:z}},ze.isValidElement=V,ze.lazy=function(z){return{$$typeof:p,_payload:{_status:-1,_result:z},_init:G}},ze.memo=function(z,B){return{$$typeof:f,type:z,compare:B===void 0?null:B}},ze.startTransition=function(z){var B=X.transition;X.transition={};try{z()}finally{X.transition=B}},ze.unstable_act=H,ze.useCallback=function(z,B){return Z.current.useCallback(z,B)},ze.useContext=function(z){return Z.current.useContext(z)},ze.useDebugValue=function(){},ze.useDeferredValue=function(z){return Z.current.useDeferredValue(z)},ze.useEffect=function(z,B){return Z.current.useEffect(z,B)},ze.useId=function(){return Z.current.useId()},ze.useImperativeHandle=function(z,B,J){return Z.current.useImperativeHandle(z,B,J)},ze.useInsertionEffect=function(z,B){return Z.current.useInsertionEffect(z,B)},ze.useLayoutEffect=function(z,B){return Z.current.useLayoutEffect(z,B)},ze.useMemo=function(z,B){return Z.current.useMemo(z,B)},ze.useReducer=function(z,B,J){return Z.current.useReducer(z,B,J)},ze.useRef=function(z){return Z.current.useRef(z)},ze.useState=function(z){return Z.current.useState(z)},ze.useSyncExternalStore=function(z,B,J){return Z.current.useSyncExternalStore(z,B,J)},ze.useTransition=function(){return Z.current.useTransition()},ze.version="18.3.1",ze}var ok;function rx(){return ok||(ok=1,Xm.exports=cL()),Xm.exports}/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.production.min.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var sk;function fL(){if(sk)return Rl;sk=1;var t=rx(),e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(u,c,f){var p,h={},g=null,v=null;f!==void 0&&(g=""+f),c.key!==void 0&&(g=""+c.key),c.ref!==void 0&&(v=c.ref);for(p in c)n.call(c,p)&&!a.hasOwnProperty(p)&&(h[p]=c[p]);if(u&&u.defaultProps)for(p in c=u.defaultProps,c)h[p]===void 0&&(h[p]=c[p]);return{$$typeof:e,type:u,key:g,ref:v,props:h,_owner:i.current}}return Rl.Fragment=r,Rl.jsx=s,Rl.jsxs=s,Rl}var lk;function dL(){return lk||(lk=1,Gm.exports=fL()),Gm.exports}var _=dL(),R=rx();const M=Qe(R);var wf={},Ym={exports:{}},xr={},Jm={exports:{}},Qm={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.min.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var uk;function hL(){return uk||(uk=1,(function(t){function e(X,te){var H=X.length;X.push(te);e:for(;0<H;){var z=H-1>>>1,B=X[z];if(0<i(B,te))X[z]=te,X[H]=B,H=z;else break e}}function r(X){return X.length===0?null:X[0]}function n(X){if(X.length===0)return null;var te=X[0],H=X.pop();if(H!==te){X[0]=H;e:for(var z=0,B=X.length,J=B>>>1;z<J;){var ae=2*(z+1)-1,se=X[ae],de=ae+1,Ne=X[de];if(0>i(se,H))de<B&&0>i(Ne,se)?(X[z]=Ne,X[de]=H,z=de):(X[z]=se,X[ae]=H,z=ae);else if(de<B&&0>i(Ne,H))X[z]=Ne,X[de]=H,z=de;else break e}}return te}function i(X,te){var H=X.sortIndex-te.sortIndex;return H!==0?H:X.id-te.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,u=s.now();t.unstable_now=function(){return s.now()-u}}var c=[],f=[],p=1,h=null,g=3,v=!1,b=!1,x=!1,y=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(X){for(var te=r(f);te!==null;){if(te.callback===null)n(f);else if(te.startTime<=X)n(f),te.sortIndex=te.expirationTime,e(c,te);else break;te=r(f)}}function T(X){if(x=!1,A(X),!b)if(r(c)!==null)b=!0,G(E);else{var te=r(f);te!==null&&Z(T,te.startTime-X)}}function E(X,te){b=!1,x&&(x=!1,k(N),N=-1),v=!0;var H=g;try{for(A(te),h=r(c);h!==null&&(!(h.expirationTime>te)||X&&!$());){var z=h.callback;if(typeof z=="function"){h.callback=null,g=h.priorityLevel;var B=z(h.expirationTime<=te);te=t.unstable_now(),typeof B=="function"?h.callback=B:h===r(c)&&n(c),A(te)}else n(c);h=r(c)}if(h!==null)var J=!0;else{var ae=r(f);ae!==null&&Z(T,ae.startTime-te),J=!1}return J}finally{h=null,g=H,v=!1}}var P=!1,C=null,N=-1,L=5,V=-1;function $(){return!(t.unstable_now()-V<L)}function I(){if(C!==null){var X=t.unstable_now();V=X;var te=!0;try{te=C(!0,X)}finally{te?q():(P=!1,C=null)}}else P=!1}var q;if(typeof O=="function")q=function(){O(I)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,K=U.port2;U.port1.onmessage=I,q=function(){K.postMessage(null)}}else q=function(){y(I,0)};function G(X){C=X,P||(P=!0,q())}function Z(X,te){N=y(function(){X(t.unstable_now())},te)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(X){X.callback=null},t.unstable_continueExecution=function(){b||v||(b=!0,G(E))},t.unstable_forceFrameRate=function(X){0>X||125<X?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<X?Math.floor(1e3/X):5},t.unstable_getCurrentPriorityLevel=function(){return g},t.unstable_getFirstCallbackNode=function(){return r(c)},t.unstable_next=function(X){switch(g){case 1:case 2:case 3:var te=3;break;default:te=g}var H=g;g=te;try{return X()}finally{g=H}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(X,te){switch(X){case 1:case 2:case 3:case 4:case 5:break;default:X=3}var H=g;g=X;try{return te()}finally{g=H}},t.unstable_scheduleCallback=function(X,te,H){var z=t.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?z+H:z):H=z,X){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=H+B,X={id:p++,callback:te,priorityLevel:X,startTime:H,expirationTime:B,sortIndex:-1},H>z?(X.sortIndex=H,e(f,X),r(c)===null&&X===r(f)&&(x?(k(N),N=-1):x=!0,Z(T,H-z))):(X.sortIndex=B,e(c,X),b||v||(b=!0,G(E))),X},t.unstable_shouldYield=$,t.unstable_wrapCallback=function(X){var te=g;return function(){var H=g;g=te;try{return X.apply(this,arguments)}finally{g=H}}}})(Qm)),Qm}var ck;function pL(){return ck||(ck=1,Jm.exports=hL()),Jm.exports}/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.min.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var fk;function mL(){if(fk)return xr;fk=1;var t=rx(),e=pL();function r(o){for(var l="https://reactjs.org/docs/error-decoder.html?invariant="+o,d=1;d<arguments.length;d++)l+="&args[]="+encodeURIComponent(arguments[d]);return"Minified React error #"+o+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=new Set,i={};function a(o,l){s(o,l),s(o+"Capture",l)}function s(o,l){for(i[o]=l,o=0;o<l.length;o++)n.add(l[o])}var u=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c=Object.prototype.hasOwnProperty,f=/^[: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]*$/,p={},h={};function g(o){return c.call(h,o)?!0:c.call(p,o)?!1:f.test(o)?h[o]=!0:(p[o]=!0,!1)}function v(o,l,d,m){if(d!==null&&d.type===0)return!1;switch(typeof l){case"function":case"symbol":return!0;case"boolean":return m?!1:d!==null?!d.acceptsBooleans:(o=o.toLowerCase().slice(0,5),o!=="data-"&&o!=="aria-");default:return!1}}function b(o,l,d,m){if(l===null||typeof l>"u"||v(o,l,d,m))return!0;if(m)return!1;if(d!==null)switch(d.type){case 3:return!l;case 4:return l===!1;case 5:return isNaN(l);case 6:return isNaN(l)||1>l}return!1}function x(o,l,d,m,w,S,j){this.acceptsBooleans=l===2||l===3||l===4,this.attributeName=m,this.attributeNamespace=w,this.mustUseProperty=d,this.propertyName=o,this.type=l,this.sanitizeURL=S,this.removeEmptyString=j}var y={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(o){y[o]=new x(o,0,!1,o,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(o){var l=o[0];y[l]=new x(l,1,!1,o[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(o){y[o]=new x(o,2,!1,o.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(o){y[o]=new x(o,2,!1,o,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(o){y[o]=new x(o,3,!1,o.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(o){y[o]=new x(o,3,!0,o,null,!1,!1)}),["capture","download"].forEach(function(o){y[o]=new x(o,4,!1,o,null,!1,!1)}),["cols","rows","size","span"].forEach(function(o){y[o]=new x(o,6,!1,o,null,!1,!1)}),["rowSpan","start"].forEach(function(o){y[o]=new x(o,5,!1,o.toLowerCase(),null,!1,!1)});var k=/[\-:]([a-z])/g;function O(o){return o[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(o){var l=o.replace(k,O);y[l]=new x(l,1,!1,o,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(o){var l=o.replace(k,O);y[l]=new x(l,1,!1,o,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(o){var l=o.replace(k,O);y[l]=new x(l,1,!1,o,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(o){y[o]=new x(o,1,!1,o.toLowerCase(),null,!1,!1)}),y.xlinkHref=new x("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(o){y[o]=new x(o,1,!1,o.toLowerCase(),null,!0,!0)});function A(o,l,d,m){var w=y.hasOwnProperty(l)?y[l]:null;(w!==null?w.type!==0:m||!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(b(l,d,w,m)&&(d=null),m||w===null?g(l)&&(d===null?o.removeAttribute(l):o.setAttribute(l,""+d)):w.mustUseProperty?o[w.propertyName]=d===null?w.type===3?!1:"":d:(l=w.attributeName,m=w.attributeNamespace,d===null?o.removeAttribute(l):(w=w.type,d=w===3||w===4&&d===!0?"":""+d,m?o.setAttributeNS(m,l,d):o.setAttribute(l,d))))}var T=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,E=Symbol.for("react.element"),P=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),L=Symbol.for("react.profiler"),V=Symbol.for("react.provider"),$=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),q=Symbol.for("react.suspense"),U=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),Z=Symbol.for("react.offscreen"),X=Symbol.iterator;function te(o){return o===null||typeof o!="object"?null:(o=X&&o[X]||o["@@iterator"],typeof o=="function"?o:null)}var H=Object.assign,z;function B(o){if(z===void 0)try{throw Error()}catch(d){var l=d.stack.trim().match(/\n( *(at )?)/);z=l&&l[1]||""}return`
|
|
34
|
-
`+z+o}var J=!1;function ae(o,l){if(!o||J)return"";J=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(l)if(l=function(){throw Error()},Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(l,[])}catch(ee){var m=ee}Reflect.construct(o,[],l)}else{try{l.call()}catch(ee){m=ee}o.call(l.prototype)}else{try{throw Error()}catch(ee){m=ee}o()}}catch(ee){if(ee&&m&&typeof ee.stack=="string"){for(var w=ee.stack.split(`
|
|
35
|
-
`),S=m.stack.split(`
|
|
36
|
-
`),j=w.length-1,D=S.length-1;1<=j&&0<=D&&w[j]!==S[D];)D--;for(;1<=j&&0<=D;j--,D--)if(w[j]!==S[D]){if(j!==1||D!==1)do if(j--,D--,0>D||w[j]!==S[D]){var F=`
|
|
37
|
-
`+w[j].replace(" at new "," at ");return o.displayName&&F.includes("<anonymous>")&&(F=F.replace("<anonymous>",o.displayName)),F}while(1<=j&&0<=D);break}}}finally{J=!1,Error.prepareStackTrace=d}return(o=o?o.displayName||o.name:"")?B(o):""}function se(o){switch(o.tag){case 5:return B(o.type);case 16:return B("Lazy");case 13:return B("Suspense");case 19:return B("SuspenseList");case 0:case 2:case 15:return o=ae(o.type,!1),o;case 11:return o=ae(o.type.render,!1),o;case 1:return o=ae(o.type,!0),o;default:return""}}function de(o){if(o==null)return null;if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case C:return"Fragment";case P:return"Portal";case L:return"Profiler";case N:return"StrictMode";case q:return"Suspense";case U:return"SuspenseList"}if(typeof o=="object")switch(o.$$typeof){case $:return(o.displayName||"Context")+".Consumer";case V:return(o._context.displayName||"Context")+".Provider";case I:var l=o.render;return o=o.displayName,o||(o=l.displayName||l.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case K:return l=o.displayName||null,l!==null?l:de(o.type)||"Memo";case G:l=o._payload,o=o._init;try{return de(o(l))}catch{}}return null}function Ne(o){var l=o.type;switch(o.tag){case 24:return"Cache";case 9:return(l.displayName||"Context")+".Consumer";case 10:return(l._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return o=l.render,o=o.displayName||o.name||"",l.displayName||(o!==""?"ForwardRef("+o+")":"ForwardRef");case 7:return"Fragment";case 5:return l;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return de(l);case 8:return l===N?"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 l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l}return null}function pe(o){switch(typeof o){case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function ne(o){var l=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function _e(o){var l=ne(o)?"checked":"value",d=Object.getOwnPropertyDescriptor(o.constructor.prototype,l),m=""+o[l];if(!o.hasOwnProperty(l)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var w=d.get,S=d.set;return Object.defineProperty(o,l,{configurable:!0,get:function(){return w.call(this)},set:function(j){m=""+j,S.call(this,j)}}),Object.defineProperty(o,l,{enumerable:d.enumerable}),{getValue:function(){return m},setValue:function(j){m=""+j},stopTracking:function(){o._valueTracker=null,delete o[l]}}}}function Ee(o){o._valueTracker||(o._valueTracker=_e(o))}function ie(o){if(!o)return!1;var l=o._valueTracker;if(!l)return!0;var d=l.getValue(),m="";return o&&(m=ne(o)?o.checked?"true":"false":o.value),o=m,o!==d?(l.setValue(o),!0):!1}function He(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}function $e(o,l){var d=l.checked;return H({},l,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:d??o._wrapperState.initialChecked})}function ht(o,l){var d=l.defaultValue==null?"":l.defaultValue,m=l.checked!=null?l.checked:l.defaultChecked;d=pe(l.value!=null?l.value:d),o._wrapperState={initialChecked:m,initialValue:d,controlled:l.type==="checkbox"||l.type==="radio"?l.checked!=null:l.value!=null}}function lt(o,l){l=l.checked,l!=null&&A(o,"checked",l,!1)}function pt(o,l){lt(o,l);var d=pe(l.value),m=l.type;if(d!=null)m==="number"?(d===0&&o.value===""||o.value!=d)&&(o.value=""+d):o.value!==""+d&&(o.value=""+d);else if(m==="submit"||m==="reset"){o.removeAttribute("value");return}l.hasOwnProperty("value")?Ot(o,l.type,d):l.hasOwnProperty("defaultValue")&&Ot(o,l.type,pe(l.defaultValue)),l.checked==null&&l.defaultChecked!=null&&(o.defaultChecked=!!l.defaultChecked)}function mr(o,l,d){if(l.hasOwnProperty("value")||l.hasOwnProperty("defaultValue")){var m=l.type;if(!(m!=="submit"&&m!=="reset"||l.value!==void 0&&l.value!==null))return;l=""+o._wrapperState.initialValue,d||l===o.value||(o.value=l),o.defaultValue=l}d=o.name,d!==""&&(o.name=""),o.defaultChecked=!!o._wrapperState.initialChecked,d!==""&&(o.name=d)}function Ot(o,l,d){(l!=="number"||He(o.ownerDocument)!==o)&&(d==null?o.defaultValue=""+o._wrapperState.initialValue:o.defaultValue!==""+d&&(o.defaultValue=""+d))}var Br=Array.isArray;function rr(o,l,d,m){if(o=o.options,l){l={};for(var w=0;w<d.length;w++)l["$"+d[w]]=!0;for(d=0;d<o.length;d++)w=l.hasOwnProperty("$"+o[d].value),o[d].selected!==w&&(o[d].selected=w),w&&m&&(o[d].defaultSelected=!0)}else{for(d=""+pe(d),l=null,w=0;w<o.length;w++){if(o[w].value===d){o[w].selected=!0,m&&(o[w].defaultSelected=!0);return}l!==null||o[w].disabled||(l=o[w])}l!==null&&(l.selected=!0)}}function ut(o,l){if(l.dangerouslySetInnerHTML!=null)throw Error(r(91));return H({},l,{value:void 0,defaultValue:void 0,children:""+o._wrapperState.initialValue})}function Ar(o,l){var d=l.value;if(d==null){if(d=l.children,l=l.defaultValue,d!=null){if(l!=null)throw Error(r(92));if(Br(d)){if(1<d.length)throw Error(r(93));d=d[0]}l=d}l==null&&(l=""),d=l}o._wrapperState={initialValue:pe(d)}}function ha(o,l){var d=pe(l.value),m=pe(l.defaultValue);d!=null&&(d=""+d,d!==o.value&&(o.value=d),l.defaultValue==null&&o.defaultValue!==d&&(o.defaultValue=d)),m!=null&&(o.defaultValue=""+m)}function pa(o){var l=o.textContent;l===o._wrapperState.initialValue&&l!==""&&l!==null&&(o.value=l)}function ma(o){switch(o){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 Gs(o,l){return o==null||o==="http://www.w3.org/1999/xhtml"?ma(l):o==="http://www.w3.org/2000/svg"&&l==="foreignObject"?"http://www.w3.org/1999/xhtml":o}var ga,co=(function(o){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(l,d,m,w){MSApp.execUnsafeLocalFunction(function(){return o(l,d,m,w)})}:o})(function(o,l){if(o.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in o)o.innerHTML=l;else{for(ga=ga||document.createElement("div"),ga.innerHTML="<svg>"+l.valueOf().toString()+"</svg>",l=ga.firstChild;o.firstChild;)o.removeChild(o.firstChild);for(;l.firstChild;)o.appendChild(l.firstChild)}});function zr(o,l){if(l){var d=o.firstChild;if(d&&d===o.lastChild&&d.nodeType===3){d.nodeValue=l;return}}o.textContent=l}var Ei={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},Oi=["Webkit","ms","Moz","O"];Object.keys(Ei).forEach(function(o){Oi.forEach(function(l){l=l+o.charAt(0).toUpperCase()+o.substring(1),Ei[l]=Ei[o]})});function cc(o,l,d){return l==null||typeof l=="boolean"||l===""?"":d||typeof l!="number"||l===0||Ei.hasOwnProperty(o)&&Ei[o]?(""+l).trim():l+"px"}function fc(o,l){o=o.style;for(var d in l)if(l.hasOwnProperty(d)){var m=d.indexOf("--")===0,w=cc(d,l[d],m);d==="float"&&(d="cssFloat"),m?o.setProperty(d,w):o[d]=w}}var dc=H({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 fo(o,l){if(l){if(dc[o]&&(l.children!=null||l.dangerouslySetInnerHTML!=null))throw Error(r(137,o));if(l.dangerouslySetInnerHTML!=null){if(l.children!=null)throw Error(r(60));if(typeof l.dangerouslySetInnerHTML!="object"||!("__html"in l.dangerouslySetInnerHTML))throw Error(r(61))}if(l.style!=null&&typeof l.style!="object")throw Error(r(62))}}function Xs(o,l){if(o.indexOf("-")===-1)return typeof l.is=="string";switch(o){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 va=null;function qr(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var Ys=null,Ai=null,Vn=null;function Js(o){if(o=vl(o)){if(typeof Ys!="function")throw Error(r(280));var l=o.stateNode;l&&(l=Nc(l),Ys(o.stateNode,o.type,l))}}function Me(o){Ai?Vn?Vn.push(o):Vn=[o]:Ai=o}function St(){if(Ai){var o=Ai,l=Vn;if(Vn=Ai=null,Js(o),l)for(o=0;o<l.length;o++)Js(l[o])}}function Rt(o,l){return o(l)}function nr(){}var Pi=!1;function At(o,l,d){if(Pi)return o(l,d);Pi=!0;try{return Rt(o,l,d)}finally{Pi=!1,(Ai!==null||Vn!==null)&&(nr(),St())}}function qt(o,l){var d=o.stateNode;if(d===null)return null;var m=Nc(d);if(m===null)return null;d=m[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(o=o.type,m=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!m;break e;default:o=!1}if(o)return null;if(d&&typeof d!="function")throw Error(r(231,l,typeof d));return d}var Ti=!1;if(u)try{var Xt={};Object.defineProperty(Xt,"passive",{get:function(){Ti=!0}}),window.addEventListener("test",Xt,Xt),window.removeEventListener("test",Xt,Xt)}catch{Ti=!1}function Pr(o,l,d,m,w,S,j,D,F){var ee=Array.prototype.slice.call(arguments,3);try{l.apply(d,ee)}catch(le){this.onError(le)}}var ji=!1,Ur=null,Qs=!1,hp=null,m3={onError:function(o){ji=!0,Ur=o}};function g3(o,l,d,m,w,S,j,D,F){ji=!1,Ur=null,Pr.apply(m3,arguments)}function v3(o,l,d,m,w,S,j,D,F){if(g3.apply(this,arguments),ji){if(ji){var ee=Ur;ji=!1,Ur=null}else throw Error(r(198));Qs||(Qs=!0,hp=ee)}}function ya(o){var l=o,d=o;if(o.alternate)for(;l.return;)l=l.return;else{o=l;do l=o,(l.flags&4098)!==0&&(d=l.return),o=l.return;while(o)}return l.tag===3?d:null}function P1(o){if(o.tag===13){var l=o.memoizedState;if(l===null&&(o=o.alternate,o!==null&&(l=o.memoizedState)),l!==null)return l.dehydrated}return null}function T1(o){if(ya(o)!==o)throw Error(r(188))}function y3(o){var l=o.alternate;if(!l){if(l=ya(o),l===null)throw Error(r(188));return l!==o?null:o}for(var d=o,m=l;;){var w=d.return;if(w===null)break;var S=w.alternate;if(S===null){if(m=w.return,m!==null){d=m;continue}break}if(w.child===S.child){for(S=w.child;S;){if(S===d)return T1(w),o;if(S===m)return T1(w),l;S=S.sibling}throw Error(r(188))}if(d.return!==m.return)d=w,m=S;else{for(var j=!1,D=w.child;D;){if(D===d){j=!0,d=w,m=S;break}if(D===m){j=!0,m=w,d=S;break}D=D.sibling}if(!j){for(D=S.child;D;){if(D===d){j=!0,d=S,m=w;break}if(D===m){j=!0,m=S,d=w;break}D=D.sibling}if(!j)throw Error(r(189))}}if(d.alternate!==m)throw Error(r(190))}if(d.tag!==3)throw Error(r(188));return d.stateNode.current===d?o:l}function j1(o){return o=y3(o),o!==null?C1(o):null}function C1(o){if(o.tag===5||o.tag===6)return o;for(o=o.child;o!==null;){var l=C1(o);if(l!==null)return l;o=o.sibling}return null}var R1=e.unstable_scheduleCallback,N1=e.unstable_cancelCallback,b3=e.unstable_shouldYield,w3=e.unstable_requestPaint,kt=e.unstable_now,x3=e.unstable_getCurrentPriorityLevel,pp=e.unstable_ImmediatePriority,$1=e.unstable_UserBlockingPriority,hc=e.unstable_NormalPriority,_3=e.unstable_LowPriority,I1=e.unstable_IdlePriority,pc=null,Pn=null;function S3(o){if(Pn&&typeof Pn.onCommitFiberRoot=="function")try{Pn.onCommitFiberRoot(pc,o,void 0,(o.current.flags&128)===128)}catch{}}var sn=Math.clz32?Math.clz32:O3,k3=Math.log,E3=Math.LN2;function O3(o){return o>>>=0,o===0?32:31-(k3(o)/E3|0)|0}var mc=64,gc=4194304;function Zs(o){switch(o&-o){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 o&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return o&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return o}}function vc(o,l){var d=o.pendingLanes;if(d===0)return 0;var m=0,w=o.suspendedLanes,S=o.pingedLanes,j=d&268435455;if(j!==0){var D=j&~w;D!==0?m=Zs(D):(S&=j,S!==0&&(m=Zs(S)))}else j=d&~w,j!==0?m=Zs(j):S!==0&&(m=Zs(S));if(m===0)return 0;if(l!==0&&l!==m&&(l&w)===0&&(w=m&-m,S=l&-l,w>=S||w===16&&(S&4194240)!==0))return l;if((m&4)!==0&&(m|=d&16),l=o.entangledLanes,l!==0)for(o=o.entanglements,l&=m;0<l;)d=31-sn(l),w=1<<d,m|=o[d],l&=~w;return m}function A3(o,l){switch(o){case 1:case 2:case 4:return l+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 l+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 P3(o,l){for(var d=o.suspendedLanes,m=o.pingedLanes,w=o.expirationTimes,S=o.pendingLanes;0<S;){var j=31-sn(S),D=1<<j,F=w[j];F===-1?((D&d)===0||(D&m)!==0)&&(w[j]=A3(D,l)):F<=l&&(o.expiredLanes|=D),S&=~D}}function mp(o){return o=o.pendingLanes&-1073741825,o!==0?o:o&1073741824?1073741824:0}function M1(){var o=mc;return mc<<=1,(mc&4194240)===0&&(mc=64),o}function gp(o){for(var l=[],d=0;31>d;d++)l.push(o);return l}function el(o,l,d){o.pendingLanes|=l,l!==536870912&&(o.suspendedLanes=0,o.pingedLanes=0),o=o.eventTimes,l=31-sn(l),o[l]=d}function T3(o,l){var d=o.pendingLanes&~l;o.pendingLanes=l,o.suspendedLanes=0,o.pingedLanes=0,o.expiredLanes&=l,o.mutableReadLanes&=l,o.entangledLanes&=l,l=o.entanglements;var m=o.eventTimes;for(o=o.expirationTimes;0<d;){var w=31-sn(d),S=1<<w;l[w]=0,m[w]=-1,o[w]=-1,d&=~S}}function vp(o,l){var d=o.entangledLanes|=l;for(o=o.entanglements;d;){var m=31-sn(d),w=1<<m;w&l|o[m]&l&&(o[m]|=l),d&=~w}}var Je=0;function L1(o){return o&=-o,1<o?4<o?(o&268435455)!==0?16:536870912:4:1}var D1,yp,B1,z1,q1,bp=!1,yc=[],Ci=null,Ri=null,Ni=null,tl=new Map,rl=new Map,$i=[],j3="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 U1(o,l){switch(o){case"focusin":case"focusout":Ci=null;break;case"dragenter":case"dragleave":Ri=null;break;case"mouseover":case"mouseout":Ni=null;break;case"pointerover":case"pointerout":tl.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":rl.delete(l.pointerId)}}function nl(o,l,d,m,w,S){return o===null||o.nativeEvent!==S?(o={blockedOn:l,domEventName:d,eventSystemFlags:m,nativeEvent:S,targetContainers:[w]},l!==null&&(l=vl(l),l!==null&&yp(l)),o):(o.eventSystemFlags|=m,l=o.targetContainers,w!==null&&l.indexOf(w)===-1&&l.push(w),o)}function C3(o,l,d,m,w){switch(l){case"focusin":return Ci=nl(Ci,o,l,d,m,w),!0;case"dragenter":return Ri=nl(Ri,o,l,d,m,w),!0;case"mouseover":return Ni=nl(Ni,o,l,d,m,w),!0;case"pointerover":var S=w.pointerId;return tl.set(S,nl(tl.get(S)||null,o,l,d,m,w)),!0;case"gotpointercapture":return S=w.pointerId,rl.set(S,nl(rl.get(S)||null,o,l,d,m,w)),!0}return!1}function F1(o){var l=ba(o.target);if(l!==null){var d=ya(l);if(d!==null){if(l=d.tag,l===13){if(l=P1(d),l!==null){o.blockedOn=l,q1(o.priority,function(){B1(d)});return}}else if(l===3&&d.stateNode.current.memoizedState.isDehydrated){o.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}o.blockedOn=null}function bc(o){if(o.blockedOn!==null)return!1;for(var l=o.targetContainers;0<l.length;){var d=xp(o.domEventName,o.eventSystemFlags,l[0],o.nativeEvent);if(d===null){d=o.nativeEvent;var m=new d.constructor(d.type,d);va=m,d.target.dispatchEvent(m),va=null}else return l=vl(d),l!==null&&yp(l),o.blockedOn=d,!1;l.shift()}return!0}function H1(o,l,d){bc(o)&&d.delete(l)}function R3(){bp=!1,Ci!==null&&bc(Ci)&&(Ci=null),Ri!==null&&bc(Ri)&&(Ri=null),Ni!==null&&bc(Ni)&&(Ni=null),tl.forEach(H1),rl.forEach(H1)}function il(o,l){o.blockedOn===l&&(o.blockedOn=null,bp||(bp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,R3)))}function al(o){function l(w){return il(w,o)}if(0<yc.length){il(yc[0],o);for(var d=1;d<yc.length;d++){var m=yc[d];m.blockedOn===o&&(m.blockedOn=null)}}for(Ci!==null&&il(Ci,o),Ri!==null&&il(Ri,o),Ni!==null&&il(Ni,o),tl.forEach(l),rl.forEach(l),d=0;d<$i.length;d++)m=$i[d],m.blockedOn===o&&(m.blockedOn=null);for(;0<$i.length&&(d=$i[0],d.blockedOn===null);)F1(d),d.blockedOn===null&&$i.shift()}var ho=T.ReactCurrentBatchConfig,wc=!0;function N3(o,l,d,m){var w=Je,S=ho.transition;ho.transition=null;try{Je=1,wp(o,l,d,m)}finally{Je=w,ho.transition=S}}function $3(o,l,d,m){var w=Je,S=ho.transition;ho.transition=null;try{Je=4,wp(o,l,d,m)}finally{Je=w,ho.transition=S}}function wp(o,l,d,m){if(wc){var w=xp(o,l,d,m);if(w===null)Dp(o,l,m,xc,d),U1(o,m);else if(C3(w,o,l,d,m))m.stopPropagation();else if(U1(o,m),l&4&&-1<j3.indexOf(o)){for(;w!==null;){var S=vl(w);if(S!==null&&D1(S),S=xp(o,l,d,m),S===null&&Dp(o,l,m,xc,d),S===w)break;w=S}w!==null&&m.stopPropagation()}else Dp(o,l,m,null,d)}}var xc=null;function xp(o,l,d,m){if(xc=null,o=qr(m),o=ba(o),o!==null)if(l=ya(o),l===null)o=null;else if(d=l.tag,d===13){if(o=P1(l),o!==null)return o;o=null}else if(d===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;o=null}else l!==o&&(o=null);return xc=o,null}function W1(o){switch(o){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(x3()){case pp:return 1;case $1:return 4;case hc:case _3:return 16;case I1:return 536870912;default:return 16}default:return 16}}var Ii=null,_p=null,_c=null;function K1(){if(_c)return _c;var o,l=_p,d=l.length,m,w="value"in Ii?Ii.value:Ii.textContent,S=w.length;for(o=0;o<d&&l[o]===w[o];o++);var j=d-o;for(m=1;m<=j&&l[d-m]===w[S-m];m++);return _c=w.slice(o,1<m?1-m:void 0)}function Sc(o){var l=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&l===13&&(o=13)):o=l,o===10&&(o=13),32<=o||o===13?o:0}function kc(){return!0}function V1(){return!1}function Tr(o){function l(d,m,w,S,j){this._reactName=d,this._targetInst=w,this.type=m,this.nativeEvent=S,this.target=j,this.currentTarget=null;for(var D in o)o.hasOwnProperty(D)&&(d=o[D],this[D]=d?d(S):S[D]);return this.isDefaultPrevented=(S.defaultPrevented!=null?S.defaultPrevented:S.returnValue===!1)?kc:V1,this.isPropagationStopped=V1,this}return H(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=kc)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=kc)},persist:function(){},isPersistent:kc}),l}var po={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Sp=Tr(po),ol=H({},po,{view:0,detail:0}),I3=Tr(ol),kp,Ep,sl,Ec=H({},ol,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ap,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==sl&&(sl&&o.type==="mousemove"?(kp=o.screenX-sl.screenX,Ep=o.screenY-sl.screenY):Ep=kp=0,sl=o),kp)},movementY:function(o){return"movementY"in o?o.movementY:Ep}}),G1=Tr(Ec),M3=H({},Ec,{dataTransfer:0}),L3=Tr(M3),D3=H({},ol,{relatedTarget:0}),Op=Tr(D3),B3=H({},po,{animationName:0,elapsedTime:0,pseudoElement:0}),z3=Tr(B3),q3=H({},po,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),U3=Tr(q3),F3=H({},po,{data:0}),X1=Tr(F3),H3={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},W3={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"},K3={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function V3(o){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(o):(o=K3[o])?!!l[o]:!1}function Ap(){return V3}var G3=H({},ol,{key:function(o){if(o.key){var l=H3[o.key]||o.key;if(l!=="Unidentified")return l}return o.type==="keypress"?(o=Sc(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?W3[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ap,charCode:function(o){return o.type==="keypress"?Sc(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?Sc(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),X3=Tr(G3),Y3=H({},Ec,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Y1=Tr(Y3),J3=H({},ol,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ap}),Q3=Tr(J3),Z3=H({},po,{propertyName:0,elapsedTime:0,pseudoElement:0}),eM=Tr(Z3),tM=H({},Ec,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),rM=Tr(tM),nM=[9,13,27,32],Pp=u&&"CompositionEvent"in window,ll=null;u&&"documentMode"in document&&(ll=document.documentMode);var iM=u&&"TextEvent"in window&&!ll,J1=u&&(!Pp||ll&&8<ll&&11>=ll),Q1=" ",Z1=!1;function e_(o,l){switch(o){case"keyup":return nM.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function t_(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var mo=!1;function aM(o,l){switch(o){case"compositionend":return t_(l);case"keypress":return l.which!==32?null:(Z1=!0,Q1);case"textInput":return o=l.data,o===Q1&&Z1?null:o;default:return null}}function oM(o,l){if(mo)return o==="compositionend"||!Pp&&e_(o,l)?(o=K1(),_c=_p=Ii=null,mo=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return J1&&l.locale!=="ko"?null:l.data;default:return null}}var sM={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 r_(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l==="input"?!!sM[o.type]:l==="textarea"}function n_(o,l,d,m){Me(m),l=jc(l,"onChange"),0<l.length&&(d=new Sp("onChange","change",null,d,m),o.push({event:d,listeners:l}))}var ul=null,cl=null;function lM(o){x_(o,0)}function Oc(o){var l=wo(o);if(ie(l))return o}function uM(o,l){if(o==="change")return l}var i_=!1;if(u){var Tp;if(u){var jp="oninput"in document;if(!jp){var a_=document.createElement("div");a_.setAttribute("oninput","return;"),jp=typeof a_.oninput=="function"}Tp=jp}else Tp=!1;i_=Tp&&(!document.documentMode||9<document.documentMode)}function o_(){ul&&(ul.detachEvent("onpropertychange",s_),cl=ul=null)}function s_(o){if(o.propertyName==="value"&&Oc(cl)){var l=[];n_(l,cl,o,qr(o)),At(lM,l)}}function cM(o,l,d){o==="focusin"?(o_(),ul=l,cl=d,ul.attachEvent("onpropertychange",s_)):o==="focusout"&&o_()}function fM(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return Oc(cl)}function dM(o,l){if(o==="click")return Oc(l)}function hM(o,l){if(o==="input"||o==="change")return Oc(l)}function pM(o,l){return o===l&&(o!==0||1/o===1/l)||o!==o&&l!==l}var ln=typeof Object.is=="function"?Object.is:pM;function fl(o,l){if(ln(o,l))return!0;if(typeof o!="object"||o===null||typeof l!="object"||l===null)return!1;var d=Object.keys(o),m=Object.keys(l);if(d.length!==m.length)return!1;for(m=0;m<d.length;m++){var w=d[m];if(!c.call(l,w)||!ln(o[w],l[w]))return!1}return!0}function l_(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function u_(o,l){var d=l_(o);o=0;for(var m;d;){if(d.nodeType===3){if(m=o+d.textContent.length,o<=l&&m>=l)return{node:d,offset:l-o};o=m}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=l_(d)}}function c_(o,l){return o&&l?o===l?!0:o&&o.nodeType===3?!1:l&&l.nodeType===3?c_(o,l.parentNode):"contains"in o?o.contains(l):o.compareDocumentPosition?!!(o.compareDocumentPosition(l)&16):!1:!1}function f_(){for(var o=window,l=He();l instanceof o.HTMLIFrameElement;){try{var d=typeof l.contentWindow.location.href=="string"}catch{d=!1}if(d)o=l.contentWindow;else break;l=He(o.document)}return l}function Cp(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l&&(l==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||l==="textarea"||o.contentEditable==="true")}function mM(o){var l=f_(),d=o.focusedElem,m=o.selectionRange;if(l!==d&&d&&d.ownerDocument&&c_(d.ownerDocument.documentElement,d)){if(m!==null&&Cp(d)){if(l=m.start,o=m.end,o===void 0&&(o=l),"selectionStart"in d)d.selectionStart=l,d.selectionEnd=Math.min(o,d.value.length);else if(o=(l=d.ownerDocument||document)&&l.defaultView||window,o.getSelection){o=o.getSelection();var w=d.textContent.length,S=Math.min(m.start,w);m=m.end===void 0?S:Math.min(m.end,w),!o.extend&&S>m&&(w=m,m=S,S=w),w=u_(d,S);var j=u_(d,m);w&&j&&(o.rangeCount!==1||o.anchorNode!==w.node||o.anchorOffset!==w.offset||o.focusNode!==j.node||o.focusOffset!==j.offset)&&(l=l.createRange(),l.setStart(w.node,w.offset),o.removeAllRanges(),S>m?(o.addRange(l),o.extend(j.node,j.offset)):(l.setEnd(j.node,j.offset),o.addRange(l)))}}for(l=[],o=d;o=o.parentNode;)o.nodeType===1&&l.push({element:o,left:o.scrollLeft,top:o.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d<l.length;d++)o=l[d],o.element.scrollLeft=o.left,o.element.scrollTop=o.top}}var gM=u&&"documentMode"in document&&11>=document.documentMode,go=null,Rp=null,dl=null,Np=!1;function d_(o,l,d){var m=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;Np||go==null||go!==He(m)||(m=go,"selectionStart"in m&&Cp(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),dl&&fl(dl,m)||(dl=m,m=jc(Rp,"onSelect"),0<m.length&&(l=new Sp("onSelect","select",null,l,d),o.push({event:l,listeners:m}),l.target=go)))}function Ac(o,l){var d={};return d[o.toLowerCase()]=l.toLowerCase(),d["Webkit"+o]="webkit"+l,d["Moz"+o]="moz"+l,d}var vo={animationend:Ac("Animation","AnimationEnd"),animationiteration:Ac("Animation","AnimationIteration"),animationstart:Ac("Animation","AnimationStart"),transitionend:Ac("Transition","TransitionEnd")},$p={},h_={};u&&(h_=document.createElement("div").style,"AnimationEvent"in window||(delete vo.animationend.animation,delete vo.animationiteration.animation,delete vo.animationstart.animation),"TransitionEvent"in window||delete vo.transitionend.transition);function Pc(o){if($p[o])return $p[o];if(!vo[o])return o;var l=vo[o],d;for(d in l)if(l.hasOwnProperty(d)&&d in h_)return $p[o]=l[d];return o}var p_=Pc("animationend"),m_=Pc("animationiteration"),g_=Pc("animationstart"),v_=Pc("transitionend"),y_=new Map,b_="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 Mi(o,l){y_.set(o,l),a(l,[o])}for(var Ip=0;Ip<b_.length;Ip++){var Mp=b_[Ip],vM=Mp.toLowerCase(),yM=Mp[0].toUpperCase()+Mp.slice(1);Mi(vM,"on"+yM)}Mi(p_,"onAnimationEnd"),Mi(m_,"onAnimationIteration"),Mi(g_,"onAnimationStart"),Mi("dblclick","onDoubleClick"),Mi("focusin","onFocus"),Mi("focusout","onBlur"),Mi(v_,"onTransitionEnd"),s("onMouseEnter",["mouseout","mouseover"]),s("onMouseLeave",["mouseout","mouseover"]),s("onPointerEnter",["pointerout","pointerover"]),s("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var hl="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(" "),bM=new Set("cancel close invalid load scroll toggle".split(" ").concat(hl));function w_(o,l,d){var m=o.type||"unknown-event";o.currentTarget=d,v3(m,l,void 0,o),o.currentTarget=null}function x_(o,l){l=(l&4)!==0;for(var d=0;d<o.length;d++){var m=o[d],w=m.event;m=m.listeners;e:{var S=void 0;if(l)for(var j=m.length-1;0<=j;j--){var D=m[j],F=D.instance,ee=D.currentTarget;if(D=D.listener,F!==S&&w.isPropagationStopped())break e;w_(w,D,ee),S=F}else for(j=0;j<m.length;j++){if(D=m[j],F=D.instance,ee=D.currentTarget,D=D.listener,F!==S&&w.isPropagationStopped())break e;w_(w,D,ee),S=F}}}if(Qs)throw o=hp,Qs=!1,hp=null,o}function ct(o,l){var d=l[Hp];d===void 0&&(d=l[Hp]=new Set);var m=o+"__bubble";d.has(m)||(__(l,o,2,!1),d.add(m))}function Lp(o,l,d){var m=0;l&&(m|=4),__(d,o,m,l)}var Tc="_reactListening"+Math.random().toString(36).slice(2);function pl(o){if(!o[Tc]){o[Tc]=!0,n.forEach(function(d){d!=="selectionchange"&&(bM.has(d)||Lp(d,!1,o),Lp(d,!0,o))});var l=o.nodeType===9?o:o.ownerDocument;l===null||l[Tc]||(l[Tc]=!0,Lp("selectionchange",!1,l))}}function __(o,l,d,m){switch(W1(l)){case 1:var w=N3;break;case 4:w=$3;break;default:w=wp}d=w.bind(null,l,d,o),w=void 0,!Ti||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(w=!0),m?w!==void 0?o.addEventListener(l,d,{capture:!0,passive:w}):o.addEventListener(l,d,!0):w!==void 0?o.addEventListener(l,d,{passive:w}):o.addEventListener(l,d,!1)}function Dp(o,l,d,m,w){var S=m;if((l&1)===0&&(l&2)===0&&m!==null)e:for(;;){if(m===null)return;var j=m.tag;if(j===3||j===4){var D=m.stateNode.containerInfo;if(D===w||D.nodeType===8&&D.parentNode===w)break;if(j===4)for(j=m.return;j!==null;){var F=j.tag;if((F===3||F===4)&&(F=j.stateNode.containerInfo,F===w||F.nodeType===8&&F.parentNode===w))return;j=j.return}for(;D!==null;){if(j=ba(D),j===null)return;if(F=j.tag,F===5||F===6){m=S=j;continue e}D=D.parentNode}}m=m.return}At(function(){var ee=S,le=qr(d),ue=[];e:{var oe=y_.get(o);if(oe!==void 0){var me=Sp,we=o;switch(o){case"keypress":if(Sc(d)===0)break e;case"keydown":case"keyup":me=X3;break;case"focusin":we="focus",me=Op;break;case"focusout":we="blur",me=Op;break;case"beforeblur":case"afterblur":me=Op;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":me=G1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":me=L3;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":me=Q3;break;case p_:case m_:case g_:me=z3;break;case v_:me=eM;break;case"scroll":me=I3;break;case"wheel":me=rM;break;case"copy":case"cut":case"paste":me=U3;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":me=Y1}var Se=(l&4)!==0,Et=!Se&&o==="scroll",Y=Se?oe!==null?oe+"Capture":null:oe;Se=[];for(var W=ee,Q;W!==null;){Q=W;var ce=Q.stateNode;if(Q.tag===5&&ce!==null&&(Q=ce,Y!==null&&(ce=qt(W,Y),ce!=null&&Se.push(ml(W,ce,Q)))),Et)break;W=W.return}0<Se.length&&(oe=new me(oe,we,null,d,le),ue.push({event:oe,listeners:Se}))}}if((l&7)===0){e:{if(oe=o==="mouseover"||o==="pointerover",me=o==="mouseout"||o==="pointerout",oe&&d!==va&&(we=d.relatedTarget||d.fromElement)&&(ba(we)||we[Gn]))break e;if((me||oe)&&(oe=le.window===le?le:(oe=le.ownerDocument)?oe.defaultView||oe.parentWindow:window,me?(we=d.relatedTarget||d.toElement,me=ee,we=we?ba(we):null,we!==null&&(Et=ya(we),we!==Et||we.tag!==5&&we.tag!==6)&&(we=null)):(me=null,we=ee),me!==we)){if(Se=G1,ce="onMouseLeave",Y="onMouseEnter",W="mouse",(o==="pointerout"||o==="pointerover")&&(Se=Y1,ce="onPointerLeave",Y="onPointerEnter",W="pointer"),Et=me==null?oe:wo(me),Q=we==null?oe:wo(we),oe=new Se(ce,W+"leave",me,d,le),oe.target=Et,oe.relatedTarget=Q,ce=null,ba(le)===ee&&(Se=new Se(Y,W+"enter",we,d,le),Se.target=Q,Se.relatedTarget=Et,ce=Se),Et=ce,me&&we)t:{for(Se=me,Y=we,W=0,Q=Se;Q;Q=yo(Q))W++;for(Q=0,ce=Y;ce;ce=yo(ce))Q++;for(;0<W-Q;)Se=yo(Se),W--;for(;0<Q-W;)Y=yo(Y),Q--;for(;W--;){if(Se===Y||Y!==null&&Se===Y.alternate)break t;Se=yo(Se),Y=yo(Y)}Se=null}else Se=null;me!==null&&S_(ue,oe,me,Se,!1),we!==null&&Et!==null&&S_(ue,Et,we,Se,!0)}}e:{if(oe=ee?wo(ee):window,me=oe.nodeName&&oe.nodeName.toLowerCase(),me==="select"||me==="input"&&oe.type==="file")var ke=uM;else if(r_(oe))if(i_)ke=hM;else{ke=fM;var Ae=cM}else(me=oe.nodeName)&&me.toLowerCase()==="input"&&(oe.type==="checkbox"||oe.type==="radio")&&(ke=dM);if(ke&&(ke=ke(o,ee))){n_(ue,ke,d,le);break e}Ae&&Ae(o,oe,ee),o==="focusout"&&(Ae=oe._wrapperState)&&Ae.controlled&&oe.type==="number"&&Ot(oe,"number",oe.value)}switch(Ae=ee?wo(ee):window,o){case"focusin":(r_(Ae)||Ae.contentEditable==="true")&&(go=Ae,Rp=ee,dl=null);break;case"focusout":dl=Rp=go=null;break;case"mousedown":Np=!0;break;case"contextmenu":case"mouseup":case"dragend":Np=!1,d_(ue,d,le);break;case"selectionchange":if(gM)break;case"keydown":case"keyup":d_(ue,d,le)}var Pe;if(Pp)e:{switch(o){case"compositionstart":var Ce="onCompositionStart";break e;case"compositionend":Ce="onCompositionEnd";break e;case"compositionupdate":Ce="onCompositionUpdate";break e}Ce=void 0}else mo?e_(o,d)&&(Ce="onCompositionEnd"):o==="keydown"&&d.keyCode===229&&(Ce="onCompositionStart");Ce&&(J1&&d.locale!=="ko"&&(mo||Ce!=="onCompositionStart"?Ce==="onCompositionEnd"&&mo&&(Pe=K1()):(Ii=le,_p="value"in Ii?Ii.value:Ii.textContent,mo=!0)),Ae=jc(ee,Ce),0<Ae.length&&(Ce=new X1(Ce,o,null,d,le),ue.push({event:Ce,listeners:Ae}),Pe?Ce.data=Pe:(Pe=t_(d),Pe!==null&&(Ce.data=Pe)))),(Pe=iM?aM(o,d):oM(o,d))&&(ee=jc(ee,"onBeforeInput"),0<ee.length&&(le=new X1("onBeforeInput","beforeinput",null,d,le),ue.push({event:le,listeners:ee}),le.data=Pe))}x_(ue,l)})}function ml(o,l,d){return{instance:o,listener:l,currentTarget:d}}function jc(o,l){for(var d=l+"Capture",m=[];o!==null;){var w=o,S=w.stateNode;w.tag===5&&S!==null&&(w=S,S=qt(o,d),S!=null&&m.unshift(ml(o,S,w)),S=qt(o,l),S!=null&&m.push(ml(o,S,w))),o=o.return}return m}function yo(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5);return o||null}function S_(o,l,d,m,w){for(var S=l._reactName,j=[];d!==null&&d!==m;){var D=d,F=D.alternate,ee=D.stateNode;if(F!==null&&F===m)break;D.tag===5&&ee!==null&&(D=ee,w?(F=qt(d,S),F!=null&&j.unshift(ml(d,F,D))):w||(F=qt(d,S),F!=null&&j.push(ml(d,F,D)))),d=d.return}j.length!==0&&o.push({event:l,listeners:j})}var wM=/\r\n?/g,xM=/\u0000|\uFFFD/g;function k_(o){return(typeof o=="string"?o:""+o).replace(wM,`
|
|
38
|
-
`).replace(xM,"")}function Cc(o,l,d){if(l=k_(l),k_(o)!==l&&d)throw Error(r(425))}function Rc(){}var Bp=null,zp=null;function qp(o,l){return o==="textarea"||o==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var Up=typeof setTimeout=="function"?setTimeout:void 0,_M=typeof clearTimeout=="function"?clearTimeout:void 0,E_=typeof Promise=="function"?Promise:void 0,SM=typeof queueMicrotask=="function"?queueMicrotask:typeof E_<"u"?function(o){return E_.resolve(null).then(o).catch(kM)}:Up;function kM(o){setTimeout(function(){throw o})}function Fp(o,l){var d=l,m=0;do{var w=d.nextSibling;if(o.removeChild(d),w&&w.nodeType===8)if(d=w.data,d==="/$"){if(m===0){o.removeChild(w),al(l);return}m--}else d!=="$"&&d!=="$?"&&d!=="$!"||m++;d=w}while(d);al(l)}function Li(o){for(;o!=null;o=o.nextSibling){var l=o.nodeType;if(l===1||l===3)break;if(l===8){if(l=o.data,l==="$"||l==="$!"||l==="$?")break;if(l==="/$")return null}}return o}function O_(o){o=o.previousSibling;for(var l=0;o;){if(o.nodeType===8){var d=o.data;if(d==="$"||d==="$!"||d==="$?"){if(l===0)return o;l--}else d==="/$"&&l++}o=o.previousSibling}return null}var bo=Math.random().toString(36).slice(2),Tn="__reactFiber$"+bo,gl="__reactProps$"+bo,Gn="__reactContainer$"+bo,Hp="__reactEvents$"+bo,EM="__reactListeners$"+bo,OM="__reactHandles$"+bo;function ba(o){var l=o[Tn];if(l)return l;for(var d=o.parentNode;d;){if(l=d[Gn]||d[Tn]){if(d=l.alternate,l.child!==null||d!==null&&d.child!==null)for(o=O_(o);o!==null;){if(d=o[Tn])return d;o=O_(o)}return l}o=d,d=o.parentNode}return null}function vl(o){return o=o[Tn]||o[Gn],!o||o.tag!==5&&o.tag!==6&&o.tag!==13&&o.tag!==3?null:o}function wo(o){if(o.tag===5||o.tag===6)return o.stateNode;throw Error(r(33))}function Nc(o){return o[gl]||null}var Wp=[],xo=-1;function Di(o){return{current:o}}function ft(o){0>xo||(o.current=Wp[xo],Wp[xo]=null,xo--)}function nt(o,l){xo++,Wp[xo]=o.current,o.current=l}var Bi={},ir=Di(Bi),gr=Di(!1),wa=Bi;function _o(o,l){var d=o.type.contextTypes;if(!d)return Bi;var m=o.stateNode;if(m&&m.__reactInternalMemoizedUnmaskedChildContext===l)return m.__reactInternalMemoizedMaskedChildContext;var w={},S;for(S in d)w[S]=l[S];return m&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=l,o.__reactInternalMemoizedMaskedChildContext=w),w}function vr(o){return o=o.childContextTypes,o!=null}function $c(){ft(gr),ft(ir)}function A_(o,l,d){if(ir.current!==Bi)throw Error(r(168));nt(ir,l),nt(gr,d)}function P_(o,l,d){var m=o.stateNode;if(l=l.childContextTypes,typeof m.getChildContext!="function")return d;m=m.getChildContext();for(var w in m)if(!(w in l))throw Error(r(108,Ne(o)||"Unknown",w));return H({},d,m)}function Ic(o){return o=(o=o.stateNode)&&o.__reactInternalMemoizedMergedChildContext||Bi,wa=ir.current,nt(ir,o),nt(gr,gr.current),!0}function T_(o,l,d){var m=o.stateNode;if(!m)throw Error(r(169));d?(o=P_(o,l,wa),m.__reactInternalMemoizedMergedChildContext=o,ft(gr),ft(ir),nt(ir,o)):ft(gr),nt(gr,d)}var Xn=null,Mc=!1,Kp=!1;function j_(o){Xn===null?Xn=[o]:Xn.push(o)}function AM(o){Mc=!0,j_(o)}function zi(){if(!Kp&&Xn!==null){Kp=!0;var o=0,l=Je;try{var d=Xn;for(Je=1;o<d.length;o++){var m=d[o];do m=m(!0);while(m!==null)}Xn=null,Mc=!1}catch(w){throw Xn!==null&&(Xn=Xn.slice(o+1)),R1(pp,zi),w}finally{Je=l,Kp=!1}}return null}var So=[],ko=0,Lc=null,Dc=0,Fr=[],Hr=0,xa=null,Yn=1,Jn="";function _a(o,l){So[ko++]=Dc,So[ko++]=Lc,Lc=o,Dc=l}function C_(o,l,d){Fr[Hr++]=Yn,Fr[Hr++]=Jn,Fr[Hr++]=xa,xa=o;var m=Yn;o=Jn;var w=32-sn(m)-1;m&=~(1<<w),d+=1;var S=32-sn(l)+w;if(30<S){var j=w-w%5;S=(m&(1<<j)-1).toString(32),m>>=j,w-=j,Yn=1<<32-sn(l)+w|d<<w|m,Jn=S+o}else Yn=1<<S|d<<w|m,Jn=o}function Vp(o){o.return!==null&&(_a(o,1),C_(o,1,0))}function Gp(o){for(;o===Lc;)Lc=So[--ko],So[ko]=null,Dc=So[--ko],So[ko]=null;for(;o===xa;)xa=Fr[--Hr],Fr[Hr]=null,Jn=Fr[--Hr],Fr[Hr]=null,Yn=Fr[--Hr],Fr[Hr]=null}var jr=null,Cr=null,mt=!1,un=null;function R_(o,l){var d=Gr(5,null,null,0);d.elementType="DELETED",d.stateNode=l,d.return=o,l=o.deletions,l===null?(o.deletions=[d],o.flags|=16):l.push(d)}function N_(o,l){switch(o.tag){case 5:var d=o.type;return l=l.nodeType!==1||d.toLowerCase()!==l.nodeName.toLowerCase()?null:l,l!==null?(o.stateNode=l,jr=o,Cr=Li(l.firstChild),!0):!1;case 6:return l=o.pendingProps===""||l.nodeType!==3?null:l,l!==null?(o.stateNode=l,jr=o,Cr=null,!0):!1;case 13:return l=l.nodeType!==8?null:l,l!==null?(d=xa!==null?{id:Yn,overflow:Jn}:null,o.memoizedState={dehydrated:l,treeContext:d,retryLane:1073741824},d=Gr(18,null,null,0),d.stateNode=l,d.return=o,o.child=d,jr=o,Cr=null,!0):!1;default:return!1}}function Xp(o){return(o.mode&1)!==0&&(o.flags&128)===0}function Yp(o){if(mt){var l=Cr;if(l){var d=l;if(!N_(o,l)){if(Xp(o))throw Error(r(418));l=Li(d.nextSibling);var m=jr;l&&N_(o,l)?R_(m,d):(o.flags=o.flags&-4097|2,mt=!1,jr=o)}}else{if(Xp(o))throw Error(r(418));o.flags=o.flags&-4097|2,mt=!1,jr=o}}}function $_(o){for(o=o.return;o!==null&&o.tag!==5&&o.tag!==3&&o.tag!==13;)o=o.return;jr=o}function Bc(o){if(o!==jr)return!1;if(!mt)return $_(o),mt=!0,!1;var l;if((l=o.tag!==3)&&!(l=o.tag!==5)&&(l=o.type,l=l!=="head"&&l!=="body"&&!qp(o.type,o.memoizedProps)),l&&(l=Cr)){if(Xp(o))throw I_(),Error(r(418));for(;l;)R_(o,l),l=Li(l.nextSibling)}if($_(o),o.tag===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));e:{for(o=o.nextSibling,l=0;o;){if(o.nodeType===8){var d=o.data;if(d==="/$"){if(l===0){Cr=Li(o.nextSibling);break e}l--}else d!=="$"&&d!=="$!"&&d!=="$?"||l++}o=o.nextSibling}Cr=null}}else Cr=jr?Li(o.stateNode.nextSibling):null;return!0}function I_(){for(var o=Cr;o;)o=Li(o.nextSibling)}function Eo(){Cr=jr=null,mt=!1}function Jp(o){un===null?un=[o]:un.push(o)}var PM=T.ReactCurrentBatchConfig;function yl(o,l,d){if(o=d.ref,o!==null&&typeof o!="function"&&typeof o!="object"){if(d._owner){if(d=d._owner,d){if(d.tag!==1)throw Error(r(309));var m=d.stateNode}if(!m)throw Error(r(147,o));var w=m,S=""+o;return l!==null&&l.ref!==null&&typeof l.ref=="function"&&l.ref._stringRef===S?l.ref:(l=function(j){var D=w.refs;j===null?delete D[S]:D[S]=j},l._stringRef=S,l)}if(typeof o!="string")throw Error(r(284));if(!d._owner)throw Error(r(290,o))}return o}function zc(o,l){throw o=Object.prototype.toString.call(l),Error(r(31,o==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":o))}function M_(o){var l=o._init;return l(o._payload)}function L_(o){function l(Y,W){if(o){var Q=Y.deletions;Q===null?(Y.deletions=[W],Y.flags|=16):Q.push(W)}}function d(Y,W){if(!o)return null;for(;W!==null;)l(Y,W),W=W.sibling;return null}function m(Y,W){for(Y=new Map;W!==null;)W.key!==null?Y.set(W.key,W):Y.set(W.index,W),W=W.sibling;return Y}function w(Y,W){return Y=Gi(Y,W),Y.index=0,Y.sibling=null,Y}function S(Y,W,Q){return Y.index=Q,o?(Q=Y.alternate,Q!==null?(Q=Q.index,Q<W?(Y.flags|=2,W):Q):(Y.flags|=2,W)):(Y.flags|=1048576,W)}function j(Y){return o&&Y.alternate===null&&(Y.flags|=2),Y}function D(Y,W,Q,ce){return W===null||W.tag!==6?(W=Um(Q,Y.mode,ce),W.return=Y,W):(W=w(W,Q),W.return=Y,W)}function F(Y,W,Q,ce){var ke=Q.type;return ke===C?le(Y,W,Q.props.children,ce,Q.key):W!==null&&(W.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===G&&M_(ke)===W.type)?(ce=w(W,Q.props),ce.ref=yl(Y,W,Q),ce.return=Y,ce):(ce=ff(Q.type,Q.key,Q.props,null,Y.mode,ce),ce.ref=yl(Y,W,Q),ce.return=Y,ce)}function ee(Y,W,Q,ce){return W===null||W.tag!==4||W.stateNode.containerInfo!==Q.containerInfo||W.stateNode.implementation!==Q.implementation?(W=Fm(Q,Y.mode,ce),W.return=Y,W):(W=w(W,Q.children||[]),W.return=Y,W)}function le(Y,W,Q,ce,ke){return W===null||W.tag!==7?(W=ja(Q,Y.mode,ce,ke),W.return=Y,W):(W=w(W,Q),W.return=Y,W)}function ue(Y,W,Q){if(typeof W=="string"&&W!==""||typeof W=="number")return W=Um(""+W,Y.mode,Q),W.return=Y,W;if(typeof W=="object"&&W!==null){switch(W.$$typeof){case E:return Q=ff(W.type,W.key,W.props,null,Y.mode,Q),Q.ref=yl(Y,null,W),Q.return=Y,Q;case P:return W=Fm(W,Y.mode,Q),W.return=Y,W;case G:var ce=W._init;return ue(Y,ce(W._payload),Q)}if(Br(W)||te(W))return W=ja(W,Y.mode,Q,null),W.return=Y,W;zc(Y,W)}return null}function oe(Y,W,Q,ce){var ke=W!==null?W.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number")return ke!==null?null:D(Y,W,""+Q,ce);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case E:return Q.key===ke?F(Y,W,Q,ce):null;case P:return Q.key===ke?ee(Y,W,Q,ce):null;case G:return ke=Q._init,oe(Y,W,ke(Q._payload),ce)}if(Br(Q)||te(Q))return ke!==null?null:le(Y,W,Q,ce,null);zc(Y,Q)}return null}function me(Y,W,Q,ce,ke){if(typeof ce=="string"&&ce!==""||typeof ce=="number")return Y=Y.get(Q)||null,D(W,Y,""+ce,ke);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case E:return Y=Y.get(ce.key===null?Q:ce.key)||null,F(W,Y,ce,ke);case P:return Y=Y.get(ce.key===null?Q:ce.key)||null,ee(W,Y,ce,ke);case G:var Ae=ce._init;return me(Y,W,Q,Ae(ce._payload),ke)}if(Br(ce)||te(ce))return Y=Y.get(Q)||null,le(W,Y,ce,ke,null);zc(W,ce)}return null}function we(Y,W,Q,ce){for(var ke=null,Ae=null,Pe=W,Ce=W=0,Ht=null;Pe!==null&&Ce<Q.length;Ce++){Pe.index>Ce?(Ht=Pe,Pe=null):Ht=Pe.sibling;var Ke=oe(Y,Pe,Q[Ce],ce);if(Ke===null){Pe===null&&(Pe=Ht);break}o&&Pe&&Ke.alternate===null&&l(Y,Pe),W=S(Ke,W,Ce),Ae===null?ke=Ke:Ae.sibling=Ke,Ae=Ke,Pe=Ht}if(Ce===Q.length)return d(Y,Pe),mt&&_a(Y,Ce),ke;if(Pe===null){for(;Ce<Q.length;Ce++)Pe=ue(Y,Q[Ce],ce),Pe!==null&&(W=S(Pe,W,Ce),Ae===null?ke=Pe:Ae.sibling=Pe,Ae=Pe);return mt&&_a(Y,Ce),ke}for(Pe=m(Y,Pe);Ce<Q.length;Ce++)Ht=me(Pe,Y,Ce,Q[Ce],ce),Ht!==null&&(o&&Ht.alternate!==null&&Pe.delete(Ht.key===null?Ce:Ht.key),W=S(Ht,W,Ce),Ae===null?ke=Ht:Ae.sibling=Ht,Ae=Ht);return o&&Pe.forEach(function(Xi){return l(Y,Xi)}),mt&&_a(Y,Ce),ke}function Se(Y,W,Q,ce){var ke=te(Q);if(typeof ke!="function")throw Error(r(150));if(Q=ke.call(Q),Q==null)throw Error(r(151));for(var Ae=ke=null,Pe=W,Ce=W=0,Ht=null,Ke=Q.next();Pe!==null&&!Ke.done;Ce++,Ke=Q.next()){Pe.index>Ce?(Ht=Pe,Pe=null):Ht=Pe.sibling;var Xi=oe(Y,Pe,Ke.value,ce);if(Xi===null){Pe===null&&(Pe=Ht);break}o&&Pe&&Xi.alternate===null&&l(Y,Pe),W=S(Xi,W,Ce),Ae===null?ke=Xi:Ae.sibling=Xi,Ae=Xi,Pe=Ht}if(Ke.done)return d(Y,Pe),mt&&_a(Y,Ce),ke;if(Pe===null){for(;!Ke.done;Ce++,Ke=Q.next())Ke=ue(Y,Ke.value,ce),Ke!==null&&(W=S(Ke,W,Ce),Ae===null?ke=Ke:Ae.sibling=Ke,Ae=Ke);return mt&&_a(Y,Ce),ke}for(Pe=m(Y,Pe);!Ke.done;Ce++,Ke=Q.next())Ke=me(Pe,Y,Ce,Ke.value,ce),Ke!==null&&(o&&Ke.alternate!==null&&Pe.delete(Ke.key===null?Ce:Ke.key),W=S(Ke,W,Ce),Ae===null?ke=Ke:Ae.sibling=Ke,Ae=Ke);return o&&Pe.forEach(function(sL){return l(Y,sL)}),mt&&_a(Y,Ce),ke}function Et(Y,W,Q,ce){if(typeof Q=="object"&&Q!==null&&Q.type===C&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case E:e:{for(var ke=Q.key,Ae=W;Ae!==null;){if(Ae.key===ke){if(ke=Q.type,ke===C){if(Ae.tag===7){d(Y,Ae.sibling),W=w(Ae,Q.props.children),W.return=Y,Y=W;break e}}else if(Ae.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===G&&M_(ke)===Ae.type){d(Y,Ae.sibling),W=w(Ae,Q.props),W.ref=yl(Y,Ae,Q),W.return=Y,Y=W;break e}d(Y,Ae);break}else l(Y,Ae);Ae=Ae.sibling}Q.type===C?(W=ja(Q.props.children,Y.mode,ce,Q.key),W.return=Y,Y=W):(ce=ff(Q.type,Q.key,Q.props,null,Y.mode,ce),ce.ref=yl(Y,W,Q),ce.return=Y,Y=ce)}return j(Y);case P:e:{for(Ae=Q.key;W!==null;){if(W.key===Ae)if(W.tag===4&&W.stateNode.containerInfo===Q.containerInfo&&W.stateNode.implementation===Q.implementation){d(Y,W.sibling),W=w(W,Q.children||[]),W.return=Y,Y=W;break e}else{d(Y,W);break}else l(Y,W);W=W.sibling}W=Fm(Q,Y.mode,ce),W.return=Y,Y=W}return j(Y);case G:return Ae=Q._init,Et(Y,W,Ae(Q._payload),ce)}if(Br(Q))return we(Y,W,Q,ce);if(te(Q))return Se(Y,W,Q,ce);zc(Y,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"?(Q=""+Q,W!==null&&W.tag===6?(d(Y,W.sibling),W=w(W,Q),W.return=Y,Y=W):(d(Y,W),W=Um(Q,Y.mode,ce),W.return=Y,Y=W),j(Y)):d(Y,W)}return Et}var Oo=L_(!0),D_=L_(!1),qc=Di(null),Uc=null,Ao=null,Qp=null;function Zp(){Qp=Ao=Uc=null}function em(o){var l=qc.current;ft(qc),o._currentValue=l}function tm(o,l,d){for(;o!==null;){var m=o.alternate;if((o.childLanes&l)!==l?(o.childLanes|=l,m!==null&&(m.childLanes|=l)):m!==null&&(m.childLanes&l)!==l&&(m.childLanes|=l),o===d)break;o=o.return}}function Po(o,l){Uc=o,Qp=Ao=null,o=o.dependencies,o!==null&&o.firstContext!==null&&((o.lanes&l)!==0&&(yr=!0),o.firstContext=null)}function Wr(o){var l=o._currentValue;if(Qp!==o)if(o={context:o,memoizedValue:l,next:null},Ao===null){if(Uc===null)throw Error(r(308));Ao=o,Uc.dependencies={lanes:0,firstContext:o}}else Ao=Ao.next=o;return l}var Sa=null;function rm(o){Sa===null?Sa=[o]:Sa.push(o)}function B_(o,l,d,m){var w=l.interleaved;return w===null?(d.next=d,rm(l)):(d.next=w.next,w.next=d),l.interleaved=d,Qn(o,m)}function Qn(o,l){o.lanes|=l;var d=o.alternate;for(d!==null&&(d.lanes|=l),d=o,o=o.return;o!==null;)o.childLanes|=l,d=o.alternate,d!==null&&(d.childLanes|=l),d=o,o=o.return;return d.tag===3?d.stateNode:null}var qi=!1;function nm(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function z_(o,l){o=o.updateQueue,l.updateQueue===o&&(l.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,effects:o.effects})}function Zn(o,l){return{eventTime:o,lane:l,tag:0,payload:null,callback:null,next:null}}function Ui(o,l,d){var m=o.updateQueue;if(m===null)return null;if(m=m.shared,(We&2)!==0){var w=m.pending;return w===null?l.next=l:(l.next=w.next,w.next=l),m.pending=l,Qn(o,d)}return w=m.interleaved,w===null?(l.next=l,rm(m)):(l.next=w.next,w.next=l),m.interleaved=l,Qn(o,d)}function Fc(o,l,d){if(l=l.updateQueue,l!==null&&(l=l.shared,(d&4194240)!==0)){var m=l.lanes;m&=o.pendingLanes,d|=m,l.lanes=d,vp(o,d)}}function q_(o,l){var d=o.updateQueue,m=o.alternate;if(m!==null&&(m=m.updateQueue,d===m)){var w=null,S=null;if(d=d.firstBaseUpdate,d!==null){do{var j={eventTime:d.eventTime,lane:d.lane,tag:d.tag,payload:d.payload,callback:d.callback,next:null};S===null?w=S=j:S=S.next=j,d=d.next}while(d!==null);S===null?w=S=l:S=S.next=l}else w=S=l;d={baseState:m.baseState,firstBaseUpdate:w,lastBaseUpdate:S,shared:m.shared,effects:m.effects},o.updateQueue=d;return}o=d.lastBaseUpdate,o===null?d.firstBaseUpdate=l:o.next=l,d.lastBaseUpdate=l}function Hc(o,l,d,m){var w=o.updateQueue;qi=!1;var S=w.firstBaseUpdate,j=w.lastBaseUpdate,D=w.shared.pending;if(D!==null){w.shared.pending=null;var F=D,ee=F.next;F.next=null,j===null?S=ee:j.next=ee,j=F;var le=o.alternate;le!==null&&(le=le.updateQueue,D=le.lastBaseUpdate,D!==j&&(D===null?le.firstBaseUpdate=ee:D.next=ee,le.lastBaseUpdate=F))}if(S!==null){var ue=w.baseState;j=0,le=ee=F=null,D=S;do{var oe=D.lane,me=D.eventTime;if((m&oe)===oe){le!==null&&(le=le.next={eventTime:me,lane:0,tag:D.tag,payload:D.payload,callback:D.callback,next:null});e:{var we=o,Se=D;switch(oe=l,me=d,Se.tag){case 1:if(we=Se.payload,typeof we=="function"){ue=we.call(me,ue,oe);break e}ue=we;break e;case 3:we.flags=we.flags&-65537|128;case 0:if(we=Se.payload,oe=typeof we=="function"?we.call(me,ue,oe):we,oe==null)break e;ue=H({},ue,oe);break e;case 2:qi=!0}}D.callback!==null&&D.lane!==0&&(o.flags|=64,oe=w.effects,oe===null?w.effects=[D]:oe.push(D))}else me={eventTime:me,lane:oe,tag:D.tag,payload:D.payload,callback:D.callback,next:null},le===null?(ee=le=me,F=ue):le=le.next=me,j|=oe;if(D=D.next,D===null){if(D=w.shared.pending,D===null)break;oe=D,D=oe.next,oe.next=null,w.lastBaseUpdate=oe,w.shared.pending=null}}while(!0);if(le===null&&(F=ue),w.baseState=F,w.firstBaseUpdate=ee,w.lastBaseUpdate=le,l=w.shared.interleaved,l!==null){w=l;do j|=w.lane,w=w.next;while(w!==l)}else S===null&&(w.shared.lanes=0);Oa|=j,o.lanes=j,o.memoizedState=ue}}function U_(o,l,d){if(o=l.effects,l.effects=null,o!==null)for(l=0;l<o.length;l++){var m=o[l],w=m.callback;if(w!==null){if(m.callback=null,m=d,typeof w!="function")throw Error(r(191,w));w.call(m)}}}var bl={},jn=Di(bl),wl=Di(bl),xl=Di(bl);function ka(o){if(o===bl)throw Error(r(174));return o}function im(o,l){switch(nt(xl,l),nt(wl,o),nt(jn,bl),o=l.nodeType,o){case 9:case 11:l=(l=l.documentElement)?l.namespaceURI:Gs(null,"");break;default:o=o===8?l.parentNode:l,l=o.namespaceURI||null,o=o.tagName,l=Gs(l,o)}ft(jn),nt(jn,l)}function To(){ft(jn),ft(wl),ft(xl)}function F_(o){ka(xl.current);var l=ka(jn.current),d=Gs(l,o.type);l!==d&&(nt(wl,o),nt(jn,d))}function am(o){wl.current===o&&(ft(jn),ft(wl))}var yt=Di(0);function Wc(o){for(var l=o;l!==null;){if(l.tag===13){var d=l.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||d.data==="$?"||d.data==="$!"))return l}else if(l.tag===19&&l.memoizedProps.revealOrder!==void 0){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var om=[];function sm(){for(var o=0;o<om.length;o++)om[o]._workInProgressVersionPrimary=null;om.length=0}var Kc=T.ReactCurrentDispatcher,lm=T.ReactCurrentBatchConfig,Ea=0,bt=null,Nt=null,Ut=null,Vc=!1,_l=!1,Sl=0,TM=0;function ar(){throw Error(r(321))}function um(o,l){if(l===null)return!1;for(var d=0;d<l.length&&d<o.length;d++)if(!ln(o[d],l[d]))return!1;return!0}function cm(o,l,d,m,w,S){if(Ea=S,bt=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,Kc.current=o===null||o.memoizedState===null?NM:$M,o=d(m,w),_l){S=0;do{if(_l=!1,Sl=0,25<=S)throw Error(r(301));S+=1,Ut=Nt=null,l.updateQueue=null,Kc.current=IM,o=d(m,w)}while(_l)}if(Kc.current=Yc,l=Nt!==null&&Nt.next!==null,Ea=0,Ut=Nt=bt=null,Vc=!1,l)throw Error(r(300));return o}function fm(){var o=Sl!==0;return Sl=0,o}function Cn(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ut===null?bt.memoizedState=Ut=o:Ut=Ut.next=o,Ut}function Kr(){if(Nt===null){var o=bt.alternate;o=o!==null?o.memoizedState:null}else o=Nt.next;var l=Ut===null?bt.memoizedState:Ut.next;if(l!==null)Ut=l,Nt=o;else{if(o===null)throw Error(r(310));Nt=o,o={memoizedState:Nt.memoizedState,baseState:Nt.baseState,baseQueue:Nt.baseQueue,queue:Nt.queue,next:null},Ut===null?bt.memoizedState=Ut=o:Ut=Ut.next=o}return Ut}function kl(o,l){return typeof l=="function"?l(o):l}function dm(o){var l=Kr(),d=l.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=o;var m=Nt,w=m.baseQueue,S=d.pending;if(S!==null){if(w!==null){var j=w.next;w.next=S.next,S.next=j}m.baseQueue=w=S,d.pending=null}if(w!==null){S=w.next,m=m.baseState;var D=j=null,F=null,ee=S;do{var le=ee.lane;if((Ea&le)===le)F!==null&&(F=F.next={lane:0,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null}),m=ee.hasEagerState?ee.eagerState:o(m,ee.action);else{var ue={lane:le,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null};F===null?(D=F=ue,j=m):F=F.next=ue,bt.lanes|=le,Oa|=le}ee=ee.next}while(ee!==null&&ee!==S);F===null?j=m:F.next=D,ln(m,l.memoizedState)||(yr=!0),l.memoizedState=m,l.baseState=j,l.baseQueue=F,d.lastRenderedState=m}if(o=d.interleaved,o!==null){w=o;do S=w.lane,bt.lanes|=S,Oa|=S,w=w.next;while(w!==o)}else w===null&&(d.lanes=0);return[l.memoizedState,d.dispatch]}function hm(o){var l=Kr(),d=l.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=o;var m=d.dispatch,w=d.pending,S=l.memoizedState;if(w!==null){d.pending=null;var j=w=w.next;do S=o(S,j.action),j=j.next;while(j!==w);ln(S,l.memoizedState)||(yr=!0),l.memoizedState=S,l.baseQueue===null&&(l.baseState=S),d.lastRenderedState=S}return[S,m]}function H_(){}function W_(o,l){var d=bt,m=Kr(),w=l(),S=!ln(m.memoizedState,w);if(S&&(m.memoizedState=w,yr=!0),m=m.queue,pm(G_.bind(null,d,m,o),[o]),m.getSnapshot!==l||S||Ut!==null&&Ut.memoizedState.tag&1){if(d.flags|=2048,El(9,V_.bind(null,d,m,w,l),void 0,null),Ft===null)throw Error(r(349));(Ea&30)!==0||K_(d,l,w)}return w}function K_(o,l,d){o.flags|=16384,o={getSnapshot:l,value:d},l=bt.updateQueue,l===null?(l={lastEffect:null,stores:null},bt.updateQueue=l,l.stores=[o]):(d=l.stores,d===null?l.stores=[o]:d.push(o))}function V_(o,l,d,m){l.value=d,l.getSnapshot=m,X_(l)&&Y_(o)}function G_(o,l,d){return d(function(){X_(l)&&Y_(o)})}function X_(o){var l=o.getSnapshot;o=o.value;try{var d=l();return!ln(o,d)}catch{return!0}}function Y_(o){var l=Qn(o,1);l!==null&&hn(l,o,1,-1)}function J_(o){var l=Cn();return typeof o=="function"&&(o=o()),l.memoizedState=l.baseState=o,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:kl,lastRenderedState:o},l.queue=o,o=o.dispatch=RM.bind(null,bt,o),[l.memoizedState,o]}function El(o,l,d,m){return o={tag:o,create:l,destroy:d,deps:m,next:null},l=bt.updateQueue,l===null?(l={lastEffect:null,stores:null},bt.updateQueue=l,l.lastEffect=o.next=o):(d=l.lastEffect,d===null?l.lastEffect=o.next=o:(m=d.next,d.next=o,o.next=m,l.lastEffect=o)),o}function Q_(){return Kr().memoizedState}function Gc(o,l,d,m){var w=Cn();bt.flags|=o,w.memoizedState=El(1|l,d,void 0,m===void 0?null:m)}function Xc(o,l,d,m){var w=Kr();m=m===void 0?null:m;var S=void 0;if(Nt!==null){var j=Nt.memoizedState;if(S=j.destroy,m!==null&&um(m,j.deps)){w.memoizedState=El(l,d,S,m);return}}bt.flags|=o,w.memoizedState=El(1|l,d,S,m)}function Z_(o,l){return Gc(8390656,8,o,l)}function pm(o,l){return Xc(2048,8,o,l)}function eS(o,l){return Xc(4,2,o,l)}function tS(o,l){return Xc(4,4,o,l)}function rS(o,l){if(typeof l=="function")return o=o(),l(o),function(){l(null)};if(l!=null)return o=o(),l.current=o,function(){l.current=null}}function nS(o,l,d){return d=d!=null?d.concat([o]):null,Xc(4,4,rS.bind(null,l,o),d)}function mm(){}function iS(o,l){var d=Kr();l=l===void 0?null:l;var m=d.memoizedState;return m!==null&&l!==null&&um(l,m[1])?m[0]:(d.memoizedState=[o,l],o)}function aS(o,l){var d=Kr();l=l===void 0?null:l;var m=d.memoizedState;return m!==null&&l!==null&&um(l,m[1])?m[0]:(o=o(),d.memoizedState=[o,l],o)}function oS(o,l,d){return(Ea&21)===0?(o.baseState&&(o.baseState=!1,yr=!0),o.memoizedState=d):(ln(d,l)||(d=M1(),bt.lanes|=d,Oa|=d,o.baseState=!0),l)}function jM(o,l){var d=Je;Je=d!==0&&4>d?d:4,o(!0);var m=lm.transition;lm.transition={};try{o(!1),l()}finally{Je=d,lm.transition=m}}function sS(){return Kr().memoizedState}function CM(o,l,d){var m=Ki(o);if(d={lane:m,action:d,hasEagerState:!1,eagerState:null,next:null},lS(o))uS(l,d);else if(d=B_(o,l,d,m),d!==null){var w=fr();hn(d,o,m,w),cS(d,l,m)}}function RM(o,l,d){var m=Ki(o),w={lane:m,action:d,hasEagerState:!1,eagerState:null,next:null};if(lS(o))uS(l,w);else{var S=o.alternate;if(o.lanes===0&&(S===null||S.lanes===0)&&(S=l.lastRenderedReducer,S!==null))try{var j=l.lastRenderedState,D=S(j,d);if(w.hasEagerState=!0,w.eagerState=D,ln(D,j)){var F=l.interleaved;F===null?(w.next=w,rm(l)):(w.next=F.next,F.next=w),l.interleaved=w;return}}catch{}finally{}d=B_(o,l,w,m),d!==null&&(w=fr(),hn(d,o,m,w),cS(d,l,m))}}function lS(o){var l=o.alternate;return o===bt||l!==null&&l===bt}function uS(o,l){_l=Vc=!0;var d=o.pending;d===null?l.next=l:(l.next=d.next,d.next=l),o.pending=l}function cS(o,l,d){if((d&4194240)!==0){var m=l.lanes;m&=o.pendingLanes,d|=m,l.lanes=d,vp(o,d)}}var Yc={readContext:Wr,useCallback:ar,useContext:ar,useEffect:ar,useImperativeHandle:ar,useInsertionEffect:ar,useLayoutEffect:ar,useMemo:ar,useReducer:ar,useRef:ar,useState:ar,useDebugValue:ar,useDeferredValue:ar,useTransition:ar,useMutableSource:ar,useSyncExternalStore:ar,useId:ar,unstable_isNewReconciler:!1},NM={readContext:Wr,useCallback:function(o,l){return Cn().memoizedState=[o,l===void 0?null:l],o},useContext:Wr,useEffect:Z_,useImperativeHandle:function(o,l,d){return d=d!=null?d.concat([o]):null,Gc(4194308,4,rS.bind(null,l,o),d)},useLayoutEffect:function(o,l){return Gc(4194308,4,o,l)},useInsertionEffect:function(o,l){return Gc(4,2,o,l)},useMemo:function(o,l){var d=Cn();return l=l===void 0?null:l,o=o(),d.memoizedState=[o,l],o},useReducer:function(o,l,d){var m=Cn();return l=d!==void 0?d(l):l,m.memoizedState=m.baseState=l,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:l},m.queue=o,o=o.dispatch=CM.bind(null,bt,o),[m.memoizedState,o]},useRef:function(o){var l=Cn();return o={current:o},l.memoizedState=o},useState:J_,useDebugValue:mm,useDeferredValue:function(o){return Cn().memoizedState=o},useTransition:function(){var o=J_(!1),l=o[0];return o=jM.bind(null,o[1]),Cn().memoizedState=o,[l,o]},useMutableSource:function(){},useSyncExternalStore:function(o,l,d){var m=bt,w=Cn();if(mt){if(d===void 0)throw Error(r(407));d=d()}else{if(d=l(),Ft===null)throw Error(r(349));(Ea&30)!==0||K_(m,l,d)}w.memoizedState=d;var S={value:d,getSnapshot:l};return w.queue=S,Z_(G_.bind(null,m,S,o),[o]),m.flags|=2048,El(9,V_.bind(null,m,S,d,l),void 0,null),d},useId:function(){var o=Cn(),l=Ft.identifierPrefix;if(mt){var d=Jn,m=Yn;d=(m&~(1<<32-sn(m)-1)).toString(32)+d,l=":"+l+"R"+d,d=Sl++,0<d&&(l+="H"+d.toString(32)),l+=":"}else d=TM++,l=":"+l+"r"+d.toString(32)+":";return o.memoizedState=l},unstable_isNewReconciler:!1},$M={readContext:Wr,useCallback:iS,useContext:Wr,useEffect:pm,useImperativeHandle:nS,useInsertionEffect:eS,useLayoutEffect:tS,useMemo:aS,useReducer:dm,useRef:Q_,useState:function(){return dm(kl)},useDebugValue:mm,useDeferredValue:function(o){var l=Kr();return oS(l,Nt.memoizedState,o)},useTransition:function(){var o=dm(kl)[0],l=Kr().memoizedState;return[o,l]},useMutableSource:H_,useSyncExternalStore:W_,useId:sS,unstable_isNewReconciler:!1},IM={readContext:Wr,useCallback:iS,useContext:Wr,useEffect:pm,useImperativeHandle:nS,useInsertionEffect:eS,useLayoutEffect:tS,useMemo:aS,useReducer:hm,useRef:Q_,useState:function(){return hm(kl)},useDebugValue:mm,useDeferredValue:function(o){var l=Kr();return Nt===null?l.memoizedState=o:oS(l,Nt.memoizedState,o)},useTransition:function(){var o=hm(kl)[0],l=Kr().memoizedState;return[o,l]},useMutableSource:H_,useSyncExternalStore:W_,useId:sS,unstable_isNewReconciler:!1};function cn(o,l){if(o&&o.defaultProps){l=H({},l),o=o.defaultProps;for(var d in o)l[d]===void 0&&(l[d]=o[d]);return l}return l}function gm(o,l,d,m){l=o.memoizedState,d=d(m,l),d=d==null?l:H({},l,d),o.memoizedState=d,o.lanes===0&&(o.updateQueue.baseState=d)}var Jc={isMounted:function(o){return(o=o._reactInternals)?ya(o)===o:!1},enqueueSetState:function(o,l,d){o=o._reactInternals;var m=fr(),w=Ki(o),S=Zn(m,w);S.payload=l,d!=null&&(S.callback=d),l=Ui(o,S,w),l!==null&&(hn(l,o,w,m),Fc(l,o,w))},enqueueReplaceState:function(o,l,d){o=o._reactInternals;var m=fr(),w=Ki(o),S=Zn(m,w);S.tag=1,S.payload=l,d!=null&&(S.callback=d),l=Ui(o,S,w),l!==null&&(hn(l,o,w,m),Fc(l,o,w))},enqueueForceUpdate:function(o,l){o=o._reactInternals;var d=fr(),m=Ki(o),w=Zn(d,m);w.tag=2,l!=null&&(w.callback=l),l=Ui(o,w,m),l!==null&&(hn(l,o,m,d),Fc(l,o,m))}};function fS(o,l,d,m,w,S,j){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(m,S,j):l.prototype&&l.prototype.isPureReactComponent?!fl(d,m)||!fl(w,S):!0}function dS(o,l,d){var m=!1,w=Bi,S=l.contextType;return typeof S=="object"&&S!==null?S=Wr(S):(w=vr(l)?wa:ir.current,m=l.contextTypes,S=(m=m!=null)?_o(o,w):Bi),l=new l(d,S),o.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,l.updater=Jc,o.stateNode=l,l._reactInternals=o,m&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=w,o.__reactInternalMemoizedMaskedChildContext=S),l}function hS(o,l,d,m){o=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(d,m),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(d,m),l.state!==o&&Jc.enqueueReplaceState(l,l.state,null)}function vm(o,l,d,m){var w=o.stateNode;w.props=d,w.state=o.memoizedState,w.refs={},nm(o);var S=l.contextType;typeof S=="object"&&S!==null?w.context=Wr(S):(S=vr(l)?wa:ir.current,w.context=_o(o,S)),w.state=o.memoizedState,S=l.getDerivedStateFromProps,typeof S=="function"&&(gm(o,l,S,d),w.state=o.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof w.getSnapshotBeforeUpdate=="function"||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(l=w.state,typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount(),l!==w.state&&Jc.enqueueReplaceState(w,w.state,null),Hc(o,d,w,m),w.state=o.memoizedState),typeof w.componentDidMount=="function"&&(o.flags|=4194308)}function jo(o,l){try{var d="",m=l;do d+=se(m),m=m.return;while(m);var w=d}catch(S){w=`
|
|
39
|
-
Error generating stack: `+S.message+`
|
|
40
|
-
`+S.stack}return{value:o,source:l,stack:w,digest:null}}function ym(o,l,d){return{value:o,source:null,stack:d??null,digest:l??null}}function bm(o,l){try{console.error(l.value)}catch(d){setTimeout(function(){throw d})}}var MM=typeof WeakMap=="function"?WeakMap:Map;function pS(o,l,d){d=Zn(-1,d),d.tag=3,d.payload={element:null};var m=l.value;return d.callback=function(){af||(af=!0,$m=m),bm(o,l)},d}function mS(o,l,d){d=Zn(-1,d),d.tag=3;var m=o.type.getDerivedStateFromError;if(typeof m=="function"){var w=l.value;d.payload=function(){return m(w)},d.callback=function(){bm(o,l)}}var S=o.stateNode;return S!==null&&typeof S.componentDidCatch=="function"&&(d.callback=function(){bm(o,l),typeof m!="function"&&(Hi===null?Hi=new Set([this]):Hi.add(this));var j=l.stack;this.componentDidCatch(l.value,{componentStack:j!==null?j:""})}),d}function gS(o,l,d){var m=o.pingCache;if(m===null){m=o.pingCache=new MM;var w=new Set;m.set(l,w)}else w=m.get(l),w===void 0&&(w=new Set,m.set(l,w));w.has(d)||(w.add(d),o=YM.bind(null,o,l,d),l.then(o,o))}function vS(o){do{var l;if((l=o.tag===13)&&(l=o.memoizedState,l=l!==null?l.dehydrated!==null:!0),l)return o;o=o.return}while(o!==null);return null}function yS(o,l,d,m,w){return(o.mode&1)===0?(o===l?o.flags|=65536:(o.flags|=128,d.flags|=131072,d.flags&=-52805,d.tag===1&&(d.alternate===null?d.tag=17:(l=Zn(-1,1),l.tag=2,Ui(d,l,1))),d.lanes|=1),o):(o.flags|=65536,o.lanes=w,o)}var LM=T.ReactCurrentOwner,yr=!1;function cr(o,l,d,m){l.child=o===null?D_(l,null,d,m):Oo(l,o.child,d,m)}function bS(o,l,d,m,w){d=d.render;var S=l.ref;return Po(l,w),m=cm(o,l,d,m,S,w),d=fm(),o!==null&&!yr?(l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~w,ei(o,l,w)):(mt&&d&&Vp(l),l.flags|=1,cr(o,l,m,w),l.child)}function wS(o,l,d,m,w){if(o===null){var S=d.type;return typeof S=="function"&&!qm(S)&&S.defaultProps===void 0&&d.compare===null&&d.defaultProps===void 0?(l.tag=15,l.type=S,xS(o,l,S,m,w)):(o=ff(d.type,null,m,l,l.mode,w),o.ref=l.ref,o.return=l,l.child=o)}if(S=o.child,(o.lanes&w)===0){var j=S.memoizedProps;if(d=d.compare,d=d!==null?d:fl,d(j,m)&&o.ref===l.ref)return ei(o,l,w)}return l.flags|=1,o=Gi(S,m),o.ref=l.ref,o.return=l,l.child=o}function xS(o,l,d,m,w){if(o!==null){var S=o.memoizedProps;if(fl(S,m)&&o.ref===l.ref)if(yr=!1,l.pendingProps=m=S,(o.lanes&w)!==0)(o.flags&131072)!==0&&(yr=!0);else return l.lanes=o.lanes,ei(o,l,w)}return wm(o,l,d,m,w)}function _S(o,l,d){var m=l.pendingProps,w=m.children,S=o!==null?o.memoizedState:null;if(m.mode==="hidden")if((l.mode&1)===0)l.memoizedState={baseLanes:0,cachePool:null,transitions:null},nt(Ro,Rr),Rr|=d;else{if((d&1073741824)===0)return o=S!==null?S.baseLanes|d:d,l.lanes=l.childLanes=1073741824,l.memoizedState={baseLanes:o,cachePool:null,transitions:null},l.updateQueue=null,nt(Ro,Rr),Rr|=o,null;l.memoizedState={baseLanes:0,cachePool:null,transitions:null},m=S!==null?S.baseLanes:d,nt(Ro,Rr),Rr|=m}else S!==null?(m=S.baseLanes|d,l.memoizedState=null):m=d,nt(Ro,Rr),Rr|=m;return cr(o,l,w,d),l.child}function SS(o,l){var d=l.ref;(o===null&&d!==null||o!==null&&o.ref!==d)&&(l.flags|=512,l.flags|=2097152)}function wm(o,l,d,m,w){var S=vr(d)?wa:ir.current;return S=_o(l,S),Po(l,w),d=cm(o,l,d,m,S,w),m=fm(),o!==null&&!yr?(l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~w,ei(o,l,w)):(mt&&m&&Vp(l),l.flags|=1,cr(o,l,d,w),l.child)}function kS(o,l,d,m,w){if(vr(d)){var S=!0;Ic(l)}else S=!1;if(Po(l,w),l.stateNode===null)Zc(o,l),dS(l,d,m),vm(l,d,m,w),m=!0;else if(o===null){var j=l.stateNode,D=l.memoizedProps;j.props=D;var F=j.context,ee=d.contextType;typeof ee=="object"&&ee!==null?ee=Wr(ee):(ee=vr(d)?wa:ir.current,ee=_o(l,ee));var le=d.getDerivedStateFromProps,ue=typeof le=="function"||typeof j.getSnapshotBeforeUpdate=="function";ue||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(D!==m||F!==ee)&&hS(l,j,m,ee),qi=!1;var oe=l.memoizedState;j.state=oe,Hc(l,m,j,w),F=l.memoizedState,D!==m||oe!==F||gr.current||qi?(typeof le=="function"&&(gm(l,d,le,m),F=l.memoizedState),(D=qi||fS(l,d,D,m,oe,F,ee))?(ue||typeof j.UNSAFE_componentWillMount!="function"&&typeof j.componentWillMount!="function"||(typeof j.componentWillMount=="function"&&j.componentWillMount(),typeof j.UNSAFE_componentWillMount=="function"&&j.UNSAFE_componentWillMount()),typeof j.componentDidMount=="function"&&(l.flags|=4194308)):(typeof j.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=m,l.memoizedState=F),j.props=m,j.state=F,j.context=ee,m=D):(typeof j.componentDidMount=="function"&&(l.flags|=4194308),m=!1)}else{j=l.stateNode,z_(o,l),D=l.memoizedProps,ee=l.type===l.elementType?D:cn(l.type,D),j.props=ee,ue=l.pendingProps,oe=j.context,F=d.contextType,typeof F=="object"&&F!==null?F=Wr(F):(F=vr(d)?wa:ir.current,F=_o(l,F));var me=d.getDerivedStateFromProps;(le=typeof me=="function"||typeof j.getSnapshotBeforeUpdate=="function")||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(D!==ue||oe!==F)&&hS(l,j,m,F),qi=!1,oe=l.memoizedState,j.state=oe,Hc(l,m,j,w);var we=l.memoizedState;D!==ue||oe!==we||gr.current||qi?(typeof me=="function"&&(gm(l,d,me,m),we=l.memoizedState),(ee=qi||fS(l,d,ee,m,oe,we,F)||!1)?(le||typeof j.UNSAFE_componentWillUpdate!="function"&&typeof j.componentWillUpdate!="function"||(typeof j.componentWillUpdate=="function"&&j.componentWillUpdate(m,we,F),typeof j.UNSAFE_componentWillUpdate=="function"&&j.UNSAFE_componentWillUpdate(m,we,F)),typeof j.componentDidUpdate=="function"&&(l.flags|=4),typeof j.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof j.componentDidUpdate!="function"||D===o.memoizedProps&&oe===o.memoizedState||(l.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||D===o.memoizedProps&&oe===o.memoizedState||(l.flags|=1024),l.memoizedProps=m,l.memoizedState=we),j.props=m,j.state=we,j.context=F,m=ee):(typeof j.componentDidUpdate!="function"||D===o.memoizedProps&&oe===o.memoizedState||(l.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||D===o.memoizedProps&&oe===o.memoizedState||(l.flags|=1024),m=!1)}return xm(o,l,d,m,S,w)}function xm(o,l,d,m,w,S){SS(o,l);var j=(l.flags&128)!==0;if(!m&&!j)return w&&T_(l,d,!1),ei(o,l,S);m=l.stateNode,LM.current=l;var D=j&&typeof d.getDerivedStateFromError!="function"?null:m.render();return l.flags|=1,o!==null&&j?(l.child=Oo(l,o.child,null,S),l.child=Oo(l,null,D,S)):cr(o,l,D,S),l.memoizedState=m.state,w&&T_(l,d,!0),l.child}function ES(o){var l=o.stateNode;l.pendingContext?A_(o,l.pendingContext,l.pendingContext!==l.context):l.context&&A_(o,l.context,!1),im(o,l.containerInfo)}function OS(o,l,d,m,w){return Eo(),Jp(w),l.flags|=256,cr(o,l,d,m),l.child}var _m={dehydrated:null,treeContext:null,retryLane:0};function Sm(o){return{baseLanes:o,cachePool:null,transitions:null}}function AS(o,l,d){var m=l.pendingProps,w=yt.current,S=!1,j=(l.flags&128)!==0,D;if((D=j)||(D=o!==null&&o.memoizedState===null?!1:(w&2)!==0),D?(S=!0,l.flags&=-129):(o===null||o.memoizedState!==null)&&(w|=1),nt(yt,w&1),o===null)return Yp(l),o=l.memoizedState,o!==null&&(o=o.dehydrated,o!==null)?((l.mode&1)===0?l.lanes=1:o.data==="$!"?l.lanes=8:l.lanes=1073741824,null):(j=m.children,o=m.fallback,S?(m=l.mode,S=l.child,j={mode:"hidden",children:j},(m&1)===0&&S!==null?(S.childLanes=0,S.pendingProps=j):S=df(j,m,0,null),o=ja(o,m,d,null),S.return=l,o.return=l,S.sibling=o,l.child=S,l.child.memoizedState=Sm(d),l.memoizedState=_m,o):km(l,j));if(w=o.memoizedState,w!==null&&(D=w.dehydrated,D!==null))return DM(o,l,j,m,D,w,d);if(S){S=m.fallback,j=l.mode,w=o.child,D=w.sibling;var F={mode:"hidden",children:m.children};return(j&1)===0&&l.child!==w?(m=l.child,m.childLanes=0,m.pendingProps=F,l.deletions=null):(m=Gi(w,F),m.subtreeFlags=w.subtreeFlags&14680064),D!==null?S=Gi(D,S):(S=ja(S,j,d,null),S.flags|=2),S.return=l,m.return=l,m.sibling=S,l.child=m,m=S,S=l.child,j=o.child.memoizedState,j=j===null?Sm(d):{baseLanes:j.baseLanes|d,cachePool:null,transitions:j.transitions},S.memoizedState=j,S.childLanes=o.childLanes&~d,l.memoizedState=_m,m}return S=o.child,o=S.sibling,m=Gi(S,{mode:"visible",children:m.children}),(l.mode&1)===0&&(m.lanes=d),m.return=l,m.sibling=null,o!==null&&(d=l.deletions,d===null?(l.deletions=[o],l.flags|=16):d.push(o)),l.child=m,l.memoizedState=null,m}function km(o,l){return l=df({mode:"visible",children:l},o.mode,0,null),l.return=o,o.child=l}function Qc(o,l,d,m){return m!==null&&Jp(m),Oo(l,o.child,null,d),o=km(l,l.pendingProps.children),o.flags|=2,l.memoizedState=null,o}function DM(o,l,d,m,w,S,j){if(d)return l.flags&256?(l.flags&=-257,m=ym(Error(r(422))),Qc(o,l,j,m)):l.memoizedState!==null?(l.child=o.child,l.flags|=128,null):(S=m.fallback,w=l.mode,m=df({mode:"visible",children:m.children},w,0,null),S=ja(S,w,j,null),S.flags|=2,m.return=l,S.return=l,m.sibling=S,l.child=m,(l.mode&1)!==0&&Oo(l,o.child,null,j),l.child.memoizedState=Sm(j),l.memoizedState=_m,S);if((l.mode&1)===0)return Qc(o,l,j,null);if(w.data==="$!"){if(m=w.nextSibling&&w.nextSibling.dataset,m)var D=m.dgst;return m=D,S=Error(r(419)),m=ym(S,m,void 0),Qc(o,l,j,m)}if(D=(j&o.childLanes)!==0,yr||D){if(m=Ft,m!==null){switch(j&-j){case 4:w=2;break;case 16:w=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:w=32;break;case 536870912:w=268435456;break;default:w=0}w=(w&(m.suspendedLanes|j))!==0?0:w,w!==0&&w!==S.retryLane&&(S.retryLane=w,Qn(o,w),hn(m,o,w,-1))}return zm(),m=ym(Error(r(421))),Qc(o,l,j,m)}return w.data==="$?"?(l.flags|=128,l.child=o.child,l=JM.bind(null,o),w._reactRetry=l,null):(o=S.treeContext,Cr=Li(w.nextSibling),jr=l,mt=!0,un=null,o!==null&&(Fr[Hr++]=Yn,Fr[Hr++]=Jn,Fr[Hr++]=xa,Yn=o.id,Jn=o.overflow,xa=l),l=km(l,m.children),l.flags|=4096,l)}function PS(o,l,d){o.lanes|=l;var m=o.alternate;m!==null&&(m.lanes|=l),tm(o.return,l,d)}function Em(o,l,d,m,w){var S=o.memoizedState;S===null?o.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:m,tail:d,tailMode:w}:(S.isBackwards=l,S.rendering=null,S.renderingStartTime=0,S.last=m,S.tail=d,S.tailMode=w)}function TS(o,l,d){var m=l.pendingProps,w=m.revealOrder,S=m.tail;if(cr(o,l,m.children,d),m=yt.current,(m&2)!==0)m=m&1|2,l.flags|=128;else{if(o!==null&&(o.flags&128)!==0)e:for(o=l.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&PS(o,d,l);else if(o.tag===19)PS(o,d,l);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===l)break e;for(;o.sibling===null;){if(o.return===null||o.return===l)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}m&=1}if(nt(yt,m),(l.mode&1)===0)l.memoizedState=null;else switch(w){case"forwards":for(d=l.child,w=null;d!==null;)o=d.alternate,o!==null&&Wc(o)===null&&(w=d),d=d.sibling;d=w,d===null?(w=l.child,l.child=null):(w=d.sibling,d.sibling=null),Em(l,!1,w,d,S);break;case"backwards":for(d=null,w=l.child,l.child=null;w!==null;){if(o=w.alternate,o!==null&&Wc(o)===null){l.child=w;break}o=w.sibling,w.sibling=d,d=w,w=o}Em(l,!0,d,null,S);break;case"together":Em(l,!1,null,null,void 0);break;default:l.memoizedState=null}return l.child}function Zc(o,l){(l.mode&1)===0&&o!==null&&(o.alternate=null,l.alternate=null,l.flags|=2)}function ei(o,l,d){if(o!==null&&(l.dependencies=o.dependencies),Oa|=l.lanes,(d&l.childLanes)===0)return null;if(o!==null&&l.child!==o.child)throw Error(r(153));if(l.child!==null){for(o=l.child,d=Gi(o,o.pendingProps),l.child=d,d.return=l;o.sibling!==null;)o=o.sibling,d=d.sibling=Gi(o,o.pendingProps),d.return=l;d.sibling=null}return l.child}function BM(o,l,d){switch(l.tag){case 3:ES(l),Eo();break;case 5:F_(l);break;case 1:vr(l.type)&&Ic(l);break;case 4:im(l,l.stateNode.containerInfo);break;case 10:var m=l.type._context,w=l.memoizedProps.value;nt(qc,m._currentValue),m._currentValue=w;break;case 13:if(m=l.memoizedState,m!==null)return m.dehydrated!==null?(nt(yt,yt.current&1),l.flags|=128,null):(d&l.child.childLanes)!==0?AS(o,l,d):(nt(yt,yt.current&1),o=ei(o,l,d),o!==null?o.sibling:null);nt(yt,yt.current&1);break;case 19:if(m=(d&l.childLanes)!==0,(o.flags&128)!==0){if(m)return TS(o,l,d);l.flags|=128}if(w=l.memoizedState,w!==null&&(w.rendering=null,w.tail=null,w.lastEffect=null),nt(yt,yt.current),m)break;return null;case 22:case 23:return l.lanes=0,_S(o,l,d)}return ei(o,l,d)}var jS,Om,CS,RS;jS=function(o,l){for(var d=l.child;d!==null;){if(d.tag===5||d.tag===6)o.appendChild(d.stateNode);else if(d.tag!==4&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===l)break;for(;d.sibling===null;){if(d.return===null||d.return===l)return;d=d.return}d.sibling.return=d.return,d=d.sibling}},Om=function(){},CS=function(o,l,d,m){var w=o.memoizedProps;if(w!==m){o=l.stateNode,ka(jn.current);var S=null;switch(d){case"input":w=$e(o,w),m=$e(o,m),S=[];break;case"select":w=H({},w,{value:void 0}),m=H({},m,{value:void 0}),S=[];break;case"textarea":w=ut(o,w),m=ut(o,m),S=[];break;default:typeof w.onClick!="function"&&typeof m.onClick=="function"&&(o.onclick=Rc)}fo(d,m);var j;d=null;for(ee in w)if(!m.hasOwnProperty(ee)&&w.hasOwnProperty(ee)&&w[ee]!=null)if(ee==="style"){var D=w[ee];for(j in D)D.hasOwnProperty(j)&&(d||(d={}),d[j]="")}else ee!=="dangerouslySetInnerHTML"&&ee!=="children"&&ee!=="suppressContentEditableWarning"&&ee!=="suppressHydrationWarning"&&ee!=="autoFocus"&&(i.hasOwnProperty(ee)?S||(S=[]):(S=S||[]).push(ee,null));for(ee in m){var F=m[ee];if(D=w!=null?w[ee]:void 0,m.hasOwnProperty(ee)&&F!==D&&(F!=null||D!=null))if(ee==="style")if(D){for(j in D)!D.hasOwnProperty(j)||F&&F.hasOwnProperty(j)||(d||(d={}),d[j]="");for(j in F)F.hasOwnProperty(j)&&D[j]!==F[j]&&(d||(d={}),d[j]=F[j])}else d||(S||(S=[]),S.push(ee,d)),d=F;else ee==="dangerouslySetInnerHTML"?(F=F?F.__html:void 0,D=D?D.__html:void 0,F!=null&&D!==F&&(S=S||[]).push(ee,F)):ee==="children"?typeof F!="string"&&typeof F!="number"||(S=S||[]).push(ee,""+F):ee!=="suppressContentEditableWarning"&&ee!=="suppressHydrationWarning"&&(i.hasOwnProperty(ee)?(F!=null&&ee==="onScroll"&&ct("scroll",o),S||D===F||(S=[])):(S=S||[]).push(ee,F))}d&&(S=S||[]).push("style",d);var ee=S;(l.updateQueue=ee)&&(l.flags|=4)}},RS=function(o,l,d,m){d!==m&&(l.flags|=4)};function Ol(o,l){if(!mt)switch(o.tailMode){case"hidden":l=o.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?o.tail=null:d.sibling=null;break;case"collapsed":d=o.tail;for(var m=null;d!==null;)d.alternate!==null&&(m=d),d=d.sibling;m===null?l||o.tail===null?o.tail=null:o.tail.sibling=null:m.sibling=null}}function or(o){var l=o.alternate!==null&&o.alternate.child===o.child,d=0,m=0;if(l)for(var w=o.child;w!==null;)d|=w.lanes|w.childLanes,m|=w.subtreeFlags&14680064,m|=w.flags&14680064,w.return=o,w=w.sibling;else for(w=o.child;w!==null;)d|=w.lanes|w.childLanes,m|=w.subtreeFlags,m|=w.flags,w.return=o,w=w.sibling;return o.subtreeFlags|=m,o.childLanes=d,l}function zM(o,l,d){var m=l.pendingProps;switch(Gp(l),l.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return or(l),null;case 1:return vr(l.type)&&$c(),or(l),null;case 3:return m=l.stateNode,To(),ft(gr),ft(ir),sm(),m.pendingContext&&(m.context=m.pendingContext,m.pendingContext=null),(o===null||o.child===null)&&(Bc(l)?l.flags|=4:o===null||o.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,un!==null&&(Lm(un),un=null))),Om(o,l),or(l),null;case 5:am(l);var w=ka(xl.current);if(d=l.type,o!==null&&l.stateNode!=null)CS(o,l,d,m,w),o.ref!==l.ref&&(l.flags|=512,l.flags|=2097152);else{if(!m){if(l.stateNode===null)throw Error(r(166));return or(l),null}if(o=ka(jn.current),Bc(l)){m=l.stateNode,d=l.type;var S=l.memoizedProps;switch(m[Tn]=l,m[gl]=S,o=(l.mode&1)!==0,d){case"dialog":ct("cancel",m),ct("close",m);break;case"iframe":case"object":case"embed":ct("load",m);break;case"video":case"audio":for(w=0;w<hl.length;w++)ct(hl[w],m);break;case"source":ct("error",m);break;case"img":case"image":case"link":ct("error",m),ct("load",m);break;case"details":ct("toggle",m);break;case"input":ht(m,S),ct("invalid",m);break;case"select":m._wrapperState={wasMultiple:!!S.multiple},ct("invalid",m);break;case"textarea":Ar(m,S),ct("invalid",m)}fo(d,S),w=null;for(var j in S)if(S.hasOwnProperty(j)){var D=S[j];j==="children"?typeof D=="string"?m.textContent!==D&&(S.suppressHydrationWarning!==!0&&Cc(m.textContent,D,o),w=["children",D]):typeof D=="number"&&m.textContent!==""+D&&(S.suppressHydrationWarning!==!0&&Cc(m.textContent,D,o),w=["children",""+D]):i.hasOwnProperty(j)&&D!=null&&j==="onScroll"&&ct("scroll",m)}switch(d){case"input":Ee(m),mr(m,S,!0);break;case"textarea":Ee(m),pa(m);break;case"select":case"option":break;default:typeof S.onClick=="function"&&(m.onclick=Rc)}m=w,l.updateQueue=m,m!==null&&(l.flags|=4)}else{j=w.nodeType===9?w:w.ownerDocument,o==="http://www.w3.org/1999/xhtml"&&(o=ma(d)),o==="http://www.w3.org/1999/xhtml"?d==="script"?(o=j.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild)):typeof m.is=="string"?o=j.createElement(d,{is:m.is}):(o=j.createElement(d),d==="select"&&(j=o,m.multiple?j.multiple=!0:m.size&&(j.size=m.size))):o=j.createElementNS(o,d),o[Tn]=l,o[gl]=m,jS(o,l,!1,!1),l.stateNode=o;e:{switch(j=Xs(d,m),d){case"dialog":ct("cancel",o),ct("close",o),w=m;break;case"iframe":case"object":case"embed":ct("load",o),w=m;break;case"video":case"audio":for(w=0;w<hl.length;w++)ct(hl[w],o);w=m;break;case"source":ct("error",o),w=m;break;case"img":case"image":case"link":ct("error",o),ct("load",o),w=m;break;case"details":ct("toggle",o),w=m;break;case"input":ht(o,m),w=$e(o,m),ct("invalid",o);break;case"option":w=m;break;case"select":o._wrapperState={wasMultiple:!!m.multiple},w=H({},m,{value:void 0}),ct("invalid",o);break;case"textarea":Ar(o,m),w=ut(o,m),ct("invalid",o);break;default:w=m}fo(d,w),D=w;for(S in D)if(D.hasOwnProperty(S)){var F=D[S];S==="style"?fc(o,F):S==="dangerouslySetInnerHTML"?(F=F?F.__html:void 0,F!=null&&co(o,F)):S==="children"?typeof F=="string"?(d!=="textarea"||F!=="")&&zr(o,F):typeof F=="number"&&zr(o,""+F):S!=="suppressContentEditableWarning"&&S!=="suppressHydrationWarning"&&S!=="autoFocus"&&(i.hasOwnProperty(S)?F!=null&&S==="onScroll"&&ct("scroll",o):F!=null&&A(o,S,F,j))}switch(d){case"input":Ee(o),mr(o,m,!1);break;case"textarea":Ee(o),pa(o);break;case"option":m.value!=null&&o.setAttribute("value",""+pe(m.value));break;case"select":o.multiple=!!m.multiple,S=m.value,S!=null?rr(o,!!m.multiple,S,!1):m.defaultValue!=null&&rr(o,!!m.multiple,m.defaultValue,!0);break;default:typeof w.onClick=="function"&&(o.onclick=Rc)}switch(d){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}}m&&(l.flags|=4)}l.ref!==null&&(l.flags|=512,l.flags|=2097152)}return or(l),null;case 6:if(o&&l.stateNode!=null)RS(o,l,o.memoizedProps,m);else{if(typeof m!="string"&&l.stateNode===null)throw Error(r(166));if(d=ka(xl.current),ka(jn.current),Bc(l)){if(m=l.stateNode,d=l.memoizedProps,m[Tn]=l,(S=m.nodeValue!==d)&&(o=jr,o!==null))switch(o.tag){case 3:Cc(m.nodeValue,d,(o.mode&1)!==0);break;case 5:o.memoizedProps.suppressHydrationWarning!==!0&&Cc(m.nodeValue,d,(o.mode&1)!==0)}S&&(l.flags|=4)}else m=(d.nodeType===9?d:d.ownerDocument).createTextNode(m),m[Tn]=l,l.stateNode=m}return or(l),null;case 13:if(ft(yt),m=l.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(mt&&Cr!==null&&(l.mode&1)!==0&&(l.flags&128)===0)I_(),Eo(),l.flags|=98560,S=!1;else if(S=Bc(l),m!==null&&m.dehydrated!==null){if(o===null){if(!S)throw Error(r(318));if(S=l.memoizedState,S=S!==null?S.dehydrated:null,!S)throw Error(r(317));S[Tn]=l}else Eo(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;or(l),S=!1}else un!==null&&(Lm(un),un=null),S=!0;if(!S)return l.flags&65536?l:null}return(l.flags&128)!==0?(l.lanes=d,l):(m=m!==null,m!==(o!==null&&o.memoizedState!==null)&&m&&(l.child.flags|=8192,(l.mode&1)!==0&&(o===null||(yt.current&1)!==0?$t===0&&($t=3):zm())),l.updateQueue!==null&&(l.flags|=4),or(l),null);case 4:return To(),Om(o,l),o===null&&pl(l.stateNode.containerInfo),or(l),null;case 10:return em(l.type._context),or(l),null;case 17:return vr(l.type)&&$c(),or(l),null;case 19:if(ft(yt),S=l.memoizedState,S===null)return or(l),null;if(m=(l.flags&128)!==0,j=S.rendering,j===null)if(m)Ol(S,!1);else{if($t!==0||o!==null&&(o.flags&128)!==0)for(o=l.child;o!==null;){if(j=Wc(o),j!==null){for(l.flags|=128,Ol(S,!1),m=j.updateQueue,m!==null&&(l.updateQueue=m,l.flags|=4),l.subtreeFlags=0,m=d,d=l.child;d!==null;)S=d,o=m,S.flags&=14680066,j=S.alternate,j===null?(S.childLanes=0,S.lanes=o,S.child=null,S.subtreeFlags=0,S.memoizedProps=null,S.memoizedState=null,S.updateQueue=null,S.dependencies=null,S.stateNode=null):(S.childLanes=j.childLanes,S.lanes=j.lanes,S.child=j.child,S.subtreeFlags=0,S.deletions=null,S.memoizedProps=j.memoizedProps,S.memoizedState=j.memoizedState,S.updateQueue=j.updateQueue,S.type=j.type,o=j.dependencies,S.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),d=d.sibling;return nt(yt,yt.current&1|2),l.child}o=o.sibling}S.tail!==null&&kt()>No&&(l.flags|=128,m=!0,Ol(S,!1),l.lanes=4194304)}else{if(!m)if(o=Wc(j),o!==null){if(l.flags|=128,m=!0,d=o.updateQueue,d!==null&&(l.updateQueue=d,l.flags|=4),Ol(S,!0),S.tail===null&&S.tailMode==="hidden"&&!j.alternate&&!mt)return or(l),null}else 2*kt()-S.renderingStartTime>No&&d!==1073741824&&(l.flags|=128,m=!0,Ol(S,!1),l.lanes=4194304);S.isBackwards?(j.sibling=l.child,l.child=j):(d=S.last,d!==null?d.sibling=j:l.child=j,S.last=j)}return S.tail!==null?(l=S.tail,S.rendering=l,S.tail=l.sibling,S.renderingStartTime=kt(),l.sibling=null,d=yt.current,nt(yt,m?d&1|2:d&1),l):(or(l),null);case 22:case 23:return Bm(),m=l.memoizedState!==null,o!==null&&o.memoizedState!==null!==m&&(l.flags|=8192),m&&(l.mode&1)!==0?(Rr&1073741824)!==0&&(or(l),l.subtreeFlags&6&&(l.flags|=8192)):or(l),null;case 24:return null;case 25:return null}throw Error(r(156,l.tag))}function qM(o,l){switch(Gp(l),l.tag){case 1:return vr(l.type)&&$c(),o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 3:return To(),ft(gr),ft(ir),sm(),o=l.flags,(o&65536)!==0&&(o&128)===0?(l.flags=o&-65537|128,l):null;case 5:return am(l),null;case 13:if(ft(yt),o=l.memoizedState,o!==null&&o.dehydrated!==null){if(l.alternate===null)throw Error(r(340));Eo()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 19:return ft(yt),null;case 4:return To(),null;case 10:return em(l.type._context),null;case 22:case 23:return Bm(),null;case 24:return null;default:return null}}var ef=!1,sr=!1,UM=typeof WeakSet=="function"?WeakSet:Set,ve=null;function Co(o,l){var d=o.ref;if(d!==null)if(typeof d=="function")try{d(null)}catch(m){wt(o,l,m)}else d.current=null}function Am(o,l,d){try{d()}catch(m){wt(o,l,m)}}var NS=!1;function FM(o,l){if(Bp=wc,o=f_(),Cp(o)){if("selectionStart"in o)var d={start:o.selectionStart,end:o.selectionEnd};else e:{d=(d=o.ownerDocument)&&d.defaultView||window;var m=d.getSelection&&d.getSelection();if(m&&m.rangeCount!==0){d=m.anchorNode;var w=m.anchorOffset,S=m.focusNode;m=m.focusOffset;try{d.nodeType,S.nodeType}catch{d=null;break e}var j=0,D=-1,F=-1,ee=0,le=0,ue=o,oe=null;t:for(;;){for(var me;ue!==d||w!==0&&ue.nodeType!==3||(D=j+w),ue!==S||m!==0&&ue.nodeType!==3||(F=j+m),ue.nodeType===3&&(j+=ue.nodeValue.length),(me=ue.firstChild)!==null;)oe=ue,ue=me;for(;;){if(ue===o)break t;if(oe===d&&++ee===w&&(D=j),oe===S&&++le===m&&(F=j),(me=ue.nextSibling)!==null)break;ue=oe,oe=ue.parentNode}ue=me}d=D===-1||F===-1?null:{start:D,end:F}}else d=null}d=d||{start:0,end:0}}else d=null;for(zp={focusedElem:o,selectionRange:d},wc=!1,ve=l;ve!==null;)if(l=ve,o=l.child,(l.subtreeFlags&1028)!==0&&o!==null)o.return=l,ve=o;else for(;ve!==null;){l=ve;try{var we=l.alternate;if((l.flags&1024)!==0)switch(l.tag){case 0:case 11:case 15:break;case 1:if(we!==null){var Se=we.memoizedProps,Et=we.memoizedState,Y=l.stateNode,W=Y.getSnapshotBeforeUpdate(l.elementType===l.type?Se:cn(l.type,Se),Et);Y.__reactInternalSnapshotBeforeUpdate=W}break;case 3:var Q=l.stateNode.containerInfo;Q.nodeType===1?Q.textContent="":Q.nodeType===9&&Q.documentElement&&Q.removeChild(Q.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(ce){wt(l,l.return,ce)}if(o=l.sibling,o!==null){o.return=l.return,ve=o;break}ve=l.return}return we=NS,NS=!1,we}function Al(o,l,d){var m=l.updateQueue;if(m=m!==null?m.lastEffect:null,m!==null){var w=m=m.next;do{if((w.tag&o)===o){var S=w.destroy;w.destroy=void 0,S!==void 0&&Am(l,d,S)}w=w.next}while(w!==m)}}function tf(o,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var d=l=l.next;do{if((d.tag&o)===o){var m=d.create;d.destroy=m()}d=d.next}while(d!==l)}}function Pm(o){var l=o.ref;if(l!==null){var d=o.stateNode;switch(o.tag){case 5:o=d;break;default:o=d}typeof l=="function"?l(o):l.current=o}}function $S(o){var l=o.alternate;l!==null&&(o.alternate=null,$S(l)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(l=o.stateNode,l!==null&&(delete l[Tn],delete l[gl],delete l[Hp],delete l[EM],delete l[OM])),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}function IS(o){return o.tag===5||o.tag===3||o.tag===4}function MS(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||IS(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function Tm(o,l,d){var m=o.tag;if(m===5||m===6)o=o.stateNode,l?d.nodeType===8?d.parentNode.insertBefore(o,l):d.insertBefore(o,l):(d.nodeType===8?(l=d.parentNode,l.insertBefore(o,d)):(l=d,l.appendChild(o)),d=d._reactRootContainer,d!=null||l.onclick!==null||(l.onclick=Rc));else if(m!==4&&(o=o.child,o!==null))for(Tm(o,l,d),o=o.sibling;o!==null;)Tm(o,l,d),o=o.sibling}function jm(o,l,d){var m=o.tag;if(m===5||m===6)o=o.stateNode,l?d.insertBefore(o,l):d.appendChild(o);else if(m!==4&&(o=o.child,o!==null))for(jm(o,l,d),o=o.sibling;o!==null;)jm(o,l,d),o=o.sibling}var Yt=null,fn=!1;function Fi(o,l,d){for(d=d.child;d!==null;)LS(o,l,d),d=d.sibling}function LS(o,l,d){if(Pn&&typeof Pn.onCommitFiberUnmount=="function")try{Pn.onCommitFiberUnmount(pc,d)}catch{}switch(d.tag){case 5:sr||Co(d,l);case 6:var m=Yt,w=fn;Yt=null,Fi(o,l,d),Yt=m,fn=w,Yt!==null&&(fn?(o=Yt,d=d.stateNode,o.nodeType===8?o.parentNode.removeChild(d):o.removeChild(d)):Yt.removeChild(d.stateNode));break;case 18:Yt!==null&&(fn?(o=Yt,d=d.stateNode,o.nodeType===8?Fp(o.parentNode,d):o.nodeType===1&&Fp(o,d),al(o)):Fp(Yt,d.stateNode));break;case 4:m=Yt,w=fn,Yt=d.stateNode.containerInfo,fn=!0,Fi(o,l,d),Yt=m,fn=w;break;case 0:case 11:case 14:case 15:if(!sr&&(m=d.updateQueue,m!==null&&(m=m.lastEffect,m!==null))){w=m=m.next;do{var S=w,j=S.destroy;S=S.tag,j!==void 0&&((S&2)!==0||(S&4)!==0)&&Am(d,l,j),w=w.next}while(w!==m)}Fi(o,l,d);break;case 1:if(!sr&&(Co(d,l),m=d.stateNode,typeof m.componentWillUnmount=="function"))try{m.props=d.memoizedProps,m.state=d.memoizedState,m.componentWillUnmount()}catch(D){wt(d,l,D)}Fi(o,l,d);break;case 21:Fi(o,l,d);break;case 22:d.mode&1?(sr=(m=sr)||d.memoizedState!==null,Fi(o,l,d),sr=m):Fi(o,l,d);break;default:Fi(o,l,d)}}function DS(o){var l=o.updateQueue;if(l!==null){o.updateQueue=null;var d=o.stateNode;d===null&&(d=o.stateNode=new UM),l.forEach(function(m){var w=QM.bind(null,o,m);d.has(m)||(d.add(m),m.then(w,w))})}}function dn(o,l){var d=l.deletions;if(d!==null)for(var m=0;m<d.length;m++){var w=d[m];try{var S=o,j=l,D=j;e:for(;D!==null;){switch(D.tag){case 5:Yt=D.stateNode,fn=!1;break e;case 3:Yt=D.stateNode.containerInfo,fn=!0;break e;case 4:Yt=D.stateNode.containerInfo,fn=!0;break e}D=D.return}if(Yt===null)throw Error(r(160));LS(S,j,w),Yt=null,fn=!1;var F=w.alternate;F!==null&&(F.return=null),w.return=null}catch(ee){wt(w,l,ee)}}if(l.subtreeFlags&12854)for(l=l.child;l!==null;)BS(l,o),l=l.sibling}function BS(o,l){var d=o.alternate,m=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:if(dn(l,o),Rn(o),m&4){try{Al(3,o,o.return),tf(3,o)}catch(Se){wt(o,o.return,Se)}try{Al(5,o,o.return)}catch(Se){wt(o,o.return,Se)}}break;case 1:dn(l,o),Rn(o),m&512&&d!==null&&Co(d,d.return);break;case 5:if(dn(l,o),Rn(o),m&512&&d!==null&&Co(d,d.return),o.flags&32){var w=o.stateNode;try{zr(w,"")}catch(Se){wt(o,o.return,Se)}}if(m&4&&(w=o.stateNode,w!=null)){var S=o.memoizedProps,j=d!==null?d.memoizedProps:S,D=o.type,F=o.updateQueue;if(o.updateQueue=null,F!==null)try{D==="input"&&S.type==="radio"&&S.name!=null&<(w,S),Xs(D,j);var ee=Xs(D,S);for(j=0;j<F.length;j+=2){var le=F[j],ue=F[j+1];le==="style"?fc(w,ue):le==="dangerouslySetInnerHTML"?co(w,ue):le==="children"?zr(w,ue):A(w,le,ue,ee)}switch(D){case"input":pt(w,S);break;case"textarea":ha(w,S);break;case"select":var oe=w._wrapperState.wasMultiple;w._wrapperState.wasMultiple=!!S.multiple;var me=S.value;me!=null?rr(w,!!S.multiple,me,!1):oe!==!!S.multiple&&(S.defaultValue!=null?rr(w,!!S.multiple,S.defaultValue,!0):rr(w,!!S.multiple,S.multiple?[]:"",!1))}w[gl]=S}catch(Se){wt(o,o.return,Se)}}break;case 6:if(dn(l,o),Rn(o),m&4){if(o.stateNode===null)throw Error(r(162));w=o.stateNode,S=o.memoizedProps;try{w.nodeValue=S}catch(Se){wt(o,o.return,Se)}}break;case 3:if(dn(l,o),Rn(o),m&4&&d!==null&&d.memoizedState.isDehydrated)try{al(l.containerInfo)}catch(Se){wt(o,o.return,Se)}break;case 4:dn(l,o),Rn(o);break;case 13:dn(l,o),Rn(o),w=o.child,w.flags&8192&&(S=w.memoizedState!==null,w.stateNode.isHidden=S,!S||w.alternate!==null&&w.alternate.memoizedState!==null||(Nm=kt())),m&4&&DS(o);break;case 22:if(le=d!==null&&d.memoizedState!==null,o.mode&1?(sr=(ee=sr)||le,dn(l,o),sr=ee):dn(l,o),Rn(o),m&8192){if(ee=o.memoizedState!==null,(o.stateNode.isHidden=ee)&&!le&&(o.mode&1)!==0)for(ve=o,le=o.child;le!==null;){for(ue=ve=le;ve!==null;){switch(oe=ve,me=oe.child,oe.tag){case 0:case 11:case 14:case 15:Al(4,oe,oe.return);break;case 1:Co(oe,oe.return);var we=oe.stateNode;if(typeof we.componentWillUnmount=="function"){m=oe,d=oe.return;try{l=m,we.props=l.memoizedProps,we.state=l.memoizedState,we.componentWillUnmount()}catch(Se){wt(m,d,Se)}}break;case 5:Co(oe,oe.return);break;case 22:if(oe.memoizedState!==null){US(ue);continue}}me!==null?(me.return=oe,ve=me):US(ue)}le=le.sibling}e:for(le=null,ue=o;;){if(ue.tag===5){if(le===null){le=ue;try{w=ue.stateNode,ee?(S=w.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none"):(D=ue.stateNode,F=ue.memoizedProps.style,j=F!=null&&F.hasOwnProperty("display")?F.display:null,D.style.display=cc("display",j))}catch(Se){wt(o,o.return,Se)}}}else if(ue.tag===6){if(le===null)try{ue.stateNode.nodeValue=ee?"":ue.memoizedProps}catch(Se){wt(o,o.return,Se)}}else if((ue.tag!==22&&ue.tag!==23||ue.memoizedState===null||ue===o)&&ue.child!==null){ue.child.return=ue,ue=ue.child;continue}if(ue===o)break e;for(;ue.sibling===null;){if(ue.return===null||ue.return===o)break e;le===ue&&(le=null),ue=ue.return}le===ue&&(le=null),ue.sibling.return=ue.return,ue=ue.sibling}}break;case 19:dn(l,o),Rn(o),m&4&&DS(o);break;case 21:break;default:dn(l,o),Rn(o)}}function Rn(o){var l=o.flags;if(l&2){try{e:{for(var d=o.return;d!==null;){if(IS(d)){var m=d;break e}d=d.return}throw Error(r(160))}switch(m.tag){case 5:var w=m.stateNode;m.flags&32&&(zr(w,""),m.flags&=-33);var S=MS(o);jm(o,S,w);break;case 3:case 4:var j=m.stateNode.containerInfo,D=MS(o);Tm(o,D,j);break;default:throw Error(r(161))}}catch(F){wt(o,o.return,F)}o.flags&=-3}l&4096&&(o.flags&=-4097)}function HM(o,l,d){ve=o,zS(o)}function zS(o,l,d){for(var m=(o.mode&1)!==0;ve!==null;){var w=ve,S=w.child;if(w.tag===22&&m){var j=w.memoizedState!==null||ef;if(!j){var D=w.alternate,F=D!==null&&D.memoizedState!==null||sr;D=ef;var ee=sr;if(ef=j,(sr=F)&&!ee)for(ve=w;ve!==null;)j=ve,F=j.child,j.tag===22&&j.memoizedState!==null?FS(w):F!==null?(F.return=j,ve=F):FS(w);for(;S!==null;)ve=S,zS(S),S=S.sibling;ve=w,ef=D,sr=ee}qS(o)}else(w.subtreeFlags&8772)!==0&&S!==null?(S.return=w,ve=S):qS(o)}}function qS(o){for(;ve!==null;){var l=ve;if((l.flags&8772)!==0){var d=l.alternate;try{if((l.flags&8772)!==0)switch(l.tag){case 0:case 11:case 15:sr||tf(5,l);break;case 1:var m=l.stateNode;if(l.flags&4&&!sr)if(d===null)m.componentDidMount();else{var w=l.elementType===l.type?d.memoizedProps:cn(l.type,d.memoizedProps);m.componentDidUpdate(w,d.memoizedState,m.__reactInternalSnapshotBeforeUpdate)}var S=l.updateQueue;S!==null&&U_(l,S,m);break;case 3:var j=l.updateQueue;if(j!==null){if(d=null,l.child!==null)switch(l.child.tag){case 5:d=l.child.stateNode;break;case 1:d=l.child.stateNode}U_(l,j,d)}break;case 5:var D=l.stateNode;if(d===null&&l.flags&4){d=D;var F=l.memoizedProps;switch(l.type){case"button":case"input":case"select":case"textarea":F.autoFocus&&d.focus();break;case"img":F.src&&(d.src=F.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(l.memoizedState===null){var ee=l.alternate;if(ee!==null){var le=ee.memoizedState;if(le!==null){var ue=le.dehydrated;ue!==null&&al(ue)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}sr||l.flags&512&&Pm(l)}catch(oe){wt(l,l.return,oe)}}if(l===o){ve=null;break}if(d=l.sibling,d!==null){d.return=l.return,ve=d;break}ve=l.return}}function US(o){for(;ve!==null;){var l=ve;if(l===o){ve=null;break}var d=l.sibling;if(d!==null){d.return=l.return,ve=d;break}ve=l.return}}function FS(o){for(;ve!==null;){var l=ve;try{switch(l.tag){case 0:case 11:case 15:var d=l.return;try{tf(4,l)}catch(F){wt(l,d,F)}break;case 1:var m=l.stateNode;if(typeof m.componentDidMount=="function"){var w=l.return;try{m.componentDidMount()}catch(F){wt(l,w,F)}}var S=l.return;try{Pm(l)}catch(F){wt(l,S,F)}break;case 5:var j=l.return;try{Pm(l)}catch(F){wt(l,j,F)}}}catch(F){wt(l,l.return,F)}if(l===o){ve=null;break}var D=l.sibling;if(D!==null){D.return=l.return,ve=D;break}ve=l.return}}var WM=Math.ceil,rf=T.ReactCurrentDispatcher,Cm=T.ReactCurrentOwner,Vr=T.ReactCurrentBatchConfig,We=0,Ft=null,Pt=null,Jt=0,Rr=0,Ro=Di(0),$t=0,Pl=null,Oa=0,nf=0,Rm=0,Tl=null,br=null,Nm=0,No=1/0,ti=null,af=!1,$m=null,Hi=null,of=!1,Wi=null,sf=0,jl=0,Im=null,lf=-1,uf=0;function fr(){return(We&6)!==0?kt():lf!==-1?lf:lf=kt()}function Ki(o){return(o.mode&1)===0?1:(We&2)!==0&&Jt!==0?Jt&-Jt:PM.transition!==null?(uf===0&&(uf=M1()),uf):(o=Je,o!==0||(o=window.event,o=o===void 0?16:W1(o.type)),o)}function hn(o,l,d,m){if(50<jl)throw jl=0,Im=null,Error(r(185));el(o,d,m),((We&2)===0||o!==Ft)&&(o===Ft&&((We&2)===0&&(nf|=d),$t===4&&Vi(o,Jt)),wr(o,m),d===1&&We===0&&(l.mode&1)===0&&(No=kt()+500,Mc&&zi()))}function wr(o,l){var d=o.callbackNode;P3(o,l);var m=vc(o,o===Ft?Jt:0);if(m===0)d!==null&&N1(d),o.callbackNode=null,o.callbackPriority=0;else if(l=m&-m,o.callbackPriority!==l){if(d!=null&&N1(d),l===1)o.tag===0?AM(WS.bind(null,o)):j_(WS.bind(null,o)),SM(function(){(We&6)===0&&zi()}),d=null;else{switch(L1(m)){case 1:d=pp;break;case 4:d=$1;break;case 16:d=hc;break;case 536870912:d=I1;break;default:d=hc}d=ZS(d,HS.bind(null,o))}o.callbackPriority=l,o.callbackNode=d}}function HS(o,l){if(lf=-1,uf=0,(We&6)!==0)throw Error(r(327));var d=o.callbackNode;if($o()&&o.callbackNode!==d)return null;var m=vc(o,o===Ft?Jt:0);if(m===0)return null;if((m&30)!==0||(m&o.expiredLanes)!==0||l)l=cf(o,m);else{l=m;var w=We;We|=2;var S=VS();(Ft!==o||Jt!==l)&&(ti=null,No=kt()+500,Pa(o,l));do try{GM();break}catch(D){KS(o,D)}while(!0);Zp(),rf.current=S,We=w,Pt!==null?l=0:(Ft=null,Jt=0,l=$t)}if(l!==0){if(l===2&&(w=mp(o),w!==0&&(m=w,l=Mm(o,w))),l===1)throw d=Pl,Pa(o,0),Vi(o,m),wr(o,kt()),d;if(l===6)Vi(o,m);else{if(w=o.current.alternate,(m&30)===0&&!KM(w)&&(l=cf(o,m),l===2&&(S=mp(o),S!==0&&(m=S,l=Mm(o,S))),l===1))throw d=Pl,Pa(o,0),Vi(o,m),wr(o,kt()),d;switch(o.finishedWork=w,o.finishedLanes=m,l){case 0:case 1:throw Error(r(345));case 2:Ta(o,br,ti);break;case 3:if(Vi(o,m),(m&130023424)===m&&(l=Nm+500-kt(),10<l)){if(vc(o,0)!==0)break;if(w=o.suspendedLanes,(w&m)!==m){fr(),o.pingedLanes|=o.suspendedLanes&w;break}o.timeoutHandle=Up(Ta.bind(null,o,br,ti),l);break}Ta(o,br,ti);break;case 4:if(Vi(o,m),(m&4194240)===m)break;for(l=o.eventTimes,w=-1;0<m;){var j=31-sn(m);S=1<<j,j=l[j],j>w&&(w=j),m&=~S}if(m=w,m=kt()-m,m=(120>m?120:480>m?480:1080>m?1080:1920>m?1920:3e3>m?3e3:4320>m?4320:1960*WM(m/1960))-m,10<m){o.timeoutHandle=Up(Ta.bind(null,o,br,ti),m);break}Ta(o,br,ti);break;case 5:Ta(o,br,ti);break;default:throw Error(r(329))}}}return wr(o,kt()),o.callbackNode===d?HS.bind(null,o):null}function Mm(o,l){var d=Tl;return o.current.memoizedState.isDehydrated&&(Pa(o,l).flags|=256),o=cf(o,l),o!==2&&(l=br,br=d,l!==null&&Lm(l)),o}function Lm(o){br===null?br=o:br.push.apply(br,o)}function KM(o){for(var l=o;;){if(l.flags&16384){var d=l.updateQueue;if(d!==null&&(d=d.stores,d!==null))for(var m=0;m<d.length;m++){var w=d[m],S=w.getSnapshot;w=w.value;try{if(!ln(S(),w))return!1}catch{return!1}}}if(d=l.child,l.subtreeFlags&16384&&d!==null)d.return=l,l=d;else{if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function Vi(o,l){for(l&=~Rm,l&=~nf,o.suspendedLanes|=l,o.pingedLanes&=~l,o=o.expirationTimes;0<l;){var d=31-sn(l),m=1<<d;o[d]=-1,l&=~m}}function WS(o){if((We&6)!==0)throw Error(r(327));$o();var l=vc(o,0);if((l&1)===0)return wr(o,kt()),null;var d=cf(o,l);if(o.tag!==0&&d===2){var m=mp(o);m!==0&&(l=m,d=Mm(o,m))}if(d===1)throw d=Pl,Pa(o,0),Vi(o,l),wr(o,kt()),d;if(d===6)throw Error(r(345));return o.finishedWork=o.current.alternate,o.finishedLanes=l,Ta(o,br,ti),wr(o,kt()),null}function Dm(o,l){var d=We;We|=1;try{return o(l)}finally{We=d,We===0&&(No=kt()+500,Mc&&zi())}}function Aa(o){Wi!==null&&Wi.tag===0&&(We&6)===0&&$o();var l=We;We|=1;var d=Vr.transition,m=Je;try{if(Vr.transition=null,Je=1,o)return o()}finally{Je=m,Vr.transition=d,We=l,(We&6)===0&&zi()}}function Bm(){Rr=Ro.current,ft(Ro)}function Pa(o,l){o.finishedWork=null,o.finishedLanes=0;var d=o.timeoutHandle;if(d!==-1&&(o.timeoutHandle=-1,_M(d)),Pt!==null)for(d=Pt.return;d!==null;){var m=d;switch(Gp(m),m.tag){case 1:m=m.type.childContextTypes,m!=null&&$c();break;case 3:To(),ft(gr),ft(ir),sm();break;case 5:am(m);break;case 4:To();break;case 13:ft(yt);break;case 19:ft(yt);break;case 10:em(m.type._context);break;case 22:case 23:Bm()}d=d.return}if(Ft=o,Pt=o=Gi(o.current,null),Jt=Rr=l,$t=0,Pl=null,Rm=nf=Oa=0,br=Tl=null,Sa!==null){for(l=0;l<Sa.length;l++)if(d=Sa[l],m=d.interleaved,m!==null){d.interleaved=null;var w=m.next,S=d.pending;if(S!==null){var j=S.next;S.next=w,m.next=j}d.pending=m}Sa=null}return o}function KS(o,l){do{var d=Pt;try{if(Zp(),Kc.current=Yc,Vc){for(var m=bt.memoizedState;m!==null;){var w=m.queue;w!==null&&(w.pending=null),m=m.next}Vc=!1}if(Ea=0,Ut=Nt=bt=null,_l=!1,Sl=0,Cm.current=null,d===null||d.return===null){$t=1,Pl=l,Pt=null;break}e:{var S=o,j=d.return,D=d,F=l;if(l=Jt,D.flags|=32768,F!==null&&typeof F=="object"&&typeof F.then=="function"){var ee=F,le=D,ue=le.tag;if((le.mode&1)===0&&(ue===0||ue===11||ue===15)){var oe=le.alternate;oe?(le.updateQueue=oe.updateQueue,le.memoizedState=oe.memoizedState,le.lanes=oe.lanes):(le.updateQueue=null,le.memoizedState=null)}var me=vS(j);if(me!==null){me.flags&=-257,yS(me,j,D,S,l),me.mode&1&&gS(S,ee,l),l=me,F=ee;var we=l.updateQueue;if(we===null){var Se=new Set;Se.add(F),l.updateQueue=Se}else we.add(F);break e}else{if((l&1)===0){gS(S,ee,l),zm();break e}F=Error(r(426))}}else if(mt&&D.mode&1){var Et=vS(j);if(Et!==null){(Et.flags&65536)===0&&(Et.flags|=256),yS(Et,j,D,S,l),Jp(jo(F,D));break e}}S=F=jo(F,D),$t!==4&&($t=2),Tl===null?Tl=[S]:Tl.push(S),S=j;do{switch(S.tag){case 3:S.flags|=65536,l&=-l,S.lanes|=l;var Y=pS(S,F,l);q_(S,Y);break e;case 1:D=F;var W=S.type,Q=S.stateNode;if((S.flags&128)===0&&(typeof W.getDerivedStateFromError=="function"||Q!==null&&typeof Q.componentDidCatch=="function"&&(Hi===null||!Hi.has(Q)))){S.flags|=65536,l&=-l,S.lanes|=l;var ce=mS(S,D,l);q_(S,ce);break e}}S=S.return}while(S!==null)}XS(d)}catch(ke){l=ke,Pt===d&&d!==null&&(Pt=d=d.return);continue}break}while(!0)}function VS(){var o=rf.current;return rf.current=Yc,o===null?Yc:o}function zm(){($t===0||$t===3||$t===2)&&($t=4),Ft===null||(Oa&268435455)===0&&(nf&268435455)===0||Vi(Ft,Jt)}function cf(o,l){var d=We;We|=2;var m=VS();(Ft!==o||Jt!==l)&&(ti=null,Pa(o,l));do try{VM();break}catch(w){KS(o,w)}while(!0);if(Zp(),We=d,rf.current=m,Pt!==null)throw Error(r(261));return Ft=null,Jt=0,$t}function VM(){for(;Pt!==null;)GS(Pt)}function GM(){for(;Pt!==null&&!b3();)GS(Pt)}function GS(o){var l=QS(o.alternate,o,Rr);o.memoizedProps=o.pendingProps,l===null?XS(o):Pt=l,Cm.current=null}function XS(o){var l=o;do{var d=l.alternate;if(o=l.return,(l.flags&32768)===0){if(d=zM(d,l,Rr),d!==null){Pt=d;return}}else{if(d=qM(d,l),d!==null){d.flags&=32767,Pt=d;return}if(o!==null)o.flags|=32768,o.subtreeFlags=0,o.deletions=null;else{$t=6,Pt=null;return}}if(l=l.sibling,l!==null){Pt=l;return}Pt=l=o}while(l!==null);$t===0&&($t=5)}function Ta(o,l,d){var m=Je,w=Vr.transition;try{Vr.transition=null,Je=1,XM(o,l,d,m)}finally{Vr.transition=w,Je=m}return null}function XM(o,l,d,m){do $o();while(Wi!==null);if((We&6)!==0)throw Error(r(327));d=o.finishedWork;var w=o.finishedLanes;if(d===null)return null;if(o.finishedWork=null,o.finishedLanes=0,d===o.current)throw Error(r(177));o.callbackNode=null,o.callbackPriority=0;var S=d.lanes|d.childLanes;if(T3(o,S),o===Ft&&(Pt=Ft=null,Jt=0),(d.subtreeFlags&2064)===0&&(d.flags&2064)===0||of||(of=!0,ZS(hc,function(){return $o(),null})),S=(d.flags&15990)!==0,(d.subtreeFlags&15990)!==0||S){S=Vr.transition,Vr.transition=null;var j=Je;Je=1;var D=We;We|=4,Cm.current=null,FM(o,d),BS(d,o),mM(zp),wc=!!Bp,zp=Bp=null,o.current=d,HM(d),w3(),We=D,Je=j,Vr.transition=S}else o.current=d;if(of&&(of=!1,Wi=o,sf=w),S=o.pendingLanes,S===0&&(Hi=null),S3(d.stateNode),wr(o,kt()),l!==null)for(m=o.onRecoverableError,d=0;d<l.length;d++)w=l[d],m(w.value,{componentStack:w.stack,digest:w.digest});if(af)throw af=!1,o=$m,$m=null,o;return(sf&1)!==0&&o.tag!==0&&$o(),S=o.pendingLanes,(S&1)!==0?o===Im?jl++:(jl=0,Im=o):jl=0,zi(),null}function $o(){if(Wi!==null){var o=L1(sf),l=Vr.transition,d=Je;try{if(Vr.transition=null,Je=16>o?16:o,Wi===null)var m=!1;else{if(o=Wi,Wi=null,sf=0,(We&6)!==0)throw Error(r(331));var w=We;for(We|=4,ve=o.current;ve!==null;){var S=ve,j=S.child;if((ve.flags&16)!==0){var D=S.deletions;if(D!==null){for(var F=0;F<D.length;F++){var ee=D[F];for(ve=ee;ve!==null;){var le=ve;switch(le.tag){case 0:case 11:case 15:Al(8,le,S)}var ue=le.child;if(ue!==null)ue.return=le,ve=ue;else for(;ve!==null;){le=ve;var oe=le.sibling,me=le.return;if($S(le),le===ee){ve=null;break}if(oe!==null){oe.return=me,ve=oe;break}ve=me}}}var we=S.alternate;if(we!==null){var Se=we.child;if(Se!==null){we.child=null;do{var Et=Se.sibling;Se.sibling=null,Se=Et}while(Se!==null)}}ve=S}}if((S.subtreeFlags&2064)!==0&&j!==null)j.return=S,ve=j;else e:for(;ve!==null;){if(S=ve,(S.flags&2048)!==0)switch(S.tag){case 0:case 11:case 15:Al(9,S,S.return)}var Y=S.sibling;if(Y!==null){Y.return=S.return,ve=Y;break e}ve=S.return}}var W=o.current;for(ve=W;ve!==null;){j=ve;var Q=j.child;if((j.subtreeFlags&2064)!==0&&Q!==null)Q.return=j,ve=Q;else e:for(j=W;ve!==null;){if(D=ve,(D.flags&2048)!==0)try{switch(D.tag){case 0:case 11:case 15:tf(9,D)}}catch(ke){wt(D,D.return,ke)}if(D===j){ve=null;break e}var ce=D.sibling;if(ce!==null){ce.return=D.return,ve=ce;break e}ve=D.return}}if(We=w,zi(),Pn&&typeof Pn.onPostCommitFiberRoot=="function")try{Pn.onPostCommitFiberRoot(pc,o)}catch{}m=!0}return m}finally{Je=d,Vr.transition=l}}return!1}function YS(o,l,d){l=jo(d,l),l=pS(o,l,1),o=Ui(o,l,1),l=fr(),o!==null&&(el(o,1,l),wr(o,l))}function wt(o,l,d){if(o.tag===3)YS(o,o,d);else for(;l!==null;){if(l.tag===3){YS(l,o,d);break}else if(l.tag===1){var m=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(Hi===null||!Hi.has(m))){o=jo(d,o),o=mS(l,o,1),l=Ui(l,o,1),o=fr(),l!==null&&(el(l,1,o),wr(l,o));break}}l=l.return}}function YM(o,l,d){var m=o.pingCache;m!==null&&m.delete(l),l=fr(),o.pingedLanes|=o.suspendedLanes&d,Ft===o&&(Jt&d)===d&&($t===4||$t===3&&(Jt&130023424)===Jt&&500>kt()-Nm?Pa(o,0):Rm|=d),wr(o,l)}function JS(o,l){l===0&&((o.mode&1)===0?l=1:(l=gc,gc<<=1,(gc&130023424)===0&&(gc=4194304)));var d=fr();o=Qn(o,l),o!==null&&(el(o,l,d),wr(o,d))}function JM(o){var l=o.memoizedState,d=0;l!==null&&(d=l.retryLane),JS(o,d)}function QM(o,l){var d=0;switch(o.tag){case 13:var m=o.stateNode,w=o.memoizedState;w!==null&&(d=w.retryLane);break;case 19:m=o.stateNode;break;default:throw Error(r(314))}m!==null&&m.delete(l),JS(o,d)}var QS;QS=function(o,l,d){if(o!==null)if(o.memoizedProps!==l.pendingProps||gr.current)yr=!0;else{if((o.lanes&d)===0&&(l.flags&128)===0)return yr=!1,BM(o,l,d);yr=(o.flags&131072)!==0}else yr=!1,mt&&(l.flags&1048576)!==0&&C_(l,Dc,l.index);switch(l.lanes=0,l.tag){case 2:var m=l.type;Zc(o,l),o=l.pendingProps;var w=_o(l,ir.current);Po(l,d),w=cm(null,l,m,o,w,d);var S=fm();return l.flags|=1,typeof w=="object"&&w!==null&&typeof w.render=="function"&&w.$$typeof===void 0?(l.tag=1,l.memoizedState=null,l.updateQueue=null,vr(m)?(S=!0,Ic(l)):S=!1,l.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,nm(l),w.updater=Jc,l.stateNode=w,w._reactInternals=l,vm(l,m,o,d),l=xm(null,l,m,!0,S,d)):(l.tag=0,mt&&S&&Vp(l),cr(null,l,w,d),l=l.child),l;case 16:m=l.elementType;e:{switch(Zc(o,l),o=l.pendingProps,w=m._init,m=w(m._payload),l.type=m,w=l.tag=eL(m),o=cn(m,o),w){case 0:l=wm(null,l,m,o,d);break e;case 1:l=kS(null,l,m,o,d);break e;case 11:l=bS(null,l,m,o,d);break e;case 14:l=wS(null,l,m,cn(m.type,o),d);break e}throw Error(r(306,m,""))}return l;case 0:return m=l.type,w=l.pendingProps,w=l.elementType===m?w:cn(m,w),wm(o,l,m,w,d);case 1:return m=l.type,w=l.pendingProps,w=l.elementType===m?w:cn(m,w),kS(o,l,m,w,d);case 3:e:{if(ES(l),o===null)throw Error(r(387));m=l.pendingProps,S=l.memoizedState,w=S.element,z_(o,l),Hc(l,m,null,d);var j=l.memoizedState;if(m=j.element,S.isDehydrated)if(S={element:m,isDehydrated:!1,cache:j.cache,pendingSuspenseBoundaries:j.pendingSuspenseBoundaries,transitions:j.transitions},l.updateQueue.baseState=S,l.memoizedState=S,l.flags&256){w=jo(Error(r(423)),l),l=OS(o,l,m,d,w);break e}else if(m!==w){w=jo(Error(r(424)),l),l=OS(o,l,m,d,w);break e}else for(Cr=Li(l.stateNode.containerInfo.firstChild),jr=l,mt=!0,un=null,d=D_(l,null,m,d),l.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(Eo(),m===w){l=ei(o,l,d);break e}cr(o,l,m,d)}l=l.child}return l;case 5:return F_(l),o===null&&Yp(l),m=l.type,w=l.pendingProps,S=o!==null?o.memoizedProps:null,j=w.children,qp(m,w)?j=null:S!==null&&qp(m,S)&&(l.flags|=32),SS(o,l),cr(o,l,j,d),l.child;case 6:return o===null&&Yp(l),null;case 13:return AS(o,l,d);case 4:return im(l,l.stateNode.containerInfo),m=l.pendingProps,o===null?l.child=Oo(l,null,m,d):cr(o,l,m,d),l.child;case 11:return m=l.type,w=l.pendingProps,w=l.elementType===m?w:cn(m,w),bS(o,l,m,w,d);case 7:return cr(o,l,l.pendingProps,d),l.child;case 8:return cr(o,l,l.pendingProps.children,d),l.child;case 12:return cr(o,l,l.pendingProps.children,d),l.child;case 10:e:{if(m=l.type._context,w=l.pendingProps,S=l.memoizedProps,j=w.value,nt(qc,m._currentValue),m._currentValue=j,S!==null)if(ln(S.value,j)){if(S.children===w.children&&!gr.current){l=ei(o,l,d);break e}}else for(S=l.child,S!==null&&(S.return=l);S!==null;){var D=S.dependencies;if(D!==null){j=S.child;for(var F=D.firstContext;F!==null;){if(F.context===m){if(S.tag===1){F=Zn(-1,d&-d),F.tag=2;var ee=S.updateQueue;if(ee!==null){ee=ee.shared;var le=ee.pending;le===null?F.next=F:(F.next=le.next,le.next=F),ee.pending=F}}S.lanes|=d,F=S.alternate,F!==null&&(F.lanes|=d),tm(S.return,d,l),D.lanes|=d;break}F=F.next}}else if(S.tag===10)j=S.type===l.type?null:S.child;else if(S.tag===18){if(j=S.return,j===null)throw Error(r(341));j.lanes|=d,D=j.alternate,D!==null&&(D.lanes|=d),tm(j,d,l),j=S.sibling}else j=S.child;if(j!==null)j.return=S;else for(j=S;j!==null;){if(j===l){j=null;break}if(S=j.sibling,S!==null){S.return=j.return,j=S;break}j=j.return}S=j}cr(o,l,w.children,d),l=l.child}return l;case 9:return w=l.type,m=l.pendingProps.children,Po(l,d),w=Wr(w),m=m(w),l.flags|=1,cr(o,l,m,d),l.child;case 14:return m=l.type,w=cn(m,l.pendingProps),w=cn(m.type,w),wS(o,l,m,w,d);case 15:return xS(o,l,l.type,l.pendingProps,d);case 17:return m=l.type,w=l.pendingProps,w=l.elementType===m?w:cn(m,w),Zc(o,l),l.tag=1,vr(m)?(o=!0,Ic(l)):o=!1,Po(l,d),dS(l,m,w),vm(l,m,w,d),xm(null,l,m,!0,o,d);case 19:return TS(o,l,d);case 22:return _S(o,l,d)}throw Error(r(156,l.tag))};function ZS(o,l){return R1(o,l)}function ZM(o,l,d,m){this.tag=o,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Gr(o,l,d,m){return new ZM(o,l,d,m)}function qm(o){return o=o.prototype,!(!o||!o.isReactComponent)}function eL(o){if(typeof o=="function")return qm(o)?1:0;if(o!=null){if(o=o.$$typeof,o===I)return 11;if(o===K)return 14}return 2}function Gi(o,l){var d=o.alternate;return d===null?(d=Gr(o.tag,l,o.key,o.mode),d.elementType=o.elementType,d.type=o.type,d.stateNode=o.stateNode,d.alternate=o,o.alternate=d):(d.pendingProps=l,d.type=o.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=o.flags&14680064,d.childLanes=o.childLanes,d.lanes=o.lanes,d.child=o.child,d.memoizedProps=o.memoizedProps,d.memoizedState=o.memoizedState,d.updateQueue=o.updateQueue,l=o.dependencies,d.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},d.sibling=o.sibling,d.index=o.index,d.ref=o.ref,d}function ff(o,l,d,m,w,S){var j=2;if(m=o,typeof o=="function")qm(o)&&(j=1);else if(typeof o=="string")j=5;else e:switch(o){case C:return ja(d.children,w,S,l);case N:j=8,w|=8;break;case L:return o=Gr(12,d,l,w|2),o.elementType=L,o.lanes=S,o;case q:return o=Gr(13,d,l,w),o.elementType=q,o.lanes=S,o;case U:return o=Gr(19,d,l,w),o.elementType=U,o.lanes=S,o;case Z:return df(d,w,S,l);default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case V:j=10;break e;case $:j=9;break e;case I:j=11;break e;case K:j=14;break e;case G:j=16,m=null;break e}throw Error(r(130,o==null?o:typeof o,""))}return l=Gr(j,d,l,w),l.elementType=o,l.type=m,l.lanes=S,l}function ja(o,l,d,m){return o=Gr(7,o,m,l),o.lanes=d,o}function df(o,l,d,m){return o=Gr(22,o,m,l),o.elementType=Z,o.lanes=d,o.stateNode={isHidden:!1},o}function Um(o,l,d){return o=Gr(6,o,null,l),o.lanes=d,o}function Fm(o,l,d){return l=Gr(4,o.children!==null?o.children:[],o.key,l),l.lanes=d,l.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},l}function tL(o,l,d,m,w){this.tag=l,this.containerInfo=o,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gp(0),this.expirationTimes=gp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gp(0),this.identifierPrefix=m,this.onRecoverableError=w,this.mutableSourceEagerHydrationData=null}function Hm(o,l,d,m,w,S,j,D,F){return o=new tL(o,l,d,D,F),l===1?(l=1,S===!0&&(l|=8)):l=0,S=Gr(3,null,null,l),o.current=S,S.stateNode=o,S.memoizedState={element:m,isDehydrated:d,cache:null,transitions:null,pendingSuspenseBoundaries:null},nm(S),o}function rL(o,l,d){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:P,key:m==null?null:""+m,children:o,containerInfo:l,implementation:d}}function ek(o){if(!o)return Bi;o=o._reactInternals;e:{if(ya(o)!==o||o.tag!==1)throw Error(r(170));var l=o;do{switch(l.tag){case 3:l=l.stateNode.context;break e;case 1:if(vr(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break e}}l=l.return}while(l!==null);throw Error(r(171))}if(o.tag===1){var d=o.type;if(vr(d))return P_(o,d,l)}return l}function tk(o,l,d,m,w,S,j,D,F){return o=Hm(d,m,!0,o,w,S,j,D,F),o.context=ek(null),d=o.current,m=fr(),w=Ki(d),S=Zn(m,w),S.callback=l??null,Ui(d,S,w),o.current.lanes=w,el(o,w,m),wr(o,m),o}function hf(o,l,d,m){var w=l.current,S=fr(),j=Ki(w);return d=ek(d),l.context===null?l.context=d:l.pendingContext=d,l=Zn(S,j),l.payload={element:o},m=m===void 0?null:m,m!==null&&(l.callback=m),o=Ui(w,l,j),o!==null&&(hn(o,w,j,S),Fc(o,w,j)),j}function pf(o){if(o=o.current,!o.child)return null;switch(o.child.tag){case 5:return o.child.stateNode;default:return o.child.stateNode}}function rk(o,l){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var d=o.retryLane;o.retryLane=d!==0&&d<l?d:l}}function Wm(o,l){rk(o,l),(o=o.alternate)&&rk(o,l)}function nL(){return null}var nk=typeof reportError=="function"?reportError:function(o){console.error(o)};function Km(o){this._internalRoot=o}mf.prototype.render=Km.prototype.render=function(o){var l=this._internalRoot;if(l===null)throw Error(r(409));hf(o,l,null,null)},mf.prototype.unmount=Km.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var l=o.containerInfo;Aa(function(){hf(null,o,null,null)}),l[Gn]=null}};function mf(o){this._internalRoot=o}mf.prototype.unstable_scheduleHydration=function(o){if(o){var l=z1();o={blockedOn:null,target:o,priority:l};for(var d=0;d<$i.length&&l!==0&&l<$i[d].priority;d++);$i.splice(d,0,o),d===0&&F1(o)}};function Vm(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function gf(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11&&(o.nodeType!==8||o.nodeValue!==" react-mount-point-unstable "))}function ik(){}function iL(o,l,d,m,w){if(w){if(typeof m=="function"){var S=m;m=function(){var ee=pf(j);S.call(ee)}}var j=tk(l,m,o,0,null,!1,!1,"",ik);return o._reactRootContainer=j,o[Gn]=j.current,pl(o.nodeType===8?o.parentNode:o),Aa(),j}for(;w=o.lastChild;)o.removeChild(w);if(typeof m=="function"){var D=m;m=function(){var ee=pf(F);D.call(ee)}}var F=Hm(o,0,!1,null,null,!1,!1,"",ik);return o._reactRootContainer=F,o[Gn]=F.current,pl(o.nodeType===8?o.parentNode:o),Aa(function(){hf(l,F,d,m)}),F}function vf(o,l,d,m,w){var S=d._reactRootContainer;if(S){var j=S;if(typeof w=="function"){var D=w;w=function(){var F=pf(j);D.call(F)}}hf(l,j,o,w)}else j=iL(d,l,o,w,m);return pf(j)}D1=function(o){switch(o.tag){case 3:var l=o.stateNode;if(l.current.memoizedState.isDehydrated){var d=Zs(l.pendingLanes);d!==0&&(vp(l,d|1),wr(l,kt()),(We&6)===0&&(No=kt()+500,zi()))}break;case 13:Aa(function(){var m=Qn(o,1);if(m!==null){var w=fr();hn(m,o,1,w)}}),Wm(o,1)}},yp=function(o){if(o.tag===13){var l=Qn(o,134217728);if(l!==null){var d=fr();hn(l,o,134217728,d)}Wm(o,134217728)}},B1=function(o){if(o.tag===13){var l=Ki(o),d=Qn(o,l);if(d!==null){var m=fr();hn(d,o,l,m)}Wm(o,l)}},z1=function(){return Je},q1=function(o,l){var d=Je;try{return Je=o,l()}finally{Je=d}},Ys=function(o,l,d){switch(l){case"input":if(pt(o,d),l=d.name,d.type==="radio"&&l!=null){for(d=o;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll("input[name="+JSON.stringify(""+l)+'][type="radio"]'),l=0;l<d.length;l++){var m=d[l];if(m!==o&&m.form===o.form){var w=Nc(m);if(!w)throw Error(r(90));ie(m),pt(m,w)}}}break;case"textarea":ha(o,d);break;case"select":l=d.value,l!=null&&rr(o,!!d.multiple,l,!1)}},Rt=Dm,nr=Aa;var aL={usingClientEntryPoint:!1,Events:[vl,wo,Nc,Me,St,Dm]},Cl={findFiberByHostInstance:ba,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},oL={bundleType:Cl.bundleType,version:Cl.version,rendererPackageName:Cl.rendererPackageName,rendererConfig:Cl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:T.ReactCurrentDispatcher,findHostInstanceByFiber:function(o){return o=j1(o),o===null?null:o.stateNode},findFiberByHostInstance:Cl.findFiberByHostInstance||nL,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 yf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yf.isDisabled&&yf.supportsFiber)try{pc=yf.inject(oL),Pn=yf}catch{}}return xr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=aL,xr.createPortal=function(o,l){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Vm(l))throw Error(r(200));return rL(o,l,null,d)},xr.createRoot=function(o,l){if(!Vm(o))throw Error(r(299));var d=!1,m="",w=nk;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(m=l.identifierPrefix),l.onRecoverableError!==void 0&&(w=l.onRecoverableError)),l=Hm(o,1,!1,null,null,d,!1,m,w),o[Gn]=l.current,pl(o.nodeType===8?o.parentNode:o),new Km(l)},xr.findDOMNode=function(o){if(o==null)return null;if(o.nodeType===1)return o;var l=o._reactInternals;if(l===void 0)throw typeof o.render=="function"?Error(r(188)):(o=Object.keys(o).join(","),Error(r(268,o)));return o=j1(l),o=o===null?null:o.stateNode,o},xr.flushSync=function(o){return Aa(o)},xr.hydrate=function(o,l,d){if(!gf(l))throw Error(r(200));return vf(null,o,l,!0,d)},xr.hydrateRoot=function(o,l,d){if(!Vm(o))throw Error(r(405));var m=d!=null&&d.hydratedSources||null,w=!1,S="",j=nk;if(d!=null&&(d.unstable_strictMode===!0&&(w=!0),d.identifierPrefix!==void 0&&(S=d.identifierPrefix),d.onRecoverableError!==void 0&&(j=d.onRecoverableError)),l=tk(l,null,o,1,d??null,w,!1,S,j),o[Gn]=l.current,pl(o),m)for(o=0;o<m.length;o++)d=m[o],w=d._getVersion,w=w(d._source),l.mutableSourceEagerHydrationData==null?l.mutableSourceEagerHydrationData=[d,w]:l.mutableSourceEagerHydrationData.push(d,w);return new mf(l)},xr.render=function(o,l,d){if(!gf(l))throw Error(r(200));return vf(null,o,l,!1,d)},xr.unmountComponentAtNode=function(o){if(!gf(o))throw Error(r(40));return o._reactRootContainer?(Aa(function(){vf(null,null,o,!1,function(){o._reactRootContainer=null,o[Gn]=null})}),!0):!1},xr.unstable_batchedUpdates=Dm,xr.unstable_renderSubtreeIntoContainer=function(o,l,d,m){if(!gf(d))throw Error(r(200));if(o==null||o._reactInternals===void 0)throw Error(r(38));return vf(o,l,d,!1,m)},xr.version="18.3.1-next-f1338f8080-20240426",xr}var dk;function gC(){if(dk)return Ym.exports;dk=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Ym.exports=mL(),Ym.exports}var hk;function gL(){if(hk)return wf;hk=1;var t=gC();return wf.createRoot=t.createRoot,wf.hydrateRoot=t.hydrateRoot,wf}var vL=gL();/**
|
|
41
|
-
* react-router v7.16.0
|
|
42
|
-
*
|
|
43
|
-
* Copyright (c) Remix Software Inc.
|
|
44
|
-
*
|
|
45
|
-
* This source code is licensed under the MIT license found in the
|
|
46
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
47
|
-
*
|
|
48
|
-
* @license MIT
|
|
49
|
-
*/var pk="popstate";function mk(t){return typeof t=="object"&&t!=null&&"pathname"in t&&"search"in t&&"hash"in t&&"state"in t&&"key"in t}function yL(t={}){function e(n,i){var f;let a=(f=i.state)==null?void 0:f.masked,{pathname:s,search:u,hash:c}=a||n.location;return hb("",{pathname:s,search:u,hash:c},i.state&&i.state.usr||null,i.state&&i.state.key||"default",a?{pathname:n.location.pathname,search:n.location.search,hash:n.location.hash}:void 0)}function r(n,i){return typeof i=="string"?i:fu(i)}return wL(e,r,null,t)}function vt(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function En(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function bL(){return Math.random().toString(36).substring(2,10)}function gk(t,e){return{usr:t.state,key:t.key,idx:e,masked:t.mask?{pathname:t.pathname,search:t.search,hash:t.hash}:void 0}}function hb(t,e,r=null,n,i){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof e=="string"?$s(e):e,state:r,key:e&&e.key||n||bL(),mask:i}}function fu({pathname:t="/",search:e="",hash:r=""}){return e&&e!=="?"&&(t+=e.charAt(0)==="?"?e:"?"+e),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function $s(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substring(r),t=t.substring(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substring(n),t=t.substring(0,n)),t&&(e.pathname=t)}return e}function wL(t,e,r,n={}){let{window:i=document.defaultView,v5Compat:a=!1}=n,s=i.history,u="POP",c=null,f=p();f==null&&(f=0,s.replaceState({...s.state,idx:f},""));function p(){return(s.state||{idx:null}).idx}function h(){u="POP";let y=p(),k=y==null?null:y-f;f=y,c&&c({action:u,location:x.location,delta:k})}function g(y,k){u="PUSH";let O=mk(y)?y:hb(x.location,y,k);f=p()+1;let A=gk(O,f),T=x.createHref(O.mask||O);try{s.pushState(A,"",T)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;i.location.assign(T)}a&&c&&c({action:u,location:x.location,delta:1})}function v(y,k){u="REPLACE";let O=mk(y)?y:hb(x.location,y,k);f=p();let A=gk(O,f),T=x.createHref(O.mask||O);s.replaceState(A,"",T),a&&c&&c({action:u,location:x.location,delta:0})}function b(y){return xL(i,y)}let x={get action(){return u},get location(){return t(i,s)},listen(y){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(pk,h),c=y,()=>{i.removeEventListener(pk,h),c=null}},createHref(y){return e(i,y)},createURL:b,encodeLocation(y){let k=b(y);return{pathname:k.pathname,search:k.search,hash:k.hash}},push:g,replace:v,go(y){return s.go(y)}};return x}function xL(t,e,r=!1){let n="http://localhost";t&&(n=t.location.origin!=="null"?t.location.origin:t.location.href),vt(n,"No window.location.(origin|href) available to create URL");let i=typeof e=="string"?e:fu(e);return i=i.replace(/ $/,"%20"),!r&&i.startsWith("//")&&(i=n+i),new URL(i,n)}function vC(t,e,r="/"){return _L(t,e,r,!1)}function _L(t,e,r,n,i){let a=typeof e=="string"?$s(e):e,s=gi(a.pathname||"/",r);if(s==null)return null;let u=SL(t),c=null,f=IL(s);for(let p=0;c==null&&p<u.length;++p)c=NL(u[p],f,n);return c}function SL(t){let e=yC(t);return kL(e),e}function yC(t,e=[],r=[],n="",i=!1){let a=(s,u,c=i,f)=>{let p={relativePath:f===void 0?s.path||"":f,caseSensitive:s.caseSensitive===!0,childrenIndex:u,route:s};if(p.relativePath.startsWith("/")){if(!p.relativePath.startsWith(n)&&c)return;vt(p.relativePath.startsWith(n),`Absolute route path "${p.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(n.length)}let h=kn([n,p.relativePath]),g=r.concat(p);s.children&&s.children.length>0&&(vt(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),yC(s.children,e,g,h,c)),!(s.path==null&&!s.index)&&e.push({path:h,score:CL(h,s.index),routesMeta:g})};return t.forEach((s,u)=>{var c;if(s.path===""||!((c=s.path)!=null&&c.includes("?")))a(s,u);else for(let f of bC(s.path))a(s,u,!0,f)}),e}function bC(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,i=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return i?[a,""]:[a];let s=bC(n.join("/")),u=[];return u.push(...s.map(c=>c===""?a:[a,c].join("/"))),i&&u.push(...s),u.map(c=>t.startsWith("/")&&c===""?"/":c)}function kL(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:RL(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var EL=/^:[\w-]+$/,OL=3,AL=2,PL=1,TL=10,jL=-2,vk=t=>t==="*";function CL(t,e){let r=t.split("/"),n=r.length;return r.some(vk)&&(n+=jL),e&&(n+=AL),r.filter(i=>!vk(i)).reduce((i,a)=>i+(EL.test(a)?OL:a===""?PL:TL),n)}function RL(t,e){return t.length===e.length&&t.slice(0,-1).every((n,i)=>n===e[i])?t[t.length-1]-e[e.length-1]:0}function NL(t,e,r=!1){let{routesMeta:n}=t,i={},a="/",s=[];for(let u=0;u<n.length;++u){let c=n[u],f=u===n.length-1,p=a==="/"?e:e.slice(a.length)||"/",h=rd({path:c.relativePath,caseSensitive:c.caseSensitive,end:f},p),g=c.route;if(!h&&f&&r&&!n[n.length-1].route.index&&(h=rd({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},p)),!h)return null;Object.assign(i,h.params),s.push({params:i,pathname:kn([a,h.pathname]),pathnameBase:BL(kn([a,h.pathnameBase])),route:g}),h.pathnameBase!=="/"&&(a=kn([a,h.pathnameBase]))}return s}function rd(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,n]=$L(t.path,t.caseSensitive,t.end),i=e.match(r);if(!i)return null;let a=i[0],s=a.replace(/(.)\/+$/,"$1"),u=i.slice(1);return{params:n.reduce((f,{paramName:p,isOptional:h},g)=>{if(p==="*"){let b=u[g]||"";s=a.slice(0,a.length-b.length).replace(/(.)\/+$/,"$1")}const v=u[g];return h&&!v?f[p]=void 0:f[p]=(v||"").replace(/%2F/g,"/"),f},{}),pathname:a,pathnameBase:s,pattern:t}}function $L(t,e=!1,r=!0){En(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,u,c,f,p)=>{if(n.push({paramName:u,isOptional:c!=null}),c){let h=p.charAt(f+s.length);return h&&h!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(n.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}function IL(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return En(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),t}}function gi(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}var ML=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function LL(t,e="/"){let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?$s(t):t,a;return r?(r=wC(r),r.startsWith("/")?a=yk(r.substring(1),"/"):a=yk(r,e)):a=e,{pathname:a,search:zL(n),hash:qL(i)}}function yk(t,e){let r=nd(e).split("/");return t.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function Zm(t,e,r,n){return`Cannot include a '${t}' character in a manually specified \`to.${e}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function DL(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function nx(t){let e=DL(t);return e.map((r,n)=>n===e.length-1?r.pathname:r.pathnameBase)}function gh(t,e,r,n=!1){let i;typeof t=="string"?i=$s(t):(i={...t},vt(!i.pathname||!i.pathname.includes("?"),Zm("?","pathname","search",i)),vt(!i.pathname||!i.pathname.includes("#"),Zm("#","pathname","hash",i)),vt(!i.search||!i.search.includes("#"),Zm("#","search","hash",i)));let a=t===""||i.pathname==="",s=a?"/":i.pathname,u;if(s==null)u=r;else{let h=e.length-1;if(!n&&s.startsWith("..")){let g=s.split("/");for(;g[0]==="..";)g.shift(),h-=1;i.pathname=g.join("/")}u=h>=0?e[h]:"/"}let c=LL(i,u),f=s&&s!=="/"&&s.endsWith("/"),p=(a||s===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(f||p)&&(c.pathname+="/"),c}var wC=t=>t.replace(/\/\/+/g,"/"),kn=t=>wC(t.join("/")),nd=t=>t.replace(/\/+$/,""),BL=t=>nd(t).replace(/^\/*/,"/"),zL=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,qL=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,UL=class{constructor(t,e,r,n=!1){this.status=t,this.statusText=e||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function FL(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function HL(t){let e=t.map(r=>r.route.path).filter(Boolean);return kn(e)||"/"}var xC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function _C(t,e){let r=t;if(typeof r!="string"||!ML.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,i=!1;if(xC)try{let a=new URL(window.location.href),s=r.startsWith("//")?new URL(a.protocol+r):new URL(r),u=gi(s.pathname,e);s.origin===a.origin&&u!=null?r=u+s.search+s.hash:i=!0}catch{En(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:i,to:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var SC=["POST","PUT","PATCH","DELETE"];new Set(SC);var WL=["GET",...SC];new Set(WL);var Is=R.createContext(null);Is.displayName="DataRouter";var vh=R.createContext(null);vh.displayName="DataRouterState";var kC=R.createContext(!1);function KL(){return R.useContext(kC)}var EC=R.createContext({isTransitioning:!1});EC.displayName="ViewTransition";var VL=R.createContext(new Map);VL.displayName="Fetchers";var GL=R.createContext(null);GL.displayName="Await";var Dr=R.createContext(null);Dr.displayName="Navigation";var Zu=R.createContext(null);Zu.displayName="Location";var an=R.createContext({outlet:null,matches:[],isDataRoute:!1});an.displayName="Route";var ix=R.createContext(null);ix.displayName="RouteError";var OC="REACT_ROUTER_ERROR",XL="REDIRECT",YL="ROUTE_ERROR_RESPONSE";function JL(t){if(t.startsWith(`${OC}:${XL}:{`))try{let e=JSON.parse(t.slice(28));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.location=="string"&&typeof e.reloadDocument=="boolean"&&typeof e.replace=="boolean")return e}catch{}}function QL(t){if(t.startsWith(`${OC}:${YL}:{`))try{let e=JSON.parse(t.slice(40));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string")return new UL(e.status,e.statusText,e.data)}catch{}}function ZL(t,{relative:e}={}){vt(Ms(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=R.useContext(Dr),{hash:i,pathname:a,search:s}=ec(t,{relative:e}),u=a;return r!=="/"&&(u=a==="/"?r:kn([r,a])),n.createHref({pathname:u,search:s,hash:i})}function Ms(){return R.useContext(Zu)!=null}function On(){return vt(Ms(),"useLocation() may be used only in the context of a <Router> component."),R.useContext(Zu).location}var AC="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function PC(t){R.useContext(Dr).static||R.useLayoutEffect(t)}function yh(){let{isDataRoute:t}=R.useContext(an);return t?mD():eD()}function eD(){vt(Ms(),"useNavigate() may be used only in the context of a <Router> component.");let t=R.useContext(Is),{basename:e,navigator:r}=R.useContext(Dr),{matches:n}=R.useContext(an),{pathname:i}=On(),a=JSON.stringify(nx(n)),s=R.useRef(!1);return PC(()=>{s.current=!0}),R.useCallback((c,f={})=>{if(En(s.current,AC),!s.current)return;if(typeof c=="number"){r.go(c);return}let p=gh(c,JSON.parse(a),i,f.relative==="path");t==null&&e!=="/"&&(p.pathname=p.pathname==="/"?e:kn([e,p.pathname])),(f.replace?r.replace:r.push)(p,f.state,f)},[e,r,a,i,t])}var tD=R.createContext(null);function rD(t){let e=R.useContext(an).outlet;return R.useMemo(()=>e&&R.createElement(tD.Provider,{value:t},e),[e,t])}function nD(){let{matches:t}=R.useContext(an),e=t[t.length-1];return(e==null?void 0:e.params)??{}}function ec(t,{relative:e}={}){let{matches:r}=R.useContext(an),{pathname:n}=On(),i=JSON.stringify(nx(r));return R.useMemo(()=>gh(t,JSON.parse(i),n,e==="path"),[t,i,n,e])}function iD(t,e){return TC(t,e)}function TC(t,e,r){var y;vt(Ms(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=R.useContext(Dr),{matches:i}=R.useContext(an),a=i[i.length-1],s=a?a.params:{},u=a?a.pathname:"/",c=a?a.pathnameBase:"/",f=a&&a.route;{let k=f&&f.path||"";CC(u,!f||k.endsWith("*")||k.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${k}">) 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.
|
|
50
|
-
|
|
51
|
-
Please change the parent <Route path="${k}"> to <Route path="${k==="/"?"*":`${k}/*`}">.`)}let p=On(),h;if(e){let k=typeof e=="string"?$s(e):e;vt(c==="/"||((y=k.pathname)==null?void 0:y.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 "${k.pathname}" was given in the \`location\` prop.`),h=k}else h=p;let g=h.pathname||"/",v=g;if(c!=="/"){let k=c.replace(/^\//,"").split("/");v="/"+g.replace(/^\//,"").split("/").slice(k.length).join("/")}let b=r&&r.state.matches.length?r.state.matches.map(k=>Object.assign(k,{route:r.manifest[k.route.id]||k.route})):vC(t,{pathname:v});En(f||b!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),En(b==null||b[b.length-1].route.element!==void 0||b[b.length-1].route.Component!==void 0||b[b.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.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 x=uD(b&&b.map(k=>Object.assign({},k,{params:Object.assign({},s,k.params),pathname:kn([c,n.encodeLocation?n.encodeLocation(k.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?c:kn([c,n.encodeLocation?n.encodeLocation(k.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathnameBase])})),i,r);return e&&x?R.createElement(Zu.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...h},navigationType:"POP"}},x):x}function aD(){let t=pD(),e=FL(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,n="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:n},a={padding:"2px 4px",backgroundColor:n},s=null;return console.error("Error handled by React Router default ErrorBoundary:",t),s=R.createElement(R.Fragment,null,R.createElement("p",null,"💿 Hey developer 👋"),R.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",R.createElement("code",{style:a},"ErrorBoundary")," or"," ",R.createElement("code",{style:a},"errorElement")," prop on your route.")),R.createElement(R.Fragment,null,R.createElement("h2",null,"Unexpected Application Error!"),R.createElement("h3",{style:{fontStyle:"italic"}},e),r?R.createElement("pre",{style:i},r):null,s)}var oD=R.createElement(aD,null),jC=class extends R.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){this.props.onError?this.props.onError(t,e):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const r=QL(t.digest);r&&(t=r)}let e=t!==void 0?R.createElement(an.Provider,{value:this.props.routeContext},R.createElement(ix.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?R.createElement(sD,{error:t},e):e}};jC.contextType=kC;var eg=new WeakMap;function sD({children:t,error:e}){let{basename:r}=R.useContext(Dr);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let n=JL(e.digest);if(n){let i=eg.get(e);if(i)throw i;let a=_C(n.location,r);if(xC&&!eg.get(e))if(a.isExternal||n.reloadDocument)window.location.href=a.absoluteURL||a.to;else{const s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:n.replace}));throw eg.set(e,s),s}return R.createElement("meta",{httpEquiv:"refresh",content:`0;url=${a.absoluteURL||a.to}`})}}return t}function lD({routeContext:t,match:e,children:r}){let n=R.useContext(Is);return n&&n.static&&n.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=e.route.id),R.createElement(an.Provider,{value:t},r)}function uD(t,e=[],r){let n=r==null?void 0:r.state;if(t==null){if(!n)return null;if(n.errors)t=n.matches;else if(e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let i=t,a=n==null?void 0:n.errors;if(a!=null){let p=i.findIndex(h=>h.route.id&&(a==null?void 0:a[h.route.id])!==void 0);vt(p>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),i=i.slice(0,Math.min(i.length,p+1))}let s=!1,u=-1;if(r&&n){s=n.renderFallback;for(let p=0;p<i.length;p++){let h=i[p];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(u=p),h.route.id){let{loaderData:g,errors:v}=n,b=h.route.loader&&!g.hasOwnProperty(h.route.id)&&(!v||v[h.route.id]===void 0);if(h.route.lazy||b){r.isStatic&&(s=!0),u>=0?i=i.slice(0,u+1):i=[i[0]];break}}}}let c=r==null?void 0:r.onError,f=n&&c?(p,h)=>{var g,v;c(p,{location:n.location,params:((v=(g=n.matches)==null?void 0:g[0])==null?void 0:v.params)??{},pattern:HL(n.matches),errorInfo:h})}:void 0;return i.reduceRight((p,h,g)=>{let v,b=!1,x=null,y=null;n&&(v=a&&h.route.id?a[h.route.id]:void 0,x=h.route.errorElement||oD,s&&(u<0&&g===0?(CC("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),b=!0,y=null):u===g&&(b=!0,y=h.route.hydrateFallbackElement||null)));let k=e.concat(i.slice(0,g+1)),O=()=>{let A;return v?A=x:b?A=y:h.route.Component?A=R.createElement(h.route.Component,null):h.route.element?A=h.route.element:A=p,R.createElement(lD,{match:h,routeContext:{outlet:p,matches:k,isDataRoute:n!=null},children:A})};return n&&(h.route.ErrorBoundary||h.route.errorElement||g===0)?R.createElement(jC,{location:n.location,revalidation:n.revalidation,component:x,error:v,children:O(),routeContext:{outlet:null,matches:k,isDataRoute:!0},onError:f}):O()},null)}function ax(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function cD(t){let e=R.useContext(Is);return vt(e,ax(t)),e}function fD(t){let e=R.useContext(vh);return vt(e,ax(t)),e}function dD(t){let e=R.useContext(an);return vt(e,ax(t)),e}function ox(t){let e=dD(t),r=e.matches[e.matches.length-1];return vt(r.route.id,`${t} can only be used on routes that contain a unique "id"`),r.route.id}function hD(){return ox("useRouteId")}function pD(){var n;let t=R.useContext(ix),e=fD("useRouteError"),r=ox("useRouteError");return t!==void 0?t:(n=e.errors)==null?void 0:n[r]}function mD(){let{router:t}=cD("useNavigate"),e=ox("useNavigate"),r=R.useRef(!1);return PC(()=>{r.current=!0}),R.useCallback(async(i,a={})=>{En(r.current,AC),r.current&&(typeof i=="number"?await t.navigate(i):await t.navigate(i,{fromRouteId:e,...a}))},[t,e])}var bk={};function CC(t,e,r){!e&&!bk[t]&&(bk[t]=!0,En(!1,r))}R.memo(gD);function gD({routes:t,manifest:e,future:r,state:n,isStatic:i,onError:a}){return TC(t,void 0,{manifest:e,state:n,isStatic:i,onError:a})}function vD({to:t,replace:e,state:r,relative:n}){vt(Ms(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=R.useContext(Dr);En(!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}=R.useContext(an),{pathname:s}=On(),u=yh(),c=gh(t,nx(a),s,n==="path"),f=JSON.stringify(c);return R.useEffect(()=>{u(JSON.parse(f),{replace:e,state:r,relative:n})},[u,f,n,e,r]),null}function yD(t){return rD(t.context)}function Qr(t){vt(!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 bD({basename:t="/",children:e=null,location:r,navigationType:n="POP",navigator:i,static:a=!1,useTransitions:s}){vt(!Ms(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=t.replace(/^\/*/,"/"),c=R.useMemo(()=>({basename:u,navigator:i,static:a,useTransitions:s,future:{}}),[u,i,a,s]);typeof r=="string"&&(r=$s(r));let{pathname:f="/",search:p="",hash:h="",state:g=null,key:v="default",mask:b}=r,x=R.useMemo(()=>{let y=gi(f,u);return y==null?null:{location:{pathname:y,search:p,hash:h,state:g,key:v,mask:b},navigationType:n}},[u,f,p,h,g,v,n,b]);return En(x!=null,`<Router basename="${u}"> is not able to match the URL "${f}${p}${h}" because it does not start with the basename, so the <Router> won't render anything.`),x==null?null:R.createElement(Dr.Provider,{value:c},R.createElement(Zu.Provider,{children:e,value:x}))}function wD({children:t,location:e}){return iD(pb(t),e)}function pb(t,e=[]){let r=[];return R.Children.forEach(t,(n,i)=>{if(!R.isValidElement(n))return;let a=[...e,i];if(n.type===R.Fragment){r.push.apply(r,pb(n.props.children,a));return}vt(n.type===Qr,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),vt(!n.props.index||!n.props.children,"An index route cannot have child routes.");let s={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(s.children=pb(n.props.children,a)),r.push(s)}),r}var Jf="get",Qf="application/x-www-form-urlencoded";function bh(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function xD(t){return bh(t)&&t.tagName.toLowerCase()==="button"}function _D(t){return bh(t)&&t.tagName.toLowerCase()==="form"}function SD(t){return bh(t)&&t.tagName.toLowerCase()==="input"}function kD(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function ED(t,e){return t.button===0&&(!e||e==="_self")&&!kD(t)}var xf=null;function OD(){if(xf===null)try{new FormData(document.createElement("form"),0),xf=!1}catch{xf=!0}return xf}var AD=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function tg(t){return t!=null&&!AD.has(t)?(En(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Qf}"`),null):t}function PD(t,e){let r,n,i,a,s;if(_D(t)){let u=t.getAttribute("action");n=u?gi(u,e):null,r=t.getAttribute("method")||Jf,i=tg(t.getAttribute("enctype"))||Qf,a=new FormData(t)}else if(xD(t)||SD(t)&&(t.type==="submit"||t.type==="image")){let u=t.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=t.getAttribute("formaction")||u.getAttribute("action");if(n=c?gi(c,e):null,r=t.getAttribute("formmethod")||u.getAttribute("method")||Jf,i=tg(t.getAttribute("formenctype"))||tg(u.getAttribute("enctype"))||Qf,a=new FormData(u,t),!OD()){let{name:f,type:p,value:h}=t;if(p==="image"){let g=f?`${f}.`:"";a.append(`${g}x`,"0"),a.append(`${g}y`,"0")}else f&&a.append(f,h)}}else{if(bh(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Jf,n=null,i=Qf,s=t}return a&&i==="text/plain"&&(s=a,a=void 0),{action:n,method:r.toLowerCase(),encType:i,formData:a,body:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function sx(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function RC(t,e,r,n){let i=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return r?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${n}`:i.pathname=`${i.pathname}.${n}`:i.pathname==="/"?i.pathname=`_root.${n}`:e&&gi(i.pathname,e)==="/"?i.pathname=`${nd(e)}/_root.${n}`:i.pathname=`${nd(i.pathname)}.${n}`,i}async function TD(t,e){if(t.id in e)return e[t.id];try{let r=await import(t.module);return e[t.id]=r,r}catch(r){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function jD(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function CD(t,e,r){let n=await Promise.all(t.map(async i=>{let a=e.routes[i.route.id];if(a){let s=await TD(a,r);return s.links?s.links():[]}return[]}));return ID(n.flat(1).filter(jD).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function wk(t,e,r,n,i,a){let s=(c,f)=>r[f]?c.route.id!==r[f].route.id:!0,u=(c,f)=>{var p;return r[f].pathname!==c.pathname||((p=r[f].route.path)==null?void 0:p.endsWith("*"))&&r[f].params["*"]!==c.params["*"]};return a==="assets"?e.filter((c,f)=>s(c,f)||u(c,f)):a==="data"?e.filter((c,f)=>{var h;let p=n.routes[c.route.id];if(!p||!p.hasLoader)return!1;if(s(c,f)||u(c,f))return!0;if(c.route.shouldRevalidate){let g=c.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((h=r[0])==null?void 0:h.params)||{},nextUrl:new URL(t,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function RD(t,e,{includeHydrateFallback:r}={}){return ND(t.map(n=>{let i=e.routes[n.route.id];if(!i)return[];let a=[i.module];return i.clientActionModule&&(a=a.concat(i.clientActionModule)),i.clientLoaderModule&&(a=a.concat(i.clientLoaderModule)),r&&i.hydrateFallbackModule&&(a=a.concat(i.hydrateFallbackModule)),i.imports&&(a=a.concat(i.imports)),a}).flat(1))}function ND(t){return[...new Set(t)]}function $D(t){let e={},r=Object.keys(t).sort();for(let n of r)e[n]=t[n];return e}function ID(t,e){let r=new Set;return new Set(e),t.reduce((n,i)=>{let a=JSON.stringify($D(i));return r.has(a)||(r.add(a),n.push({key:a,link:i})),n},[])}function lx(){let t=R.useContext(Is);return sx(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function MD(){let t=R.useContext(vh);return sx(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var ux=R.createContext(void 0);ux.displayName="FrameworkContext";function cx(){let t=R.useContext(ux);return sx(t,"You must render this element inside a <HydratedRouter> element"),t}function LD(t,e){let r=R.useContext(ux),[n,i]=R.useState(!1),[a,s]=R.useState(!1),{onFocus:u,onBlur:c,onMouseEnter:f,onMouseLeave:p,onTouchStart:h}=e,g=R.useRef(null);R.useEffect(()=>{if(t==="render"&&s(!0),t==="viewport"){let x=k=>{k.forEach(O=>{s(O.isIntersecting)})},y=new IntersectionObserver(x,{threshold:.5});return g.current&&y.observe(g.current),()=>{y.disconnect()}}},[t]),R.useEffect(()=>{if(n){let x=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(x)}}},[n]);let v=()=>{i(!0)},b=()=>{i(!1),s(!1)};return r?t!=="intent"?[a,g,{}]:[a,g,{onFocus:Nl(u,v),onBlur:Nl(c,b),onMouseEnter:Nl(f,v),onMouseLeave:Nl(p,b),onTouchStart:Nl(h,v)}]:[!1,g,{}]}function Nl(t,e){return r=>{t&&t(r),r.defaultPrevented||e(r)}}function DD({page:t,...e}){let r=KL(),{router:n}=lx(),i=R.useMemo(()=>vC(n.routes,t,n.basename),[n.routes,t,n.basename]);return i?r?R.createElement(zD,{page:t,matches:i,...e}):R.createElement(qD,{page:t,matches:i,...e}):null}function BD(t){let{manifest:e,routeModules:r}=cx(),[n,i]=R.useState([]);return R.useEffect(()=>{let a=!1;return CD(t,e,r).then(s=>{a||i(s)}),()=>{a=!0}},[t,e,r]),n}function zD({page:t,matches:e,...r}){let n=On(),{future:i}=cx(),{basename:a}=lx(),s=R.useMemo(()=>{if(t===n.pathname+n.search+n.hash)return[];let u=RC(t,a,i.v8_trailingSlashAwareDataRequests,"rsc"),c=!1,f=[];for(let p of e)typeof p.route.shouldRevalidate=="function"?c=!0:f.push(p.route.id);return c&&f.length>0&&u.searchParams.set("_routes",f.join(",")),[u.pathname+u.search]},[a,i.v8_trailingSlashAwareDataRequests,t,n,e]);return R.createElement(R.Fragment,null,s.map(u=>R.createElement("link",{key:u,rel:"prefetch",as:"fetch",href:u,...r})))}function qD({page:t,matches:e,...r}){let n=On(),{future:i,manifest:a,routeModules:s}=cx(),{basename:u}=lx(),{loaderData:c,matches:f}=MD(),p=R.useMemo(()=>wk(t,e,f,a,n,"data"),[t,e,f,a,n]),h=R.useMemo(()=>wk(t,e,f,a,n,"assets"),[t,e,f,a,n]),g=R.useMemo(()=>{if(t===n.pathname+n.search+n.hash)return[];let x=new Set,y=!1;if(e.forEach(O=>{var T;let A=a.routes[O.route.id];!A||!A.hasLoader||(!p.some(E=>E.route.id===O.route.id)&&O.route.id in c&&((T=s[O.route.id])!=null&&T.shouldRevalidate)||A.hasClientLoader?y=!0:x.add(O.route.id))}),x.size===0)return[];let k=RC(t,u,i.v8_trailingSlashAwareDataRequests,"data");return y&&x.size>0&&k.searchParams.set("_routes",e.filter(O=>x.has(O.route.id)).map(O=>O.route.id).join(",")),[k.pathname+k.search]},[u,i.v8_trailingSlashAwareDataRequests,c,n,a,p,e,t,s]),v=R.useMemo(()=>RD(h,a),[h,a]),b=BD(h);return R.createElement(R.Fragment,null,g.map(x=>R.createElement("link",{key:x,rel:"prefetch",as:"fetch",href:x,...r})),v.map(x=>R.createElement("link",{key:x,rel:"modulepreload",href:x,...r})),b.map(({key:x,link:y})=>R.createElement("link",{key:x,nonce:r.nonce,...y,crossOrigin:y.crossOrigin??r.crossOrigin})))}function UD(...t){return e=>{t.forEach(r=>{typeof r=="function"?r(e):r!=null&&(r.current=e)})}}var FD=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{FD&&(window.__reactRouterVersion="7.16.0")}catch{}function HD({basename:t,children:e,useTransitions:r,window:n}){let i=R.useRef();i.current==null&&(i.current=yL({window:n,v5Compat:!0}));let a=i.current,[s,u]=R.useState({action:a.action,location:a.location}),c=R.useCallback(f=>{r===!1?u(f):R.startTransition(()=>u(f))},[r]);return R.useLayoutEffect(()=>a.listen(c),[a,c]),R.createElement(bD,{basename:t,children:e,location:s.location,navigationType:s.action,navigator:a,useTransitions:r})}var NC=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,$C=R.forwardRef(function({onClick:e,discover:r="render",prefetch:n="none",relative:i,reloadDocument:a,replace:s,mask:u,state:c,target:f,to:p,preventScrollReset:h,viewTransition:g,defaultShouldRevalidate:v,...b},x){let{basename:y,navigator:k,useTransitions:O}=R.useContext(Dr),A=typeof p=="string"&&NC.test(p),T=_C(p,y);p=T.to;let E=ZL(p,{relative:i}),P=On(),C=null;if(u){let K=gh(u,[],P.mask?P.mask.pathname:"/",!0);y!=="/"&&(K.pathname=K.pathname==="/"?y:kn([y,K.pathname])),C=k.createHref(K)}let[N,L,V]=LD(n,b),$=VD(p,{replace:s,mask:u,state:c,target:f,preventScrollReset:h,relative:i,viewTransition:g,defaultShouldRevalidate:v,useTransitions:O});function I(K){e&&e(K),K.defaultPrevented||$(K)}let q=!(T.isExternal||a),U=R.createElement("a",{...b,...V,href:(q?C:void 0)||T.absoluteURL||E,onClick:q?I:e,ref:UD(x,L),target:f,"data-discover":!A&&r==="render"?"true":void 0});return N&&!A?R.createElement(R.Fragment,null,U,R.createElement(DD,{page:E})):U});$C.displayName="Link";var IC=R.forwardRef(function({"aria-current":e="page",caseSensitive:r=!1,className:n="",end:i=!1,style:a,to:s,viewTransition:u,children:c,...f},p){let h=ec(s,{relative:f.relative}),g=On(),v=R.useContext(vh),{navigator:b,basename:x}=R.useContext(Dr),y=v!=null&&QD(h)&&u===!0,k=b.encodeLocation?b.encodeLocation(h).pathname:h.pathname,O=g.pathname,A=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;r||(O=O.toLowerCase(),A=A?A.toLowerCase():null,k=k.toLowerCase()),A&&x&&(A=gi(A,x)||A);const T=k!=="/"&&k.endsWith("/")?k.length-1:k.length;let E=O===k||!i&&O.startsWith(k)&&O.charAt(T)==="/",P=A!=null&&(A===k||!i&&A.startsWith(k)&&A.charAt(k.length)==="/"),C={isActive:E,isPending:P,isTransitioning:y},N=E?e:void 0,L;typeof n=="function"?L=n(C):L=[n,E?"active":null,P?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let V=typeof a=="function"?a(C):a;return R.createElement($C,{...f,"aria-current":N,className:L,ref:p,style:V,to:s,viewTransition:u},typeof c=="function"?c(C):c)});IC.displayName="NavLink";var WD=R.forwardRef(({discover:t="render",fetcherKey:e,navigate:r,reloadDocument:n,replace:i,state:a,method:s=Jf,action:u,onSubmit:c,relative:f,preventScrollReset:p,viewTransition:h,defaultShouldRevalidate:g,...v},b)=>{let{useTransitions:x}=R.useContext(Dr),y=YD(),k=JD(u,{relative:f}),O=s.toLowerCase()==="get"?"get":"post",A=typeof u=="string"&&NC.test(u),T=E=>{if(c&&c(E),E.defaultPrevented)return;E.preventDefault();let P=E.nativeEvent.submitter,C=(P==null?void 0:P.getAttribute("formmethod"))||s,N=()=>y(P||E.currentTarget,{fetcherKey:e,method:C,navigate:r,replace:i,state:a,relative:f,preventScrollReset:p,viewTransition:h,defaultShouldRevalidate:g});x&&r!==!1?R.startTransition(()=>N()):N()};return R.createElement("form",{ref:b,method:O,action:k,onSubmit:n?c:T,...v,"data-discover":!A&&t==="render"?"true":void 0})});WD.displayName="Form";function KD(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function MC(t){let e=R.useContext(Is);return vt(e,KD(t)),e}function VD(t,{target:e,replace:r,mask:n,state:i,preventScrollReset:a,relative:s,viewTransition:u,defaultShouldRevalidate:c,useTransitions:f}={}){let p=yh(),h=On(),g=ec(t,{relative:s});return R.useCallback(v=>{if(ED(v,e)){v.preventDefault();let b=r!==void 0?r:fu(h)===fu(g),x=()=>p(t,{replace:b,mask:n,state:i,preventScrollReset:a,relative:s,viewTransition:u,defaultShouldRevalidate:c});f?R.startTransition(()=>x()):x()}},[h,p,g,r,n,i,e,t,a,s,u,c,f])}var GD=0,XD=()=>`__${String(++GD)}__`;function YD(){let{router:t}=MC("useSubmit"),{basename:e}=R.useContext(Dr),r=hD(),n=t.fetch,i=t.navigate;return R.useCallback(async(a,s={})=>{let{action:u,method:c,encType:f,formData:p,body:h}=PD(a,e);if(s.navigate===!1){let g=s.fetcherKey||XD();await n(g,r,s.action||u,{defaultShouldRevalidate:s.defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:p,body:h,formMethod:s.method||c,formEncType:s.encType||f,flushSync:s.flushSync})}else await i(s.action||u,{defaultShouldRevalidate:s.defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:p,body:h,formMethod:s.method||c,formEncType:s.encType||f,replace:s.replace,state:s.state,fromRouteId:r,flushSync:s.flushSync,viewTransition:s.viewTransition})},[n,i,e,r])}function JD(t,{relative:e}={}){let{basename:r}=R.useContext(Dr),n=R.useContext(an);vt(n,"useFormAction must be used inside a RouteContext");let[i]=n.matches.slice(-1),a={...ec(t||".",{relative:e})},s=On();if(t==null){a.search=s.search;let u=new URLSearchParams(a.search),c=u.getAll("index");if(c.some(p=>p==="")){u.delete("index"),c.filter(h=>h).forEach(h=>u.append("index",h));let p=u.toString();a.search=p?`?${p}`:""}}return(!t||t===".")&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(a.pathname=a.pathname==="/"?r:kn([r,a.pathname])),fu(a)}function QD(t,{relative:e}={}){let r=R.useContext(EC);vt(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=MC("useViewTransitionState"),i=ec(t,{relative:e});if(!r.isTransitioning)return!1;let a=gi(r.currentLocation.pathname,n)||r.currentLocation.pathname,s=gi(r.nextLocation.pathname,n)||r.nextLocation.pathname;return rd(i.pathname,s)!=null||rd(i.pathname,a)!=null}var ZD=gC();const e4=Qe(ZD);function t4(t){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",e.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}const r4=t=>{switch(t){case"success":return a4;case"info":return s4;case"warning":return o4;case"error":return l4;default:return null}},n4=Array(12).fill(0),i4=({visible:t,className:e})=>M.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},M.createElement("div",{className:"sonner-spinner"},n4.map((r,n)=>M.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),a4=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},M.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"})),o4=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},M.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"})),s4=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},M.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"})),l4=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},M.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"})),u4=M.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"},M.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),M.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),c4=()=>{const[t,e]=M.useState(document.hidden);return M.useEffect(()=>{const r=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),t};let mb=1;class f4{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const r=this.subscribers.indexOf(e);this.subscribers.splice(r,1)}),this.publish=e=>{this.subscribers.forEach(r=>r(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var r;const{message:n,...i}=e,a=typeof(e==null?void 0:e.id)=="number"||((r=e.id)==null?void 0:r.length)>0?e.id:mb++,s=this.toasts.find(c=>c.id===a),u=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),s?this.toasts=this.toasts.map(c=>c.id===a?(this.publish({...c,...e,id:a,title:n}),{...c,...e,id:a,dismissible:u,title:n}):c):this.addToast({title:n,...i,dismissible:u,id:a}),a},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:e,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(n=>n({id:r.id,dismiss:!0}))}),e),this.message=(e,r)=>this.create({...r,message:e}),this.error=(e,r)=>this.create({...r,message:e,type:"error"}),this.success=(e,r)=>this.create({...r,type:"success",message:e}),this.info=(e,r)=>this.create({...r,type:"info",message:e}),this.warning=(e,r)=>this.create({...r,type:"warning",message:e}),this.loading=(e,r)=>this.create({...r,type:"loading",message:e}),this.promise=(e,r)=>{if(!r)return;let n;r.loading!==void 0&&(n=this.create({...r,promise:e,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const i=Promise.resolve(e instanceof Function?e():e);let a=n!==void 0,s;const u=i.then(async f=>{if(s=["resolve",f],M.isValidElement(f))a=!1,this.create({id:n,type:"default",message:f});else if(h4(f)&&!f.ok){a=!1;const h=typeof r.error=="function"?await r.error(`HTTP error! status: ${f.status}`):r.error,g=typeof r.description=="function"?await r.description(`HTTP error! status: ${f.status}`):r.description,b=typeof h=="object"&&!M.isValidElement(h)?h:{message:h};this.create({id:n,type:"error",description:g,...b})}else if(f instanceof Error){a=!1;const h=typeof r.error=="function"?await r.error(f):r.error,g=typeof r.description=="function"?await r.description(f):r.description,b=typeof h=="object"&&!M.isValidElement(h)?h:{message:h};this.create({id:n,type:"error",description:g,...b})}else if(r.success!==void 0){a=!1;const h=typeof r.success=="function"?await r.success(f):r.success,g=typeof r.description=="function"?await r.description(f):r.description,b=typeof h=="object"&&!M.isValidElement(h)?h:{message:h};this.create({id:n,type:"success",description:g,...b})}}).catch(async f=>{if(s=["reject",f],r.error!==void 0){a=!1;const p=typeof r.error=="function"?await r.error(f):r.error,h=typeof r.description=="function"?await r.description(f):r.description,v=typeof p=="object"&&!M.isValidElement(p)?p:{message:p};this.create({id:n,type:"error",description:h,...v})}}).finally(()=>{a&&(this.dismiss(n),n=void 0),r.finally==null||r.finally.call(r)}),c=()=>new Promise((f,p)=>u.then(()=>s[0]==="reject"?p(s[1]):f(s[1])).catch(p));return typeof n!="string"&&typeof n!="number"?{unwrap:c}:Object.assign(n,{unwrap:c})},this.custom=(e,r)=>{const n=(r==null?void 0:r.id)||mb++;return this.create({jsx:e(n),id:n,...r}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Sr=new f4,d4=(t,e)=>{const r=(e==null?void 0:e.id)||mb++;return Sr.addToast({title:t,...e,id:r}),r},h4=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",p4=d4,m4=()=>Sr.toasts,g4=()=>Sr.getActiveToasts(),tt=Object.assign(p4,{success:Sr.success,info:Sr.info,warning:Sr.warning,error:Sr.error,custom:Sr.custom,message:Sr.message,promise:Sr.promise,dismiss:Sr.dismiss,loading:Sr.loading},{getHistory:m4,getToasts:g4});t4("[data-sonner-toaster][dir=ltr],html[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%)}[data-sonner-toaster][dir=rtl],html[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%)}[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:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[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);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[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 rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [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)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [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;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [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);background:var(--normal-bg);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-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[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}[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}[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,0)) translateX(var(--swipe-amount-x,0));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{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{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{from{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-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--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-sonner-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-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-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, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--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-sonner-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-sonner-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]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[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]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[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]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[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]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[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:first-child{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)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{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%)}");function _f(t){return t.label!==void 0}const v4=3,y4="24px",b4="16px",xk=4e3,w4=356,x4=14,_4=45,S4=200;function Nn(...t){return t.filter(Boolean).join(" ")}function k4(t){const[e,r]=t.split("-"),n=[];return e&&n.push(e),r&&n.push(r),n}const E4=t=>{var e,r,n,i,a,s,u,c,f;const{invert:p,toast:h,unstyled:g,interacting:v,setHeights:b,visibleToasts:x,heights:y,index:k,toasts:O,expanded:A,removeToast:T,defaultRichColors:E,closeButton:P,style:C,cancelButtonStyle:N,actionButtonStyle:L,className:V="",descriptionClassName:$="",duration:I,position:q,gap:U,expandByDefault:K,classNames:G,icons:Z,closeButtonAriaLabel:X="Close toast"}=t,[te,H]=M.useState(null),[z,B]=M.useState(null),[J,ae]=M.useState(!1),[se,de]=M.useState(!1),[Ne,pe]=M.useState(!1),[ne,_e]=M.useState(!1),[Ee,ie]=M.useState(!1),[He,$e]=M.useState(0),[ht,lt]=M.useState(0),pt=M.useRef(h.duration||I||xk),mr=M.useRef(null),Ot=M.useRef(null),Br=k===0,rr=k+1<=x,ut=h.type,Ar=h.dismissible!==!1,ha=h.className||"",pa=h.descriptionClassName||"",ma=M.useMemo(()=>y.findIndex(Me=>Me.toastId===h.id)||0,[y,h.id]),Gs=M.useMemo(()=>{var Me;return(Me=h.closeButton)!=null?Me:P},[h.closeButton,P]),ga=M.useMemo(()=>h.duration||I||xk,[h.duration,I]),co=M.useRef(0),zr=M.useRef(0),Ei=M.useRef(0),Oi=M.useRef(null),[cc,fc]=q.split("-"),dc=M.useMemo(()=>y.reduce((Me,St,Rt)=>Rt>=ma?Me:Me+St.height,0),[y,ma]),fo=c4(),Xs=h.invert||p,va=ut==="loading";zr.current=M.useMemo(()=>ma*U+dc,[ma,dc]),M.useEffect(()=>{pt.current=ga},[ga]),M.useEffect(()=>{ae(!0)},[]),M.useEffect(()=>{const Me=Ot.current;if(Me){const St=Me.getBoundingClientRect().height;return lt(St),b(Rt=>[{toastId:h.id,height:St,position:h.position},...Rt]),()=>b(Rt=>Rt.filter(nr=>nr.toastId!==h.id))}},[b,h.id]),M.useLayoutEffect(()=>{if(!J)return;const Me=Ot.current,St=Me.style.height;Me.style.height="auto";const Rt=Me.getBoundingClientRect().height;Me.style.height=St,lt(Rt),b(nr=>nr.find(At=>At.toastId===h.id)?nr.map(At=>At.toastId===h.id?{...At,height:Rt}:At):[{toastId:h.id,height:Rt,position:h.position},...nr])},[J,h.title,h.description,b,h.id,h.jsx,h.action,h.cancel]);const qr=M.useCallback(()=>{de(!0),$e(zr.current),b(Me=>Me.filter(St=>St.toastId!==h.id)),setTimeout(()=>{T(h)},S4)},[h,T,b,zr]);M.useEffect(()=>{if(h.promise&&ut==="loading"||h.duration===1/0||h.type==="loading")return;let Me;return A||v||fo?(()=>{if(Ei.current<co.current){const nr=new Date().getTime()-co.current;pt.current=pt.current-nr}Ei.current=new Date().getTime()})():(()=>{pt.current!==1/0&&(co.current=new Date().getTime(),Me=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),qr()},pt.current))})(),()=>clearTimeout(Me)},[A,v,h,ut,fo,qr]),M.useEffect(()=>{h.delete&&(qr(),h.onDismiss==null||h.onDismiss.call(h,h))},[qr,h.delete]);function Ys(){var Me;if(Z!=null&&Z.loading){var St;return M.createElement("div",{className:Nn(G==null?void 0:G.loader,h==null||(St=h.classNames)==null?void 0:St.loader,"sonner-loader"),"data-visible":ut==="loading"},Z.loading)}return M.createElement(i4,{className:Nn(G==null?void 0:G.loader,h==null||(Me=h.classNames)==null?void 0:Me.loader),visible:ut==="loading"})}const Ai=h.icon||(Z==null?void 0:Z[ut])||r4(ut);var Vn,Js;return M.createElement("li",{tabIndex:0,ref:Ot,className:Nn(V,ha,G==null?void 0:G.toast,h==null||(e=h.classNames)==null?void 0:e.toast,G==null?void 0:G.default,G==null?void 0:G[ut],h==null||(r=h.classNames)==null?void 0:r[ut]),"data-sonner-toast":"","data-rich-colors":(Vn=h.richColors)!=null?Vn:E,"data-styled":!(h.jsx||h.unstyled||g),"data-mounted":J,"data-promise":!!h.promise,"data-swiped":Ee,"data-removed":se,"data-visible":rr,"data-y-position":cc,"data-x-position":fc,"data-index":k,"data-front":Br,"data-swiping":Ne,"data-dismissible":Ar,"data-type":ut,"data-invert":Xs,"data-swipe-out":ne,"data-swipe-direction":z,"data-expanded":!!(A||K&&J),"data-testid":h.testId,style:{"--index":k,"--toasts-before":k,"--z-index":O.length-k,"--offset":`${se?He:zr.current}px`,"--initial-height":K?"auto":`${ht}px`,...C,...h.style},onDragEnd:()=>{pe(!1),H(null),Oi.current=null},onPointerDown:Me=>{Me.button!==2&&(va||!Ar||(mr.current=new Date,$e(zr.current),Me.target.setPointerCapture(Me.pointerId),Me.target.tagName!=="BUTTON"&&(pe(!0),Oi.current={x:Me.clientX,y:Me.clientY})))},onPointerUp:()=>{var Me,St,Rt;if(ne||!Ar)return;Oi.current=null;const nr=Number(((Me=Ot.current)==null?void 0:Me.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Pi=Number(((St=Ot.current)==null?void 0:St.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),At=new Date().getTime()-((Rt=mr.current)==null?void 0:Rt.getTime()),qt=te==="x"?nr:Pi,Ti=Math.abs(qt)/At;if(Math.abs(qt)>=_4||Ti>.11){$e(zr.current),h.onDismiss==null||h.onDismiss.call(h,h),B(te==="x"?nr>0?"right":"left":Pi>0?"down":"up"),qr(),_e(!0);return}else{var Xt,Pr;(Xt=Ot.current)==null||Xt.style.setProperty("--swipe-amount-x","0px"),(Pr=Ot.current)==null||Pr.style.setProperty("--swipe-amount-y","0px")}ie(!1),pe(!1),H(null)},onPointerMove:Me=>{var St,Rt,nr;if(!Oi.current||!Ar||((St=window.getSelection())==null?void 0:St.toString().length)>0)return;const At=Me.clientY-Oi.current.y,qt=Me.clientX-Oi.current.x;var Ti;const Xt=(Ti=t.swipeDirections)!=null?Ti:k4(q);!te&&(Math.abs(qt)>1||Math.abs(At)>1)&&H(Math.abs(qt)>Math.abs(At)?"x":"y");let Pr={x:0,y:0};const ji=Ur=>1/(1.5+Math.abs(Ur)/20);if(te==="y"){if(Xt.includes("top")||Xt.includes("bottom"))if(Xt.includes("top")&&At<0||Xt.includes("bottom")&&At>0)Pr.y=At;else{const Ur=At*ji(At);Pr.y=Math.abs(Ur)<Math.abs(At)?Ur:At}}else if(te==="x"&&(Xt.includes("left")||Xt.includes("right")))if(Xt.includes("left")&&qt<0||Xt.includes("right")&&qt>0)Pr.x=qt;else{const Ur=qt*ji(qt);Pr.x=Math.abs(Ur)<Math.abs(qt)?Ur:qt}(Math.abs(Pr.x)>0||Math.abs(Pr.y)>0)&&ie(!0),(Rt=Ot.current)==null||Rt.style.setProperty("--swipe-amount-x",`${Pr.x}px`),(nr=Ot.current)==null||nr.style.setProperty("--swipe-amount-y",`${Pr.y}px`)}},Gs&&!h.jsx&&ut!=="loading"?M.createElement("button",{"aria-label":X,"data-disabled":va,"data-close-button":!0,onClick:va||!Ar?()=>{}:()=>{qr(),h.onDismiss==null||h.onDismiss.call(h,h)},className:Nn(G==null?void 0:G.closeButton,h==null||(n=h.classNames)==null?void 0:n.closeButton)},(Js=Z==null?void 0:Z.close)!=null?Js:u4):null,(ut||h.icon||h.promise)&&h.icon!==null&&((Z==null?void 0:Z[ut])!==null||h.icon)?M.createElement("div",{"data-icon":"",className:Nn(G==null?void 0:G.icon,h==null||(i=h.classNames)==null?void 0:i.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||Ys():null,h.type!=="loading"?Ai:null):null,M.createElement("div",{"data-content":"",className:Nn(G==null?void 0:G.content,h==null||(a=h.classNames)==null?void 0:a.content)},M.createElement("div",{"data-title":"",className:Nn(G==null?void 0:G.title,h==null||(s=h.classNames)==null?void 0:s.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?M.createElement("div",{"data-description":"",className:Nn($,pa,G==null?void 0:G.description,h==null||(u=h.classNames)==null?void 0:u.description)},typeof h.description=="function"?h.description():h.description):null),M.isValidElement(h.cancel)?h.cancel:h.cancel&&_f(h.cancel)?M.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||N,onClick:Me=>{_f(h.cancel)&&Ar&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,Me),qr())},className:Nn(G==null?void 0:G.cancelButton,h==null||(c=h.classNames)==null?void 0:c.cancelButton)},h.cancel.label):null,M.isValidElement(h.action)?h.action:h.action&&_f(h.action)?M.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||L,onClick:Me=>{_f(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,Me),!Me.defaultPrevented&&qr())},className:Nn(G==null?void 0:G.actionButton,h==null||(f=h.classNames)==null?void 0:f.actionButton)},h.action.label):null)};function _k(){if(typeof window>"u"||typeof document>"u")return"ltr";const t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function O4(t,e){const r={};return[t,e].forEach((n,i)=>{const a=i===1,s=a?"--mobile-offset":"--offset",u=a?b4:y4;function c(f){["top","right","bottom","left"].forEach(p=>{r[`${s}-${p}`]=typeof f=="number"?`${f}px`:f})}typeof n=="number"||typeof n=="string"?c(n):typeof n=="object"?["top","right","bottom","left"].forEach(f=>{n[f]===void 0?r[`${s}-${f}`]=u:r[`${s}-${f}`]=typeof n[f]=="number"?`${n[f]}px`:n[f]}):c(u)}),r}const A4=M.forwardRef(function(e,r){const{id:n,invert:i,position:a="bottom-right",hotkey:s=["altKey","KeyT"],expand:u,closeButton:c,className:f,offset:p,mobileOffset:h,theme:g="light",richColors:v,duration:b,style:x,visibleToasts:y=v4,toastOptions:k,dir:O=_k(),gap:A=x4,icons:T,containerAriaLabel:E="Notifications"}=e,[P,C]=M.useState([]),N=M.useMemo(()=>n?P.filter(J=>J.toasterId===n):P.filter(J=>!J.toasterId),[P,n]),L=M.useMemo(()=>Array.from(new Set([a].concat(N.filter(J=>J.position).map(J=>J.position)))),[N,a]),[V,$]=M.useState([]),[I,q]=M.useState(!1),[U,K]=M.useState(!1),[G,Z]=M.useState(g!=="system"?g:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),X=M.useRef(null),te=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),H=M.useRef(null),z=M.useRef(!1),B=M.useCallback(J=>{C(ae=>{var se;return(se=ae.find(de=>de.id===J.id))!=null&&se.delete||Sr.dismiss(J.id),ae.filter(({id:de})=>de!==J.id)})},[]);return M.useEffect(()=>Sr.subscribe(J=>{if(J.dismiss){requestAnimationFrame(()=>{C(ae=>ae.map(se=>se.id===J.id?{...se,delete:!0}:se))});return}setTimeout(()=>{e4.flushSync(()=>{C(ae=>{const se=ae.findIndex(de=>de.id===J.id);return se!==-1?[...ae.slice(0,se),{...ae[se],...J},...ae.slice(se+1)]:[J,...ae]})})})}),[P]),M.useEffect(()=>{if(g!=="system"){Z(g);return}if(g==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Z("dark"):Z("light")),typeof window>"u")return;const J=window.matchMedia("(prefers-color-scheme: dark)");try{J.addEventListener("change",({matches:ae})=>{Z(ae?"dark":"light")})}catch{J.addListener(({matches:se})=>{try{Z(se?"dark":"light")}catch(de){console.error(de)}})}},[g]),M.useEffect(()=>{P.length<=1&&q(!1)},[P]),M.useEffect(()=>{const J=ae=>{var se;if(s.every(pe=>ae[pe]||ae.code===pe)){var Ne;q(!0),(Ne=X.current)==null||Ne.focus()}ae.code==="Escape"&&(document.activeElement===X.current||(se=X.current)!=null&&se.contains(document.activeElement))&&q(!1)};return document.addEventListener("keydown",J),()=>document.removeEventListener("keydown",J)},[s]),M.useEffect(()=>{if(X.current)return()=>{H.current&&(H.current.focus({preventScroll:!0}),H.current=null,z.current=!1)}},[X.current]),M.createElement("section",{ref:r,"aria-label":`${E} ${te}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},L.map((J,ae)=>{var se;const[de,Ne]=J.split("-");return N.length?M.createElement("ol",{key:J,dir:O==="auto"?_k():O,tabIndex:-1,ref:X,className:f,"data-sonner-toaster":!0,"data-sonner-theme":G,"data-y-position":de,"data-x-position":Ne,style:{"--front-toast-height":`${((se=V[0])==null?void 0:se.height)||0}px`,"--width":`${w4}px`,"--gap":`${A}px`,...x,...O4(p,h)},onBlur:pe=>{z.current&&!pe.currentTarget.contains(pe.relatedTarget)&&(z.current=!1,H.current&&(H.current.focus({preventScroll:!0}),H.current=null))},onFocus:pe=>{pe.target instanceof HTMLElement&&pe.target.dataset.dismissible==="false"||z.current||(z.current=!0,H.current=pe.relatedTarget)},onMouseEnter:()=>q(!0),onMouseMove:()=>q(!0),onMouseLeave:()=>{U||q(!1)},onDragEnd:()=>q(!1),onPointerDown:pe=>{pe.target instanceof HTMLElement&&pe.target.dataset.dismissible==="false"||K(!0)},onPointerUp:()=>K(!1)},N.filter(pe=>!pe.position&&ae===0||pe.position===J).map((pe,ne)=>{var _e,Ee;return M.createElement(E4,{key:pe.id,icons:T,index:ne,toast:pe,defaultRichColors:v,duration:(_e=k==null?void 0:k.duration)!=null?_e:b,className:k==null?void 0:k.className,descriptionClassName:k==null?void 0:k.descriptionClassName,invert:i,visibleToasts:y,closeButton:(Ee=k==null?void 0:k.closeButton)!=null?Ee:c,interacting:U,position:J,style:k==null?void 0:k.style,unstyled:k==null?void 0:k.unstyled,classNames:k==null?void 0:k.classNames,cancelButtonStyle:k==null?void 0:k.cancelButtonStyle,actionButtonStyle:k==null?void 0:k.actionButtonStyle,closeButtonAriaLabel:k==null?void 0:k.closeButtonAriaLabel,removeToast:B,toasts:N.filter(ie=>ie.position==pe.position),heights:V.filter(ie=>ie.position==pe.position),setHeights:$,expandByDefault:u,gap:A,expanded:I,swipeDirections:e.swipeDirections})})):null}))}),P4="M147.692 55C178.28 55.0001 203.077 79.7968 203.077 110.385C203.077 140.089 179.692 164.331 150.327 165.706C126.508 171.901 108.924 193.549 108.924 219.308C108.924 222.879 109.261 226.372 109.907 229.755C109.903 229.756 109.898 229.755 109.894 229.756C110.468 232.955 110.77 236.25 110.77 239.615C110.77 242.98 110.468 246.274 109.894 249.474C109.898 249.474 109.903 249.475 109.907 249.476C109.261 252.859 108.924 256.351 108.924 259.923C108.924 285.68 126.507 307.329 150.325 313.524C179.691 314.899 203.077 339.14 203.077 368.846C203.077 399.434 178.28 424.23 147.692 424.23C117.104 424.23 92.3076 399.434 92.3076 368.846C92.3076 364.539 92.7986 360.348 93.7285 356.324C94.007 354.075 94.1543 351.785 94.1543 349.461C94.1541 321.662 73.6718 298.647 46.9756 294.682C46.9934 294.579 47.0138 294.477 47.0322 294.374C20.4072 290.347 2.80541e-05 267.364 0 239.615C0 211.866 20.4071 188.883 47.0322 184.855C47.0139 184.753 46.9934 184.651 46.9756 184.549C73.6719 180.584 94.1542 157.569 94.1543 129.77C94.1543 127.445 94.0063 125.154 93.7275 122.904C92.7979 118.881 92.3076 114.69 92.3076 110.385C92.3076 79.7967 117.104 55 147.692 55ZM332.308 55C362.896 55 387.692 79.7967 387.692 110.385C387.692 115.136 387.093 119.747 385.968 124.147C385.781 125.996 385.683 127.872 385.683 129.77C385.683 157.569 406.165 180.584 432.861 184.549C432.845 184.643 432.826 184.738 432.809 184.832C459.511 188.792 480 211.811 480 239.615C480 267.419 459.511 290.438 432.809 294.397C432.826 294.492 432.845 294.587 432.861 294.682C406.165 298.647 385.683 321.661 385.683 349.461C385.683 351.358 385.781 353.233 385.968 355.081C387.093 359.482 387.692 364.094 387.692 368.846C387.692 399.434 362.896 424.23 332.308 424.23C301.72 424.23 276.923 399.434 276.923 368.846C276.923 364.537 277.414 360.344 278.345 356.318C278.622 354.071 278.77 351.783 278.77 349.461C278.769 321.661 258.287 298.647 231.591 294.682C231.609 294.579 231.629 294.477 231.647 294.374C205.022 290.347 184.615 267.364 184.615 239.615C184.615 209.027 209.412 184.23 240 184.23C270.588 184.231 295.385 209.027 295.385 239.615C295.385 242.98 295.084 246.274 294.509 249.474C294.513 249.474 294.518 249.475 294.522 249.476C293.877 252.859 293.539 256.351 293.539 259.923C293.539 284.692 309.798 305.661 332.226 312.744C354.653 305.661 370.913 284.692 370.913 259.923C370.913 256.351 370.576 252.859 369.93 249.476C369.987 249.467 370.044 249.46 370.102 249.451C369.529 246.259 369.23 242.972 369.23 239.615C369.23 236.259 369.528 232.971 370.101 229.779C370.044 229.771 369.986 229.764 369.93 229.756C370.576 226.372 370.913 222.879 370.913 219.308C370.913 193.537 353.312 171.881 329.476 165.697C300.204 164.223 276.923 140.023 276.923 110.385C276.923 79.7967 301.72 55 332.308 55Z";function ra({height:t=32}){const e=Math.round(t*1);return _.jsxs("svg",{width:e,height:t,viewBox:"0 0 480 480",fill:"none","aria-hidden":!0,children:[_.jsx("path",{d:P4,fill:"url(#io-grad)"}),_.jsx("defs",{children:_.jsxs("linearGradient",{id:"io-grad",x1:"0",x2:"450.529",y1:"402",y2:"69.3087",gradientUnits:"userSpaceOnUse",children:[_.jsx("stop",{stopColor:"#D83333"}),_.jsx("stop",{offset:"0.515",stopColor:"#E43A9C"}),_.jsx("stop",{offset:"1",stopColor:"#F041FF"})]})})]})}/**
|
|
52
|
-
* @license lucide-react v0.487.0 - ISC
|
|
53
|
-
*
|
|
54
|
-
* This source code is licensed under the ISC license.
|
|
55
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/const T4=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),j4=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,n)=>n?n.toUpperCase():r.toLowerCase()),Sk=t=>{const e=j4(t);return e.charAt(0).toUpperCase()+e.slice(1)},LC=(...t)=>t.filter((e,r,n)=>!!e&&e.trim()!==""&&n.indexOf(e)===r).join(" ").trim();/**
|
|
57
|
-
* @license lucide-react v0.487.0 - ISC
|
|
58
|
-
*
|
|
59
|
-
* This source code is licensed under the ISC license.
|
|
60
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
-
*/var C4={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"};/**
|
|
62
|
-
* @license lucide-react v0.487.0 - ISC
|
|
63
|
-
*
|
|
64
|
-
* This source code is licensed under the ISC license.
|
|
65
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/const R4=R.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:s,...u},c)=>R.createElement("svg",{ref:c,...C4,width:e,height:e,stroke:t,strokeWidth:n?Number(r)*24/Number(e):r,className:LC("lucide",i),...u},[...s.map(([f,p])=>R.createElement(f,p)),...Array.isArray(a)?a:[a]]));/**
|
|
67
|
-
* @license lucide-react v0.487.0 - ISC
|
|
68
|
-
*
|
|
69
|
-
* This source code is licensed under the ISC license.
|
|
70
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
-
*/const Re=(t,e)=>{const r=R.forwardRef(({className:n,...i},a)=>R.createElement(R4,{ref:a,iconNode:e,className:LC(`lucide-${T4(Sk(t))}`,`lucide-${t}`,n),...i}));return r.displayName=Sk(t),r};/**
|
|
72
|
-
* @license lucide-react v0.487.0 - ISC
|
|
73
|
-
*
|
|
74
|
-
* This source code is licensed under the ISC license.
|
|
75
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
-
*/const N4=[["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"}]],fx=Re("activity",N4);/**
|
|
77
|
-
* @license lucide-react v0.487.0 - ISC
|
|
78
|
-
*
|
|
79
|
-
* This source code is licensed under the ISC license.
|
|
80
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/const $4=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],I4=Re("bell",$4);/**
|
|
82
|
-
* @license lucide-react v0.487.0 - ISC
|
|
83
|
-
*
|
|
84
|
-
* This source code is licensed under the ISC license.
|
|
85
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/const M4=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],DC=Re("book-open",M4);/**
|
|
87
|
-
* @license lucide-react v0.487.0 - ISC
|
|
88
|
-
*
|
|
89
|
-
* This source code is licensed under the ISC license.
|
|
90
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/const L4=[["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"}]],D4=Re("bot",L4);/**
|
|
92
|
-
* @license lucide-react v0.487.0 - ISC
|
|
93
|
-
*
|
|
94
|
-
* This source code is licensed under the ISC license.
|
|
95
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/const B4=[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]],z4=Re("bug",B4);/**
|
|
97
|
-
* @license lucide-react v0.487.0 - ISC
|
|
98
|
-
*
|
|
99
|
-
* This source code is licensed under the ISC license.
|
|
100
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/const q4=[["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"}]],U4=Re("calendar",q4);/**
|
|
102
|
-
* @license lucide-react v0.487.0 - ISC
|
|
103
|
-
*
|
|
104
|
-
* This source code is licensed under the ISC license.
|
|
105
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/const F4=[["line",{x1:"18",x2:"18",y1:"20",y2:"10",key:"1xfpm4"}],["line",{x1:"12",x2:"12",y1:"20",y2:"4",key:"be30l9"}],["line",{x1:"6",x2:"6",y1:"20",y2:"14",key:"1r4le6"}]],H4=Re("chart-no-axes-column",F4);/**
|
|
107
|
-
* @license lucide-react v0.487.0 - ISC
|
|
108
|
-
*
|
|
109
|
-
* This source code is licensed under the ISC license.
|
|
110
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
-
*/const W4=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],K4=Re("chevron-down",W4);/**
|
|
112
|
-
* @license lucide-react v0.487.0 - ISC
|
|
113
|
-
*
|
|
114
|
-
* This source code is licensed under the ISC license.
|
|
115
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/const V4=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],dx=Re("chevron-left",V4);/**
|
|
117
|
-
* @license lucide-react v0.487.0 - ISC
|
|
118
|
-
*
|
|
119
|
-
* This source code is licensed under the ISC license.
|
|
120
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
-
*/const G4=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],BC=Re("chevron-right",G4);/**
|
|
122
|
-
* @license lucide-react v0.487.0 - ISC
|
|
123
|
-
*
|
|
124
|
-
* This source code is licensed under the ISC license.
|
|
125
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
-
*/const X4=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],Y4=Re("clock",X4);/**
|
|
127
|
-
* @license lucide-react v0.487.0 - ISC
|
|
128
|
-
*
|
|
129
|
-
* This source code is licensed under the ISC license.
|
|
130
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
-
*/const J4=[["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"}]],Q4=Re("cpu",J4);/**
|
|
132
|
-
* @license lucide-react v0.487.0 - ISC
|
|
133
|
-
*
|
|
134
|
-
* This source code is licensed under the ISC license.
|
|
135
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
-
*/const Z4=[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]],e5=Re("crown",Z4);/**
|
|
137
|
-
* @license lucide-react v0.487.0 - ISC
|
|
138
|
-
*
|
|
139
|
-
* This source code is licensed under the ISC license.
|
|
140
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
-
*/const t5=[["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"}]],r5=Re("dollar-sign",t5);/**
|
|
142
|
-
* @license lucide-react v0.487.0 - ISC
|
|
143
|
-
*
|
|
144
|
-
* This source code is licensed under the ISC license.
|
|
145
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
-
*/const n5=[["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"}]],i5=Re("download",n5);/**
|
|
147
|
-
* @license lucide-react v0.487.0 - ISC
|
|
148
|
-
*
|
|
149
|
-
* This source code is licensed under the ISC license.
|
|
150
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
-
*/const a5=[["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"}]],zC=Re("external-link",a5);/**
|
|
152
|
-
* @license lucide-react v0.487.0 - ISC
|
|
153
|
-
*
|
|
154
|
-
* This source code is licensed under the ISC license.
|
|
155
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
-
*/const o5=[["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"}]],s5=Re("eye-off",o5);/**
|
|
157
|
-
* @license lucide-react v0.487.0 - ISC
|
|
158
|
-
*
|
|
159
|
-
* This source code is licensed under the ISC license.
|
|
160
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
-
*/const l5=[["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"}]],u5=Re("eye",l5);/**
|
|
162
|
-
* @license lucide-react v0.487.0 - ISC
|
|
163
|
-
*
|
|
164
|
-
* This source code is licensed under the ISC license.
|
|
165
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
-
*/const c5=[["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"}]],f5=Re("file-text",c5);/**
|
|
167
|
-
* @license lucide-react v0.487.0 - ISC
|
|
168
|
-
*
|
|
169
|
-
* This source code is licensed under the ISC license.
|
|
170
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
-
*/const d5=[["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"}]],h5=Re("folder-open",d5);/**
|
|
172
|
-
* @license lucide-react v0.487.0 - ISC
|
|
173
|
-
*
|
|
174
|
-
* This source code is licensed under the ISC license.
|
|
175
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
-
*/const p5=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],m5=Re("folder",p5);/**
|
|
177
|
-
* @license lucide-react v0.487.0 - ISC
|
|
178
|
-
*
|
|
179
|
-
* This source code is licensed under the ISC license.
|
|
180
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
-
*/const g5=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],v5=Re("github",g5);/**
|
|
182
|
-
* @license lucide-react v0.487.0 - ISC
|
|
183
|
-
*
|
|
184
|
-
* This source code is licensed under the ISC license.
|
|
185
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
-
*/const y5=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],qC=Re("inbox",y5);/**
|
|
187
|
-
* @license lucide-react v0.487.0 - ISC
|
|
188
|
-
*
|
|
189
|
-
* This source code is licensed under the ISC license.
|
|
190
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
-
*/const b5=[["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:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],w5=Re("layers",b5);/**
|
|
192
|
-
* @license lucide-react v0.487.0 - ISC
|
|
193
|
-
*
|
|
194
|
-
* This source code is licensed under the ISC license.
|
|
195
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
-
*/const x5=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],$l=Re("loader-circle",x5);/**
|
|
197
|
-
* @license lucide-react v0.487.0 - ISC
|
|
198
|
-
*
|
|
199
|
-
* This source code is licensed under the ISC license.
|
|
200
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
-
*/const _5=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],S5=Re("log-out",_5);/**
|
|
202
|
-
* @license lucide-react v0.487.0 - ISC
|
|
203
|
-
*
|
|
204
|
-
* This source code is licensed under the ISC license.
|
|
205
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
-
*/const k5=[["path",{d:"M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z",key:"1jhwl8"}],["path",{d:"m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10",key:"1qfld7"}]],E5=Re("mail-open",k5);/**
|
|
207
|
-
* @license lucide-react v0.487.0 - ISC
|
|
208
|
-
*
|
|
209
|
-
* This source code is licensed under the ISC license.
|
|
210
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
-
*/const O5=[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]],A5=Re("mail",O5);/**
|
|
212
|
-
* @license lucide-react v0.487.0 - ISC
|
|
213
|
-
*
|
|
214
|
-
* This source code is licensed under the ISC license.
|
|
215
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
-
*/const P5=[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]],T5=Re("message-circle",P5);/**
|
|
217
|
-
* @license lucide-react v0.487.0 - ISC
|
|
218
|
-
*
|
|
219
|
-
* This source code is licensed under the ISC license.
|
|
220
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
-
*/const j5=[["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"}]],C5=Re("message-square",j5);/**
|
|
222
|
-
* @license lucide-react v0.487.0 - ISC
|
|
223
|
-
*
|
|
224
|
-
* This source code is licensed under the ISC license.
|
|
225
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
-
*/const R5=[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]],UC=Re("paperclip",R5);/**
|
|
227
|
-
* @license lucide-react v0.487.0 - ISC
|
|
228
|
-
*
|
|
229
|
-
* This source code is licensed under the ISC license.
|
|
230
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
231
|
-
*/const N5=[["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"}]],$5=Re("pause",N5);/**
|
|
232
|
-
* @license lucide-react v0.487.0 - ISC
|
|
233
|
-
*
|
|
234
|
-
* This source code is licensed under the ISC license.
|
|
235
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
236
|
-
*/const I5=[["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"}]],M5=Re("pen",I5);/**
|
|
237
|
-
* @license lucide-react v0.487.0 - ISC
|
|
238
|
-
*
|
|
239
|
-
* This source code is licensed under the ISC license.
|
|
240
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
241
|
-
*/const L5=[["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"}]],gb=Re("pencil",L5);/**
|
|
242
|
-
* @license lucide-react v0.487.0 - ISC
|
|
243
|
-
*
|
|
244
|
-
* This source code is licensed under the ISC license.
|
|
245
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
246
|
-
*/const D5=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],B5=Re("play",D5);/**
|
|
247
|
-
* @license lucide-react v0.487.0 - ISC
|
|
248
|
-
*
|
|
249
|
-
* This source code is licensed under the ISC license.
|
|
250
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
251
|
-
*/const z5=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],FC=Re("plus",z5);/**
|
|
252
|
-
* @license lucide-react v0.487.0 - ISC
|
|
253
|
-
*
|
|
254
|
-
* This source code is licensed under the ISC license.
|
|
255
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
256
|
-
*/const q5=[["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"}]],hx=Re("save",q5);/**
|
|
257
|
-
* @license lucide-react v0.487.0 - ISC
|
|
258
|
-
*
|
|
259
|
-
* This source code is licensed under the ISC license.
|
|
260
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
261
|
-
*/const U5=[["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"}]],F5=Re("scroll-text",U5);/**
|
|
262
|
-
* @license lucide-react v0.487.0 - ISC
|
|
263
|
-
*
|
|
264
|
-
* This source code is licensed under the ISC license.
|
|
265
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
266
|
-
*/const H5=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],HC=Re("search",H5);/**
|
|
267
|
-
* @license lucide-react v0.487.0 - ISC
|
|
268
|
-
*
|
|
269
|
-
* This source code is licensed under the ISC license.
|
|
270
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
271
|
-
*/const W5=[["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"}]],WC=Re("send",W5);/**
|
|
272
|
-
* @license lucide-react v0.487.0 - ISC
|
|
273
|
-
*
|
|
274
|
-
* This source code is licensed under the ISC license.
|
|
275
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
276
|
-
*/const K5=[["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"}]],V5=Re("settings",K5);/**
|
|
277
|
-
* @license lucide-react v0.487.0 - ISC
|
|
278
|
-
*
|
|
279
|
-
* This source code is licensed under the ISC license.
|
|
280
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
281
|
-
*/const G5=[["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"}]],X5=Re("sparkles",G5);/**
|
|
282
|
-
* @license lucide-react v0.487.0 - ISC
|
|
283
|
-
*
|
|
284
|
-
* This source code is licensed under the ISC license.
|
|
285
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
286
|
-
*/const Y5=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],KC=Re("square",Y5);/**
|
|
287
|
-
* @license lucide-react v0.487.0 - ISC
|
|
288
|
-
*
|
|
289
|
-
* This source code is licensed under the ISC license.
|
|
290
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
291
|
-
*/const J5=[["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"}]],px=Re("trash-2",J5);/**
|
|
292
|
-
* @license lucide-react v0.487.0 - ISC
|
|
293
|
-
*
|
|
294
|
-
* This source code is licensed under the ISC license.
|
|
295
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
296
|
-
*/const Q5=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]],VC=Re("users",Q5);/**
|
|
297
|
-
* @license lucide-react v0.487.0 - ISC
|
|
298
|
-
*
|
|
299
|
-
* This source code is licensed under the ISC license.
|
|
300
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
301
|
-
*/const Z5=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],e8=Re("x",Z5);/**
|
|
302
|
-
* @license lucide-react v0.487.0 - ISC
|
|
303
|
-
*
|
|
304
|
-
* This source code is licensed under the ISC license.
|
|
305
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
306
|
-
*/const t8=[["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"}]],id=Re("zap",t8);let ad=[];const od=new Set;function GC(t){ad=[t,...ad].slice(0,50);for(const e of od)e()}function r8(){ad=[];for(const t of od)t()}function n8(){const[,t]=R.useState(0);return R.useEffect(()=>{const e=()=>t(r=>r+1);return od.add(e),()=>{od.delete(e)}},[]),ad}function i8(){const[t,e]=R.useState(!1),r=n8(),n=R.useRef(null),[i,a]=R.useState(0),s=r.length-i;R.useEffect(()=>{function c(f){n.current&&!n.current.contains(f.target)&&e(!1)}if(t)return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[t]);function u(){e(!t),t||a(r.length)}return _.jsxs("div",{className:"relative",ref:n,children:[_.jsxs("button",{type:"button",onClick:u,className:"relative p-2 rounded-xl hover:bg-white/[0.05] text-zinc-600 hover:text-zinc-300 transition-colors cursor-pointer",title:"Notifications",children:[_.jsx(I4,{className:"w-3.5 h-3.5"}),s>0&&_.jsx("span",{className:"absolute top-1 right-1 w-2 h-2 rounded-full bg-[#E43A9C]"})]}),t&&_.jsxs("div",{className:"absolute right-0 top-full mt-2 w-80 max-h-96 overflow-y-auto rounded-xl border border-white/[0.07] bg-[#1a1a1a] shadow-2xl z-50",children:[_.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-white/[0.07]",children:[_.jsx("span",{className:"text-xs font-mono text-zinc-300",children:"Notifications"}),r.length>0&&_.jsx("button",{type:"button",onClick:r8,className:"text-[10px] font-mono text-zinc-500 hover:text-zinc-300 cursor-pointer",children:"Clear all"})]}),r.length===0?_.jsx("div",{className:"px-4 py-8 text-center text-zinc-600 text-xs font-mono",children:"No notifications yet"}):_.jsx("div",{className:"divide-y divide-white/[0.04]",children:r.map(c=>_.jsxs("div",{className:"px-4 py-3 hover:bg-white/[0.03]",children:[_.jsx("p",{className:"text-xs text-zinc-300 leading-relaxed",children:c.message}),_.jsx("p",{className:"text-[10px] text-zinc-600 font-mono mt-1",children:new Date(c.timestamp).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0,timeZone:"America/Chicago"})})]},c.id))})]})]})}const a8="/api";let Ga=null;function o8(t){Ga=t}function mx(){return(Ga==null?void 0:Ga())??null}async function Il(t,e){const r=Ga==null?void 0:Ga(),n={"Content-Type":"application/json",...e==null?void 0:e.headers};r&&(n.Authorization=`Bearer ${r}`);const i=await fetch(`${a8}${t}`,{...e,headers:n});if(!i.ok){const a=await i.json().catch(()=>({error:i.statusText}));throw new Error(a.error??`Request failed: ${i.status}`)}return i.json()}const Ye={get:t=>Il(t),post:(t,e)=>Il(t,{method:"POST",body:e?JSON.stringify(e):void 0}),patch:(t,e)=>Il(t,{method:"PATCH",body:JSON.stringify(e)}),put:(t,e)=>Il(t,{method:"PUT",body:JSON.stringify(e)}),delete:t=>Il(t,{method:"DELETE"})},s8=10,l8=1e3,u8=3e4;function XC(t={}){const[e,r]=R.useState(!1),[n,i]=R.useState(null),[a,s]=R.useState("connecting"),u=R.useRef(null),c=R.useRef(t),f=R.useRef(0),p=R.useRef(null),h=R.useRef(!0),g=R.useRef(!1);c.current=t,R.useEffect(()=>{let x=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`;const y=mx();y&&(x+=`?token=${encodeURIComponent(y)}`);const k=()=>{if(!h.current)return;s(f.current>0?"reconnecting":"connecting");const O=new WebSocket(x);u.current=O,O.onopen=()=>{const A=f.current>0||g.current;f.current=0,g.current=!1,r(!0),s("connected"),A&&console.info("WebSocket reconnected")},O.onmessage=A=>{var T,E,P,C,N,L,V,$;try{const I=JSON.parse(A.data);switch(I.type){case"connected":i(I.connectionId??null);break;case"delta":(E=(T=c.current).onDelta)==null||E.call(T,I.content??"");break;case"message":(C=(P=c.current).onMessage)==null||C.call(P,I.content??"");break;case"event":(L=(N=c.current).onEvent)==null||L.call(N,I);break;case"error":($=(V=c.current).onError)==null||$.call(V,I.content??"Unknown error");break}}catch{}},O.onclose=()=>{if(u.current=null,r(!1),i(null),!h.current)return;if(g.current||(g.current=!0,console.warn("WebSocket disconnected; attempting to reconnect")),f.current>=s8){s("disconnected");return}const A=Math.min(l8*2**f.current,u8);f.current+=1,s("reconnecting"),p.current=setTimeout(k,A)},O.onerror=()=>{O.close()}};return k(),()=>{var O;h.current=!1,p.current&&clearTimeout(p.current),(O=u.current)==null||O.close()}},[]);const v=R.useCallback((b,x="web")=>{var y;((y=u.current)==null?void 0:y.readyState)===WebSocket.OPEN&&u.current.send(JSON.stringify({type:"message",content:b,source:x}))},[]);return{connected:e,connectionId:n,connectionState:a,sendMessage:v}}function gx(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var no=gx();function YC(t){no=t}var za={exec:()=>null};function Io(t){let e=[];return r=>{let n=Math.max(0,Math.min(3,r-1)),i=e[n];return i||(i=t(n),e[n]=i),i}}function Fe(t,e=""){let r=typeof t=="string"?t:t.source,n={replace:(i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(ur.caret,"$1"),r=r.replace(i,s),n},getRegex:()=>new RegExp(r,e)};return n}var c8=((t="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+t)}catch{return!1}})(),ur={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Io(t=>new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Io(t=>new RegExp(`^ {0,${t}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:Io(t=>new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)),headingBeginRegex:Io(t=>new RegExp(`^ {0,${t}}#`)),htmlBeginRegex:Io(t=>new RegExp(`^ {0,${t}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:Io(t=>new RegExp(`^ {0,${t}}>`))},f8=/^(?:[ \t]*(?:\n|$))+/,d8=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,h8=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,tc=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,p8=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,vx=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,JC=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,QC=Fe(JC).replace(/bull/g,vx).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),m8=Fe(JC).replace(/bull/g,vx).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),yx=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,g8=/^[^\n]+/,bx=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,v8=Fe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",bx).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),y8=Fe(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,vx).getRegex(),wh="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",wx=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,b8=Fe("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",wx).replace("tag",wh).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ZC=Fe(yx).replace("hr",tc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",wh).getRegex(),w8=Fe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ZC).getRegex(),xx={blockquote:w8,code:d8,def:v8,fences:h8,heading:p8,hr:tc,html:b8,lheading:QC,list:y8,newline:f8,paragraph:ZC,table:za,text:g8},kk=Fe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",tc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",wh).getRegex(),x8={...xx,lheading:m8,table:kk,paragraph:Fe(yx).replace("hr",tc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",kk).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",wh).getRegex()},_8={...xx,html:Fe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",wx).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:za,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Fe(yx).replace("hr",tc).replace("heading",` *#{1,6} *[^
|
|
307
|
-
]`).replace("lheading",QC).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},S8=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,k8=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,eR=/^( {2,}|\\)\n(?!\s*$)/,E8=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ls=/[\p{P}\p{S}]/u,xh=/[\s\p{P}\p{S}]/u,_x=/[^\s\p{P}\p{S}]/u,O8=Fe(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,xh).getRegex(),tR=/(?!~)[\p{P}\p{S}]/u,A8=/(?!~)[\s\p{P}\p{S}]/u,P8=/(?:[^\s\p{P}\p{S}]|~)/u,T8=Fe(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",c8?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),rR=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,j8=Fe(rR,"u").replace(/punct/g,Ls).getRegex(),C8=Fe(rR,"u").replace(/punct/g,tR).getRegex(),nR="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",R8=Fe(nR,"gu").replace(/notPunctSpace/g,_x).replace(/punctSpace/g,xh).replace(/punct/g,Ls).getRegex(),N8=Fe(nR,"gu").replace(/notPunctSpace/g,P8).replace(/punctSpace/g,A8).replace(/punct/g,tR).getRegex(),$8=Fe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,_x).replace(/punctSpace/g,xh).replace(/punct/g,Ls).getRegex(),I8=Fe(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Ls).getRegex(),M8="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",L8=Fe(M8,"gu").replace(/notPunctSpace/g,_x).replace(/punctSpace/g,xh).replace(/punct/g,Ls).getRegex(),D8=Fe(/\\(punct)/,"gu").replace(/punct/g,Ls).getRegex(),B8=Fe(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),z8=Fe(wx).replace("(?:-->|$)","-->").getRegex(),q8=Fe("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",z8).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),sd=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,U8=Fe(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",sd).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),iR=Fe(/^!?\[(label)\]\[(ref)\]/).replace("label",sd).replace("ref",bx).getRegex(),aR=Fe(/^!?\[(ref)\](?:\[\])?/).replace("ref",bx).getRegex(),F8=Fe("reflink|nolink(?!\\()","g").replace("reflink",iR).replace("nolink",aR).getRegex(),Ek=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Sx={_backpedal:za,anyPunctuation:D8,autolink:B8,blockSkip:T8,br:eR,code:k8,del:za,delLDelim:za,delRDelim:za,emStrongLDelim:j8,emStrongRDelimAst:R8,emStrongRDelimUnd:$8,escape:S8,link:U8,nolink:aR,punctuation:O8,reflink:iR,reflinkSearch:F8,tag:q8,text:E8,url:za},H8={...Sx,link:Fe(/^!?\[(label)\]\((.*?)\)/).replace("label",sd).getRegex(),reflink:Fe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",sd).getRegex()},vb={...Sx,emStrongRDelimAst:N8,emStrongLDelim:C8,delLDelim:I8,delRDelim:L8,url:Fe(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Ek).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Fe(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Ek).getRegex()},W8={...vb,br:Fe(eR).replace("{2,}","*").getRegex(),text:Fe(vb.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Sf={normal:xx,gfm:x8,pedantic:_8},Ml={normal:Sx,gfm:vb,breaks:W8,pedantic:H8},K8={"&":"&","<":"<",">":">",'"':""","'":"'"},Ok=t=>K8[t];function Mn(t,e){if(e){if(ur.escapeTest.test(t))return t.replace(ur.escapeReplace,Ok)}else if(ur.escapeTestNoEncode.test(t))return t.replace(ur.escapeReplaceNoEncode,Ok);return t}function Ak(t){try{t=encodeURI(t).replace(ur.percentDecode,"%")}catch{return null}return t}function Pk(t,e){var a;let r=t.replace(ur.findPipe,(s,u,c)=>{let f=!1,p=u;for(;--p>=0&&c[p]==="\\";)f=!f;return f?"|":" |"}),n=r.split(ur.splitPipe),i=0;if(n[0].trim()||n.shift(),n.length>0&&!((a=n.at(-1))!=null&&a.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(ur.slashPipe,"|");return n}function Yi(t,e,r){let n=t.length;if(n===0)return"";let i=0;for(;i<n&&t.charAt(n-i-1)===e;)i++;return t.slice(0,n-i)}function Tk(t){let e=t.split(`
|
|
308
|
-
`),r=e.length-1;for(;r>=0&&ur.blankLine.test(e[r]);)r--;return e.length-r<=2?t:e.slice(0,r+1).join(`
|
|
309
|
-
`)}function V8(t,e){if(t.indexOf(e[1])===-1)return-1;let r=0;for(let n=0;n<t.length;n++)if(t[n]==="\\")n++;else if(t[n]===e[0])r++;else if(t[n]===e[1]&&(r--,r<0))return n;return r>0?-2:-1}function G8(t,e=0){let r=e,n="";for(let i of t)if(i===" "){let a=4-r%4;n+=" ".repeat(a),r+=a}else n+=i,r++;return n}function jk(t,e,r,n,i){let a=e.href,s=e.title||null,u=t[1].replace(i.other.outputLinkReplace,"$1");n.state.inLink=!0;let c={type:t[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:s,text:u,tokens:n.inlineTokens(u)};return n.state.inLink=!1,c}function X8(t,e,r){let n=t.match(r.other.indentCodeCompensation);if(n===null)return e;let i=n[1];return e.split(`
|
|
310
|
-
`).map(a=>{let s=a.match(r.other.beginningSpace);if(s===null)return a;let[u]=s;return u.length>=i.length?a.slice(i.length):a}).join(`
|
|
311
|
-
`)}var ld=class{constructor(t){Ze(this,"options");Ze(this,"rules");Ze(this,"lexer");this.options=t||no}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let r=this.options.pedantic?e[0]:Tk(e[0]),n=r.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r,codeBlockStyle:"indented",text:n}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let r=e[0],n=X8(r,e[3]||"",this.rules);return{type:"code",raw:r,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let r=e[2].trim();if(this.rules.other.endingHash.test(r)){let n=Yi(r,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(r=n.trim())}return{type:"heading",raw:Yi(e[0],`
|
|
312
|
-
`),depth:e[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:Yi(e[0],`
|
|
313
|
-
`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let r=Yi(e[0],`
|
|
314
|
-
`).split(`
|
|
315
|
-
`),n="",i="",a=[];for(;r.length>0;){let s=!1,u=[],c;for(c=0;c<r.length;c++)if(this.rules.other.blockquoteStart.test(r[c]))u.push(r[c]),s=!0;else if(!s)u.push(r[c]);else break;r=r.slice(c);let f=u.join(`
|
|
316
|
-
`),p=f.replace(this.rules.other.blockquoteSetextReplace,`
|
|
317
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
|
|
318
|
-
${f}`:f,i=i?`${i}
|
|
319
|
-
${p}`:p;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,a,!0),this.lexer.state.top=h,r.length===0)break;let g=a.at(-1);if((g==null?void 0:g.type)==="code")break;if((g==null?void 0:g.type)==="blockquote"){let v=g,b=v.raw+`
|
|
320
|
-
`+r.join(`
|
|
321
|
-
`),x=this.blockquote(b);a[a.length-1]=x,n=n.substring(0,n.length-v.raw.length)+x.raw,i=i.substring(0,i.length-v.text.length)+x.text;break}else if((g==null?void 0:g.type)==="list"){let v=g,b=v.raw+`
|
|
322
|
-
`+r.join(`
|
|
323
|
-
`),x=this.list(b);a[a.length-1]=x,n=n.substring(0,n.length-g.raw.length)+x.raw,i=i.substring(0,i.length-v.raw.length)+x.raw,r=b.substring(a.at(-1).raw.length).split(`
|
|
324
|
-
`);continue}}return{type:"blockquote",raw:n,tokens:a,text:i}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim(),n=r.length>1,i={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");let a=this.rules.other.listItemRegex(r),s=!1;for(;t;){let c=!1,f="",p="";if(!(e=a.exec(t))||this.rules.block.hr.test(t))break;f=e[0],t=t.substring(f.length);let h=G8(e[2].split(`
|
|
325
|
-
`,1)[0],e[1].length),g=t.split(`
|
|
326
|
-
`,1)[0],v=!h.trim(),b=0;if(this.options.pedantic?(b=2,p=h.trimStart()):v?b=e[1].length+1:(b=h.search(this.rules.other.nonSpaceChar),b=b>4?1:b,p=h.slice(b),b+=e[1].length),v&&this.rules.other.blankLine.test(g)&&(f+=g+`
|
|
327
|
-
`,t=t.substring(g.length+1),c=!0),!c){let x=this.rules.other.nextBulletRegex(b),y=this.rules.other.hrRegex(b),k=this.rules.other.fencesBeginRegex(b),O=this.rules.other.headingBeginRegex(b),A=this.rules.other.htmlBeginRegex(b),T=this.rules.other.blockquoteBeginRegex(b);for(;t;){let E=t.split(`
|
|
328
|
-
`,1)[0],P;if(g=E,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),P=g):P=g.replace(this.rules.other.tabCharGlobal," "),k.test(g)||O.test(g)||A.test(g)||T.test(g)||x.test(g)||y.test(g))break;if(P.search(this.rules.other.nonSpaceChar)>=b||!g.trim())p+=`
|
|
329
|
-
`+P.slice(b);else{if(v||h.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||k.test(h)||O.test(h)||y.test(h))break;p+=`
|
|
330
|
-
`+g}v=!g.trim(),f+=E+`
|
|
331
|
-
`,t=t.substring(E.length+1),h=P.slice(b)}}i.loose||(s?i.loose=!0:this.rules.other.doubleBlankLine.test(f)&&(s=!0)),i.items.push({type:"list_item",raw:f,task:!!this.options.gfm&&this.rules.other.listIsTask.test(p),loose:!1,text:p,tokens:[]}),i.raw+=f}let u=i.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let c of i.items){this.lexer.state.top=!1,c.tokens=this.lexer.blockTokens(c.text,[]);let f=c.tokens[0];if(c.task&&((f==null?void 0:f.type)==="text"||(f==null?void 0:f.type)==="paragraph")){c.text=c.text.replace(this.rules.other.listReplaceTask,""),f.raw=f.raw.replace(this.rules.other.listReplaceTask,""),f.text=f.text.replace(this.rules.other.listReplaceTask,"");for(let h=this.lexer.inlineQueue.length-1;h>=0;h--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[h].src)){this.lexer.inlineQueue[h].src=this.lexer.inlineQueue[h].src.replace(this.rules.other.listReplaceTask,"");break}let p=this.rules.other.listTaskCheckbox.exec(c.raw);if(p){let h={type:"checkbox",raw:p[0]+" ",checked:p[0]!=="[ ]"};c.checked=h.checked,i.loose?c.tokens[0]&&["paragraph","text"].includes(c.tokens[0].type)&&"tokens"in c.tokens[0]&&c.tokens[0].tokens?(c.tokens[0].raw=h.raw+c.tokens[0].raw,c.tokens[0].text=h.raw+c.tokens[0].text,c.tokens[0].tokens.unshift(h)):c.tokens.unshift({type:"paragraph",raw:h.raw,text:h.raw,tokens:[h]}):c.tokens.unshift(h)}}else c.task&&(c.task=!1);if(!i.loose){let p=c.tokens.filter(g=>g.type==="space"),h=p.length>0&&p.some(g=>this.rules.other.anyLine.test(g.raw));i.loose=h}}if(i.loose)for(let c of i.items){c.loose=!0;for(let f of c.tokens)f.type==="text"&&(f.type="paragraph")}return i}}html(t){let e=this.rules.block.html.exec(t);if(e){let r=Tk(e[0]);return{type:"html",block:!0,raw:r,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:r}}}def(t){let e=this.rules.block.def.exec(t);if(e){let r=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:r,raw:Yi(e[0],`
|
|
332
|
-
`),href:n,title:i}}}table(t){var s;let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let r=Pk(e[1]),n=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=(s=e[3])!=null&&s.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
333
|
-
`):[],a={type:"table",raw:Yi(e[0],`
|
|
334
|
-
`),header:[],align:[],rows:[]};if(r.length===n.length){for(let u of n)this.rules.other.tableAlignRight.test(u)?a.align.push("right"):this.rules.other.tableAlignCenter.test(u)?a.align.push("center"):this.rules.other.tableAlignLeft.test(u)?a.align.push("left"):a.align.push(null);for(let u=0;u<r.length;u++)a.header.push({text:r[u],tokens:this.lexer.inline(r[u]),header:!0,align:a.align[u]});for(let u of i)a.rows.push(Pk(u,a.header.length).map((c,f)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:a.align[f]})));return a}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e){let r=e[1].trim();return{type:"heading",raw:Yi(e[0],`
|
|
335
|
-
`),depth:e[2].charAt(0)==="="?1:2,text:r,tokens:this.lexer.inline(r)}}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let r=e[1].charAt(e[1].length-1)===`
|
|
336
|
-
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:r,tokens:this.lexer.inline(r)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let r=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let a=Yi(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{let a=V8(e[2],"()");if(a===-2)return;if(a>-1){let s=(e[0].indexOf("!")===0?5:4)+e[1].length+a;e[2]=e[2].substring(0,a),e[0]=e[0].substring(0,s).trim(),e[3]=""}}let n=e[2],i="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(n);a&&(n=a[1],i=a[3])}else i=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?n=n.slice(1):n=n.slice(1,-1)),jk(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let n=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[n.toLowerCase()];if(!i){let a=r[0].charAt(0);return{type:"text",raw:a,text:a}}return jk(r,i,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!(!n||!n[1]&&!n[2]&&!n[3]&&!n[4]||n[4]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[3])||!r||this.rules.inline.punctuation.exec(r))){let i=[...n[0]].length-1,a,s,u=i,c=0,f=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,e=e.slice(-1*t.length+i);(n=f.exec(e))!==null;){if(a=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!a)continue;if(s=[...a].length,n[3]||n[4]){u+=s;continue}else if((n[5]||n[6])&&i%3&&!((i+s)%3)){c+=s;continue}if(u-=s,u>0)continue;s=Math.min(s,s+u+c);let p=[...n[0]][0].length,h=t.slice(0,i+n.index+p+s);if(Math.min(i,s)%2){let v=h.slice(1,-1);return{type:"em",raw:h,text:v,tokens:this.lexer.inlineTokens(v)}}let g=h.slice(2,-2);return{type:"strong",raw:h,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let r=e[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(r),i=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&i&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:e[0],text:r}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t,e,r=""){let n=this.rules.inline.delLDelim.exec(t);if(n&&(!n[1]||!r||this.rules.inline.punctuation.exec(r))){let i=[...n[0]].length-1,a,s,u=i,c=this.rules.inline.delRDelim;for(c.lastIndex=0,e=e.slice(-1*t.length+i);(n=c.exec(e))!==null;){if(a=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!a||(s=[...a].length,s!==i))continue;if(n[3]||n[4]){u+=s;continue}if(u-=s,u>0)continue;s=Math.min(s,s+u);let f=[...n[0]][0].length,p=t.slice(0,i+n.index+f+s),h=p.slice(i,-i);return{type:"del",raw:p,text:h,tokens:this.lexer.inlineTokens(h)}}}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let r,n;return e[2]==="@"?(r=e[1],n="mailto:"+r):(r=e[1],n=r),{type:"link",raw:e[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}url(t){var r;let e;if(e=this.rules.inline.url.exec(t)){let n,i;if(e[2]==="@")n=e[0],i="mailto:"+n;else{let a;do a=e[0],e[0]=((r=this.rules.inline._backpedal.exec(e[0]))==null?void 0:r[0])??"";while(a!==e[0]);n=e[0],e[1]==="www."?i="http://"+e[0]:i=e[0]}return{type:"link",raw:e[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let r=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:r}}}},wn=class yb{constructor(e){Ze(this,"tokens");Ze(this,"options");Ze(this,"state");Ze(this,"inlineQueue");Ze(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||no,this.options.tokenizer=this.options.tokenizer||new ld,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:ur,block:Sf.normal,inline:Ml.normal};this.options.pedantic?(r.block=Sf.pedantic,r.inline=Ml.pedantic):this.options.gfm&&(r.block=Sf.gfm,this.options.breaks?r.inline=Ml.breaks:r.inline=Ml.gfm),this.tokenizer.rules=r}static get rules(){return{block:Sf,inline:Ml}}static lex(e,r){return new yb(r).lex(e)}static lexInline(e,r){return new yb(r).inlineTokens(e)}lex(e){e=e.replace(ur.carriageReturn,`
|
|
337
|
-
`),this.blockTokens(e,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,r=[],n=!1){var a,s,u;this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(ur.tabCharGlobal," ").replace(ur.spaceLine,""));let i=1/0;for(;e;){if(e.length<i)i=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let c;if((s=(a=this.options.extensions)==null?void 0:a.block)!=null&&s.some(p=>(c=p.call({lexer:this},e,r))?(e=e.substring(c.raw.length),r.push(c),!0):!1))continue;if(c=this.tokenizer.space(e)){e=e.substring(c.raw.length);let p=r.at(-1);c.raw.length===1&&p!==void 0?p.raw+=`
|
|
338
|
-
`:r.push(c);continue}if(c=this.tokenizer.code(e)){e=e.substring(c.raw.length);let p=r.at(-1);(p==null?void 0:p.type)==="paragraph"||(p==null?void 0:p.type)==="text"?(p.raw+=(p.raw.endsWith(`
|
|
339
|
-
`)?"":`
|
|
340
|
-
`)+c.raw,p.text+=`
|
|
341
|
-
`+c.text,this.inlineQueue.at(-1).src=p.text):r.push(c);continue}if(c=this.tokenizer.fences(e)){e=e.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.heading(e)){e=e.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.hr(e)){e=e.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.blockquote(e)){e=e.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.list(e)){e=e.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.html(e)){e=e.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.def(e)){e=e.substring(c.raw.length);let p=r.at(-1);(p==null?void 0:p.type)==="paragraph"||(p==null?void 0:p.type)==="text"?(p.raw+=(p.raw.endsWith(`
|
|
342
|
-
`)?"":`
|
|
343
|
-
`)+c.raw,p.text+=`
|
|
344
|
-
`+c.raw,this.inlineQueue.at(-1).src=p.text):this.tokens.links[c.tag]||(this.tokens.links[c.tag]={href:c.href,title:c.title},r.push(c));continue}if(c=this.tokenizer.table(e)){e=e.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.lheading(e)){e=e.substring(c.raw.length),r.push(c);continue}let f=e;if((u=this.options.extensions)!=null&&u.startBlock){let p=1/0,h=e.slice(1),g;this.options.extensions.startBlock.forEach(v=>{g=v.call({lexer:this},h),typeof g=="number"&&g>=0&&(p=Math.min(p,g))}),p<1/0&&p>=0&&(f=e.substring(0,p+1))}if(this.state.top&&(c=this.tokenizer.paragraph(f))){let p=r.at(-1);n&&(p==null?void 0:p.type)==="paragraph"?(p.raw+=(p.raw.endsWith(`
|
|
345
|
-
`)?"":`
|
|
346
|
-
`)+c.raw,p.text+=`
|
|
347
|
-
`+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=p.text):r.push(c),n=f.length!==e.length,e=e.substring(c.raw.length);continue}if(c=this.tokenizer.text(e)){e=e.substring(c.raw.length);let p=r.at(-1);(p==null?void 0:p.type)==="text"?(p.raw+=(p.raw.endsWith(`
|
|
348
|
-
`)?"":`
|
|
349
|
-
`)+c.raw,p.text+=`
|
|
350
|
-
`+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=p.text):r.push(c);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){var f,p,h,g,v;this.tokenizer.lexer=this;let n=e,i=null;if(this.tokens.links){let b=Object.keys(this.tokens.links);if(b.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(n))!==null;)b.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(n))!==null;)n=n.slice(0,i.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(n))!==null;)a=i[2]?i[2].length:0,n=n.slice(0,i.index+a)+"["+"a".repeat(i[0].length-a-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=((p=(f=this.options.hooks)==null?void 0:f.emStrongMask)==null?void 0:p.call({lexer:this},n))??n;let s=!1,u="",c=1/0;for(;e;){if(e.length<c)c=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}s||(u=""),s=!1;let b;if((g=(h=this.options.extensions)==null?void 0:h.inline)!=null&&g.some(y=>(b=y.call({lexer:this},e,r))?(e=e.substring(b.raw.length),r.push(b),!0):!1))continue;if(b=this.tokenizer.escape(e)){e=e.substring(b.raw.length),r.push(b);continue}if(b=this.tokenizer.tag(e)){e=e.substring(b.raw.length),r.push(b);continue}if(b=this.tokenizer.link(e)){e=e.substring(b.raw.length),r.push(b);continue}if(b=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(b.raw.length);let y=r.at(-1);b.type==="text"&&(y==null?void 0:y.type)==="text"?(y.raw+=b.raw,y.text+=b.text):r.push(b);continue}if(b=this.tokenizer.emStrong(e,n,u)){e=e.substring(b.raw.length),r.push(b);continue}if(b=this.tokenizer.codespan(e)){e=e.substring(b.raw.length),r.push(b);continue}if(b=this.tokenizer.br(e)){e=e.substring(b.raw.length),r.push(b);continue}if(b=this.tokenizer.del(e,n,u)){e=e.substring(b.raw.length),r.push(b);continue}if(b=this.tokenizer.autolink(e)){e=e.substring(b.raw.length),r.push(b);continue}if(!this.state.inLink&&(b=this.tokenizer.url(e))){e=e.substring(b.raw.length),r.push(b);continue}let x=e;if((v=this.options.extensions)!=null&&v.startInline){let y=1/0,k=e.slice(1),O;this.options.extensions.startInline.forEach(A=>{O=A.call({lexer:this},k),typeof O=="number"&&O>=0&&(y=Math.min(y,O))}),y<1/0&&y>=0&&(x=e.substring(0,y+1))}if(b=this.tokenizer.inlineText(x)){e=e.substring(b.raw.length),b.raw.slice(-1)!=="_"&&(u=b.raw.slice(-1)),s=!0;let y=r.at(-1);(y==null?void 0:y.type)==="text"?(y.raw+=b.raw,y.text+=b.text):r.push(b);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return r}infiniteLoopError(e){let r="Infinite loop on byte: "+e;if(this.options.silent)console.error(r);else throw new Error(r)}},ud=class{constructor(e){Ze(this,"options");Ze(this,"parser");this.options=e||no}space(e){return""}code({text:e,lang:r,escaped:n}){var s;let i=(s=(r||"").match(ur.notSpaceStart))==null?void 0:s[0],a=e.replace(ur.endingNewline,"")+`
|
|
351
|
-
`;return i?'<pre><code class="language-'+Mn(i)+'">'+(n?a:Mn(a,!0))+`</code></pre>
|
|
352
|
-
`:"<pre><code>"+(n?a:Mn(a,!0))+`</code></pre>
|
|
353
|
-
`}blockquote({tokens:e}){return`<blockquote>
|
|
354
|
-
${this.parser.parse(e)}</blockquote>
|
|
355
|
-
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:r}){return`<h${r}>${this.parser.parseInline(e)}</h${r}>
|
|
356
|
-
`}hr(e){return`<hr>
|
|
357
|
-
`}list(e){let r=e.ordered,n=e.start,i="";for(let u=0;u<e.items.length;u++){let c=e.items[u];i+=this.listitem(c)}let a=r?"ol":"ul",s=r&&n!==1?' start="'+n+'"':"";return"<"+a+s+`>
|
|
358
|
-
`+i+"</"+a+`>
|
|
359
|
-
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
|
|
360
|
-
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
361
|
-
`}table(e){let r="",n="";for(let a=0;a<e.header.length;a++)n+=this.tablecell(e.header[a]);r+=this.tablerow({text:n});let i="";for(let a=0;a<e.rows.length;a++){let s=e.rows[a];n="";for(let u=0;u<s.length;u++)n+=this.tablecell(s[u]);i+=this.tablerow({text:n})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
|
|
362
|
-
<thead>
|
|
363
|
-
`+r+`</thead>
|
|
364
|
-
`+i+`</table>
|
|
365
|
-
`}tablerow({text:e}){return`<tr>
|
|
366
|
-
${e}</tr>
|
|
367
|
-
`}tablecell(e){let r=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+r+`</${n}>
|
|
368
|
-
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Mn(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:r,tokens:n}){let i=this.parser.parseInline(n),a=Ak(e);if(a===null)return i;e=a;let s='<a href="'+e+'"';return r&&(s+=' title="'+Mn(r)+'"'),s+=">"+i+"</a>",s}image({href:e,title:r,text:n,tokens:i}){i&&(n=this.parser.parseInline(i,this.parser.textRenderer));let a=Ak(e);if(a===null)return Mn(n);e=a;let s=`<img src="${e}" alt="${Mn(n)}"`;return r&&(s+=` title="${Mn(r)}"`),s+=">",s}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Mn(e.text)}},kx=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},xn=class bb{constructor(e){Ze(this,"options");Ze(this,"renderer");Ze(this,"textRenderer");this.options=e||no,this.options.renderer=this.options.renderer||new ud,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new kx}static parse(e,r){return new bb(r).parse(e)}static parseInline(e,r){return new bb(r).parseInline(e)}parse(e){var n,i;this.renderer.parser=this;let r="";for(let a=0;a<e.length;a++){let s=e[a];if((i=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&i[s.type]){let c=s,f=this.options.extensions.renderers[c.type].call({parser:this},c);if(f!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(c.type)){r+=f||"";continue}}let u=s;switch(u.type){case"space":{r+=this.renderer.space(u);break}case"hr":{r+=this.renderer.hr(u);break}case"heading":{r+=this.renderer.heading(u);break}case"code":{r+=this.renderer.code(u);break}case"table":{r+=this.renderer.table(u);break}case"blockquote":{r+=this.renderer.blockquote(u);break}case"list":{r+=this.renderer.list(u);break}case"checkbox":{r+=this.renderer.checkbox(u);break}case"html":{r+=this.renderer.html(u);break}case"def":{r+=this.renderer.def(u);break}case"paragraph":{r+=this.renderer.paragraph(u);break}case"text":{r+=this.renderer.text(u);break}default:{let c='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return r}parseInline(e,r=this.renderer){var i,a;this.renderer.parser=this;let n="";for(let s=0;s<e.length;s++){let u=e[s];if((a=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&a[u.type]){let f=this.options.extensions.renderers[u.type].call({parser:this},u);if(f!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(u.type)){n+=f||"";continue}}let c=u;switch(c.type){case"escape":{n+=r.text(c);break}case"html":{n+=r.html(c);break}case"link":{n+=r.link(c);break}case"image":{n+=r.image(c);break}case"checkbox":{n+=r.checkbox(c);break}case"strong":{n+=r.strong(c);break}case"em":{n+=r.em(c);break}case"codespan":{n+=r.codespan(c);break}case"br":{n+=r.br(c);break}case"del":{n+=r.del(c);break}case"text":{n+=r.text(c);break}default:{let f='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(f),"";throw new Error(f)}}}return n}},Yf,Xl=(Yf=class{constructor(e){Ze(this,"options");Ze(this,"block");this.options=e||no}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?wn.lex:wn.lexInline}provideParser(e=this.block){return e?xn.parse:xn.parseInline}},Ze(Yf,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Ze(Yf,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Yf),Y8=class{constructor(...t){Ze(this,"defaults",gx());Ze(this,"options",this.setOptions);Ze(this,"parse",this.parseMarkdown(!0));Ze(this,"parseInline",this.parseMarkdown(!1));Ze(this,"Parser",xn);Ze(this,"Renderer",ud);Ze(this,"TextRenderer",kx);Ze(this,"Lexer",wn);Ze(this,"Tokenizer",ld);Ze(this,"Hooks",Xl);this.use(...t)}walkTokens(t,e){var n,i;let r=[];for(let a of t)switch(r=r.concat(e.call(this,a)),a.type){case"table":{let s=a;for(let u of s.header)r=r.concat(this.walkTokens(u.tokens,e));for(let u of s.rows)for(let c of u)r=r.concat(this.walkTokens(c.tokens,e));break}case"list":{let s=a;r=r.concat(this.walkTokens(s.items,e));break}default:{let s=a;(i=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&i[s.type]?this.defaults.extensions.childTokens[s.type].forEach(u=>{let c=s[u].flat(1/0);r=r.concat(this.walkTokens(c,e))}):s.tokens&&(r=r.concat(this.walkTokens(s.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let a=e.renderers[i.name];a?e.renderers[i.name]=function(...s){let u=i.renderer.apply(this,s);return u===!1&&(u=a.apply(this,s)),u}:e.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=e[i.level];a?a.unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(e.childTokens[i.name]=i.childTokens)}),n.extensions=e),r.renderer){let i=this.defaults.renderer||new ud(this.defaults);for(let a in r.renderer){if(!(a in i))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let s=a,u=r.renderer[s],c=i[s];i[s]=(...f)=>{let p=u.apply(i,f);return p===!1&&(p=c.apply(i,f)),p||""}}n.renderer=i}if(r.tokenizer){let i=this.defaults.tokenizer||new ld(this.defaults);for(let a in r.tokenizer){if(!(a in i))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let s=a,u=r.tokenizer[s],c=i[s];i[s]=(...f)=>{let p=u.apply(i,f);return p===!1&&(p=c.apply(i,f)),p}}n.tokenizer=i}if(r.hooks){let i=this.defaults.hooks||new Xl;for(let a in r.hooks){if(!(a in i))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let s=a,u=r.hooks[s],c=i[s];Xl.passThroughHooks.has(a)?i[s]=f=>{if(this.defaults.async&&Xl.passThroughHooksRespectAsync.has(a))return(async()=>{let h=await u.call(i,f);return c.call(i,h)})();let p=u.call(i,f);return c.call(i,p)}:i[s]=(...f)=>{if(this.defaults.async)return(async()=>{let h=await u.apply(i,f);return h===!1&&(h=await c.apply(i,f)),h})();let p=u.apply(i,f);return p===!1&&(p=c.apply(i,f)),p}}n.hooks=i}if(r.walkTokens){let i=this.defaults.walkTokens,a=r.walkTokens;n.walkTokens=function(s){let u=[];return u.push(a.call(this,s)),i&&(u=u.concat(i.call(this,s))),u}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return wn.lex(t,e??this.defaults)}parser(t,e){return xn.parse(t,e??this.defaults)}parseMarkdown(t){return(e,r)=>{let n={...r},i={...this.defaults,...n},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&n.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=t),i.async)return(async()=>{let s=i.hooks?await i.hooks.preprocess(e):e,u=await(i.hooks?await i.hooks.provideLexer(t):t?wn.lex:wn.lexInline)(s,i),c=i.hooks?await i.hooks.processAllTokens(u):u;i.walkTokens&&await Promise.all(this.walkTokens(c,i.walkTokens));let f=await(i.hooks?await i.hooks.provideParser(t):t?xn.parse:xn.parseInline)(c,i);return i.hooks?await i.hooks.postprocess(f):f})().catch(a);try{i.hooks&&(e=i.hooks.preprocess(e));let s=(i.hooks?i.hooks.provideLexer(t):t?wn.lex:wn.lexInline)(e,i);i.hooks&&(s=i.hooks.processAllTokens(s)),i.walkTokens&&this.walkTokens(s,i.walkTokens);let u=(i.hooks?i.hooks.provideParser(t):t?xn.parse:xn.parseInline)(s,i);return i.hooks&&(u=i.hooks.postprocess(u)),u}catch(s){return a(s)}}}onError(t,e){return r=>{if(r.message+=`
|
|
369
|
-
Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error occurred:</p><pre>"+Mn(r.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(r);throw r}}},Ja=new Y8;function qe(t,e){return Ja.parse(t,e)}qe.options=qe.setOptions=function(t){return Ja.setOptions(t),qe.defaults=Ja.defaults,YC(qe.defaults),qe};qe.getDefaults=gx;qe.defaults=no;qe.use=function(...t){return Ja.use(...t),qe.defaults=Ja.defaults,YC(qe.defaults),qe};qe.walkTokens=function(t,e){return Ja.walkTokens(t,e)};qe.parseInline=Ja.parseInline;qe.Parser=xn;qe.parser=xn.parse;qe.Renderer=ud;qe.TextRenderer=kx;qe.Lexer=wn;qe.lexer=wn.lex;qe.Tokenizer=ld;qe.Hooks=Xl;qe.parse=qe;qe.options;qe.setOptions;qe.use;qe.walkTokens;qe.parseInline;xn.parse;wn.lex;function rg(t){return new Date(t).toISOString()}function J8(){const[t,e]=R.useState(!1),[r,n]=R.useState([]),[i,a]=R.useState(""),[s,u]=R.useState(!1),[c,f]=R.useState(""),[p,h]=R.useState(null),g=R.useRef(null),v=R.useRef(null),b=R.useRef(null),x=R.useMemo(()=>r.slice(-10),[r]),y=R.useCallback(async()=>{try{const $=await Ye.get("/conversations?limit=10");n($.messages.map(I=>({...I,timestamp:rg(I.timestamp)})))}catch{}},[]);R.useEffect(()=>{y()},[y]),R.useEffect(()=>{t&&y()},[y,t]);const k=R.useCallback($=>{u(!0),f($)},[]),O=R.useCallback($=>{u(!1),f(""),n(I=>[...I,{id:crypto.randomUUID(),role:"assistant",content:$,timestamp:rg(new Date)}])},[]),A=R.useCallback($=>{var I,q,U;$.notification&&GC({id:((I=$.event)==null?void 0:I.id)??crypto.randomUUID(),message:$.notification,timestamp:((q=$.event)==null?void 0:q.timestamp)??new Date().toISOString(),eventType:((U=$.event)==null?void 0:U.type)??"unknown"})},[]),T=R.useCallback(()=>{u(!1),f("")},[]),{connected:E,sendMessage:P}=XC({onDelta:k,onMessage:O,onEvent:A,onError:T});R.useLayoutEffect(()=>{const $=g.current;$&&($.scrollTop=$.scrollHeight)},[x,c,s,t]);async function C($,I){const q=new FormData;q.append("file",$),q.append("messageId",I);const U=mx();if(!(await fetch("/api/attachments",{method:"POST",body:q,headers:U?{Authorization:`Bearer ${U}`}:void 0})).ok)throw new Error("Failed to upload attachment")}async function N(){const $=i.trim();if(!$&&!p||s)return;const I=crypto.randomUUID(),q=p==null?void 0:p.name,U=[$,q?`Attachment: ${q}`:""].filter(Boolean).join(`
|
|
370
|
-
|
|
371
|
-
`);n(K=>[...K,{id:I,role:"user",content:$,timestamp:rg(new Date),attachmentName:q}]),a(""),h(null),u(!0),f(""),b.current&&(b.current.value=""),v.current&&(v.current.style.height="auto");try{p&&await C(p,I),P(U),e(!0)}catch{u(!1)}}function L($){a($.target.value),v.current&&(v.current.style.height="auto",v.current.style.height=`${Math.min(v.current.scrollHeight,96)}px`)}function V($){$.key==="Enter"&&!$.shiftKey&&($.preventDefault(),N())}return _.jsxs("div",{className:"fixed bottom-5 right-5 z-50 flex flex-col items-end gap-3",children:[t&&_.jsxs("div",{className:"w-[340px] h-[460px] rounded-2xl bg-[#222] border border-white/[0.07] shadow-2xl overflow-hidden flex flex-col",children:[_.jsxs("div",{className:"bg-gradient-to-r from-[#E43A9C] to-[#9333ea] p-3 rounded-t-2xl flex items-center justify-between gap-3",children:[_.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[_.jsx("div",{className:"w-8 h-8 rounded-xl bg-black/15 border border-white/10 flex items-center justify-center flex-shrink-0",children:_.jsx(ra,{height:16})}),_.jsxs("div",{className:"min-w-0",children:[_.jsx("p",{className:"text-sm font-medium text-white leading-none",children:"Quick Chat"}),_.jsx("p",{className:"text-[10px] font-mono text-white/70 mt-1",children:E?"live session":"reconnecting..."})]})]}),_.jsx("button",{type:"button",onClick:()=>e(!1),className:"text-xs font-mono text-white/80 hover:text-white transition-colors",children:"Close"})]}),_.jsxs("div",{ref:g,className:"flex-1 overflow-y-auto p-3 space-y-2",children:[x.length===0&&!s?_.jsx("div",{className:"h-full flex items-center justify-center text-center px-6",children:_.jsx("p",{className:"text-xs text-zinc-500",children:"Ask IO anything without leaving this page."})}):x.map($=>_.jsx("div",{className:`flex ${$.role==="user"?"justify-end":"justify-start"}`,title:$.timestamp,children:_.jsxs("div",{className:`max-w-[85%] ${$.role==="user"?"ml-8":"mr-8"}`,children:[$.attachmentName&&_.jsx("div",{className:"mb-1 rounded-xl border border-white/[0.08] bg-[#1e1e1e] px-3 py-2 text-[11px] font-mono text-zinc-400",children:$.attachmentName}),$.content&&_.jsx("div",{className:$.role==="user"?"bg-gradient-to-br from-[#E43A9C] to-[#D83333] rounded-xl px-3 py-2 text-xs text-white whitespace-pre-wrap":"bg-[#2a2a2a] rounded-xl px-3 py-2 text-xs text-zinc-200",children:$.role==="user"?$.content:_.jsx("div",{className:"prose-io [&_*]:text-xs",dangerouslySetInnerHTML:{__html:qe.parse($.content)}})})]})},$.id)),s&&_.jsx("div",{className:"flex justify-start",children:_.jsx("div",{className:"max-w-[85%] mr-8 bg-[#2a2a2a] rounded-xl px-3 py-2 text-xs text-zinc-200",children:c?_.jsx("div",{className:"prose-io [&_*]:text-xs",dangerouslySetInnerHTML:{__html:qe.parse(c)}}):_.jsx("div",{className:"flex items-center gap-1.5 py-1",children:[0,120,240].map($=>_.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-[#E43A9C] animate-bounce",style:{animationDelay:`${$}ms`}},$))})})})]}),_.jsx("div",{className:"p-3 border-t border-white/[0.07]",children:_.jsxs("div",{className:"bg-[#1e1e1e] border border-white/[0.08] rounded-2xl overflow-hidden transition-colors focus-within:border-[#E43A9C]/30",children:[_.jsx("input",{ref:b,type:"file",className:"hidden",onChange:$=>{var I;return h(((I=$.target.files)==null?void 0:I[0])??null)}}),p&&_.jsxs("div",{className:"px-3 pt-2 text-[10px] font-mono text-zinc-400",children:["Attached: ",p.name]}),_.jsxs("div",{className:"flex items-end gap-2 px-2.5 py-2",children:[_.jsx("button",{type:"button",onClick:()=>{var $;return($=b.current)==null?void 0:$.click()},className:"p-2 rounded-xl hover:bg-white/[0.05] text-zinc-600 hover:text-zinc-300 transition-colors flex-shrink-0",children:_.jsx(UC,{className:"w-4 h-4"})}),_.jsx("textarea",{ref:v,value:i,onChange:L,onKeyDown:V,placeholder:"Message IO…",rows:1,className:"flex-1 bg-transparent py-1 text-sm text-zinc-200 placeholder:text-zinc-700 resize-none focus:outline-none",style:{minHeight:"36px",maxHeight:"96px",fontFamily:"Inter, sans-serif"}}),_.jsx("button",{type:"button",onClick:()=>{if(s){u(!1),f("");return}N()},disabled:!i.trim()&&!p||!E&&!s,className:"w-9 h-9 rounded-xl text-white disabled:opacity-30 disabled:cursor-not-allowed transition-opacity hover:opacity-90 primary-btn flex items-center justify-center flex-shrink-0 shadow-lg",children:s?_.jsx(KC,{className:"w-3.5 h-3.5"}):_.jsx(WC,{className:"w-3.5 h-3.5"})})]})]})})]}),_.jsx("button",{type:"button",onClick:()=>e($=>!$),className:"w-12 h-12 rounded-full primary-btn shadow-lg text-white flex items-center justify-center hover:opacity-95 transition-opacity","aria-label":t?"Close quick chat":"Open quick chat",children:_.jsx(T5,{className:"w-5 h-5"})})]})}function oR(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(r=oR(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function De(){for(var t,e,r=0,n="",i=arguments.length;r<i;r++)(t=arguments[r])&&(e=oR(t))&&(n&&(n+=" "),n+=e);return n}const Q8=(t,e)=>{const r=new Array(t.length+e.length);for(let n=0;n<t.length;n++)r[n]=t[n];for(let n=0;n<e.length;n++)r[t.length+n]=e[n];return r},Z8=(t,e)=>({classGroupId:t,validator:e}),sR=(t=new Map,e=null,r)=>({nextPart:t,validators:e,classGroupId:r}),cd="-",Ck=[],eB="arbitrary..",tB=t=>{const e=nB(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return rB(s);const u=s.split(cd),c=u[0]===""&&u.length>1?1:0;return lR(u,c,e)},getConflictingClassGroupIds:(s,u)=>{if(u){const c=n[s],f=r[s];return c?f?Q8(f,c):c:f||Ck}return r[s]||Ck}}},lR=(t,e,r)=>{if(t.length-e===0)return r.classGroupId;const i=t[e],a=r.nextPart.get(i);if(a){const f=lR(t,e+1,a);if(f)return f}const s=r.validators;if(s===null)return;const u=e===0?t.join(cd):t.slice(e).join(cd),c=s.length;for(let f=0;f<c;f++){const p=s[f];if(p.validator(u))return p.classGroupId}},rB=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),r=e.indexOf(":"),n=e.slice(0,r);return n?eB+n:void 0})(),nB=t=>{const{theme:e,classGroups:r}=t;return iB(r,e)},iB=(t,e)=>{const r=sR();for(const n in t){const i=t[n];Ex(i,r,n,e)}return r},Ex=(t,e,r,n)=>{const i=t.length;for(let a=0;a<i;a++){const s=t[a];aB(s,e,r,n)}},aB=(t,e,r,n)=>{if(typeof t=="string"){oB(t,e,r);return}if(typeof t=="function"){sB(t,e,r,n);return}lB(t,e,r,n)},oB=(t,e,r)=>{const n=t===""?e:uR(e,t);n.classGroupId=r},sB=(t,e,r,n)=>{if(uB(t)){Ex(t(n),e,r,n);return}e.validators===null&&(e.validators=[]),e.validators.push(Z8(r,t))},lB=(t,e,r,n)=>{const i=Object.entries(t),a=i.length;for(let s=0;s<a;s++){const[u,c]=i[s];Ex(c,uR(e,u),r,n)}},uR=(t,e)=>{let r=t;const n=e.split(cd),i=n.length;for(let a=0;a<i;a++){const s=n[a];let u=r.nextPart.get(s);u||(u=sR(),r.nextPart.set(s,u)),r=u}return r},uB=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,cB=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=Object.create(null),n=Object.create(null);const i=(a,s)=>{r[a]=s,e++,e>t&&(e=0,n=r,r=Object.create(null))};return{get(a){let s=r[a];if(s!==void 0)return s;if((s=n[a])!==void 0)return i(a,s),s},set(a,s){a in r?r[a]=s:i(a,s)}}},wb="!",Rk=":",fB=[],Nk=(t,e,r,n,i)=>({modifiers:t,hasImportantModifier:e,baseClassName:r,maybePostfixModifierPosition:n,isExternal:i}),dB=t=>{const{prefix:e,experimentalParseClassName:r}=t;let n=i=>{const a=[];let s=0,u=0,c=0,f;const p=i.length;for(let x=0;x<p;x++){const y=i[x];if(s===0&&u===0){if(y===Rk){a.push(i.slice(c,x)),c=x+1;continue}if(y==="/"){f=x;continue}}y==="["?s++:y==="]"?s--:y==="("?u++:y===")"&&u--}const h=a.length===0?i:i.slice(c);let g=h,v=!1;h.endsWith(wb)?(g=h.slice(0,-1),v=!0):h.startsWith(wb)&&(g=h.slice(1),v=!0);const b=f&&f>c?f-c:void 0;return Nk(a,v,g,b)};if(e){const i=e+Rk,a=n;n=s=>s.startsWith(i)?a(s.slice(i.length)):Nk(fB,!1,s,void 0,!0)}if(r){const i=n;n=a=>r({className:a,parseClassName:i})}return n},hB=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((r,n)=>{e.set(r,1e6+n)}),r=>{const n=[];let i=[];for(let a=0;a<r.length;a++){const s=r[a],u=s[0]==="[",c=e.has(s);u||c?(i.length>0&&(i.sort(),n.push(...i),i=[]),n.push(s)):i.push(s)}return i.length>0&&(i.sort(),n.push(...i)),n}},pB=t=>({cache:cB(t.cacheSize),parseClassName:dB(t),sortModifiers:hB(t),postfixLookupClassGroupIds:mB(t),...tB(t)}),mB=t=>{const e=Object.create(null),r=t.postfixLookupClassGroups;if(r)for(let n=0;n<r.length;n++)e[r[n]]=!0;return e},gB=/\s+/,vB=(t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:s}=e,u=[],c=t.trim().split(gB);let f="";for(let p=c.length-1;p>=0;p-=1){const h=c[p],{isExternal:g,modifiers:v,hasImportantModifier:b,baseClassName:x,maybePostfixModifierPosition:y}=r(h);if(g){f=h+(f.length>0?" "+f:f);continue}let k=!!y,O;if(k){const C=x.substring(0,y);O=n(C);const N=O&&s[O]?n(x):void 0;N&&N!==O&&(O=N,k=!1)}else O=n(x);if(!O){if(!k){f=h+(f.length>0?" "+f:f);continue}if(O=n(x),!O){f=h+(f.length>0?" "+f:f);continue}k=!1}const A=v.length===0?"":v.length===1?v[0]:a(v).join(":"),T=b?A+wb:A,E=T+O;if(u.indexOf(E)>-1)continue;u.push(E);const P=i(O,k);for(let C=0;C<P.length;++C){const N=P[C];u.push(T+N)}f=h+(f.length>0?" "+f:f)}return f},yB=(...t)=>{let e=0,r,n,i="";for(;e<t.length;)(r=t[e++])&&(n=cR(r))&&(i&&(i+=" "),i+=n);return i},cR=t=>{if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=cR(t[n]))&&(r&&(r+=" "),r+=e);return r},bB=(t,...e)=>{let r,n,i,a;const s=c=>{const f=e.reduce((p,h)=>h(p),t());return r=pB(f),n=r.cache.get,i=r.cache.set,a=u,u(c)},u=c=>{const f=n(c);if(f)return f;const p=vB(c,r);return i(c,p),p};return a=s,(...c)=>a(yB(...c))},wB=[],It=t=>{const e=r=>r[t]||wB;return e.isThemeGetter=!0,e},fR=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,dR=/^\((?:(\w[\w-]*):)?(.+)\)$/i,xB=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,_B=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,SB=/\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$/,kB=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,EB=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,OB=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ji=t=>xB.test(t),Be=t=>!!t&&!Number.isNaN(Number(t)),$n=t=>!!t&&Number.isInteger(Number(t)),ng=t=>t.endsWith("%")&&Be(t.slice(0,-1)),ri=t=>_B.test(t),hR=()=>!0,AB=t=>SB.test(t)&&!kB.test(t),Ox=()=>!1,PB=t=>EB.test(t),TB=t=>OB.test(t),jB=t=>!ge(t)&&!ye(t),CB=t=>t.startsWith("@container")&&(t[10]==="/"&&t[11]!==void 0||t[11]==="s"&&t[16]!==void 0&&t.startsWith("-size/",10)||t[11]==="n"&&t[18]!==void 0&&t.startsWith("-normal/",10)),RB=t=>sa(t,gR,Ox),ge=t=>fR.test(t),Ca=t=>sa(t,vR,AB),$k=t=>sa(t,zB,Be),NB=t=>sa(t,bR,hR),$B=t=>sa(t,yR,Ox),Ik=t=>sa(t,pR,Ox),IB=t=>sa(t,mR,TB),kf=t=>sa(t,wR,PB),ye=t=>dR.test(t),Ll=t=>io(t,vR),MB=t=>io(t,yR),Mk=t=>io(t,pR),LB=t=>io(t,gR),DB=t=>io(t,mR),Ef=t=>io(t,wR,!0),BB=t=>io(t,bR,!0),sa=(t,e,r)=>{const n=fR.exec(t);return n?n[1]?e(n[1]):r(n[2]):!1},io=(t,e,r=!1)=>{const n=dR.exec(t);return n?n[1]?e(n[1]):r:!1},pR=t=>t==="position"||t==="percentage",mR=t=>t==="image"||t==="url",gR=t=>t==="length"||t==="size"||t==="bg-size",vR=t=>t==="length",zB=t=>t==="number",yR=t=>t==="family-name",bR=t=>t==="number"||t==="weight",wR=t=>t==="shadow",qB=()=>{const t=It("color"),e=It("font"),r=It("text"),n=It("font-weight"),i=It("tracking"),a=It("leading"),s=It("breakpoint"),u=It("container"),c=It("spacing"),f=It("radius"),p=It("shadow"),h=It("inset-shadow"),g=It("text-shadow"),v=It("drop-shadow"),b=It("blur"),x=It("perspective"),y=It("aspect"),k=It("ease"),O=It("animate"),A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...T(),ye,ge],P=()=>["auto","hidden","clip","visible","scroll"],C=()=>["auto","contain","none"],N=()=>[ye,ge,c],L=()=>[Ji,"full","auto",...N()],V=()=>[$n,"none","subgrid",ye,ge],$=()=>["auto",{span:["full",$n,ye,ge]},$n,ye,ge],I=()=>[$n,"auto",ye,ge],q=()=>["auto","min","max","fr",ye,ge],U=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],K=()=>["start","end","center","stretch","center-safe","end-safe"],G=()=>["auto",...N()],Z=()=>[Ji,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],X=()=>[Ji,"screen","full","dvw","lvw","svw","min","max","fit",...N()],te=()=>[Ji,"screen","full","lh","dvh","lvh","svh","min","max","fit",...N()],H=()=>[t,ye,ge],z=()=>[...T(),Mk,Ik,{position:[ye,ge]}],B=()=>["no-repeat",{repeat:["","x","y","space","round"]}],J=()=>["auto","cover","contain",LB,RB,{size:[ye,ge]}],ae=()=>[ng,Ll,Ca],se=()=>["","none","full",f,ye,ge],de=()=>["",Be,Ll,Ca],Ne=()=>["solid","dashed","dotted","double"],pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ne=()=>[Be,ng,Mk,Ik],_e=()=>["","none",b,ye,ge],Ee=()=>["none",Be,ye,ge],ie=()=>["none",Be,ye,ge],He=()=>[Be,ye,ge],$e=()=>[Ji,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ri],breakpoint:[ri],color:[hR],container:[ri],"drop-shadow":[ri],ease:["in","out","in-out"],font:[jB],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ri],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ri],shadow:[ri],spacing:["px",Be],text:[ri],"text-shadow":[ri],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ji,ge,ye,y]}],container:["container"],"container-type":[{"@container":["","normal","size",ye,ge]}],"container-named":[CB],columns:[{columns:[Be,ge,ye,u]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:E()}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:L()}],"inset-x":[{"inset-x":L()}],"inset-y":[{"inset-y":L()}],start:[{"inset-s":L(),start:L()}],end:[{"inset-e":L(),end:L()}],"inset-bs":[{"inset-bs":L()}],"inset-be":[{"inset-be":L()}],top:[{top:L()}],right:[{right:L()}],bottom:[{bottom:L()}],left:[{left:L()}],visibility:["visible","invisible","collapse"],z:[{z:[$n,"auto",ye,ge]}],basis:[{basis:[Ji,"full","auto",u,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Be,Ji,"auto","initial","none",ge]}],grow:[{grow:["",Be,ye,ge]}],shrink:[{shrink:["",Be,ye,ge]}],order:[{order:[$n,"first","last","none",ye,ge]}],"grid-cols":[{"grid-cols":V()}],"col-start-end":[{col:$()}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":V()}],"row-start-end":[{row:$()}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":q()}],"auto-rows":[{"auto-rows":q()}],gap:[{gap:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[...U(),"normal"]}],"justify-items":[{"justify-items":[...K(),"normal"]}],"justify-self":[{"justify-self":["auto",...K()]}],"align-content":[{content:["normal",...U()]}],"align-items":[{items:[...K(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...K(),{baseline:["","last"]}]}],"place-content":[{"place-content":U()}],"place-items":[{"place-items":[...K(),"baseline"]}],"place-self":[{"place-self":["auto",...K()]}],p:[{p:N()}],px:[{px:N()}],py:[{py:N()}],ps:[{ps:N()}],pe:[{pe:N()}],pbs:[{pbs:N()}],pbe:[{pbe:N()}],pt:[{pt:N()}],pr:[{pr:N()}],pb:[{pb:N()}],pl:[{pl:N()}],m:[{m:G()}],mx:[{mx:G()}],my:[{my:G()}],ms:[{ms:G()}],me:[{me:G()}],mbs:[{mbs:G()}],mbe:[{mbe:G()}],mt:[{mt:G()}],mr:[{mr:G()}],mb:[{mb:G()}],ml:[{ml:G()}],"space-x":[{"space-x":N()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":N()}],"space-y-reverse":["space-y-reverse"],size:[{size:Z()}],"inline-size":[{inline:["auto",...X()]}],"min-inline-size":[{"min-inline":["auto",...X()]}],"max-inline-size":[{"max-inline":["none",...X()]}],"block-size":[{block:["auto",...te()]}],"min-block-size":[{"min-block":["auto",...te()]}],"max-block-size":[{"max-block":["none",...te()]}],w:[{w:[u,"screen",...Z()]}],"min-w":[{"min-w":[u,"screen","none",...Z()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[s]},...Z()]}],h:[{h:["screen","lh",...Z()]}],"min-h":[{"min-h":["screen","lh","none",...Z()]}],"max-h":[{"max-h":["screen","lh",...Z()]}],"font-size":[{text:["base",r,Ll,Ca]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,BB,NB]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ng,ge]}],"font-family":[{font:[MB,$B,e]}],"font-features":[{"font-features":[ge]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,ye,ge]}],"line-clamp":[{"line-clamp":[Be,"none",ye,$k]}],leading:[{leading:[a,...N()]}],"list-image":[{"list-image":["none",ye,ge]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ye,ge]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:H()}],"text-color":[{text:H()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ne(),"wavy"]}],"text-decoration-thickness":[{decoration:[Be,"from-font","auto",ye,Ca]}],"text-decoration-color":[{decoration:H()}],"underline-offset":[{"underline-offset":[Be,"auto",ye,ge]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"tab-size":[{tab:[$n,ye,ge]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ye,ge]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ye,ge]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:z()}],"bg-repeat":[{bg:B()}],"bg-size":[{bg:J()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},$n,ye,ge],radial:["",ye,ge],conic:[$n,ye,ge]},DB,IB]}],"bg-color":[{bg:H()}],"gradient-from-pos":[{from:ae()}],"gradient-via-pos":[{via:ae()}],"gradient-to-pos":[{to:ae()}],"gradient-from":[{from:H()}],"gradient-via":[{via:H()}],"gradient-to":[{to:H()}],rounded:[{rounded:se()}],"rounded-s":[{"rounded-s":se()}],"rounded-e":[{"rounded-e":se()}],"rounded-t":[{"rounded-t":se()}],"rounded-r":[{"rounded-r":se()}],"rounded-b":[{"rounded-b":se()}],"rounded-l":[{"rounded-l":se()}],"rounded-ss":[{"rounded-ss":se()}],"rounded-se":[{"rounded-se":se()}],"rounded-ee":[{"rounded-ee":se()}],"rounded-es":[{"rounded-es":se()}],"rounded-tl":[{"rounded-tl":se()}],"rounded-tr":[{"rounded-tr":se()}],"rounded-br":[{"rounded-br":se()}],"rounded-bl":[{"rounded-bl":se()}],"border-w":[{border:de()}],"border-w-x":[{"border-x":de()}],"border-w-y":[{"border-y":de()}],"border-w-s":[{"border-s":de()}],"border-w-e":[{"border-e":de()}],"border-w-bs":[{"border-bs":de()}],"border-w-be":[{"border-be":de()}],"border-w-t":[{"border-t":de()}],"border-w-r":[{"border-r":de()}],"border-w-b":[{"border-b":de()}],"border-w-l":[{"border-l":de()}],"divide-x":[{"divide-x":de()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":de()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ne(),"hidden","none"]}],"divide-style":[{divide:[...Ne(),"hidden","none"]}],"border-color":[{border:H()}],"border-color-x":[{"border-x":H()}],"border-color-y":[{"border-y":H()}],"border-color-s":[{"border-s":H()}],"border-color-e":[{"border-e":H()}],"border-color-bs":[{"border-bs":H()}],"border-color-be":[{"border-be":H()}],"border-color-t":[{"border-t":H()}],"border-color-r":[{"border-r":H()}],"border-color-b":[{"border-b":H()}],"border-color-l":[{"border-l":H()}],"divide-color":[{divide:H()}],"outline-style":[{outline:[...Ne(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Be,ye,ge]}],"outline-w":[{outline:["",Be,Ll,Ca]}],"outline-color":[{outline:H()}],shadow:[{shadow:["","none",p,Ef,kf]}],"shadow-color":[{shadow:H()}],"inset-shadow":[{"inset-shadow":["none",h,Ef,kf]}],"inset-shadow-color":[{"inset-shadow":H()}],"ring-w":[{ring:de()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:H()}],"ring-offset-w":[{"ring-offset":[Be,Ca]}],"ring-offset-color":[{"ring-offset":H()}],"inset-ring-w":[{"inset-ring":de()}],"inset-ring-color":[{"inset-ring":H()}],"text-shadow":[{"text-shadow":["none",g,Ef,kf]}],"text-shadow-color":[{"text-shadow":H()}],opacity:[{opacity:[Be,ye,ge]}],"mix-blend":[{"mix-blend":[...pe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":pe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Be]}],"mask-image-linear-from-pos":[{"mask-linear-from":ne()}],"mask-image-linear-to-pos":[{"mask-linear-to":ne()}],"mask-image-linear-from-color":[{"mask-linear-from":H()}],"mask-image-linear-to-color":[{"mask-linear-to":H()}],"mask-image-t-from-pos":[{"mask-t-from":ne()}],"mask-image-t-to-pos":[{"mask-t-to":ne()}],"mask-image-t-from-color":[{"mask-t-from":H()}],"mask-image-t-to-color":[{"mask-t-to":H()}],"mask-image-r-from-pos":[{"mask-r-from":ne()}],"mask-image-r-to-pos":[{"mask-r-to":ne()}],"mask-image-r-from-color":[{"mask-r-from":H()}],"mask-image-r-to-color":[{"mask-r-to":H()}],"mask-image-b-from-pos":[{"mask-b-from":ne()}],"mask-image-b-to-pos":[{"mask-b-to":ne()}],"mask-image-b-from-color":[{"mask-b-from":H()}],"mask-image-b-to-color":[{"mask-b-to":H()}],"mask-image-l-from-pos":[{"mask-l-from":ne()}],"mask-image-l-to-pos":[{"mask-l-to":ne()}],"mask-image-l-from-color":[{"mask-l-from":H()}],"mask-image-l-to-color":[{"mask-l-to":H()}],"mask-image-x-from-pos":[{"mask-x-from":ne()}],"mask-image-x-to-pos":[{"mask-x-to":ne()}],"mask-image-x-from-color":[{"mask-x-from":H()}],"mask-image-x-to-color":[{"mask-x-to":H()}],"mask-image-y-from-pos":[{"mask-y-from":ne()}],"mask-image-y-to-pos":[{"mask-y-to":ne()}],"mask-image-y-from-color":[{"mask-y-from":H()}],"mask-image-y-to-color":[{"mask-y-to":H()}],"mask-image-radial":[{"mask-radial":[ye,ge]}],"mask-image-radial-from-pos":[{"mask-radial-from":ne()}],"mask-image-radial-to-pos":[{"mask-radial-to":ne()}],"mask-image-radial-from-color":[{"mask-radial-from":H()}],"mask-image-radial-to-color":[{"mask-radial-to":H()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":T()}],"mask-image-conic-pos":[{"mask-conic":[Be]}],"mask-image-conic-from-pos":[{"mask-conic-from":ne()}],"mask-image-conic-to-pos":[{"mask-conic-to":ne()}],"mask-image-conic-from-color":[{"mask-conic-from":H()}],"mask-image-conic-to-color":[{"mask-conic-to":H()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:z()}],"mask-repeat":[{mask:B()}],"mask-size":[{mask:J()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ye,ge]}],filter:[{filter:["","none",ye,ge]}],blur:[{blur:_e()}],brightness:[{brightness:[Be,ye,ge]}],contrast:[{contrast:[Be,ye,ge]}],"drop-shadow":[{"drop-shadow":["","none",v,Ef,kf]}],"drop-shadow-color":[{"drop-shadow":H()}],grayscale:[{grayscale:["",Be,ye,ge]}],"hue-rotate":[{"hue-rotate":[Be,ye,ge]}],invert:[{invert:["",Be,ye,ge]}],saturate:[{saturate:[Be,ye,ge]}],sepia:[{sepia:["",Be,ye,ge]}],"backdrop-filter":[{"backdrop-filter":["","none",ye,ge]}],"backdrop-blur":[{"backdrop-blur":_e()}],"backdrop-brightness":[{"backdrop-brightness":[Be,ye,ge]}],"backdrop-contrast":[{"backdrop-contrast":[Be,ye,ge]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Be,ye,ge]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Be,ye,ge]}],"backdrop-invert":[{"backdrop-invert":["",Be,ye,ge]}],"backdrop-opacity":[{"backdrop-opacity":[Be,ye,ge]}],"backdrop-saturate":[{"backdrop-saturate":[Be,ye,ge]}],"backdrop-sepia":[{"backdrop-sepia":["",Be,ye,ge]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":N()}],"border-spacing-x":[{"border-spacing-x":N()}],"border-spacing-y":[{"border-spacing-y":N()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ye,ge]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Be,"initial",ye,ge]}],ease:[{ease:["linear","initial",k,ye,ge]}],delay:[{delay:[Be,ye,ge]}],animate:[{animate:["none",O,ye,ge]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,ye,ge]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:Ee()}],"rotate-x":[{"rotate-x":Ee()}],"rotate-y":[{"rotate-y":Ee()}],"rotate-z":[{"rotate-z":Ee()}],scale:[{scale:ie()}],"scale-x":[{"scale-x":ie()}],"scale-y":[{"scale-y":ie()}],"scale-z":[{"scale-z":ie()}],"scale-3d":["scale-3d"],skew:[{skew:He()}],"skew-x":[{"skew-x":He()}],"skew-y":[{"skew-y":He()}],transform:[{transform:[ye,ge,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:$e()}],"translate-x":[{"translate-x":$e()}],"translate-y":[{"translate-y":$e()}],"translate-z":[{"translate-z":$e()}],"translate-none":["translate-none"],zoom:[{zoom:[$n,ye,ge]}],accent:[{accent:H()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:H()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ye,ge]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":H()}],"scrollbar-track-color":[{"scrollbar-track":H()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mbs":[{"scroll-mbs":N()}],"scroll-mbe":[{"scroll-mbe":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pbs":[{"scroll-pbs":N()}],"scroll-pbe":[{"scroll-pbe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"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",ye,ge]}],fill:[{fill:["none",...H()]}],"stroke-w":[{stroke:[Be,Ll,Ca,$k]}],stroke:[{stroke:["none",...H()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},UB=bB(qB);function Yl(...t){return UB(De(t))}function FB({status:t}){const e={connected:"bg-green-500",idle:"bg-green-500",disconnected:"bg-zinc-600",error:"bg-red-500",working:"bg-amber-400",reviewing:"bg-blue-400"}[t],r=t==="connected"||t==="working";return _.jsxs("span",{className:"relative inline-flex items-center justify-center w-2 h-2",children:[r&&_.jsx("span",{className:`absolute inline-flex h-full w-full rounded-full ${e} opacity-40 animate-ping`}),_.jsx("span",{className:`relative inline-flex rounded-full h-2 w-2 ${e}`})]})}function tr({children:t,variant:e="muted",className:r=""}){const n={default:"bg-[#E43A9C]/15 text-[#F041FF] border-[#E43A9C]/20",success:"bg-green-500/15 text-green-400 border-green-500/20",warning:"bg-amber-500/15 text-amber-400 border-amber-500/20",error:"bg-red-500/15 text-red-400 border-red-500/20",info:"bg-blue-500/15 text-blue-400 border-blue-500/20",muted:"bg-white/5 text-zinc-400 border-white/10"}[e];return _.jsx("span",{className:`inline-flex items-center px-2 py-px rounded-full text-[10px] font-mono border ${n} ${r}`,children:t})}function HB({name:t,color:e}){return e?_.jsx("span",{className:"inline-flex items-center px-1.5 py-px rounded text-[10px] font-mono border",style:{background:`${e}15`,color:e,borderColor:`${e}30`},children:t}):_.jsx(tr,{variant:"muted",children:t})}function oa({children:t,onClick:e,className:r="",type:n="button",disabled:i=!1}){return _.jsx("button",{type:n,onClick:e,disabled:i,className:`flex items-center gap-1.5 font-mono text-[11px] text-white rounded-lg active:opacity-80 primary-btn cursor-pointer disabled:opacity-50 ${r}`,children:t})}function fi({children:t,onClick:e,className:r=""}){return _.jsx("button",{type:"button",onClick:e,className:`flex items-center gap-1.5 px-2.5 py-1 rounded-lg font-mono text-[11px] text-zinc-400 bg-[#252525] hover:bg-[#2e2e2e] hover:text-zinc-100 transition-colors cursor-pointer ${r}`,children:t})}function Ax({children:t,onClick:e,className:r=""}){return _.jsx("button",{type:"button",onClick:e,className:`flex items-center gap-1.5 px-2.5 py-1 rounded-lg font-mono text-[11px] text-zinc-400 bg-[#252525] hover:bg-red-500/10 hover:text-red-400 transition-colors cursor-pointer ${r}`,children:t})}function WB({children:t,onClick:e,className:r=""}){return _.jsx("button",{type:"button",onClick:e,className:`flex items-center gap-1.5 px-2.5 py-1 rounded-lg font-mono text-[11px] text-zinc-400 bg-[#252525] hover:bg-amber-500/10 hover:text-amber-400 transition-colors cursor-pointer ${r}`,children:t})}function Zf(t){return t==="connected"||t==="idle"?"success":t==="active"||t==="working"?"warning":t==="reviewing"?"info":t==="error"?"error":"muted"}function _h(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function KB(t,e,r,n){function i(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function u(p){try{f(n.next(p))}catch(h){s(h)}}function c(p){try{f(n.throw(p))}catch(h){s(h)}}function f(p){p.done?a(p.value):i(p.value).then(u,c)}f((n=n.apply(t,e||[])).next())})}const VB=t=>t?(...e)=>t(...e):(...e)=>fetch(...e);class Px extends Error{constructor(e,r="FunctionsError",n){super(e),this.name=r,this.context=n}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class GB extends Px{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class Lk extends Px{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class Dk extends Px{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var xb;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(xb||(xb={}));class XB{constructor(e,{headers:r={},customFetch:n,region:i=xb.Any}={}){this.url=e,this.headers=r,this.region=i,this.fetch=VB(n)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return KB(this,arguments,void 0,function*(r,n={}){var i;let a,s;try{const{headers:u,method:c,body:f,signal:p,timeout:h}=n;let g={},{region:v}=n;v||(v=this.region);const b=new URL(`${this.url}/${r}`);v&&v!=="any"&&(g["x-region"]=v,b.searchParams.set("forceFunctionRegion",v));let x;f&&(u&&!Object.prototype.hasOwnProperty.call(u,"Content-Type")||!u)?typeof Blob<"u"&&f instanceof Blob||f instanceof ArrayBuffer?(g["Content-Type"]="application/octet-stream",x=f):typeof f=="string"?(g["Content-Type"]="text/plain",x=f):typeof FormData<"u"&&f instanceof FormData?x=f:(g["Content-Type"]="application/json",x=JSON.stringify(f)):f&&typeof f!="string"&&!(typeof Blob<"u"&&f instanceof Blob)&&!(f instanceof ArrayBuffer)&&!(typeof FormData<"u"&&f instanceof FormData)?x=JSON.stringify(f):x=f;let y=p;h&&(s=new AbortController,a=setTimeout(()=>s.abort(),h),p?(y=s.signal,p.addEventListener("abort",()=>s.abort())):y=s.signal);const k=yield this.fetch(b.toString(),{method:c||"POST",headers:Object.assign(Object.assign(Object.assign({},g),this.headers),u),body:x,signal:y}).catch(E=>{throw new GB(E)}),O=k.headers.get("x-relay-error");if(O&&O==="true")throw new Lk(k);if(!k.ok)throw new Dk(k);let A=((i=k.headers.get("Content-Type"))!==null&&i!==void 0?i:"text/plain").split(";")[0].trim(),T;return A==="application/json"?T=yield k.json():A==="application/octet-stream"||A==="application/pdf"?T=yield k.blob():A==="text/event-stream"?T=k:A==="multipart/form-data"?T=yield k.formData():T=yield k.text(),{data:T,error:null,response:k}}catch(u){return{data:null,error:u,response:u instanceof Dk||u instanceof Lk?u.context:void 0}}finally{a&&clearTimeout(a)}})}}const xR=3,Bk=t=>Math.min(1e3*2**t,3e4),YB=[520,503],_R=["GET","HEAD","OPTIONS"];var JB=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.code=t.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function zk(t,e){return new Promise(r=>{if(e!=null&&e.aborted){r();return}const n=setTimeout(()=>{e==null||e.removeEventListener("abort",i),r()},t);function i(){clearTimeout(n),r()}e==null||e.addEventListener("abort",i)})}function QB(t,e,r,n){return!(!n||r>=xR||!_R.includes(t)||!YB.includes(e))}var ZB=class{constructor(t){var e,r,n,i,a;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=t.method,this.url=t.url,this.headers=new Headers(t.headers),this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=(e=t.shouldThrowOnError)!==null&&e!==void 0?e:!1,this.signal=t.signal,this.isMaybeSingle=(r=t.isMaybeSingle)!==null&&r!==void 0?r:!1,this.shouldStripNulls=(n=t.shouldStripNulls)!==null&&n!==void 0?n:!1,this.urlLengthLimit=(i=t.urlLengthLimit)!==null&&i!==void 0?i:8e3,this.retryEnabled=(a=t.retry)!==null&&a!==void 0?a:!0,t.fetch?this.fetch=t.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(t,e){return this.headers=new Headers(this.headers),this.headers.set(t,e),this}retry(t){return this.retryEnabled=t,this}then(t,e){var r=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const s=this.headers.get("Accept");s==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!s||s==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const n=this.fetch;let a=(async()=>{let s=0;for(;;){const f=new Headers(r.headers);s>0&&f.set("X-Retry-Count",String(s));let p;try{p=await n(r.url.toString(),{method:r.method,headers:f,body:JSON.stringify(r.body,(h,g)=>typeof g=="bigint"?g.toString():g),signal:r.signal})}catch(h){if((h==null?void 0:h.name)==="AbortError"||(h==null?void 0:h.code)==="ABORT_ERR"||!_R.includes(r.method))throw h;if(r.retryEnabled&&s<xR){const g=Bk(s);s++,await zk(g,r.signal);continue}throw h}if(QB(r.method,p.status,s,r.retryEnabled)){var u,c;const h=(u=(c=p.headers)===null||c===void 0?void 0:c.get("Retry-After"))!==null&&u!==void 0?u:null,g=h!==null?Math.max(0,parseInt(h,10)||0)*1e3:Bk(s);await p.text(),s++,await zk(g,r.signal);continue}return await r.processResponse(p)}})();return this.shouldThrowOnError||(a=a.catch(s=>{var u;let c="",f="",p="";const h=s==null?void 0:s.cause;if(h){var g,v,b,x;const O=(g=h==null?void 0:h.message)!==null&&g!==void 0?g:"",A=(v=h==null?void 0:h.code)!==null&&v!==void 0?v:"";c=`${(b=s==null?void 0:s.name)!==null&&b!==void 0?b:"FetchError"}: ${s==null?void 0:s.message}`,c+=`
|
|
372
|
-
|
|
373
|
-
Caused by: ${(x=h==null?void 0:h.name)!==null&&x!==void 0?x:"Error"}: ${O}`,A&&(c+=` (${A})`),h!=null&&h.stack&&(c+=`
|
|
374
|
-
${h.stack}`)}else{var y;c=(y=s==null?void 0:s.stack)!==null&&y!==void 0?y:""}const k=this.url.toString().length;return(s==null?void 0:s.name)==="AbortError"||(s==null?void 0:s.code)==="ABORT_ERR"?(p="",f="Request was aborted (timeout or manual cancellation)",k>this.urlLengthLimit&&(f+=`. Note: Your request URL is ${k} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((h==null?void 0:h.name)==="HeadersOverflowError"||(h==null?void 0:h.code)==="UND_ERR_HEADERS_OVERFLOW")&&(p="",f="HTTP headers exceeded server limits (typically 16KB)",k>this.urlLengthLimit&&(f+=`. Your request URL is ${k} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(u=s==null?void 0:s.name)!==null&&u!==void 0?u:"FetchError"}: ${s==null?void 0:s.message}`,details:c,hint:f,code:p},data:null,count:null,status:0,statusText:""}})),a.then(t,e)}async processResponse(t){var e=this;let r=null,n=null,i=null,a=t.status,s=t.statusText;if(t.ok){var u,c;if(e.method!=="HEAD"){var f;const g=await t.text();g===""||(e.headers.get("Accept")==="text/csv"||e.headers.get("Accept")&&(!((f=e.headers.get("Accept"))===null||f===void 0)&&f.includes("application/vnd.pgrst.plan+text"))?n=g:n=JSON.parse(g))}const p=(u=e.headers.get("Prefer"))===null||u===void 0?void 0:u.match(/count=(exact|planned|estimated)/),h=(c=t.headers.get("content-range"))===null||c===void 0?void 0:c.split("/");p&&h&&h.length>1&&(i=parseInt(h[1])),e.isMaybeSingle&&Array.isArray(n)&&(n.length>1?(r={code:"PGRST116",details:`Results contain ${n.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},n=null,i=null,a=406,s="Not Acceptable"):n.length===1?n=n[0]:n=null)}else{const p=await t.text();try{r=JSON.parse(p),Array.isArray(r)&&t.status===404&&(n=[],r=null,a=200,s="OK")}catch{t.status===404&&p===""?(a=204,s="No Content"):r={message:p}}if(r&&e.shouldThrowOnError)throw new JB(r)}return{success:r===null,error:r,data:n,count:i,status:a,statusText:s}}returns(){return this}overrideTypes(){return this}},e6=class extends ZB{select(t){let e=!1;const r=(t??"*").split("").map(n=>/\s/.test(n)&&!e?"":(n==='"'&&(e=!e),n)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(t,{ascending:e=!0,nullsFirst:r,foreignTable:n,referencedTable:i=n}={}){const a=i?`${i}.order`:"order",s=this.url.searchParams.get(a);return this.url.searchParams.set(a,`${s?`${s},`:""}${t}.${e?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:e,referencedTable:r=e}={}){const n=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(n,`${t}`),this}range(t,e,{foreignTable:r,referencedTable:n=r}={}){const i=typeof n>"u"?"offset":`${n}.offset`,a=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(i,`${t}`),this.url.searchParams.set(a,`${e-t+1}`),this}abortSignal(t){return this.signal=t,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:t=!1,verbose:e=!1,settings:r=!1,buffers:n=!1,wal:i=!1,format:a="text"}={}){var s;const u=[t?"analyze":null,e?"verbose":null,r?"settings":null,n?"buffers":null,i?"wal":null].filter(Boolean).join("|"),c=(s=this.headers.get("Accept"))!==null&&s!==void 0?s:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${a}; for="${c}"; options=${u};`),a==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(t){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${t}`),this}};const qk=new RegExp("[,()]");var Fo=class extends e6{eq(t,e){return this.url.searchParams.append(t,`eq.${e}`),this}neq(t,e){return this.url.searchParams.append(t,`neq.${e}`),this}gt(t,e){return this.url.searchParams.append(t,`gt.${e}`),this}gte(t,e){return this.url.searchParams.append(t,`gte.${e}`),this}lt(t,e){return this.url.searchParams.append(t,`lt.${e}`),this}lte(t,e){return this.url.searchParams.append(t,`lte.${e}`),this}like(t,e){return this.url.searchParams.append(t,`like.${e}`),this}likeAllOf(t,e){return this.url.searchParams.append(t,`like(all).{${e.join(",")}}`),this}likeAnyOf(t,e){return this.url.searchParams.append(t,`like(any).{${e.join(",")}}`),this}ilike(t,e){return this.url.searchParams.append(t,`ilike.${e}`),this}ilikeAllOf(t,e){return this.url.searchParams.append(t,`ilike(all).{${e.join(",")}}`),this}ilikeAnyOf(t,e){return this.url.searchParams.append(t,`ilike(any).{${e.join(",")}}`),this}regexMatch(t,e){return this.url.searchParams.append(t,`match.${e}`),this}regexIMatch(t,e){return this.url.searchParams.append(t,`imatch.${e}`),this}is(t,e){return this.url.searchParams.append(t,`is.${e}`),this}isDistinct(t,e){return this.url.searchParams.append(t,`isdistinct.${e}`),this}in(t,e){const r=Array.from(new Set(e)).map(n=>typeof n=="string"&&qk.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(t,`in.(${r})`),this}notIn(t,e){const r=Array.from(new Set(e)).map(n=>typeof n=="string"&&qk.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(t,`not.in.(${r})`),this}contains(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cs.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cs.{${e.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(e)}`),this}containedBy(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cd.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cd.{${e.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(e)}`),this}rangeGt(t,e){return this.url.searchParams.append(t,`sr.${e}`),this}rangeGte(t,e){return this.url.searchParams.append(t,`nxl.${e}`),this}rangeLt(t,e){return this.url.searchParams.append(t,`sl.${e}`),this}rangeLte(t,e){return this.url.searchParams.append(t,`nxr.${e}`),this}rangeAdjacent(t,e){return this.url.searchParams.append(t,`adj.${e}`),this}overlaps(t,e){return typeof e=="string"?this.url.searchParams.append(t,`ov.${e}`):this.url.searchParams.append(t,`ov.{${e.join(",")}}`),this}textSearch(t,e,{config:r,type:n}={}){let i="";n==="plain"?i="pl":n==="phrase"?i="ph":n==="websearch"&&(i="w");const a=r===void 0?"":`(${r})`;return this.url.searchParams.append(t,`${i}fts${a}.${e}`),this}match(t){return Object.entries(t).filter(([e,r])=>r!==void 0).forEach(([e,r])=>{this.url.searchParams.append(e,`eq.${r}`)}),this}not(t,e,r){return this.url.searchParams.append(t,`not.${e}.${r}`),this}or(t,{foreignTable:e,referencedTable:r=e}={}){const n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${t})`),this}filter(t,e,r){return this.url.searchParams.append(t,`${e}.${r}`),this}},t6=class{constructor(t,{headers:e={},schema:r,fetch:n,urlLengthLimit:i=8e3,retry:a}){this.url=t,this.headers=new Headers(e),this.schema=r,this.fetch=n,this.urlLengthLimit=i,this.retry=a}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(t,e){const{head:r=!1,count:n}=e??{},i=r?"HEAD":"GET";let a=!1;const s=(t??"*").split("").map(f=>/\s/.test(f)&&!a?"":(f==='"'&&(a=!a),f)).join(""),{url:u,headers:c}=this.cloneRequestState();return u.searchParams.set("select",s),n&&c.append("Prefer",`count=${n}`),new Fo({method:i,url:u,headers:c,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(t,{count:e,defaultToNull:r=!0}={}){var n;const i="POST",{url:a,headers:s}=this.cloneRequestState();if(e&&s.append("Prefer",`count=${e}`),r||s.append("Prefer","missing=default"),Array.isArray(t)){const u=t.reduce((c,f)=>c.concat(Object.keys(f)),[]);if(u.length>0){const c=[...new Set(u)].map(f=>`"${f}"`);a.searchParams.set("columns",c.join(","))}}return new Fo({method:i,url:a,headers:s,schema:this.schema,body:t,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(t,{onConflict:e,ignoreDuplicates:r=!1,count:n,defaultToNull:i=!0}={}){var a;const s="POST",{url:u,headers:c}=this.cloneRequestState();if(c.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),e!==void 0&&u.searchParams.set("on_conflict",e),n&&c.append("Prefer",`count=${n}`),i||c.append("Prefer","missing=default"),Array.isArray(t)){const f=t.reduce((p,h)=>p.concat(Object.keys(h)),[]);if(f.length>0){const p=[...new Set(f)].map(h=>`"${h}"`);u.searchParams.set("columns",p.join(","))}}return new Fo({method:s,url:u,headers:c,schema:this.schema,body:t,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(t,{count:e}={}){var r;const n="PATCH",{url:i,headers:a}=this.cloneRequestState();return e&&a.append("Prefer",`count=${e}`),new Fo({method:n,url:i,headers:a,schema:this.schema,body:t,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:t}={}){var e;const r="DELETE",{url:n,headers:i}=this.cloneRequestState();return t&&i.append("Prefer",`count=${t}`),new Fo({method:r,url:n,headers:i,schema:this.schema,fetch:(e=this.fetch)!==null&&e!==void 0?e:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function du(t){"@babel/helpers - typeof";return du=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},du(t)}function r6(t,e){if(du(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(du(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function n6(t){var e=r6(t,"string");return du(e)=="symbol"?e:e+""}function i6(t,e,r){return(e=n6(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Uk(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Of(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Uk(Object(r),!0).forEach(function(n){i6(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Uk(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var a6=class SR{constructor(e,{headers:r={},schema:n,fetch:i,timeout:a,urlLengthLimit:s=8e3,retry:u}={}){this.url=e,this.headers=new Headers(r),this.schemaName=n,this.urlLengthLimit=s;const c=i??globalThis.fetch;a!==void 0&&a>0?this.fetch=(f,p)=>{const h=new AbortController,g=setTimeout(()=>h.abort(),a),v=p==null?void 0:p.signal;if(v){if(v.aborted)return clearTimeout(g),c(f,p);const b=()=>{clearTimeout(g),h.abort()};return v.addEventListener("abort",b,{once:!0}),c(f,Of(Of({},p),{},{signal:h.signal})).finally(()=>{clearTimeout(g),v.removeEventListener("abort",b)})}return c(f,Of(Of({},p),{},{signal:h.signal})).finally(()=>clearTimeout(g))}:this.fetch=c,this.retry=u}from(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new t6(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(e){return new SR(this.url,{headers:this.headers,schema:e,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(e,r={},{head:n=!1,get:i=!1,count:a}={}){var s;let u;const c=new URL(`${this.url}/rpc/${e}`);let f;const p=v=>v!==null&&typeof v=="object"&&(!Array.isArray(v)||v.some(p)),h=n&&Object.values(r).some(p);h?(u="POST",f=r):n||i?(u=n?"HEAD":"GET",Object.entries(r).filter(([v,b])=>b!==void 0).map(([v,b])=>[v,Array.isArray(b)?`{${b.join(",")}}`:`${b}`]).forEach(([v,b])=>{c.searchParams.append(v,b)})):(u="POST",f=r);const g=new Headers(this.headers);return h?g.set("Prefer",a?`count=${a},return=minimal`:"return=minimal"):a&&g.set("Prefer",`count=${a}`),new Fo({method:u,url:c,headers:g,schema:this.schemaName,body:f,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class o6{constructor(){}static detectEnvironment(){var e;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const r=globalThis;if(typeof globalThis<"u"&&typeof r.WebSocket<"u")return{type:"native",wsConstructor:r.WebSocket};const n=typeof global<"u"?global:void 0;if(n&&typeof n.WebSocket<"u")return{type:"native",wsConstructor:n.WebSocket};if(typeof globalThis<"u"&&typeof r.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&r.EdgeRuntime||typeof navigator<"u"&&(!((e=navigator.userAgent)===null||e===void 0)&&e.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const i=globalThis.process;if(i){const a=i.versions;if(a&&a.node){const s=a.node,u=parseInt(s.replace(/^v/,"").split(".")[0]);return u>=22?typeof globalThis.WebSocket<"u"?{type:"native",wsConstructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${u} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${u} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
|
|
375
|
-
import ws from "ws"
|
|
376
|
-
new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const e=this.detectEnvironment();if(e.wsConstructor)return e.wsConstructor;let r=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(r+=`
|
|
377
|
-
|
|
378
|
-
Suggested solution: ${e.workaround}`),new Error(r)}static isWebSocketSupported(){try{const e=this.detectEnvironment();return e.type==="native"||e.type==="ws"}catch{return!1}}}const s6="2.106.2",l6=`realtime-js/${s6}`,u6="1.0.0",kR="2.0.0",c6=kR,f6=1e4,d6=100,ea={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},ER={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},_b={connecting:"connecting",closing:"closing",closed:"closed"};class h6{constructor(e){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=e??[]}encode(e,r){if(e.event===this.BROADCAST_EVENT&&!(e.payload instanceof ArrayBuffer)&&typeof e.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(e));let n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return r(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(e){var r;return this._isArrayBuffer((r=e.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(e):this._encodeJsonUserBroadcastPush(e)}_encodeBinaryUserBroadcastPush(e){var r,n;const i=(n=(r=e.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:new ArrayBuffer(0);return this._encodeUserBroadcastPush(e,this.BINARY_ENCODING,i)}_encodeJsonUserBroadcastPush(e){var r,n;const i=(n=(r=e.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:{},s=new TextEncoder().encode(JSON.stringify(i)).buffer;return this._encodeUserBroadcastPush(e,this.JSON_ENCODING,s)}_encodeUserBroadcastPush(e,r,n){var i,a;const s=e.topic,u=(i=e.ref)!==null&&i!==void 0?i:"",c=(a=e.join_ref)!==null&&a!==void 0?a:"",f=e.payload.event,p=this.allowedMetadataKeys?this._pick(e.payload,this.allowedMetadataKeys):{},h=Object.keys(p).length===0?"":JSON.stringify(p);if(c.length>255)throw new Error(`joinRef length ${c.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`ref length ${u.length} exceeds maximum of 255`);if(s.length>255)throw new Error(`topic length ${s.length} exceeds maximum of 255`);if(f.length>255)throw new Error(`userEvent length ${f.length} exceeds maximum of 255`);if(h.length>255)throw new Error(`metadata length ${h.length} exceeds maximum of 255`);const g=this.USER_BROADCAST_PUSH_META_LENGTH+c.length+u.length+s.length+f.length+h.length,v=new ArrayBuffer(this.HEADER_LENGTH+g);let b=new DataView(v),x=0;b.setUint8(x++,this.KINDS.userBroadcastPush),b.setUint8(x++,c.length),b.setUint8(x++,u.length),b.setUint8(x++,s.length),b.setUint8(x++,f.length),b.setUint8(x++,h.length),b.setUint8(x++,r),Array.from(c,k=>b.setUint8(x++,k.charCodeAt(0))),Array.from(u,k=>b.setUint8(x++,k.charCodeAt(0))),Array.from(s,k=>b.setUint8(x++,k.charCodeAt(0))),Array.from(f,k=>b.setUint8(x++,k.charCodeAt(0))),Array.from(h,k=>b.setUint8(x++,k.charCodeAt(0)));var y=new Uint8Array(v.byteLength+n.byteLength);return y.set(new Uint8Array(v),0),y.set(new Uint8Array(n),v.byteLength),y.buffer}decode(e,r){if(this._isArrayBuffer(e)){let n=this._binaryDecode(e);return r(n)}if(typeof e=="string"){const n=JSON.parse(e),[i,a,s,u,c]=n;return r({join_ref:i,ref:a,topic:s,event:u,payload:c})}return r({})}_binaryDecode(e){const r=new DataView(e),n=r.getUint8(0),i=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(e,r,i)}}_decodeUserBroadcast(e,r,n){const i=r.getUint8(1),a=r.getUint8(2),s=r.getUint8(3),u=r.getUint8(4);let c=this.HEADER_LENGTH+4;const f=n.decode(e.slice(c,c+i));c=c+i;const p=n.decode(e.slice(c,c+a));c=c+a;const h=n.decode(e.slice(c,c+s));c=c+s;const g=e.slice(c,e.byteLength),v=u===this.JSON_ENCODING?JSON.parse(n.decode(g)):g,b={type:this.BROADCAST_EVENT,event:p,payload:v};return s>0&&(b.meta=JSON.parse(h)),{join_ref:null,ref:null,topic:f,event:this.BROADCAST_EVENT,payload:b}}_isArrayBuffer(e){var r;return e instanceof ArrayBuffer||((r=e==null?void 0:e.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(e,r){return!e||typeof e!="object"?{}:Object.fromEntries(Object.entries(e).filter(([n])=>r.includes(n)))}}var it;(function(t){t.abstime="abstime",t.bool="bool",t.date="date",t.daterange="daterange",t.float4="float4",t.float8="float8",t.int2="int2",t.int4="int4",t.int4range="int4range",t.int8="int8",t.int8range="int8range",t.json="json",t.jsonb="jsonb",t.money="money",t.numeric="numeric",t.oid="oid",t.reltime="reltime",t.text="text",t.time="time",t.timestamp="timestamp",t.timestamptz="timestamptz",t.timetz="timetz",t.tsrange="tsrange",t.tstzrange="tstzrange"})(it||(it={}));const Fk=(t,e,r={})=>{var n;const i=(n=r.skipTypes)!==null&&n!==void 0?n:[];return e?Object.keys(e).reduce((a,s)=>(a[s]=p6(s,t,e,i),a),{}):{}},p6=(t,e,r,n)=>{const i=e.find(u=>u.name===t),a=i==null?void 0:i.type,s=r[t];return a&&!n.includes(a)?OR(a,s):Sb(s)},OR=(t,e)=>{if(t.charAt(0)==="_"){const r=t.slice(1,t.length);return y6(e,r)}switch(t){case it.bool:return m6(e);case it.float4:case it.float8:case it.int2:case it.int4:case it.int8:case it.numeric:case it.oid:return g6(e);case it.json:case it.jsonb:return v6(e);case it.timestamp:return b6(e);case it.abstime:case it.date:case it.daterange:case it.int4range:case it.int8range:case it.money:case it.reltime:case it.text:case it.time:case it.timestamptz:case it.timetz:case it.tsrange:case it.tstzrange:return Sb(e);default:return Sb(e)}},Sb=t=>t,m6=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},g6=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},v6=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t},y6=(t,e)=>{if(typeof t!="string")return t;const r=t.length-1,n=t[r];if(t[0]==="{"&&n==="}"){let a;const s=t.slice(1,r);try{a=JSON.parse("["+s+"]")}catch{a=s?s.split(","):[]}return a.map(u=>OR(e,u))}return t},b6=t=>typeof t=="string"?t.replace(" ","T"):t,AR=t=>{const e=new URL(t);return e.protocol=e.protocol.replace(/^ws/i,"http"),e.pathname=e.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),e.pathname===""||e.pathname==="/"?e.pathname="/api/broadcast":e.pathname=e.pathname+"/api/broadcast",e.href};var ru=t=>typeof t=="function"?t:function(){return t},w6=typeof self<"u"?self:null,Ho=typeof window<"u"?window:null,Ln=w6||Ho||globalThis,x6="2.0.0",_6=1e4,S6=1e3,Dn={connecting:0,open:1,closing:2,closed:3},_r={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},ai={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},kb={longpoll:"longpoll",websocket:"websocket"},k6={complete:4},Eb="base64url.bearer.phx.",Af=class{constructor(t,e,r,n){this.channel=t,this.event=e,this.payload=r||function(){return{}},this.receivedResp=null,this.timeout=n,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(t){this.timeout=t,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(t,e){return this.hasReceived(t)&&e(this.receivedResp.response),this.recHooks.push({status:t,callback:e}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:t,response:e,_ref:r}){this.recHooks.filter(n=>n.status===t).forEach(n=>n.callback(e))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,t=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=t,this.matchReceive(t)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}trigger(t,e){this.channel.trigger(this.refEvent,{status:t,response:e})}},PR=class{constructor(t,e){this.callback=t,this.timerCalc=e,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},E6=class{constructor(t,e,r){this.state=_r.closed,this.topic=t,this.params=ru(e||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Af(this,ai.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new PR(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=_r.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this.joinPush.receive("error",n=>{this.state=_r.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,n),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=_r.closed,this.socket.remove(this)}),this.onError(n=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,n),this.isJoining()&&this.joinPush.reset(),this.state=_r.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),new Af(this,ai.leave,ru({}),this.timeout).send(),this.state=_r.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(ai.reply,(n,i)=>{this.trigger(this.replyEventName(i),n)})}join(t=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=t,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=_r.closed,this.bindings=[]}onClose(t){this.on(ai.close,t)}onError(t){return this.on(ai.error,e=>t(e))}on(t,e){let r=this.bindingRef++;return this.bindings.push({event:t,ref:r,callback:e}),r}off(t,e){this.bindings=this.bindings.filter(r=>!(r.event===t&&(typeof e>"u"||e===r.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(t,e,r=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${t}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let n=new Af(this,t,function(){return e},r);return this.canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}leave(t=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=_r.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(ai.close,"leave")},r=new Af(this,ai.leave,ru({}),t);return r.receive("ok",()=>e()).receive("timeout",()=>e()),r.send(),this.canPush()||r.trigger("ok",{}),r}onMessage(t,e,r){return e}filterBindings(t,e,r){return!0}isMember(t,e,r,n){return this.topic!==t?!1:n&&n!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:t,event:e,payload:r,joinRef:n}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(t=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=_r.joining,this.joinPush.resend(t))}trigger(t,e,r,n){let i=this.onMessage(t,e,r,n);if(e&&!i)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let a=this.bindings.filter(s=>s.event===t&&this.filterBindings(s,e,r));for(let s=0;s<a.length;s++)a[s].callback(i,r,n||this.joinRef())}replyEventName(t){return`chan_reply_${t}`}isClosed(){return this.state===_r.closed}isErrored(){return this.state===_r.errored}isJoined(){return this.state===_r.joined}isJoining(){return this.state===_r.joining}isLeaving(){return this.state===_r.leaving}},fd=class{static request(t,e,r,n,i,a,s){if(Ln.XDomainRequest){let u=new Ln.XDomainRequest;return this.xdomainRequest(u,t,e,n,i,a,s)}else if(Ln.XMLHttpRequest){let u=new Ln.XMLHttpRequest;return this.xhrRequest(u,t,e,r,n,i,a,s)}else{if(Ln.fetch&&Ln.AbortController)return this.fetchRequest(t,e,r,n,i,a,s);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(t,e,r,n,i,a,s){let u={method:t,headers:r,body:n},c=null;return i&&(c=new AbortController,setTimeout(()=>c.abort(),i),u.signal=c.signal),Ln.fetch(e,u).then(f=>f.text()).then(f=>this.parseJSON(f)).then(f=>s&&s(f)).catch(f=>{f.name==="AbortError"&&a?a():s&&s(null)}),c}static xdomainRequest(t,e,r,n,i,a,s){return t.timeout=i,t.open(e,r),t.onload=()=>{let u=this.parseJSON(t.responseText);s&&s(u)},a&&(t.ontimeout=a),t.onprogress=()=>{},t.send(n),t}static xhrRequest(t,e,r,n,i,a,s,u){t.open(e,r,!0),t.timeout=a;for(let[c,f]of Object.entries(n))t.setRequestHeader(c,f);return t.onerror=()=>u&&u(null),t.onreadystatechange=()=>{if(t.readyState===k6.complete&&u){let c=this.parseJSON(t.responseText);u(c)}},s&&(t.ontimeout=s),t.send(i),t}static parseJSON(t){if(!t||t==="")return null;try{return JSON.parse(t)}catch{return console&&console.log("failed to parse JSON response",t),null}}static serialize(t,e){let r=[];for(var n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let i=e?`${e}[${n}]`:n,a=t[n];typeof a=="object"?r.push(this.serialize(a,i)):r.push(encodeURIComponent(i)+"="+encodeURIComponent(a))}return r.join("&")}static appendParams(t,e){if(Object.keys(e).length===0)return t;let r=t.match(/\?/)?"&":"?";return`${t}${r}${this.serialize(e)}`}},O6=t=>{let e="",r=new Uint8Array(t),n=r.byteLength;for(let i=0;i<n;i++)e+=String.fromCharCode(r[i]);return btoa(e)},Mo=class{constructor(t,e){e&&e.length===2&&e[1].startsWith(Eb)&&(this.authToken=atob(e[1].slice(Eb.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(t),this.readyState=Dn.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(t){return t.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+kb.websocket),"$1/"+kb.longpoll)}endpointURL(){return fd.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(t,e,r){this.close(t,e,r),this.readyState=Dn.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Dn.open||this.readyState===Dn.connecting}poll(){const t={Accept:"application/json"};this.authToken&&(t["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",t,null,()=>this.ontimeout(),e=>{if(e){var{status:r,token:n,messages:i}=e;if(r===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=n}else r=0;switch(r){case 200:i.forEach(a=>{setTimeout(()=>this.onmessage({data:a}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=Dn.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${r}`)}})}send(t){typeof t!="string"&&(t=O6(t)),this.currentBatch?this.currentBatch.push(t):this.awaitingBatchAck?this.batchBuffer.push(t):(this.currentBatch=[t],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(t){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},t.join(`
|
|
379
|
-
`),()=>this.onerror("timeout"),e=>{this.awaitingBatchAck=!1,!e||e.status!==200?(this.onerror(e&&e.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(t,e,r){for(let i of this.reqs)i.abort();this.readyState=Dn.closed;let n=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:t,reason:e,wasClean:r});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",n)):this.onclose(n)}ajax(t,e,r,n,i){let a,s=()=>{this.reqs.delete(a),n()};a=fd.request(t,this.endpointURL(),e,r,this.timeout,s,u=>{this.reqs.delete(a),this.isActive()&&i(u)}),this.reqs.add(a)}},A6=class Jl{constructor(e,r={}){let n=r.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=e,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(n.state,i=>{let{onJoin:a,onLeave:s,onSync:u}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Jl.syncState(this.state,i,a,s),this.pendingDiffs.forEach(c=>{this.state=Jl.syncDiff(this.state,c,a,s)}),this.pendingDiffs=[],u()}),this.channel.on(n.diff,i=>{let{onJoin:a,onLeave:s,onSync:u}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(i):(this.state=Jl.syncDiff(this.state,i,a,s),u())})}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}list(e){return Jl.list(this.state,e)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(e,r,n,i){let a=this.clone(e),s={},u={};return this.map(a,(c,f)=>{r[c]||(u[c]=f)}),this.map(r,(c,f)=>{let p=a[c];if(p){let h=f.metas.map(x=>x.phx_ref),g=p.metas.map(x=>x.phx_ref),v=f.metas.filter(x=>g.indexOf(x.phx_ref)<0),b=p.metas.filter(x=>h.indexOf(x.phx_ref)<0);v.length>0&&(s[c]=f,s[c].metas=v),b.length>0&&(u[c]=this.clone(p),u[c].metas=b)}else s[c]=f}),this.syncDiff(a,{joins:s,leaves:u},n,i)}static syncDiff(e,r,n,i){let{joins:a,leaves:s}=this.clone(r);return n||(n=function(){}),i||(i=function(){}),this.map(a,(u,c)=>{let f=e[u];if(e[u]=this.clone(c),f){let p=e[u].metas.map(g=>g.phx_ref),h=f.metas.filter(g=>p.indexOf(g.phx_ref)<0);e[u].metas.unshift(...h)}n(u,f,c)}),this.map(s,(u,c)=>{let f=e[u];if(!f)return;let p=c.metas.map(h=>h.phx_ref);f.metas=f.metas.filter(h=>p.indexOf(h.phx_ref)<0),i(u,f,c),f.metas.length===0&&delete e[u]}),e}static list(e,r){return r||(r=function(n,i){return i}),this.map(e,(n,i)=>r(n,i))}static map(e,r){return Object.getOwnPropertyNames(e).map(n=>r(n,e[n]))}static clone(e){return JSON.parse(JSON.stringify(e))}},Pf={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(t,e){if(t.payload.constructor===ArrayBuffer)return e(this.binaryEncode(t));{let r=[t.join_ref,t.ref,t.topic,t.event,t.payload];return e(JSON.stringify(r))}},decode(t,e){if(t.constructor===ArrayBuffer)return e(this.binaryDecode(t));{let[r,n,i,a,s]=JSON.parse(t);return e({join_ref:r,ref:n,topic:i,event:a,payload:s})}},binaryEncode(t){let{join_ref:e,ref:r,event:n,topic:i,payload:a}=t,s=this.META_LENGTH+e.length+r.length+i.length+n.length,u=new ArrayBuffer(this.HEADER_LENGTH+s),c=new DataView(u),f=0;c.setUint8(f++,this.KINDS.push),c.setUint8(f++,e.length),c.setUint8(f++,r.length),c.setUint8(f++,i.length),c.setUint8(f++,n.length),Array.from(e,h=>c.setUint8(f++,h.charCodeAt(0))),Array.from(r,h=>c.setUint8(f++,h.charCodeAt(0))),Array.from(i,h=>c.setUint8(f++,h.charCodeAt(0))),Array.from(n,h=>c.setUint8(f++,h.charCodeAt(0)));var p=new Uint8Array(u.byteLength+a.byteLength);return p.set(new Uint8Array(u),0),p.set(new Uint8Array(a),u.byteLength),p.buffer},binaryDecode(t){let e=new DataView(t),r=e.getUint8(0),n=new TextDecoder;switch(r){case this.KINDS.push:return this.decodePush(t,e,n);case this.KINDS.reply:return this.decodeReply(t,e,n);case this.KINDS.broadcast:return this.decodeBroadcast(t,e,n)}},decodePush(t,e,r){let n=e.getUint8(1),i=e.getUint8(2),a=e.getUint8(3),s=this.HEADER_LENGTH+this.META_LENGTH-1,u=r.decode(t.slice(s,s+n));s=s+n;let c=r.decode(t.slice(s,s+i));s=s+i;let f=r.decode(t.slice(s,s+a));s=s+a;let p=t.slice(s,t.byteLength);return{join_ref:u,ref:null,topic:c,event:f,payload:p}},decodeReply(t,e,r){let n=e.getUint8(1),i=e.getUint8(2),a=e.getUint8(3),s=e.getUint8(4),u=this.HEADER_LENGTH+this.META_LENGTH,c=r.decode(t.slice(u,u+n));u=u+n;let f=r.decode(t.slice(u,u+i));u=u+i;let p=r.decode(t.slice(u,u+a));u=u+a;let h=r.decode(t.slice(u,u+s));u=u+s;let g=t.slice(u,t.byteLength),v={status:h,response:g};return{join_ref:c,ref:f,topic:p,event:ai.reply,payload:v}},decodeBroadcast(t,e,r){let n=e.getUint8(1),i=e.getUint8(2),a=this.HEADER_LENGTH+2,s=r.decode(t.slice(a,a+n));a=a+n;let u=r.decode(t.slice(a,a+i));a=a+i;let c=t.slice(a,t.byteLength);return{join_ref:null,ref:null,topic:s,event:u,payload:c}}},P6=class{constructor(t,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=e.timeout||_6,this.transport=e.transport||Ln.WebSocket||Mo,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=e.longPollFallbackMs,this.fallbackTimer=null;let r=null;try{r=Ln&&Ln.sessionStorage}catch{}this.sessionStore=e.sessionStorage||r,this.establishedConnections=0,this.defaultEncoder=Pf.encode.bind(Pf),this.defaultDecoder=Pf.decode.bind(Pf),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==Mo?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let n=null;Ho&&Ho.addEventListener&&(Ho.addEventListener("pagehide",i=>{this.conn&&(this.disconnect(),n=this.connectClock)}),Ho.addEventListener("pageshow",i=>{n===this.connectClock&&(n=null,this.connect())}),Ho.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=e.autoSendHeartbeat??!0,this.heartbeatCallback=e.heartbeatCallback??(()=>{}),this.rejoinAfterMs=i=>e.rejoinAfterMs?e.rejoinAfterMs(i):[1e3,2e3,5e3][i-1]||1e4,this.reconnectAfterMs=i=>e.reconnectAfterMs?e.reconnectAfterMs(i):[10,50,100,150,200,250,500,1e3,2e3][i-1]||5e3,this.logger=e.logger||null,!this.logger&&e.debug&&(this.logger=(i,a,s)=>{console.log(`${i}: ${a}`,s)}),this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=ru(e.params||{}),this.endPoint=`${t}/${kb.websocket}`,this.vsn=e.vsn||x6,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new PR(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{e.beforeReconnect&&await e.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=e.authToken}getLongPollTransport(){return Mo}replaceTransport(t){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=t}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let t=fd.appendParams(fd.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return t.charAt(0)!=="/"?t:t.charAt(1)==="/"?`${this.protocol()}:${t}`:`${this.protocol()}://${location.host}${t}`}disconnect(t,e,r){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,t&&t()},e,r)}connect(t){t&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=ru(t)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Mo?this.connectWithFallback(Mo,this.longPollFallbackMs):this.transportConnect())}log(t,e,r){this.logger&&this.logger(t,e,r)}hasLogger(){return this.logger!==null}onOpen(t){let e=this.makeRef();return this.stateChangeCallbacks.open.push([e,t]),e}onClose(t){let e=this.makeRef();return this.stateChangeCallbacks.close.push([e,t]),e}onError(t){let e=this.makeRef();return this.stateChangeCallbacks.error.push([e,t]),e}onMessage(t){let e=this.makeRef();return this.stateChangeCallbacks.message.push([e,t]),e}onHeartbeat(t){this.heartbeatCallback=t}ping(t){if(!this.isConnected())return!1;let e=this.makeRef(),r=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:e});let n=this.onMessage(i=>{i.ref===e&&(this.off([n]),t(Date.now()-r))});return!0}transportName(t){switch(t){case Mo:return"LongPoll";default:return t.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let t;this.authToken&&(t=["phoenix",`${Eb}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),t),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e)}getSession(t){return this.sessionStore&&this.sessionStore.getItem(t)}storeSession(t,e){this.sessionStore&&this.sessionStore.setItem(t,e)}connectWithFallback(t,e=2500){clearTimeout(this.fallbackTimer);let r=!1,n=!0,i,a,s=this.transportName(t),u=c=>{this.log("transport",`falling back to ${s}...`,c),this.off([i,a]),n=!1,this.replaceTransport(t),this.transportConnect()};if(this.getSession(`phx:fallback:${s}`))return u("memorized");this.fallbackTimer=setTimeout(u,e),a=this.onError(c=>{this.log("transport","error",c),n&&!r&&(clearTimeout(this.fallbackTimer),u(c))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(r=!0,!n){let c=this.transportName(t);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${c}`,"true"),this.log("transport",`established ${c} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(u,e),this.ping(c=>{this.log("transport","connected to primary after",c),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(t){this.log("error","error in heartbeat callback",t)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),S6,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(t,e,r){if(!this.conn)return t&&t();const n=this.conn;this.waitForBufferDone(n,()=>{e?n.close(e,r||""):n.close(),this.waitForSocketClosed(n,()=>{this.conn===n&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),t&&t()})})}waitForBufferDone(t,e,r=1){if(r===5||!t.bufferedAmount){e();return}setTimeout(()=>{this.waitForBufferDone(t,e,r+1)},150*r)}waitForSocketClosed(t,e,r=1){if(r===5||t.readyState===Dn.closed){e();return}setTimeout(()=>{this.waitForSocketClosed(t,e,r+1)},150*r)}onConnClose(t){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",t),this.triggerChanError(t),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",t)}onConnError(t){this.hasLogger()&&this.log("transport","error",t);let e=this.transport,r=this.establishedConnections;this.triggerStateCallbacks("error",t,e,r),(e===this.transport||r>0)&&this.triggerChanError(t)}triggerChanError(t){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(ai.error,t)})}connectionState(){switch(this.conn&&this.conn.readyState){case Dn.connecting:return"connecting";case Dn.open:return"open";case Dn.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(t){this.off(t.stateChangeRefs),this.channels=this.channels.filter(e=>e!==t)}off(t){for(let e in this.stateChangeCallbacks)this.stateChangeCallbacks[e]=this.stateChangeCallbacks[e].filter(([r])=>t.indexOf(r)===-1)}channel(t,e={}){let r=new E6(t,e,this);return this.channels.push(r),r}push(t){if(this.hasLogger()){let{topic:e,event:r,payload:n,ref:i,join_ref:a}=t;this.log("push",`${e} ${r} (${a}, ${i})`,n)}this.isConnected()?this.encode(t,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(t,e=>this.conn.send(e)))}makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(t){this.log("error","error in heartbeat callback",t)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(t){this.log("error","error in heartbeat callback",t)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}onConnMessage(t){this.decode(t.data,e=>{let{topic:r,event:n,payload:i,ref:a,join_ref:s}=e;if(a&&a===this.pendingHeartbeatRef){const u=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(i.status==="ok"?"ok":"error",u)}catch(c){this.log("error","error in heartbeat callback",c)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${i.status||""} ${r} ${n} ${a&&"("+a+")"||""}`.trim(),i);for(let u=0;u<this.channels.length;u++){const c=this.channels[u];c.isMember(r,n,i,s)&&c.trigger(n,i,a,s)}this.triggerStateCallbacks("message",e)})}triggerStateCallbacks(t,...e){try{this.stateChangeCallbacks[t].forEach(([r,n])=>{try{n(...e)}catch(i){this.log("error",`error in ${t} callback`,i)}})}catch(r){this.log("error",`error triggering ${t} callbacks`,r)}}leaveOpenTopic(t){let e=this.channels.find(r=>r.topic===t&&(r.isJoined()||r.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${t}"`),e.leave())}};class nu{constructor(e,r){const n=j6(r);this.presence=new A6(e.getChannel(),n),this.presence.onJoin((i,a,s)=>{const u=nu.onJoinPayload(i,a,s);e.getChannel().trigger("presence",u)}),this.presence.onLeave((i,a,s)=>{const u=nu.onLeavePayload(i,a,s);e.getChannel().trigger("presence",u)}),this.presence.onSync(()=>{e.getChannel().trigger("presence",{event:"sync"})})}get state(){return nu.transformState(this.presence.state)}static transformState(e){return e=T6(e),Object.getOwnPropertyNames(e).reduce((r,n)=>{const i=e[n];return r[n]=ed(i),r},{})}static onJoinPayload(e,r,n){const i=Hk(r),a=ed(n);return{event:"join",key:e,currentPresences:i,newPresences:a}}static onLeavePayload(e,r,n){const i=Hk(r),a=ed(n);return{event:"leave",key:e,currentPresences:i,leftPresences:a}}}function ed(t){return t.metas.map(e=>(e.presence_ref=e.phx_ref,delete e.phx_ref,delete e.phx_ref_prev,e))}function T6(t){return JSON.parse(JSON.stringify(t))}function j6(t){return(t==null?void 0:t.events)&&{events:t.events}}function Hk(t){return t!=null&&t.metas?ed(t):[]}var Wk;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(Wk||(Wk={}));class C6{get state(){return this.presenceAdapter.state}constructor(e,r){this.channel=e,this.presenceAdapter=new nu(this.channel.channelAdapter,r)}}function R6(t){if(t instanceof Error)return t;if(typeof t=="string")return new Error(t);if(t&&typeof t=="object"){const e=t;if(typeof e.code=="number"){const r=typeof e.reason=="string"&&e.reason?` (${e.reason})`:"";return new Error(`socket closed: ${e.code}${r}`,{cause:t})}return new Error("channel error: transport failure",{cause:t})}return new Error("channel error: connection lost")}class N6{constructor(e,r,n){const i=$6(n);this.channel=e.getSocket().channel(r,i),this.socket=e}get state(){return this.channel.state}set state(e){this.channel.state=e}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(e,r){return this.channel.on(e,r)}off(e,r){this.channel.off(e,r)}subscribe(e){return this.channel.join(e)}unsubscribe(e){return this.channel.leave(e)}teardown(){this.channel.teardown()}onClose(e){this.channel.onClose(e)}onError(e){return this.channel.onError(e)}push(e,r,n){let i;try{i=this.channel.push(e,r,n)}catch{throw new Error(`tried to push '${e}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>d6){const a=this.channel.pushBuffer.shift();a.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${a.event}`,a.payload())}return i}updateJoinPayload(e){const r=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},r),e)}canPush(){return this.socket.isConnected()&&this.state===ea.joined}isJoined(){return this.state===ea.joined}isJoining(){return this.state===ea.joining}isClosed(){return this.state===ea.closed}isLeaving(){return this.state===ea.leaving}updateFilterBindings(e){this.channel.filterBindings=e}updatePayloadTransform(e){this.channel.onMessage=e}getChannel(){return this.channel}}function $6(t){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},t.config)}}var Kk;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELETE="DELETE"})(Kk||(Kk={}));var Go;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(Go||(Go={}));var oi;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(oi||(oi={}));class iu{get state(){return this.channelAdapter.state}set state(e){this.channelAdapter.state=e}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(e,r={config:{}},n){var i,a;if(this.topic=e,this.params=r,this.socket=n,this.bindings={},this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.channelAdapter=new N6(this.socket.socketAdapter,e,this.params),this.presence=new C6(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=AR(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((a=(i=this.params.config)===null||i===void 0?void 0:i.broadcast)===null||a===void 0)&&a.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(e,r=this.timeout){var n,i,a;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:s,presence:u,private:c}}=this.params,f=(i=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(v=>v.filter))!==null&&i!==void 0?i:[],p=!!this.bindings[Go.PRESENCE]&&this.bindings[Go.PRESENCE].length>0||((a=this.params.config.presence)===null||a===void 0?void 0:a.enabled)===!0,h={},g={broadcast:s,presence:Object.assign(Object.assign({},u),{enabled:p}),postgres_changes:f,private:c};this.socket.accessTokenValue&&(h.access_token=this.socket.accessTokenValue),this._onError(v=>{e==null||e(oi.CHANNEL_ERROR,R6(v))}),this._onClose(()=>e==null?void 0:e(oi.CLOSED)),this.updateJoinPayload(Object.assign({config:g},h)),this._updateFilterMessage(),this.channelAdapter.subscribe(r).receive("ok",async({postgres_changes:v})=>{if(this.socket._isManualToken()||this.socket.setAuth(),v===void 0){e==null||e(oi.SUBSCRIBED);return}this._updatePostgresBindings(v,e)}).receive("error",v=>{this.state=ea.errored;const b=Object.values(v).join(", ")||"error";e==null||e(oi.CHANNEL_ERROR,new Error(b,{cause:v}))}).receive("timeout",()=>{e==null||e(oi.TIMED_OUT)})}return this}_updatePostgresBindings(e,r){var n;const i=this.bindings.postgres_changes,a=(n=i==null?void 0:i.length)!==null&&n!==void 0?n:0,s=[];for(let u=0;u<a;u++){const c=i[u],{filter:{event:f,schema:p,table:h,filter:g}}=c,v=e&&e[u];if(v&&v.event===f&&iu.isFilterValueEqual(v.schema,p)&&iu.isFilterValueEqual(v.table,h)&&iu.isFilterValueEqual(v.filter,g))s.push(Object.assign(Object.assign({},c),{id:v.id}));else{this.unsubscribe(),this.state=ea.errored,r==null||r(oi.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=s,this.state!=ea.errored&&r&&r(oi.SUBSCRIBED)}presenceState(){return this.presence.state}async track(e,r={}){return await this.send({type:"presence",event:"track",payload:e},r.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,r,n){const i=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),a=e===Go.PRESENCE||e===Go.POSTGRES_CHANGES;if(i&&a)throw this.socket.log("channel",`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(e,r,n)}async httpSend(e,r,n={}){var i;if(r==null)return Promise.reject(new Error("Payload is required for httpSend()"));const a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const s={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:e,payload:r,private:this.private}]})},u=await this._fetchWithTimeout(this.broadcastEndpointURL,s,(i=n.timeout)!==null&&i!==void 0?i:this.timeout);if(u.status===202)return{success:!0};let c=u.statusText;try{const f=await u.json();c=f.error||f.message||c}catch{}return Promise.reject(new Error(c))}async send(e,r={}){var n,i;if(!this.channelAdapter.canPush()&&e.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:a,payload:s}=e,u={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(u.Authorization=`Bearer ${this.socket.accessTokenValue}`);const c={method:"POST",headers:u,body:JSON.stringify({messages:[{topic:this.subTopic,event:a,payload:s,private:this.private}]})};try{const f=await this._fetchWithTimeout(this.broadcastEndpointURL,c,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((i=f.body)===null||i===void 0?void 0:i.cancel()),f.ok?"ok":"error"}catch(f){return f instanceof Error&&f.name==="AbortError"?"timed out":"error"}}else return new Promise(a=>{var s,u,c;const f=this.channelAdapter.push(e.type,e,r.timeout||this.timeout);e.type==="broadcast"&&!(!((c=(u=(s=this.params)===null||s===void 0?void 0:s.config)===null||u===void 0?void 0:u.broadcast)===null||c===void 0)&&c.ack)&&a("ok"),f.receive("ok",()=>a("ok")),f.receive("error",()=>a("error")),f.receive("timeout",()=>a("timed out"))})}updateJoinPayload(e){this.channelAdapter.updateJoinPayload(e)}async unsubscribe(e=this.timeout){return new Promise(r=>{this.channelAdapter.unsubscribe(e).receive("ok",()=>r("ok")).receive("timeout",()=>r("timed out")).receive("error",()=>r("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(e,r,n){const i=new AbortController,a=setTimeout(()=>i.abort(),n),s=await this.socket.fetch(e,Object.assign(Object.assign({},r),{signal:i.signal}));return clearTimeout(a),s}_on(e,r,n){const i=e.toLocaleLowerCase(),a=this.channelAdapter.on(e,n),s={type:i,filter:r,callback:n,ref:a};return this.bindings[i]?this.bindings[i].push(s):this.bindings[i]=[s],this._updateFilterMessage(),this}_onClose(e){this.channelAdapter.onClose(e)}_onError(e){this.channelAdapter.onError(e)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((e,r,n)=>{var i,a,s,u,c,f,p;const h=e.event.toLocaleLowerCase();if(this._notThisChannelEvent(h,n))return!1;const g=(i=this.bindings[h])===null||i===void 0?void 0:i.find(v=>v.ref===e.ref);if(!g)return!0;if(["broadcast","presence","postgres_changes"].includes(h))if("id"in g){const v=g.id,b=(a=g.filter)===null||a===void 0?void 0:a.event;return v&&((s=r.ids)===null||s===void 0?void 0:s.includes(v))&&(b==="*"||(b==null?void 0:b.toLocaleLowerCase())===((u=r.data)===null||u===void 0?void 0:u.type.toLocaleLowerCase()))}else{const v=(f=(c=g==null?void 0:g.filter)===null||c===void 0?void 0:c.event)===null||f===void 0?void 0:f.toLocaleLowerCase();return v==="*"||v===((p=r==null?void 0:r.event)===null||p===void 0?void 0:p.toLocaleLowerCase())}else return g.type.toLocaleLowerCase()===h})}_notThisChannelEvent(e,r){const{close:n,error:i,leave:a,join:s}=ER;return r&&[n,i,a,s].includes(e)&&r!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((e,r,n)=>{if(typeof r=="object"&&"ids"in r){const i=r.data,{schema:a,table:s,commit_timestamp:u,type:c,errors:f}=i;return Object.assign(Object.assign({},{schema:a,table:s,commit_timestamp:u,eventType:c,new:{},old:{},errors:f}),this._getPayloadRecords(i))}return r})}copyBindings(e){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const r in e.bindings)for(const n of e.bindings[r])this._on(n.type,n.filter,n.callback)}static isFilterValueEqual(e,r){return(e??void 0)===(r??void 0)}_getPayloadRecords(e){const r={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(r.new=Fk(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(r.old=Fk(e.columns,e.old_record)),r}}class I6{constructor(e,r){this.socket=new P6(e,r)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(e){this.socket.heartbeatCallback=e}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(e,r,n,i=1e4){return new Promise(a=>{setTimeout(()=>a("timeout"),i),this.socket.disconnect(()=>{e(),a("ok")},r,n)})}push(e){this.socket.push(e)}log(e,r,n){this.socket.log(e,r,n)}makeRef(){return this.socket.makeRef()}onOpen(e){this.socket.onOpen(e)}onClose(e){this.socket.onClose(e)}onError(e){this.socket.onError(e)}onMessage(e){this.socket.onMessage(e)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==_b.connecting}isDisconnecting(){return this.socket.connectionState()==_b.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const Vk={HEARTBEAT_INTERVAL:25e3},M6=[1e3,2e3,5e3,1e4],L6=1e4;function D6(){const t=new Map;return{get length(){return t.size},clear(){t.clear()},getItem(e){return t.has(e)?t.get(e):null},key(e){var r;return(r=Array.from(t.keys())[e])!==null&&r!==void 0?r:null},removeItem(e){t.delete(e)},setItem(e,r){t.set(e,String(r))}}}function B6(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return D6()}const z6=`
|
|
380
|
-
addEventListener("message", (e) => {
|
|
381
|
-
if (e.data.event === "start") {
|
|
382
|
-
setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
|
|
383
|
-
}
|
|
384
|
-
});`;class q6{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(e,r){var n;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={},this.ref=0,this.serializer=new h6,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=a=>a?(...s)=>a(...s):(...s)=>fetch(...s),!(!((n=r==null?void 0:r.params)===null||n===void 0)&&n.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=r.params.apikey;const i=this._initializeOptions(r);this.socketAdapter=new I6(e,i),this.httpEndpoint=AR(e),this.fetch=this._resolveFetch(r==null?void 0:r.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(e){const r=e.message;throw r.includes("Node.js")?new Error(`${r}
|
|
385
|
-
|
|
386
|
-
To use Realtime in Node.js, you need to provide a WebSocket implementation:
|
|
387
|
-
|
|
388
|
-
Option 1: Use Node.js 22+ which has native WebSocket support
|
|
389
|
-
Option 2: Install and provide the "ws" package:
|
|
390
|
-
|
|
391
|
-
npm install ws
|
|
392
|
-
|
|
393
|
-
import ws from "ws"
|
|
394
|
-
const client = new RealtimeClient(url, {
|
|
395
|
-
...options,
|
|
396
|
-
transport: ws
|
|
397
|
-
})`):new Error(`WebSocket not available: ${r}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(e,r){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},e,r)}getChannels(){return this.channels}async removeChannel(e){const r=await e.unsubscribe();return r==="ok"&&e.teardown(),r}async removeAllChannels(){const e=this.channels.map(async n=>{const i=await n.unsubscribe();return n.teardown(),i}),r=await Promise.all(e);return await this.disconnect(),r}log(e,r,n){this.socketAdapter.log(e,r,n)}connectionState(){return this.socketAdapter.connectionState()||_b.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(e,r={config:{}}){const n=`realtime:${e}`,i=this.getChannels().find(a=>a.topic===n);if(i)return i;{const a=new iu(`realtime:${e}`,r,this);return this._cancelPendingDisconnect(),this.channels.push(a),a}}push(e){this.socketAdapter.push(e)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(e){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(e)}_makeRef(){return this.socketAdapter.makeRef()}_remove(e){this.channels=this.channels.filter(r=>r.topic!==e.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(e=null){let r,n=!1;if(e)r=e,n=!0;else if(this.accessToken)try{r=await this.accessToken()}catch(i){this.log("error","Error fetching access token from callback",i),r=this.accessTokenValue}else r=this.accessTokenValue;n?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(i=>{const a={access_token:r,version:l6};r&&i.updateJoinPayload(a),i.joinedOnce&&i.channelAdapter.isJoined()&&i.channelAdapter.push(ER.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error",`Error setting auth in ${e}`,r)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(r=>{this.log("error","error waiting for auth on connect",r)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(e=>{e.ref&&e.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(e){return(r,n)=>{r=="sent"&&this._setAuthSafely(),e&&e(r,n)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(e){let r;if(e)r=e;else{const n=new Blob([z6],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_initializeOptions(e){var r,n,i,a,s,u,c,f,p,h,g,v;this.worker=(r=e==null?void 0:e.worker)!==null&&r!==void 0?r:!1,this.accessToken=(n=e==null?void 0:e.accessToken)!==null&&n!==void 0?n:null;const b={};b.timeout=(i=e==null?void 0:e.timeout)!==null&&i!==void 0?i:f6,b.heartbeatIntervalMs=(a=e==null?void 0:e.heartbeatIntervalMs)!==null&&a!==void 0?a:Vk.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(s=e==null?void 0:e.disconnectOnEmptyChannelsAfterMs)!==null&&s!==void 0?s:2*((u=e==null?void 0:e.heartbeatIntervalMs)!==null&&u!==void 0?u:Vk.HEARTBEAT_INTERVAL),b.transport=(c=e==null?void 0:e.transport)!==null&&c!==void 0?c:o6.getWebSocketConstructor(),b.params=e==null?void 0:e.params,b.logger=e==null?void 0:e.logger,b.heartbeatCallback=this._wrapHeartbeatCallback(e==null?void 0:e.heartbeatCallback),b.sessionStorage=(f=e==null?void 0:e.sessionStorage)!==null&&f!==void 0?f:B6(),b.reconnectAfterMs=(p=e==null?void 0:e.reconnectAfterMs)!==null&&p!==void 0?p:(O=>M6[O-1]||L6);let x,y;const k=(h=e==null?void 0:e.vsn)!==null&&h!==void 0?h:c6;switch(k){case u6:x=(O,A)=>A(JSON.stringify(O)),y=(O,A)=>A(JSON.parse(O));break;case kR:x=this.serializer.encode.bind(this.serializer),y=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${b.vsn}`)}if(b.vsn=k,b.encode=(g=e==null?void 0:e.encode)!==null&&g!==void 0?g:x,b.decode=(v=e==null?void 0:e.decode)!==null&&v!==void 0?v:y,b.beforeReconnect=this._reconnectAuth.bind(this),(e!=null&&e.logLevel||e!=null&&e.log_level)&&(this.logLevel=e.logLevel||e.log_level,b.params=Object.assign(Object.assign({},b.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=e==null?void 0:e.workerUrl,b.autoSendHeartbeat=!this.worker}return b}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}var hu=class extends Error{constructor(t,e){var r;super(t),this.name="IcebergError",this.status=e.status,this.icebergType=e.icebergType,this.icebergCode=e.icebergCode,this.details=e.details,this.isCommitStateUnknown=e.icebergType==="CommitStateUnknownException"||[500,502,504].includes(e.status)&&((r=e.icebergType)==null?void 0:r.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function U6(t,e,r){const n=new URL(e,t);if(r)for(const[i,a]of Object.entries(r))a!==void 0&&n.searchParams.set(i,a);return n.toString()}async function F6(t){return!t||t.type==="none"?{}:t.type==="bearer"?{Authorization:`Bearer ${t.token}`}:t.type==="header"?{[t.name]:t.value}:t.type==="custom"?await t.getHeaders():{}}function H6(t){const e=t.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:i,body:a,headers:s}){const u=U6(t.baseUrl,n,i),c=await F6(t.auth),f=await e(u,{method:r,headers:{...a?{"Content-Type":"application/json"}:{},...c,...s},body:a?JSON.stringify(a):void 0}),p=await f.text(),h=(f.headers.get("content-type")||"").includes("application/json"),g=h&&p?JSON.parse(p):p;if(!f.ok){const v=h?g:void 0,b=v==null?void 0:v.error;throw new hu((b==null?void 0:b.message)??`Request failed with status ${f.status}`,{status:f.status,icebergType:b==null?void 0:b.type,icebergCode:b==null?void 0:b.code,details:v})}return{status:f.status,headers:f.headers,data:g}}}}function Tf(t){return t.join("")}var W6=class{constructor(t,e=""){this.client=t,this.prefix=e}async listNamespaces(t){const e=t?{parent:Tf(t.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:e})).data.namespaces.map(n=>({namespace:n}))}async createNamespace(t,e){const r={namespace:t.namespace,properties:e==null?void 0:e.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Tf(t.namespace)}`})}async loadNamespaceMetadata(t){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Tf(t.namespace)}`})).data.properties}}async namespaceExists(t){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Tf(t.namespace)}`}),!0}catch(e){if(e instanceof hu&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(t,e){try{return await this.createNamespace(t,e)}catch(r){if(r instanceof hu&&r.status===409)return;throw r}}};function Lo(t){return t.join("")}var K6=class{constructor(t,e="",r){this.client=t,this.prefix=e,this.accessDelegation=r}async listTables(t){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Lo(t.namespace)}/tables`})).data.identifiers}async createTable(t,e){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Lo(t.namespace)}/tables`,body:e,headers:r})).data.metadata}async updateTable(t,e){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Lo(t.namespace)}/tables/${t.name}`,body:e});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(t,e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Lo(t.namespace)}/tables/${t.name}`,query:{purgeRequested:String((e==null?void 0:e.purge)??!1)}})}async loadTable(t){const e={};return this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Lo(t.namespace)}/tables/${t.name}`,headers:e})).data.metadata}async tableExists(t){const e={};this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Lo(t.namespace)}/tables/${t.name}`,headers:e}),!0}catch(r){if(r instanceof hu&&r.status===404)return!1;throw r}}async createTableIfNotExists(t,e){try{return await this.createTable(t,e)}catch(r){if(r instanceof hu&&r.status===409)return await this.loadTable({namespace:t.namespace,name:e.name});throw r}}},V6=class{constructor(t){var n;let e="v1";t.catalogName&&(e+=`/${t.catalogName}`);const r=t.baseUrl.endsWith("/")?t.baseUrl:`${t.baseUrl}/`;this.client=H6({baseUrl:r,auth:t.auth,fetchImpl:t.fetch}),this.accessDelegation=(n=t.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new W6(this.client,e),this.tableOps=new K6(this.client,e,this.accessDelegation)}async listNamespaces(t){return this.namespaceOps.listNamespaces(t)}async createNamespace(t,e){return this.namespaceOps.createNamespace(t,e)}async dropNamespace(t){await this.namespaceOps.dropNamespace(t)}async loadNamespaceMetadata(t){return this.namespaceOps.loadNamespaceMetadata(t)}async listTables(t){return this.tableOps.listTables(t)}async createTable(t,e){return this.tableOps.createTable(t,e)}async updateTable(t,e){return this.tableOps.updateTable(t,e)}async dropTable(t,e){await this.tableOps.dropTable(t,e)}async loadTable(t){return this.tableOps.loadTable(t)}async namespaceExists(t){return this.namespaceOps.namespaceExists(t)}async tableExists(t){return this.tableOps.tableExists(t)}async createNamespaceIfNotExists(t,e){return this.namespaceOps.createNamespaceIfNotExists(t,e)}async createTableIfNotExists(t,e){return this.tableOps.createTableIfNotExists(t,e)}};function pu(t){"@babel/helpers - typeof";return pu=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},pu(t)}function G6(t,e){if(pu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(pu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function X6(t){var e=G6(t,"string");return pu(e)=="symbol"?e:e+""}function Y6(t,e,r){return(e=X6(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Gk(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function je(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Gk(Object(r),!0).forEach(function(n){Y6(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Gk(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Sh=class extends Error{constructor(t,e="storage",r,n){super(t),this.__isStorageError=!0,this.namespace=e,this.name=e==="vectors"?"StorageVectorsError":"StorageError",this.status=r,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function kh(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}var Ob=class extends Sh{constructor(t,e,r,n="storage"){super(t,n,e,r),this.name=n==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=e,this.statusCode=r}toJSON(){return je({},super.toJSON())}},TR=class extends Sh{constructor(t,e,r="storage"){super(t,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=e}};function dd(t,e,r){const n=je({},t),i=e.toLowerCase();for(const a of Object.keys(n))a.toLowerCase()===i&&delete n[a];return n[i]=r,n}function J6(t){const e={};for(const[r,n]of Object.entries(t))e[r.toLowerCase()]=n;return e}const Q6=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),Z6=t=>{if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Ab=t=>{if(Array.isArray(t))return t.map(r=>Ab(r));if(typeof t=="function"||t!==Object(t))return t;const e={};return Object.entries(t).forEach(([r,n])=>{const i=r.replace(/([-_][a-z])/gi,a=>a.toUpperCase().replace(/[-_]/g,""));e[i]=Ab(n)}),e},ez=t=>!t||typeof t!="string"||t.length===0||t.length>100||t.trim()!==t||t.includes("/")||t.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(t),Xk=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error;if(typeof e.error=="object"&&e.error!==null){const r=e.error;if(typeof r.message=="string")return r.message}}return JSON.stringify(t)},tz=async(t,e,r,n)=>{if(t!==null&&typeof t=="object"&&"json"in t&&typeof t.json=="function"){const i=t;let a=parseInt(String(i.status),10);Number.isFinite(a)||(a=500),i.json().then(s=>{const u=(s==null?void 0:s.statusCode)||(s==null?void 0:s.code)||a+"";e(new Ob(Xk(s),a,u,n))}).catch(()=>{const s=a+"";e(new Ob(i.statusText||`HTTP ${a} error`,a,s,n))})}else e(new TR(Xk(t),t,n))},rz=(t,e,r,n)=>{const i={method:t,headers:(e==null?void 0:e.headers)||{}};if(t==="GET"||t==="HEAD"||!n)return je(je({},i),r);if(Z6(n)){var a;const s=(e==null?void 0:e.headers)||{};let u;for(const[c,f]of Object.entries(s))c.toLowerCase()==="content-type"&&(u=f);i.headers=dd(s,"Content-Type",(a=u)!==null&&a!==void 0?a:"application/json"),i.body=JSON.stringify(n)}else i.body=n;return e!=null&&e.duplex&&(i.duplex=e.duplex),je(je({},i),r)};async function Dl(t,e,r,n,i,a,s){return new Promise((u,c)=>{t(r,rz(e,n,i,a)).then(f=>{if(!f.ok)throw f;if(n!=null&&n.noResolveJson)return f;if(s==="vectors"){const p=f.headers.get("content-type");if(f.headers.get("content-length")==="0"||f.status===204)return{};if(!p||!p.includes("application/json"))return{}}return f.json()}).then(f=>u(f)).catch(f=>tz(f,c,n,s))})}function jR(t="storage"){return{get:async(e,r,n,i)=>Dl(e,"GET",r,n,i,void 0,t),post:async(e,r,n,i,a)=>Dl(e,"POST",r,i,a,n,t),put:async(e,r,n,i,a)=>Dl(e,"PUT",r,i,a,n,t),head:async(e,r,n,i)=>Dl(e,"HEAD",r,je(je({},n),{},{noResolveJson:!0}),i,void 0,t),remove:async(e,r,n,i,a)=>Dl(e,"DELETE",r,i,a,n,t)}}const nz=jR("storage"),{get:mu,post:vn,put:Pb,head:iz,remove:Tx}=nz,Ir=jR("vectors");var Ds=class{constructor(t,e={},r,n="storage"){this.shouldThrowOnError=!1,this.url=t,this.headers=J6(e),this.fetch=Q6(r),this.namespace=n}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,e){return this.headers=dd(this.headers,t,e),this}async handleOperation(t){var e=this;try{return{data:await t(),error:null}}catch(r){if(e.shouldThrowOnError)throw r;if(kh(r))return{data:null,error:r};throw r}}};let CR;CR=Symbol.toStringTag;var az=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[CR]="StreamDownloadBuilder",this.promise=null}then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:(await t.downloadFn()).body,error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(kh(e))return{data:null,error:e};throw e}}};let RR;RR=Symbol.toStringTag;var oz=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[RR]="BlobDownloadBuilder",this.promise=null}asStream(){return new az(this.downloadFn,this.shouldThrowOnError)}then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:await(await t.downloadFn()).blob(),error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(kh(e))return{data:null,error:e};throw e}}};const sz={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Yk={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var lz=class extends Ds{constructor(t,e={},r,n){super(t,e,n,"storage"),this.bucketId=r}async uploadOrUpdate(t,e,r,n){var i=this;return i.handleOperation(async()=>{let a;const s=je(je({},Yk),n);let u=je(je({},i.headers),t==="POST"&&{"x-upsert":String(s.upsert)});const c=s.metadata;if(typeof Blob<"u"&&r instanceof Blob?(a=new FormData,a.append("cacheControl",s.cacheControl),c&&a.append("metadata",i.encodeMetadata(c)),a.append("",r)):typeof FormData<"u"&&r instanceof FormData?(a=r,a.has("cacheControl")||a.append("cacheControl",s.cacheControl),c&&!a.has("metadata")&&a.append("metadata",i.encodeMetadata(c))):(a=r,u["cache-control"]=`max-age=${s.cacheControl}`,u["content-type"]=s.contentType,c&&(u["x-metadata"]=i.toBase64(i.encodeMetadata(c))),(typeof ReadableStream<"u"&&a instanceof ReadableStream||a&&typeof a=="object"&&"pipe"in a&&typeof a.pipe=="function")&&!s.duplex&&(s.duplex="half")),n!=null&&n.headers)for(const[g,v]of Object.entries(n.headers))u=dd(u,g,v);const f=i._removeEmptyFolders(e),p=i._getFinalPath(f),h=await(t=="PUT"?Pb:vn)(i.fetch,`${i.url}/object/${p}`,a,je({headers:u},s!=null&&s.duplex?{duplex:s.duplex}:{}));return{path:f,id:h.Id,fullPath:h.Key}})}async upload(t,e,r){return this.uploadOrUpdate("POST",t,e,r)}async uploadToSignedUrl(t,e,r,n){var i=this;const a=i._removeEmptyFolders(t),s=i._getFinalPath(a),u=new URL(i.url+`/object/upload/sign/${s}`);return u.searchParams.set("token",e),i.handleOperation(async()=>{let c;const f=je(je({},Yk),n);let p=je(je({},i.headers),{"x-upsert":String(f.upsert)});const h=f.metadata;if(typeof Blob<"u"&&r instanceof Blob?(c=new FormData,c.append("cacheControl",f.cacheControl),h&&c.append("metadata",i.encodeMetadata(h)),c.append("",r)):typeof FormData<"u"&&r instanceof FormData?(c=r,c.has("cacheControl")||c.append("cacheControl",f.cacheControl),h&&!c.has("metadata")&&c.append("metadata",i.encodeMetadata(h))):(c=r,p["cache-control"]=`max-age=${f.cacheControl}`,p["content-type"]=f.contentType,h&&(p["x-metadata"]=i.toBase64(i.encodeMetadata(h))),(typeof ReadableStream<"u"&&c instanceof ReadableStream||c&&typeof c=="object"&&"pipe"in c&&typeof c.pipe=="function")&&!f.duplex&&(f.duplex="half")),n!=null&&n.headers)for(const[g,v]of Object.entries(n.headers))p=dd(p,g,v);return{path:a,fullPath:(await Pb(i.fetch,u.toString(),c,je({headers:p},f!=null&&f.duplex?{duplex:f.duplex}:{}))).Key}})}async createSignedUploadUrl(t,e){var r=this;return r.handleOperation(async()=>{let n=r._getFinalPath(t);const i=je({},r.headers);e!=null&&e.upsert&&(i["x-upsert"]="true");const a=await vn(r.fetch,`${r.url}/object/upload/sign/${n}`,{},{headers:i}),s=new URL(r.url+a.url),u=s.searchParams.get("token");if(!u)throw new Sh("No token returned by API");return{signedUrl:s.toString(),path:t,token:u}})}async update(t,e,r){return this.uploadOrUpdate("PUT",t,e,r)}async move(t,e,r){var n=this;return n.handleOperation(async()=>await vn(n.fetch,`${n.url}/object/move`,{bucketId:n.bucketId,sourceKey:t,destinationKey:e,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers}))}async copy(t,e,r){var n=this;return n.handleOperation(async()=>({path:(await vn(n.fetch,`${n.url}/object/copy`,{bucketId:n.bucketId,sourceKey:t,destinationKey:e,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers})).Key}))}async createSignedUrl(t,e,r){var n=this;return n.handleOperation(async()=>{let i=n._getFinalPath(t);const a=typeof(r==null?void 0:r.transform)=="object"&&r.transform!==null&&Object.keys(r.transform).length>0;let s=await vn(n.fetch,`${n.url}/object/sign/${i}`,je({expiresIn:e},a?{transform:r.transform}:{}),{headers:n.headers});const u=new URLSearchParams;r!=null&&r.download&&u.set("download",r.download===!0?"":r.download),(r==null?void 0:r.cacheNonce)!=null&&u.set("cacheNonce",String(r.cacheNonce));const c=u.toString();return{signedUrl:encodeURI(`${n.url}${s.signedURL}${c?`&${c}`:""}`)}})}async createSignedUrls(t,e,r){var n=this;return n.handleOperation(async()=>{const i=await vn(n.fetch,`${n.url}/object/sign/${n.bucketId}`,{expiresIn:e,paths:t},{headers:n.headers}),a=new URLSearchParams;r!=null&&r.download&&a.set("download",r.download===!0?"":r.download),(r==null?void 0:r.cacheNonce)!=null&&a.set("cacheNonce",String(r.cacheNonce));const s=a.toString();return i.map(u=>je(je({},u),{},{signedUrl:u.signedURL?encodeURI(`${n.url}${u.signedURL}${s?`&${s}`:""}`):null}))})}download(t,e,r){const n=typeof(e==null?void 0:e.transform)=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image/authenticated":"object",i=new URLSearchParams;e!=null&&e.transform&&this.applyTransformOptsToQuery(i,e.transform),(e==null?void 0:e.cacheNonce)!=null&&i.set("cacheNonce",String(e.cacheNonce));const a=i.toString(),s=this._getFinalPath(t),u=()=>mu(this.fetch,`${this.url}/${n}/${s}${a?`?${a}`:""}`,{headers:this.headers,noResolveJson:!0},r);return new oz(u,this.shouldThrowOnError)}async info(t){var e=this;const r=e._getFinalPath(t);return e.handleOperation(async()=>Ab(await mu(e.fetch,`${e.url}/object/info/${r}`,{headers:e.headers})))}async exists(t){var e=this;const r=e._getFinalPath(t);try{return await iz(e.fetch,`${e.url}/object/${r}`,{headers:e.headers}),{data:!0,error:null}}catch(i){if(e.shouldThrowOnError)throw i;if(kh(i)){var n;const a=i instanceof Ob?i.status:i instanceof TR?(n=i.originalError)===null||n===void 0?void 0:n.status:void 0;if(a!==void 0&&[400,404].includes(a))return{data:!1,error:i}}throw i}}getPublicUrl(t,e){const r=this._getFinalPath(t),n=new URLSearchParams;e!=null&&e.download&&n.set("download",e.download===!0?"":e.download),e!=null&&e.transform&&this.applyTransformOptsToQuery(n,e.transform),(e==null?void 0:e.cacheNonce)!=null&&n.set("cacheNonce",String(e.cacheNonce));const i=n.toString(),a=typeof(e==null?void 0:e.transform)=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${r}`)+(i?`?${i}`:"")}}}async remove(t){var e=this;return e.handleOperation(async()=>await Tx(e.fetch,`${e.url}/object/${e.bucketId}`,{prefixes:t},{headers:e.headers}))}async list(t,e,r){var n=this;return n.handleOperation(async()=>{const i=je(je(je({},sz),e),{},{prefix:t||""});return await vn(n.fetch,`${n.url}/object/list/${n.bucketId}`,i,{headers:n.headers},r)})}async listV2(t,e){var r=this;return r.handleOperation(async()=>{const n=je({},t);return await vn(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,n,{headers:r.headers},e)})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(t,e){return e.width&&t.set("width",e.width.toString()),e.height&&t.set("height",e.height.toString()),e.resize&&t.set("resize",e.resize),e.format&&t.set("format",e.format),e.quality&&t.set("quality",e.quality.toString()),t}};const uz="2.106.2",rc={"X-Client-Info":`storage-js/${uz}`};var cz=class extends Ds{constructor(t,e={},r,n){const i=new URL(t);n!=null&&n.useNewHostname&&/supabase\.(co|in|red)$/.test(i.hostname)&&!i.hostname.includes("storage.supabase.")&&(i.hostname=i.hostname.replace("supabase.","storage.supabase."));const a=i.href.replace(/\/$/,""),s=je(je({},rc),e);super(a,s,r,"storage")}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const r=e.listBucketOptionsToQueryString(t);return await mu(e.fetch,`${e.url}/bucket${r}`,{headers:e.headers})})}async getBucket(t){var e=this;return e.handleOperation(async()=>await mu(e.fetch,`${e.url}/bucket/${t}`,{headers:e.headers}))}async createBucket(t,e={public:!1}){var r=this;return r.handleOperation(async()=>await vn(r.fetch,`${r.url}/bucket`,{id:t,name:t,type:e.type,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:r.headers}))}async updateBucket(t,e){var r=this;return r.handleOperation(async()=>await Pb(r.fetch,`${r.url}/bucket/${t}`,{id:t,name:t,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:r.headers}))}async emptyBucket(t){var e=this;return e.handleOperation(async()=>await vn(e.fetch,`${e.url}/bucket/${t}/empty`,{},{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Tx(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}listBucketOptionsToQueryString(t){const e={};return t&&("limit"in t&&(e.limit=String(t.limit)),"offset"in t&&(e.offset=String(t.offset)),t.search&&(e.search=t.search),t.sortColumn&&(e.sortColumn=t.sortColumn),t.sortOrder&&(e.sortOrder=t.sortOrder)),Object.keys(e).length>0?"?"+new URLSearchParams(e).toString():""}},fz=class extends Ds{constructor(t,e={},r){const n=t.replace(/\/$/,""),i=je(je({},rc),e);super(n,i,r,"storage")}async createBucket(t){var e=this;return e.handleOperation(async()=>await vn(e.fetch,`${e.url}/bucket`,{name:t},{headers:e.headers}))}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const r=new URLSearchParams;(t==null?void 0:t.limit)!==void 0&&r.set("limit",t.limit.toString()),(t==null?void 0:t.offset)!==void 0&&r.set("offset",t.offset.toString()),t!=null&&t.sortColumn&&r.set("sortColumn",t.sortColumn),t!=null&&t.sortOrder&&r.set("sortOrder",t.sortOrder),t!=null&&t.search&&r.set("search",t.search);const n=r.toString(),i=n?`${e.url}/bucket?${n}`:`${e.url}/bucket`;return await mu(e.fetch,i,{headers:e.headers})})}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Tx(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}from(t){var e=this;if(!ez(t))throw new Sh("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const r=new V6({baseUrl:this.url,catalogName:t,auth:{type:"custom",getHeaders:async()=>e.headers},fetch:this.fetch}),n=this.shouldThrowOnError;return new Proxy(r,{get(i,a){const s=i[a];return typeof s!="function"?s:async(...u)=>{try{return{data:await s.apply(i,u),error:null}}catch(c){if(n)throw c;return{data:null,error:c}}}}})}},dz=class extends Ds{constructor(t,e={},r){const n=t.replace(/\/$/,""),i=je(je({},rc),{},{"Content-Type":"application/json"},e);super(n,i,r,"vectors")}async createIndex(t){var e=this;return e.handleOperation(async()=>await Ir.post(e.fetch,`${e.url}/CreateIndex`,t,{headers:e.headers})||{})}async getIndex(t,e){var r=this;return r.handleOperation(async()=>await Ir.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:t,indexName:e},{headers:r.headers}))}async listIndexes(t){var e=this;return e.handleOperation(async()=>await Ir.post(e.fetch,`${e.url}/ListIndexes`,t,{headers:e.headers}))}async deleteIndex(t,e){var r=this;return r.handleOperation(async()=>await Ir.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:t,indexName:e},{headers:r.headers})||{})}},hz=class extends Ds{constructor(t,e={},r){const n=t.replace(/\/$/,""),i=je(je({},rc),{},{"Content-Type":"application/json"},e);super(n,i,r,"vectors")}async putVectors(t){var e=this;if(t.vectors.length<1||t.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return e.handleOperation(async()=>await Ir.post(e.fetch,`${e.url}/PutVectors`,t,{headers:e.headers})||{})}async getVectors(t){var e=this;return e.handleOperation(async()=>await Ir.post(e.fetch,`${e.url}/GetVectors`,t,{headers:e.headers}))}async listVectors(t){var e=this;if(t.segmentCount!==void 0){if(t.segmentCount<1||t.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(t.segmentIndex!==void 0&&(t.segmentIndex<0||t.segmentIndex>=t.segmentCount))throw new Error(`segmentIndex must be between 0 and ${t.segmentCount-1}`)}return e.handleOperation(async()=>await Ir.post(e.fetch,`${e.url}/ListVectors`,t,{headers:e.headers}))}async queryVectors(t){var e=this;return e.handleOperation(async()=>await Ir.post(e.fetch,`${e.url}/QueryVectors`,t,{headers:e.headers}))}async deleteVectors(t){var e=this;if(t.keys.length<1||t.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return e.handleOperation(async()=>await Ir.post(e.fetch,`${e.url}/DeleteVectors`,t,{headers:e.headers})||{})}},pz=class extends Ds{constructor(t,e={},r){const n=t.replace(/\/$/,""),i=je(je({},rc),{},{"Content-Type":"application/json"},e);super(n,i,r,"vectors")}async createBucket(t){var e=this;return e.handleOperation(async()=>await Ir.post(e.fetch,`${e.url}/CreateVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}async getBucket(t){var e=this;return e.handleOperation(async()=>await Ir.post(e.fetch,`${e.url}/GetVectorBucket`,{vectorBucketName:t},{headers:e.headers}))}async listBuckets(t={}){var e=this;return e.handleOperation(async()=>await Ir.post(e.fetch,`${e.url}/ListVectorBuckets`,t,{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Ir.post(e.fetch,`${e.url}/DeleteVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}},mz=class extends pz{constructor(t,e={}){super(t,e.headers||{},e.fetch)}from(t){return new gz(this.url,this.headers,t,this.fetch)}async createBucket(t){var e=()=>super.createBucket,r=this;return e().call(r,t)}async getBucket(t){var e=()=>super.getBucket,r=this;return e().call(r,t)}async listBuckets(t={}){var e=()=>super.listBuckets,r=this;return e().call(r,t)}async deleteBucket(t){var e=()=>super.deleteBucket,r=this;return e().call(r,t)}},gz=class extends dz{constructor(t,e,r,n){super(t,e,n),this.vectorBucketName=r}async createIndex(t){var e=()=>super.createIndex,r=this;return e().call(r,je(je({},t),{},{vectorBucketName:r.vectorBucketName}))}async listIndexes(t={}){var e=()=>super.listIndexes,r=this;return e().call(r,je(je({},t),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(t){var e=()=>super.getIndex,r=this;return e().call(r,r.vectorBucketName,t)}async deleteIndex(t){var e=()=>super.deleteIndex,r=this;return e().call(r,r.vectorBucketName,t)}index(t){return new vz(this.url,this.headers,this.vectorBucketName,t,this.fetch)}},vz=class extends hz{constructor(t,e,r,n,i){super(t,e,i),this.vectorBucketName=r,this.indexName=n}async putVectors(t){var e=()=>super.putVectors,r=this;return e().call(r,je(je({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(t){var e=()=>super.getVectors,r=this;return e().call(r,je(je({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(t={}){var e=()=>super.listVectors,r=this;return e().call(r,je(je({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(t){var e=()=>super.queryVectors,r=this;return e().call(r,je(je({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(t){var e=()=>super.deleteVectors,r=this;return e().call(r,je(je({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},yz=class extends cz{constructor(t,e={},r,n){super(t,e,r,n)}from(t){return new lz(this.url,this.headers,t,this.fetch)}get vectors(){return new mz(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new fz(this.url+"/iceberg",this.headers,this.fetch)}};const NR="2.106.2",Wo=30*1e3,Tb=3,ig=Tb*Wo,bz="http://localhost:9999",wz="supabase.auth.token",xz={"X-Client-Info":`gotrue-js/${NR}`},jb="X-Supabase-Api-Version",$R={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},_z=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,Sz=600*1e3;class ss extends Error{constructor(e,r,n){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function he(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class kz extends ss{constructor(e,r,n){super(e,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function Ez(t){return he(t)&&t.name==="AuthApiError"}class _n extends ss{constructor(e,r){super(e),this.name="AuthUnknownError",this.originalError=r}}class wi extends ss{constructor(e,r,n,i){super(e,n,i),this.name=r,this.status=n}}class Wt extends wi{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function jf(t){return he(t)&&t.name==="AuthSessionMissingError"}class Do extends wi{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class Cf extends wi{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class Rf extends wi{constructor(e,r=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function Oz(t){return he(t)&&t.name==="AuthImplicitGrantRedirectError"}class Jk extends wi{constructor(e,r=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class Az extends wi{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class Cb extends wi{constructor(e,r){super(e,"AuthRetryableFetchError",r,void 0)}}function ag(t){return he(t)&&t.name==="AuthRetryableFetchError"}class Qk extends wi{constructor(e,r,n){super(e,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class Rb extends wi{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const hd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Zk=`
|
|
398
|
-
\r=`.split(""),Pz=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<Zk.length;e+=1)t[Zk[e].charCodeAt(0)]=-2;for(let e=0;e<hd.length;e+=1)t[hd[e].charCodeAt(0)]=e;return t})();function eE(t,e,r){if(t!==null)for(e.queue=e.queue<<8|t,e.queuedBits+=8;e.queuedBits>=6;){const n=e.queue>>e.queuedBits-6&63;r(hd[n]),e.queuedBits-=6}else if(e.queuedBits>0)for(e.queue=e.queue<<6-e.queuedBits,e.queuedBits=6;e.queuedBits>=6;){const n=e.queue>>e.queuedBits-6&63;r(hd[n]),e.queuedBits-=6}}function IR(t,e,r){const n=Pz[t];if(n>-1)for(e.queue=e.queue<<6|n,e.queuedBits+=6;e.queuedBits>=8;)r(e.queue>>e.queuedBits-8&255),e.queuedBits-=8;else{if(n===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`)}}function tE(t){const e=[],r=s=>{e.push(String.fromCodePoint(s))},n={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},a=s=>{Cz(s,n,r)};for(let s=0;s<t.length;s+=1)IR(t.charCodeAt(s),i,a);return e.join("")}function Tz(t,e){if(t<=127){e(t);return}else if(t<=2047){e(192|t>>6),e(128|t&63);return}else if(t<=65535){e(224|t>>12),e(128|t>>6&63),e(128|t&63);return}else if(t<=1114111){e(240|t>>18),e(128|t>>12&63),e(128|t>>6&63),e(128|t&63);return}throw new Error(`Unrecognized Unicode codepoint: ${t.toString(16)}`)}function jz(t,e){for(let r=0;r<t.length;r+=1){let n=t.charCodeAt(r);if(n>55295&&n<=56319){const i=(n-55296)*1024&65535;n=(t.charCodeAt(r+1)-56320&65535|i)+65536,r+=1}Tz(n,e)}}function Cz(t,e,r){if(e.utf8seq===0){if(t<=127){r(t);return}for(let n=1;n<6;n+=1)if((t>>7-n&1)===0){e.utf8seq=n;break}if(e.utf8seq===2)e.codepoint=t&31;else if(e.utf8seq===3)e.codepoint=t&15;else if(e.utf8seq===4)e.codepoint=t&7;else throw new Error("Invalid UTF-8 sequence");e.utf8seq-=1}else if(e.utf8seq>0){if(t<=127)throw new Error("Invalid UTF-8 sequence");e.codepoint=e.codepoint<<6|t&63,e.utf8seq-=1,e.utf8seq===0&&r(e.codepoint)}}function es(t){const e=[],r={queue:0,queuedBits:0},n=i=>{e.push(i)};for(let i=0;i<t.length;i+=1)IR(t.charCodeAt(i),r,n);return new Uint8Array(e)}function Rz(t){const e=[];return jz(t,r=>e.push(r)),new Uint8Array(e)}function Ua(t){const e=[],r={queue:0,queuedBits:0},n=i=>{e.push(i)};return t.forEach(i=>eE(i,r,n)),eE(null,r,n),e.join("")}function Nz(t){return Math.round(Date.now()/1e3)+t}function $z(){return Symbol("auth-callback")}const Zt=()=>typeof window<"u"&&typeof document<"u",Ra={tested:!1,writable:!1},MR=()=>{if(!Zt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Ra.tested)return Ra.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),Ra.tested=!0,Ra.writable=!0}catch{Ra.tested=!0,Ra.writable=!1}return Ra.writable};function Iz(t){const e={},r=new URL(t);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((i,a)=>{e[a]=i})}catch{}return r.searchParams.forEach((n,i)=>{e[i]=n}),e}const LR=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),Mz=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",Ko=async(t,e,r)=>{await t.setItem(e,JSON.stringify(r))},Na=async(t,e)=>{const r=await t.getItem(e);if(!r)return null;try{return JSON.parse(r)}catch{return null}},Qt=async(t,e)=>{await t.removeItem(e)};class Eh{constructor(){this.promise=new Eh.promiseConstructor((e,r)=>{this.resolve=e,this.reject=r})}}Eh.promiseConstructor=Promise;function Nf(t){const e=t.split(".");if(e.length!==3)throw new Rb("Invalid JWT structure");for(let n=0;n<e.length;n++)if(!_z.test(e[n]))throw new Rb("JWT not in base64url format");return{header:JSON.parse(tE(e[0])),payload:JSON.parse(tE(e[1])),signature:es(e[2]),raw:{header:e[0],payload:e[1]}}}async function Lz(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function Dz(t,e){return new Promise((n,i)=>{(async()=>{for(let a=0;a<1/0;a++)try{const s=await t(a);if(!e(a,null,s)){n(s);return}}catch(s){if(!e(a,s)){i(s);return}}})()})}function Bz(t){return("0"+t.toString(16)).substr(-2)}function zz(){const e=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let i="";for(let a=0;a<56;a++)i+=r.charAt(Math.floor(Math.random()*n));return i}return crypto.getRandomValues(e),Array.from(e,Bz).join("")}async function qz(t){const r=new TextEncoder().encode(t),n=await crypto.subtle.digest("SHA-256",r),i=new Uint8Array(n);return Array.from(i).map(a=>String.fromCharCode(a)).join("")}async function Uz(t){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),t;const r=await qz(t);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Bo(t,e,r=!1){const n=zz();let i=n;r&&(i+="/recovery"),await Ko(t,`${e}-code-verifier`,i);const a=await Uz(n);return[a,n===a?"plain":"s256"]}const Fz=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function Hz(t){const e=t.headers.get(jb);if(!e||!e.match(Fz))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function Wz(t){if(!t)throw new Error("Missing exp claim");const e=Math.floor(Date.now()/1e3);if(t<=e)throw new Error("JWT has expired")}function Kz(t){switch(t){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const Vz=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function ni(t){if(!Vz.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function gn(t){if(!t.passkey)throw new Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function og(){const t={};return new Proxy(t,{get:(e,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const n=r.toString();if(n==="Symbol(Symbol.toPrimitive)"||n==="Symbol(Symbol.toStringTag)"||n==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${r}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function Gz(t,e){return new Proxy(t,{get:(r,n,i)=>{if(n==="__isInsecureUserWarningProxy")return!0;if(typeof n=="symbol"){const a=n.toString();if(a==="Symbol(Symbol.toPrimitive)"||a==="Symbol(Symbol.toStringTag)"||a==="Symbol(util.inspect.custom)"||a==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,n,i)}return!e.value&&typeof n=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),e.value=!0),Reflect.get(r,n,i)}})}function rE(t){return JSON.parse(JSON.stringify(t))}const La=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error}return JSON.stringify(t)},Xz=[502,503,504,520,521,522,523,524,530];async function nE(t){var e;if(!Mz(t))throw new Cb(La(t),0);if(Xz.includes(t.status))throw new Cb(La(t),t.status);let r;try{r=await t.json()}catch(a){throw new _n(La(a),a)}let n;const i=Hz(t);if(i&&i.getTime()>=$R["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?n=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(n=r.error_code),n){if(n==="weak_password")throw new Qk(La(r),t.status,((e=r.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(n==="session_not_found")throw new Wt}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((a,s)=>a&&typeof s=="string",!0))throw new Qk(La(r),t.status,r.weak_password.reasons);throw new kz(La(r),t.status||500,n)}const Yz=(t,e,r,n)=>{const i={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"?i:(i.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e==null?void 0:e.headers),i.body=JSON.stringify(n),Object.assign(Object.assign({},i),r))};async function xe(t,e,r,n){var i;const a=Object.assign({},n==null?void 0:n.headers);a[jb]||(a[jb]=$R["2024-01-01"].name),n!=null&&n.jwt&&(a.Authorization=`Bearer ${n.jwt}`);const s=(i=n==null?void 0:n.query)!==null&&i!==void 0?i:{};n!=null&&n.redirectTo&&(s.redirect_to=n.redirectTo);const u=Object.keys(s).length?"?"+new URLSearchParams(s).toString():"",c=await Jz(t,e,r+u,{headers:a,noResolveJson:n==null?void 0:n.noResolveJson},{},n==null?void 0:n.body);return n!=null&&n.xform?n==null?void 0:n.xform(c):{data:Object.assign({},c),error:null}}async function Jz(t,e,r,n,i,a){const s=Yz(e,n,i,a);let u;try{u=await t(r,Object.assign({},s))}catch(c){throw console.error(c),new Cb(La(c),0)}if(u.ok||await nE(u),n!=null&&n.noResolveJson)return u;try{return await u.json()}catch(c){await nE(c)}}function Zr(t){var e;let r=null;eq(t)&&(r=Object.assign({},t),t.expires_at||(r.expires_at=Nz(t.expires_in)));const n=(e=t.user)!==null&&e!==void 0?e:typeof(t==null?void 0:t.id)=="string"?t:null;return{data:{session:r,user:n},error:null}}function iE(t){const e=Zr(t);return!e.error&&t.weak_password&&typeof t.weak_password=="object"&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.message&&typeof t.weak_password.message=="string"&&t.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(e.data.weak_password=t.weak_password),e}function ta(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function Qz(t){return{data:t,error:null}}function Zz(t){const{action_link:e,email_otp:r,hashed_token:n,redirect_to:i,verification_type:a}=t,s=_h(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),u={action_link:e,email_otp:r,hashed_token:n,redirect_to:i,verification_type:a},c=Object.assign({},s);return{data:{properties:u,user:c},error:null}}function aE(t){return t}function eq(t){return!!t.access_token&&!!t.refresh_token&&!!t.expires_in}const sg=["global","local","others"];class tq{_encodePathSegment(e){if(e==="."||e==="..")throw new ss("Invalid path segment");return encodeURIComponent(e)}constructor({url:e="",headers:r={},fetch:n,experimental:i}){this.url=e,this.headers=r,this.fetch=LR(n),this.experimental=i??{},this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}async signOut(e,r=sg[0]){if(sg.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${sg.join(", ")}`);try{return await xe(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(n){if(he(n))return{data:null,error:n};throw n}}async inviteUserByEmail(e,r={}){try{return await xe(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:ta})}catch(n){if(he(n))return{data:{user:null},error:n};throw n}}async generateLink(e){try{const{options:r}=e,n=_h(e,["options"]),i=Object.assign(Object.assign({},n),r);return"newEmail"in n&&(i.new_email=n==null?void 0:n.newEmail,delete i.newEmail),await xe(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:i,headers:this.headers,xform:Zz,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(he(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(e){try{return await xe(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:ta})}catch(r){if(he(r))return{data:{user:null},error:r};throw r}}async listUsers(e){var r,n,i,a,s,u,c;try{const f={nextPage:null,lastPage:0,total:0},p=await xe(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=e==null?void 0:e.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(a=(i=e==null?void 0:e.perPage)===null||i===void 0?void 0:i.toString())!==null&&a!==void 0?a:""},xform:aE});if(p.error)throw p.error;const h=await p.json(),g=(s=p.headers.get("x-total-count"))!==null&&s!==void 0?s:0,v=(c=(u=p.headers.get("link"))===null||u===void 0?void 0:u.split(","))!==null&&c!==void 0?c:[];return v.length>0&&(v.forEach(b=>{const x=parseInt(b.split(";")[0].split("=")[1].substring(0,1)),y=JSON.parse(b.split(";")[1].split("=")[1]);f[`${y}Page`]=x}),f.total=parseInt(g)),{data:Object.assign(Object.assign({},h),f),error:null}}catch(f){if(he(f))return{data:{users:[]},error:f};throw f}}async getUserById(e){ni(e);try{return await xe(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:ta})}catch(r){if(he(r))return{data:{user:null},error:r};throw r}}async updateUserById(e,r){ni(e);try{return await xe(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:r,headers:this.headers,xform:ta})}catch(n){if(he(n))return{data:{user:null},error:n};throw n}}async deleteUser(e,r=!1){ni(e);try{return await xe(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:r},xform:ta})}catch(n){if(he(n))return{data:{user:null},error:n};throw n}}async _listFactors(e){ni(e.userId);try{const{data:r,error:n}=await xe(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:i=>({data:{factors:i},error:null})});return{data:r,error:n}}catch(r){if(he(r))return{data:null,error:r};throw r}}async _deleteFactor(e){ni(e.userId),ni(e.id);try{return{data:await xe(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(r){if(he(r))return{data:null,error:r};throw r}}async _listOAuthClients(e){var r,n,i,a,s,u,c;try{const f={nextPage:null,lastPage:0,total:0},p=await xe(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=e==null?void 0:e.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(a=(i=e==null?void 0:e.perPage)===null||i===void 0?void 0:i.toString())!==null&&a!==void 0?a:""},xform:aE});if(p.error)throw p.error;const h=await p.json(),g=(s=p.headers.get("x-total-count"))!==null&&s!==void 0?s:0,v=(c=(u=p.headers.get("link"))===null||u===void 0?void 0:u.split(","))!==null&&c!==void 0?c:[];return v.length>0&&(v.forEach(b=>{const x=parseInt(b.split(";")[0].split("=")[1].substring(0,1)),y=JSON.parse(b.split(";")[1].split("=")[1]);f[`${y}Page`]=x}),f.total=parseInt(g)),{data:Object.assign(Object.assign({},h),f),error:null}}catch(f){if(he(f))return{data:{clients:[]},error:f};throw f}}async _createOAuthClient(e){try{return await xe(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(he(r))return{data:null,error:r};throw r}}async _getOAuthClient(e){try{const r=this._encodePathSegment(e);return await xe(this.fetch,"GET",`${this.url}/admin/oauth/clients/${r}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(r){if(he(r))return{data:null,error:r};throw r}}async _updateOAuthClient(e,r){try{const n=this._encodePathSegment(e);return await xe(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${n}`,{body:r,headers:this.headers,xform:i=>({data:i,error:null})})}catch(n){if(he(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(e){try{const r=this._encodePathSegment(e);return await xe(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${r}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(he(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(e){try{const r=this._encodePathSegment(e);return await xe(this.fetch,"POST",`${this.url}/admin/oauth/clients/${r}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(r){if(he(r))return{data:null,error:r};throw r}}async _listCustomProviders(e){try{const r={};return e!=null&&e.type&&(r.type=e.type),await xe(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:r,xform:n=>{var i;return{data:{providers:(i=n==null?void 0:n.providers)!==null&&i!==void 0?i:[]},error:null}}})}catch(r){if(he(r))return{data:{providers:[]},error:r};throw r}}async _createCustomProvider(e){try{return await xe(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:e,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(he(r))return{data:null,error:r};throw r}}async _getCustomProvider(e){try{const r=this._encodePathSegment(e);return await xe(this.fetch,"GET",`${this.url}/admin/custom-providers/${r}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(r){if(he(r))return{data:null,error:r};throw r}}async _updateCustomProvider(e,r){try{const n=this._encodePathSegment(e);return await xe(this.fetch,"PUT",`${this.url}/admin/custom-providers/${n}`,{body:r,headers:this.headers,xform:i=>({data:i,error:null})})}catch(n){if(he(n))return{data:null,error:n};throw n}}async _deleteCustomProvider(e){try{const r=this._encodePathSegment(e);return await xe(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${r}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(he(r))return{data:null,error:r};throw r}}async _adminListPasskeys(e){gn(this.experimental),ni(e.userId);try{return await xe(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/passkeys`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(he(r))return{data:null,error:r};throw r}}async _adminDeletePasskey(e){gn(this.experimental),ni(e.userId),ni(e.passkeyId);try{return await xe(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/passkeys/${e.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(he(r))return{data:null,error:r};throw r}}}function oE(t={}){return{getItem:e=>t[e]||null,setItem:(e,r)=>{t[e]=r},removeItem:e=>{delete t[e]}}}const In={debug:!!(globalThis&&MR()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class DR extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class sE extends DR{}async function rq(t,e,r){In.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",t,e);const n=new globalThis.AbortController;let i;e>0&&(i=setTimeout(()=>{n.abort(),In.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",t)},e)),await Promise.resolve();try{return await globalThis.navigator.locks.request(t,e===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async a=>{if(a){clearTimeout(i),In.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",t,a.name);try{return await r()}finally{In.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",t,a.name)}}else{if(e===0)throw In.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",t),new sE(`Acquiring an exclusive Navigator LockManager lock "${t}" immediately failed`);if(In.debug)try{const s=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(s,null," "))}catch(s){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",s)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),clearTimeout(i),await r()}})}catch(a){if(e>0&&clearTimeout(i),a!==null&&typeof a=="object"&&"name"in a&&a.name==="AbortError"&&e>0){if(n.signal.aborted)return In.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",t),console.warn(`@supabase/gotrue-js: Lock "${t}" was not released within ${e}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(t,{mode:"exclusive",steal:!0},async s=>{if(s){In.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",t,s.name);try{return await r()}finally{In.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",t,s.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await r()}));throw In.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",t),new sE(`Lock "${t}" was released because another request stole it`)}throw a}}function nq(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function BR(t){if(!/^0x[a-fA-F0-9]{40}$/.test(t))throw new Error(`@supabase/auth-js: Address "${t}" is invalid.`);return t.toLowerCase()}function iq(t){return parseInt(t,16)}function aq(t){const e=new TextEncoder().encode(t);return"0x"+Array.from(e,n=>n.toString(16).padStart(2,"0")).join("")}function oq(t){var e;const{chainId:r,domain:n,expirationTime:i,issuedAt:a=new Date,nonce:s,notBefore:u,requestId:c,resources:f,scheme:p,uri:h,version:g}=t;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!n)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(s&&s.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${s}`);if(!h)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(g!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${g}`);if(!((e=t.statement)===null||e===void 0)&&e.includes(`
|
|
399
|
-
`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${t.statement}`)}const v=BR(t.address),b=p?`${p}://${n}`:n,x=t.statement?`${t.statement}
|
|
400
|
-
`:"",y=`${b} wants you to sign in with your Ethereum account:
|
|
401
|
-
${v}
|
|
402
|
-
|
|
403
|
-
${x}`;let k=`URI: ${h}
|
|
404
|
-
Version: ${g}
|
|
405
|
-
Chain ID: ${r}${s?`
|
|
406
|
-
Nonce: ${s}`:""}
|
|
407
|
-
Issued At: ${a.toISOString()}`;if(i&&(k+=`
|
|
408
|
-
Expiration Time: ${i.toISOString()}`),u&&(k+=`
|
|
409
|
-
Not Before: ${u.toISOString()}`),c&&(k+=`
|
|
410
|
-
Request ID: ${c}`),f){let O=`
|
|
411
|
-
Resources:`;for(const A of f){if(!A||typeof A!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${A}`);O+=`
|
|
412
|
-
- ${A}`}k+=O}return`${y}
|
|
413
|
-
${k}`}class jt extends Error{constructor({message:e,code:r,cause:n,name:i}){var a;super(e,{cause:n}),this.__isWebAuthnError=!0,this.name=(a=i??(n instanceof Error?n.name:void 0))!==null&&a!==void 0?a:"Unknown Error",this.code=r}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class pd extends jt{constructor(e,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:e}),this.name="WebAuthnUnknownError",this.originalError=r}}function sq({error:t,options:e}){var r,n,i;const{publicKey:a}=e;if(!a)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new jt({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else if(t.name==="ConstraintError"){if(((r=a.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new jt({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:t});if(e.mediation==="conditional"&&((n=a.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new jt({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:t});if(((i=a.authenticatorSelection)===null||i===void 0?void 0:i.userVerification)==="required")return new jt({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:t})}else{if(t.name==="InvalidStateError")return new jt({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:t});if(t.name==="NotAllowedError")return new jt({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="NotSupportedError")return a.pubKeyCredParams.filter(u=>u.type==="public-key").length===0?new jt({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:t}):new jt({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:t});if(t.name==="SecurityError"){const s=window.location.hostname;if(zR(s)){if(a.rp.id!==s)return new jt({message:`The RP ID "${a.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new jt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="TypeError"){if(a.user.id.byteLength<1||a.user.id.byteLength>64)return new jt({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:t})}else if(t.name==="UnknownError")return new jt({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new jt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}function lq({error:t,options:e}){const{publicKey:r}=e;if(!r)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new jt({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new jt({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const n=window.location.hostname;if(zR(n)){if(r.rpId!==n)return new jt({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new jt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new jt({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new jt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}class uq{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){const e=new Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}}const Nb=new uq;function lE(t){if(!t)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(t);const{challenge:e,user:r,excludeCredentials:n}=t,i=_h(t,["challenge","user","excludeCredentials"]),a=es(e).buffer,s=Object.assign(Object.assign({},r),{id:es(r.id).buffer}),u=Object.assign(Object.assign({},i),{challenge:a,user:s});if(n&&n.length>0){u.excludeCredentials=new Array(n.length);for(let c=0;c<n.length;c++){const f=n[c];u.excludeCredentials[c]=Object.assign(Object.assign({},f),{id:es(f.id).buffer,type:f.type||"public-key",transports:f.transports})}}return u}function uE(t){if(!t)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(t);const{challenge:e,allowCredentials:r}=t,n=_h(t,["challenge","allowCredentials"]),i=es(e).buffer,a=Object.assign(Object.assign({},n),{challenge:i});if(r&&r.length>0){a.allowCredentials=new Array(r.length);for(let s=0;s<r.length;s++){const u=r[s];a.allowCredentials[s]=Object.assign(Object.assign({},u),{id:es(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return a}function cE(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const r=t;return{id:t.id,rawId:t.id,response:{attestationObject:Ua(new Uint8Array(t.response.attestationObject)),clientDataJSON:Ua(new Uint8Array(t.response.clientDataJSON))},type:"public-key",clientExtensionResults:t.getClientExtensionResults(),authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function fE(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const r=t,n=t.getClientExtensionResults(),i=t.response;return{id:t.id,rawId:t.id,response:{authenticatorData:Ua(new Uint8Array(i.authenticatorData)),clientDataJSON:Ua(new Uint8Array(i.clientDataJSON)),signature:Ua(new Uint8Array(i.signature)),userHandle:i.userHandle?Ua(new Uint8Array(i.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function zR(t){return t==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)}function md(){var t,e;return!!(Zt()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.create)=="function"&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.get)=="function")}async function qR(t){try{const e=await navigator.credentials.create(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new pd("Browser returned unexpected credential type",e)}:{data:null,error:new pd("Empty credential response",e)}}catch(e){return{data:null,error:sq({error:e,options:t})}}}async function UR(t){try{const e=await navigator.credentials.get(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new pd("Browser returned unexpected credential type",e)}:{data:null,error:new pd("Empty credential response",e)}}catch(e){return{data:null,error:lq({error:e,options:t})}}}const cq={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},fq={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function gd(...t){const e=i=>i!==null&&typeof i=="object"&&!Array.isArray(i),r=i=>i instanceof ArrayBuffer||ArrayBuffer.isView(i),n={};for(const i of t)if(i)for(const a in i){const s=i[a];if(s!==void 0)if(Array.isArray(s))n[a]=s;else if(r(s))n[a]=s;else if(e(s)){const u=n[a];e(u)?n[a]=gd(u,s):n[a]=gd(s)}else n[a]=s}return n}function dq(t,e){return gd(cq,t,e||{})}function hq(t,e){return gd(fq,t,e||{})}class pq{constructor(e){this.client=e,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:"webauthn"}))}async _challenge({factorId:e,webauthn:r,friendlyName:n,signal:i},a){var s;try{const{data:u,error:c}=await this.client.mfa.challenge({factorId:e,webauthn:r});if(!u)return{data:null,error:c};const f=i??Nb.createNewAbortSignal();if(u.webauthn.type==="create"){const{user:p}=u.webauthn.credential_options.publicKey;if(!p.name){const h=n;if(h)p.name=`${p.id}:${h}`;else{const v=(await this.client.getUser()).data.user,b=((s=v==null?void 0:v.user_metadata)===null||s===void 0?void 0:s.name)||(v==null?void 0:v.email)||(v==null?void 0:v.id)||"User";p.name=`${p.id}:${b}`}}p.displayName||(p.displayName=p.name)}switch(u.webauthn.type){case"create":{const p=dq(u.webauthn.credential_options.publicKey,a==null?void 0:a.create),{data:h,error:g}=await qR({publicKey:p,signal:f});return h?{data:{factorId:e,challengeId:u.id,webauthn:{type:u.webauthn.type,credential_response:h}},error:null}:{data:null,error:g}}case"request":{const p=hq(u.webauthn.credential_options.publicKey,a==null?void 0:a.request),{data:h,error:g}=await UR(Object.assign(Object.assign({},u.webauthn.credential_options),{publicKey:p,signal:f}));return h?{data:{factorId:e,challengeId:u.id,webauthn:{type:u.webauthn.type,credential_response:h}},error:null}:{data:null,error:g}}}}catch(u){return he(u)?{data:null,error:u}:{data:null,error:new _n("Unexpected error in challenge",u)}}}async _verify({challengeId:e,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:e,webauthn:n})}async _authenticate({factorId:e,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:i}={}},a){if(!r)return{data:null,error:new ss("rpId is required for WebAuthn authentication")};try{if(!md())return{data:null,error:new _n("Browser does not support WebAuthn",null)};const{data:s,error:u}=await this.challenge({factorId:e,webauthn:{rpId:r,rpOrigins:n},signal:i},{request:a});if(!s)return{data:null,error:u};const{webauthn:c}=s;return this._verify({factorId:e,challengeId:s.challengeId,webauthn:{type:c.type,rpId:r,rpOrigins:n,credential_response:c.credential_response}})}catch(s){return he(s)?{data:null,error:s}:{data:null,error:new _n("Unexpected error in authenticate",s)}}}async _register({friendlyName:e,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:i}={}},a){if(!r)return{data:null,error:new ss("rpId is required for WebAuthn registration")};try{if(!md())return{data:null,error:new _n("Browser does not support WebAuthn",null)};const{data:s,error:u}=await this._enroll({friendlyName:e});if(!s)return await this.client.mfa.listFactors().then(p=>{var h;return(h=p.data)===null||h===void 0?void 0:h.all.find(g=>g.factor_type==="webauthn"&&g.friendly_name===e&&g.status!=="unverified")}).then(p=>p?this.client.mfa.unenroll({factorId:p==null?void 0:p.id}):void 0),{data:null,error:u};const{data:c,error:f}=await this._challenge({factorId:s.id,friendlyName:s.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:i},{create:a});return c?this._verify({factorId:s.id,challengeId:c.challengeId,webauthn:{rpId:r,rpOrigins:n,type:c.webauthn.type,credential_response:c.webauthn.credential_response}}):{data:null,error:f}}catch(s){return he(s)?{data:null,error:s}:{data:null,error:new _n("Unexpected error in register",s)}}}}nq();const mq={url:bz,storageKey:wz,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:xz,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}};async function dE(t,e,r){return await r()}const zo={};class gu{get jwks(){var e,r;return(r=(e=zo[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(e){zo[this.storageKey]=Object.assign(Object.assign({},zo[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,r;return(r=(e=zo[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){zo[this.storageKey]=Object.assign(Object.assign({},zo[this.storageKey]),{cachedAt:e})}constructor(e){var r,n,i,a;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const s=Object.assign(Object.assign({},mq),e);if(this.storageKey=s.storageKey,this.instanceID=(r=gu.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,gu.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!s.debug,typeof s.debug=="function"&&(this.logger=s.debug),this.instanceID>0&&Zt()){const u=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(u),this.logDebugMessages&&console.trace(u)}if(this.persistSession=s.persistSession,this.autoRefreshToken=s.autoRefreshToken,this.experimental=(n=s.experimental)!==null&&n!==void 0?n:{},this.admin=new tq({url:s.url,headers:s.headers,fetch:s.fetch,experimental:this.experimental}),this.url=s.url,this.headers=s.headers,this.fetch=LR(s.fetch),this.lock=s.lock||dE,this.detectSessionInUrl=s.detectSessionInUrl,this.flowType=s.flowType,this.hasCustomAuthorizationHeader=s.hasCustomAuthorizationHeader,this.throwOnError=s.throwOnError,this.lockAcquireTimeout=s.lockAcquireTimeout,s.lock?this.lock=s.lock:this.persistSession&&Zt()&&(!((i=globalThis==null?void 0:globalThis.navigator)===null||i===void 0)&&i.locks)?this.lock=rq:this.lock=dE,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new pq(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(s.storage?this.storage=s.storage:MR()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=oE(this.memoryStorage)),s.userStorage&&(this.userStorage=s.userStorage)):(this.memoryStorage={},this.storage=oE(this.memoryStorage)),Zt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(u){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",u)}(a=this.broadcastChannel)===null||a===void 0||a.addEventListener("message",async u=>{this._debug("received broadcast notification from other tab or client",u);try{await this._notifyAllSubscribers(u.data.event,u.data.session,!1)}catch(c){this._debug("#broadcastChannel","error",c)}})}s.skipAutoInitialize||this.initialize().catch(u=>{this._debug("#initialize()","error",u)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${NR}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var e;try{let r={},n="none";if(Zt()&&(r=Iz(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),Zt()&&this.detectSessionInUrl&&n!=="none"){const{data:i,error:a}=await this._getSessionFromURL(r,n);if(a){if(this._debug("#_initialize()","error detecting session from URL",a),Oz(a)){const c=(e=a.details)===null||e===void 0?void 0:e.code;if(c==="identity_already_exists"||c==="identity_not_found"||c==="single_identity_not_deletable")return{error:a}}return{error:a}}const{session:s,redirectType:u}=i;return this._debug("#_initialize()","detected session in URL",s,"redirect type",u),await this._saveSession(s),setTimeout(async()=>{u==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",s):await this._notifyAllSubscribers("SIGNED_IN",s)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return he(r)?this._returnResult({error:r}):this._returnResult({error:new _n("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var r,n,i;try{const a=await xe(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(i=e==null?void 0:e.options)===null||i===void 0?void 0:i.captchaToken}},xform:Zr}),{data:s,error:u}=a;if(u||!s)return this._returnResult({data:{user:null,session:null},error:u});const c=s.session,f=s.user;return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:f,session:c},error:null})}catch(a){if(he(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async signUp(e){var r,n,i;try{let a;if("email"in e){const{email:p,password:h,options:g}=e;let v=null,b=null;this.flowType==="pkce"&&([v,b]=await Bo(this.storage,this.storageKey)),a=await xe(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:g==null?void 0:g.emailRedirectTo,body:{email:p,password:h,data:(r=g==null?void 0:g.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:g==null?void 0:g.captchaToken},code_challenge:v,code_challenge_method:b},xform:Zr})}else if("phone"in e){const{phone:p,password:h,options:g}=e;a=await xe(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:p,password:h,data:(n=g==null?void 0:g.data)!==null&&n!==void 0?n:{},channel:(i=g==null?void 0:g.channel)!==null&&i!==void 0?i:"sms",gotrue_meta_security:{captcha_token:g==null?void 0:g.captchaToken}},xform:Zr})}else throw new Cf("You must provide either an email or phone number and a password");const{data:s,error:u}=a;if(u||!s)return await Qt(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:u});const c=s.session,f=s.user;return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:f,session:c},error:null})}catch(a){if(await Qt(this.storage,`${this.storageKey}-code-verifier`),he(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async signInWithPassword(e){try{let r;if("email"in e){const{email:a,password:s,options:u}=e;r=await xe(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:a,password:s,gotrue_meta_security:{captcha_token:u==null?void 0:u.captchaToken}},xform:iE})}else if("phone"in e){const{phone:a,password:s,options:u}=e;r=await xe(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:a,password:s,gotrue_meta_security:{captcha_token:u==null?void 0:u.captchaToken}},xform:iE})}else throw new Cf("You must provide either an email or phone number and a password");const{data:n,error:i}=r;if(i)return this._returnResult({data:{user:null,session:null},error:i});if(!n||!n.session||!n.user){const a=new Do;return this._returnResult({data:{user:null,session:null},error:a})}return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:i})}catch(r){if(he(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(e){var r,n,i,a;return await this._handleProviderSignIn(e.provider,{redirectTo:(r=e.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=e.options)===null||n===void 0?void 0:n.scopes,queryParams:(i=e.options)===null||i===void 0?void 0:i.queryParams,skipBrowserRedirect:(a=e.options)===null||a===void 0?void 0:a.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e))}async signInWithWeb3(e){const{chain:r}=e;switch(r){case"ethereum":return await this.signInWithEthereum(e);case"solana":return await this.signInWithSolana(e);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(e){var r,n,i,a,s,u,c,f,p,h,g;let v,b;if("message"in e)v=e.message,b=e.signature;else{const{chain:x,wallet:y,statement:k,options:O}=e;let A;if(Zt())if(typeof y=="object")A=y;else{const L=window;if("ethereum"in L&&typeof L.ethereum=="object"&&"request"in L.ethereum&&typeof L.ethereum.request=="function")A=L.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof y!="object"||!(O!=null&&O.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");A=y}const T=new URL((r=O==null?void 0:O.url)!==null&&r!==void 0?r:window.location.href),E=await A.request({method:"eth_requestAccounts"}).then(L=>L).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!E||E.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const P=BR(E[0]);let C=(n=O==null?void 0:O.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!C){const L=await A.request({method:"eth_chainId"});C=iq(L)}const N={domain:T.host,address:P,statement:k,uri:T.href,version:"1",chainId:C,nonce:(i=O==null?void 0:O.signInWithEthereum)===null||i===void 0?void 0:i.nonce,issuedAt:(s=(a=O==null?void 0:O.signInWithEthereum)===null||a===void 0?void 0:a.issuedAt)!==null&&s!==void 0?s:new Date,expirationTime:(u=O==null?void 0:O.signInWithEthereum)===null||u===void 0?void 0:u.expirationTime,notBefore:(c=O==null?void 0:O.signInWithEthereum)===null||c===void 0?void 0:c.notBefore,requestId:(f=O==null?void 0:O.signInWithEthereum)===null||f===void 0?void 0:f.requestId,resources:(p=O==null?void 0:O.signInWithEthereum)===null||p===void 0?void 0:p.resources};v=oq(N),b=await A.request({method:"personal_sign",params:[aq(v),P]})}try{const{data:x,error:y}=await xe(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:v,signature:b},!((h=e.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(g=e.options)===null||g===void 0?void 0:g.captchaToken}}:null),xform:Zr});if(y)throw y;if(!x||!x.session||!x.user){const k=new Do;return this._returnResult({data:{user:null,session:null},error:k})}return x.session&&(await this._saveSession(x.session),await this._notifyAllSubscribers("SIGNED_IN",x.session)),this._returnResult({data:Object.assign({},x),error:y})}catch(x){if(he(x))return this._returnResult({data:{user:null,session:null},error:x});throw x}}async signInWithSolana(e){var r,n,i,a,s,u,c,f,p,h,g,v;let b,x;if("message"in e)b=e.message,x=e.signature;else{const{chain:y,wallet:k,statement:O,options:A}=e;let T;if(Zt())if(typeof k=="object")T=k;else{const P=window;if("solana"in P&&typeof P.solana=="object"&&("signIn"in P.solana&&typeof P.solana.signIn=="function"||"signMessage"in P.solana&&typeof P.solana.signMessage=="function"))T=P.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof k!="object"||!(A!=null&&A.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");T=k}const E=new URL((r=A==null?void 0:A.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in T&&T.signIn){const P=await T.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},A==null?void 0:A.signInWithSolana),{version:"1",domain:E.host,uri:E.href}),O?{statement:O}:null));let C;if(Array.isArray(P)&&P[0]&&typeof P[0]=="object")C=P[0];else if(P&&typeof P=="object"&&"signedMessage"in P&&"signature"in P)C=P;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in C&&"signature"in C&&(typeof C.signedMessage=="string"||C.signedMessage instanceof Uint8Array)&&C.signature instanceof Uint8Array)b=typeof C.signedMessage=="string"?C.signedMessage:new TextDecoder().decode(C.signedMessage),x=C.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in T)||typeof T.signMessage!="function"||!("publicKey"in T)||typeof T!="object"||!T.publicKey||!("toBase58"in T.publicKey)||typeof T.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");b=[`${E.host} wants you to sign in with your Solana account:`,T.publicKey.toBase58(),...O?["",O,""]:[""],"Version: 1",`URI: ${E.href}`,`Issued At: ${(i=(n=A==null?void 0:A.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&i!==void 0?i:new Date().toISOString()}`,...!((a=A==null?void 0:A.signInWithSolana)===null||a===void 0)&&a.notBefore?[`Not Before: ${A.signInWithSolana.notBefore}`]:[],...!((s=A==null?void 0:A.signInWithSolana)===null||s===void 0)&&s.expirationTime?[`Expiration Time: ${A.signInWithSolana.expirationTime}`]:[],...!((u=A==null?void 0:A.signInWithSolana)===null||u===void 0)&&u.chainId?[`Chain ID: ${A.signInWithSolana.chainId}`]:[],...!((c=A==null?void 0:A.signInWithSolana)===null||c===void 0)&&c.nonce?[`Nonce: ${A.signInWithSolana.nonce}`]:[],...!((f=A==null?void 0:A.signInWithSolana)===null||f===void 0)&&f.requestId?[`Request ID: ${A.signInWithSolana.requestId}`]:[],...!((h=(p=A==null?void 0:A.signInWithSolana)===null||p===void 0?void 0:p.resources)===null||h===void 0)&&h.length?["Resources",...A.signInWithSolana.resources.map(C=>`- ${C}`)]:[]].join(`
|
|
414
|
-
`);const P=await T.signMessage(new TextEncoder().encode(b),"utf8");if(!P||!(P instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");x=P}}try{const{data:y,error:k}=await xe(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:b,signature:Ua(x)},!((g=e.options)===null||g===void 0)&&g.captchaToken?{gotrue_meta_security:{captcha_token:(v=e.options)===null||v===void 0?void 0:v.captchaToken}}:null),xform:Zr});if(k)throw k;if(!y||!y.session||!y.user){const O=new Do;return this._returnResult({data:{user:null,session:null},error:O})}return y.session&&(await this._saveSession(y.session),await this._notifyAllSubscribers("SIGNED_IN",y.session)),this._returnResult({data:Object.assign({},y),error:k})}catch(y){if(he(y))return this._returnResult({data:{user:null,session:null},error:y});throw y}}async _exchangeCodeForSession(e){const r=await Na(this.storage,`${this.storageKey}-code-verifier`),[n,i]=(r??"").split("/");try{if(!n&&this.flowType==="pkce")throw new Az;const{data:a,error:s}=await xe(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:n},xform:Zr});if(await Qt(this.storage,`${this.storageKey}-code-verifier`),s)throw s;if(!a||!a.session||!a.user){const u=new Do;return this._returnResult({data:{user:null,session:null,redirectType:null},error:u})}return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers(i==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",a.session)),this._returnResult({data:Object.assign(Object.assign({},a),{redirectType:i??null}),error:s})}catch(a){if(await Qt(this.storage,`${this.storageKey}-code-verifier`),he(a))return this._returnResult({data:{user:null,session:null,redirectType:null},error:a});throw a}}async signInWithIdToken(e){try{const{options:r,provider:n,token:i,access_token:a,nonce:s}=e,u=await xe(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:i,access_token:a,nonce:s,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:Zr}),{data:c,error:f}=u;if(f)return this._returnResult({data:{user:null,session:null},error:f});if(!c||!c.session||!c.user){const p=new Do;return this._returnResult({data:{user:null,session:null},error:p})}return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",c.session)),this._returnResult({data:c,error:f})}catch(r){if(he(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(e){var r,n,i,a,s;try{if("email"in e){const{email:u,options:c}=e;let f=null,p=null;this.flowType==="pkce"&&([f,p]=await Bo(this.storage,this.storageKey));const{error:h}=await xe(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:u,data:(r=c==null?void 0:c.data)!==null&&r!==void 0?r:{},create_user:(n=c==null?void 0:c.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},code_challenge:f,code_challenge_method:p},redirectTo:c==null?void 0:c.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:h})}if("phone"in e){const{phone:u,options:c}=e,{data:f,error:p}=await xe(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:u,data:(i=c==null?void 0:c.data)!==null&&i!==void 0?i:{},create_user:(a=c==null?void 0:c.shouldCreateUser)!==null&&a!==void 0?a:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},channel:(s=c==null?void 0:c.channel)!==null&&s!==void 0?s:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:f==null?void 0:f.message_id},error:p})}throw new Cf("You must provide either an email or phone number.")}catch(u){if(await Qt(this.storage,`${this.storageKey}-code-verifier`),he(u))return this._returnResult({data:{user:null,session:null},error:u});throw u}}async verifyOtp(e){var r,n;try{let i,a;"options"in e&&(i=(r=e.options)===null||r===void 0?void 0:r.redirectTo,a=(n=e.options)===null||n===void 0?void 0:n.captchaToken);const{data:s,error:u}=await xe(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:a}}),redirectTo:i,xform:Zr});if(u)throw u;if(!s)throw new Error("An error occurred on token verification.");const c=s.session,f=s.user;return c!=null&&c.access_token&&(await this._saveSession(c),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c)),this._returnResult({data:{user:f,session:c},error:null})}catch(i){if(he(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithSSO(e){var r,n,i,a,s;try{let u=null,c=null;this.flowType==="pkce"&&([u,c]=await Bo(this.storage,this.storageKey));const f=await xe(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(n=(r=e.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((i=e==null?void 0:e.options)===null||i===void 0)&&i.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:u,code_challenge_method:c}),headers:this.headers,xform:Qz});return!((a=f.data)===null||a===void 0)&&a.url&&Zt()&&!(!((s=e.options)===null||s===void 0)&&s.skipBrowserRedirect)&&window.location.assign(f.data.url),this._returnResult(f)}catch(u){if(await Qt(this.storage,`${this.storageKey}-code-verifier`),he(u))return this._returnResult({data:null,error:u});throw u}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;if(n)throw n;if(!r)throw new Wt;const{error:i}=await xe(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:i})})}catch(e){if(he(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){try{const r=`${this.url}/resend`;if("email"in e){const{email:n,type:i,options:a}=e,{error:s}=await xe(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},redirectTo:a==null?void 0:a.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:s})}else if("phone"in e){const{phone:n,type:i,options:a}=e,{data:s,error:u}=await xe(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:s==null?void 0:s.message_id},error:u})}throw new Cf("You must provide either an email or phone number and a type")}catch(r){if(he(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async r=>r))}async _acquireLock(e,r){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),i=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await i}catch{}})()),i}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){const i=[...this.pendingInLock];await Promise.all(i),this.pendingInLock.splice(0,i.length)}return await n}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await e(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let e=null;const r=await Na(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?e=r:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!e)return{data:{session:null},error:null};const n=e.expires_at?e.expires_at*1e3-Date.now()<ig:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",e.expires_at),!n){if(this.userStorage){const s=await Na(this.userStorage,this.storageKey+"-user");s!=null&&s.user?e.user=s.user:e.user=og()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){const s={value:this.suppressGetSessionWarning};e.user=Gz(e.user,s),s.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}const{data:i,error:a}=await this._callRefreshToken(e.refresh_token);return a?this._returnResult({data:{session:null},error:a}):this._returnResult({data:{session:i},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;const r=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(e){try{return e?await xe(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:ta}):await this._useSession(async r=>{var n,i,a;const{data:s,error:u}=r;if(u)throw u;return!(!((n=s.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Wt}:await xe(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(a=(i=s.session)===null||i===void 0?void 0:i.access_token)!==null&&a!==void 0?a:void 0,xform:ta})})}catch(r){if(he(r))return jf(r)&&(await this._removeSession(),await Qt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(e,r={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,r))}async _updateUser(e,r={}){try{return await this._useSession(async n=>{const{data:i,error:a}=n;if(a)throw a;if(!i.session)throw new Wt;const s=i.session;let u=null,c=null;this.flowType==="pkce"&&e.email!=null&&([u,c]=await Bo(this.storage,this.storageKey));const{data:f,error:p}=await xe(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:u,code_challenge_method:c}),jwt:s.access_token,xform:ta});if(p)throw p;return s.user=f.user,await this._saveSession(s),await this._notifyAllSubscribers("USER_UPDATED",s),this._returnResult({data:{user:s.user},error:null})})}catch(n){if(await Qt(this.storage,`${this.storageKey}-code-verifier`),he(n))return this._returnResult({data:{user:null},error:n});throw n}}async setSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new Wt;const r=Date.now()/1e3;let n=r,i=!0,a=null;const{payload:s}=Nf(e.access_token);if(s.exp&&(n=s.exp,i=n<=r),i){const{data:u,error:c}=await this._callRefreshToken(e.refresh_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!u)return{data:{user:null,session:null},error:null};a=u}else{const{data:u,error:c}=await this._getUser(e.access_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});a={access_token:e.access_token,refresh_token:e.refresh_token,user:u.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(a),await this._notifyAllSubscribers("SIGNED_IN",a)}return this._returnResult({data:{user:a.user,session:a},error:null})}catch(r){if(he(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async r=>{var n;if(!e){const{data:s,error:u}=r;if(u)throw u;e=(n=s.session)!==null&&n!==void 0?n:void 0}if(!(e!=null&&e.refresh_token))throw new Wt;const{data:i,error:a}=await this._callRefreshToken(e.refresh_token);return a?this._returnResult({data:{user:null,session:null},error:a}):i?this._returnResult({data:{user:i.user,session:i},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(he(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(e,r){var n;try{if(!Zt())throw new Rf("No browser detected.");if(e.error||e.error_description||e.error_code)throw new Rf(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new Jk("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Rf("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new Jk("No code detected.");const{data:A,error:T}=await this._exchangeCodeForSession(e.code);if(T)throw T;const E=new URL(window.location.href);return E.searchParams.delete("code"),window.history.replaceState(window.history.state,"",E.toString()),{data:{session:A.session,redirectType:(n=A.redirectType)!==null&&n!==void 0?n:null},error:null}}const{provider_token:i,provider_refresh_token:a,access_token:s,refresh_token:u,expires_in:c,expires_at:f,token_type:p}=e;if(!s||!c||!u||!p)throw new Rf("No session defined in URL");const h=Math.round(Date.now()/1e3),g=parseInt(c);let v=h+g;f&&(v=parseInt(f));const b=v-h;b*1e3<=Wo&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${b}s, should have been closer to ${g}s`);const x=v-g;h-x>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",x,v,h):h-x<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",x,v,h);const{data:y,error:k}=await this._getUser(s);if(k)throw k;const O={provider_token:i,provider_refresh_token:a,access_token:s,expires_in:g,expires_at:v,refresh_token:u,token_type:p,user:y.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:O,redirectType:e.type},error:null})}catch(i){if(he(i))return this._returnResult({data:{session:null,redirectType:null},error:i});throw i}}_isImplicitGrantCallback(e){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),e):!!(e.access_token||e.error_description)}async _isPKCECallback(e){const r=await Na(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&r)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:i,error:a}=r;if(a&&!jf(a))return this._returnResult({error:a});const s=(n=i.session)===null||n===void 0?void 0:n.access_token;if(s){const{error:u}=await this.admin.signOut(s,e);if(u&&!(Ez(u)&&(u.status===404||u.status===401||u.status===403)||jf(u)))return this._returnResult({error:u})}return e!=="others"&&(await this._removeSession(),await Qt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(e){const r=$z(),n={id:r,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:n}}}async _emitInitialSession(e){return await this._useSession(async r=>{var n,i;try{const{data:{session:a},error:s}=r;if(s)throw s;await((n=this.stateChangeEmitters.get(e))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",a)),this._debug("INITIAL_SESSION","callback id",e,"session",a)}catch(a){await((i=this.stateChangeEmitters.get(e))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",a),jf(a)?console.warn(a):console.error(a)}})}async resetPasswordForEmail(e,r={}){let n=null,i=null;this.flowType==="pkce"&&([n,i]=await Bo(this.storage,this.storageKey,!0));try{return await xe(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:n,code_challenge_method:i,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(a){if(await Qt(this.storage,`${this.storageKey}-code-verifier`),he(a))return this._returnResult({data:null,error:a});throw a}}async getUserIdentities(){var e;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return this._returnResult({data:{identities:(e=r.user.identities)!==null&&e!==void 0?e:[]},error:null})}catch(r){if(he(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(e){return"token"in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){var r;try{const{data:n,error:i}=await this._useSession(async a=>{var s,u,c,f,p;const{data:h,error:g}=a;if(g)throw g;const v=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(s=e.options)===null||s===void 0?void 0:s.redirectTo,scopes:(u=e.options)===null||u===void 0?void 0:u.scopes,queryParams:(c=e.options)===null||c===void 0?void 0:c.queryParams,skipBrowserRedirect:!0});return await xe(this.fetch,"GET",v,{headers:this.headers,jwt:(p=(f=h.session)===null||f===void 0?void 0:f.access_token)!==null&&p!==void 0?p:void 0})});if(i)throw i;return Zt()&&!(!((r=e.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),this._returnResult({data:{provider:e.provider,url:n==null?void 0:n.url},error:null})}catch(n){if(he(n))return this._returnResult({data:{provider:e.provider,url:null},error:n});throw n}}async linkIdentityIdToken(e){return await this._useSession(async r=>{var n;try{const{error:i,data:{session:a}}=r;if(i)throw i;const{options:s,provider:u,token:c,access_token:f,nonce:p}=e,h=await xe(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(n=a==null?void 0:a.access_token)!==null&&n!==void 0?n:void 0,body:{provider:u,id_token:c,access_token:f,nonce:p,link_identity:!0,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}},xform:Zr}),{data:g,error:v}=h;return v?this._returnResult({data:{user:null,session:null},error:v}):!g||!g.session||!g.user?this._returnResult({data:{user:null,session:null},error:new Do}):(g.session&&(await this._saveSession(g.session),await this._notifyAllSubscribers("USER_UPDATED",g.session)),this._returnResult({data:g,error:v}))}catch(i){if(await Qt(this.storage,`${this.storageKey}-code-verifier`),he(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}})}async unlinkIdentity(e){try{return await this._useSession(async r=>{var n,i;const{data:a,error:s}=r;if(s)throw s;return await xe(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(i=(n=a.session)===null||n===void 0?void 0:n.access_token)!==null&&i!==void 0?i:void 0})})}catch(r){if(he(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(e){const r=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(r,"begin");try{const n=Date.now();return await Dz(async i=>(i>0&&await Lz(200*Math.pow(2,i-1)),this._debug(r,"refreshing attempt",i),await xe(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:Zr})),(i,a)=>{const s=200*Math.pow(2,i);return a&&ag(a)&&Date.now()+s-n<Wo})}catch(n){if(this._debug(r,"error",n),he(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}finally{this._debug(r,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",r,"url",n),Zt()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:e,url:n},error:null}}async _recoverAndRefresh(){var e,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const i=await Na(this.storage,this.storageKey);if(i&&this.userStorage){let s=await Na(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!s&&(s={user:i.user},await Ko(this.userStorage,this.storageKey+"-user",s)),i.user=(e=s==null?void 0:s.user)!==null&&e!==void 0?e:og()}else if(i&&!i.user&&!i.user){const s=await Na(this.storage,this.storageKey+"-user");s&&(s!=null&&s.user)?(i.user=s.user,await Qt(this.storage,this.storageKey+"-user"),await Ko(this.storage,this.storageKey,i)):i.user=og()}if(this._debug(n,"session from storage",i),!this._isValidSession(i)){this._debug(n,"session is not valid"),i!==null&&await this._removeSession();return}const a=((r=i.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<ig;if(this._debug(n,`session has${a?"":" not"} expired with margin of ${ig}s`),a){if(this.autoRefreshToken&&i.refresh_token){const{error:s}=await this._callRefreshToken(i.refresh_token);s&&(console.error(s),ag(s)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",s),await this._removeSession()))}}else if(i.user&&i.user.__isUserNotAvailableProxy===!0)try{const{data:s,error:u}=await this._getUser(i.access_token);!u&&(s!=null&&s.user)?(i.user=s.user,await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(s){console.error("Error getting user data:",s),this._debug(n,"error getting user data, skipping SIGNED_IN notification",s)}else await this._notifyAllSubscribers("SIGNED_IN",i)}catch(i){this._debug(n,"error",i),console.error(i);return}finally{this._debug(n,"end")}}async _callRefreshToken(e){var r,n;if(!e)throw new Wt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const i=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(i,"begin");try{this.refreshingDeferred=new Eh;const{data:a,error:s}=await this._refreshAccessToken(e);if(s)throw s;if(!a.session)throw new Wt;await this._saveSession(a.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",a.session);const u={data:a.session,error:null};return this.refreshingDeferred.resolve(u),u}catch(a){if(this._debug(i,"error",a),he(a)){const s={data:null,error:a};return ag(a)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(s),s}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(a),a}finally{this.refreshingDeferred=null,this._debug(i,"end")}}async _notifyAllSubscribers(e,r,n=!0){const i=`#_notifyAllSubscribers(${e})`;this._debug(i,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:e,session:r});const a=[],s=Array.from(this.stateChangeEmitters.values()).map(async u=>{try{await u.callback(e,r)}catch(c){a.push(c)}});if(await Promise.all(s),a.length>0){for(let u=0;u<a.length;u+=1)console.error(a[u]);throw a[0]}}finally{this._debug(i,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0,await Qt(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},e),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await Ko(this.userStorage,this.storageKey+"-user",{user:r.user});const i=Object.assign({},r);delete i.user;const a=rE(i);await Ko(this.storage,this.storageKey,a)}else{const i=rE(r);await Ko(this.storage,this.storageKey,i)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Qt(this.storage,this.storageKey),await Qt(this.storage,this.storageKey+"-code-verifier"),await Qt(this.storage,this.storageKey+"-user"),this.userStorage&&await Qt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&Zt()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),Wo);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e);const r=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=r,r&&typeof r=="object"&&typeof r.unref=="function"?r.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(r)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);const r=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,r&&clearTimeout(r)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const e=Date.now();try{return await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const i=Math.floor((n.expires_at*1e3-e)/Wo);this._debug("#_autoRefreshTokenTick()",`access token expires in ${i} ticks, a tick lasts ${Wo}ms, refresh threshold is ${Tb} ticks`),i<=Tb&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e instanceof DR)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Zt()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(e){this._debug("#visibilityChangedCallback","error",e)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const r=`#_onVisibilityChanged(${e})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,r,n){const i=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&i.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&i.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[a,s]=await Bo(this.storage,this.storageKey),u=new URLSearchParams({code_challenge:`${encodeURIComponent(a)}`,code_challenge_method:`${encodeURIComponent(s)}`});i.push(u.toString())}if(n!=null&&n.queryParams){const a=new URLSearchParams(n.queryParams);i.push(a.toString())}return n!=null&&n.skipBrowserRedirect&&i.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${e}?${i.join("&")}`}async _unenroll(e){try{return await this._useSession(async r=>{var n;const{data:i,error:a}=r;return a?this._returnResult({data:null,error:a}):await xe(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(he(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(e){try{return await this._useSession(async r=>{var n,i;const{data:a,error:s}=r;if(s)return this._returnResult({data:null,error:s});const u=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:e.factorType==="totp"?{issuer:e.issuer}:{}),{data:c,error:f}=await xe(this.fetch,"POST",`${this.url}/factors`,{body:u,headers:this.headers,jwt:(n=a==null?void 0:a.session)===null||n===void 0?void 0:n.access_token});return f?this._returnResult({data:null,error:f}):(e.factorType==="totp"&&c.type==="totp"&&(!((i=c==null?void 0:c.totp)===null||i===void 0)&&i.qr_code)&&(c.totp.qr_code=`data:image/svg+xml;utf-8,${c.totp.qr_code}`),this._returnResult({data:c,error:null}))})}catch(r){if(he(r))return this._returnResult({data:null,error:r});throw r}}async _verify(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:i,error:a}=r;if(a)return this._returnResult({data:null,error:a});const s=Object.assign({challenge_id:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type==="create"?cE(e.webauthn.credential_response):fE(e.webauthn.credential_response)})}:{code:e.code}),{data:u,error:c}=await xe(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:s,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});return c?this._returnResult({data:null,error:c}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+u.expires_in},u)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",u),this._returnResult({data:u,error:c}))})}catch(r){if(he(r))return this._returnResult({data:null,error:r});throw r}})}async _challenge(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:i,error:a}=r;if(a)return this._returnResult({data:null,error:a});const s=await xe(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});if(s.error)return s;const{data:u}=s;if(u.type!=="webauthn")return{data:u,error:null};switch(u.webauthn.type){case"create":return{data:Object.assign(Object.assign({},u),{webauthn:Object.assign(Object.assign({},u.webauthn),{credential_options:Object.assign(Object.assign({},u.webauthn.credential_options),{publicKey:lE(u.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},u),{webauthn:Object.assign(Object.assign({},u.webauthn),{credential_options:Object.assign(Object.assign({},u.webauthn.credential_options),{publicKey:uE(u.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(he(r))return this._returnResult({data:null,error:r});throw r}})}async _challengeAndVerify(e){const{data:r,error:n}=await this._challenge({factorId:e.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:e.factorId,challengeId:r.id,code:e.code})}async _listFactors(){var e;const{data:{user:r},error:n}=await this.getUser();if(n)return{data:null,error:n};const i={all:[],phone:[],totp:[],webauthn:[]};for(const a of(e=r==null?void 0:r.factors)!==null&&e!==void 0?e:[])i.all.push(a),a.status==="verified"&&i[a.factor_type].push(a);return{data:i,error:null}}async _getAuthenticatorAssuranceLevel(e){var r,n,i,a;if(e)try{const{payload:v}=Nf(e);let b=null;v.aal&&(b=v.aal);let x=b;const{data:{user:y},error:k}=await this.getUser(e);if(k)return this._returnResult({data:null,error:k});((n=(r=y==null?void 0:y.factors)===null||r===void 0?void 0:r.filter(T=>T.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(x="aal2");const A=v.amr||[];return{data:{currentLevel:b,nextLevel:x,currentAuthenticationMethods:A},error:null}}catch(v){if(he(v))return this._returnResult({data:null,error:v});throw v}const{data:{session:s},error:u}=await this.getSession();if(u)return this._returnResult({data:null,error:u});if(!s)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:c}=Nf(s.access_token);let f=null;c.aal&&(f=c.aal);let p=f;((a=(i=s.user.factors)===null||i===void 0?void 0:i.filter(v=>v.status==="verified"))!==null&&a!==void 0?a:[]).length>0&&(p="aal2");const g=c.amr||[];return{data:{currentLevel:f,nextLevel:p,currentAuthenticationMethods:g},error:null}}async _getAuthorizationDetails(e){try{return await this._useSession(async r=>{const{data:{session:n},error:i}=r;return i?this._returnResult({data:null,error:i}):n?await xe(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:n.access_token,xform:a=>({data:a,error:null})}):this._returnResult({data:null,error:new Wt})})}catch(r){if(he(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(e,r){try{return await this._useSession(async n=>{const{data:{session:i},error:a}=n;if(a)return this._returnResult({data:null,error:a});if(!i)return this._returnResult({data:null,error:new Wt});const s=await xe(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:i.access_token,body:{action:"approve"},xform:u=>({data:u,error:null})});return s.data&&s.data.redirect_url&&Zt()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(s.data.redirect_url),s})}catch(n){if(he(n))return this._returnResult({data:null,error:n});throw n}}async _denyAuthorization(e,r){try{return await this._useSession(async n=>{const{data:{session:i},error:a}=n;if(a)return this._returnResult({data:null,error:a});if(!i)return this._returnResult({data:null,error:new Wt});const s=await xe(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:i.access_token,body:{action:"deny"},xform:u=>({data:u,error:null})});return s.data&&s.data.redirect_url&&Zt()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(s.data.redirect_url),s})}catch(n){if(he(n))return this._returnResult({data:null,error:n});throw n}}async _listOAuthGrants(){try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;return n?this._returnResult({data:null,error:n}):r?await xe(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new Wt})})}catch(e){if(he(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async r=>{const{data:{session:n},error:i}=r;return i?this._returnResult({data:null,error:i}):n?(await xe(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Wt})})}catch(r){if(he(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(e,r={keys:[]}){let n=r.keys.find(u=>u.kid===e);if(n)return n;const i=Date.now();if(n=this.jwks.keys.find(u=>u.kid===e),n&&this.jwks_cached_at+Sz>i)return n;const{data:a,error:s}=await xe(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(s)throw s;return!a.keys||a.keys.length===0||(this.jwks=a,this.jwks_cached_at=i,n=a.keys.find(u=>u.kid===e),!n)?null:n}async getClaims(e,r={}){try{let n=e;if(!n){const{data:v,error:b}=await this.getSession();if(b||!v.session)return this._returnResult({data:null,error:b});n=v.session.access_token}const{header:i,payload:a,signature:s,raw:{header:u,payload:c}}=Nf(n);r!=null&&r.allowExpired||Wz(a.exp);const f=!i.alg||i.alg.startsWith("HS")||!i.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(i.kid,r!=null&&r.keys?{keys:r.keys}:r==null?void 0:r.jwks);if(!f){const{error:v}=await this.getUser(n);if(v)throw v;return{data:{claims:a,header:i,signature:s},error:null}}const p=Kz(i.alg),h=await crypto.subtle.importKey("jwk",f,p,!0,["verify"]);if(!await crypto.subtle.verify(p,h,s,Rz(`${u}.${c}`)))throw new Rb("Invalid JWT signature");return{data:{claims:a,header:i,signature:s},error:null}}catch(n){if(he(n))return this._returnResult({data:null,error:n});throw n}}async signInWithPasskey(e){var r,n,i;gn(this.experimental);try{if(!md())return this._returnResult({data:null,error:new _n("Browser does not support WebAuthn",null)});const{data:a,error:s}=await this._startPasskeyAuthentication({options:{captchaToken:(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.captchaToken}});if(s||!a)return this._returnResult({data:null,error:s});const u=uE(a.options),c=(i=(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.signal)!==null&&i!==void 0?i:Nb.createNewAbortSignal(),{data:f,error:p}=await UR({publicKey:u,signal:c});if(p||!f)return this._returnResult({data:null,error:p??new _n("WebAuthn ceremony failed",null)});const h=fE(f);return this._verifyPasskeyAuthentication({challengeId:a.challenge_id,credential:h})}catch(a){if(he(a))return this._returnResult({data:null,error:a});throw a}}async registerPasskey(e){var r,n;gn(this.experimental);try{if(!md())return this._returnResult({data:null,error:new _n("Browser does not support WebAuthn",null)});const{data:i,error:a}=await this._startPasskeyRegistration();if(a||!i)return this._returnResult({data:null,error:a});const s=lE(i.options),u=(n=(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.signal)!==null&&n!==void 0?n:Nb.createNewAbortSignal(),{data:c,error:f}=await qR({publicKey:s,signal:u});if(f||!c)return this._returnResult({data:null,error:f??new _n("WebAuthn ceremony failed",null)});const p=cE(c);return this._verifyPasskeyRegistration({challengeId:i.challenge_id,credential:p})}catch(i){if(he(i))return this._returnResult({data:null,error:i});throw i}}async _startPasskeyRegistration(){gn(this.experimental);try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;if(n)return this._returnResult({data:null,error:n});if(!r)return this._returnResult({data:null,error:new Wt});const{data:i,error:a}=await xe(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:r.access_token,body:{}});return a?this._returnResult({data:null,error:a}):this._returnResult({data:i,error:null})})}catch(e){if(he(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyRegistration(e){gn(this.experimental);try{return await this._useSession(async r=>{const{data:{session:n},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!n)return this._returnResult({data:null,error:new Wt});const{data:a,error:s}=await xe(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:n.access_token,body:{challenge_id:e.challengeId,credential:e.credential}});return s?this._returnResult({data:null,error:s}):this._returnResult({data:a,error:null})})}catch(r){if(he(r))return this._returnResult({data:null,error:r});throw r}}async _startPasskeyAuthentication(e){var r;gn(this.experimental);try{const{data:n,error:i}=await xe(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.captchaToken}}});return i?this._returnResult({data:null,error:i}):this._returnResult({data:n,error:null})}catch(n){if(he(n))return this._returnResult({data:null,error:n});throw n}}async _verifyPasskeyAuthentication(e){gn(this.experimental);try{const{data:r,error:n}=await xe(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:e.challengeId,credential:e.credential},xform:Zr});return n?this._returnResult({data:null,error:n}):(r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:r,error:null}))}catch(r){if(he(r))return this._returnResult({data:null,error:r});throw r}}async _listPasskeys(){gn(this.experimental);try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;if(n)return this._returnResult({data:null,error:n});if(!r)return this._returnResult({data:null,error:new Wt});const{data:i,error:a}=await xe(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:r.access_token,xform:s=>({data:s,error:null})});return a?this._returnResult({data:null,error:a}):this._returnResult({data:i,error:null})})}catch(e){if(he(e))return this._returnResult({data:null,error:e});throw e}}async _updatePasskey(e){gn(this.experimental);try{return await this._useSession(async r=>{const{data:{session:n},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!n)return this._returnResult({data:null,error:new Wt});const{data:a,error:s}=await xe(this.fetch,"PATCH",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:n.access_token,body:{friendly_name:e.friendlyName}});return s?this._returnResult({data:null,error:s}):this._returnResult({data:a,error:null})})}catch(r){if(he(r))return this._returnResult({data:null,error:r});throw r}}async _deletePasskey(e){gn(this.experimental);try{return await this._useSession(async r=>{const{data:{session:n},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!n)return this._returnResult({data:null,error:new Wt});const{error:a}=await xe(this.fetch,"DELETE",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:n.access_token,noResolveJson:!0});return a?this._returnResult({data:null,error:a}):this._returnResult({data:null,error:null})})}catch(r){if(he(r))return this._returnResult({data:null,error:r});throw r}}}gu.nextInstanceID={};const gq=gu,vq="2.106.2";let Ql="";typeof Deno<"u"?Ql="deno":typeof document<"u"?Ql="web":typeof navigator<"u"&&navigator.product==="ReactNative"?Ql="react-native":Ql="node";const yq={"X-Client-Info":`supabase-js-${Ql}/${vq}`},bq={headers:yq},wq={schema:"public"},xq={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},_q={},Sq={enabled:!1,respectSamplingDecision:!0};function kq(t,e,r,n){function i(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function u(p){try{f(n.next(p))}catch(h){s(h)}}function c(p){try{f(n.throw(p))}catch(h){s(h)}}function f(p){p.done?a(p.value):i(p.value).then(u,c)}f((n=n.apply(t,[])).next())})}let lg=null;const Eq="@opentelemetry/api";function Oq(){return lg===null&&(lg=import(Eq).catch(()=>null)),lg}function Aq(){return kq(this,void 0,void 0,function*(){try{const t=yield Oq();if(!t||!t.propagation||!t.context)return null;const e={};t.propagation.inject(t.context.active(),e);const r=e.traceparent;return r?{traceparent:r,tracestate:e.tracestate,baggage:e.baggage}:null}catch{return null}})}function Pq(t){if(!t||typeof t!="string")return null;const e=t.split("-");if(e.length!==4)return null;const[r,n,i,a]=e;if(r.length!==2||n.length!==32||i.length!==16||a.length!==2)return null;const s=/^[0-9a-f]+$/i;return!s.test(r)||!s.test(n)||!s.test(i)||!s.test(a)||n==="00000000000000000000000000000000"||i==="0000000000000000"?null:{version:r,traceId:n,parentId:i,traceFlags:a,isSampled:(parseInt(a,16)&1)===1}}function Tq(t,e){if(!t||!e||e.length===0)return!1;let r;if(t instanceof URL)r=t;else try{r=new URL(t)}catch{return!1}for(const n of e)try{if(typeof n=="string"){if(jq(r.hostname,n))return!0}else if(n instanceof RegExp){if(n.test(r.hostname))return!0}else if(typeof n=="function"&&n(r))return!0}catch{continue}return!1}function jq(t,e){if(e===t)return!0;if(e.startsWith("*.")){const r=e.slice(2);if(t.endsWith(r)&&(t===r||t.endsWith("."+r)))return!0}return!1}function Cq(t){const e=[];try{const r=new URL(t);e.push(r.hostname)}catch{}return e.push("*.supabase.co","*.supabase.in"),e.push("localhost","127.0.0.1","[::1]"),e}function vu(t){"@babel/helpers - typeof";return vu=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},vu(t)}function Rq(t,e){if(vu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(vu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Nq(t){var e=Rq(t,"string");return vu(e)=="symbol"?e:e+""}function $q(t,e,r){return(e=Nq(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function hE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function xt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?hE(Object(r),!0).forEach(function(n){$q(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):hE(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}const Iq=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),Mq=()=>Headers,Lq=(t,e,r,n,i)=>{const a=Iq(n),s=Mq(),u=(i==null?void 0:i.enabled)===!0,c=(i==null?void 0:i.respectSamplingDecision)!==!1,f=u?Cq(e):null;return async(p,h)=>{var g;const v=(g=await r())!==null&&g!==void 0?g:t;let b=new s(h==null?void 0:h.headers);if(b.has("apikey")||b.set("apikey",t),b.has("Authorization")||b.set("Authorization",`Bearer ${v}`),f){const x=await Dq(p,f,c);x&&(x.traceparent&&!b.has("traceparent")&&b.set("traceparent",x.traceparent),x.tracestate&&!b.has("tracestate")&&b.set("tracestate",x.tracestate),x.baggage&&!b.has("baggage")&&b.set("baggage",x.baggage))}return a(p,xt(xt({},h),{},{headers:b}))}};async function Dq(t,e,r){if(!Tq(typeof t=="string"||t instanceof URL?t:t.url,e))return null;const n=await Aq();if(!n||!n.traceparent)return null;if(r){const i=Pq(n.traceparent);if(i&&!i.isSampled)return null}return n}function pE(t){return typeof t=="boolean"?{enabled:t}:t}function Bq(t){return t.endsWith("/")?t:t+"/"}function zq(t,e){var r,n,i,a,s,u;const{db:c,auth:f,realtime:p,global:h}=t,{db:g,auth:v,realtime:b,global:x}=e,y=pE(t.tracePropagation),k=pE(e.tracePropagation),O={db:xt(xt({},g),c),auth:xt(xt({},v),f),realtime:xt(xt({},b),p),storage:{},global:xt(xt(xt({},x),h),{},{headers:xt(xt({},(r=x==null?void 0:x.headers)!==null&&r!==void 0?r:{}),(n=h==null?void 0:h.headers)!==null&&n!==void 0?n:{})}),tracePropagation:{enabled:(i=(a=y==null?void 0:y.enabled)!==null&&a!==void 0?a:k==null?void 0:k.enabled)!==null&&i!==void 0?i:!1,respectSamplingDecision:(s=(u=y==null?void 0:y.respectSamplingDecision)!==null&&u!==void 0?u:k==null?void 0:k.respectSamplingDecision)!==null&&s!==void 0?s:!0},accessToken:async()=>""};return t.accessToken?O.accessToken=t.accessToken:delete O.accessToken,O}function qq(t){const e=t==null?void 0:t.trim();if(!e)throw new Error("supabaseUrl is required.");if(!e.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(Bq(e))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var Uq=class extends gq{constructor(t){super(t)}},Fq=class{constructor(t,e,r){var n,i;this.supabaseUrl=t,this.supabaseKey=e;const a=qq(t);if(!e)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",a),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",a),this.storageUrl=new URL("storage/v1",a),this.functionsUrl=new URL("functions/v1",a);const s=`sb-${a.hostname.split(".")[0]}-auth-token`,u={db:wq,realtime:_q,auth:xt(xt({},xq),{},{storageKey:s}),global:bq,tracePropagation:Sq},c=zq(r??{},u);if(this.settings=c,this.storageKey=(n=c.auth.storageKey)!==null&&n!==void 0?n:"",this.headers=(i=c.global.headers)!==null&&i!==void 0?i:{},c.accessToken)this.accessToken=c.accessToken,this.auth=new Proxy({},{get:(p,h)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(h)} is not possible`)}});else{var f;this.auth=this._initSupabaseAuthClient((f=c.auth)!==null&&f!==void 0?f:{},this.headers,c.global.fetch)}this.fetch=Lq(e,t,this._getAccessToken.bind(this),c.global.fetch,c.tracePropagation),this.realtime=this._initRealtimeClient(xt({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},c.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(p=>this.realtime.setAuth(p)).catch(p=>console.warn("Failed to set initial Realtime auth token:",p)),this.rest=new a6(new URL("rest/v1",a).href,{headers:this.headers,schema:c.db.schema,fetch:this.fetch,timeout:c.db.timeout,urlLengthLimit:c.db.urlLengthLimit}),this.storage=new yz(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),c.accessToken||this._listenForAuthEvents()}get functions(){return new XB(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,e={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(t,e,r)}channel(t,e={config:{}}){return this.realtime.channel(t,e)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var t=this,e,r;if(t.accessToken)return await t.accessToken();const{data:n}=await t.auth.getSession();return(e=(r=n.session)===null||r===void 0?void 0:r.access_token)!==null&&e!==void 0?e:t.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:e,detectSessionInUrl:r,storage:n,userStorage:i,storageKey:a,flowType:s,lock:u,debug:c,throwOnError:f,experimental:p,lockAcquireTimeout:h,skipAutoInitialize:g},v,b){const x={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new Uq({url:this.authUrl.href,headers:xt(xt({},x),v),storageKey:a,autoRefreshToken:t,persistSession:e,detectSessionInUrl:r,storage:n,userStorage:i,flowType:s,lock:u,debug:c,throwOnError:f,experimental:p,fetch:b,lockAcquireTimeout:h,skipAutoInitialize:g,hasCustomAuthorizationHeader:Object.keys(this.headers).some(y=>y.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new q6(this.realtimeUrl.href,xt(xt({},t),{},{params:xt(xt({},{apikey:this.supabaseKey}),t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((t,e)=>{this._handleTokenChanged(t,"CLIENT",e==null?void 0:e.access_token)})}_handleTokenChanged(t,e,r){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):t==="SIGNED_OUT"&&(this.realtime.setAuth(),e=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const Hq=(t,e,r)=>new Fq(t,e,r);function Wq(){if(typeof window<"u")return!1;const t=globalThis.process;if(!t)return!1;const e=t.version;if(e==null)return!1;const r=e.match(/^v(\d+)\./);return r?parseInt(r[1],10)<=18:!1}Wq()&&console.warn("⚠️ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const FR=R.createContext({session:null,supabase:null,loading:!0,signIn:async()=>({error:"Not initialized"}),signOut:async()=>{}});function Oh(){return R.useContext(FR)}function Kq({children:t}){const[e,r]=R.useState(null),[n,i]=R.useState(null),[a,s]=R.useState(!0),u=R.useRef(null);R.useEffect(()=>{o8(()=>{var p;return((p=u.current)==null?void 0:p.access_token)??null})},[]),R.useEffect(()=>{Ye.get("/config").then(({config:p})=>{if(p.supabase.projectUrl&&p.supabase.anonKey){const h=Hq(p.supabase.projectUrl,p.supabase.anonKey);r(h),h.auth.getSession().then(({data:v})=>{u.current=v.session,i(v.session),s(!1)});const{data:{subscription:g}}=h.auth.onAuthStateChange((v,b)=>{u.current=b,i(b)});return()=>g.unsubscribe()}s(!1)}).catch(()=>{s(!1)})},[]);async function c(p,h){if(!e)return{error:"Supabase not configured"};const{error:g}=await e.auth.signInWithPassword({email:p,password:h});return{error:(g==null?void 0:g.message)??null}}async function f(){e&&(await e.auth.signOut(),u.current=null,i(null))}return _.jsx(FR.Provider,{value:{session:n,supabase:e,loading:a,signIn:c,signOut:f},children:t})}const Vq=[{to:"/squads",icon:VC,label:"Squads"},{to:"/skills",icon:id,label:"Skills"},{to:"/schedules",icon:U4,label:"Schedules"},{to:"/wiki",icon:DC,label:"Wiki"},{to:"/usage",icon:H4,label:"Usage"}],Gq=[{to:"/",icon:C5,label:"Chat"},{to:"/feed",icon:qC,label:"Inbox"},{to:"/settings",icon:V5,label:"Settings"}];function mE({to:t,icon:e,label:r,collapsed:n}){return _.jsxs(IC,{to:t,end:t==="/",title:n?r:void 0,className:({isActive:i})=>Yl("w-full flex items-center gap-2.5 px-2 py-2 rounded-xl text-[11px] font-mono transition-colors cursor-pointer",n?"justify-center":"",i?"text-[#E43A9C]":"text-zinc-600 hover:text-zinc-300 hover:bg-white/[0.04]"),style:({isActive:i})=>i?{background:"rgba(228,58,156,0.1)"}:void 0,children:[_.jsx(e,{className:"w-3.5 h-3.5 flex-shrink-0"}),!n&&r]})}function Xq(){const[t,e]=R.useState(!1),[r,n]=R.useState("..."),{supabase:i}=Oh();return R.useEffect(()=>{let a=!0;return Ye.get("/version").then(({version:s})=>{a&&n(s)}).catch(()=>{a&&n("unknown")}),()=>{a=!1}},[]),_.jsxs("div",{className:"flex h-screen overflow-hidden bg-background relative",children:[_.jsxs("div",{className:Yl("flex-shrink-0 flex flex-col border-r border-white/[0.06] bg-[#181818] transition-all duration-200",t?"w-[52px]":"w-[210px]"),children:[_.jsx("div",{className:Yl("h-[52px] flex items-center border-b border-white/[0.06] flex-shrink-0",t?"justify-center px-3":"justify-between pl-4 pr-3"),children:t?_.jsx(ra,{height:26}):_.jsxs("div",{className:"flex items-center gap-2.5",children:[_.jsx(ra,{height:26}),_.jsx("span",{className:"text-2xl text-white tracking-wider leading-none",style:{fontFamily:"'Bebas Neue', sans-serif"},children:"IO"})]})}),_.jsx("nav",{className:"flex-1 py-2 px-1.5 space-y-0.5 overflow-y-auto",children:Vq.map(a=>_.jsx(mE,{collapsed:t,...a},a.to))}),_.jsxs("div",{className:"flex-shrink-0 border-t border-white/[0.06]",children:[_.jsx("div",{className:"py-1.5 px-1.5 space-y-0.5",children:Gq.map(a=>_.jsx(mE,{collapsed:t,...a},a.to))}),_.jsxs("div",{className:"border-t border-white/[0.05] py-1.5 px-1.5 space-y-0.5",children:[_.jsxs("a",{href:"https://github.com/michaeljolley/io",target:"_blank",rel:"noreferrer",title:"GitHub",className:Yl("flex items-center gap-2.5 px-2 py-2 rounded-xl text-[11px] font-mono text-zinc-600 hover:text-zinc-300 hover:bg-white/[0.04] transition-colors cursor-pointer",t&&"justify-center"),children:[_.jsx(v5,{className:"w-3.5 h-3.5 flex-shrink-0"}),!t&&_.jsxs("span",{className:"text-zinc-700",children:["v",r]})]}),_.jsx("button",{type:"button",onClick:()=>e(!t),title:t?"Expand sidebar":"Collapse sidebar",className:Yl("w-full flex items-center gap-2.5 px-2 py-2 rounded-xl text-[11px] font-mono text-zinc-600 hover:text-zinc-300 hover:bg-white/[0.04] transition-colors cursor-pointer",t&&"justify-center"),children:t?_.jsx(BC,{className:"w-3.5 h-3.5 flex-shrink-0"}):_.jsx(dx,{className:"w-3.5 h-3.5 flex-shrink-0"})})]})]})]}),_.jsxs("div",{className:"flex flex-col flex-1 min-w-0 overflow-hidden",children:[_.jsxs("div",{className:"h-[52px] flex-shrink-0 flex items-center justify-between px-4 border-b border-white/[0.06] bg-[#181818]",children:[_.jsxs("div",{className:"flex items-center gap-2",children:[_.jsx(FB,{status:"connected"}),_.jsx("span",{className:"text-[11px] font-mono text-green-400",children:"connected"})]}),_.jsxs("div",{className:"flex items-center gap-1.5",children:[_.jsx(i8,{}),i&&_.jsx("button",{type:"button",onClick:()=>i.auth.signOut(),className:"p-2 rounded-xl hover:bg-white/[0.05] text-zinc-600 hover:text-zinc-300 transition-colors cursor-pointer",title:"Sign out",children:_.jsx(S5,{className:"w-3.5 h-3.5"})})]})]}),_.jsxs("main",{className:"flex-1 overflow-hidden flex flex-col min-h-0 relative",children:[_.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",style:{zIndex:0},children:[_.jsx("div",{className:"orb orb-pink"}),_.jsx("div",{className:"orb orb-gray"})]}),_.jsx(yD,{})]})]})]})}function ug(t){return new Date(t).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0,timeZone:"America/Chicago"})}function Yq(){const{session:t}=Oh(),[e,r]=R.useState([]),[n,i]=R.useState(""),[a,s]=R.useState(""),[u,c]=R.useState(!1),[f,p]=R.useState(!1),[h,g]=R.useState(null),[v,b]=R.useState(null),x=R.useRef(null),y=R.useRef(null),k=R.useRef(null);R.useEffect(()=>{Ye.get("/conversations?limit=50").then($=>r($.messages.map(I=>({...I,timestamp:ug(I.timestamp)})))).catch(()=>{})},[]);const O=R.useCallback($=>{p(!1),c(!0),s($)},[]),A=R.useCallback($=>{p(!1),c(!1),s(""),r(I=>[...I,{id:crypto.randomUUID(),role:"assistant",content:$,timestamp:ug(new Date)}])},[]),T=R.useCallback($=>{var I,q,U;$.notification&&GC({id:((I=$.event)==null?void 0:I.id)??crypto.randomUUID(),message:$.notification,timestamp:((q=$.event)==null?void 0:q.timestamp)??new Date().toISOString(),eventType:((U=$.event)==null?void 0:U.type)??"unknown"})},[]),E=R.useCallback(()=>{p(!1),c(!1),s("")},[]),{sendMessage:P}=XC({onDelta:O,onMessage:A,onEvent:T,onError:E});R.useLayoutEffect(()=>{const $=x.current;$&&($.scrollTop=$.scrollHeight)},[e,a,f]);async function C($,I){const q=new FormData;q.append("file",$),q.append("messageId",I);const U=mx();if(!(await fetch("/api/attachments",{method:"POST",body:q,headers:U?{Authorization:`Bearer ${U}`}:void 0})).ok)throw new Error("Failed to upload attachment")}async function N(){const $=n.trim();if(!$&&!h||u||f)return;const I=crypto.randomUUID(),q=h==null?void 0:h.name,U=[$,q?`Attachment: ${q}`:""].filter(Boolean).join(`
|
|
415
|
-
|
|
416
|
-
`);r(K=>[...K,{id:I,role:"user",content:$,timestamp:ug(new Date),attachmentName:q}]),i(""),g(null),p(!0),k.current&&(k.current.value=""),y.current&&(y.current.style.height="auto");try{h&&await C(h,I),P(U)}catch{p(!1)}}function L($){$.key==="Enter"&&!$.shiftKey&&($.preventDefault(),N())}function V($){i($.target.value),y.current&&(y.current.style.height="auto",y.current.style.height=`${Math.min(y.current.scrollHeight,160)}px`)}return _.jsxs("div",{className:"flex flex-col flex-1 min-h-0",children:[_.jsxs("div",{ref:x,className:"flex-1 overflow-y-auto px-5 py-5 space-y-5",children:[e.map($=>{var I,q;return _.jsxs("div",{className:`flex gap-3 ${$.role==="user"?"flex-row-reverse":""}`,children:[_.jsx("div",{className:`flex-shrink-0 w-6 h-6 rounded-lg flex items-center justify-center text-[10px] font-mono mt-0.5 ${$.role==="user"?"border border-[#E43A9C]/30 text-[#E43A9C]":"bg-[#282828] border border-white/[0.07] text-zinc-500"}`,style:$.role==="user"?{background:"rgba(228,58,156,0.12)"}:void 0,children:$.role==="user"?((q=(I=t==null?void 0:t.user)==null?void 0:I.email)==null?void 0:q.charAt(0).toUpperCase())??"U":_.jsx(ra,{height:12})}),_.jsxs("div",{className:`flex flex-col gap-1.5 max-w-[72%] ${$.role==="user"?"items-end":"items-start"}`,children:[$.toolCall&&_.jsxs("button",{type:"button",onClick:()=>b(v===$.id?null:$.id),className:"w-full text-left border border-white/[0.07] bg-[#1e1e1e] rounded-xl px-3 py-2 flex items-center gap-2 hover:border-[#E43A9C]/25 transition-colors",children:[_.jsx(fx,{className:"w-3 h-3 text-[#E43A9C] flex-shrink-0"}),_.jsx("span",{className:"text-[11px] font-mono text-zinc-400 flex-1",children:$.toolCall.name}),_.jsx(tr,{variant:$.toolCall.status==="done"?"success":$.toolCall.status==="error"?"error":"warning",children:$.toolCall.status}),_.jsx(K4,{className:`w-3 h-3 text-zinc-600 transition-transform flex-shrink-0 ${v===$.id?"rotate-180":""}`})]}),$.toolCall&&v===$.id&&_.jsx("div",{className:"w-full bg-[#181818] border border-white/[0.06] rounded-xl px-3 py-2",children:_.jsx("p",{className:"text-[11px] font-mono text-zinc-500",children:$.toolCall.result})}),$.attachmentName&&_.jsx("div",{className:"rounded-xl border border-white/[0.08] bg-[#1e1e1e] px-3 py-2 text-[11px] font-mono text-zinc-400",children:$.attachmentName}),$.content&&_.jsx("div",{className:`rounded-2xl px-4 py-2.5 text-sm leading-relaxed ${$.role==="user"?"text-white rounded-tr-sm":"bg-[#222222] border border-white/[0.07] text-zinc-200 rounded-tl-sm"}`,style:$.role==="user"?{background:"linear-gradient(135deg, #D83333 0%, #C0285E 100%)"}:void 0,children:$.role==="user"?_.jsx("p",{className:"whitespace-pre-wrap",children:$.content}):_.jsx("div",{className:"prose-io",dangerouslySetInnerHTML:{__html:qe.parse($.content)}})}),_.jsx("span",{className:"text-[11px] text-zinc-700 font-mono px-0.5",children:$.timestamp})]})]},$.id)}),f&&_.jsxs("div",{className:"flex gap-3",children:[_.jsx("div",{className:"flex-shrink-0 w-6 h-6 rounded-lg flex items-center justify-center bg-[#282828] border border-white/[0.07] mt-0.5",children:_.jsx(ra,{height:12})}),_.jsx("div",{className:"bg-[#222222] border border-white/[0.07] rounded-2xl rounded-tl-sm px-4 py-3 flex items-center gap-1.5",children:[0,120,240].map($=>_.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-[#E43A9C] animate-bounce",style:{animationDelay:`${$}ms`}},$))})]}),u&&a&&_.jsxs("div",{className:"flex gap-3",children:[_.jsx("div",{className:"flex-shrink-0 w-6 h-6 rounded-lg flex items-center justify-center bg-[#282828] border border-white/[0.07] mt-0.5",children:_.jsx(ra,{height:12})}),_.jsx("div",{className:"bg-[#222222] border border-white/[0.07] rounded-2xl rounded-tl-sm px-4 py-2.5 max-w-[72%]",children:_.jsx("div",{className:"prose-io text-sm",dangerouslySetInnerHTML:{__html:qe.parse(a)}})})]}),u&&!a&&_.jsxs("div",{className:"flex gap-3",children:[_.jsx("div",{className:"flex-shrink-0 w-6 h-6 rounded-lg flex items-center justify-center bg-[#282828] border border-white/[0.07] mt-0.5",children:_.jsx(ra,{height:12})}),_.jsx("div",{className:"bg-[#222222] border border-white/[0.07] rounded-2xl rounded-tl-sm px-4 py-3 flex items-center gap-1.5",children:[0,120,240].map($=>_.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-[#E43A9C] animate-bounce",style:{animationDelay:`${$}ms`}},$))})]})]}),_.jsxs("div",{className:"border-t border-white/[0.06] p-4 flex-shrink-0",children:[_.jsxs("div",{className:"bg-[#1e1e1e] border border-white/[0.08] rounded-2xl overflow-hidden transition-colors focus-within:border-[#E43A9C]/30",children:[_.jsx("input",{ref:k,type:"file",className:"hidden",onChange:$=>{var I;return g(((I=$.target.files)==null?void 0:I[0])??null)}}),h&&_.jsxs("div",{className:"px-4 pt-3 text-[11px] font-mono text-zinc-400",children:["Attached: ",h.name]}),_.jsx("textarea",{ref:y,value:n,onChange:V,onKeyDown:L,placeholder:"Message IO…",rows:1,className:"w-full bg-transparent px-4 pt-3 pb-1 text-sm text-zinc-200 placeholder:text-zinc-700 resize-none focus:outline-none",style:{minHeight:"42px",maxHeight:"160px",fontFamily:"Inter, sans-serif"}}),_.jsxs("div",{className:"flex items-center justify-between px-3 pb-2.5",children:[_.jsx("button",{type:"button",onClick:()=>{var $;return($=k.current)==null?void 0:$.click()},className:"p-1.5 rounded-lg hover:bg-white/[0.05] text-zinc-700 hover:text-zinc-400 transition-colors",children:_.jsx(UC,{className:"w-4 h-4"})}),_.jsx("div",{className:"flex items-center gap-2",children:u?_.jsxs("button",{type:"button",onClick:()=>c(!1),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-zinc-800 hover:bg-zinc-700 text-[11px] font-mono text-zinc-300 transition-colors",children:[_.jsx(KC,{className:"w-3 h-3"})," Stop"]}):_.jsx("button",{type:"button",onClick:N,disabled:!n.trim()&&!h||f,className:"p-2 rounded-xl text-white disabled:opacity-30 disabled:cursor-not-allowed transition-opacity hover:opacity-90",style:{background:"linear-gradient(135deg, #D83333, #E43A9C)"},children:_.jsx(WC,{className:"w-3.5 h-3.5"})})})]})]}),_.jsx("p",{className:"text-center text-[11px] text-zinc-800 font-mono mt-2",children:"IO may make mistakes. Verify important outputs."})]})]})}function Jq(){const[t,e]=R.useState([]),[r,n]=R.useState(null),[i,a]=R.useState("all");R.useEffect(()=>{Ye.get("/inbox").then(f=>e(f.entries)).catch(()=>{})},[]);function s(f){n(f),f.status==="unread"&&Ye.post(`/inbox/${f.id}/read`).then(()=>{e(p=>p.map(h=>h.id===f.id?{...h,status:"read"}:h))}).catch(()=>{})}const u=t.filter(f=>i==="all"||f.status==="unread"),c=t.filter(f=>f.status==="unread").length;return _.jsxs("div",{className:"flex h-full",children:[_.jsxs("div",{className:"w-80 border-r border-white/[0.07] flex flex-col h-full bg-[#181818]",children:[_.jsxs("div",{className:"p-3 border-b border-white/[0.07]",children:[_.jsxs("div",{className:"flex items-center justify-between mb-2",children:[_.jsx("h2",{className:"text-lg tracking-wide text-zinc-100",style:{fontFamily:"'Bebas Neue', sans-serif"},children:"Inbox"}),c>0&&_.jsx(tr,{variant:"default",children:c})]}),_.jsx("div",{className:"flex gap-1 p-1 rounded-xl bg-white/[0.03] border border-white/[0.07]",children:["all","unread"].map(f=>_.jsx("button",{type:"button",onClick:()=>a(f),className:`flex-1 px-2 py-1 rounded-lg text-[11px] font-mono transition-colors ${i===f?"bg-[#E43A9C]/15 text-[#E43A9C]":"text-zinc-600 hover:text-zinc-400"}`,children:f==="all"?"All":"Unread"},f))})]}),_.jsxs("div",{className:"flex-1 overflow-y-auto",children:[u.map(f=>_.jsxs("button",{onClick:()=>s(f),type:"button",className:`w-full text-left px-4 py-3 border-b border-white/[0.05] transition-colors ${(r==null?void 0:r.id)===f.id?"bg-white/[0.06]":"hover:bg-white/[0.03]"} ${f.status==="unread"?"border-l-2 border-l-[#E43A9C]":""}`,children:[_.jsxs("div",{className:"flex items-center gap-2",children:[f.status==="unread"?_.jsx(A5,{size:12,className:"text-[#E43A9C] flex-shrink-0"}):_.jsx(E5,{size:12,className:"text-zinc-700 flex-shrink-0"}),_.jsx("span",{className:"text-[10px] text-zinc-600 font-mono uppercase",children:f.kind})]}),_.jsx("p",{className:`text-sm mt-1 truncate ${f.status==="unread"?"text-zinc-200 font-medium":"text-zinc-400"}`,children:f.title}),_.jsx("p",{className:"text-[10px] text-zinc-700 font-mono mt-0.5",children:new Date(f.createdAt).toLocaleString()})]},f.id)),u.length===0&&_.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[_.jsx(qC,{size:32,className:"text-zinc-800 mb-2"}),_.jsx("p",{className:"text-[11px] font-mono text-zinc-700",children:i==="unread"?"All caught up":"No items yet"})]})]})]}),_.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:r?_.jsxs("div",{children:[_.jsx("h2",{className:"text-lg text-zinc-100 font-medium mb-1",children:r.title}),_.jsxs("p",{className:"text-[11px] text-zinc-600 font-mono mb-5",children:[r.kind," · ",new Date(r.createdAt).toLocaleString()]}),_.jsx("div",{className:"prose-io",dangerouslySetInnerHTML:{__html:qe.parse(r.content)}})]}):_.jsx("div",{className:"h-full flex items-center justify-center",children:_.jsx("p",{className:"text-[11px] font-mono text-zinc-700",children:"Select an item to view details"})})})]})}function Qq(){const{signIn:t}=Oh(),[e,r]=R.useState(""),[n,i]=R.useState(""),[a,s]=R.useState(null),[u,c]=R.useState(!1);async function f(p){p.preventDefault(),s(null),c(!0);const{error:h}=await t(e,n);h&&s(h),c(!1)}return _.jsxs("div",{className:"min-h-screen bg-[#161616] flex items-center justify-center relative overflow-hidden",children:[_.jsx("div",{className:"absolute inset-0 opacity-[0.04]",style:{backgroundImage:"radial-gradient(circle, #E43A9C 1px, transparent 1px)",backgroundSize:"32px 32px"}}),_.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-[60%] w-[400px] h-[300px] rounded-full blur-3xl pointer-events-none",style:{background:"radial-gradient(ellipse, rgba(228,58,156,0.12) 0%, transparent 70%)"}}),_.jsxs("div",{className:"relative z-10 w-full max-w-[360px] mx-4",children:[_.jsxs("div",{className:"flex flex-col items-center mb-8 gap-3",children:[_.jsx(ra,{height:52}),_.jsx("div",{className:"text-center",children:_.jsx("p",{className:"text-[11px] font-mono text-zinc-600 tracking-widest uppercase mt-1",children:"personal ai orchestrator"})})]}),_.jsxs("form",{onSubmit:f,className:"glass-card border border-white/[0.07] rounded-2xl p-6 space-y-4",children:[_.jsxs("div",{className:"space-y-1",children:[_.jsx("label",{className:"text-[11px] font-mono text-zinc-500 block",children:"Email"}),_.jsx("input",{type:"email",value:e,onChange:p=>r(p.target.value),required:!0,className:"w-full bg-[#161616] border border-white/[0.08] rounded-xl px-3 py-2.5 text-sm text-zinc-200 font-mono placeholder:text-zinc-700 focus:outline-none focus:border-[#E43A9C]/40 focus:ring-1 focus:ring-[#E43A9C]/15 transition-colors"})]}),_.jsxs("div",{className:"space-y-1",children:[_.jsx("label",{className:"text-[11px] font-mono text-zinc-500 block",children:"Password"}),_.jsx("input",{type:"password",value:n,onChange:p=>i(p.target.value),required:!0,placeholder:"••••••••",className:"w-full bg-[#161616] border border-white/[0.08] rounded-xl px-3 py-2.5 text-sm text-zinc-200 font-mono placeholder:text-zinc-700 focus:outline-none focus:border-[#E43A9C]/40 focus:ring-1 focus:ring-[#E43A9C]/15 transition-colors"})]}),a&&_.jsx("p",{className:"text-[11px] font-mono text-red-400",children:a}),_.jsx("button",{type:"submit",disabled:u,className:"w-full text-white font-mono text-sm rounded-xl py-3 mt-1 transition-opacity hover:opacity-90 disabled:opacity-50 flex items-center justify-center gap-2",style:{background:"linear-gradient(135deg, #D83333 0%, #E43A9C 55%, #F041FF 100%)"},children:u?_.jsxs(_.Fragment,{children:[_.jsx("span",{className:"w-3.5 h-3.5 border-2 border-white/30 border-t-white rounded-full animate-spin"}),"Authenticating…"]}):"Sign In"})]}),_.jsx("p",{className:"text-center text-[11px] text-zinc-700 font-mono mt-4",children:"Secured by Supabase Auth"})]})]})}const HR="w-full bg-[#161616] border border-white/[0.08] rounded-xl px-3 py-2 text-[11px] text-zinc-300 font-mono placeholder:text-zinc-700 focus:outline-none focus:border-[#E43A9C]/40 focus:ring-1 focus:ring-[#E43A9C]/10 transition-colors",ts="bg-[#161616] border border-white/[0.08] rounded-xl px-3 py-2 text-[11px] text-zinc-300 font-mono placeholder:text-zinc-700 focus:outline-none focus:border-[#E43A9C]/40 focus:ring-1 focus:ring-[#E43A9C]/10 transition-colors";function li({label:t,hint:e,align:r="center",children:n}){const i=r==="start"?"flex-1 min-w-0":"flex-1 flex justify-end items-center";return _.jsxs("div",{className:`glass-card border border-white/[0.07] rounded-2xl px-4 py-3.5 flex gap-4 ${r==="start"?"items-start":"items-center"}`,children:[_.jsxs("div",{className:"w-[140px] shrink-0",children:[_.jsx("span",{className:"text-[11px] font-mono text-zinc-400",children:t}),e&&_.jsxs("span",{className:"text-[10px] font-mono text-zinc-700 ml-1.5",children:["(",e,")"]})]}),_.jsx("div",{className:i,children:n})]})}function Zq({onSave:t,onCancel:e,squads:r}){var b;const[n,i]=R.useState("io"),[a,s]=R.useState(((b=r[0])==null?void 0:b.id)??""),[u,c]=R.useState(""),[f,p]=R.useState(""),[h,g]=R.useState(""),v=()=>{!f.trim()||!h.trim()||!u.trim()||t({name:u.trim(),targetType:n==="io"?"orchestrator":"squad",targetId:n==="squad"?a:void 0,cron:f.trim(),prompt:h.trim()})};return _.jsx("div",{className:"fixed inset-0 z-40 flex items-center justify-center p-6",style:{background:"rgba(0,0,0,0.55)",backdropFilter:"blur(4px)"},children:_.jsxs("div",{className:"glass-card border border-white/[0.09] rounded-2xl w-full max-w-lg shadow-2xl flex flex-col",style:{maxHeight:"90vh"},children:[_.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-white/[0.06] flex-shrink-0",children:[_.jsx("h3",{className:"text-lg tracking-wide text-zinc-100",style:{fontFamily:"'Bebas Neue', sans-serif"},children:"New Schedule"}),_.jsx("button",{type:"button",onClick:e,className:"p-1.5 rounded-lg text-zinc-600 hover:text-zinc-300 hover:bg-white/[0.06] transition-colors cursor-pointer",children:_.jsx(e8,{className:"w-4 h-4"})})]}),_.jsxs("div",{className:"overflow-y-auto flex-1 px-5 py-4 space-y-2",children:[_.jsx(li,{label:"Name",children:_.jsx("input",{value:u,onChange:x=>c(x.target.value),placeholder:"Daily triage",className:`${ts} w-48`})}),_.jsx(li,{label:"Type",children:_.jsx("div",{className:"flex gap-2",children:["io","squad"].map(x=>_.jsx("button",{type:"button",onClick:()=>i(x),className:`px-4 py-1.5 rounded-xl text-[11px] font-mono capitalize transition-colors border cursor-pointer ${n===x?"text-[#E43A9C] border-[#E43A9C]/30":"text-zinc-500 border-white/[0.08] hover:text-zinc-300 hover:bg-white/[0.04]"}`,style:n===x?{background:"rgba(228,58,156,0.08)"}:void 0,children:x==="io"?"IO Schedule":"Squad Schedule"},x))})}),n==="squad"&&_.jsx(li,{label:"Squad",children:_.jsx("select",{value:a,onChange:x=>s(x.target.value),className:`${ts} w-48`,children:r.map(x=>_.jsx("option",{value:x.id,style:{background:"#1a1a1a",color:"#d4d4d8"},children:x.name},x.id))})}),_.jsx(li,{label:"Cron Expression",children:_.jsx("input",{value:f,onChange:x=>p(x.target.value),placeholder:"0 9 * * 1-5",className:`${ts} w-40`})}),_.jsx(li,{label:"Prompt",hint:"supports Markdown",align:"start",children:_.jsx("textarea",{value:h,onChange:x=>g(x.target.value),placeholder:"Describe what IO or the squad should do when this schedule fires.",rows:8,className:`${HR} resize-none leading-relaxed`})})]}),_.jsxs("div",{className:"flex items-center justify-end gap-2 px-5 py-3.5 border-t border-white/[0.06] flex-shrink-0",children:[_.jsx(fi,{onClick:e,children:"Cancel"}),_.jsxs(oa,{onClick:v,className:"px-4 py-1.5",children:[_.jsx(hx,{className:"w-3 h-3"}),"Create Schedule"]})]})]})})}function eU({sched:t,squads:e,onSave:r,onBack:n}){var b,x;const[i,a]=R.useState(t.name),[s,u]=R.useState(t.cron),[c,f]=R.useState(t.prompt),[p,h]=R.useState(t.targetId??((b=e[0])==null?void 0:b.id)??""),g=()=>{!s.trim()||!c.trim()||!i.trim()||r({name:i.trim(),cron:s.trim(),prompt:c.trim(),targetId:t.targetType==="squad"?p:void 0})},v=t.targetType==="orchestrator"?"IO Schedule":`Squad — ${((x=e.find(y=>y.id===t.targetId))==null?void 0:x.name)??"Unknown"}`;return _.jsxs("div",{className:"flex-1 overflow-y-auto p-6 max-w-3xl",children:[_.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[_.jsxs("button",{type:"button",onClick:n,className:"flex items-center gap-1.5 text-[11px] font-mono text-zinc-600 hover:text-zinc-300 transition-colors cursor-pointer",children:[_.jsx(dx,{className:"w-3.5 h-3.5"}),"Schedules"]}),_.jsx("span",{className:"text-zinc-700 text-[11px]",children:"/"}),_.jsx("span",{className:"text-[11px] font-mono text-zinc-400",children:"Edit"})]}),_.jsxs("div",{className:"flex items-start justify-between mb-6",children:[_.jsxs("div",{children:[_.jsx("h2",{className:"text-2xl tracking-wide text-zinc-100",style:{fontFamily:"'Bebas Neue', sans-serif"},children:"Edit Schedule"}),_.jsx("p",{className:"text-[11px] font-mono text-zinc-600 mt-0.5",children:v})]}),_.jsxs("div",{className:"flex items-center gap-2",children:[_.jsx(fi,{onClick:n,children:"Cancel"}),_.jsxs(oa,{onClick:g,className:"px-4 py-1.5",children:[_.jsx(hx,{className:"w-3 h-3"}),"Save Changes"]})]})]}),_.jsxs("div",{className:"space-y-3",children:[_.jsx(li,{label:"Name",children:_.jsx("input",{value:i,onChange:y=>a(y.target.value),placeholder:"Schedule name",className:`${ts} w-48`})}),t.targetType==="squad"&&_.jsx(li,{label:"Squad",children:_.jsx("select",{value:p,onChange:y=>h(y.target.value),className:`${ts} w-48`,children:e.map(y=>_.jsx("option",{value:y.id,style:{background:"#1a1a1a",color:"#d4d4d8"},children:y.name},y.id))})}),_.jsx(li,{label:"Cron Expression",children:_.jsx("input",{value:s,onChange:y=>u(y.target.value),placeholder:"0 9 * * 1-5",className:`${ts} w-40`})}),_.jsx(li,{label:"Prompt",hint:"supports Markdown",align:"start",children:_.jsxs("div",{className:"space-y-1.5",children:[_.jsx("textarea",{value:c,onChange:y=>f(y.target.value),placeholder:"Describe what IO or the squad should do when this schedule fires.",className:`${HR} leading-relaxed resize-y`,style:{minHeight:"360px"}}),_.jsx("p",{className:"text-[10px] font-mono text-zinc-700",children:"Tip: use # headings and - lists to structure multi-step instructions."})]})})]})]})}function tU(){const[t,e]=R.useState("squad"),[r,n]=R.useState([]),[i,a]=R.useState([]),[s,u]=R.useState(!1),[c,f]=R.useState(null);R.useEffect(()=>{p(),h()},[]);function p(){Ye.get("/schedules").then(E=>n(E.schedules)).catch(()=>{})}function h(){Ye.get("/squads").then(E=>a(E.squads)).catch(()=>{})}const g=r.filter(E=>E.targetType==="squad"),v=r.filter(E=>E.targetType==="orchestrator"),b=t==="squad"?g:v;async function x(E){try{await Ye.post("/schedules",E),tt.success("Schedule created"),u(!1),p()}catch(P){tt.error(P instanceof Error?P.message:"Failed to create")}}async function y(E){if(c)try{await Ye.patch(`/schedules/${c.id}`,E),tt.success("Schedule saved"),f(null),p()}catch{tt.error("Failed to save schedule")}}async function k(E,P){try{await Ye.patch(`/schedules/${E}`,{enabled:!P}),p()}catch{tt.error("Failed to toggle schedule")}}async function O(E){try{await Ye.post(`/schedules/${E}/run`,{}),tt.success("Schedule triggered")}catch{tt.success("Schedule triggered")}}async function A(E){try{await Ye.delete(`/schedules/${E}`),tt.success("Schedule deleted"),p()}catch{tt.error("Failed to delete")}}if(c)return _.jsx(eU,{sched:c,squads:i,onSave:y,onBack:()=>f(null)});const T=t==="squad"?["Squad","Schedule","Next Run","Status",""]:["Prompt","Schedule","Next Run","Status",""];return _.jsxs("div",{className:"flex-1 overflow-y-auto p-6",children:[s&&_.jsx(Zq,{onSave:x,onCancel:()=>u(!1),squads:i}),_.jsxs("div",{className:"flex items-center justify-between mb-5",children:[_.jsxs("div",{children:[_.jsx("h2",{className:"text-2xl tracking-wide text-zinc-100",style:{fontFamily:"'Bebas Neue', sans-serif"},children:"Schedules"}),_.jsxs("p",{className:"text-[11px] text-zinc-600 font-mono mt-0.5",children:[r.filter(E=>E.enabled).length," active · ",r.filter(E=>!E.enabled).length," paused"]})]}),_.jsxs(oa,{onClick:()=>u(!0),className:"px-3 py-1.5",children:[_.jsx(FC,{className:"w-3.5 h-3.5"}),"Add Schedule"]})]}),_.jsx("div",{className:"flex gap-1 mb-4",children:[["squad","Squad Schedules"],["io","IO Schedules"]].map(([E,P])=>_.jsx("button",{type:"button",onClick:()=>e(E),className:`px-4 py-2 text-[11px] font-mono rounded-xl transition-colors cursor-pointer ${t===E?"text-[#E43A9C]":"text-zinc-600 hover:text-zinc-300 hover:bg-white/[0.04]"}`,style:t===E?{background:"rgba(228,58,156,0.12)"}:void 0,children:P},E))}),_.jsx("div",{className:"overflow-auto rounded-2xl border border-white/[0.07] glass-card",children:b.length===0?_.jsx("div",{className:"px-4 py-12 text-center text-zinc-600 font-mono text-sm",children:"No schedules for this category"}):_.jsxs("table",{className:"w-full text-[11px] font-mono",children:[_.jsx("thead",{children:_.jsx("tr",{className:"border-b border-white/[0.06]",style:{background:"rgba(20,20,20,0.6)"},children:T.map(E=>_.jsx("th",{className:"text-left px-4 py-2.5 text-zinc-600 font-medium",children:E},E))})}),_.jsx("tbody",{children:b.map(E=>{var P;return _.jsxs("tr",{className:`border-b border-white/[0.04] hover:bg-white/[0.015] transition-colors ${E.enabled?"":"opacity-50"}`,children:[t==="squad"?_.jsx("td",{className:"px-4 py-3",children:_.jsx(HB,{name:((P=i.find(C=>C.id===E.targetId))==null?void 0:P.name)??"Unknown"})}):_.jsx("td",{className:"px-4 py-3 text-zinc-300 max-w-[220px]",children:_.jsx("p",{className:"truncate",children:E.prompt})}),_.jsxs("td",{className:"px-4 py-3",children:[_.jsx("div",{className:"text-zinc-300",children:E.name}),_.jsx("div",{className:"text-zinc-700 text-[10px] mt-0.5",children:E.cron})]}),_.jsx("td",{className:"px-4 py-3 text-zinc-600",children:_.jsxs("span",{className:"flex items-center gap-1",children:[_.jsx(Y4,{className:"w-3 h-3"}),E.enabled&&E.nextRun?new Date(E.nextRun).toLocaleString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0,month:"short",day:"numeric",timeZone:"America/Chicago"}):"—"]})}),_.jsx("td",{className:"px-4 py-3",children:_.jsx(tr,{variant:E.enabled?"success":"muted",children:E.enabled?"active":"paused"})}),_.jsx("td",{className:"px-4 py-3",children:_.jsxs("div",{className:"flex items-center gap-1",children:[_.jsxs(fi,{onClick:()=>O(E.id),children:[_.jsx(B5,{className:"w-3 h-3"}),"Run now"]}),_.jsx(WB,{onClick:()=>k(E.id,E.enabled),children:E.enabled?_.jsxs(_.Fragment,{children:[_.jsx($5,{className:"w-3 h-3"}),"Pause"]}):_.jsxs(_.Fragment,{children:[_.jsx(fx,{className:"w-3 h-3"}),"Resume"]})}),_.jsxs(fi,{onClick:()=>f(E),children:[_.jsx(M5,{className:"w-3 h-3"}),"Edit"]}),_.jsxs(Ax,{onClick:()=>A(E.id),children:[_.jsx(px,{className:"w-3 h-3"}),"Delete"]})]})})]},E.id)})})]})})]})}const rU=[{id:"general",label:"General"},{id:"telegram",label:"Telegram"},{id:"auth",label:"Auth"}],Bs="rounded-xl border border-white/[0.07] bg-white/[0.04] px-3 py-2 text-sm font-mono text-zinc-300 outline-none focus:border-[#E43A9C]/50",gE=`${Bs} w-[72px]`,nU=`${Bs} w-[100px]`,vE=`${Bs} w-[200px]`,yE=`${Bs} w-[320px]`,iU=`${Bs} w-[140px] appearance-none bg-[url('data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%20viewBox%3D%220%200%2012%2012%22%3E%3Cpath%20fill%3D%22%2371717a%22%20d%3D%22M3%204.5L6%208l3-3.5H3z%22%2F%3E%3C%2Fsvg%3E')] bg-[position:right_10px_center] bg-no-repeat pr-8`;function aU(){const[t,e]=R.useState(null),[r,n]=R.useState("general");R.useEffect(()=>{Ye.get("/config").then(s=>e(s.config)).catch(()=>{})},[]);function i(s){t&&e({...t,...s})}async function a(){if(t)try{const{dataDir:s,...u}=t;await Ye.patch("/config",u),tt.success("Settings saved")}catch{tt.error("Failed to save settings")}}return t?_.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:_.jsxs("div",{className:"max-w-3xl",children:[_.jsx("h2",{className:"mb-6 text-2xl tracking-wide text-zinc-100",style:{fontFamily:"'Bebas Neue', sans-serif"},children:"Settings"}),_.jsx("div",{className:"mb-6 flex gap-6 border-b border-white/[0.07]",children:rU.map(s=>_.jsx("button",{type:"button",onClick:()=>n(s.id),className:`-mb-px border-b-2 px-1 pb-3 text-[11px] font-mono transition-colors ${r===s.id?"border-[#E43A9C] text-[#E43A9C]":"border-transparent text-zinc-500 hover:text-zinc-300"}`,children:s.label},s.id))}),_.jsxs("div",{className:"glass-card rounded-2xl border border-white/[0.07] p-5",children:[r==="general"&&_.jsxs(_.Fragment,{children:[_.jsx(pn,{label:"Log Level",children:_.jsx("select",{value:t.logLevel,onChange:s=>i({logLevel:s.target.value}),className:iU,children:["trace","debug","info","warn","error","fatal"].map(s=>_.jsx("option",{value:s,children:s},s))})}),_.jsx(pn,{label:"Default Model",children:_.jsx("input",{type:"text",value:t.defaultModel,onChange:s=>i({defaultModel:s.target.value}),className:vE})}),_.jsx(pn,{label:"Max Instances",children:_.jsx("input",{type:"number",value:t.maxInstancesPerSquad,onChange:s=>i({maxInstancesPerSquad:Number(s.target.value)}),className:gE,min:1,max:10})}),_.jsx(pn,{label:"API Port",children:_.jsx("input",{type:"number",value:t.apiPort,onChange:s=>i({apiPort:Number(s.target.value)}),className:gE})}),_.jsx(pn,{label:"Pricing Refresh (hrs)",children:_.jsx("input",{type:"number",value:t.pricing.refreshIntervalHours,onChange:s=>i({pricing:{refreshIntervalHours:Number(s.target.value)}}),className:nU,min:1})}),_.jsx(pn,{label:"Data Dir",children:_.jsx("input",{type:"text",value:t.dataDir,readOnly:!0,className:`${yE} cursor-default text-zinc-500`})})]}),r==="telegram"&&_.jsxs(_.Fragment,{children:[_.jsx(pn,{label:"Bot Token",children:_.jsx(cg,{value:t.telegram.botToken??"",onChange:s=>i({telegram:{...t.telegram,botToken:s||null}}),size:"lg"})}),_.jsx(pn,{label:"Allowed Chat IDs",children:_.jsx("input",{type:"text",value:t.telegram.allowedChatIds.join(", "),onChange:s=>i({telegram:{...t.telegram,allowedChatIds:s.target.value.split(",").map(u=>Number(u.trim())).filter(u=>!Number.isNaN(u))}}),className:vE})})]}),r==="auth"&&_.jsxs(_.Fragment,{children:[_.jsx(pn,{label:"Project URL",children:_.jsx("input",{type:"text",value:t.supabase.projectUrl??"",onChange:s=>i({supabase:{...t.supabase,projectUrl:s.target.value||null}}),className:yE})}),_.jsx(pn,{label:"Anon Key",children:_.jsx(cg,{value:t.supabase.anonKey??"",onChange:s=>i({supabase:{...t.supabase,anonKey:s||null}}),size:"lg"})}),_.jsx(pn,{label:"JWT Secret",children:_.jsx(cg,{value:t.supabase.jwtSecret??"",onChange:s=>i({supabase:{...t.supabase,jwtSecret:s||null}}),size:"lg"})})]}),_.jsx("div",{className:"flex justify-end pt-6",children:_.jsx(oa,{onClick:a,className:"px-4 py-2.5",children:"Save Settings"})})]})]})}):_.jsx("div",{className:"flex h-full items-center justify-center text-zinc-600",children:"Loading..."})}function pn({label:t,children:e}){return _.jsxs("div",{className:"flex items-center justify-between gap-6 border-b border-white/[0.07] py-3",children:[_.jsx("label",{className:"text-[11px] font-mono text-zinc-400 shrink-0",children:t}),_.jsx("div",{className:"flex justify-end",children:e})]})}function cg({value:t,onChange:e,size:r="lg"}){const[n,i]=R.useState(!1),a=r==="lg"?"w-[320px]":"w-[200px]";return _.jsxs("div",{className:"relative",children:[_.jsx("input",{type:n?"text":"password",value:t,onChange:s=>e(s.target.value),className:`${Bs} ${a} pr-9`}),_.jsx("button",{type:"button",onClick:()=>i(s=>!s),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-zinc-600 transition-colors hover:text-zinc-400","aria-label":n?"Hide value":"Show value",children:n?_.jsx(s5,{size:14}):_.jsx(u5,{size:14})})]})}const oU="linear-gradient(135deg, #D83333 0%, #E43A9C 50%, #F041FF 100%)";qe.use({renderer:{heading({tokens:t,depth:e}){const r=t.map(a=>a.raw).join(""),n=`h${e}`;return`<${n} style="background:${oU};-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;font-size:${{1:"1.35em",2:"1.15em",3:"1em",4:"0.9em"}[e]??"1em"};font-weight:600;margin:1.1em 0 0.4em;">${r}</${n}>`}}});function sU({content:t,className:e=""}){const r=R.useMemo(()=>qe.parse(t),[t]);return _.jsx("div",{className:`prose-io ${e}`,style:{color:"#d4d4d8",fontSize:"0.875rem",lineHeight:"1.7"},dangerouslySetInnerHTML:{__html:r}})}const lU=[{id:"installed",label:"Installed"},{id:"awesome-copilot",label:"Awesome Copilot"},{id:"skillssh",label:"skills.sh"}];function bE(t){return t==="awesome-copilot"?"Awesome Copilot":"skills.sh"}function wE(t){return t?t>=1e6?`${(t/1e6).toFixed(1).replace(/\.0$/,"")}M installs`:t>=1e3?`${(t/1e3).toFixed(1).replace(/\.0$/,"")}K installs`:`${t} installs`:null}function uU(t){const e=t.match(/^---\s*\n([\s\S]*?)\n---\s*\n([\s\S]*)$/);if(!e)return{frontMatter:{},body:t};const r=e[1]??"",n=e[2]??"",i={};let a="",s=null;for(const u of r.split(`
|
|
417
|
-
`)){const c=u.match(/^(\w[\w-]*)\s*:\s*(.*)$/);if(c){a&&s&&(i[a]=s,s=null),a=c[1]??"";const f=(c[2]??"").trim();f===""||f==="[]"?s=[]:f.startsWith("[")&&f.endsWith("]")?i[a]=f.slice(1,-1).split(",").map(p=>p.trim().replace(/^["']|["']$/g,"")):i[a]=f.replace(/^["']|["']$/g,"")}else u.match(/^\s+-\s+(.+)/)&&a&&(s||(s=[]),s.push(u.replace(/^\s+-\s+/,"").trim()))}return a&&s&&(i[a]=s),{frontMatter:i,body:n}}const xE=["name","description","version","author","license","argument_hint","argument-hint","use_when","use-when","enhancements","metadata","tags"];function cU({content:t}){const{frontMatter:e,body:r}=uU(t),n=xE.filter(s=>e[s]!==void 0),i=Object.keys(e).filter(s=>!xE.includes(s)),a=[...n,...i];return _.jsxs("div",{children:[a.length>0&&_.jsxs("div",{className:"border-b border-white/[0.05] pb-4 mb-4",children:[_.jsx("p",{className:"text-[10px] font-mono text-zinc-700 uppercase tracking-wider mb-3",children:"Front Matter"}),_.jsx("div",{className:"space-y-2",children:a.map(s=>{const u=e[s];return u==null||Array.isArray(u)&&u.length===0?null:_.jsxs("div",{className:"flex gap-3 items-start",children:[_.jsx("span",{className:"text-[10px] font-mono text-zinc-600 w-28 flex-shrink-0 pt-0.5",children:s}),_.jsx("div",{className:"flex-1 min-w-0",children:Array.isArray(u)?_.jsx("div",{className:"flex flex-wrap gap-1",children:u.map((c,f)=>_.jsx(tr,{variant:"muted",children:c},f))}):typeof u=="object"?_.jsx("div",{className:"space-y-0.5",children:Object.entries(u).map(([c,f])=>_.jsxs("p",{className:"text-[11px] font-mono text-zinc-400",children:[_.jsxs("span",{className:"text-zinc-600",children:[c,":"]})," ",f]},c))}):s==="use_when"||s==="use-when"?_.jsx("p",{className:"text-[11px] text-zinc-300 leading-relaxed",children:u}):s==="argument_hint"||s==="argument-hint"?_.jsx("code",{className:"text-[11px] font-mono text-[#E43A9C] bg-[#2d1a24] px-1.5 py-0.5 rounded",children:u}):_.jsx("span",{className:"text-[11px] font-mono text-zinc-300",children:u})})]},s)})})]}),r.trim()&&_.jsxs("div",{children:[_.jsx("p",{className:"text-[10px] font-mono text-zinc-700 uppercase tracking-wider mb-3",children:"Body"}),_.jsx(sU,{content:r})]})]})}function fU(){const[t,e]=R.useState("installed"),[r,n]=R.useState([]),[i,a]=R.useState([]),[s,u]=R.useState(null);function c(B){return"url"in B&&B.url?B.url:B.name}const[f,p]=R.useState(null),[h,g]=R.useState(""),[v,b]=R.useState(!1),[x,y]=R.useState(!1),[k,O]=R.useState(!1),[A,T]=R.useState(""),[E,P]=R.useState(null),[C,N]=R.useState(null),L=R.useCallback(async()=>{try{const B=await Ye.get("/skills"),J=new Set(B.skills.map(ae=>ae.name.toLowerCase()));n(B.skills),a(ae=>ae.map(se=>({...se,installed:J.has(se.name.toLowerCase())})))}catch(B){tt.error(B instanceof Error?B.message:"Failed to load skills")}},[]),V=R.useCallback(async B=>{y(!0);try{const J=await Ye.get(`/skills/${encodeURIComponent(B)}`);p(J),T(J.content)}catch(J){tt.error(J instanceof Error?J.message:"Failed to load skill"),p(null)}finally{y(!1)}},[]);R.useEffect(()=>{L()},[L]),R.useEffect(()=>{if(t==="installed"){N(null);return}const B=h.trim();if(t==="skillssh"&&!B){a([]),N(null),b(!1);return}let J=!1;b(!0);const ae=window.setTimeout(async()=>{try{const se=await Ye.get(`/skills/discover?source=${t}&q=${encodeURIComponent(B)}`);if(J)return;a(se.skills),N(null)}catch(se){if(J)return;a([]),N(se instanceof Error?se.message:"Discovery failed")}finally{J||b(!1)}},250);return()=>{J=!0,window.clearTimeout(ae)}},[h,t]);const $=R.useMemo(()=>{const B=h.trim().toLowerCase();return B?r.filter(J=>[J.name,J.description,J.preview].some(ae=>ae.toLowerCase().includes(B))):r},[r,h]),I=t==="installed"?$:i,q=$.find(B=>B.name===s)??null,U=i.find(B=>c(B)===s)??null,K=(q==null?void 0:q.name)??(U==null?void 0:U.name)??null;R.useEffect(()=>{if(O(!1),!I.length){u(null),t!=="installed"&&p(null);return}if(!s||!I.some(B=>c(B)===s)){const B=I[0];B&&u(c(B))}},[s,t,I]),R.useEffect(()=>{if(t!=="installed"||!K){p(null);return}V(K)},[V,K,t]);async function G(B){if(!B.url&&!B.registrySource){tt.error("Install source is not available for this skill yet");return}P(B.name);try{await Ye.post("/skills/install",{name:B.name,source:B.source,url:B.url,registrySource:B.registrySource,skillId:B.skillId}),tt.success(`Installed ${B.title||B.name}`),await L(),a(J=>J.map(ae=>ae.name===B.name?{...ae,installed:!0}:ae))}catch(J){tt.error(J instanceof Error?J.message:"Install failed")}finally{P(null)}}async function Z(B){P(B);try{await Ye.delete(`/skills/${encodeURIComponent(B)}`),tt.success(`Removed ${B}`),await L(),a(J=>J.map(ae=>ae.name===B?{...ae,installed:!1}:ae))}catch(J){tt.error(J instanceof Error?J.message:"Failed to remove skill")}finally{P(null)}}async function X(){if(f){P(f.name);try{await Ye.put(`/skills/${encodeURIComponent(f.name)}`,{content:A}),tt.success(`Updated ${f.name}`),O(!1),await Promise.all([L(),V(f.name)])}catch(B){tt.error(B instanceof Error?B.message:"Failed to save skill")}finally{P(null)}}}const te=!!(q!=null&&q.activatedForOrchestrator),H=E===(f==null?void 0:f.name),z=E===(U==null?void 0:U.name);return _.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[_.jsxs("div",{className:"w-64 flex-shrink-0 border-r border-white/[0.06] flex flex-col overflow-hidden",children:[_.jsxs("div",{className:"px-2.5 pt-2.5 pb-2 flex-shrink-0 border-b border-white/[0.06] space-y-2",children:[_.jsxs("div",{className:"relative",children:[_.jsx(HC,{className:"pointer-events-none absolute left-2.5 top-1/2 h-3 w-3 -translate-y-1/2 text-zinc-700"}),_.jsx("input",{type:"text",value:h,onChange:B=>g(B.target.value),placeholder:"Search skills…",className:"w-full bg-[#181818] border border-white/[0.06] rounded-xl pl-7 pr-2 py-1.5 text-[11px] text-zinc-300 font-mono placeholder:text-zinc-700 focus:outline-none focus:border-[#E43A9C]/30 transition-colors"})]}),_.jsx("div",{className:"flex flex-col gap-0.5",children:lU.map(B=>_.jsxs("button",{type:"button",onClick:()=>e(B.id),className:`w-full text-left px-2.5 py-1.5 rounded-lg text-[11px] font-mono transition-colors flex items-center justify-between cursor-pointer ${t===B.id?"text-[#E43A9C]":"text-zinc-500 hover:text-zinc-300 hover:bg-white/[0.04]"}`,style:t===B.id?{background:"rgba(228,58,156,0.10)"}:void 0,children:[_.jsx("span",{children:B.label}),B.id==="installed"&&_.jsx("span",{className:"text-[10px] text-zinc-600",children:r.length})]},B.id))})]}),_.jsxs("div",{className:"flex-1 overflow-y-auto py-1.5",children:[v&&t!=="installed"?_.jsxs("div",{className:"flex items-center gap-2 rounded-2xl border border-white/[0.08] bg-white/[0.03] px-3 py-3 font-mono text-[11px] text-zinc-500",children:[_.jsx($l,{className:"h-3.5 w-3.5 animate-spin"})," Searching registry..."]}):null,I.map(B=>{const J=c(B),ae=s===J,se=B.description||("preview"in B?B.preview:"No description available.");return _.jsxs("button",{type:"button",onClick:()=>{O(!1),u(J)},className:`w-full text-left px-3 py-2.5 border-b border-white/[0.03] transition-colors cursor-pointer ${ae?"border-l-2 border-l-[#E43A9C] bg-[#E43A9C]/5":"hover:bg-white/[0.03]"}`,children:[_.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[_.jsx("span",{className:"truncate font-mono text-[11px] text-zinc-200",children:B.name}),"installed"in B&&B.installed?_.jsx(tr,{variant:"success",children:"installed"}):null]}),_.jsx("p",{className:"line-clamp-2 font-mono text-[10px] leading-relaxed text-zinc-600",children:se})]},`${t}:${J}`)}),!v&&I.length===0?_.jsx("div",{className:"rounded-2xl border border-dashed border-white/[0.08] bg-white/[0.02] px-4 py-8 text-center",children:_.jsx("p",{className:"font-mono text-[11px] leading-relaxed text-zinc-500",children:C||(t==="skillssh"&&!h.trim()?"Start typing to search the skills.sh registry.":h.trim()?"No skills match your search.":"No skills available in this source.")})}):null]})]}),_.jsx("div",{className:"flex min-h-0 flex-1 flex-col overflow-y-auto p-5",children:t==="installed"&&q?_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:"mb-5 flex items-start justify-between gap-4 border-b border-white/[0.06] pb-5",children:[_.jsxs("div",{className:"flex min-w-0 gap-4",children:[_.jsx("div",{className:"flex h-14 w-14 shrink-0 items-center justify-center rounded-2xl bg-[#E43A9C]/12 text-[#E43A9C]",children:_.jsx(id,{className:"h-6 w-6"})}),_.jsxs("div",{className:"min-w-0",children:[_.jsx("h3",{className:"truncate text-[34px] uppercase tracking-[0.08em] text-zinc-100",style:{fontFamily:"'Bebas Neue', sans-serif"},children:q.name}),_.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[_.jsx(tr,{variant:"success",children:"installed"}),te?_.jsx(tr,{variant:"warning",children:"active"}):_.jsx(tr,{variant:"muted",children:"inactive"}),_.jsx(tr,{variant:"muted",children:"local skill"})]}),_.jsxs("div",{className:"mt-3 space-y-1 font-mono text-[11px] text-zinc-500",children:[_.jsxs("p",{children:["path: ",q.filePath]}),_.jsxs("p",{children:["orchestrator: ",te?"enabled":"disabled"]})]})]})]}),_.jsxs("div",{className:"flex items-center gap-2",children:[k?_.jsxs(oa,{onClick:X,disabled:H||A===(f==null?void 0:f.content),className:"px-3 py-2",children:[H?_.jsx($l,{className:"h-3.5 w-3.5 animate-spin"}):_.jsx(gb,{className:"h-3.5 w-3.5"}),"Save"]}):_.jsxs(fi,{onClick:()=>O(!0),className:"px-3 py-2",children:[_.jsx(gb,{className:"h-3.5 w-3.5"})," Edit"]}),_.jsxs(Ax,{onClick:()=>Z(q.name),className:"px-3 py-2",children:[H?_.jsx($l,{className:"h-3.5 w-3.5 animate-spin"}):_.jsx(px,{className:"h-3.5 w-3.5"}),"Remove"]})]})]}),_.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto pr-1",children:x&&!f?_.jsxs("div",{className:"flex items-center gap-2 font-mono text-[11px] text-zinc-500",children:[_.jsx($l,{className:"h-3.5 w-3.5 animate-spin"})," Loading skill..."]}):k?_.jsxs("div",{className:"space-y-3",children:[_.jsx("textarea",{value:A,onChange:B=>T(B.target.value),className:"min-h-[440px] w-full rounded-2xl border border-white/[0.08] bg-black/30 p-4 font-mono text-[12px] leading-6 text-zinc-200 outline-none transition-colors focus:border-[#E43A9C]/50"}),_.jsxs("div",{className:"flex items-center justify-between font-mono text-[11px] text-zinc-500",children:[_.jsx("span",{children:"Editing raw SKILL.md"}),_.jsx(fi,{onClick:()=>{O(!1),T((f==null?void 0:f.content)??"")},className:"px-3 py-2",children:"Cancel"})]})]}):f?_.jsx(cU,{content:f.content}):_.jsx("p",{className:"font-mono text-[11px] text-zinc-500",children:"Select an installed skill to inspect it."})})]}):t!=="installed"&&U?_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:"mb-5 flex items-start justify-between gap-4 border-b border-white/[0.06] pb-5",children:[_.jsxs("div",{className:"flex min-w-0 gap-4",children:[_.jsx("div",{className:"flex h-14 w-14 shrink-0 items-center justify-center rounded-2xl bg-[#E43A9C]/12 text-[#E43A9C]",children:_.jsx(X5,{className:"h-6 w-6"})}),_.jsxs("div",{className:"min-w-0",children:[_.jsx("h3",{className:"truncate text-[34px] uppercase tracking-[0.08em] text-zinc-100",style:{fontFamily:"'Bebas Neue', sans-serif"},children:U.title||U.name}),_.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[_.jsx(tr,{variant:U.installed?"success":"default",children:U.installed?"installed":"available"}),_.jsx(tr,{variant:"muted",children:bE(U.source)}),wE(U.installs)?_.jsx(tr,{variant:"info",children:wE(U.installs)}):null]}),_.jsxs("div",{className:"mt-3 space-y-1 font-mono text-[11px] text-zinc-500",children:[_.jsxs("p",{children:["registry: ",bE(U.source)]}),U.registrySource?_.jsxs("p",{children:["source: ",U.registrySource]}):null,U.url?_.jsxs("p",{children:["url: ",U.url]}):null]})]})]}),_.jsx("div",{className:"flex items-center gap-2",children:U.installed?_.jsx(fi,{onClick:()=>{e("installed"),u(U.name)},className:"px-3 py-2",children:"Open installed"}):_.jsxs(oa,{onClick:()=>G(U),disabled:z||!U.url&&!U.registrySource,className:"px-3 py-2",children:[z?_.jsx($l,{className:"h-3.5 w-3.5 animate-spin"}):_.jsx(i5,{className:"h-3.5 w-3.5"}),"Install"]})})]}),_.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto pr-1",children:[_.jsx("div",{className:"rounded-2xl border border-white/[0.06] bg-white/[0.02] p-5",children:_.jsx("p",{className:"font-mono text-[12px] leading-7 text-zinc-300",children:U.description||"No registry description is available for this skill yet."})}),_.jsx("div",{className:"mt-4 rounded-2xl border border-dashed border-white/[0.08] bg-black/20 p-4 font-mono text-[11px] leading-6 text-zinc-500",children:"Install will fetch the skill definition from the selected registry source and add it to your local skills library."})]})]}):_.jsx("div",{className:"flex h-full items-center justify-center rounded-2xl border border-dashed border-white/[0.08] bg-white/[0.02] p-8 text-center",children:_.jsxs("div",{children:[_.jsx("div",{className:"mx-auto mb-4 flex h-14 w-14 items-center justify-center rounded-2xl bg-[#E43A9C]/12 text-[#E43A9C]",children:_.jsx(id,{className:"h-6 w-6"})}),_.jsx("h3",{className:"text-[28px] uppercase tracking-[0.08em] text-zinc-100",style:{fontFamily:"'Bebas Neue', sans-serif"},children:"Select a Skill"}),_.jsx("p",{className:"mt-2 font-mono text-[11px] leading-relaxed text-zinc-500",children:"Choose a skill from the left panel to inspect details, install registry entries, or edit local definitions."})]})})})]})}const $b=["#38bdf8","#a78bfa","#34d399","#f59e0b","#f87171","#E43A9C"];function dU(t){return $b[t%$b.length]}function _E(){const{name:t}=nD();return t?_.jsx(mU,{name:t}):_.jsx(hU,{})}function hU(){const[t,e]=R.useState([]),[r,n]=R.useState(null),i=yh();return R.useEffect(()=>{Promise.all([Ye.get("/squads"),Ye.get("/config")]).then(([a,s])=>{e(a.squads),n(s.config.maxInstancesPerSquad)}).catch(()=>{})},[]),_.jsxs("div",{className:"flex-1 overflow-y-auto p-6",children:[_.jsx("div",{className:"mb-6",children:_.jsxs("div",{children:[_.jsx("h2",{className:"text-2xl tracking-wide text-zinc-100",style:{fontFamily:"'Bebas Neue', sans-serif"},children:"Squads"}),_.jsxs("p",{className:"text-[11px] text-zinc-600 font-mono mt-0.5",children:[t.length," squads · ",t.reduce((a,s)=>a+(s.activeInstances||0),0)," ","active instances"]})]})}),_.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-3",children:[t.map((a,s)=>{const u=dU(s);return _.jsxs("button",{type:"button",onClick:()=>i(`/squads/${a.name}`),className:"text-left rounded-2xl p-5 transition-all group cursor-pointer",style:{border:`1px solid ${u}30`,background:`${u}08`,backdropFilter:"blur(20px)"},onMouseEnter:c=>{c.currentTarget.style.borderColor=`${u}70`,c.currentTarget.style.background=`${u}12`},onMouseLeave:c=>{c.currentTarget.style.borderColor=`${u}30`,c.currentTarget.style.background=`${u}08`},children:[_.jsxs("div",{className:"flex items-start justify-between mb-1",children:[_.jsx("h3",{className:"text-sm font-mono transition-colors",style:{color:u},children:a.name}),_.jsx(tr,{variant:Zf(a.status),children:a.status})]}),_.jsxs("div",{className:"flex items-center justify-between mb-3",children:[_.jsx("p",{className:"text-[11px] text-zinc-600 font-mono",children:a.universe}),_.jsxs("span",{className:"text-[11px] text-zinc-600 font-mono flex items-center gap-1",children:[_.jsx(Q4,{className:"w-3 h-3"}),a.activeInstances,"/",r??(a.totalInstances||a.memberCount)]})]}),a.repoUrl&&_.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] text-zinc-700 font-mono",children:[_.jsx(zC,{className:"w-3 h-3 flex-shrink-0"}),_.jsx("span",{className:"truncate",children:a.repoUrl.replace("https://github.com/","")})]})]},a.id)}),t.length===0&&_.jsxs("div",{className:"col-span-full text-center py-12 text-zinc-600",children:[_.jsx(VC,{size:48,className:"mx-auto mb-3 opacity-30"}),_.jsx("p",{className:"text-[11px] font-mono",children:"No squads hired yet. Ask IO to hire a squad for a project."})]})]})]})}function pU(t,e){const r="w-4 h-4",n={color:e},i=t.toLowerCase();return i.includes("lead")||i.includes("pm")||i.includes("technical")?_.jsx(e5,{className:r,style:n}):i.includes("qa")||i.includes("test")?_.jsx(z4,{className:r,style:n}):i.includes("scribe")?_.jsx(F5,{className:r,style:n}):_.jsx(D4,{className:r,style:n})}function mU({name:t}){const[e,r]=R.useState(null),n=yh();if(R.useEffect(()=>{Ye.get(`/squads/${t}`).then(r).catch(()=>{})},[t]),!e)return _.jsx("div",{className:"h-full flex items-center justify-center text-zinc-600",children:"Loading..."});const i=$b[0];return _.jsxs("div",{className:"flex-1 overflow-y-auto p-6",children:[_.jsxs("button",{type:"button",onClick:()=>n("/squads"),className:"flex items-center gap-1.5 text-[11px] text-zinc-600 hover:text-zinc-300 font-mono mb-5 transition-colors",children:[_.jsx(dx,{className:"w-3.5 h-3.5"})," Back to Squads"]}),_.jsxs("div",{className:"flex items-start justify-between mb-6",children:[_.jsxs("div",{children:[_.jsx("h2",{className:"text-2xl tracking-wide",style:{fontFamily:"'Bebas Neue', sans-serif",color:i},children:e.squad.name}),_.jsxs("p",{className:"text-[11px] text-zinc-600 font-mono mt-0.5",children:[e.squad.universe," · ",e.squad.autonomyTier||"standard"," autonomy"]}),e.squad.repoUrl&&_.jsxs("a",{href:e.squad.repoUrl,target:"_blank",rel:"noreferrer",className:"text-[11px] font-mono text-zinc-700 hover:text-zinc-400 flex items-center gap-1 mt-1 transition-colors",children:[_.jsx(zC,{className:"w-3 h-3"}),e.squad.repoUrl.replace("https://github.com/","")]})]}),_.jsx(tr,{variant:Zf(e.squad.status),children:e.squad.status})]}),_.jsx("div",{className:"space-y-2 mb-8",children:e.members.map(a=>_.jsxs("div",{className:"glass-card border border-white/[0.07] rounded-2xl p-4 flex items-center gap-3",children:[_.jsx("div",{className:"w-8 h-8 rounded-xl flex items-center justify-center flex-shrink-0",style:{border:`1px solid ${i}30`,background:`${i}12`},children:pU(a.roleName||a.role,i)}),_.jsxs("div",{className:"flex-1 min-w-0",children:[_.jsxs("div",{className:"flex items-center gap-2",children:[_.jsx("span",{className:"text-sm font-mono text-zinc-200",children:a.displayName}),_.jsx(tr,{variant:Zf(a.status),children:a.status})]}),_.jsx("p",{className:"text-[11px] text-zinc-600 font-mono mt-0.5",children:a.role}),a.currentTask&&_.jsx("p",{className:"text-xs text-zinc-500 mt-1 truncate",children:a.currentTask})]})]},a.id))}),e.instances.length>0&&_.jsxs("section",{children:[_.jsx("h3",{className:"text-lg tracking-wide mb-3",style:{fontFamily:"'Bebas Neue', sans-serif",color:i},children:"Instances"}),_.jsx("div",{className:"space-y-2",children:e.instances.map(a=>_.jsxs("div",{className:"glass-card border border-white/[0.07] rounded-2xl p-4",children:[_.jsxs("div",{className:"flex items-center justify-between",children:[_.jsx("span",{className:"text-[11px] font-mono text-zinc-400",children:a.id.slice(0,8)}),_.jsx(tr,{variant:Zf(a.status),children:a.status})]}),_.jsxs("div",{className:"mt-2 text-[11px] text-zinc-600 font-mono flex gap-4",children:[_.jsxs("span",{children:["Tasks: ",a.tasksComplete,"/",a.taskCount]}),a.branch&&_.jsxs("span",{children:["Branch: ",a.branch]})]})]},a.id))})]})]})}var fg,SE;function Or(){if(SE)return fg;SE=1;var t=Array.isArray;return fg=t,fg}var dg,kE;function WR(){if(kE)return dg;kE=1;var t=typeof bf=="object"&&bf&&bf.Object===Object&&bf;return dg=t,dg}var hg,EE;function Wn(){if(EE)return hg;EE=1;var t=WR(),e=typeof self=="object"&&self&&self.Object===Object&&self,r=t||e||Function("return this")();return hg=r,hg}var pg,OE;function nc(){if(OE)return pg;OE=1;var t=Wn(),e=t.Symbol;return pg=e,pg}var mg,AE;function gU(){if(AE)return mg;AE=1;var t=nc(),e=Object.prototype,r=e.hasOwnProperty,n=e.toString,i=t?t.toStringTag:void 0;function a(s){var u=r.call(s,i),c=s[i];try{s[i]=void 0;var f=!0}catch{}var p=n.call(s);return f&&(u?s[i]=c:delete s[i]),p}return mg=a,mg}var gg,PE;function vU(){if(PE)return gg;PE=1;var t=Object.prototype,e=t.toString;function r(n){return e.call(n)}return gg=r,gg}var vg,TE;function xi(){if(TE)return vg;TE=1;var t=nc(),e=gU(),r=vU(),n="[object Null]",i="[object Undefined]",a=t?t.toStringTag:void 0;function s(u){return u==null?u===void 0?i:n:a&&a in Object(u)?e(u):r(u)}return vg=s,vg}var yg,jE;function _i(){if(jE)return yg;jE=1;function t(e){return e!=null&&typeof e=="object"}return yg=t,yg}var bg,CE;function zs(){if(CE)return bg;CE=1;var t=xi(),e=_i(),r="[object Symbol]";function n(i){return typeof i=="symbol"||e(i)&&t(i)==r}return bg=n,bg}var wg,RE;function jx(){if(RE)return wg;RE=1;var t=Or(),e=zs(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(a,s){if(t(a))return!1;var u=typeof a;return u=="number"||u=="symbol"||u=="boolean"||a==null||e(a)?!0:n.test(a)||!r.test(a)||s!=null&&a in Object(s)}return wg=i,wg}var xg,NE;function la(){if(NE)return xg;NE=1;function t(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}return xg=t,xg}var _g,$E;function Cx(){if($E)return _g;$E=1;var t=xi(),e=la(),r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function s(u){if(!e(u))return!1;var c=t(u);return c==n||c==i||c==r||c==a}return _g=s,_g}var Sg,IE;function yU(){if(IE)return Sg;IE=1;var t=Wn(),e=t["__core-js_shared__"];return Sg=e,Sg}var kg,ME;function bU(){if(ME)return kg;ME=1;var t=yU(),e=(function(){var n=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function r(n){return!!e&&e in n}return kg=r,kg}var Eg,LE;function KR(){if(LE)return Eg;LE=1;var t=Function.prototype,e=t.toString;function r(n){if(n!=null){try{return e.call(n)}catch{}try{return n+""}catch{}}return""}return Eg=r,Eg}var Og,DE;function wU(){if(DE)return Og;DE=1;var t=Cx(),e=bU(),r=la(),n=KR(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,s=Function.prototype,u=Object.prototype,c=s.toString,f=u.hasOwnProperty,p=RegExp("^"+c.call(f).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(g){if(!r(g)||e(g))return!1;var v=t(g)?p:a;return v.test(n(g))}return Og=h,Og}var Ag,BE;function xU(){if(BE)return Ag;BE=1;function t(e,r){return e==null?void 0:e[r]}return Ag=t,Ag}var Pg,zE;function ao(){if(zE)return Pg;zE=1;var t=wU(),e=xU();function r(n,i){var a=e(n,i);return t(a)?a:void 0}return Pg=r,Pg}var Tg,qE;function Ah(){if(qE)return Tg;qE=1;var t=ao(),e=t(Object,"create");return Tg=e,Tg}var jg,UE;function _U(){if(UE)return jg;UE=1;var t=Ah();function e(){this.__data__=t?t(null):{},this.size=0}return jg=e,jg}var Cg,FE;function SU(){if(FE)return Cg;FE=1;function t(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}return Cg=t,Cg}var Rg,HE;function kU(){if(HE)return Rg;HE=1;var t=Ah(),e="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function i(a){var s=this.__data__;if(t){var u=s[a];return u===e?void 0:u}return n.call(s,a)?s[a]:void 0}return Rg=i,Rg}var Ng,WE;function EU(){if(WE)return Ng;WE=1;var t=Ah(),e=Object.prototype,r=e.hasOwnProperty;function n(i){var a=this.__data__;return t?a[i]!==void 0:r.call(a,i)}return Ng=n,Ng}var $g,KE;function OU(){if(KE)return $g;KE=1;var t=Ah(),e="__lodash_hash_undefined__";function r(n,i){var a=this.__data__;return this.size+=this.has(n)?0:1,a[n]=t&&i===void 0?e:i,this}return $g=r,$g}var Ig,VE;function AU(){if(VE)return Ig;VE=1;var t=_U(),e=SU(),r=kU(),n=EU(),i=OU();function a(s){var u=-1,c=s==null?0:s.length;for(this.clear();++u<c;){var f=s[u];this.set(f[0],f[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,Ig=a,Ig}var Mg,GE;function PU(){if(GE)return Mg;GE=1;function t(){this.__data__=[],this.size=0}return Mg=t,Mg}var Lg,XE;function Rx(){if(XE)return Lg;XE=1;function t(e,r){return e===r||e!==e&&r!==r}return Lg=t,Lg}var Dg,YE;function Ph(){if(YE)return Dg;YE=1;var t=Rx();function e(r,n){for(var i=r.length;i--;)if(t(r[i][0],n))return i;return-1}return Dg=e,Dg}var Bg,JE;function TU(){if(JE)return Bg;JE=1;var t=Ph(),e=Array.prototype,r=e.splice;function n(i){var a=this.__data__,s=t(a,i);if(s<0)return!1;var u=a.length-1;return s==u?a.pop():r.call(a,s,1),--this.size,!0}return Bg=n,Bg}var zg,QE;function jU(){if(QE)return zg;QE=1;var t=Ph();function e(r){var n=this.__data__,i=t(n,r);return i<0?void 0:n[i][1]}return zg=e,zg}var qg,ZE;function CU(){if(ZE)return qg;ZE=1;var t=Ph();function e(r){return t(this.__data__,r)>-1}return qg=e,qg}var Ug,eO;function RU(){if(eO)return Ug;eO=1;var t=Ph();function e(r,n){var i=this.__data__,a=t(i,r);return a<0?(++this.size,i.push([r,n])):i[a][1]=n,this}return Ug=e,Ug}var Fg,tO;function Th(){if(tO)return Fg;tO=1;var t=PU(),e=TU(),r=jU(),n=CU(),i=RU();function a(s){var u=-1,c=s==null?0:s.length;for(this.clear();++u<c;){var f=s[u];this.set(f[0],f[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,Fg=a,Fg}var Hg,rO;function Nx(){if(rO)return Hg;rO=1;var t=ao(),e=Wn(),r=t(e,"Map");return Hg=r,Hg}var Wg,nO;function NU(){if(nO)return Wg;nO=1;var t=AU(),e=Th(),r=Nx();function n(){this.size=0,this.__data__={hash:new t,map:new(r||e),string:new t}}return Wg=n,Wg}var Kg,iO;function $U(){if(iO)return Kg;iO=1;function t(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}return Kg=t,Kg}var Vg,aO;function jh(){if(aO)return Vg;aO=1;var t=$U();function e(r,n){var i=r.__data__;return t(n)?i[typeof n=="string"?"string":"hash"]:i.map}return Vg=e,Vg}var Gg,oO;function IU(){if(oO)return Gg;oO=1;var t=jh();function e(r){var n=t(this,r).delete(r);return this.size-=n?1:0,n}return Gg=e,Gg}var Xg,sO;function MU(){if(sO)return Xg;sO=1;var t=jh();function e(r){return t(this,r).get(r)}return Xg=e,Xg}var Yg,lO;function LU(){if(lO)return Yg;lO=1;var t=jh();function e(r){return t(this,r).has(r)}return Yg=e,Yg}var Jg,uO;function DU(){if(uO)return Jg;uO=1;var t=jh();function e(r,n){var i=t(this,r),a=i.size;return i.set(r,n),this.size+=i.size==a?0:1,this}return Jg=e,Jg}var Qg,cO;function $x(){if(cO)return Qg;cO=1;var t=NU(),e=IU(),r=MU(),n=LU(),i=DU();function a(s){var u=-1,c=s==null?0:s.length;for(this.clear();++u<c;){var f=s[u];this.set(f[0],f[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,Qg=a,Qg}var Zg,fO;function VR(){if(fO)return Zg;fO=1;var t=$x(),e="Expected a function";function r(n,i){if(typeof n!="function"||i!=null&&typeof i!="function")throw new TypeError(e);var a=function(){var s=arguments,u=i?i.apply(this,s):s[0],c=a.cache;if(c.has(u))return c.get(u);var f=n.apply(this,s);return a.cache=c.set(u,f)||c,f};return a.cache=new(r.Cache||t),a}return r.Cache=t,Zg=r,Zg}var ev,dO;function BU(){if(dO)return ev;dO=1;var t=VR(),e=500;function r(n){var i=t(n,function(s){return a.size===e&&a.clear(),s}),a=i.cache;return i}return ev=r,ev}var tv,hO;function zU(){if(hO)return tv;hO=1;var t=BU(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=t(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(e,function(s,u,c,f){a.push(c?f.replace(r,"$1"):u||s)}),a});return tv=n,tv}var rv,pO;function Ix(){if(pO)return rv;pO=1;function t(e,r){for(var n=-1,i=e==null?0:e.length,a=Array(i);++n<i;)a[n]=r(e[n],n,e);return a}return rv=t,rv}var nv,mO;function qU(){if(mO)return nv;mO=1;var t=nc(),e=Ix(),r=Or(),n=zs(),i=t?t.prototype:void 0,a=i?i.toString:void 0;function s(u){if(typeof u=="string")return u;if(r(u))return e(u,s)+"";if(n(u))return a?a.call(u):"";var c=u+"";return c=="0"&&1/u==-1/0?"-0":c}return nv=s,nv}var iv,gO;function GR(){if(gO)return iv;gO=1;var t=qU();function e(r){return r==null?"":t(r)}return iv=e,iv}var av,vO;function XR(){if(vO)return av;vO=1;var t=Or(),e=jx(),r=zU(),n=GR();function i(a,s){return t(a)?a:e(a,s)?[a]:r(n(a))}return av=i,av}var ov,yO;function Ch(){if(yO)return ov;yO=1;var t=zs();function e(r){if(typeof r=="string"||t(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return ov=e,ov}var sv,bO;function Mx(){if(bO)return sv;bO=1;var t=XR(),e=Ch();function r(n,i){i=t(i,n);for(var a=0,s=i.length;n!=null&&a<s;)n=n[e(i[a++])];return a&&a==s?n:void 0}return sv=r,sv}var lv,wO;function YR(){if(wO)return lv;wO=1;var t=Mx();function e(r,n,i){var a=r==null?void 0:t(r,n);return a===void 0?i:a}return lv=e,lv}var UU=YR();const Lr=Qe(UU);var uv,xO;function FU(){if(xO)return uv;xO=1;function t(e){return e==null}return uv=t,uv}var HU=FU();const Le=Qe(HU);var cv,_O;function WU(){if(_O)return cv;_O=1;var t=xi(),e=Or(),r=_i(),n="[object String]";function i(a){return typeof a=="string"||!e(a)&&r(a)&&t(a)==n}return cv=i,cv}var KU=WU();const Qa=Qe(KU);var VU=Cx();const Ie=Qe(VU);var GU=la();const qs=Qe(GU);var fv={exports:{}},Ge={};/**
|
|
418
|
-
* @license React
|
|
419
|
-
* react-is.production.min.js
|
|
420
|
-
*
|
|
421
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
422
|
-
*
|
|
423
|
-
* This source code is licensed under the MIT license found in the
|
|
424
|
-
* LICENSE file in the root directory of this source tree.
|
|
425
|
-
*/var SO;function XU(){if(SO)return Ge;SO=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function x(y){if(typeof y=="object"&&y!==null){var k=y.$$typeof;switch(k){case t:switch(y=y.type,y){case r:case i:case n:case f:case p:return y;default:switch(y=y&&y.$$typeof,y){case u:case s:case c:case g:case h:case a:return y;default:return k}}case e:return k}}}return Ge.ContextConsumer=s,Ge.ContextProvider=a,Ge.Element=t,Ge.ForwardRef=c,Ge.Fragment=r,Ge.Lazy=g,Ge.Memo=h,Ge.Portal=e,Ge.Profiler=i,Ge.StrictMode=n,Ge.Suspense=f,Ge.SuspenseList=p,Ge.isAsyncMode=function(){return!1},Ge.isConcurrentMode=function(){return!1},Ge.isContextConsumer=function(y){return x(y)===s},Ge.isContextProvider=function(y){return x(y)===a},Ge.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===t},Ge.isForwardRef=function(y){return x(y)===c},Ge.isFragment=function(y){return x(y)===r},Ge.isLazy=function(y){return x(y)===g},Ge.isMemo=function(y){return x(y)===h},Ge.isPortal=function(y){return x(y)===e},Ge.isProfiler=function(y){return x(y)===i},Ge.isStrictMode=function(y){return x(y)===n},Ge.isSuspense=function(y){return x(y)===f},Ge.isSuspenseList=function(y){return x(y)===p},Ge.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===r||y===i||y===n||y===f||y===p||y===v||typeof y=="object"&&y!==null&&(y.$$typeof===g||y.$$typeof===h||y.$$typeof===a||y.$$typeof===s||y.$$typeof===c||y.$$typeof===b||y.getModuleId!==void 0)},Ge.typeOf=x,Ge}var kO;function YU(){return kO||(kO=1,fv.exports=XU()),fv.exports}var JU=YU(),dv,EO;function JR(){if(EO)return dv;EO=1;var t=xi(),e=_i(),r="[object Number]";function n(i){return typeof i=="number"||e(i)&&t(i)==r}return dv=n,dv}var hv,OO;function QU(){if(OO)return hv;OO=1;var t=JR();function e(r){return t(r)&&r!=+r}return hv=e,hv}var ZU=QU();const Us=Qe(ZU);var e9=JR();const t9=Qe(e9);var dr=function(e){return e===0?0:e>0?1:-1},Fa=function(e){return Qa(e)&&e.indexOf("%")===e.length-1},fe=function(e){return t9(e)&&!Us(e)},r9=function(e){return Le(e)},Bt=function(e){return fe(e)||Qa(e)},n9=0,Fs=function(e){var r=++n9;return"".concat(e||"").concat(r)},hr=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!fe(e)&&!Qa(e))return n;var a;if(Fa(e)){var s=e.indexOf("%");a=r*parseFloat(e.slice(0,s))/100}else a=+e;return Us(a)&&(a=n),i&&a>r&&(a=r),a},Vo=function(e){if(!e)return null;var r=Object.keys(e);return r&&r.length?e[r[0]]:null},i9=function(e){if(!Array.isArray(e))return!1;for(var r=e.length,n={},i=0;i<r;i++)if(!n[e[i]])n[e[i]]=!0;else return!0;return!1},kr=function(e,r){return fe(e)&&fe(r)?function(n){return e+n*(r-e)}:function(){return r}};function vd(t,e,r){return!t||!t.length?null:t.find(function(n){return n&&(typeof e=="function"?e(n):Lr(n,e))===r})}var a9=function(e,r){return fe(e)&&fe(r)?e-r:Qa(e)&&Qa(r)?e.localeCompare(r):e instanceof Date&&r instanceof Date?e.getTime()-r.getTime():String(e).localeCompare(String(r))};function rs(t,e){for(var r in t)if({}.hasOwnProperty.call(t,r)&&(!{}.hasOwnProperty.call(e,r)||t[r]!==e[r]))return!1;for(var n in e)if({}.hasOwnProperty.call(e,n)&&!{}.hasOwnProperty.call(t,n))return!1;return!0}function Ib(t){"@babel/helpers - typeof";return Ib=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},Ib(t)}var o9=["viewBox","children"],s9=["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"],AO=["points","pathLength"],pv={svg:o9,polygon:AO,polyline:AO},Lx=["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"],yd=function(e,r){if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(R.isValidElement(e)&&(n=e.props),!qs(n))return null;var i={};return Object.keys(n).forEach(function(a){Lx.includes(a)&&(i[a]=r||function(s){return n[a](n,s)})}),i},l9=function(e,r,n){return function(i){return e(r,n,i),null}},Za=function(e,r,n){if(!qs(e)||Ib(e)!=="object")return null;var i=null;return Object.keys(e).forEach(function(a){var s=e[a];Lx.includes(a)&&typeof s=="function"&&(i||(i={}),i[a]=l9(s,r,n))}),i},u9=["children"],c9=["children"];function PO(t,e){if(t==null)return{};var r=f9(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function f9(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function Mb(t){"@babel/helpers - typeof";return Mb=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},Mb(t)}var TO={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"},di=function(e){return typeof e=="string"?e:e?e.displayName||e.name||"Component":""},jO=null,mv=null,Dx=function t(e){if(e===jO&&Array.isArray(mv))return mv;var r=[];return R.Children.forEach(e,function(n){Le(n)||(JU.isFragment(n)?r=r.concat(t(n.props.children)):r.push(n))}),mv=r,jO=e,r};function rn(t,e){var r=[],n=[];return Array.isArray(e)?n=e.map(function(i){return di(i)}):n=[di(e)],Dx(t).forEach(function(i){var a=Lr(i,"type.displayName")||Lr(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}function $r(t,e){var r=rn(t,e);return r&&r[0]}var CO=function(e){if(!e||!e.props)return!1;var r=e.props,n=r.width,i=r.height;return!(!fe(n)||n<=0||!fe(i)||i<=0)},d9=["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"],h9=function(e){return e&&e.type&&Qa(e.type)&&d9.indexOf(e.type)>=0},p9=function(e){return e&&Mb(e)==="object"&&"clipDot"in e},m9=function(e,r,n,i){var a,s=(a=pv==null?void 0:pv[i])!==null&&a!==void 0?a:[];return r.startsWith("data-")||!Ie(e)&&(i&&s.includes(r)||s9.includes(r))||n&&Lx.includes(r)},Oe=function(e,r,n){if(!e||typeof e=="function"||typeof e=="boolean")return null;var i=e;if(R.isValidElement(e)&&(i=e.props),!qs(i))return null;var a={};return Object.keys(i).forEach(function(s){var u;m9((u=i)===null||u===void 0?void 0:u[s],s,r,n)&&(a[s]=i[s])}),a},Lb=function t(e,r){if(e===r)return!0;var n=R.Children.count(e);if(n!==R.Children.count(r))return!1;if(n===0)return!0;if(n===1)return RO(Array.isArray(e)?e[0]:e,Array.isArray(r)?r[0]:r);for(var i=0;i<n;i++){var a=e[i],s=r[i];if(Array.isArray(a)||Array.isArray(s)){if(!t(a,s))return!1}else if(!RO(a,s))return!1}return!0},RO=function(e,r){if(Le(e)&&Le(r))return!0;if(!Le(e)&&!Le(r)){var n=e.props||{},i=n.children,a=PO(n,u9),s=r.props||{},u=s.children,c=PO(s,c9);return i&&u?rs(a,c)&&Lb(i,u):!i&&!u?rs(a,c):!1}return!1},NO=function(e,r){var n=[],i={};return Dx(e).forEach(function(a,s){if(h9(a))n.push(a);else if(a){var u=di(a.type),c=r[u]||{},f=c.handler,p=c.once;if(f&&(!p||!i[u])){var h=f(a,u,s);n.push(h),i[u]=!0}}}),n},g9=function(e){var r=e&&e.type;return r&&TO[r]?TO[r]:null},v9=function(e,r){return Dx(r).indexOf(e)},y9=["children","width","height","viewBox","className","style","title","desc"];function Db(){return Db=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Db.apply(this,arguments)}function b9(t,e){if(t==null)return{};var r=w9(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function w9(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function Bb(t){var e=t.children,r=t.width,n=t.height,i=t.viewBox,a=t.className,s=t.style,u=t.title,c=t.desc,f=b9(t,y9),p=i||{width:r,height:n,x:0,y:0},h=De("recharts-surface",a);return M.createElement("svg",Db({},Oe(f,!0,"svg"),{className:h,width:r,height:n,style:s,viewBox:"".concat(p.x," ").concat(p.y," ").concat(p.width," ").concat(p.height)}),M.createElement("title",null,u),M.createElement("desc",null,c),e)}var x9=["children","className"];function zb(){return zb=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},zb.apply(this,arguments)}function _9(t,e){if(t==null)return{};var r=S9(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function S9(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}var Ue=M.forwardRef(function(t,e){var r=t.children,n=t.className,i=_9(t,x9),a=De("recharts-layer",n);return M.createElement("g",zb({className:a},Oe(i,!0),{ref:e}),r)}),hi=function(e,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a]},gv,$O;function k9(){if($O)return gv;$O=1;function t(e,r,n){var i=-1,a=e.length;r<0&&(r=-r>a?0:a+r),n=n>a?a:n,n<0&&(n+=a),a=r>n?0:n-r>>>0,r>>>=0;for(var s=Array(a);++i<a;)s[i]=e[i+r];return s}return gv=t,gv}var vv,IO;function E9(){if(IO)return vv;IO=1;var t=k9();function e(r,n,i){var a=r.length;return i=i===void 0?a:i,!n&&i>=a?r:t(r,n,i)}return vv=e,vv}var yv,MO;function QR(){if(MO)return yv;MO=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=e+r+n,a="\\ufe0e\\ufe0f",s="\\u200d",u=RegExp("["+s+t+i+a+"]");function c(f){return u.test(f)}return yv=c,yv}var bv,LO;function O9(){if(LO)return bv;LO=1;function t(e){return e.split("")}return bv=t,bv}var wv,DO;function A9(){if(DO)return wv;DO=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=e+r+n,a="\\ufe0e\\ufe0f",s="["+t+"]",u="["+i+"]",c="\\ud83c[\\udffb-\\udfff]",f="(?:"+u+"|"+c+")",p="[^"+t+"]",h="(?:\\ud83c[\\udde6-\\uddff]){2}",g="[\\ud800-\\udbff][\\udc00-\\udfff]",v="\\u200d",b=f+"?",x="["+a+"]?",y="(?:"+v+"(?:"+[p,h,g].join("|")+")"+x+b+")*",k=x+b+y,O="(?:"+[p+u+"?",u,h,g,s].join("|")+")",A=RegExp(c+"(?="+c+")|"+O+k,"g");function T(E){return E.match(A)||[]}return wv=T,wv}var xv,BO;function P9(){if(BO)return xv;BO=1;var t=O9(),e=QR(),r=A9();function n(i){return e(i)?r(i):t(i)}return xv=n,xv}var _v,zO;function T9(){if(zO)return _v;zO=1;var t=E9(),e=QR(),r=P9(),n=GR();function i(a){return function(s){s=n(s);var u=e(s)?r(s):void 0,c=u?u[0]:s.charAt(0),f=u?t(u,1).join(""):s.slice(1);return c[a]()+f}}return _v=i,_v}var Sv,qO;function j9(){if(qO)return Sv;qO=1;var t=T9(),e=t("toUpperCase");return Sv=e,Sv}var C9=j9();const Rh=Qe(C9);function ot(t){return function(){return t}}const ZR=Math.cos,bd=Math.sin,An=Math.sqrt,wd=Math.PI,Nh=2*wd,qb=Math.PI,Ub=2*qb,Da=1e-6,R9=Ub-Da;function eN(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}function N9(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return eN;const r=10**e;return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class $9{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?eN:N9(e)}moveTo(e,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,r){this._append`L${this._x1=+e},${this._y1=+r}`}quadraticCurveTo(e,r,n,i){this._append`Q${+e},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(e,r,n,i,a,s){this._append`C${+e},${+r},${+n},${+i},${this._x1=+a},${this._y1=+s}`}arcTo(e,r,n,i,a){if(e=+e,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let s=this._x1,u=this._y1,c=n-e,f=i-r,p=s-e,h=u-r,g=p*p+h*h;if(this._x1===null)this._append`M${this._x1=e},${this._y1=r}`;else if(g>Da)if(!(Math.abs(h*c-f*p)>Da)||!a)this._append`L${this._x1=e},${this._y1=r}`;else{let v=n-s,b=i-u,x=c*c+f*f,y=v*v+b*b,k=Math.sqrt(x),O=Math.sqrt(g),A=a*Math.tan((qb-Math.acos((x+g-y)/(2*k*O)))/2),T=A/O,E=A/k;Math.abs(T-1)>Da&&this._append`L${e+T*p},${r+T*h}`,this._append`A${a},${a},0,0,${+(h*v>p*b)},${this._x1=e+E*c},${this._y1=r+E*f}`}}arc(e,r,n,i,a,s){if(e=+e,r=+r,n=+n,s=!!s,n<0)throw new Error(`negative radius: ${n}`);let u=n*Math.cos(i),c=n*Math.sin(i),f=e+u,p=r+c,h=1^s,g=s?i-a:a-i;this._x1===null?this._append`M${f},${p}`:(Math.abs(this._x1-f)>Da||Math.abs(this._y1-p)>Da)&&this._append`L${f},${p}`,n&&(g<0&&(g=g%Ub+Ub),g>R9?this._append`A${n},${n},0,1,${h},${e-u},${r-c}A${n},${n},0,1,${h},${this._x1=f},${this._y1=p}`:g>Da&&this._append`A${n},${n},0,${+(g>=qb)},${h},${this._x1=e+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(e,r,n,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function Bx(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(r==null)e=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);e=n}return t},()=>new $9(e)}function zx(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function tN(t){this._context=t}tN.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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function $h(t){return new tN(t)}function rN(t){return t[0]}function nN(t){return t[1]}function iN(t,e){var r=ot(!0),n=null,i=$h,a=null,s=Bx(u);t=typeof t=="function"?t:t===void 0?rN:ot(t),e=typeof e=="function"?e:e===void 0?nN:ot(e);function u(c){var f,p=(c=zx(c)).length,h,g=!1,v;for(n==null&&(a=i(v=s())),f=0;f<=p;++f)!(f<p&&r(h=c[f],f,c))===g&&((g=!g)?a.lineStart():a.lineEnd()),g&&a.point(+t(h,f,c),+e(h,f,c));if(v)return a=null,v+""||null}return u.x=function(c){return arguments.length?(t=typeof c=="function"?c:ot(+c),u):t},u.y=function(c){return arguments.length?(e=typeof c=="function"?c:ot(+c),u):e},u.defined=function(c){return arguments.length?(r=typeof c=="function"?c:ot(!!c),u):r},u.curve=function(c){return arguments.length?(i=c,n!=null&&(a=i(n)),u):i},u.context=function(c){return arguments.length?(c==null?n=a=null:a=i(n=c),u):n},u}function $f(t,e,r){var n=null,i=ot(!0),a=null,s=$h,u=null,c=Bx(f);t=typeof t=="function"?t:t===void 0?rN:ot(+t),e=typeof e=="function"?e:ot(e===void 0?0:+e),r=typeof r=="function"?r:r===void 0?nN:ot(+r);function f(h){var g,v,b,x=(h=zx(h)).length,y,k=!1,O,A=new Array(x),T=new Array(x);for(a==null&&(u=s(O=c())),g=0;g<=x;++g){if(!(g<x&&i(y=h[g],g,h))===k)if(k=!k)v=g,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),b=g-1;b>=v;--b)u.point(A[b],T[b]);u.lineEnd(),u.areaEnd()}k&&(A[g]=+t(y,g,h),T[g]=+e(y,g,h),u.point(n?+n(y,g,h):A[g],r?+r(y,g,h):T[g]))}if(O)return u=null,O+""||null}function p(){return iN().defined(i).curve(s).context(a)}return f.x=function(h){return arguments.length?(t=typeof h=="function"?h:ot(+h),n=null,f):t},f.x0=function(h){return arguments.length?(t=typeof h=="function"?h:ot(+h),f):t},f.x1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:ot(+h),f):n},f.y=function(h){return arguments.length?(e=typeof h=="function"?h:ot(+h),r=null,f):e},f.y0=function(h){return arguments.length?(e=typeof h=="function"?h:ot(+h),f):e},f.y1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:ot(+h),f):r},f.lineX0=f.lineY0=function(){return p().x(t).y(e)},f.lineY1=function(){return p().x(t).y(r)},f.lineX1=function(){return p().x(n).y(e)},f.defined=function(h){return arguments.length?(i=typeof h=="function"?h:ot(!!h),f):i},f.curve=function(h){return arguments.length?(s=h,a!=null&&(u=s(a)),f):s},f.context=function(h){return arguments.length?(h==null?a=u=null:u=s(a=h),f):a},f}class aN{constructor(e,r){this._context=e,this._x=r}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,r){switch(e=+e,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,r,e,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,e,this._y0,e,r);break}}this._x0=e,this._y0=r}}function I9(t){return new aN(t,!0)}function M9(t){return new aN(t,!1)}const qx={draw(t,e){const r=An(e/wd);t.moveTo(r,0),t.arc(0,0,r,0,Nh)}},L9={draw(t,e){const r=An(e/5)/2;t.moveTo(-3*r,-r),t.lineTo(-r,-r),t.lineTo(-r,-3*r),t.lineTo(r,-3*r),t.lineTo(r,-r),t.lineTo(3*r,-r),t.lineTo(3*r,r),t.lineTo(r,r),t.lineTo(r,3*r),t.lineTo(-r,3*r),t.lineTo(-r,r),t.lineTo(-3*r,r),t.closePath()}},oN=An(1/3),D9=oN*2,B9={draw(t,e){const r=An(e/D9),n=r*oN;t.moveTo(0,-r),t.lineTo(n,0),t.lineTo(0,r),t.lineTo(-n,0),t.closePath()}},z9={draw(t,e){const r=An(e),n=-r/2;t.rect(n,n,r,r)}},q9=.8908130915292852,sN=bd(wd/10)/bd(7*wd/10),U9=bd(Nh/10)*sN,F9=-ZR(Nh/10)*sN,H9={draw(t,e){const r=An(e*q9),n=U9*r,i=F9*r;t.moveTo(0,-r),t.lineTo(n,i);for(let a=1;a<5;++a){const s=Nh*a/5,u=ZR(s),c=bd(s);t.lineTo(c*r,-u*r),t.lineTo(u*n-c*i,c*n+u*i)}t.closePath()}},kv=An(3),W9={draw(t,e){const r=-An(e/(kv*3));t.moveTo(0,r*2),t.lineTo(-kv*r,-r),t.lineTo(kv*r,-r),t.closePath()}},Xr=-.5,Yr=An(3)/2,Fb=1/An(12),K9=(Fb/2+1)*3,V9={draw(t,e){const r=An(e/K9),n=r/2,i=r*Fb,a=n,s=r*Fb+r,u=-a,c=s;t.moveTo(n,i),t.lineTo(a,s),t.lineTo(u,c),t.lineTo(Xr*n-Yr*i,Yr*n+Xr*i),t.lineTo(Xr*a-Yr*s,Yr*a+Xr*s),t.lineTo(Xr*u-Yr*c,Yr*u+Xr*c),t.lineTo(Xr*n+Yr*i,Xr*i-Yr*n),t.lineTo(Xr*a+Yr*s,Xr*s-Yr*a),t.lineTo(Xr*u+Yr*c,Xr*c-Yr*u),t.closePath()}};function G9(t,e){let r=null,n=Bx(i);t=typeof t=="function"?t:ot(t||qx),e=typeof e=="function"?e:ot(e===void 0?64:+e);function i(){let a;if(r||(r=a=n()),t.apply(this,arguments).draw(r,+e.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(t=typeof a=="function"?a:ot(a),i):t},i.size=function(a){return arguments.length?(e=typeof a=="function"?a:ot(+a),i):e},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function xd(){}function _d(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function lN(t){this._context=t}lN.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:_d(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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);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:_d(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function X9(t){return new lN(t)}function uN(t){this._context=t}uN.prototype={areaStart:xd,areaEnd:xd,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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:_d(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Y9(t){return new uN(t)}function cN(t){this._context=t}cN.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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:_d(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function J9(t){return new cN(t)}function fN(t){this._context=t}fN.prototype={areaStart:xd,areaEnd:xd,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function Q9(t){return new fN(t)}function UO(t){return t<0?-1:1}function FO(t,e,r){var n=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(n||i<0&&-0),s=(r-t._y1)/(i||n<0&&-0),u=(a*i+s*n)/(n+i);return(UO(a)+UO(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(u))||0}function HO(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function Ev(t,e,r){var n=t._x0,i=t._y0,a=t._x1,s=t._y1,u=(a-n)/3;t._context.bezierCurveTo(n+u,i+u*e,a-u,s-u*r,a,s)}function Sd(t){this._context=t}Sd.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:Ev(this,this._t0,HO(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Ev(this,HO(this,r=FO(this,t,e)),r);break;default:Ev(this,this._t0,r=FO(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}};function dN(t){this._context=new hN(t)}(dN.prototype=Object.create(Sd.prototype)).point=function(t,e){Sd.prototype.point.call(this,e,t)};function hN(t){this._context=t}hN.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,r,n,i,a){this._context.bezierCurveTo(e,t,n,r,a,i)}};function Z9(t){return new Sd(t)}function eF(t){return new dN(t)}function pN(t){this._context=t}pN.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),r===2)this._context.lineTo(t[1],e[1]);else for(var n=WO(t),i=WO(e),a=0,s=1;s<r;++a,++s)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],t[s],e[s]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function WO(t){var e,r=t.length-1,n,i=new Array(r),a=new Array(r),s=new Array(r);for(i[0]=0,a[0]=2,s[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,s[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,s[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,s[e]-=n*s[e-1];for(i[r-1]=s[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(s[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}function tF(t){return new pN(t)}function Ih(t,e){this._context=t,this._t=e}Ih.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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}break}}this._x=t,this._y=e}};function rF(t){return new Ih(t,.5)}function nF(t){return new Ih(t,0)}function iF(t){return new Ih(t,1)}function ls(t,e){if((s=t.length)>1)for(var r=1,n,i,a=t[e[0]],s,u=a.length;r<s;++r)for(i=a,a=t[e[r]],n=0;n<u;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function Hb(t){for(var e=t.length,r=new Array(e);--e>=0;)r[e]=e;return r}function aF(t,e){return t[e]}function oF(t){const e=[];return e.key=t,e}function sF(){var t=ot([]),e=Hb,r=ls,n=aF;function i(a){var s=Array.from(t.apply(this,arguments),oF),u,c=s.length,f=-1,p;for(const h of a)for(u=0,++f;u<c;++u)(s[u][f]=[0,+n(h,s[u].key,f,a)]).data=h;for(u=0,p=zx(e(s));u<c;++u)s[p[u]].index=u;return r(s,p),s}return i.keys=function(a){return arguments.length?(t=typeof a=="function"?a:ot(Array.from(a)),i):t},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:ot(+a),i):n},i.order=function(a){return arguments.length?(e=a==null?Hb:typeof a=="function"?a:ot(Array.from(a)),i):e},i.offset=function(a){return arguments.length?(r=a??ls,i):r},i}function lF(t,e){if((n=t.length)>0){for(var r,n,i=0,a=t[0].length,s;i<a;++i){for(s=r=0;r<n;++r)s+=t[r][i][1]||0;if(s)for(r=0;r<n;++r)t[r][i][1]/=s}ls(t,e)}}function uF(t,e){if((i=t.length)>0){for(var r=0,n=t[e[0]],i,a=n.length;r<a;++r){for(var s=0,u=0;s<i;++s)u+=t[s][r][1]||0;n[r][1]+=n[r][0]=-u/2}ls(t,e)}}function cF(t,e){if(!(!((s=t.length)>0)||!((a=(i=t[e[0]]).length)>0))){for(var r=0,n=1,i,a,s;n<a;++n){for(var u=0,c=0,f=0;u<s;++u){for(var p=t[e[u]],h=p[n][1]||0,g=p[n-1][1]||0,v=(h-g)/2,b=0;b<u;++b){var x=t[e[b]],y=x[n][1]||0,k=x[n-1][1]||0;v+=y-k}c+=h,f+=v*h}i[n-1][1]+=i[n-1][0]=r,c&&(r-=f/c)}i[n-1][1]+=i[n-1][0]=r,ls(t,e)}}function yu(t){"@babel/helpers - typeof";return yu=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},yu(t)}var fF=["type","size","sizeType"];function Wb(){return Wb=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Wb.apply(this,arguments)}function KO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function VO(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?KO(Object(r),!0).forEach(function(n){dF(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):KO(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function dF(t,e,r){return e=hF(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function hF(t){var e=pF(t,"string");return yu(e)=="symbol"?e:e+""}function pF(t,e){if(yu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(yu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function mF(t,e){if(t==null)return{};var r=gF(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function gF(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}var mN={symbolCircle:qx,symbolCross:L9,symbolDiamond:B9,symbolSquare:z9,symbolStar:H9,symbolTriangle:W9,symbolWye:V9},vF=Math.PI/180,yF=function(e){var r="symbol".concat(Rh(e));return mN[r]||qx},bF=function(e,r,n){if(r==="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 i=18*vF;return 1.25*e*e*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),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}},wF=function(e,r){mN["symbol".concat(Rh(e))]=r},Ux=function(e){var r=e.type,n=r===void 0?"circle":r,i=e.size,a=i===void 0?64:i,s=e.sizeType,u=s===void 0?"area":s,c=mF(e,fF),f=VO(VO({},c),{},{type:n,size:a,sizeType:u}),p=function(){var y=yF(n),k=G9().type(y).size(bF(a,u,n));return k()},h=f.className,g=f.cx,v=f.cy,b=Oe(f,!0);return g===+g&&v===+v&&a===+a?M.createElement("path",Wb({},b,{className:De("recharts-symbols",h),transform:"translate(".concat(g,", ").concat(v,")"),d:p()})):null};Ux.registerSymbol=wF;function us(t){"@babel/helpers - typeof";return us=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},us(t)}function Kb(){return Kb=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Kb.apply(this,arguments)}function GO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function xF(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?GO(Object(r),!0).forEach(function(n){bu(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):GO(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function _F(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function SF(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,vN(n.key),n)}}function kF(t,e,r){return e&&SF(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function EF(t,e,r){return e=kd(e),OF(t,gN()?Reflect.construct(e,r||[],kd(t).constructor):e.apply(t,r))}function OF(t,e){if(e&&(us(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return AF(t)}function AF(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function gN(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(gN=function(){return!!t})()}function kd(t){return kd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},kd(t)}function PF(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Vb(t,e)}function Vb(t,e){return Vb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Vb(t,e)}function bu(t,e,r){return e=vN(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function vN(t){var e=TF(t,"string");return us(e)=="symbol"?e:e+""}function TF(t,e){if(us(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(us(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Jr=32,Fx=(function(t){function e(){return _F(this,e),EF(this,e,arguments)}return PF(e,t),kF(e,[{key:"renderIcon",value:function(n){var i=this.props.inactiveColor,a=Jr/2,s=Jr/6,u=Jr/3,c=n.inactive?i:n.color;if(n.type==="plainline")return M.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:a,x2:Jr,y2:a,className:"recharts-legend-icon"});if(n.type==="line")return M.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(a,"h").concat(u,`
|
|
426
|
-
A`).concat(s,",").concat(s,",0,1,1,").concat(2*u,",").concat(a,`
|
|
427
|
-
H`).concat(Jr,"M").concat(2*u,",").concat(a,`
|
|
428
|
-
A`).concat(s,",").concat(s,",0,1,1,").concat(u,",").concat(a),className:"recharts-legend-icon"});if(n.type==="rect")return M.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(Jr/8,"h").concat(Jr,"v").concat(Jr*3/4,"h").concat(-Jr,"z"),className:"recharts-legend-icon"});if(M.isValidElement(n.legendIcon)){var f=xF({},n);return delete f.legendIcon,M.cloneElement(n.legendIcon,f)}return M.createElement(Ux,{fill:c,cx:a,cy:a,size:Jr,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,i=this.props,a=i.payload,s=i.iconSize,u=i.layout,c=i.formatter,f=i.inactiveColor,p={x:0,y:0,width:Jr,height:Jr},h={display:u==="horizontal"?"inline-block":"block",marginRight:10},g={display:"inline-block",verticalAlign:"middle",marginRight:4};return a.map(function(v,b){var x=v.formatter||c,y=De(bu(bu({"recharts-legend-item":!0},"legend-item-".concat(b),!0),"inactive",v.inactive));if(v.type==="none")return null;var k=Ie(v.value)?null:v.value;hi(!Ie(v.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 O=v.inactive?f:v.color;return M.createElement("li",Kb({className:y,style:h,key:"legend-item-".concat(b)},Za(n.props,v,b)),M.createElement(Bb,{width:s,height:s,viewBox:p,style:g},n.renderIcon(v)),M.createElement("span",{className:"recharts-legend-item-text",style:{color:O}},x?x(k,v,b):k))})}},{key:"render",value:function(){var n=this.props,i=n.payload,a=n.layout,s=n.align;if(!i||!i.length)return null;var u={padding:0,margin:0,textAlign:a==="horizontal"?s:"left"};return M.createElement("ul",{className:"recharts-default-legend",style:u},this.renderItems())}}])})(R.PureComponent);bu(Fx,"displayName","Legend");bu(Fx,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var Ov,XO;function jF(){if(XO)return Ov;XO=1;var t=Th();function e(){this.__data__=new t,this.size=0}return Ov=e,Ov}var Av,YO;function CF(){if(YO)return Av;YO=1;function t(e){var r=this.__data__,n=r.delete(e);return this.size=r.size,n}return Av=t,Av}var Pv,JO;function RF(){if(JO)return Pv;JO=1;function t(e){return this.__data__.get(e)}return Pv=t,Pv}var Tv,QO;function NF(){if(QO)return Tv;QO=1;function t(e){return this.__data__.has(e)}return Tv=t,Tv}var jv,ZO;function $F(){if(ZO)return jv;ZO=1;var t=Th(),e=Nx(),r=$x(),n=200;function i(a,s){var u=this.__data__;if(u instanceof t){var c=u.__data__;if(!e||c.length<n-1)return c.push([a,s]),this.size=++u.size,this;u=this.__data__=new r(c)}return u.set(a,s),this.size=u.size,this}return jv=i,jv}var Cv,eA;function yN(){if(eA)return Cv;eA=1;var t=Th(),e=jF(),r=CF(),n=RF(),i=NF(),a=$F();function s(u){var c=this.__data__=new t(u);this.size=c.size}return s.prototype.clear=e,s.prototype.delete=r,s.prototype.get=n,s.prototype.has=i,s.prototype.set=a,Cv=s,Cv}var Rv,tA;function IF(){if(tA)return Rv;tA=1;var t="__lodash_hash_undefined__";function e(r){return this.__data__.set(r,t),this}return Rv=e,Rv}var Nv,rA;function MF(){if(rA)return Nv;rA=1;function t(e){return this.__data__.has(e)}return Nv=t,Nv}var $v,nA;function bN(){if(nA)return $v;nA=1;var t=$x(),e=IF(),r=MF();function n(i){var a=-1,s=i==null?0:i.length;for(this.__data__=new t;++a<s;)this.add(i[a])}return n.prototype.add=n.prototype.push=e,n.prototype.has=r,$v=n,$v}var Iv,iA;function wN(){if(iA)return Iv;iA=1;function t(e,r){for(var n=-1,i=e==null?0:e.length;++n<i;)if(r(e[n],n,e))return!0;return!1}return Iv=t,Iv}var Mv,aA;function xN(){if(aA)return Mv;aA=1;function t(e,r){return e.has(r)}return Mv=t,Mv}var Lv,oA;function _N(){if(oA)return Lv;oA=1;var t=bN(),e=wN(),r=xN(),n=1,i=2;function a(s,u,c,f,p,h){var g=c&n,v=s.length,b=u.length;if(v!=b&&!(g&&b>v))return!1;var x=h.get(s),y=h.get(u);if(x&&y)return x==u&&y==s;var k=-1,O=!0,A=c&i?new t:void 0;for(h.set(s,u),h.set(u,s);++k<v;){var T=s[k],E=u[k];if(f)var P=g?f(E,T,k,u,s,h):f(T,E,k,s,u,h);if(P!==void 0){if(P)continue;O=!1;break}if(A){if(!e(u,function(C,N){if(!r(A,N)&&(T===C||p(T,C,c,f,h)))return A.push(N)})){O=!1;break}}else if(!(T===E||p(T,E,c,f,h))){O=!1;break}}return h.delete(s),h.delete(u),O}return Lv=a,Lv}var Dv,sA;function LF(){if(sA)return Dv;sA=1;var t=Wn(),e=t.Uint8Array;return Dv=e,Dv}var Bv,lA;function DF(){if(lA)return Bv;lA=1;function t(e){var r=-1,n=Array(e.size);return e.forEach(function(i,a){n[++r]=[a,i]}),n}return Bv=t,Bv}var zv,uA;function Hx(){if(uA)return zv;uA=1;function t(e){var r=-1,n=Array(e.size);return e.forEach(function(i){n[++r]=i}),n}return zv=t,zv}var qv,cA;function BF(){if(cA)return qv;cA=1;var t=nc(),e=LF(),r=Rx(),n=_N(),i=DF(),a=Hx(),s=1,u=2,c="[object Boolean]",f="[object Date]",p="[object Error]",h="[object Map]",g="[object Number]",v="[object RegExp]",b="[object Set]",x="[object String]",y="[object Symbol]",k="[object ArrayBuffer]",O="[object DataView]",A=t?t.prototype:void 0,T=A?A.valueOf:void 0;function E(P,C,N,L,V,$,I){switch(N){case O:if(P.byteLength!=C.byteLength||P.byteOffset!=C.byteOffset)return!1;P=P.buffer,C=C.buffer;case k:return!(P.byteLength!=C.byteLength||!$(new e(P),new e(C)));case c:case f:case g:return r(+P,+C);case p:return P.name==C.name&&P.message==C.message;case v:case x:return P==C+"";case h:var q=i;case b:var U=L&s;if(q||(q=a),P.size!=C.size&&!U)return!1;var K=I.get(P);if(K)return K==C;L|=u,I.set(P,C);var G=n(q(P),q(C),L,V,$,I);return I.delete(P),G;case y:if(T)return T.call(P)==T.call(C)}return!1}return qv=E,qv}var Uv,fA;function SN(){if(fA)return Uv;fA=1;function t(e,r){for(var n=-1,i=r.length,a=e.length;++n<i;)e[a+n]=r[n];return e}return Uv=t,Uv}var Fv,dA;function zF(){if(dA)return Fv;dA=1;var t=SN(),e=Or();function r(n,i,a){var s=i(n);return e(n)?s:t(s,a(n))}return Fv=r,Fv}var Hv,hA;function qF(){if(hA)return Hv;hA=1;function t(e,r){for(var n=-1,i=e==null?0:e.length,a=0,s=[];++n<i;){var u=e[n];r(u,n,e)&&(s[a++]=u)}return s}return Hv=t,Hv}var Wv,pA;function UF(){if(pA)return Wv;pA=1;function t(){return[]}return Wv=t,Wv}var Kv,mA;function FF(){if(mA)return Kv;mA=1;var t=qF(),e=UF(),r=Object.prototype,n=r.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(s){return s==null?[]:(s=Object(s),t(i(s),function(u){return n.call(s,u)}))}:e;return Kv=a,Kv}var Vv,gA;function HF(){if(gA)return Vv;gA=1;function t(e,r){for(var n=-1,i=Array(e);++n<e;)i[n]=r(n);return i}return Vv=t,Vv}var Gv,vA;function WF(){if(vA)return Gv;vA=1;var t=xi(),e=_i(),r="[object Arguments]";function n(i){return e(i)&&t(i)==r}return Gv=n,Gv}var Xv,yA;function Wx(){if(yA)return Xv;yA=1;var t=WF(),e=_i(),r=Object.prototype,n=r.hasOwnProperty,i=r.propertyIsEnumerable,a=t((function(){return arguments})())?t:function(s){return e(s)&&n.call(s,"callee")&&!i.call(s,"callee")};return Xv=a,Xv}var Zl={exports:{}},Yv,bA;function KF(){if(bA)return Yv;bA=1;function t(){return!1}return Yv=t,Yv}Zl.exports;var wA;function kN(){return wA||(wA=1,(function(t,e){var r=Wn(),n=KF(),i=e&&!e.nodeType&&e,a=i&&!0&&t&&!t.nodeType&&t,s=a&&a.exports===i,u=s?r.Buffer:void 0,c=u?u.isBuffer:void 0,f=c||n;t.exports=f})(Zl,Zl.exports)),Zl.exports}var Jv,xA;function Kx(){if(xA)return Jv;xA=1;var t=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function r(n,i){var a=typeof n;return i=i??t,!!i&&(a=="number"||a!="symbol"&&e.test(n))&&n>-1&&n%1==0&&n<i}return Jv=r,Jv}var Qv,_A;function Vx(){if(_A)return Qv;_A=1;var t=9007199254740991;function e(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=t}return Qv=e,Qv}var Zv,SA;function VF(){if(SA)return Zv;SA=1;var t=xi(),e=Vx(),r=_i(),n="[object Arguments]",i="[object Array]",a="[object Boolean]",s="[object Date]",u="[object Error]",c="[object Function]",f="[object Map]",p="[object Number]",h="[object Object]",g="[object RegExp]",v="[object Set]",b="[object String]",x="[object WeakMap]",y="[object ArrayBuffer]",k="[object DataView]",O="[object Float32Array]",A="[object Float64Array]",T="[object Int8Array]",E="[object Int16Array]",P="[object Int32Array]",C="[object Uint8Array]",N="[object Uint8ClampedArray]",L="[object Uint16Array]",V="[object Uint32Array]",$={};$[O]=$[A]=$[T]=$[E]=$[P]=$[C]=$[N]=$[L]=$[V]=!0,$[n]=$[i]=$[y]=$[a]=$[k]=$[s]=$[u]=$[c]=$[f]=$[p]=$[h]=$[g]=$[v]=$[b]=$[x]=!1;function I(q){return r(q)&&e(q.length)&&!!$[t(q)]}return Zv=I,Zv}var ey,kA;function EN(){if(kA)return ey;kA=1;function t(e){return function(r){return e(r)}}return ey=t,ey}var eu={exports:{}};eu.exports;var EA;function GF(){return EA||(EA=1,(function(t,e){var r=WR(),n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===n,s=a&&r.process,u=(function(){try{var c=i&&i.require&&i.require("util").types;return c||s&&s.binding&&s.binding("util")}catch{}})();t.exports=u})(eu,eu.exports)),eu.exports}var ty,OA;function ON(){if(OA)return ty;OA=1;var t=VF(),e=EN(),r=GF(),n=r&&r.isTypedArray,i=n?e(n):t;return ty=i,ty}var ry,AA;function XF(){if(AA)return ry;AA=1;var t=HF(),e=Wx(),r=Or(),n=kN(),i=Kx(),a=ON(),s=Object.prototype,u=s.hasOwnProperty;function c(f,p){var h=r(f),g=!h&&e(f),v=!h&&!g&&n(f),b=!h&&!g&&!v&&a(f),x=h||g||v||b,y=x?t(f.length,String):[],k=y.length;for(var O in f)(p||u.call(f,O))&&!(x&&(O=="length"||v&&(O=="offset"||O=="parent")||b&&(O=="buffer"||O=="byteLength"||O=="byteOffset")||i(O,k)))&&y.push(O);return y}return ry=c,ry}var ny,PA;function YF(){if(PA)return ny;PA=1;var t=Object.prototype;function e(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||t;return r===i}return ny=e,ny}var iy,TA;function AN(){if(TA)return iy;TA=1;function t(e,r){return function(n){return e(r(n))}}return iy=t,iy}var ay,jA;function JF(){if(jA)return ay;jA=1;var t=AN(),e=t(Object.keys,Object);return ay=e,ay}var oy,CA;function QF(){if(CA)return oy;CA=1;var t=YF(),e=JF(),r=Object.prototype,n=r.hasOwnProperty;function i(a){if(!t(a))return e(a);var s=[];for(var u in Object(a))n.call(a,u)&&u!="constructor"&&s.push(u);return s}return oy=i,oy}var sy,RA;function ic(){if(RA)return sy;RA=1;var t=Cx(),e=Vx();function r(n){return n!=null&&e(n.length)&&!t(n)}return sy=r,sy}var ly,NA;function Mh(){if(NA)return ly;NA=1;var t=XF(),e=QF(),r=ic();function n(i){return r(i)?t(i):e(i)}return ly=n,ly}var uy,$A;function ZF(){if($A)return uy;$A=1;var t=zF(),e=FF(),r=Mh();function n(i){return t(i,r,e)}return uy=n,uy}var cy,IA;function e7(){if(IA)return cy;IA=1;var t=ZF(),e=1,r=Object.prototype,n=r.hasOwnProperty;function i(a,s,u,c,f,p){var h=u&e,g=t(a),v=g.length,b=t(s),x=b.length;if(v!=x&&!h)return!1;for(var y=v;y--;){var k=g[y];if(!(h?k in s:n.call(s,k)))return!1}var O=p.get(a),A=p.get(s);if(O&&A)return O==s&&A==a;var T=!0;p.set(a,s),p.set(s,a);for(var E=h;++y<v;){k=g[y];var P=a[k],C=s[k];if(c)var N=h?c(C,P,k,s,a,p):c(P,C,k,a,s,p);if(!(N===void 0?P===C||f(P,C,u,c,p):N)){T=!1;break}E||(E=k=="constructor")}if(T&&!E){var L=a.constructor,V=s.constructor;L!=V&&"constructor"in a&&"constructor"in s&&!(typeof L=="function"&&L instanceof L&&typeof V=="function"&&V instanceof V)&&(T=!1)}return p.delete(a),p.delete(s),T}return cy=i,cy}var fy,MA;function t7(){if(MA)return fy;MA=1;var t=ao(),e=Wn(),r=t(e,"DataView");return fy=r,fy}var dy,LA;function r7(){if(LA)return dy;LA=1;var t=ao(),e=Wn(),r=t(e,"Promise");return dy=r,dy}var hy,DA;function PN(){if(DA)return hy;DA=1;var t=ao(),e=Wn(),r=t(e,"Set");return hy=r,hy}var py,BA;function n7(){if(BA)return py;BA=1;var t=ao(),e=Wn(),r=t(e,"WeakMap");return py=r,py}var my,zA;function i7(){if(zA)return my;zA=1;var t=t7(),e=Nx(),r=r7(),n=PN(),i=n7(),a=xi(),s=KR(),u="[object Map]",c="[object Object]",f="[object Promise]",p="[object Set]",h="[object WeakMap]",g="[object DataView]",v=s(t),b=s(e),x=s(r),y=s(n),k=s(i),O=a;return(t&&O(new t(new ArrayBuffer(1)))!=g||e&&O(new e)!=u||r&&O(r.resolve())!=f||n&&O(new n)!=p||i&&O(new i)!=h)&&(O=function(A){var T=a(A),E=T==c?A.constructor:void 0,P=E?s(E):"";if(P)switch(P){case v:return g;case b:return u;case x:return f;case y:return p;case k:return h}return T}),my=O,my}var gy,qA;function a7(){if(qA)return gy;qA=1;var t=yN(),e=_N(),r=BF(),n=e7(),i=i7(),a=Or(),s=kN(),u=ON(),c=1,f="[object Arguments]",p="[object Array]",h="[object Object]",g=Object.prototype,v=g.hasOwnProperty;function b(x,y,k,O,A,T){var E=a(x),P=a(y),C=E?p:i(x),N=P?p:i(y);C=C==f?h:C,N=N==f?h:N;var L=C==h,V=N==h,$=C==N;if($&&s(x)){if(!s(y))return!1;E=!0,L=!1}if($&&!L)return T||(T=new t),E||u(x)?e(x,y,k,O,A,T):r(x,y,C,k,O,A,T);if(!(k&c)){var I=L&&v.call(x,"__wrapped__"),q=V&&v.call(y,"__wrapped__");if(I||q){var U=I?x.value():x,K=q?y.value():y;return T||(T=new t),A(U,K,k,O,T)}}return $?(T||(T=new t),n(x,y,k,O,A,T)):!1}return gy=b,gy}var vy,UA;function Gx(){if(UA)return vy;UA=1;var t=a7(),e=_i();function r(n,i,a,s,u){return n===i?!0:n==null||i==null||!e(n)&&!e(i)?n!==n&&i!==i:t(n,i,a,s,r,u)}return vy=r,vy}var yy,FA;function o7(){if(FA)return yy;FA=1;var t=yN(),e=Gx(),r=1,n=2;function i(a,s,u,c){var f=u.length,p=f,h=!c;if(a==null)return!p;for(a=Object(a);f--;){var g=u[f];if(h&&g[2]?g[1]!==a[g[0]]:!(g[0]in a))return!1}for(;++f<p;){g=u[f];var v=g[0],b=a[v],x=g[1];if(h&&g[2]){if(b===void 0&&!(v in a))return!1}else{var y=new t;if(c)var k=c(b,x,v,a,s,y);if(!(k===void 0?e(x,b,r|n,c,y):k))return!1}}return!0}return yy=i,yy}var by,HA;function TN(){if(HA)return by;HA=1;var t=la();function e(r){return r===r&&!t(r)}return by=e,by}var wy,WA;function s7(){if(WA)return wy;WA=1;var t=TN(),e=Mh();function r(n){for(var i=e(n),a=i.length;a--;){var s=i[a],u=n[s];i[a]=[s,u,t(u)]}return i}return wy=r,wy}var xy,KA;function jN(){if(KA)return xy;KA=1;function t(e,r){return function(n){return n==null?!1:n[e]===r&&(r!==void 0||e in Object(n))}}return xy=t,xy}var _y,VA;function l7(){if(VA)return _y;VA=1;var t=o7(),e=s7(),r=jN();function n(i){var a=e(i);return a.length==1&&a[0][2]?r(a[0][0],a[0][1]):function(s){return s===i||t(s,i,a)}}return _y=n,_y}var Sy,GA;function u7(){if(GA)return Sy;GA=1;function t(e,r){return e!=null&&r in Object(e)}return Sy=t,Sy}var ky,XA;function c7(){if(XA)return ky;XA=1;var t=XR(),e=Wx(),r=Or(),n=Kx(),i=Vx(),a=Ch();function s(u,c,f){c=t(c,u);for(var p=-1,h=c.length,g=!1;++p<h;){var v=a(c[p]);if(!(g=u!=null&&f(u,v)))break;u=u[v]}return g||++p!=h?g:(h=u==null?0:u.length,!!h&&i(h)&&n(v,h)&&(r(u)||e(u)))}return ky=s,ky}var Ey,YA;function f7(){if(YA)return Ey;YA=1;var t=u7(),e=c7();function r(n,i){return n!=null&&e(n,i,t)}return Ey=r,Ey}var Oy,JA;function d7(){if(JA)return Oy;JA=1;var t=Gx(),e=YR(),r=f7(),n=jx(),i=TN(),a=jN(),s=Ch(),u=1,c=2;function f(p,h){return n(p)&&i(h)?a(s(p),h):function(g){var v=e(g,p);return v===void 0&&v===h?r(g,p):t(h,v,u|c)}}return Oy=f,Oy}var Ay,QA;function Hs(){if(QA)return Ay;QA=1;function t(e){return e}return Ay=t,Ay}var Py,ZA;function h7(){if(ZA)return Py;ZA=1;function t(e){return function(r){return r==null?void 0:r[e]}}return Py=t,Py}var Ty,eP;function p7(){if(eP)return Ty;eP=1;var t=Mx();function e(r){return function(n){return t(n,r)}}return Ty=e,Ty}var jy,tP;function m7(){if(tP)return jy;tP=1;var t=h7(),e=p7(),r=jx(),n=Ch();function i(a){return r(a)?t(n(a)):e(a)}return jy=i,jy}var Cy,rP;function Kn(){if(rP)return Cy;rP=1;var t=l7(),e=d7(),r=Hs(),n=Or(),i=m7();function a(s){return typeof s=="function"?s:s==null?r:typeof s=="object"?n(s)?e(s[0],s[1]):t(s):i(s)}return Cy=a,Cy}var Ry,nP;function CN(){if(nP)return Ry;nP=1;function t(e,r,n,i){for(var a=e.length,s=n+(i?1:-1);i?s--:++s<a;)if(r(e[s],s,e))return s;return-1}return Ry=t,Ry}var Ny,iP;function g7(){if(iP)return Ny;iP=1;function t(e){return e!==e}return Ny=t,Ny}var $y,aP;function v7(){if(aP)return $y;aP=1;function t(e,r,n){for(var i=n-1,a=e.length;++i<a;)if(e[i]===r)return i;return-1}return $y=t,$y}var Iy,oP;function y7(){if(oP)return Iy;oP=1;var t=CN(),e=g7(),r=v7();function n(i,a,s){return a===a?r(i,a,s):t(i,e,s)}return Iy=n,Iy}var My,sP;function b7(){if(sP)return My;sP=1;var t=y7();function e(r,n){var i=r==null?0:r.length;return!!i&&t(r,n,0)>-1}return My=e,My}var Ly,lP;function w7(){if(lP)return Ly;lP=1;function t(e,r,n){for(var i=-1,a=e==null?0:e.length;++i<a;)if(n(r,e[i]))return!0;return!1}return Ly=t,Ly}var Dy,uP;function x7(){if(uP)return Dy;uP=1;function t(){}return Dy=t,Dy}var By,cP;function _7(){if(cP)return By;cP=1;var t=PN(),e=x7(),r=Hx(),n=1/0,i=t&&1/r(new t([,-0]))[1]==n?function(a){return new t(a)}:e;return By=i,By}var zy,fP;function S7(){if(fP)return zy;fP=1;var t=bN(),e=b7(),r=w7(),n=xN(),i=_7(),a=Hx(),s=200;function u(c,f,p){var h=-1,g=e,v=c.length,b=!0,x=[],y=x;if(p)b=!1,g=r;else if(v>=s){var k=f?null:i(c);if(k)return a(k);b=!1,g=n,y=new t}else y=f?[]:x;e:for(;++h<v;){var O=c[h],A=f?f(O):O;if(O=p||O!==0?O:0,b&&A===A){for(var T=y.length;T--;)if(y[T]===A)continue e;f&&y.push(A),x.push(O)}else g(y,A,p)||(y!==x&&y.push(A),x.push(O))}return x}return zy=u,zy}var qy,dP;function k7(){if(dP)return qy;dP=1;var t=Kn(),e=S7();function r(n,i){return n&&n.length?e(n,t(i,2)):[]}return qy=r,qy}var E7=k7();const hP=Qe(E7);function RN(t,e,r){return e===!0?hP(t,r):Ie(e)?hP(t,e):t}function cs(t){"@babel/helpers - typeof";return cs=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},cs(t)}var O7=["ref"];function pP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function ii(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?pP(Object(r),!0).forEach(function(n){Lh(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pP(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function A7(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function mP(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,$N(n.key),n)}}function P7(t,e,r){return e&&mP(t.prototype,e),r&&mP(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function T7(t,e,r){return e=Ed(e),j7(t,NN()?Reflect.construct(e,r||[],Ed(t).constructor):e.apply(t,r))}function j7(t,e){if(e&&(cs(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return C7(t)}function C7(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function NN(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(NN=function(){return!!t})()}function Ed(t){return Ed=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ed(t)}function R7(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gb(t,e)}function Gb(t,e){return Gb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Gb(t,e)}function Lh(t,e,r){return e=$N(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $N(t){var e=N7(t,"string");return cs(e)=="symbol"?e:e+""}function N7(t,e){if(cs(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(cs(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function $7(t,e){if(t==null)return{};var r=I7(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function I7(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function M7(t){return t.value}function L7(t,e){if(M.isValidElement(t))return M.cloneElement(t,e);if(typeof t=="function")return M.createElement(t,e);e.ref;var r=$7(e,O7);return M.createElement(Fx,r)}var gP=1,ns=(function(t){function e(){var r;A7(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=T7(this,e,[].concat(i)),Lh(r,"lastBoundingBox",{width:-1,height:-1}),r}return R7(e,t),P7(e,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();return n.height=this.wrapperNode.offsetHeight,n.width=this.wrapperNode.offsetWidth,n}return null}},{key:"updateBBox",value:function(){var n=this.props.onBBoxUpdate,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>gP||Math.abs(i.height-this.lastBoundingBox.height)>gP)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,n&&n(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?ii({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,a=i.layout,s=i.align,u=i.verticalAlign,c=i.margin,f=i.chartWidth,p=i.chartHeight,h,g;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(s==="center"&&a==="vertical"){var v=this.getBBoxSnapshot();h={left:((f||0)-v.width)/2}}else h=s==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(u==="middle"){var b=this.getBBoxSnapshot();g={top:((p||0)-b.height)/2}}else g=u==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return ii(ii({},h),g)}},{key:"render",value:function(){var n=this,i=this.props,a=i.content,s=i.width,u=i.height,c=i.wrapperStyle,f=i.payloadUniqBy,p=i.payload,h=ii(ii({position:"absolute",width:s||"auto",height:u||"auto"},this.getDefaultPosition(c)),c);return M.createElement("div",{className:"recharts-legend-wrapper",style:h,ref:function(v){n.wrapperNode=v}},L7(a,ii(ii({},this.props),{},{payload:RN(p,f,M7)})))}}],[{key:"getWithHeight",value:function(n,i){var a=ii(ii({},this.defaultProps),n.props),s=a.layout;return s==="vertical"&&fe(n.props.height)?{height:n.props.height}:s==="horizontal"?{width:n.props.width||i}:null}}])})(R.PureComponent);Lh(ns,"displayName","Legend");Lh(ns,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Uy,vP;function D7(){if(vP)return Uy;vP=1;var t=nc(),e=Wx(),r=Or(),n=t?t.isConcatSpreadable:void 0;function i(a){return r(a)||e(a)||!!(n&&a&&a[n])}return Uy=i,Uy}var Fy,yP;function IN(){if(yP)return Fy;yP=1;var t=SN(),e=D7();function r(n,i,a,s,u){var c=-1,f=n.length;for(a||(a=e),u||(u=[]);++c<f;){var p=n[c];i>0&&a(p)?i>1?r(p,i-1,a,s,u):t(u,p):s||(u[u.length]=p)}return u}return Fy=r,Fy}var Hy,bP;function B7(){if(bP)return Hy;bP=1;function t(e){return function(r,n,i){for(var a=-1,s=Object(r),u=i(r),c=u.length;c--;){var f=u[e?c:++a];if(n(s[f],f,s)===!1)break}return r}}return Hy=t,Hy}var Wy,wP;function z7(){if(wP)return Wy;wP=1;var t=B7(),e=t();return Wy=e,Wy}var Ky,xP;function MN(){if(xP)return Ky;xP=1;var t=z7(),e=Mh();function r(n,i){return n&&t(n,i,e)}return Ky=r,Ky}var Vy,_P;function q7(){if(_P)return Vy;_P=1;var t=ic();function e(r,n){return function(i,a){if(i==null)return i;if(!t(i))return r(i,a);for(var s=i.length,u=n?s:-1,c=Object(i);(n?u--:++u<s)&&a(c[u],u,c)!==!1;);return i}}return Vy=e,Vy}var Gy,SP;function Xx(){if(SP)return Gy;SP=1;var t=MN(),e=q7(),r=e(t);return Gy=r,Gy}var Xy,kP;function LN(){if(kP)return Xy;kP=1;var t=Xx(),e=ic();function r(n,i){var a=-1,s=e(n)?Array(n.length):[];return t(n,function(u,c,f){s[++a]=i(u,c,f)}),s}return Xy=r,Xy}var Yy,EP;function U7(){if(EP)return Yy;EP=1;function t(e,r){var n=e.length;for(e.sort(r);n--;)e[n]=e[n].value;return e}return Yy=t,Yy}var Jy,OP;function F7(){if(OP)return Jy;OP=1;var t=zs();function e(r,n){if(r!==n){var i=r!==void 0,a=r===null,s=r===r,u=t(r),c=n!==void 0,f=n===null,p=n===n,h=t(n);if(!f&&!h&&!u&&r>n||u&&c&&p&&!f&&!h||a&&c&&p||!i&&p||!s)return 1;if(!a&&!u&&!h&&r<n||h&&i&&s&&!a&&!u||f&&i&&s||!c&&s||!p)return-1}return 0}return Jy=e,Jy}var Qy,AP;function H7(){if(AP)return Qy;AP=1;var t=F7();function e(r,n,i){for(var a=-1,s=r.criteria,u=n.criteria,c=s.length,f=i.length;++a<c;){var p=t(s[a],u[a]);if(p){if(a>=f)return p;var h=i[a];return p*(h=="desc"?-1:1)}}return r.index-n.index}return Qy=e,Qy}var Zy,PP;function W7(){if(PP)return Zy;PP=1;var t=Ix(),e=Mx(),r=Kn(),n=LN(),i=U7(),a=EN(),s=H7(),u=Hs(),c=Or();function f(p,h,g){h.length?h=t(h,function(x){return c(x)?function(y){return e(y,x.length===1?x[0]:x)}:x}):h=[u];var v=-1;h=t(h,a(r));var b=n(p,function(x,y,k){var O=t(h,function(A){return A(x)});return{criteria:O,index:++v,value:x}});return i(b,function(x,y){return s(x,y,g)})}return Zy=f,Zy}var e0,TP;function K7(){if(TP)return e0;TP=1;function t(e,r,n){switch(n.length){case 0:return e.call(r);case 1:return e.call(r,n[0]);case 2:return e.call(r,n[0],n[1]);case 3:return e.call(r,n[0],n[1],n[2])}return e.apply(r,n)}return e0=t,e0}var t0,jP;function V7(){if(jP)return t0;jP=1;var t=K7(),e=Math.max;function r(n,i,a){return i=e(i===void 0?n.length-1:i,0),function(){for(var s=arguments,u=-1,c=e(s.length-i,0),f=Array(c);++u<c;)f[u]=s[i+u];u=-1;for(var p=Array(i+1);++u<i;)p[u]=s[u];return p[i]=a(f),t(n,this,p)}}return t0=r,t0}var r0,CP;function G7(){if(CP)return r0;CP=1;function t(e){return function(){return e}}return r0=t,r0}var n0,RP;function DN(){if(RP)return n0;RP=1;var t=ao(),e=(function(){try{var r=t(Object,"defineProperty");return r({},"",{}),r}catch{}})();return n0=e,n0}var i0,NP;function X7(){if(NP)return i0;NP=1;var t=G7(),e=DN(),r=Hs(),n=e?function(i,a){return e(i,"toString",{configurable:!0,enumerable:!1,value:t(a),writable:!0})}:r;return i0=n,i0}var a0,$P;function Y7(){if($P)return a0;$P=1;var t=800,e=16,r=Date.now;function n(i){var a=0,s=0;return function(){var u=r(),c=e-(u-s);if(s=u,c>0){if(++a>=t)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return a0=n,a0}var o0,IP;function J7(){if(IP)return o0;IP=1;var t=X7(),e=Y7(),r=e(t);return o0=r,o0}var s0,MP;function Q7(){if(MP)return s0;MP=1;var t=Hs(),e=V7(),r=J7();function n(i,a){return r(e(i,a,t),i+"")}return s0=n,s0}var l0,LP;function Dh(){if(LP)return l0;LP=1;var t=Rx(),e=ic(),r=Kx(),n=la();function i(a,s,u){if(!n(u))return!1;var c=typeof s;return(c=="number"?e(u)&&r(s,u.length):c=="string"&&s in u)?t(u[s],a):!1}return l0=i,l0}var u0,DP;function Z7(){if(DP)return u0;DP=1;var t=IN(),e=W7(),r=Q7(),n=Dh(),i=r(function(a,s){if(a==null)return[];var u=s.length;return u>1&&n(a,s[0],s[1])?s=[]:u>2&&n(s[0],s[1],s[2])&&(s=[s[0]]),e(a,t(s,1),[])});return u0=i,u0}var eH=Z7();const Yx=Qe(eH);function wu(t){"@babel/helpers - typeof";return wu=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},wu(t)}function Xb(){return Xb=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Xb.apply(this,arguments)}function tH(t,e){return aH(t)||iH(t,e)||nH(t,e)||rH()}function rH(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
429
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nH(t,e){if(t){if(typeof t=="string")return BP(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return BP(t,e)}}function BP(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function iH(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function aH(t){if(Array.isArray(t))return t}function zP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function c0(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?zP(Object(r),!0).forEach(function(n){oH(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):zP(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function oH(t,e,r){return e=sH(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function sH(t){var e=lH(t,"string");return wu(e)=="symbol"?e:e+""}function lH(t,e){if(wu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(wu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function uH(t){return Array.isArray(t)&&Bt(t[0])&&Bt(t[1])?t.join(" ~ "):t}var cH=function(e){var r=e.separator,n=r===void 0?" : ":r,i=e.contentStyle,a=i===void 0?{}:i,s=e.itemStyle,u=s===void 0?{}:s,c=e.labelStyle,f=c===void 0?{}:c,p=e.payload,h=e.formatter,g=e.itemSorter,v=e.wrapperClassName,b=e.labelClassName,x=e.label,y=e.labelFormatter,k=e.accessibilityLayer,O=k===void 0?!1:k,A=function(){if(p&&p.length){var I={padding:0,margin:0},q=(g?Yx(p,g):p).map(function(U,K){if(U.type==="none")return null;var G=c0({display:"block",paddingTop:4,paddingBottom:4,color:U.color||"#000"},u),Z=U.formatter||h||uH,X=U.value,te=U.name,H=X,z=te;if(Z&&H!=null&&z!=null){var B=Z(X,te,U,K,p);if(Array.isArray(B)){var J=tH(B,2);H=J[0],z=J[1]}else H=B}return M.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(K),style:G},Bt(z)?M.createElement("span",{className:"recharts-tooltip-item-name"},z):null,Bt(z)?M.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,M.createElement("span",{className:"recharts-tooltip-item-value"},H),M.createElement("span",{className:"recharts-tooltip-item-unit"},U.unit||""))});return M.createElement("ul",{className:"recharts-tooltip-item-list",style:I},q)}return null},T=c0({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},a),E=c0({margin:0},f),P=!Le(x),C=P?x:"",N=De("recharts-default-tooltip",v),L=De("recharts-tooltip-label",b);P&&y&&p!==void 0&&p!==null&&(C=y(x,p));var V=O?{role:"status","aria-live":"assertive"}:{};return M.createElement("div",Xb({className:N,style:T},V),M.createElement("p",{className:L,style:E},M.isValidElement(C)?C:"".concat(C)),A())};function xu(t){"@babel/helpers - typeof";return xu=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},xu(t)}function If(t,e,r){return e=fH(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function fH(t){var e=dH(t,"string");return xu(e)=="symbol"?e:e+""}function dH(t,e){if(xu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(xu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Bl="recharts-tooltip-wrapper",hH={visibility:"hidden"};function pH(t){var e=t.coordinate,r=t.translateX,n=t.translateY;return De(Bl,If(If(If(If({},"".concat(Bl,"-right"),fe(r)&&e&&fe(e.x)&&r>=e.x),"".concat(Bl,"-left"),fe(r)&&e&&fe(e.x)&&r<e.x),"".concat(Bl,"-bottom"),fe(n)&&e&&fe(e.y)&&n>=e.y),"".concat(Bl,"-top"),fe(n)&&e&&fe(e.y)&&n<e.y))}function qP(t){var e=t.allowEscapeViewBox,r=t.coordinate,n=t.key,i=t.offsetTopLeft,a=t.position,s=t.reverseDirection,u=t.tooltipDimension,c=t.viewBox,f=t.viewBoxDimension;if(a&&fe(a[n]))return a[n];var p=r[n]-u-i,h=r[n]+i;if(e[n])return s[n]?p:h;if(s[n]){var g=p,v=c[n];return g<v?Math.max(h,c[n]):Math.max(p,c[n])}var b=h+u,x=c[n]+f;return b>x?Math.max(p,c[n]):Math.max(h,c[n])}function mH(t){var e=t.translateX,r=t.translateY,n=t.useTranslate3d;return{transform:n?"translate3d(".concat(e,"px, ").concat(r,"px, 0)"):"translate(".concat(e,"px, ").concat(r,"px)")}}function gH(t){var e=t.allowEscapeViewBox,r=t.coordinate,n=t.offsetTopLeft,i=t.position,a=t.reverseDirection,s=t.tooltipBox,u=t.useTranslate3d,c=t.viewBox,f,p,h;return s.height>0&&s.width>0&&r?(p=qP({allowEscapeViewBox:e,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:s.width,viewBox:c,viewBoxDimension:c.width}),h=qP({allowEscapeViewBox:e,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:s.height,viewBox:c,viewBoxDimension:c.height}),f=mH({translateX:p,translateY:h,useTranslate3d:u})):f=hH,{cssProperties:f,cssClasses:pH({translateX:p,translateY:h,coordinate:r})}}function fs(t){"@babel/helpers - typeof";return fs=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},fs(t)}function UP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function FP(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?UP(Object(r),!0).forEach(function(n){Jb(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):UP(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function vH(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function yH(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,zN(n.key),n)}}function bH(t,e,r){return e&&yH(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function wH(t,e,r){return e=Od(e),xH(t,BN()?Reflect.construct(e,r||[],Od(t).constructor):e.apply(t,r))}function xH(t,e){if(e&&(fs(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _H(t)}function _H(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function BN(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(BN=function(){return!!t})()}function Od(t){return Od=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Od(t)}function SH(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Yb(t,e)}function Yb(t,e){return Yb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Yb(t,e)}function Jb(t,e,r){return e=zN(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function zN(t){var e=kH(t,"string");return fs(e)=="symbol"?e:e+""}function kH(t,e){if(fs(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(fs(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var HP=1,EH=(function(t){function e(){var r;vH(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=wH(this,e,[].concat(i)),Jb(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),Jb(r,"handleKeyDown",function(s){if(s.key==="Escape"){var u,c,f,p;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(u=(c=r.props.coordinate)===null||c===void 0?void 0:c.x)!==null&&u!==void 0?u:0,y:(f=(p=r.props.coordinate)===null||p===void 0?void 0:p.y)!==null&&f!==void 0?f:0}})}}),r}return SH(e,t),bH(e,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>HP||Math.abs(n.height-this.state.lastBoundingBox.height)>HP)&&this.setState({lastBoundingBox:{width:n.width,height:n.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(){var n,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,i=this.props,a=i.active,s=i.allowEscapeViewBox,u=i.animationDuration,c=i.animationEasing,f=i.children,p=i.coordinate,h=i.hasPayload,g=i.isAnimationActive,v=i.offset,b=i.position,x=i.reverseDirection,y=i.useTranslate3d,k=i.viewBox,O=i.wrapperStyle,A=gH({allowEscapeViewBox:s,coordinate:p,offsetTopLeft:v,position:b,reverseDirection:x,tooltipBox:this.state.lastBoundingBox,useTranslate3d:y,viewBox:k}),T=A.cssClasses,E=A.cssProperties,P=FP(FP({transition:g&&a?"transform ".concat(u,"ms ").concat(c):void 0},E),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&h?"visible":"hidden",position:"absolute",top:0,left:0},O);return M.createElement("div",{tabIndex:-1,className:T,style:P,ref:function(N){n.wrapperNode=N}},f)}}])})(R.PureComponent),OH=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},oo={isSsr:OH()};function ds(t){"@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(t)}function WP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function KP(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?WP(Object(r),!0).forEach(function(n){Jx(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):WP(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function AH(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function PH(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,UN(n.key),n)}}function TH(t,e,r){return e&&PH(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function jH(t,e,r){return e=Ad(e),CH(t,qN()?Reflect.construct(e,r||[],Ad(t).constructor):e.apply(t,r))}function CH(t,e){if(e&&(ds(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return RH(t)}function RH(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function qN(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qN=function(){return!!t})()}function Ad(t){return Ad=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ad(t)}function NH(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Qb(t,e)}function Qb(t,e){return Qb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Qb(t,e)}function Jx(t,e,r){return e=UN(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function UN(t){var e=$H(t,"string");return ds(e)=="symbol"?e:e+""}function $H(t,e){if(ds(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(ds(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function IH(t){return t.dataKey}function MH(t,e){return M.isValidElement(t)?M.cloneElement(t,e):typeof t=="function"?M.createElement(t,e):M.createElement(cH,e)}var yn=(function(t){function e(){return AH(this,e),jH(this,e,arguments)}return NH(e,t),TH(e,[{key:"render",value:function(){var n=this,i=this.props,a=i.active,s=i.allowEscapeViewBox,u=i.animationDuration,c=i.animationEasing,f=i.content,p=i.coordinate,h=i.filterNull,g=i.isAnimationActive,v=i.offset,b=i.payload,x=i.payloadUniqBy,y=i.position,k=i.reverseDirection,O=i.useTranslate3d,A=i.viewBox,T=i.wrapperStyle,E=b??[];h&&E.length&&(E=RN(b.filter(function(C){return C.value!=null&&(C.hide!==!0||n.props.includeHidden)}),x,IH));var P=E.length>0;return M.createElement(EH,{allowEscapeViewBox:s,animationDuration:u,animationEasing:c,isAnimationActive:g,active:a,coordinate:p,hasPayload:P,offset:v,position:y,reverseDirection:k,useTranslate3d:O,viewBox:A,wrapperStyle:T},MH(f,KP(KP({},this.props),{},{payload:E})))}}])})(R.PureComponent);Jx(yn,"displayName","Tooltip");Jx(yn,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!oo.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 f0,VP;function LH(){if(VP)return f0;VP=1;var t=Wn(),e=function(){return t.Date.now()};return f0=e,f0}var d0,GP;function DH(){if(GP)return d0;GP=1;var t=/\s/;function e(r){for(var n=r.length;n--&&t.test(r.charAt(n)););return n}return d0=e,d0}var h0,XP;function BH(){if(XP)return h0;XP=1;var t=DH(),e=/^\s+/;function r(n){return n&&n.slice(0,t(n)+1).replace(e,"")}return h0=r,h0}var p0,YP;function FN(){if(YP)return p0;YP=1;var t=BH(),e=la(),r=zs(),n=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,s=/^0o[0-7]+$/i,u=parseInt;function c(f){if(typeof f=="number")return f;if(r(f))return n;if(e(f)){var p=typeof f.valueOf=="function"?f.valueOf():f;f=e(p)?p+"":p}if(typeof f!="string")return f===0?f:+f;f=t(f);var h=a.test(f);return h||s.test(f)?u(f.slice(2),h?2:8):i.test(f)?n:+f}return p0=c,p0}var m0,JP;function zH(){if(JP)return m0;JP=1;var t=la(),e=LH(),r=FN(),n="Expected a function",i=Math.max,a=Math.min;function s(u,c,f){var p,h,g,v,b,x,y=0,k=!1,O=!1,A=!0;if(typeof u!="function")throw new TypeError(n);c=r(c)||0,t(f)&&(k=!!f.leading,O="maxWait"in f,g=O?i(r(f.maxWait)||0,c):g,A="trailing"in f?!!f.trailing:A);function T(q){var U=p,K=h;return p=h=void 0,y=q,v=u.apply(K,U),v}function E(q){return y=q,b=setTimeout(N,c),k?T(q):v}function P(q){var U=q-x,K=q-y,G=c-U;return O?a(G,g-K):G}function C(q){var U=q-x,K=q-y;return x===void 0||U>=c||U<0||O&&K>=g}function N(){var q=e();if(C(q))return L(q);b=setTimeout(N,P(q))}function L(q){return b=void 0,A&&p?T(q):(p=h=void 0,v)}function V(){b!==void 0&&clearTimeout(b),y=0,p=x=h=b=void 0}function $(){return b===void 0?v:L(e())}function I(){var q=e(),U=C(q);if(p=arguments,h=this,x=q,U){if(b===void 0)return E(x);if(O)return clearTimeout(b),b=setTimeout(N,c),T(x)}return b===void 0&&(b=setTimeout(N,c)),v}return I.cancel=V,I.flush=$,I}return m0=s,m0}var g0,QP;function qH(){if(QP)return g0;QP=1;var t=zH(),e=la(),r="Expected a function";function n(i,a,s){var u=!0,c=!0;if(typeof i!="function")throw new TypeError(r);return e(s)&&(u="leading"in s?!!s.leading:u,c="trailing"in s?!!s.trailing:c),t(i,a,{leading:u,maxWait:a,trailing:c})}return g0=n,g0}var UH=qH();const HN=Qe(UH);function _u(t){"@babel/helpers - typeof";return _u=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},_u(t)}function ZP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Mf(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ZP(Object(r),!0).forEach(function(n){FH(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ZP(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function FH(t,e,r){return e=HH(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function HH(t){var e=WH(t,"string");return _u(e)=="symbol"?e:e+""}function WH(t,e){if(_u(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(_u(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function KH(t,e){return YH(t)||XH(t,e)||GH(t,e)||VH()}function VH(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
430
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GH(t,e){if(t){if(typeof t=="string")return e2(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e2(t,e)}}function e2(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function XH(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function YH(t){if(Array.isArray(t))return t}var t2=R.forwardRef(function(t,e){var r=t.aspect,n=t.initialDimension,i=n===void 0?{width:-1,height:-1}:n,a=t.width,s=a===void 0?"100%":a,u=t.height,c=u===void 0?"100%":u,f=t.minWidth,p=f===void 0?0:f,h=t.minHeight,g=t.maxHeight,v=t.children,b=t.debounce,x=b===void 0?0:b,y=t.id,k=t.className,O=t.onResize,A=t.style,T=A===void 0?{}:A,E=R.useRef(null),P=R.useRef();P.current=O,R.useImperativeHandle(e,function(){return Object.defineProperty(E.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),E.current},configurable:!0})});var C=R.useState({containerWidth:i.width,containerHeight:i.height}),N=KH(C,2),L=N[0],V=N[1],$=R.useCallback(function(q,U){V(function(K){var G=Math.round(q),Z=Math.round(U);return K.containerWidth===G&&K.containerHeight===Z?K:{containerWidth:G,containerHeight:Z}})},[]);R.useEffect(function(){var q=function(te){var H,z=te[0].contentRect,B=z.width,J=z.height;$(B,J),(H=P.current)===null||H===void 0||H.call(P,B,J)};x>0&&(q=HN(q,x,{trailing:!0,leading:!1}));var U=new ResizeObserver(q),K=E.current.getBoundingClientRect(),G=K.width,Z=K.height;return $(G,Z),U.observe(E.current),function(){U.disconnect()}},[$,x]);var I=R.useMemo(function(){var q=L.containerWidth,U=L.containerHeight;if(q<0||U<0)return null;hi(Fa(s)||Fa(c),`The width(%s) and height(%s) are both fixed numbers,
|
|
431
|
-
maybe you don't need to use a ResponsiveContainer.`,s,c),hi(!r||r>0,"The aspect(%s) must be greater than zero.",r);var K=Fa(s)?q:s,G=Fa(c)?U:c;r&&r>0&&(K?G=K/r:G&&(K=G*r),g&&G>g&&(G=g)),hi(K>0||G>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
432
|
-
please check the style of container, or the props width(%s) and height(%s),
|
|
433
|
-
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
434
|
-
height and width.`,K,G,s,c,p,h,r);var Z=!Array.isArray(v)&&di(v.type).endsWith("Chart");return M.Children.map(v,function(X){return M.isValidElement(X)?R.cloneElement(X,Mf({width:K,height:G},Z?{style:Mf({height:"100%",width:"100%",maxHeight:G,maxWidth:K},X.props.style)}:{})):X})},[r,v,c,g,h,p,L,s]);return M.createElement("div",{id:y?"".concat(y):void 0,className:De("recharts-responsive-container",k),style:Mf(Mf({},T),{},{width:s,height:c,minWidth:p,minHeight:h,maxHeight:g}),ref:E},I)}),Bh=function(e){return null};Bh.displayName="Cell";function Su(t){"@babel/helpers - typeof";return Su=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},Su(t)}function r2(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Zb(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?r2(Object(r),!0).forEach(function(n){JH(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):r2(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function JH(t,e,r){return e=QH(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function QH(t){var e=ZH(t,"string");return Su(e)=="symbol"?e:e+""}function ZH(t,e){if(Su(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Su(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var qo={widthCache:{},cacheCount:0},eW=2e3,tW={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},n2="recharts_measurement_span";function rW(t){var e=Zb({},t);return Object.keys(e).forEach(function(r){e[r]||delete e[r]}),e}var au=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e==null||oo.isSsr)return{width:0,height:0};var n=rW(r),i=JSON.stringify({text:e,copyStyle:n});if(qo.widthCache[i])return qo.widthCache[i];try{var a=document.getElementById(n2);a||(a=document.createElement("span"),a.setAttribute("id",n2),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var s=Zb(Zb({},tW),n);Object.assign(a.style,s),a.textContent="".concat(e);var u=a.getBoundingClientRect(),c={width:u.width,height:u.height};return qo.widthCache[i]=c,++qo.cacheCount>eW&&(qo.cacheCount=0,qo.widthCache={}),c}catch{return{width:0,height:0}}},nW=function(e){return{top:e.top+window.scrollY-document.documentElement.clientTop,left:e.left+window.scrollX-document.documentElement.clientLeft}};function ku(t){"@babel/helpers - typeof";return ku=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},ku(t)}function Pd(t,e){return sW(t)||oW(t,e)||aW(t,e)||iW()}function iW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
435
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aW(t,e){if(t){if(typeof t=="string")return i2(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i2(t,e)}}function i2(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function oW(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function sW(t){if(Array.isArray(t))return t}function lW(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a2(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,cW(n.key),n)}}function uW(t,e,r){return e&&a2(t.prototype,e),r&&a2(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function cW(t){var e=fW(t,"string");return ku(e)=="symbol"?e:e+""}function fW(t,e){if(ku(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(ku(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var o2=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,s2=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,dW=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,hW=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,WN={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},pW=Object.keys(WN),Xo="NaN";function mW(t,e){return t*WN[e]}var Lf=(function(){function t(e,r){lW(this,t),this.num=e,this.unit=r,this.num=e,this.unit=r,Number.isNaN(e)&&(this.unit=""),r!==""&&!dW.test(r)&&(this.num=NaN,this.unit=""),pW.includes(r)&&(this.num=mW(e,r),this.unit="px")}return uW(t,[{key:"add",value:function(r){return this.unit!==r.unit?new t(NaN,""):new t(this.num+r.num,this.unit)}},{key:"subtract",value:function(r){return this.unit!==r.unit?new t(NaN,""):new t(this.num-r.num,this.unit)}},{key:"multiply",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new t(NaN,""):new t(this.num*r.num,this.unit||r.unit)}},{key:"divide",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new t(NaN,""):new t(this.num/r.num,this.unit||r.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(r){var n,i=(n=hW.exec(r))!==null&&n!==void 0?n:[],a=Pd(i,3),s=a[1],u=a[2];return new t(parseFloat(s),u??"")}}])})();function KN(t){if(t.includes(Xo))return Xo;for(var e=t;e.includes("*")||e.includes("/");){var r,n=(r=o2.exec(e))!==null&&r!==void 0?r:[],i=Pd(n,4),a=i[1],s=i[2],u=i[3],c=Lf.parse(a??""),f=Lf.parse(u??""),p=s==="*"?c.multiply(f):c.divide(f);if(p.isNaN())return Xo;e=e.replace(o2,p.toString())}for(;e.includes("+")||/.-\d+(?:\.\d+)?/.test(e);){var h,g=(h=s2.exec(e))!==null&&h!==void 0?h:[],v=Pd(g,4),b=v[1],x=v[2],y=v[3],k=Lf.parse(b??""),O=Lf.parse(y??""),A=x==="+"?k.add(O):k.subtract(O);if(A.isNaN())return Xo;e=e.replace(s2,A.toString())}return e}var l2=/\(([^()]*)\)/;function gW(t){for(var e=t;e.includes("(");){var r=l2.exec(e),n=Pd(r,2),i=n[1];e=e.replace(l2,KN(i))}return e}function vW(t){var e=t.replace(/\s+/g,"");return e=gW(e),e=KN(e),e}function yW(t){try{return vW(t)}catch{return Xo}}function v0(t){var e=yW(t.slice(5,-1));return e===Xo?"":e}var bW=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],wW=["dx","dy","angle","className","breakAll"];function ew(){return ew=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ew.apply(this,arguments)}function u2(t,e){if(t==null)return{};var r=xW(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function xW(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function c2(t,e){return EW(t)||kW(t,e)||SW(t,e)||_W()}function _W(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
436
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SW(t,e){if(t){if(typeof t=="string")return f2(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f2(t,e)}}function f2(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function kW(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function EW(t){if(Array.isArray(t))return t}var VN=/[ \f\n\r\t\v\u2028\u2029]+/,GN=function(e){var r=e.children,n=e.breakAll,i=e.style;try{var a=[];Le(r)||(n?a=r.toString().split(""):a=r.toString().split(VN));var s=a.map(function(c){return{word:c,width:au(c,i).width}}),u=n?0:au(" ",i).width;return{wordsWithComputedWidth:s,spaceWidth:u}}catch{return null}},OW=function(e,r,n,i,a){var s=e.maxLines,u=e.children,c=e.style,f=e.breakAll,p=fe(s),h=u,g=function(){var K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return K.reduce(function(G,Z){var X=Z.word,te=Z.width,H=G[G.length-1];if(H&&(i==null||a||H.width+te+n<Number(i)))H.words.push(X),H.width+=te+n;else{var z={words:[X],width:te};G.push(z)}return G},[])},v=g(r),b=function(K){return K.reduce(function(G,Z){return G.width>Z.width?G:Z})};if(!p)return v;for(var x="…",y=function(K){var G=h.slice(0,K),Z=GN({breakAll:f,style:c,children:G+x}).wordsWithComputedWidth,X=g(Z),te=X.length>s||b(X).width>Number(i);return[te,X]},k=0,O=h.length-1,A=0,T;k<=O&&A<=h.length-1;){var E=Math.floor((k+O)/2),P=E-1,C=y(P),N=c2(C,2),L=N[0],V=N[1],$=y(E),I=c2($,1),q=I[0];if(!L&&!q&&(k=E+1),L&&q&&(O=E-1),!L&&q){T=V;break}A++}return T||v},d2=function(e){var r=Le(e)?[]:e.toString().split(VN);return[{words:r}]},AW=function(e){var r=e.width,n=e.scaleToFit,i=e.children,a=e.style,s=e.breakAll,u=e.maxLines;if((r||n)&&!oo.isSsr){var c,f,p=GN({breakAll:s,children:i,style:a});if(p){var h=p.wordsWithComputedWidth,g=p.spaceWidth;c=h,f=g}else return d2(i);return OW({breakAll:s,children:i,maxLines:u,style:a},c,f,r,n)}return d2(i)},h2="#808080",eo=function(e){var r=e.x,n=r===void 0?0:r,i=e.y,a=i===void 0?0:i,s=e.lineHeight,u=s===void 0?"1em":s,c=e.capHeight,f=c===void 0?"0.71em":c,p=e.scaleToFit,h=p===void 0?!1:p,g=e.textAnchor,v=g===void 0?"start":g,b=e.verticalAnchor,x=b===void 0?"end":b,y=e.fill,k=y===void 0?h2:y,O=u2(e,bW),A=R.useMemo(function(){return AW({breakAll:O.breakAll,children:O.children,maxLines:O.maxLines,scaleToFit:h,style:O.style,width:O.width})},[O.breakAll,O.children,O.maxLines,h,O.style,O.width]),T=O.dx,E=O.dy,P=O.angle,C=O.className,N=O.breakAll,L=u2(O,wW);if(!Bt(n)||!Bt(a))return null;var V=n+(fe(T)?T:0),$=a+(fe(E)?E:0),I;switch(x){case"start":I=v0("calc(".concat(f,")"));break;case"middle":I=v0("calc(".concat((A.length-1)/2," * -").concat(u," + (").concat(f," / 2))"));break;default:I=v0("calc(".concat(A.length-1," * -").concat(u,")"));break}var q=[];if(h){var U=A[0].width,K=O.width;q.push("scale(".concat((fe(K)?K/U:1)/U,")"))}return P&&q.push("rotate(".concat(P,", ").concat(V,", ").concat($,")")),q.length&&(L.transform=q.join(" ")),M.createElement("text",ew({},Oe(L,!0),{x:V,y:$,className:De("recharts-text",C),textAnchor:v,fill:k.includes("url")?h2:k}),A.map(function(G,Z){var X=G.words.join(N?"":" ");return M.createElement("tspan",{x:V,dy:Z===0?I:u,key:"".concat(X,"-").concat(Z)},X)}))};function aa(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function PW(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Qx(t){let e,r,n;t.length!==2?(e=aa,r=(u,c)=>aa(t(u),c),n=(u,c)=>t(u)-c):(e=t===aa||t===PW?t:TW,r=t,n=t);function i(u,c,f=0,p=u.length){if(f<p){if(e(c,c)!==0)return p;do{const h=f+p>>>1;r(u[h],c)<0?f=h+1:p=h}while(f<p)}return f}function a(u,c,f=0,p=u.length){if(f<p){if(e(c,c)!==0)return p;do{const h=f+p>>>1;r(u[h],c)<=0?f=h+1:p=h}while(f<p)}return f}function s(u,c,f=0,p=u.length){const h=i(u,c,f,p-1);return h>f&&n(u[h-1],c)>-n(u[h],c)?h-1:h}return{left:i,center:s,right:a}}function TW(){return 0}function XN(t){return t===null?NaN:+t}function*jW(t,e){for(let r of t)r!=null&&(r=+r)>=r&&(yield r)}const CW=Qx(aa),ac=CW.right;Qx(XN).center;class p2 extends Map{constructor(e,r=$W){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(const[n,i]of e)this.set(n,i)}get(e){return super.get(m2(this,e))}has(e){return super.has(m2(this,e))}set(e,r){return super.set(RW(this,e),r)}delete(e){return super.delete(NW(this,e))}}function m2({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):r}function RW({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):(t.set(n,r),r)}function NW({_intern:t,_key:e},r){const n=e(r);return t.has(n)&&(r=t.get(n),t.delete(n)),r}function $W(t){return t!==null&&typeof t=="object"?t.valueOf():t}function IW(t=aa){if(t===aa)return YN;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,r)=>{const n=t(e,r);return n||n===0?n:(t(r,r)===0)-(t(e,e)===0)}}function YN(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}const MW=Math.sqrt(50),LW=Math.sqrt(10),DW=Math.sqrt(2);function Td(t,e,r){const n=(e-t)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),s=a>=MW?10:a>=LW?5:a>=DW?2:1;let u,c,f;return i<0?(f=Math.pow(10,-i)/s,u=Math.round(t*f),c=Math.round(e*f),u/f<t&&++u,c/f>e&&--c,f=-f):(f=Math.pow(10,i)*s,u=Math.round(t/f),c=Math.round(e/f),u*f<t&&++u,c*f>e&&--c),c<u&&.5<=r&&r<2?Td(t,e,r*2):[u,c,f]}function tw(t,e,r){if(e=+e,t=+t,r=+r,!(r>0))return[];if(t===e)return[t];const n=e<t,[i,a,s]=n?Td(e,t,r):Td(t,e,r);if(!(a>=i))return[];const u=a-i+1,c=new Array(u);if(n)if(s<0)for(let f=0;f<u;++f)c[f]=(a-f)/-s;else for(let f=0;f<u;++f)c[f]=(a-f)*s;else if(s<0)for(let f=0;f<u;++f)c[f]=(i+f)/-s;else for(let f=0;f<u;++f)c[f]=(i+f)*s;return c}function rw(t,e,r){return e=+e,t=+t,r=+r,Td(t,e,r)[2]}function nw(t,e,r){e=+e,t=+t,r=+r;const n=e<t,i=n?rw(e,t,r):rw(t,e,r);return(n?-1:1)*(i<0?1/-i:i)}function g2(t,e){let r;for(const n of t)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function v2(t,e){let r;for(const n of t)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function JN(t,e,r=0,n=1/0,i){if(e=Math.floor(e),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(t.length-1,n)),!(r<=e&&e<=n))return t;for(i=i===void 0?YN:IW(i);n>r;){if(n-r>600){const c=n-r+1,f=e-r+1,p=Math.log(c),h=.5*Math.exp(2*p/3),g=.5*Math.sqrt(p*h*(c-h)/c)*(f-c/2<0?-1:1),v=Math.max(r,Math.floor(e-f*h/c+g)),b=Math.min(n,Math.floor(e+(c-f)*h/c+g));JN(t,e,v,b,i)}const a=t[e];let s=r,u=n;for(zl(t,r,e),i(t[n],a)>0&&zl(t,r,n);s<u;){for(zl(t,s,u),++s,--u;i(t[s],a)<0;)++s;for(;i(t[u],a)>0;)--u}i(t[r],a)===0?zl(t,r,u):(++u,zl(t,u,n)),u<=e&&(r=u+1),e<=u&&(n=u-1)}return t}function zl(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function BW(t,e,r){if(t=Float64Array.from(jW(t)),!(!(n=t.length)||isNaN(e=+e))){if(e<=0||n<2)return v2(t);if(e>=1)return g2(t);var n,i=(n-1)*e,a=Math.floor(i),s=g2(JN(t,a).subarray(0,a+1)),u=v2(t.subarray(a+1));return s+(u-s)*(i-a)}}function zW(t,e,r=XN){if(!(!(n=t.length)||isNaN(e=+e))){if(e<=0||n<2)return+r(t[0],0,t);if(e>=1)return+r(t[n-1],n-1,t);var n,i=(n-1)*e,a=Math.floor(i),s=+r(t[a],a,t),u=+r(t[a+1],a+1,t);return s+(u-s)*(i-a)}}function qW(t,e,r){t=+t,e=+e,r=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((e-t)/r))|0,a=new Array(i);++n<i;)a[n]=t+n*r;return a}function on(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function Si(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}const iw=Symbol("implicit");function Zx(){var t=new p2,e=[],r=[],n=iw;function i(a){let s=t.get(a);if(s===void 0){if(n!==iw)return n;t.set(a,s=e.push(a)-1)}return r[s%r.length]}return i.domain=function(a){if(!arguments.length)return e.slice();e=[],t=new p2;for(const s of a)t.has(s)||t.set(s,e.push(s)-1);return i},i.range=function(a){return arguments.length?(r=Array.from(a),i):r.slice()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return Zx(e,r).unknown(n)},on.apply(i,arguments),i}function Eu(){var t=Zx().unknown(void 0),e=t.domain,r=t.range,n=0,i=1,a,s,u=!1,c=0,f=0,p=.5;delete t.unknown;function h(){var g=e().length,v=i<n,b=v?i:n,x=v?n:i;a=(x-b)/Math.max(1,g-c+f*2),u&&(a=Math.floor(a)),b+=(x-b-a*(g-c))*p,s=a*(1-c),u&&(b=Math.round(b),s=Math.round(s));var y=qW(g).map(function(k){return b+a*k});return r(v?y.reverse():y)}return t.domain=function(g){return arguments.length?(e(g),h()):e()},t.range=function(g){return arguments.length?([n,i]=g,n=+n,i=+i,h()):[n,i]},t.rangeRound=function(g){return[n,i]=g,n=+n,i=+i,u=!0,h()},t.bandwidth=function(){return s},t.step=function(){return a},t.round=function(g){return arguments.length?(u=!!g,h()):u},t.padding=function(g){return arguments.length?(c=Math.min(1,f=+g),h()):c},t.paddingInner=function(g){return arguments.length?(c=Math.min(1,g),h()):c},t.paddingOuter=function(g){return arguments.length?(f=+g,h()):f},t.align=function(g){return arguments.length?(p=Math.max(0,Math.min(1,g)),h()):p},t.copy=function(){return Eu(e(),[n,i]).round(u).paddingInner(c).paddingOuter(f).align(p)},on.apply(h(),arguments)}function QN(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return QN(e())},t}function ou(){return QN(Eu.apply(null,arguments).paddingInner(1))}function e1(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function ZN(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function oc(){}var Ou=.7,jd=1/Ou,is="\\s*([+-]?\\d+)\\s*",Au="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",qn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",UW=/^#([0-9a-f]{3,8})$/,FW=new RegExp(`^rgb\\(${is},${is},${is}\\)$`),HW=new RegExp(`^rgb\\(${qn},${qn},${qn}\\)$`),WW=new RegExp(`^rgba\\(${is},${is},${is},${Au}\\)$`),KW=new RegExp(`^rgba\\(${qn},${qn},${qn},${Au}\\)$`),VW=new RegExp(`^hsl\\(${Au},${qn},${qn}\\)$`),GW=new RegExp(`^hsla\\(${Au},${qn},${qn},${Au}\\)$`),y2={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};e1(oc,Pu,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:b2,formatHex:b2,formatHex8:XW,formatHsl:YW,formatRgb:w2,toString:w2});function b2(){return this.rgb().formatHex()}function XW(){return this.rgb().formatHex8()}function YW(){return e$(this).formatHsl()}function w2(){return this.rgb().formatRgb()}function Pu(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=UW.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?x2(e):r===3?new Er(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?Df(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?Df(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=FW.exec(t))?new Er(e[1],e[2],e[3],1):(e=HW.exec(t))?new Er(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=WW.exec(t))?Df(e[1],e[2],e[3],e[4]):(e=KW.exec(t))?Df(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=VW.exec(t))?k2(e[1],e[2]/100,e[3]/100,1):(e=GW.exec(t))?k2(e[1],e[2]/100,e[3]/100,e[4]):y2.hasOwnProperty(t)?x2(y2[t]):t==="transparent"?new Er(NaN,NaN,NaN,0):null}function x2(t){return new Er(t>>16&255,t>>8&255,t&255,1)}function Df(t,e,r,n){return n<=0&&(t=e=r=NaN),new Er(t,e,r,n)}function JW(t){return t instanceof oc||(t=Pu(t)),t?(t=t.rgb(),new Er(t.r,t.g,t.b,t.opacity)):new Er}function aw(t,e,r,n){return arguments.length===1?JW(t):new Er(t,e,r,n??1)}function Er(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}e1(Er,aw,ZN(oc,{brighter(t){return t=t==null?jd:Math.pow(jd,t),new Er(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Ou:Math.pow(Ou,t),new Er(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Er(Xa(this.r),Xa(this.g),Xa(this.b),Cd(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:_2,formatHex:_2,formatHex8:QW,formatRgb:S2,toString:S2}));function _2(){return`#${Ha(this.r)}${Ha(this.g)}${Ha(this.b)}`}function QW(){return`#${Ha(this.r)}${Ha(this.g)}${Ha(this.b)}${Ha((isNaN(this.opacity)?1:this.opacity)*255)}`}function S2(){const t=Cd(this.opacity);return`${t===1?"rgb(":"rgba("}${Xa(this.r)}, ${Xa(this.g)}, ${Xa(this.b)}${t===1?")":`, ${t})`}`}function Cd(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Xa(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Ha(t){return t=Xa(t),(t<16?"0":"")+t.toString(16)}function k2(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Sn(t,e,r,n)}function e$(t){if(t instanceof Sn)return new Sn(t.h,t.s,t.l,t.opacity);if(t instanceof oc||(t=Pu(t)),!t)return new Sn;if(t instanceof Sn)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),a=Math.max(e,r,n),s=NaN,u=a-i,c=(a+i)/2;return u?(e===a?s=(r-n)/u+(r<n)*6:r===a?s=(n-e)/u+2:s=(e-r)/u+4,u/=c<.5?a+i:2-a-i,s*=60):u=c>0&&c<1?0:s,new Sn(s,u,c,t.opacity)}function ZW(t,e,r,n){return arguments.length===1?e$(t):new Sn(t,e,r,n??1)}function Sn(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}e1(Sn,ZW,ZN(oc,{brighter(t){return t=t==null?jd:Math.pow(jd,t),new Sn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Ou:Math.pow(Ou,t),new Sn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new Er(y0(t>=240?t-240:t+120,i,n),y0(t,i,n),y0(t<120?t+240:t-120,i,n),this.opacity)},clamp(){return new Sn(E2(this.h),Bf(this.s),Bf(this.l),Cd(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(){const t=Cd(this.opacity);return`${t===1?"hsl(":"hsla("}${E2(this.h)}, ${Bf(this.s)*100}%, ${Bf(this.l)*100}%${t===1?")":`, ${t})`}`}}));function E2(t){return t=(t||0)%360,t<0?t+360:t}function Bf(t){return Math.max(0,Math.min(1,t||0))}function y0(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}const t1=t=>()=>t;function eK(t,e){return function(r){return t+r*e}}function tK(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function rK(t){return(t=+t)==1?t$:function(e,r){return r-e?tK(e,r,t):t1(isNaN(e)?r:e)}}function t$(t,e){var r=e-t;return r?eK(t,r):t1(isNaN(t)?e:t)}const O2=(function t(e){var r=rK(e);function n(i,a){var s=r((i=aw(i)).r,(a=aw(a)).r),u=r(i.g,a.g),c=r(i.b,a.b),f=t$(i.opacity,a.opacity);return function(p){return i.r=s(p),i.g=u(p),i.b=c(p),i.opacity=f(p),i+""}}return n.gamma=t,n})(1);function nK(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,n=e.slice(),i;return function(a){for(i=0;i<r;++i)n[i]=t[i]*(1-a)+e[i]*a;return n}}function iK(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function aK(t,e){var r=e?e.length:0,n=t?Math.min(r,t.length):0,i=new Array(n),a=new Array(r),s;for(s=0;s<n;++s)i[s]=Ws(t[s],e[s]);for(;s<r;++s)a[s]=e[s];return function(u){for(s=0;s<n;++s)a[s]=i[s](u);return a}}function oK(t,e){var r=new Date;return t=+t,e=+e,function(n){return r.setTime(t*(1-n)+e*n),r}}function Rd(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function sK(t,e){var r={},n={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?r[i]=Ws(t[i],e[i]):n[i]=e[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var ow=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,b0=new RegExp(ow.source,"g");function lK(t){return function(){return t}}function uK(t){return function(e){return t(e)+""}}function cK(t,e){var r=ow.lastIndex=b0.lastIndex=0,n,i,a,s=-1,u=[],c=[];for(t=t+"",e=e+"";(n=ow.exec(t))&&(i=b0.exec(e));)(a=i.index)>r&&(a=e.slice(r,a),u[s]?u[s]+=a:u[++s]=a),(n=n[0])===(i=i[0])?u[s]?u[s]+=i:u[++s]=i:(u[++s]=null,c.push({i:s,x:Rd(n,i)})),r=b0.lastIndex;return r<e.length&&(a=e.slice(r),u[s]?u[s]+=a:u[++s]=a),u.length<2?c[0]?uK(c[0].x):lK(e):(e=c.length,function(f){for(var p=0,h;p<e;++p)u[(h=c[p]).i]=h.x(f);return u.join("")})}function Ws(t,e){var r=typeof e,n;return e==null||r==="boolean"?t1(e):(r==="number"?Rd:r==="string"?(n=Pu(e))?(e=n,O2):cK:e instanceof Pu?O2:e instanceof Date?oK:iK(e)?nK:Array.isArray(e)?aK:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?sK:Rd)(t,e)}function r1(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}function fK(t,e){e===void 0&&(e=t,t=Ws);for(var r=0,n=e.length-1,i=e[0],a=new Array(n<0?0:n);r<n;)a[r]=t(i,i=e[++r]);return function(s){var u=Math.max(0,Math.min(n-1,Math.floor(s*=n)));return a[u](s-u)}}function dK(t){return function(){return t}}function Nd(t){return+t}var A2=[0,1];function pr(t){return t}function sw(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:dK(isNaN(e)?NaN:.5)}function hK(t,e){var r;return t>e&&(r=t,t=e,e=r),function(n){return Math.max(t,Math.min(e,n))}}function pK(t,e,r){var n=t[0],i=t[1],a=e[0],s=e[1];return i<n?(n=sw(i,n),a=r(s,a)):(n=sw(n,i),a=r(a,s)),function(u){return a(n(u))}}function mK(t,e,r){var n=Math.min(t.length,e.length)-1,i=new Array(n),a=new Array(n),s=-1;for(t[n]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<n;)i[s]=sw(t[s],t[s+1]),a[s]=r(e[s],e[s+1]);return function(u){var c=ac(t,u,1,n)-1;return a[c](i[c](u))}}function sc(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function zh(){var t=A2,e=A2,r=Ws,n,i,a,s=pr,u,c,f;function p(){var g=Math.min(t.length,e.length);return s!==pr&&(s=hK(t[0],t[g-1])),u=g>2?mK:pK,c=f=null,h}function h(g){return g==null||isNaN(g=+g)?a:(c||(c=u(t.map(n),e,r)))(n(s(g)))}return h.invert=function(g){return s(i((f||(f=u(e,t.map(n),Rd)))(g)))},h.domain=function(g){return arguments.length?(t=Array.from(g,Nd),p()):t.slice()},h.range=function(g){return arguments.length?(e=Array.from(g),p()):e.slice()},h.rangeRound=function(g){return e=Array.from(g),r=r1,p()},h.clamp=function(g){return arguments.length?(s=g?!0:pr,p()):s!==pr},h.interpolate=function(g){return arguments.length?(r=g,p()):r},h.unknown=function(g){return arguments.length?(a=g,h):a},function(g,v){return n=g,i=v,p()}}function n1(){return zh()(pr,pr)}function gK(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function $d(t,e){if(!isFinite(t)||t===0)return null;var r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"),n=t.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+t.slice(r+1)]}function hs(t){return t=$d(Math.abs(t)),t?t[1]:NaN}function vK(t,e){return function(r,n){for(var i=r.length,a=[],s=0,u=t[0],c=0;i>0&&u>0&&(c+u+1>n&&(u=Math.max(1,n-c)),a.push(r.substring(i-=u,i+u)),!((c+=u+1)>n));)u=t[s=(s+1)%t.length];return a.reverse().join(e)}}function yK(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}var bK=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Tu(t){if(!(e=bK.exec(t)))throw new Error("invalid format: "+t);var e;return new i1({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Tu.prototype=i1.prototype;function i1(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}i1.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 wK(t){e:for(var e=t.length,r=1,n=-1,i;r<e;++r)switch(t[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+t[r])break e;n>0&&(n=0);break}return n>0?t.slice(0,n)+t.slice(i+1):t}var Id;function xK(t,e){var r=$d(t,e);if(!r)return Id=void 0,t.toPrecision(e);var n=r[0],i=r[1],a=i-(Id=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=n.length;return a===s?n:a>s?n+new Array(a-s+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+$d(t,Math.max(0,e+a-1))[0]}function P2(t,e){var r=$d(t,e);if(!r)return t+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const T2={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:gK,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>P2(t*100,e),r:P2,s:xK,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function j2(t){return t}var C2=Array.prototype.map,R2=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function _K(t){var e=t.grouping===void 0||t.thousands===void 0?j2:vK(C2.call(t.grouping,Number),t.thousands+""),r=t.currency===void 0?"":t.currency[0]+"",n=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",a=t.numerals===void 0?j2:yK(C2.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",u=t.minus===void 0?"−":t.minus+"",c=t.nan===void 0?"NaN":t.nan+"";function f(h,g){h=Tu(h);var v=h.fill,b=h.align,x=h.sign,y=h.symbol,k=h.zero,O=h.width,A=h.comma,T=h.precision,E=h.trim,P=h.type;P==="n"?(A=!0,P="g"):T2[P]||(T===void 0&&(T=12),E=!0,P="g"),(k||v==="0"&&b==="=")&&(k=!0,v="0",b="=");var C=(g&&g.prefix!==void 0?g.prefix:"")+(y==="$"?r:y==="#"&&/[boxX]/.test(P)?"0"+P.toLowerCase():""),N=(y==="$"?n:/[%p]/.test(P)?s:"")+(g&&g.suffix!==void 0?g.suffix:""),L=T2[P],V=/[defgprs%]/.test(P);T=T===void 0?6:/[gprs]/.test(P)?Math.max(1,Math.min(21,T)):Math.max(0,Math.min(20,T));function $(I){var q=C,U=N,K,G,Z;if(P==="c")U=L(I)+U,I="";else{I=+I;var X=I<0||1/I<0;if(I=isNaN(I)?c:L(Math.abs(I),T),E&&(I=wK(I)),X&&+I==0&&x!=="+"&&(X=!1),q=(X?x==="("?x:u:x==="-"||x==="("?"":x)+q,U=(P==="s"&&!isNaN(I)&&Id!==void 0?R2[8+Id/3]:"")+U+(X&&x==="("?")":""),V){for(K=-1,G=I.length;++K<G;)if(Z=I.charCodeAt(K),48>Z||Z>57){U=(Z===46?i+I.slice(K+1):I.slice(K))+U,I=I.slice(0,K);break}}}A&&!k&&(I=e(I,1/0));var te=q.length+I.length+U.length,H=te<O?new Array(O-te+1).join(v):"";switch(A&&k&&(I=e(H+I,H.length?O-U.length:1/0),H=""),b){case"<":I=q+I+U+H;break;case"=":I=q+H+I+U;break;case"^":I=H.slice(0,te=H.length>>1)+q+I+U+H.slice(te);break;default:I=H+q+I+U;break}return a(I)}return $.toString=function(){return h+""},$}function p(h,g){var v=Math.max(-8,Math.min(8,Math.floor(hs(g)/3)))*3,b=Math.pow(10,-v),x=f((h=Tu(h),h.type="f",h),{suffix:R2[8+v/3]});return function(y){return x(b*y)}}return{format:f,formatPrefix:p}}var zf,a1,r$;SK({thousands:",",grouping:[3],currency:["$",""]});function SK(t){return zf=_K(t),a1=zf.format,r$=zf.formatPrefix,zf}function kK(t){return Math.max(0,-hs(Math.abs(t)))}function EK(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(hs(e)/3)))*3-hs(Math.abs(t)))}function OK(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,hs(e)-hs(t))+1}function n$(t,e,r,n){var i=nw(t,e,r),a;switch(n=Tu(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return n.precision==null&&!isNaN(a=EK(i,s))&&(n.precision=a),r$(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=OK(i,Math.max(Math.abs(t),Math.abs(e))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=kK(i))&&(n.precision=a-(n.type==="%")*2);break}}return a1(n)}function ua(t){var e=t.domain;return t.ticks=function(r){var n=e();return tw(n[0],n[n.length-1],r??10)},t.tickFormat=function(r,n){var i=e();return n$(i[0],i[i.length-1],r??10,n)},t.nice=function(r){r==null&&(r=10);var n=e(),i=0,a=n.length-1,s=n[i],u=n[a],c,f,p=10;for(u<s&&(f=s,s=u,u=f,f=i,i=a,a=f);p-- >0;){if(f=rw(s,u,r),f===c)return n[i]=s,n[a]=u,e(n);if(f>0)s=Math.floor(s/f)*f,u=Math.ceil(u/f)*f;else if(f<0)s=Math.ceil(s*f)/f,u=Math.floor(u*f)/f;else break;c=f}return t},t}function Md(){var t=n1();return t.copy=function(){return sc(t,Md())},on.apply(t,arguments),ua(t)}function i$(t){var e;function r(n){return n==null||isNaN(n=+n)?e:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(t=Array.from(n,Nd),r):t.slice()},r.unknown=function(n){return arguments.length?(e=n,r):e},r.copy=function(){return i$(t).unknown(e)},t=arguments.length?Array.from(t,Nd):[0,1],ua(r)}function a$(t,e){t=t.slice();var r=0,n=t.length-1,i=t[r],a=t[n],s;return a<i&&(s=r,r=n,n=s,s=i,i=a,a=s),t[r]=e.floor(i),t[n]=e.ceil(a),t}function N2(t){return Math.log(t)}function $2(t){return Math.exp(t)}function AK(t){return-Math.log(-t)}function PK(t){return-Math.exp(-t)}function TK(t){return isFinite(t)?+("1e"+t):t<0?0:t}function jK(t){return t===10?TK:t===Math.E?Math.exp:e=>Math.pow(t,e)}function CK(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function I2(t){return(e,r)=>-t(-e,r)}function o1(t){const e=t(N2,$2),r=e.domain;let n=10,i,a;function s(){return i=CK(n),a=jK(n),r()[0]<0?(i=I2(i),a=I2(a),t(AK,PK)):t(N2,$2),e}return e.base=function(u){return arguments.length?(n=+u,s()):n},e.domain=function(u){return arguments.length?(r(u),s()):r()},e.ticks=u=>{const c=r();let f=c[0],p=c[c.length-1];const h=p<f;h&&([f,p]=[p,f]);let g=i(f),v=i(p),b,x;const y=u==null?10:+u;let k=[];if(!(n%1)&&v-g<y){if(g=Math.floor(g),v=Math.ceil(v),f>0){for(;g<=v;++g)for(b=1;b<n;++b)if(x=g<0?b/a(-g):b*a(g),!(x<f)){if(x>p)break;k.push(x)}}else for(;g<=v;++g)for(b=n-1;b>=1;--b)if(x=g>0?b/a(-g):b*a(g),!(x<f)){if(x>p)break;k.push(x)}k.length*2<y&&(k=tw(f,p,y))}else k=tw(g,v,Math.min(v-g,y)).map(a);return h?k.reverse():k},e.tickFormat=(u,c)=>{if(u==null&&(u=10),c==null&&(c=n===10?"s":","),typeof c!="function"&&(!(n%1)&&(c=Tu(c)).precision==null&&(c.trim=!0),c=a1(c)),u===1/0)return c;const f=Math.max(1,n*u/e.ticks().length);return p=>{let h=p/a(Math.round(i(p)));return h*n<n-.5&&(h*=n),h<=f?c(p):""}},e.nice=()=>r(a$(r(),{floor:u=>a(Math.floor(i(u))),ceil:u=>a(Math.ceil(i(u)))})),e}function o$(){const t=o1(zh()).domain([1,10]);return t.copy=()=>sc(t,o$()).base(t.base()),on.apply(t,arguments),t}function M2(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function L2(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function s1(t){var e=1,r=t(M2(e),L2(e));return r.constant=function(n){return arguments.length?t(M2(e=+n),L2(e)):e},ua(r)}function s$(){var t=s1(zh());return t.copy=function(){return sc(t,s$()).constant(t.constant())},on.apply(t,arguments)}function D2(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function RK(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function NK(t){return t<0?-t*t:t*t}function l1(t){var e=t(pr,pr),r=1;function n(){return r===1?t(pr,pr):r===.5?t(RK,NK):t(D2(r),D2(1/r))}return e.exponent=function(i){return arguments.length?(r=+i,n()):r},ua(e)}function u1(){var t=l1(zh());return t.copy=function(){return sc(t,u1()).exponent(t.exponent())},on.apply(t,arguments),t}function $K(){return u1.apply(null,arguments).exponent(.5)}function B2(t){return Math.sign(t)*t*t}function IK(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function l$(){var t=n1(),e=[0,1],r=!1,n;function i(a){var s=IK(t(a));return isNaN(s)?n:r?Math.round(s):s}return i.invert=function(a){return t.invert(B2(a))},i.domain=function(a){return arguments.length?(t.domain(a),i):t.domain()},i.range=function(a){return arguments.length?(t.range((e=Array.from(a,Nd)).map(B2)),i):e.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(t.clamp(a),i):t.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return l$(t.domain(),e).round(r).clamp(t.clamp()).unknown(n)},on.apply(i,arguments),ua(i)}function u$(){var t=[],e=[],r=[],n;function i(){var s=0,u=Math.max(1,e.length);for(r=new Array(u-1);++s<u;)r[s-1]=zW(t,s/u);return a}function a(s){return s==null||isNaN(s=+s)?n:e[ac(r,s)]}return a.invertExtent=function(s){var u=e.indexOf(s);return u<0?[NaN,NaN]:[u>0?r[u-1]:t[0],u<r.length?r[u]:t[t.length-1]]},a.domain=function(s){if(!arguments.length)return t.slice();t=[];for(let u of s)u!=null&&!isNaN(u=+u)&&t.push(u);return t.sort(aa),i()},a.range=function(s){return arguments.length?(e=Array.from(s),i()):e.slice()},a.unknown=function(s){return arguments.length?(n=s,a):n},a.quantiles=function(){return r.slice()},a.copy=function(){return u$().domain(t).range(e).unknown(n)},on.apply(a,arguments)}function c$(){var t=0,e=1,r=1,n=[.5],i=[0,1],a;function s(c){return c!=null&&c<=c?i[ac(n,c,0,r)]:a}function u(){var c=-1;for(n=new Array(r);++c<r;)n[c]=((c+1)*e-(c-r)*t)/(r+1);return s}return s.domain=function(c){return arguments.length?([t,e]=c,t=+t,e=+e,u()):[t,e]},s.range=function(c){return arguments.length?(r=(i=Array.from(c)).length-1,u()):i.slice()},s.invertExtent=function(c){var f=i.indexOf(c);return f<0?[NaN,NaN]:f<1?[t,n[0]]:f>=r?[n[r-1],e]:[n[f-1],n[f]]},s.unknown=function(c){return arguments.length&&(a=c),s},s.thresholds=function(){return n.slice()},s.copy=function(){return c$().domain([t,e]).range(i).unknown(a)},on.apply(ua(s),arguments)}function f$(){var t=[.5],e=[0,1],r,n=1;function i(a){return a!=null&&a<=a?e[ac(t,a,0,n)]:r}return i.domain=function(a){return arguments.length?(t=Array.from(a),n=Math.min(t.length,e.length-1),i):t.slice()},i.range=function(a){return arguments.length?(e=Array.from(a),n=Math.min(t.length,e.length-1),i):e.slice()},i.invertExtent=function(a){var s=e.indexOf(a);return[t[s-1],t[s]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return f$().domain(t).range(e).unknown(r)},on.apply(i,arguments)}const w0=new Date,x0=new Date;function zt(t,e,r,n){function i(a){return t(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(t(a=new Date(+a)),a),i.ceil=a=>(t(a=new Date(a-1)),e(a,1),t(a),a),i.round=a=>{const s=i(a),u=i.ceil(a);return a-s<u-a?s:u},i.offset=(a,s)=>(e(a=new Date(+a),s==null?1:Math.floor(s)),a),i.range=(a,s,u)=>{const c=[];if(a=i.ceil(a),u=u==null?1:Math.floor(u),!(a<s)||!(u>0))return c;let f;do c.push(f=new Date(+a)),e(a,u),t(a);while(f<a&&a<s);return c},i.filter=a=>zt(s=>{if(s>=s)for(;t(s),!a(s);)s.setTime(s-1)},(s,u)=>{if(s>=s)if(u<0)for(;++u<=0;)for(;e(s,-1),!a(s););else for(;--u>=0;)for(;e(s,1),!a(s););}),r&&(i.count=(a,s)=>(w0.setTime(+a),x0.setTime(+s),t(w0),t(x0),Math.floor(r(w0,x0))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?s=>n(s)%a===0:s=>i.count(0,s)%a===0):i)),i}const Ld=zt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Ld.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?zt(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):Ld);Ld.range;const ui=1e3,tn=ui*60,ci=tn*60,vi=ci*24,c1=vi*7,z2=vi*30,_0=vi*365,Wa=zt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*ui)},(t,e)=>(e-t)/ui,t=>t.getUTCSeconds());Wa.range;const f1=zt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ui)},(t,e)=>{t.setTime(+t+e*tn)},(t,e)=>(e-t)/tn,t=>t.getMinutes());f1.range;const d1=zt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*tn)},(t,e)=>(e-t)/tn,t=>t.getUTCMinutes());d1.range;const h1=zt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ui-t.getMinutes()*tn)},(t,e)=>{t.setTime(+t+e*ci)},(t,e)=>(e-t)/ci,t=>t.getHours());h1.range;const p1=zt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*ci)},(t,e)=>(e-t)/ci,t=>t.getUTCHours());p1.range;const lc=zt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*tn)/vi,t=>t.getDate()-1);lc.range;const qh=zt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/vi,t=>t.getUTCDate()-1);qh.range;const d$=zt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/vi,t=>Math.floor(t/vi));d$.range;function so(t){return zt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,r)=>{e.setDate(e.getDate()+r*7)},(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*tn)/c1)}const Uh=so(0),Dd=so(1),MK=so(2),LK=so(3),ps=so(4),DK=so(5),BK=so(6);Uh.range;Dd.range;MK.range;LK.range;ps.range;DK.range;BK.range;function lo(t){return zt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r*7)},(e,r)=>(r-e)/c1)}const Fh=lo(0),Bd=lo(1),zK=lo(2),qK=lo(3),ms=lo(4),UK=lo(5),FK=lo(6);Fh.range;Bd.range;zK.range;qK.range;ms.range;UK.range;FK.range;const m1=zt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());m1.range;const g1=zt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());g1.range;const yi=zt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());yi.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:zt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)});yi.range;const bi=zt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());bi.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:zt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)});bi.range;function h$(t,e,r,n,i,a){const s=[[Wa,1,ui],[Wa,5,5*ui],[Wa,15,15*ui],[Wa,30,30*ui],[a,1,tn],[a,5,5*tn],[a,15,15*tn],[a,30,30*tn],[i,1,ci],[i,3,3*ci],[i,6,6*ci],[i,12,12*ci],[n,1,vi],[n,2,2*vi],[r,1,c1],[e,1,z2],[e,3,3*z2],[t,1,_0]];function u(f,p,h){const g=p<f;g&&([f,p]=[p,f]);const v=h&&typeof h.range=="function"?h:c(f,p,h),b=v?v.range(f,+p+1):[];return g?b.reverse():b}function c(f,p,h){const g=Math.abs(p-f)/h,v=Qx(([,,y])=>y).right(s,g);if(v===s.length)return t.every(nw(f/_0,p/_0,h));if(v===0)return Ld.every(Math.max(nw(f,p,h),1));const[b,x]=s[g/s[v-1][2]<s[v][2]/g?v-1:v];return b.every(x)}return[u,c]}const[HK,WK]=h$(bi,g1,Fh,d$,p1,d1),[KK,VK]=h$(yi,m1,Uh,lc,h1,f1);function S0(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function k0(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function ql(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function GK(t){var e=t.dateTime,r=t.date,n=t.time,i=t.periods,a=t.days,s=t.shortDays,u=t.months,c=t.shortMonths,f=Ul(i),p=Fl(i),h=Ul(a),g=Fl(a),v=Ul(s),b=Fl(s),x=Ul(u),y=Fl(u),k=Ul(c),O=Fl(c),A={a:Z,A:X,b:te,B:H,c:null,d:K2,e:K2,f:vV,g:AV,G:TV,H:pV,I:mV,j:gV,L:p$,m:yV,M:bV,p:z,q:B,Q:X2,s:Y2,S:wV,u:xV,U:_V,V:SV,w:kV,W:EV,x:null,X:null,y:OV,Y:PV,Z:jV,"%":G2},T={a:J,A:ae,b:se,B:de,c:null,d:V2,e:V2,f:$V,g:HV,G:KV,H:CV,I:RV,j:NV,L:g$,m:IV,M:MV,p:Ne,q:pe,Q:X2,s:Y2,S:LV,u:DV,U:BV,V:zV,w:qV,W:UV,x:null,X:null,y:FV,Y:WV,Z:VV,"%":G2},E={a:V,A:$,b:I,B:q,c:U,d:H2,e:H2,f:cV,g:F2,G:U2,H:W2,I:W2,j:oV,L:uV,m:aV,M:sV,p:L,q:iV,Q:dV,s:hV,S:lV,u:ZK,U:eV,V:tV,w:QK,W:rV,x:K,X:G,y:F2,Y:U2,Z:nV,"%":fV};A.x=P(r,A),A.X=P(n,A),A.c=P(e,A),T.x=P(r,T),T.X=P(n,T),T.c=P(e,T);function P(ne,_e){return function(Ee){var ie=[],He=-1,$e=0,ht=ne.length,lt,pt,mr;for(Ee instanceof Date||(Ee=new Date(+Ee));++He<ht;)ne.charCodeAt(He)===37&&(ie.push(ne.slice($e,He)),(pt=q2[lt=ne.charAt(++He)])!=null?lt=ne.charAt(++He):pt=lt==="e"?" ":"0",(mr=_e[lt])&&(lt=mr(Ee,pt)),ie.push(lt),$e=He+1);return ie.push(ne.slice($e,He)),ie.join("")}}function C(ne,_e){return function(Ee){var ie=ql(1900,void 0,1),He=N(ie,ne,Ee+="",0),$e,ht;if(He!=Ee.length)return null;if("Q"in ie)return new Date(ie.Q);if("s"in ie)return new Date(ie.s*1e3+("L"in ie?ie.L:0));if(_e&&!("Z"in ie)&&(ie.Z=0),"p"in ie&&(ie.H=ie.H%12+ie.p*12),ie.m===void 0&&(ie.m="q"in ie?ie.q:0),"V"in ie){if(ie.V<1||ie.V>53)return null;"w"in ie||(ie.w=1),"Z"in ie?($e=k0(ql(ie.y,0,1)),ht=$e.getUTCDay(),$e=ht>4||ht===0?Bd.ceil($e):Bd($e),$e=qh.offset($e,(ie.V-1)*7),ie.y=$e.getUTCFullYear(),ie.m=$e.getUTCMonth(),ie.d=$e.getUTCDate()+(ie.w+6)%7):($e=S0(ql(ie.y,0,1)),ht=$e.getDay(),$e=ht>4||ht===0?Dd.ceil($e):Dd($e),$e=lc.offset($e,(ie.V-1)*7),ie.y=$e.getFullYear(),ie.m=$e.getMonth(),ie.d=$e.getDate()+(ie.w+6)%7)}else("W"in ie||"U"in ie)&&("w"in ie||(ie.w="u"in ie?ie.u%7:"W"in ie?1:0),ht="Z"in ie?k0(ql(ie.y,0,1)).getUTCDay():S0(ql(ie.y,0,1)).getDay(),ie.m=0,ie.d="W"in ie?(ie.w+6)%7+ie.W*7-(ht+5)%7:ie.w+ie.U*7-(ht+6)%7);return"Z"in ie?(ie.H+=ie.Z/100|0,ie.M+=ie.Z%100,k0(ie)):S0(ie)}}function N(ne,_e,Ee,ie){for(var He=0,$e=_e.length,ht=Ee.length,lt,pt;He<$e;){if(ie>=ht)return-1;if(lt=_e.charCodeAt(He++),lt===37){if(lt=_e.charAt(He++),pt=E[lt in q2?_e.charAt(He++):lt],!pt||(ie=pt(ne,Ee,ie))<0)return-1}else if(lt!=Ee.charCodeAt(ie++))return-1}return ie}function L(ne,_e,Ee){var ie=f.exec(_e.slice(Ee));return ie?(ne.p=p.get(ie[0].toLowerCase()),Ee+ie[0].length):-1}function V(ne,_e,Ee){var ie=v.exec(_e.slice(Ee));return ie?(ne.w=b.get(ie[0].toLowerCase()),Ee+ie[0].length):-1}function $(ne,_e,Ee){var ie=h.exec(_e.slice(Ee));return ie?(ne.w=g.get(ie[0].toLowerCase()),Ee+ie[0].length):-1}function I(ne,_e,Ee){var ie=k.exec(_e.slice(Ee));return ie?(ne.m=O.get(ie[0].toLowerCase()),Ee+ie[0].length):-1}function q(ne,_e,Ee){var ie=x.exec(_e.slice(Ee));return ie?(ne.m=y.get(ie[0].toLowerCase()),Ee+ie[0].length):-1}function U(ne,_e,Ee){return N(ne,e,_e,Ee)}function K(ne,_e,Ee){return N(ne,r,_e,Ee)}function G(ne,_e,Ee){return N(ne,n,_e,Ee)}function Z(ne){return s[ne.getDay()]}function X(ne){return a[ne.getDay()]}function te(ne){return c[ne.getMonth()]}function H(ne){return u[ne.getMonth()]}function z(ne){return i[+(ne.getHours()>=12)]}function B(ne){return 1+~~(ne.getMonth()/3)}function J(ne){return s[ne.getUTCDay()]}function ae(ne){return a[ne.getUTCDay()]}function se(ne){return c[ne.getUTCMonth()]}function de(ne){return u[ne.getUTCMonth()]}function Ne(ne){return i[+(ne.getUTCHours()>=12)]}function pe(ne){return 1+~~(ne.getUTCMonth()/3)}return{format:function(ne){var _e=P(ne+="",A);return _e.toString=function(){return ne},_e},parse:function(ne){var _e=C(ne+="",!1);return _e.toString=function(){return ne},_e},utcFormat:function(ne){var _e=P(ne+="",T);return _e.toString=function(){return ne},_e},utcParse:function(ne){var _e=C(ne+="",!0);return _e.toString=function(){return ne},_e}}}var q2={"-":"",_:" ",0:"0"},Gt=/^\s*\d+/,XK=/^%/,YK=/[\\^$*+?|[\]().{}]/g;function Ve(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(e)+i:i)}function JK(t){return t.replace(YK,"\\$&")}function Ul(t){return new RegExp("^(?:"+t.map(JK).join("|")+")","i")}function Fl(t){return new Map(t.map((e,r)=>[e.toLowerCase(),r]))}function QK(t,e,r){var n=Gt.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function ZK(t,e,r){var n=Gt.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1}function eV(t,e,r){var n=Gt.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1}function tV(t,e,r){var n=Gt.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1}function rV(t,e,r){var n=Gt.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1}function U2(t,e,r){var n=Gt.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function F2(t,e,r){var n=Gt.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function nV(t,e,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function iV(t,e,r){var n=Gt.exec(e.slice(r,r+1));return n?(t.q=n[0]*3-3,r+n[0].length):-1}function aV(t,e,r){var n=Gt.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function H2(t,e,r){var n=Gt.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function oV(t,e,r){var n=Gt.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function W2(t,e,r){var n=Gt.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function sV(t,e,r){var n=Gt.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function lV(t,e,r){var n=Gt.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function uV(t,e,r){var n=Gt.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function cV(t,e,r){var n=Gt.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function fV(t,e,r){var n=XK.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function dV(t,e,r){var n=Gt.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function hV(t,e,r){var n=Gt.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function K2(t,e){return Ve(t.getDate(),e,2)}function pV(t,e){return Ve(t.getHours(),e,2)}function mV(t,e){return Ve(t.getHours()%12||12,e,2)}function gV(t,e){return Ve(1+lc.count(yi(t),t),e,3)}function p$(t,e){return Ve(t.getMilliseconds(),e,3)}function vV(t,e){return p$(t,e)+"000"}function yV(t,e){return Ve(t.getMonth()+1,e,2)}function bV(t,e){return Ve(t.getMinutes(),e,2)}function wV(t,e){return Ve(t.getSeconds(),e,2)}function xV(t){var e=t.getDay();return e===0?7:e}function _V(t,e){return Ve(Uh.count(yi(t)-1,t),e,2)}function m$(t){var e=t.getDay();return e>=4||e===0?ps(t):ps.ceil(t)}function SV(t,e){return t=m$(t),Ve(ps.count(yi(t),t)+(yi(t).getDay()===4),e,2)}function kV(t){return t.getDay()}function EV(t,e){return Ve(Dd.count(yi(t)-1,t),e,2)}function OV(t,e){return Ve(t.getFullYear()%100,e,2)}function AV(t,e){return t=m$(t),Ve(t.getFullYear()%100,e,2)}function PV(t,e){return Ve(t.getFullYear()%1e4,e,4)}function TV(t,e){var r=t.getDay();return t=r>=4||r===0?ps(t):ps.ceil(t),Ve(t.getFullYear()%1e4,e,4)}function jV(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Ve(e/60|0,"0",2)+Ve(e%60,"0",2)}function V2(t,e){return Ve(t.getUTCDate(),e,2)}function CV(t,e){return Ve(t.getUTCHours(),e,2)}function RV(t,e){return Ve(t.getUTCHours()%12||12,e,2)}function NV(t,e){return Ve(1+qh.count(bi(t),t),e,3)}function g$(t,e){return Ve(t.getUTCMilliseconds(),e,3)}function $V(t,e){return g$(t,e)+"000"}function IV(t,e){return Ve(t.getUTCMonth()+1,e,2)}function MV(t,e){return Ve(t.getUTCMinutes(),e,2)}function LV(t,e){return Ve(t.getUTCSeconds(),e,2)}function DV(t){var e=t.getUTCDay();return e===0?7:e}function BV(t,e){return Ve(Fh.count(bi(t)-1,t),e,2)}function v$(t){var e=t.getUTCDay();return e>=4||e===0?ms(t):ms.ceil(t)}function zV(t,e){return t=v$(t),Ve(ms.count(bi(t),t)+(bi(t).getUTCDay()===4),e,2)}function qV(t){return t.getUTCDay()}function UV(t,e){return Ve(Bd.count(bi(t)-1,t),e,2)}function FV(t,e){return Ve(t.getUTCFullYear()%100,e,2)}function HV(t,e){return t=v$(t),Ve(t.getUTCFullYear()%100,e,2)}function WV(t,e){return Ve(t.getUTCFullYear()%1e4,e,4)}function KV(t,e){var r=t.getUTCDay();return t=r>=4||r===0?ms(t):ms.ceil(t),Ve(t.getUTCFullYear()%1e4,e,4)}function VV(){return"+0000"}function G2(){return"%"}function X2(t){return+t}function Y2(t){return Math.floor(+t/1e3)}var Uo,y$,b$;GV({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 GV(t){return Uo=GK(t),y$=Uo.format,Uo.parse,b$=Uo.utcFormat,Uo.utcParse,Uo}function XV(t){return new Date(t)}function YV(t){return t instanceof Date?+t:+new Date(+t)}function v1(t,e,r,n,i,a,s,u,c,f){var p=n1(),h=p.invert,g=p.domain,v=f(".%L"),b=f(":%S"),x=f("%I:%M"),y=f("%I %p"),k=f("%a %d"),O=f("%b %d"),A=f("%B"),T=f("%Y");function E(P){return(c(P)<P?v:u(P)<P?b:s(P)<P?x:a(P)<P?y:n(P)<P?i(P)<P?k:O:r(P)<P?A:T)(P)}return p.invert=function(P){return new Date(h(P))},p.domain=function(P){return arguments.length?g(Array.from(P,YV)):g().map(XV)},p.ticks=function(P){var C=g();return t(C[0],C[C.length-1],P??10)},p.tickFormat=function(P,C){return C==null?E:f(C)},p.nice=function(P){var C=g();return(!P||typeof P.range!="function")&&(P=e(C[0],C[C.length-1],P??10)),P?g(a$(C,P)):p},p.copy=function(){return sc(p,v1(t,e,r,n,i,a,s,u,c,f))},p}function JV(){return on.apply(v1(KK,VK,yi,m1,Uh,lc,h1,f1,Wa,y$).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function QV(){return on.apply(v1(HK,WK,bi,g1,Fh,qh,p1,d1,Wa,b$).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Hh(){var t=0,e=1,r,n,i,a,s=pr,u=!1,c;function f(h){return h==null||isNaN(h=+h)?c:s(i===0?.5:(h=(a(h)-r)*i,u?Math.max(0,Math.min(1,h)):h))}f.domain=function(h){return arguments.length?([t,e]=h,r=a(t=+t),n=a(e=+e),i=r===n?0:1/(n-r),f):[t,e]},f.clamp=function(h){return arguments.length?(u=!!h,f):u},f.interpolator=function(h){return arguments.length?(s=h,f):s};function p(h){return function(g){var v,b;return arguments.length?([v,b]=g,s=h(v,b),f):[s(0),s(1)]}}return f.range=p(Ws),f.rangeRound=p(r1),f.unknown=function(h){return arguments.length?(c=h,f):c},function(h){return a=h,r=h(t),n=h(e),i=r===n?0:1/(n-r),f}}function ca(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function w$(){var t=ua(Hh()(pr));return t.copy=function(){return ca(t,w$())},Si.apply(t,arguments)}function x$(){var t=o1(Hh()).domain([1,10]);return t.copy=function(){return ca(t,x$()).base(t.base())},Si.apply(t,arguments)}function _$(){var t=s1(Hh());return t.copy=function(){return ca(t,_$()).constant(t.constant())},Si.apply(t,arguments)}function y1(){var t=l1(Hh());return t.copy=function(){return ca(t,y1()).exponent(t.exponent())},Si.apply(t,arguments)}function ZV(){return y1.apply(null,arguments).exponent(.5)}function S$(){var t=[],e=pr;function r(n){if(n!=null&&!isNaN(n=+n))return e((ac(t,n,1)-1)/(t.length-1))}return r.domain=function(n){if(!arguments.length)return t.slice();t=[];for(let i of n)i!=null&&!isNaN(i=+i)&&t.push(i);return t.sort(aa),r},r.interpolator=function(n){return arguments.length?(e=n,r):e},r.range=function(){return t.map((n,i)=>e(i/(t.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>BW(t,a/n))},r.copy=function(){return S$(e).domain(t)},Si.apply(r,arguments)}function Wh(){var t=0,e=.5,r=1,n=1,i,a,s,u,c,f=pr,p,h=!1,g;function v(x){return isNaN(x=+x)?g:(x=.5+((x=+p(x))-a)*(n*x<n*a?u:c),f(h?Math.max(0,Math.min(1,x)):x))}v.domain=function(x){return arguments.length?([t,e,r]=x,i=p(t=+t),a=p(e=+e),s=p(r=+r),u=i===a?0:.5/(a-i),c=a===s?0:.5/(s-a),n=a<i?-1:1,v):[t,e,r]},v.clamp=function(x){return arguments.length?(h=!!x,v):h},v.interpolator=function(x){return arguments.length?(f=x,v):f};function b(x){return function(y){var k,O,A;return arguments.length?([k,O,A]=y,f=fK(x,[k,O,A]),v):[f(0),f(.5),f(1)]}}return v.range=b(Ws),v.rangeRound=b(r1),v.unknown=function(x){return arguments.length?(g=x,v):g},function(x){return p=x,i=x(t),a=x(e),s=x(r),u=i===a?0:.5/(a-i),c=a===s?0:.5/(s-a),n=a<i?-1:1,v}}function k$(){var t=ua(Wh()(pr));return t.copy=function(){return ca(t,k$())},Si.apply(t,arguments)}function E$(){var t=o1(Wh()).domain([.1,1,10]);return t.copy=function(){return ca(t,E$()).base(t.base())},Si.apply(t,arguments)}function O$(){var t=s1(Wh());return t.copy=function(){return ca(t,O$()).constant(t.constant())},Si.apply(t,arguments)}function b1(){var t=l1(Wh());return t.copy=function(){return ca(t,b1()).exponent(t.exponent())},Si.apply(t,arguments)}function eG(){return b1.apply(null,arguments).exponent(.5)}const J2=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Eu,scaleDiverging:k$,scaleDivergingLog:E$,scaleDivergingPow:b1,scaleDivergingSqrt:eG,scaleDivergingSymlog:O$,scaleIdentity:i$,scaleImplicit:iw,scaleLinear:Md,scaleLog:o$,scaleOrdinal:Zx,scalePoint:ou,scalePow:u1,scaleQuantile:u$,scaleQuantize:c$,scaleRadial:l$,scaleSequential:w$,scaleSequentialLog:x$,scaleSequentialPow:y1,scaleSequentialQuantile:S$,scaleSequentialSqrt:ZV,scaleSequentialSymlog:_$,scaleSqrt:$K,scaleSymlog:s$,scaleThreshold:f$,scaleTime:JV,scaleUtc:QV,tickFormat:n$},Symbol.toStringTag,{value:"Module"}));var E0,Q2;function Kh(){if(Q2)return E0;Q2=1;var t=zs();function e(r,n,i){for(var a=-1,s=r.length;++a<s;){var u=r[a],c=n(u);if(c!=null&&(f===void 0?c===c&&!t(c):i(c,f)))var f=c,p=u}return p}return E0=e,E0}var O0,Z2;function A$(){if(Z2)return O0;Z2=1;function t(e,r){return e>r}return O0=t,O0}var A0,eT;function tG(){if(eT)return A0;eT=1;var t=Kh(),e=A$(),r=Hs();function n(i){return i&&i.length?t(i,r,e):void 0}return A0=n,A0}var rG=tG();const na=Qe(rG);var P0,tT;function P$(){if(tT)return P0;tT=1;function t(e,r){return e<r}return P0=t,P0}var T0,rT;function nG(){if(rT)return T0;rT=1;var t=Kh(),e=P$(),r=Hs();function n(i){return i&&i.length?t(i,r,e):void 0}return T0=n,T0}var iG=nG();const Vh=Qe(iG);var j0,nT;function aG(){if(nT)return j0;nT=1;var t=Ix(),e=Kn(),r=LN(),n=Or();function i(a,s){var u=n(a)?t:r;return u(a,e(s,3))}return j0=i,j0}var C0,iT;function oG(){if(iT)return C0;iT=1;var t=IN(),e=aG();function r(n,i){return t(e(n,i),1)}return C0=r,C0}var sG=oG();const lG=Qe(sG);var R0,aT;function uG(){if(aT)return R0;aT=1;var t=Gx();function e(r,n){return t(r,n)}return R0=e,R0}var cG=uG();const gs=Qe(cG);var Ks=1e9,fG={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},x1,gt=!0,nn="[DecimalError] ",Ya=nn+"Invalid argument: ",w1=nn+"Exponent out of range: ",Vs=Math.floor,Ba=Math.pow,dG=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Mr,Kt=1e7,dt=7,T$=9007199254740991,zd=Vs(T$/dt),be={};be.absoluteValue=be.abs=function(){var t=new this.constructor(this);return t.s&&(t.s=1),t};be.comparedTo=be.cmp=function(t){var e,r,n,i,a=this;if(t=new a.constructor(t),a.s!==t.s)return a.s||-t.s;if(a.e!==t.e)return a.e>t.e^a.s<0?1:-1;for(n=a.d.length,i=t.d.length,e=0,r=n<i?n:i;e<r;++e)if(a.d[e]!==t.d[e])return a.d[e]>t.d[e]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1};be.decimalPlaces=be.dp=function(){var t=this,e=t.d.length-1,r=(e-t.e)*dt;if(e=t.d[e],e)for(;e%10==0;e/=10)r--;return r<0?0:r};be.dividedBy=be.div=function(t){return pi(this,new this.constructor(t))};be.dividedToIntegerBy=be.idiv=function(t){var e=this,r=e.constructor;return rt(pi(e,new r(t),0,1),r.precision)};be.equals=be.eq=function(t){return!this.cmp(t)};be.exponent=function(){return Ct(this)};be.greaterThan=be.gt=function(t){return this.cmp(t)>0};be.greaterThanOrEqualTo=be.gte=function(t){return this.cmp(t)>=0};be.isInteger=be.isint=function(){return this.e>this.d.length-2};be.isNegative=be.isneg=function(){return this.s<0};be.isPositive=be.ispos=function(){return this.s>0};be.isZero=function(){return this.s===0};be.lessThan=be.lt=function(t){return this.cmp(t)<0};be.lessThanOrEqualTo=be.lte=function(t){return this.cmp(t)<1};be.logarithm=be.log=function(t){var e,r=this,n=r.constructor,i=n.precision,a=i+5;if(t===void 0)t=new n(10);else if(t=new n(t),t.s<1||t.eq(Mr))throw Error(nn+"NaN");if(r.s<1)throw Error(nn+(r.s?"NaN":"-Infinity"));return r.eq(Mr)?new n(0):(gt=!1,e=pi(ju(r,a),ju(t,a),a),gt=!0,rt(e,i))};be.minus=be.sub=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?R$(e,t):j$(e,(t.s=-t.s,t))};be.modulo=be.mod=function(t){var e,r=this,n=r.constructor,i=n.precision;if(t=new n(t),!t.s)throw Error(nn+"NaN");return r.s?(gt=!1,e=pi(r,t,0,1).times(t),gt=!0,r.minus(e)):rt(new n(r),i)};be.naturalExponential=be.exp=function(){return C$(this)};be.naturalLogarithm=be.ln=function(){return ju(this)};be.negated=be.neg=function(){var t=new this.constructor(this);return t.s=-t.s||0,t};be.plus=be.add=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?j$(e,t):R$(e,(t.s=-t.s,t))};be.precision=be.sd=function(t){var e,r,n,i=this;if(t!==void 0&&t!==!!t&&t!==1&&t!==0)throw Error(Ya+t);if(e=Ct(i)+1,n=i.d.length-1,r=n*dt+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return t&&e>r?e:r};be.squareRoot=be.sqrt=function(){var t,e,r,n,i,a,s,u=this,c=u.constructor;if(u.s<1){if(!u.s)return new c(0);throw Error(nn+"NaN")}for(t=Ct(u),gt=!1,i=Math.sqrt(+u),i==0||i==1/0?(e=Bn(u.d),(e.length+t)%2==0&&(e+="0"),i=Math.sqrt(e),t=Vs((t+1)/2)-(t<0||t%2),i==1/0?e="5e"+t:(e=i.toExponential(),e=e.slice(0,e.indexOf("e")+1)+t),n=new c(e)):n=new c(i.toString()),r=c.precision,i=s=r+3;;)if(a=n,n=a.plus(pi(u,a,s+2)).times(.5),Bn(a.d).slice(0,s)===(e=Bn(n.d)).slice(0,s)){if(e=e.slice(s-3,s+1),i==s&&e=="4999"){if(rt(a,r+1,0),a.times(a).eq(u)){n=a;break}}else if(e!="9999")break;s+=4}return gt=!0,rt(n,r)};be.times=be.mul=function(t){var e,r,n,i,a,s,u,c,f,p=this,h=p.constructor,g=p.d,v=(t=new h(t)).d;if(!p.s||!t.s)return new h(0);for(t.s*=p.s,r=p.e+t.e,c=g.length,f=v.length,c<f&&(a=g,g=v,v=a,s=c,c=f,f=s),a=[],s=c+f,n=s;n--;)a.push(0);for(n=f;--n>=0;){for(e=0,i=c+n;i>n;)u=a[i]+v[n]*g[i-n-1]+e,a[i--]=u%Kt|0,e=u/Kt|0;a[i]=(a[i]+e)%Kt|0}for(;!a[--s];)a.pop();return e?++r:a.shift(),t.d=a,t.e=r,gt?rt(t,h.precision):t};be.toDecimalPlaces=be.todp=function(t,e){var r=this,n=r.constructor;return r=new n(r),t===void 0?r:(Fn(t,0,Ks),e===void 0?e=n.rounding:Fn(e,0,8),rt(r,t+Ct(r)+1,e))};be.toExponential=function(t,e){var r,n=this,i=n.constructor;return t===void 0?r=to(n,!0):(Fn(t,0,Ks),e===void 0?e=i.rounding:Fn(e,0,8),n=rt(new i(n),t+1,e),r=to(n,!0,t+1)),r};be.toFixed=function(t,e){var r,n,i=this,a=i.constructor;return t===void 0?to(i):(Fn(t,0,Ks),e===void 0?e=a.rounding:Fn(e,0,8),n=rt(new a(i),t+Ct(i)+1,e),r=to(n.abs(),!1,t+Ct(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};be.toInteger=be.toint=function(){var t=this,e=t.constructor;return rt(new e(t),Ct(t)+1,e.rounding)};be.toNumber=function(){return+this};be.toPower=be.pow=function(t){var e,r,n,i,a,s,u=this,c=u.constructor,f=12,p=+(t=new c(t));if(!t.s)return new c(Mr);if(u=new c(u),!u.s){if(t.s<1)throw Error(nn+"Infinity");return u}if(u.eq(Mr))return u;if(n=c.precision,t.eq(Mr))return rt(u,n);if(e=t.e,r=t.d.length-1,s=e>=r,a=u.s,s){if((r=p<0?-p:p)<=T$){for(i=new c(Mr),e=Math.ceil(n/dt+4),gt=!1;r%2&&(i=i.times(u),sT(i.d,e)),r=Vs(r/2),r!==0;)u=u.times(u),sT(u.d,e);return gt=!0,t.s<0?new c(Mr).div(i):rt(i,n)}}else if(a<0)throw Error(nn+"NaN");return a=a<0&&t.d[Math.max(e,r)]&1?-1:1,u.s=1,gt=!1,i=t.times(ju(u,n+f)),gt=!0,i=C$(i),i.s=a,i};be.toPrecision=function(t,e){var r,n,i=this,a=i.constructor;return t===void 0?(r=Ct(i),n=to(i,r<=a.toExpNeg||r>=a.toExpPos)):(Fn(t,1,Ks),e===void 0?e=a.rounding:Fn(e,0,8),i=rt(new a(i),t,e),r=Ct(i),n=to(i,t<=r||r<=a.toExpNeg,t)),n};be.toSignificantDigits=be.tosd=function(t,e){var r=this,n=r.constructor;return t===void 0?(t=n.precision,e=n.rounding):(Fn(t,1,Ks),e===void 0?e=n.rounding:Fn(e,0,8)),rt(new n(r),t,e)};be.toString=be.valueOf=be.val=be.toJSON=be[Symbol.for("nodejs.util.inspect.custom")]=function(){var t=this,e=Ct(t),r=t.constructor;return to(t,e<=r.toExpNeg||e>=r.toExpPos)};function j$(t,e){var r,n,i,a,s,u,c,f,p=t.constructor,h=p.precision;if(!t.s||!e.s)return e.s||(e=new p(t)),gt?rt(e,h):e;if(c=t.d,f=e.d,s=t.e,i=e.e,c=c.slice(),a=s-i,a){for(a<0?(n=c,a=-a,u=f.length):(n=f,i=s,u=c.length),s=Math.ceil(h/dt),u=s>u?s+1:u+1,a>u&&(a=u,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(u=c.length,a=f.length,u-a<0&&(a=u,n=f,f=c,c=n),r=0;a;)r=(c[--a]=c[a]+f[a]+r)/Kt|0,c[a]%=Kt;for(r&&(c.unshift(r),++i),u=c.length;c[--u]==0;)c.pop();return e.d=c,e.e=i,gt?rt(e,h):e}function Fn(t,e,r){if(t!==~~t||t<e||t>r)throw Error(Ya+t)}function Bn(t){var e,r,n,i=t.length-1,a="",s=t[0];if(i>0){for(a+=s,e=1;e<i;e++)n=t[e]+"",r=dt-n.length,r&&(a+=Zi(r)),a+=n;s=t[e],n=s+"",r=dt-n.length,r&&(a+=Zi(r))}else if(s===0)return"0";for(;s%10===0;)s/=10;return a+s}var pi=(function(){function t(n,i){var a,s=0,u=n.length;for(n=n.slice();u--;)a=n[u]*i+s,n[u]=a%Kt|0,s=a/Kt|0;return s&&n.unshift(s),n}function e(n,i,a,s){var u,c;if(a!=s)c=a>s?1:-1;else for(u=c=0;u<a;u++)if(n[u]!=i[u]){c=n[u]>i[u]?1:-1;break}return c}function r(n,i,a){for(var s=0;a--;)n[a]-=s,s=n[a]<i[a]?1:0,n[a]=s*Kt+n[a]-i[a];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,a,s){var u,c,f,p,h,g,v,b,x,y,k,O,A,T,E,P,C,N,L=n.constructor,V=n.s==i.s?1:-1,$=n.d,I=i.d;if(!n.s)return new L(n);if(!i.s)throw Error(nn+"Division by zero");for(c=n.e-i.e,C=I.length,E=$.length,v=new L(V),b=v.d=[],f=0;I[f]==($[f]||0);)++f;if(I[f]>($[f]||0)&&--c,a==null?O=a=L.precision:s?O=a+(Ct(n)-Ct(i))+1:O=a,O<0)return new L(0);if(O=O/dt+2|0,f=0,C==1)for(p=0,I=I[0],O++;(f<E||p)&&O--;f++)A=p*Kt+($[f]||0),b[f]=A/I|0,p=A%I|0;else{for(p=Kt/(I[0]+1)|0,p>1&&(I=t(I,p),$=t($,p),C=I.length,E=$.length),T=C,x=$.slice(0,C),y=x.length;y<C;)x[y++]=0;N=I.slice(),N.unshift(0),P=I[0],I[1]>=Kt/2&&++P;do p=0,u=e(I,x,C,y),u<0?(k=x[0],C!=y&&(k=k*Kt+(x[1]||0)),p=k/P|0,p>1?(p>=Kt&&(p=Kt-1),h=t(I,p),g=h.length,y=x.length,u=e(h,x,g,y),u==1&&(p--,r(h,C<g?N:I,g))):(p==0&&(u=p=1),h=I.slice()),g=h.length,g<y&&h.unshift(0),r(x,h,y),u==-1&&(y=x.length,u=e(I,x,C,y),u<1&&(p++,r(x,C<y?N:I,y))),y=x.length):u===0&&(p++,x=[0]),b[f++]=p,u&&x[0]?x[y++]=$[T]||0:(x=[$[T]],y=1);while((T++<E||x[0]!==void 0)&&O--)}return b[0]||b.shift(),v.e=c,rt(v,s?a+Ct(v)+1:a)}})();function C$(t,e){var r,n,i,a,s,u,c=0,f=0,p=t.constructor,h=p.precision;if(Ct(t)>16)throw Error(w1+Ct(t));if(!t.s)return new p(Mr);for(gt=!1,u=h,s=new p(.03125);t.abs().gte(.1);)t=t.times(s),f+=5;for(n=Math.log(Ba(2,f))/Math.LN10*2+5|0,u+=n,r=i=a=new p(Mr),p.precision=u;;){if(i=rt(i.times(t),u),r=r.times(++c),s=a.plus(pi(i,r,u)),Bn(s.d).slice(0,u)===Bn(a.d).slice(0,u)){for(;f--;)a=rt(a.times(a),u);return p.precision=h,e==null?(gt=!0,rt(a,h)):a}a=s}}function Ct(t){for(var e=t.e*dt,r=t.d[0];r>=10;r/=10)e++;return e}function N0(t,e,r){if(e>t.LN10.sd())throw gt=!0,r&&(t.precision=r),Error(nn+"LN10 precision limit exceeded");return rt(new t(t.LN10),e)}function Zi(t){for(var e="";t--;)e+="0";return e}function ju(t,e){var r,n,i,a,s,u,c,f,p,h=1,g=10,v=t,b=v.d,x=v.constructor,y=x.precision;if(v.s<1)throw Error(nn+(v.s?"NaN":"-Infinity"));if(v.eq(Mr))return new x(0);if(e==null?(gt=!1,f=y):f=e,v.eq(10))return e==null&&(gt=!0),N0(x,f);if(f+=g,x.precision=f,r=Bn(b),n=r.charAt(0),a=Ct(v),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)v=v.times(t),r=Bn(v.d),n=r.charAt(0),h++;a=Ct(v),n>1?(v=new x("0."+r),a++):v=new x(n+"."+r.slice(1))}else return c=N0(x,f+2,y).times(a+""),v=ju(new x(n+"."+r.slice(1)),f-g).plus(c),x.precision=y,e==null?(gt=!0,rt(v,y)):v;for(u=s=v=pi(v.minus(Mr),v.plus(Mr),f),p=rt(v.times(v),f),i=3;;){if(s=rt(s.times(p),f),c=u.plus(pi(s,new x(i),f)),Bn(c.d).slice(0,f)===Bn(u.d).slice(0,f))return u=u.times(2),a!==0&&(u=u.plus(N0(x,f+2,y).times(a+""))),u=pi(u,new x(h),f),x.precision=y,e==null?(gt=!0,rt(u,y)):u;u=c,i+=2}}function oT(t,e){var r,n,i;for((r=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(r<0&&(r=n),r+=+e.slice(n+1),e=e.substring(0,n)):r<0&&(r=e.length),n=0;e.charCodeAt(n)===48;)++n;for(i=e.length;e.charCodeAt(i-1)===48;)--i;if(e=e.slice(n,i),e){if(i-=n,r=r-n-1,t.e=Vs(r/dt),t.d=[],n=(r+1)%dt,r<0&&(n+=dt),n<i){for(n&&t.d.push(+e.slice(0,n)),i-=dt;n<i;)t.d.push(+e.slice(n,n+=dt));e=e.slice(n),n=dt-e.length}else n-=i;for(;n--;)e+="0";if(t.d.push(+e),gt&&(t.e>zd||t.e<-zd))throw Error(w1+r)}else t.s=0,t.e=0,t.d=[0];return t}function rt(t,e,r){var n,i,a,s,u,c,f,p,h=t.d;for(s=1,a=h[0];a>=10;a/=10)s++;if(n=e-s,n<0)n+=dt,i=e,f=h[p=0];else{if(p=Math.ceil((n+1)/dt),a=h.length,p>=a)return t;for(f=a=h[p],s=1;a>=10;a/=10)s++;n%=dt,i=n-dt+s}if(r!==void 0&&(a=Ba(10,s-i-1),u=f/a%10|0,c=e<0||h[p+1]!==void 0||f%a,c=r<4?(u||c)&&(r==0||r==(t.s<0?3:2)):u>5||u==5&&(r==4||c||r==6&&(n>0?i>0?f/Ba(10,s-i):0:h[p-1])%10&1||r==(t.s<0?8:7))),e<1||!h[0])return c?(a=Ct(t),h.length=1,e=e-a-1,h[0]=Ba(10,(dt-e%dt)%dt),t.e=Vs(-e/dt)||0):(h.length=1,h[0]=t.e=t.s=0),t;if(n==0?(h.length=p,a=1,p--):(h.length=p+1,a=Ba(10,dt-n),h[p]=i>0?(f/Ba(10,s-i)%Ba(10,i)|0)*a:0),c)for(;;)if(p==0){(h[0]+=a)==Kt&&(h[0]=1,++t.e);break}else{if(h[p]+=a,h[p]!=Kt)break;h[p--]=0,a=1}for(n=h.length;h[--n]===0;)h.pop();if(gt&&(t.e>zd||t.e<-zd))throw Error(w1+Ct(t));return t}function R$(t,e){var r,n,i,a,s,u,c,f,p,h,g=t.constructor,v=g.precision;if(!t.s||!e.s)return e.s?e.s=-e.s:e=new g(t),gt?rt(e,v):e;if(c=t.d,h=e.d,n=e.e,f=t.e,c=c.slice(),s=f-n,s){for(p=s<0,p?(r=c,s=-s,u=h.length):(r=h,n=f,u=c.length),i=Math.max(Math.ceil(v/dt),u)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=c.length,u=h.length,p=i<u,p&&(u=i),i=0;i<u;i++)if(c[i]!=h[i]){p=c[i]<h[i];break}s=0}for(p&&(r=c,c=h,h=r,e.s=-e.s),u=c.length,i=h.length-u;i>0;--i)c[u++]=0;for(i=h.length;i>s;){if(c[--i]<h[i]){for(a=i;a&&c[--a]===0;)c[a]=Kt-1;--c[a],c[i]+=Kt}c[i]-=h[i]}for(;c[--u]===0;)c.pop();for(;c[0]===0;c.shift())--n;return c[0]?(e.d=c,e.e=n,gt?rt(e,v):e):new g(0)}function to(t,e,r){var n,i=Ct(t),a=Bn(t.d),s=a.length;return e?(r&&(n=r-s)>0?a=a.charAt(0)+"."+a.slice(1)+Zi(n):s>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Zi(-i-1)+a,r&&(n=r-s)>0&&(a+=Zi(n))):i>=s?(a+=Zi(i+1-s),r&&(n=r-i-1)>0&&(a=a+"."+Zi(n))):((n=i+1)<s&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-s)>0&&(i+1===s&&(a+="."),a+=Zi(n))),t.s<0?"-"+a:a}function sT(t,e){if(t.length>e)return t.length=e,!0}function N$(t){var e,r,n;function i(a){var s=this;if(!(s instanceof i))return new i(a);if(s.constructor=i,a instanceof i){s.s=a.s,s.e=a.e,s.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Ya+a);if(a>0)s.s=1;else if(a<0)a=-a,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(a===~~a&&a<1e7){s.e=0,s.d=[a];return}return oT(s,a.toString())}else if(typeof a!="string")throw Error(Ya+a);if(a.charCodeAt(0)===45?(a=a.slice(1),s.s=-1):s.s=1,dG.test(a))oT(s,a);else throw Error(Ya+a)}if(i.prototype=be,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=N$,i.config=i.set=hG,t===void 0&&(t={}),t)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],e=0;e<n.length;)t.hasOwnProperty(r=n[e++])||(t[r]=this[r]);return i.config(t),i}function hG(t){if(!t||typeof t!="object")throw Error(nn+"Object expected");var e,r,n,i=["precision",1,Ks,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(e=0;e<i.length;e+=3)if((n=t[r=i[e]])!==void 0)if(Vs(n)===n&&n>=i[e+1]&&n<=i[e+2])this[r]=n;else throw Error(Ya+r+": "+n);if((n=t[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Ya+r+": "+n);return this}var x1=N$(fG);Mr=new x1(1);const et=x1;function pG(t){return yG(t)||vG(t)||gG(t)||mG()}function mG(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
437
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gG(t,e){if(t){if(typeof t=="string")return lw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lw(t,e)}}function vG(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function yG(t){if(Array.isArray(t))return lw(t)}function lw(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var bG=function(e){return e},$$={},I$=function(e){return e===$$},lT=function(e){return function r(){return arguments.length===0||arguments.length===1&&I$(arguments.length<=0?void 0:arguments[0])?r:e.apply(void 0,arguments)}},wG=function t(e,r){return e===1?r:lT(function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];var s=i.filter(function(u){return u!==$$}).length;return s>=e?r.apply(void 0,i):t(e-s,lT(function(){for(var u=arguments.length,c=new Array(u),f=0;f<u;f++)c[f]=arguments[f];var p=i.map(function(h){return I$(h)?c.shift():h});return r.apply(void 0,pG(p).concat(c))}))})},Gh=function(e){return wG(e.length,e)},uw=function(e,r){for(var n=[],i=e;i<r;++i)n[i-e]=i;return n},xG=Gh(function(t,e){return Array.isArray(e)?e.map(t):Object.keys(e).map(function(r){return e[r]}).map(t)}),_G=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];if(!r.length)return bG;var i=r.reverse(),a=i[0],s=i.slice(1);return function(){return s.reduce(function(u,c){return c(u)},a.apply(void 0,arguments))}},cw=function(e){return Array.isArray(e)?e.reverse():e.split("").reverse.join("")},M$=function(e){var r=null,n=null;return function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r&&a.every(function(u,c){return u===r[c]})||(r=a,n=e.apply(void 0,a)),n}};function SG(t){var e;return t===0?e=1:e=Math.floor(new et(t).abs().log(10).toNumber())+1,e}function kG(t,e,r){for(var n=new et(t),i=0,a=[];n.lt(e)&&i<1e5;)a.push(n.toNumber()),n=n.add(r),i++;return a}var EG=Gh(function(t,e,r){var n=+t,i=+e;return n+r*(i-n)}),OG=Gh(function(t,e,r){var n=e-+t;return n=n||1/0,(r-t)/n}),AG=Gh(function(t,e,r){var n=e-+t;return n=n||1/0,Math.max(0,Math.min(1,(r-t)/n))});const Xh={rangeStep:kG,getDigitCount:SG,interpolateNumber:EG,uninterpolateNumber:OG,uninterpolateTruncation:AG};function fw(t){return jG(t)||TG(t)||L$(t)||PG()}function PG(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
438
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TG(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function jG(t){if(Array.isArray(t))return dw(t)}function Cu(t,e){return NG(t)||RG(t,e)||L$(t,e)||CG()}function CG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
439
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function L$(t,e){if(t){if(typeof t=="string")return dw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return dw(t,e)}}function dw(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function RG(t,e){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(t)))){var r=[],n=!0,i=!1,a=void 0;try{for(var s=t[Symbol.iterator](),u;!(n=(u=s.next()).done)&&(r.push(u.value),!(e&&r.length===e));n=!0);}catch(c){i=!0,a=c}finally{try{!n&&s.return!=null&&s.return()}finally{if(i)throw a}}return r}}function NG(t){if(Array.isArray(t))return t}function D$(t){var e=Cu(t,2),r=e[0],n=e[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]}function B$(t,e,r){if(t.lte(0))return new et(0);var n=Xh.getDigitCount(t.toNumber()),i=new et(10).pow(n),a=t.div(i),s=n!==1?.05:.1,u=new et(Math.ceil(a.div(s).toNumber())).add(r).mul(s),c=u.mul(i);return e?c:new et(Math.ceil(c))}function $G(t,e,r){var n=1,i=new et(t);if(!i.isint()&&r){var a=Math.abs(t);a<1?(n=new et(10).pow(Xh.getDigitCount(t)-1),i=new et(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new et(Math.floor(t)))}else t===0?i=new et(Math.floor((e-1)/2)):r||(i=new et(Math.floor(t)));var s=Math.floor((e-1)/2),u=_G(xG(function(c){return i.add(new et(c-s).mul(n)).toNumber()}),uw);return u(0,e)}function z$(t,e,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((e-t)/(r-1)))return{step:new et(0),tickMin:new et(0),tickMax:new et(0)};var a=B$(new et(e).sub(t).div(r-1),n,i),s;t<=0&&e>=0?s=new et(0):(s=new et(t).add(e).div(2),s=s.sub(new et(s).mod(a)));var u=Math.ceil(s.sub(t).div(a).toNumber()),c=Math.ceil(new et(e).sub(s).div(a).toNumber()),f=u+c+1;return f>r?z$(t,e,r,n,i+1):(f<r&&(c=e>0?c+(r-f):c,u=e>0?u:u+(r-f)),{step:a,tickMin:s.sub(new et(u).mul(a)),tickMax:s.add(new et(c).mul(a))})}function IG(t){var e=Cu(t,2),r=e[0],n=e[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=Math.max(i,2),u=D$([r,n]),c=Cu(u,2),f=c[0],p=c[1];if(f===-1/0||p===1/0){var h=p===1/0?[f].concat(fw(uw(0,i-1).map(function(){return 1/0}))):[].concat(fw(uw(0,i-1).map(function(){return-1/0})),[p]);return r>n?cw(h):h}if(f===p)return $G(f,i,a);var g=z$(f,p,s,a),v=g.step,b=g.tickMin,x=g.tickMax,y=Xh.rangeStep(b,x.add(new et(.1).mul(v)),v);return r>n?cw(y):y}function MG(t,e){var r=Cu(t,2),n=r[0],i=r[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=D$([n,i]),u=Cu(s,2),c=u[0],f=u[1];if(c===-1/0||f===1/0)return[n,i];if(c===f)return[c];var p=Math.max(e,2),h=B$(new et(f).sub(c).div(p-1),a,0),g=[].concat(fw(Xh.rangeStep(new et(c),new et(f).sub(new et(.99).mul(h)),h)),[f]);return n>i?cw(g):g}var LG=M$(IG),DG=M$(MG),BG="Invariant failed";function ro(t,e){throw new Error(BG)}var zG=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function vs(t){"@babel/helpers - typeof";return vs=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},vs(t)}function qd(){return qd=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},qd.apply(this,arguments)}function qG(t,e){return WG(t)||HG(t,e)||FG(t,e)||UG()}function UG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
440
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FG(t,e){if(t){if(typeof t=="string")return uT(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return uT(t,e)}}function uT(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function HG(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function WG(t){if(Array.isArray(t))return t}function KG(t,e){if(t==null)return{};var r=VG(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function VG(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function GG(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function XG(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,F$(n.key),n)}}function YG(t,e,r){return e&&XG(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function JG(t,e,r){return e=Ud(e),QG(t,q$()?Reflect.construct(e,r||[],Ud(t).constructor):e.apply(t,r))}function QG(t,e){if(e&&(vs(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ZG(t)}function ZG(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function q$(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(q$=function(){return!!t})()}function Ud(t){return Ud=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ud(t)}function eX(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&hw(t,e)}function hw(t,e){return hw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},hw(t,e)}function U$(t,e,r){return e=F$(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function F$(t){var e=tX(t,"string");return vs(e)=="symbol"?e:e+""}function tX(t,e){if(vs(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(vs(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Yh=(function(t){function e(){return GG(this,e),JG(this,e,arguments)}return eX(e,t),YG(e,[{key:"render",value:function(){var n=this.props,i=n.offset,a=n.layout,s=n.width,u=n.dataKey,c=n.data,f=n.dataPointFormatter,p=n.xAxis,h=n.yAxis,g=KG(n,zG),v=Oe(g,!1);this.props.direction==="x"&&p.type!=="number"&&ro();var b=c.map(function(x){var y=f(x,u),k=y.x,O=y.y,A=y.value,T=y.errorVal;if(!T)return null;var E=[],P,C;if(Array.isArray(T)){var N=qG(T,2);P=N[0],C=N[1]}else P=C=T;if(a==="vertical"){var L=p.scale,V=O+i,$=V+s,I=V-s,q=L(A-P),U=L(A+C);E.push({x1:U,y1:$,x2:U,y2:I}),E.push({x1:q,y1:V,x2:U,y2:V}),E.push({x1:q,y1:$,x2:q,y2:I})}else if(a==="horizontal"){var K=h.scale,G=k+i,Z=G-s,X=G+s,te=K(A-P),H=K(A+C);E.push({x1:Z,y1:H,x2:X,y2:H}),E.push({x1:G,y1:te,x2:G,y2:H}),E.push({x1:Z,y1:te,x2:X,y2:te})}return M.createElement(Ue,qd({className:"recharts-errorBar",key:"bar-".concat(E.map(function(z){return"".concat(z.x1,"-").concat(z.x2,"-").concat(z.y1,"-").concat(z.y2)}))},v),E.map(function(z){return M.createElement("line",qd({},z,{key:"line-".concat(z.x1,"-").concat(z.x2,"-").concat(z.y1,"-").concat(z.y2)}))}))});return M.createElement(Ue,{className:"recharts-errorBars"},b)}}])})(M.Component);U$(Yh,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});U$(Yh,"displayName","ErrorBar");function Ru(t){"@babel/helpers - typeof";return Ru=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},Ru(t)}function cT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function $a(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?cT(Object(r),!0).forEach(function(n){rX(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):cT(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function rX(t,e,r){return e=nX(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function nX(t){var e=iX(t,"string");return Ru(e)=="symbol"?e:e+""}function iX(t,e){if(Ru(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Ru(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var H$=function(e){var r=e.children,n=e.formattedGraphicalItems,i=e.legendWidth,a=e.legendContent,s=$r(r,ns);if(!s)return null;var u=ns.defaultProps,c=u!==void 0?$a($a({},u),s.props):{},f;return s.props&&s.props.payload?f=s.props&&s.props.payload:a==="children"?f=(n||[]).reduce(function(p,h){var g=h.item,v=h.props,b=v.sectors||v.data||[];return p.concat(b.map(function(x){return{type:s.props.iconType||g.props.legendType,value:x.name,color:x.fill,payload:x}}))},[]):f=(n||[]).map(function(p){var h=p.item,g=h.type.defaultProps,v=g!==void 0?$a($a({},g),h.props):{},b=v.dataKey,x=v.name,y=v.legendType,k=v.hide;return{inactive:k,dataKey:b,type:c.iconType||y||"square",color:_1(h),value:x||b,payload:v}}),$a($a($a({},c),ns.getWithHeight(s,i)),{},{payload:f,item:s})};function Nu(t){"@babel/helpers - typeof";return Nu=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},Nu(t)}function fT(t){return lX(t)||sX(t)||oX(t)||aX()}function aX(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
441
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oX(t,e){if(t){if(typeof t=="string")return pw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return pw(t,e)}}function sX(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function lX(t){if(Array.isArray(t))return pw(t)}function pw(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function dT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function _t(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?dT(Object(r),!0).forEach(function(n){as(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):dT(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function as(t,e,r){return e=uX(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function uX(t){var e=cX(t,"string");return Nu(e)=="symbol"?e:e+""}function cX(t,e){if(Nu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Nu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Dt(t,e,r){return Le(t)||Le(e)?r:Bt(e)?Lr(t,e,r):Ie(e)?e(t):r}function su(t,e,r,n){var i=lG(t,function(u){return Dt(u,e)});if(r==="number"){var a=i.filter(function(u){return fe(u)||parseFloat(u)});return a.length?[Vh(a),na(a)]:[1/0,-1/0]}var s=n?i.filter(function(u){return!Le(u)}):i;return s.map(function(u){return Bt(u)||u instanceof Date?u:""})}var fX=function(e){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,s=-1,u=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(u<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var c=a.range,f=0;f<u;f++){var p=f>0?i[f-1].coordinate:i[u-1].coordinate,h=i[f].coordinate,g=f>=u-1?i[0].coordinate:i[f+1].coordinate,v=void 0;if(dr(h-p)!==dr(g-h)){var b=[];if(dr(g-h)===dr(c[1]-c[0])){v=g;var x=h+c[1]-c[0];b[0]=Math.min(x,(x+p)/2),b[1]=Math.max(x,(x+p)/2)}else{v=p;var y=g+c[1]-c[0];b[0]=Math.min(h,(y+h)/2),b[1]=Math.max(h,(y+h)/2)}var k=[Math.min(h,(v+h)/2),Math.max(h,(v+h)/2)];if(e>k[0]&&e<=k[1]||e>=b[0]&&e<=b[1]){s=i[f].index;break}}else{var O=Math.min(p,g),A=Math.max(p,g);if(e>(O+h)/2&&e<=(A+h)/2){s=i[f].index;break}}}else for(var T=0;T<u;T++)if(T===0&&e<=(n[T].coordinate+n[T+1].coordinate)/2||T>0&&T<u-1&&e>(n[T].coordinate+n[T-1].coordinate)/2&&e<=(n[T].coordinate+n[T+1].coordinate)/2||T===u-1&&e>(n[T].coordinate+n[T-1].coordinate)/2){s=n[T].index;break}return s},_1=function(e){var r,n=e,i=n.type.displayName,a=(r=e.type)!==null&&r!==void 0&&r.defaultProps?_t(_t({},e.type.defaultProps),e.props):e.props,s=a.stroke,u=a.fill,c;switch(i){case"Line":c=s;break;case"Area":case"Radar":c=s&&s!=="none"?s:u;break;default:c=u;break}return c},dX=function(e){var r=e.barSize,n=e.totalSize,i=e.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var s={},u=Object.keys(a),c=0,f=u.length;c<f;c++)for(var p=a[u[c]].stackGroups,h=Object.keys(p),g=0,v=h.length;g<v;g++){var b=p[h[g]],x=b.items,y=b.cateAxisId,k=x.filter(function(C){return di(C.type).indexOf("Bar")>=0});if(k&&k.length){var O=k[0].type.defaultProps,A=O!==void 0?_t(_t({},O),k[0].props):k[0].props,T=A.barSize,E=A[y];s[E]||(s[E]=[]);var P=Le(T)?r:T;s[E].push({item:k[0],stackList:k.slice(1),barSize:Le(P)?void 0:hr(P,n,0)})}}return s},hX=function(e){var r=e.barGap,n=e.barCategoryGap,i=e.bandSize,a=e.sizeList,s=a===void 0?[]:a,u=e.maxBarSize,c=s.length;if(c<1)return null;var f=hr(r,i,0,!0),p,h=[];if(s[0].barSize===+s[0].barSize){var g=!1,v=i/c,b=s.reduce(function(T,E){return T+E.barSize||0},0);b+=(c-1)*f,b>=i&&(b-=(c-1)*f,f=0),b>=i&&v>0&&(g=!0,v*=.9,b=c*v);var x=(i-b)/2>>0,y={offset:x-f,size:0};p=s.reduce(function(T,E){var P={item:E.item,position:{offset:y.offset+y.size+f,size:g?v:E.barSize}},C=[].concat(fT(T),[P]);return y=C[C.length-1].position,E.stackList&&E.stackList.length&&E.stackList.forEach(function(N){C.push({item:N,position:y})}),C},h)}else{var k=hr(n,i,0,!0);i-2*k-(c-1)*f<=0&&(f=0);var O=(i-2*k-(c-1)*f)/c;O>1&&(O>>=0);var A=u===+u?Math.min(O,u):O;p=s.reduce(function(T,E,P){var C=[].concat(fT(T),[{item:E.item,position:{offset:k+(O+f)*P+(O-A)/2,size:A}}]);return E.stackList&&E.stackList.length&&E.stackList.forEach(function(N){C.push({item:N,position:C[C.length-1].position})}),C},h)}return p},pX=function(e,r,n,i){var a=n.children,s=n.width,u=n.margin,c=s-(u.left||0)-(u.right||0),f=H$({children:a,legendWidth:c});if(f){var p=i||{},h=p.width,g=p.height,v=f.align,b=f.verticalAlign,x=f.layout;if((x==="vertical"||x==="horizontal"&&b==="middle")&&v!=="center"&&fe(e[v]))return _t(_t({},e),{},as({},v,e[v]+(h||0)));if((x==="horizontal"||x==="vertical"&&v==="center")&&b!=="middle"&&fe(e[b]))return _t(_t({},e),{},as({},b,e[b]+(g||0)))}return e},mX=function(e,r,n){return Le(r)?!0:e==="horizontal"?r==="yAxis":e==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},W$=function(e,r,n,i,a){var s=r.props.children,u=rn(s,Yh).filter(function(f){return mX(i,a,f.props.direction)});if(u&&u.length){var c=u.map(function(f){return f.props.dataKey});return e.reduce(function(f,p){var h=Dt(p,n);if(Le(h))return f;var g=Array.isArray(h)?[Vh(h),na(h)]:[h,h],v=c.reduce(function(b,x){var y=Dt(p,x,0),k=g[0]-Math.abs(Array.isArray(y)?y[0]:y),O=g[1]+Math.abs(Array.isArray(y)?y[1]:y);return[Math.min(k,b[0]),Math.max(O,b[1])]},[1/0,-1/0]);return[Math.min(v[0],f[0]),Math.max(v[1],f[1])]},[1/0,-1/0])}return null},gX=function(e,r,n,i,a){var s=r.map(function(u){return W$(e,u,n,a,i)}).filter(function(u){return!Le(u)});return s&&s.length?s.reduce(function(u,c){return[Math.min(u[0],c[0]),Math.max(u[1],c[1])]},[1/0,-1/0]):null},K$=function(e,r,n,i,a){var s=r.map(function(c){var f=c.props.dataKey;return n==="number"&&f&&W$(e,c,f,i)||su(e,f,n,a)});if(n==="number")return s.reduce(function(c,f){return[Math.min(c[0],f[0]),Math.max(c[1],f[1])]},[1/0,-1/0]);var u={};return s.reduce(function(c,f){for(var p=0,h=f.length;p<h;p++)u[f[p]]||(u[f[p]]=!0,c.push(f[p]));return c},[])},V$=function(e,r){return e==="horizontal"&&r==="xAxis"||e==="vertical"&&r==="yAxis"||e==="centric"&&r==="angleAxis"||e==="radial"&&r==="radiusAxis"},Ka=function(e,r,n){if(!e)return null;var i=e.scale,a=e.duplicateDomain,s=e.type,u=e.range,c=e.realScaleType==="scaleBand"?i.bandwidth()/2:2,f=(r||n)&&s==="category"&&i.bandwidth?i.bandwidth()/c:0;if(f=e.axisType==="angleAxis"&&(u==null?void 0:u.length)>=2?dr(u[0]-u[1])*2*f:f,r&&(e.ticks||e.niceTicks)){var p=(e.ticks||e.niceTicks).map(function(h){var g=a?a.indexOf(h):h;return{coordinate:i(g)+f,value:h,offset:f}});return p.filter(function(h){return!Us(h.coordinate)})}return e.isCategorical&&e.categoricalDomain?e.categoricalDomain.map(function(h,g){return{coordinate:i(h)+f,value:h,index:g,offset:f}}):i.ticks&&!n?i.ticks(e.tickCount).map(function(h){return{coordinate:i(h)+f,value:h,offset:f}}):i.domain().map(function(h,g){return{coordinate:i(h)+f,value:a?a[h]:h,index:g,offset:f}})},$0=new WeakMap,qf=function(e,r){if(typeof r!="function")return e;$0.has(e)||$0.set(e,new WeakMap);var n=$0.get(e);if(n.has(r))return n.get(r);var i=function(){e.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,i),i},G$=function(e,r,n){var i=e.scale,a=e.type,s=e.layout,u=e.axisType;if(i==="auto")return s==="radial"&&u==="radiusAxis"?{scale:Eu(),realScaleType:"band"}:s==="radial"&&u==="angleAxis"?{scale:Md(),realScaleType:"linear"}:a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:ou(),realScaleType:"point"}:a==="category"?{scale:Eu(),realScaleType:"band"}:{scale:Md(),realScaleType:"linear"};if(Qa(i)){var c="scale".concat(Rh(i));return{scale:(J2[c]||ou)(),realScaleType:J2[c]?c:"point"}}return Ie(i)?{scale:i}:{scale:ou(),realScaleType:"point"}},hT=1e-4,X$=function(e){var r=e.domain();if(!(!r||r.length<=2)){var n=r.length,i=e.range(),a=Math.min(i[0],i[1])-hT,s=Math.max(i[0],i[1])+hT,u=e(r[0]),c=e(r[n-1]);(u<a||u>s||c<a||c>s)&&e.domain([r[0],r[n-1]])}},vX=function(e,r){if(!e)return null;for(var n=0,i=e.length;n<i;n++)if(e[n].item===r)return e[n].position;return null},yX=function(e,r){if(!r||r.length!==2||!fe(r[0])||!fe(r[1]))return e;var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]),a=[e[0],e[1]];return(!fe(e[0])||e[0]<n)&&(a[0]=n),(!fe(e[1])||e[1]>i)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]<n&&(a[1]=n),a},bX=function(e){var r=e.length;if(!(r<=0))for(var n=0,i=e[0].length;n<i;++n)for(var a=0,s=0,u=0;u<r;++u){var c=Us(e[u][n][1])?e[u][n][0]:e[u][n][1];c>=0?(e[u][n][0]=a,e[u][n][1]=a+c,a=e[u][n][1]):(e[u][n][0]=s,e[u][n][1]=s+c,s=e[u][n][1])}},wX=function(e){var r=e.length;if(!(r<=0))for(var n=0,i=e[0].length;n<i;++n)for(var a=0,s=0;s<r;++s){var u=Us(e[s][n][1])?e[s][n][0]:e[s][n][1];u>=0?(e[s][n][0]=a,e[s][n][1]=a+u,a=e[s][n][1]):(e[s][n][0]=0,e[s][n][1]=0)}},xX={sign:bX,expand:lF,none:ls,silhouette:uF,wiggle:cF,positive:wX},_X=function(e,r,n){var i=r.map(function(u){return u.props.dataKey}),a=xX[n],s=sF().keys(i).value(function(u,c){return+Dt(u,c,0)}).order(Hb).offset(a);return s(e)},SX=function(e,r,n,i,a,s){if(!e)return null;var u=s?r.reverse():r,c={},f=u.reduce(function(h,g){var v,b=(v=g.type)!==null&&v!==void 0&&v.defaultProps?_t(_t({},g.type.defaultProps),g.props):g.props,x=b.stackId,y=b.hide;if(y)return h;var k=b[n],O=h[k]||{hasStack:!1,stackGroups:{}};if(Bt(x)){var A=O.stackGroups[x]||{numericAxisId:n,cateAxisId:i,items:[]};A.items.push(g),O.hasStack=!0,O.stackGroups[x]=A}else O.stackGroups[Fs("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[g]};return _t(_t({},h),{},as({},k,O))},c),p={};return Object.keys(f).reduce(function(h,g){var v=f[g];if(v.hasStack){var b={};v.stackGroups=Object.keys(v.stackGroups).reduce(function(x,y){var k=v.stackGroups[y];return _t(_t({},x),{},as({},y,{numericAxisId:n,cateAxisId:i,items:k.items,stackedData:_X(e,k.items,a)}))},b)}return _t(_t({},h),{},as({},g,v))},p)},Y$=function(e,r){var n=r.realScaleType,i=r.type,a=r.tickCount,s=r.originalDomain,u=r.allowDecimals,c=n||r.scale;if(c!=="auto"&&c!=="linear")return null;if(a&&i==="number"&&s&&(s[0]==="auto"||s[1]==="auto")){var f=e.domain();if(!f.length)return null;var p=LG(f,a,u);return e.domain([Vh(p),na(p)]),{niceTicks:p}}if(a&&i==="number"){var h=e.domain(),g=DG(h,a,u);return{niceTicks:g}}return null};function pT(t){var e=t.axis,r=t.ticks,n=t.bandSize,i=t.entry,a=t.index,s=t.dataKey;if(e.type==="category"){if(!e.allowDuplicatedCategory&&e.dataKey&&!Le(i[e.dataKey])){var u=vd(r,"value",i[e.dataKey]);if(u)return u.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var c=Dt(i,Le(s)?e.dataKey:s);return Le(c)?null:e.scale(c)}var mT=function(e){var r=e.axis,n=e.ticks,i=e.offset,a=e.bandSize,s=e.entry,u=e.index;if(r.type==="category")return n[u]?n[u].coordinate+i:null;var c=Dt(s,r.dataKey,r.domain[u]);return Le(c)?null:r.scale(c)-a/2+i},kX=function(e){var r=e.numericAxis,n=r.scale.domain();if(r.type==="number"){var i=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return i<=0&&a>=0?0:a<0?a:i}return n[0]},EX=function(e,r){var n,i=(n=e.type)!==null&&n!==void 0&&n.defaultProps?_t(_t({},e.type.defaultProps),e.props):e.props,a=i.stackId;if(Bt(a)){var s=r[a];if(s){var u=s.items.indexOf(e);return u>=0?s.stackedData[u]:null}}return null},OX=function(e){return e.reduce(function(r,n){return[Vh(n.concat([r[0]]).filter(fe)),na(n.concat([r[1]]).filter(fe))]},[1/0,-1/0])},J$=function(e,r,n){return Object.keys(e).reduce(function(i,a){var s=e[a],u=s.stackedData,c=u.reduce(function(f,p){var h=OX(p.slice(r,n+1));return[Math.min(f[0],h[0]),Math.max(f[1],h[1])]},[1/0,-1/0]);return[Math.min(c[0],i[0]),Math.max(c[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},gT=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,vT=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,mw=function(e,r,n){if(Ie(e))return e(r,n);if(!Array.isArray(e))return r;var i=[];if(fe(e[0]))i[0]=n?e[0]:Math.min(e[0],r[0]);else if(gT.test(e[0])){var a=+gT.exec(e[0])[1];i[0]=r[0]-a}else Ie(e[0])?i[0]=e[0](r[0]):i[0]=r[0];if(fe(e[1]))i[1]=n?e[1]:Math.max(e[1],r[1]);else if(vT.test(e[1])){var s=+vT.exec(e[1])[1];i[1]=r[1]+s}else Ie(e[1])?i[1]=e[1](r[1]):i[1]=r[1];return i},Fd=function(e,r,n){if(e&&e.scale&&e.scale.bandwidth){var i=e.scale.bandwidth();if(!n||i>0)return i}if(e&&r&&r.length>=2){for(var a=Yx(r,function(h){return h.coordinate}),s=1/0,u=1,c=a.length;u<c;u++){var f=a[u],p=a[u-1];s=Math.min((f.coordinate||0)-(p.coordinate||0),s)}return s===1/0?0:s}return n?void 0:0},yT=function(e,r,n){return!e||!e.length||gs(e,Lr(n,"type.defaultProps.domain"))?r:e},Q$=function(e,r){var n=e.type.defaultProps?_t(_t({},e.type.defaultProps),e.props):e.props,i=n.dataKey,a=n.name,s=n.unit,u=n.formatter,c=n.tooltipType,f=n.chartType,p=n.hide;return _t(_t({},Oe(e,!1)),{},{dataKey:i,unit:s,formatter:u,name:a||i,color:_1(e),value:Dt(r,i),type:c,payload:r,chartType:f,hide:p})};function $u(t){"@babel/helpers - typeof";return $u=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},$u(t)}function bT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function si(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?bT(Object(r),!0).forEach(function(n){Z$(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):bT(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Z$(t,e,r){return e=AX(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function AX(t){var e=PX(t,"string");return $u(e)=="symbol"?e:e+""}function PX(t,e){if($u(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if($u(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function TX(t,e){return NX(t)||RX(t,e)||CX(t,e)||jX()}function jX(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
442
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CX(t,e){if(t){if(typeof t=="string")return wT(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return wT(t,e)}}function wT(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function RX(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function NX(t){if(Array.isArray(t))return t}var Hd=Math.PI/180,$X=function(e){return e*180/Math.PI},st=function(e,r,n,i){return{x:e+Math.cos(-Hd*i)*n,y:r+Math.sin(-Hd*i)*n}},eI=function(e,r){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(r-(n.top||0)-(n.bottom||0)))/2},IX=function(e,r,n,i,a){var s=e.width,u=e.height,c=e.startAngle,f=e.endAngle,p=hr(e.cx,s,s/2),h=hr(e.cy,u,u/2),g=eI(s,u,n),v=hr(e.innerRadius,g,0),b=hr(e.outerRadius,g,g*.8),x=Object.keys(r);return x.reduce(function(y,k){var O=r[k],A=O.domain,T=O.reversed,E;if(Le(O.range))i==="angleAxis"?E=[c,f]:i==="radiusAxis"&&(E=[v,b]),T&&(E=[E[1],E[0]]);else{E=O.range;var P=E,C=TX(P,2);c=C[0],f=C[1]}var N=G$(O,a),L=N.realScaleType,V=N.scale;V.domain(A).range(E),X$(V);var $=Y$(V,si(si({},O),{},{realScaleType:L})),I=si(si(si({},O),$),{},{range:E,radius:b,realScaleType:L,scale:V,cx:p,cy:h,innerRadius:v,outerRadius:b,startAngle:c,endAngle:f});return si(si({},y),{},Z$({},k,I))},{})},MX=function(e,r){var n=e.x,i=e.y,a=r.x,s=r.y;return Math.sqrt(Math.pow(n-a,2)+Math.pow(i-s,2))},LX=function(e,r){var n=e.x,i=e.y,a=r.cx,s=r.cy,u=MX({x:n,y:i},{x:a,y:s});if(u<=0)return{radius:u};var c=(n-a)/u,f=Math.acos(c);return i>s&&(f=2*Math.PI-f),{radius:u,angle:$X(f),angleInRadian:f}},DX=function(e){var r=e.startAngle,n=e.endAngle,i=Math.floor(r/360),a=Math.floor(n/360),s=Math.min(i,a);return{startAngle:r-s*360,endAngle:n-s*360}},BX=function(e,r){var n=r.startAngle,i=r.endAngle,a=Math.floor(n/360),s=Math.floor(i/360),u=Math.min(a,s);return e+u*360},xT=function(e,r){var n=e.x,i=e.y,a=LX({x:n,y:i},r),s=a.radius,u=a.angle,c=r.innerRadius,f=r.outerRadius;if(s<c||s>f)return!1;if(s===0)return!0;var p=DX(r),h=p.startAngle,g=p.endAngle,v=u,b;if(h<=g){for(;v>g;)v-=360;for(;v<h;)v+=360;b=v>=h&&v<=g}else{for(;v>h;)v-=360;for(;v<g;)v+=360;b=v>=g&&v<=h}return b?si(si({},r),{},{radius:s,angle:BX(v,r)}):null},tI=function(e){return!R.isValidElement(e)&&!Ie(e)&&typeof e!="boolean"?e.className:""};function Iu(t){"@babel/helpers - typeof";return Iu=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},Iu(t)}var zX=["offset"];function qX(t){return WX(t)||HX(t)||FX(t)||UX()}function UX(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
443
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FX(t,e){if(t){if(typeof t=="string")return gw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return gw(t,e)}}function HX(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function WX(t){if(Array.isArray(t))return gw(t)}function gw(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function KX(t,e){if(t==null)return{};var r=VX(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function VX(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function _T(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Lt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?_T(Object(r),!0).forEach(function(n){GX(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_T(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function GX(t,e,r){return e=XX(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function XX(t){var e=YX(t,"string");return Iu(e)=="symbol"?e:e+""}function YX(t,e){if(Iu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Iu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Mu(){return Mu=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Mu.apply(this,arguments)}var JX=function(e){var r=e.value,n=e.formatter,i=Le(e.children)?r:e.children;return Ie(n)?n(i):i},QX=function(e,r){var n=dr(r-e),i=Math.min(Math.abs(r-e),360);return n*i},ZX=function(e,r,n){var i=e.position,a=e.viewBox,s=e.offset,u=e.className,c=a,f=c.cx,p=c.cy,h=c.innerRadius,g=c.outerRadius,v=c.startAngle,b=c.endAngle,x=c.clockWise,y=(h+g)/2,k=QX(v,b),O=k>=0?1:-1,A,T;i==="insideStart"?(A=v+O*s,T=x):i==="insideEnd"?(A=b-O*s,T=!x):i==="end"&&(A=b+O*s,T=x),T=k<=0?T:!T;var E=st(f,p,y,A),P=st(f,p,y,A+(T?1:-1)*359),C="M".concat(E.x,",").concat(E.y,`
|
|
444
|
-
A`).concat(y,",").concat(y,",0,1,").concat(T?0:1,`,
|
|
445
|
-
`).concat(P.x,",").concat(P.y),N=Le(e.id)?Fs("recharts-radial-line-"):e.id;return M.createElement("text",Mu({},n,{dominantBaseline:"central",className:De("recharts-radial-bar-label",u)}),M.createElement("defs",null,M.createElement("path",{id:N,d:C})),M.createElement("textPath",{xlinkHref:"#".concat(N)},r))},eY=function(e){var r=e.viewBox,n=e.offset,i=e.position,a=r,s=a.cx,u=a.cy,c=a.innerRadius,f=a.outerRadius,p=a.startAngle,h=a.endAngle,g=(p+h)/2;if(i==="outside"){var v=st(s,u,f+n,g),b=v.x,x=v.y;return{x:b,y:x,textAnchor:b>=s?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:s,y:u,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:s,y:u,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:s,y:u,textAnchor:"middle",verticalAnchor:"end"};var y=(c+f)/2,k=st(s,u,y,g),O=k.x,A=k.y;return{x:O,y:A,textAnchor:"middle",verticalAnchor:"middle"}},tY=function(e){var r=e.viewBox,n=e.parentViewBox,i=e.offset,a=e.position,s=r,u=s.x,c=s.y,f=s.width,p=s.height,h=p>=0?1:-1,g=h*i,v=h>0?"end":"start",b=h>0?"start":"end",x=f>=0?1:-1,y=x*i,k=x>0?"end":"start",O=x>0?"start":"end";if(a==="top"){var A={x:u+f/2,y:c-h*i,textAnchor:"middle",verticalAnchor:v};return Lt(Lt({},A),n?{height:Math.max(c-n.y,0),width:f}:{})}if(a==="bottom"){var T={x:u+f/2,y:c+p+g,textAnchor:"middle",verticalAnchor:b};return Lt(Lt({},T),n?{height:Math.max(n.y+n.height-(c+p),0),width:f}:{})}if(a==="left"){var E={x:u-y,y:c+p/2,textAnchor:k,verticalAnchor:"middle"};return Lt(Lt({},E),n?{width:Math.max(E.x-n.x,0),height:p}:{})}if(a==="right"){var P={x:u+f+y,y:c+p/2,textAnchor:O,verticalAnchor:"middle"};return Lt(Lt({},P),n?{width:Math.max(n.x+n.width-P.x,0),height:p}:{})}var C=n?{width:f,height:p}:{};return a==="insideLeft"?Lt({x:u+y,y:c+p/2,textAnchor:O,verticalAnchor:"middle"},C):a==="insideRight"?Lt({x:u+f-y,y:c+p/2,textAnchor:k,verticalAnchor:"middle"},C):a==="insideTop"?Lt({x:u+f/2,y:c+g,textAnchor:"middle",verticalAnchor:b},C):a==="insideBottom"?Lt({x:u+f/2,y:c+p-g,textAnchor:"middle",verticalAnchor:v},C):a==="insideTopLeft"?Lt({x:u+y,y:c+g,textAnchor:O,verticalAnchor:b},C):a==="insideTopRight"?Lt({x:u+f-y,y:c+g,textAnchor:k,verticalAnchor:b},C):a==="insideBottomLeft"?Lt({x:u+y,y:c+p-g,textAnchor:O,verticalAnchor:v},C):a==="insideBottomRight"?Lt({x:u+f-y,y:c+p-g,textAnchor:k,verticalAnchor:v},C):qs(a)&&(fe(a.x)||Fa(a.x))&&(fe(a.y)||Fa(a.y))?Lt({x:u+hr(a.x,f),y:c+hr(a.y,p),textAnchor:"end",verticalAnchor:"end"},C):Lt({x:u+f/2,y:c+p/2,textAnchor:"middle",verticalAnchor:"middle"},C)},rY=function(e){return"cx"in e&&fe(e.cx)};function Vt(t){var e=t.offset,r=e===void 0?5:e,n=KX(t,zX),i=Lt({offset:r},n),a=i.viewBox,s=i.position,u=i.value,c=i.children,f=i.content,p=i.className,h=p===void 0?"":p,g=i.textBreakAll;if(!a||Le(u)&&Le(c)&&!R.isValidElement(f)&&!Ie(f))return null;if(R.isValidElement(f))return R.cloneElement(f,i);var v;if(Ie(f)){if(v=R.createElement(f,i),R.isValidElement(v))return v}else v=JX(i);var b=rY(a),x=Oe(i,!0);if(b&&(s==="insideStart"||s==="insideEnd"||s==="end"))return ZX(i,v,x);var y=b?eY(i):tY(i);return M.createElement(eo,Mu({className:De("recharts-label",h)},x,y,{breakAll:g}),v)}Vt.displayName="Label";var rI=function(e){var r=e.cx,n=e.cy,i=e.angle,a=e.startAngle,s=e.endAngle,u=e.r,c=e.radius,f=e.innerRadius,p=e.outerRadius,h=e.x,g=e.y,v=e.top,b=e.left,x=e.width,y=e.height,k=e.clockWise,O=e.labelViewBox;if(O)return O;if(fe(x)&&fe(y)){if(fe(h)&&fe(g))return{x:h,y:g,width:x,height:y};if(fe(v)&&fe(b))return{x:v,y:b,width:x,height:y}}return fe(h)&&fe(g)?{x:h,y:g,width:0,height:0}:fe(r)&&fe(n)?{cx:r,cy:n,startAngle:a||i||0,endAngle:s||i||0,innerRadius:f||0,outerRadius:p||c||u||0,clockWise:k}:e.viewBox?e.viewBox:{}},nY=function(e,r){return e?e===!0?M.createElement(Vt,{key:"label-implicit",viewBox:r}):Bt(e)?M.createElement(Vt,{key:"label-implicit",viewBox:r,value:e}):R.isValidElement(e)?e.type===Vt?R.cloneElement(e,{key:"label-implicit",viewBox:r}):M.createElement(Vt,{key:"label-implicit",content:e,viewBox:r}):Ie(e)?M.createElement(Vt,{key:"label-implicit",content:e,viewBox:r}):qs(e)?M.createElement(Vt,Mu({viewBox:r},e,{key:"label-implicit"})):null:null},iY=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var i=e.children,a=rI(e),s=rn(i,Vt).map(function(c,f){return R.cloneElement(c,{viewBox:r||a,key:"label-".concat(f)})});if(!n)return s;var u=nY(e.label,r||a);return[u].concat(qX(s))};Vt.parseViewBox=rI;Vt.renderCallByParent=iY;var I0,ST;function aY(){if(ST)return I0;ST=1;function t(e){var r=e==null?0:e.length;return r?e[r-1]:void 0}return I0=t,I0}var oY=aY();const sY=Qe(oY);function Lu(t){"@babel/helpers - typeof";return Lu=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},Lu(t)}var lY=["valueAccessor"],uY=["data","dataKey","clockWise","id","textBreakAll"];function cY(t){return pY(t)||hY(t)||dY(t)||fY()}function fY(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
446
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dY(t,e){if(t){if(typeof t=="string")return vw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return vw(t,e)}}function hY(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function pY(t){if(Array.isArray(t))return vw(t)}function vw(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Wd(){return Wd=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Wd.apply(this,arguments)}function kT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function ET(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?kT(Object(r),!0).forEach(function(n){mY(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):kT(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function mY(t,e,r){return e=gY(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function gY(t){var e=vY(t,"string");return Lu(e)=="symbol"?e:e+""}function vY(t,e){if(Lu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Lu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function OT(t,e){if(t==null)return{};var r=yY(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function yY(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}var bY=function(e){return Array.isArray(e.value)?sY(e.value):e.value};function mi(t){var e=t.valueAccessor,r=e===void 0?bY:e,n=OT(t,lY),i=n.data,a=n.dataKey,s=n.clockWise,u=n.id,c=n.textBreakAll,f=OT(n,uY);return!i||!i.length?null:M.createElement(Ue,{className:"recharts-label-list"},i.map(function(p,h){var g=Le(a)?r(p,h):Dt(p&&p.payload,a),v=Le(u)?{}:{id:"".concat(u,"-").concat(h)};return M.createElement(Vt,Wd({},Oe(p,!0),f,v,{parentViewBox:p.parentViewBox,value:g,textBreakAll:c,viewBox:Vt.parseViewBox(Le(s)?p:ET(ET({},p),{},{clockWise:s})),key:"label-".concat(h),index:h}))}))}mi.displayName="LabelList";function wY(t,e){return t?t===!0?M.createElement(mi,{key:"labelList-implicit",data:e}):M.isValidElement(t)||Ie(t)?M.createElement(mi,{key:"labelList-implicit",data:e,content:t}):qs(t)?M.createElement(mi,Wd({data:e},t,{key:"labelList-implicit"})):null:null}function xY(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var n=t.children,i=rn(n,mi).map(function(s,u){return R.cloneElement(s,{data:e,key:"labelList-".concat(u)})});if(!r)return i;var a=wY(t.label,e);return[a].concat(cY(i))}mi.renderCallByParent=xY;function Du(t){"@babel/helpers - typeof";return Du=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},Du(t)}function yw(){return yw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},yw.apply(this,arguments)}function AT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function PT(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?AT(Object(r),!0).forEach(function(n){_Y(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):AT(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function _Y(t,e,r){return e=SY(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function SY(t){var e=kY(t,"string");return Du(e)=="symbol"?e:e+""}function kY(t,e){if(Du(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Du(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var EY=function(e,r){var n=dr(r-e),i=Math.min(Math.abs(r-e),359.999);return n*i},Uf=function(e){var r=e.cx,n=e.cy,i=e.radius,a=e.angle,s=e.sign,u=e.isExternal,c=e.cornerRadius,f=e.cornerIsExternal,p=c*(u?1:-1)+i,h=Math.asin(c/p)/Hd,g=f?a:a+s*h,v=st(r,n,p,g),b=st(r,n,i,g),x=f?a-s*h:a,y=st(r,n,p*Math.cos(h*Hd),x);return{center:v,circleTangency:b,lineTangency:y,theta:h}},nI=function(e){var r=e.cx,n=e.cy,i=e.innerRadius,a=e.outerRadius,s=e.startAngle,u=e.endAngle,c=EY(s,u),f=s+c,p=st(r,n,a,s),h=st(r,n,a,f),g="M ".concat(p.x,",").concat(p.y,`
|
|
447
|
-
A `).concat(a,",").concat(a,`,0,
|
|
448
|
-
`).concat(+(Math.abs(c)>180),",").concat(+(s>f),`,
|
|
449
|
-
`).concat(h.x,",").concat(h.y,`
|
|
450
|
-
`);if(i>0){var v=st(r,n,i,s),b=st(r,n,i,f);g+="L ".concat(b.x,",").concat(b.y,`
|
|
451
|
-
A `).concat(i,",").concat(i,`,0,
|
|
452
|
-
`).concat(+(Math.abs(c)>180),",").concat(+(s<=f),`,
|
|
453
|
-
`).concat(v.x,",").concat(v.y," Z")}else g+="L ".concat(r,",").concat(n," Z");return g},OY=function(e){var r=e.cx,n=e.cy,i=e.innerRadius,a=e.outerRadius,s=e.cornerRadius,u=e.forceCornerRadius,c=e.cornerIsExternal,f=e.startAngle,p=e.endAngle,h=dr(p-f),g=Uf({cx:r,cy:n,radius:a,angle:f,sign:h,cornerRadius:s,cornerIsExternal:c}),v=g.circleTangency,b=g.lineTangency,x=g.theta,y=Uf({cx:r,cy:n,radius:a,angle:p,sign:-h,cornerRadius:s,cornerIsExternal:c}),k=y.circleTangency,O=y.lineTangency,A=y.theta,T=c?Math.abs(f-p):Math.abs(f-p)-x-A;if(T<0)return u?"M ".concat(b.x,",").concat(b.y,`
|
|
454
|
-
a`).concat(s,",").concat(s,",0,0,1,").concat(s*2,`,0
|
|
455
|
-
a`).concat(s,",").concat(s,",0,0,1,").concat(-s*2,`,0
|
|
456
|
-
`):nI({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:f,endAngle:p});var E="M ".concat(b.x,",").concat(b.y,`
|
|
457
|
-
A`).concat(s,",").concat(s,",0,0,").concat(+(h<0),",").concat(v.x,",").concat(v.y,`
|
|
458
|
-
A`).concat(a,",").concat(a,",0,").concat(+(T>180),",").concat(+(h<0),",").concat(k.x,",").concat(k.y,`
|
|
459
|
-
A`).concat(s,",").concat(s,",0,0,").concat(+(h<0),",").concat(O.x,",").concat(O.y,`
|
|
460
|
-
`);if(i>0){var P=Uf({cx:r,cy:n,radius:i,angle:f,sign:h,isExternal:!0,cornerRadius:s,cornerIsExternal:c}),C=P.circleTangency,N=P.lineTangency,L=P.theta,V=Uf({cx:r,cy:n,radius:i,angle:p,sign:-h,isExternal:!0,cornerRadius:s,cornerIsExternal:c}),$=V.circleTangency,I=V.lineTangency,q=V.theta,U=c?Math.abs(f-p):Math.abs(f-p)-L-q;if(U<0&&s===0)return"".concat(E,"L").concat(r,",").concat(n,"Z");E+="L".concat(I.x,",").concat(I.y,`
|
|
461
|
-
A`).concat(s,",").concat(s,",0,0,").concat(+(h<0),",").concat($.x,",").concat($.y,`
|
|
462
|
-
A`).concat(i,",").concat(i,",0,").concat(+(U>180),",").concat(+(h>0),",").concat(C.x,",").concat(C.y,`
|
|
463
|
-
A`).concat(s,",").concat(s,",0,0,").concat(+(h<0),",").concat(N.x,",").concat(N.y,"Z")}else E+="L".concat(r,",").concat(n,"Z");return E},AY={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},iI=function(e){var r=PT(PT({},AY),e),n=r.cx,i=r.cy,a=r.innerRadius,s=r.outerRadius,u=r.cornerRadius,c=r.forceCornerRadius,f=r.cornerIsExternal,p=r.startAngle,h=r.endAngle,g=r.className;if(s<a||p===h)return null;var v=De("recharts-sector",g),b=s-a,x=hr(u,b,0,!0),y;return x>0&&Math.abs(p-h)<360?y=OY({cx:n,cy:i,innerRadius:a,outerRadius:s,cornerRadius:Math.min(x,b/2),forceCornerRadius:c,cornerIsExternal:f,startAngle:p,endAngle:h}):y=nI({cx:n,cy:i,innerRadius:a,outerRadius:s,startAngle:p,endAngle:h}),M.createElement("path",yw({},Oe(r,!0),{className:v,d:y,role:"img"}))};function Bu(t){"@babel/helpers - typeof";return Bu=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},Bu(t)}function bw(){return bw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},bw.apply(this,arguments)}function TT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function jT(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?TT(Object(r),!0).forEach(function(n){PY(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):TT(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function PY(t,e,r){return e=TY(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function TY(t){var e=jY(t,"string");return Bu(e)=="symbol"?e:e+""}function jY(t,e){if(Bu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Bu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var CT={curveBasisClosed:Y9,curveBasisOpen:J9,curveBasis:X9,curveBumpX:I9,curveBumpY:M9,curveLinearClosed:Q9,curveLinear:$h,curveMonotoneX:Z9,curveMonotoneY:eF,curveNatural:tF,curveStep:rF,curveStepAfter:iF,curveStepBefore:nF},Ff=function(e){return e.x===+e.x&&e.y===+e.y},Hl=function(e){return e.x},Wl=function(e){return e.y},CY=function(e,r){if(Ie(e))return e;var n="curve".concat(Rh(e));return(n==="curveMonotone"||n==="curveBump")&&r?CT["".concat(n).concat(r==="vertical"?"Y":"X")]:CT[n]||$h},RY=function(e){var r=e.type,n=r===void 0?"linear":r,i=e.points,a=i===void 0?[]:i,s=e.baseLine,u=e.layout,c=e.connectNulls,f=c===void 0?!1:c,p=CY(n,u),h=f?a.filter(function(x){return Ff(x)}):a,g;if(Array.isArray(s)){var v=f?s.filter(function(x){return Ff(x)}):s,b=h.map(function(x,y){return jT(jT({},x),{},{base:v[y]})});return u==="vertical"?g=$f().y(Wl).x1(Hl).x0(function(x){return x.base.x}):g=$f().x(Hl).y1(Wl).y0(function(x){return x.base.y}),g.defined(Ff).curve(p),g(b)}return u==="vertical"&&fe(s)?g=$f().y(Wl).x1(Hl).x0(s):fe(s)?g=$f().x(Hl).y1(Wl).y0(s):g=iN().x(Hl).y(Wl),g.defined(Ff).curve(p),g(h)},os=function(e){var r=e.className,n=e.points,i=e.path,a=e.pathRef;if((!n||!n.length)&&!i)return null;var s=n&&n.length?RY(e):i;return R.createElement("path",bw({},Oe(e,!1),yd(e),{className:De("recharts-curve",r),d:s,ref:a}))},M0={exports:{}},L0,RT;function NY(){if(RT)return L0;RT=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return L0=t,L0}var D0,NT;function $Y(){if(NT)return D0;NT=1;var t=NY();function e(){}function r(){}return r.resetWarningCache=e,D0=function(){function n(s,u,c,f,p,h){if(h!==t){var g=new 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 g.name="Invariant Violation",g}}n.isRequired=n;function i(){return n}var a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:e};return a.PropTypes=a,a},D0}var $T;function IY(){return $T||($T=1,M0.exports=$Y()()),M0.exports}var MY=IY();const Xe=Qe(MY),{getOwnPropertyNames:LY,getOwnPropertySymbols:DY}=Object,{hasOwnProperty:BY}=Object.prototype;function B0(t,e){return function(n,i,a){return t(n,i,a)&&e(n,i,a)}}function Hf(t){return function(r,n,i){if(!r||!n||typeof r!="object"||typeof n!="object")return t(r,n,i);const{cache:a}=i,s=a.get(r),u=a.get(n);if(s&&u)return s===n&&u===r;a.set(r,n),a.set(n,r);const c=t(r,n,i);return a.delete(r),a.delete(n),c}}function zY(t){return t!=null?t[Symbol.toStringTag]:void 0}function IT(t){return LY(t).concat(DY(t))}const qY=Object.hasOwn||((t,e)=>BY.call(t,e));function uo(t,e){return t===e||!t&&!e&&t!==t&&e!==e}const UY="__v",FY="__o",HY="_owner",{getOwnPropertyDescriptor:MT,keys:LT}=Object;function WY(t,e){return t.byteLength===e.byteLength&&Kd(new Uint8Array(t),new Uint8Array(e))}function KY(t,e,r){let n=t.length;if(e.length!==n)return!1;for(;n-- >0;)if(!r.equals(t[n],e[n],n,n,t,e,r))return!1;return!0}function VY(t,e){return t.byteLength===e.byteLength&&Kd(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function GY(t,e){return uo(t.getTime(),e.getTime())}function XY(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function YY(t,e){return t===e}function DT(t,e,r){const n=t.size;if(n!==e.size)return!1;if(!n)return!0;const i=new Array(n),a=t.entries();let s,u,c=0;for(;(s=a.next())&&!s.done;){const f=e.entries();let p=!1,h=0;for(;(u=f.next())&&!u.done;){if(i[h]){h++;continue}const g=s.value,v=u.value;if(r.equals(g[0],v[0],c,h,t,e,r)&&r.equals(g[1],v[1],g[0],v[0],t,e,r)){p=i[h]=!0;break}h++}if(!p)return!1;c++}return!0}const JY=uo;function QY(t,e,r){const n=LT(t);let i=n.length;if(LT(e).length!==i)return!1;for(;i-- >0;)if(!aI(t,e,r,n[i]))return!1;return!0}function Kl(t,e,r){const n=IT(t);let i=n.length;if(IT(e).length!==i)return!1;let a,s,u;for(;i-- >0;)if(a=n[i],!aI(t,e,r,a)||(s=MT(t,a),u=MT(e,a),(s||u)&&(!s||!u||s.configurable!==u.configurable||s.enumerable!==u.enumerable||s.writable!==u.writable)))return!1;return!0}function ZY(t,e){return uo(t.valueOf(),e.valueOf())}function eJ(t,e){return t.source===e.source&&t.flags===e.flags}function BT(t,e,r){const n=t.size;if(n!==e.size)return!1;if(!n)return!0;const i=new Array(n),a=t.values();let s,u;for(;(s=a.next())&&!s.done;){const c=e.values();let f=!1,p=0;for(;(u=c.next())&&!u.done;){if(!i[p]&&r.equals(s.value,u.value,s.value,u.value,t,e,r)){f=i[p]=!0;break}p++}if(!f)return!1}return!0}function Kd(t,e){let r=t.byteLength;if(e.byteLength!==r||t.byteOffset!==e.byteOffset)return!1;for(;r-- >0;)if(t[r]!==e[r])return!1;return!0}function tJ(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function aI(t,e,r,n){return(n===HY||n===FY||n===UY)&&(t.$$typeof||e.$$typeof)?!0:qY(e,n)&&r.equals(t[n],e[n],n,n,t,e,r)}const rJ="[object ArrayBuffer]",nJ="[object Arguments]",iJ="[object Boolean]",aJ="[object DataView]",oJ="[object Date]",sJ="[object Error]",lJ="[object Map]",uJ="[object Number]",cJ="[object Object]",fJ="[object RegExp]",dJ="[object Set]",hJ="[object String]",pJ={"[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},mJ="[object URL]",gJ=Object.prototype.toString;function vJ({areArrayBuffersEqual:t,areArraysEqual:e,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:s,areNumbersEqual:u,areObjectsEqual:c,arePrimitiveWrappersEqual:f,areRegExpsEqual:p,areSetsEqual:h,areTypedArraysEqual:g,areUrlsEqual:v,unknownTagComparators:b}){return function(y,k,O){if(y===k)return!0;if(y==null||k==null)return!1;const A=typeof y;if(A!==typeof k)return!1;if(A!=="object")return A==="number"?u(y,k,O):A==="function"?a(y,k,O):!1;const T=y.constructor;if(T!==k.constructor)return!1;if(T===Object)return c(y,k,O);if(Array.isArray(y))return e(y,k,O);if(T===Date)return n(y,k,O);if(T===RegExp)return p(y,k,O);if(T===Map)return s(y,k,O);if(T===Set)return h(y,k,O);const E=gJ.call(y);if(E===oJ)return n(y,k,O);if(E===fJ)return p(y,k,O);if(E===lJ)return s(y,k,O);if(E===dJ)return h(y,k,O);if(E===cJ)return typeof y.then!="function"&&typeof k.then!="function"&&c(y,k,O);if(E===mJ)return v(y,k,O);if(E===sJ)return i(y,k,O);if(E===nJ)return c(y,k,O);if(pJ[E])return g(y,k,O);if(E===rJ)return t(y,k,O);if(E===aJ)return r(y,k,O);if(E===iJ||E===uJ||E===hJ)return f(y,k,O);if(b){let P=b[E];if(!P){const C=zY(y);C&&(P=b[C])}if(P)return P(y,k,O)}return!1}}function yJ({circular:t,createCustomConfig:e,strict:r}){let n={areArrayBuffersEqual:WY,areArraysEqual:r?Kl:KY,areDataViewsEqual:VY,areDatesEqual:GY,areErrorsEqual:XY,areFunctionsEqual:YY,areMapsEqual:r?B0(DT,Kl):DT,areNumbersEqual:JY,areObjectsEqual:r?Kl:QY,arePrimitiveWrappersEqual:ZY,areRegExpsEqual:eJ,areSetsEqual:r?B0(BT,Kl):BT,areTypedArraysEqual:r?B0(Kd,Kl):Kd,areUrlsEqual:tJ,unknownTagComparators:void 0};if(e&&(n=Object.assign({},n,e(n))),t){const i=Hf(n.areArraysEqual),a=Hf(n.areMapsEqual),s=Hf(n.areObjectsEqual),u=Hf(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:s,areSetsEqual:u})}return n}function bJ(t){return function(e,r,n,i,a,s,u){return t(e,r,u)}}function wJ({circular:t,comparator:e,createState:r,equals:n,strict:i}){if(r)return function(u,c){const{cache:f=t?new WeakMap:void 0,meta:p}=r();return e(u,c,{cache:f,equals:n,meta:p,strict:i})};if(t)return function(u,c){return e(u,c,{cache:new WeakMap,equals:n,meta:void 0,strict:i})};const a={cache:void 0,equals:n,meta:void 0,strict:i};return function(u,c){return e(u,c,a)}}const xJ=fa();fa({strict:!0});fa({circular:!0});fa({circular:!0,strict:!0});fa({createInternalComparator:()=>uo});fa({strict:!0,createInternalComparator:()=>uo});fa({circular:!0,createInternalComparator:()=>uo});fa({circular:!0,createInternalComparator:()=>uo,strict:!0});function fa(t={}){const{circular:e=!1,createInternalComparator:r,createState:n,strict:i=!1}=t,a=yJ(t),s=vJ(a),u=r?r(s):bJ(s);return wJ({circular:e,comparator:s,createState:n,equals:u,strict:i})}function _J(t){typeof requestAnimationFrame<"u"&&requestAnimationFrame(t)}function zT(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function i(a){r<0&&(r=a),a-r>e?(t(a),r=-1):_J(i)};requestAnimationFrame(n)}function ww(t){"@babel/helpers - typeof";return ww=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},ww(t)}function SJ(t){return AJ(t)||OJ(t)||EJ(t)||kJ()}function kJ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
464
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function EJ(t,e){if(t){if(typeof t=="string")return qT(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return qT(t,e)}}function qT(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function OJ(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function AJ(t){if(Array.isArray(t))return t}function PJ(){var t={},e=function(){return null},r=!1,n=function i(a){if(!r){if(Array.isArray(a)){if(!a.length)return;var s=a,u=SJ(s),c=u[0],f=u.slice(1);if(typeof c=="number"){zT(i.bind(null,f),c);return}i(c),zT(i.bind(null,f));return}ww(a)==="object"&&(t=a,e(t)),typeof a=="function"&&a()}};return{stop:function(){r=!0},start:function(a){r=!1,n(a)},subscribe:function(a){return e=a,function(){e=function(){return null}}}}}function zu(t){"@babel/helpers - typeof";return zu=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},zu(t)}function UT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function FT(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?UT(Object(r),!0).forEach(function(n){oI(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):UT(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function oI(t,e,r){return e=TJ(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function TJ(t){var e=jJ(t,"string");return zu(e)==="symbol"?e:String(e)}function jJ(t,e){if(zu(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(zu(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var CJ=function(e,r){return[Object.keys(e),Object.keys(r)].reduce(function(n,i){return n.filter(function(a){return i.includes(a)})})},RJ=function(e){return e},NJ=function(e){return e.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},lu=function(e,r){return Object.keys(r).reduce(function(n,i){return FT(FT({},n),{},oI({},i,e(i,r[i])))},{})},HT=function(e,r,n){return e.map(function(i){return"".concat(NJ(i)," ").concat(r,"ms ").concat(n)}).join(",")};function $J(t,e){return LJ(t)||MJ(t,e)||sI(t,e)||IJ()}function IJ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
465
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function MJ(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function LJ(t){if(Array.isArray(t))return t}function DJ(t){return qJ(t)||zJ(t)||sI(t)||BJ()}function BJ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
466
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sI(t,e){if(t){if(typeof t=="string")return xw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return xw(t,e)}}function zJ(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function qJ(t){if(Array.isArray(t))return xw(t)}function xw(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Vd=1e-4,lI=function(e,r){return[0,3*e,3*r-6*e,3*e-3*r+1]},uI=function(e,r){return e.map(function(n,i){return n*Math.pow(r,i)}).reduce(function(n,i){return n+i})},WT=function(e,r){return function(n){var i=lI(e,r);return uI(i,n)}},UJ=function(e,r){return function(n){var i=lI(e,r),a=[].concat(DJ(i.map(function(s,u){return s*u}).slice(1)),[0]);return uI(a,n)}},KT=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var i=r[0],a=r[1],s=r[2],u=r[3];if(r.length===1)switch(r[0]){case"linear":i=0,a=0,s=1,u=1;break;case"ease":i=.25,a=.1,s=.25,u=1;break;case"ease-in":i=.42,a=0,s=1,u=1;break;case"ease-out":i=.42,a=0,s=.58,u=1;break;case"ease-in-out":i=0,a=0,s=.58,u=1;break;default:{var c=r[0].split("(");if(c[0]==="cubic-bezier"&&c[1].split(")")[0].split(",").length===4){var f=c[1].split(")")[0].split(",").map(function(y){return parseFloat(y)}),p=$J(f,4);i=p[0],a=p[1],s=p[2],u=p[3]}}}var h=WT(i,s),g=WT(a,u),v=UJ(i,s),b=function(k){return k>1?1:k<0?0:k},x=function(k){for(var O=k>1?1:k,A=O,T=0;T<8;++T){var E=h(A)-O,P=v(A);if(Math.abs(E-O)<Vd||P<Vd)return g(A);A=b(A-E/P)}return g(A)};return x.isStepper=!1,x},FJ=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.stiff,n=r===void 0?100:r,i=e.damping,a=i===void 0?8:i,s=e.dt,u=s===void 0?17:s,c=function(p,h,g){var v=-(p-h)*n,b=g*a,x=g+(v-b)*u/1e3,y=g*u/1e3+p;return Math.abs(y-h)<Vd&&Math.abs(x)<Vd?[h,0]:[y,x]};return c.isStepper=!0,c.dt=u,c},HJ=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var i=r[0];if(typeof i=="string")switch(i){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return KT(i);case"spring":return FJ();default:if(i.split("(")[0]==="cubic-bezier")return KT(i)}return typeof i=="function"?i:null};function qu(t){"@babel/helpers - typeof";return qu=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},qu(t)}function VT(t){return VJ(t)||KJ(t)||cI(t)||WJ()}function WJ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
467
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KJ(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function VJ(t){if(Array.isArray(t))return Sw(t)}function GT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function er(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?GT(Object(r),!0).forEach(function(n){_w(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):GT(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function _w(t,e,r){return e=GJ(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function GJ(t){var e=XJ(t,"string");return qu(e)==="symbol"?e:String(e)}function XJ(t,e){if(qu(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(qu(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function YJ(t,e){return ZJ(t)||QJ(t,e)||cI(t,e)||JJ()}function JJ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
468
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cI(t,e){if(t){if(typeof t=="string")return Sw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Sw(t,e)}}function Sw(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function QJ(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function ZJ(t){if(Array.isArray(t))return t}var Gd=function(e,r,n){return e+(r-e)*n},kw=function(e){var r=e.from,n=e.to;return r!==n},eQ=function t(e,r,n){var i=lu(function(a,s){if(kw(s)){var u=e(s.from,s.to,s.velocity),c=YJ(u,2),f=c[0],p=c[1];return er(er({},s),{},{from:f,velocity:p})}return s},r);return n<1?lu(function(a,s){return kw(s)?er(er({},s),{},{velocity:Gd(s.velocity,i[a].velocity,n),from:Gd(s.from,i[a].from,n)}):s},r):t(e,i,n-1)};const tQ=(function(t,e,r,n,i){var a=CJ(t,e),s=a.reduce(function(y,k){return er(er({},y),{},_w({},k,[t[k],e[k]]))},{}),u=a.reduce(function(y,k){return er(er({},y),{},_w({},k,{from:t[k],velocity:0,to:e[k]}))},{}),c=-1,f,p,h=function(){return null},g=function(){return lu(function(k,O){return O.from},u)},v=function(){return!Object.values(u).filter(kw).length},b=function(k){f||(f=k);var O=k-f,A=O/r.dt;u=eQ(r,u,A),i(er(er(er({},t),e),g())),f=k,v()||(c=requestAnimationFrame(h))},x=function(k){p||(p=k);var O=(k-p)/n,A=lu(function(E,P){return Gd.apply(void 0,VT(P).concat([r(O)]))},s);if(i(er(er(er({},t),e),A)),O<1)c=requestAnimationFrame(h);else{var T=lu(function(E,P){return Gd.apply(void 0,VT(P).concat([r(1)]))},s);i(er(er(er({},t),e),T))}};return h=r.isStepper?b:x,function(){return requestAnimationFrame(h),function(){cancelAnimationFrame(c)}}});function ys(t){"@babel/helpers - typeof";return ys=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},ys(t)}var rQ=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function nQ(t,e){if(t==null)return{};var r=iQ(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function iQ(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,a;for(a=0;a<n.length;a++)i=n[a],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}function z0(t){return lQ(t)||sQ(t)||oQ(t)||aQ()}function aQ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
469
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oQ(t,e){if(t){if(typeof t=="string")return Ew(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ew(t,e)}}function sQ(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function lQ(t){if(Array.isArray(t))return Ew(t)}function Ew(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function XT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function mn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?XT(Object(r),!0).forEach(function(n){tu(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):XT(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function tu(t,e,r){return e=fI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function uQ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function cQ(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,fI(n.key),n)}}function fQ(t,e,r){return e&&cQ(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function fI(t){var e=dQ(t,"string");return ys(e)==="symbol"?e:String(e)}function dQ(t,e){if(ys(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(ys(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function hQ(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ow(t,e)}function Ow(t,e){return Ow=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Ow(t,e)}function pQ(t){var e=mQ();return function(){var n=Xd(t),i;if(e){var a=Xd(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return Aw(this,i)}}function Aw(t,e){if(e&&(ys(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Pw(t)}function Pw(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function mQ(){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 Xd(t){return Xd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Xd(t)}var Hn=(function(t){hQ(r,t);var e=pQ(r);function r(n,i){var a;uQ(this,r),a=e.call(this,n,i);var s=a.props,u=s.isActive,c=s.attributeName,f=s.from,p=s.to,h=s.steps,g=s.children,v=s.duration;if(a.handleStyleChange=a.handleStyleChange.bind(Pw(a)),a.changeStyle=a.changeStyle.bind(Pw(a)),!u||v<=0)return a.state={style:{}},typeof g=="function"&&(a.state={style:p}),Aw(a);if(h&&h.length)a.state={style:h[0].style};else if(f){if(typeof g=="function")return a.state={style:f},Aw(a);a.state={style:c?tu({},c,f):f}}else a.state={style:{}};return a}return fQ(r,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,s=i.canBegin;this.mounted=!0,!(!a||!s)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,s=a.isActive,u=a.canBegin,c=a.attributeName,f=a.shouldReAnimate,p=a.to,h=a.from,g=this.state.style;if(u){if(!s){var v={style:c?tu({},c,p):p};this.state&&g&&(c&&g[c]!==p||!c&&g!==p)&&this.setState(v);return}if(!(xJ(i.to,p)&&i.canBegin&&i.isActive)){var b=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var x=b||f?h:i.to;if(this.state&&g){var y={style:c?tu({},c,x):x};(c&&g[c]!==x||!c&&g!==x)&&this.setState(y)}this.runAnimation(mn(mn({},this.props),{},{from:x,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,s=i.from,u=i.to,c=i.duration,f=i.easing,p=i.begin,h=i.onAnimationEnd,g=i.onAnimationStart,v=tQ(s,u,HJ(f),c,this.changeStyle),b=function(){a.stopJSAnimation=v()};this.manager.start([g,p,b,c,h])}},{key:"runStepAnimation",value:function(i){var a=this,s=i.steps,u=i.begin,c=i.onAnimationStart,f=s[0],p=f.style,h=f.duration,g=h===void 0?0:h,v=function(x,y,k){if(k===0)return x;var O=y.duration,A=y.easing,T=A===void 0?"ease":A,E=y.style,P=y.properties,C=y.onAnimationEnd,N=k>0?s[k-1]:y,L=P||Object.keys(E);if(typeof T=="function"||T==="spring")return[].concat(z0(x),[a.runJSAnimation.bind(a,{from:N.style,to:E,duration:O,easing:T}),O]);var V=HT(L,O,T),$=mn(mn(mn({},N.style),E),{},{transition:V});return[].concat(z0(x),[$,O,C]).filter(RJ)};return this.manager.start([c].concat(z0(s.reduce(v,[p,Math.max(g,u)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=PJ());var a=i.begin,s=i.duration,u=i.attributeName,c=i.to,f=i.easing,p=i.onAnimationStart,h=i.onAnimationEnd,g=i.steps,v=i.children,b=this.manager;if(this.unSubscribe=b.subscribe(this.handleStyleChange),typeof f=="function"||typeof v=="function"||f==="spring"){this.runJSAnimation(i);return}if(g.length>1){this.runStepAnimation(i);return}var x=u?tu({},u,c):c,y=HT(Object.keys(x),s,f);b.start([p,a,mn(mn({},x),{},{transition:y}),s,h])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var s=i.duration;i.attributeName,i.easing;var u=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var c=nQ(i,rQ),f=R.Children.count(a),p=this.state.style;if(typeof a=="function")return a(p);if(!u||f===0||s<=0)return a;var h=function(v){var b=v.props,x=b.style,y=x===void 0?{}:x,k=b.className,O=R.cloneElement(v,mn(mn({},c),{},{style:mn(mn({},y),p),className:k}));return O};return f===1?h(R.Children.only(a)):M.createElement("div",null,R.Children.map(a,function(g){return h(g)}))}}]),r})(R.PureComponent);Hn.displayName="Animate";Hn.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Hn.propTypes={from:Xe.oneOfType([Xe.object,Xe.string]),to:Xe.oneOfType([Xe.object,Xe.string]),attributeName:Xe.string,duration:Xe.number,begin:Xe.number,easing:Xe.oneOfType([Xe.string,Xe.func]),steps:Xe.arrayOf(Xe.shape({duration:Xe.number.isRequired,style:Xe.object.isRequired,easing:Xe.oneOfType([Xe.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Xe.func]),properties:Xe.arrayOf("string"),onAnimationEnd:Xe.func})),children:Xe.oneOfType([Xe.node,Xe.func]),isActive:Xe.bool,canBegin:Xe.bool,onAnimationEnd:Xe.func,shouldReAnimate:Xe.bool,onAnimationStart:Xe.func,onAnimationReStart:Xe.func};function Uu(t){"@babel/helpers - typeof";return Uu=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},Uu(t)}function Yd(){return Yd=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Yd.apply(this,arguments)}function gQ(t,e){return wQ(t)||bQ(t,e)||yQ(t,e)||vQ()}function vQ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
470
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yQ(t,e){if(t){if(typeof t=="string")return YT(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return YT(t,e)}}function YT(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function bQ(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function wQ(t){if(Array.isArray(t))return t}function JT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function QT(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?JT(Object(r),!0).forEach(function(n){xQ(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):JT(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function xQ(t,e,r){return e=_Q(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _Q(t){var e=SQ(t,"string");return Uu(e)=="symbol"?e:e+""}function SQ(t,e){if(Uu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Uu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var ZT=function(e,r,n,i,a){var s=Math.min(Math.abs(n)/2,Math.abs(i)/2),u=i>=0?1:-1,c=n>=0?1:-1,f=i>=0&&n>=0||i<0&&n<0?1:0,p;if(s>0&&a instanceof Array){for(var h=[0,0,0,0],g=0,v=4;g<v;g++)h[g]=a[g]>s?s:a[g];p="M".concat(e,",").concat(r+u*h[0]),h[0]>0&&(p+="A ".concat(h[0],",").concat(h[0],",0,0,").concat(f,",").concat(e+c*h[0],",").concat(r)),p+="L ".concat(e+n-c*h[1],",").concat(r),h[1]>0&&(p+="A ".concat(h[1],",").concat(h[1],",0,0,").concat(f,`,
|
|
471
|
-
`).concat(e+n,",").concat(r+u*h[1])),p+="L ".concat(e+n,",").concat(r+i-u*h[2]),h[2]>0&&(p+="A ".concat(h[2],",").concat(h[2],",0,0,").concat(f,`,
|
|
472
|
-
`).concat(e+n-c*h[2],",").concat(r+i)),p+="L ".concat(e+c*h[3],",").concat(r+i),h[3]>0&&(p+="A ".concat(h[3],",").concat(h[3],",0,0,").concat(f,`,
|
|
473
|
-
`).concat(e,",").concat(r+i-u*h[3])),p+="Z"}else if(s>0&&a===+a&&a>0){var b=Math.min(s,a);p="M ".concat(e,",").concat(r+u*b,`
|
|
474
|
-
A `).concat(b,",").concat(b,",0,0,").concat(f,",").concat(e+c*b,",").concat(r,`
|
|
475
|
-
L `).concat(e+n-c*b,",").concat(r,`
|
|
476
|
-
A `).concat(b,",").concat(b,",0,0,").concat(f,",").concat(e+n,",").concat(r+u*b,`
|
|
477
|
-
L `).concat(e+n,",").concat(r+i-u*b,`
|
|
478
|
-
A `).concat(b,",").concat(b,",0,0,").concat(f,",").concat(e+n-c*b,",").concat(r+i,`
|
|
479
|
-
L `).concat(e+c*b,",").concat(r+i,`
|
|
480
|
-
A `).concat(b,",").concat(b,",0,0,").concat(f,",").concat(e,",").concat(r+i-u*b," Z")}else p="M ".concat(e,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return p},kQ=function(e,r){if(!e||!r)return!1;var n=e.x,i=e.y,a=r.x,s=r.y,u=r.width,c=r.height;if(Math.abs(u)>0&&Math.abs(c)>0){var f=Math.min(a,a+u),p=Math.max(a,a+u),h=Math.min(s,s+c),g=Math.max(s,s+c);return n>=f&&n<=p&&i>=h&&i<=g}return!1},EQ={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},S1=function(e){var r=QT(QT({},EQ),e),n=R.useRef(),i=R.useState(-1),a=gQ(i,2),s=a[0],u=a[1];R.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var T=n.current.getTotalLength();T&&u(T)}catch{}},[]);var c=r.x,f=r.y,p=r.width,h=r.height,g=r.radius,v=r.className,b=r.animationEasing,x=r.animationDuration,y=r.animationBegin,k=r.isAnimationActive,O=r.isUpdateAnimationActive;if(c!==+c||f!==+f||p!==+p||h!==+h||p===0||h===0)return null;var A=De("recharts-rectangle",v);return O?M.createElement(Hn,{canBegin:s>0,from:{width:p,height:h,x:c,y:f},to:{width:p,height:h,x:c,y:f},duration:x,animationEasing:b,isActive:O},function(T){var E=T.width,P=T.height,C=T.x,N=T.y;return M.createElement(Hn,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:x,isActive:k,easing:b},M.createElement("path",Yd({},Oe(r,!0),{className:A,d:ZT(C,N,E,P,g),ref:n})))}):M.createElement("path",Yd({},Oe(r,!0),{className:A,d:ZT(c,f,p,h,g)}))},OQ=["points","className","baseLinePoints","connectNulls"];function Yo(){return Yo=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Yo.apply(this,arguments)}function AQ(t,e){if(t==null)return{};var r=PQ(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function PQ(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function ej(t){return RQ(t)||CQ(t)||jQ(t)||TQ()}function TQ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
481
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jQ(t,e){if(t){if(typeof t=="string")return Tw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Tw(t,e)}}function CQ(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function RQ(t){if(Array.isArray(t))return Tw(t)}function Tw(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var tj=function(e){return e&&e.x===+e.x&&e.y===+e.y},NQ=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=[[]];return e.forEach(function(n){tj(n)?r[r.length-1].push(n):r[r.length-1].length>0&&r.push([])}),tj(e[0])&&r[r.length-1].push(e[0]),r[r.length-1].length<=0&&(r=r.slice(0,-1)),r},uu=function(e,r){var n=NQ(e);r&&(n=[n.reduce(function(a,s){return[].concat(ej(a),ej(s))},[])]);var i=n.map(function(a){return a.reduce(function(s,u,c){return"".concat(s).concat(c===0?"M":"L").concat(u.x,",").concat(u.y)},"")}).join("");return n.length===1?"".concat(i,"Z"):i},$Q=function(e,r,n){var i=uu(e,n);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(uu(r.reverse(),n).slice(1))},IQ=function(e){var r=e.points,n=e.className,i=e.baseLinePoints,a=e.connectNulls,s=AQ(e,OQ);if(!r||!r.length)return null;var u=De("recharts-polygon",n);if(i&&i.length){var c=s.stroke&&s.stroke!=="none",f=$Q(r,i,a);return M.createElement("g",{className:u},M.createElement("path",Yo({},Oe(s,!0),{fill:f.slice(-1)==="Z"?s.fill:"none",stroke:"none",d:f})),c?M.createElement("path",Yo({},Oe(s,!0),{fill:"none",d:uu(r,a)})):null,c?M.createElement("path",Yo({},Oe(s,!0),{fill:"none",d:uu(i,a)})):null)}var p=uu(r,a);return M.createElement("path",Yo({},Oe(s,!0),{fill:p.slice(-1)==="Z"?s.fill:"none",className:u,d:p}))};function jw(){return jw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},jw.apply(this,arguments)}var Jh=function(e){var r=e.cx,n=e.cy,i=e.r,a=e.className,s=De("recharts-dot",a);return r===+r&&n===+n&&i===+i?R.createElement("circle",jw({},Oe(e,!1),yd(e),{className:s,cx:r,cy:n,r:i})):null};function Fu(t){"@babel/helpers - typeof";return Fu=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},Fu(t)}var MQ=["x","y","top","left","width","height","className"];function Cw(){return Cw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Cw.apply(this,arguments)}function rj(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function LQ(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?rj(Object(r),!0).forEach(function(n){DQ(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):rj(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function DQ(t,e,r){return e=BQ(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function BQ(t){var e=zQ(t,"string");return Fu(e)=="symbol"?e:e+""}function zQ(t,e){if(Fu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Fu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function qQ(t,e){if(t==null)return{};var r=UQ(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function UQ(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}var FQ=function(e,r,n,i,a,s){return"M".concat(e,",").concat(a,"v").concat(i,"M").concat(s,",").concat(r,"h").concat(n)},HQ=function(e){var r=e.x,n=r===void 0?0:r,i=e.y,a=i===void 0?0:i,s=e.top,u=s===void 0?0:s,c=e.left,f=c===void 0?0:c,p=e.width,h=p===void 0?0:p,g=e.height,v=g===void 0?0:g,b=e.className,x=qQ(e,MQ),y=LQ({x:n,y:a,top:u,left:f,width:h,height:v},x);return!fe(n)||!fe(a)||!fe(h)||!fe(v)||!fe(u)||!fe(f)?null:M.createElement("path",Cw({},Oe(y,!0),{className:De("recharts-cross",b),d:FQ(n,a,h,v,u,f)}))},q0,nj;function WQ(){if(nj)return q0;nj=1;var t=Kh(),e=A$(),r=Kn();function n(i,a){return i&&i.length?t(i,r(a,2),e):void 0}return q0=n,q0}var KQ=WQ();const VQ=Qe(KQ);var U0,ij;function GQ(){if(ij)return U0;ij=1;var t=Kh(),e=Kn(),r=P$();function n(i,a){return i&&i.length?t(i,e(a,2),r):void 0}return U0=n,U0}var XQ=GQ();const YQ=Qe(XQ);var JQ=["cx","cy","angle","ticks","axisLine"],QQ=["ticks","tick","angle","tickFormatter","stroke"];function bs(t){"@babel/helpers - typeof";return bs=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},bs(t)}function cu(){return cu=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},cu.apply(this,arguments)}function aj(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ia(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?aj(Object(r),!0).forEach(function(n){Qh(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):aj(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function oj(t,e){if(t==null)return{};var r=ZQ(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function ZQ(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function eZ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function sj(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,hI(n.key),n)}}function tZ(t,e,r){return e&&sj(t.prototype,e),r&&sj(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function rZ(t,e,r){return e=Jd(e),nZ(t,dI()?Reflect.construct(e,r||[],Jd(t).constructor):e.apply(t,r))}function nZ(t,e){if(e&&(bs(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return iZ(t)}function iZ(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function dI(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(dI=function(){return!!t})()}function Jd(t){return Jd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Jd(t)}function aZ(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Rw(t,e)}function Rw(t,e){return Rw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Rw(t,e)}function Qh(t,e,r){return e=hI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function hI(t){var e=oZ(t,"string");return bs(e)=="symbol"?e:e+""}function oZ(t,e){if(bs(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(bs(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Zh=(function(t){function e(){return eZ(this,e),rZ(this,e,arguments)}return aZ(e,t),tZ(e,[{key:"getTickValueCoord",value:function(n){var i=n.coordinate,a=this.props,s=a.angle,u=a.cx,c=a.cy;return st(u,c,i,s)}},{key:"getTickTextAnchor",value:function(){var n=this.props.orientation,i;switch(n){case"left":i="end";break;case"right":i="start";break;default:i="middle";break}return i}},{key:"getViewBox",value:function(){var n=this.props,i=n.cx,a=n.cy,s=n.angle,u=n.ticks,c=VQ(u,function(p){return p.coordinate||0}),f=YQ(u,function(p){return p.coordinate||0});return{cx:i,cy:a,startAngle:s,endAngle:s,innerRadius:f.coordinate||0,outerRadius:c.coordinate||0}}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,a=n.cy,s=n.angle,u=n.ticks,c=n.axisLine,f=oj(n,JQ),p=u.reduce(function(b,x){return[Math.min(b[0],x.coordinate),Math.max(b[1],x.coordinate)]},[1/0,-1/0]),h=st(i,a,p[0],s),g=st(i,a,p[1],s),v=Ia(Ia(Ia({},Oe(f,!1)),{},{fill:"none"},Oe(c,!1)),{},{x1:h.x,y1:h.y,x2:g.x,y2:g.y});return M.createElement("line",cu({className:"recharts-polar-radius-axis-line"},v))}},{key:"renderTicks",value:function(){var n=this,i=this.props,a=i.ticks,s=i.tick,u=i.angle,c=i.tickFormatter,f=i.stroke,p=oj(i,QQ),h=this.getTickTextAnchor(),g=Oe(p,!1),v=Oe(s,!1),b=a.map(function(x,y){var k=n.getTickValueCoord(x),O=Ia(Ia(Ia(Ia({textAnchor:h,transform:"rotate(".concat(90-u,", ").concat(k.x,", ").concat(k.y,")")},g),{},{stroke:"none",fill:f},v),{},{index:y},k),{},{payload:x});return M.createElement(Ue,cu({className:De("recharts-polar-radius-axis-tick",tI(s)),key:"tick-".concat(x.coordinate)},Za(n.props,x,y)),e.renderTickItem(s,O,c?c(x.value,y):x.value))});return M.createElement(Ue,{className:"recharts-polar-radius-axis-ticks"},b)}},{key:"render",value:function(){var n=this.props,i=n.ticks,a=n.axisLine,s=n.tick;return!i||!i.length?null:M.createElement(Ue,{className:De("recharts-polar-radius-axis",this.props.className)},a&&this.renderAxisLine(),s&&this.renderTicks(),Vt.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(n,i,a){var s;return M.isValidElement(n)?s=M.cloneElement(n,i):Ie(n)?s=n(i):s=M.createElement(eo,cu({},i,{className:"recharts-polar-radius-axis-tick-value"}),a),s}}])})(R.PureComponent);Qh(Zh,"displayName","PolarRadiusAxis");Qh(Zh,"axisType","radiusAxis");Qh(Zh,"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 ws(t){"@babel/helpers - typeof";return ws=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},ws(t)}function qa(){return qa=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},qa.apply(this,arguments)}function lj(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ma(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?lj(Object(r),!0).forEach(function(n){ep(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):lj(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function sZ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function uj(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,mI(n.key),n)}}function lZ(t,e,r){return e&&uj(t.prototype,e),r&&uj(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function uZ(t,e,r){return e=Qd(e),cZ(t,pI()?Reflect.construct(e,r||[],Qd(t).constructor):e.apply(t,r))}function cZ(t,e){if(e&&(ws(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fZ(t)}function fZ(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function pI(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(pI=function(){return!!t})()}function Qd(t){return Qd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Qd(t)}function dZ(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Nw(t,e)}function Nw(t,e){return Nw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Nw(t,e)}function ep(t,e,r){return e=mI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function mI(t){var e=hZ(t,"string");return ws(e)=="symbol"?e:e+""}function hZ(t,e){if(ws(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(ws(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var pZ=Math.PI/180,cj=1e-5,tp=(function(t){function e(){return sZ(this,e),uZ(this,e,arguments)}return dZ(e,t),lZ(e,[{key:"getTickLineCoord",value:function(n){var i=this.props,a=i.cx,s=i.cy,u=i.radius,c=i.orientation,f=i.tickSize,p=f||8,h=st(a,s,u,n.coordinate),g=st(a,s,u+(c==="inner"?-1:1)*p,n.coordinate);return{x1:h.x,y1:h.y,x2:g.x,y2:g.y}}},{key:"getTickTextAnchor",value:function(n){var i=this.props.orientation,a=Math.cos(-n.coordinate*pZ),s;return a>cj?s=i==="outer"?"start":"end":a<-cj?s=i==="outer"?"end":"start":s="middle",s}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,a=n.cy,s=n.radius,u=n.axisLine,c=n.axisLineType,f=Ma(Ma({},Oe(this.props,!1)),{},{fill:"none"},Oe(u,!1));if(c==="circle")return M.createElement(Jh,qa({className:"recharts-polar-angle-axis-line"},f,{cx:i,cy:a,r:s}));var p=this.props.ticks,h=p.map(function(g){return st(i,a,s,g.coordinate)});return M.createElement(IQ,qa({className:"recharts-polar-angle-axis-line"},f,{points:h}))}},{key:"renderTicks",value:function(){var n=this,i=this.props,a=i.ticks,s=i.tick,u=i.tickLine,c=i.tickFormatter,f=i.stroke,p=Oe(this.props,!1),h=Oe(s,!1),g=Ma(Ma({},p),{},{fill:"none"},Oe(u,!1)),v=a.map(function(b,x){var y=n.getTickLineCoord(b),k=n.getTickTextAnchor(b),O=Ma(Ma(Ma({textAnchor:k},p),{},{stroke:"none",fill:f},h),{},{index:x,payload:b,x:y.x2,y:y.y2});return M.createElement(Ue,qa({className:De("recharts-polar-angle-axis-tick",tI(s)),key:"tick-".concat(b.coordinate)},Za(n.props,b,x)),u&&M.createElement("line",qa({className:"recharts-polar-angle-axis-tick-line"},g,y)),s&&e.renderTickItem(s,O,c?c(b.value,x):b.value))});return M.createElement(Ue,{className:"recharts-polar-angle-axis-ticks"},v)}},{key:"render",value:function(){var n=this.props,i=n.ticks,a=n.radius,s=n.axisLine;return a<=0||!i||!i.length?null:M.createElement(Ue,{className:De("recharts-polar-angle-axis",this.props.className)},s&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(n,i,a){var s;return M.isValidElement(n)?s=M.cloneElement(n,i):Ie(n)?s=n(i):s=M.createElement(eo,qa({},i,{className:"recharts-polar-angle-axis-tick-value"}),a),s}}])})(R.PureComponent);ep(tp,"displayName","PolarAngleAxis");ep(tp,"axisType","angleAxis");ep(tp,"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 F0,fj;function mZ(){if(fj)return F0;fj=1;var t=AN(),e=t(Object.getPrototypeOf,Object);return F0=e,F0}var H0,dj;function gZ(){if(dj)return H0;dj=1;var t=xi(),e=mZ(),r=_i(),n="[object Object]",i=Function.prototype,a=Object.prototype,s=i.toString,u=a.hasOwnProperty,c=s.call(Object);function f(p){if(!r(p)||t(p)!=n)return!1;var h=e(p);if(h===null)return!0;var g=u.call(h,"constructor")&&h.constructor;return typeof g=="function"&&g instanceof g&&s.call(g)==c}return H0=f,H0}var vZ=gZ();const yZ=Qe(vZ);var W0,hj;function bZ(){if(hj)return W0;hj=1;var t=xi(),e=_i(),r="[object Boolean]";function n(i){return i===!0||i===!1||e(i)&&t(i)==r}return W0=n,W0}var wZ=bZ();const xZ=Qe(wZ);function Hu(t){"@babel/helpers - typeof";return Hu=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},Hu(t)}function Zd(){return Zd=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Zd.apply(this,arguments)}function _Z(t,e){return OZ(t)||EZ(t,e)||kZ(t,e)||SZ()}function SZ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
482
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kZ(t,e){if(t){if(typeof t=="string")return pj(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return pj(t,e)}}function pj(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function EZ(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function OZ(t){if(Array.isArray(t))return t}function mj(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function gj(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?mj(Object(r),!0).forEach(function(n){AZ(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):mj(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function AZ(t,e,r){return e=PZ(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function PZ(t){var e=TZ(t,"string");return Hu(e)=="symbol"?e:e+""}function TZ(t,e){if(Hu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Hu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var vj=function(e,r,n,i,a){var s=n-i,u;return u="M ".concat(e,",").concat(r),u+="L ".concat(e+n,",").concat(r),u+="L ".concat(e+n-s/2,",").concat(r+a),u+="L ".concat(e+n-s/2-i,",").concat(r+a),u+="L ".concat(e,",").concat(r," Z"),u},jZ={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},CZ=function(e){var r=gj(gj({},jZ),e),n=R.useRef(),i=R.useState(-1),a=_Z(i,2),s=a[0],u=a[1];R.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var A=n.current.getTotalLength();A&&u(A)}catch{}},[]);var c=r.x,f=r.y,p=r.upperWidth,h=r.lowerWidth,g=r.height,v=r.className,b=r.animationEasing,x=r.animationDuration,y=r.animationBegin,k=r.isUpdateAnimationActive;if(c!==+c||f!==+f||p!==+p||h!==+h||g!==+g||p===0&&h===0||g===0)return null;var O=De("recharts-trapezoid",v);return k?M.createElement(Hn,{canBegin:s>0,from:{upperWidth:0,lowerWidth:0,height:g,x:c,y:f},to:{upperWidth:p,lowerWidth:h,height:g,x:c,y:f},duration:x,animationEasing:b,isActive:k},function(A){var T=A.upperWidth,E=A.lowerWidth,P=A.height,C=A.x,N=A.y;return M.createElement(Hn,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:x,easing:b},M.createElement("path",Zd({},Oe(r,!0),{className:O,d:vj(C,N,T,E,P),ref:n})))}):M.createElement("g",null,M.createElement("path",Zd({},Oe(r,!0),{className:O,d:vj(c,f,p,h,g)})))},RZ=["option","shapeType","propTransformer","activeClassName","isActive"];function Wu(t){"@babel/helpers - typeof";return Wu=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},Wu(t)}function NZ(t,e){if(t==null)return{};var r=$Z(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function $Z(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function yj(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function eh(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?yj(Object(r),!0).forEach(function(n){IZ(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):yj(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function IZ(t,e,r){return e=MZ(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function MZ(t){var e=LZ(t,"string");return Wu(e)=="symbol"?e:e+""}function LZ(t,e){if(Wu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Wu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function DZ(t,e){return eh(eh({},e),t)}function BZ(t,e){return t==="symbols"}function bj(t){var e=t.shapeType,r=t.elementProps;switch(e){case"rectangle":return M.createElement(S1,r);case"trapezoid":return M.createElement(CZ,r);case"sector":return M.createElement(iI,r);case"symbols":if(BZ(e))return M.createElement(Ux,r);break;default:return null}}function zZ(t){return R.isValidElement(t)?t.props:t}function gI(t){var e=t.option,r=t.shapeType,n=t.propTransformer,i=n===void 0?DZ:n,a=t.activeClassName,s=a===void 0?"recharts-active-shape":a,u=t.isActive,c=NZ(t,RZ),f;if(R.isValidElement(e))f=R.cloneElement(e,eh(eh({},c),zZ(e)));else if(Ie(e))f=e(c);else if(yZ(e)&&!xZ(e)){var p=i(e,c);f=M.createElement(bj,{shapeType:r,elementProps:p})}else{var h=c;f=M.createElement(bj,{shapeType:r,elementProps:h})}return u?M.createElement(Ue,{className:s},f):f}function rp(t,e){return e!=null&&"trapezoids"in t.props}function np(t,e){return e!=null&&"sectors"in t.props}function Ku(t,e){return e!=null&&"points"in t.props}function qZ(t,e){var r,n,i=t.x===(e==null||(r=e.labelViewBox)===null||r===void 0?void 0:r.x)||t.x===e.x,a=t.y===(e==null||(n=e.labelViewBox)===null||n===void 0?void 0:n.y)||t.y===e.y;return i&&a}function UZ(t,e){var r=t.endAngle===e.endAngle,n=t.startAngle===e.startAngle;return r&&n}function FZ(t,e){var r=t.x===e.x,n=t.y===e.y,i=t.z===e.z;return r&&n&&i}function HZ(t,e){var r;return rp(t,e)?r=qZ:np(t,e)?r=UZ:Ku(t,e)&&(r=FZ),r}function WZ(t,e){var r;return rp(t,e)?r="trapezoids":np(t,e)?r="sectors":Ku(t,e)&&(r="points"),r}function KZ(t,e){if(rp(t,e)){var r;return(r=e.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}if(np(t,e)){var n;return(n=e.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}return Ku(t,e)?e.payload:{}}function VZ(t){var e=t.activeTooltipItem,r=t.graphicalItem,n=t.itemData,i=WZ(r,e),a=KZ(r,e),s=n.filter(function(c,f){var p=gs(a,c),h=r.props[i].filter(function(b){var x=HZ(r,e);return x(b,e)}),g=r.props[i].indexOf(h[h.length-1]),v=f===g;return p&&v}),u=n.indexOf(s[s.length-1]);return u}var td;function xs(t){"@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(t)}function Jo(){return Jo=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Jo.apply(this,arguments)}function wj(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function at(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?wj(Object(r),!0).forEach(function(n){en(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):wj(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function GZ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function xj(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,yI(n.key),n)}}function XZ(t,e,r){return e&&xj(t.prototype,e),r&&xj(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function YZ(t,e,r){return e=th(e),JZ(t,vI()?Reflect.construct(e,r||[],th(t).constructor):e.apply(t,r))}function JZ(t,e){if(e&&(xs(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return QZ(t)}function QZ(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function vI(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(vI=function(){return!!t})()}function th(t){return th=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},th(t)}function ZZ(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$w(t,e)}function $w(t,e){return $w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},$w(t,e)}function en(t,e,r){return e=yI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function yI(t){var e=eee(t,"string");return xs(e)=="symbol"?e:e+""}function eee(t,e){if(xs(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(xs(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var ki=(function(t){function e(r){var n;return GZ(this,e),n=YZ(this,e,[r]),en(n,"pieRef",null),en(n,"sectorRefs",[]),en(n,"id",Fs("recharts-pie-")),en(n,"handleAnimationEnd",function(){var i=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),Ie(i)&&i()}),en(n,"handleAnimationStart",function(){var i=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),Ie(i)&&i()}),n.state={isAnimationFinished:!r.isAnimationActive,prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,sectorToFocus:0},n}return ZZ(e,t),XZ(e,[{key:"isActiveIndex",value:function(n){var i=this.props.activeIndex;return Array.isArray(i)?i.indexOf(n)!==-1:n===i}},{key:"hasActiveIndex",value:function(){var n=this.props.activeIndex;return Array.isArray(n)?n.length!==0:n||n===0}},{key:"renderLabels",value:function(n){var i=this.props.isAnimationActive;if(i&&!this.state.isAnimationFinished)return null;var a=this.props,s=a.label,u=a.labelLine,c=a.dataKey,f=a.valueKey,p=Oe(this.props,!1),h=Oe(s,!1),g=Oe(u,!1),v=s&&s.offsetRadius||20,b=n.map(function(x,y){var k=(x.startAngle+x.endAngle)/2,O=st(x.cx,x.cy,x.outerRadius+v,k),A=at(at(at(at({},p),x),{},{stroke:"none"},h),{},{index:y,textAnchor:e.getTextAnchor(O.x,x.cx)},O),T=at(at(at(at({},p),x),{},{fill:"none",stroke:x.fill},g),{},{index:y,points:[st(x.cx,x.cy,x.outerRadius,k),O]}),E=c;return Le(c)&&Le(f)?E="value":Le(c)&&(E=f),M.createElement(Ue,{key:"label-".concat(x.startAngle,"-").concat(x.endAngle,"-").concat(x.midAngle,"-").concat(y)},u&&e.renderLabelLineItem(u,T,"line"),e.renderLabelItem(s,A,Dt(x,E)))});return M.createElement(Ue,{className:"recharts-pie-labels"},b)}},{key:"renderSectorsStatically",value:function(n){var i=this,a=this.props,s=a.activeShape,u=a.blendStroke,c=a.inactiveShape;return n.map(function(f,p){if((f==null?void 0:f.startAngle)===0&&(f==null?void 0:f.endAngle)===0&&n.length!==1)return null;var h=i.isActiveIndex(p),g=c&&i.hasActiveIndex()?c:null,v=h?s:g,b=at(at({},f),{},{stroke:u?f.fill:f.stroke,tabIndex:-1});return M.createElement(Ue,Jo({ref:function(y){y&&!i.sectorRefs.includes(y)&&i.sectorRefs.push(y)},tabIndex:-1,className:"recharts-pie-sector"},Za(i.props,f,p),{key:"sector-".concat(f==null?void 0:f.startAngle,"-").concat(f==null?void 0:f.endAngle,"-").concat(f.midAngle,"-").concat(p)}),M.createElement(gI,Jo({option:v,isActive:h,shapeType:"sector"},b)))})}},{key:"renderSectorsWithAnimation",value:function(){var n=this,i=this.props,a=i.sectors,s=i.isAnimationActive,u=i.animationBegin,c=i.animationDuration,f=i.animationEasing,p=i.animationId,h=this.state,g=h.prevSectors,v=h.prevIsAnimationActive;return M.createElement(Hn,{begin:u,duration:c,isActive:s,easing:f,from:{t:0},to:{t:1},key:"pie-".concat(p,"-").concat(v),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(b){var x=b.t,y=[],k=a&&a[0],O=k.startAngle;return a.forEach(function(A,T){var E=g&&g[T],P=T>0?Lr(A,"paddingAngle",0):0;if(E){var C=kr(E.endAngle-E.startAngle,A.endAngle-A.startAngle),N=at(at({},A),{},{startAngle:O+P,endAngle:O+C(x)+P});y.push(N),O=N.endAngle}else{var L=A.endAngle,V=A.startAngle,$=kr(0,L-V),I=$(x),q=at(at({},A),{},{startAngle:O+P,endAngle:O+I+P});y.push(q),O=q.endAngle}}),M.createElement(Ue,null,n.renderSectorsStatically(y))})}},{key:"attachKeyboardHandlers",value:function(n){var i=this;n.onkeydown=function(a){if(!a.altKey)switch(a.key){case"ArrowLeft":{var s=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[s].focus(),i.setState({sectorToFocus:s});break}case"ArrowRight":{var u=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[u].focus(),i.setState({sectorToFocus:u});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var n=this.props,i=n.sectors,a=n.isAnimationActive,s=this.state.prevSectors;return a&&i&&i.length&&(!s||!gs(s,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var n=this,i=this.props,a=i.hide,s=i.sectors,u=i.className,c=i.label,f=i.cx,p=i.cy,h=i.innerRadius,g=i.outerRadius,v=i.isAnimationActive,b=this.state.isAnimationFinished;if(a||!s||!s.length||!fe(f)||!fe(p)||!fe(h)||!fe(g))return null;var x=De("recharts-pie",u);return M.createElement(Ue,{tabIndex:this.props.rootTabIndex,className:x,ref:function(k){n.pieRef=k}},this.renderSectors(),c&&this.renderLabels(s),Vt.renderCallByParent(this.props,null,!1),(!v||b)&&mi.renderCallByParent(this.props,s,!1))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return i.prevIsAnimationActive!==n.isAnimationActive?{prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:[],isAnimationFinished:!0}:n.isAnimationActive&&n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:n.sectors!==i.curSectors?{curSectors:n.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(n,i){return n>i?"start":n<i?"end":"middle"}},{key:"renderLabelLineItem",value:function(n,i,a){if(M.isValidElement(n))return M.cloneElement(n,i);if(Ie(n))return n(i);var s=De("recharts-pie-label-line",typeof n!="boolean"?n.className:"");return M.createElement(os,Jo({},i,{key:a,type:"linear",className:s}))}},{key:"renderLabelItem",value:function(n,i,a){if(M.isValidElement(n))return M.cloneElement(n,i);var s=a;if(Ie(n)&&(s=n(i),M.isValidElement(s)))return s;var u=De("recharts-pie-label-text",typeof n!="boolean"&&!Ie(n)?n.className:"");return M.createElement(eo,Jo({},i,{alignmentBaseline:"middle",className:u}),s)}}])})(R.PureComponent);td=ki;en(ki,"displayName","Pie");en(ki,"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:!oo.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});en(ki,"parseDeltaAngle",function(t,e){var r=dr(e-t),n=Math.min(Math.abs(e-t),360);return r*n});en(ki,"getRealPieData",function(t){var e=t.data,r=t.children,n=Oe(t,!1),i=rn(r,Bh);return e&&e.length?e.map(function(a,s){return at(at(at({payload:a},n),a),i&&i[s]&&i[s].props)}):i&&i.length?i.map(function(a){return at(at({},n),a.props)}):[]});en(ki,"parseCoordinateOfPie",function(t,e){var r=e.top,n=e.left,i=e.width,a=e.height,s=eI(i,a),u=n+hr(t.cx,i,i/2),c=r+hr(t.cy,a,a/2),f=hr(t.innerRadius,s,0),p=hr(t.outerRadius,s,s*.8),h=t.maxRadius||Math.sqrt(i*i+a*a)/2;return{cx:u,cy:c,innerRadius:f,outerRadius:p,maxRadius:h}});en(ki,"getComposedData",function(t){var e=t.item,r=t.offset,n=e.type.defaultProps!==void 0?at(at({},e.type.defaultProps),e.props):e.props,i=td.getRealPieData(n);if(!i||!i.length)return null;var a=n.cornerRadius,s=n.startAngle,u=n.endAngle,c=n.paddingAngle,f=n.dataKey,p=n.nameKey,h=n.valueKey,g=n.tooltipType,v=Math.abs(n.minAngle),b=td.parseCoordinateOfPie(n,r),x=td.parseDeltaAngle(s,u),y=Math.abs(x),k=f;Le(f)&&Le(h)?(hi(!1,`Use "dataKey" to specify the value of pie,
|
|
483
|
-
the props "valueKey" will be deprecated in 1.1.0`),k="value"):Le(f)&&(hi(!1,`Use "dataKey" to specify the value of pie,
|
|
484
|
-
the props "valueKey" will be deprecated in 1.1.0`),k=h);var O=i.filter(function(N){return Dt(N,k,0)!==0}).length,A=(y>=360?O:O-1)*c,T=y-O*v-A,E=i.reduce(function(N,L){var V=Dt(L,k,0);return N+(fe(V)?V:0)},0),P;if(E>0){var C;P=i.map(function(N,L){var V=Dt(N,k,0),$=Dt(N,p,L),I=(fe(V)?V:0)/E,q;L?q=C.endAngle+dr(x)*c*(V!==0?1:0):q=s;var U=q+dr(x)*((V!==0?v:0)+I*T),K=(q+U)/2,G=(b.innerRadius+b.outerRadius)/2,Z=[{name:$,value:V,payload:N,dataKey:k,type:g}],X=st(b.cx,b.cy,G,K);return C=at(at(at({percent:I,cornerRadius:a,name:$,tooltipPayload:Z,midAngle:K,middleRadius:G,tooltipPosition:X},N),b),{},{value:Dt(N,k),startAngle:q,endAngle:U,payload:N,paddingAngle:dr(x)*c}),C})}return at(at({},b),{},{sectors:P,data:i})});var K0,_j;function tee(){if(_j)return K0;_j=1;var t=Math.ceil,e=Math.max;function r(n,i,a,s){for(var u=-1,c=e(t((i-n)/(a||1)),0),f=Array(c);c--;)f[s?c:++u]=n,n+=a;return f}return K0=r,K0}var V0,Sj;function bI(){if(Sj)return V0;Sj=1;var t=FN(),e=1/0,r=17976931348623157e292;function n(i){if(!i)return i===0?i:0;if(i=t(i),i===e||i===-e){var a=i<0?-1:1;return a*r}return i===i?i:0}return V0=n,V0}var G0,kj;function ree(){if(kj)return G0;kj=1;var t=tee(),e=Dh(),r=bI();function n(i){return function(a,s,u){return u&&typeof u!="number"&&e(a,s,u)&&(s=u=void 0),a=r(a),s===void 0?(s=a,a=0):s=r(s),u=u===void 0?a<s?1:-1:r(u),t(a,s,u,i)}}return G0=n,G0}var X0,Ej;function nee(){if(Ej)return X0;Ej=1;var t=ree(),e=t();return X0=e,X0}var iee=nee();const rh=Qe(iee);function Vu(t){"@babel/helpers - typeof";return Vu=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},Vu(t)}function Oj(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Aj(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Oj(Object(r),!0).forEach(function(n){wI(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Oj(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function wI(t,e,r){return e=aee(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function aee(t){var e=oee(t,"string");return Vu(e)=="symbol"?e:e+""}function oee(t,e){if(Vu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Vu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var see=["Webkit","Moz","O","ms"],lee=function(e,r){var n=e.replace(/(\w)/,function(a){return a.toUpperCase()}),i=see.reduce(function(a,s){return Aj(Aj({},a),{},wI({},s+n,r))},{});return i[e]=r,i};function _s(t){"@babel/helpers - typeof";return _s=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},_s(t)}function nh(){return nh=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},nh.apply(this,arguments)}function Pj(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Y0(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Pj(Object(r),!0).forEach(function(n){Nr(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Pj(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function uee(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Tj(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,_I(n.key),n)}}function cee(t,e,r){return e&&Tj(t.prototype,e),r&&Tj(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function fee(t,e,r){return e=ih(e),dee(t,xI()?Reflect.construct(e,r||[],ih(t).constructor):e.apply(t,r))}function dee(t,e){if(e&&(_s(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hee(t)}function hee(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function xI(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(xI=function(){return!!t})()}function ih(t){return ih=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ih(t)}function pee(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Iw(t,e)}function Iw(t,e){return Iw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Iw(t,e)}function Nr(t,e,r){return e=_I(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _I(t){var e=mee(t,"string");return _s(e)=="symbol"?e:e+""}function mee(t,e){if(_s(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(_s(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var gee=function(e){var r=e.data,n=e.startIndex,i=e.endIndex,a=e.x,s=e.width,u=e.travellerWidth;if(!r||!r.length)return{};var c=r.length,f=ou().domain(rh(0,c)).range([a,a+s-u]),p=f.domain().map(function(h){return f(h)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:f(n),endX:f(i),scale:f,scaleValues:p}},jj=function(e){return e.changedTouches&&!!e.changedTouches.length},Ss=(function(t){function e(r){var n;return uee(this,e),n=fee(this,e,[r]),Nr(n,"handleDrag",function(i){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(i):n.state.isSlideMoving&&n.handleSlideDrag(i)}),Nr(n,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&n.handleDrag(i.changedTouches[0])}),Nr(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,a=i.endIndex,s=i.onDragEnd,u=i.startIndex;s==null||s({endIndex:a,startIndex:u})}),n.detachDragEndListener()}),Nr(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),Nr(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),Nr(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),Nr(n,"handleSlideDragStart",function(i){var a=jj(i)?i.changedTouches[0]:i;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return pee(e,t),cee(e,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var i=n.startX,a=n.endX,s=this.state.scaleValues,u=this.props,c=u.gap,f=u.data,p=f.length-1,h=Math.min(i,a),g=Math.max(i,a),v=e.getIndexInRange(s,h),b=e.getIndexInRange(s,g);return{startIndex:v-v%c,endIndex:b===p?p:b-b%c}}},{key:"getTextOfTick",value:function(n){var i=this.props,a=i.data,s=i.tickFormatter,u=i.dataKey,c=Dt(a[n],u,n);return Ie(s)?s(c,n):c}},{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(n){var i=this.state,a=i.slideMoveStartX,s=i.startX,u=i.endX,c=this.props,f=c.x,p=c.width,h=c.travellerWidth,g=c.startIndex,v=c.endIndex,b=c.onChange,x=n.pageX-a;x>0?x=Math.min(x,f+p-h-u,f+p-h-s):x<0&&(x=Math.max(x,f-s,f-u));var y=this.getIndex({startX:s+x,endX:u+x});(y.startIndex!==g||y.endIndex!==v)&&b&&b(y),this.setState({startX:s+x,endX:u+x,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var a=jj(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var i=this.state,a=i.brushMoveStartX,s=i.movingTravellerId,u=i.endX,c=i.startX,f=this.state[s],p=this.props,h=p.x,g=p.width,v=p.travellerWidth,b=p.onChange,x=p.gap,y=p.data,k={startX:this.state.startX,endX:this.state.endX},O=n.pageX-a;O>0?O=Math.min(O,h+g-v-f):O<0&&(O=Math.max(O,h-f)),k[s]=f+O;var A=this.getIndex(k),T=A.startIndex,E=A.endIndex,P=function(){var N=y.length-1;return s==="startX"&&(u>c?T%x===0:E%x===0)||u<c&&E===N||s==="endX"&&(u>c?E%x===0:T%x===0)||u>c&&E===N};this.setState(Nr(Nr({},s,f+O),"brushMoveStartX",n.pageX),function(){b&&P()&&b(A)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var a=this,s=this.state,u=s.scaleValues,c=s.startX,f=s.endX,p=this.state[i],h=u.indexOf(p);if(h!==-1){var g=h+n;if(!(g===-1||g>=u.length)){var v=u[g];i==="startX"&&v>=f||i==="endX"&&v<=c||this.setState(Nr({},i,v),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,i=n.x,a=n.y,s=n.width,u=n.height,c=n.fill,f=n.stroke;return M.createElement("rect",{stroke:f,fill:c,x:i,y:a,width:s,height:u})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,a=n.y,s=n.width,u=n.height,c=n.data,f=n.children,p=n.padding,h=R.Children.only(f);return h?M.cloneElement(h,{x:i,y:a,width:s,height:u,margin:p,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(n,i){var a,s,u=this,c=this.props,f=c.y,p=c.travellerWidth,h=c.height,g=c.traveller,v=c.ariaLabel,b=c.data,x=c.startIndex,y=c.endIndex,k=Math.max(n,this.props.x),O=Y0(Y0({},Oe(this.props,!1)),{},{x:k,y:f,width:p,height:h}),A=v||"Min value: ".concat((a=b[x])===null||a===void 0?void 0:a.name,", Max value: ").concat((s=b[y])===null||s===void 0?void 0:s.name);return M.createElement(Ue,{tabIndex:0,role:"slider","aria-label":A,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(E){["ArrowLeft","ArrowRight"].includes(E.key)&&(E.preventDefault(),E.stopPropagation(),u.handleTravellerMoveKeyboard(E.key==="ArrowRight"?1:-1,i))},onFocus:function(){u.setState({isTravellerFocused:!0})},onBlur:function(){u.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},e.renderTraveller(g,O))}},{key:"renderSlide",value:function(n,i){var a=this.props,s=a.y,u=a.height,c=a.stroke,f=a.travellerWidth,p=Math.min(n,i)+f,h=Math.max(Math.abs(i-n)-f,0);return M.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c,fillOpacity:.2,x:p,y:s,width:h,height:u})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,a=n.endIndex,s=n.y,u=n.height,c=n.travellerWidth,f=n.stroke,p=this.state,h=p.startX,g=p.endX,v=5,b={pointerEvents:"none",fill:f};return M.createElement(Ue,{className:"recharts-brush-texts"},M.createElement(eo,nh({textAnchor:"end",verticalAnchor:"middle",x:Math.min(h,g)-v,y:s+u/2},b),this.getTextOfTick(i)),M.createElement(eo,nh({textAnchor:"start",verticalAnchor:"middle",x:Math.max(h,g)+c+v,y:s+u/2},b),this.getTextOfTick(a)))}},{key:"render",value:function(){var n=this.props,i=n.data,a=n.className,s=n.children,u=n.x,c=n.y,f=n.width,p=n.height,h=n.alwaysShowText,g=this.state,v=g.startX,b=g.endX,x=g.isTextActive,y=g.isSlideMoving,k=g.isTravellerMoving,O=g.isTravellerFocused;if(!i||!i.length||!fe(u)||!fe(c)||!fe(f)||!fe(p)||f<=0||p<=0)return null;var A=De("recharts-brush",a),T=M.Children.count(s)===1,E=lee("userSelect","none");return M.createElement(Ue,{className:A,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:E},this.renderBackground(),T&&this.renderPanorama(),this.renderSlide(v,b),this.renderTravellerLayer(v,"startX"),this.renderTravellerLayer(b,"endX"),(x||y||k||O||h)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,a=n.y,s=n.width,u=n.height,c=n.stroke,f=Math.floor(a+u/2)-1;return M.createElement(M.Fragment,null,M.createElement("rect",{x:i,y:a,width:s,height:u,fill:c,stroke:"none"}),M.createElement("line",{x1:i+1,y1:f,x2:i+s-1,y2:f,fill:"none",stroke:"#fff"}),M.createElement("line",{x1:i+1,y1:f+2,x2:i+s-1,y2:f+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var a;return M.isValidElement(n)?a=M.cloneElement(n,i):Ie(n)?a=n(i):a=e.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(n,i){var a=n.data,s=n.width,u=n.x,c=n.travellerWidth,f=n.updateId,p=n.startIndex,h=n.endIndex;if(a!==i.prevData||f!==i.prevUpdateId)return Y0({prevData:a,prevTravellerWidth:c,prevUpdateId:f,prevX:u,prevWidth:s},a&&a.length?gee({data:a,width:s,x:u,travellerWidth:c,startIndex:p,endIndex:h}):{scale:null,scaleValues:null});if(i.scale&&(s!==i.prevWidth||u!==i.prevX||c!==i.prevTravellerWidth)){i.scale.range([u,u+s-c]);var g=i.scale.domain().map(function(v){return i.scale(v)});return{prevData:a,prevTravellerWidth:c,prevUpdateId:f,prevX:u,prevWidth:s,startX:i.scale(n.startIndex),endX:i.scale(n.endIndex),scaleValues:g}}return null}},{key:"getIndexInRange",value:function(n,i){for(var a=n.length,s=0,u=a-1;u-s>1;){var c=Math.floor((s+u)/2);n[c]>i?u=c:s=c}return i>=n[u]?u:s}}])})(R.PureComponent);Nr(Ss,"displayName","Brush");Nr(Ss,"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 J0,Cj;function vee(){if(Cj)return J0;Cj=1;var t=Xx();function e(r,n){var i;return t(r,function(a,s,u){return i=n(a,s,u),!i}),!!i}return J0=e,J0}var Q0,Rj;function yee(){if(Rj)return Q0;Rj=1;var t=wN(),e=Kn(),r=vee(),n=Or(),i=Dh();function a(s,u,c){var f=n(s)?t:r;return c&&i(s,u,c)&&(u=void 0),f(s,e(u,3))}return Q0=a,Q0}var bee=yee();const wee=Qe(bee);var Un=function(e,r){var n=e.alwaysShow,i=e.ifOverflow;return n&&(i="extendDomain"),i===r},Z0,Nj;function xee(){if(Nj)return Z0;Nj=1;var t=DN();function e(r,n,i){n=="__proto__"&&t?t(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return Z0=e,Z0}var eb,$j;function _ee(){if($j)return eb;$j=1;var t=xee(),e=MN(),r=Kn();function n(i,a){var s={};return a=r(a,3),e(i,function(u,c,f){t(s,c,a(u,c,f))}),s}return eb=n,eb}var See=_ee();const kee=Qe(See);var tb,Ij;function Eee(){if(Ij)return tb;Ij=1;function t(e,r){for(var n=-1,i=e==null?0:e.length;++n<i;)if(!r(e[n],n,e))return!1;return!0}return tb=t,tb}var rb,Mj;function Oee(){if(Mj)return rb;Mj=1;var t=Xx();function e(r,n){var i=!0;return t(r,function(a,s,u){return i=!!n(a,s,u),i}),i}return rb=e,rb}var nb,Lj;function Aee(){if(Lj)return nb;Lj=1;var t=Eee(),e=Oee(),r=Kn(),n=Or(),i=Dh();function a(s,u,c){var f=n(s)?t:e;return c&&i(s,u,c)&&(u=void 0),f(s,r(u,3))}return nb=a,nb}var Pee=Aee();const Tee=Qe(Pee);var jee=["x","y"];function Gu(t){"@babel/helpers - typeof";return Gu=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},Gu(t)}function Mw(){return Mw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Mw.apply(this,arguments)}function Dj(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Vl(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Dj(Object(r),!0).forEach(function(n){Cee(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Dj(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Cee(t,e,r){return e=Ree(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ree(t){var e=Nee(t,"string");return Gu(e)=="symbol"?e:e+""}function Nee(t,e){if(Gu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Gu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function $ee(t,e){if(t==null)return{};var r=Iee(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Iee(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function Mee(t,e){var r=t.x,n=t.y,i=$ee(t,jee),a="".concat(r),s=parseInt(a,10),u="".concat(n),c=parseInt(u,10),f="".concat(e.height||i.height),p=parseInt(f,10),h="".concat(e.width||i.width),g=parseInt(h,10);return Vl(Vl(Vl(Vl(Vl({},e),i),s?{x:s}:{}),c?{y:c}:{}),{},{height:p,width:g,name:e.name,radius:e.radius})}function Bj(t){return M.createElement(gI,Mw({shapeType:"rectangle",propTransformer:Mee,activeClassName:"recharts-active-bar"},t))}var Lee=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,i){if(typeof e=="number")return e;var a=fe(n)||r9(n);return a?e(n,i):(a||ro(),r)}},Dee=["value","background"],SI;function ks(t){"@babel/helpers - typeof";return ks=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},ks(t)}function Bee(t,e){if(t==null)return{};var r=zee(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function zee(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function ah(){return ah=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ah.apply(this,arguments)}function zj(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Tt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?zj(Object(r),!0).forEach(function(n){ia(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):zj(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function qee(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qj(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,EI(n.key),n)}}function Uee(t,e,r){return e&&qj(t.prototype,e),r&&qj(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Fee(t,e,r){return e=oh(e),Hee(t,kI()?Reflect.construct(e,r||[],oh(t).constructor):e.apply(t,r))}function Hee(t,e){if(e&&(ks(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Wee(t)}function Wee(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function kI(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kI=function(){return!!t})()}function oh(t){return oh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},oh(t)}function Kee(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Lw(t,e)}function Lw(t,e){return Lw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Lw(t,e)}function ia(t,e,r){return e=EI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function EI(t){var e=Vee(t,"string");return ks(e)=="symbol"?e:e+""}function Vee(t,e){if(ks(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(ks(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var uc=(function(t){function e(){var r;qee(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=Fee(this,e,[].concat(i)),ia(r,"state",{isAnimationFinished:!1}),ia(r,"id",Fs("recharts-bar-")),ia(r,"handleAnimationEnd",function(){var s=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),s&&s()}),ia(r,"handleAnimationStart",function(){var s=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),s&&s()}),r}return Kee(e,t),Uee(e,[{key:"renderRectanglesStatically",value:function(n){var i=this,a=this.props,s=a.shape,u=a.dataKey,c=a.activeIndex,f=a.activeBar,p=Oe(this.props,!1);return n&&n.map(function(h,g){var v=g===c,b=v?f:s,x=Tt(Tt(Tt({},p),h),{},{isActive:v,option:b,index:g,dataKey:u,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return M.createElement(Ue,ah({className:"recharts-bar-rectangle"},Za(i.props,h,g),{key:"rectangle-".concat(h==null?void 0:h.x,"-").concat(h==null?void 0:h.y,"-").concat(h==null?void 0:h.value,"-").concat(g)}),M.createElement(Bj,x))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,i=this.props,a=i.data,s=i.layout,u=i.isAnimationActive,c=i.animationBegin,f=i.animationDuration,p=i.animationEasing,h=i.animationId,g=this.state.prevData;return M.createElement(Hn,{begin:c,duration:f,isActive:u,easing:p,from:{t:0},to:{t:1},key:"bar-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(v){var b=v.t,x=a.map(function(y,k){var O=g&&g[k];if(O){var A=kr(O.x,y.x),T=kr(O.y,y.y),E=kr(O.width,y.width),P=kr(O.height,y.height);return Tt(Tt({},y),{},{x:A(b),y:T(b),width:E(b),height:P(b)})}if(s==="horizontal"){var C=kr(0,y.height),N=C(b);return Tt(Tt({},y),{},{y:y.y+y.height-N,height:N})}var L=kr(0,y.width),V=L(b);return Tt(Tt({},y),{},{width:V})});return M.createElement(Ue,null,n.renderRectanglesStatically(x))})}},{key:"renderRectangles",value:function(){var n=this.props,i=n.data,a=n.isAnimationActive,s=this.state.prevData;return a&&i&&i.length&&(!s||!gs(s,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var n=this,i=this.props,a=i.data,s=i.dataKey,u=i.activeIndex,c=Oe(this.props.background,!1);return a.map(function(f,p){f.value;var h=f.background,g=Bee(f,Dee);if(!h)return null;var v=Tt(Tt(Tt(Tt(Tt({},g),{},{fill:"#eee"},h),c),Za(n.props,f,p)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:s,index:p,className:"recharts-bar-background-rectangle"});return M.createElement(Bj,ah({key:"background-bar-".concat(p),option:n.props.background,isActive:p===u},v))})}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,s=a.data,u=a.xAxis,c=a.yAxis,f=a.layout,p=a.children,h=rn(p,Yh);if(!h)return null;var g=f==="vertical"?s[0].height/2:s[0].width/2,v=function(y,k){var O=Array.isArray(y.value)?y.value[1]:y.value;return{x:y.x,y:y.y,value:O,errorVal:Dt(y,k)}},b={clipPath:n?"url(#clipPath-".concat(i,")"):null};return M.createElement(Ue,b,h.map(function(x){return M.cloneElement(x,{key:"error-bar-".concat(i,"-").concat(x.props.dataKey),data:s,xAxis:u,yAxis:c,layout:f,offset:g,dataPointFormatter:v})}))}},{key:"render",value:function(){var n=this.props,i=n.hide,a=n.data,s=n.className,u=n.xAxis,c=n.yAxis,f=n.left,p=n.top,h=n.width,g=n.height,v=n.isAnimationActive,b=n.background,x=n.id;if(i||!a||!a.length)return null;var y=this.state.isAnimationFinished,k=De("recharts-bar",s),O=u&&u.allowDataOverflow,A=c&&c.allowDataOverflow,T=O||A,E=Le(x)?this.id:x;return M.createElement(Ue,{className:k},O||A?M.createElement("defs",null,M.createElement("clipPath",{id:"clipPath-".concat(E)},M.createElement("rect",{x:O?f:f-h/2,y:A?p:p-g/2,width:O?h:h*2,height:A?g:g*2}))):null,M.createElement(Ue,{className:"recharts-bar-rectangles",clipPath:T?"url(#clipPath-".concat(E,")"):null},b?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(T,E),(!v||y)&&mi.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:i.curData}:n.data!==i.curData?{curData:n.data}:null}}])})(R.PureComponent);SI=uc;ia(uc,"displayName","Bar");ia(uc,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!oo.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});ia(uc,"getComposedData",function(t){var e=t.props,r=t.item,n=t.barPosition,i=t.bandSize,a=t.xAxis,s=t.yAxis,u=t.xAxisTicks,c=t.yAxisTicks,f=t.stackedData,p=t.dataStartIndex,h=t.displayedData,g=t.offset,v=vX(n,r);if(!v)return null;var b=e.layout,x=r.type.defaultProps,y=x!==void 0?Tt(Tt({},x),r.props):r.props,k=y.dataKey,O=y.children,A=y.minPointSize,T=b==="horizontal"?s:a,E=f?T.scale.domain():null,P=kX({numericAxis:T}),C=rn(O,Bh),N=h.map(function(L,V){var $,I,q,U,K,G;f?$=yX(f[p+V],E):($=Dt(L,k),Array.isArray($)||($=[P,$]));var Z=Lee(A,SI.defaultProps.minPointSize)($[1],V);if(b==="horizontal"){var X,te=[s.scale($[0]),s.scale($[1])],H=te[0],z=te[1];I=mT({axis:a,ticks:u,bandSize:i,offset:v.offset,entry:L,index:V}),q=(X=z??H)!==null&&X!==void 0?X:void 0,U=v.size;var B=H-z;if(K=Number.isNaN(B)?0:B,G={x:I,y:s.y,width:U,height:s.height},Math.abs(Z)>0&&Math.abs(K)<Math.abs(Z)){var J=dr(K||Z)*(Math.abs(Z)-Math.abs(K));q-=J,K+=J}}else{var ae=[a.scale($[0]),a.scale($[1])],se=ae[0],de=ae[1];if(I=se,q=mT({axis:s,ticks:c,bandSize:i,offset:v.offset,entry:L,index:V}),U=de-se,K=v.size,G={x:a.x,y:q,width:a.width,height:K},Math.abs(Z)>0&&Math.abs(U)<Math.abs(Z)){var Ne=dr(U||Z)*(Math.abs(Z)-Math.abs(U));U+=Ne}}return Tt(Tt(Tt({},L),{},{x:I,y:q,width:U,height:K,value:f?$:$[1],payload:L,background:G},C&&C[V]&&C[V].props),{},{tooltipPayload:[Q$(r,L)],tooltipPosition:{x:I+U/2,y:q+K/2}})});return Tt({data:N,layout:b},g)});function Xu(t){"@babel/helpers - typeof";return Xu=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},Xu(t)}function Gee(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Uj(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,OI(n.key),n)}}function Xee(t,e,r){return e&&Uj(t.prototype,e),r&&Uj(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Fj(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function bn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Fj(Object(r),!0).forEach(function(n){ip(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Fj(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function ip(t,e,r){return e=OI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function OI(t){var e=Yee(t,"string");return Xu(e)=="symbol"?e:e+""}function Yee(t,e){if(Xu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Xu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Jee=function(e,r,n,i,a){var s=e.width,u=e.height,c=e.layout,f=e.children,p=Object.keys(r),h={left:n.left,leftMirror:n.left,right:s-n.right,rightMirror:s-n.right,top:n.top,topMirror:n.top,bottom:u-n.bottom,bottomMirror:u-n.bottom},g=!!$r(f,uc);return p.reduce(function(v,b){var x=r[b],y=x.orientation,k=x.domain,O=x.padding,A=O===void 0?{}:O,T=x.mirror,E=x.reversed,P="".concat(y).concat(T?"Mirror":""),C,N,L,V,$;if(x.type==="number"&&(x.padding==="gap"||x.padding==="no-gap")){var I=k[1]-k[0],q=1/0,U=x.categoricalDomain.sort(a9);if(U.forEach(function(ae,se){se>0&&(q=Math.min((ae||0)-(U[se-1]||0),q))}),Number.isFinite(q)){var K=q/I,G=x.layout==="vertical"?n.height:n.width;if(x.padding==="gap"&&(C=K*G/2),x.padding==="no-gap"){var Z=hr(e.barCategoryGap,K*G),X=K*G/2;C=X-Z-(X-Z)/G*Z}}}i==="xAxis"?N=[n.left+(A.left||0)+(C||0),n.left+n.width-(A.right||0)-(C||0)]:i==="yAxis"?N=c==="horizontal"?[n.top+n.height-(A.bottom||0),n.top+(A.top||0)]:[n.top+(A.top||0)+(C||0),n.top+n.height-(A.bottom||0)-(C||0)]:N=x.range,E&&(N=[N[1],N[0]]);var te=G$(x,a,g),H=te.scale,z=te.realScaleType;H.domain(k).range(N),X$(H);var B=Y$(H,bn(bn({},x),{},{realScaleType:z}));i==="xAxis"?($=y==="top"&&!T||y==="bottom"&&T,L=n.left,V=h[P]-$*x.height):i==="yAxis"&&($=y==="left"&&!T||y==="right"&&T,L=h[P]-$*x.width,V=n.top);var J=bn(bn(bn({},x),B),{},{realScaleType:z,x:L,y:V,scale:H,width:i==="xAxis"?n.width:x.width,height:i==="yAxis"?n.height:x.height});return J.bandSize=Fd(J,B),!x.hide&&i==="xAxis"?h[P]+=($?-1:1)*J.height:x.hide||(h[P]+=($?-1:1)*J.width),bn(bn({},v),{},ip({},b,J))},{})},AI=function(e,r){var n=e.x,i=e.y,a=r.x,s=r.y;return{x:Math.min(n,a),y:Math.min(i,s),width:Math.abs(a-n),height:Math.abs(s-i)}},Qee=function(e){var r=e.x1,n=e.y1,i=e.x2,a=e.y2;return AI({x:r,y:n},{x:i,y:a})},PI=(function(){function t(e){Gee(this,t),this.scale=e}return Xee(t,[{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(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.bandAware,a=n.position;if(r!==void 0){if(a)switch(a){case"start":return this.scale(r);case"middle":{var s=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+s}case"end":{var u=this.bandwidth?this.bandwidth():0;return this.scale(r)+u}default:return this.scale(r)}if(i){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+c}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),i=n[0],a=n[n.length-1];return i<=a?r>=i&&r<=a:r>=a&&r<=i}}],[{key:"create",value:function(r){return new t(r)}}])})();ip(PI,"EPS",1e-4);var k1=function(e){var r=Object.keys(e).reduce(function(n,i){return bn(bn({},n),{},ip({},i,PI.create(e[i])))},{});return bn(bn({},r),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=a.bandAware,u=a.position;return kee(i,function(c,f){return r[f].apply(c,{bandAware:s,position:u})})},isInRange:function(i){return Tee(i,function(a,s){return r[s].isInRange(a)})}})};function Zee(t){return(t%180+180)%180}var ete=function(e){var r=e.width,n=e.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=Zee(i),s=a*Math.PI/180,u=Math.atan(n/r),c=s>u&&s<Math.PI-u?n/Math.sin(s):r/Math.cos(s);return Math.abs(c)},ib,Hj;function tte(){if(Hj)return ib;Hj=1;var t=Kn(),e=ic(),r=Mh();function n(i){return function(a,s,u){var c=Object(a);if(!e(a)){var f=t(s,3);a=r(a),s=function(h){return f(c[h],h,c)}}var p=i(a,s,u);return p>-1?c[f?a[p]:p]:void 0}}return ib=n,ib}var ab,Wj;function rte(){if(Wj)return ab;Wj=1;var t=bI();function e(r){var n=t(r),i=n%1;return n===n?i?n-i:n:0}return ab=e,ab}var ob,Kj;function nte(){if(Kj)return ob;Kj=1;var t=CN(),e=Kn(),r=rte(),n=Math.max;function i(a,s,u){var c=a==null?0:a.length;if(!c)return-1;var f=u==null?0:r(u);return f<0&&(f=n(c+f,0)),t(a,e(s,3),f)}return ob=i,ob}var sb,Vj;function ite(){if(Vj)return sb;Vj=1;var t=tte(),e=nte(),r=t(e);return sb=r,sb}ite();var ate=VR();const ote=Qe(ate);var ste=ote(function(t){return{x:t.left,y:t.top,width:t.width,height:t.height}},function(t){return["l",t.left,"t",t.top,"w",t.width,"h",t.height].join("")}),TI=R.createContext(void 0),jI=R.createContext(void 0),CI=R.createContext(void 0),lte=R.createContext({}),RI=R.createContext(void 0),NI=R.createContext(0),$I=R.createContext(0),Gj=function(e){var r=e.state,n=r.xAxisMap,i=r.yAxisMap,a=r.offset,s=e.clipPathId,u=e.children,c=e.width,f=e.height,p=ste(a);return M.createElement(TI.Provider,{value:n},M.createElement(jI.Provider,{value:i},M.createElement(lte.Provider,{value:a},M.createElement(CI.Provider,{value:p},M.createElement(RI.Provider,{value:s},M.createElement(NI.Provider,{value:f},M.createElement($I.Provider,{value:c},u)))))))},ute=function(){return R.useContext(RI)},II=function(e){var r=R.useContext(TI);r==null&&ro();var n=r[e];return n==null&&ro(),n},MI=function(e){var r=R.useContext(jI);r==null&&ro();var n=r[e];return n==null&&ro(),n},cte=function(){var e=R.useContext(CI);return e},LI=function(){return R.useContext($I)},DI=function(){return R.useContext(NI)};function Es(t){"@babel/helpers - typeof";return Es=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},Es(t)}function fte(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dte(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,zI(n.key),n)}}function hte(t,e,r){return e&&dte(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function pte(t,e,r){return e=sh(e),mte(t,BI()?Reflect.construct(e,r||[],sh(t).constructor):e.apply(t,r))}function mte(t,e){if(e&&(Es(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return gte(t)}function gte(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function BI(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(BI=function(){return!!t})()}function sh(t){return sh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},sh(t)}function vte(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Dw(t,e)}function Dw(t,e){return Dw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Dw(t,e)}function Xj(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Yj(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Xj(Object(r),!0).forEach(function(n){E1(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Xj(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function E1(t,e,r){return e=zI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function zI(t){var e=yte(t,"string");return Es(e)=="symbol"?e:e+""}function yte(t,e){if(Es(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Es(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function bte(t,e){return Ste(t)||_te(t,e)||xte(t,e)||wte()}function wte(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
485
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xte(t,e){if(t){if(typeof t=="string")return Jj(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Jj(t,e)}}function Jj(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function _te(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function Ste(t){if(Array.isArray(t))return t}function Bw(){return Bw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Bw.apply(this,arguments)}var kte=function(e,r){var n;return M.isValidElement(e)?n=M.cloneElement(e,r):Ie(e)?n=e(r):n=M.createElement("line",Bw({},r,{className:"recharts-reference-line-line"})),n},Ete=function(e,r,n,i,a,s,u,c,f){var p=a.x,h=a.y,g=a.width,v=a.height;if(n){var b=f.y,x=e.y.apply(b,{position:s});if(Un(f,"discard")&&!e.y.isInRange(x))return null;var y=[{x:p+g,y:x},{x:p,y:x}];return c==="left"?y.reverse():y}if(r){var k=f.x,O=e.x.apply(k,{position:s});if(Un(f,"discard")&&!e.x.isInRange(O))return null;var A=[{x:O,y:h+v},{x:O,y:h}];return u==="top"?A.reverse():A}if(i){var T=f.segment,E=T.map(function(P){return e.apply(P,{position:s})});return Un(f,"discard")&&wee(E,function(P){return!e.isInRange(P)})?null:E}return null};function Ote(t){var e=t.x,r=t.y,n=t.segment,i=t.xAxisId,a=t.yAxisId,s=t.shape,u=t.className,c=t.alwaysShow,f=ute(),p=II(i),h=MI(a),g=cte();if(!f||!g)return null;hi(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var v=k1({x:p.scale,y:h.scale}),b=Bt(e),x=Bt(r),y=n&&n.length===2,k=Ete(v,b,x,y,g,t.position,p.orientation,h.orientation,t);if(!k)return null;var O=bte(k,2),A=O[0],T=A.x,E=A.y,P=O[1],C=P.x,N=P.y,L=Un(t,"hidden")?"url(#".concat(f,")"):void 0,V=Yj(Yj({clipPath:L},Oe(t,!0)),{},{x1:T,y1:E,x2:C,y2:N});return M.createElement(Ue,{className:De("recharts-reference-line",u)},kte(s,V),Vt.renderCallByParent(t,Qee({x1:T,y1:E,x2:C,y2:N})))}var O1=(function(t){function e(){return fte(this,e),pte(this,e,arguments)}return vte(e,t),hte(e,[{key:"render",value:function(){return M.createElement(Ote,this.props)}}])})(M.Component);E1(O1,"displayName","ReferenceLine");E1(O1,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function zw(){return zw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},zw.apply(this,arguments)}function Os(t){"@babel/helpers - typeof";return Os=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},Os(t)}function Qj(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Zj(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Qj(Object(r),!0).forEach(function(n){ap(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Qj(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Ate(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Pte(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,UI(n.key),n)}}function Tte(t,e,r){return e&&Pte(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function jte(t,e,r){return e=lh(e),Cte(t,qI()?Reflect.construct(e,r||[],lh(t).constructor):e.apply(t,r))}function Cte(t,e){if(e&&(Os(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Rte(t)}function Rte(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function qI(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qI=function(){return!!t})()}function lh(t){return lh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},lh(t)}function Nte(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qw(t,e)}function qw(t,e){return qw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},qw(t,e)}function ap(t,e,r){return e=UI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function UI(t){var e=$te(t,"string");return Os(e)=="symbol"?e:e+""}function $te(t,e){if(Os(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Os(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Ite=function(e){var r=e.x,n=e.y,i=e.xAxis,a=e.yAxis,s=k1({x:i.scale,y:a.scale}),u=s.apply({x:r,y:n},{bandAware:!0});return Un(e,"discard")&&!s.isInRange(u)?null:u},op=(function(t){function e(){return Ate(this,e),jte(this,e,arguments)}return Nte(e,t),Tte(e,[{key:"render",value:function(){var n=this.props,i=n.x,a=n.y,s=n.r,u=n.alwaysShow,c=n.clipPathId,f=Bt(i),p=Bt(a);if(hi(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!f||!p)return null;var h=Ite(this.props);if(!h)return null;var g=h.x,v=h.y,b=this.props,x=b.shape,y=b.className,k=Un(this.props,"hidden")?"url(#".concat(c,")"):void 0,O=Zj(Zj({clipPath:k},Oe(this.props,!0)),{},{cx:g,cy:v});return M.createElement(Ue,{className:De("recharts-reference-dot",y)},e.renderDot(x,O),Vt.renderCallByParent(this.props,{x:g-s,y:v-s,width:2*s,height:2*s}))}}])})(M.Component);ap(op,"displayName","ReferenceDot");ap(op,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});ap(op,"renderDot",function(t,e){var r;return M.isValidElement(t)?r=M.cloneElement(t,e):Ie(t)?r=t(e):r=M.createElement(Jh,zw({},e,{cx:e.cx,cy:e.cy,className:"recharts-reference-dot-dot"})),r});function Uw(){return Uw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Uw.apply(this,arguments)}function As(t){"@babel/helpers - typeof";return As=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},As(t)}function eC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function tC(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?eC(Object(r),!0).forEach(function(n){sp(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):eC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Mte(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Lte(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,HI(n.key),n)}}function Dte(t,e,r){return e&&Lte(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Bte(t,e,r){return e=uh(e),zte(t,FI()?Reflect.construct(e,r||[],uh(t).constructor):e.apply(t,r))}function zte(t,e){if(e&&(As(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qte(t)}function qte(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function FI(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(FI=function(){return!!t})()}function uh(t){return uh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},uh(t)}function Ute(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Fw(t,e)}function Fw(t,e){return Fw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Fw(t,e)}function sp(t,e,r){return e=HI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function HI(t){var e=Fte(t,"string");return As(e)=="symbol"?e:e+""}function Fte(t,e){if(As(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(As(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Hte=function(e,r,n,i,a){var s=a.x1,u=a.x2,c=a.y1,f=a.y2,p=a.xAxis,h=a.yAxis;if(!p||!h)return null;var g=k1({x:p.scale,y:h.scale}),v={x:e?g.x.apply(s,{position:"start"}):g.x.rangeMin,y:n?g.y.apply(c,{position:"start"}):g.y.rangeMin},b={x:r?g.x.apply(u,{position:"end"}):g.x.rangeMax,y:i?g.y.apply(f,{position:"end"}):g.y.rangeMax};return Un(a,"discard")&&(!g.isInRange(v)||!g.isInRange(b))?null:AI(v,b)},lp=(function(t){function e(){return Mte(this,e),Bte(this,e,arguments)}return Ute(e,t),Dte(e,[{key:"render",value:function(){var n=this.props,i=n.x1,a=n.x2,s=n.y1,u=n.y2,c=n.className,f=n.alwaysShow,p=n.clipPathId;hi(f===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=Bt(i),g=Bt(a),v=Bt(s),b=Bt(u),x=this.props.shape;if(!h&&!g&&!v&&!b&&!x)return null;var y=Hte(h,g,v,b,this.props);if(!y&&!x)return null;var k=Un(this.props,"hidden")?"url(#".concat(p,")"):void 0;return M.createElement(Ue,{className:De("recharts-reference-area",c)},e.renderRect(x,tC(tC({clipPath:k},Oe(this.props,!0)),y)),Vt.renderCallByParent(this.props,y))}}])})(M.Component);sp(lp,"displayName","ReferenceArea");sp(lp,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});sp(lp,"renderRect",function(t,e){var r;return M.isValidElement(t)?r=M.cloneElement(t,e):Ie(t)?r=t(e):r=M.createElement(S1,Uw({},e,{className:"recharts-reference-area-rect"})),r});function WI(t,e,r){if(e<1)return[];if(e===1&&r===void 0)return t;for(var n=[],i=0;i<t.length;i+=e)n.push(t[i]);return n}function Wte(t,e,r){var n={width:t.width+e.width,height:t.height+e.height};return ete(n,r)}function Kte(t,e,r){var n=r==="width",i=t.x,a=t.y,s=t.width,u=t.height;return e===1?{start:n?i:a,end:n?i+s:a+u}:{start:n?i+s:a+u,end:n?i:a}}function ch(t,e,r,n,i){if(t*e<t*n||t*e>t*i)return!1;var a=r();return t*(e-t*a/2-n)>=0&&t*(e+t*a/2-i)<=0}function Vte(t,e){return WI(t,e+1)}function Gte(t,e,r,n,i){for(var a=(n||[]).slice(),s=e.start,u=e.end,c=0,f=1,p=s,h=function(){var b=n==null?void 0:n[c];if(b===void 0)return{v:WI(n,f)};var x=c,y,k=function(){return y===void 0&&(y=r(b,x)),y},O=b.coordinate,A=c===0||ch(t,O,k,p,u);A||(c=0,p=s,f+=1),A&&(p=O+t*(k()/2+i),c+=f)},g;f<=a.length;)if(g=h(),g)return g.v;return[]}function Yu(t){"@babel/helpers - typeof";return Yu=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},Yu(t)}function rC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function lr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?rC(Object(r),!0).forEach(function(n){Xte(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):rC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Xte(t,e,r){return e=Yte(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Yte(t){var e=Jte(t,"string");return Yu(e)=="symbol"?e:e+""}function Jte(t,e){if(Yu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Yu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Qte(t,e,r,n,i){for(var a=(n||[]).slice(),s=a.length,u=e.start,c=e.end,f=function(g){var v=a[g],b,x=function(){return b===void 0&&(b=r(v,g)),b};if(g===s-1){var y=t*(v.coordinate+t*x()/2-c);a[g]=v=lr(lr({},v),{},{tickCoord:y>0?v.coordinate-y*t:v.coordinate})}else a[g]=v=lr(lr({},v),{},{tickCoord:v.coordinate});var k=ch(t,v.tickCoord,x,u,c);k&&(c=v.tickCoord-t*(x()/2+i),a[g]=lr(lr({},v),{},{isShow:!0}))},p=s-1;p>=0;p--)f(p);return a}function Zte(t,e,r,n,i,a){var s=(n||[]).slice(),u=s.length,c=e.start,f=e.end;if(a){var p=n[u-1],h=r(p,u-1),g=t*(p.coordinate+t*h/2-f);s[u-1]=p=lr(lr({},p),{},{tickCoord:g>0?p.coordinate-g*t:p.coordinate});var v=ch(t,p.tickCoord,function(){return h},c,f);v&&(f=p.tickCoord-t*(h/2+i),s[u-1]=lr(lr({},p),{},{isShow:!0}))}for(var b=a?u-1:u,x=function(O){var A=s[O],T,E=function(){return T===void 0&&(T=r(A,O)),T};if(O===0){var P=t*(A.coordinate-t*E()/2-c);s[O]=A=lr(lr({},A),{},{tickCoord:P<0?A.coordinate-P*t:A.coordinate})}else s[O]=A=lr(lr({},A),{},{tickCoord:A.coordinate});var C=ch(t,A.tickCoord,E,c,f);C&&(c=A.tickCoord+t*(E()/2+i),s[O]=lr(lr({},A),{},{isShow:!0}))},y=0;y<b;y++)x(y);return s}function ere(t,e,r){var n=t.tick,i=t.ticks,a=t.viewBox,s=t.minTickGap,u=t.orientation,c=t.interval,f=t.tickFormatter,p=t.unit,h=t.angle;if(!i||!i.length||!n)return[];if(fe(c)||oo.isSsr)return Vte(i,typeof c=="number"&&fe(c)?c:0);var g=[],v=u==="top"||u==="bottom"?"width":"height",b=p&&v==="width"?au(p,{fontSize:e,letterSpacing:r}):{width:0,height:0},x=function(A,T){var E=Ie(f)?f(A.value,T):A.value;return v==="width"?Wte(au(E,{fontSize:e,letterSpacing:r}),b,h):au(E,{fontSize:e,letterSpacing:r})[v]},y=i.length>=2?dr(i[1].coordinate-i[0].coordinate):1,k=Kte(a,y,v);return c==="equidistantPreserveStart"?Gte(y,k,x,i,s):(c==="preserveStart"||c==="preserveStartEnd"?g=Zte(y,k,x,i,s,c==="preserveStartEnd"):g=Qte(y,k,x,i,s),g.filter(function(O){return O.isShow}))}var tre=["viewBox"],rre=["viewBox"],nre=["ticks"];function Ps(t){"@babel/helpers - typeof";return Ps=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},Ps(t)}function Qo(){return Qo=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Qo.apply(this,arguments)}function nC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Mt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?nC(Object(r),!0).forEach(function(n){A1(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):nC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function lb(t,e){if(t==null)return{};var r=ire(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function ire(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function are(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function iC(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,VI(n.key),n)}}function ore(t,e,r){return e&&iC(t.prototype,e),r&&iC(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function sre(t,e,r){return e=fh(e),lre(t,KI()?Reflect.construct(e,r||[],fh(t).constructor):e.apply(t,r))}function lre(t,e){if(e&&(Ps(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ure(t)}function ure(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function KI(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(KI=function(){return!!t})()}function fh(t){return fh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},fh(t)}function cre(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Hw(t,e)}function Hw(t,e){return Hw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Hw(t,e)}function A1(t,e,r){return e=VI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function VI(t){var e=fre(t,"string");return Ps(e)=="symbol"?e:e+""}function fre(t,e){if(Ps(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Ps(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var up=(function(t){function e(r){var n;return are(this,e),n=sre(this,e,[r]),n.state={fontSize:"",letterSpacing:""},n}return cre(e,t),ore(e,[{key:"shouldComponentUpdate",value:function(n,i){var a=n.viewBox,s=lb(n,tre),u=this.props,c=u.viewBox,f=lb(u,rre);return!rs(a,c)||!rs(s,f)||!rs(i,this.state)}},{key:"componentDidMount",value:function(){var n=this.layerReference;if(n){var i=n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(n){var i=this.props,a=i.x,s=i.y,u=i.width,c=i.height,f=i.orientation,p=i.tickSize,h=i.mirror,g=i.tickMargin,v,b,x,y,k,O,A=h?-1:1,T=n.tickSize||p,E=fe(n.tickCoord)?n.tickCoord:n.coordinate;switch(f){case"top":v=b=n.coordinate,y=s+ +!h*c,x=y-A*T,O=x-A*g,k=E;break;case"left":x=y=n.coordinate,b=a+ +!h*u,v=b-A*T,k=v-A*g,O=E;break;case"right":x=y=n.coordinate,b=a+ +h*u,v=b+A*T,k=v+A*g,O=E;break;default:v=b=n.coordinate,y=s+ +h*c,x=y+A*T,O=x+A*g,k=E;break}return{line:{x1:v,y1:x,x2:b,y2:y},tick:{x:k,y:O}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,s;switch(i){case"left":s=a?"start":"end";break;case"right":s=a?"end":"start";break;default:s="middle";break}return s}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,s="end";switch(i){case"left":case"right":s="middle";break;case"top":s=a?"start":"end";break;default:s=a?"end":"start";break}return s}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.x,a=n.y,s=n.width,u=n.height,c=n.orientation,f=n.mirror,p=n.axisLine,h=Mt(Mt(Mt({},Oe(this.props,!1)),Oe(p,!1)),{},{fill:"none"});if(c==="top"||c==="bottom"){var g=+(c==="top"&&!f||c==="bottom"&&f);h=Mt(Mt({},h),{},{x1:i,y1:a+g*u,x2:i+s,y2:a+g*u})}else{var v=+(c==="left"&&!f||c==="right"&&f);h=Mt(Mt({},h),{},{x1:i+v*s,y1:a,x2:i+v*s,y2:a+u})}return M.createElement("line",Qo({},h,{className:De("recharts-cartesian-axis-line",Lr(p,"className"))}))}},{key:"renderTicks",value:function(n,i,a){var s=this,u=this.props,c=u.tickLine,f=u.stroke,p=u.tick,h=u.tickFormatter,g=u.unit,v=ere(Mt(Mt({},this.props),{},{ticks:n}),i,a),b=this.getTickTextAnchor(),x=this.getTickVerticalAnchor(),y=Oe(this.props,!1),k=Oe(p,!1),O=Mt(Mt({},y),{},{fill:"none"},Oe(c,!1)),A=v.map(function(T,E){var P=s.getTickLineCoord(T),C=P.line,N=P.tick,L=Mt(Mt(Mt(Mt({textAnchor:b,verticalAnchor:x},y),{},{stroke:"none",fill:f},k),N),{},{index:E,payload:T,visibleTicksCount:v.length,tickFormatter:h});return M.createElement(Ue,Qo({className:"recharts-cartesian-axis-tick",key:"tick-".concat(T.value,"-").concat(T.coordinate,"-").concat(T.tickCoord)},Za(s.props,T,E)),c&&M.createElement("line",Qo({},O,C,{className:De("recharts-cartesian-axis-tick-line",Lr(c,"className"))})),p&&e.renderTickItem(p,L,"".concat(Ie(h)?h(T.value,E):T.value).concat(g||"")))});return M.createElement("g",{className:"recharts-cartesian-axis-ticks"},A)}},{key:"render",value:function(){var n=this,i=this.props,a=i.axisLine,s=i.width,u=i.height,c=i.ticksGenerator,f=i.className,p=i.hide;if(p)return null;var h=this.props,g=h.ticks,v=lb(h,nre),b=g;return Ie(c)&&(b=g&&g.length>0?c(this.props):c(v)),s<=0||u<=0||!b||!b.length?null:M.createElement(Ue,{className:De("recharts-cartesian-axis",f),ref:function(y){n.layerReference=y}},a&&this.renderAxisLine(),this.renderTicks(b,this.state.fontSize,this.state.letterSpacing),Vt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,a){var s,u=De(i.className,"recharts-cartesian-axis-tick-value");return M.isValidElement(n)?s=M.cloneElement(n,Mt(Mt({},i),{},{className:u})):Ie(n)?s=n(Mt(Mt({},i),{},{className:u})):s=M.createElement(eo,Qo({},i,{className:"recharts-cartesian-axis-tick-value"}),a),s}}])})(R.Component);A1(up,"displayName","CartesianAxis");A1(up,"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 dre=["layout","type","stroke","connectNulls","isRange","ref"],hre=["key"],GI;function Ts(t){"@babel/helpers - typeof";return Ts=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},Ts(t)}function XI(t,e){if(t==null)return{};var r=pre(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function pre(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function Va(){return Va=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Va.apply(this,arguments)}function aC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Qi(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?aC(Object(r),!0).forEach(function(n){zn(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):aC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function mre(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function oC(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,JI(n.key),n)}}function gre(t,e,r){return e&&oC(t.prototype,e),r&&oC(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function vre(t,e,r){return e=dh(e),yre(t,YI()?Reflect.construct(e,r||[],dh(t).constructor):e.apply(t,r))}function yre(t,e){if(e&&(Ts(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bre(t)}function bre(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function YI(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(YI=function(){return!!t})()}function dh(t){return dh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},dh(t)}function wre(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ww(t,e)}function Ww(t,e){return Ww=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Ww(t,e)}function zn(t,e,r){return e=JI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function JI(t){var e=xre(t,"string");return Ts(e)=="symbol"?e:e+""}function xre(t,e){if(Ts(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Ts(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var da=(function(t){function e(){var r;mre(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=vre(this,e,[].concat(i)),zn(r,"state",{isAnimationFinished:!0}),zn(r,"id",Fs("recharts-area-")),zn(r,"handleAnimationEnd",function(){var s=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),Ie(s)&&s()}),zn(r,"handleAnimationStart",function(){var s=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),Ie(s)&&s()}),r}return wre(e,t),gre(e,[{key:"renderDots",value:function(n,i,a){var s=this.props.isAnimationActive,u=this.state.isAnimationFinished;if(s&&!u)return null;var c=this.props,f=c.dot,p=c.points,h=c.dataKey,g=Oe(this.props,!1),v=Oe(f,!0),b=p.map(function(y,k){var O=Qi(Qi(Qi({key:"dot-".concat(k),r:3},g),v),{},{index:k,cx:y.x,cy:y.y,dataKey:h,value:y.value,payload:y.payload,points:p});return e.renderDotItem(f,O)}),x={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return M.createElement(Ue,Va({className:"recharts-area-dots"},x),b)}},{key:"renderHorizontalRect",value:function(n){var i=this.props,a=i.baseLine,s=i.points,u=i.strokeWidth,c=s[0].x,f=s[s.length-1].x,p=n*Math.abs(c-f),h=na(s.map(function(g){return g.y||0}));return fe(a)&&typeof a=="number"?h=Math.max(a,h):a&&Array.isArray(a)&&a.length&&(h=Math.max(na(a.map(function(g){return g.y||0})),h)),fe(h)?M.createElement("rect",{x:c<f?c:c-p,y:0,width:p,height:Math.floor(h+(u?parseInt("".concat(u),10):1))}):null}},{key:"renderVerticalRect",value:function(n){var i=this.props,a=i.baseLine,s=i.points,u=i.strokeWidth,c=s[0].y,f=s[s.length-1].y,p=n*Math.abs(c-f),h=na(s.map(function(g){return g.x||0}));return fe(a)&&typeof a=="number"?h=Math.max(a,h):a&&Array.isArray(a)&&a.length&&(h=Math.max(na(a.map(function(g){return g.x||0})),h)),fe(h)?M.createElement("rect",{x:0,y:c<f?c:c-p,width:h+(u?parseInt("".concat(u),10):1),height:Math.floor(p)}):null}},{key:"renderClipRect",value:function(n){var i=this.props.layout;return i==="vertical"?this.renderVerticalRect(n):this.renderHorizontalRect(n)}},{key:"renderAreaStatically",value:function(n,i,a,s){var u=this.props,c=u.layout,f=u.type,p=u.stroke,h=u.connectNulls,g=u.isRange;u.ref;var v=XI(u,dre);return M.createElement(Ue,{clipPath:a?"url(#clipPath-".concat(s,")"):null},M.createElement(os,Va({},Oe(v,!0),{points:n,connectNulls:h,type:f,baseLine:i,layout:c,stroke:"none",className:"recharts-area-area"})),p!=="none"&&M.createElement(os,Va({},Oe(this.props,!1),{className:"recharts-area-curve",layout:c,type:f,connectNulls:h,fill:"none",points:n})),p!=="none"&&g&&M.createElement(os,Va({},Oe(this.props,!1),{className:"recharts-area-curve",layout:c,type:f,connectNulls:h,fill:"none",points:i})))}},{key:"renderAreaWithAnimation",value:function(n,i){var a=this,s=this.props,u=s.points,c=s.baseLine,f=s.isAnimationActive,p=s.animationBegin,h=s.animationDuration,g=s.animationEasing,v=s.animationId,b=this.state,x=b.prevPoints,y=b.prevBaseLine;return M.createElement(Hn,{begin:p,duration:h,isActive:f,easing:g,from:{t:0},to:{t:1},key:"area-".concat(v),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(k){var O=k.t;if(x){var A=x.length/u.length,T=u.map(function(N,L){var V=Math.floor(L*A);if(x[V]){var $=x[V],I=kr($.x,N.x),q=kr($.y,N.y);return Qi(Qi({},N),{},{x:I(O),y:q(O)})}return N}),E;if(fe(c)&&typeof c=="number"){var P=kr(y,c);E=P(O)}else if(Le(c)||Us(c)){var C=kr(y,0);E=C(O)}else E=c.map(function(N,L){var V=Math.floor(L*A);if(y[V]){var $=y[V],I=kr($.x,N.x),q=kr($.y,N.y);return Qi(Qi({},N),{},{x:I(O),y:q(O)})}return N});return a.renderAreaStatically(T,E,n,i)}return M.createElement(Ue,null,M.createElement("defs",null,M.createElement("clipPath",{id:"animationClipPath-".concat(i)},a.renderClipRect(O))),M.createElement(Ue,{clipPath:"url(#animationClipPath-".concat(i,")")},a.renderAreaStatically(u,c,n,i)))})}},{key:"renderArea",value:function(n,i){var a=this.props,s=a.points,u=a.baseLine,c=a.isAnimationActive,f=this.state,p=f.prevPoints,h=f.prevBaseLine,g=f.totalLength;return c&&s&&s.length&&(!p&&g>0||!gs(p,s)||!gs(h,u))?this.renderAreaWithAnimation(n,i):this.renderAreaStatically(s,u,n,i)}},{key:"render",value:function(){var n,i=this.props,a=i.hide,s=i.dot,u=i.points,c=i.className,f=i.top,p=i.left,h=i.xAxis,g=i.yAxis,v=i.width,b=i.height,x=i.isAnimationActive,y=i.id;if(a||!u||!u.length)return null;var k=this.state.isAnimationFinished,O=u.length===1,A=De("recharts-area",c),T=h&&h.allowDataOverflow,E=g&&g.allowDataOverflow,P=T||E,C=Le(y)?this.id:y,N=(n=Oe(s,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},L=N.r,V=L===void 0?3:L,$=N.strokeWidth,I=$===void 0?2:$,q=p9(s)?s:{},U=q.clipDot,K=U===void 0?!0:U,G=V*2+I;return M.createElement(Ue,{className:A},T||E?M.createElement("defs",null,M.createElement("clipPath",{id:"clipPath-".concat(C)},M.createElement("rect",{x:T?p:p-v/2,y:E?f:f-b/2,width:T?v:v*2,height:E?b:b*2})),!K&&M.createElement("clipPath",{id:"clipPath-dots-".concat(C)},M.createElement("rect",{x:p-G/2,y:f-G/2,width:v+G,height:b+G}))):null,O?null:this.renderArea(P,C),(s||O)&&this.renderDots(P,K,C),(!x||k)&&mi.renderCallByParent(this.props,u))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,curBaseLine:n.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:n.points!==i.curPoints||n.baseLine!==i.curBaseLine?{curPoints:n.points,curBaseLine:n.baseLine}:null}}])})(R.PureComponent);GI=da;zn(da,"displayName","Area");zn(da,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!oo.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});zn(da,"getBaseValue",function(t,e,r,n){var i=t.layout,a=t.baseValue,s=e.props.baseValue,u=s??a;if(fe(u)&&typeof u=="number")return u;var c=i==="horizontal"?n:r,f=c.scale.domain();if(c.type==="number"){var p=Math.max(f[0],f[1]),h=Math.min(f[0],f[1]);return u==="dataMin"?h:u==="dataMax"||p<0?p:Math.max(Math.min(f[0],f[1]),0)}return u==="dataMin"?f[0]:u==="dataMax"?f[1]:f[0]});zn(da,"getComposedData",function(t){var e=t.props,r=t.item,n=t.xAxis,i=t.yAxis,a=t.xAxisTicks,s=t.yAxisTicks,u=t.bandSize,c=t.dataKey,f=t.stackedData,p=t.dataStartIndex,h=t.displayedData,g=t.offset,v=e.layout,b=f&&f.length,x=GI.getBaseValue(e,r,n,i),y=v==="horizontal",k=!1,O=h.map(function(T,E){var P;b?P=f[p+E]:(P=Dt(T,c),Array.isArray(P)?k=!0:P=[x,P]);var C=P[1]==null||b&&Dt(T,c)==null;return y?{x:pT({axis:n,ticks:a,bandSize:u,entry:T,index:E}),y:C?null:i.scale(P[1]),value:P,payload:T}:{x:C?null:n.scale(P[1]),y:pT({axis:i,ticks:s,bandSize:u,entry:T,index:E}),value:P,payload:T}}),A;return b||k?A=O.map(function(T){var E=Array.isArray(T.value)?T.value[0]:null;return y?{x:T.x,y:E!=null&&T.y!=null?i.scale(E):null}:{x:E!=null?n.scale(E):null,y:T.y}}):A=y?i.scale(x):n.scale(x),Qi({points:O,baseLine:A,layout:v,isRange:k},g)});zn(da,"renderDotItem",function(t,e){var r;if(M.isValidElement(t))r=M.cloneElement(t,e);else if(Ie(t))r=t(e);else{var n=De("recharts-area-dot",typeof t!="boolean"?t.className:""),i=e.key,a=XI(e,hre);r=M.createElement(Jh,Va({},a,{key:i,className:n}))}return r});function js(t){"@babel/helpers - typeof";return js=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},js(t)}function _re(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Sre(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,e3(n.key),n)}}function kre(t,e,r){return e&&Sre(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Ere(t,e,r){return e=hh(e),Ore(t,QI()?Reflect.construct(e,r||[],hh(t).constructor):e.apply(t,r))}function Ore(t,e){if(e&&(js(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Are(t)}function Are(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function QI(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(QI=function(){return!!t})()}function hh(t){return hh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},hh(t)}function Pre(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Kw(t,e)}function Kw(t,e){return Kw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Kw(t,e)}function ZI(t,e,r){return e=e3(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function e3(t){var e=Tre(t,"string");return js(e)=="symbol"?e:e+""}function Tre(t,e){if(js(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(js(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function Vw(){return Vw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Vw.apply(this,arguments)}function jre(t){var e=t.xAxisId,r=LI(),n=DI(),i=II(e);return i==null?null:R.createElement(up,Vw({},i,{className:De("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(s){return Ka(s,!0)}}))}var cp=(function(t){function e(){return _re(this,e),Ere(this,e,arguments)}return Pre(e,t),kre(e,[{key:"render",value:function(){return R.createElement(jre,this.props)}}])})(R.Component);ZI(cp,"displayName","XAxis");ZI(cp,"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 Cs(t){"@babel/helpers - typeof";return Cs=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},Cs(t)}function Cre(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Rre(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n3(n.key),n)}}function Nre(t,e,r){return e&&Rre(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function $re(t,e,r){return e=ph(e),Ire(t,t3()?Reflect.construct(e,r||[],ph(t).constructor):e.apply(t,r))}function Ire(t,e){if(e&&(Cs(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Mre(t)}function Mre(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function t3(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(t3=function(){return!!t})()}function ph(t){return ph=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ph(t)}function Lre(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gw(t,e)}function Gw(t,e){return Gw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Gw(t,e)}function r3(t,e,r){return e=n3(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function n3(t){var e=Dre(t,"string");return Cs(e)=="symbol"?e:e+""}function Dre(t,e){if(Cs(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Cs(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function Xw(){return Xw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Xw.apply(this,arguments)}var Bre=function(e){var r=e.yAxisId,n=LI(),i=DI(),a=MI(r);return a==null?null:R.createElement(up,Xw({},a,{className:De("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:i},ticksGenerator:function(u){return Ka(u,!0)}}))},fp=(function(t){function e(){return Cre(this,e),$re(this,e,arguments)}return Lre(e,t),Nre(e,[{key:"render",value:function(){return R.createElement(Bre,this.props)}}])})(R.Component);r3(fp,"displayName","YAxis");r3(fp,"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 sC(t){return Fre(t)||Ure(t)||qre(t)||zre()}function zre(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
486
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qre(t,e){if(t){if(typeof t=="string")return Yw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Yw(t,e)}}function Ure(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Fre(t){if(Array.isArray(t))return Yw(t)}function Yw(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Jw=function(e,r,n,i,a){var s=rn(e,O1),u=rn(e,op),c=[].concat(sC(s),sC(u)),f=rn(e,lp),p="".concat(i,"Id"),h=i[0],g=r;if(c.length&&(g=c.reduce(function(x,y){if(y.props[p]===n&&Un(y.props,"extendDomain")&&fe(y.props[h])){var k=y.props[h];return[Math.min(x[0],k),Math.max(x[1],k)]}return x},g)),f.length){var v="".concat(h,"1"),b="".concat(h,"2");g=f.reduce(function(x,y){if(y.props[p]===n&&Un(y.props,"extendDomain")&&fe(y.props[v])&&fe(y.props[b])){var k=y.props[v],O=y.props[b];return[Math.min(x[0],k,O),Math.max(x[1],k,O)]}return x},g)}return a&&a.length&&(g=a.reduce(function(x,y){return fe(y)?[Math.min(x[0],y),Math.max(x[1],y)]:x},g)),g},ub={exports:{}},lC;function Hre(){return lC||(lC=1,(function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(c,f,p){this.fn=c,this.context=f,this.once=p||!1}function a(c,f,p,h,g){if(typeof p!="function")throw new TypeError("The listener must be a function");var v=new i(p,h||c,g),b=r?r+f:f;return c._events[b]?c._events[b].fn?c._events[b]=[c._events[b],v]:c._events[b].push(v):(c._events[b]=v,c._eventsCount++),c}function s(c,f){--c._eventsCount===0?c._events=new n:delete c._events[f]}function u(){this._events=new n,this._eventsCount=0}u.prototype.eventNames=function(){var f=[],p,h;if(this._eventsCount===0)return f;for(h in p=this._events)e.call(p,h)&&f.push(r?h.slice(1):h);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(p)):f},u.prototype.listeners=function(f){var p=r?r+f:f,h=this._events[p];if(!h)return[];if(h.fn)return[h.fn];for(var g=0,v=h.length,b=new Array(v);g<v;g++)b[g]=h[g].fn;return b},u.prototype.listenerCount=function(f){var p=r?r+f:f,h=this._events[p];return h?h.fn?1:h.length:0},u.prototype.emit=function(f,p,h,g,v,b){var x=r?r+f:f;if(!this._events[x])return!1;var y=this._events[x],k=arguments.length,O,A;if(y.fn){switch(y.once&&this.removeListener(f,y.fn,void 0,!0),k){case 1:return y.fn.call(y.context),!0;case 2:return y.fn.call(y.context,p),!0;case 3:return y.fn.call(y.context,p,h),!0;case 4:return y.fn.call(y.context,p,h,g),!0;case 5:return y.fn.call(y.context,p,h,g,v),!0;case 6:return y.fn.call(y.context,p,h,g,v,b),!0}for(A=1,O=new Array(k-1);A<k;A++)O[A-1]=arguments[A];y.fn.apply(y.context,O)}else{var T=y.length,E;for(A=0;A<T;A++)switch(y[A].once&&this.removeListener(f,y[A].fn,void 0,!0),k){case 1:y[A].fn.call(y[A].context);break;case 2:y[A].fn.call(y[A].context,p);break;case 3:y[A].fn.call(y[A].context,p,h);break;case 4:y[A].fn.call(y[A].context,p,h,g);break;default:if(!O)for(E=1,O=new Array(k-1);E<k;E++)O[E-1]=arguments[E];y[A].fn.apply(y[A].context,O)}}return!0},u.prototype.on=function(f,p,h){return a(this,f,p,h,!1)},u.prototype.once=function(f,p,h){return a(this,f,p,h,!0)},u.prototype.removeListener=function(f,p,h,g){var v=r?r+f:f;if(!this._events[v])return this;if(!p)return s(this,v),this;var b=this._events[v];if(b.fn)b.fn===p&&(!g||b.once)&&(!h||b.context===h)&&s(this,v);else{for(var x=0,y=[],k=b.length;x<k;x++)(b[x].fn!==p||g&&!b[x].once||h&&b[x].context!==h)&&y.push(b[x]);y.length?this._events[v]=y.length===1?y[0]:y:s(this,v)}return this},u.prototype.removeAllListeners=function(f){var p;return f?(p=r?r+f:f,this._events[p]&&s(this,p)):(this._events=new n,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=r,u.EventEmitter=u,t.exports=u})(ub)),ub.exports}var Wre=Hre();const Kre=Qe(Wre);var cb=new Kre,fb="recharts.syncMouseEvents";function Ju(t){"@babel/helpers - typeof";return Ju=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},Ju(t)}function Vre(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Gre(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i3(n.key),n)}}function Xre(t,e,r){return e&&Gre(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function db(t,e,r){return e=i3(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i3(t){var e=Yre(t,"string");return Ju(e)=="symbol"?e:e+""}function Yre(t,e){if(Ju(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Ju(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Jre=(function(){function t(){Vre(this,t),db(this,"activeIndex",0),db(this,"coordinateList",[]),db(this,"layout","horizontal")}return Xre(t,[{key:"setDetails",value:function(r){var n,i=r.coordinateList,a=i===void 0?null:i,s=r.container,u=s===void 0?null:s,c=r.layout,f=c===void 0?null:c,p=r.offset,h=p===void 0?null:p,g=r.mouseHandlerCallback,v=g===void 0?null:g;this.coordinateList=(n=a??this.coordinateList)!==null&&n!==void 0?n:[],this.container=u??this.container,this.layout=f??this.layout,this.offset=h??this.offset,this.mouseHandlerCallback=v??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(r){if(this.coordinateList.length!==0)switch(r.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}}}},{key:"setIndex",value:function(r){this.activeIndex=r}},{key:"spoofMouse",value:function(){var r,n;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var i=this.container.getBoundingClientRect(),a=i.x,s=i.y,u=i.height,c=this.coordinateList[this.activeIndex].coordinate,f=((r=window)===null||r===void 0?void 0:r.scrollX)||0,p=((n=window)===null||n===void 0?void 0:n.scrollY)||0,h=a+c+f,g=s+this.offset.top+u/2+p;this.mouseHandlerCallback({pageX:h,pageY:g})}}}])})();function Qre(t,e,r){if(r==="number"&&e===!0&&Array.isArray(t)){var n=t==null?void 0:t[0],i=t==null?void 0:t[1];if(n&&i&&fe(n)&&fe(i))return!0}return!1}function Zre(t,e,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:t==="horizontal"?e.x-i:r.left+.5,y:t==="horizontal"?r.top+.5:e.y-i,width:t==="horizontal"?n:r.width-1,height:t==="horizontal"?r.height-1:n}}function a3(t){var e=t.cx,r=t.cy,n=t.radius,i=t.startAngle,a=t.endAngle,s=st(e,r,n,i),u=st(e,r,n,a);return{points:[s,u],cx:e,cy:r,radius:n,startAngle:i,endAngle:a}}function ene(t,e,r){var n,i,a,s;if(t==="horizontal")n=e.x,a=n,i=r.top,s=r.top+r.height;else if(t==="vertical")i=e.y,s=i,n=r.left,a=r.left+r.width;else if(e.cx!=null&&e.cy!=null)if(t==="centric"){var u=e.cx,c=e.cy,f=e.innerRadius,p=e.outerRadius,h=e.angle,g=st(u,c,f,h),v=st(u,c,p,h);n=g.x,i=g.y,a=v.x,s=v.y}else return a3(e);return[{x:n,y:i},{x:a,y:s}]}function Qu(t){"@babel/helpers - typeof";return Qu=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},Qu(t)}function uC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Wf(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?uC(Object(r),!0).forEach(function(n){tne(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):uC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function tne(t,e,r){return e=rne(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function rne(t){var e=nne(t,"string");return Qu(e)=="symbol"?e:e+""}function nne(t,e){if(Qu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Qu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ine(t){var e,r,n=t.element,i=t.tooltipEventType,a=t.isActive,s=t.activeCoordinate,u=t.activePayload,c=t.offset,f=t.activeTooltipIndex,p=t.tooltipAxisBandSize,h=t.layout,g=t.chartName,v=(e=n.props.cursor)!==null&&e!==void 0?e:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!v||!a||!s||g!=="ScatterChart"&&i!=="axis")return null;var b,x=os;if(g==="ScatterChart")b=s,x=HQ;else if(g==="BarChart")b=Zre(h,s,c,p),x=S1;else if(h==="radial"){var y=a3(s),k=y.cx,O=y.cy,A=y.radius,T=y.startAngle,E=y.endAngle;b={cx:k,cy:O,startAngle:T,endAngle:E,innerRadius:A,outerRadius:A},x=iI}else b={points:ene(h,s,c)},x=os;var P=Wf(Wf(Wf(Wf({stroke:"#ccc",pointerEvents:"none"},c),b),Oe(v,!1)),{},{payload:u,payloadIndex:f,className:De("recharts-tooltip-cursor",v.className)});return R.isValidElement(v)?R.cloneElement(v,P):R.createElement(x,P)}var ane=["item"],one=["children","className","width","height","style","compact","title","desc"];function Rs(t){"@babel/helpers - typeof";return Rs=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},Rs(t)}function Zo(){return Zo=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Zo.apply(this,arguments)}function cC(t,e){return une(t)||lne(t,e)||s3(t,e)||sne()}function sne(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
487
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lne(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function une(t){if(Array.isArray(t))return t}function fC(t,e){if(t==null)return{};var r=cne(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function cne(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function fne(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dne(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,l3(n.key),n)}}function hne(t,e,r){return e&&dne(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function pne(t,e,r){return e=mh(e),mne(t,o3()?Reflect.construct(e,r||[],mh(t).constructor):e.apply(t,r))}function mne(t,e){if(e&&(Rs(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return gne(t)}function gne(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function o3(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(o3=function(){return!!t})()}function mh(t){return mh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},mh(t)}function vne(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Qw(t,e)}function Qw(t,e){return Qw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Qw(t,e)}function Ns(t){return wne(t)||bne(t)||s3(t)||yne()}function yne(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
488
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s3(t,e){if(t){if(typeof t=="string")return Zw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Zw(t,e)}}function bne(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function wne(t){if(Array.isArray(t))return Zw(t)}function Zw(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function dC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function re(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?dC(Object(r),!0).forEach(function(n){Te(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):dC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Te(t,e,r){return e=l3(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function l3(t){var e=xne(t,"string");return Rs(e)=="symbol"?e:e+""}function xne(t,e){if(Rs(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Rs(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var _ne={xAxis:["bottom","top"],yAxis:["left","right"]},Sne={width:"100%",height:"100%"},u3={x:0,y:0};function Kf(t){return t}var kne=function(e,r){return r==="horizontal"?e.x:r==="vertical"?e.y:r==="centric"?e.angle:e.radius},Ene=function(e,r,n,i){var a=r.find(function(p){return p&&p.index===n});if(a){if(e==="horizontal")return{x:a.coordinate,y:i.y};if(e==="vertical")return{x:i.x,y:a.coordinate};if(e==="centric"){var s=a.coordinate,u=i.radius;return re(re(re({},i),st(i.cx,i.cy,u,s)),{},{angle:s,radius:u})}var c=a.coordinate,f=i.angle;return re(re(re({},i),st(i.cx,i.cy,c,f)),{},{angle:f,radius:c})}return u3},dp=function(e,r){var n=r.graphicalItems,i=r.dataStartIndex,a=r.dataEndIndex,s=(n??[]).reduce(function(u,c){var f=c.props.data;return f&&f.length?[].concat(Ns(u),Ns(f)):u},[]);return s.length>0?s:e&&e.length&&fe(i)&&fe(a)?e.slice(i,a+1):[]};function c3(t){return t==="number"?[0,"auto"]:void 0}var ex=function(e,r,n,i){var a=e.graphicalItems,s=e.tooltipAxis,u=dp(r,e);return n<0||!a||!a.length||n>=u.length?null:a.reduce(function(c,f){var p,h=(p=f.props.data)!==null&&p!==void 0?p:r;h&&e.dataStartIndex+e.dataEndIndex!==0&&e.dataEndIndex-e.dataStartIndex>=n&&(h=h.slice(e.dataStartIndex,e.dataEndIndex+1));var g;if(s.dataKey&&!s.allowDuplicatedCategory){var v=h===void 0?u:h;g=vd(v,s.dataKey,i)}else g=h&&h[n]||u[n];return g?[].concat(Ns(c),[Q$(f,g)]):c},[])},hC=function(e,r,n,i){var a=i||{x:e.chartX,y:e.chartY},s=kne(a,n),u=e.orderedTooltipTicks,c=e.tooltipAxis,f=e.tooltipTicks,p=fX(s,u,f,c);if(p>=0&&f){var h=f[p]&&f[p].value,g=ex(e,r,p,h),v=Ene(n,u,p,a);return{activeTooltipIndex:p,activeLabel:h,activePayload:g,activeCoordinate:v}}return null},One=function(e,r){var n=r.axes,i=r.graphicalItems,a=r.axisType,s=r.axisIdKey,u=r.stackGroups,c=r.dataStartIndex,f=r.dataEndIndex,p=e.layout,h=e.children,g=e.stackOffset,v=V$(p,a);return n.reduce(function(b,x){var y,k=x.type.defaultProps!==void 0?re(re({},x.type.defaultProps),x.props):x.props,O=k.type,A=k.dataKey,T=k.allowDataOverflow,E=k.allowDuplicatedCategory,P=k.scale,C=k.ticks,N=k.includeHidden,L=k[s];if(b[L])return b;var V=dp(e.data,{graphicalItems:i.filter(function(B){var J,ae=s in B.props?B.props[s]:(J=B.type.defaultProps)===null||J===void 0?void 0:J[s];return ae===L}),dataStartIndex:c,dataEndIndex:f}),$=V.length,I,q,U;Qre(k.domain,T,O)&&(I=mw(k.domain,null,T),v&&(O==="number"||P!=="auto")&&(U=su(V,A,"category")));var K=c3(O);if(!I||I.length===0){var G,Z=(G=k.domain)!==null&&G!==void 0?G:K;if(A){if(I=su(V,A,O),O==="category"&&v){var X=i9(I);E&&X?(q=I,I=rh(0,$)):E||(I=yT(Z,I,x).reduce(function(B,J){return B.indexOf(J)>=0?B:[].concat(Ns(B),[J])},[]))}else if(O==="category")E?I=I.filter(function(B){return B!==""&&!Le(B)}):I=yT(Z,I,x).reduce(function(B,J){return B.indexOf(J)>=0||J===""||Le(J)?B:[].concat(Ns(B),[J])},[]);else if(O==="number"){var te=gX(V,i.filter(function(B){var J,ae,se=s in B.props?B.props[s]:(J=B.type.defaultProps)===null||J===void 0?void 0:J[s],de="hide"in B.props?B.props.hide:(ae=B.type.defaultProps)===null||ae===void 0?void 0:ae.hide;return se===L&&(N||!de)}),A,a,p);te&&(I=te)}v&&(O==="number"||P!=="auto")&&(U=su(V,A,"category"))}else v?I=rh(0,$):u&&u[L]&&u[L].hasStack&&O==="number"?I=g==="expand"?[0,1]:J$(u[L].stackGroups,c,f):I=K$(V,i.filter(function(B){var J=s in B.props?B.props[s]:B.type.defaultProps[s],ae="hide"in B.props?B.props.hide:B.type.defaultProps.hide;return J===L&&(N||!ae)}),O,p,!0);if(O==="number")I=Jw(h,I,L,a,C),Z&&(I=mw(Z,I,T));else if(O==="category"&&Z){var H=Z,z=I.every(function(B){return H.indexOf(B)>=0});z&&(I=H)}}return re(re({},b),{},Te({},L,re(re({},k),{},{axisType:a,domain:I,categoricalDomain:U,duplicateDomain:q,originalDomain:(y=k.domain)!==null&&y!==void 0?y:K,isCategorical:v,layout:p})))},{})},Ane=function(e,r){var n=r.graphicalItems,i=r.Axis,a=r.axisType,s=r.axisIdKey,u=r.stackGroups,c=r.dataStartIndex,f=r.dataEndIndex,p=e.layout,h=e.children,g=dp(e.data,{graphicalItems:n,dataStartIndex:c,dataEndIndex:f}),v=g.length,b=V$(p,a),x=-1;return n.reduce(function(y,k){var O=k.type.defaultProps!==void 0?re(re({},k.type.defaultProps),k.props):k.props,A=O[s],T=c3("number");if(!y[A]){x++;var E;return b?E=rh(0,v):u&&u[A]&&u[A].hasStack?(E=J$(u[A].stackGroups,c,f),E=Jw(h,E,A,a)):(E=mw(T,K$(g,n.filter(function(P){var C,N,L=s in P.props?P.props[s]:(C=P.type.defaultProps)===null||C===void 0?void 0:C[s],V="hide"in P.props?P.props.hide:(N=P.type.defaultProps)===null||N===void 0?void 0:N.hide;return L===A&&!V}),"number",p),i.defaultProps.allowDataOverflow),E=Jw(h,E,A,a)),re(re({},y),{},Te({},A,re(re({axisType:a},i.defaultProps),{},{hide:!0,orientation:Lr(_ne,"".concat(a,".").concat(x%2),null),domain:E,originalDomain:T,isCategorical:b,layout:p})))}return y},{})},Pne=function(e,r){var n=r.axisType,i=n===void 0?"xAxis":n,a=r.AxisComp,s=r.graphicalItems,u=r.stackGroups,c=r.dataStartIndex,f=r.dataEndIndex,p=e.children,h="".concat(i,"Id"),g=rn(p,a),v={};return g&&g.length?v=One(e,{axes:g,graphicalItems:s,axisType:i,axisIdKey:h,stackGroups:u,dataStartIndex:c,dataEndIndex:f}):s&&s.length&&(v=Ane(e,{Axis:a,graphicalItems:s,axisType:i,axisIdKey:h,stackGroups:u,dataStartIndex:c,dataEndIndex:f})),v},Tne=function(e){var r=Vo(e),n=Ka(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Yx(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:Fd(r,n)}},pC=function(e){var r=e.children,n=e.defaultShowTooltip,i=$r(r,Ss),a=0,s=0;return e.data&&e.data.length!==0&&(s=e.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(s=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:s,activeTooltipIndex:-1,isTooltipActive:!!n}},jne=function(e){return!e||!e.length?!1:e.some(function(r){var n=di(r&&r.type);return n&&n.indexOf("Bar")>=0})},mC=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"}},Cne=function(e,r){var n=e.props,i=e.graphicalItems,a=e.xAxisMap,s=a===void 0?{}:a,u=e.yAxisMap,c=u===void 0?{}:u,f=n.width,p=n.height,h=n.children,g=n.margin||{},v=$r(h,Ss),b=$r(h,ns),x=Object.keys(c).reduce(function(E,P){var C=c[P],N=C.orientation;return!C.mirror&&!C.hide?re(re({},E),{},Te({},N,E[N]+C.width)):E},{left:g.left||0,right:g.right||0}),y=Object.keys(s).reduce(function(E,P){var C=s[P],N=C.orientation;return!C.mirror&&!C.hide?re(re({},E),{},Te({},N,Lr(E,"".concat(N))+C.height)):E},{top:g.top||0,bottom:g.bottom||0}),k=re(re({},y),x),O=k.bottom;v&&(k.bottom+=v.props.height||Ss.defaultProps.height),b&&r&&(k=pX(k,i,n,r));var A=f-k.left-k.right,T=p-k.top-k.bottom;return re(re({brushBottom:O},k),{},{width:Math.max(A,0),height:Math.max(T,0)})},Rne=function(e,r){if(r==="xAxis")return e[r].width;if(r==="yAxis")return e[r].height},f3=function(e){var r=e.chartName,n=e.GraphicalChild,i=e.defaultTooltipEventType,a=i===void 0?"axis":i,s=e.validateTooltipEventTypes,u=s===void 0?["axis"]:s,c=e.axisComponents,f=e.legendContent,p=e.formatAxisMap,h=e.defaultProps,g=function(k,O){var A=O.graphicalItems,T=O.stackGroups,E=O.offset,P=O.updateId,C=O.dataStartIndex,N=O.dataEndIndex,L=k.barSize,V=k.layout,$=k.barGap,I=k.barCategoryGap,q=k.maxBarSize,U=mC(V),K=U.numericAxisName,G=U.cateAxisName,Z=jne(A),X=[];return A.forEach(function(te,H){var z=dp(k.data,{graphicalItems:[te],dataStartIndex:C,dataEndIndex:N}),B=te.type.defaultProps!==void 0?re(re({},te.type.defaultProps),te.props):te.props,J=B.dataKey,ae=B.maxBarSize,se=B["".concat(K,"Id")],de=B["".concat(G,"Id")],Ne={},pe=c.reduce(function(rr,ut){var Ar=O["".concat(ut.axisType,"Map")],ha=B["".concat(ut.axisType,"Id")];Ar&&Ar[ha]||ut.axisType==="zAxis"||ro();var pa=Ar[ha];return re(re({},rr),{},Te(Te({},ut.axisType,pa),"".concat(ut.axisType,"Ticks"),Ka(pa)))},Ne),ne=pe[G],_e=pe["".concat(G,"Ticks")],Ee=T&&T[se]&&T[se].hasStack&&EX(te,T[se].stackGroups),ie=di(te.type).indexOf("Bar")>=0,He=Fd(ne,_e),$e=[],ht=Z&&dX({barSize:L,stackGroups:T,totalSize:Rne(pe,G)});if(ie){var lt,pt,mr=Le(ae)?q:ae,Ot=(lt=(pt=Fd(ne,_e,!0))!==null&&pt!==void 0?pt:mr)!==null&<!==void 0?lt:0;$e=hX({barGap:$,barCategoryGap:I,bandSize:Ot!==He?Ot:He,sizeList:ht[de],maxBarSize:mr}),Ot!==He&&($e=$e.map(function(rr){return re(re({},rr),{},{position:re(re({},rr.position),{},{offset:rr.position.offset-Ot/2})})}))}var Br=te&&te.type&&te.type.getComposedData;Br&&X.push({props:re(re({},Br(re(re({},pe),{},{displayedData:z,props:k,dataKey:J,item:te,bandSize:He,barPosition:$e,offset:E,stackedData:Ee,layout:V,dataStartIndex:C,dataEndIndex:N}))),{},Te(Te(Te({key:te.key||"item-".concat(H)},K,pe[K]),G,pe[G]),"animationId",P)),childIndex:v9(te,k.children),item:te})}),X},v=function(k,O){var A=k.props,T=k.dataStartIndex,E=k.dataEndIndex,P=k.updateId;if(!CO({props:A}))return null;var C=A.children,N=A.layout,L=A.stackOffset,V=A.data,$=A.reverseStackOrder,I=mC(N),q=I.numericAxisName,U=I.cateAxisName,K=rn(C,n),G=SX(V,K,"".concat(q,"Id"),"".concat(U,"Id"),L,$),Z=c.reduce(function(B,J){var ae="".concat(J.axisType,"Map");return re(re({},B),{},Te({},ae,Pne(A,re(re({},J),{},{graphicalItems:K,stackGroups:J.axisType===q&&G,dataStartIndex:T,dataEndIndex:E}))))},{}),X=Cne(re(re({},Z),{},{props:A,graphicalItems:K}),O==null?void 0:O.legendBBox);Object.keys(Z).forEach(function(B){Z[B]=p(A,Z[B],X,B.replace("Map",""),r)});var te=Z["".concat(U,"Map")],H=Tne(te),z=g(A,re(re({},Z),{},{dataStartIndex:T,dataEndIndex:E,updateId:P,graphicalItems:K,stackGroups:G,offset:X}));return re(re({formattedGraphicalItems:z,graphicalItems:K,offset:X,stackGroups:G},H),Z)},b=(function(y){function k(O){var A,T,E;return fne(this,k),E=pne(this,k,[O]),Te(E,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Te(E,"accessibilityManager",new Jre),Te(E,"handleLegendBBoxUpdate",function(P){if(P){var C=E.state,N=C.dataStartIndex,L=C.dataEndIndex,V=C.updateId;E.setState(re({legendBBox:P},v({props:E.props,dataStartIndex:N,dataEndIndex:L,updateId:V},re(re({},E.state),{},{legendBBox:P}))))}}),Te(E,"handleReceiveSyncEvent",function(P,C,N){if(E.props.syncId===P){if(N===E.eventEmitterSymbol&&typeof E.props.syncMethod!="function")return;E.applySyncEvent(C)}}),Te(E,"handleBrushChange",function(P){var C=P.startIndex,N=P.endIndex;if(C!==E.state.dataStartIndex||N!==E.state.dataEndIndex){var L=E.state.updateId;E.setState(function(){return re({dataStartIndex:C,dataEndIndex:N},v({props:E.props,dataStartIndex:C,dataEndIndex:N,updateId:L},E.state))}),E.triggerSyncEvent({dataStartIndex:C,dataEndIndex:N})}}),Te(E,"handleMouseEnter",function(P){var C=E.getMouseInfo(P);if(C){var N=re(re({},C),{},{isTooltipActive:!0});E.setState(N),E.triggerSyncEvent(N);var L=E.props.onMouseEnter;Ie(L)&&L(N,P)}}),Te(E,"triggeredAfterMouseMove",function(P){var C=E.getMouseInfo(P),N=C?re(re({},C),{},{isTooltipActive:!0}):{isTooltipActive:!1};E.setState(N),E.triggerSyncEvent(N);var L=E.props.onMouseMove;Ie(L)&&L(N,P)}),Te(E,"handleItemMouseEnter",function(P){E.setState(function(){return{isTooltipActive:!0,activeItem:P,activePayload:P.tooltipPayload,activeCoordinate:P.tooltipPosition||{x:P.cx,y:P.cy}}})}),Te(E,"handleItemMouseLeave",function(){E.setState(function(){return{isTooltipActive:!1}})}),Te(E,"handleMouseMove",function(P){P.persist(),E.throttleTriggeredAfterMouseMove(P)}),Te(E,"handleMouseLeave",function(P){E.throttleTriggeredAfterMouseMove.cancel();var C={isTooltipActive:!1};E.setState(C),E.triggerSyncEvent(C);var N=E.props.onMouseLeave;Ie(N)&&N(C,P)}),Te(E,"handleOuterEvent",function(P){var C=g9(P),N=Lr(E.props,"".concat(C));if(C&&Ie(N)){var L,V;/.*touch.*/i.test(C)?V=E.getMouseInfo(P.changedTouches[0]):V=E.getMouseInfo(P),N((L=V)!==null&&L!==void 0?L:{},P)}}),Te(E,"handleClick",function(P){var C=E.getMouseInfo(P);if(C){var N=re(re({},C),{},{isTooltipActive:!0});E.setState(N),E.triggerSyncEvent(N);var L=E.props.onClick;Ie(L)&&L(N,P)}}),Te(E,"handleMouseDown",function(P){var C=E.props.onMouseDown;if(Ie(C)){var N=E.getMouseInfo(P);C(N,P)}}),Te(E,"handleMouseUp",function(P){var C=E.props.onMouseUp;if(Ie(C)){var N=E.getMouseInfo(P);C(N,P)}}),Te(E,"handleTouchMove",function(P){P.changedTouches!=null&&P.changedTouches.length>0&&E.throttleTriggeredAfterMouseMove(P.changedTouches[0])}),Te(E,"handleTouchStart",function(P){P.changedTouches!=null&&P.changedTouches.length>0&&E.handleMouseDown(P.changedTouches[0])}),Te(E,"handleTouchEnd",function(P){P.changedTouches!=null&&P.changedTouches.length>0&&E.handleMouseUp(P.changedTouches[0])}),Te(E,"handleDoubleClick",function(P){var C=E.props.onDoubleClick;if(Ie(C)){var N=E.getMouseInfo(P);C(N,P)}}),Te(E,"handleContextMenu",function(P){var C=E.props.onContextMenu;if(Ie(C)){var N=E.getMouseInfo(P);C(N,P)}}),Te(E,"triggerSyncEvent",function(P){E.props.syncId!==void 0&&cb.emit(fb,E.props.syncId,P,E.eventEmitterSymbol)}),Te(E,"applySyncEvent",function(P){var C=E.props,N=C.layout,L=C.syncMethod,V=E.state.updateId,$=P.dataStartIndex,I=P.dataEndIndex;if(P.dataStartIndex!==void 0||P.dataEndIndex!==void 0)E.setState(re({dataStartIndex:$,dataEndIndex:I},v({props:E.props,dataStartIndex:$,dataEndIndex:I,updateId:V},E.state)));else if(P.activeTooltipIndex!==void 0){var q=P.chartX,U=P.chartY,K=P.activeTooltipIndex,G=E.state,Z=G.offset,X=G.tooltipTicks;if(!Z)return;if(typeof L=="function")K=L(X,P);else if(L==="value"){K=-1;for(var te=0;te<X.length;te++)if(X[te].value===P.activeLabel){K=te;break}}var H=re(re({},Z),{},{x:Z.left,y:Z.top}),z=Math.min(q,H.x+H.width),B=Math.min(U,H.y+H.height),J=X[K]&&X[K].value,ae=ex(E.state,E.props.data,K),se=X[K]?{x:N==="horizontal"?X[K].coordinate:z,y:N==="horizontal"?B:X[K].coordinate}:u3;E.setState(re(re({},P),{},{activeLabel:J,activeCoordinate:se,activePayload:ae,activeTooltipIndex:K}))}else E.setState(P)}),Te(E,"renderCursor",function(P){var C,N=E.state,L=N.isTooltipActive,V=N.activeCoordinate,$=N.activePayload,I=N.offset,q=N.activeTooltipIndex,U=N.tooltipAxisBandSize,K=E.getTooltipEventType(),G=(C=P.props.active)!==null&&C!==void 0?C:L,Z=E.props.layout,X=P.key||"_recharts-cursor";return M.createElement(ine,{key:X,activeCoordinate:V,activePayload:$,activeTooltipIndex:q,chartName:r,element:P,isActive:G,layout:Z,offset:I,tooltipAxisBandSize:U,tooltipEventType:K})}),Te(E,"renderPolarAxis",function(P,C,N){var L=Lr(P,"type.axisType"),V=Lr(E.state,"".concat(L,"Map")),$=P.type.defaultProps,I=$!==void 0?re(re({},$),P.props):P.props,q=V&&V[I["".concat(L,"Id")]];return R.cloneElement(P,re(re({},q),{},{className:De(L,q.className),key:P.key||"".concat(C,"-").concat(N),ticks:Ka(q,!0)}))}),Te(E,"renderPolarGrid",function(P){var C=P.props,N=C.radialLines,L=C.polarAngles,V=C.polarRadius,$=E.state,I=$.radiusAxisMap,q=$.angleAxisMap,U=Vo(I),K=Vo(q),G=K.cx,Z=K.cy,X=K.innerRadius,te=K.outerRadius;return R.cloneElement(P,{polarAngles:Array.isArray(L)?L:Ka(K,!0).map(function(H){return H.coordinate}),polarRadius:Array.isArray(V)?V:Ka(U,!0).map(function(H){return H.coordinate}),cx:G,cy:Z,innerRadius:X,outerRadius:te,key:P.key||"polar-grid",radialLines:N})}),Te(E,"renderLegend",function(){var P=E.state.formattedGraphicalItems,C=E.props,N=C.children,L=C.width,V=C.height,$=E.props.margin||{},I=L-($.left||0)-($.right||0),q=H$({children:N,formattedGraphicalItems:P,legendWidth:I,legendContent:f});if(!q)return null;var U=q.item,K=fC(q,ane);return R.cloneElement(U,re(re({},K),{},{chartWidth:L,chartHeight:V,margin:$,onBBoxUpdate:E.handleLegendBBoxUpdate}))}),Te(E,"renderTooltip",function(){var P,C=E.props,N=C.children,L=C.accessibilityLayer,V=$r(N,yn);if(!V)return null;var $=E.state,I=$.isTooltipActive,q=$.activeCoordinate,U=$.activePayload,K=$.activeLabel,G=$.offset,Z=(P=V.props.active)!==null&&P!==void 0?P:I;return R.cloneElement(V,{viewBox:re(re({},G),{},{x:G.left,y:G.top}),active:Z,label:K,payload:Z?U:[],coordinate:q,accessibilityLayer:L})}),Te(E,"renderBrush",function(P){var C=E.props,N=C.margin,L=C.data,V=E.state,$=V.offset,I=V.dataStartIndex,q=V.dataEndIndex,U=V.updateId;return R.cloneElement(P,{key:P.key||"_recharts-brush",onChange:qf(E.handleBrushChange,P.props.onChange),data:L,x:fe(P.props.x)?P.props.x:$.left,y:fe(P.props.y)?P.props.y:$.top+$.height+$.brushBottom-(N.bottom||0),width:fe(P.props.width)?P.props.width:$.width,startIndex:I,endIndex:q,updateId:"brush-".concat(U)})}),Te(E,"renderReferenceElement",function(P,C,N){if(!P)return null;var L=E,V=L.clipPathId,$=E.state,I=$.xAxisMap,q=$.yAxisMap,U=$.offset,K=P.type.defaultProps||{},G=P.props,Z=G.xAxisId,X=Z===void 0?K.xAxisId:Z,te=G.yAxisId,H=te===void 0?K.yAxisId:te;return R.cloneElement(P,{key:P.key||"".concat(C,"-").concat(N),xAxis:I[X],yAxis:q[H],viewBox:{x:U.left,y:U.top,width:U.width,height:U.height},clipPathId:V})}),Te(E,"renderActivePoints",function(P){var C=P.item,N=P.activePoint,L=P.basePoint,V=P.childIndex,$=P.isRange,I=[],q=C.props.key,U=C.item.type.defaultProps!==void 0?re(re({},C.item.type.defaultProps),C.item.props):C.item.props,K=U.activeDot,G=U.dataKey,Z=re(re({index:V,dataKey:G,cx:N.x,cy:N.y,r:4,fill:_1(C.item),strokeWidth:2,stroke:"#fff",payload:N.payload,value:N.value},Oe(K,!1)),yd(K));return I.push(k.renderActiveDot(K,Z,"".concat(q,"-activePoint-").concat(V))),L?I.push(k.renderActiveDot(K,re(re({},Z),{},{cx:L.x,cy:L.y}),"".concat(q,"-basePoint-").concat(V))):$&&I.push(null),I}),Te(E,"renderGraphicChild",function(P,C,N){var L=E.filterFormatItem(P,C,N);if(!L)return null;var V=E.getTooltipEventType(),$=E.state,I=$.isTooltipActive,q=$.tooltipAxis,U=$.activeTooltipIndex,K=$.activeLabel,G=E.props.children,Z=$r(G,yn),X=L.props,te=X.points,H=X.isRange,z=X.baseLine,B=L.item.type.defaultProps!==void 0?re(re({},L.item.type.defaultProps),L.item.props):L.item.props,J=B.activeDot,ae=B.hide,se=B.activeBar,de=B.activeShape,Ne=!!(!ae&&I&&Z&&(J||se||de)),pe={};V!=="axis"&&Z&&Z.props.trigger==="click"?pe={onClick:qf(E.handleItemMouseEnter,P.props.onClick)}:V!=="axis"&&(pe={onMouseLeave:qf(E.handleItemMouseLeave,P.props.onMouseLeave),onMouseEnter:qf(E.handleItemMouseEnter,P.props.onMouseEnter)});var ne=R.cloneElement(P,re(re({},L.props),pe));function _e(ut){return typeof q.dataKey=="function"?q.dataKey(ut.payload):null}if(Ne)if(U>=0){var Ee,ie;if(q.dataKey&&!q.allowDuplicatedCategory){var He=typeof q.dataKey=="function"?_e:"payload.".concat(q.dataKey.toString());Ee=vd(te,He,K),ie=H&&z&&vd(z,He,K)}else Ee=te==null?void 0:te[U],ie=H&&z&&z[U];if(de||se){var $e=P.props.activeIndex!==void 0?P.props.activeIndex:U;return[R.cloneElement(P,re(re(re({},L.props),pe),{},{activeIndex:$e})),null,null]}if(!Le(Ee))return[ne].concat(Ns(E.renderActivePoints({item:L,activePoint:Ee,basePoint:ie,childIndex:U,isRange:H})))}else{var ht,lt=(ht=E.getItemByXY(E.state.activeCoordinate))!==null&&ht!==void 0?ht:{graphicalItem:ne},pt=lt.graphicalItem,mr=pt.item,Ot=mr===void 0?P:mr,Br=pt.childIndex,rr=re(re(re({},L.props),pe),{},{activeIndex:Br});return[R.cloneElement(Ot,rr),null,null]}return H?[ne,null,null]:[ne,null]}),Te(E,"renderCustomized",function(P,C,N){return R.cloneElement(P,re(re({key:"recharts-customized-".concat(N)},E.props),E.state))}),Te(E,"renderMap",{CartesianGrid:{handler:Kf,once:!0},ReferenceArea:{handler:E.renderReferenceElement},ReferenceLine:{handler:Kf},ReferenceDot:{handler:E.renderReferenceElement},XAxis:{handler:Kf},YAxis:{handler:Kf},Brush:{handler:E.renderBrush,once:!0},Bar:{handler:E.renderGraphicChild},Line:{handler:E.renderGraphicChild},Area:{handler:E.renderGraphicChild},Radar:{handler:E.renderGraphicChild},RadialBar:{handler:E.renderGraphicChild},Scatter:{handler:E.renderGraphicChild},Pie:{handler:E.renderGraphicChild},Funnel:{handler:E.renderGraphicChild},Tooltip:{handler:E.renderCursor,once:!0},PolarGrid:{handler:E.renderPolarGrid,once:!0},PolarAngleAxis:{handler:E.renderPolarAxis},PolarRadiusAxis:{handler:E.renderPolarAxis},Customized:{handler:E.renderCustomized}}),E.clipPathId="".concat((A=O.id)!==null&&A!==void 0?A:Fs("recharts"),"-clip"),E.throttleTriggeredAfterMouseMove=HN(E.triggeredAfterMouseMove,(T=O.throttleDelay)!==null&&T!==void 0?T:1e3/60),E.state={},E}return vne(k,y),hne(k,[{key:"componentDidMount",value:function(){var A,T;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(A=this.props.margin.left)!==null&&A!==void 0?A:0,top:(T=this.props.margin.top)!==null&&T!==void 0?T:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var A=this.props,T=A.children,E=A.data,P=A.height,C=A.layout,N=$r(T,yn);if(N){var L=N.props.defaultIndex;if(!(typeof L!="number"||L<0||L>this.state.tooltipTicks.length-1)){var V=this.state.tooltipTicks[L]&&this.state.tooltipTicks[L].value,$=ex(this.state,E,L,V),I=this.state.tooltipTicks[L].coordinate,q=(this.state.offset.top+P)/2,U=C==="horizontal",K=U?{x:I,y:q}:{y:I,x:q},G=this.state.formattedGraphicalItems.find(function(X){var te=X.item;return te.type.name==="Scatter"});G&&(K=re(re({},K),G.props.points[L].tooltipPosition),$=G.props.points[L].tooltipPayload);var Z={activeTooltipIndex:L,isTooltipActive:!0,activeLabel:V,activePayload:$,activeCoordinate:K};this.setState(Z),this.renderCursor(N),this.accessibilityManager.setIndex(L)}}}},{key:"getSnapshotBeforeUpdate",value:function(A,T){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==T.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==A.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==A.margin){var E,P;this.accessibilityManager.setDetails({offset:{left:(E=this.props.margin.left)!==null&&E!==void 0?E:0,top:(P=this.props.margin.top)!==null&&P!==void 0?P:0}})}return null}},{key:"componentDidUpdate",value:function(A){Lb([$r(A.children,yn)],[$r(this.props.children,yn)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var A=$r(this.props.children,yn);if(A&&typeof A.props.shared=="boolean"){var T=A.props.shared?"axis":"item";return u.indexOf(T)>=0?T:a}return a}},{key:"getMouseInfo",value:function(A){if(!this.container)return null;var T=this.container,E=T.getBoundingClientRect(),P=nW(E),C={chartX:Math.round(A.pageX-P.left),chartY:Math.round(A.pageY-P.top)},N=E.width/T.offsetWidth||1,L=this.inRange(C.chartX,C.chartY,N);if(!L)return null;var V=this.state,$=V.xAxisMap,I=V.yAxisMap,q=this.getTooltipEventType(),U=hC(this.state,this.props.data,this.props.layout,L);if(q!=="axis"&&$&&I){var K=Vo($).scale,G=Vo(I).scale,Z=K&&K.invert?K.invert(C.chartX):null,X=G&&G.invert?G.invert(C.chartY):null;return re(re({},C),{},{xValue:Z,yValue:X},U)}return U?re(re({},C),U):null}},{key:"inRange",value:function(A,T){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,P=this.props.layout,C=A/E,N=T/E;if(P==="horizontal"||P==="vertical"){var L=this.state.offset,V=C>=L.left&&C<=L.left+L.width&&N>=L.top&&N<=L.top+L.height;return V?{x:C,y:N}:null}var $=this.state,I=$.angleAxisMap,q=$.radiusAxisMap;if(I&&q){var U=Vo(I);return xT({x:C,y:N},U)}return null}},{key:"parseEventsOfWrapper",value:function(){var A=this.props.children,T=this.getTooltipEventType(),E=$r(A,yn),P={};E&&T==="axis"&&(E.props.trigger==="click"?P={onClick:this.handleClick}:P={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var C=yd(this.props,this.handleOuterEvent);return re(re({},C),P)}},{key:"addListener",value:function(){cb.on(fb,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){cb.removeListener(fb,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(A,T,E){for(var P=this.state.formattedGraphicalItems,C=0,N=P.length;C<N;C++){var L=P[C];if(L.item===A||L.props.key===A.key||T===di(L.item.type)&&E===L.childIndex)return L}return null}},{key:"renderClipPath",value:function(){var A=this.clipPathId,T=this.state.offset,E=T.left,P=T.top,C=T.height,N=T.width;return M.createElement("defs",null,M.createElement("clipPath",{id:A},M.createElement("rect",{x:E,y:P,height:C,width:N})))}},{key:"getXScales",value:function(){var A=this.state.xAxisMap;return A?Object.entries(A).reduce(function(T,E){var P=cC(E,2),C=P[0],N=P[1];return re(re({},T),{},Te({},C,N.scale))},{}):null}},{key:"getYScales",value:function(){var A=this.state.yAxisMap;return A?Object.entries(A).reduce(function(T,E){var P=cC(E,2),C=P[0],N=P[1];return re(re({},T),{},Te({},C,N.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(A){var T;return(T=this.state.xAxisMap)===null||T===void 0||(T=T[A])===null||T===void 0?void 0:T.scale}},{key:"getYScaleByAxisId",value:function(A){var T;return(T=this.state.yAxisMap)===null||T===void 0||(T=T[A])===null||T===void 0?void 0:T.scale}},{key:"getItemByXY",value:function(A){var T=this.state,E=T.formattedGraphicalItems,P=T.activeItem;if(E&&E.length)for(var C=0,N=E.length;C<N;C++){var L=E[C],V=L.props,$=L.item,I=$.type.defaultProps!==void 0?re(re({},$.type.defaultProps),$.props):$.props,q=di($.type);if(q==="Bar"){var U=(V.data||[]).find(function(X){return kQ(A,X)});if(U)return{graphicalItem:L,payload:U}}else if(q==="RadialBar"){var K=(V.data||[]).find(function(X){return xT(A,X)});if(K)return{graphicalItem:L,payload:K}}else if(rp(L,P)||np(L,P)||Ku(L,P)){var G=VZ({graphicalItem:L,activeTooltipItem:P,itemData:I.data}),Z=I.activeIndex===void 0?G:I.activeIndex;return{graphicalItem:re(re({},L),{},{childIndex:Z}),payload:Ku(L,P)?I.data[G]:L.props.data[G]}}}return null}},{key:"render",value:function(){var A=this;if(!CO(this))return null;var T=this.props,E=T.children,P=T.className,C=T.width,N=T.height,L=T.style,V=T.compact,$=T.title,I=T.desc,q=fC(T,one),U=Oe(q,!1);if(V)return M.createElement(Gj,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},M.createElement(Bb,Zo({},U,{width:C,height:N,title:$,desc:I}),this.renderClipPath(),NO(E,this.renderMap)));if(this.props.accessibilityLayer){var K,G;U.tabIndex=(K=this.props.tabIndex)!==null&&K!==void 0?K:0,U.role=(G=this.props.role)!==null&&G!==void 0?G:"application",U.onKeyDown=function(X){A.accessibilityManager.keyboardEvent(X)},U.onFocus=function(){A.accessibilityManager.focus()}}var Z=this.parseEventsOfWrapper();return M.createElement(Gj,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},M.createElement("div",Zo({className:De("recharts-wrapper",P),style:re({position:"relative",cursor:"default",width:C,height:N},L)},Z,{ref:function(te){A.container=te}}),M.createElement(Bb,Zo({},U,{width:C,height:N,title:$,desc:I,style:Sne}),this.renderClipPath(),NO(E,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(R.Component);Te(b,"displayName",r),Te(b,"defaultProps",re({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},h)),Te(b,"getDerivedStateFromProps",function(y,k){var O=y.dataKey,A=y.data,T=y.children,E=y.width,P=y.height,C=y.layout,N=y.stackOffset,L=y.margin,V=k.dataStartIndex,$=k.dataEndIndex;if(k.updateId===void 0){var I=pC(y);return re(re(re({},I),{},{updateId:0},v(re(re({props:y},I),{},{updateId:0}),k)),{},{prevDataKey:O,prevData:A,prevWidth:E,prevHeight:P,prevLayout:C,prevStackOffset:N,prevMargin:L,prevChildren:T})}if(O!==k.prevDataKey||A!==k.prevData||E!==k.prevWidth||P!==k.prevHeight||C!==k.prevLayout||N!==k.prevStackOffset||!rs(L,k.prevMargin)){var q=pC(y),U={chartX:k.chartX,chartY:k.chartY,isTooltipActive:k.isTooltipActive},K=re(re({},hC(k,A,C)),{},{updateId:k.updateId+1}),G=re(re(re({},q),U),K);return re(re(re({},G),v(re({props:y},G),k)),{},{prevDataKey:O,prevData:A,prevWidth:E,prevHeight:P,prevLayout:C,prevStackOffset:N,prevMargin:L,prevChildren:T})}if(!Lb(T,k.prevChildren)){var Z,X,te,H,z=$r(T,Ss),B=z&&(Z=(X=z.props)===null||X===void 0?void 0:X.startIndex)!==null&&Z!==void 0?Z:V,J=z&&(te=(H=z.props)===null||H===void 0?void 0:H.endIndex)!==null&&te!==void 0?te:$,ae=B!==V||J!==$,se=!Le(A),de=se&&!ae?k.updateId:k.updateId+1;return re(re({updateId:de},v(re(re({props:y},k),{},{updateId:de,dataStartIndex:B,dataEndIndex:J}),k)),{},{prevChildren:T,dataStartIndex:B,dataEndIndex:J})}return null}),Te(b,"renderActiveDot",function(y,k,O){var A;return R.isValidElement(y)?A=R.cloneElement(y,k):Ie(y)?A=y(k):A=M.createElement(Jh,k),M.createElement(Ue,{className:"recharts-active-dot",key:O},A)});var x=R.forwardRef(function(k,O){return M.createElement(b,Zo({},k,{ref:O}))});return x.displayName=b.displayName,x},Nne=f3({chartName:"PieChart",GraphicalChild:ki,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:tp},{axisType:"radiusAxis",AxisComp:Zh}],formatAxisMap:IX,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),$ne=f3({chartName:"AreaChart",GraphicalChild:da,axisComponents:[{axisType:"xAxis",AxisComp:cp},{axisType:"yAxis",AxisComp:fp}],formatAxisMap:Jee});const Vf=["#E43A9C","#D83333","#F041FF","#38bdf8","#a78bfa","#34d399","#f59e0b"];function Ine(){const[t,e]=R.useState(null),[r,n]=R.useState("7d");if(R.useEffect(()=>{const f=new Date;r==="7d"?f.setDate(f.getDate()-7):r==="30d"?f.setDate(f.getDate()-30):f.setDate(f.getDate()-1),Ye.get(`/usage?since=${f.toISOString()}`).then(e).catch(()=>{})},[r]),!t)return _.jsx("div",{className:"h-full flex items-center justify-center text-zinc-600",children:"Loading..."});const i=new Map;for(const f of t.records){const p=f.timestamp.slice(0,10),h=i.get(p)??{date:p,tokens:0,cost:0};h.tokens+=f.inputTokens+f.outputTokens,h.cost+=f.estimatedCostUsd??0,i.set(p,h)}const a=Array.from(i.values()).sort((f,p)=>f.date.localeCompare(p.date)),s=new Map;for(const f of t.records)s.set(f.model,(s.get(f.model)??0)+f.inputTokens+f.outputTokens);const u=Array.from(s.entries()).map(([f,p])=>({name:f,value:p})),c=t.totals.totalInputTokens+t.totals.totalOutputTokens;return _.jsxs("div",{className:"flex-1 overflow-y-auto p-6",children:[_.jsxs("div",{className:"flex items-center justify-between mb-6",children:[_.jsxs("div",{children:[_.jsx("h2",{className:"text-2xl tracking-wide text-zinc-100",style:{fontFamily:"'Bebas Neue', sans-serif"},children:"Usage"}),_.jsx("p",{className:"text-[11px] text-zinc-600 font-mono mt-0.5",children:"Token usage and cost tracking"})]}),_.jsx("div",{className:"flex gap-1 p-1 rounded-xl bg-white/[0.03] border border-white/[0.07]",children:["1d","7d","30d"].map(f=>_.jsx("button",{type:"button",onClick:()=>n(f),className:`px-3 py-1.5 rounded-lg text-[11px] font-mono transition-colors ${r===f?"bg-white/10 text-zinc-200":"text-zinc-600 hover:text-zinc-400"}`,children:f},f))})]}),_.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-3 mb-6",children:[_.jsx(Gf,{icon:_.jsx(w5,{className:"w-4 h-4 text-[#E43A9C]"}),label:"Total Tokens",value:Xf(c)}),_.jsx(Gf,{icon:_.jsx(r5,{className:"w-4 h-4 text-emerald-400"}),label:"Est. Cost",value:`$${t.totals.totalCostUsd.toFixed(4)}`}),_.jsx(Gf,{icon:_.jsx(fx,{className:"w-4 h-4 text-sky-400"}),label:"API Calls",value:Xf(t.totals.callCount)}),_.jsx(Gf,{icon:_.jsx(id,{className:"w-4 h-4 text-amber-400"}),label:"Models Used",value:String(u.length)})]}),_.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[_.jsxs("div",{className:"lg:col-span-2 glass-card border border-white/[0.07] rounded-2xl p-5",children:[_.jsx("h3",{className:"text-sm font-mono text-zinc-400 mb-4",children:"Tokens Over Time"}),a.length>0?_.jsx(t2,{width:"100%",height:250,children:_.jsxs($ne,{data:a,children:[_.jsx("defs",{children:_.jsxs("linearGradient",{id:"colorTokens",x1:"0",y1:"0",x2:"0",y2:"1",children:[_.jsx("stop",{offset:"5%",stopColor:"#E43A9C",stopOpacity:.3}),_.jsx("stop",{offset:"95%",stopColor:"#E43A9C",stopOpacity:0})]})}),_.jsx(cp,{dataKey:"date",tick:{fontSize:10,fill:"#52525b",fontFamily:"JetBrains Mono, monospace"},axisLine:!1,tickLine:!1}),_.jsx(fp,{tick:{fontSize:10,fill:"#52525b",fontFamily:"JetBrains Mono, monospace"},axisLine:!1,tickLine:!1,tickFormatter:Xf}),_.jsx(yn,{contentStyle:{background:"#222",border:"1px solid rgba(255,255,255,0.07)",borderRadius:"12px",fontSize:"11px",fontFamily:"JetBrains Mono, monospace"},labelStyle:{color:"#71717a"}}),_.jsx(da,{type:"monotone",dataKey:"tokens",stroke:"#E43A9C",fill:"url(#colorTokens)",strokeWidth:2})]})}):_.jsx("div",{className:"h-[250px] flex items-center justify-center text-zinc-700 text-[11px] font-mono",children:"No data for this period"})]}),_.jsxs("div",{className:"glass-card border border-white/[0.07] rounded-2xl p-5",children:[_.jsx("h3",{className:"text-sm font-mono text-zinc-400 mb-4",children:"By Model"}),u.length>0?_.jsxs(_.Fragment,{children:[_.jsx(t2,{width:"100%",height:180,children:_.jsxs(Nne,{children:[_.jsx(ki,{data:u,dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",outerRadius:70,strokeWidth:0,children:u.map((f,p)=>{var h;return _.jsx(Bh,{fill:Vf[p%Vf.length]},(h=u[p])==null?void 0:h.name)})}),_.jsx(yn,{contentStyle:{background:"#222",border:"1px solid rgba(255,255,255,0.07)",borderRadius:"12px",fontSize:"11px",fontFamily:"JetBrains Mono, monospace"}})]})}),_.jsx("div",{className:"space-y-1.5 mt-3",children:u.map((f,p)=>_.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-mono",children:[_.jsx("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{background:Vf[p%Vf.length]}}),_.jsx("span",{className:"text-zinc-500 truncate",children:f.name}),_.jsx("span",{className:"ml-auto text-zinc-400",children:Xf(f.value)})]},f.name))})]}):_.jsx("div",{className:"h-[180px] flex items-center justify-center text-zinc-700 text-[11px] font-mono",children:"No data"})]})]})]})}function Gf({icon:t,label:e,value:r}){return _.jsxs("div",{className:"glass-card border border-white/[0.07] rounded-2xl p-4",children:[_.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[t,_.jsx("p",{className:"text-[11px] text-zinc-600 font-mono",children:e})]}),_.jsx("p",{className:"text-xl font-mono text-zinc-100",children:r})]})}function Xf(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t.toString()}const Gl="shared";function d3(t){return[...t].sort((e,r)=>e.isDir!==r.isDir?e.isDir?-1:1:e.name.localeCompare(r.name)).map(e=>({...e,children:d3(e.children)}))}function Mne(t){const e=[];for(const r of t){const n=r.path.split("/").filter(Boolean);let i=e,a="";for(const[s,u]of n.entries()){const c=s===n.length-1;a=a?`${a}/${u}`:u;let f=i.find(p=>p.path===a);f||(f={name:c&&r.name||u,path:a,isDir:!c,children:[]},i.push(f)),i=f.children}}return d3(e)}function h3(t,e){return e?t.flatMap(r=>{const n=r.name.toLowerCase().includes(e)||r.path.toLowerCase().includes(e);if(!r.isDir)return n?[r]:[];if(n)return[r];const i=h3(r.children,e);return i.length?[{...r,children:i}]:[]}):t}function tx(t){const e=new Set;for(const r of t)if(r.isDir){e.add(r.path);for(const n of tx(r.children))e.add(n)}return e}function Lne(t){const e=t.split("/").filter(Boolean),r=[];let n="";for(const i of e.slice(0,-1))n=n?`${n}/${i}`:i,r.push(n);return r}function p3({node:t,depth:e,selectedPage:r,expandedPaths:n,autoExpandedPaths:i,onToggle:a,onSelect:s}){const u=r===t.path,c=t.isDir&&(n.has(t.path)||i.has(t.path)),f=12+e*16;return t.isDir?_.jsxs("div",{children:[_.jsxs("button",{type:"button",onClick:()=>a(t.path),className:"flex w-full items-center gap-2 rounded-lg py-2 pr-3 text-left text-[11px] font-mono text-zinc-400 transition-colors hover:bg-white/[0.04] hover:text-zinc-200",style:{paddingLeft:f},children:[_.jsx(BC,{size:14,className:`shrink-0 transition-transform ${c?"rotate-90":""}`}),c?_.jsx(h5,{size:14,className:"shrink-0 text-zinc-500"}):_.jsx(m5,{size:14,className:"shrink-0 text-zinc-500"}),_.jsx("span",{className:"truncate",children:t.name})]}),c&&_.jsx("div",{children:t.children.map(p=>_.jsx(p3,{node:p,depth:e+1,selectedPage:r,expandedPaths:n,autoExpandedPaths:i,onToggle:a,onSelect:s},p.path))})]}):_.jsxs("button",{type:"button",onClick:()=>s(t.path),className:`flex w-full items-center gap-2 rounded-lg py-2 pr-3 text-left text-[11px] font-mono transition-colors ${u?"border-l-2 border-[#E43A9C] bg-[#E43A9C]/10 text-[#E43A9C]":"text-zinc-500 hover:bg-white/[0.04] hover:text-zinc-300"}`,style:{paddingLeft:f},children:[_.jsx(f5,{size:14,className:"shrink-0"}),_.jsx("span",{className:"truncate",children:t.name})]})}function Dne(){const[t,e]=R.useState([]),[r,n]=R.useState(null),[i,a]=R.useState(""),[s,u]=R.useState(!1),[c,f]=R.useState(""),[p,h]=R.useState(""),[g,v]=R.useState(""),[b,x]=R.useState(new Set);R.useEffect(()=>{P()},[]);const y=R.useMemo(()=>Mne(t),[t]),k=g.trim().toLowerCase(),O=R.useMemo(()=>h3(y,k),[y,k]),A=R.useMemo(()=>{const I=k?tx(O):new Set;if(r)for(const q of Lne(r))I.add(q);return I},[O,k,r]),T=r?(function I(q){for(const U of q){if(U.path===r)return U;const K=I(U.children);if(K)return K}return null})(O):null,E=(T==null?void 0:T.name)??(r?r.split("/").pop()??"":"");R.useEffect(()=>{const I=tx(y);x(q=>{const U=new Set([...q].filter(K=>I.has(K)));if(U.size===0)for(const K of y)K.isDir&&U.add(K.path);return U})},[y]);async function P(){try{const I=await Ye.get(`/wiki/${Gl}`);e(I.pages)}catch{e([])}}async function C(I){try{const q=await Ye.get(`/wiki/${Gl}/${I}`);a(q.content),f(q.content),n(I),u(!1)}catch{tt.error("Failed to load page")}}async function N(){if(r)try{await Ye.put(`/wiki/${Gl}/${r}`,{content:c}),a(c),u(!1),tt.success("Page saved")}catch{tt.error("Failed to save page")}}async function L(){if(r)try{await Ye.delete(`/wiki/${Gl}/${r}`),tt.success("Page deleted"),n(null),a(""),f(""),u(!1),P()}catch{tt.error("Failed to delete page")}}async function V(){let I=p.trim().replace(/^\/+|\/+$/g,"");if(I){I=I.replace(/\.md$/i,"");try{const q=I.split("/").slice(-1)[0]??I;await Ye.put(`/wiki/${Gl}/${I}`,{content:`# ${q}
|
|
489
|
-
|
|
490
|
-
`}),tt.success("Page created"),h(""),await P(),await C(I)}catch{tt.error("Failed to create page")}}}function $(I){x(q=>{const U=new Set(q);return U.has(I)?U.delete(I):U.add(I),U})}return _.jsxs("div",{className:"flex h-full",children:[_.jsxs("div",{className:"flex h-full w-64 flex-col border-r border-white/[0.07] bg-[#181818]",children:[_.jsx("div",{className:"border-b border-white/[0.07] p-3",children:_.jsxs("div",{className:"relative",children:[_.jsx(HC,{className:"absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-zinc-600"}),_.jsx("input",{type:"text",value:g,onChange:I=>v(I.target.value),placeholder:"Search pages...",className:"w-full rounded-lg border border-white/[0.07] bg-white/[0.04] py-2 pl-8 pr-3 text-[11px] font-mono text-zinc-300 outline-none placeholder:text-zinc-700 focus:border-[#E43A9C]/50"})]})}),_.jsx("div",{className:"flex-1 overflow-y-auto px-2 py-3",children:O.length>0?O.map(I=>_.jsx(p3,{node:I,depth:0,selectedPage:r,expandedPaths:b,autoExpandedPaths:A,onToggle:$,onSelect:C},I.path)):_.jsx("p",{className:"py-4 text-center font-mono text-[11px] text-zinc-700",children:"No pages found"})}),_.jsx("div",{className:"border-t border-white/[0.07] p-3",children:_.jsxs("div",{className:"space-y-2",children:[_.jsx("input",{type:"text",value:p,onChange:I=>h(I.target.value),onKeyDown:I=>{I.key==="Enter"&&V(),I.key==="Escape"&&h("")},placeholder:"folder/new-page",className:"w-full rounded-lg border border-white/[0.07] bg-white/[0.04] px-3 py-2 text-[11px] font-mono text-zinc-300 outline-none placeholder:text-zinc-700 focus:border-[#E43A9C]/50"}),_.jsxs(oa,{onClick:V,disabled:!p.trim(),className:"w-full justify-center px-3 py-2",children:[_.jsx(FC,{size:13})," Add Page"]})]})})]}),_.jsx("div",{className:"flex flex-1 flex-col overflow-hidden",children:r?_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:"flex h-14 shrink-0 items-center justify-between border-b border-white/[0.07] px-6",children:[_.jsxs("div",{className:"min-w-0",children:[_.jsx("h3",{className:"truncate font-mono text-sm text-zinc-100",children:E}),_.jsxs("p",{className:"truncate font-mono text-[11px] text-zinc-500",children:[r,".md"]})]}),_.jsxs("div",{className:"flex items-center gap-2",children:[s?_.jsxs(_.Fragment,{children:[_.jsxs(oa,{onClick:N,className:"px-3 py-1.5",children:[_.jsx(hx,{size:12})," Save"]}),_.jsx(fi,{onClick:()=>{u(!1),f(i)},className:"px-3 py-1.5",children:"Cancel"})]}):_.jsxs(fi,{onClick:()=>{u(!0),f(i)},className:"px-3 py-1.5",children:[_.jsx(gb,{size:12})," Edit"]}),_.jsxs(Ax,{onClick:L,className:"px-3 py-1.5",children:[_.jsx(px,{size:12})," Delete"]})]})]}),_.jsx("div",{className:"flex-1 overflow-y-auto bg-[#111111] p-6",children:s?_.jsx("textarea",{value:c,onChange:I=>f(I.target.value),className:"h-full min-h-[320px] w-full resize-none rounded-xl border border-white/[0.07] bg-[#181818] p-4 font-mono text-sm text-zinc-300 outline-none focus:border-[#E43A9C]/50"}):_.jsx("div",{className:"mx-auto max-w-4xl rounded-xl border border-white/[0.07] bg-[#181818] p-6",children:_.jsx("div",{className:"prose-io text-sm text-zinc-300",dangerouslySetInnerHTML:{__html:qe.parse(i)}})})})]}):_.jsx("div",{className:"flex h-full items-center justify-center",children:_.jsxs("div",{className:"text-center",children:[_.jsx(DC,{size:48,className:"mx-auto mb-3 text-zinc-800"}),_.jsx("p",{className:"font-mono text-[11px] text-zinc-700",children:"Select a page to view"})]})})})]})}function Bne({children:t}){const{session:e,supabase:r,loading:n}=Oh();return n?_.jsx("div",{className:"min-h-screen flex items-center justify-center text-[var(--color-muted-foreground)]",children:"Loading..."}):r?e?_.jsx(_.Fragment,{children:t}):_.jsx(Qq,{}):_.jsx(_.Fragment,{children:t})}function zne(){const{pathname:t}=On(),e=t==="/"||t==="/chat"||t.startsWith("/chat/");return _.jsxs(_.Fragment,{children:[_.jsx(wD,{children:_.jsxs(Qr,{element:_.jsx(Xq,{}),children:[_.jsx(Qr,{index:!0,element:_.jsx(Yq,{})}),_.jsx(Qr,{path:"squads",element:_.jsx(_E,{})}),_.jsx(Qr,{path:"squads/:name",element:_.jsx(_E,{})}),_.jsx(Qr,{path:"feed",element:_.jsx(Jq,{})}),_.jsx(Qr,{path:"skills",element:_.jsx(fU,{})}),_.jsx(Qr,{path:"schedules",element:_.jsx(tU,{})}),_.jsx(Qr,{path:"wiki",element:_.jsx(Dne,{})}),_.jsx(Qr,{path:"settings",element:_.jsx(aU,{})}),_.jsx(Qr,{path:"usage",element:_.jsx(Ine,{})}),_.jsx(Qr,{path:"*",element:_.jsx(vD,{to:"/",replace:!0})})]})}),!e&&_.jsx(J8,{})]})}function qne(){return _.jsx(Kq,{children:_.jsx(Bne,{children:_.jsx(zne,{})})})}vL.createRoot(document.getElementById("root")).render(_.jsx(R.StrictMode,{children:_.jsxs(HD,{children:[_.jsx(qne,{}),_.jsx(A4,{theme:"dark",position:"bottom-right"})]})}));
|
|
491
|
-
//# sourceMappingURL=index-D1hU_jFl.js.map
|