PageSourceSearch

https://enugujobs.netlify.app/assets/index-neNhxNNZ.js

js enugujobs.netlify.app collected 2026-10-03 10:42:14 UTC 932,662 bytes, 476 lines download raw bytes

vendor: 5,780 bytes, lines 1-9
1function tN(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(n,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.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 o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).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 pu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function be(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var gS={exports:{}},Jd={},vS={exports:{}},oe={};/**
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 Yl=Symbol.for("react.element"),rN=Symbol.for("react.portal"),nN=Symbol.for("react.fragment"),iN=Symbol.for("react.strict_mode"),aN=Symbol.for("react.profiler"),oN=Symbol.for("react.provider"),sN=Symbol.for("react.context"),lN=Symbol.for("react.forward_ref"),uN=Symbol.for("react.suspense"),cN=Symbol.for("react.memo"),dN=Symbol.for("react.lazy"),j0=Symbol.iterator;function fN(e){return e===null||typeof e!="object"?null:(e=j0&&e[j0]||e["@@iterator"],typeof e=="function"?e:null)}var yS={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},bS=Object.assign,xS={};function jo(e,t,r){this.props=e,this.context=t,this.refs=xS,this.updater=r||yS}jo.prototype.isReactComponent={};jo.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};jo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function wS(){}wS.prototype=jo.prototype;function iv(e,t,r){this.props=e,this.context=t,this.refs=xS,this.updater=r||yS}var av=iv.prototype=new wS;av.constructor=iv;bS(av,jo.prototype);av.isPureReactComponent=!0;var k0=Array.isArray,_S=Object.prototype.hasOwnProperty,ov={current:null},SS={key:!0,ref:!0,__self:!0,__source:!0};function jS(e,t,r){var n,i={},a=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(a=""+t.key),t)_S.call(t,n)&&!SS.hasOwnProperty(n)&&(i[n]=t[n]);var s=arguments.length-2;if(s===1)i.children=r;else if(1<s){for(var l=Array(s),u=0;u<s;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(n in s=e.defaultProps,s)i[n]===void 0&&(i[n]=s[n]);return{$$typeof:Yl,type:e,key:a,ref:o,props:i,_owner:ov.current}}function hN(e,t){return{$$typeof:Yl,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function sv(e){return typeof e=="object"&&e!==null&&e.$$typeof===Yl}function pN(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var O0=/\/+/g;function oh(e,t){return typeof e=="object"&&e!==null&&e.key!=null?pN(""+e.key):t.toString(36)}function rc(e,t,r,n,i){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(a){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Yl:case rN:o=!0}}if(o)return o=e,i=i(o),e=n===""?"."+oh(o,0):n,k0(i)?(r="",e!=null&&(r=e.replace(O0,"$&/")+"/"),rc(i,t,r,"",function(u){return u})):i!=null&&(sv(i)&&(i=hN(i,r+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(O0,"$&/")+"/")+e)),t.push(i)),1;if(o=0,n=n===""?".":n+":",k0(e))for(var s=0;s<e.length;s++){a=e[s];var l=n+oh(a,s);o+=rc(a,t,r,l,i)}else if(l=fN(e),typeof l=="function")for(e=l.call(e),s=0;!(a=e.next()).done;)a=a.value,l=n+oh(a,s++),o+=rc(a,t,r,l,i);else if(a==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function mu(e,t,r){if(e==null)return e;var n=[],i=0;return rc(e,n,"","",function(a){return t.call(r,a,i++)}),n}function mN(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var _t={current:null},nc={transition:null},gN={ReactCurrentDispatcher:_t,ReactCurrentBatchConfig:nc,ReactCurrentOwner:ov};function kS(){throw Error("act(...) is not supported in production builds of React.")}oe.Children={map:mu,forEach:function(e,t,r){mu(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return mu(e,function(){t++}),t},toArray:function(e){return mu(e,function(t){return t})||[]},only:function(e){if(!sv(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};oe.Component=jo;oe.Fragment=nN;oe.Profiler=aN;oe.PureComponent=iv;oe.StrictMode=iN;oe.Suspense=uN;
vendor: 5,068 bytes, lines 9-25
9oe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=gN;oe.act=kS;oe.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=bS({},e.props),i=e.key,a=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,o=ov.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)_S.call(t,l)&&!SS.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&s!==void 0?s[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){s=Array(l);for(var u=0;u<l;u++)s[u]=arguments[u+2];n.children=s}return{$$typeof:Yl,type:e.type,key:i,ref:a,props:n,_owner:o}};oe.createContext=function(e){return e={$$typeof:sN,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:oN,_context:e},e.Consumer=e};oe.createElement=jS;oe.createFactory=function(e){var t=jS.bind(null,e);return t.type=e,t};oe.createRef=function(){return{current:null}};oe.forwardRef=function(e){return{$$typeof:lN,render:e}};oe.isValidElement=sv;oe.lazy=function(e){return{$$typeof:dN,_payload:{_status:-1,_result:e},_init:mN}};oe.memo=function(e,t){return{$$typeof:cN,type:e,compare:t===void 0?null:t}};oe.startTransition=function(e){var t=nc.transition;nc.transition={};try{e()}finally{nc.transition=t}};oe.unstable_act=kS;oe.useCallback=function(e,t){return _t.current.useCallback(e,t)};oe.useContext=function(e){return _t.current.useContext(e)};oe.useDebugValue=function(){};oe.useDeferredValue=function(e){return _t.current.useDeferredValue(e)};oe.useEffect=function(e,t){return _t.current.useEffect(e,t)};oe.useId=function(){return _t.current.useId()};oe.useImperativeHandle=function(e,t,r){return _t.current.useImperativeHandle(e,t,r)};oe.useInsertionEffect=function(e,t){return _t.current.useInsertionEffect(e,t)};oe.useLayoutEffect=function(e,t){return _t.current.useLayoutEffect(e,t)};oe.useMemo=function(e,t){return _t.current.useMemo(e,t)};oe.useReducer=function(e,t,r){return _t.current.useReducer(e,t,r)};oe.useRef=function(e){return _t.current.useRef(e)};oe.useState=function(e){return _t.current.useState(e)};oe.useSyncExternalStore=function(e,t,r){return _t.current.useSyncExternalStore(e,t,r)};oe.useTransition=function(){return _t.current.useTransition()};oe.version="18.3.1";vS.exports=oe;var E=vS.exports;const T=be(E),vN=tN({__proto__:null,default:T},[E]);/**
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 yN=E,bN=Symbol.for("react.element"),xN=Symbol.for("react.fragment"),wN=Object.prototype.hasOwnProperty,_N=yN.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,SN={key:!0,ref:!0,__self:!0,__source:!0};function OS(e,t,r){var n,i={},a=null,o=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(o=t.ref);for(n in t)wN.call(t,n)&&!SN.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:bN,type:e,key:a,ref:o,props:i,_owner:_N.current}}Jd.Fragment=xN;Jd.jsx=OS;Jd.jsxs=OS;gS.exports=Jd;var c=gS.exports,yp={},ES={exports:{}},qt={},AS={exports:{}},PS={};/**
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 */(function(e){function t($,M){var U=$.length;$.push(M);e:for(;0<U;){var H=U-1>>>1,W=$[H];if(0<i(W,M))$[H]=M,$[U]=W,U=H;else break e}}function r($){return $.length===0?null:$[0]}function n($){if($.length===0)return null;var M=$[0],U=$.pop();if(U!==M){$[0]=U;e:for(var H=0,W=$.length,X=W>>>1;H<X;){var le=2*(H+1)-1,Ee=$[le],De=le+1,Vt=$[De];if(0>i(Ee,U))De<W&&0>i(Vt,Ee)?($[H]=Vt,$[De]=U,H=De):($[H]=Ee,$[le]=U,H=le);else if(De<W&&0>i(Vt,U))$[H]=Vt,$[De]=U,H=De;else break e}}return M}function i($,M){var U=$.sortIndex-M.sortIndex;return U!==0?U:$.id-M.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var l=[],u=[],f=1,d=null,h=3,p=!1,m=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x($){for(var M=r(u);M!==null;){if(M.callback===null)n(u);else if(M.startTime<=$)n(u),M.sortIndex=M.expirationTime,t(l,M);else break;M=r(u)}}function S($){if(v=!1,x($),!m)if(r(l)!==null)m=!0,R(_);else{var M=r(u);M!==null&&D(S,M.startTime-$)}}function _($,M){m=!1,v&&(v=!1,g(O),O=-1),p=!0;var U=h;try{for(x(M),d=r(l);d!==null&&(!(d.expirationTime>M)||$&&!C());){var H=d.callback;
vendor: 9,155 bytes, lines 25-34
25if(typeof H=="function"){d.callback=null,h=d.priorityLevel;var W=H(d.expirationTime<=M);M=e.unstable_now(),typeof W=="function"?d.callback=W:d===r(l)&&n(l),x(M)}else n(l);d=r(l)}if(d!==null)var X=!0;else{var le=r(u);le!==null&&D(S,le.startTime-M),X=!1}return X}finally{d=null,h=U,p=!1}}var w=!1,j=null,O=-1,k=5,A=-1;function C(){return!(e.unstable_now()-A<k)}function P(){if(j!==null){var $=e.unstable_now();A=$;var M=!0;try{M=j(!0,$)}finally{M?B():(w=!1,j=null)}}else w=!1}var B;if(typeof y=="function")B=function(){y(P)};else if(typeof MessageChannel<"u"){var N=new MessageChannel,I=N.port2;N.port1.onmessage=P,B=function(){I.postMessage(null)}}else B=function(){b(P,0)};function R($){j=$,w||(w=!0,B())}function D($,M){O=b(function(){$(e.unstable_now())},M)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function($){$.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,R(_))},e.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<$?Math.floor(1e3/$):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function($){switch(h){case 1:case 2:case 3:var M=3;break;default:M=h}var U=h;h=M;try{return $()}finally{h=U}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function($,M){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var U=h;h=$;try{return M()}finally{h=U}},e.unstable_scheduleCallback=function($,M,U){var H=e.unstable_now();switch(typeof U=="object"&&U!==null?(U=U.delay,U=typeof U=="number"&&0<U?H+U:H):U=H,$){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=U+W,$={id:f++,callback:M,priorityLevel:$,startTime:U,expirationTime:W,sortIndex:-1},U>H?($.sortIndex=U,t(u,$),r(l)===null&&$===r(u)&&(v?(g(O),O=-1):v=!0,D(S,U-H))):($.sortIndex=W,t(l,$),m||p||(m=!0,R(_))),$},e.unstable_shouldYield=C,e.unstable_wrapCallback=function($){var M=h;return function(){var U=h;h=M;try{return $.apply(this,arguments)}finally{h=U}}}})(PS);AS.exports=PS;var jN=AS.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 kN=E,Ht=jN;function z(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var NS=new Set,Us={};function Vi(e,t){Ha(e,t),Ha(e+"Capture",t)}function Ha(e,t){for(Us[e]=t,e=0;e<t.length;e++)NS.add(t[e])}var ln=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),bp=Object.prototype.hasOwnProperty,ON=/^[: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]*$/,E0={},A0={};function EN(e){return bp.call(A0,e)?!0:bp.call(E0,e)?!1:ON.test(e)?A0[e]=!0:(E0[e]=!0,!1)}function AN(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function PN(e,t,r,n){if(t===null||typeof t>"u"||AN(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function St(e,t,r,n,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var ct={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ct[e]=new St(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ct[t]=new St(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ct[e]=new St(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ct[e]=new St(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ct[e]=new St(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ct[e]=new St(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ct[e]=new St(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ct[e]=new St(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ct[e]=new St(e,5,!1,e.toLowerCase(),null,!1,!1)});var lv=/[\-:]([a-z])/g;function uv(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(lv,uv);ct[t]=new St(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(lv,uv);ct[t]=new St(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(lv,uv);ct[t]=new St(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ct[e]=new St(e,1,!1,e.toLowerCase(),null,!1,!1)});ct.xlinkHref=new St("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ct[e]=new St(e,1,!1,e.toLowerCase(),null,!0,!0)});function cv(e,t,r,n){var i=ct.hasOwnProperty(t)?ct[t]:null;(i!==null?i.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(PN(t,r,i,n)&&(r=null),n||i===null?EN(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):i.mustUseProperty?e[i.propertyName]=r===null?i.type===3?!1:"":r:(t=i.attributeName,n=i.attributeNamespace,r===null?e.removeAttribute(t):(i=i.type,r=i===3||i===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var vn=kN.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,gu=Symbol.for("react.element"),ya=Symbol.for("react.portal"),ba=Symbol.for("react.fragment"),dv=Symbol.for("react.strict_mode"),xp=Symbol.for("react.profiler"),TS=Symbol.for("react.provider"),CS=Symbol.for("react.context"),fv=Symbol.for("react.forward_ref"),wp=Symbol.for("react.suspense"),_p=Symbol.for("react.suspense_list"),hv=Symbol.for("react.memo"),On=Symbol.for("react.lazy"),$S=Symbol.for("react.offscreen"),P0=Symbol.iterator;function qo(e){return e===null||typeof e!="object"?null:(e=P0&&e[P0]||e["@@iterator"],typeof e=="function"?e:null)}var Ce=Object.assign,sh;function ps(e){if(sh===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);sh=t&&t[1]||""}return`
34`+sh+e}var lh=!1;function uh(e,t){if(!e||lh)return"";lh=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var n=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){n=u}e.call(t.prototype)}else{try{throw Error()}catch(u){n=u}e()}}
vendor: 14,090 bytes, lines 34-37
34catch(u){if(u&&n&&typeof u.stack=="string"){for(var i=u.stack.split(`
35`),a=n.stack.split(`
36`),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(o!==1||s!==1)do if(o--,s--,0>s||i[o]!==a[s]){var l=`
37`+i[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=s);break}}}finally{lh=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?ps(e):""}function NN(e){switch(e.tag){case 5:return ps(e.type);case 16:return ps("Lazy");case 13:return ps("Suspense");case 19:return ps("SuspenseList");case 0:case 2:case 15:return e=uh(e.type,!1),e;case 11:return e=uh(e.type.render,!1),e;case 1:return e=uh(e.type,!0),e;default:return""}}function Sp(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ba:return"Fragment";case ya:return"Portal";case xp:return"Profiler";case dv:return"StrictMode";case wp:return"Suspense";case _p:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case CS:return(e.displayName||"Context")+".Consumer";case TS:return(e._context.displayName||"Context")+".Provider";case fv:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case hv:return t=e.displayName||null,t!==null?t:Sp(e.type)||"Memo";case On:t=e._payload,e=e._init;try{return Sp(e(t))}catch{}}return null}function TN(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Sp(t);case 8:return t===dv?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Xn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function IS(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function CN(e){var t=IS(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,a.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function vu(e){e._valueTracker||(e._valueTracker=CN(e))}function RS(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=IS(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function mc(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function jp(e,t){var r=t.checked;return Ce({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function N0(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Xn(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function MS(e,t){t=t.checked,t!=null&&cv(e,"checked",t,!1)}function kp(e,t){MS(e,t);var r=Xn(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Op(e,t.type,r):t.hasOwnProperty("defaultValue")&&Op(e,t.type,Xn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function T0(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Op(e,t,r){(t!=="number"||mc(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var ms=Array.isArray;function Ia(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i<r.length;i++)t["$"+r[i]]=!0;for(r=0;r<e.length;r++)i=t.hasOwnProperty("$"+e[r].value),e[r].selected!==i&&(e[r].selected=i),i&&n&&(e[r].defaultSelected=!0)}else{for(r=""+Xn(r),t=null,i=0;i<e.length;i++){if(e[i].value===r){e[i].selected=!0,n&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Ep(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(z(91));return Ce({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function C0(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(z(92));if(ms(r)){if(1<r.length)throw Error(z(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Xn(r)}}function DS(e,t){var r=Xn(t.value),n=Xn(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function $0(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function LS(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ap(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?LS(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var yu,BS=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,i){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(yu=yu||document.createElement("div"),yu.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=yu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Fs(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var _s={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},$N=["Webkit","ms","Moz","O"];Object.keys(_s).forEach(function(e){$N.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),_s[t]=_s[e]})});function US(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||_s.hasOwnProperty(e)&&_s[e]?(""+t).trim():t+"px"}function FS(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=US(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var IN=Ce({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 Pp(e,t){if(t){if(IN[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(z(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(z(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(z(61))}if(t.style!=null&&typeof t.style!="object")throw Error(z(62))}}function Np(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Tp=null;function pv(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Cp=null,Ra=null,Ma=null;function I0(e){if(e=Zl(e)){if(typeof Cp!="function")throw Error(z(280));var t=e.stateNode;t&&(t=ef(t),Cp(e.stateNode,e.type,t))}}function zS(e){Ra?Ma?Ma.push(e):Ma=[e]:Ra=e}function WS(){if(Ra){var e=Ra,t=Ma;if(Ma=Ra=null,I0(e),t)for(e=0;e<t.length;e++)I0(t[e])}}function HS(e,t){return e(t)}function KS(){}var ch=!1;function qS(e,t,r){if(ch)return e(t,r);ch=!0;try{return HS(e,t,r)}finally{ch=!1,(Ra!==null||Ma!==null)&&(KS(),WS())}}function zs(e,t){var r=e.stateNode;if(r===null)return null;var n=ef(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(z(231,t,typeof r));return r}var $p=!1;if(ln)try{var Go={};Object.defineProperty(Go,"passive",{get:function(){$p=!0}}),window.addEventListener("test",Go,Go),window.removeEventListener("test",Go,Go)}catch{$p=!1}function RN(e,t,r,n,i,a,o,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(f){this.onError(f)}}var Ss=!1,gc=null,vc=!1,Ip=null,MN={onError:function(e){Ss=!0,gc=e}};function DN(e,t,r,n,i,a,o,s,l){Ss=!1,gc=null,RN.apply(MN,arguments)}function LN(e,t,r,n,i,a,o,s,l){if(DN.apply(this,arguments),Ss){if(Ss){var u=gc;Ss=!1,gc=null}else throw Error(z(198));vc||(vc=!0,Ip=u)}}function Ji(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function GS(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function R0(e){if(Ji(e)!==e)throw Error(z(188))}function BN(e){var t=e.alternate;if(!t){if(t=Ji(e),t===null)throw Error(z(188));return t!==e?null:e}for(var r=e,n=t;;){var i=r.return;if(i===null)break;var a=i.alternate;if(a===null){if(n=i.return,n!==null){r=n;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===r)return R0(i),e;if(a===n)return R0(i),t;a=a.sibling}throw Error(z(188))}if(r.return!==n.return)r=i,n=a;else{for(var o=!1,s=i.child;s;){if(s===r){o=!0,r=i,n=a;break}if(s===n){o=!0,n=i,r=a;break}s=s.sibling}if(!o){for(s=a.child;s;){if(s===r){o=!0,r=a,n=i;break}if(s===n){o=!0,n=a,r=i;break}s=s.sibling}if(!o)throw Error(z(189))}}if(r.alternate!==n)throw Error(z(190))}if(r.tag!==3)throw Error(z(188));return r.stateNode.current===r?e:t}function VS(e){return e=BN(e),e!==null?JS(e):null}function JS(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=JS(e);if(t!==null)return t;e=e.sibling}return null}var YS=Ht.unstable_scheduleCallback,M0=Ht.unstable_cancelCallback,UN=Ht.unstable_shouldYield,FN=Ht.unstable_requestPaint,Le=Ht.unstable_now,zN=Ht.unstable_getCurrentPriorityLevel,mv=Ht.unstable_ImmediatePriority,XS=Ht.unstable_UserBlockingPriority,yc=Ht.unstable_NormalPriority,WN=Ht.unstable_LowPriority,QS=Ht.unstable_IdlePriority,Yd=null,Mr=null;function HN(e){if(Mr&&typeof Mr.onCommitFiberRoot=="function")try{Mr.onCommitFiberRoot(Yd,e,void 0,(e.current.flags&128)===128)}catch{}}var jr=Math.clz32?Math.clz32:GN,KN=Math.log,qN=Math.LN2;function GN(e){return e>>>=0,e===0?32:31-(KN(e)/qN|0)|0}var bu=64,xu=4194304;function gs(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function bc(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,a=e.pingedLanes,o=r&268435455;if(o!==0){var s=o&~i;s!==0?n=gs(s):(a&=o,a!==0&&(n=gs(a)))}else o=r&~i,o!==0?n=gs(o):a!==0&&(n=gs(a));if(n===0)return 0;if(t!==0&&t!==n&&!(t&i)&&(i=n&-n,a=t&-t,i>=a||i===16&&(a&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-jr(t),i=1<<r,n|=e[r],t&=~i;return n}function VN(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function JN(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-jr(a),s=1<<o,l=i[o];l===-1?(!(s&r)||s&n)&&(i[o]=VN(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}}function Rp(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function ZS(){var e=bu;return bu<<=1,!(bu&4194240)&&(bu=64),e}function dh(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}
vendor: 4,087 bytes, line 37
37function Xl(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-jr(t),e[t]=r}function YN(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var i=31-jr(r),a=1<<i;t[i]=0,n[i]=-1,e[i]=-1,r&=~a}}function gv(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-jr(r),i=1<<n;i&t|e[n]&t&&(e[n]|=t),r&=~i}}var pe=0;function ej(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var tj,vv,rj,nj,ij,Mp=!1,wu=[],Un=null,Fn=null,zn=null,Ws=new Map,Hs=new Map,Pn=[],XN="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 D0(e,t){switch(e){case"focusin":case"focusout":Un=null;break;case"dragenter":case"dragleave":Fn=null;break;case"mouseover":case"mouseout":zn=null;break;case"pointerover":case"pointerout":Ws.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Hs.delete(t.pointerId)}}function Vo(e,t,r,n,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Zl(t),t!==null&&vv(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function QN(e,t,r,n,i){switch(t){case"focusin":return Un=Vo(Un,e,t,r,n,i),!0;case"dragenter":return Fn=Vo(Fn,e,t,r,n,i),!0;case"mouseover":return zn=Vo(zn,e,t,r,n,i),!0;case"pointerover":var a=i.pointerId;return Ws.set(a,Vo(Ws.get(a)||null,e,t,r,n,i)),!0;case"gotpointercapture":return a=i.pointerId,Hs.set(a,Vo(Hs.get(a)||null,e,t,r,n,i)),!0}return!1}function aj(e){var t=xi(e.target);if(t!==null){var r=Ji(t);if(r!==null){if(t=r.tag,t===13){if(t=GS(r),t!==null){e.blockedOn=t,ij(e.priority,function(){rj(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ic(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Dp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Tp=n,r.target.dispatchEvent(n),Tp=null}else return t=Zl(r),t!==null&&vv(t),e.blockedOn=r,!1;t.shift()}return!0}function L0(e,t,r){ic(e)&&r.delete(t)}function ZN(){Mp=!1,Un!==null&&ic(Un)&&(Un=null),Fn!==null&&ic(Fn)&&(Fn=null),zn!==null&&ic(zn)&&(zn=null),Ws.forEach(L0),Hs.forEach(L0)}function Jo(e,t){e.blockedOn===t&&(e.blockedOn=null,Mp||(Mp=!0,Ht.unstable_scheduleCallback(Ht.unstable_NormalPriority,ZN)))}function Ks(e){function t(i){return Jo(i,e)}if(0<wu.length){Jo(wu[0],e);for(var r=1;r<wu.length;r++){var n=wu[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Un!==null&&Jo(Un,e),Fn!==null&&Jo(Fn,e),zn!==null&&Jo(zn,e),Ws.forEach(t),Hs.forEach(t),r=0;r<Pn.length;r++)n=Pn[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Pn.length&&(r=Pn[0],r.blockedOn===null);)aj(r),r.blockedOn===null&&Pn.shift()}var Da=vn.ReactCurrentBatchConfig,xc=!0;function eT(e,t,r,n){var i=pe,a=Da.transition;Da.transition=null;try{pe=1,yv(e,t,r,n)}finally{pe=i,Da.transition=a}}function tT(e,t,r,n){var i=pe,a=Da.transition;Da.transition=null;try{pe=4,yv(e,t,r,n)}finally{pe=i,Da.transition=a}}function yv(e,t,r,n){if(xc){var i=Dp(e,t,r,n);if(i===null)wh(e,t,n,wc,r),D0(e,n);else if(QN(i,e,t,r,n))n.stopPropagation();else if(D0(e,n),t&4&&-1<XN.indexOf(e)){for(;i!==null;){var a=Zl(i);if(a!==null&&tj(a),a=Dp(e,t,r,n),a===null&&wh(e,t,n,wc,r),a===i)break;i=a}i!==null&&n.stopPropagation()}else wh(e,t,n,null,r)}}var wc=null;function Dp(e,t,r,n){if(wc=null,e=pv(n),e=xi(e),e!==null)if(t=Ji(e),t===null)e=null;else if(r=t.tag,r===13){if(e=GS(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return wc=e,null}
vendor: 10,401 bytes, line 37
37function oj(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(zN()){case mv:return 1;case XS:return 4;case yc:case WN:return 16;case QS:return 536870912;default:return 16}default:return 16}}var In=null,bv=null,ac=null;function sj(){if(ac)return ac;var e,t=bv,r=t.length,n,i="value"in In?In.value:In.textContent,a=i.length;for(e=0;e<r&&t[e]===i[e];e++);var o=r-e;for(n=1;n<=o&&t[r-n]===i[a-n];n++);return ac=i.slice(e,1<n?1-n:void 0)}function oc(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function _u(){return!0}function B0(){return!1}function Gt(e){function t(r,n,i,a,o){this._reactName=r,this._targetInst=i,this.type=n,this.nativeEvent=a,this.target=o,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(r=e[s],this[s]=r?r(a):a[s]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?_u:B0,this.isPropagationStopped=B0,this}return Ce(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=_u)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=_u)},persist:function(){},isPersistent:_u}),t}var ko={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xv=Gt(ko),Ql=Ce({},ko,{view:0,detail:0}),rT=Gt(Ql),fh,hh,Yo,Xd=Ce({},Ql,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wv,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Yo&&(Yo&&e.type==="mousemove"?(fh=e.screenX-Yo.screenX,hh=e.screenY-Yo.screenY):hh=fh=0,Yo=e),fh)},movementY:function(e){return"movementY"in e?e.movementY:hh}}),U0=Gt(Xd),nT=Ce({},Xd,{dataTransfer:0}),iT=Gt(nT),aT=Ce({},Ql,{relatedTarget:0}),ph=Gt(aT),oT=Ce({},ko,{animationName:0,elapsedTime:0,pseudoElement:0}),sT=Gt(oT),lT=Ce({},ko,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),uT=Gt(lT),cT=Ce({},ko,{data:0}),F0=Gt(cT),dT={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},fT={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"},hT={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function pT(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=hT[e])?!!t[e]:!1}function wv(){return pT}var mT=Ce({},Ql,{key:function(e){if(e.key){var t=dT[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=oc(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?fT[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wv,charCode:function(e){return e.type==="keypress"?oc(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?oc(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),gT=Gt(mT),vT=Ce({},Xd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),z0=Gt(vT),yT=Ce({},Ql,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wv}),bT=Gt(yT),xT=Ce({},ko,{propertyName:0,elapsedTime:0,pseudoElement:0}),wT=Gt(xT),_T=Ce({},Xd,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),ST=Gt(_T),jT=[9,13,27,32],_v=ln&&"CompositionEvent"in window,js=null;ln&&"documentMode"in document&&(js=document.documentMode);var kT=ln&&"TextEvent"in window&&!js,lj=ln&&(!_v||js&&8<js&&11>=js),W0=" ",H0=!1;function uj(e,t){switch(e){case"keyup":return jT.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function cj(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var xa=!1;function OT(e,t){switch(e){case"compositionend":return cj(t);case"keypress":return t.which!==32?null:(H0=!0,W0);case"textInput":return e=t.data,e===W0&&H0?null:e;default:return null}}function ET(e,t){if(xa)return e==="compositionend"||!_v&&uj(e,t)?(e=sj(),ac=bv=In=null,xa=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return lj&&t.locale!=="ko"?null:t.data;default:return null}}var AT={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 K0(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!AT[e.type]:t==="textarea"}function dj(e,t,r,n){zS(n),t=_c(t,"onChange"),0<t.length&&(r=new xv("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var ks=null,qs=null;function PT(e){_j(e,0)}function Qd(e){var t=Sa(e);if(RS(t))return e}function NT(e,t){if(e==="change")return t}var fj=!1;if(ln){var mh;if(ln){var gh="oninput"in document;if(!gh){var q0=document.createElement("div");q0.setAttribute("oninput","return;"),gh=typeof q0.oninput=="function"}mh=gh}else mh=!1;fj=mh&&(!document.documentMode||9<document.documentMode)}function G0(){ks&&(ks.detachEvent("onpropertychange",hj),qs=ks=null)}function hj(e){if(e.propertyName==="value"&&Qd(qs)){var t=[];dj(t,qs,e,pv(e)),qS(PT,t)}}function TT(e,t,r){e==="focusin"?(G0(),ks=t,qs=r,ks.attachEvent("onpropertychange",hj)):e==="focusout"&&G0()}function CT(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Qd(qs)}function $T(e,t){if(e==="click")return Qd(t)}function IT(e,t){if(e==="input"||e==="change")return Qd(t)}function RT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Or=typeof Object.is=="function"?Object.is:RT;function Gs(e,t){if(Or(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var i=r[n];if(!bp.call(t,i)||!Or(e[i],t[i]))return!1}return!0}function V0(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function J0(e,t){var r=V0(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=V0(r)}}function pj(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?pj(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function mj(){for(var e=window,t=mc();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=mc(e.document)}return t}function Sv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function MT(e){var t=mj(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&pj(r.ownerDocument.documentElement,r)){if(n!==null&&Sv(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,a=Math.min(n.start,i);n=n.end===void 0?a:Math.min(n.end,i),!e.extend&&a>n&&(i=n,n=a,a=i),i=J0(r,a);var o=J0(r,n);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var DT=ln&&"documentMode"in document&&11>=document.documentMode,wa=null,Lp=null,Os=null,Bp=!1;function Y0(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Bp||wa==null||wa!==mc(n)||(n=wa,"selectionStart"in n&&Sv(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focu
vendor: 4,501 bytes, line 37
37sNode:n.focusNode,focusOffset:n.focusOffset}),Os&&Gs(Os,n)||(Os=n,n=_c(Lp,"onSelect"),0<n.length&&(t=new xv("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=wa)))}function Su(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var _a={animationend:Su("Animation","AnimationEnd"),animationiteration:Su("Animation","AnimationIteration"),animationstart:Su("Animation","AnimationStart"),transitionend:Su("Transition","TransitionEnd")},vh={},gj={};ln&&(gj=document.createElement("div").style,"AnimationEvent"in window||(delete _a.animationend.animation,delete _a.animationiteration.animation,delete _a.animationstart.animation),"TransitionEvent"in window||delete _a.transitionend.transition);function Zd(e){if(vh[e])return vh[e];if(!_a[e])return e;var t=_a[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in gj)return vh[e]=t[r];return e}var vj=Zd("animationend"),yj=Zd("animationiteration"),bj=Zd("animationstart"),xj=Zd("transitionend"),wj=new Map,X0="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 Zn(e,t){wj.set(e,t),Vi(t,[e])}for(var yh=0;yh<X0.length;yh++){var bh=X0[yh],LT=bh.toLowerCase(),BT=bh[0].toUpperCase()+bh.slice(1);Zn(LT,"on"+BT)}Zn(vj,"onAnimationEnd");Zn(yj,"onAnimationIteration");Zn(bj,"onAnimationStart");Zn("dblclick","onDoubleClick");Zn("focusin","onFocus");Zn("focusout","onBlur");Zn(xj,"onTransitionEnd");Ha("onMouseEnter",["mouseout","mouseover"]);Ha("onMouseLeave",["mouseout","mouseover"]);Ha("onPointerEnter",["pointerout","pointerover"]);Ha("onPointerLeave",["pointerout","pointerover"]);Vi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Vi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Vi("onBeforeInput",["compositionend","keypress","textInput","paste"]);Vi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Vi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Vi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var vs="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(" "),UT=new Set("cancel close invalid load scroll toggle".split(" ").concat(vs));function Q0(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,LN(n,t,void 0,e),e.currentTarget=null}function _j(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],i=n.event;n=n.listeners;e:{var a=void 0;if(t)for(var o=n.length-1;0<=o;o--){var s=n[o],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==a&&i.isPropagationStopped())break e;Q0(i,s,u),a=l}else for(o=0;o<n.length;o++){if(s=n[o],l=s.instance,u=s.currentTarget,s=s.listener,l!==a&&i.isPropagationStopped())break e;Q0(i,s,u),a=l}}}if(vc)throw e=Ip,vc=!1,Ip=null,e}function Se(e,t){var r=t[Hp];r===void 0&&(r=t[Hp]=new Set);var n=e+"__bubble";r.has(n)||(Sj(t,e,2,!1),r.add(n))}function xh(e,t,r){var n=0;t&&(n|=4),Sj(r,e,n,t)}var ju="_reactListening"+Math.random().toString(36).slice(2);function Vs(e){if(!e[ju]){e[ju]=!0,NS.forEach(function(r){r!=="selectionchange"&&(UT.has(r)||xh(r,!1,e),xh(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ju]||(t[ju]=!0,xh("selectionchange",!1,t))}}function Sj(e,t,r,n){switch(oj(t)){case 1:var i=eT;break;case 4:i=tT;break;default:i=yv}r=i.bind(null,t,r,e),i=void 0,!$p||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),n?i!==void 0?e.addEventListener(t,r,{capture:!0,passive:i}):e.addEventListener(t,r,!0):i!==void 0?e.addEventListener(t,r,{passive:i}):e.addEventListener(t,r,!1)}function wh(e,t,r,n,i){var a=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var s=n.stateNode.containerInfo;
vendor: 4,701 bytes, line 37
37if(s===i||s.nodeType===8&&s.parentNode===i)break;if(o===4)for(o=n.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;s!==null;){if(o=xi(s),o===null)return;if(l=o.tag,l===5||l===6){n=a=o;continue e}s=s.parentNode}}n=n.return}qS(function(){var u=a,f=pv(r),d=[];e:{var h=wj.get(e);if(h!==void 0){var p=xv,m=e;switch(e){case"keypress":if(oc(r)===0)break e;case"keydown":case"keyup":p=gT;break;case"focusin":m="focus",p=ph;break;case"focusout":m="blur",p=ph;break;case"beforeblur":case"afterblur":p=ph;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=U0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=iT;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=bT;break;case vj:case yj:case bj:p=sT;break;case xj:p=wT;break;case"scroll":p=rT;break;case"wheel":p=ST;break;case"copy":case"cut":case"paste":p=uT;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=z0}var v=(t&4)!==0,b=!v&&e==="scroll",g=v?h!==null?h+"Capture":null:h;v=[];for(var y=u,x;y!==null;){x=y;var S=x.stateNode;if(x.tag===5&&S!==null&&(x=S,g!==null&&(S=zs(y,g),S!=null&&v.push(Js(y,S,x)))),b)break;y=y.return}0<v.length&&(h=new p(h,m,null,r,f),d.push({event:h,listeners:v}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&r!==Tp&&(m=r.relatedTarget||r.fromElement)&&(xi(m)||m[un]))break e;if((p||h)&&(h=f.window===f?f:(h=f.ownerDocument)?h.defaultView||h.parentWindow:window,p?(m=r.relatedTarget||r.toElement,p=u,m=m?xi(m):null,m!==null&&(b=Ji(m),m!==b||m.tag!==5&&m.tag!==6)&&(m=null)):(p=null,m=u),p!==m)){if(v=U0,S="onMouseLeave",g="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(v=z0,S="onPointerLeave",g="onPointerEnter",y="pointer"),b=p==null?h:Sa(p),x=m==null?h:Sa(m),h=new v(S,y+"leave",p,r,f),h.target=b,h.relatedTarget=x,S=null,xi(f)===u&&(v=new v(g,y+"enter",m,r,f),v.target=x,v.relatedTarget=b,S=v),b=S,p&&m)t:{for(v=p,g=m,y=0,x=v;x;x=ta(x))y++;for(x=0,S=g;S;S=ta(S))x++;for(;0<y-x;)v=ta(v),y--;for(;0<x-y;)g=ta(g),x--;for(;y--;){if(v===g||g!==null&&v===g.alternate)break t;v=ta(v),g=ta(g)}v=null}else v=null;p!==null&&Z0(d,h,p,v,!1),m!==null&&b!==null&&Z0(d,b,m,v,!0)}}e:{if(h=u?Sa(u):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var _=NT;else if(K0(h))if(fj)_=IT;else{_=CT;var w=TT}else(p=h.nodeName)&&p.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(_=$T);if(_&&(_=_(e,u))){dj(d,_,r,f);break e}w&&w(e,h,u),e==="focusout"&&(w=h._wrapperState)&&w.controlled&&h.type==="number"&&Op(h,"number",h.value)}switch(w=u?Sa(u):window,e){case"focusin":(K0(w)||w.contentEditable==="true")&&(wa=w,Lp=u,Os=null);break;case"focusout":Os=Lp=wa=null;break;case"mousedown":Bp=!0;break;case"contextmenu":case"mouseup":case"dragend":Bp=!1,Y0(d,r,f);break;case"selectionchange":if(DT)break;case"keydown":case"keyup":Y0(d,r,f)}var j;if(_v)e:{switch(e){case"compositionstart":var O="onCompositionStart";break e;case"compositionend":O="onCompositionEnd";break e;case"compositionupdate":O="onCompositionUpdate";break e}O=void 0}else xa?uj(e,r)&&(O="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(O="onCompositionStart");O&&(lj&&r.locale!=="ko"&&(xa||O!=="onCompositionStart"?O==="onCompositionEnd"&&xa&&(j=sj()):(In=f,bv="value"in In?In.value:In.textContent,xa=!0)),w=_c(u,O),0<w.length&&(O=new F0(O,e,null,r,f),d.push({event:O,listeners:w}),j?O.data=j:(j=cj(r),j!==null&&(O.data=j)))),(j=kT?OT(e,r):ET(e,r))&&(u=_c(u,"onBeforeInput"),0<u.length&&(f=new F0("onBeforeInput","beforeinput",null,r,f),d.push({event:f,listeners:u}),f.data=j))}_j(d,t)})}function Js(e,t,r){return{instance:e,listener:t,currentTarget:r}}function _c(e,t){for(var r=t+"Capture",n=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=zs(e,r),a!=null&&n.unshift(Js(e,a,i)),a=zs(e,t),a!=null&&n.push(Js(e,a,i))),e=e.return}return n}function ta(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Z0(e,t,r,n,i){for(var a=t._reactName,o=[];r!==null&&r!==n;){var s=r,l=s.alternate,u=s.stateNode;if(l!==null&&l===n)break;s.tag===5&&u!==null&&(s=u,i?(l=zs(r,a),l!=null&&o.unshift(Js(r,l,s))):i||(l=zs(r,a),l!=null&&o.push(Js(r,l,s)))),r=r.return}o.length!==0&&e.push({event:t,listeners:o})}var FT=/\r\n?/g,zT=/\u0000|\uFFFD/g;function eb(e){return(typeof e=="string"?e:""+e).replace(FT,`
38`).replace(zT,"")}function ku(e,t,r){if(t=eb(t),eb(e)!==t&&r)throw Error(z(425))}function Sc(){}var Up=null,Fp=null;function zp(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Wp=typeof setTimeout=="function"?setTimeout:void 0,WT=typeof clearTimeout=="function"?clearTimeout:void 0,tb=typeof Promise=="function"?Promise:void 0,HT=typeof queueMicrotask=="function"?queueMicrotask:typeof tb<"u"?function(e){return tb.resolve(null).then(e).catch(KT)}:Wp;function KT(e){setTimeout(function(){throw e})}function _h(e,t){var r=t,n=0;do{var i=r.nextSibling;if(e.removeChild(r),i&&i.nodeType===8)if(r=i.data,r==="/$"){if(n===0){e.removeChild(i),Ks(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=i}while(r);Ks(t)}function Wn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function rb(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var Oo=Math.random().toString(36).slice(2),Ir="__reactFiber$"+Oo,Ys="__reactProps$"+Oo,un="__reactContainer$"+Oo,Hp="__reactEvents$"+Oo,qT="__reactListeners$"+Oo,GT="__reactHandles$"+Oo;function xi(e){var t=e[Ir];if(t)return t;for(var r=e.parentNode;r;){if(t=r[un]||r[Ir]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=rb(e);e!==null;){if(r=e[Ir])return r;e=rb(e)}return t}e=r,r=e.parentNode}return null}function Zl(e){return e=e[Ir]||e[un],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Sa(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(z(33))}function ef(e){return e[Ys]||null}var Kp=[],ja=-1;function ei(e){return{current:e}}function Oe(e){0>ja||(e.current=Kp[ja],Kp[ja]=null,ja--)}function _e(e,t){ja++,Kp[ja]=e.current,e.current=t}var Qn={},vt=ei(Qn),Nt=ei(!1),Di=Qn;function Ka(e,t){var r=e.type.contextTypes;if(!r)return Qn;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in r)i[a]=t[a];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Tt(e){return e=e.childContextTypes,e!=null}function jc(){Oe(Nt),Oe(vt)}function nb(e,t,r){if(vt.current!==Qn)throw Error(z(168));_e(vt,t),_e(Nt,r)}function jj(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(z(108,TN(e)||"Unknown",i));return Ce({},r,n)}function kc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Qn,Di=vt.current,_e(vt,e),_e(Nt,Nt.current),!0}function ib(e,t,r){var n=e.stateNode;if(!n)throw Error(z(169));r?(e=jj(e,t,Di),n.__reactInternalMemoizedMergedChildContext=e,Oe(Nt),Oe(vt),_e(vt,e)):Oe(Nt),_e(Nt,r)}var Yr=null,tf=!1,Sh=!1;function kj(e){Yr===null?Yr=[e]:Yr.push(e)}function VT(e){tf=!0,kj(e)}function ti(){if(!Sh&&Yr!==null){Sh=!0;var e=0,t=pe;try{var r=Yr;for(pe=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}Yr=null,tf=!1}catch(i){throw Yr!==null&&(Yr=Yr.slice(e+1)),YS(mv,ti),i}finally{pe=t,Sh=!1}}return null}var ka=[],Oa=0,Oc=null,Ec=0,Zt=[],er=0,Li=null,Xr=1,Qr="";function pi(e,t){ka[Oa++]=Ec,ka[Oa++]=Oc,Oc=e,Ec=t}function Oj(e,t,r){Zt[er++]=Xr,Zt[er++]=Qr,Zt[er++]=Li,Li=e;var n=Xr;e=Qr;var i=32-jr(n)-1;n&=~(1<<i),r+=1;var a=32-jr(t)+i;if(30<a){var o=i-i%5;a=(n&(1<<o)-1).toString(32),n>>=o,i-=o,Xr=1<<32-jr(t)+i|r<<i|n,Qr=a+e}else Xr=1<<a|r<<i|n,Qr=e}function jv(e){e.return!==null&&(pi(e,1),Oj(e,1,0))}function kv(e){for(;e===Oc;)Oc=ka[--Oa],ka[Oa]=null,Ec=ka[--Oa],ka[Oa]=null;for(;e===Li;)Li=Zt[--er],Zt[er]=null,Qr=Zt[--er],Zt[er]=null,Xr=Zt[--er],Zt[er]=null}var Wt=null,zt=null,Ae=!1,br=null;function Ej(e,t){var r=tr(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function ab(e,t){switch(e.tag){case 5:var r=e.type;
vendor: 12,814 bytes, line 38
38return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Wt=e,zt=Wn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Wt=e,zt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Li!==null?{id:Xr,overflow:Qr}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=tr(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Wt=e,zt=null,!0):!1;default:return!1}}function qp(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Gp(e){if(Ae){var t=zt;if(t){var r=t;if(!ab(e,t)){if(qp(e))throw Error(z(418));t=Wn(r.nextSibling);var n=Wt;t&&ab(e,t)?Ej(n,r):(e.flags=e.flags&-4097|2,Ae=!1,Wt=e)}}else{if(qp(e))throw Error(z(418));e.flags=e.flags&-4097|2,Ae=!1,Wt=e}}}function ob(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Wt=e}function Ou(e){if(e!==Wt)return!1;if(!Ae)return ob(e),Ae=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!zp(e.type,e.memoizedProps)),t&&(t=zt)){if(qp(e))throw Aj(),Error(z(418));for(;t;)Ej(e,t),t=Wn(t.nextSibling)}if(ob(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(z(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){zt=Wn(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}zt=null}}else zt=Wt?Wn(e.stateNode.nextSibling):null;return!0}function Aj(){for(var e=zt;e;)e=Wn(e.nextSibling)}function qa(){zt=Wt=null,Ae=!1}function Ov(e){br===null?br=[e]:br.push(e)}var JT=vn.ReactCurrentBatchConfig;function Xo(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(z(309));var n=r.stateNode}if(!n)throw Error(z(147,e));var i=n,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(o){var s=i.refs;o===null?delete s[a]:s[a]=o},t._stringRef=a,t)}if(typeof e!="string")throw Error(z(284));if(!r._owner)throw Error(z(290,e))}return e}function Eu(e,t){throw e=Object.prototype.toString.call(t),Error(z(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function sb(e){var t=e._init;return t(e._payload)}function Pj(e){function t(g,y){if(e){var x=g.deletions;x===null?(g.deletions=[y],g.flags|=16):x.push(y)}}function r(g,y){if(!e)return null;for(;y!==null;)t(g,y),y=y.sibling;return null}function n(g,y){for(g=new Map;y!==null;)y.key!==null?g.set(y.key,y):g.set(y.index,y),y=y.sibling;return g}function i(g,y){return g=Gn(g,y),g.index=0,g.sibling=null,g}function a(g,y,x){return g.index=x,e?(x=g.alternate,x!==null?(x=x.index,x<y?(g.flags|=2,y):x):(g.flags|=2,y)):(g.flags|=1048576,y)}function o(g){return e&&g.alternate===null&&(g.flags|=2),g}function s(g,y,x,S){return y===null||y.tag!==6?(y=Nh(x,g.mode,S),y.return=g,y):(y=i(y,x),y.return=g,y)}function l(g,y,x,S){var _=x.type;return _===ba?f(g,y,x.props.children,S,x.key):y!==null&&(y.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===On&&sb(_)===y.type)?(S=i(y,x.props),S.ref=Xo(g,y,x),S.return=g,S):(S=hc(x.type,x.key,x.props,null,g.mode,S),S.ref=Xo(g,y,x),S.return=g,S)}function u(g,y,x,S){return y===null||y.tag!==4||y.stateNode.containerInfo!==x.containerInfo||y.stateNode.implementation!==x.implementation?(y=Th(x,g.mode,S),y.return=g,y):(y=i(y,x.children||[]),y.return=g,y)}function f(g,y,x,S,_){return y===null||y.tag!==7?(y=Ni(x,g.mode,S,_),y.return=g,y):(y=i(y,x),y.return=g,y)}function d(g,y,x){if(typeof y=="string"&&y!==""||typeof y=="number")return y=Nh(""+y,g.mode,x),y.return=g,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case gu:return x=hc(y.type,y.key,y.props,null,g.mode,x),x.ref=Xo(g,null,y),x.return=g,x;case ya:return y=Th(y,g.mode,x),y.return=g,y;case On:var S=y._init;return d(g,S(y._payload),x)}if(ms(y)||qo(y))return y=Ni(y,g.mode,x,null),y.return=g,y;Eu(g,y)}return null}function h(g,y,x,S){var _=y!==null?y.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return _!==null?null:s(g,y,""+x,S);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case gu:return x.key===_?l(g,y,x,S):null;case ya:return x.key===_?u(g,y,x,S):null;case On:return _=x._init,h(g,y,_(x._payload),S)}if(ms(x)||qo(x))return _!==null?null:f(g,y,x,S,null);Eu(g,x)}return null}function p(g,y,x,S,_){if(typeof S=="string"&&S!==""||typeof S=="number")return g=g.get(x)||null,s(y,g,""+S,_);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case gu:return g=g.get(S.key===null?x:S.key)||null,l(y,g,S,_);case ya:return g=g.get(S.key===null?x:S.key)||null,u(y,g,S,_);case On:var w=S._init;return p(g,y,x,w(S._payload),_)}if(ms(S)||qo(S))return g=g.get(x)||null,f(y,g,S,_,null);Eu(y,S)}return null}function m(g,y,x,S){for(var _=null,w=null,j=y,O=y=0,k=null;j!==null&&O<x.length;O++){j.index>O?(k=j,j=null):k=j.sibling;var A=h(g,j,x[O],S);if(A===null){j===null&&(j=k);break}e&&j&&A.alternate===null&&t(g,j),y=a(A,y,O),w===null?_=A:w.sibling=A,w=A,j=k}if(O===x.length)return r(g,j),Ae&&pi(g,O),_;if(j===null){for(;O<x.length;O++)j=d(g,x[O],S),j!==null&&(y=a(j,y,O),w===null?_=j:w.sibling=j,w=j);return Ae&&pi(g,O),_}for(j=n(g,j);O<x.length;O++)k=p(j,g,O,x[O],S),k!==null&&(e&&k.alternate!==null&&j.delete(k.key===null?O:k.key),y=a(k,y,O),w===null?_=k:w.sibling=k,w=k);return e&&j.forEach(function(C){return t(g,C)}),Ae&&pi(g,O),_}function v(g,y,x,S){var _=qo(x);if(typeof _!="function")throw Error(z(150));if(x=_.call(x),x==null)throw Error(z(151));for(var w=_=null,j=y,O=y=0,k=null,A=x.next();j!==null&&!A.done;O++,A=x.next()){j.index>O?(k=j,j=null):k=j.sibling;var C=h(g,j,A.value,S);if(C===null){j===null&&(j=k);break}e&&j&&C.alternate===null&&t(g,j),y=a(C,y,O),w===null?_=C:w.sibling=C,w=C,j=k}if(A.done)return r(g,j),Ae&&pi(g,O),_;if(j===null){for(;!A.done;O++,A=x.next())A=d(g,A.value,S),A!==null&&(y=a(A,y,O),w===null?_=A:w.sibling=A,w=A);return Ae&&pi(g,O),_}for(j=n(g,j);!A.done;O++,A=x.next())A=p(j,g,O,A.value,S),A!==null&&(e&&A.alternate!==null&&j.delete(A.key===null?O:A.key),y=a(A,y,O),w===null?_=A:w.sibling=A,w=A);return e&&j.forEach(function(P){return t(g,P)}),Ae&&pi(g,O),_}function b(g,y,x,S){if(typeof x=="object"&&x!==null&&x.type===ba&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case gu:e:{for(var _=x.key,w=y;w!==null;){if(w.key===_){if(_=x.type,_===ba){if(w.tag===7){r(g,w.sibling),y=i(w,x.props.children),y.return=g,g=y;break e}}else if(w.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===On&&sb(_)===w.type){r(g,w.sibling),y=i(w,x.props),y.ref=Xo(g,w,x),y.return=g,g=y;break e}r(g,w);break}else t(g,w);w=w.sibling}x.type===ba?(y=Ni(x.props.children,g.mode,S,x.key),y.return=g,g=y):(S=hc(x.type,x.key,x.props,null,g.mode,S),S.ref=Xo(g,y,x),S.return=g,g=S)}return o(g);case ya:e:{for(w=x.key;y!==null;){if(y.key===w)if(y.tag===4&&y.stateNode.containerInfo===x.containerInfo&&y.stateNode.implementation===x.implementation){r(g,y.sibling),y=i(y,x.children||[]),y.return=g,g=y;break e}else{r(g,y);break}else t(g,y);y=y.sibling}y=Th(x,g.mode,S),y.return=g,g=y}return o(g);case On:return w=x._init,b(g,y,w(x._payload),S)}if(ms(x))return m(g,y,x,S);if(qo(x))return v(g,y,x,S);Eu(g,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,y!==null&&y.tag===6?(r(g,y.sibling),y=i(y,x),y.return=g,g=y):(r(g,y),y=Nh(x,g.mode,S),y.return=g,g=y),o(g)):r(g,y)}return b}var Ga=Pj(!0),Nj=Pj(!1),Ac=ei(null),Pc=null,Ea=null,Ev=null;function Av(){Ev=Ea=Pc=null}function Pv(e){var t=Ac.current;Oe(Ac),e._currentValue=t}function Vp(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function La(e,t){Pc=e,Ev=Ea=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(At=!0),e.firstContext=null)}function or(e){var t=e._currentValue;if(Ev!==e)if(e={context:e,memoizedValue:t,next:null},Ea===null){if(Pc===null)throw Error(z(308));Ea=e,Pc.dependencies={lanes:0,firstContext:e}}else Ea=Ea.next=e;return t}var wi=null;function Nv(e){wi===null?wi=[e]:wi.push(e)}function Tj(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,Nv(t)):(r.next=i.next,i.next=r),t.interleaved=r,cn(e,n)}function cn(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var En=!1;function Tv(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Cj(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function rn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Hn(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,ce&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,cn(e,r)}return i=n.interleaved,i===null?(t.next=t,Nv(n)):(t.next=i.next,i.next=t),n.interleaved=t,cn(e,r)}function sc(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,gv(e,r)}}function lb(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?i=a=o:a=a.next=o,r=r.next}while(r!==null);a===null?i=a=t:a=a.next=t}else i=a=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Nc(e,t,r,n){var i=e.updateQueue;En=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,u=l.next;l.next=null,o===null?a=u:o.next=u,o=l;var f=e.alternate;f!==null&&(f=f.updateQueue,s=f.lastBaseUpdate,s!==o&&(s===null?f.firstBaseUpdate=u:s.next=u,f.lastBaseUpdate=l))}if(a!==null){var d=i.baseState;o=0,f=u=l=null,s=a;do{var h=s.lane,p=s.eventTime;if((n&h)===h){f!==null&&(f=f.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var m=e,v=s;switch(h=t,p=r,v.tag){case 1:if(m=v.payload,typeof m=="function"){d=m.call(p,d,h);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=v.payload,h=typeof m=="function"?m.call(p,d,h):m,h==null)break e;d=Ce({},d,h);break e;case 2:En=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[s]:h.push(s))}else p={eventTime:p,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},f===null?(u=f=p,l=d):f=f.next=p,o|=h;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;h=s,s=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(f===null&&(l=d),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=f,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);Ui|=o,e.lanes=o,e.memoizedState=d}}function ub(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],i=n.callback;if(i!==null){if(n.callback=null,n=r,typeof i!="function")throw Error(z(191,i));i.call(n)}}}var eu={},Dr=ei(eu),Xs=ei(eu),Qs=ei(eu);function _i(e){if(e===eu)throw Error(z(174));return e}function Cv(e,t){switch(_e(Qs,t),_e(Xs,e),_e(Dr,eu),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ap(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ap(t,e)}Oe(Dr),_e(Dr,t)}function Va(){Oe(Dr),Oe(Xs),Oe(Qs)}function $j(e){_i(Qs.current);var t=_i(Dr.current),r=Ap(t,e.type);t!==r&&(_e(Xs,e),_e(Dr,r))}function $v(e){Xs.current===e&&(Oe(Dr),Oe(Xs))}var Ne=ei(0);function Tc(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var jh=[];function Iv(){for(var e=0;e<jh.length;e++)jh[e]._workInProgressVersionPrimary=null;jh.length=0}var lc=vn.ReactCurrentDispatcher,kh=vn.ReactCurrentBatchConfig,Bi=0,Te=null,Je=null,tt=null,Cc=!1,Es=!1,Zs=0,YT=0;function dt(){throw Error(z(321))}function Rv(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Or(e[r],t[r]))return!1;return!0}function Mv(e,t,r,n,i,a){if(Bi=a,Te=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,lc.current=e===null||e.memoizedState===null?e2:t2,e=r(n,i),Es){a=0;
vendor: 6,592 bytes, line 38
38do{if(Es=!1,Zs=0,25<=a)throw Error(z(301));a+=1,tt=Je=null,t.updateQueue=null,lc.current=r2,e=r(n,i)}while(Es)}if(lc.current=$c,t=Je!==null&&Je.next!==null,Bi=0,tt=Je=Te=null,Cc=!1,t)throw Error(z(300));return e}function Dv(){var e=Zs!==0;return Zs=0,e}function Tr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return tt===null?Te.memoizedState=tt=e:tt=tt.next=e,tt}function sr(){if(Je===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=Je.next;var t=tt===null?Te.memoizedState:tt.next;if(t!==null)tt=t,Je=e;else{if(e===null)throw Error(z(310));Je=e,e={memoizedState:Je.memoizedState,baseState:Je.baseState,baseQueue:Je.baseQueue,queue:Je.queue,next:null},tt===null?Te.memoizedState=tt=e:tt=tt.next=e}return tt}function el(e,t){return typeof t=="function"?t(e):t}function Oh(e){var t=sr(),r=t.queue;if(r===null)throw Error(z(311));r.lastRenderedReducer=e;var n=Je,i=n.baseQueue,a=r.pending;if(a!==null){if(i!==null){var o=i.next;i.next=a.next,a.next=o}n.baseQueue=i=a,r.pending=null}if(i!==null){a=i.next,n=n.baseState;var s=o=null,l=null,u=a;do{var f=u.lane;if((Bi&f)===f)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:e(n,u.action);else{var d={lane:f,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(s=l=d,o=n):l=l.next=d,Te.lanes|=f,Ui|=f}u=u.next}while(u!==null&&u!==a);l===null?o=n:l.next=s,Or(n,t.memoizedState)||(At=!0),t.memoizedState=n,t.baseState=o,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){i=e;do a=i.lane,Te.lanes|=a,Ui|=a,i=i.next;while(i!==e)}else i===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Eh(e){var t=sr(),r=t.queue;if(r===null)throw Error(z(311));r.lastRenderedReducer=e;var n=r.dispatch,i=r.pending,a=t.memoizedState;if(i!==null){r.pending=null;var o=i=i.next;do a=e(a,o.action),o=o.next;while(o!==i);Or(a,t.memoizedState)||(At=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),r.lastRenderedState=a}return[a,n]}function Ij(){}function Rj(e,t){var r=Te,n=sr(),i=t(),a=!Or(n.memoizedState,i);if(a&&(n.memoizedState=i,At=!0),n=n.queue,Lv(Lj.bind(null,r,n,e),[e]),n.getSnapshot!==t||a||tt!==null&&tt.memoizedState.tag&1){if(r.flags|=2048,tl(9,Dj.bind(null,r,n,i,t),void 0,null),rt===null)throw Error(z(349));Bi&30||Mj(r,t,i)}return i}function Mj(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Te.updateQueue,t===null?(t={lastEffect:null,stores:null},Te.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Dj(e,t,r,n){t.value=r,t.getSnapshot=n,Bj(t)&&Uj(e)}function Lj(e,t,r){return r(function(){Bj(t)&&Uj(e)})}function Bj(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Or(e,r)}catch{return!0}}function Uj(e){var t=cn(e,1);t!==null&&kr(t,e,1,-1)}function cb(e){var t=Tr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:el,lastRenderedState:e},t.queue=e,e=e.dispatch=ZT.bind(null,Te,e),[t.memoizedState,e]}function tl(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=Te.updateQueue,t===null?(t={lastEffect:null,stores:null},Te.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function Fj(){return sr().memoizedState}function uc(e,t,r,n){var i=Tr();Te.flags|=e,i.memoizedState=tl(1|t,r,void 0,n===void 0?null:n)}function rf(e,t,r,n){var i=sr();n=n===void 0?null:n;var a=void 0;if(Je!==null){var o=Je.memoizedState;if(a=o.destroy,n!==null&&Rv(n,o.deps)){i.memoizedState=tl(t,r,a,n);return}}Te.flags|=e,i.memoizedState=tl(1|t,r,a,n)}function db(e,t){return uc(8390656,8,e,t)}function Lv(e,t){return rf(2048,8,e,t)}function zj(e,t){return rf(4,2,e,t)}function Wj(e,t){return rf(4,4,e,t)}function Hj(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Kj(e,t,r){return r=r!=null?r.concat([e]):null,rf(4,4,Hj.bind(null,t,e),r)}function Bv(){}function qj(e,t){var r=sr();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Rv(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function Gj(e,t){var r=sr();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Rv(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function Vj(e,t,r){return Bi&21?(Or(r,t)||(r=ZS(),Te.lanes|=r,Ui|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,At=!0),e.memoizedState=r)}function XT(e,t){var r=pe;pe=r!==0&&4>r?r:4,e(!0);var n=kh.transition;kh.transition={};try{e(!1),t()}finally{pe=r,kh.transition=n}}function Jj(){return sr().memoizedState}function QT(e,t,r){var n=qn(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},Yj(e))Xj(t,r);else if(r=Tj(e,t,r,n),r!==null){var i=wt();kr(r,e,n,i),Qj(r,t,n)}}function ZT(e,t,r){var n=qn(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(Yj(e))Xj(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,r);if(i.hasEagerState=!0,i.eagerState=s,Or(s,o)){var l=t.interleaved;l===null?(i.next=i,Nv(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}r=Tj(e,t,i,n),r!==null&&(i=wt(),kr(r,e,n,i),Qj(r,t,n))}}function Yj(e){var t=e.alternate;return e===Te||t!==null&&t===Te}function Xj(e,t){Es=Cc=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Qj(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,gv(e,r)}}var $c={readContext:or,useCallback:dt,useContext:dt,useEffect:dt,useImperativeHandle:dt,useInsertionEffect:dt,useLayoutEffect:dt,useMemo:dt,useReducer:dt,useRef:dt,useState:dt,useDebugValue:dt,useDeferredValue:dt,useTransition:dt,useMutableSource:dt,useSyncExternalStore:dt,useId:dt,unstable_isNewReconciler:!1},e2={readContext:or,useCallback:function(e,t){return Tr().memoizedState=[e,t===void 0?null:t],e},useContext:or,useEffect:db,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,uc(4194308,4,Hj.bind(null,t,e),r)},useLayoutEffect:function(e,t){return uc(4194308,4,e,t)},useInsertionEffect:function(e,t){return uc(4,2,e,t)},useMemo:function(e,t){var r=Tr();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Tr();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=QT.bind(null,Te,e),[n.memoizedState,e]}
vendor: 5,922 bytes, lines 38-40
38,useRef:function(e){var t=Tr();return e={current:e},t.memoizedState=e},useState:cb,useDebugValue:Bv,useDeferredValue:function(e){return Tr().memoizedState=e},useTransition:function(){var e=cb(!1),t=e[0];return e=XT.bind(null,e[1]),Tr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Te,i=Tr();if(Ae){if(r===void 0)throw Error(z(407));r=r()}else{if(r=t(),rt===null)throw Error(z(349));Bi&30||Mj(n,t,r)}i.memoizedState=r;var a={value:r,getSnapshot:t};return i.queue=a,db(Lj.bind(null,n,a,e),[e]),n.flags|=2048,tl(9,Dj.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=Tr(),t=rt.identifierPrefix;if(Ae){var r=Qr,n=Xr;r=(n&~(1<<32-jr(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Zs++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=YT++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},t2={readContext:or,useCallback:qj,useContext:or,useEffect:Lv,useImperativeHandle:Kj,useInsertionEffect:zj,useLayoutEffect:Wj,useMemo:Gj,useReducer:Oh,useRef:Fj,useState:function(){return Oh(el)},useDebugValue:Bv,useDeferredValue:function(e){var t=sr();return Vj(t,Je.memoizedState,e)},useTransition:function(){var e=Oh(el)[0],t=sr().memoizedState;return[e,t]},useMutableSource:Ij,useSyncExternalStore:Rj,useId:Jj,unstable_isNewReconciler:!1},r2={readContext:or,useCallback:qj,useContext:or,useEffect:Lv,useImperativeHandle:Kj,useInsertionEffect:zj,useLayoutEffect:Wj,useMemo:Gj,useReducer:Eh,useRef:Fj,useState:function(){return Eh(el)},useDebugValue:Bv,useDeferredValue:function(e){var t=sr();return Je===null?t.memoizedState=e:Vj(t,Je.memoizedState,e)},useTransition:function(){var e=Eh(el)[0],t=sr().memoizedState;return[e,t]},useMutableSource:Ij,useSyncExternalStore:Rj,useId:Jj,unstable_isNewReconciler:!1};function pr(e,t){if(e&&e.defaultProps){t=Ce({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Jp(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:Ce({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var nf={isMounted:function(e){return(e=e._reactInternals)?Ji(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=wt(),i=qn(e),a=rn(n,i);a.payload=t,r!=null&&(a.callback=r),t=Hn(e,a,i),t!==null&&(kr(t,e,i,n),sc(t,e,i))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=wt(),i=qn(e),a=rn(n,i);a.tag=1,a.payload=t,r!=null&&(a.callback=r),t=Hn(e,a,i),t!==null&&(kr(t,e,i,n),sc(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=wt(),n=qn(e),i=rn(r,n);i.tag=2,t!=null&&(i.callback=t),t=Hn(e,i,n),t!==null&&(kr(t,e,n,r),sc(t,e,n))}};function fb(e,t,r,n,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,a,o):t.prototype&&t.prototype.isPureReactComponent?!Gs(r,n)||!Gs(i,a):!0}function Zj(e,t,r){var n=!1,i=Qn,a=t.contextType;return typeof a=="object"&&a!==null?a=or(a):(i=Tt(t)?Di:vt.current,n=t.contextTypes,a=(n=n!=null)?Ka(e,i):Qn),t=new t(r,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=nf,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function hb(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&nf.enqueueReplaceState(t,t.state,null)}function Yp(e,t,r,n){var i=e.stateNode;i.props=r,i.state=e.memoizedState,i.refs={},Tv(e);var a=t.contextType;typeof a=="object"&&a!==null?i.context=or(a):(a=Tt(t)?Di:vt.current,i.context=Ka(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(Jp(e,t,a,r),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&nf.enqueueReplaceState(i,i.state,null),Nc(e,r,i,n),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Ja(e,t){try{var r="",n=t;do r+=NN(n),n=n.return;while(n);var i=r}catch(a){i=`
39Error generating stack: `+a.message+`
40`+a.stack}return{value:e,source:t,stack:i,digest:null}}function Ah(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Xp(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var n2=typeof WeakMap=="function"?WeakMap:Map;function ek(e,t,r){r=rn(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Rc||(Rc=!0,sm=n),Xp(e,t)},r}function tk(e,t,r){r=rn(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var i=t.value;r.payload=function(){return n(i)},r.callback=function(){Xp(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){Xp(e,t),typeof n!="function"&&(Kn===null?Kn=new Set([this]):Kn.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),r}function pb(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new n2;var i=new Set;n.set(t,i)}else i=n.get(t),i===void 0&&(i=new Set,n.set(t,i));i.has(r)||(i.add(r),e=v2.bind(null,e,t,r),t.then(e,e))}function mb(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function gb(e,t,r,n,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=rn(-1,1),t.tag=2,Hn(r,t,1))),r.lanes|=1),e)}var i2=vn.ReactCurrentOwner,At=!1;function bt(e,t,r,n){t.child=e===null?Nj(t,null,r,n):Ga(t,e.child,r,n)}function vb(e,t,r,n,i){r=r.render;var a=t.ref;
vendor: 6,220 bytes, line 40
40return La(t,i),n=Mv(e,t,r,n,a,i),r=Dv(),e!==null&&!At?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,dn(e,t,i)):(Ae&&r&&jv(t),t.flags|=1,bt(e,t,n,i),t.child)}function yb(e,t,r,n,i){if(e===null){var a=r.type;return typeof a=="function"&&!Gv(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=a,rk(e,t,a,n,i)):(e=hc(r.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&i)){var o=a.memoizedProps;if(r=r.compare,r=r!==null?r:Gs,r(o,n)&&e.ref===t.ref)return dn(e,t,i)}return t.flags|=1,e=Gn(a,n),e.ref=t.ref,e.return=t,t.child=e}function rk(e,t,r,n,i){if(e!==null){var a=e.memoizedProps;if(Gs(a,n)&&e.ref===t.ref)if(At=!1,t.pendingProps=n=a,(e.lanes&i)!==0)e.flags&131072&&(At=!0);else return t.lanes=e.lanes,dn(e,t,i)}return Qp(e,t,r,n,i)}function nk(e,t,r){var n=t.pendingProps,i=n.children,a=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},_e(Pa,Dt),Dt|=r;else{if(!(r&1073741824))return e=a!==null?a.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,_e(Pa,Dt),Dt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=a!==null?a.baseLanes:r,_e(Pa,Dt),Dt|=n}else a!==null?(n=a.baseLanes|r,t.memoizedState=null):n=r,_e(Pa,Dt),Dt|=n;return bt(e,t,i,r),t.child}function ik(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Qp(e,t,r,n,i){var a=Tt(r)?Di:vt.current;return a=Ka(t,a),La(t,i),r=Mv(e,t,r,n,a,i),n=Dv(),e!==null&&!At?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,dn(e,t,i)):(Ae&&n&&jv(t),t.flags|=1,bt(e,t,r,i),t.child)}function bb(e,t,r,n,i){if(Tt(r)){var a=!0;kc(t)}else a=!1;if(La(t,i),t.stateNode===null)cc(e,t),Zj(t,r,n),Yp(t,r,n,i),n=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var l=o.context,u=r.contextType;typeof u=="object"&&u!==null?u=or(u):(u=Tt(r)?Di:vt.current,u=Ka(t,u));var f=r.getDerivedStateFromProps,d=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==n||l!==u)&&hb(t,o,n,u),En=!1;var h=t.memoizedState;o.state=h,Nc(t,n,o,i),l=t.memoizedState,s!==n||h!==l||Nt.current||En?(typeof f=="function"&&(Jp(t,r,f,n),l=t.memoizedState),(s=En||fb(t,r,s,n,h,l,u))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),o.props=n,o.state=l,o.context=u,n=s):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,Cj(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:pr(t.type,s),o.props=u,d=t.pendingProps,h=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=or(l):(l=Tt(r)?Di:vt.current,l=Ka(t,l));var p=r.getDerivedStateFromProps;(f=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==d||h!==l)&&hb(t,o,n,l),En=!1,h=t.memoizedState,o.state=h,Nc(t,n,o,i);var m=t.memoizedState;s!==d||h!==m||Nt.current||En?(typeof p=="function"&&(Jp(t,r,p,n),m=t.memoizedState),(u=En||fb(t,r,u,n,h,m,l)||!1)?(f||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,m,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,m,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=m),o.props=n,o.state=m,o.context=l,n=u):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),n=!1)}return Zp(e,t,r,n,a,i)}function Zp(e,t,r,n,i,a){ik(e,t);var o=(t.flags&128)!==0;if(!n&&!o)return i&&ib(t,r,!1),dn(e,t,a);n=t.stateNode,i2.current=t;var s=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&o?(t.child=Ga(t,e.child,null,a),t.child=Ga(t,null,s,a)):bt(e,t,s,a),t.memoizedState=n.state,i&&ib(t,r,!0),t.child}function ak(e){var t=e.stateNode;t.pendingContext?nb(e,t.pendingContext,t.pendingContext!==t.context):t.context&&nb(e,t.context,!1),Cv(e,t.containerInfo)}function xb(e,t,r,n,i){return qa(),Ov(i),t.flags|=256,bt(e,t,r,n),t.child}var em={dehydrated:null,treeContext:null,retryLane:0};function tm(e){return{baseLanes:e,cachePool:null,transitions:null}}function ok(e,t,r){var n=t.pendingProps,i=Ne.current,a=!1,o=(t.flags&128)!==0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),_e(Ne,i&1),e===null)return Gp(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=n.children,e=n.fallback,a?(n=t.mode,a=t.child,o={mode:"hidden",children:o},!(n&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=sf(o,n,0,null),e=Ni(e,n,r,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=tm(r),t.memoizedState=em,e):Uv(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return a2(e,t,o,n,s,i,r);if(a){a=n.fallback,o=t.mode,i=e.child,s=i.sibling;var l={mode:"hidden",children:n.children};return!(o&1)&&t.child!==i?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=Gn(i,l),n.subtreeFlags=i.subtreeFlags&14680064),s!==null?a=Gn(s,a):(a=Ni(a,o,r,null),a.flags|=2),a.return=t,n.return=t,n.sibling=a,t.child=n,n=a,a=t.child,o=e.child.memoizedState,o=o===null?tm(r):{base
vendor: 7,375 bytes, line 40
40Lanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~r,t.memoizedState=em,n}return a=e.child,e=a.sibling,n=Gn(a,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function Uv(e,t){return t=sf({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Au(e,t,r,n){return n!==null&&Ov(n),Ga(t,e.child,null,r),e=Uv(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function a2(e,t,r,n,i,a,o){if(r)return t.flags&256?(t.flags&=-257,n=Ah(Error(z(422))),Au(e,t,o,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=n.fallback,i=t.mode,n=sf({mode:"visible",children:n.children},i,0,null),a=Ni(a,i,o,null),a.flags|=2,n.return=t,a.return=t,n.sibling=a,t.child=n,t.mode&1&&Ga(t,e.child,null,o),t.child.memoizedState=tm(o),t.memoizedState=em,a);if(!(t.mode&1))return Au(e,t,o,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var s=n.dgst;return n=s,a=Error(z(419)),n=Ah(a,n,void 0),Au(e,t,o,n)}if(s=(o&e.childLanes)!==0,At||s){if(n=rt,n!==null){switch(o&-o){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(n.suspendedLanes|o)?0:i,i!==0&&i!==a.retryLane&&(a.retryLane=i,cn(e,i),kr(n,e,i,-1))}return qv(),n=Ah(Error(z(421))),Au(e,t,o,n)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=y2.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,zt=Wn(i.nextSibling),Wt=t,Ae=!0,br=null,e!==null&&(Zt[er++]=Xr,Zt[er++]=Qr,Zt[er++]=Li,Xr=e.id,Qr=e.overflow,Li=t),t=Uv(t,n.children),t.flags|=4096,t)}function wb(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Vp(e.return,t,r)}function Ph(e,t,r,n,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=n,a.tail=r,a.tailMode=i)}function sk(e,t,r){var n=t.pendingProps,i=n.revealOrder,a=n.tail;if(bt(e,t,n.children,r),n=Ne.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&wb(e,r,t);else if(e.tag===19)wb(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(_e(Ne,n),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(r=t.child,i=null;r!==null;)e=r.alternate,e!==null&&Tc(e)===null&&(i=r),r=r.sibling;r=i,r===null?(i=t.child,t.child=null):(i=r.sibling,r.sibling=null),Ph(t,!1,i,r,a);break;case"backwards":for(r=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Tc(e)===null){t.child=i;break}e=i.sibling,i.sibling=r,r=i,i=e}Ph(t,!0,r,null,a);break;case"together":Ph(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function cc(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function dn(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Ui|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(z(153));if(t.child!==null){for(e=t.child,r=Gn(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Gn(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function o2(e,t,r){switch(t.tag){case 3:ak(t),qa();break;case 5:$j(t);break;case 1:Tt(t.type)&&kc(t);break;case 4:Cv(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,i=t.memoizedProps.value;_e(Ac,n._currentValue),n._currentValue=i;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(_e(Ne,Ne.current&1),t.flags|=128,null):r&t.child.childLanes?ok(e,t,r):(_e(Ne,Ne.current&1),e=dn(e,t,r),e!==null?e.sibling:null);_e(Ne,Ne.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return sk(e,t,r);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),_e(Ne,Ne.current),n)break;return null;case 22:case 23:return t.lanes=0,nk(e,t,r)}return dn(e,t,r)}var lk,rm,uk,ck;lk=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};rm=function(){};uk=function(e,t,r,n){var i=e.memoizedProps;if(i!==n){e=t.stateNode,_i(Dr.current);var a=null;switch(r){case"input":i=jp(e,i),n=jp(e,n),a=[];break;case"select":i=Ce({},i,{value:void 0}),n=Ce({},n,{value:void 0}),a=[];break;case"textarea":i=Ep(e,i),n=Ep(e,n),a=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=Sc)}Pp(r,n);var o;r=null;for(u in i)if(!n.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var s=i[u];for(o in s)s.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Us.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in n){var l=n[u];if(s=i!=null?i[u]:void 0,n.hasOwnProperty(u)&&l!==s&&(l!=null||s!=null))if(u==="style")if(s){for(o in s)!s.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in l)l.hasOwnProperty(o)&&s[o]!==l[o]&&(r||(r={}),r[o]=l[o])}else r||(a||(a=[]),a.push(u,r)),r=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(a=a||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(a=a||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Us.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&Se("scroll",e),a||s===l||(a=[])):(a=a||[]).push(u,l))}r&&(a=a||[]).push("style",r);var u=a;(t.updateQueue=u)&&(t.flags|=4)}};ck=function(e,t,r,n){r!==n&&(t.flags|=4)};function Qo(e,t){if(!Ae)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function ft(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function s2(e,t,r){var n=t.pendingProps;switch(kv(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ft(t),null;case 1:return Tt(t.type)&&jc(),ft(t),null;case 3:return n=t.stateNode,Va(),Oe(Nt),Oe(vt),Iv(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ou(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,br!==null&&(cm(br),br=null))),rm(e,t),ft(t),null;case 5:$v(t);
vendor: 32,533 bytes, line 40
40var i=_i(Qs.current);if(r=t.type,e!==null&&t.stateNode!=null)uk(e,t,r,n,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(z(166));return ft(t),null}if(e=_i(Dr.current),Ou(t)){n=t.stateNode,r=t.type;var a=t.memoizedProps;switch(n[Ir]=t,n[Ys]=a,e=(t.mode&1)!==0,r){case"dialog":Se("cancel",n),Se("close",n);break;case"iframe":case"object":case"embed":Se("load",n);break;case"video":case"audio":for(i=0;i<vs.length;i++)Se(vs[i],n);break;case"source":Se("error",n);break;case"img":case"image":case"link":Se("error",n),Se("load",n);break;case"details":Se("toggle",n);break;case"input":N0(n,a),Se("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!a.multiple},Se("invalid",n);break;case"textarea":C0(n,a),Se("invalid",n)}Pp(r,a),i=null;for(var o in a)if(a.hasOwnProperty(o)){var s=a[o];o==="children"?typeof s=="string"?n.textContent!==s&&(a.suppressHydrationWarning!==!0&&ku(n.textContent,s,e),i=["children",s]):typeof s=="number"&&n.textContent!==""+s&&(a.suppressHydrationWarning!==!0&&ku(n.textContent,s,e),i=["children",""+s]):Us.hasOwnProperty(o)&&s!=null&&o==="onScroll"&&Se("scroll",n)}switch(r){case"input":vu(n),T0(n,a,!0);break;case"textarea":vu(n),$0(n);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(n.onclick=Sc)}n=i,t.updateQueue=n,n!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=LS(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[Ir]=t,e[Ys]=n,lk(e,t,!1,!1),t.stateNode=e;e:{switch(o=Np(r,n),r){case"dialog":Se("cancel",e),Se("close",e),i=n;break;case"iframe":case"object":case"embed":Se("load",e),i=n;break;case"video":case"audio":for(i=0;i<vs.length;i++)Se(vs[i],e);i=n;break;case"source":Se("error",e),i=n;break;case"img":case"image":case"link":Se("error",e),Se("load",e),i=n;break;case"details":Se("toggle",e),i=n;break;case"input":N0(e,n),i=jp(e,n),Se("invalid",e);break;case"option":i=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},i=Ce({},n,{value:void 0}),Se("invalid",e);break;case"textarea":C0(e,n),i=Ep(e,n),Se("invalid",e);break;default:i=n}Pp(r,i),s=i;for(a in s)if(s.hasOwnProperty(a)){var l=s[a];a==="style"?FS(e,l):a==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&BS(e,l)):a==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&Fs(e,l):typeof l=="number"&&Fs(e,""+l):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(Us.hasOwnProperty(a)?l!=null&&a==="onScroll"&&Se("scroll",e):l!=null&&cv(e,a,l,o))}switch(r){case"input":vu(e),T0(e,n,!1);break;case"textarea":vu(e),$0(e);break;case"option":n.value!=null&&e.setAttribute("value",""+Xn(n.value));break;case"select":e.multiple=!!n.multiple,a=n.value,a!=null?Ia(e,!!n.multiple,a,!1):n.defaultValue!=null&&Ia(e,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Sc)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ft(t),null;case 6:if(e&&t.stateNode!=null)ck(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(z(166));if(r=_i(Qs.current),_i(Dr.current),Ou(t)){if(n=t.stateNode,r=t.memoizedProps,n[Ir]=t,(a=n.nodeValue!==r)&&(e=Wt,e!==null))switch(e.tag){case 3:ku(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ku(n.nodeValue,r,(e.mode&1)!==0)}a&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Ir]=t,t.stateNode=n}return ft(t),null;case 13:if(Oe(Ne),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ae&&zt!==null&&t.mode&1&&!(t.flags&128))Aj(),qa(),t.flags|=98560,a=!1;else if(a=Ou(t),n!==null&&n.dehydrated!==null){if(e===null){if(!a)throw Error(z(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(z(317));a[Ir]=t}else qa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ft(t),a=!1}else br!==null&&(cm(br),br=null),a=!0;if(!a)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||Ne.current&1?Ye===0&&(Ye=3):qv())),t.updateQueue!==null&&(t.flags|=4),ft(t),null);case 4:return Va(),rm(e,t),e===null&&Vs(t.stateNode.containerInfo),ft(t),null;case 10:return Pv(t.type._context),ft(t),null;case 17:return Tt(t.type)&&jc(),ft(t),null;case 19:if(Oe(Ne),a=t.memoizedState,a===null)return ft(t),null;if(n=(t.flags&128)!==0,o=a.rendering,o===null)if(n)Qo(a,!1);else{if(Ye!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Tc(e),o!==null){for(t.flags|=128,Qo(a,!1),n=o.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)a=r,e=n,a.flags&=14680066,o=a.alternate,o===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=o.childLanes,a.lanes=o.lanes,a.child=o.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=o.memoizedProps,a.memoizedState=o.memoizedState,a.updateQueue=o.updateQueue,a.type=o.type,e=o.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return _e(Ne,Ne.current&1|2),t.child}e=e.sibling}a.tail!==null&&Le()>Ya&&(t.flags|=128,n=!0,Qo(a,!1),t.lanes=4194304)}else{if(!n)if(e=Tc(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Qo(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!Ae)return ft(t),null}else 2*Le()-a.renderingStartTime>Ya&&r!==1073741824&&(t.flags|=128,n=!0,Qo(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(r=a.last,r!==null?r.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Le(),t.sibling=null,r=Ne.current,_e(Ne,n?r&1|2:r&1),t):(ft(t),null);case 22:case 23:return Kv(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Dt&1073741824&&(ft(t),t.subtreeFlags&6&&(t.flags|=8192)):ft(t),null;case 24:return null;case 25:return null}throw Error(z(156,t.tag))}function l2(e,t){switch(kv(t),t.tag){case 1:return Tt(t.type)&&jc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Va(),Oe(Nt),Oe(vt),Iv(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return $v(t),null;case 13:if(Oe(Ne),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(z(340));qa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Oe(Ne),null;case 4:return Va(),null;case 10:return Pv(t.type._context),null;case 22:case 23:return Kv(),null;case 24:return null;default:return null}}var Pu=!1,pt=!1,u2=typeof WeakSet=="function"?WeakSet:Set,V=null;function Aa(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Re(e,t,n)}else r.current=null}function nm(e,t,r){try{r()}catch(n){Re(e,t,n)}}var _b=!1;function c2(e,t){if(Up=xc,e=mj(),Sv(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var o=0,s=-1,l=-1,u=0,f=0,d=e,h=null;t:for(;;){for(var p;d!==r||i!==0&&d.nodeType!==3||(s=o+i),d!==a||n!==0&&d.nodeType!==3||(l=o+n),d.nodeType===3&&(o+=d.nodeValue.length),(p=d.firstChild)!==null;)h=d,d=p;for(;;){if(d===e)break t;if(h===r&&++u===i&&(s=o),h===a&&++f===n&&(l=o),(p=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=p}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Fp={focusedElem:e,selectionRange:r},xc=!1,V=t;V!==null;)if(t=V,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,V=e;else for(;V!==null;){t=V;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var v=m.memoizedProps,b=m.memoizedState,g=t.stateNode,y=g.getSnapshotBeforeUpdate(t.elementType===t.type?v:pr(t.type,v),b);g.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(z(163))}}catch(S){Re(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,V=e;break}V=t.return}return m=_b,_b=!1,m}function As(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&nm(t,r,a)}i=i.next}while(i!==n)}}function af(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function im(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function dk(e){var t=e.alternate;t!==null&&(e.alternate=null,dk(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ir],delete t[Ys],delete t[Hp],delete t[qT],delete t[GT])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function fk(e){return e.tag===5||e.tag===3||e.tag===4}function Sb(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||fk(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function am(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Sc));else if(n!==4&&(e=e.child,e!==null))for(am(e,t,r),e=e.sibling;e!==null;)am(e,t,r),e=e.sibling}function om(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(om(e,t,r),e=e.sibling;e!==null;)om(e,t,r),e=e.sibling}var st=null,gr=!1;function kn(e,t,r){for(r=r.child;r!==null;)hk(e,t,r),r=r.sibling}function hk(e,t,r){if(Mr&&typeof Mr.onCommitFiberUnmount=="function")try{Mr.onCommitFiberUnmount(Yd,r)}catch{}switch(r.tag){case 5:pt||Aa(r,t);case 6:var n=st,i=gr;st=null,kn(e,t,r),st=n,gr=i,st!==null&&(gr?(e=st,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):st.removeChild(r.stateNode));break;case 18:st!==null&&(gr?(e=st,r=r.stateNode,e.nodeType===8?_h(e.parentNode,r):e.nodeType===1&&_h(e,r),Ks(e)):_h(st,r.stateNode));break;case 4:n=st,i=gr,st=r.stateNode.containerInfo,gr=!0,kn(e,t,r),st=n,gr=i;break;case 0:case 11:case 14:case 15:if(!pt&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&nm(r,t,o),i=i.next}while(i!==n)}kn(e,t,r);break;case 1:if(!pt&&(Aa(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){Re(r,t,s)}kn(e,t,r);break;case 21:kn(e,t,r);break;case 22:r.mode&1?(pt=(n=pt)||r.memoizedState!==null,kn(e,t,r),pt=n):kn(e,t,r);break;default:kn(e,t,r)}}function jb(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new u2),t.forEach(function(n){var i=b2.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function dr(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var i=r[n];try{var a=e,o=t,s=o;e:for(;s!==null;){switch(s.tag){case 5:st=s.stateNode,gr=!1;break e;case 3:st=s.stateNode.containerInfo,gr=!0;break e;case 4:st=s.stateNode.containerInfo,gr=!0;break e}s=s.return}if(st===null)throw Error(z(160));hk(a,o,i),st=null,gr=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){Re(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)pk(t,e),t=t.sibling}function pk(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(dr(t,e),Ar(e),n&4){try{As(3,e,e.return),af(3,e)}catch(v){Re(e,e.return,v)}try{As(5,e,e.return)}catch(v){Re(e,e.return,v)}}break;case 1:dr(t,e),Ar(e),n&512&&r!==null&&Aa(r,r.return);break;case 5:if(dr(t,e),Ar(e),n&512&&r!==null&&Aa(r,r.return),e.flags&32){var i=e.stateNode;try{Fs(i,"")}catch(v){Re(e,e.return,v)}}if(n&4&&(i=e.stateNode,i!=null)){var a=e.memoizedProps,o=r!==null?r.memoizedProps:a,s=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{s==="input"&&a.type==="radio"&&a.name!=null&&MS(i,a),Np(s,o);var u=Np(s,a);for(o=0;o<l.length;o+=2){var f=l[o],d=l[o+1];f==="style"?FS(i,d):f==="dangerouslySetInnerHTML"?BS(i,d):f==="children"?Fs(i,d):cv(i,f,d,u)}switch(s){case"input":kp(i,a);break;case"textarea":DS(i,a);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var p=a.value;p!=null?Ia(i,!!a.multiple,p,!1):h!==!!a.multiple&&(a.defaultValue!=null?Ia(i,!!a.multiple,a.defaultValue,!0):Ia(i,!!a.multiple,a.multiple?[]:"",!1))}i[Ys]=a}catch(v){Re(e,e.return,v)}}break;case 6:if(dr(t,e),Ar(e),n&4){if(e.stateNode===null)throw Error(z(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(v){Re(e,e.return,v)}}break;case 3:if(dr(t,e),Ar(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Ks(t.containerInfo)}catch(v){Re(e,e.return,v)}break;case 4:dr(t,e),Ar(e);break;case 13:dr(t,e),Ar(e),i=e.child,i.flags&8192&&(a=i.memoizedState!==null,i.stateNode.isHidden=a,!a||i.alternate!==null&&i.alternate.memoizedState!==null||(Wv=Le())),n&4&&jb(e);break;case 22:if(f=r!==null&&r.memoizedState!==null,e.mode&1?(pt=(u=pt)||f,dr(t,e),pt=u):dr(t,e),Ar(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!f&&e.mode&1)for(V=e,f=e.child;f!==null;){for(d=V=f;V!==null;){switch(h=V,p=h.child,h.tag){case 0:case 11:case 14:case 15:As(4,h,h.return);break;case 1:Aa(h,h.return);var m=h.stateNode;if(typeof m.componentWillUnmount=="function"){n=h,r=h.return;try{t=n,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(v){Re(n,r,v)}}break;case 5:Aa(h,h.return);break;case 22:if(h.memoizedState!==null){Ob(d);continue}}p!==null?(p.return=h,V=p):Ob(d)}f=f.sibling}e:for(f=null,d=e;;){if(d.tag===5){if(f===null){f=d;try{i=d.stateNode,u?(a=i.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(s=d.stateNode,l=d.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,s.style.display=US("display",o))}catch(v){Re(e,e.return,v)}}}else if(d.tag===6){if(f===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(v){Re(e,e.return,v)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;f===d&&(f=null),d=d.return}f===d&&(f=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:dr(t,e),Ar(e),n&4&&jb(e);break;case 21:break;default:dr(t,e),Ar(e)}}function Ar(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(fk(r)){var n=r;break e}r=r.return}throw Error(z(160))}switch(n.tag){case 5:var i=n.stateNode;n.flags&32&&(Fs(i,""),n.flags&=-33);var a=Sb(e);om(e,a,i);break;case 3:case 4:var o=n.stateNode.containerInfo,s=Sb(e);am(e,s,o);break;default:throw Error(z(161))}}catch(l){Re(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function d2(e,t,r){V=e,mk(e)}function mk(e,t,r){for(var n=(e.mode&1)!==0;V!==null;){var i=V,a=i.child;if(i.tag===22&&n){var o=i.memoizedState!==null||Pu;if(!o){var s=i.alternate,l=s!==null&&s.memoizedState!==null||pt;s=Pu;var u=pt;if(Pu=o,(pt=l)&&!u)for(V=i;V!==null;)o=V,l=o.child,o.tag===22&&o.memoizedState!==null?Eb(i):l!==null?(l.return=o,V=l):Eb(i);for(;a!==null;)V=a,mk(a),a=a.sibling;V=i,Pu=s,pt=u}kb(e)}else i.subtreeFlags&8772&&a!==null?(a.return=i,V=a):kb(e)}}function kb(e){for(;V!==null;){var t=V;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:pt||af(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!pt)if(r===null)n.componentDidMount();else{var i=t.elementType===t.type?r.memoizedProps:pr(t.type,r.memoizedProps);n.componentDidUpdate(i,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&ub(t,a,n);break;case 3:var o=t.updateQueue;if(o!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}ub(t,o,r)}break;case 5:var s=t.stateNode;if(r===null&&t.flags&4){r=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var f=u.memoizedState;if(f!==null){var d=f.dehydrated;d!==null&&Ks(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(z(163))}pt||t.flags&512&&im(t)}catch(h){Re(t,t.return,h)}}if(t===e){V=null;break}if(r=t.sibling,r!==null){r.return=t.return,V=r;break}V=t.return}}function Ob(e){for(;V!==null;){var t=V;if(t===e){V=null;break}var r=t.sibling;if(r!==null){r.return=t.return,V=r;break}V=t.return}}function Eb(e){for(;V!==null;){var t=V;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{af(4,t)}catch(l){Re(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var i=t.return;try{n.componentDidMount()}catch(l){Re(t,i,l)}}var a=t.return;try{im(t)}catch(l){Re(t,a,l)}break;case 5:var o=t.return;try{im(t)}catch(l){Re(t,o,l)}}}catch(l){Re(t,t.return,l)}if(t===e){V=null;break}var s=t.sibling;if(s!==null){s.return=t.return,V=s;break}V=t.return}}var f2=Math.ceil,Ic=vn.ReactCurrentDispatcher,Fv=vn.ReactCurrentOwner,nr=vn.ReactCurrentBatchConfig,ce=0,rt=null,We=null,ut=0,Dt=0,Pa=ei(0),Ye=0,rl=null,Ui=0,of=0,zv=0,Ps=null,Et=null,Wv=0,Ya=1/0,Gr=null,Rc=!1,sm=null,Kn=null,Nu=!1,Rn=null,Mc=0,Ns=0,lm=null,dc=-1,fc=0;function wt(){return ce&6?Le():dc!==-1?dc:dc=Le()}function qn(e){return e.mode&1?ce&2&&ut!==0?ut&-ut:JT.transition!==null?(fc===0&&(fc=ZS()),fc):(e=pe,e!==0||(e=window.event,e=e===void 0?16:oj(e.type)),e):1}function kr(e,t,r,n){if(50<Ns)throw Ns=0,lm=null,Error(z(185));Xl(e,r,n),(!(ce&2)||e!==rt)&&(e===rt&&(!(ce&2)&&(of|=r),Ye===4&&Nn(e,ut)),Ct(e,n),r===1&&ce===0&&!(t.mode&1)&&(Ya=Le()+500,tf&&ti()))}function Ct(e,t){var r=e.callbackNode;JN(e,t);var n=bc(e,e===rt?ut:0);if(n===0)r!==null&&M0(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&M0(r),t===1)e.tag===0?VT(Ab.bind(null,e)):kj(Ab.bind(null,e)),HT(function(){!(ce&6)&&ti()}),r=null;else{switch(ej(n)){case 1:r=mv;break;case 4:r=XS;break;case 16:r=yc;break;case 536870912:r=QS;break;default:r=yc}r=Sk(r,gk.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function gk(e,t){if(dc=-1,fc=0,ce&6)throw Error(z(327));var r=e.callbackNode;if(Ba()&&e.callbackNode!==r)return null;var n=bc(e,e===rt?ut:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=Dc(e,n);else{t=n;var i=ce;ce|=2;var a=yk();(rt!==e||ut!==t)&&(Gr=null,Ya=Le()+500,Pi(e,t));do try{m2();break}catch(s){vk(e,s)}while(!0);Av(),Ic.current=a,ce=i,We!==null?t=0:(rt=null,ut=0,t=Ye)}if(t!==0){if(t===2&&(i=Rp(e),i!==0&&(n=i,t=um(e,i))),t===1)throw r=rl,Pi(e,0),Nn(e,n),Ct(e,Le()),r;if(t===6)Nn(e,n);else{if(i=e.current.alternate,!(n&30)&&!h2(i)&&(t=Dc(e,n),t===2&&(a=Rp(e),a!==0&&(n=a,t=um(e,a))),t===1))throw r=rl,Pi(e,0),Nn(e,n),Ct(e,Le()),r;switch(e.finishedWork=i,e.finishedLanes=n,t){case 0:case 1:throw Error(z(345));case 2:mi(e,Et,Gr);break;case 3:if(Nn(e,n),(n&130023424)===n&&(t=Wv+500-Le(),10<t)){if(bc(e,0)!==0)break;if(i=e.suspendedLanes,(i&n)!==n){wt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Wp(mi.bind(null,e,Et,Gr),t);break}mi(e,Et,Gr);break;case 4:if(Nn(e,n),(n&4194240)===n)break;for(t=e.eventTimes,i=-1;0<n;){var o=31-jr(n);a=1<<o,o=t[o],o>i&&(i=o),n&=~a}if(n=i,n=Le()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*f2(n/1960))-n,10<n){e.timeoutHandle=Wp(mi.bind(null,e,Et,Gr),n);break}mi(e,Et,Gr);break;case 5:mi(e,Et,Gr);break;default:throw Error(z(329))}}}return Ct(e,Le()),e.callbackNode===r?gk.bind(null,e):null}function um(e,t){var r=Ps;return e.current.memoizedState.isDehydrated&&(Pi(e,t).flags|=256),e=Dc(e,t),e!==2&&(t=Et,Et=r,t!==null&&cm(t)),e}function cm(e){Et===null?Et=e:Et.push.apply(Et,e)}function h2(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var i=r[n],a=i.getSnapshot;i=i.value;try{if(!Or(a(),i))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Nn(e,t){for(t&=~zv,t&=~of,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-jr(t),n=1<<r;e[r]=-1,t&=~n}}function Ab(e){if(ce&6)throw Error(z(327));Ba();var t=bc(e,0);if(!(t&1))return Ct(e,Le()),null;var r=Dc(e,t);if(e.tag!==0&&r===2){var n=Rp(e);n!==0&&(t=n,r=um(e,n))}if(r===1)throw r=rl,Pi(e,0),Nn(e,t),Ct(e,Le()),r;if(r===6)throw Error(z(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,mi(e,Et,Gr),Ct(e,Le()),null}function Hv(e,t){var r=ce;ce|=1;try{return e(t)}finally{ce=r,ce===0&&(Ya=Le()+500,tf&&ti())}}function Fi(e){Rn!==null&&Rn.tag===0&&!(ce&6)&&Ba();var t=ce;ce|=1;var r=nr.transition,n=pe;try{if(nr.transition=null,pe=1,e)return e()}finally{pe=n,nr.transition=r,ce=t,!(ce&6)&&ti()}}function Kv(){Dt=Pa.current,Oe(Pa)}function Pi(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,WT(r)),We!==null)for(r=We.return;r!==null;){var n=r;switch(kv(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&jc();break;case 3:Va(),Oe(Nt),Oe(vt),Iv();break;case 5:$v(n);break;case 4:Va();break;case 13:Oe(Ne);break;case 19:Oe(Ne);break;case 10:Pv(n.type._context);break;case 22:case 23:Kv()}r=r.return}if(rt=e,We=e=Gn(e.current,null),ut=Dt=t,Ye=0,rl=null,zv=of=Ui=0,Et=Ps=null,wi!==null){for(t=0;t<wi.length;t++)if(r=wi[t],n=r.interleaved,n!==null){r.interleaved=null;var i=n.next,a=r.pending;if(a!==null){var o=a.next;a.next=i,n.next=o}r.pending=n}wi=null}return e}function vk(e,t){do{var r=We;try{if(Av(),lc.current=$c,Cc){for(var n=Te.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}Cc=!1}if(Bi=0,tt=Je=Te=null,Es=!1,Zs=0,Fv.current=null,r===null||r.return===null){Ye=1,rl=t,We=null;break}e:{var a=e,o=r.return,s=r,l=t;if(t=ut,s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,f=s,d=f.tag;if(!(f.mode&1)&&(d===0||d===11||d===15)){var h=f.alternate;h?(f.updateQueue=h.updateQueue,f.memoizedState=h.memoizedState,f.lanes=h.lanes):(f.updateQueue=null,f.memoizedState=null)}var p=mb(o);if(p!==null){p.flags&=-257,gb(p,o,s,a,t),p.mode&1&&pb(a,u,t),t=p,l=u;var m=t.updateQueue;if(m===null){var v=new Set;v.add(l),t.updateQueue=v}else m.add(l);break e}else{if(!(t&1)){pb(a,u,t),qv();break e}l=Error(z(426))}}else if(Ae&&s.mode&1){var b=mb(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),gb(b,o,s,a,t),Ov(Ja(l,s));break e}}a=l=Ja(l,s),Ye!==4&&(Ye=2),Ps===null?Ps=[a]:Ps.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var g=ek(a,l,t);lb(a,g);break e;case 1:s=l;var y=a.type,x=a.stateNode;if(!(a.flags&128)&&(typeof y.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Kn===null||!Kn.has(x)))){a.flags|=65536,t&=-t,a.lanes|=t;var S=tk(a,s,t);lb(a,S);break e}}a=a.return}while(a!==null)}xk(r)}catch(_){t=_,We===r&&r!==null&&(We=r=r.return);continue}break}while(!0)}function yk(){var e=Ic.current;return Ic.current=$c,e===null?$c:e}function qv(){(Ye===0||Ye===3||Ye===2)&&(Ye=4),rt===null||!(Ui&268435455)&&!(of&268435455)||Nn(rt,ut)}function Dc(e,t){var r=ce;ce|=2;var n=yk();(rt!==e||ut!==t)&&(Gr=null,Pi(e,t));do try{p2();break}catch(i){vk(e,i)}while(!0);if(Av(),ce=r,Ic.current=n,We!==null)throw Error(z(261));return rt=null,ut=0,Ye}function p2(){for(;We!==null;)bk(We)}function m2(){for(;We!==null&&!UN();)bk(We)}function bk(e){var t=_k(e.alternate,e,Dt);e.memoizedProps=e.pendingProps,t===null?xk(e):We=t,Fv.current=null}function xk(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=l2(r,t),r!==null){r.flags&=32767,We=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ye=6,We=null;return}}else if(r=s2(r,t,Dt),r!==null){We=r;return}if(t=t.sibling,t!==null){We=t;return}We=t=e}while(t!==null);Ye===0&&(Ye=5)}function mi(e,t,r){var n=pe,i=nr.transition;try{nr.transition=null,pe=1,g2(e,t,r,n)}finally{nr.transition=i,pe=n}return null}function g2(e,t,r,n){do Ba();while(Rn!==null);if(ce&6)throw Error(z(327));r=e.finishedWork;var i=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(z(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(YN(e,a),e===rt&&(We=rt=null,ut=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Nu||(Nu=!0,Sk(yc,function(){return Ba(),null})),a=(r.flags&15990)!==0,r.subtreeFlags&15990||a){a=nr.transition,nr.transition=null;var o=pe;pe=1;var s=ce;ce|=4,Fv.current=null,c2(e,r),pk(r,e),MT(Fp),xc=!!Up,Fp=Up=null,e.current=r,d2(r),FN(),ce=s,pe=o,nr.transition=a}else e.current=r;if(Nu&&(Nu=!1,Rn=e,Mc=i),a=e.pendingLanes,a===0&&(Kn=null),HN(r.stateNode),Ct(e,Le()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)i=t[r],n(i.value,{componentStack:i.stack,digest:i.digest});if(Rc)throw Rc=!1,e=sm,sm=null,e;return Mc&1&&e.tag!==0&&Ba(),a=e.pendingLanes,a&1?e===lm?Ns++:(Ns=0,lm=e):Ns=0,ti(),null}function Ba(){if(Rn!==null){var e=ej(Mc),t=nr.transition,r=pe;try{if(nr.transition=null,pe=16>e?16:e,Rn===null)var n=!1;else{if(e=Rn,Rn=null,Mc=0,ce&6)throw Error(z(331));var i=ce;for(ce|=4,V=e.current;V!==null;){var a=V,o=a.child;if(V.flags&16){var s=a.deletions;if(s!==null){for(var l=0;l<s.length;l++){var u=s[l];for(V=u;V!==null;){var f=V;switch(f.tag){case 0:case 11:case 15:As(8,f,a)}var d=f.child;if(d!==null)d.return=f,V=d;else for(;V!==null;){f=V;var h=f.sibling,p=f.return;if(dk(f),f===u){V=null;break}if(h!==null){h.return=p,V=h;break}V=p}}}var m=a.alternate;if(m!==null){var v=m.child;if(v!==null){m.child=null;do{var b=v.sibling;v.sibling=null,v=b}while(v!==null)}}V=a}}if(a.subtreeFlags&2064&&o!==null)o.return=a,V=o;else e:for(;V!==null;){if(a=V,a.flags&2048)switch(a.tag){case 0:case 11:case 15:As(9,a,a.return)}var g=a.sibling;if(g!==null){g.return=a.return,V=g;break e}V=a.return}}var y=e.current;for(V=y;V!==null;){o=V;var x=o.child;if(o.subtreeFlags&2064&&x!==null)x.return=o,V=x;else e:for(o=y;V!==null;){if(s=V,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:af(9,s)}}catch(_){Re(s,s.return,_)}if(s===o){V=null;break e}var S=s.sibling;if(S!==null){S.return=s.return,V=S;break e}V=s.return}}if(ce=i,ti(),Mr&&typeof Mr.onPostCommitFiberRoot=="function")try{Mr.onPostCommitFiberRoot(Yd,e)}catch{}n=!0}return n}finally{pe=r,nr.transition=t}}return!1}function Pb(e,t,r){t=Ja(r,t),t=ek(e,t,1),e=Hn(e,t,1),t=wt(),e!==null&&(Xl(e,1,t),Ct(e,t))}function Re(e,t,r){if(e.tag===3)Pb(e,e,r);else for(;t!==null;){if(t.tag===3){Pb(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Kn===null||!Kn.has(n))){e=Ja(r,e),e=tk(t,e,1),t=Hn(t,e,1),e=wt(),t!==null&&(Xl(t,1,e),Ct(t,e));break}}t=t.return}}function v2(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=wt(),e.pingedLanes|=e.suspendedLanes&r,rt===e&&(ut&r)===r&&(Ye===4||Ye===3&&(ut&130023424)===ut&&500>Le()-Wv?Pi(e,0):zv|=r),Ct(e,t)}function wk(e,t){t===0&&(e.mode&1?(t=xu,xu<<=1,!(xu&130023424)&&(xu=4194304)):t=1);var r=wt();e=cn(e,t),e!==null&&(Xl(e,t,r),Ct(e,r))}function y2(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),wk(e,r)}function b2(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(z(314))}n!==null&&n.delete(t),wk(e,r)}var _k;_k=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Nt.current)At=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return At=!1,o2(e,t,r);At=!!(e.flags&131072)}else At=!1,Ae&&t.flags&1048576&&Oj(t,Ec,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;cc(e,t),e=t.pendingProps;var i=Ka(t,vt.current);La(t,r),i=Mv(null,t,n,e,i,r);var a=Dv();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Tt(n)?(a=!0,kc(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Tv(t),i.updater=nf,t.stateNode=i,i._reactInternals=t,Yp(t,n,e,r),t=Zp(null,t,n,!0,a,r)):(t.tag=0,Ae&&a&&jv(t),bt(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(cc(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=w2(n),e=pr(n,e),i){case 0:t=Qp(null,t,n,e,r);break e;case 1:t=bb(null,t,n,e,r);break e;case 11:t=vb(null,t,n,e,r);break e;case 14:t=yb(null,t,n,pr(n.type,e),r);break e}throw Error(z(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:pr(n,i),Qp(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:pr(n,i),bb(e,t,n,i,r);case 3:e:{if(ak(t),e===null)throw Error(z(387));n=t.pendingProps,a=t.memoizedState,i=a.element,Cj(e,t),Nc(t,n,null,r);var o=t.memoizedState;if(n=o.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=Ja(Error(z(423)),t),t=xb(e,t,n,r,i);break e}else if(n!==i){i=Ja(Error(z(424)),t),t=xb(e,t,n,r,i);break e}else for(zt=Wn(t.stateNode.containerInfo.firstChild),Wt=t,Ae=!0,br=null,r=Nj(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(qa(),n===i){t=dn(e,t,r);break e}bt(e,t,n,r)}t=t.child}return t;case 5:return $j(t),e===null&&Gp(t),n=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,zp(n,i)?o=null:a!==null&&zp(n,a)&&(t.flags|=32),ik(e,t),bt(e,t,o,r),t.child;case 6:return e===null&&Gp(t),null;case 13:return ok(e,t,r);case 4:return Cv(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Ga(t,null,n,r):bt(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:pr(n,i),vb(e,t,n,i,r);case 7:return bt(e,t,t.pendingProps,r),t.child;case 8:return bt(e,t,t.pendingProps.children,r),t.child;case 12:return bt(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value,_e(Ac,n._currentValue),n._currentValue=o,a!==null)if(Or(a.value,o)){if(a.children===i.children&&!Nt.current){t=dn(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var s=a.dependencies;if(s!==null){o=a.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(a.tag===1){l=rn(-1,r&-r),l.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?l.next=l:(l.next=f.next,f.next=l),u.pending=l}}a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),Vp(a.return,r,t),s.lanes|=r;break}l=l.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(z(341));o.lanes|=r,s=o.alternate,s!==null&&(s.lanes|=r),Vp(o,r,t),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}bt(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,La(t,r),i=or(i),n=n(i),t.flags|=1,bt(e,t,n,r),t.child;case 14:return n=t.type,i=pr(n,t.pendingProps),i=pr(n.type,i),yb(e,t,n,i,r);case 15:return rk(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:pr(n,i),cc(e,t),t.tag=1,Tt(n)?(e=!0,kc(t)):e=!1,La(t,r),Zj(t,n,i),Yp(t,n,i,r),Zp(null,t,n,!0,e,r);case 19:return sk(e,t,r);case 22:return nk(e,t,r)}throw Error(z(156,t.tag))};function Sk(e,t){return YS(e,t)}function x2(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.t
vendor: 6,561 bytes, line 40
40ype=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function tr(e,t,r,n){return new x2(e,t,r,n)}function Gv(e){return e=e.prototype,!(!e||!e.isReactComponent)}function w2(e){if(typeof e=="function")return Gv(e)?1:0;if(e!=null){if(e=e.$$typeof,e===fv)return 11;if(e===hv)return 14}return 2}function Gn(e,t){var r=e.alternate;return r===null?(r=tr(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function hc(e,t,r,n,i,a){var o=2;if(n=e,typeof e=="function")Gv(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case ba:return Ni(r.children,i,a,t);case dv:o=8,i|=8;break;case xp:return e=tr(12,r,t,i|2),e.elementType=xp,e.lanes=a,e;case wp:return e=tr(13,r,t,i),e.elementType=wp,e.lanes=a,e;case _p:return e=tr(19,r,t,i),e.elementType=_p,e.lanes=a,e;case $S:return sf(r,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case TS:o=10;break e;case CS:o=9;break e;case fv:o=11;break e;case hv:o=14;break e;case On:o=16,n=null;break e}throw Error(z(130,e==null?e:typeof e,""))}return t=tr(o,r,t,i),t.elementType=e,t.type=n,t.lanes=a,t}function Ni(e,t,r,n){return e=tr(7,e,n,t),e.lanes=r,e}function sf(e,t,r,n){return e=tr(22,e,n,t),e.elementType=$S,e.lanes=r,e.stateNode={isHidden:!1},e}function Nh(e,t,r){return e=tr(6,e,null,t),e.lanes=r,e}function Th(e,t,r){return t=tr(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function _2(e,t,r,n,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=dh(0),this.expirationTimes=dh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dh(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Vv(e,t,r,n,i,a,o,s,l){return e=new _2(e,t,r,s,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=tr(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Tv(a),e}function S2(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ya,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function jk(e){if(!e)return Qn;e=e._reactInternals;e:{if(Ji(e)!==e||e.tag!==1)throw Error(z(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Tt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(z(171))}if(e.tag===1){var r=e.type;if(Tt(r))return jj(e,r,t)}return t}function kk(e,t,r,n,i,a,o,s,l){return e=Vv(r,n,!0,e,i,a,o,s,l),e.context=jk(null),r=e.current,n=wt(),i=qn(r),a=rn(n,i),a.callback=t??null,Hn(r,a,i),e.current.lanes=i,Xl(e,i,n),Ct(e,n),e}function lf(e,t,r,n){var i=t.current,a=wt(),o=qn(i);return r=jk(r),t.context===null?t.context=r:t.pendingContext=r,t=rn(a,o),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=Hn(i,t,o),e!==null&&(kr(e,i,o,a),sc(e,i,o)),o}function Lc(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Nb(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Jv(e,t){Nb(e,t),(e=e.alternate)&&Nb(e,t)}function j2(){return null}var Ok=typeof reportError=="function"?reportError:function(e){console.error(e)};function Yv(e){this._internalRoot=e}uf.prototype.render=Yv.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(z(409));lf(e,t,null,null)};uf.prototype.unmount=Yv.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Fi(function(){lf(null,e,null,null)}),t[un]=null}};function uf(e){this._internalRoot=e}uf.prototype.unstable_scheduleHydration=function(e){if(e){var t=nj();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Pn.length&&t!==0&&t<Pn[r].priority;r++);Pn.splice(r,0,e),r===0&&aj(e)}};function Xv(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function cf(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Tb(){}function k2(e,t,r,n,i){if(i){if(typeof n=="function"){var a=n;n=function(){var u=Lc(o);a.call(u)}}var o=kk(t,n,e,0,null,!1,!1,"",Tb);return e._reactRootContainer=o,e[un]=o.current,Vs(e.nodeType===8?e.parentNode:e),Fi(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof n=="function"){var s=n;n=function(){var u=Lc(l);s.call(u)}}var l=Vv(e,0,!1,null,null,!1,!1,"",Tb);return e._reactRootContainer=l,e[un]=l.current,Vs(e.nodeType===8?e.parentNode:e),Fi(function(){lf(t,l,r,n)}),l}function df(e,t,r,n,i){var a=r._reactRootContainer;if(a){var o=a;if(typeof i=="function"){var s=i;i=function(){var l=Lc(o);s.call(l)}}lf(t,o,e,i)}else o=k2(r,t,e,i,n);return Lc(o)}tj=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=gs(t.pendingLanes);r!==0&&(gv(t,r|1),Ct(t,Le()),!(ce&6)&&(Ya=Le()+500,ti()))}break;case 13:Fi(function(){var n=cn(e,1);if(n!==null){var i=wt();kr(n,e,1,i)}}),Jv(e,1)}};vv=function(e){if(e.tag===13){var t=cn(e,134217728);if(t!==null){var r=wt();kr(t,e,134217728,r)}Jv(e,134217728)}};rj=function(e){if(e.tag===13){var t=qn(e),r=cn(e,t);if(r!==null){var n=wt();kr(r,e,t,n)}Jv(e,t)}};nj=function(){return pe};ij=function(e,t){var r=pe;try{return pe=e,t()}finally{pe=r}};Cp=function(e,t,r){switch(t){case"input":if(kp(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var i=ef(n);
40if(!i)throw Error(z(90));RS(n),kp(n,i)}}}break;case"textarea":DS(e,r);break;case"select":t=r.value,t!=null&&Ia(e,!!r.multiple,t,!1)}};HS=Hv;KS=Fi;var O2={usingClientEntryPoint:!1,Events:[Zl,Sa,ef,zS,WS,Hv]},Zo={findFiberByHostInstance:xi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},E2={bundleType:Zo.bundleType,version:Zo.version,rendererPackageName:Zo.rendererPackageName,rendererConfig:Zo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:vn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=VS(e),e===null?null:e.stateNode},findFiberByHostInstance:Zo.findFiberByHostInstance||j2,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 Tu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Tu.isDisabled&&Tu.supportsFiber)try{Yd=Tu.inject(E2),Mr=Tu}catch{}}qt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=O2;qt.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Xv(t))throw Error(z(200));return S2(e,t,null,r)};qt.createRoot=function(e,t){if(!Xv(e))throw Error(z(299));var r=!1,n="",i=Ok;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Vv(e,1,!1,null,null,r,!1,n,i),e[un]=t.current,Vs(e.nodeType===8?e.parentNode:e),new Yv(t)};qt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(z(188)):(e=Object.keys(e).join(","),Error(z(268,e)));return e=VS(t),e=e===null?null:e.stateNode,e};qt.flushSync=function(e){return Fi(e)};qt.hydrate=function(e,t,r){if(!cf(t))throw Error(z(200));return df(null,e,t,!0,r)};qt.hydrateRoot=function(e,t,r){if(!Xv(e))throw Error(z(405));var n=r!=null&&r.hydratedSources||null,i=!1,a="",o=Ok;if(r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(a=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),t=kk(t,null,e,1,r??null,i,!1,a,o),e[un]=t.current,Vs(e),n)for(e=0;e<n.length;e++)r=n[e],i=r._getVersion,i=i(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,i]:t.mutableSourceEagerHydrationData.push(r,i);return new uf(t)};qt.render=function(e,t,r){if(!cf(t))throw Error(z(200));return df(null,e,t,!1,r)};qt.unmountComponentAtNode=function(e){if(!cf(e))throw Error(z(40));return e._reactRootContainer?(Fi(function(){df(null,null,e,!1,function(){e._reactRootContainer=null,e[un]=null})}),!0):!1};qt.unstable_batchedUpdates=Hv;qt.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!cf(r))throw Error(z(200));if(e==null||e._reactInternals===void 0)throw Error(z(38));return df(e,t,r,!1,n)};qt.version="18.3.1-next-f1338f8080-20240426";function Ek(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ek)}catch(e){console.error(e)}}Ek(),ES.exports=qt;var A2=ES.exports,Cb=A2;yp.createRoot=Cb.createRoot,yp.hydrateRoot=Cb.hydrateRoot;/**
41 * @remix-run/router v1.23.2
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 */function nl(){return nl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},nl.apply(this,arguments)}var Mn;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Mn||(Mn={}));const $b="popstate";function P2(e){e===void 0&&(e={});function t(n,i){let{pathname:a,search:o,hash:s}=n.location;return dm("",{pathname:a,search:o,hash:s},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(n,i){return typeof i=="string"?i:Bc(i)}return T2(t,r,null,e)}function Ue(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Qv(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function N2(){return Math.random().toString(36).substr(2,8)}function Ib(e,t){return{usr:e.state,key:e.key,idx:t}}function dm(e,t,r,n){return r===void 0&&(r=null),nl({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Eo(t):t,{state:r,key:t&&t.key||n||N2()})}function Bc(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Eo(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function T2(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:a=!1}=n,o=i.history,s=Mn.Pop,l=null,u=f();u==null&&(u=0,o.replaceState(nl({},o.state,{idx:u}),""));function f(){return(o.state||{idx:null}).idx}function d(){s=Mn.Pop;let b=f(),g=b==null?null:b-u;u=b,l&&l({action:s,location:v.location,delta:g})}function h(b,g){s=Mn.Push;let y=dm(v.location,b,g);u=f()+1;let x=Ib(y,u),S=v.createHref(y);try{o.pushState(x,"",S)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;i.location.assign(S)}a&&l&&l({action:s,location:v.location,delta:1})}function p(b,g){s=Mn.Replace;let y=dm(v.location,b,g);u=f();let x=Ib(y,u),S=v.createHref(y);o.replaceState(x,"",S),a&&l&&l({action:s,location:v.location,delta:0})}function m(b){let g=i.location.origin!=="null"?i.location.origin:i.location.href,y=typeof b=="string"?b:Bc(b);return y=y.replace(/ $/,"%20"),Ue(g,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,g)}let v={get action(){return s},get location(){return e(i,o)},listen(b){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener($b,d),l=b,()=>{i.removeEventListener($b,d),l=null}},createHref(b){return t(i,b)},createURL:m,encodeLocation(b){let g=m(b);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:h,replace:p,go(b){return o.go(b)}};return v}var Rb;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Rb||(Rb={}));function C2(e,t,r){return r===void 0&&(r="/"),$2(e,t,r)}function $2(e,t,r,n){let i=typeof t=="string"?Eo(t):t,a=Zv(i.pathname||"/",r);if(a==null)return null;let o=Ak(e);I2(o);let s=null;for(let l=0;s==null&&l<o.length;++l){let u=q2(a);s=W2(o[l],u)}return s}function Ak(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let i=(a,o,s)=>{let l={relativePath:s===void 0?a.path||"":s,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};l.relativePath.startsWith("/")&&(Ue(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not val
49id. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=Vn([n,l.relativePath]),f=r.concat(l);a.children&&a.children.length>0&&(Ue(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Ak(a.children,t,f,u)),!(a.path==null&&!a.index)&&t.push({path:u,score:F2(u,a.index),routesMeta:f})};return e.forEach((a,o)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))i(a,o);else for(let l of Pk(a.path))i(a,o,l)}),t}function Pk(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return i?[a,""]:[a];let o=Pk(n.join("/")),s=[];return s.push(...o.map(l=>l===""?a:[a,l].join("/"))),i&&s.push(...o),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function I2(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:z2(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const R2=/^:[\w-]+$/,M2=3,D2=2,L2=1,B2=10,U2=-2,Mb=e=>e==="*";function F2(e,t){let r=e.split("/"),n=r.length;return r.some(Mb)&&(n+=U2),t&&(n+=D2),r.filter(i=>!Mb(i)).reduce((i,a)=>i+(R2.test(a)?M2:a===""?L2:B2),n)}function z2(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function W2(e,t,r){let{routesMeta:n}=e,i={},a="/",o=[];for(let s=0;s<n.length;++s){let l=n[s],u=s===n.length-1,f=a==="/"?t:t.slice(a.length)||"/",d=H2({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},f),h=l.route;if(!d)return null;
vendor: 4,333 bytes, lines 49-58
49Object.assign(i,d.params),o.push({params:i,pathname:Vn([a,d.pathname]),pathnameBase:X2(Vn([a,d.pathnameBase])),route:h}),d.pathnameBase!=="/"&&(a=Vn([a,d.pathnameBase]))}return o}function H2(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=K2(e.path,e.caseSensitive,e.end),i=t.match(r);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:n.reduce((u,f,d)=>{let{paramName:h,isOptional:p}=f;if(h==="*"){let v=s[d]||"";o=a.slice(0,a.length-v.length).replace(/(.)\/+$/,"$1")}const m=s[d];return p&&!m?u[h]=void 0:u[h]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:o,pattern:e}}function K2(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Qv(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,l)=>(n.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function q2(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Qv(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Zv(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}const G2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,V2=e=>G2.test(e);function J2(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?Eo(e):e,a;if(r)if(V2(r))a=r;else{if(r.includes("//")){let o=r;r=r.replace(/\/\/+/g,"/"),Qv(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+r))}r.startsWith("/")?a=Db(r.substring(1),"/"):a=Db(r,t)}else a=t;return{pathname:a,search:Q2(n),hash:Z2(i)}}function Db(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function Ch(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` 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 Y2(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function ey(e,t){let r=Y2(e);return t?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function ty(e,t,r,n){n===void 0&&(n=!1);let i;typeof e=="string"?i=Eo(e):(i=nl({},e),Ue(!i.pathname||!i.pathname.includes("?"),Ch("?","pathname","search",i)),Ue(!i.pathname||!i.pathname.includes("#"),Ch("#","pathname","hash",i)),Ue(!i.search||!i.search.includes("#"),Ch("#","search","hash",i)));let a=e===""||i.pathname==="",o=a?"/":i.pathname,s;if(o==null)s=r;else{let d=t.length-1;if(!n&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),d-=1;i.pathname=h.join("/")}s=d>=0?t[d]:"/"}let l=J2(i,s),u=o&&o!=="/"&&o.endsWith("/"),f=(a||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||f)&&(l.pathname+="/"),l}const Vn=e=>e.join("/").replace(/\/\/+/g,"/"),X2=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Q2=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Z2=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function eC(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Nk=["post","put","patch","delete"];new Set(Nk);const tC=["get",...Nk];new Set(tC);/**
50 * React Router v6.30.3
51 *
52 * Copyright (c) Remix Software Inc.
53 *
54 * This source code is licensed under the MIT license found in the
55 * LICENSE.md file in the root directory of this source tree.
56 *
57 * @license MIT
58 */function il(){return il=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
vendor: 5,204 bytes, line 58
58for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},il.apply(this,arguments)}const ry=E.createContext(null),rC=E.createContext(null),ri=E.createContext(null),ff=E.createContext(null),yn=E.createContext({outlet:null,matches:[],isDataRoute:!1}),Tk=E.createContext(null);function nC(e,t){let{relative:r}=t===void 0?{}:t;Ao()||Ue(!1);let{basename:n,navigator:i}=E.useContext(ri),{hash:a,pathname:o,search:s}=$k(e,{relative:r}),l=o;return n!=="/"&&(l=o==="/"?n:Vn([n,o])),i.createHref({pathname:l,search:s,hash:a})}function Ao(){return E.useContext(ff)!=null}function tu(){return Ao()||Ue(!1),E.useContext(ff).location}function Ck(e){E.useContext(ri).static||E.useLayoutEffect(e)}function ny(){let{isDataRoute:e}=E.useContext(yn);return e?vC():iC()}function iC(){Ao()||Ue(!1);let e=E.useContext(ry),{basename:t,future:r,navigator:n}=E.useContext(ri),{matches:i}=E.useContext(yn),{pathname:a}=tu(),o=JSON.stringify(ey(i,r.v7_relativeSplatPath)),s=E.useRef(!1);return Ck(()=>{s.current=!0}),E.useCallback(function(u,f){if(f===void 0&&(f={}),!s.current)return;if(typeof u=="number"){n.go(u);return}let d=ty(u,JSON.parse(o),a,f.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Vn([t,d.pathname])),(f.replace?n.replace:n.push)(d,f.state,f)},[t,n,o,a,e])}function aC(){let{matches:e}=E.useContext(yn),t=e[e.length-1];return t?t.params:{}}function $k(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=E.useContext(ri),{matches:i}=E.useContext(yn),{pathname:a}=tu(),o=JSON.stringify(ey(i,n.v7_relativeSplatPath));return E.useMemo(()=>ty(e,JSON.parse(o),a,r==="path"),[e,o,a,r])}function oC(e,t){return sC(e,t)}function sC(e,t,r,n){Ao()||Ue(!1);let{navigator:i}=E.useContext(ri),{matches:a}=E.useContext(yn),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=tu(),f;if(t){var d;let b=typeof t=="string"?Eo(t):t;l==="/"||(d=b.pathname)!=null&&d.startsWith(l)||Ue(!1),f=b}else f=u;let h=f.pathname||"/",p=h;if(l!=="/"){let b=l.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(b.length).join("/")}let m=C2(e,{pathname:p}),v=fC(m&&m.map(b=>Object.assign({},b,{params:Object.assign({},s,b.params),pathname:Vn([l,i.encodeLocation?i.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:Vn([l,i.encodeLocation?i.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),a,r,n);return t&&v?E.createElement(ff.Provider,{value:{location:il({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:Mn.Pop}},v):v}function lC(){let e=gC(),t=eC(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},t),r?E.createElement("pre",{style:i},r):null,null)}const uC=E.createElement(lC,null);class cC extends E.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,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?E.createElement(yn.Provider,{value:this.props.routeContext},E.createElement(Tk.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function dC(e){let{routeContext:t,match:r,children:n}=e,i=E.useContext(ry);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),E.createElement(yn.Provider,{value:t},n)}function fC(e,t,r,n){var i;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var a;if(!r)return null;if(r.errors)e=r.matches;else if((a=n)!=null&&a.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,s=(i=r)==null?void 0:i.errors;if(s!=null){let f=o.findIndex(d=>d.route.id&&(s==null?void 0:s[d.route.id])!==void 0);f>=0||Ue(!1),o=o.slice(0,Math.min(o.length,f+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let f=0;f<o.length;f++){let d=o[f];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(u=f),d.route.id){let{loaderData:h,errors:p}=r,m=d.route.loader&&h[d.route.id]===void 0&&(!p||p[d.route.id]===void 0);if(d.route.lazy||m){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((f,d,h)=>{let p,m=!1,v=null,b=null;r&&(p=s&&d.route.id?s[d.route.id]:void 0,v=d.route.errorElement||uC,l&&(u<0&&h===0?(yC("route-fallback"),m=!0,b=null):u===h&&(m=!0,b=d.route.hydrateFallbackElement||null)));let g=t.concat(o.slice(0,h+1)),y=()=>{let x;return p?x=v:m?x=b:d.route.Component?x=E.createElement(d.route.Component,null):d.route.element?x=d.route.element:x=f,E.createElement(dC,{match:d,routeC
58ontext:{outlet:f,matches:g,isDataRoute:r!=null},children:x})};return r&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?E.createElement(cC,{location:r.location,revalidation:r.revalidation,component:v,error:p,children:y(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):y()},null)}var Ik=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Ik||{}),Rk=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Rk||{});function hC(e){let t=E.useContext(ry);return t||Ue(!1),t}function pC(e){let t=E.useContext(rC);return t||Ue(!1),t}function mC(e){let t=E.useContext(yn);return t||Ue(!1),t}function Mk(e){let t=mC(),r=t.matches[t.matches.length-1];return r.route.id||Ue(!1),r.route.id}function gC(){var e;let t=E.useContext(Tk),r=pC(),n=Mk();return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function vC(){let{router:e}=hC(Ik.UseNavigateStable),t=Mk(Rk.UseNavigateStable),r=E.useRef(!1);return Ck(()=>{r.current=!0}),E.useCallback(function(i,a){a===void 0&&(a={}),r.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,il({fromRouteId:t},a)))},[e,t])}const Lb={};function yC(e,t,r){Lb[e]||(Lb[e]=!0)}function bC(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function iy(e){let{to:t,replace:r,state:n,relative:i}=e;Ao()||Ue(!1);let{future:a,static:o}=E.useContext(ri),{matches:s}=E.useContext(yn),{pathname:l}=tu(),u=ny(),f=ty(t,ey(s,a.v7_relativeSplatPath),l,i==="path"),d=JSON.stringify(f);return E.useEffect(()=>u(JSON.parse(d),{replace:r,state:n,relative:i}),[u,d,i,r,n]),null}function It(e){Ue(!1)}function xC(e){let{basename:t="/",children:r=null,location:n,navigationType:i=Mn.Pop,navigator:a,static:o=!1,future:s}=e;Ao()&&Ue(!1);let l=t.replace(/^\/*/,"/"),u=E.useMemo(()=>({basename:l,navigator:a,static:o,future:il({v7_relativeSplatPath:!1},s)}),[l,s,a,o]);typeof n=="string"&&(n=Eo(n));let{pathname:f="/",search:d="",hash:h="",state:p=null,key:m="default"}=n,v=E.useMemo(()=>{let b=Zv(f,l);return b==null?null:{location:{pathname:b,search:d,hash:h,state:p,key:m},navigationType:i}},[l,f,d,h,p,m,i]);return v==null?null:E.createElement(ri.Provider,{value:u},E.createElement(ff.Provider,{children:r,value:v}))}function wC(e){let{children:t,location:r}=e;return oC(fm(t),r)}new Promise(()=>{});function fm(e,t){t===void 0&&(t=[]);let r=[];return E.Children.forEach(e,(n,i)=>{if(!E.isValidElement(n))return;let a=[...t,i];if(n.type===E.Fragment){r.push.apply(r,fm(n.props.children,a));return}n.type!==It&&Ue(!1),!n.props.index||!n.props.children||Ue(!1);let o={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,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=fm(n.props.children,a)),r.push(o)}),r}/**
59 * React Router DOM v6.30.3
60 *
61 * Copyright (c) Remix Software Inc.
62 *
63 * This source code is licensed under the MIT license found in the
64 * LICENSE.md file in the root directory of this source tree.
65 *
66 * @license MIT
67 */function hm(){return hm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},hm.apply(this,arguments)}function _C(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function SC(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function jC(e,t){return e.button===0&&(!t||t==="_self")&&!SC(e)}const kC=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],OC="6";try{window.__reactRouterVersion=OC}catch{}const EC="startTransition",Bb=vN[EC];function AC(e){let{basename:t,children:r,future:n,window:i}=e,a=E.useRef();a.current==null&&(a.current=P2({window:i,v5Compat:!0}));let o=a.current,[s,l]=E.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},f=E.useCallback(d=>{u&&Bb?Bb(()=>l(d)):l(d)},[l,u]);return E.useLayoutEffect(()=>o.listen(f),[o,f]),E.useEffect(()=>bC(n),[n]),E.createElement(xC,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:o,future:n})}const PC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",NC=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ve=E.forwardRef(function(t,r){let{onClick:n,relative:i,reloadDocument:a,replace:o,state:s,target:l,to:u,preventScrollReset:f,viewTransition:d}=t,h=_C(t,kC),{basename:p}=E.useContext(ri),m,v=!1;if(typeof u=="string"&&NC.test(u)&&(m=u,PC))try{let x=new URL(window.location.href),S=u.startsWith("//")?new URL(x.protocol+u):new URL(u),_=Zv(S.pathname,p);S.origin===x.origin&&_!=null?u=_+S.search+S.hash:v=!0}catch{}let b=nC(u,{relative:i}),g=TC(u,{replace:o,state:s,target:l,preventScrollReset:f,relative:i,viewTransition:d});function y(x){n&&n(x),x.defaultPrevented||g(x)}return E.createElement("a",hm({},h,{href:m||b,onClick:v||a?n:y,ref:r,target:l}))});var Ub;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ub||(Ub={}));var Fb;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Fb||(Fb={}));function TC(e,t){let{target:r,replace:n,state:i,preventScrollReset:a,relative:o,viewTransition:s}=t===void 0?{}:t,l=ny(),u=tu(),f=$k(e,{relative:o});return E.useCallback(d=>
67{if(jC(d,r)){d.preventDefault();let h=n!==void 0?n:Bc(u)===Bc(f);l(e,{replace:h,state:i,preventScrollReset:a,relative:o,viewTransition:s})}},[u,l,f,n,i,r,e,a,o,s])}function hf(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function CC(e,t,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(f){try{u(n.next(f))}catch(d){o(d)}}function l(f){try{u(n.throw(f))}catch(d){o(d)}}function u(f){f.done?a(f.value):i(f.value).then(s,l)}u((n=n.apply(e,t||[])).next())})}const $C=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class ay extends Error{constructor(t,r="FunctionsError",n){super(t),this.name=r,this.context=n}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class IC extends ay{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class zb extends ay{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class Wb extends ay{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var pm;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(pm||(pm={}));class RC{constructor(t,{headers:r={},customFetch:n,region:i=pm.Any}={}){this.url=t,this.headers=r,this.region=i,this.fetch=$C(n)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return CC(this,arguments,void 0,function*(r,n={}){var i;let a,o;
67try{const{headers:s,method:l,body:u,signal:f,timeout:d}=n;let h={},{region:p}=n;p||(p=this.region);const m=new URL(`${this.url}/${r}`);p&&p!=="any"&&(h["x-region"]=p,m.searchParams.set("forceFunctionRegion",p));let v;u&&(s&&!Object.prototype.hasOwnProperty.call(s,"Content-Type")||!s)?typeof Blob<"u"&&u instanceof Blob||u instanceof ArrayBuffer?(h["Content-Type"]="application/octet-stream",v=u):typeof u=="string"?(h["Content-Type"]="text/plain",v=u):typeof FormData<"u"&&u instanceof FormData?v=u:(h["Content-Type"]="application/json",v=JSON.stringify(u)):u&&typeof u!="string"&&!(typeof Blob<"u"&&u instanceof Blob)&&!(u instanceof ArrayBuffer)&&!(typeof FormData<"u"&&u instanceof FormData)?v=JSON.stringify(u):v=u;let b=f;d&&(o=new AbortController,a=setTimeout(()=>o.abort(),d),f?(b=o.signal,f.addEventListener("abort",()=>o.abort())):b=o.signal);const g=yield this.fetch(m.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},h),this.headers),s),body:v,signal:b}).catch(_=>{throw new IC(_)}),y=g.headers.get("x-relay-error");if(y&&y==="true")throw new zb(g);if(!g.ok)throw new Wb(g);let x=((i=g.headers.get("Content-Type"))!==null&&i!==void 0?i:"text/plain").split(";")[0].trim(),S;return x==="application/json"?S=yield g.json():x==="application/octet-stream"||x==="application/pdf"?S=yield g.blob():x==="text/event-stream"?S=g:x==="multipart/form-data"?S=yield g.formData():S=yield g.text(),{data:S,error:null,response:g}}catch(s){return{data:null,error:s,response:s instanceof Wb||s instanceof zb?s.context:void 0}}finally{a&&clearTimeout(a)}})}}const Dk=3,Hb=e=>Math.min(1e3*2**e,3e4),MC=[520,503],Lk=["GET","HEAD","OPTIONS"];var DC=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
67de=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function Kb(e,t){return new Promise(r=>{if(t!=null&&t.aborted){r();return}const n=setTimeout(()=>{t==null||t.removeEventListener("abort",i),r()},e);function i(){clearTimeout(n),r()}t==null||t.addEventListener("abort",i)})}function LC(e,t,r,n){return!(!n||r>=Dk||!Lk.includes(e)||!MC.includes(t))}var BC=class{constructor(e){var t,r,n,i,a;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(r=e.isMaybeSingle)!==null&&r!==void 0?r:!1,this.shouldStripNulls=(n=e.shouldStripNulls)!==null&&n!==void 0?n:!1,this.urlLengthLimit=(i=e.urlLengthLimit)!==null&&i!==void 0?i:8e3,this.retryEnabled=(a=e.retry)!==null&&a!==void 0?a:!0,e.fetch?this.fetch=e.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(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){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 o=this.headers.get("Accept");o==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!o||o==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const n=this.fetch;let a=(async()=>{let o=0;for(;;){const u=new Headers(r.headers);o>0&&u.set("X-Retry-Count",String(o));let f;try{f=await n(r.url.toString(),{method:r.method,headers:u,body:JSON.stringify(r.body,(d,h)=>typeof h=="bigint"?h.toString():h),signal:r.signal})}catch(d){if((d==null?void 0:d.name)==="AbortError"||(d==null?void 0:d.code)==="ABORT_ERR"||!Lk.includes(r.method))throw d;if(r.retryEnabled&&o<Dk){const h=Hb(o);o++,await Kb(h,r.signal);continue}throw d}if(LC(r.method,f.status,o,r.retryEnabled)){var s,l;const d=(s=(l=f.headers)===null||l===void 0?void 0:l.get("Retry-After"))!==null&&s!==void 0?s:null,h=d!==null?Math.max(0,parseInt(d,10)||0)*1e3:Hb(o);await f.text(),o++,await Kb(h,r.signal);continue}return await r.processResponse(f)}})();return this.shouldThrowOnError||(a=a.catch(o=>{var s;let l="",u="",f="";const d=o==null?void 0:o.cause;if(d){var h,p,m,v;const y=(h=d==null?void 0:d.message)!==null&&h!==void 0?h:"",x=(p=d==null?void 0:d.code)!==null&&p!==void 0?p:"";l=`${(m=o==null?void 0:o.name)!==null&&m!==void 0?m:"FetchError"}: ${o==null?void 0:o.message}`,l+=`
68
69Caused by: ${(v=d==null?void 0:d.name)!==null&&v!==void 0?v:"Error"}: ${y}`,x&&(l+=` (${x})`),d!=null&&d.stack&&(l+=`
70${d.stack}`)}else{var b;l=(b=o==null?void 0:o.stack)!==null&&b!==void 0?b:""}const g=this.url.toString().length;return(o==null?void 0:o.name)==="AbortError"||(o==null?void 0:o.code)==="ABORT_ERR"?(f="",u="Request was aborted (timeout or manual cancellation)",g>this.urlLengthLimit&&(u+=`. Note: Your request URL is ${g} 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.`)):((d==null?void 0:d.name)==="HeadersOverflowError"||(d==null?void 0:d.code)==="UND_ERR_HEADERS_OVERFLOW")&&(f="",u="HTTP headers exceeded server limits (typically 16KB)",g>this.urlLengthLimit&&(u+=`. Your request URL is ${g} 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:`${(s=o==null?void 0:o.name)!==null&&s!==void 0?s:"FetchError"}: ${o==null?void 0:o.message}`,details:l,hint:u,code:f},data:null,count:null,status:0,statusText:""}}
70)),a.then(e,t)}async processResponse(e){var t=this;let r=null,n=null,i=null,a=e.status,o=e.statusText;if(e.ok){var s,l;if(t.method!=="HEAD"){var u;const h=await e.text();h===""||(t.headers.get("Accept")==="text/csv"||t.headers.get("Accept")&&(!((u=t.headers.get("Accept"))===null||u===void 0)&&u.includes("application/vnd.pgrst.plan+text"))?n=h:n=JSON.parse(h))}const f=(s=t.headers.get("Prefer"))===null||s===void 0?void 0:s.match(/count=(exact|planned|estimated)/),d=(l=e.headers.get("content-range"))===null||l===void 0?void 0:l.split("/");f&&d&&d.length>1&&(i=parseInt(d[1])),t.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,o="Not Acceptable"):n.length===1?n=n[0]:n=null)}else{const f=await e.text();try{r=JSON.parse(f),Array.isArray(r)&&e.status===404&&(n=[],r=null,a=200,o="OK")}catch{e.status===404&&f===""?(a=204,o="No Content"):r={message:f}}if(r&&t.shouldThrowOnError)throw new DC(r)}return{success:r===null,error:r,data:n,count:i,status:a,statusText:o}}returns(){return this}overrideTypes(){return this}},UC=class extends BC{select(e){let t=!1;const r=(e??"*").split("").map(n=>/\s/.test(n)&&!t?"":(n==='"'&&(t=!t),n)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:r,foreignTable:n,referencedTable:i=n}={}){const a=i?`${i}.order`:"order",o=this.url.searchParams.get(a);return this.url.searchParams.set(a,`${o?`${o},`:""}${e}.${t?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:r=t}={}){const n=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(n,`${e}`),this}range(e,t,{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,`${e}`),this.url.searchParams.set(a,`${t-e+1}`),this}abortSignal(e){return this.signal=e,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:e=!1,verbose:t=!1,settings:r=!1,buffers:n=!1,wal:i=!1,format:a="text"}={}){var o;const s=[e?"analyze":null,t?"verbose":null,r?"settings":null,n?"buffers":null,i?"wal":null].filter(Boolean).join("|"),l=(o=this.headers.get("Accept"))!==null&&o!==void 0?o:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${a}; for="${l}"; options=${s};`),a==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const qb=new RegExp("[,()]");var pa=class extends UC{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&qb.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`in.(${r})`),this}notIn(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&qb.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`not.in.(${r})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{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(e,`${i}fts${a}.${t}`),this}match(e){return Object.entries(e).filter(([t,r])=>
70r!==void 0).forEach(([t,r])=>{this.url.searchParams.append(t,`eq.${r}`)}),this}not(e,t,r){return this.url.searchParams.append(e,`not.${t}.${r}`),this}or(e,{foreignTable:t,referencedTable:r=t}={}){const n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${e})`),this}filter(e,t,r){return this.url.searchParams.append(e,`${t}.${r}`),this}},FC=class{constructor(e,{headers:t={},schema:r,fetch:n,urlLengthLimit:i=8e3,retry:a}){this.url=e,this.headers=new Headers(t),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(e,t){const{head:r=!1,count:n}=t??{},i=r?"HEAD":"GET";let a=!1;const o=(e??"*").split("").map(u=>/\s/.test(u)&&!a?"":(u==='"'&&(a=!a),u)).join(""),{url:s,headers:l}=this.cloneRequestState();return s.searchParams.set("select",o),n&&l.append("Prefer",`count=${n}`),new pa({method:i,url:s,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:r=!0}={}){var n;const i="POST",{url:a,headers:o}=this.cloneRequestState();if(t&&o.append("Prefer",`count=${t}`),r||o.append("Prefer","missing=default"),Array.isArray(e)){const s=e.reduce((l,u)=>l.concat(Object.keys(u)),[]);if(s.length>0){const l=[...new Set(s)].map(u=>`"${u}"`);a.searchParams.set("columns",l.join(","))}}return new pa({method:i,url:a,headers:o,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:r=!1,count:n,defaultToNull:i=!0}={}){var a;const o="POST",{url:s,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),t!==void 0&&s.searchParams.set("on_conflict",t),n&&l.append("Prefer",`count=${n}`),i||l.append("Prefer","missing=default"),Array.isArray(e)){const u=e.reduce((f,d)=>f.concat(Object.keys(d)),[]);if(u.length>0){const f=[...new Set(u)].map(d=>`"${d}"`);s.searchParams.set("columns",f.join(","))}}return new pa({method:o,url:s,headers:l,schema:this.schema,body:e,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var r;const n="PATCH",{url:i,headers:a}=this.cloneRequestState();return t&&a.append("Prefer",`count=${t}`),new pa({method:n,url:i,headers:a,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){var t;const r="DELETE",{url:n,headers:i}=this.cloneRequestState();return e&&i.append("Prefer",`count=${e}`),new pa({method:r,url:n,headers:i,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function al(e){"@babel/helpers - typeof";return al=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},al(e)}function zC(e,t){if(al(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(al(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function WC(e){var t=zC(e,"string");return al(t)=="symbol"?t:t+""}function HC(e,t,r){return(t=WC(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Gb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Cu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Gb(Object(r),!0).forEach(function(n){HC(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var KC=class Bk{constructor(t,{headers:r={},schema:n,fetch:i,timeout:a,urlLengthLimit:o=8e3,retry:s}={}){this.url=t,this.headers=new Headers(r),this.schemaName=n,this.urlLengthLimit=o;const l=i??globalThis.fetch;a!==void 0&&a>0?this.fetch=(u,f)=>{const d=new AbortController,h=setTimeout(()=>d.abort(),a),p=f==null?void 0:f.signal;if(p){if(p.aborted)return clearTimeout(h),l(u,f);const m=()=>{clearTimeout(h),d.abort()};return p.addEventListener("abort",m,{once:!0}),l(u,Cu(Cu({},f),{},{signal:d.signal})).finally(()=>{clearTimeout(h),p.removeEventListener("abort",m)})}return l(u,Cu(Cu({},f),{},{signal:d.signal})).finally(()=>
70clearTimeout(h))}:this.fetch=l,this.retry=s}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new FC(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(t){return new Bk(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(t,r={},{head:n=!1,get:i=!1,count:a}={}){var o;let s;const l=new URL(`${this.url}/rpc/${t}`);let u;const f=p=>p!==null&&typeof p=="object"&&(!Array.isArray(p)||p.some(f)),d=n&&Object.values(r).some(f);d?(s="POST",u=r):n||i?(s=n?"HEAD":"GET",Object.entries(r).filter(([p,m])=>m!==void 0).map(([p,m])=>[p,Array.isArray(m)?`{${m.join(",")}}`:`${m}`]).forEach(([p,m])=>{l.searchParams.append(p,m)})):(s="POST",u=r);const h=new Headers(this.headers);return d?h.set("Prefer",a?`count=${a},return=minimal`:"return=minimal"):a&&h.set("Prefer",`count=${a}`),new pa({method:s,url:l,headers:h,schema:this.schemaName,body:u,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class qC{constructor(){}static detectEnvironment(){var t;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"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.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 o=a.node,s=parseInt(o.replace(/^v/,"").split(".")[0]);return s>=22?typeof globalThis.WebSocket<"u"?{type:"native",wsConstructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${s} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${s} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
71import ws from "ws"
72new 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 t=this.detectEnvironment();if(t.wsConstructor)return t.wsConstructor;let r=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(r+=`
73
74Suggested solution: ${t.workaround}`),new Error(r)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const GC="2.105.4",VC=`realtime-js/${GC}`,JC="1.0.0",Uk="2.0.0",YC=Uk,XC=1e4,QC=100,Tn={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Fk={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},mm={connecting:"connecting",closing:"closing",closed:"closed"};class ZC{constructor(t){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=t??[]}encode(t,r){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(t));let n=[t.join_ref,t.ref,t.topic,t.event,t.payload];return r(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(t){var r;return this._isArrayBuffer((r=t.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var r,n;const i=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,i)}_encodeJsonUserBroadcastPush(t){var r,n;const i=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:{},o=new TextEncoder().encode(JSON.stringify(i)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(t,r,n){var i,a;const o=t.topic,s=(i=t.ref)!==null&&i!==void 0?i:"",l=(a=t.join_ref)!==null&&a!==void 0?a:"",u=t.payload.event,f=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},d=Object.keys(f).length===0?"":JSON.stringify(f);
74if(l.length>255)throw new Error(`joinRef length ${l.length} exceeds maximum of 255`);if(s.length>255)throw new Error(`ref length ${s.length} exceeds maximum of 255`);if(o.length>255)throw new Error(`topic length ${o.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`userEvent length ${u.length} exceeds maximum of 255`);if(d.length>255)throw new Error(`metadata length ${d.length} exceeds maximum of 255`);const h=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+s.length+o.length+u.length+d.length,p=new ArrayBuffer(this.HEADER_LENGTH+h);let m=new DataView(p),v=0;m.setUint8(v++,this.KINDS.userBroadcastPush),m.setUint8(v++,l.length),m.setUint8(v++,s.length),m.setUint8(v++,o.length),m.setUint8(v++,u.length),m.setUint8(v++,d.length),m.setUint8(v++,r),Array.from(l,g=>m.setUint8(v++,g.charCodeAt(0))),Array.from(s,g=>m.setUint8(v++,g.charCodeAt(0))),Array.from(o,g=>m.setUint8(v++,g.charCodeAt(0))),Array.from(u,g=>m.setUint8(v++,g.charCodeAt(0))),Array.from(d,g=>m.setUint8(v++,g.charCodeAt(0)));var b=new Uint8Array(p.byteLength+n.byteLength);return b.set(new Uint8Array(p),0),b.set(new Uint8Array(n),p.byteLength),b.buffer}decode(t,r){if(this._isArrayBuffer(t)){let n=this._binaryDecode(t);return r(n)}if(typeof t=="string"){const n=JSON.parse(t),[i,a,o,s,l]=n;return r({join_ref:i,ref:a,topic:o,event:s,payload:l})}return r({})}_binaryDecode(t){const r=new DataView(t),n=r.getUint8(0),i=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,r,i)}}_decodeUserBroadcast(t,r,n){const i=r.getUint8(1),a=r.getUint8(2),o=r.getUint8(3),s=r.getUint8(4);let l=this.HEADER_LENGTH+4;const u=n.decode(t.slice(l,l+i));l=l+i;const f=n.decode(t.slice(l,l+a));l=l+a;const d=n.decode(t.slice(l,l+o));l=l+o;const h=t.slice(l,t.byteLength),p=s===this.JSON_ENCODING?JSON.parse(n.decode(h)):h,m={type:this.BROADCAST_EVENT,event:f,payload:p};return o>0&&(m.meta=JSON.parse(d)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:m}}_isArrayBuffer(t){var r;return t instanceof ArrayBuffer||((r=t==null?void 0:t.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(t,r){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([n])=>r.includes(n)))}}var xe;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(xe||(xe={}));const Vb=(e,t,r={})=>{var n;const i=(n=r.skipTypes)!==null&&n!==void 0?n:[];return t?Object.keys(t).reduce((a,o)=>(a[o]=e$(o,e,t,i),a),{}):{}},e$=(e,t,r,n)=>{const i=t.find(s=>s.name===e),a=i==null?void 0:i.type,o=r[e];return a&&!n.includes(a)?zk(a,o):gm(o)},zk=(e,t)=>{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return i$(t,r)}switch(e){case xe.bool:return t$(t);case xe.float4:case xe.float8:case xe.int2:case xe.int4:case xe.int8:case xe.numeric:case xe.oid:return r$(t);case xe.json:case xe.jsonb:return n$(t);case xe.timestamp:return a$(t);case xe.abstime:case xe.date:case xe.daterange:case xe.int4range:case xe.int8range:case xe.money:case xe.reltime:case xe.text:case xe.time:case xe.timestamptz:case xe.timetz:case xe.tsrange:case xe.tstzrange:return gm(t);default:return gm(t)}},gm=e=>e,t$=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},r$=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},n$=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},i$=(e,t)=>{if(typeof e!="string")return e;const r=e.length-1,n=e[r];if(e[0]==="{"&&n==="}"){let a;const o=e.slice(1,r);try{a=JSON.parse("["+o+"]")}catch{a=o?o.split(","):[]}return a.map(s=>zk(t,s))}return e},a$=e=>typeof e=="string"?e.replace(" ","T"):e,Wk=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};var Ts=e=>typeof e=="function"?e:function(){return e},o$=typeof self<"u"?self:null,ma=typeof window<"u"?window:null,Cr=o$||ma||globalThis,s$="2.0.0",l$=1e4,u$=1e3,$r={connecting:0,open:1,closing:2,closed:3},Ot={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Vr={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},vm={longpoll:"longpoll",websocket:"websocket"},c$={complete:4},ym="base64url.bearer.phx.",$u=class{constructor(e,t,r,n){this.channel=e,this.event=t,this.payload=r||function(){return{}},this.receivedResp=null,this.timeout=n,this.timeoutTimer=null,this.recHo
vendor: 8,700 bytes, line 74
74oks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,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(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:e,response:t,_ref:r}){this.recHooks.filter(n=>n.status===e).forEach(n=>n.callback(t))}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,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},Hk=class{constructor(e,t){this.callback=e,this.timerCalc=t,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))}},d$=class{constructor(e,t,r){this.state=Ot.closed,this.topic=e,this.params=Ts(t||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new $u(this,Vr.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new Hk(()=>{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=Ot.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this.joinPush.receive("error",n=>{this.state=Ot.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=Ot.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=Ot.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 $u(this,Vr.leave,Ts({}),this.timeout).send(),this.state=Ot.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Vr.reply,(n,i)=>{this.trigger(this.replyEventName(i),n)})}join(e=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=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Ot.closed,this.bindings=[]}onClose(e){this.on(Vr.close,e)}onError(e){return this.on(Vr.error,t=>e(t))}on(e,t){let r=this.bindingRef++;return this.bindings.push({event:e,ref:r,callback:t}),r}off(e,t){this.bindings=this.bindings.filter(r=>!(r.event===e&&(typeof t>"u"||t===r.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,r=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let n=new $u(this,e,function(){return t},r);return this.canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Ot.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Vr.close,"leave")},r=new $u(this,Vr.leave,Ts({}),e);return r.receive("ok",()=>t()).receive("timeout",()=>t()),r.send(),this.canPush()||r.trigger("ok",{}),r}onMessage(e,t,r){return t}filterBindings(e,t,r){return!0}isMember(e,t,r,n){return this.topic!==e?!1:n&&n!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:r,joinRef:n}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Ot.joining,this.joinPush.resend(e))}trigger(e,t,r,n){let i=this.onMessage(e,t,r,n);if(t&&!i)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let a=this.bindings.filter(o=>o.event===e&&this.filterBindings(o,t,r));for(let o=0;o<a.length;o++)a[o].callback(i,r,n||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===Ot.closed}isErrored(){return this.state===Ot.errored}isJoined(){return this.state===Ot.joined}isJoining(){return this.state===Ot.joining}isLeaving(){return this.state===Ot.leaving}},Uc=class{static request(e,t,r,n,i,a,o){if(Cr.XDomainRequest){let s=new Cr.XDomainRequest;return this.xdomainRequest(s,e,t,n,i,a,o)}else if(Cr.XMLHttpRequest){let s=new Cr.XMLHttpRequest;return this.xhrRequest(s,e,t,r,n,i,a,o)}else{if(Cr.fetch&&Cr.AbortController)return this.fetchRequest(e,t,r,n,i,a,o);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,r,n,i,a,o){let s={method:e,headers:r,body:n},l=null;return i&&(l=new AbortController,setTimeout(()=>l.abort(),i),s.signal=l.signal),Cr.fetch(t,s).then(u=>u.text()).then(u=>this.parseJSON(u)).then(u=>o&&o(u)).catch(u=>{u.name==="AbortError"&&a?a():o&&o(null)}),l}static xdomainRequest(e,t,r,n,i,a,o){return e.timeout=i,e.open(t,r),e.onload=()=>{let s=this.parseJSON(e.responseText);o&&o(s)},a&&(e.ontimeout=a),e.onprogress=()=>{},e.send(n),e}static xhrRequest(e,t,r,n,i,a,o,s){e.open(t,r,!0),e.timeout=a;for(let[l,u]of Object.entries(n))e.setRequestHeader(l,u);return e.onerror=()=>s&&s(null),e.onreadystatechange=()=>{if(e.readyState===c$.complete&&s){let l=this.parseJSON(e.responseText);s(l)}},o&&(e.ontimeout=o),e.send(i),e}static parseJSON(e){if(!e||e==="")return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let r=[];for(var n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let i=t?`${t}[${n}]`:n,a=e[n];typeof a=="object"?r.push(this.serialize(a,i)):r.push(encodeURIComponent(i)+"="+encodeURIComponent(a))}return r.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let r=e.match(/\?/)?"&":"?";return`${e}${r}${this.serialize(t)}`}},f$=e=>{let t="",r=new Uint8Array(e),n=r.byteLength;for(let i=0;i<n;i++)t+=String.fromCharCode(r[i]);return btoa(t)},ra=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(ym)&&(this.authToken=atob(t[1].slice(ym.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(e),this.readyState=$r.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+vm.websocket),"$1/"+vm.longpoll)}endpointURL(){return Uc.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,r){this.close(e,t,r),this.readyState=$r.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===$r.open||this.readyState===$r.connecting}poll(){const e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),t=>{if(t){var{status:r,token:n,messages:i}=t;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=$r.open,this.onopen({}),this.poll();break;
74case 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(e){typeof e!="string"&&(e=f$(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},e.join(`
75`),()=>this.onerror("timeout"),t=>{this.awaitingBatchAck=!1,!t||t.status!==200?(this.onerror(t&&t.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(e,t,r){for(let i of this.reqs)i.abort();this.readyState=$r.closed;let n=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:r});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",n)):this.onclose(n)}ajax(e,t,r,n,i){let a,o=()=>{this.reqs.delete(a),n()};a=Uc.request(e,this.endpointURL(),t,r,this.timeout,o,s=>{this.reqs.delete(a),this.isActive()&&i(s)}),this.reqs.add(a)}},h$=class ys{constructor(t,r={}){let n=r.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(n.state,i=>{let{onJoin:a,onLeave:o,onSync:s}=this.caller;this.joinRef=this.channel.joinRef(),this.state=ys.syncState(this.state,i,a,o),this.pendingDiffs.forEach(l=>{this.state=ys.syncDiff(this.state,l,a,o)}),this.pendingDiffs=[],s()}),this.channel.on(n.diff,i=>{let{onJoin:a,onLeave:o,onSync:s}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(i):(this.state=ys.syncDiff(this.state,i,a,o),s())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return ys.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,r,n,i){let a=this.clone(t),o={},s={};return this.map(a,(l,u)=>{r[l]||(s[l]=u)}),this.map(r,(l,u)=>{let f=a[l];if(f){let d=u.metas.map(v=>v.phx_ref),h=f.metas.map(v=>v.phx_ref),p=u.metas.filter(v=>h.indexOf(v.phx_ref)<0),m=f.metas.filter(v=>d.indexOf(v.phx_ref)<0);p.length>0&&(o[l]=u,o[l].metas=p),m.length>0&&(s[l]=this.clone(f),s[l].metas=m)}else o[l]=u}),this.syncDiff(a,{joins:o,leaves:s},n,i)}static syncDiff(t,r,n,i){let{joins:a,leaves:o}=this.clone(r);return n||(n=function(){}),i||(i=function(){}),this.map(a,(s,l)=>{let u=t[s];if(t[s]=this.clone(l),u){let f=t[s].metas.map(h=>h.phx_ref),d=u.metas.filter(h=>f.indexOf(h.phx_ref)<0);t[s].metas.unshift(...d)}n(s,u,l)}),this.map(o,(s,l)=>{let u=t[s];if(!u)return;let f=l.metas.map(d=>d.phx_ref);u.metas=u.metas.filter(d=>f.indexOf(d.phx_ref)<0),i(s,u,l),u.metas.length===0&&delete t[s]}),t}static list(t,r){return r||(r=function(n,i){return i}),this.map(t,(n,i)=>r(n,i))}static map(t,r){return Object.getOwnPropertyNames(t).map(n=>r(n,t[n]))}static clone(t){return JSON.parse(JSON.stringify(t))}},Iu={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let r=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(r))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[r,n,i,a,o]=JSON.parse(e);return t({join_ref:r,ref:n,topic:i,event:a,payload:o})}},binaryEncode(e){let{join_ref:t,ref:r,event:n,topic:i,payload:a}=e,o=this.META_LENGTH+t.length+r.length+i.length+n.length,s=new ArrayBuffer(this.HEADER_LENGTH+o),l=new DataView(s),u=0;l.setUint8(u++,this.KINDS.push),l.setUint8(u++,t.length),l.setUint8(u++,r.length),l.setUint8(u++,i.length),l.setUint8(u++,n.length),Array.from(t,d=>l.setUint8(u++,d.charCodeAt(0))),Array.from(r,d=>l.setUint8(u++,d.charCodeAt(0))),Array.from(i,d=>l.setUint8(u++,d.charCodeAt(0))),Array.from(n,d=>l.setUint8(u++,d.charCodeAt(0)));var f=new Uint8Array(s.byteLength+a.byteLength);return f.set(new Uint8Array(s),0),f.set(new Uint8Array(a),s.byteLength),f.buffer},binaryDecode(e){let t=new DataView(e),r=t.getUint8(0),n=new TextDecoder;
vendor: 8,661 bytes, line 75
75switch(r){case this.KINDS.push:return this.decodePush(e,t,n);case this.KINDS.reply:return this.decodeReply(e,t,n);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,n)}},decodePush(e,t,r){let n=t.getUint8(1),i=t.getUint8(2),a=t.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,s=r.decode(e.slice(o,o+n));o=o+n;let l=r.decode(e.slice(o,o+i));o=o+i;let u=r.decode(e.slice(o,o+a));o=o+a;let f=e.slice(o,e.byteLength);return{join_ref:s,ref:null,topic:l,event:u,payload:f}},decodeReply(e,t,r){let n=t.getUint8(1),i=t.getUint8(2),a=t.getUint8(3),o=t.getUint8(4),s=this.HEADER_LENGTH+this.META_LENGTH,l=r.decode(e.slice(s,s+n));s=s+n;let u=r.decode(e.slice(s,s+i));s=s+i;let f=r.decode(e.slice(s,s+a));s=s+a;let d=r.decode(e.slice(s,s+o));s=s+o;let h=e.slice(s,e.byteLength),p={status:d,response:h};return{join_ref:l,ref:u,topic:f,event:Vr.reply,payload:p}},decodeBroadcast(e,t,r){let n=t.getUint8(1),i=t.getUint8(2),a=this.HEADER_LENGTH+2,o=r.decode(e.slice(a,a+n));a=a+n;let s=r.decode(e.slice(a,a+i));a=a+i;let l=e.slice(a,e.byteLength);return{join_ref:null,ref:null,topic:o,event:s,payload:l}}},p$=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||l$,this.transport=t.transport||Cr.WebSocket||ra,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let r=null;try{r=Cr&&Cr.sessionStorage}catch{}this.sessionStore=t.sessionStorage||r,this.establishedConnections=0,this.defaultEncoder=Iu.encode.bind(Iu),this.defaultDecoder=Iu.decode.bind(Iu),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==ra?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let n=null;ma&&ma.addEventListener&&(ma.addEventListener("pagehide",i=>{this.conn&&(this.disconnect(),n=this.connectClock)}),ma.addEventListener("pageshow",i=>{n===this.connectClock&&(n=null,this.connect())}),ma.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=i=>t.rejoinAfterMs?t.rejoinAfterMs(i):[1e3,2e3,5e3][i-1]||1e4,this.reconnectAfterMs=i=>t.reconnectAfterMs?t.reconnectAfterMs(i):[10,50,100,150,200,250,500,1e3,2e3][i-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(i,a,o)=>{console.log(`${i}: ${a}`,o)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=Ts(t.params||{}),this.endPoint=`${e}/${vm.websocket}`,this.vsn=t.vsn||s$,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new Hk(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken}getLongPollTransport(){return ra}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=Uc.appendParams(Uc.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,r){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,r)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=Ts(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==ra?this.connectWithFallback(ra,this.longPollFallbackMs):this.transportConnect())}log(e,t,r){this.logger&&this.logger(e,t,r)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),r=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let n=this.onMessage(i=>{i.ref===t&&(this.off([n]),e(Date.now()-r))});return!0}transportName(e){switch(e){case ra:return"LongPoll";default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${ym}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let r=!1,n=!0,i,a,o=this.transportName(e),s=l=>{this.log("transport",`falling back to ${o}...`,l),this.off([i,a]),n=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return s("memorized");this.fallbackTimer=setTimeout(s,t),a=this.onError(l=>{this.log("transport","error",l),n&&!r&&(clearTimeout(this.fallbackTimer),s(l))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(r=!0,!n){let l=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${l}`,"true"),this.log("transport",`established ${l} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(s,t),this.ping(l=>{this.log("transport","connected to primary after",l),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(e){this.log("error","error in heartbeat callback",e)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),u$,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,r){if(!this.conn)return e&&e();const n=this.conn;this.waitForBufferDone(n,()=>{t?n.close(t,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),e&&e()})})}waitForBufferDone(e,t,r=1){if(r===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,r+1)},150*r)}waitForSocketClosed(e,t,r=1){if(r===5||e.readyState===$r.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,r+1)},150*r)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(e),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",e)}onConnError(e){this.hasLogger()&&this.log("transport","error",e);let t=this.transport,r=this.establishedConnections;this.triggerStateCallbacks("error",e,t,r),(t===this.transport||r>0)&&this.triggerChanError(e)}
vendor: 4,126 bytes, line 75
75triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(Vr.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case $r.connecting:return"connecting";case $r.open:return"open";case $r.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([r])=>e.indexOf(r)===-1)}channel(e,t={}){let r=new d$(e,t,this);return this.channels.push(r),r}push(e){if(this.hasLogger()){let{topic:t,event:r,payload:n,ref:i,join_ref:a}=e;this.log("push",`${t} ${r} (${a}, ${i})`,n)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(e){this.log("error","error in heartbeat callback",e)}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(e){this.log("error","error in heartbeat callback",e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,t=>{let{topic:r,event:n,payload:i,ref:a,join_ref:o}=t;if(a&&a===this.pendingHeartbeatRef){const s=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(i.status==="ok"?"ok":"error",s)}catch(l){this.log("error","error in heartbeat callback",l)}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 s=0;s<this.channels.length;s++){const l=this.channels[s];l.isMember(r,n,i,o)&&l.trigger(n,i,a,o)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([r,n])=>{try{n(...t)}catch(i){this.log("error",`error in ${e} callback`,i)}})}catch(r){this.log("error",`error triggering ${e} callbacks`,r)}}leaveOpenTopic(e){let t=this.channels.find(r=>r.topic===e&&(r.isJoined()||r.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class Cs{constructor(t,r){const n=g$(r);this.presence=new h$(t.getChannel(),n),this.presence.onJoin((i,a,o)=>{const s=Cs.onJoinPayload(i,a,o);t.getChannel().trigger("presence",s)}),this.presence.onLeave((i,a,o)=>{const s=Cs.onLeavePayload(i,a,o);t.getChannel().trigger("presence",s)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return Cs.transformState(this.presence.state)}static transformState(t){return t=m$(t),Object.getOwnPropertyNames(t).reduce((r,n)=>{const i=t[n];return r[n]=pc(i),r},{})}static onJoinPayload(t,r,n){const i=Jb(r),a=pc(n);return{event:"join",key:t,currentPresences:i,newPresences:a}}static onLeavePayload(t,r,n){const i=Jb(r),a=pc(n);return{event:"leave",key:t,currentPresences:i,leftPresences:a}}}function pc(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function m$(e){return JSON.parse(JSON.stringify(e))}function g$(e){return(e==null?void 0:e.events)&&{events:e.events}}function Jb(e){return e!=null&&e.metas?pc(e):[]}var Yb;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(Yb||(Yb={}));class v${get state(){return this.presenceAdapter.state}constructor(t,r){this.channel=t,this.presenceAdapter=new Cs(this.channel.channelAdapter,r)}}function y$(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);
75if(e&&typeof e=="object"){const t=e;if(typeof t.code=="number"){const r=typeof t.reason=="string"&&t.reason?` (${t.reason})`:"";return new Error(`socket closed: ${t.code}${r}`,{cause:e})}return new Error("channel error: transport failure",{cause:e})}return new Error("channel error: connection lost")}class b${constructor(t,r,n){const i=x$(n);this.channel=t.getSocket().channel(r,i),this.socket=t}get state(){return this.channel.state}set state(t){this.channel.state=t}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(t,r){return this.channel.on(t,r)}off(t,r){this.channel.off(t,r)}subscribe(t){return this.channel.join(t)}unsubscribe(t){return this.channel.leave(t)}teardown(){this.channel.teardown()}onClose(t){this.channel.onClose(t)}onError(t){return this.channel.onError(t)}push(t,r,n){let i;try{i=this.channel.push(t,r,n)}catch{throw new Error(`tried to push '${t}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>QC){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(t){const r=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},r),t)}canPush(){return this.socket.isConnected()&&this.state===Tn.joined}isJoined(){return this.state===Tn.joined}isJoining(){return this.state===Tn.joining}isClosed(){return this.state===Tn.closed}isLeaving(){return this.state===Tn.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function x$(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}var Xb;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(Xb||(Xb={}));var Na;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(Na||(Na={}));var Jr;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(Jr||(Jr={}));class $s{get state(){return this.channelAdapter.state}set state(t){this.channelAdapter.state=t}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(t,r={config:{}},n){var i,a;if(this.topic=t,this.params=r,this.socket=n,this.bindings={},this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.channelAdapter=new b$(this.socket.socketAdapter,t,this.params),this.presence=new v$(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=Wk(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(t,r=this.timeout){var n,i,a;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:o,presence:s,private:l}}=this.params,u=(i=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(p=>p.filter))!==null&&i!==void 0?i:[],f=!!this.bindings[Na.PRESENCE]&&this.bindings[Na.PRESENCE].length>0||((a=this.params.config.presence)===null||a===void 0?void 0:a.enabled)===!0,d={},h={broadcast:o,presence:Object.assign(Object.assign({},s),{enabled:f}),postgres_changes:u,private:l};this.socket.accessTokenValue&&(d.access_token=this.socket.accessTokenValue),this._onError(p=>{t==null||t(Jr.CHANNEL_ERROR,y$(p))}),this._onClose(()=>t==null?void 0:t(Jr.CLOSED)),this.updateJoinPayload(Object.assign({config:h},d)),this._updateFilterMessage(),this.channelAdapter.subscribe(r).receive("ok",async({postgres_changes:p})=>{if(this.socket._isManualToken()||this.socket.setAuth(),p===void 0){t==null||t(Jr.SUBSCRIBED);return}this._updatePostgresBindings(p,t)}
75).receive("error",p=>{this.state=Tn.errored;const m=Object.values(p).join(", ")||"error";t==null||t(Jr.CHANNEL_ERROR,new Error(m,{cause:p}))}).receive("timeout",()=>{t==null||t(Jr.TIMED_OUT)})}return this}_updatePostgresBindings(t,r){var n;const i=this.bindings.postgres_changes,a=(n=i==null?void 0:i.length)!==null&&n!==void 0?n:0,o=[];for(let s=0;s<a;s++){const l=i[s],{filter:{event:u,schema:f,table:d,filter:h}}=l,p=t&&t[s];if(p&&p.event===u&&$s.isFilterValueEqual(p.schema,f)&&$s.isFilterValueEqual(p.table,d)&&$s.isFilterValueEqual(p.filter,h))o.push(Object.assign(Object.assign({},l),{id:p.id}));else{this.unsubscribe(),this.state=Tn.errored,r==null||r(Jr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=o,this.state!=Tn.errored&&r&&r(Jr.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,r={}){return await this.send({type:"presence",event:"track",payload:t},r.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,r,n){const i=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),a=t===Na.PRESENCE||t===Na.POSTGRES_CHANGES;if(i&&a)throw this.socket.log("channel",`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(t,r,n)}async httpSend(t,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 o={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:r,private:this.private}]})},s=await this._fetchWithTimeout(this.broadcastEndpointURL,o,(i=n.timeout)!==null&&i!==void 0?i:this.timeout);if(s.status===202)return{success:!0};let l=s.statusText;try{const u=await s.json();l=u.error||u.message||l}catch{}return Promise.reject(new Error(l))}async send(t,r={}){var n,i;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated 
75in the future. Please use httpSend() explicitly for REST delivery.");const{event:a,payload:o}=t,s={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(s.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l={method:"POST",headers:s,body:JSON.stringify({messages:[{topic:this.subTopic,event:a,payload:o,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((i=u.body)===null||i===void 0?void 0:i.cancel()),u.ok?"ok":"error"}catch(u){return u instanceof Error&&u.name==="AbortError"?"timed out":"error"}}else return new Promise(a=>{var o,s,l;const u=this.channelAdapter.push(t.type,t,r.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(s=(o=this.params)===null||o===void 0?void 0:o.config)===null||s===void 0?void 0:s.broadcast)===null||l===void 0)&&l.ack)&&a("ok"),u.receive("ok",()=>a("ok")),u.receive("error",()=>a("error")),u.receive("timeout",()=>a("timed out"))})}updateJoinPayload(t){this.channelAdapter.updateJoinPayload(t)}async unsubscribe(t=this.timeout){return new Promise(r=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>r("ok")).receive("timeout",()=>r("timed out")).receive("error",()=>r("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,r,n){const i=new AbortController,a=setTimeout(()=>i.abort(),n),o=await this.socket.fetch(t,Object.assign(Object.assign({},r),{signal:i.signal}));return clearTimeout(a),o}_on(t,r,n){const i=t.toLocaleLowerCase(),a=this.channelAdapter.on(t,n),o={type:i,filter:r,callback:n,ref:a};return this.bindings[i]?this.bindings[i].push(o):this.bindings[i]=[o],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,r,n)=>{var i,a,o,s,l,u,f;const d=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(d,n))return!1;const h=(i=this.bindings[d])===null||i===void 0?void 0:i.find(p=>p.ref===t.ref);if(!h)return!0;if(["broadcast","presence","postgres_changes"].includes(d))if("id"in h){const p=h.id,m=(a=h.filter)===null||a===void 0?void 0:a.event;return p&&((o=r.ids)===null||o===void 0?void 0:o.includes(p))&&(m==="*"||(m==null?void 0:m.toLocaleLowerCase())===((s=r.data)===null||s===void 0?void 0:s.type.toLocaleLowerCase()))}else{const p=(u=(l=h==null?void 0:h.filter)===null||l===void 0?void 0:l.event)===null||u===void 0?void 0:u.toLocaleLowerCase();return p==="*"||p===((f=r==null?void 0:r.event)===null||f===void 0?void 0:f.toLocaleLowerCase())}else return h.type.toLocaleLowerCase()===d})}_notThisChannelEvent(t,r){const{close:n,error:i,leave:a,join:o}=Fk;return r&&[n,i,a,o].includes(t)&&r!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,r,n)=>{if(typeof r=="object"&&"ids"in r){const i=r.data,{schema:a,table:o,commit_timestamp:s,type:l,errors:u}=i;return Object.assign(Object.assign({},{schema:a,table:o,commit_timestamp:s,eventType:l,new:{},old:{},errors:u}),this._getPayloadRecords(i))}return r})}copyBindings(t){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const r in t.bindings)for(const n of t.bindings[r])this._on(n.type,n.filter,n.callback)}static isFilterValueEqual(t,r){return(t??void 0)===(r??void 0)}_getPayloadRecords(t){const r={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(r.new=Vb(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=Vb(t.columns,t.old_record)),r}}class w${constructor(t,r){this.socket=new p$(t,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(t){this.socket.heartbeatCallback=t}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(t,r,n,i=1e4){return new Promise(a=>{setTimeout(()=>a("timeout"),i),this.socket.disconnect(()=>{t(),a("ok")},r,n)})}push(t){this.socket.push(t)}log(t,r,n){this.socket.log(t,r,n)}makeRef(){return this.socket.makeRef()}onOpen(t){this.socket.onOpen(t)}onClose(t){this.socket.onClose(t)}onError(t){this.socket.onError(t)}onMessage(t){this.socket.onMessage(t)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==mm.connecting}isDisconnecting(){return this.socket.connectionState()==mm.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const Qb={HEARTBEAT_INTERVAL:25e3},_$=[1e3,2e3,5e3,1e4],S$=1e4;function j$(){const e=new Map;return{get length(){return e.size},clear(){e.clear()},getItem(t){return e.has(t)?e.get(t):null},key(t){var r;return(r=Array.from(e.keys())[t])!==null&&r!==void 0?r:null},removeItem(t){e.delete(t)},setItem(t,r){e.set(t,String(r))}}}function k$(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return j$()}const O$=`
76  addEventListener("message", (e) => {
77    if (e.data.event === "start") {
78      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
79    }
80  });`;class E${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(t,r){var n;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
80,this.ref=0,this.serializer=new ZC,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=a=>a?(...o)=>a(...o):(...o)=>fetch(...o),!(!((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 w$(t,i),this.httpEndpoint=Wk(t),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(t){const r=t.message;throw r.includes("Node.js")?new Error(`${r}
81
82To use Realtime in Node.js, you need to provide a WebSocket implementation:
83
84Option 1: Use Node.js 22+ which has native WebSocket support
85Option 2: Install and provide the "ws" package:
86
87  npm install ws
88
89  import ws from "ws"
90  const client = new RealtimeClient(url, {
91    ...options,
92    transport: ws
93  })`):new Error(`WebSocket not available: ${r}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,r){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,r)}getChannels(){return this.channels}async removeChannel(t){const r=await t.unsubscribe();return r==="ok"&&t.teardown(),r}async removeAllChannels(){const t=this.channels.map(async n=>{const i=await n.unsubscribe();return n.teardown(),i}),r=await Promise.all(t);return await this.disconnect(),r}log(t,r,n){this.socketAdapter.log(t,r,n)}connectionState(){return this.socketAdapter.connectionState()||mm.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,r={config:{}}){const n=`realtime:${t}`,i=this.getChannels().find(a=>a.topic===n);if(i)return i;{const a=new $s(`realtime:${t}`,r,this);return this._cancelPendingDisconnect(),this.channels.push(a),a}}push(t){this.socketAdapter.push(t)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(t){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(t)}_makeRef(){return this.socketAdapter.makeRef()}_remove(t){this.channels=this.channels.filter(r=>r.topic!==t.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}
93this._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(t=null){let r,n=!1;if(t)r=t,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:VC};r&&i.updateJoinPayload(a),i.joinedOnce&&i.channelAdapter.isJoined()&&i.channelAdapter.push(Fk.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error",`Error setting auth in ${t}`,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(t=>{t.ref&&t.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(t){return(r,n)=>{r=="sent"&&this._setAuthSafely(),t&&t(r,n)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),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(t){let r;if(t)r=t;else{const n=new Blob([O$],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_initializeOptions(t){var r,n,i,a,o,s,l,u,f,d,h,p;this.worker=(r=t==null?void 0:t.worker)!==null&&r!==void 0?r:!1,this.accessToken=(n=t==null?void 0:t.accessToken)!==null&&n!==void 0?n:null;const m={};m.timeout=(i=t==null?void 0:t.timeout)!==null&&i!==void 0?i:XC,m.heartbeatIntervalMs=(a=t==null?void 0:t.heartbeatIntervalMs)!==null&&a!==void 0?a:Qb.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(o=t==null?void 0:t.disconnectOnEmptyChannelsAfterMs)!==null&&o!==void 0?o:2*((s=t==null?void 0:t.heartbeatIntervalMs)!==null&&s!==void 0?s:Qb.HEARTBEAT_INTERVAL),m.transport=(l=t==null?void 0:t.transport)!==null&&l!==void 0?l:qC.getWebSocketConstructor(),m.params=t==null?void 0:t.params,m.logger=t==null?void 0:t.logger,m.heartbeatCallback=this._wrapHeartbeatCallback(t==null?void 0:t.heartbeatCallback),m.sessionStorage=(u=t==null?void 0:t.sessionStorage)!==null&&u!==void 0?u:k$(),m.reconnectAfterMs=(f=t==null?void 0:t.reconnectAfterMs)!==null&&f!==void 0?f:y=>_$[y-1]||S$;let v,b;const g=(d=t==null?void 0:t.vsn)!==null&&d!==void 0?d:YC;switch(g){case JC:v=(y,x)=>x(JSON.stringify(y)),b=(y,x)=>x(JSON.parse(y));break;case Uk:v=this.serializer.encode.bind(this.serializer),b=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${m.vsn}`)}if(m.vsn=g,m.encode=(h=t==null?void 0:t.encode)!==null&&h!==void 0?h:v,m.decode=(p=t==null?void 0:t.decode)!==null&&p!==void 0?p:b,m.beforeReconnect=this._reconnectAuth.bind(this),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,m.params=Object.assign(Object.assign({},m.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl,m.autoSendHeartbeat=!this.worker}return m}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
93var ol=class extends Error{constructor(e,t){var r;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((r=t.icebergType)==null?void 0:r.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function A$(e,t,r){const n=new URL(t,e);if(r)for(const[i,a]of Object.entries(r))a!==void 0&&n.searchParams.set(i,a);return n.toString()}async function P$(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function N$(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:i,body:a,headers:o}){const s=A$(e.baseUrl,n,i),l=await P$(e.auth),u=await t(s,{method:r,headers:{...a?{"Content-Type":"application/json"}:{},...l,...o},body:a?JSON.stringify(a):void 0}),f=await u.text(),d=(u.headers.get("content-type")||"").includes("application/json"),h=d&&f?JSON.parse(f):f;if(!u.ok){const p=d?h:void 0,m=p==null?void 0:p.error;throw new ol((m==null?void 0:m.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:m==null?void 0:m.type,icebergCode:m==null?void 0:m.code,details:p})}return{status:u.status,headers:u.headers,data:h}}}}function Ru(e){return e.join("�")}var T$=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:Ru(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(n=>({namespace:n}))}async createNamespace(e,t){const r={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Ru(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Ru(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Ru(e.namespace)}`}),!0}catch(t){if(t instanceof ol&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(r){if(r instanceof ol&&r.status===409)return;throw r}}};function na(e){return e.join("�")}var C$=class{constructor(e,t="",r){this.client=e,this.prefix=t,this.accessDelegation=r}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${na(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${na(e.namespace)}/tables`,body:t,headers:r})).data.metadata}async updateTable(e,t){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${na(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${na(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String((t==null?void 0:t.purge)??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${na(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${na(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(r){if(r instanceof ol&&r.status===404)return!1;throw r}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(r){if(r instanceof ol&&r.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw r}}},$$=class{constructor(e){var n;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const r=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=N$({baseUrl:r,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(n=e.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new T$(this.client,t),this.tableOps=new C$
93(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}};function sl(e){"@babel/helpers - typeof";return sl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sl(e)}function I$(e,t){if(sl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(sl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function R$(e){var t=I$(e,"string");return sl(t)=="symbol"?t:t+""}function M$(e,t,r){return(t=R$(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ee(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zb(Object(r),!0).forEach(function(n){M$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var pf=class extends Error{constructor(e,t="storage",r,n){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=r,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function mf(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var bm=class extends pf{constructor(e,t,r,n="storage"){super(e,n,t,r),this.name=n==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=r}toJSON(){return ee({},super.toJSON())}},Kk=class extends pf{constructor(e,t,r="storage"){super(e,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};function Fc(e,t,r){const n=ee({},e),i=t.toLowerCase();for(const a of Object.keys(n))a.toLowerCase()===i&&delete n[a];return n[i]=r,n}function D$(e){const t={};for(const[r,n]of Object.entries(e))t[r.toLowerCase()]=n;return t}const L$=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),B$=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},xm=e=>{if(Array.isArray(e))return e.map(r=>xm(r));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([r,n])=>{const i=r.replace(/([-_][a-z])/gi,a=>a.toUpperCase().replace(/[-_]/g,""));t[i]=xm(n)}),t},U$=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),ex=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error;if(typeof t.error=="object"&&t.error!==null){const r=t.error;if(typeof r.message=="string")return r.message}}return JSON.stringify(e)},F$=async(e,t,r,n)=>{if(e!==null&&typeof e=="object"&&"json"in e&&typeof e.json=="function"){const i=e;let a=parseInt(String(i.status),10);Number.isFinite(a)||(a=500),i.json().then(o=>{const s=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||a+"";t(new bm(ex(o),a,s,n))}).catch(()=>{const o=a+"";t(new bm(i.statusText||`HTTP ${a} error`,a,o,n))})}else t(new Kk(ex(e),e,n))}
93,z$=(e,t,r,n)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};if(e==="GET"||e==="HEAD"||!n)return ee(ee({},i),r);if(B$(n)){var a;const o=(t==null?void 0:t.headers)||{};let s;for(const[l,u]of Object.entries(o))l.toLowerCase()==="content-type"&&(s=u);i.headers=Fc(o,"Content-Type",(a=s)!==null&&a!==void 0?a:"application/json"),i.body=JSON.stringify(n)}else i.body=n;return t!=null&&t.duplex&&(i.duplex=t.duplex),ee(ee({},i),r)};async function es(e,t,r,n,i,a,o){return new Promise((s,l)=>{e(r,z$(t,n,i,a)).then(u=>{if(!u.ok)throw u;if(n!=null&&n.noResolveJson)return u;if(o==="vectors"){const f=u.headers.get("content-type");if(u.headers.get("content-length")==="0"||u.status===204)return{};if(!f||!f.includes("application/json"))return{}}return u.json()}).then(u=>s(u)).catch(u=>F$(u,l,n,o))})}function qk(e="storage"){return{get:async(t,r,n,i)=>es(t,"GET",r,n,i,void 0,e),post:async(t,r,n,i,a)=>es(t,"POST",r,i,a,n,e),put:async(t,r,n,i,a)=>es(t,"PUT",r,i,a,n,e),head:async(t,r,n,i)=>es(t,"HEAD",r,ee(ee({},n),{},{noResolveJson:!0}),i,void 0,e),remove:async(t,r,n,i,a)=>es(t,"DELETE",r,i,a,n,e)}}const W$=qk("storage"),{get:ll,post:mr,put:wm,head:H$,remove:oy}=W$,Ut=qk("vectors");var Po=class{constructor(e,t={},r,n="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=D$(t),this.fetch=L$(r),this.namespace=n}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=Fc(this.headers,e,t),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(mf(r))return{data:null,error:r};throw r}}},K$=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t}then(e,t){return this.execute().then(e,t)}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(mf(t))return{data:null,error:t};throw t}}};let Gk;Gk=Symbol.toStringTag;var q$=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[Gk]="BlobDownloadBuilder",this.promise=null}asStream(){return new K$(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(mf(t))return{data:null,error:t};throw t}}};const G$={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},tx={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var V$=class extends Po{constructor(e,t={},r,n){super(e,t,n,"storage"),this.bucketId=r}async uploadOrUpdate(e,t,r,n){var i=this;return i.handleOperation(async()=>{let a;const o=ee(ee({},tx),n);let s=ee(ee({},i.headers),e==="POST"&&{"x-upsert":String(o.upsert)});const l=o.metadata;if(typeof Blob<"u"&&r instanceof Blob?(a=new FormData,a.append("cacheControl",o.cacheControl),l&&a.append("metadata",i.encodeMetadata(l)),a.append("",r)):typeof FormData<"u"&&r instanceof FormData?(a=r,a.has("cacheControl")||a.append("cacheControl",o.cacheControl),l&&!a.has("metadata")&&a.append("metadata",i.encodeMetadata(l))):(a=r,s["cache-control"]=`max-age=${o.cacheControl}`,s["content-type"]=o.contentType,l&&(s["x-metadata"]=i.toBase64(i.encodeMetadata(l))),(typeof ReadableStream<"u"&&a instanceof ReadableStream||a&&typeof a=="object"&&"pipe"in a&&typeof a.pipe=="function")&&!o.duplex&&(o.duplex="half")),n!=null&&n.headers)for(const[h,p]of Object.entries(n.headers))s=Fc(s,h,p);const u=i._removeEmptyFolders(t),f=i._getFinalPath(u),d=await(e=="PUT"?wm:mr)(i.fetch,`${i.url}/object/${f}`,a,ee({headers:s},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{path:u,id:d.Id,fullPath:d.Key}})}async upload(e,t,r){return this.uploadOrUpdate("POST",e,t,r)}async uploadToSignedUrl(e,t,r,n){var i=this;const a=i._removeEmptyFolders(e),o=i._getFinalPath(a),s=new URL(i.url+`/object/upload/sign/${o}`);return s.searchParams.set("token",t),i.handleOperation(async()=>{let l;const u=ee(ee({},tx),n);let f=ee(ee({},i.headers),{"x-upsert":String(u.upsert)});const d=u.metadata;if(typeof Blob<"u"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",u.cacheControl),d&&l.append("metadata",i.encodeMetadata(d)),l.append("",r)):typeof FormData<"u"&&r instanceof FormData?(l=r,l.has("cacheControl")||l.append("cacheControl",u.cacheControl),d&&!l.has("metadata")&&l.a
93ppend("metadata",i.encodeMetadata(d))):(l=r,f["cache-control"]=`max-age=${u.cacheControl}`,f["content-type"]=u.contentType,d&&(f["x-metadata"]=i.toBase64(i.encodeMetadata(d))),(typeof ReadableStream<"u"&&l instanceof ReadableStream||l&&typeof l=="object"&&"pipe"in l&&typeof l.pipe=="function")&&!u.duplex&&(u.duplex="half")),n!=null&&n.headers)for(const[h,p]of Object.entries(n.headers))f=Fc(f,h,p);return{path:a,fullPath:(await wm(i.fetch,s.toString(),l,ee({headers:f},u!=null&&u.duplex?{duplex:u.duplex}:{}))).Key}})}async createSignedUploadUrl(e,t){var r=this;return r.handleOperation(async()=>{let n=r._getFinalPath(e);const i=ee({},r.headers);t!=null&&t.upsert&&(i["x-upsert"]="true");const a=await mr(r.fetch,`${r.url}/object/upload/sign/${n}`,{},{headers:i}),o=new URL(r.url+a.url),s=o.searchParams.get("token");if(!s)throw new pf("No token returned by API");return{signedUrl:o.toString(),path:e,token:s}})}async update(e,t,r){return this.uploadOrUpdate("PUT",e,t,r)}async move(e,t,r){var n=this;return n.handleOperation(async()=>await mr(n.fetch,`${n.url}/object/move`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,de
93stinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers}))}async copy(e,t,r){var n=this;return n.handleOperation(async()=>({path:(await mr(n.fetch,`${n.url}/object/copy`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers})).Key}))}async createSignedUrl(e,t,r){var n=this;return n.handleOperation(async()=>{let i=n._getFinalPath(e);const a=typeof(r==null?void 0:r.transform)=="object"&&r.transform!==null&&Object.keys(r.transform).length>0;let o=await mr(n.fetch,`${n.url}/object/sign/${i}`,ee({expiresIn:t},a?{transform:r.transform}:{}),{headers:n.headers});const s=new URLSearchParams;r!=null&&r.download&&s.set("download",r.download===!0?"":r.download),(r==null?void 0:r.cacheNonce)!=null&&s.set("cacheNonce",String(r.cacheNonce));const l=s.toString();return{signedUrl:encodeURI(`${n.url}${o.signedURL}${l?`&${l}`:""}`)}})}async createSignedUrls(e,t,r){var n=this;return n.handleOperation(async()=>{const i=await mr(n.fetch,`${n.url}/object/sign/${n.bucketId}`,{expiresIn:t,paths:e},{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 o=a.toString();return i.map(s=>ee(ee({},s),{},{signedUrl:s.signedURL?encodeURI(`${n.url}${s.signedURL}${o?`&${o}`:""}`):null}))})}download(e,t,r){const n=typeof(t==null?void 0:t.transform)=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image/authenticated":"object",i=new URLSearchParams;t!=null&&t.transform&&this.applyTransformOptsToQuery(i,t.transform),(t==null?void 0:t.cacheNonce)!=null&&i.set("cacheNonce",String(t.cacheNonce));const a=i.toString(),o=this._getFinalPath(e),s=()=>ll(this.fetch,`${this.url}/${n}/${o}${a?`?${a}`:""}`,{headers:this.headers,noResolveJson:!0},r);return new q$(s,this.shouldThrowOnError)}async info(e){var t=this;const r=t._getFinalPath(e);return t.handleOperation(async()=>xm(await ll(t.fetch,`${t.url}/object/info/${r}`,{headers:t.headers})))}async exists(e){var t=this;const r=t._getFinalPath(e);try{return await H$(t.fetch,`${t.url}/object/${r}`,{headers:t.headers}),{data:!0,error:null}}catch(i){if(t.shouldThrowOnError)throw i;if(mf(i)){var n;const a=i instanceof bm?i.status:i instanceof Kk?(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(e,t){const r=this._getFinalPath(e),n=new URLSearchParams;t!=null&&t.download&&n.set("download",t.download===!0?"":t.download),t!=null&&t.transform&&this.applyTransformOptsToQuery(n,t.transform),(t==null?void 0:t.cacheNonce)!=null&&n.set("cacheNonce",String(t.cacheNonce));const i=n.toString(),a=typeof(t==null?void 0:t.transform)=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${r}`)+(i?`?${i}`:"")}}}async remove(e){var t=this;return t.handleOperation(async()=>await oy(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,r){var n=this;return n.handleOperation(async()=>{const i=ee(ee(ee({},G$),t),{},{prefix:e||""});return await mr(n.fetch,`${n.url}/object/list/${n.bucketId}`,i,{headers:n.headers},r)})}async listV2(e,t){var r=this;return r.handleOperation(async()=>{const n=ee({},e);return await mr(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,n,{headers:r.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(e,t){return t.width&&e.set("width",t.width.toString()),t.height&&e.set("height",t.height.toString()),t.resize&&e.set("resize",t.resize),t.format&&e.set("format",t.format),t.quality&&e.set("quality",t.quality.toString()),e}};const J$="2.105.4",ru={"X-Client-Info":`storage-js/${J$}`};var Y$=class extends Po{constructor(e,t={},r,n){const i=new URL(e);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(/\/$/,""),o=ee(ee({},ru),t);super(a,o,r,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const r=t.listBucketOptionsToQueryString(e);return await ll(t.fetch,`${t.url}/bucket${r}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await ll(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var r=this;return r.handleOperation(async()=>await mr(r.fetch,`${r.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}))}async updateBucket(e,t){var r=this;return r.handleOperation(async()=>await wm(r.fetch,`${r.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await mr(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await oy(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},X$=class extends Po{constructor(e,t={},r){const n=e.replace(/\/$/,""),i=ee(ee({},ru),t);super(n,i,r,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await mr(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>
93{const r=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&r.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&r.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&r.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&r.set("sortOrder",e.sortOrder),e!=null&&e.search&&r.set("search",e.search);const n=r.toString(),i=n?`${t.url}/bucket?${n}`:`${t.url}/bucket`;return await ll(t.fetch,i,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await oy(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!U$(e))throw new pf("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 $$({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),n=this.shouldThrowOnError;return new Proxy(r,{get(i,a){const o=i[a];return typeof o!="function"?o:async(...s)=>{try{return{data:await o.apply(i,s),error:null}}catch(l){if(n)throw l;return{data:null,error:l}}}}})}},Q$=class extends Po{constructor(e,t={},r){const n=e.replace(/\/$/,""),i=ee(ee({},ru),{},{"Content-Type":"application/json"},t);super(n,i,r,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await Ut.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var r=this;return r.handleOperation(async()=>await Ut.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await Ut.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var r=this;return r.handleOperation(async()=>await Ut.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers})||{})}},Z$=class extends Po{constructor(e,t={},r){const n=e.replace(/\/$/,""),i=ee(ee({},ru),{},{"Content-Type":"application/json"},t);super(n,i,r,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await Ut.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await Ut.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await Ut.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await Ut.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await Ut.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},eI=class extends Po{constructor(e,t={},r){const n=e.replace(/\/$/,""),i=ee(ee({},ru),{},{"Content-Type":"application/json"},t);super(n,i,r,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Ut.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Ut.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await Ut.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Ut.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},tI=class extends eI{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new rI(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,r=this;return t().call(r,e)}async getBucket(e){var t=()=>super.getBucket,r=this;return t().call(r,e)}async listBuckets(e={}){var t=()=>super.listBuckets,r=this;return t().call(r,e)}async deleteBucket(e){var t=()=>super.deleteBucket,r=this;return t().call(r,e)}},rI=class extends Q${constructor(e,t,r,n){super(e,t,n),this.vectorBucketName=r}async createIndex(e){var t=()=>super.createIndex,r=this;return t().call(r,ee(ee({},e),{},{vectorBucketName:r.vectorBucketName}))}
93async listIndexes(e={}){var t=()=>super.listIndexes,r=this;return t().call(r,ee(ee({},e),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,r=this;return t().call(r,r.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,r=this;return t().call(r,r.vectorBucketName,e)}index(e){return new nI(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},nI=class extends Z${constructor(e,t,r,n,i){super(e,t,i),this.vectorBucketName=r,this.indexName=n}async putVectors(e){var t=()=>super.putVectors,r=this;return t().call(r,ee(ee({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(e){var t=()=>super.getVectors,r=this;return t().call(r,ee(ee({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,r=this;return t().call(r,ee(ee({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,r=this;return t().call(r,ee(ee({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,r=this;return t().call(r,ee(ee({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},iI=class extends Y${constructor(e,t={},r,n){super(e,t,r,n)}from(e){return new V$(this.url,this.headers,e,this.fetch)}get vectors(){return new tI(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new X$(this.url+"/iceberg",this.headers,this.fetch)}};const Vk="2.105.4",ga=30*1e3,_m=3,$h=_m*ga,aI="http://localhost:9999",oI="supabase.auth.token",sI={"X-Client-Info":`gotrue-js/${Vk}`},Sm="X-Supabase-Api-Version",Jk={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},lI=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,uI=10*60*1e3;class ul extends Error{constructor(t,r,n){super(t),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 q(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class cI extends ul{constructor(t,r,n){super(t,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function dI(e){return q(e)&&e.name==="AuthApiError"}class wr extends ul{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class bn extends ul{constructor(t,r,n,i){super(t,n,i),this.name=r,this.status=n}}class Ze extends bn{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Mu(e){return q(e)&&e.name==="AuthSessionMissingError"}class ia extends bn{constructor(){super("Auth session or user missing","AuthInvalidToken
93ResponseError",500,void 0)}}class Du extends bn{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Lu extends bn{constructor(t,r=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function fI(e){return q(e)&&e.name==="AuthImplicitGrantRedirectError"}class rx extends bn{constructor(t,r=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class hI extends bn{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 jm extends bn{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function Ih(e){return q(e)&&e.name==="AuthRetryableFetchError"}class nx extends bn{constructor(t,r,n){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class km extends bn{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const zc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),ix=` 	
94\r=`.split(""),pI=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<ix.length;t+=1)e[ix[t].charCodeAt(0)]=-2;for(let t=0;t<zc.length;t+=1)e[zc[t].charCodeAt(0)]=t;return e})();function ax(e,t,r){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(zc[n]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(zc[n]),t.queuedBits-=6}}function Yk(e,t,r){const n=pI[e];if(n>-1)for(t.queue=t.queue<<6|n,t.queuedBits+=6;t.queuedBits>=8;)r(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(n===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function ox(e){const t=[],r=o=>{t.push(String.fromCodePoint(o))},n={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},a=o=>{vI(o,n,r)};for(let o=0;o<e.length;o+=1)Yk(e.charCodeAt(o),i,a);return t.join("")}function mI(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function gI(e,t){for(let r=0;r<e.length;r+=1){let n=e.charCodeAt(r);if(n>55295&&n<=56319){const i=(n-55296)*1024&65535;n=(e.charCodeAt(r+1)-56320&65535|i)+65536,r+=1}mI(n,t)}}function vI(e,t,r){if(t.utf8seq===0){if(e<=127){r(e);return}for(let n=1;n<6;n+=1)if(!(e>>7-n&1)){t.utf8seq=n;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&r(t.codepoint)}}function Ua(e){const t=[],r={queue:0,queuedBits:0},n=i=>{t.push(i)};for(let i=0;i<e.length;i+=1)Yk(e.charCodeAt(i),r,n);return new Uint8Array(t)}function yI(e){const t=[];return gI(e,r=>t.push(r)),new Uint8Array(t)}function Si(e){const t=[],r={queue:0,queuedBits:0},n=i=>{t.push(i)};return e.forEach(i=>ax(i,r,n)),ax(null,r,n),t.join("")}function bI(e){return Math.round(Date.now()/1e3)+e}function xI(){return Symbol("auth-callback")}const at=()=>typeof window<"u"&&typeof document<"u",ci={tested:!1,writable:!1},Xk=()=>{if(!at())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(ci.tested)return ci.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),ci.tested=!0,ci.writable=!0}catch{ci.tested=!0,ci.writable=!1}return ci.writable};function wI(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEac
94h((i,a)=>{t[a]=i})}catch{}return r.searchParams.forEach((n,i)=>{t[i]=n}),t}const Qk=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),_I=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",va=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},di=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch{return null}},it=async(e,t)=>{await e.removeItem(t)};class gf{constructor(){this.promise=new gf.promiseConstructor((t,r)=>{this.resolve=t,this.reject=r})}}gf.promiseConstructor=Promise;function Bu(e){const t=e.split(".");if(t.length!==3)throw new km("Invalid JWT structure");for(let n=0;n<t.length;n++)if(!lI.test(t[n]))throw new km("JWT not in base64url format");return{header:JSON.parse(ox(t[0])),payload:JSON.parse(ox(t[1])),signature:Ua(t[2]),raw:{header:t[0],payload:t[1]}}}async function SI(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function jI(e,t){return new Promise((n,i)=>{(async()=>{for(let a=0;a<1/0;a++)try{const o=await e(a);if(!t(a,null,o)){n(o);return}}catch(o){if(!t(a,o)){i(o);return}}})()})}function kI(e){return("0"+e.toString(16)).substr(-2)}function OI(){const t=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(t),Array.from(t,kI).join("")}async function EI(e){const r=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",r),i=new Uint8Array(n);return Array.from(i).map(a=>String.fromCharCode(a)).join("")}async function AI(e){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."),e;const r=await EI(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function aa(e,t,r=!1){const n=OI();let i=n;r&&(i+="/recovery"),await va(e,`${t}-code-verifier`,i);const a=await AI(n);return[a,n===a?"plain":"s256"]}const PI=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function NI(e){const t=e.headers.get(Sm);if(!t||!t.match(PI))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function TI(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function CI(e){switch(e){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 $I=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Wr(e){if(!$I.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function hr(e){if(!e.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 Rh(){const e={};return new Proxy(e,{get:(t,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:(t,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:(t,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 II(e,t){return new Proxy(e,{get:(r,n,i)=>{if(n==="__isInsecureUserWarningProxy")return!0;
94if(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!t.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."),t.value=!0),Reflect.get(r,n,i)}})}function sx(e){return JSON.parse(JSON.stringify(e))}const gi=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error}return JSON.stringify(e)},RI=[502,503,504,520,521,522,523,524,530];async function lx(e){var t;if(!_I(e))throw new jm(gi(e),0);if(RI.includes(e.status))throw new jm(gi(e),e.status);let r;try{r=await e.json()}catch(a){throw new wr(gi(a),a)}let n;const i=NI(e);if(i&&i.getTime()>=Jk["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 nx(gi(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(n==="session_not_found")throw new Ze}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,o)=>a&&typeof o=="string",!0))throw new nx(gi(r),e.status,r.weak_password.reasons);throw new cI(gi(r),e.status||500,n)}const MI=(e,t,r,n)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?i:(i.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),i.body=JSON.stringify(n),Object.assign(Object.assign({},i),r))};async function Y(e,t,r,n){var i;const a=Object.assign({},n==null?void 0:n.headers);a[Sm]||(a[Sm]=Jk["2024-01-01"].name),n!=null&&n.jwt&&(a.Authorization=`Bearer ${n.jwt}`);const o=(i=n==null?void 0:n.query)!==null&&i!==void 0?i:{};n!=null&&n.redirectTo&&(o.redirect_to=n.redirectTo);const s=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",l=await DI(e,t,r+s,{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(l):{data:Object.assign({},l),error:null}}async function DI(e,t,r,n,i,a){const o=MI(t,n,i,a);let s;try{s=await e(r,Object.assign({},o))}catch(l){throw console.error(l),new jm(gi(l),0)}if(s.ok||await lx(s),n!=null&&n.noResolveJson)return s;try{return await s.json()}catch(l){await lx(l)}}function Qt(e){var t;let r=null;UI(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=bI(e.expires_in)));const n=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:r,user:n},error:null}}function ux(e){const t=Qt(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(t.data.weak_password=e.weak_password),t}function Cn(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function LI(e){return{data:e,error:null}}function BI(e){const{action_link:t,email_otp:r,hashed_token:n,redirect_to:i,verification_type:a}=e,o=hf(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),s={action_link:t,email_otp:r,hashed_token:n,redirect_to:i,verification_type:a},l=Object.assign({},o);return{data:{properties:s,user:l},error:null}}function cx(e){return e}function UI(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}const Mh=["global","local","others"];class FI{constructor({url:t="",headers:r={},fetch:n,experimental:i}){this.url=t,this.headers=r,this.fetch=Qk(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)}}
vendor: 4,751 bytes, line 94
94async signOut(t,r=Mh[0]){if(Mh.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Mh.join(", ")}`);try{return await Y(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(n){if(q(n))return{data:null,error:n};throw n}}async inviteUserByEmail(t,r={}){try{return await Y(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:Cn})}catch(n){if(q(n))return{data:{user:null},error:n};throw n}}async generateLink(t){try{const{options:r}=t,n=hf(t,["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 Y(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:i,headers:this.headers,xform:BI,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(q(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(t){try{return await Y(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Cn})}catch(r){if(q(r))return{data:{user:null},error:r};throw r}}async listUsers(t){var r,n,i,a,o,s,l;try{const u={nextPage:null,lastPage:0,total:0},f=await Y(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(a=(i=t==null?void 0:t.perPage)===null||i===void 0?void 0:i.toString())!==null&&a!==void 0?a:""},xform:cx});if(f.error)throw f.error;const d=await f.json(),h=(o=f.headers.get("x-total-count"))!==null&&o!==void 0?o:0,p=(l=(s=f.headers.get("link"))===null||s===void 0?void 0:s.split(","))!==null&&l!==void 0?l:[];return p.length>0&&(p.forEach(m=>{const v=parseInt(m.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(m.split(";")[1].split("=")[1]);u[`${b}Page`]=v}),u.total=parseInt(h)),{data:Object.assign(Object.assign({},d),u),error:null}}catch(u){if(q(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){Wr(t);try{return await Y(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Cn})}catch(r){if(q(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){Wr(t);try{return await Y(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:Cn})}catch(n){if(q(n))return{data:{user:null},error:n};throw n}}async deleteUser(t,r=!1){Wr(t);try{return await Y(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:Cn})}catch(n){if(q(n))return{data:{user:null},error:n};throw n}}async _listFactors(t){Wr(t.userId);try{const{data:r,error:n}=await Y(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:i=>({data:{factors:i},error:null})});return{data:r,error:n}}catch(r){if(q(r))return{data:null,error:r};throw r}}async _deleteFactor(t){Wr(t.userId),Wr(t.id);try{return{data:await Y(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(r){if(q(r))return{data:null,error:r};throw r}}async _listOAuthClients(t){var r,n,i,a,o,s,l;try{const u={nextPage:null,lastPage:0,total:0},f=await Y(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(a=(i=t==null?void 0:t.perPage)===null||i===void 0?void 0:i.toString())!==null&&a!==void 0?a:""},xform:cx});if(f.error)throw f.error;const d=await f.json(),h=(o=f.headers.get("x-total-count"))!==null&&o!==void 0?o:0,p=(l=(s=f.headers.get("link"))===null||s===void 0?void 0:s.split(","))!==null&&l!==void 0?l:[];return p.length>0&&(p.forEach(m=>{const v=parseInt(m.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(m.split(";")[1].split("=")[1]);u[`${b}Page`]=v}),u.total=parseInt(h)),{data:Object.assign(Object.assign({},d),u),error:null}}catch(u){if(q(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(t){try{return await Y(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(q(r))return{data:null,error:r};throw r}}async _getOAuthClient(t){try{return await Y(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(q(r))return{data:null,error:r};throw r}}async _updateOAuthClient(t,r){try{return await Y(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(q(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(t){try{return await Y(this.fetch,"DELET
94E",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(q(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(t){try{return await Y(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(q(r))return{data:null,error:r};throw r}}async _listCustomProviders(t){try{const r={};return t!=null&&t.type&&(r.type=t.type),await Y(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(q(r))return{data:{providers:[]},error:r};throw r}}async _createCustomProvider(t){try{return await Y(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(q(r))return{data:null,error:r};throw r}}async _getCustomProvider(t){try{return await Y(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(q(r))return{data:null,error:r};throw r}}async _updateCustomProvider(t,r){try{return await Y(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(q(n))return{data:null,error:n};throw n}}async _deleteCustomProvider(t){try{return await Y(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(q(r))return{data:null,error:r};throw r}}async _adminListPasskeys(t){hr(this.experimental),Wr(t.userId);try{return await Y(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/passkeys`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(q(r))return{data:null,error:r};throw r}}async _adminDeletePasskey(t){hr(this.experimental),Wr(t.userId),Wr(t.passkeyId);try{return await Y(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/passkeys/${t.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(q(r))return{data:null,error:r};throw r}}}function dx(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}const Pr={debug:!!(globalThis&&Xk()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class Zk extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class fx extends Zk{}async function zI(e,t,r){Pr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const n=new globalThis.AbortController;let i;t>0&&(i=setTimeout(()=>{n.abort(),Pr.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t)),await Promise.resolve();try{return await globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async a=>{if(a){clearTimeout(i),Pr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,a.name);try{return await r()}finally{Pr.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,a.name)}}else{if(t===0)throw Pr.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new fx(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(Pr.debug)try{const o=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(o,null,"  "))}catch(o){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",o)}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(t>0&&clearTimeout(i),a!==null&&typeof a=="object"&&"name"in a&&a.name==="AbortError"&&t>0){if(n.signal.aborted)return Pr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",e),console.warn(`@
94supabase/gotrue-js: Lock "${e}" was not released within ${t}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(e,{mode:"exclusive",steal:!0},async o=>{if(o){Pr.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",e,o.name);try{return await r()}finally{Pr.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",e,o.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await r()}));throw Pr.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",e),new fx(`Lock "${e}" was released because another request stole it`)}throw a}}function WI(){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 eO(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function HI(e){return parseInt(e,16)}function KI(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")}function qI(e){var t;const{chainId:r,domain:n,expirationTime:i,issuedAt:a=new Date,nonce:o,notBefore:s,requestId:l,resources:u,scheme:f,uri:d,version:h}=e;{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(o&&o.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${o}`);if(!d)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(h!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${h}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(`
95`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const p=eO(e.address),m=f?`${f}://${n}`:n,v=e.statement?`${e.statement}
96`:"",b=`${m} wants you to sign in with your Ethereum account:
97${p}
98
99${v}`;let g=`URI: ${d}
100Version: ${h}
101Chain ID: ${r}${o?`
102Nonce: ${o}`:""}
103Issued At: ${a.toISOString()}`;if(i&&(g+=`
104Expiration Time: ${i.toISOString()}`),s&&(g+=`
105Not Before: ${s.toISOString()}`),l&&(g+=`
106Request ID: ${l}`),u){let y=`
107Resources:`;for(const x of u){if(!x||typeof x!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${x}`);y+=`
108- ${x}`}g+=y}return`${b}
109${g}`}class ze extends Error{constructor({message:t,code:r,cause:n,name:i}){var a;super(t,{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 Wc extends ze{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function GI({error:e,options:t}){var r,n,i;const{publicKey:a}=t;if(!a)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new ze({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((r=a.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new ze({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((n=a.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new ze({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((i=a.authenticatorSelection)===null||i===void 0?void 0:i.userVerification)==="required")return new ze({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new ze({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new ze({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return a.pubKeyCredParams.filter(s=>s.type==="public-key").length===0?new ze({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new ze({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const o=window.location.hostname;if(tO(o)){if(a.rp.id!==o)return new ze({message:`The RP ID "${a.rp.id}
109" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new ze({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(a.user.id.byteLength<1||a.user.id.byteLength>64)return new ze({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new ze({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new ze({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function VI({error:e,options:t}){const{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new ze({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new ze({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const n=window.location.hostname;if(tO(n)){if(r.rpId!==n)return new ze({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new ze({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new ze({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new ze({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class JI{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const Om=new JI;function hx(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:r,excludeCredentials:n}=e,i=hf(e,["challenge","user","excludeCredentials"]),a=Ua(t).buffer,o=Object.assign(Object.assign({},r),{id:Ua(r.id).buffer}),s=Object.assign(Object.assign({},i),{challenge:a,user:o});if(n&&n.length>0){s.excludeCredentials=new Array(n.length);for(let l=0;l<n.length;l++){const u=n[l];s.excludeCredentials[l]=Object.assign(Object.assign({},u),{id:Ua(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return s}function px(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:r}=e,n=hf(e,["challenge","allowCredentials"]),i=Ua(t).buffer,a=Object.assign(Object.assign({},n),{challenge:i});if(r&&r.length>0){a.allowCredentials=new Array(r.length);for(let o=0;o<r.length;o++){const s=r[o];a.allowCredentials[o]=Object.assign(Object.assign({},s),{id:Ua(s.id).buffer,type:s.type||"public-key",transports:s.transports})}}return a}function mx(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e;return{id:e.id,rawId:e.id,response:{attestationObject:Si(new Uint8Array(e.response.attestationObject)),clientDataJSON:Si(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function gx(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e,n=e.getClientExtensionResults(),i=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:Si(new Uint8Array(i.authenticatorData)),clientDataJSON:Si(new Uint8Array(i.clientDataJSON)),signature:Si(new Uint8Array(i.signature)),userHandle:i.userHandle?Si(new Uint8Array(i.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function tO(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function Hc(){var e,t;return!!(at()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function rO(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Wc("Browser returned unexpected credential type",t)}:{data:null,error:new Wc("Empty credential response",t)}}
109catch(t){return{data:null,error:GI({error:t,options:e})}}}async function nO(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Wc("Browser returned unexpected credential type",t)}:{data:null,error:new Wc("Empty credential response",t)}}catch(t){return{data:null,error:VI({error:t,options:e})}}}const YI={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},XI={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Kc(...e){const t=i=>i!==null&&typeof i=="object"&&!Array.isArray(i),r=i=>i instanceof ArrayBuffer||ArrayBuffer.isView(i),n={};for(const i of e)if(i)for(const a in i){const o=i[a];if(o!==void 0)if(Array.isArray(o))n[a]=o;else if(r(o))n[a]=o;else if(t(o)){const s=n[a];t(s)?n[a]=Kc(s,o):n[a]=Kc(o)}else n[a]=o}return n}function QI(e,t){return Kc(YI,e,t||{})}function ZI(e,t){return Kc(XI,e,t||{})}class eR{constructor(t){this.client=t,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(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:r,friendlyName:n,signal:i},a){var o;try{const{data:s,error:l}=await this.client.mfa.challenge({factorId:t,webauthn:r});if(!s)return{data:null,error:l};const u=i??Om.createNewAbortSignal();if(s.webauthn.type==="create"){const{user:f}=s.webauthn.credential_options.publicKey;if(!f.name){const d=n;if(d)f.name=`${f.id}:${d}`;else{const p=(await this.client.getUser()).data.user,m=((o=p==null?void 0:p.user_metadata)===null||o===void 0?void 0:o.name)||(p==null?void 0:p.email)||(p==null?void 0:p.id)||"User";f.name=`${f.id}:${m}`}}f.displayName||(f.displayName=f.name)}switch(s.webauthn.type){case"create":{const f=QI(s.webauthn.credential_options.publicKey,a==null?void 0:a.create),{data:d,error:h}=await rO({publicKey:f,signal:u});return d?{data:{factorId:t,challengeId:s.id,webauthn:{type:s.webauthn.type,credential_response:d}},error:null}:{data:null,error:h}}case"request":{const f=ZI(s.webauthn.credential_options.publicKey,a==null?void 0:a.request),{data:d,error:h}=await nO(Object.assign(Object.assign({},s.webauthn.credential_options),{publicKey:f,signal:u}));return d?{data:{factorId:t,challengeId:s.id,webauthn:{type:s.webauthn.type,credential_response:d}},error:null}:{data:null,error:h}}}}catch(s){return q(s)?{data:null,error:s}:{data:null,error:new wr("Unexpected error in challenge",s)}}}async _verify({challengeId:t,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:t,webauthn:n})}async _authenticate({factorId:t,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 ul("rpId is required for WebAuthn authentication")};try{if(!Hc())return{data:null,error:new wr("Browser does not support WebAuthn",null)};const{data:o,error:s}=await this.challenge({factorId:t,webauthn:{rpId:r,rpOrigins:n},signal:i},{request:a});if(!o)return{data:null,error:s};const{webauthn:l}=o;return this._verify({factorId:t,challengeId:o.challengeId,webauthn:{type:l.type,rpId:r,rpOrigins:n,credential_response:l.credential_response}})}catch(o){return q(o)?{data:null,error:o}:{data:null,error:new wr("Unexpected error in authenticate",o)}}}async _register({friendlyName:t,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 ul("rpId is required for WebAuthn registration")};try{if(!Hc())return{data:null,error:new wr("Browser does not support WebAuthn",null)};const{data:o,error:s}=await this._enroll({friendlyName:t});if(!o)return await this.client.mfa.listFactors().then(f=>{var d;return(d=f.data)===null||d===void 0?void 0:d.all.find(h=>h.factor_type==="webauthn"&&h.friendly_name===t&&h.status!=="unverified")}).then(f=>f?this.client.mfa.unenroll({factorId:f==null?void 0:f.id}):void 0),{data:null,error:s};const{data:l,error:u}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:i},{create:a});return l?this._verify({factorId:o.id,challengeId:l.challengeId,webauthn:{rpId:r,rpOrigins:n,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:u}}catch(o){return q(o)?{data:null,error:o}:{data:null,error:new wr("Unexpected error in register",o)}}}}WI();const tR={url:aI,storageKey:oI,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:sI,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}};async function vx(e,t,r){return await r()}const oa={};class cl{get jwks(){var t,r;return(r=(t=oa[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){oa[this.storageKey]=Object.assign(Object.assign({},oa[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=oa[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){oa[this.storageKey]=Object.assign(Object.assign({},oa[this.storageKey]),{cachedAt:t})}constructor(t){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 o=Object.assign(Object.assign({},tR),t);
109if(this.storageKey=o.storageKey,this.instanceID=(r=cl.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,cl.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!o.debug,typeof o.debug=="function"&&(this.logger=o.debug),this.instanceID>0&&at()){const s=`${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(s),this.logDebugMessages&&console.trace(s)}if(this.persistSession=o.persistSession,this.autoRefreshToken=o.autoRefreshToken,this.experimental=(n=o.experimental)!==null&&n!==void 0?n:{},this.admin=new FI({url:o.url,headers:o.headers,fetch:o.fetch,experimental:this.experimental}),this.url=o.url,this.headers=o.headers,this.fetch=Qk(o.fetch),this.lock=o.lock||vx,this.detectSessionInUrl=o.detectSessionInUrl,this.flowType=o.flowType,this.hasCustomAuthorizationHeader=o.hasCustomAuthorizationHeader,this.throwOnError=o.throwOnError,this.lockAcquireTimeout=o.lockAcquireTimeout,o.lock?this.lock=o.lock:this.persistSession&&at()&&(!((i=globalThis==null?void 0:globalThis.navigator)===null||i===void 0)&&i.locks)?this.lock=zI:this.lock=vx,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 eR(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?(o.storage?this.storage=o.storage:Xk()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=dx(this.memoryStorage)),o.userStorage&&(this.userStorage=o.userStorage)):(this.memoryStorage={},this.storage=dx(this.memoryStorage)),at()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(s){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",s)}(a=this.broadcastChannel)===null||a===void 0||a.addEventListener("message",async s=>{this._debug("received broadcast notification from other tab or client",s);try{await this._notifyAllSubscribers(s.data.event,s.data.session,!1)}catch(l){this._debug("#broadcastChannel","error",l)}})}o.skipAutoInitialize||this.initialize().catch(s=>{this._debug("#initialize()","error",s)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${Vk}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),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 t;try{let r={},n="none";if(at()&&(r=wI(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),at()&&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),fI(a)){const l=(t=a.details)===null||t===void 0?void 0:t.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:a}}return{error:a}}const{session:o,redirectType:s}=i;return this._debug("#_initialize()","detected session in URL",o,"redirect type",s),await this._saveSession(o),setTimeout(async()=>{s==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return q(r)?this._returnResult({error:r}):this._returnResult({error:new wr("Unexpected error during initialization",r)}
109)}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var r,n,i;try{const a=await Y(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(i=t==null?void 0:t.options)===null||i===void 0?void 0:i.captchaToken}},xform:Qt}),{data:o,error:s}=a;if(s||!o)return this._returnResult({data:{user:null,session:null},error:s});const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(a){if(q(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async signUp(t){var r,n,i;try{let a;if("email"in t){const{email:f,password:d,options:h}=t;let p=null,m=null;this.flowType==="pkce"&&([p,m]=await aa(this.storage,this.storageKey)),a=await Y(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:h==null?void 0:h.emailRedirectTo,body:{email:f,password:d,data:(r=h==null?void 0:h.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken},code_challenge:p,code_challenge_method:m},xform:Qt})}else if("phone"in t){const{phone:f,password:d,options:h}=t;a=await Y(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:f,password:d,data:(n=h==null?void 0:h.data)!==null&&n!==void 0?n:{},channel:(i=h==null?void 0:h.channel)!==null&&i!==void 0?i:"sms",gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken}},xform:Qt})}else throw new Du("You must provide either an email or phone number and a password");const{data:o,error:s}=a;if(s||!o)return await it(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:s});const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(a){if(await it(this.storage,`${this.storageKey}-code-verifier`),q(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async signInWithPassword(t){try{let r;if("email"in t){const{email:a,password:o,options:s}=t;r=await Y(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:a,password:o,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}},xform:ux})}else if("phone"in t){const{phone:a,password:o,options:s}=t;r=await Y(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:a,password:o,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}},xform:ux})}else throw new Du("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 ia;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(q(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(t){var r,n,i,a;return await this._handleProviderSignIn(t.provider,{redirectTo:(r=t.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=t.options)===null||n===void 0?void 0:n.scopes,queryParams:(i=t.options)===null||i===void 0?void 0:i.queryParams,skipBrowserRedirect:(a=t.options)===null||a===void 0?void 0:a.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:r}=t;switch(r){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(t){var r,n,i,a,o,s,l,u,f,d,h;let p,m;if("message"in t)p=t.message,m=t.signature;else{const{chain:v,wallet:b,statement:g,options:y}=t;let x;if(at())if(typeof b=="object")x=b;
109else{const k=window;if("ethereum"in k&&typeof k.ethereum=="object"&&"request"in k.ethereum&&typeof k.ethereum.request=="function")x=k.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 b!="object"||!(y!=null&&y.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");x=b}const S=new URL((r=y==null?void 0:y.url)!==null&&r!==void 0?r:window.location.href),_=await x.request({method:"eth_requestAccounts"}).then(k=>k).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!_||_.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const w=eO(_[0]);let j=(n=y==null?void 0:y.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!j){const k=await x.request({method:"eth_chainId"});j=HI(k)}const O={domain:S.host,address:w,statement:g,uri:S.href,version:"1",chainId:j,nonce:(i=y==null?void 0:y.signInWithEthereum)===null||i===void 0?void 0:i.nonce,issuedAt:(o=(a=y==null?void 0:y.signInWithEthereum)===null||a===void 0?void 0:a.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(s=y==null?void 0:y.signInWithEthereum)===null||s===void 0?void 0:s.expirationTime,notBefore:(l=y==null?void 0:y.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(u=y==null?void 0:y.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(f=y==null?void 0:y.signInWithEthereum)===null||f===void 0?void 0:f.resources};p=qI(O),m=await x.request({method:"personal_sign",params:[KI(p),w]})}try{const{data:v,error:b}=await Y(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:p,signature:m},!((d=t.options)===null||d===void 0)&&d.captchaToken?{gotrue_meta_security:{captcha_token:(h=t.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:Qt});if(b)throw b;if(!v||!v.session||!v.user){const g=new ia;return this._returnResult({data:{user:null,session:null},error:g})}return v.session&&(await this._saveSession(v.session),await this._notifyAllSubscribers("SIGNED_IN",v.session)),this._returnResult({data:Object.assign({},v),error:b})}catch(v){if(q(v))return this._returnResult({data:{user:null,session:null},error:v});throw v}}async signInWithSolana(t){var r,n,i,a,o,s,l,u,f,d,h,p;let m,v;if("message"in t)m=t.message,v=t.signature;else{const{chain:b,wallet:g,statement:y,options:x}=t;let S;if(at())if(typeof g=="object")S=g;else{const w=window;if("solana"in w&&typeof w.solana=="object"&&("signIn"in w.solana&&typeof w.solana.signIn=="function"||"signMessage"in w.solana&&typeof w.solana.signMessage=="function"))S=w.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 g!="object"||!(x!=null&&x.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");S=g}const _=new URL((r=x==null?void 0:x.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in S&&S.signIn){const w=await S.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},x==null?void 0:x.signInWithSolana),{version:"1",domain:_.host,uri:_.href}),y?{statement:y}:null));let j;if(Array.isArray(w)&&w[0]&&typeof w[0]=="object")j=w[0];else if(w&&typeof w=="object"&&"signedMessage"in w&&"signature"in w)j=w;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in j&&"signature"in j&&(typeof j.signedMessage=="string"||j.signedMessage instanceof Uint8Array)&&j.signature instanceof Uint8Array)m=typeof j.signedMessage=="string"?j.signedMessage:new TextDecoder().decode(j.signedMessage),v=j.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in S)||typeof S.signMessage!="function"||!("publicKey"in S)||typeof S!="object"||!S.publicKey||!("toBase58"in S.publicKey)||typeof S.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");m=[`${_.host} wants you to sign in with your Solana account:`,S.publicKey.toBase58(),...y?["",y,""]:[""],"Version: 1",`URI: ${_.href}`,`Issued At: ${(i=(n=x==null?void 0:x.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&i!==void 0?i:new Date().toISOString()}`,...!((a=x==null?void 0:x.signInWithSolana)===null||a===void 0)&&a.notBefore?[`Not Before: ${x.signInWithSolana.notBefore}`]:[],...!((o=x==null?void 0:x.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${x.signInWithSolana.expirationTime}`]:[],...!((s=x==null?void 0:x.signInWithSolana)===null||s===void 0)&&s.chainId?[`Chain ID: ${x.signInWithSolana.chainId}`]:[],...!((l=x==null?void 0:x.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${x.signInWithSolana.nonce}`]:[],...!((u=x==null?void 0:x.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${x.signInWithSolana.requestId}`]:[],...!((d=(f=x==null?void 0:x.signInWithSolana)===null||f===void 0?void 0:f.resources)===null||d===void 0)&&d.length?["Resources",...x.signInWithSolana.resources.map(j=>`- ${j}`)]:[]].join(`
110`);const w=await S.signMessage(new TextEncoder().encode(m),"utf8");if(!w||!(w instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");v=w}}try{const{data:b,error:g}=await Y(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:m,signature:Si(v)}
110,!((h=t.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(p=t.options)===null||p===void 0?void 0:p.captchaToken}}:null),xform:Qt});if(g)throw g;if(!b||!b.session||!b.user){const y=new ia;return this._returnResult({data:{user:null,session:null},error:y})}return b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("SIGNED_IN",b.session)),this._returnResult({data:Object.assign({},b),error:g})}catch(b){if(q(b))return this._returnResult({data:{user:null,session:null},error:b});throw b}}async _exchangeCodeForSession(t){const r=await di(this.storage,`${this.storageKey}-code-verifier`),[n,i]=(r??"").split("/");try{if(!n&&this.flowType==="pkce")throw new hI;const{data:a,error:o}=await Y(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:n},xform:Qt});if(await it(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!a||!a.session||!a.user){const s=new ia;return this._returnResult({data:{user:null,session:null,redirectType:null},error:s})}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:o})}catch(a){if(await it(this.storage,`${this.storageKey}-code-verifier`),q(a))return this._returnResult({data:{user:null,session:null,redirectType:null},error:a});throw a}}async signInWithIdToken(t){try{const{options:r,provider:n,token:i,access_token:a,nonce:o}=t,s=await Y(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:i,access_token:a,nonce:o,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:Qt}),{data:l,error:u}=s;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!l||!l.session||!l.user){const f=new ia;return this._returnResult({data:{user:null,session:null},error:f})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:u})}catch(r){if(q(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(t){var r,n,i,a,o;try{if("email"in t){const{email:s,options:l}=t;let u=null,f=null;this.flowType==="pkce"&&([u,f]=await aa(this.storage,this.storageKey));const{error:d}=await Y(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:s,data:(r=l==null?void 0:l.data)!==null&&r!==void 0?r:{},create_user:(n=l==null?void 0:l.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:u,code_challenge_method:f},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:d})}if("phone"in t){const{phone:s,options:l}=t,{data:u,error:f}=await Y(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:s,data:(i=l==null?void 0:l.data)!==null&&i!==void 0?i:{},create_user:(a=l==null?void 0:l.shouldCreateUser)!==null&&a!==void 0?a:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(o=l==null?void 0:l.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:f})}throw new Du("You must provide either an email or phone number.")}catch(s){if(await it(this.storage,`${this.storageKey}-code-verifier`),q(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async verifyOtp(t){var r,n;try{let i,a;"options"in t&&(i=(r=t.options)===null||r===void 0?void 0:r.redirectTo,a=(n=t.options)===null||n===void 0?void 0:n.captchaToken);const{data:o,error:s}=await Y(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:a}}),redirectTo:i,xform:Qt});if(s)throw s;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,u=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(i){if(q(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithSSO(t){var r,n,i,a,o;try{let s=null,l=null;this.flowType==="pkce"&&([s,l]=await aa(this.storage,this.storageKey));const u=await Y(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(n=(r=t.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((i=t==null?void 0:t.options)===null||i===void 0)&&i.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:s,code_challenge_method:l}),headers:this.headers,xform:LI});return!((a=u.data)===null||a===void 0)&&a.url&&at()&&!(!((o=t.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(s){if(await it(this.storage,`${this.storageKey}-code-verifier`),q(s))return this._returnResult({data:null,error:s});throw s}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)throw n;if(!r)throw new Ze;const{error:i}=await Y(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:i})})}catch(t){if(q(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const r=`${this.url}/resend`;if("email"in t){const{email:n,type:i,options:a}=t,{error:o}=await Y(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:o})}else if("phone"in t){const{phone:n,type:i,options:a}=t,{data:o,error:s}=await Y(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:o==null?void 0:o.message_id},error:s})}throw new Du("You must provide either an email or phone number and a type")}catch(r){if(q(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(t,r){this._debug("#_acquireLock","begin",t);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}`,t,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(t){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await t(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 t=null;const r=await di(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?t=r:(this._debug("#getSession()","session from storage is not val
110id"),await this._removeSession())),!t)return{data:{session:null},error:null};const n=t.expires_at?t.expires_at*1e3-Date.now()<$h:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",t.expires_at),!n){if(this.userStorage){const o=await di(this.userStorage,this.storageKey+"-user");o!=null&&o.user?t.user=o.user:t.user=Rh()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};t.user=II(t.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:i,error:a}=await this._callRefreshToken(t.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(t){if(t)return await this._getUser(t);await this.initializePromise;const r=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(t){try{return t?await Y(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Cn}):await this._useSession(async r=>{var n,i,a;const{data:o,error:s}=r;if(s)throw s;return!(!((n=o.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Ze}:await Y(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(a=(i=o.session)===null||i===void 0?void 0:i.access_token)!==null&&a!==void 0?a:void 0,xform:Cn})})}catch(r){if(q(r))return Mu(r)&&(await this._removeSession(),await it(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(t,r={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,r))}async _updateUser(t,r={}){try{return await this._useSession(async n=>{const{data:i,error:a}=n;if(a)throw a;if(!i.session)throw new Ze;const o=i.session;let s=null,l=null;this.flowType==="pkce"&&t.email!=null&&([s,l]=await aa(this.storage,this.storageKey));const{data:u,error:f}=await Y(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:s,code_challenge_method:l}),jwt:o.access_token,xform:Cn});if(f)throw f;return o.user=u.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),this._returnResult({data:{user:o.user},error:null})})}catch(n){if(await it(this.storage,`${this.storageKey}-code-verifier`),q(n))return this._returnResult({data:{user:null},error:n});throw n}}async setSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new Ze;const r=Date.now()/1e3;let n=r,i=!0,a=null;const{payload:o}=Bu(t.access_token);if(o.exp&&(n=o.exp,i=n<=r),i){const{data:s,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!s)return{data:{user:null,session:null},error:null};a=s}else{const{data:s,error:l}=await this._getUser(t.access_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});a={access_token:t.access_token,refresh_token:t.refresh_token,user:s.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(q(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async r=>{var n;if(!t){const{data:o,error:s}=r;if(s)throw s;t=(n=o.session)!==null&&n!==void 0?n:void 0}if(!(t!=null&&t.refresh_token))throw new Ze;const{data:i,error:a}=await this._callRefreshToken(t.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(q(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(t,r){var n;try{if(!at())throw new Lu("No browser detected.");
110if(t.error||t.error_description||t.error_code)throw new Lu(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new rx("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Lu("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new rx("No code detected.");const{data:x,error:S}=await this._exchangeCodeForSession(t.code);if(S)throw S;const _=new URL(window.location.href);return _.searchParams.delete("code"),window.history.replaceState(window.history.state,"",_.toString()),{data:{session:x.session,redirectType:(n=x.redirectType)!==null&&n!==void 0?n:null},error:null}}const{provider_token:i,provider_refresh_token:a,access_token:o,refresh_token:s,expires_in:l,expires_at:u,token_type:f}=t;if(!o||!l||!s||!f)throw new Lu("No session defined in URL");const d=Math.round(Date.now()/1e3),h=parseInt(l);let p=d+h;u&&(p=parseInt(u));const m=p-d;m*1e3<=ga&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${m}s, should have been closer to ${h}s`);const v=p-h;d-v>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",v,p,d):d-v<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",v,p,d);const{data:b,error:g}=await this._getUser(o);if(g)throw g;const y={provider_token:i,provider_refresh_token:a,access_token:o,expires_in:h,expires_at:p,refresh_token:s,token_type:f,user:b.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:y,redirectType:t.type},error:null})}catch(i){if(q(i))return this._returnResult({data:{session:null,redirectType:null},error:i});throw i}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error_description)}async _isPKCECallback(t){const r=await di(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&r)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:i,error:a}=r;if(a&&!Mu(a))return this._returnResult({error:a});const o=(n=i.session)===null||n===void 0?void 0:n.access_token;if(o){const{error:s}=await this.admin.signOut(o,t);if(s&&!(dI(s)&&(s.status===404||s.status===401||s.status===403)||Mu(s)))return this._returnResult({error:s})}return t!=="others"&&(await this._removeSession(),await it(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const r=xI(),n={id:r,callback:t,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(t){return await this._useSession(async r=>{var n,i;try{const{data:{session:a},error:o}=r;if(o)throw o;await((n=this.stateChangeEmitters.get(t))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",a)),this._debug("INITIAL_SESSION","callback id",t,"session",a)}catch(a){await((i=this.stateChangeEmitters.get(t))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",a),Mu(a)?console.warn(a):console.error(a)}})}async resetPasswordForEmail(t,r={}){let n=null,i=null;this.flowType==="pkce"&&([n,i]=await aa(this.storage,this.storageKey,!0));try{return await Y(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:n,code_challenge_method:i,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(a){if(await it(this.storage,`${this.storageKey}-code-verifier`),q(a))return this._returnResult({data:null,error:a});throw a}}async getUserIdentities(){var t;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return this._returnResult({data:{identities:(t=r.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(r){if(q(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var r;try{const{data:n,error:i}=await this._useSession(async a=>{var o,s,l,u,f;const{data:d,error:h}=a;if(h)throw h;const p=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(o=t.options)===null||o===void 0?void 0:o.redirectTo,scopes:(s=t.options)===null||s===void 0?void 0:s.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await Y(this.fetch,"GET",p,{headers:this.headers,jwt:(f=(u=d.session)===null||u===void 0?void 0:u.access_token)!==null&&f!==void 0?f:void 0})});if(i)throw i;return at()&&!(!((r=t.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),this._returnResult({data:{provider:t.provider,url:n==null?void 0:n.url},error:null})}catch(n){if(q(n))return this._returnResult({data:{provider:t.provider,url:null},error:n});throw n}}async linkIdentityIdToken(t){return await this._useSession(async r=>{var n;try{const{error:i,data:{session:a}}=r;if(i)throw i;const{options:o,provider:s,token:l,access_token:u,nonce:f}=t,d=await Y(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:s,id_token:l,access_token:u,nonce:f,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:Qt}),{data:h,error:p}=d;return p?this._returnResult({data:{user:null,session:null},error:p}):!h||!h.session||!h.user?this._returnResult({data:{user:null,session:null},error:new ia}):(h.session&&(await this._saveSession(h.session),await this._notifyAllSubscribers("USER_UPDATED",h.session)),this._returnResult({data:h,error:p}))}catch(i){if(await it(this.storage,`${this.storageKey}-code-verifier`),q(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}})}async unlinkIdentity(t){try{return await this._useSession(async r=>{var n,i;const{data:a,error:o}=r;if(o)throw o;
110return await Y(this.fetch,"DELETE",`${this.url}/user/identities/${t.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(q(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(t){const r=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(r,"begin");try{const n=Date.now();return await jI(async i=>(i>0&&await SI(200*Math.pow(2,i-1)),this._debug(r,"refreshing attempt",i),await Y(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Qt})),(i,a)=>{const o=200*Math.pow(2,i);return a&&Ih(a)&&Date.now()+o-n<ga})}catch(n){if(this._debug(r,"error",n),q(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}finally{this._debug(r,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",r,"url",n),at()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:t,url:n},error:null}}async _recoverAndRefresh(){var t,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const i=await di(this.storage,this.storageKey);if(i&&this.userStorage){let o=await di(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:i.user},await va(this.userStorage,this.storageKey+"-user",o)),i.user=(t=o==null?void 0:o.user)!==null&&t!==void 0?t:Rh()}else if(i&&!i.user&&!i.user){const o=await di(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(i.user=o.user,await it(this.storage,this.storageKey+"-user"),await va(this.storage,this.storageKey,i)):i.user=Rh()}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()<$h;if(this._debug(n,`session has${a?"":" not"} expired with margin of ${$h}s`),a){if(this.autoRefreshToken&&i.refresh_token){const{error:o}=await this._callRefreshToken(i.refresh_token);o&&(console.error(o),Ih(o)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else if(i.user&&i.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:s}=await this._getUser(i.access_token);!s&&(o!=null&&o.user)?(i.user=o.user,await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(n,"error getting user data, skipping SIGNED_IN notification",o)}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(t){var r,n;if(!t)throw new Ze;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const i=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(i,"begin");try{this.refreshingDeferred=new gf;const{data:a,error:o}=await this._refreshAccessToken(t);if(o)throw o;if(!a.session)throw new Ze;await this._saveSession(a.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",a.session);const s={data:a.session,error:null};return this.refreshingDeferred.resolve(s),s}catch(a){if(this._debug(i,"error",a),q(a)){const o={data:null,error:a};return Ih(a)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(o),o}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(a),a}finally{this.refreshingDeferred=null,this._debug(i,"end")}}async _notifyAllSubscribers(t,r,n=!0){const i=`#_notifyAllSubscribers(${t})`;this._debug(i,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:t,session:r});const a=[],o=Array.from(this.stateChangeEmitters.values()).map(async s=>{try{await s.callback(t,r)}catch(l){a.push(l)}});if(await Promise.all(o),a.length>0){for(let s=0;s<a.length;s+=1)console.error(a[s]);throw a[0]}}finally{this._debug(i,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await it(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},t),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await va(this.userStorage,this.storageKey+"-user",{user:r.user});const i=Object.assign({},r);delete i.user;const a=sx(i);await va(this.storage,this.storageKey,a)}else{const i=sx(r);await va(this.storage,this.storageKey,i)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await it(this.storage,this.storageKey),await it(this.storage,this.storageKey+"-code-verifier"),await it(this.storage,this.storageKey+"-user"),this.userStorage&&await it(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&at()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
110catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),ga);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);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 t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);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 t=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-t)/ga);this._debug("#_autoRefreshTokenTick()",`access token expires in ${i} ticks, a tick lasts ${ga}ms, refresh threshold is ${_m} ticks`),i<=_m&&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(t){if(t instanceof Zk)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!at()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const r=`#_onVisibilityChanged(${t})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(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(t,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,o]=await aa(this.storage,this.storageKey),s=new URLSearchParams({code_challenge:`${encodeURIComponent(a)}`,code_challenge_method:`${encodeURIComponent(o)}`});i.push(s.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}`),`${t}?${i.join("&")}`}async _unenroll(t){try{return await this._useSession(async r=>{var n;const{data:i,error:a}=r;return a?this._returnResult({data:null,error:a}):await Y(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(q(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(t){try{return await this._useSession(async r=>{var n,i;const{data:a,error:o}=r;if(o)return this._returnResult({data:null,error:o});const s=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:l,error:u}=await Y(this.fetch,"POST",`${this.url}/factors`,{body:s,headers:this.headers,jwt:(n=a==null?void 0:a.session)===null||n===void 0?void 0:n.access_token});return u?this._returnResult({data:null,error:u}):(t.factorType==="totp"&&l.type==="totp"&&(!((i=l==null?void 0:l.totp)===null||i===void 0)&&i.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(r){if(q(r))return this._returnResult({data:null,error:r});throw r}}async _verify(t){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 o=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?mx(t.webauthn.credential_response):gx(t.webauthn.credential_response)})}:{code:t.code}),{data:s,error:l}=await Y(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:o,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});return l?this._returnResult({data:null,error:l}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+s.expires_in},s)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",s),this._returnResult({data:s,error:l}))})}catch(r){if(q(r))return this._returnResult({data:null,error:r});throw r}})}async _challenge(t){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 o=await Y(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});if(o.error)return o;const{data:s}=o;if(s.type!=="webauthn")return{data:s,error:null};switch(s.webauthn.type){case"create":return{data:Object.assign(Object.assign({},s),{webauthn:Object.assign(Object.assign({},s.webauthn),{credential_options:Object.assign(Object.assign({},s.webauthn.credential_options),{publicKey:hx(s.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},s),{webauthn:Object.assign(Object.assign({},s.webauthn),{credential_options:Object.assign(Object.assign({},s.webauthn.credential_options),{publicKey:px(s.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(q(r))return this._returnResult({data:null,error:r});throw r}})}async _challengeAndVerify(t){const{data:r,error:n}=await this._challenge({factorId:t.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:t.factorId,challengeId:r.id,code:t.code})}async _listFactors(){var t;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(t=r==null?void 0:r.factors)!==null&&t!==void 0?t:[])i.all.push(a),a.status==="verified"&&i[a.factor_type].push(a);return{data:i,error:null}}async _getAuthenticatorAssuranceLevel(t){var r,n,i,a;if(t)try{const{payload:p}=Bu(t);let m=null;p.aal&&(m=p.aal);let v=m;const{data:{user:b},error:g}=await this.getUser(t);if(g)return this._returnResult({data:null,error:g});((n=(r=b==null?void 0:b.factors)===null||r===void 0?void 0:r.filter(S=>S.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(v="aal2");const x=p.amr||[];return{data:{currentLevel:m,nextLevel:v,currentAuthenticationMethods:x},error:null}}catch(p){if(q(p))return this._returnResult({data:null,error:p});throw p}const{data:{session:o},error:s}
110=await this.getSession();if(s)return this._returnResult({data:null,error:s});if(!o)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:l}=Bu(o.access_token);let u=null;l.aal&&(u=l.aal);let f=u;((a=(i=o.user.factors)===null||i===void 0?void 0:i.filter(p=>p.status==="verified"))!==null&&a!==void 0?a:[]).length>0&&(f="aal2");const h=l.amr||[];return{data:{currentLevel:u,nextLevel:f,currentAuthenticationMethods:h},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async r=>{const{data:{session:n},error:i}=r;return i?this._returnResult({data:null,error:i}):n?await Y(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:n.access_token,xform:a=>({data:a,error:null})}):this._returnResult({data:null,error:new Ze})})}catch(r){if(q(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(t,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 Ze});const o=await Y(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:i.access_token,body:{action:"approve"},xform:s=>({data:s,error:null})});return o.data&&o.data.redirect_url&&at()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(q(n))return this._returnResult({data:null,error:n});throw n}}async _denyAuthorization(t,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 Ze});const o=await Y(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:i.access_token,body:{action:"deny"},xform:s=>({data:s,error:null})});return o.data&&o.data.redirect_url&&at()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(q(n))return this._returnResult({data:null,error:n});throw n}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;return n?this._returnResult({data:null,error:n}):r?await Y(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 Ze})})}catch(t){if(q(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async r=>{const{data:{session:n},error:i}=r;return i?this._returnResult({data:null,error:i}):n?(await Y(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Ze})})}catch(r){if(q(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(t,r={keys:[]}){let n=r.keys.find(s=>s.kid===t);if(n)return n;const i=Date.now();if(n=this.jwks.keys.find(s=>s.kid===t),n&&this.jwks_cached_at+uI>i)return n;const{data:a,error:o}=await Y(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!a.keys||a.keys.length===0||(this.jwks=a,this.jwks_cached_at=i,n=a.keys.find(s=>s.kid===t),!n)?null:n}async getClaims(t,r={}){try{let n=t;if(!n){const{data:p,error:m}
110=await this.getSession();if(m||!p.session)return this._returnResult({data:null,error:m});n=p.session.access_token}const{header:i,payload:a,signature:o,raw:{header:s,payload:l}}=Bu(n);r!=null&&r.allowExpired||TI(a.exp);const u=!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(!u){const{error:p}=await this.getUser(n);if(p)throw p;return{data:{claims:a,header:i,signature:o},error:null}}const f=CI(i.alg),d=await crypto.subtle.importKey("jwk",u,f,!0,["verify"]);if(!await crypto.subtle.verify(f,d,o,yI(`${s}.${l}`)))throw new km("Invalid JWT signature");return{data:{claims:a,header:i,signature:o},error:null}}catch(n){if(q(n))return this._returnResult({data:null,error:n});throw n}}async signInWithPasskey(t){var r,n,i;hr(this.experimental);try{if(!Hc())return this._returnResult({data:null,error:new wr("Browser does not support WebAuthn",null)});const{data:a,error:o}=await this._startPasskeyAuthentication({options:{captchaToken:(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.captchaToken}});if(o||!a)return this._returnResult({data:null,error:o});const s=px(a.options),l=(i=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.signal)!==null&&i!==void 0?i:Om.createNewAbortSignal(),{data:u,error:f}=await nO({publicKey:s,signal:l});if(f||!u)return this._returnResult({data:null,error:f??new wr("WebAuthn ceremony failed",null)});const d=gx(u);return this._verifyPasskeyAuthentication({challengeId:a.challenge_id,credential:d})}catch(a){if(q(a))return this._returnResult({data:null,error:a});throw a}}async registerPasskey(t){var r,n;hr(this.experimental);try{if(!Hc())return this._returnResult({data:null,error:new wr("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 o=hx(i.options),s=(n=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.signal)!==null&&n!==void 0?n:Om.createNewAbortSignal(),{data:l,error:u}=await rO({publicKey:o,signal:s});if(u||!l)return this._returnResult({data:null,error:u??new wr("WebAuthn ceremony failed",null)});const f=mx(l);return this._verifyPasskeyRegistration({challengeId:i.challenge_id,credential:f})}catch(i){if(q(i))return this._returnResult({data:null,error:i});throw i}}async _startPasskeyRegistration(){hr(this.experimental);try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)return this._returnResult({data:null,error:n});if(!r)return this._returnResult({data:null,error:new Ze});const{data:i,error:a}=await Y(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(t){if(q(t))return this._returnResult({data:null,error:t});throw t}}async _verifyPasskeyRegistration(t){hr(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 Ze});const{data:a,error:o}=await Y(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:n.access_token,body:{challenge_id:t.challengeId,credential:t.credential}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:a,error:null})})}catch(r){if(q(r))return this._returnResult({data:null,error:r});throw r}}async _startPasskeyAuthentication(t){var r;hr(this.experimental);try{const{data:n,error:i}=await Y(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(r=t==null?void 0:t.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(q(n))return this._returnResult({data:null,error:n});throw n}}async _verifyPasskeyAuthentication(t){hr(this.experimental);try{const{data:r,error:n}=await Y(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:t.challengeId,credential:t.credential},xform:Qt});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(q(r))return this._returnResult({data:null,error:r});throw r}}async _listPasskeys(){hr(this.experimental);try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)return this._returnResult({data:null,error:n});if(!r)return this._returnResult({data:null,error:new Ze});const{data:i,error:a}=await Y(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:r.access_token,xform:o=>({data:o,error:null})});return a?this._returnResult({data:null,error:a}):this._returnResult({data:i,error:null})})}catch(t){if(q(t))return this._returnResult({data:null,error:t});throw t}}async _updatePasskey(t){hr(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 Ze});const{data:a,error:o}=await Y(this.fetch,"PATCH",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:n.access_token,body:{friendly_name:t.friendlyName}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:a,error:null})})}catch(r){if(q(r))return this._returnResult({data:null,error:r});throw r}}async _deletePasskey(t){hr(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 Ze});const{error:a}
110=await Y(this.fetch,"DELETE",`${this.url}/passkeys/${t.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(q(r))return this._returnResult({data:null,error:r});throw r}}}cl.nextInstanceID={};const rR=cl,nR="2.105.4";let bs="";typeof Deno<"u"?bs="deno":typeof document<"u"?bs="web":typeof navigator<"u"&&navigator.product==="ReactNative"?bs="react-native":bs="node";const iR={"X-Client-Info":`supabase-js-${bs}/${nR}`},aR={headers:iR},oR={schema:"public"},sR={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},lR={};function dl(e){"@babel/helpers - typeof";return dl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dl(e)}function uR(e,t){if(dl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(dl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cR(e){var t=uR(e,"string");return dl(t)=="symbol"?t:t+""}function dR(e,t,r){return(t=cR(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ie(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yx(Object(r),!0).forEach(function(n){dR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const fR=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),hR=()=>Headers,pR=(e,t,r)=>{const n=fR(r),i=hR();return async(a,o)=>{var s;const l=(s=await t())!==null&&s!==void 0?s:e;let u=new i(o==null?void 0:o.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${l}`),n(a,Ie(Ie({},o),{},{headers:u}))}};function mR(e){return e.endsWith("/")?e:e+"/"}function gR(e,t){var r,n;const{db:i,auth:a,realtime:o,global:s}=e,{db:l,auth:u,realtime:f,global:d}=t,h={db:Ie(Ie({},l),i),auth:Ie(Ie({},u),a),realtime:Ie(Ie({},f),o),storage:{},global:Ie(Ie(Ie({},d),s),{},{headers:Ie(Ie({},(r=d==null?void 0:d.headers)!==null&&r!==void 0?r:{}),(n=s==null?void 0:s.headers)!==null&&n!==void 0?n:{})}),accessToken:async()=>""};return e.accessToken?h.accessToken=e.accessToken:delete h.accessToken,h}function vR(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(mR(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var yR=class extends rR{constructor(e){super(e)}},bR=class{constructor(e,t,r){var n,i;this.supabaseUrl=e,this.supabaseKey=t;const a=vR(e);if(!t)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 o=`sb-${a.hostname.split(".")[0]}-auth-token`,s={db:oR,realtime:lR,auth:Ie(Ie({},sR),{},{storageKey:o}),global:aR},l=gR(r??{},s);if(this.storageKey=(n=l.auth.storageKey)!==null&&n!==void 0?n:"",this.headers=(i=l.global.headers)!==null&&i!==void 0?i:{},l.accessToken)this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(f,d)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(d)} is not possible`)}});else{var u;this.auth=this._initSupabaseAuthClient((u=l.auth)!==null&&u!==void 0?u:{},this.headers,l.global.fetch)}this.fetch=pR(t,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(Ie({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},l.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(f=>this.realtime.setAuth(f)).catch(f=>console.warn("Failed to set initial Realtime auth token:",f)),this.rest=new KC(new URL("rest/v1",a).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch,timeout:l.db.timeout,urlLengthLimit:l.db.urlLengthLimit}),this.storage=new iI(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new RC(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,r)}
110channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,r;if(e.accessToken)return await e.accessToken();const{data:n}=await e.auth.getSession();return(t=(r=n.session)===null||r===void 0?void 0:r.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:i,storageKey:a,flowType:o,lock:s,debug:l,throwOnError:u,experimental:f,lockAcquireTimeout:d,skipAutoInitialize:h},p,m){const v={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new yR({url:this.authUrl.href,headers:Ie(Ie({},v),p),storageKey:a,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:i,flowType:o,lock:s,debug:l,throwOnError:u,experimental:f,fetch:m,lockAcquireTimeout:d,skipAutoInitialize:h,hasCustomAuthorizationHeader:Object.keys(this.headers).some(b=>b.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new E$(this.realtimeUrl.href,Ie(Ie({},e),{},{params:Ie(Ie({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t==null?void 0:t.access_token)})}_handleTokenChanged(e,t,r){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const xR=(e,t,r)=>new bR(e,t,r);function wR(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const r=t.match(/^v(\d+)\./);return r?parseInt(r[1],10)<=18:!1}wR()&&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 _R="https://hezgmjtsvxqogntjipek.supabase.co",SR="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImhlemdtanRzdnhxb2dudGppcGVrIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Nzg2MTMyNDcsImV4cCI6MjA5NDE4OTI0N30.CN8sH-1B6k2pMn7Mgapmc92Vsunw0PqaLtWG8YBNVOo",Q=xR(_R,SR);/**
111 * @license lucide-react v0.400.0 - ISC
112 *
113 * This source code is licensed under the ISC license.
114 * See the LICENSE file in the root directory of this source tree.
115 */const jR=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),iO=(...e)=>e.filter((t,r,n)=>!!t&&n.indexOf(t)===r).join(" ");/**
116 * @license lucide-react v0.400.0 - ISC
117 *
118 * This source code is licensed under the ISC license.
119 * See the LICENSE file in the root directory of this source tree.
120 */var kR={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"};/**
121 * @license lucide-react v0.400.0 - ISC
122 *
123 * This source code is licensed under the ISC license.
124 * See the LICENSE file in the root directory of this source tree.
125 */const OR=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:o,...s},l)=>E.createElement("svg",{ref:l,...kR,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:iO("lucide",i),...s},[...o.map(([u,f])=>E.createElement(u,f)),...Array.isArray(a)?a:[a]]));/**
126 * @license lucide-react v0.400.0 - ISC
127 *
128 * This source code is licensed under the ISC license.
129 * See the LICENSE file in the root directory of this source tree.
130 */const te=(e,t)=>{const r=E.forwardRef(({className:n,...i},a)=>E.createElement(OR,{ref:a,iconNode:t,className:iO(`lucide-${jR(e)}`,n),...i}));return r.displayName=`${e}`,r};/**
131 * @license lucide-react v0.400.0 - ISC
132 *
133 * This source code is licensed under the ISC license.
134 * See the LICENSE file in the root directory of this source tree.
135 */const ER=te("AlignLeft",[["line",{x1:"21",x2:"3",y1:"6",y2:"6",key:"1fp77t"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}],["line",{x1:"17",x2:"3",y1:"18",y2:"18",key:"1awlsn"}]]);/**
136 * @license lucide-react v0.400.0 - ISC
137 *
138 * This source code is licensed under the ISC license.
139 * See the LICENSE file in the root directory of this source tree.
140 */const Xa=te("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
141 * @license lucide-react v0.400.0 - ISC
142 *
143 * This source code is licensed under the ISC license.
144 * See the LICENSE file in the root directory of this source tree.
145 */const AR=te("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
146 * @license lucide-react v0.400.0 - ISC
147 *
148 * This source code is licensed under the ISC license.
149 * See the LICENSE file in the root directory of this source tree.
150 */const fl=te("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
151 * @license lucide-react v0.400.0 - ISC
152 *
153 * This source code is licensed under the ISC license.
154 * See the LICENSE file in the root directory of this source tree.
155 */const Is=te("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);/**
156 * @license lucide-react v0.400.0 - ISC
157 *
158 * This source code is licensed under the ISC license.
159 * See the LICENSE file in the root directory of this source tree.
160 */const aO=te("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}
160],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
161 * @license lucide-react v0.400.0 - ISC
162 *
163 * This source code is licensed under the ISC license.
164 * See the LICENSE file in the root directory of this source tree.
165 */const oO=te("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
166 * @license lucide-react v0.400.0 - ISC
167 *
168 * This source code is licensed under the ISC license.
169 * See the LICENSE file in the root directory of this source tree.
170 */const PR=te("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
171 * @license lucide-react v0.400.0 - ISC
172 *
173 * This source code is licensed under the ISC license.
174 * See the LICENSE file in the root directory of this source tree.
175 */const vf=te("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
176 * @license lucide-react v0.400.0 - ISC
177 *
178 * This source code is licensed under the ISC license.
179 * See the LICENSE file in the root directory of this source tree.
180 */const NR=te("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
181 * @license lucide-react v0.400.0 - ISC
182 *
183 * This source code is licensed under the ISC license.
184 * See the LICENSE file in the root directory of this source tree.
185 */const No=te("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
186 * @license lucide-react v0.400.0 - ISC
187 *
188 * This source code is licensed under the ISC license.
189 * See the LICENSE file in the root directory of this source tree.
190 */const sy=te("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
191 * @license lucide-react v0.400.0 - ISC
192 *
193 * This source code is licensed under the ISC license.
194 * See the LICENSE file in the root directory of this source tree.
195 */const TR=te("CircleDot",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]);/**
196 * @license lucide-react v0.400.0 - ISC
197 *
198 * This source code is licensed under the ISC license.
199 * See the LICENSE file in the root directory of this source tree.
200 */const sO=te("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
201 * @license lucide-react v0.400.0 - ISC
202 *
203 * This source code is licensed under the ISC license.
204 * See the LICENSE file in the root directory of this source tree.
205 */const lO=te("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
206 * @license lucide-react v0.400.0 - ISC
207 *
208 * This source code is licensed under the ISC license.
209 * See the LICENSE file in the root directory of this source tree.
210 */const CR=te("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/**
211 * @license lucide-react v0.400.0 - ISC
212 *
213 * This source code is licensed under the ISC license.
214 * See the LICENSE file in the root directory of this source tree.
215 */const fn=te("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
216 * @license lucide-react v0.400.0 - ISC
217 *
218 * This source code is licensed under the ISC license.
219 * See the LICENSE file in the root directory of this source tree.
220 */const hl=te("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
221 * @license lucide-react v0.400.0 - ISC
222 *
223 * This source code is licensed under the ISC license.
224 * See the LICENSE file in the root directory of this source tree.
225 */const Em=te("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
226 * @license lucide-react v0.400.0 - ISC
227 *
228 * This source code is licensed under the ISC license.
229 * See the LICENSE file in the root directory of this source tree.
230 */const Qa=te("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
231 * @license lucide-react v0.400.0 - ISC
232 *
233 * This source code is licensed under the ISC license.
234 * See the LICENSE file in the root directory of this source tree.
235 */const $R=te("FileSpreadsheet",[["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:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]]);/**
236 * @license lucide-react v0.400.0 - ISC
237 *
238 * This source code is licensed under the ISC license.
239 * See the LICENSE file in the root directory of this source tree.
240 */const Za=te("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
241 * @license lucide-react v0.400.0 - ISC
242 *
243 * This source code is licensed under the ISC license.
244 * See the LICENSE file in the root directory of this source tree.
245 */const ly=te("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
246 * @license lucide-react v0.400.0 - ISC
247 *
248 * This source code is licensed under the ISC license.
249 * See the LICENSE file in the root directory of this source tree.
250 */const ji=te("GraduationCap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]);/**
251 * @license lucide-react v0.400.0 - ISC
252 *
253 * This source code is licensed under the ISC license.
254 * See the LICENSE file in the root directory of this source tree.
255 */const IR=te("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
256 * @license lucide-react v0.400.0 - ISC
257 *
258 * This source code is licensed under the ISC license.
259 * See the LICENSE file in the root directory of this source tree.
260 */const RR=te("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
261 * @license lucide-react v0.400.0 - ISC
262 *
263 * This source code is licensed under the ISC license.
264 * See the LICENSE file in the root directory of this source tree.
265 */const uO=te("LogOut",[["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"}]]);/**
266 * @license lucide-react v0.400.0 - ISC
267 *
268 * This source code is licensed under the ISC license.
269 * See the LICENSE file in the root directory of this source tree.
270 */const uy=te("Mail",[["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"}]]);/**
271 * @license lucide-react v0.400.0 - ISC
272 *
273 * This source code is licensed under the ISC license.
274 * See the LICENSE file in the root directory of this source tree.
275 */const cy=te("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
276 * @license lucide-react v0.400.0 - ISC
277 *
278 * This source code is licensed under the ISC license.
279 * See the LICENSE file in the root directory of this source tree.
280 */const cO=te("Paperclip",[["path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48",key:"1u3ebp"}]]);/**
281 * @license lucide-react v0.400.0 - ISC
282 *
283 * This source code is licensed under the ISC license.
284 * See the LICENSE file in the root directory of this source tree.
285 */const dO=te("Pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);/**
286 * @license lucide-react v0.400.0 - ISC
287 *
288 * This source code is licensed under the ISC license.
289 * See the LICENSE file in the root directory of this source tree.
290 */const fO=te("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/**
291 * @license lucide-react v0.400.0 - ISC
292 *
293 * This source code is licensed under the ISC license.
294 * See the LICENSE file in the root directory of this source tree.
295 */const eo=te("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
296 * @license lucide-react v0.400.0 - ISC
297 *
298 * This source code is licensed under the ISC license.
299 * See the LICENSE file in the root directory of this source tree.
300 */const MR=te("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);/**
301 * @license lucide-react v0.400.0 - ISC
302 *
303 * This source code is licensed under the ISC license.
304 * See the LICENSE file in the root directory of this source tree.
305 */const dy=te("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
306 * @license lucide-react v0.400.0 - ISC
307 *
308 * This source code is licensed under the ISC license.
309 * See the LICENSE file in the root directory of this source tree.
310 */const DR=te("SquareCheckBig",[["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}],["path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11",key:"1jnkn4"}]]);/**
311 * @license lucide-react v0.400.0 - ISC
312 *
313 * This source code is licensed under the ISC license.
314 * See the LICENSE file in the root directory of this source tree.
315 */const hO=te("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/**
316 * @license lucide-react v0.400.0 - ISC
317 *
318 * This source code is licensed under the ISC license.
319 * See the LICENSE file in the root directory of this source tree.
320 */const LR=te("ToggleLeft",[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"6",ry:"6",key:"f2vt7d"}],["circle",{cx:"8",cy:"12",r:"2",key:"1nvbw3"}]]);/**
321 * @license lucide-react v0.400.0 - ISC
322 *
323 * This source code is licensed under the ISC license.
324 * See the LICENSE file in the root directory of this source tree.
325 */const Ur=te("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}
325],["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"}]]);/**
326 * @license lucide-react v0.400.0 - ISC
327 *
328 * This source code is licensed under the ISC license.
329 * See the LICENSE file in the root directory of this source tree.
330 */const Am=te("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
331 * @license lucide-react v0.400.0 - ISC
332 *
333 * This source code is licensed under the ISC license.
334 * See the LICENSE file in the root directory of this source tree.
335 */const BR=te("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);/**
336 * @license lucide-react v0.400.0 - ISC
337 *
338 * This source code is licensed under the ISC license.
339 * See the LICENSE file in the root directory of this source tree.
340 */const UR=te("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
341 * @license lucide-react v0.400.0 - ISC
342 *
343 * This source code is licensed under the ISC license.
344 * See the LICENSE file in the root directory of this source tree.
345 */const bx=te("UserCheck",[["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"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]]);/**
346 * @license lucide-react v0.400.0 - ISC
347 *
348 * This source code is licensed under the ISC license.
349 * See the LICENSE file in the root directory of this source tree.
350 */const qc=te("Users",[["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"}]]);/**
351 * @license lucide-react v0.400.0 - ISC
352 *
353 * This source code is licensed under the ISC license.
354 * See the LICENSE file in the root directory of this source tree.
355 */const xn=te("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Ti(){return c.jsx("header",{className:"sticky top-0 z-50 bg-white border-b border-slate-100",children:c.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-4 flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-4 md:gap-6",children:[c.jsx(ve,{to:"/",className:"flex items-center",children:c.jsx("img",{src:"/images/enugu-job-centre-logo.png",alt:"Enugu Job Centre",className:"h-10 md:h-12 w-auto"})}),c.jsxs("div",{className:"hidden md:flex items-center gap-2 border-l border-slate-200 pl-4 md:pl-6",children:[c.jsx("span",{className:"text-red-600 font-extrabold italic text-3xl tracking-tighter leading-none",children:"giz"}),c.jsxs("div",{className:"text-[8px] text-slate-700 leading-[1.2]",children:["Deutsche Gesellschaft",c.jsx("br",{}),"für Internationale",c.jsx("br",{}),"Zusammenarbeit (GIZ) GmbH"]})]})]}),c.jsxs("nav",{className:"hidden md:flex items-center gap-10 font-display",children:[c.jsx(ve,{to:"/",className:"text-slate-900 font-semibold hover:text-navy",children:"Home"}),c.jsx(ve,{to:"/jobs",className:"text-slate-900 font-semibold hover:text-navy",children:"Jobs"}),c.jsx("a",{href:"#about",className:"text-slate-900 font-semibold hover:text-navy",children:"About"})]}),c.jsxs(ve,{to:"/jobs",className:"group inline-flex items-center gap-1 bg-navy text-white pl-6 pr-1.5 py-1.5 rounded-full font-semibold hover:bg-navy-dark transition-colors",children:[c.jsx("span",{children:"View Listings"}),c.jsx("span",{className:"ml-2 flex items-center justify-center w-9 h-9 rounded-full bg-brand-yellow text-slate-900 transition-transform group-hover:translate-x-0.5 group-hover:-translate-y-0.5",children:c.jsx(fl,{className:"w-4 h-4",strokeWidth:2.5})})]})]})})}function Ci(){return c.jsx("footer",{id:"about",className:"bg-navy text-white",children:c.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-16",children:[c.jsxs("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-12",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-3 mb-5",children:[c.jsx("img",{src:"/images/government-of-enugu-state.jpeg",alt:"Government of Enugu State",className:"h-16 w-auto shrink-0 rounded"}),c.jsx("div",{className:"bg-white rounded-lg px-3 py-2 flex items-center justify-center h-16 shrink-0",children:c.jsx("img",{src:"/images/enugu-msme-agency-logo.png",alt:"Enugu MSME and Startup Agency",className:"max-h-full max-w-full object-contain"})})]}),c.jsx("p",{className:"text-sm text-slate-300 leading-relaxed",children:"The Enugu State SME Centre was established in 2005 in collaboration with the Enugu State Government to provide support for small and medium Enterprises."})]}),c.jsxs("div",{children:[c.jsx("h4",{className:"font-bold mb-6 text-base",children:"SOCIALS"}),c.jsxs("ul",{className:"space-y-3 text-slate-300 text-sm",children:[c.jsx("li",{children:c.jsx("a",{href:"https://www.instagram.com/enugujobcentre",target:"_blank",rel:"noopener noreferrer",className:"hover:text-white",children:"Instagram"})}),c.jsx("li",{children:c.jsx("a",{href:"https://www.facebook.com/share/1Koiru4bm6/",target:"_blank",rel:"noopener noreferrer",className:"hover:text-white",children:"Facebook"})}),c.jsx("li",{children:c.jsx("a",{href:"https://x.com/EnuguJobCentre",target:"_blank",rel:"noopener noreferrer",className:"hover:text-white",children:"X (Twitter)"})}),c.jsx("li",{children:c.jsx("a",{href:"https://www.tiktok.com/@enugujobscentre",target:"_blank",rel:"noopener noreferrer",className:"hover:text-white",children:"TikTok"})})]})]}),c.jsxs("div",{children:[c.jsx("h4",{className:"font-bold mb-6 text-base",children:"PROGRAMS"}),c.jsxs("ul",{className:"space-y-3 text-slate-300 text-sm",children:[c.jsx("li",{children:c.jsx("a",{href:"#",className:"hover:text-white",children:"Blogs"})}),c.jsx("li",{children:c.jsx("a",{href:"#",className:"hover:text-white",children:"Enugu Loans"})}),c.jsx("li",{children:c.jsx("a",{href:"#",className:"hover:text-white",children:"Business Grants"})}),c.jsx("li",{children:c.jsx("a",{href:"#",className:"hover:text-white",children:"Enugu Learning"})})]})]}),c.jsxs("div",{children:[c.jsx("h4",{className:"font-bold mb-6 text-base",children:"CONTACTS"}),c.jsxs("ul",{className:"space-y-3 text-slate-300 text-sm",children:[c.jsx("li",{children:c.jsx("a",{href:"mailto:[email protected]",className:"hover:text-white",children:"[email protected]"})}),c.jsx("li",{children:c.jsx("a",{href:"tel:+2347036596085",className:"hover:text-white",children:"+234 703 659 6085"})}),c.jsx("li",{children:c.jsx("a",{href:"tel:+2348142590543",className:"hover:text-white",children:"+234 814 259 0543"})})]})]})]}),c.jsxs("div",{className:"border-t border-white/10 mt-12 pt-6 flex flex-col md:flex-row justify-between text-sm text-slate-400",children:[c.jsxs("div",{children:["© ",new Date().getFullYear()," Enugu Job Centre."]}),c.jsx("div",{children:"All rights reserved."})]})]})})}function pl(e){return String(e).toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"").slice(0,80)}function FR(e){return/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(e)}function pO(e){const t=Math.floor((Date.now()-new Date(e).getTime())/1e3);if(t<60)return"just now";const r=Math.floor(t/60);if(r<60)return`${r}m ago`;const n=Math.floor(r/60);if(n<24)return`${n}h ago`;const i=Math.floor(n/24);return i<30?`${i}d ago`:`${Math.floor(i/30)}mo ago`}function zi(e){return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}const zR={"Full-time":"bg-emerald-50 text-emerald-700","Part-time":"bg-blue-50 text-blue-700",Contract:"bg-purple-50 text-purple-700",Internship:"bg-amber-50 text-amber-700",Remote:"bg-pink-50 text-pink-700"};function mO({job:e}){const t=zR[e.type]||"bg-slate-100 text-slate-700";return c.jsxs(ve,{to:`/jobs/${e.slug}`,className:"group block bg-white rounded-2xl border border-slate-200 p-6 hover:border-navy hover:shadow-md transition-all",children:[c.jsxs("div",{className:"flex items-start justify-between gap-4 mb-4",children:[c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("h3",{className:"font-display text-xl font-bold text-navy truncate group-hover:underline",children:e.title}),c.jsx("p",{className:"text-sm text-slate-600 mt-1",children:e.company})]}),c.jsx("span",{className:`text-xs font-semibold px-3 py-1 rounded-full shrink-0 ${t}`,children:e.type})]}),c.jsxs("div",{className:"flex flex-wrap gap-4 text-sm text-slate-600 mb-4",children:[c.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[c.jsx(cy,{className:"w-4 h-4 text-slate-400"}),e.location]}),e.salary&&c.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[c.jsx("span",{className:"text-slate-500",children:"₦"}),e.salary]}),c.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[c.jsx(sO,{className:"w-4 h-4 text-slate-400"}),pO(e.created_at)]})]}),(e.categories||[]).length>0&&c.jsx("div",{className:"flex flex-wrap gap-1 mb-3",children:e.categories.slice(0,4).map(r=>c.jsx("span",{className:"text-[10px] font-semibold px-2 py-0.5 rounded-full",style:{background:r.color+"22",color:r.color},children:r.name},r.id))}),c.jsx("p",{className:"text-sm text-slate-600 leading-relaxed mb-5 line-clamp-3",children:e.description}),c.jsxs("span",{className:"inline-flex items-center gap-1.5 text-navy font-semibold text-sm group-hover:gap-2 transition-all",children:["View details & apply",c.jsx(AR,{className:"w-4 h-4"})]})]})}function Uu({children:e}){return c.jsxs("span",{className:"inline-flex items-center gap-2 border border-slate-300 rounded-full px-4 py-2 text-sm text-slate-700 font-semibold bg-white",children:[c.jsx(lO,{className:"w-4 h-4 text-navy",strokeWidth:2}),e]})}function xx({to:e,children:t}){return c.jsxs(ve,{to:e,className:"group inline-flex items-center gap-1 bg-navy text-white pl-7 pr-1.5 py-2 rounded-full font-semibold text-base hover:bg-navy-dark transition-colors",children:[c.jsx("span",{children:t}),c.jsx("span",{className:"ml-2 flex items-center justify-center w-10 h-10 rounded-full bg-brand-yellow text-slate-900 transition-transform group-hover:translate-x-0.5 group-hover:-translate-y-0.5",children:c.jsx(fl,{className:"w-4 h-4",strokeWidth:2.5})})]})}function ts({icon:e,iconBg:t,iconColor:r,title:n,subtitle:i,className:a}){return c.jsxs("div",{className:`absolute bg-white rounded-2xl shadow-xl px-5 py-3 flex items-center gap-3 z-10 ${a}`,children:[c.jsx("div",{className:`w-11 h-11 rounded-full ${t} flex items-center justify-center`,children:c.jsx(e,{className:`w-5 h-5 ${r}`,strokeWidth:2.5})}),c.jsxs("div",{children:[c.jsx("div",{className:"font-bold text-slate-900 text-sm",children:n}),c.jsx("div",{className:"text-xs text-slate-500",children:i})]})]})}function Hr({icon:e,text:t}){return c.jsxs("div",{className:"flex items-center gap-4 border border-slate-200 rounded-2xl px-5 py-4 bg-white",children:[c.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-50 flex items-center justify-center shrink-0",children:c.jsx(e,{className:"w-5 h-5 text-blue-600",strokeWidth:2})}),c.jsx("span",{className:"text-slate-700 font-medium",children:t})]})}function Dh({title:e,description:t}){return c.jsx("div",{className:"flex items-start gap-4 border-l-4 border-emerald-500 bg-emerald-50/50 pl-4 py-3 rounded-r-xl",children:c.jsxs("div",{className:"flex-1",children:[c.jsx("div",{className:"font-bold text-navy",children:e}),c.jsx("div",{className:"text-sm text-slate-600 mt-0.5",children:t})]})})}const wx=[{src:"/images/partner-governor.png",alt:"Governor of Enugu State"},{src:"/images/government-of-enugu-state.jpeg",alt:"Government of Enugu State"},{src:"/images/enugu-msme-agency-logo.png",alt:"Enugu MSME and Startup Agency"},{src:"/images/partner-german-swiss-giz.png",alt:"German Cooperation · Swiss Agency for Development and Cooperation · GIZ"},{src:"/images/partner-skye.png",alt:"SKYE — Skills Development for Youth Employment"}];function WR({src:e,alt:t}){return c.jsx("div",{className:"shrink-0 h-24 w-40 md:w-48 flex items-center justify-center px-2",children:c.jsx("img",{src:e,alt:t,title:t,loading:"lazy",className:"max-h-full max-w-full object-contain grayscale opacity-60 transition-all duration-300 hover:grayscale-0 hover:opacity-100 hover:scale-110"})})}function Lh({children:e,href:t}){return t?c.jsxs("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 bg-navy hover:bg-navy-dark text-white px-6 py-3 rounded-xl font-semibold transition-colors",children:[e,c.jsx(hl,{className:"w-4 h-4"})]}):c.jsxs(ve,{to:"/jobs",className:"inline-flex items-center gap-2 bg-navy hover:bg-navy-dark text-white px-6 py-3 rounded-xl font-semibold transition-colors",children:[e,c.jsx(hl,{className:"w-4 h-4"})]})}function HR(){const[e,t]=E.useState([]);return E.useEffect(()=>{Q.from("jobs").select("*").eq("is_active",!0).order("created_at",{ascending:!1}).limit(4).then(({data:r})=>t(r||[]))},[]),c.jsxs("div",{className:"bg-white",children:[c.jsx(Ti,{}),c.jsx("section",{id:"home",className:"bg-white",children:c.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-16 lg:py-20 grid lg:grid-cols-2 gap-12 items-center",children:[c.jsxs("div",{children:[c.jsx(Uu,{children:"Smart career decisions"}),c.jsxs("h1",{className:"font-display mt-8 text-5xl md:text-6xl lg:text-7xl font-extrabold text-navy leading-[1.05]",children:["Transform Your ",c.jsx("span",{className:"italic text-brand-yellow font-bold",children:"Future"}),",",c.jsx("br",{}),"Empower Your Career."]}),c.jsx("p",{className:"mt-8 text-lg text-slate-700 leading-relaxed max-w-xl",children:"Enugu Jobs is a flagship workforce development and youth empowerment initiative designed to reduce unemployment, upskill the workforce, and foster entrepreneurship across Enugu State."}),c.jsx("div",{className:"mt-10",children:c.jsx(xx,{to:"/jobs",children:"Get Started"})})]}),c.jsxs("div",{className:"relative",children:[c.jsx("div",{className:"relative rounded-3xl overflow-hidden aspect-[4/5] bg-emerald-50",children:c.jsx("img",{src:"https://images.pexels.com/photos/4498127/pexels-photo-4498127.jpeg?auto=compress&cs=tinysrgb&w=800",alt:"Young professional",className:"w-full h-full object-cover",onError:r=>{r.target.src="https://placehold.co/600x750/d1fae5/064e3b?text=Career+Growth"}})}),c.jsx(ts,{icon:Am,iconBg:"bg-blue-50",iconColor:"text-blue-600",title:"Career Growth",subtitle:"Personal development",className:"top-12 -right-2 md:right-0"}),c.jsx(ts,{icon:Is,iconBg:"bg-orange-50",iconColor:"text-orange-500",title:"Job Placement",subtitle:"Find your ideal position",className:"bottom-16 -left-2 md:-left-6"})]})]})}),c.jsx("section",{className:"bg-white border-t border-slate-100",children:c.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-20 grid lg:grid-cols-[auto,1fr] gap-12 lg:gap-20",children:[c.jsx("div",{children:c.jsx(Uu,{children:"OUR MISSION"})}),c.jsxs("div",{children:[c.jsxs("h2",{className:"font-display text-4xl md:text-5xl lg:text-6xl font-extrabold leading-[1.05] text-slate-400",children:["HELPING YOU BUILD YOUR CAREER WITH GUIDANCE, TRAINING,"," ",c.jsx("span",{className:"text-navy",children:"AND JOB CONNECTIONS THAT WORK."})]}),c.jsx("p",{className:"mt-10 text-lg text-slate-600 max-w-3xl leading-relaxed",children:"We help people find good jobs by offering career advice sessions, training programs both online and in-person, and matching your CV with the right job opportunities. Our goal is to connect job seekers with companies that need their skills."})]})]})}),c.jsxs("section",{className:"bg-white py-20 border-t border-slate-100",children:[c.jsxs("div",{className:"max-w-7xl mx-auto px-6 text-center",children:[c.jsx("h2",{className:"font-display text-4xl md:text-5xl font-extrabold text-navy",children:"Sponsors & Partners"}),c.jsx("p",{className:"mt-4 text-slate-600 max-w-2xl mx-auto",children:"We are proud to have the support of incredible organizations that share our vision of leveling up careers"})]}),c.jsxs("div",{className:"mt-14 relative overflow-hidden group",children:[c.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 w-24 md:w-40 bg-gradient-to-r from-whi
355te to-transparent z-10"}),c.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 w-24 md:w-40 bg-gradient-to-l from-white to-transparent z-10"}),c.jsx("div",{className:"flex gap-12 md:gap-20 w-max animate-[partner-scroll_30s_linear_infinite] group-hover:[animation-play-state:paused]",children:[...wx,...wx].map((r,n)=>c.jsx(WR,{src:r.src,alt:r.alt},n))}),c.jsx("style",{children:`
356            @keyframes partner-scroll {
357              0% { transform: translateX(0); }
358              100% { transform: translateX(-50%); }
359            }
360          `})]})]}),c.jsx("section",{className:"bg-slate-50 py-20",children:c.jsxs("div",{className:"max-w-7xl mx-auto px-6",children:[c.jsxs("div",{className:"flex items-end justify-between mb-10 flex-wrap gap-4",children:[c.jsxs("div",{children:[c.jsx(Uu,{children:"OPEN ROLES"}),c.jsx("h2",{className:"font-display mt-6 text-4xl md:text-5xl font-extrabold text-navy",children:"Featured Opportunities"}),c.jsx("p",{className:"mt-2 text-slate-600",children:"A snapshot of what's hiring right now. View all listings for the full board."})]}),c.jsxs(ve,{to:"/jobs",className:"text-navy font-semibold inline-flex items-center gap-1 hover:gap-2 transition-all",children:["See all jobs ",c.jsx(fl,{className:"w-4 h-4"})]})]}),e.length===0?c.jsxs("div",{className:"bg-white rounded-2xl border border-slate-200 p-12 text-center",children:[c.jsx(Is,{className:"w-12 h-12 text-slate-300 mx-auto mb-4"}),c.jsx("p",{className:"text-slate-500",children:"No open roles right now — check back soon."})]}):c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:e.map(r=>c.jsx(mO,{job:r},r.id))})]})}),c.jsx("section",{className:"bg-slate-50 pb-16",children:c.jsx("div",{className:"max-w-7xl mx-auto px-6",children:c.jsxs("div",{className:"bg-white rounded-3xl shadow-sm p-8 md:p-12 grid lg:grid-cols-2 gap-12 items-center",children:[c.jsxs("div",{children:[c.jsx("span",{className:"inline-block border border-slate-300 rounded-full px-4 py-1.5 text-xs font-bold tracking-wider text-slate-700 uppercase",children:"CAREER COUNSELING"}),c.jsx("h3",{className:"font-display mt-6 text-4xl md:text-5xl font-extrabold text-navy",children:"Unlock Your Potential"}),c.jsx("p",{className:"mt-4 text-slate-600 text-lg",children:"Book your on-site career counseling session today and get the guidance you need:"}),c.jsxs("div",{className:"mt-8 space-y-3",children:[c.jsx(Hr,{icon:oO,text:"Schedule your counseling session"}),c.jsx(Hr,{icon:bx,text:"Meet with career experts on-site"}),c.jsx(Hr,{icon:Am,text:"Get personalized career guidance"})]}),c.jsx("div",{className:"mt-8",children:c.jsx(Lh,{children:"Book Counseling Session"})})]}),c.jsxs("div",{className:"relative",children:[c.jsx("div",{className:"rounded-3xl overflow-hidden aspect-[4/3] bg-slate-200",children:c.jsx("img",{src:"https://images.pexels.com/photos/5439381/pexels-photo-5439381.jpeg?auto=compress&cs=tinysrgb&w=800",alt:"Career counseling",className:"w-full h-full object-cover",onError:r=>{r.target.src="https://placehold.co/800x600/f1f5f9/475569?text=Counseling"}})}),c.jsx(ts,{icon:qc,iconBg:"bg-blue-50",iconColor:"text-blue-600",title:"Career Guidance",subtitle:"One-on-one counseling sessions",className:"-bottom-6 right-6"})]})]})})}),c.jsx("section",{className:"bg-slate-50 pb-16",children:c.jsx("div",{className:"max-w-7xl mx-auto px-6",children:c.jsxs("div",{className:"bg-white rounded-3xl shadow-sm p-8 md:p-12 grid lg:grid-cols-2 gap-12 items-center",children:[c.jsxs("div",{className:"relative order-2 lg:order-1",children:[c.jsx("div",{className:"rounded-3xl overflow-hidden aspect-[4/3] bg-slate-200",children:c.jsx("img",{src:"https://images.pexels.com/photos/4622415/pexels-photo-4622415.jpeg?auto=compress&cs=tinysrgb&w=800",alt:"Training",className:"w-full h-full object-cover",onError:r=>{r.target.src="https://placehold.co/800x600/fce7f3/831843?text=Training"}})}),c.jsx(ts,{icon:ji,iconBg:"bg-emerald-50",iconColor:"text-emerald-600",title:"Flexible Training Options",subtitle:"Programs that fit your schedule",className:"-bottom-6 left-6"})]}),c.jsxs("div",{className:"order-1 lg:order-2",children:[c.jsx("span",{className:"inline-block border border-slate-300 rounded-full px-4 py-1.5 text-xs font-bold tracking-wider text-slate-700 uppercase",children:"TRAINING PROGRAMS"}),c.jsx("h3",{className:"font-display mt-6 text-4xl md:text-5xl font-extrabold text-navy",children:"Level Up Your Skills"}),c.jsx("p",{className:"mt-4 text-slate-600 text-lg",children:"Enroll in our virtual and on-site training programs to advance your career:"}),c.jsxs("div",{className:"mt-8 space-y-3",children:[c.jsx(Hr,{icon:ji,text:"Cho
360ose virtual or on-site training"}),c.jsx(Hr,{icon:qc,text:"Learn from industry professionals"}),c.jsx(Hr,{icon:MR,text:"Build skills for your dream job"})]}),c.jsx("div",{className:"mt-8",children:c.jsx(Lh,{children:"Enroll in Training"})})]})]})})}),c.jsx("section",{className:"bg-slate-50 pb-20",children:c.jsx("div",{className:"max-w-7xl mx-auto px-6",children:c.jsxs("div",{className:"bg-white rounded-3xl shadow-sm p-8 md:p-12 grid lg:grid-cols-2 gap-12 items-center",children:[c.jsxs("div",{children:[c.jsx("span",{className:"inline-block border border-slate-300 rounded-full px-4 py-1.5 text-xs font-bold tracking-wider text-slate-700 uppercase",children:"JOB MATCHING"}),c.jsxs("h3",{className:"font-display mt-6 text-4xl md:text-5xl font-extrabold text-navy",children:["Connect with",c.jsx("br",{}),"Opportunity"]}),c.jsx("p",{className:"mt-4 text-slate-600 text-lg",children:"Submit your CV for job matching and find your perfect career opportunity:"}),c.jsxs("div",{className:"mt-8 space-y-3",children:[c.jsx(Hr,{icon:Za,text:"Upload your CV and profile"}),c.jsx(Hr,{icon:aO,text:"Get matched with suitable jobs"}),c.jsx(Hr,{icon:bx,text:"Connect with hiring companies"})]}),c.jsx("div",{className:"mt-8",children:c.jsx(Lh,{href:"https://tinyurl.com/2da293z2",children:"Submit Your CV"})})]}),c.jsxs("div",{className:"relative",children:[c.jsx("div",{className:"rounded-3xl overflow-hidden aspect-[4/3] bg-slate-200",children:c.jsx("img",{src:"https://images.pexels.com/photos/4585185/pexels-photo-4585185.jpeg?auto=compress&cs=tinysrgb&w=800",alt:"Job matching",className:"w-full h-full object-cover",onError:r=>{r.target.src="https://placehold.co/800x600/fef3c7/78350f?text=Matching"}})}),c.jsx(ts,{icon:Is,iconBg:"bg-red-50",iconColor:"text-red-500",title:"CV Optimization",subtitle:"Professional CV matching",className:"-bottom-6 right-6"})]})]})})}),c.jsxs("section",{className:"bg-emerald-50 py-20 relative overflow-hidden",children:[c.jsx("div",{"aria-hidden":"true",className:"absolute top-10 right-10 w-32 h-32 opacity-30 hidden md:block",style:{backgroundImage:"radial-gradient(circle, #059669 1.5px, transparent 1.5px)",backgroundSize:"14px 14px"}}),c.jsx("div",{"aria-hidden":"true",className:"absolute bottom-20 left-10 w-40 h-40 opacity-20 hidden md:block",style:{backgroundImage:"radial-gradient(circle, #059669 1.5px, transparent 1.5px)",backgroundSize:"14px 14px"}}),c.jsx("div",{className:"max-w-7xl mx-auto px-6 relative",children:c.jsxs("div",{className:"bg-white rounded-3xl shadow-sm border border-emerald-100 overflow-hidden grid lg:grid-cols-2 items-stretch",children:[c.jsxs("div",{className:"p-8 md:p-12 flex flex-col justify-center",children:[c.jsxs("span",{className:"inline-flex items-center gap-2 self-start border border-emerald-300 bg-emerald-50 rounded-full px-4 py-1.5 text-xs font-bold tracking-wider text-emerald-700 uppercase",children:[c.jsx(ji,{className:"w-4 h-4",strokeWidth:2.5}),"E-Learning"]}),c.jsxs("h3",{className:"font-display mt-6 text-4xl md:text-5xl font-extrabold text-navy leading-[1.1]",children:["Level up your skills,"," ",c.jsx("span",{className:"text-emerald-600",children:"completely free."})]}),c.jsx("p",{className:"mt-5 text-slate-600 text-lg leading-relaxed",children:"A free online learning platform designed to help you gain in-demand skills for jobs and personal development — especially in Africa and other developing regions."}),c.jsxs("div",{className:"mt-8 space-y-3",children:[c.jsx(Dh,{title:"Interactive Online Modules",description:"Engaging materials that make learning easier to understand."}),c.jsx(Dh,{title:"Practical Assignments",description:"Hands-on tasks to apply and strengthen your skills."}),c.jsx(Dh,{title:"Expert-led Sessions",description:"Learning guided by experienced professionals."})]}),c.jsxs("div",{className:"mt-8 flex items-center gap-3 flex-wrap",children:[c.jsx("span",{className:"inline-flex items-center gap-1.5 bg-emerald-600 text-white text-xs font-bold px-3 py-1.5 rounded-full",children:"100% FREE"}),c.jsxs("span",{className:"inline-flex items-center gap-1.5 bg-white border border-emerald-200 text-emerald-700 text-xs font-bold px-3 py-1.5 rounded-full",children:[c.jsx(ji,{className:"w-3.5 h-3.5",strokeWidth:2.5}),"Certificate included"]})]}),c.jsx("div",{className:"mt-6",children:c.jsxs(ve,{to:"/enroll",className:"group inline-flex items-center gap-2 bg-emerald-600 hover:bg-emerald-700 text-white px-6 py-3 rounded-xl font-semibold transition-colors",children:["Join the Course",c.jsx(fl,{className:"w-4 h-4 transition-transform group-hover:translate-x-0.5 group-hover:-translate-y-0.5"})]})}),c.jsxs("p",{className:"mt-6 font-display text-lg font-bold text-navy",children:["Learn Today."," ",c.jsx("span",{className:"text-emerald-600",children:"Build Tomorrow."})," ","Grow Forever."]})]}),c.jsx("div",{className:"relative bg-emerald-100 min-h-[400px] lg:min-h-0",children:c.jsx("img",{src:"/images/elearning-flyer.jpeg",alt:"Enugu Job Centre E-Learning Platform",className:"absolute inset-0 w-full h-full object-cover object-center",loading:"lazy"})})]})})]}),c.jsx("section",{className:"bg-white py-24",children:c.jsxs("div",{className:"max-w-7xl mx-auto px-6 text-center",children:[c.jsx(Uu,{children:"BOOK A SESSION"}),c.jsxs("h2",{className:"font-display mt-8 text-5xl md:text-6xl lg:text-7xl font-extrabold text-navy leading-tight",children:["Transform Your Future.",c.jsx("br",{}),"Empower Your Career."]}),c.jsx("p",{className:"mt-8 text-lg text-slate-600 max-w-2xl mx-auto",children:"Get personalized career counseling, enhance your skills with professional training, and connect with top employers through our job matching platform."}),c.jsx("div",{className:"mt-10",children:c.jsx(xx,{to:"/jobs",children:"View Listings"})})]})}),c.jsxs("div",{className:"bg-brand-yellow py-5 overflow-hidden border-y border-yellow-600/20",children:[c.jsx("div",{className:"flex gap-16 whitespace-nowrap w-max animate-[marquee_30s_linear_infinite]",children:[...Array(2)].map((r,n)=>c.jsx("div",{className:"flex items-center gap-16 shrink-0",children:["MAKE CONNECTIONS","FIND JOBS","DEVELOP SKILLS","BUILD CAREERS"].map((i,a)=>c.jsxs("span",{className:"font-extrabold text-slate-900 tracking-wider text-lg flex items-center gap-16",children:[i,c.jsx(lO,{className:"w-4 h-4"})]},a))}
360,n))}),c.jsx("style",{children:`
361          @keyframes marquee {
362            0% { transform: translateX(0); }
363            100% { transform: translateX(-50%); }
364          }
365        `})]}),c.jsx(Ci,{})]})}const KR=["All","Full-time","Part-time","Contract","Internship","Remote"];function qR(){const[e,t]=E.useState([]),[r,n]=E.useState([]),[i,a]=E.useState(!0),[o,s]=E.useState(""),[l,u]=E.useState(""),[f,d]=E.useState("All"),[h,p]=E.useState(new Set);E.useEffect(()=>{let b=!1;return Promise.all([Q.from("jobs").select("*, categories:job_categories(category:categories(id, name, color))").eq("is_active",!0).order("created_at",{ascending:!1}),Q.from("categories").select("*").order("name")]).then(([g,y])=>{if(!b){if(g.error)s(g.error.message);else{const x=(g.data||[]).map(S=>({...S,categories:(S.categories||[]).map(_=>_.category).filter(Boolean)}));t(x)}y.error||n(y.data||[]),a(!1)}}),()=>{b=!0}},[]);const m=b=>{p(g=>{const y=new Set(g);return y.has(b)?y.delete(b):y.add(b),y})},v=E.useMemo(()=>{const b=l.trim().toLowerCase();return e.filter(g=>f!=="All"&&g.type!==f||h.size>0&&!(g.categories||[]).map(S=>S.id).some(S=>h.has(S))?!1:b?g.title.toLowerCase().includes(b)||g.company.toLowerCase().includes(b)||g.location.toLowerCase().includes(b)||g.description.toLowerCase().includes(b):!0)},[e,l,f,h]);return c.jsxs("div",{className:"min-h-screen bg-slate-50 flex flex-col",children:[c.jsx(Ti,{}),c.jsx("section",{className:"bg-white border-b border-slate-200",children:c.jsxs("div",{className:"max-w-6xl mx-auto px-6 py-14 text-center",children:[c.jsx("h1",{className:"font-display text-4xl md:text-5xl font-extrabold text-navy",children:"Find Your Next Opportunity"}),c.jsx("p",{className:"mt-4 text-slate-600 max-w-2xl mx-auto",children:"Browse open roles posted by employers across Enugu State. New listings added regularly."}),c.jsxs("div",{className:"mt-8 max-w-2xl mx-auto flex flex-col sm:flex-row gap-3",children:[c.jsxs("div",{className:"relative flex-1",children:[c.jsx(dy,{className:"absolute left-4 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400"}),c.jsx("input",{type:"text",value:l,onChange:b=>u(b.target.value),placeholder:"Search by title, company, location…",className:"w-full pl-12 pr-4 py-3 rounded-xl border border-slate-300 focus:border-navy focus:ring-2 focus:ring-navy/10 outline-none"})]}),c.jsxs("div",{className:"relative",children:[c.jsx(ly,{className:"absolute left-4 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400 pointer-events-none"}),c.jsx("select",{value:f,onChange:b=>d(b.target.value),className:"pl-10 pr-8 py-3 rounded-xl border border-slate-300 focus:border-navy focus:ring-2 focus:ring-navy/10 outline-none appearance-none bg-white cursor-pointer",children:KR.map(b=>c.jsx("option",{value:b,children:b},b))})]})]}),r.length>0&&c.jsxs("div",{className:"mt-6 flex flex-wrap items-center justify-center gap-2 max-w-3xl mx-auto",children:[r.map(b=>{const g=h.has(b.id);return c.jsxs("button",{onClick:()=>m(b.id),className:`text-xs font-semibold px-3 py-1.5 rounded-full border transition-colors inline-flex items-center gap-1.5 ${g?"text-white":"bg-white text-slate-700 hover:bg-slate-50"}`,style:g?{background:b.color,borderColor:b.color}:{borderColor:b.color+"66"},children:[b.name,g&&c.jsx(xn,{className:"w-3 h-3"})]},b.id)}),h.size>0&&c.jsx("button",{onClick:()=>p(new Set),className:"text-xs text-slate-500 hover:text-navy underline ml-2",children:"Clear filters"})]})]})}),c.jsxs("main",{className:"flex-1 max-w-6xl mx-auto px-6 py-12 w-full",children:[i&&c.jsx("div",{className:"text-center text-slate-500 py-20",children:"Loading jobs…"}),o&&c.jsxs("div",{className:"bg-red-50 border border-red-200 text-red-700 rounded-lg p-4 mb-6",children:["Could not load jobs: ",o]}),!i&&!o&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"flex items-center justify-between mb-6",children:c.jsxs("h2",{className:"text-sm font-medium text-slate-600",children:[v.length," ",v.length===1?"job":"jobs",f!=="All"&&` · ${f}`,l&&` · "${l}"`]})}),v.length===0?c.jsxs("div",{className:"bg-white rounded-2xl border border-slate-200 p-12 text-center",children:[c.jsx(Is,{className:"w-12 h-12 text-slate-300 mx-auto mb-4"}),c.jsx("h3",{className:"text-lg font-semibold text-slate-700 mb-1",children:"No jobs match your search"}),c.jsx("p",{className:"text-sm text-slate-500",children:"Try a different keyword or filter."})]}):c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:v.map(b=>c.jsx(mO,{job:b},b.id))})]})]}),c.jsx(Ci,{})]})}function GR({schema:e,value:t,onChange:r,errors:n}){if(!Array.isArray(e)||e.length===0)return null;function i(a,o){r({...t,[a]:o})}return c.jsxs("div",{className:"space-y-4 border-t border-slate-200 pt-4 mt-4",children:[c.jsx("div",{className:"text-sm font-semibold text-slate-700",children:"Additional questions"}),e.map(a=>c.jsx(VR,{q:a,value:t[a.id],onChange:o=>i(a.id,o),error:n==null?void 0:n[a.id]},a.id))]})}function VR({q:e,value:t,onChange:r,error:n}){return c.jsxs("label",{className:"block",children:[c.jsxs("span",{className:"text-sm font-medium text-slate-700 mb-1.5 block",children:[e.label||c.jsx("span",{className:"italic text-slate-400",children:"Untitled question"})," ",e.required&&c.jsx("span",{className:"text-red-500",children:"*"})]}),JR(e,t,r),n&&c.jsx("span",{className:"text-xs text-red-600 mt-1 block",children:n})]})}function JR(e,t,r){switch(e.type){case"short_text":return c.jsx("input",{type:"text",value:t||"",onChange:n=>r(n.target.value),className:"w-full px-3 py-2.5 rounded-lg border border-slate-300 focus:border-navy focus:ring-2 focus:ring-navy/10 outline-none text-sm"});case"long_text":return c.jsx("textarea",{value:t||"",onChange:n=>r(n.target.value),rows:4,className:"w-full px-3 py-2.5 rounded-lg border border-slate-300 focus:border-navy focus:ring-2 focus:ring-navy/10 outline-none text-sm resize-y"});case"single_choice":return c.jsx("div",{className:"space-y-1.5 mt-1",children:(e.options||[]).map((n,i)=>c.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer p-2 hover:bg-slate-50 rounded",children:[c.jsx("input",{type:"radio",name:e.id,checked:t===n,onChange:()=>r(n),className:"w-4 h-4 accent-navy"}),c.jsx("span",{children:n})]},i))});case"multi_choice":{const n=Array.isArray(t)?t:[],i=a=>{n.includes(a)?r(n.filter(o=>o!==a)):r([...n,a])};return c.jsx("div",{className:"space-y-1.5 mt-1",children:(e.options||[]).map((a,o)=>c.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer p-2 hover:bg-slate-50 rounded",children:[c.jsx("input",{type:"checkbox",checked:n.includes(a),onChange:()=>i(a),className:"w-4 h-4 accent-navy"}),c.jsx("span",{children:a})]},o))})}case"yes_no":return c.jsx("div",{className:"flex gap-2 mt-1",children:["Yes","No"].map(n=>c.jsx("button",{type:"button",onClick:()=>r(n),className:`px-4 py-2 rounded-lg text-sm font-medium border transition-colors ${t===n?"bg-navy text-white border-navy":"bg-white text-slate-700 border-slate-300 hover:border-navy"}`,children:n},n))});case"file_upload":return c.jsx(YR,{q:e,value:t,onChange:r});default:return null}}function YR({q:e,value:t,onChange:r}){return c.jsxs("label",{className:"flex items-center gap-2 border border-slate-300 border-dashed rounded-lg px-3 py-2.5 cursor-pointer hover:border-navy hover:bg-slate-50 text-sm",children:[c.jsx("input",{type:"file",onChange:n=>{var i;return r(((i=n.target.files)==null?void 0:i[0])||null)},className:"hidden"}),c.jsx("span",{className:"text-slate-700 truncate",children:t?t.name:"Choose file…"})]})}function XR(e,t){if(!Array.isArray(e))return{};const r={};for(const n of e){if(!n.required)continue;const i=t[n.id];(i==null||i===""||Array.isArray(i)&&i.length===0)&&(r[n.id]="This field is required")}return r}function QR(e,t){return t==null?"":Array.isArray(t)?t.join(", "):t instanceof File?t.name:String(t)}const Bh=5,ZR=["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"];function eM(){const{slug:e}=aC(),[t,r]=E.useState(null),[n,i]=E.useState(!0),[a,o]=E.useState(!1),[s,l]=E.useState({full_name:"",email:"",ph
365one:"",cover_letter:""}),[u,f]=E.useState(null),[d,h]=E.useState({}),[p,m]=E.useState(!1),[v,b]=E.useState(""),[g,y]=E.useState({}),[x,S]=E.useState(!1);E.useEffect(()=>{let O=!1;return Q.from("jobs").select("*, categories:job_categories(category:categories(id, name, color))").eq("slug",e).eq("is_active",!0).maybeSingle().then(({data:k,error:A})=>{O||(A||!k?o(!0):r({...k,categories:(k.categories||[]).map(C=>C.category).filter(Boolean)}),i(!1))}),()=>{O=!0}},[e]);const _=O=>k=>l(A=>({...A,[O]:k.target.value})),w=O=>{var A;const k=(A=O.target.files)==null?void 0:A[0];if(!k){f(null);return}if(!ZR.includes(k.type)){b("CV must be a PDF or Word document (.pdf, .doc, .docx)"),f(null);return}if(k.size>Bh*1024*1024){b(`CV must be smaller than ${Bh}MB`),f(null);return}b(""),f(k)};async function j(O){if(O.preventDefault(),b(""),y({}),!s.full_name.trim()||!s.email.trim()||!s.phone.trim()){b("Please fill in name, email, and phone.");return}if(!u){b("Please upload your CV.");return}const k=t.form_schema||[],A=XR(k,d);if(Object.keys(A).length>0){y(A),b("Please answer all required questions.");return}m(!0);try{const C=u.name.split(".").pop(),P=`${t.id}/${Date.now()}-${Math.random().toString(36).slice(2,8)}.${C}`,{error:B}=await Q.storage.from("cvs").upload(P,u,{contentType:u.type,upsert:!1});if(B)throw new Error("Could not upload CV: "+B.message);const N={};for(const D of k)if(D.type==="file_upload"&&d[D.id]instanceof File){const $=d[D.id],M=$.name.split(".").pop(),U=`${t.id}/q-${D.id}-${Date.now()}-${Math.random().toString(36).slice(2,6)}.${M}`,{error:H}=await Q.storage.from("cvs").upload(U,$,{contentType:$.type,upsert:!1});if(H)throw await Q.storage.from("cvs").remove([P]).catch(()=>{}),new Error(`Could not upload file for "${D.label}": ${H.message}`);N[D.id]=U}const I=crypto.randomUUID(),{error:R}=await Q.from("applications").insert([{id:I,job_id:t.id,full_name:s.full_name.trim(),email:s.email.trim(),phone:s.phone.trim(),cover_letter:s.cover_letter.trim()||null,cv_path:P}]);if(R)throw await Q.storage.from("cvs").remove([P,...Object.values(N)]).catch(()=>{}),new Error("Could not submit application: "+R.message);if(k.length>0){const $=k.map(M=>({application_id:I,question_id:M.id,question_label:M.label,question_type:M.type,answer:M.type==="file_upload"?N[M.id]||"":QR(M,d[M.id])})).filter((M,U)=>M.answer||k[U].required);if($.length>0){const{error:M}=await Q.from("application_answers").insert($);M&&console.error("Answer insert failed:",M)}}S(!0),window.scrollTo({top:0,behavior:"smooth"})}catch(C){b(C.message||"Something went wrong. Please try again.")}finally{m(!1)}}return n?c.jsxs("div",{className:"min-h-screen flex flex-col",children:[c.jsx(Ti,{}),c.jsx("div",{className:"flex-1 flex items-center justify-center text-slate-500",children:"Loading…"}),c.jsx(Ci,{})]}):a?c.jsxs("div",{className:"min-h-screen flex flex-col bg-slate-50",children:[c.jsx(Ti,{}),c.jsx("div",{className:"flex-1 flex items-center justify-center px-6",children:c.jsxs("div",{className:"text-center max-w-md",children:[c.jsx("h1",{className:"font-display text-3xl font-bold text-navy mb-3",children:"Job not found"}),c.jsx("p",{className:"text-slate-600 mb-6",children:"This listing may have been closed or removed."}),c.jsxs(ve,{to:"/jobs",className:"inline-flex items-center gap-2 bg-navy text-white px-5 py-2.5 rounded-lg font-semibold",children:[c.jsx(Xa,{className:"w-4 h-4"})," Back to all jobs"]})]})}),c.jsx(Ci,{})]}):c.jsxs("div",{className:"min-h-screen bg-slate-50 flex flex-col",children:[c.jsx(Ti,{}),c.jsxs("main",{className:"flex-1 max-w-4xl mx-auto px-6 py-12 w-full",children:[c.jsxs(ve,{to:"/jobs",className:"inline-flex items-center gap-1.5 text-sm text-slate-500 hover:text-navy mb-6",children:[c.jsx(Xa,{className:"w-4 h-4"})," Back to all jobs"]}),c.jsxs("div",{className:"bg-white rounded-3xl border border-slate-200 p-8 md:p-10 mb-6",children:[c.jsxs("div",{className:"flex items-start justify-between gap-4 flex-wrap mb-5",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"font-display text-3xl md:text-4xl font-extrabold text-navy",children:t.title}),c.jsxs("div",{className:"mt-2 text-slate-600 inline-flex items-center gap-2",children:[c.jsx(aO,{className:"w-4 h-4"})," ",t.company]})]}),c.jsx("span",{className:"text-xs font-semibold bg-navy text-white px-3 py-1.5 rounded-full",children:t.type})]}),(t.categories||[]).length>0&&c.jsx("div",{className:"flex flex-wrap gap-1.5 mb-4",children:t.categories.map(O=>c.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-semibold px-2.5 py-1 rounded-full",style:{background:O.color+"22",color:O.color},children:[c.jsx(hO,{className:"w-3 h-3"}),O.name]},O.id))}),c.jsxs("div",{className:"flex flex-wrap gap-x-6 gap-y-2 text-sm text-slate-600 border-t border-slate-100 pt-5",children:[c.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[c.jsx(cy,{className:"w-4 h-4 text-slate-400"})," ",t.location]}),t.salary&&c.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[c.jsx(CR,{className:"w-4 h-4 text-slate-400"})," ",t.salary]}),c.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[c.jsx(sO,{className:"w-4 h-4 text-slate-400"})," Posted ",pO(t.created_at)," (",zi(t.created_at),")"]})]})]}),c.jsxs("div",{className:"bg-white rounded-3xl border border-slate-200 p-8 md:p-10 mb-6",children:[c.jsx("h2",{className:"font-display text-xl font-bold text-navy mb-4",children:"About this role"}),c.jsx("div",{className:"prose prose-slate max-w-none whitespace-pre-line text-slate-700 leading-relaxed",children:t.description})]}),c.jsx("div",{id:"apply",className:"bg-white rounded-3xl border border-slate-200 p-8 md:p-10",children:x?c.jsxs("div",{className:"text-center py-8",children:[c.jsx("div",{className:"w-16 h-16 rounded-full bg-emerald-50 flex items-center justify-center mx-auto mb-4",children:c.jsx(sy,{className:"w-8 h-8 text-emerald-600"})}),c.jsx("h2",{className:"font-display text-2xl font-bold text-navy mb-2",children:"Application submitted"}),c.jsxs("p",{className:"text-slate-600 mb-6 max-w-md mx-auto",children:["Thanks, ",s.full_name.split(" ")[0],". We've received your application for",c.jsxs("span",{className:"font-semibold",children:[" ",t.title]})," and will be in touch if there's a match."]}),c.jsx(ve,{to:"/jobs",className:"inline-flex items-center gap-2 bg-navy hover:bg-navy-dark text-white px-5 py-2.5 rounded-lg font-semibold",children:"Browse more jobs"})]}):c.jsxs(c.Fragment,{children:[c.jsx("h2",{className:"font-display text-xl font-bold text-navy mb-2",children:"Apply for this role"}),c.jsx("p",{className:"text-sm text-slate-600 mb-6",children:"Fill in your details and upload your CV. We'll review and respond by email."}),c.jsxs("form",{onSubmit:j,className:"space-y-4",children:[c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c.jsx(rs,{label:"Full name",required:!0,children:c.jsx("input",{type:"text",value:s.full_name,onChange:_("full_name"),required:!0,className:"input",placeholder:"Jane Doe"})}),c.jsx(rs,{label:"Email",required:!0,children:c.jsx("input",{type:"email",value:s.email,onChange:_("email"),required:!0,className:"input",placeholder:"[email protected]"})}),c.jsx(rs,{label:"Phone",required:!0,children:c.jsx("input",{type:"tel",value:s.phone,onChange:_("phone"),required:!0,className:"input",placeholder:"+234..."})}),c.jsx(rs,{label:`CV (PDF or Word, max ${Bh}MB)`,required:!0,children:c.jsxs("label",{className:"flex items-center gap-2 border border-slate-300 border-dashed rounded-lg px-3 py-2.5 cursor-pointer hover:border-navy hover:bg-slate-50 transition-colors",children:[c.jsx(UR,{className:"w-4 h-4 text-slate-500"}),c.jsx("span",{className:"text-sm text-slate-700 truncate",children:u?u.name:"Choose file…"}),c.jsx("input",{type:"file",accept:".pdf,.doc,.docx,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",onChange:w,className:"hidden"})]})})]}),c.jsx(rs,{label:"Cover letter (optional)",children:c.jsx("textarea",{value:s.cover_letter,onChange:_("cover_letter"),rows:5,className:"input resize-y",placeholder:"Tell us why you're a great fit for this role…"})}),c.jsx(GR,{schema:t.form_schema||[],value:d,onChange:h,errors:g}),v&&c.jsxs("div",{className:"bg-red-50 border border-red-200 text-red-700 text-sm rounded-lg p-3 flex items-start gap-2",children:[c.jsx(No,{className:"w-4 h-4 mt-0.5 shrink-0"}),c.jsx("span",{children:v})]}),c.jsx("button",{type:"submit",disabled:p,className:"bg-navy hover:bg-navy-dark disabled:opacity-50 disabled:cursor-not-allowed text-white px-6 py-3 rounded-lg font-semibold transition-colors",children:p?"Submitting…":"Submit Application"})]}),c.jsx("style",{children:`
366                .input {
367                  width: 100%;
368                  border: 1px solid rgb(203 213 225);
369                  border-radius: 0.5rem;
370                  padding: 0.625rem 0.75rem;
371                  font-size: 0.875rem;
372                  outline: none;
373                  transition: border-color .15s, box-shadow .15s;
374                }
375                .input:focus {
376                  border-color: #0a1f4d;
377                  box-shadow: 0 0 0 3px rgba(10, 31, 77, 0.1);
378                }
379              `})]})})]}),c.jsx(Ci,{})]})}function rs({label:e,required:t,children:r}){return c.jsxs("label",{className:"block",children:[c.jsxs("span",{className:"text-sm font-medium text-slate-700 mb-1.5 block",children:[e," ",t&&c.jsx("span",{className:"text-red-500",children:"*"})]}),r]})}const Pm=[{state:"Adamawa",alias:"adamawa",lgas:["Demsa","Fufure","Ganye","Gayuk","Gombi","Grie","Hong","Jada","Larmurde","Madagali","Maiha","Mayo Belwa","Michika","Mubi North","Mubi South","Numan","Shelleng","Song","Toungo","Yola North","Yola South"]},{state:"Akwa Ibom",alias:"akwa_ibom",lgas:["Abak","Eastern Obolo","Eket","Esit Eket","Essien Udim","Etim Ekpo","Etinan","Ibeno","Ibesikpo Asutan","Ibiono-Ibom","Ikot Abasi","Ika","Ikono","Ikot Ekpene","Ini","Mkpat-Enin","Itu","Mbo","Nsit-Atai","Nsit-Ibom","Nsit-Ubium","Obot Akara","Okobo","Onna","Oron","Udung-Uko","Ukanafun","Oruk Anam","Uruan","Urue-Offong/Oruko","Uyo"]},{state:"Anambra",alias:"anambra",lgas:["Aguata","Anambra East","Anaocha","Awka North","Anambra West","Awka South","Ayamelum","Dunukofia","Ekwusigo","Idemili North","Idemili South","Ihiala","Njikoka","Nnewi North","Nnewi South","Ogbaru","Onitsha North","Onitsha South","Orumba North","Orumba South","Oyi"]},{state:"Ogun",alias:"ogun",lgas:["Abeokuta North","Abeokuta South","Ado-Odo/Ota","Egbado North","Ewekoro","Egbado South","Ijebu North","Ijebu East","Ifo","Ijebu Ode","Ijebu North East","Imeko Afon","Ikenne","Ipokia","Odeda","Obafemi Owode","Odogbolu","Remo North","Ogun Waterside","Shagamu"]},{state:"Ondo",alias:"ondo",lgas:["Akoko North-East","Akoko North-West","Akoko South-West","Akoko South-East","Akure North","Akure South","Ese Odo","Idanre","Ifedore","Ilaje","Irele","Ile Oluji/Okeigbo","Odigbo","Okitipupa","Ondo West","Ose","Ondo East","Owo"]},{state:"Rivers",alias:"rivers",lgas:["Abua/Odual","Ahoada East","Ahoada West","Andoni","Akuku-Toru","Asari-Toru","Bonny","Degema","Emuoha","Eleme","Ikwerre","Etche","Gokana","Khana","Obio/Akpor","Ogba/Egbema/Ndoni","Ogu/Bolo","Okrika","Omuma","Opobo/Nkoro","Oyigbo","Port Harcourt","Tai"]},{state:"Bauchi",alias:"bauchi",lgas:["Alkaleri","Bauchi","Bogoro","Damban","Darazo","Dass","Gamawa","Ganjuwa","Giade","Itas/Gadau","Jama'are","Katagum","Kirfi","Misau","Ningi","Shira","Tafawa Balewa","Toro","Warji","Zaki"]},{state:"Benue",alias:"benue",lgas:["Agatu","Apa","Ado","Buruku","Gboko","Guma","Gwer East","Gwer West","Katsina-Ala","Konshisha","Kwande","Logo","Makurdi","Obi","Ogbadibo","Ohimini","Oju","Okpokwu","Oturkpo","Tarka","Ukum","Ushongo","Vandeikya"]},{state:"Borno",alias:"borno",lgas:["Abadam","Askira/Uba","Bama","Bayo","Biu","Chibok","Damboa","Dikwa","Guzamala","Gubio","Hawul","Gwoza","Jere","Kaga","Kala/Balge","Konduga","Kukawa","Kwaya Kusar","Mafa","Magumeri","Maiduguri","Mobbar","Marte","Monguno","Ngala","Nganzai","Shani"]},{state:"Bayelsa",alias:"bayelsa",lgas:["Brass","Ekeremor","Kolokuma/Opokuma","Nembe","Ogbia","Sagbama","Southern Ijaw","Yenagoa"]},{state:"Cross River",alias:"cross_river",lgas:["Abi","Akamkpa","Akpabuyo","Bakassi","Bekwarra","Biase","Boki","Calabar Municipal","Calabar South","Etung","Ikom","Obanliku","Obubra","Obudu","Odukpani","Ogoja","Yakuur","Yala"]},{state:"Delta",alias:"delta",lgas:["Aniocha North","Aniocha South","Bomadi","Burutu","Ethiope West","Ethiope East","Ika North East","Ika South","Isoko North","Isoko South","Ndokwa East","Ndokwa West","Okpe","Oshimili North","Oshimili South","Patani","Sapele","Udu","Ughelli North","Ukwuani","Ughelli South","Uvwie","Warri North","Warri South","Warri South West"]},{state:"Ebonyi",alias:"ebonyi",lgas:["Abakaliki","Afikpo North","Ebonyi","Afikpo South","Ezza North","Ikwo","Ezza South","Ivo","Ishielu","Izzi","Ohaozara","Ohaukwu","Onicha"]},{state:"Edo",alias:"edo",lgas:["Akoko-Edo","Egor","Esan Central","Esan North-East","Esan South-East","Esan West","Etsako Central","Etsako E
379ast","Etsako West","Igueben","Ikpoba Okha","Orhionmwon","Oredo","Ovia North-East","Ovia South-West","Owan East","Owan West","Uhunmwonde"]},{state:"Ekiti",alias:"ekiti",lgas:["Ado Ekiti","Efon","Ekiti East","Ekiti South-West","Ekiti West","Emure","Gbonyin","Ido Osi","Ijero","Ikere","Ilejemeje","Irepodun/Ifelodun","Ikole","Ise/Orun","Moba","Oye"]},{state:"Enugu",alias:"enugu",lgas:["Awgu","Aninri","Enugu East","Enugu North","Ezeagu","Enugu South","Igbo Etiti","Igbo Eze North","Igbo Eze South","Isi Uzo","Nkanu East","Nkanu West","Nsukka","Udenu","Oji River","Uzo Uwani","Udi"]},{state:"Federal Capital Territory",alias:"abuja",lgas:["Abaji","Bwari","Gwagwalada","Kuje","Kwali","Municipal Area Council"]},{state:"Gombe",alias:"gombe",lgas:["Akko","Balanga","Billiri","Dukku","Funakaye","Gombe","Kaltungo","Kwami","Nafada","Shongom","Yamaltu/Deba"]},{state:"Jigawa",alias:"jigawa",lgas:["Auyo","Babura","Buji","Biriniwa","Birnin Kudu","Dutse","Gagarawa","Garki","Gumel","Guri","Gwaram","Gwiwa","Hadejia","Jahun","Kafin Hausa","Kazaure","Kiri Kasama","Kiyawa","Kaugama","Maigatari","Malam Madori","Miga","Sule Tankarkar","Roni","Ringim","Yankwashi","Taura"]},{state:"Oyo",alias:"oyo",lgas:["Afijio","Akinyele","Atiba","Atisbo","Egbeda","Ibadan North","Ibadan North-East","Ibadan North-West","Ibadan South-East","Ibarapa Central","Ibadan South-West","Ibarapa East","Ido","Ibarapa North","Irepo","Iseyin","Itesiwaju","Iwajowa","Kajola","Lagelu","Ogbomosho North","Ogbomosho South","Ogo Oluwa","Olorunsogo","Oluyole","Ona Ara","Orelope","Ori Ire","Oyo","Oyo East","Saki East","Saki West","Surulere Oyo State"]},{state:"Imo",alias:"imo",lgas:["Aboh Mbaise","Ahiazu Mbaise","Ehime Mbano","Ezinihitte","Ideato North","Ideato South","Ihitte/Uboma","Ikeduru","Isiala Mbano","Mbaitoli","Isu","Ngor Okpala","Njaba","Nkwerre","Nwangele","Obowo","Oguta","Ohaji/Egbema","Okigwe","Orlu","Orsu","Oru East","Oru West","Owerri Municipal","Owerri North","Unuimo","Owerri West"]},{state:"Kaduna",alias:"kaduna",lgas:["Birnin Gwari","Chikun","Giwa","Ikara","Igabi","Jaba","Jema'a","Kachia","Kaduna North","Kaduna South","Kagarko","Kajuru","Kaura","Kauru","Kubau","Kudan","Lere","Makarfi","Sabon Gari","Sanga","Soba","Zangon Kataf","Zaria"]},{state:"Kebbi",alias:"kebbi",lgas:["Aleiro","Argungu","Arewa Dandi","Augie","Bagudo","Birnin Kebbi","Bunza","Dandi","Fakai","Gwandu","Jega","Kalgo","Koko/Besse","Maiyama","Ngaski","Shanga","Suru","Sakaba","Wasagu/Danko","Yauri","Zuru"]},{state:"Kano",alias:"kano",lgas:["Ajingi","Albasu","Bagwai","Bebeji","Bichi","Bunkure","Dala","Dambatta","Dawakin Kudu","Dawakin Tofa","Doguwa","Fagge","Gabasawa","Garko","Garun Mallam","Gezawa","Gaya","Gwale","Gwarzo","Kabo","Kano Municipal","Karaye","Kibiya","Kiru","Kumbotso","Kunchi","Kura","Madobi","Makoda","Minjibir","Nasarawa","Rano","Rimin Gado","Rogo","Shanono","Takai","Sumaila","Tarauni","Tofa","Tsanyawa","Tudun Wada","Ungogo","Warawa","Wudil"]},{state:"Kogi",alias:"kogi",lgas:["Ajaokuta","Adavi","Ankpa","Bassa","Dekina","Ibaji","Idah","Igalamela Odolu","Ijumu","Kogi","Kabba/Bunu","Lokoja","Ofu","Mopa Muro","Ogori/Magongo","Okehi","Okene","Olamaboro","Omala","Yagba East","Yagba West"]},{state:"Osun",alias:"osun",lgas:["Aiyedire","Atakunmosa West","Atakunmosa East","Aiyedaade","Boluwaduro","Boripe","Ife East","Ede South","Ife North","Ede North","Ife South","Ejigbo","Ife Central","Ifedayo","Egbedore","Ila","Ifelodun","Ilesa East","Ilesa West","Irepodun","Irewole","Isokan","Iwo","Obokun","Odo Otin","Ola Oluwa","Olorunda","Oriade","Orolu","Osogbo"]},{state:"Sokoto",alias:"sokoto",lgas:["Gudu","Gwadabawa","Illela","Isa","Kebbe","Kware","Rabah","Sabon Birni","Shagari","Silame","Sokoto North","Sokoto South","Tambuwal","Tangaza","Tureta","Wamako","Wurno","Yabo","Binji","Bodinga","Dange Shuni","Goronyo","Gada"]},{state:"Plateau",alias:"plateau",lgas:["Bokkos","Barkin Ladi","Bassa","Jos East","Jos North","Jos South","Kanam","Kanke","Langtang South","Langtang North","Mangu","Mikang","Pankshin","Qua'an Pan","Riyom","Shendam","Wase"]},{state:"Taraba",alias:"taraba",lgas:["Ardo Kola","Bali","Donga","Gashaka","Gassol","Ibi","Jalingo","Karim Lamido","Kumi","Lau","Sardauna","Takum","Ussa","Wukari","Yorro","Zing"]},{state:"Yobe",alias:"yobe",lgas:["Bade","Bursari","Damaturu","Fika","Fune","Geidam","Gujba","Gulani","Jakusko","Karasuwa","Machina","Nangere","Nguru","Potiskum","Tarmuwa","Yunusari","Yusufari"]},{state:"Zamfara",alias:"zamfara",lgas:["Anka","Birnin Magaji/Kiyaw","Bakura","Bukkuyum","Bungudu","Gummi","Gusau","Kaura Namoda","Maradun","Shinkafi","Maru","Talata Mafara","Tsafe","Zurmi"]},{state:"Lagos",alias:"lagos",lgas:["Agege","Ajeromi-Ifelodun","Alimosho","Amuwo-Odofin","Badagry","Apapa","Epe","Eti Osa","Ibeju-Lekki","Ifako-Ijaiye","Ikeja","Ikorodu","Kosofe","Lagos Island","Mushin","Lagos Mainland","Ojo","Oshodi-Isolo","Shomolu","Surulere Lagos State"]},{state:"Katsina",alias:"katsina",lgas:["Bakori","Batagarawa","Batsari","Baure","Bindawa","Charanchi","Danja","Dandume","Dan Musa","Daura","Dutsi","Dutsin Ma","Faskari","Fu
379ntua","Ingawa","Jibia","Kafur","Kaita","Kankara","Kankia","Katsina","Kurfi","Kusada","Mai'Adua","Malumfashi","Mani","Mashi","Matazu","Musawa","Rimi","Sabuwa","Safana","Sandamu","Zango"]},{state:"Kwara",alias:"kwara",lgas:["Asa","Baruten","Edu","Ilorin East","Ifelodun","Ilorin South","Ekiti Kwara State","Ilorin West","Irepodun","Isin","Kaiama","Moro","Offa","Oke Ero","Oyun","Pategi"]},{state:"Nasarawa",alias:"nasarawa",lgas:["Akwanga","Awe","Doma","Karu","Keana","Keffi","Lafia","Kokona","Nasarawa Egon","Nasarawa","Obi","Toto","Wamba"]},{state:"Niger",alias:"niger",lgas:["Agaie","Agwara","Bida","Borgu","Bosso","Chanchaga","Edati","Gbako","Gurara","Katcha","Kontagora","Lapai","Lavun","Mariga","Magama","Mokwa","Mashegu","Moya","Paikoro","Rafi","Rijau","Shiroro","Suleja","Tafa","Wushishi"]},{state:"Abia",alias:"abia",lgas:["Aba North","Arochukwu","Aba South","Bende","Isiala Ngwa North","Ikwuano","Isiala Ngwa South","Isuikwuato","Obi Ngwa","Ohafia","Osisioma","Ugwunagbo","Ukwa East","Ukwa West","Umuahia North","Umuahia South","Umu Nneochi"]}],gO=[{name:"Digital Skills",skills:["Digital Skills","Digital Marketing","Social Media Marketing","Artificial Intelligence (AI)","Cybersecurity","Data & Information Literacy","E-commerce"]},{name:"Entrepreneurship & Business",skills:["Entrepreneurship","Business Planning","Financial Literacy","Startup Development","Project Management","Gig Economy"]},{name:"Workplace & Soft Skills",skills:["Leadership Skills","Workplace Communication","Soft Skills for Employment","Time Management","Customer Service","Sales Skills","Career Development"]},{name:"Agriculture & Food",skills:["Agriculture & Farming","Agribusiness","Food Production"]},{name:"Tourism & Hospitality",skills:["Tourism","Hospitality Management"]},{name:"Health & Wellbeing",skills:["Health & Nutrition","Mental Health & Well-being","Hygiene & Disease Prevention"]},{name:"Environment & Climate",skills:["Climate Change","Environmental Sustainability","Carbon Markets"]},{name:"Governance & Society",skills:["Governance & Public Policy","Civic Education","Sustainable Development Goals (SDGs)","Gender Equality","Women Empowerment","Inclusion & Diversity"]},{name:"Other",skills:["Design Thinking","Vocational Skills"]}];gO.flatMap(e=>e.skills);const tM=["Male","Female","Prefer not to say"],rM=["Under 18","18–24","25–34","35–44","45–54","55+"],nM=["SSCE","OND","HND","BSc","MSc","Others"],iM=["Unemployed","Employed","Self-employed","Student"],aM=["Yes (Smartphone)","Yes (Laptop)","Both","No"],oM=["Very committed","Somewhat uncommitted","Very uncommitted"],sM=["1–3 hours","4–6 hours","7–10 hours","10+ hours"],lM=["Yes","No","Maybe"],uM=["Yes","No"],cM=["WhatsApp","Facebook","Instagram","Friend/Referral","Our Website"],dM="https://www.atingi.org/",fM={full_name:"",phone:"",gender:"",email:"",age_range:"",state:"",lga:"",education:"",current_status:"",skills_interested:[],device_access:"",commitment:"",hours_per_week:"",notify_jobs:"",open_to_internship:"",heard_from:"",consent:!1};function hM(){const[e,t]=E.useState(fM),[r,n]=E.useState(!1),[i,a]=E.useState(""),[o,s]=E.useState(!1),l=E.useMemo(()=>[...Pm].sort((m,v)=>m.state.localeCompare(v.state)),[]),u=E.useMemo(()=>{const m=Pm.find(v=>v.state===e.state);return m?[...m.lgas].sort():[]},[e.state]),f=(m,v)=>t(b=>({...b,[m]:v})),d=m=>{t(v=>({...v,skills_interested:v.skills_interested.includes(m)?v.skills_interested.filter(b=>b!==m):[...v.skills_interested,m]}))};function h(){const m=[["full_name","Full name"],["phone","Phone number"],["gender","Gender"],["email","Email address"],["age_range","Age range"],["state","State"],["lga","City / LGA"],["education","Education level"],["current_status","Current status"],["device_access","Device access"],["commitment","Commitment level"],["hours_per_week","Hours per week"],["notify_jobs","Job notification preference"],["open_to_internship","Internship interest"],["heard_from","How you heard about us"]];for(const[v,b]of m)if(!e[v]||!String(e[v]).trim())return`Please fill in: ${b}`;return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e.email)?e.skills_interested.length===0?"Please select at least one skill you are interested in.":e.consent?null:"You must confirm the consent statement to submit.":"Please enter a valid email address."}async function p(m){m.preventDefault(),a("");const v=h();if(v){a(v),window.scrollTo({top:0,behavior:"smooth"});return}n(!0);const{error:b}=await Q.from("enrollments").insert([{full_name:e.full_name.trim(),phone:e.phone.trim(),gender:e.gender,email:e.email.trim(),age_range:e.age_range,state:e.state,lga:e.lga,education:e.education,current_status:e.current_status,skills_interested:e.skills_interested,device_access:e.device_access,commitment:e.commitment,hours_per_week:e.hours_per_week,notify_j
379obs:e.notify_jobs,open_to_internship:e.open_to_internship,heard_from:e.heard_from,consent:e.consent}]);if(n(!1),b){a("Could not submit: "+b.message);return}s(!0),window.scrollTo({top:0,behavior:"smooth"})}return o?c.jsxs("div",{className:"min-h-screen bg-slate-50 flex flex-col",children:[c.jsx(Ti,{}),c.jsx("main",{className:"flex-1 flex items-center justify-center px-6 py-16",children:c.jsxs("div",{className:"bg-white rounded-3xl border border-slate-200 shadow-sm max-w-lg w-full p-10 text-center",children:[c.jsx("div",{className:"w-16 h-16 rounded-full bg-emerald-50 flex items-center justify-center mx-auto mb-5",children:c.jsx(sy,{className:"w-8 h-8 text-emerald-600"})}),c.jsxs("h1",{className:"font-display text-3xl font-extrabold text-navy mb-3",children:["You're all set, ",e.full_name.split(" ")[0],"!"]}),c.jsx("p",{className:"text-slate-600 mb-2",children:"Your enrollment has been received. The Enugu Job Centre team will be in touch about next steps and available training cohorts."}),c.jsx("p",{className:"text-slate-600 mb-8",children:"To begin exploring courses right away, continue to our learning partner platform, atingi."}),c.jsxs("a",{href:dM,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 bg-emerald-600 hover:bg-emerald-700 text-white px-6 py-3 rounded-xl font-semibold transition-colors",children:["Continue to atingi.org",c.jsx(fl,{className:"w-4 h-4"})]}),c.jsx("div",{className:"mt-6",children:c.jsx(ve,{to:"/",className:"text-sm text-slate-500 hover:text-navy",children:"← Back to homepage"})})]})}),c.jsx(Ci,{})]}):c.jsxs("div",{className:"min-h-screen bg-slate-50 flex flex-col",children:[c.jsx(Ti,{}),c.jsxs("main",{className:"flex-1 max-w-3xl mx-auto px-6 py-12 w-full",children:[c.jsxs("div",{className:"text-center mb-10",children:[c.jsxs("span",{className:"inline-flex items-center gap-2 border border-emerald-300 bg-emerald-50 rounded-full px-4 py-1.5 text-xs font-bold tracking-wider text-emerald-700 uppercase",children:[c.jsx(ji,{className:"w-4 h-4",strokeWidth:2.5}),"E-Learning Enrollment"]}),c.jsx("h1",{className:"font-display mt-6 text-4xl md:text-5xl font-extrabold text-navy",children:"Join the Free Training Program"}),c.jsx("p",{className:"mt-4 text-slate-600",children:"Fill in the form below to enroll in the Enugu Job Centre E-Learning Platform. It takes about 5 minutes."})]}),i&&c.jsxs("div",{className:"bg-red-50 border border-red-200 text-red-700 rounded-xl p-4 mb-6 flex items-start gap-3",children:[c.jsx(No,{className:"w-5 h-5 mt-0.5 shrink-0"}),c.jsx("span",{className:"text-sm",children:i})]}),c.jsxs("form",{onSubmit:p,className:"space-y-8",children:[c.jsxs(fi,{title:"Personal Details",step:1,children:[c.jsx(yt,{label:"Full Name",required:!0,children:c.jsx("input",{type:"text",value:e.full_name,onChange:m=>f("full_name",m.target.value),className:"input",placeholder:"e.g. Chidi Okafor"})}),c.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[c.jsx(yt,{label:"Phone Number",required:!0,children:c.jsx("input",{type:"tel",value:e.phone,onChange:m=>f("phone",m.target.value),className:"input",placeholder:"e.g. 0803 000 0000"})}),c.jsx(yt,{label:"Email Address",required:!0,children:c.jsx("input",{type:"email",value:e.email,onChange:m=>f("email",m.target.value),className:"input",placeholder:"[email protected]"})})]}),c.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[c.jsx(yt,{label:"Gender",required:!0,children:c.jsx(sa,{value:e.gender,onChange:m=>f("gender",m),options:tM,placeholder:"Select gender"})}),c.jsx(yt,{label:"Age Range",required:!0,children:c.jsx(sa,{value:e.age_range,onChange:m=>f("age_range",m),options:rM,placeholder:"Select age range"})})]})]}),c.jsx(fi,{title:"Location",step:2,children:c.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[c.jsx(yt,{label:"State",required:!0,children:c.jsx(sa,{value:e.state,onChange:m=>{f("state",m),f("lga","")},options:l.map(m=>m.state),placeholder:"Select state"})}),c.jsx(yt,{label:"City / LGA",required:!0,children:c.jsx(sa,{value:e.lga,onChange:m=>f("lga",m),options:u,placeholder:e.state?"Select LGA":"Select a state first",disabled:!e.state})})]})}),c.jsx(fi,{title:"Education & Status",step:3,children:c.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[c.jsx(yt,{label:"Highest Level of Education",required:!0,children:c.jsx(sa,{value:e.education,onChange:m=>f("education",m),options:nM,placeholder:"Select level"})}),c.jsx(yt,{label:"Current Status",required:!0,children:c.jsx(sa,{value:e.current_status,onChange:m=>f("current_status",m),options:iM,placeholder:"Select status"})})]})}),c.jsxs(fi,{title:"Skills of Interest",step:4,children:[c.jsxs("p",{className:"text-sm text-slate-600 -mt-2",children:["Which skills are you interested in learning? Select all that apply.",e.skills_interested.length>0&&c.jsxs("span",{className:"font-semibold text-navy",children:[" (",e.skills_interested.length," selected)"]})]}),c.jsx("div",{className:"space-y-2",children:gO.map(m=>c.jsx(pM,{category:m,selected:e.skills_interested,onToggle:d},m.name))})]}
379),c.jsxs(fi,{title:"Access & Commitment",step:5,children:[c.jsx(yt,{label:"Do you have access to a smartphone or laptop?",required:!0,children:c.jsx(la,{name:"device",value:e.device_access,onChange:m=>f("device_access",m),options:aM})}),c.jsx(yt,{label:"How committed are you to completing this course?",required:!0,children:c.jsx(la,{name:"commitment",value:e.commitment,onChange:m=>f("commitment",m),options:oM})}),c.jsx(yt,{label:"How many hours per week can you dedicate to learning?",required:!0,children:c.jsx(la,{name:"hours",value:e.hours_per_week,onChange:m=>f("hours_per_week",m),options:sM})})]}),c.jsxs(fi,{title:"Expectations & Availability",step:6,children:[c.jsx(yt,{label:"Would you like to be notified about job opportunities after training?",required:!0,children:c.jsx(la,{name:"notify",value:e.notify_jobs,onChange:m=>f("notify_jobs",m),options:lM})}),c.jsx(yt,{label:"Are you interested in internship or placement opportunities?",required:!0,children:c.jsx(la,{name:"internship",value:e.open_to_internship,onChange:m=>f("open_to_internship",m),options:uM})})]}),c.jsxs(fi,{title:"Final Section",step:7,children:[c.jsx(yt,{label:"How did you hear about Enugu Job Centre?",required:!0,children:c.jsx(la,{name:"heard",value:e.heard_from,onChange:m=>f("heard_from",m),options:cM})}),c.jsx("div",{className:"bg-slate-50 border border-slate-200 rounded-xl p-4",children:c.jsxs("label",{className:"flex items-start gap-3 cursor-pointer",children:[c.jsx("input",{type:"checkbox",checked:e.consent,onChange:m=>f("consent",m.target.checked),className:"w-5 h-5 accent-navy mt-0.5 shrink-0"}),c.jsxs("span",{className:"text-sm text-slate-700",children:[c.jsx("span",{className:"font-semibold",children:"Consent."})," I confirm that the information provided is correct and I am ready to participate in this program. I understand that Enugu Job Centre may contact me about training and job opportunities."]})]})})]}),c.jsxs("div",{className:"pt-2",children:[c.jsx("button",{type:"submit",disabled:r,className:"w-full sm:w-auto bg-navy hover:bg-navy-dark disabled:opacity-50 text-white px-8 py-3.5 rounded-xl font-semibold transition-colors inline-flex items-center justify-center gap-2",children:r?"Submitting…":"Submit Enrollment"}),c.jsx("p",{className:"text-xs text-slate-500 mt-3",children:"After submitting, you'll be able to continue to our learning partner, atingi.org."})]})]})]}),c.jsx(Ci,{}),c.jsx("style",{children:`
380        .input {
381          width: 100%;
382          border: 1px solid rgb(203 213 225);
383          border-radius: 0.5rem;
384          padding: 0.625rem 0.75rem;
385          font-size: 0.875rem;
386          outline: none;
387          transition: border-color .15s, box-shadow .15s;
388          background: white;
389        }
390        .input:focus {
391          border-color: #0a1f4d;
392          box-shadow: 0 0 0 3px rgba(10, 31, 77, 0.1);
393        }
394        .input:disabled {
395          background: #f1f5f9;
396          color: #94a3b8;
397          cursor: not-allowed;
398        }
399      `})]})}function fi({title:e,step:t,children:r}){return c.jsxs("section",{className:"bg-white rounded-2xl border border-slate-200 p-6 md:p-8",children:[c.jsxs("div",{className:"flex items-center gap-3 mb-5",children:[c.jsx("span",{className:"w-7 h-7 rounded-full bg-navy text-white text-sm font-bold flex items-center justify-center shrink-0",children:t}),c.jsx("h2",{className:"font-display text-xl font-bold text-navy",children:e})]}),c.jsx("div",{className:"space-y-5",children:r})]})}function yt({label:e,required:t,children:r}){return c.jsxs("label",{className:"block",children:[c.jsxs("span",{className:"text-sm font-medium text-slate-700 mb-1.5 block",children:[e," ",t&&c.jsx("span",{className:"text-red-500",children:"*"})]}),r]})}function sa({value:e,onChange:t,options:r,placeholder:n,disabled:i}){return c.jsxs("div",{className:"relative",children:[c.jsxs("select",{value:e,onChange:a=>t(a.target.value),disabled:i,className:"input appearance-none pr-9 cursor-pointer",children:[c.jsx("option",{value:"",children:n}),r.map(a=>c.jsx("option",{value:a,children:a},a))]}),c.jsx(vf,{className:"absolute right-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400 pointer-events-none"})]})}function la({name:e,value:t,onChange:r,options:n}){return c.jsx("div",{className:"flex flex-wrap gap-2",children:n.map(i=>c.jsx("button",{type:"button",onClick:()=>r(i),className:`px-4 py-2 rounded-lg text-sm font-medium border transition-colors ${t===i?"bg-navy text-white border-navy":"bg-white text-slate-700 border-slate-300 hover:border-navy"}`,children:i},i))})}function pM({category:e,selected:t,onToggle:r}){const n=e.skills.filter(o=>t.includes(o)).length,[i,a]=E.useState(!1);return c.jsxs("div",{className:"border border-slate-200 rounded-xl overflow-hidden",children:[c.jsxs("button",{type:"button",onClick:()=>a(o=>!o),className:"w-full flex items-center justify-between px-4 py-3 hover:bg-slate-50 transition-colors",children:[c.jsxs("span",{className:"font-medium text-slate-800 text-sm",children:[e.name,n>0&&c.jsx("span",{className:"ml-2 text-xs font-bold text-navy bg-navy/10 px-2 py-0.5 rounded-full",children:n})]}),c.jsx(vf,{className:`w-4 h-4 text-slate-400 transition-transform ${i?"rotate-180":""}`})]}),i&&c.jsx("div",{className:"px-4 pb-4 pt-1 grid sm:grid-cols-2 gap-1.5",children:e.skills.map(o=>c.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer p-1.5 hover:bg-slate-50 rounded",children:[c.jsx("input",{type:"checkbox",checked:t.includes(o),onChange:()=>r(o),className:"w-4 h-4 accent-navy shrink-0"}),c.jsx("span",{className:"text-slate-700",children:o})]},o))})]})}function mM({session:e}){const t=ny(),[r,n]=E.useState(""),[i,a]=E.useState(""),[o,s]=E.useState(""),[l,u]=E.useState(!1);if(e)return c.jsx(iy,{to:"/admin",replace:!0});const f=async d=>{d.preventDefault(),s(""),u(!0);const{error:h}=await Q.auth.signInWithPassword({email:r,password:i});if(u(!1),h){s(h.message);return}t("/admin",{replace:!0})};return c.jsx("div",{className:"min-h-screen bg-slate-50 flex items-center justify-center px-4",children:c.jsxs("div",{className:"bg-white rounded-2xl shadow-sm border border-slate-200 w-full max-w-md p-8",children:[c.jsxs("div",{className:"text-center mb-8",children:[c.jsx("img",{src:"/images/enugu-job-centre-logo.png",alt:"Enugu Job Centre",className:"h-12 w-auto mx-auto mb-4"}),c.jsx("h1",{className:"font-display text-2xl font-bold text-navy",children:"Admin Login"}),c.jsx("p",{className:"text-sm text-slate-500 mt-2",children:"Sign in to manage job postings"})]}),c.jsxs("form",{onSubmit:f,className:"space-y-4",children:[c.jsxs("label",{className:"block",children:[c.jsx("span",{className:"text-sm font-medium text-slate-700 mb-1.5 block",children:"Email"}),c.jsxs("div",{className:"relative",children:[c.jsx(uy,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),c.jsx("input",{type:"email",value:r,onChange:d=>n(d.target.value),required:!0,className:"w-full pl-10 pr-3 py-2.5 rounded-lg border border-slate-300 focus:border-navy focus:ring-2 focus:ring-navy/10 outline-none text-sm",placeholder:"[email protected]"})]})]}),c.jsxs("label",{className:"block",children:[c.jsx("span",{className:"text-sm font-medium text-slate-700 mb-1.5 block",children:"Password"}),c.jsx("input",{type:"password",value:i,onChange:d=>
399a(d.target.value),required:!0,className:"w-full px-3 py-2.5 rounded-lg border border-slate-300 focus:border-navy focus:ring-2 focus:ring-navy/10 outline-none text-sm",placeholder:"••••••••"})]}),o&&c.jsx("div",{className:"bg-red-50 border border-red-200 text-red-700 text-sm rounded-lg p-3",children:o}),c.jsx("button",{type:"submit",disabled:l,className:"w-full bg-navy hover:bg-navy-dark disabled:opacity-50 text-white py-2.5 rounded-lg text-sm font-semibold transition-colors",children:l?"Signing in…":"Sign In"})]}),c.jsx("div",{className:"mt-6 text-center",children:c.jsx(ve,{to:"/",className:"text-sm text-slate-500 hover:text-navy",children:"← Back to job board"})}),c.jsx("p",{className:"mt-6 text-xs text-slate-400 text-center",children:"Admin accounts are created manually in Supabase. There is no public sign-up."})]})})}const Uh=[{value:"short_text",label:"Short text",icon:BR},{value:"long_text",label:"Long text",icon:ER},{value:"single_choice",label:"Single choice",icon:TR},{value:"multi_choice",label:"Multiple choice",icon:DR},{value:"yes_no",label:"Yes / No",icon:LR},{value:"file_upload",label:"File upload",icon:cO}],_x=new Set(["single_choice","multi_choice"]);function gM(){return{id:"q_"+Math.random().toString(36).slice(2,10),type:"short_text",label:"",required:!1,options:[]}}function vM({value:e,onChange:t}){const r=Array.isArray(e)?e:[];function n(l){const u=typeof l=="function"?l(r):l;t(u)}const i=()=>n(l=>[...l,gM()]),a=l=>n(u=>u.filter(f=>f.id!==l)),o=(l,u)=>n(f=>f.map(d=>d.id===l?{...d,...u}:d)),s=(l,u)=>n(f=>{const d=f.findIndex(m=>m.id===l);if(d<0)return f;const h=d+u;if(h<0||h>=f.length)return f;const p=[...f];return[p[d],p[h]]=[p[h],p[d]],p});return c.jsxs("div",{className:"space-y-3",children:[r.length===0&&c.jsx("div",{className:"text-sm text-slate-500 bg-slate-50 border border-slate-200 border-dashed rounded-lg p-4 text-center",children:"No custom questions yet. Applicants will only fill in name, email, phone, CV, and cover letter."}),r.map((l,u)=>c.jsx(yM,{question:l,index:u,total:r.length,onChange:f=>o(l.id,f),onRemove:()=>a(l.id),onMoveUp:()=>s(l.id,-1),onMoveDown:()=>s(l.id,1)},l.id)),c.jsxs("button",{type:"button",onClick:i,className:"w-full border border-dashed border-slate-300 hover:border-navy hover:bg-slate-50 text-sm text-slate-600 hover:text-navy rounded-lg py-3 inline-flex items-center justify-center gap-2 transition-colors",children:[c.jsx(eo,{className:"w-4 h-4"})," Add question"]})]})}function yM({question:e,index:t,total:r,onChange:n,onRemove:i,onMoveUp:a,onMoveDown:o}){const l=(Uh.find(u=>u.value===e.type)||Uh[0]).icon;return c.jsx("div",{className:"border border-slate-200 rounded-xl bg-white p-4",children:c.jsxs("div",{className:"flex items-start gap-3",children:[c.jsx(IR,{className:"w-4 h-4 text-slate-300 mt-3 shrink-0","aria-hidden":!0}),c.jsxs("div",{className:"flex-1 min-w-0 space-y-3",children:[c.jsx("input",{type:"text",value:e.label,onChange:u=>n({label:u.target.value}),placeholder:`Question ${t+1} — e.g. "Why are you a fit for this role?"`,className:"w-full px-3 py-2 rounded-lg border border-slate-300 focus:border-navy focus:ring-2 focus:ring-navy/10 outline-none text-sm font-medium"}),c.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[c.jsxs("div",{className:"relative",children:[c.jsx(l,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-500 pointer-events-none"}),c.jsx("select",{value:e.type,onChange:u=>{const f=u.target.value;n({type:f,options:_x.has(f)&&e.options.length===0?["Option 1","Option 2"]:e.options})},className:"pl-8 pr-7 py-1.5 rounded-lg border border-slate-300 text-sm focus:border-navy outline-none bg-white cursor-pointer appearance-none",children:Uh.map(u=>c.jsx("option",{value:u.value,children:u.label},u.value))})]}),c.jsxs("label",{className:"inline-flex items-center gap-2 cursor-pointer text-sm",children:[c.jsx("input",{type:"checkbox",checked:!!e.required,onChange:u=>n({required:u.target.checked}),className:"w-4 h-4 accent-navy"}),c.jsx("span",{className:"text-slate-700",children:"Required"})]})]}),_x.has(e.type)&&c.jsx(bM,{options:e.options,onChange:u=>n({options:u})})]}),c.jsxs("div",{className:"flex flex-col gap-1 shrink-0",children:[c.jsx("button",{type:"button",onClick:a,disabled:t===0,className:"p-1.5 text-slate-400 hover:text-navy hover:bg-slate-100 rounded disabled:opacity-30",title:"Move up",children:c.jsx(NR,{className:"w-4 h-4"})}),c.jsx("button",{type:"button",onClick:o,disabled:t===r-1,className:"p-1.5 text-slate-400 hover:text-navy hover:bg-slate-100 rounded disabled:opacity-30",title:"Move down",children:c.jsx(vf,{className:"w-4 h-4"})}),c.jsx("button",{type:"button",onClick:i,className:"p-1.5 text-slate-400 hover:text-red-600 hover:bg-red-50 rounded",title:"Delete question",children:c.jsx(Ur,{className:"w-4 h-4"})})]})]})})}function bM({options:e,onChange:t}){const r=()=>t([...e,`Option ${e.length+1}`]),n=a=>t(e.filter((o,s)=>s!==a)),i=(a,o)=>t(e.map((s,l)=>l===a?o:s));return c.jsxs("div",{className:"space-y-2 bg-slate-50 rounded-lg p-3 border border-slate-200",children:[c.jsx("div",{className:"text-xs font-semibold text-slate-600 uppercase tracking-wider",children:"Options"}),e.map((a,o)=>c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("input",{type:"text",value:a,onChange:s=>i(o,s.target.value),placeholder:`Option ${o+1}`,className:"flex-1 px-2.5 py-1.5 rounded border border-slate-300 text-sm focus:border-navy outline-none"}),c.jsx("button",{type:"button",onClick:()=>n(o),disabled:e.length<=1,className:"p-1.5 text-slate-400 hover:text-red-600 disabled:opacity-30",title:"Remove option",children:c.jsx(Ur,{className:"w-3.5 h-3.5"})})]},o)),c.jsxs("button",{type:"button",onClick:r,className:"text-xs text-navy hover:underline font-semibold inline-flex items-center gap-1",children:[c.jsx(eo,{className:"w-3 h-3"})," Add option"]})]})}const xM=["Full-time","Part-time","Contract","Internship","Remote"],Sx={slug:"",title:"",company:"",location:"",type:"Full-time",salary:"",description:"",apply_url:"",is_active:!0,form_schema:[],category_ids:[]};function wM({initialJob:e,onSubmit:t,onCancel:r,submitting:n}){const i=e?{...Sx,...e,form_schema:e.form_schema||[],category_ids:(e.categories||[]).map(g=>g.id)}:Sx,[a,o]=E.useState(i),[s,l]=E.useState([]),[u,f]=E.useState(""),[d,h]=E.useState(!!e);E.useEffect(()=>{Q.from("categories").select("*").order("name").then(({data:g})=>{l(g||[])})},[]);const p=g=>y=>{const x=y.target.type==="checkbox"?y.target.checked:y.target.value;o(S=>({...S,[g]:x}))};E.useEffect(()=>{!d&&a.title&&o(g=>({...g,slug:pl(g.title)}))},[a.title,d]);const m=g=>{h(!0),o(y=>({...y,slug:g.target.value.toLowerCase().replace(/\s+/g,"-")}))},v=g=>{o(y=>({...y,category_ids:y.category_ids.includes(g)?y.category_ids.filter(x=>x!==g):[...y.category_ids,g]}))},b=async g=>{if(g.preventDefault(),f(""),!a.title.trim()||!a.company.trim()||!a.location.trim()||!a.description.trim()){f("Please fill in all required fields.");return}if(!a.slug.trim()){f("Slug is required.");return}if(!FR(a.slug)){f("Slug must be lowercase letters, numbers, and hyphens only.");return}if(a.apply_url&&a.apply_url.trim())try{new URL(a.apply_url)}
399catch{f("Apply URL must be a valid URL or blank.");return}for(const x of a.form_schema){if(!x.label||!x.label.trim()){f("Every custom question needs a label.");return}if((x.type==="single_choice"||x.type==="multi_choice")&&(x.options||[]).filter(_=>_&&_.trim()).length===0){f(`Question "${x.label}" needs at least one option.`);return}}const y=await t(a);y!=null&&y.error&&f(y.error)};return c.jsxs("form",{onSubmit:b,className:"space-y-6",children:[c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c.jsx(Kr,{label:"Job title",required:!0,children:c.jsx("input",{type:"text",value:a.title,onChange:p("title"),placeholder:"e.g. Frontend Developer",className:"input"})}),c.jsx(Kr,{label:"URL slug",required:!0,hint:"Used in the URL: /jobs/your-slug",children:c.jsx("input",{type:"text",value:a.slug,onChange:m,placeholder:"frontend-developer",className:"input font-mono text-sm"})}),c.jsx(Kr,{label:"Company",required:!0,children:c.jsx("input",{type:"text",value:a.company,onChange:p("company"),placeholder:"e.g. Enugu Tech Hub",className:"input"})}),c.jsx(Kr,{label:"Location",required:!0,children:c.jsx("input",{type:"text",value:a.location,onChange:p("location"),placeholder:"e.g. Enugu, Nigeria",className:"input"})}),c.jsx(Kr,{label:"Type",required:!0,children:c.jsx("select",{value:a.type,onChange:p("type"),className:"input",children:xM.map(g=>c.jsx("option",{value:g,children:g},g))})}),c.jsx(Kr,{label:"Salary (optional)",children:c.jsx("input",{type:"text",value:a.salary||"",onChange:p("salary"),placeholder:"e.g. ₦400,000 - ₦600,000",className:"input"})})]}),c.jsx(Kr,{label:"Categories",hint:"Tag this job with one or more categories. Manage categories in the Categories page.",children:c.jsx(_M,{all:s,selectedIds:a.category_ids,onToggle:v})}),c.jsx(Kr,{label:"External apply URL (optional)",hint:"Leave blank to use the built-in application form. If filled, applicants are sent to this URL instead.",children:c.jsx("input",{type:"url",value:a.apply_url||"",onChange:p("apply_url"),placeholder:"https://example.com/jobs/123",className:"input"})}),c.jsx(Kr,{label:"Description",required:!0,children:c.jsx("textarea",{value:a.description,onChange:p("description"),rows:8,placeholder:"Role responsibilities, requirements, what the candidate will do...",className:"input resize-y"})}),c.jsxs("div",{children:[c.jsx("div",{className:"text-sm font-medium text-slate-700 mb-1",children:"Custom application questions"}),c.jsx("div",{className:"text-xs text-slate-500 mb-3",children:"Add questions applicants must answer in addition to name, email, phone, CV, and cover letter. Leave empty if you only need the standard fields."}),c.jsx(vM,{value:a.form_schema,onChange:g=>o(y=>({...y,form_schema:g}))})]}),c.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[c.jsx("input",{type:"checkbox",checked:a.is_active,onChange:p("is_active"),className:"w-4 h-4 accent-navy"}),c.jsx("span",{className:"text-sm text-slate-700",children:"Active (visible on the public job board)"})]}),u&&c.jsx("div",{className:"bg-red-50 border border-red-200 text-red-700 text-sm rounded-lg p-3",children:u}),c.jsxs("div",{className:"flex items-center gap-3 pt-2",children:[c.jsx("button",{type:"submit",disabled:n,className:"bg-navy hover:bg-navy-dark disabled:opacity-50 text-white px-6 py-2.5 rounded-lg text-sm font-semibold transition-colors",children:n?"Saving…":e?"Save changes":"Create job"}),c.jsx("button",{type:"button",onClick:r,className:"text-slate-600 hover:text-slate-900 px-4 py-2.5 text-sm font-semibold",children:"Cancel"})]}),c.jsx("style",{children:`
400        .input {
401          width: 100%; border: 1px solid rgb(203 213 225);
402          border-radius: 0.5rem; padding: 0.625rem 0.75rem;
403          font-size: 0.875rem; outline: none;
404          transition: border-color .15s, box-shadow .15s;
405        }
406        .input:focus { border-color: #0a1f4d; box-shadow: 0 0 0 3px rgba(10, 31, 77, 0.1); }
407      `})]})}function Kr({label:e,required:t,hint:r,children:n}){return c.jsxs("label",{className:"block",children:[c.jsxs("span",{className:"text-sm font-medium text-slate-700 mb-1.5 block",children:[e," ",t&&c.jsx("span",{className:"text-red-500",children:"*"})]}),n,r&&c.jsx("span",{className:"text-xs text-slate-500 mt-1 block",children:r})]})}function _M({all:e,selectedIds:t,onToggle:r}){const n=e.filter(a=>t.includes(a.id)),i=e.filter(a=>!t.includes(a.id));return e.length===0?c.jsx("div",{className:"text-sm text-slate-500 bg-slate-50 border border-slate-200 rounded-lg p-3",children:"No categories defined yet. Create some in the Categories page first."}):c.jsxs("div",{className:"border border-slate-300 rounded-lg p-2 min-h-[42px]",children:[c.jsxs("div",{className:"flex flex-wrap gap-1.5 mb-2",children:[n.length===0&&
407c.jsx("span",{className:"text-sm text-slate-400 px-1",children:"No categories selected"}),n.map(a=>c.jsxs("button",{type:"button",onClick:()=>r(a.id),className:"inline-flex items-center gap-1 text-xs font-semibold px-2.5 py-1 rounded-full",style:{background:a.color+"22",color:a.color},children:[a.name,c.jsx(xn,{className:"w-3 h-3"})]},a.id))]}),i.length>0&&c.jsx("div",{className:"border-t border-slate-200 pt-2 flex flex-wrap gap-1.5",children:i.map(a=>c.jsxs("button",{type:"button",onClick:()=>r(a.id),className:"text-xs font-medium px-2.5 py-1 rounded-full border border-slate-300 hover:bg-slate-50",children:["+ ",a.name]},a.id))})]})}function nu({session:e,active:t}){var i;async function r(){await Q.auth.signOut()}const n=(a,o,s)=>c.jsx(ve,{to:o,className:t===a?"text-navy":"text-slate-600 hover:text-navy",children:s},a);return c.jsx("header",{className:"bg-white border-b border-slate-200 sticky top-0 z-40",children:c.jsxs("div",{className:"max-w-6xl mx-auto px-6 py-4 flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsx(ve,{to:"/",className:"flex items-center",children:c.jsx("img",{src:"/images/enugu-job-centre-logo.png",alt:"Enugu Job Centre",className:"h-9 w-auto"})}),c.jsx("span",{className:"text-xs font-semibold bg-navy text-white px-2 py-1 rounded",children:"ADMIN"})]}),c.jsxs("nav",{className:"hidden md:flex items-center gap-6 text-sm font-semibold",children:[n("jobs","/admin","Jobs"),n("applications","/admin/applications","Applications"),n("enrollments","/admin/enrollments","Enrollments"),n("categories","/admin/categories","Categories"),n("analytics","/admin/analytics","Analytics"),n("users","/admin/users","Admins")]}),c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsx("span",{className:"text-sm text-slate-600 hidden lg:inline",children:(i=e==null?void 0:e.user)==null?void 0:i.email}),c.jsxs(ve,{to:"/",className:"text-sm text-slate-600 hover:text-navy font-medium inline-flex items-center gap-1",children:["View site ",c.jsx(hl,{className:"w-3.5 h-3.5"})]}),c.jsxs("button",{onClick:r,className:"text-sm text-slate-600 hover:text-red-600 font-medium inline-flex items-center gap-1",children:[c.jsx(uO,{className:"w-4 h-4"})," Sign out"]})]})]})})}function fy({title:e,onClose:t,onExport:r}){const[n,i]=E.useState(""),[a,o]=E.useState(""),[s,l]=E.useState("csv"),[u,f]=E.useState(!1);async function d(h){h.preventDefault(),f(!0);try{await r({from:n?new Date(n).toISOString():null,to:a?new Date(new Date(a).getTime()+86400*1e3).toISOString():null,format:s})}finally{f(!1)}}return c.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center px-4",children:[c.jsx("div",{className:"absolute inset-0 bg-slate-900/40",onClick:t}),c.jsxs("div",{className:"relative bg-white rounded-2xl shadow-2xl w-full max-w-md",children:[c.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-slate-200",children:[c.jsx("h2",{className:"font-display text-xl font-bold text-navy",children:e}),c.jsx("button",{onClick:t,className:"p-1 hover:bg-slate-100 rounded-lg",children:c.jsx(xn,{className:"w-5 h-5"})})]}),c.jsxs("form",{onSubmit:d,className:"p-6 space-y-4",children:[c.jsx("div",{className:"text-sm text-slate-600",children:"Filter by creation date (leave blank to export everything)."}),c.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[c.jsxs("label",{className:"block",children:[c.jsx("span",{className:"text-sm font-medium text-slate-700 mb-1.5 block",children:"From"}),c.jsx("input",{type:"date",value:n,onChange:h=>i(h.target.value),max:a||void 0,className:"w-full px-3 py-2.5 rounded-lg border border-slate-300 focus:border-navy outline-none text-sm"})]}),c.jsxs("label",{className:"block",children:[c.jsx("span",{className:"text-sm font-medium text-slate-700 mb-1.5 block",children:"To"}),c.jsx("input",{type:"date",value:a,onChange:h=>o(h.target.value),min:n||void 0,className:"w-full px-3 py-2.5 rounded-lg border border-slate-300 focus:border-navy outline-none text-sm"})]})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-sm font-medium text-slate-700 mb-2 block",children:"Format"}),c.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[c.jsx(jx,{value:"csv",current:s,onSelect:l,icon:Za,label:"CSV",hint:"Opens in Excel, Numbers, Google Sheets"}),c.jsx(jx,{value:"xlsx",current:s,onSelect:l,icon:$R,label:"Excel",hint:".xlsx with formatting"})]})]}),c.jsxs("div",{className:"flex items-center gap-3 pt-2",children:[c.jsx("button",{type:"submit",disabled:u,className:"bg-navy hover:bg-navy-dark disabled:opacity-50 text-white px-5 py-2.5 rounded-lg text-sm font-semibold flex-1 inline-flex items-center justify-center gap-2",children:u?"Exporting…":c.jsxs(c.Fragment,{children:[c.jsx(fn,{className:"w-4 h-4"})," Download"]})}),c.jsx("button",{type:"button",onClick:t,className:"text-slate-600 hover:text-slate-900 px-4 py-2.5 text-sm font-semibold",children:"Cancel"})]})]})]})]})}function jx({value:e,current:t,onSelect:r,icon:n,label:i,hint:a}){const o=e===t;return c.jsxs("button",{type:"button",onClick:()=>r(e),className:`text-left p-3 rounded-lg border-2 transition-colors ${o?"border-navy bg-navy/5":"border-slate-200 hover:border-slate-300"}`,children:[c.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[c.jsx(n,{className:`w-4 h-4 ${o?"text-navy":"text-slate-500"}`}),c.jsx("span",{className:`font-semibold text-sm ${o?"text-navy":"text-slate-700"}`,children:i})]}),c.jsx("div",{className:"text-xs text-slate-500",children:a})]})}const SM="modulepreload",jM=function(e){return"/"+e},kx={},hy=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),s=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.allSettled(r.map(l=>{if(l=jM(l),l in kx)return;kx[l]=!0;const u=l.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${f}`))return;const d=document.createElement("link");if(d.rel=u?"stylesheet":SM,u||(d.as="script"),d.crossOrigin="",d.href=l,s&&d.setAttribute("nonce",s),document.head.appendChild(d),u)return new Promise((h,p)=>{d.addEventListener("load",h),d.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${l}`)))})}))}function a(o){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o}return i.then(o=>{for(const s of o||[])s.status==="rejected"&&a(s.reason);return t().catch(a)})};function Ox(e){if(e==null)return"";const t=String(e);return/[",\n\r]/.test(t)||t!==t.trim()?`"${t.replace(/"/g,'""')}"`:t}function py(e,t){const r=e.map(Ox).join(","),n=t.map(i=>e.map(a=>Ox(i[a])).join(","));return[r,...n].join(`\r
408`)}function To(e,t){const r=URL.createObjectURL(e),n=document.createElement("a");n.href=r,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(r)}function Co(){const e=new Date;return`${e.getFullYear()}
408-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function vO(e){return e.map(t=>({title:t.title,company:t.company,location:t.location,type:t.type,salary:t.salary||"",slug:t.slug,status:t.is_active?"Active":"Hidden",categories:(t.categories||[]).map(r=>r.name).join("; "),description:t.description,apply_url:t.apply_url||"",created_at:t.created_at,updated_at:t.updated_at}))}const yO=["title","company","location","type","salary","slug","status","categories","description","apply_url","created_at","updated_at"];function kM(e){const t=vO(e),r=py(yO,t),n=new Blob(["\uFEFF"+r],{type:"text/csv;charset=utf-8"});To(n,`jobs-${Co()}.csv`)}async function OM(e){const t=await hy(()=>import("./xlsx-D_0l8YDs.js"),[]),r=vO(e),n=t.utils.json_to_sheet(r,{header:yO}),i=t.utils.book_new();t.utils.book_append_sheet(i,n,"Jobs");const a=t.write(i,{type:"array",bookType:"xlsx"}),o=new Blob([a],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"});To(o,`jobs-${Co()}.xlsx`)}function bO(e,t){const r=new Set;for(const o of Object.values(t))for(const s of o)r.add(s.question_label);const n=[...r],i=e.map(o=>{var u,f;const s={full_name:o.full_name,email:o.email,phone:o.phone,job_title:((u=o.jobs)==null?void 0:u.title)||"",job_slug:((f=o.jobs)==null?void 0:f.slug)||"",status:o.status,cover_letter:o.cover_letter||"",cv_path:o.cv_path||"",submitted_at:o.created_at},l=t[o.id]||[];for(const d of n){const h=l.find(p=>p.question_label===d);s[d]=h&&h.answer||""}return s}),a=["full_name","email","phone","job_title","job_slug","status","cover_letter","cv_path","submitted_at",...n];return{rows:i,headers:a}}function EM(e,t){const{rows:r,headers:n}=bO(e,t),i=py(n,r),a=new Blob(["\uFEFF"+i],{type:"text/csv;charset=utf-8"});To(a,`applications-${Co()}.csv`)}async function AM(e,t){const r=await hy(()=>import("./xlsx-D_0l8YDs.js"),[]),{rows:n,headers:i}=bO(e,t),a=r.utils.json_to_sheet(n,{header:i}),o=r.utils.book_new();r.utils.book_append_sheet(o,a,"Applications");const s=r.write(o,{type:"array",bookType:"xlsx"}),l=new Blob([s],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"});To(l,`applications-${Co()}.xlsx`)}function xO(e){return e.map(t=>({full_name:t.full_name,phone:t.phone,gender:t.gender,email:t.email,age_range:t.age_range,state:t.state,lga:t.lga,education:t.education,current_status:t.current_status,skills_interested:(t.skills_interested||[]).join("; "),device_access:t.device_access,commitment:t.commitment,hours_per_week:t.hours_per_week,notify_jobs:t.notify_jobs,open_to_internship:t.open_to_internship,heard_from:t.heard_from,consent:t.consent?"Yes":"No",status:t.status,submitted_at:t.created_at}))}const wO=["full_name","phone","gender","email","age_range","state","lga","education","current_status","skills_interested","device_access","commitment","hours_per_week","notify_jobs","open_to_internship","heard_from","consent","status","submitted_at"];function PM(e){const t=xO(e),r=py(wO,t),n=new Blob(["\uFEFF"+r],{type:"text/csv;charset=utf-8"});To(n,`enrollments-${Co()}.csv`)}async function NM(e){const t=await hy(()=>import("./xlsx-D_0l8YDs.js"),[]),r=xO(e),n=t.utils.json_to_sheet(r,{header:wO}),i=t.utils.book_new();t.utils.book_append_sheet(i,n,"Enrollments");const a=t.write(i,{type:"array",bookType:"xlsx"}),o=new Blob([a],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"});To(o,`enrollments-${Co()}.xlsx`)}function TM({session:e}){const[t,r]=E.useState([]),[n,i]=E.useState(!0),[a,o]=E.useState(""),[s,l]=E.useState({mode:"list"}),[u,f]=E.useState(!1),[d,h]=E.useState(new Set),[p,m]=E.useState(!1),[v,b]=E.useState(!1);async function g(){i(!0);const{data:N,error:I}=await Q.from("jobs").select("*, categories:job_categories(category:categories(id, name, color))").order("created_at",{ascending:!1});if(I){o(I.message),i(!1);return}const R=(N||[]).map(D=>({...D,categories:(D.categories||[]).map($=>$.category).filter(Boolean)}));r(R),i(!1)}E.useEffect(()=>{g()},[]);async function y(N,I){if(await Q.from("job_categories").delete().eq("job_id",N),I.length>0){const R=I.map($=>({job_id:N,category_id:$})),{error:D}=await Q.from("job_categories").insert(R);if(D)return D}return null}async function x(N){f(!0);const{category_ids:I,...R}=N,{data:D,error:$}=await Q.from("jobs").insert([R]).select().single();if($)return f(!1),{error:Ex($.message)};if(I.length>0){const M=await y(D.id,I);if(M)return f(!1),{error:M.message}}f(!1),await g(),l({mode:"list"})}async function S(N){f(!0);const{id:I,created_at:R,updated_at:D,categories:$,category_ids:M,...U}=N,{error:H}=await Q.from("jobs").update(U).eq("id",s.job.id);if(H)return f(!1),{error:Ex(H.message)};const W=await y(s.job.id,M);if(f(!1),W)return{error:W.message};await g(),l({mode:"list"})}async function _(N){if(!confirm(`Delete "${N.title}"? Applications for this job will also be deleted. Cannot be undone.`))return;const{error:I}=await Q.from("jobs").delete().eq("id",N.id);if(I){alert("Delete failed: "+I.message);return}await g()}async function w(N){const{error:I}=await Q.from("jobs").update({is_active:!N.is_active}).eq("id",N.id);if(I){alert("Update failed: "+I.message);return}await g()}const j=t.length>0&&d.size===t.length,O=d.size>0&&d.size<t.length;function k(){h(j?new Set:new Set(t.map(N=>N.id)))}function A(N){h(I=>{const R=new Set(I);return R.has(N)?R.delete(N):R.add(N),R})}async function C(N){const I=[...d];if(I.length===0)return;m(!1);const{error:R}=await Q.from("jobs").update({is_active:N}).in("id",I);if(R){alert("Bulk update failed: "+R.message);return}h(new Set),await g()}async function P(){const N=[...d];if(N.length===0||(m(!1),!confirm(`Delete ${N.length} job${N.length===1?"":"s"}? Their applications will also be deleted.`)))return;const{error:I}=await Q.from("jobs").delete().in("id",N);if(I){alert("Bulk delete failed: "+I.message);return}h(new Set),await g()}async function B({from:N,to:I,format:R}){let D=Q.from("jobs").select("*, categories:job_categories(category:categories(id, name, color))").order("created_at",{ascending:!1});N&&(D=D.gte("created_at",N)),I&&(D=D.lte("created_at",I));const{data:$,error:M}=await D;if(M){alert("Export failed: "+M.message);return}const U=($||[]).map(H=>({...H,categories:(H.categories||[]).map(W=>
408W.category).filter(Boolean)}));R==="csv"?kM(U):await OM(U),b(!1)}return c.jsxs("div",{className:"min-h-screen bg-slate-50",children:[c.jsx(nu,{session:e,active:"jobs"}),c.jsxs("main",{className:"max-w-6xl mx-auto px-6 py-10",children:[s.mode==="list"&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex items-center justify-between mb-8 flex-wrap gap-4",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"font-display text-3xl font-bold text-navy",children:"Job Postings"}),c.jsxs("p",{className:"text-slate-600 mt-1 text-sm",children:[t.length," total · ",t.filter(N=>N.is_active).length," active"]})]}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("button",{onClick:()=>b(!0),className:"text-sm font-semibold text-slate-700 hover:text-navy inline-flex items-center gap-1.5 px-4 py-2.5 border border-slate-300 rounded-lg hover:bg-white",children:[c.jsx(fn,{className:"w-4 h-4"})," Export"]}),c.jsxs(ve,{to:"/admin/applications",className:"text-sm font-semibold text-slate-700 hover:text-navy inline-flex items-center gap-1.5 px-4 py-2.5 border border-slate-300 rounded-lg hover:bg-white",children:[c.jsx(Za,{className:"w-4 h-4"})," Applications"]}),c.jsxs("button",{onClick:()=>l({mode:"create"}),className:"bg-navy hover:bg-navy-dark text-white px-5 py-2.5 rounded-lg text-sm font-semibold inline-flex items-center gap-2 transition-colors",children:[c.jsx(eo,{className:"w-4 h-4"})," New Job"]})]})]}),a&&c.jsx("div",{className:"bg-red-50 border border-red-200 text-red-700 rounded-lg p-4 mb-6",children:a}),d.size>0&&c.jsxs("div",{className:"bg-navy text-white rounded-xl px-4 py-3 mb-4 flex items-center justify-between",children:[c.jsxs("span",{className:"text-sm font-medium",children:[d.size," selected"]}),c.jsxs("div",{className:"relative",children:[c.jsxs("button",{onClick:()=>m(N=>!N),className:"bg-white/10 hover:bg-white/20 px-3 py-1.5 rounded-lg text-sm font-semibold inline-flex items-center gap-1.5",children:["Actions ",c.jsx(vf,{className:"w-4 h-4"})]}),p&&c.jsxs("div",{className:"absolute right-0 mt-2 w-56 bg-white text-slate-900 rounded-lg shadow-xl border border-slate-200 overflow-hidden z-10",children:[c.jsxs("button",{onClick:()=>C(!0),className:"w-full text-left px-4 py-2.5 text-sm hover:bg-slate-50 inline-flex items-center gap-2",children:[c.jsx(Qa,{className:"w-4 h-4 text-emerald-600"})," Activate selected"]}),c.jsxs("button",{onClick:()=>C(!1),className:"w-full text-left px-4 py-2.5 text-sm hover:bg-slate-50 inline-flex items-center gap-2",children:[c.jsx(Em,{className:"w-4 h-4 text-slate-500"})," Deactivate selected"]}),c.jsxs("button",{onClick:P,className:"w-full text-left px-4 py-2.5 text-sm hover:bg-red-50 text-red-600 inline-flex items-center gap-2 border-t border-slate-100",children:[c.jsx(Ur,{className:"w-4 h-4"})," Delete selected"]})]})]})]}),n?c.jsx("div",{className:"text-center text-slate-500 py-20",children:"Loading…"}):t.length===0?c.jsxs("div",{className:"bg-white rounded-2xl border border-slate-200 p-12 text-center",children:[c.jsx("h3",{className:"text-lg font-semibold text-slate-700 mb-1",children:"No jobs yet"}),c.jsx("p",{className:"text-sm text-slate-500 mb-6",children:"Create your first job posting to get started."}),c.jsxs("button",{onClick:()=>l({mode:"create"}),className:"bg-navy hover:bg-navy-dark text-white px-5 py-2.5 rounded-lg text-sm font-semibold inline-flex items-center gap-2",children:[c.jsx(eo,{className:"w-4 h-4"})," Create Job"]})]}):c.jsx("div",{className:"bg-white rounded-2xl border border-slate-200 overflow-hidden",children:c.jsxs("table",{className:"w-full",children:[c.jsx("thead",{className:"bg-slate-50 border-b border-slate-200",children:c.jsxs("tr",{children:[c.jsx("th",{className:"px-4 py-3 w-10",children:c.jsx("input",{type:"checkbox",checked:j,ref:N=>{N&&(N.indeterminate=O)},onChange:k,className:"w-4 h-4 accent-navy cursor-pointer"})}),c.jsx("th",{className:"text-left text-xs font-semibold text-slate-600 uppercase tracking-wider px-6 py-3",children:"Title"}),c.jsx("th",{className:"text-left text-xs font-semibold text-slate-600 uppercase tracking-wider px-6 py-3 hidden md:table-cell",children:"Categories"}),c.jsx("th",{className:"text-left text-xs font-semibold text-slate-600 uppercase tracking-wider px-6 py-3 hidden lg:table-cell",children:"Type"}),c.jsx("th",{className:"text-left text-xs font-semibold text-slate-600 uppercase tracking-wider px-6 py-3",children:"Status"}),c.jsx("th",{className:"text-right text-xs font-semibold text-slate-600 uppercase tracking-wider px-6 py-3",children:"Actions"})]})}),c.jsx("tbody",{className:"divide-y divide-slate-100",children:t.map(N=>{var I;
408return c.jsxs("tr",{className:`hover:bg-slate-50 ${d.has(N.id)?"bg-blue-50/40":""}`,children:[c.jsx("td",{className:"px-4 py-4",children:c.jsx("input",{type:"checkbox",checked:d.has(N.id),onChange:()=>A(N.id),className:"w-4 h-4 accent-navy cursor-pointer"})}),c.jsxs("td",{className:"px-6 py-4",children:[c.jsx("div",{className:"font-medium text-slate-900",children:N.title}),c.jsxs(ve,{to:`/jobs/${N.slug}`,target:"_blank",className:"text-xs font-mono text-slate-500 hover:text-navy hover:underline",children:["/jobs/",N.slug]})]}),c.jsx("td",{className:"px-6 py-4 hidden md:table-cell",children:c.jsxs("div",{className:"flex flex-wrap gap-1",children:[(N.categories||[]).slice(0,3).map(R=>c.jsx("span",{className:"text-[10px] font-semibold px-2 py-0.5 rounded-full",style:{background:R.color+"22",color:R.color},children:R.name},R.id)),(((I=N.categories)==null?void 0:I.length)||0)>3&&c.jsxs("span",{className:"text-[10px] text-slate-500",children:["+",N.categories.length-3]}),(!N.categories||N.categories.length===0)&&c.jsx("span",{className:"text-xs text-slate-400 italic",children:"—"})]})}),c.jsx("td",{className:"px-6 py-4 text-sm text-slate-600 hidden lg:table-cell",children:N.type}),c.jsx("td",{className:"px-6 py-4",children:c.jsxs("button",{onClick:()=>w(N),className:`text-xs font-semibold px-2.5 py-1 rounded-full inline-flex items-center gap-1 ${N.is_active?"bg-emerald-50 text-emerald-700 hover:bg-emerald-100":"bg-slate-100 text-slate-600 hover:bg-slate-200"}`,children:[N.is_active?c.jsx(Qa,{className:"w-3 h-3"}):c.jsx(Em,{className:"w-3 h-3"}),N.is_active?"Active":"Hidden"]})}),c.jsx("td",{className:"px-6 py-4 text-right",children:c.jsxs("div",{className:"inline-flex items-center gap-1",children:[c.jsx("button",{onClick:()=>l({mode:"edit",job:N}),className:"p-2 text-slate-500 hover:text-navy hover:bg-slate-100 rounded-lg",title:"Edit",children:c.jsx(dO,{className:"w-4 h-4"})}),c.jsx("button",{onClick:()=>_(N),className:"p-2 text-slate-500 hover:text-red-600 hover:bg-red-50 rounded-lg",title:"Delete",children:c.jsx(Ur,{className:"w-4 h-4"})})]})})]},N.id)})})]})})]}),(s.mode==="create"||s.mode==="edit")&&c.jsxs("div",{children:[c.jsx("button",{onClick:()=>l({mode:"list"}),className:"text-sm text-slate-500 hover:text-navy mb-4",children:"← Back to all jobs"}),c.jsx("h1",{className:"font-display text-3xl font-bold text-navy mb-8",children:s.mode==="create"?"Create Job":"Edit Job"}),c.jsx("div",{className:"bg-white rounded-2xl border border-slate-200 p-8 max-w-3xl",children:c.jsx(wM,{initialJob:s.mode==="edit"?s.job:null,onSubmit:s.mode==="create"?x:S,onCancel:()=>l({mode:"list"}),submitting:u})})]})]}),v&&c.jsx(fy,{title:"Export Jobs",onClose:()=>b(!1),onExport:B})]})}function Ex(e){return e.includes("duplicate key")&&e.includes("slug")?"That slug is already in use. Please choose a unique slug.":e}const _O=["new","reviewed","shortlisted","rejected"],Nm={new:"New",reviewed:"Reviewed",shortlisted:"Shortlisted",rejected:"Rejected"},SO={new:"bg-blue-50 text-blue-700",reviewed:"bg-slate-100 text-slate-700",shortlisted:"bg-emerald-50 text-emerald-700",rejected:"bg-red-50 text-red-700"};function CM({session:e}){const[t,r]=E.useState([]),[n,i]=E.useState([]),[a,o]=E.useState(!0),[s,l]=E.useState(""),[u,f]=E.useState(""),[d,h]=E.useState("All"),[p,m]=E.useState("All"),[v,b]=E.useState(null),[g,y]=E.useState(!1);async function x(){o(!0);const[k,A]=await Promise.all([Q.from("applications").select("*, jobs(id, title, slug)").order("created_at",{ascending:!1}),Q.from("jobs").select("id, title").order("created_at",{ascending:!1})]);k.error?l(k.error.message):r(k.data||[]),A.error||i(A.data||[]),o(!1)}E.useEffect(()=>{x()},[]);async function S({from:k,to:A,format:C}){let P=Q.from("applications").select("*, jobs(id, title, slug)").order("created_at",{ascending:!1});k&&(P=P.gte("created_at",k)),A&&(P=P.lte("created_at",A));const{data:B,error:N}=await P;if(N){alert("Export failed: "+N.message);return}const I=B||[];let R={};if(I.length>0){const D=I.map(U=>U.id),{data:$,error:M}=await Q.from("application_answers").select("application_id, question_label, answer").in("application_id",D);!M&&$&&(R=$.reduce((U,H)=>((U[H.application_id]=U[H.application_id]||[]).push(H),U),{}))}C==="csv"?EM(I,R):await AM(I,R),y(!1)}const _=E.useMemo(()=>{const k=u.trim().toLowerCase();return t.filter(A=>{var C,P;return d!=="All"&&A.job_id!==d||p!=="All"&&A.status!==p?!1:k?A.full_name.toLowerCase().includes(k)||A.email.toLowerCase().includes(k)||A.phone.toLowerCase().includes(k)||((P=(C=A.jobs)==null?void 0:C.title)==null?void 0:P.toLowerCase().includes(k)):!0})},[t,u,d,p]);async function w(k){if(!k.cv_path){alert("No CV attached.");return}const{data:A,error:C}=await Q.storage.from("cvs").createSignedUrl(k.cv_path,60);if(C){alert("Could not get CV: "+C.message);return}window.open(A.signedUrl,"_blank","noopener,noreferrer")}async function j(k,A){const{error:C}=await Q.from("applications").update({status:A}).eq("id",k.id);if(C){alert("Update failed: "+C.message);return}r(P=>P.map(B=>B.id===k.id?{...B,status:A}:B)),(v==null?void 0:v.id)===k.id&&b({...v,status:A})}async function O(k){if(!confirm(`Delete ${k.full_name}'s application? Their CV will also be removed.`))return;k.cv_path&&await Q.storage.from("cvs").remove([k.cv_path]).catch(()=>{});const{error:A}=await Q.from("applications").delete().eq("id",k.id);if(A){alert("Delete failed: "+A.message);return}(v==null?void 0:v.id)===k.id&&b(null),await x()}return c.jsxs("div",{className:"min-h-screen bg-slate-50",children:[c.jsx(nu,{session:e,active:"applications"}),c.jsxs("main",{className:"max-w-6xl mx-auto px-6 py-10",children:[c.jsxs(ve,{to:"/admin",className:"text-sm text-slate-500 hover:text-navy inline-flex items-center gap-1 mb-4",children:[c.jsx(Xa,{className:"w-4 h-4"})," Back to jobs"]}),c.jsxs("div",{className:"flex items-center justify-between mb-8 flex-wrap gap-4",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"font-display text-3xl font-bold text-navy",children:"Applications"}),c.jsxs("p",{className:"text-slate-600 mt-1 text-sm",children:[t.length," total · ",t.filter(k=>k.status==="new").length," new"]})]}),c.jsxs("button",{onClick:()=>y(!0),className:"text-sm font-semibold text-slate-700 hover:text-navy inline-flex items-center gap-1.5 px-4 py-2.5 border border-slate-300 rounded-lg hover:bg-white",children:[c.jsx(fn,{className:"w-4 h-4"})," Export"]})]}),c.jsxs("div",{className:"bg-white rounded-2xl border border-slate-200 p-4 mb-6 flex flex-col md:flex-row gap-3",children:[c.jsxs("div",{className:"relative flex-1",children:[c.jsx(dy,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),c.jsx("input",{type:"text",value:u,onChange:k=>f(k.target.value),placeholder:"Search name, email, phone, job…",className:"w-full pl-10 pr-3 py-2 rounded-lg border border-slate-300 focus:border-navy focus:ring-2 focus:ring-navy/10 outline-none text-sm"})]}),c.jsxs("div",{className:"relative",children:[c.jsx(ly,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400 pointer-events-none"}),c.jsxs("select",{value:d,onChange:k=>h(k.target.value),className:"pl-9 pr-8 py-2 rounded-lg border border-slate-300 focus:border-navy outline-none text-sm appearance-none bg-white cursor-pointer min-w-[180px]",children:[c.jsx("option",{value:"All",children:"All jobs"}),n.map(k=>c.jsx("option",{value:k.id,children:k.title},k.id))]})]}),c.jsxs("select",{value:p,onChange:k=>m(k.target.value),className:"px-3 py-2 rounded-lg border border-slate-300 focus:border-navy outline-none text-sm bg-white cursor-pointer",children:[c.jsx("option",{value:"All",children:"All statuses"}),_O.map(k=>c.jsx("option",{value:k,children:Nm[k]},k))]})]}),s&&c.jsx("div",{className:"bg-red-50 border border-red-200 text-red-700 rounded-lg p-4 mb-6",children:s}),a?c.jsx("div",{className:"text-center text-slate-500 py-20",children:"Loading…"}):_.length===0?c.jsxs("div",{className:"bg-white rounded-2xl border border-slate-200 p-12 text-center",children:[c.jsx(Za,{className:"w-12 h-12 text-slate-300 mx-auto mb-4"}),c.jsx("h3",{className:"text-lg font-semibold text-slate-700 mb-1",children:t.length===0?"N
408o applications yet":"No matches"}),c.jsx("p",{className:"text-sm text-slate-500",children:t.length===0?"Applications will appear here as candidates apply.":"Try a different search or filter."})]}):c.jsx("div",{className:"bg-white rounded-2xl border border-slate-200 overflow-hidden",children:c.jsxs("table",{className:"w-full",children:[c.jsx("thead",{className:"bg-slate-50 border-b border-slate-200",children:c.jsxs("tr",{children:[c.jsx("th",{className:"text-left text-xs font-semibold text-slate-600 uppercase tracking-wider px-6 py-3",children:"Applicant"}),c.jsx("th",{className:"text-left text-xs font-semibold text-slate-600 uppercase tracking-wider px-6 py-3 hidden md:table-cell",children:"Job"}),c.jsx("th",{className:"text-left text-xs font-semibold text-slate-600 uppercase tracking-wider px-6 py-3 hidden lg:table-cell",children:"Applied"}),c.jsx("th",{className:"text-left text-xs font-semibold text-slate-600 uppercase tracking-wider px-6 py-3",children:"Status"}),c.jsx("th",{className:"text-right text-xs font-semibold text-slate-600 uppercase tracking-wider px-6 py-3",children:"Actions"})]})}),c.jsx("tbody",{className:"divide-y divide-slate-100",children:_.map(k=>{var A;return c.jsxs("tr",{className:"hover:bg-slate-50 cursor-pointer",onClick:()=>b(k),children:[c.jsxs("td",{className:"px-6 py-4",children:[c.jsx("div",{className:"font-medium text-slate-900",children:k.full_name}),c.jsx("div",{className:"text-xs text-slate-500",children:k.email})]}),c.jsx("td",{className:"px-6 py-4 text-sm text-slate-600 hidden md:table-cell",children:((A=k.jobs)==null?void 0:A.title)||c.jsx("span",{className:"italic text-slate-400",children:"deleted job"})}),c.jsx("td",{className:"px-6 py-4 text-sm text-slate-600 hidden lg:table-cell",children:zi(k.created_at)}),c.jsx("td",{className:"px-6 py-4",children:c.jsx("span",{className:`text-xs font-semibold px-2.5 py-1 rounded-full inline-block ${SO[k.status]}`,children:Nm[k.status]})}),c.jsx("td",{className:"px-6 py-4 text-right",children:c.jsxs("div",{className:"inline-flex items-center gap-1",onClick:C=>C.stopPropagation(),children:[c.jsx("button",{onClick:()=>w(k),disabled:!k.cv_path,className:"p-2 text-slate-500 hover:text-navy hover:bg-slate-100 rounded-lg disabled:opacity-30 disabled:cursor-not-allowed",title:"Download CV",children:c.jsx(fn,{className:"w-4 h-4"})}),c.jsx("button",{onClick:()=>O(k),className:"p-2 text-slate-500 hover:text-red-600 hover:bg-red-50 rounded-lg",title:"Delete",children:c.jsx(Ur,{className:"w-4 h-4"})})]})})]},k.id)})})]})})]}),v&&c.jsx($M,{app:v,onClose:()=>b(null),onDownloadCV:w,onUpdateStatus:j,onDelete:O}),g&&c.jsx(fy,{title:"Export Applications",onClose:()=>y(!1),onExport:S})]})}function $M({app:e,onClose:t,onDownloadCV:r,onUpdateStatus:n,onDelete:i}){var p,m;const[a,o]=E.useState([]),[s,l]=E.useState(!0),[u,f]=E.useState(null);E.useEffect(()=>{let v=!1;return l(!0),Q.from("application_answers").select("*").eq("application_id",e.id).order("created_at").then(({data:b,error:g})=>{v||(g||o(b||[]),l(!1))}),()=>{v=!0}},[e.id]);async function d(v,b){if(!v)return;const{data:g,error:y}=await Q.storage.from("cvs").createSignedUrl(v,300);if(y||!(g!=null&&g.signedUrl)){alert("Could not load file: "+((y==null?void 0:y.message)||"unknown error"));return}const x=v.toLowerCase(),S=x.endsWith(".pdf"),_=/\.(png|jpe?g|gif|webp)$/i.test(x),w=b||v.split("/").pop();f({url:g.signedUrl,filename:w,isPDF:S,isImage:_,path:v})}async function h(v,b){const{data:g,error:y}=await Q.storage.from("cvs").createSignedUrl(v,60,{download:b||!0});if(y||!(g!=null&&g.signedUrl)){alert("Could not download: "+((y==null?void 0:y.message)||"unknown error"));return}window.open(g.signedUrl,"_blank","noopener,noreferrer")}return c.jsxs("div",{className:"fixed inset-0 z-50 flex",children:[c.jsx("div",{className:"absolute inset-0 bg-slate-900/40",onClick:t}),c.jsxs("div",{className:"ml-auto w-full max-w-2xl bg-white h-full overflow-y-auto relative shadow-2xl animate-[slideIn_0.2s_ease-out]",children:[c.jsx("style",{children:"@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }"}),c.jsxs("div",{className:"sticky top-0 bg-white border-b border-slate-200 px-6 py-4 flex items-center justify-between z-10",children:[c.jsx("h2",{className:"font-display text-xl font-bold text-navy",children:"Application"}),c.jsx("button",{onClick:t,className:"p-2 hover:bg-slate-100 rounded-lg",children:c.jsx(xn,{className:"w-5 h-5"})})]}),c.jsxs("div",{className:"p-6 space-y-6",children:[c.jsxs("div",{children:[c.jsx("div",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wider mb-1",children:"Applicant"}),c.jsx("div",{className:"text-xl font-bold text-slate-900",children:e.full_name}),c.jsxs("div",{className:"mt-3 space-y-2 text-sm",children:[c.jsxs("a",{href:`mailto:${e.email}`,className:"inline-flex items-center gap-2 text-slate-700 hover:text-navy",children:[c.jsx(uy,{className:"w-4 h-4 text-slate-400"})," ",e.email]}),c.jsxs("div",{className:"inline-flex items-center gap-2 text-slate-700 ml-0 sm:ml-4",children:[c.jsx(fO,{className:"w-4 h-4 text-slate-400"})," ",e.phone]}
408)]})]}),c.jsxs("div",{children:[c.jsx("div",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wider mb-1",children:"Applied for"}),c.jsx("div",{className:"font-medium text-slate-900",children:((p=e.jobs)==null?void 0:p.title)||c.jsx("span",{className:"italic text-slate-400",children:"deleted job"})}),((m=e.jobs)==null?void 0:m.slug)&&c.jsxs(ve,{to:`/jobs/${e.jobs.slug}`,target:"_blank",className:"text-xs text-navy hover:underline inline-flex items-center gap-1 mt-1",children:["View job posting ",c.jsx(hl,{className:"w-3 h-3"})]}),c.jsxs("div",{className:"text-xs text-slate-500 mt-1",children:["Submitted ",zi(e.created_at)]})]}),c.jsxs("div",{children:[c.jsx("div",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wider mb-2",children:"Status"}),c.jsx("div",{className:"flex gap-2 flex-wrap",children:_O.map(v=>c.jsx("button",{onClick:()=>n(e,v),className:`text-xs font-semibold px-3 py-1.5 rounded-full transition-colors ${e.status===v?SO[v]+" ring-2 ring-offset-1 ring-current":"bg-slate-100 text-slate-500 hover:bg-slate-200"}`,children:Nm[v]},v))})]}),e.cover_letter&&c.jsxs("div",{children:[c.jsx("div",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wider mb-2",children:"Cover letter"}),c.jsx("div",{className:"bg-slate-50 rounded-xl p-4 text-sm text-slate-700 whitespace-pre-line leading-relaxed",children:e.cover_letter})]}),c.jsxs("div",{children:[c.jsx("div",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wider mb-2",children:"CV"}),e.cv_path?c.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[c.jsxs("button",{onClick:()=>d(e.cv_path),className:"inline-flex items-center gap-2 bg-navy hover:bg-navy-dark text-white px-4 py-2 rounded-lg text-sm font-semibold",children:[c.jsx(Qa,{className:"w-4 h-4"})," View CV"]}),c.jsxs("button",{onClick:()=>h(e.cv_path),className:"inline-flex items-center gap-2 bg-white border border-slate-300 hover:bg-slate-50 text-slate-700 px-4 py-2 rounded-lg text-sm font-semibold",children:[c.jsx(fn,{className:"w-4 h-4"})," Download"]}),c.jsx("span",{className:"text-xs text-slate-500 ml-1 font-mono truncate max-w-[200px]",children:e.cv_path.split("/").pop()})]}):c.jsx("p",{className:"text-sm text-slate-500 italic",children:"No CV attached"})]}),c.jsxs("div",{children:[c.jsx("div",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wider mb-2",children:"Form Answers"}),s?c.jsx("div",{className:"text-sm text-slate-400",children:"Loading…"}):a.length===0?c.jsx("div",{className:"text-sm text-slate-400 italic",children:"No custom questions were attached to this job."}):c.jsx("div",{className:"space-y-3",children:a.map(v=>c.jsx(IM,{answer:v,onPreview:d,onDownload:h},v.id))})]}),c.jsx("div",{className:"border-t border-slate-200 pt-4",children:c.jsxs("button",{onClick:()=>i(e),className:"text-sm text-red-600 hover:bg-red-50 inline-flex items-center gap-1.5 px-3 py-2 rounded-lg",children:[c.jsx(Ur,{className:"w-4 h-4"})," Delete application"]})})]})]}),u&&c.jsx(RM,{file:u,onClose:()=>f(null),onDownload:()=>h(u.path,u.filename)})]})}function IM({answer:e,onPreview:t,onDownload:r}){const n=e.question_type==="file_upload";return c.jsxs("div",{className:"bg-slate-50 border border-slate-200 rounded-xl p-4",children:[c.jsx("div",{className:"text-sm font-semibold text-slate-700 mb-1.5",children:e.question_label}),n?e.answer?c.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[c.jsx(cO,{className:"w-4 h-4 text-slate-400"}),c.jsx("span",{className:"text-xs font-mono text-slate-600 truncate max-w-[200px]",children:e.answer.split("/").pop()}),c.jsxs("button",{onClick:()=>t(e.answer),className:"ml-auto inline-flex items-center gap-1 bg-navy hover:bg-navy-dark text-white px-3 py-1.5 rounded-md text-xs font-semibold",children:[c.jsx(Qa,{className:"w-3.5 h-3.5"})," View"]}),c.jsxs("button",{onClick:()=>r(e.answer),className:"inline-flex items-center gap-1 bg-white border border-slate-300 hover:bg-slate-100 text-slate-700 px-3 py-1.5 rounded-md text-xs font-semibold",children:[c.jsx(fn,{className:"w-3.5 h-3.5"})," Download"]})]}):c.jsx("span",{className:"text-sm text-slate-400 italic",children:"No file uploaded"}):c.jsx("div",{className:"text-sm text-slate-800 whitespace-pre-line leading-relaxed",children:e.answer||c.jsx("span",{className:"text-slate-400 italic",children:"No answer"})})]})}function RM({file:e,onClose:t,onDownload:r}){const n=e.isPDF||e.isImage;return c.jsxs("div",{className:"fixed inset-0 z-[60] flex items-center justify-center p-4",children:[c.jsx("div",{className:"absolute inset-0 bg-slate-900/70",onClick:t}),c.jsxs("div",{className:"relative bg-white rounded-2xl shadow-2xl w-full max-w-5xl h-[90vh] flex flex-col overflow-hidden",children:[c.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-slate-200",children:[c.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[c.jsx(Za,{className:"w-5 h-5 text-slate-500 shrink-0"}),c.jsx("span",{className:"font-medium text-slate-900 truncate",children:e.filename})]}),c.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[c.jsxs("button",{onClick:r,className:"inline-flex items-center gap-1.5 bg-navy hover:bg-navy-dark text-white px-3 py-1.5 rounded-md text-sm font-semibold",children:[c.jsx(fn,{className:"w-4 h-4"})," Download"]}),c.jsx("button",{onClick:t,className:"p-2 hover:bg-slate-100 rounded-lg",children:c.jsx(xn,{className:"w-5 h-5"})})]})]}),c.jsx("div",{className:"flex-1 bg-slate-100 overflow-hidden",children:n?e.isPDF?c.jsx("iframe",{src:e.url,className:"w-full h-full",title:e.filename}):c.jsx("div",{className:"w-full h-full flex items-center justify-center p-4",children:c.jsx("img",{src:e.url,alt:e.filename,className:"max-w-full max-h-full object-contain"})}):c.jsxs("div",{className:"w-full h-full flex flex-col items-center justify-center text-center p-8",children:[c.jsx(Za,{className:"w-16 h-16 text-slate-300 mb-4"}),c.jsx("h3",{className:"font-semibold text-slate-700 mb-1",children:"Inline preview not available"}),c.jsx("p",{className:"text-sm text-slate-500 mb-4 max-w-md",children:"This file type can't be previewed in the browser. Word documents and other formats need to be downloaded first."}),c.jsxs("button",{onClick:r,className:"inline-flex items-center gap-2 bg-navy hover:bg-navy-dark text-white px-5 py-2.5 rounded-lg text-sm font-semibold",children:[c.jsx(fn,{className:"w-4 h-4"})," Download to view"]})]})})]})]})}function MM({session:e}){const[t,r]=E.useState([]),[n,i]=E.useState(!0),[a,o]=E.useState(""),[s,l]=E.useState(!1);async function u(){i(!0),o("");const{data:d,error:h}=await Tm("list",{});h?o(h):r((d==null?void 0:d.users)||[]),i(!1)}E.useEffect(()=>{u()},[]);async function f(d){var p;if(d.id===((p=e==null?void 0:e.user)==null?void 0:p.id)){alert("You cannot delete your own account.");return}if(d.is_protected){alert("This account is protected and cannot be deleted.");return}if(!confirm(`Delete admin "${d.email}"? They will lose access immediately.`))return;const{error:h}=await Tm("delete",{user_id:d.id});if(h){alert("Delete failed: "+h);return}await u()}return c.jsxs("div",{className:"min-h-screen bg-slate-50",children:[c.jsx(nu,{session:e,active:"users"}),c.jsxs("main",{className:"max-w-6xl mx-auto px-6 py-10",children:[c.jsxs(ve,{to:"/admin",className:"text-sm text-slate-500 hover:text-navy inline-flex items-center gap-1 mb-4",children:[c.jsx(Xa,{className:"w-4 h-4"})," Back to dashboard"]}),c.jsxs("div",{className:"flex items-center justify-between mb-8 flex-wrap gap-4",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"font-display text-3xl font-bold text-navy",children:"Admins"}),c.jsxs("p",{className:"text-slate-600 mt-1 text-sm",children:[t.length," ",t.length===1?"admin":"admins"," can access this dashboard"]})]}),c.jsxs("button",{onClick:()=>l(!0),className:"bg-navy hover:bg-navy-dark text-white px-5 py-2.5 rounded-lg text-sm font-semibold inline-flex items-center gap-2",children:[c.jsx(eo,{className:"w-4 h-4"})," Add Admin"]})]}),a&&c.jsxs("div",{className:"bg-red-50 border border-red-200 text-red-700 rounded-lg p-4 mb-6 flex items-start gap-3",children:[c.jsx(No,{className:"w-5 h-5 mt-0.5 shrink-0"}),c.jsxs("div",{children:[c.jsx("div",{className:"font-semibold",children:"Could not load admins"}),c.jsx("div",{className:"text-sm mt-1",children:a}),c.jsxs("div",{className:"text-xs mt-2 text-red-600/80",children:["Make sure the ",c.jsx("code",{className:"bg-red-100 px-1 rounded",children:"manage-admins"})," Edge Function is deployed and its secrets are set. See README."]})]})]}),n?c.jsx("div",{className:"text-center text-slate-500 py-20",children:"Loading…"}):t.length===0&&!a?c.jsxs("div",{className:"bg-white rounded-2xl border border-slate-200 p-12 text-center",children:[c.jsx(qc,{className:"w-12 h-12 text-slate-300 mx-auto mb-4"}),c.jsx("h3",{className:"text-lg font-semibold text-slate-700 mb-1",children:"No admins yet"}),c.jsx("p",{className:"text-sm text-slate-500",children:"That's strange — you should at least see yourself here."})]}):!a&&c.jsx("div",{className:"bg-white rounded-2xl border border-slate-200 overflow-hidden",children:c.jsxs("table",{className:"w-full",children:[c.jsx("thead",{className:"bg-slate-50 border-b border-slate-200",children:c.jsxs("tr",{children:[c.jsx("th",{className:"text-left text-xs font-semibold text-slate-600 uppercase tracking-wider px-6 py-3",children:"Email"}),c.jsx("th",{className:"text-left text-xs font-semibold text-slate-600 uppercase tracking-wider px-6 py-3 hidden md:table-cell",children:"Added"}),c.jsx("th",{className:"text-left text-xs font-semibold text-slate-600 uppercase tracking-wider px-6 py-3 hidden lg:table-cell",children:"Last sign in"}),c.jsx("th",{className:"text-right text-xs font-semibold text-slate-600 uppercase tracking-wider px-6 py-3",children:"Actions"})]})}),c.jsx("tbody",{className:"divide-y divide-slate-100",children:t.map(d=>{var v;const h=d.id===((v=e==null?void 0:e.user)==null?void 0:v.id),p=d.is_protected,m=h||p;return c.jsxs("tr",{className:"hover:bg-slate-50",children:[c.jsx("td",{className:"px-6 py-4",children:c.jsxs("div",{className:"font-medium text-slate-900 flex items-center gap-2 flex-wrap",children:[d.email,h&&c.jsx("span",{className:"text-xs bg-blue-50 text-blue-700 px-2 py-0.5 rounded-full font-semibold",children:"You"}),p&&c.jsxs("span",{className:"text-xs bg-amber-50 text-amber-700 px-2 py-0.5 rounded-full font-semibold inline-flex items-center gap-1",children:[c.jsx(RR,{className:"w-3 h-3"})," Protected"]})]})}),c.jsx("td",{className:"px-6 py-4 text-sm text-slate-600 hidden md:table-cell",children:zi(d.created_at)}),c.jsx("td",{className:"px-6 py-4 text-sm text-slate-600 hidden lg:table-cell",children:d.last_sign_in_at?zi(d.last_sign_in_at):c.jsx("span",{className:"text-slate-400 italic",children:"never"})}),c.jsx("td",{className:"px-6 py-4 text-right",children:c.jsx("button",{onClick:()=>f(d),disabled:m,className:"p-2 text-slate-500 hover:text-red-600 hover:bg-red-50 rounded-lg disabled:opacity-30 disabled:cursor-not-allowed disabled:hover:text-slate-500 disabled:hover:bg-transparent",title:h?"You can't delete yourself":p?"This account is protected":"Remove admin",children:c.jsx(Ur,{className:"w-4 h-4"})})})]},d.id)})})]})})]}),s&&c.jsx(DM,{onClose:()=>l(!1),onCreated:async()=>
408{l(!1),await u()}})]})}function DM({onClose:e,onCreated:t}){const[r,n]=E.useState(""),[i,a]=E.useState(""),[o,s]=E.useState(!1),[l,u]=E.useState(!1),[f,d]=E.useState("");async function h(p){if(p.preventDefault(),d(""),!r.trim()){d("Email is required.");return}if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r)){d("Enter a valid email address.");return}if(i.length<8){d("Password must be at least 8 characters.");return}u(!0);const{error:m}=await Tm("create",{email:r.trim(),password:i});if(u(!1),m){d(m);return}await t()}return c.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center px-4",children:[c.jsx("div",{className:"absolute inset-0 bg-slate-900/40",onClick:e}),c.jsxs("div",{className:"relative bg-white rounded-2xl shadow-2xl w-full max-w-md",children:[c.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-slate-200",children:[c.jsx("h2",{className:"font-display text-xl font-bold text-navy",children:"Add Admin"}),c.jsx("button",{onClick:e,className:"p-1 hover:bg-slate-100 rounded-lg",children:c.jsx(xn,{className:"w-5 h-5"})})]}),c.jsxs("form",{onSubmit:h,className:"p-6 space-y-4",children:[c.jsxs("label",{className:"block",children:[c.jsx("span",{className:"text-sm font-medium text-slate-700 mb-1.5 block",children:"Email"}),c.jsx("input",{type:"email",value:r,onChange:p=>n(p.target.value),required:!0,autoFocus:!0,className:"w-full px-3 py-2.5 rounded-lg border border-slate-300 focus:border-navy focus:ring-2 focus:ring-navy/10 outline-none text-sm",placeholder:"[email protected]"})]}),c.jsxs("label",{className:"block",children:[c.jsxs("span",{className:"text-sm font-medium text-slate-700 mb-1.5 block",children:["Password ",c.jsx("span",{className:"text-xs text-slate-500 font-normal",children:"(min 8 characters)"})]}),c.jsxs("div",{className:"relative",children:[c.jsx("input",{type:o?"text":"password",value:i,onChange:p=>a(p.target.value),required:!0,minLength:8,className:"w-full pl-3 pr-10 py-2.5 rounded-lg border border-slate-300 focus:border-navy focus:ring-2 focus:ring-navy/10 outline-none text-sm",placeholder:"••••••••"}),c.jsx("button",{type:"button",onClick:()=>s(p=>!p),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1.5 text-slate-400 hover:text-slate-700",tabIndex:-1,children:o?c.jsx(Em,{className:"w-4 h-4"}):c.jsx(Qa,{className:"w-4 h-4"})})]}),c.jsx("p",{className:"text-xs text-slate-500 mt-2",children:'The new admin will be able to sign in immediately with this password. They can change it later by signing out and using "forgot password" (once email is configured).'})]}),f&&c.jsxs("div",{className:"bg-red-50 border border-red-200 text-red-700 text-sm rounded-lg p-3 flex items-start gap-2",children:[c.jsx(No,{className:"w-4 h-4 mt-0.5 shrink-0"}),c.jsx("span",{children:f})]}),c.jsxs("div",{className:"flex items-center gap-3 pt-2",children:[c.jsx("button",{type:"submit",disabled:l,className:"bg-navy hover:bg-navy-dark disabled:opacity-50 text-white px-5 py-2.5 rounded-lg text-sm font-semibold flex-1 inline-flex items-center justify-center gap-2",children:l?"Creating…":c.jsxs(c.Fragment,{children:[c.jsx(sy,{className:"w-4 h-4"})," Create Admin"]})}),c.jsx("button",{type:"button",onClick:e,className:"text-slate-600 hover:text-slate-900 px-4 py-2.5 text-sm font-semibold",children:"Cancel"})]})]})]})]})}async function Tm(e,t){var r;try{const{data:n,error:i}=await Q.functions.invoke("manage-admins",{body:{action:e,...t}});return i?{error:(r=i.context)!=null&&r.body?await(async()=>{try{const o=typeof i.context.body=="string"?i.context.body:await new Response(i.context.body).text(),s=JSON.parse(o);return(s==null?void 0:s.error)||i.message}catch{return i.message}})():i.message}:n!=null&&n.error?{error:n.error}:{data:n}}catch(n){return{error:(n==null?void 0:n.message)||"Network error"}}}const jO=["#0a1f4d","#2563eb","#7c3aed","#db2777","#059669","#ea580c","#0891b2","#dc2626","#65a30d","#475569"];function LM({session:e}){const[t,r]=E.useState([]),[n,i]=E.useState(!0),[a,o]=E.useState(""),[s,l]=E.useState(!1),[u,f]=E.useState(null);async function d(){i(!0);const{data:m,error:v}=await Q.from("categories").select("*, job_categories(count)").order("name");v?o(v.message):r(m||[]),i(!1)}E.useEffect(()=>{d()},[]);async function h(){await Q.auth.signOut()}async function p(m){var y,x;const v=((x=(y=m.job_categories)==null?void 0:y[0])==null?void 0:x.count)||0,b=v>0?`Delete "${m.name}"? It's currently used by ${v} job${v===1?"":"s"}. Jobs will be untagged but not deleted.`:`Delete "${m.name}"?`;if(!confirm(b))return;const{error:g}=await Q.from("categories").delete().eq("id",m.id);if(g){alert("Delete failed: "+g.message);return}await d()}return c.jsxs("div",{className:"min-h-screen bg-slate-50",children:[c.jsx(FM,{session:e,active:"categories",onSignOut:h}),c.jsxs("main",{className:"max-w-6xl mx-auto px-6 py-10",children:[c.jsxs(ve,{to:"/admin",className:"text-sm text-slate-500 hover:text-navy inline-flex items-center gap-1 mb-4",children:[c.jsx(Xa,{className:"w-4 h-4"})," Back to dashboard"]}),c.jsxs("div",{className:"flex items-center justify-between mb-8 flex-wrap gap-4",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"font-display text-3xl font-bold text-navy",children:"Categories"}),c.jsx("p",{className:"text-slate-600 mt-1 text-sm",children:"Tag jobs to help visitors filter and search."})]}),c.jsxs("button",{onClick:()=>l(!0),className:"bg-navy hover:bg-navy-dark text-white px-5 py-2.5 rounded-lg text-sm font-semibold inline-flex items-center gap-2",children:[c.jsx(eo,{className:"w-4 h-4"})," New Category"]})]}),a&&c.jsxs("div",{className:"bg-red-50 border border-red-200 text-red-700 rounded-lg p-4 mb-6 flex items-start gap-3",children:[c.jsx(No,{className:"w-5 h-5 mt-0.5 shrink-0"}),c.jsx("span",{children:a})]}),n?c.jsx("div",{className:"text-center text-slate-500 py-20",children:"Loading…"}):t.length===0?c.jsxs("div",{className:"bg-white rounded-2xl border border-slate-200 p-12 text-center",children:[c.jsx(hO,{className:"w-12 h-12 text-slate-300 mx-auto mb-4"}),c.jsx("h3",{className:"text-lg font-semibold text-slate-700 mb-1",children:"No categories yet"}),c.jsx("p",{className:"text-sm text-slate-500 mb-6",children:"Create your first category to start tagging jobs."})]}):c.jsx("div",{className:"bg-white rounded-2xl border border-slate-200 overflow-hidden",children:c.jsxs("table",{className:"w-full",children:[c.jsx("thead",{className:"bg-slate-50 border-b border-slate-200",children:c.jsxs("tr",{children:[c.jsx("th",{className:"text-left text-xs font-semibold text-slate-600 uppercase tracking-wider px-6 py-3",children:"Name"}),c.jsx("th",{className:"text-left text-xs font-semibold text-slate-600 uppercase tracking-wider px-6 py-3 hidden md:table-cell",children:"Slug"}),c.jsx("th",{className:"text-left text-xs font-semibold text-slate-600 uppercase tracking-wider px-6 py-3",children:"Jobs"}),c.jsx("th",{className:"text-right text-xs font-semibold text-slate-600 uppercase tracking-wider px-6 py-3",children:"Actions"})]})}),c.jsx("tbody",{className:"divide-y divide-slate-100",children:t.map(m=>{var v,b;return u===m.id?c.jsx(BM,{cat:m,onCancel:()=>f(null),onSaved:async()=>{f(null),await d()}},m.id):c.jsxs("tr",{className:"hover:bg-slate-50",children:[c.jsx("td",{className:"px-6 py-4",children:c.jsxs("span",{className:"inline-flex items-center gap-2 font-medium",style:{color:m.color},children:[c.jsx("span",{className:"w-3 h-3 rounded-full",style:{background:m.color}}),m.name]})}),c.jsx("td",{className:"px-6 py-4 text-sm text-slate-600 hidden md:table-cell font-mono",children:m.slug}),c.jsx("td",{className:"px-6 py-4 text-sm text-slate-600",children:((b=(v=m.job_categories)==null?void 0:v[0])==null?void 0:b.count)||0}),c.jsx("td",{className:"px-6 py-4 text-right",children:c.jsxs("div",{className:"inline-flex items-center gap-1",children:[c.jsx("button",{onClick:()=>f(m.id),className:"p-2 text-slate-500 hover:text-navy hover:bg-slate-100 rounded-lg",title:"Edit",children:c.jsx(dO,{className:"w-4 h-4"})}),c.jsx("button",{onClick:()=>p(m),className:"p-2 text-slate-500 hover:text-red-600 hover:bg-red-50 rounded-lg",title:"Delete",children:c.jsx(Ur,{className:"w-4 h-4"})})]})})]},m.id)})})]})})]}),s&&c.jsx(UM,{onClose:()=>l(!1),onCreated:async()=>
408{l(!1),await d()}})]})}function BM({cat:e,onCancel:t,onSaved:r}){const[n,i]=E.useState(e.name),[a,o]=E.useState(e.color),[s,l]=E.useState(!1);async function u(){l(!0);const{error:f}=await Q.from("categories").update({name:n.trim(),slug:pl(n),color:a}).eq("id",e.id);if(l(!1),f){alert("Save failed: "+f.message);return}await r()}return c.jsxs("tr",{className:"bg-blue-50/40",children:[c.jsx("td",{className:"px-6 py-3",children:c.jsx("input",{type:"text",value:n,onChange:f=>i(f.target.value),className:"w-full px-3 py-1.5 rounded-lg border border-slate-300 focus:border-navy outline-none text-sm"})}),c.jsx("td",{className:"px-6 py-3 text-sm font-mono text-slate-500 hidden md:table-cell",children:pl(n)||"—"}),c.jsx("td",{className:"px-6 py-3",children:c.jsx(kO,{value:a,onChange:o})}),c.jsx("td",{className:"px-6 py-3 text-right",children:c.jsxs("div",{className:"inline-flex items-center gap-1",children:[c.jsx("button",{onClick:u,disabled:s||!n.trim(),className:"p-2 text-emerald-600 hover:bg-emerald-50 rounded-lg disabled:opacity-40",title:"Save",children:c.jsx(PR,{className:"w-4 h-4"})}),c.jsx("button",{onClick:t,className:"p-2 text-slate-500 hover:bg-slate-100 rounded-lg",title:"Cancel",children:c.jsx(xn,{className:"w-4 h-4"})})]})})]})}function UM({onClose:e,onCreated:t}){const[r,n]=E.useState(""),[i,a]=E.useState(jO[0]),[o,s]=E.useState(!1),[l,u]=E.useState("");async function f(d){if(d.preventDefault(),u(""),!r.trim()){u("Name is required");return}s(!0);const{error:h}=await Q.from("categories").insert([{name:r.trim(),slug:pl(r),color:i}]);if(s(!1),h){u(h.message.includes("duplicate")?"A category with this name already exists.":h.message);return}await t()}return c.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center px-4",children:[c.jsx("div",{className:"absolute inset-0 bg-slate-900/40",onClick:e}),c.jsxs("div",{className:"relative bg-white rounded-2xl shadow-2xl w-full max-w-md",children:[c.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-slate-200",children:[c.jsx("h2",{className:"font-display text-xl font-bold text-navy",children:"New Category"}),c.jsx("button",{onClick:e,className:"p-1 hover:bg-slate-100 rounded-lg",children:c.jsx(xn,{className:"w-5 h-5"})})]}),c.jsxs("form",{onSubmit:f,className:"p-6 space-y-4",children:[c.jsxs("label",{className:"block",children:[c.jsx("span",{className:"text-sm font-medium text-slate-700 mb-1.5 block",children:"Name"}),c.jsx("input",{type:"text",value:r,onChange:d=>n(d.target.value),required:!0,autoFocus:!0,placeholder:"e.g. Engineering",className:"w-full px-3 py-2.5 rounded-lg border border-slate-300 focus:border-navy focus:ring-2 focus:ring-navy/10 outline-none text-sm"}),c.jsxs("span",{className:"text-xs text-slate-500 mt-1 block",children:["Slug: ",c.jsx("span",{className:"font-mono",children:pl(r)||"—"})]})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-sm font-medium text-slate-700 mb-2 block",children:"Color"}),c.jsx(kO,{value:i,onChange:a})]}),l&&c.jsx("div",{className:"bg-red-50 border border-red-200 text-red-700 text-sm rounded-lg p-3",children:l}),c.jsxs("div",{className:"flex items-center gap-3 pt-2",children:[c.jsx("button",{type:"submit",disabled:o,className:"bg-navy hover:bg-navy-dark disabled:opacity-50 text-white px-5 py-2.5 rounded-lg text-sm font-semibold flex-1",children:o?"Creating…":"Create Category"}),c.jsx("button",{type:"button",onClick:e,className:"text-slate-600 hover:text-slate-900 px-4 py-2.5 text-sm font-semibold",children:"Cancel"})]})]})]})]})}function kO({value:e,onChange:t}){return c.jsx("div",{className:"flex flex-wrap gap-2",children:jO.map(r=>c.jsx("button",{type:"button",onClick:()=>t(r),className:`w-7 h-7 rounded-full transition-transform ${e===r?"ring-2 ring-offset-2 ring-slate-900 scale-110":"hover:scale-110"}`,style:{background:r},"aria-label":`Color ${r}`},r))})}function FM({session:e,active:t,onSignOut:r}){var i;const n=(a,o,s)=>c.jsx(ve,{to:o,className:`${t===a?"text-navy":"text-slate-600 hover:text-navy"}`,children:s});return c.jsx("header",{className:"bg-white border-b border-slate-200 sticky top-0 z-40",children:c.jsxs("div",{className:"max-w-6xl mx-auto px-6 py-4 flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsx(ve,{to:"/",className:"flex items-center",children:c.jsx("img",{src:"/images/enugu-job-centre-logo.png",alt:"Enugu Job Centre",className:"h-9 w-auto"})}),c.jsx("span",{className:"text-xs font-semibold bg-navy text-white px-2 py-1 rounded",children:"ADMIN"})]}),c.jsxs("nav",{className:"hidden md:flex items-center gap-6 text-sm font-semibold",children:[n("jobs","/admin","Jobs"),n("applications","/admin/applications","Applications"),n("categories","/admin/categories","Categories"),n("analytics","/admin/analytics","Analytics"),n("users","/admin/users","Admins")]}),c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsx("span",{className:"text-sm text-slate-600 hidden sm:inline",children:(i=e==null?void 0:e.user)==null?void 0:i.email}),c.jsxs(ve,{to:"/",className:"text-sm text-slate-600 hover:text-navy font-medium inline-flex items-center gap-1",children:["View site ",c.jsx(hl,{className:"w-3.5 h-3.5"})]}),c.jsxs("button",{onClick:r,className:"text-sm text-slate-600 hover:text-red-600 font-medium inline-flex items-center gap-1",children:[c.jsx(uO,{className:"w-4 h-4"})," Sign out"]})]})]})})}function OO(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=OO(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function de(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=OO(e))&&(n&&(n+=" "),n+=t);return n}var zM=Array.isArray,$t=zM,WM=typeof pu=="object"&&pu&&pu.Object===Object&&pu,EO=WM,HM=EO,KM=typeof self=="object"&&self&&self.Object===Object&&self,qM=HM||KM||Function("return this")(),zr=qM,GM=zr,VM=GM.Symbol,iu=VM,Ax=iu,AO=Object.prototype,JM=AO.hasOwnProperty,YM=AO.toString,ns=Ax?Ax.toStringTag:void 0;function XM(e){var t=JM.call(e,ns),r=e[ns];try{e[ns]=void 0;var n=!0}catch{}var i=YM.call(e);return n&&(t?e[ns]=r:delete e[ns]),i}var QM=XM,ZM=Object.prototype,eD=ZM.toString;function tD(e){return eD.call(e)}var rD=tD,Px=iu,nD=QM,iD=rD,aD="[object Null]",oD="[object Undef
408ined]",Nx=Px?Px.toStringTag:void 0;function sD(e){return e==null?e===void 0?oD:aD:Nx&&Nx in Object(e)?nD(e):iD(e)}var wn=sD;function lD(e){return e!=null&&typeof e=="object"}var _n=lD,uD=wn,cD=_n,dD="[object Symbol]";function fD(e){return typeof e=="symbol"||cD(e)&&uD(e)==dD}var $o=fD,hD=$t,pD=$o,mD=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,gD=/^\w*$/;function vD(e,t){if(hD(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||pD(e)?!0:gD.test(e)||!mD.test(e)||t!=null&&e in Object(t)}var my=vD;function yD(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ni=yD;const Io=be(ni);var bD=wn,xD=ni,wD="[object AsyncFunction]",_D="[object Function]",SD="[object GeneratorFunction]",jD="[object Proxy]";function kD(e){if(!xD(e))return!1;var t=bD(e);return t==_D||t==SD||t==wD||t==jD}var gy=kD;const ie=be(gy);var OD=zr,ED=OD["__core-js_shared__"],AD=ED,Fh=AD,Tx=function(){var e=/[^.]+$/.exec(Fh&&Fh.keys&&Fh.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function PD(e){return!!Tx&&Tx in e}var ND=PD,TD=Function.prototype,CD=TD.toString;function $D(e){if(e!=null){try{return CD.call(e)}catch{}try{return e+""}catch{}}return""}var PO=$D,ID=gy,RD=ND,MD=ni,DD=PO,LD=/[\\^$.*+?()[\]{}|]/g,BD=/^\[object .+?Constructor\]$/,UD=Function.prototype,FD=Object.prototype,zD=UD.toString,WD=FD.hasOwnProperty,HD=RegExp("^"+zD.call(WD).replace(LD,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function KD(e){if(!MD(e)||RD(e))return!1;var t=ID(e)?HD:BD;return t.test(DD(e))}var qD=KD;function GD(e,t){return e==null?void 0:e[t]}var VD=GD,JD=qD,YD=VD;function XD(e,t){var r=YD(e,t);return JD(r)?r:void 0}var Yi=XD,QD=Yi,ZD=QD(Object,"create"),yf=ZD,Cx=yf;function eL(){this.__data__=Cx?Cx(null):{},this.size=0}var tL=eL;function rL(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var nL=rL,iL=yf,aL="__lodash_hash_undefined__",oL=Object.prototype,sL=oL.hasOwnProperty;function lL(e){var t=this.__data__;if(iL){var r=t[e];return r===aL?void 0:r}return sL.call(t,e)?t[e]:void 0}var uL=lL,cL=yf,dL=Object.prototype,fL=dL.hasOwnProperty;function hL(e){var t=this.__data__;return cL?t[e]!==void 0:fL.call(t,e)}var pL=hL,mL=yf,gL="__lodash_hash_undefined__";function vL(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=mL&&t===void 0?gL:t,this}var yL=vL,bL=tL,xL=nL,wL=uL,_L=pL,SL=yL;function Ro(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ro.prototype.clear=bL;Ro.prototype.delete=xL;Ro.prototype.get=wL;Ro.prototype.has=_L;Ro.prototype.set=SL;var jL=Ro;function kL(){this.__data__=[],this.size=0}var OL=kL;function EL(e,t){return e===t||e!==e&&t!==t}var vy=EL,AL=vy;function PL(e,t){for(var r=e.length;r--;)if(AL(e[r][0],t))return r;return-1}var bf=PL,NL=bf,TL=Array.prototype,CL=TL.splice;function $L(e){var t=this.__data__,r=NL(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():CL.call(t,r,1),--this.size,!0}var IL=$L,RL=bf;function ML(e){var t=this.__data__,r=RL(t,e);return r<0?void 0:t[r][1]}var DL=ML,LL=bf;function BL(e){return LL(this.__data__,e)>-1}var UL=BL,FL=bf;function zL(e,t){var r=this.__data__,n=FL(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var WL=zL,HL=OL,KL=IL,qL=DL,GL=UL,VL=WL;function Mo(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Mo.prototype.clear=HL;Mo.prototype.delete=KL;Mo.prototype.get=qL;Mo.prototype.has=GL;Mo.prototype.set=VL;var xf=Mo,JL=Yi,YL=zr,XL=JL(YL,"Map"),yy=XL,$x=jL,QL=xf,ZL=yy;function e4(){this.size=0,this.__data__={hash:new $x,map:new(ZL||QL),string:new $x}}var t4=e4;function r4(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var n4=r4,i4=n4;function a4(e,t){var r=e.__data__;return i4(t)?r[typeof t=="string"?"string":"hash"]:r.map}var wf=a4,o4=wf;function s4(e){var t=o4(this,e).delete(e);return this.size-=t?1:0,t}var l4=s4,u4=wf;function c4(e){return u4(this,e).get(e)}var d4=c4,f4=wf;function h4(e){return f4(this,e).has(e)}var p4=h4,m4=wf;function g4(e,t){var r=m4(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var v4=g4,y4=t4,b4=l4,x4=d4,w4=p4,_4=v4;function Do(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Do.prototype.clear=y4;Do.prototype.delete=b4;Do.prototype.get=x4;Do.prototype.has=w4;Do.prototype.set=_4;var by=Do,NO=by,S4="Expected a function";function xy(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(S4);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=e.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(xy.Cache||NO),r}xy.Cache=NO;var TO=xy;const j4=be(TO);var k4=TO,O4=500;function E4(e){var t=k4(e,function(n){return r.size===O4&&r.clear(),n}
vendor: 6,632 bytes, lines 408-416
408),r=t.cache;return t}var A4=E4,P4=A4,N4=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,T4=/\\(\\)?/g,C4=P4(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(N4,function(r,n,i,a){t.push(i?a.replace(T4,"$1"):n||r)}),t}),$4=C4;function I4(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var wy=I4,Ix=iu,R4=wy,M4=$t,D4=$o,Rx=Ix?Ix.prototype:void 0,Mx=Rx?Rx.toString:void 0;function CO(e){if(typeof e=="string")return e;if(M4(e))return R4(e,CO)+"";if(D4(e))return Mx?Mx.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var L4=CO,B4=L4;function U4(e){return e==null?"":B4(e)}var $O=U4,F4=$t,z4=my,W4=$4,H4=$O;function K4(e,t){return F4(e)?e:z4(e,t)?[e]:W4(H4(e))}var IO=K4,q4=$o;function G4(e){if(typeof e=="string"||q4(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var _f=G4,V4=IO,J4=_f;function Y4(e,t){t=V4(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[J4(t[r++])];return r&&r==n?e:void 0}var _y=Y4,X4=_y;function Q4(e,t,r){var n=e==null?void 0:X4(e,t);return n===void 0?r:n}var RO=Q4;const ir=be(RO);function Z4(e){return e==null}var e3=Z4;const ae=be(e3);var t3=wn,r3=$t,n3=_n,i3="[object String]";function a3(e){return typeof e=="string"||!r3(e)&&n3(e)&&t3(e)==i3}var o3=a3;const Wi=be(o3);var MO={exports:{}},me={};/**
409 * @license React
410 * react-is.production.min.js
411 *
412 * Copyright (c) Facebook, Inc. and its affiliates.
413 *
414 * This source code is licensed under the MIT license found in the
415 * LICENSE file in the root directory of this source tree.
416 */var Sy=Symbol.for("react.element"),jy=Symbol.for("react.portal"),Sf=Symbol.for("react.fragment"),jf=Symbol.for("react.strict_mode"),kf=Symbol.for("react.profiler"),Of=Symbol.for("react.provider"),Ef=Symbol.for("react.context"),s3=Symbol.for("react.server_context"),Af=Symbol.for("react.forward_ref"),Pf=Symbol.for("react.suspense"),Nf=Symbol.for("react.suspense_list"),Tf=Symbol.for("react.memo"),Cf=Symbol.for("react.lazy"),l3=Symbol.for("react.offscreen"),DO;DO=Symbol.for("react.module.reference");function ur(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Sy:switch(e=e.type,e){case Sf:case kf:case jf:case Pf:case Nf:return e;default:switch(e=e&&e.$$typeof,e){case s3:case Ef:case Af:case Cf:case Tf:case Of:return e;default:return t}}case jy:return t}}}me.ContextConsumer=Ef;me.ContextProvider=Of;me.Element=Sy;me.ForwardRef=Af;me.Fragment=Sf;me.Lazy=Cf;me.Memo=Tf;me.Portal=jy;me.Profiler=kf;me.StrictMode=jf;me.Suspense=Pf;me.SuspenseList=Nf;me.isAsyncMode=function(){return!1};me.isConcurrentMode=function(){return!1};me.isContextConsumer=function(e){return ur(e)===Ef};me.isContextProvider=function(e){return ur(e)===Of};me.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Sy};me.isForwardRef=function(e){return ur(e)===Af};me.isFragment=function(e){return ur(e)===Sf};me.isLazy=function(e){return ur(e)===Cf};me.isMemo=function(e){return ur(e)===Tf};me.isPortal=function(e){return ur(e)===jy};me.isProfiler=function(e){return ur(e)===kf};me.isStrictMode=function(e){return ur(e)===jf};me.isSuspense=function(e){return ur(e)===Pf};me.isSuspenseList=function(e){return ur(e)===Nf};me.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Sf||e===kf||e===jf||e===Pf||e===Nf||e===l3||typeof e=="object"&&e!==null&&(e.$$typeof===Cf||e.$$typeof===Tf||e.$$typeof===Of||e.$$typeof===Ef||e.$$typeof===Af||e.$$typeof===DO||e.getModuleId!==void 0)};me.typeOf=ur;MO.exports=me;var u3=MO.exports,c3=wn,d3=_n,f3="[object Number]";function h3(e){return typeof e=="number"||d3(e)&&c3(e)==f3}var LO=h3;const p3=be(LO);var m3=LO;function g3(e){return m3(e)&&e!=+e}var v3=g3;const au=be(v3);var Sr=function(t){return t===0?0:t>0?1:-1},ki=function(t){return Wi(t)&&t.indexOf("%")===t.length-1},K=function(t){return p3(t)&&!au(t)},y3=function(t){return ae(t)},Xe=function(t){return K(t)||Wi(t)},b3=0,ou=function(t){var r=++b3;return"".concat(t||"").concat(r)},Hi=function(t,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(!K(t)&&!Wi(t))return n;var a;if(ki(t)){var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return au(a)&&(a=n),i&&a>r&&(a=r),a},$n=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},x3=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},i=0;i<r;i++)if(!n[t[i]])n[t[i]]=!0;else return!0;return!1},xr=function(t,r){return K(t)&&K(r)?function(n){return t+n*(r-t)}:function(){return r}};function Gc(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):ir(n,t))===r})}var w3=function(t,r){return K(t)&&K(r)?t-r:Wi(t)&&Wi(r)?t.localeCompare(r):t instanceof Date&&r instanceof Date?t.getTime()-r.getTime():String(t).localeCompare(String(r))};function Fa(e,t){for(var r in e)if({}.hasOwnProperty.call(e,r)&&(!{}.hasOwnProperty.call(t,r)||e[r]!==t[r]))return!1;for(var n in t)if({}.hasOwnProperty.call(t,n)&&!{}.hasOwnProperty.call(e,n))return!1;return!0}function Cm(e){"@babel/helpers - typeof";return Cm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cm(e)}var _3=["viewBox","children"],S3=["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","colorRen
416dering","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"],Dx=["points","pathLength"],zh={svg:_3,polygon:Dx,polyline:Dx},ky=["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","onDrag
416Capture","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"],Vc=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(E.isValidElement(t)&&(n=t.props),!Io(n))return null;var i={};return Object.keys(n).forEach(function(a){ky.includes(a)&&(i[a]=r||function(o){return n[a](n,o)})}),i},j3=function(t,r,n){return function(i){return t(r,n,i),null}},Jc=function(t,r,n){if(!Io(t)||Cm(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(a){var o=t[a];ky.includes(a)&&typeof o=="function"&&(i||(i={}),i[a]=j3(o,r,n))}),i},k3=["children"],O3=["children"];function Lx(e,t){if(e==null)return{};var r=E3(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function E3(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function $m(e){"@babel/helpers - typeof";return $m=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$m(e)}var Bx={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"},nn=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},Ux=null,Wh=null,Oy=function e(t){if(t===Ux&&Array.isArray(Wh))return Wh;var r=[];return E.Children.forEach(t,function(n){ae(n)||(u3.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),Wh=r,Ux=t,r};function ar(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return nn(i)}):n=[nn(t)],Oy(e).forEach(function(i){var a=ir(i,"type.displayName")||ir(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}function Lt(e,t){var r=ar(e,t);return r&&r[0]}var Fx=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,i=r.height;return!(!K(n)||n<=0||!K(i)||i<=0)},A3=["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"],P3=function(t){return t&&t.type&&Wi(t.type)&&A3.indexOf(t.type)>=0},N3=function(t){return t&&$m(t)==="object"&&"clipDot"in t},T3=function(t,r,n,i){var a,o=(a=zh==null?void 0:zh[i])!==null&&a!==void 0?a:[];return r.startsWith("data-")||!ie(t)&&(i&&o.includes(r)||S3.includes(r))||n&&ky.includes(r)},se=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(E.isValidElement(t)&&(i=t.props),!Io(i))return null;var a={};
416return Object.keys(i).forEach(function(o){var s;T3((s=i)===null||s===void 0?void 0:s[o],o,r,n)&&(a[o]=i[o])}),a},Im=function e(t,r){if(t===r)return!0;var n=E.Children.count(t);if(n!==E.Children.count(r))return!1;if(n===0)return!0;if(n===1)return zx(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var i=0;i<n;i++){var a=t[i],o=r[i];if(Array.isArray(a)||Array.isArray(o)){if(!e(a,o))return!1}else if(!zx(a,o))return!1}return!0},zx=function(t,r){if(ae(t)&&ae(r))return!0;if(!ae(t)&&!ae(r)){var n=t.props||{},i=n.children,a=Lx(n,k3),o=r.props||{},s=o.children,l=Lx(o,O3);return i&&s?Fa(a,l)&&Im(i,s):!i&&!s?Fa(a,l):!1}return!1},Wx=function(t,r){var n=[],i={};return Oy(t).forEach(function(a,o){if(P3(a))n.push(a);else if(a){var s=nn(a.type),l=r[s]||{},u=l.handler,f=l.once;if(u&&(!f||!i[s])){var d=u(a,s,o);n.push(d),i[s]=!0}}}),n},C3=function(t){var r=t&&t.type;return r&&Bx[r]?Bx[r]:null},$3=function(t,r){return Oy(r).indexOf(t)},I3=["children","width","height","viewBox","className","style","title","desc"];function Rm(){return Rm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Rm.apply(this,arguments)}function R3(e,t){if(e==null)return{};var r=M3(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function M3(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Mm(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,a=e.className,o=e.style,s=e.title,l=e.desc,u=R3(e,I3),f=i||{width:r,height:n,x:0,y:0},d=de("recharts-surface",a);return T.createElement("svg",Rm({},se(u,!0,"svg"),{className:d,width:r,height:n,style:o,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),T.createElement("title",null,s),T.createElement("desc",null,l),t)}var D3=["children","className"];function Dm(){return Dm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Dm.apply(this,arguments)}function L3(e,t){if(e==null)return{};var r=B3(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function B3(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Be=T.forwardRef(function(e,t){var r=e.children,n=e.className,i=L3(e,D3),a=de("recharts-layer",n);return T.createElement("g",Dm({className:a},se(i,!0),{ref:t}),r)}),an=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a]};function U3(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(i);++n<i;)a[n]=e[n+t];return a}var F3=U3,z3=F3;function W3(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:z3(e,t,r)}var H3=W3,K3="\\ud800-\\udfff",q3="\\u0300-\\u036f",G3="\\ufe20-\\ufe2f",V3="\\u20d0-\\u20ff",J3=q3+G3+V3,Y3="\\ufe0e\\ufe0f",X3="\\u200d",Q3=RegExp("["+X3+K3+J3+Y3+"]");function Z3(e){return Q3.test(e)}var BO=Z3;function e5(e){return e.split("")}var t5=e5,UO="\\ud800-\\udfff",r5="\\u0300-\\u036f",n5="\\ufe20-\\ufe2f",i5="\\u20d0-\\u20ff",a5=r5+n5+i5,o5="\\ufe0e\\ufe0f",s5="["+UO+"]",Lm="["+a5+"]",Bm="\\ud83c[\\udffb-\\udfff]",l5="(?:"+Lm+"|"+Bm+")",FO="[^"+UO+"]",zO="(?:\\ud83c[\\udde6-\\uddff]){2}",WO="[\\ud800-\\udbff][\\udc00-\\udfff]",u5="\\u200d",HO=l5+"?",KO="["+o5+"]?",c5="(?:"+u5+"(?:"+[FO,zO,WO].join("|")+")"+KO+HO+")*",d5=KO+HO+c5,f5="(?:"+[FO+Lm+"?",Lm,zO,WO,s5].join("|")+")",h5=RegExp(Bm+"(?="+Bm+")|"+f5+d5,"g");function p5(e){return e.match(h5)||[]}var m5=p5,g5=t5,v5=BO,y5=m5;function b5(e){return v5(e)?y5(e):g5(e)}var x5=b5,w5=H3,_5=BO,S5=x5,j5=$O;function k5(e){return function(t){t=j5(t);var r=_5(t)?S5(t):void 0,n=r?r[0]:t.charAt(0),i=r?w5(r,1).join(""):t.slice(1);return n[e]()+i}}var O5=k5,E5=O5,A5=E5("toUpperCase"),P5=A5;const $f=be(P5);function we(e){return function(){return e}}const qO=Math.cos,Yc=Math.sin,Er=Math.sqrt,Xc=Math.PI,If=2*Xc,Um=Math.PI,Fm=2*Um,vi=1e-6,N5=Fm-vi;function GO(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function T5(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return GO;const r=10**t;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 C5{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?GO:T5(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,a,o){this._append`C${+t},${+r},${+n}
416,${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,n,i,a){if(t=+t,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,s=this._y1,l=n-t,u=i-r,f=o-t,d=s-r,h=f*f+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(h>vi)if(!(Math.abs(d*l-u*f)>vi)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-o,m=i-s,v=l*l+u*u,b=p*p+m*m,g=Math.sqrt(v),y=Math.sqrt(h),x=a*Math.tan((Um-Math.acos((v+h-b)/(2*g*y)))/2),S=x/y,_=x/g;Math.abs(S-1)>vi&&this._append`L${t+S*f},${r+S*d}`,this._append`A${a},${a},0,0,${+(d*p>f*m)},${this._x1=t+_*l},${this._y1=r+_*u}`}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(i),l=n*Math.sin(i),u=t+s,f=r+l,d=1^o,h=o?i-a:a-i;this._x1===null?this._append`M${u},${f}`:(Math.abs(this._x1-u)>vi||Math.abs(this._y1-f)>vi)&&this._append`L${u},${f}`,n&&(h<0&&(h=h%Fm+Fm),h>N5?this._append`A${n},${n},0,1,${d},${t-s},${r-l}A${n},${n},0,1,${d},${this._x1=u},${this._y1=f}`:h>vi&&this._append`A${n},${n},0,${+(h>=Um)},${d},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function Ey(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new C5(t)}function Ay(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function VO(e){this._context=e}VO.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Rf(e){return new VO(e)}function JO(e){return e[0]}function YO(e){return e[1]}function XO(e,t){var r=we(!0),n=null,i=Rf,a=null,o=Ey(s);e=typeof e=="function"?e:e===void 0?JO:we(e),t=typeof t=="function"?t:t===void 0?YO:we(t);function s(l){var u,f=(l=Ay(l)).length,d,h=!1,p;for(n==null&&(a=i(p=o())),u=0;u<=f;++u)!(u<f&&r(d=l[u],u,l))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+e(d,u,l),+t(d,u,l));if(p)return a=null,p+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:we(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:we(+l),s):t},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:we(!!l),s):r},s.curve=function(l){return arguments.length?(i=l,n!=null&&(a=i(n)),s):i},s.context=function(l){return arguments.length?(l==null?n=a=null:a=i(n=l),s):n},s}function Fu(e,t,r){var n=null,i=we(!0),a=null,o=Rf,s=null,l=Ey(u);e=typeof e=="function"?e:e===void 0?JO:we(+e),t=typeof t=="function"?t:we(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?YO:we(+r);function u(d){var h,p,m,v=(d=Ay(d)).length,b,g=!1,y,x=new Array(v),S=new Array(v);for(a==null&&(s=o(y=l())),h=0;h<=v;++h){if(!(h<v&&i(b=d[h],h,d))===g)if(g=!g)p=h,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),m=h-1;m>=p;--m)s.point(x[m],S[m]);s.lineEnd(),s.areaEnd()}g&&(x[h]=+e(b,h,d),S[h]=+t(b,h,d),s.point(n?+n(b,h,d):x[h],r?+r(b,h,d):S[h]))}if(y)return s=null,y+""||null}function f(){return XO().defined(i).curve(o).context(a)}return u.x=function(d){return arguments.length?(e=typeof d=="function"?d:we(+d),n=null,u):e},u.x0=function(d){return arguments.length?(e=typeof d=="function"?d:we(+d),u):e},u.x1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:we(+d),u):n},u.y=function(d){return arguments.length?(t=typeof d=="function"?d:we(+d),r=null,u):t},u.y0=function(d){return arguments.length?(t=typeof d=="function"?d:we(+d),u):t},u.y1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:we(+d),u):r},u.lineX0=u.lineY0=function(){return f().x(e).y(t)},u.lineY1=function(){return f().x(e).y(r)},u.lineX1=function(){return f().x(n).y(t)},u.defined=function(d){return arguments.length?(i=typeof d=="function"?d:we(!!d),u):i},u.curve=function(d){return arguments.length?(o=d,a!=null&&(s=o(a)),u):o},u.context=function(d){return arguments.length?(d==null?a=s=null:s=o(a=d),u):a},u}class QO{constructor(t,r){this._context=t,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(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function $5(e){return new QO(e,!0)}function I5(e){return new QO(e,!1)}const Py={draw(e,t){const r=Er(t/Xc);e.moveTo(r,0),e.arc(0,0,r,0,If)}},R5={draw(e,t){const r=Er(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},ZO=Er(1/3),M5=ZO*2,D5={draw(e,t){const r=Er(t/M5),n=r*ZO;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},L5={draw(e,t){const r=Er(t),n=-r/2;e.rect(n,n,r,r)}},B5=.8908130915292852,eE=Yc(Xc/10)/Yc(7*Xc/10),U5=Yc(If/10)*eE,F5=-qO(If/10)*eE,z5={draw(e,t){const r=Er(t*B5),n=U5*r,i=F5*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=If*a/5,s=qO(o),l=Yc(o);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*i,l*n+s*i)}e.closePath()}},Hh=Er(3),W5={draw(e,t){const r=-Er(t/(Hh*3));e.moveTo(0,r*2),e.lineTo(-Hh*r,-r),e.lineTo(Hh*r,-r),e.closePath()}},Jt=-.5,Yt=Er(3)/2,zm=1/Er(12),H5=(zm/2+1)*3,K5={draw(e,t){const r=Er(t/H5),n=r/2,i=r*zm,a=n,o=r*zm+r,s=-a,l=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(s,l),e.lineTo(Jt*n-Yt*i,Yt*n+Jt*i),e.lineTo(Jt*a-Yt*o,Yt*a+Jt*o),e.lineTo(Jt*s-Yt*l,Yt*s+Jt*l),e.lineTo(Jt*n+Yt*i,Jt*i-Yt*n),e.lineTo(Jt*a+Yt*o,Jt*o-Yt*a),e.lineTo(Jt*s+Yt*l,Jt*l-Yt*s),e.closePath()}};function q5(e,t){let r=null,n=Ey(i);e=typeof e=="function"?e:we(e||Py),t=typeof t=="function"?t:we(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:we(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:we(+a),i):t}
vendor: 6,361 bytes, line 416
416,i.context=function(a){return arguments.length?(r=a??null,i):r},i}function Qc(){}function Zc(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function tE(e){this._context=e}tE.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:Zc(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Zc(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function G5(e){return new tE(e)}function rE(e){this._context=e}rE.prototype={areaStart:Qc,areaEnd:Qc,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Zc(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function V5(e){return new rE(e)}function nE(e){this._context=e}nE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Zc(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function J5(e){return new nE(e)}function iE(e){this._context=e}iE.prototype={areaStart:Qc,areaEnd:Qc,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Y5(e){return new iE(e)}function Hx(e){return e<0?-1:1}function Kx(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(Hx(a)+Hx(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function qx(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Kh(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-n)/3;e._context.bezierCurveTo(n+s,i+s*t,a-s,o-s*r,a,o)}function ed(e){this._context=e}ed.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:Kh(this,this._t0,qx(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Kh(this,qx(this,r=Kx(this,e,t)),r);break;default:Kh(this,this._t0,r=Kx(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function aE(e){this._context=new oE(e)}(aE.prototype=Object.create(ed.prototype)).point=function(e,t){ed.prototype.point.call(this,t,e)};function oE(e){this._context=e}oE.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function X5(e){return new ed(e)}function Q5(e){return new aE(e)}function sE(e){this._context=e}sE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=Gx(e),i=Gx(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Gx(e){var t,r=e.length-1,n,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/a[t-1],a[t]-=n,o[t]-=n*o[t-1];for(i[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Z5(e){return new sE(e)}function Mf(e,t){this._context=e,this._t=t}Mf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;
vendor: 11,830 bytes, lines 416-419
416default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function eB(e){return new Mf(e,.5)}function tB(e){return new Mf(e,0)}function rB(e){return new Mf(e,1)}function to(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,s=a.length;r<o;++r)for(i=a,a=e[t[r]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function Wm(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function nB(e,t){return e[t]}function iB(e){const t=[];return t.key=e,t}function aB(){var e=we([]),t=Wm,r=to,n=nB;function i(a){var o=Array.from(e.apply(this,arguments),iB),s,l=o.length,u=-1,f;for(const d of a)for(s=0,++u;s<l;++s)(o[s][u]=[0,+n(d,o[s].key,u,a)]).data=d;for(s=0,f=Ay(t(o));s<l;++s)o[f[s]].index=s;return r(o,f),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:we(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:we(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?Wm:typeof a=="function"?a:we(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a??to,i):r},i}function oB(e,t){if((n=e.length)>0){for(var r,n,i=0,a=e[0].length,o;i<a;++i){for(o=r=0;r<n;++r)o+=e[r][i][1]||0;if(o)for(r=0;r<n;++r)e[r][i][1]/=o}to(e,t)}}function sB(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,a=n.length;r<a;++r){for(var o=0,s=0;o<i;++o)s+=e[o][r][1]||0;n[r][1]+=n[r][0]=-s/2}to(e,t)}}function lB(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;n<a;++n){for(var s=0,l=0,u=0;s<o;++s){for(var f=e[t[s]],d=f[n][1]||0,h=f[n-1][1]||0,p=(d-h)/2,m=0;m<s;++m){var v=e[t[m]],b=v[n][1]||0,g=v[n-1][1]||0;p+=b-g}l+=d,u+=p*d}i[n-1][1]+=i[n-1][0]=r,l&&(r-=u/l)}i[n-1][1]+=i[n-1][0]=r,to(e,t)}}function ml(e){"@babel/helpers - typeof";return ml=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ml(e)}var uB=["type","size","sizeType"];function Hm(){return Hm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hm.apply(this,arguments)}function Vx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Jx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Vx(Object(r),!0).forEach(function(n){cB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cB(e,t,r){return t=dB(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dB(e){var t=fB(e,"string");return ml(t)=="symbol"?t:t+""}function fB(e,t){if(ml(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ml(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hB(e,t){if(e==null)return{};var r=pB(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function pB(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var lE={symbolCircle:Py,symbolCross:R5,symbolDiamond:D5,symbolSquare:L5,symbolStar:z5,symbolTriangle:W5,symbolWye:K5},mB=Math.PI/180,gB=function(t){var r="symbol".concat($f(t));return lE[r]||Py},vB=function(t,r,n){if(r==="area")return t;switch(n){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*mB;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},yB=function(t,r){lE["symbol".concat($f(t))]=r},Ny=function(t){var r=t.type,n=r===void 0?"circle":r,i=t.size,a=i===void 0?64:i,o=t.sizeType,s=o===void 0?"area":o,l=hB(t,uB),u=Jx(Jx({},l),{},{type:n,size:a,sizeType:s}),f=function(){var b=gB(n),g=q5().type(b).size(vB(a,s,n));return g()},d=u.className,h=u.cx,p=u.cy,m=se(u,!0);return h===+h&&p===+p&&a===+a?T.createElement("path",Hm({},m,{className:de("recharts-symbols",d),transform:"translate(".concat(h,", ").concat(p,")"),d:f()})):null};Ny.registerSymbol=yB;function ro(e){"@babel/helpers - typeof";return ro=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ro(e)}function Km(){return Km=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Km.apply(this,arguments)}function Yx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function bB(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yx(Object(r),!0).forEach(function(n){gl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wB(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,cE(n.key),n)}}function _B(e,t,r){return t&&wB(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function SB(e,t,r){return t=td(t),jB(e,uE()?Reflect.construct(t,r||[],td(e).constructor):t.apply(e,r))}function jB(e,t){if(t&&(ro(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return kB(e)}function kB(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(uE=function(){return!!e})()}function td(e){return td=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},td(e)}function OB(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qm(e,t)}function qm(e,t){return qm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},qm(e,t)}function gl(e,t,r){return t=cE(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cE(e){var t=EB(e,"string");return ro(t)=="symbol"?t:t+""}function EB(e,t){if(ro(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ro(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Xt=32,Ty=function(e){function t(){return xB(this,t),SB(this,t,arguments)}return OB(t,e),_B(t,[{key:"renderIcon",value:function(n){var i=this.props.inactiveColor,a=Xt/2,o=Xt/6,s=Xt/3,l=n.inactive?i:n.color;if(n.type==="plainline")return T.createElement("line",{strokeWidth:4,fill:"none",stroke:l,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:a,x2:Xt,y2:a,className:"recharts-legend-icon"});if(n.type==="line")return T.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(a,"h").concat(s,`
417            A`).concat(o,",").concat(o,",0,1,1,").concat(2*s,",").concat(a,`
418            H`).concat(Xt,"M").concat(2*s,",").concat(a,`
419            A`).concat(o,",").concat(o,",0,1,1,").concat(s,",").concat(a),className:"recharts-legend-icon"});if(n.type==="rect")return T.createElement("path",{stroke:"none",fill:l,d:"M0,".concat(Xt/8,"h").concat(Xt,"v").concat(Xt*3/4,"h").concat(-Xt,"z"),className:"recharts-legend-icon"});if(T.isValidElement(n.legendIcon)){var u=bB({},n);return delete u.legendIcon,T.cloneElement(n.legendIcon,u)}return T.createElement(Ny,{fill:l,cx:a,cy:a,size:Xt,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,i=this.props,a=i.payload,o=i.iconSize,s=i.layout,l=i.formatter,u=i.inactiveColor,f={x:0,y:0,width:Xt,height:Xt},d={display:s==="horizontal"?"inline-block":"block",marginRight:10},h={display:"inline-block",verticalAlign:"middle",marginRight:4};return a.map(function(p,m){var v=p.formatter||l,b=de(gl(gl({"recharts-legend-item":!0},"legend-item-".concat(m),!0),"inactive",p.inactive));if(p.type==="none")return null;var g=ie(p.value)?null:p.value;an(!ie(p.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 y=p.inactive?u:p.color;return T.createElement("li",Km({className:b,style:d,key:"legend-item-".concat(m)},Jc(n.props,p,m)),T.createElement(Mm,{width:o,height:o,viewBox:f,style:h},n.renderIcon(p)),T.createElement("span",{className:"recharts-legend-item-text",style:{color:y}},v?v(g,p,m):g))})}},{key:"render",value:function(){var n=this.props,i=n.payload,a=n.layout,o=n.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return T.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(E.PureComponent);gl(Ty,"displayName","Legend");gl(Ty,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var AB=xf;function PB(){this.__data__=new AB,this.size=0}var NB=PB;function TB(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var CB=TB;function $B(e){return this.__data__.get(e)}var IB=$B;function RB(e){return this.__data__.has(e)}var MB=RB,DB=xf,LB=yy,BB=by,UB=200;function FB(e,t){var r=this.__data__;if(r instanceof DB){var n=r.__data__;if(!LB||n.length<UB-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new BB(n)}return r.set(e,t),this.size=r.size,this}var zB=FB,WB=xf,HB=NB,KB=CB,qB=IB,GB=MB,VB=zB;function Lo(e){var t=this.__data__=new WB(e);this.size=t.size}Lo.prototype.clear=HB;Lo.prototype.delete=KB;Lo.prototype.get=qB;Lo.prototype.has=GB;Lo.prototype.set=VB;var dE=Lo,JB="__lodash_hash_undefined__";function YB(e){return this.__data__.set(e,JB),this}var XB=YB;function QB(e){return this.__data__.has(e)}var ZB=QB,e6=by,t6=XB,r6=ZB;function rd(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new e6;++t<r;)this.add(e[t])}rd.prototype.add=rd.prototype.push=t6;rd.prototype.has=r6;var fE=rd;function n6(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var hE=n6;function i6(e,t){return e.has(t)}var pE=i6,a6=fE,o6=hE,s6=pE,l6=1,u6=2;function c6(e,t,r,n,i,a){var o=r&l6,s=e.length,l=t.length;if(s!=l&&!(o&&l>s))return!1;var u=a.get(e),f=a.get(t);if(u&&f)return u==t&&f==e;var d=-1,h=!0,p=r&u6?new a6:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],v=t[d];if(n)var b=o?n(v,m,d,t,e,a):n(m,v,d,e,t,a);if(b!==void 0){if(b)continue;h=!1;break}
vendor: 5,560 bytes, line 419
419if(p){if(!o6(t,function(g,y){if(!s6(p,y)&&(m===g||i(m,g,r,n,a)))return p.push(y)})){h=!1;break}}else if(!(m===v||i(m,v,r,n,a))){h=!1;break}}return a.delete(e),a.delete(t),h}var mE=c6,d6=zr,f6=d6.Uint8Array,h6=f6;function p6(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var m6=p6;function g6(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Cy=g6,Xx=iu,Qx=h6,v6=vy,y6=mE,b6=m6,x6=Cy,w6=1,_6=2,S6="[object Boolean]",j6="[object Date]",k6="[object Error]",O6="[object Map]",E6="[object Number]",A6="[object RegExp]",P6="[object Set]",N6="[object String]",T6="[object Symbol]",C6="[object ArrayBuffer]",$6="[object DataView]",Zx=Xx?Xx.prototype:void 0,qh=Zx?Zx.valueOf:void 0;function I6(e,t,r,n,i,a,o){switch(r){case $6:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case C6:return!(e.byteLength!=t.byteLength||!a(new Qx(e),new Qx(t)));case S6:case j6:case E6:return v6(+e,+t);case k6:return e.name==t.name&&e.message==t.message;case A6:case N6:return e==t+"";case O6:var s=b6;case P6:var l=n&w6;if(s||(s=x6),e.size!=t.size&&!l)return!1;var u=o.get(e);if(u)return u==t;n|=_6,o.set(e,t);var f=y6(s(e),s(t),n,i,a,o);return o.delete(e),f;case T6:if(qh)return qh.call(e)==qh.call(t)}return!1}var R6=I6;function M6(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var gE=M6,D6=gE,L6=$t;function B6(e,t,r){var n=t(e);return L6(e)?n:D6(n,r(e))}var U6=B6;function F6(e,t){for(var r=-1,n=e==null?0:e.length,i=0,a=[];++r<n;){var o=e[r];t(o,r,e)&&(a[i++]=o)}return a}var z6=F6;function W6(){return[]}var H6=W6,K6=z6,q6=H6,G6=Object.prototype,V6=G6.propertyIsEnumerable,ew=Object.getOwnPropertySymbols,J6=ew?function(e){return e==null?[]:(e=Object(e),K6(ew(e),function(t){return V6.call(e,t)}))}:q6,Y6=J6;function X6(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var Q6=X6,Z6=wn,eU=_n,tU="[object Arguments]";function rU(e){return eU(e)&&Z6(e)==tU}var nU=rU,tw=nU,iU=_n,vE=Object.prototype,aU=vE.hasOwnProperty,oU=vE.propertyIsEnumerable,sU=tw(function(){return arguments}())?tw:function(e){return iU(e)&&aU.call(e,"callee")&&!oU.call(e,"callee")},$y=sU,nd={exports:{}};function lU(){return!1}var uU=lU;nd.exports;(function(e,t){var r=zr,n=uU,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,s=o?r.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||n;e.exports=u})(nd,nd.exports);var yE=nd.exports,cU=9007199254740991,dU=/^(?:0|[1-9]\d*)$/;function fU(e,t){var r=typeof e;return t=t??cU,!!t&&(r=="number"||r!="symbol"&&dU.test(e))&&e>-1&&e%1==0&&e<t}var Iy=fU,hU=9007199254740991;function pU(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=hU}var Ry=pU,mU=wn,gU=Ry,vU=_n,yU="[object Arguments]",bU="[object Array]",xU="[object Boolean]",wU="[object Date]",_U="[object Error]",SU="[object Function]",jU="[object Map]",kU="[object Number]",OU="[object Object]",EU="[object RegExp]",AU="[object Set]",PU="[object String]",NU="[object WeakMap]",TU="[object ArrayBuffer]",CU="[object DataView]",$U="[object Float32Array]",IU="[object Float64Array]",RU="[object Int8Array]",MU="[object Int16Array]",DU="[object Int32Array]",LU="[object Uint8Array]",BU="[object Uint8ClampedArray]",UU="[object Uint16Array]",FU="[object Uint32Array]",je={};je[$U]=je[IU]=je[RU]=je[MU]=je[DU]=je[LU]=je[BU]=je[UU]=je[FU]=!0;je[yU]=je[bU]=je[TU]=je[xU]=je[CU]=je[wU]=je[_U]=je[SU]=je[jU]=je[kU]=je[OU]=je[EU]=je[AU]=je[PU]=je[NU]=!1;function zU(e){return vU(e)&&gU(e.length)&&!!je[mU(e)]}var WU=zU;function HU(e){return function(t){return e(t)}}var bE=HU,id={exports:{}};id.exports;(function(e,t){var r=EO,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,o=a&&r.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();e.exports=s})(id,id.exports);var KU=id.exports,qU=WU,GU=bE,rw=KU,nw=rw&&rw.isTypedArray,VU=nw?GU(nw):qU,xE=VU,JU=Q6,YU=$y,XU=$t,QU=yE,ZU=Iy,e8=xE,t8=Object.prototype,r8=t8.hasOwnProperty;function n8(e,t){var r=XU(e),n=!r&&YU(e),i=!r&&!n&&QU(e),a=!r&&!n&&!i&&e8(e),o=r||n||i||a,s=o?JU(e.length,String):[],l=s.length;for(var u in e)(t||r8.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||ZU(u,l)))&&s.push(u);return s}var i8=n8,a8=Object.prototype;function o8(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||a8;return e===r}var s8=o8;function l8(e,t){return function(r){return e(t(r))}}var wE=l8,u8=wE,c8=u8(Object.keys,Object),d8=c8,f8=s8,h8=d8,p8=Object.prototype,m8=p8.hasOwnProperty;function g8(e){if(!f8(e))return h8(e);var t=[];for(var r in Object(e))m8.call(e,r)&&r!="constructor"&&t.push(r);return t}var v8=g8,y8=gy,b8=Ry;function x8(e){return e!=null&&b8(e.length)&&!y8(e)}var su=x8,w8=i8,_8=v8,S8=su;function j8(e){return S8(e)?w8(e):_8(e)}var Df=j8,k8=U6,O8=Y6,E8=Df;function A8(e){return k8(e,E8,O8)}var P8=A8,iw=P8,N8=1,T8=Object.prototype,C8=T8.hasOwnProperty;function $8(e,t,r,n,i,a){var o=r&N8,s=iw(e),l=s.length,u=iw(t),f=u.length;if(l!=f&&!o)return!1;for(var d=l;d--;){var h=s[d];if(!(o?h in t:C8.call(t,h)))return!1}var p=a.get(e),m=a.get(t);if(p&&m)return p==t&&m==e;var v=!0;a.set(e,t),a.set(t,e);for(var b=o;++d<l;){h=s[d];var g=e[h],y=t[h];if(n)var x=o?n(y,g,h,t,e,a):n(g,y,h,e,t,a);if(!(x===void 0?g===y||i(g,y,r,n,a):x)){v=!1;break}b||(b=h=="constructor")}if(v&&!b){var S=e.constructor,_=t.constructor;S!=_&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof _=="function"&&_ instanceof _)&&(v=!1)}return a.delete(e),a.delete(t),v}
vendor: 6,107 bytes, line 419
419var I8=$8,R8=Yi,M8=zr,D8=R8(M8,"DataView"),L8=D8,B8=Yi,U8=zr,F8=B8(U8,"Promise"),z8=F8,W8=Yi,H8=zr,K8=W8(H8,"Set"),_E=K8,q8=Yi,G8=zr,V8=q8(G8,"WeakMap"),J8=V8,Gm=L8,Vm=yy,Jm=z8,Ym=_E,Xm=J8,SE=wn,Bo=PO,aw="[object Map]",Y8="[object Object]",ow="[object Promise]",sw="[object Set]",lw="[object WeakMap]",uw="[object DataView]",X8=Bo(Gm),Q8=Bo(Vm),Z8=Bo(Jm),eF=Bo(Ym),tF=Bo(Xm),yi=SE;(Gm&&yi(new Gm(new ArrayBuffer(1)))!=uw||Vm&&yi(new Vm)!=aw||Jm&&yi(Jm.resolve())!=ow||Ym&&yi(new Ym)!=sw||Xm&&yi(new Xm)!=lw)&&(yi=function(e){var t=SE(e),r=t==Y8?e.constructor:void 0,n=r?Bo(r):"";if(n)switch(n){case X8:return uw;case Q8:return aw;case Z8:return ow;case eF:return sw;case tF:return lw}return t});var rF=yi,Gh=dE,nF=mE,iF=R6,aF=I8,cw=rF,dw=$t,fw=yE,oF=xE,sF=1,hw="[object Arguments]",pw="[object Array]",zu="[object Object]",lF=Object.prototype,mw=lF.hasOwnProperty;function uF(e,t,r,n,i,a){var o=dw(e),s=dw(t),l=o?pw:cw(e),u=s?pw:cw(t);l=l==hw?zu:l,u=u==hw?zu:u;var f=l==zu,d=u==zu,h=l==u;if(h&&fw(e)){if(!fw(t))return!1;o=!0,f=!1}if(h&&!f)return a||(a=new Gh),o||oF(e)?nF(e,t,r,n,i,a):iF(e,t,l,r,n,i,a);if(!(r&sF)){var p=f&&mw.call(e,"__wrapped__"),m=d&&mw.call(t,"__wrapped__");if(p||m){var v=p?e.value():e,b=m?t.value():t;return a||(a=new Gh),i(v,b,r,n,a)}}return h?(a||(a=new Gh),aF(e,t,r,n,i,a)):!1}var cF=uF,dF=cF,gw=_n;function jE(e,t,r,n,i){return e===t?!0:e==null||t==null||!gw(e)&&!gw(t)?e!==e&&t!==t:dF(e,t,r,n,jE,i)}var My=jE,fF=dE,hF=My,pF=1,mF=2;function gF(e,t,r,n){var i=r.length,a=i,o=!n;if(e==null)return!a;for(e=Object(e);i--;){var s=r[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=r[i];var l=s[0],u=e[l],f=s[1];if(o&&s[2]){if(u===void 0&&!(l in e))return!1}else{var d=new fF;if(n)var h=n(u,f,l,e,t,d);if(!(h===void 0?hF(f,u,pF|mF,n,d):h))return!1}}return!0}var vF=gF,yF=ni;function bF(e){return e===e&&!yF(e)}var kE=bF,xF=kE,wF=Df;function _F(e){for(var t=wF(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,xF(i)]}return t}var SF=_F;function jF(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var OE=jF,kF=vF,OF=SF,EF=OE;function AF(e){var t=OF(e);return t.length==1&&t[0][2]?EF(t[0][0],t[0][1]):function(r){return r===e||kF(r,e,t)}}var PF=AF;function NF(e,t){return e!=null&&t in Object(e)}var TF=NF,CF=IO,$F=$y,IF=$t,RF=Iy,MF=Ry,DF=_f;function LF(e,t,r){t=CF(t,e);for(var n=-1,i=t.length,a=!1;++n<i;){var o=DF(t[n]);if(!(a=e!=null&&r(e,o)))break;e=e[o]}return a||++n!=i?a:(i=e==null?0:e.length,!!i&&MF(i)&&RF(o,i)&&(IF(e)||$F(e)))}var BF=LF,UF=TF,FF=BF;function zF(e,t){return e!=null&&FF(e,t,UF)}var WF=zF,HF=My,KF=RO,qF=WF,GF=my,VF=kE,JF=OE,YF=_f,XF=1,QF=2;function ZF(e,t){return GF(e)&&VF(t)?JF(YF(e),t):function(r){var n=KF(r,e);return n===void 0&&n===t?qF(r,e):HF(t,n,XF|QF)}}var ez=ZF;function tz(e){return e}var Uo=tz;function rz(e){return function(t){return t==null?void 0:t[e]}}var nz=rz,iz=_y;function az(e){return function(t){return iz(t,e)}}var oz=az,sz=nz,lz=oz,uz=my,cz=_f;function dz(e){return uz(e)?sz(cz(e)):lz(e)}var fz=dz,hz=PF,pz=ez,mz=Uo,gz=$t,vz=fz;function yz(e){return typeof e=="function"?e:e==null?mz:typeof e=="object"?gz(e)?pz(e[0],e[1]):hz(e):vz(e)}var ii=yz;function bz(e,t,r,n){for(var i=e.length,a=r+(n?1:-1);n?a--:++a<i;)if(t(e[a],a,e))return a;return-1}var EE=bz;function xz(e){return e!==e}var wz=xz;function _z(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}var Sz=_z,jz=EE,kz=wz,Oz=Sz;function Ez(e,t,r){return t===t?Oz(e,t,r):jz(e,kz,r)}var Az=Ez,Pz=Az;function Nz(e,t){var r=e==null?0:e.length;return!!r&&Pz(e,t,0)>-1}var Tz=Nz;function Cz(e,t,r){for(var n=-1,i=e==null?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}var $z=Cz;function Iz(){}var Rz=Iz,Vh=_E,Mz=Rz,Dz=Cy,Lz=1/0,Bz=Vh&&1/Dz(new Vh([,-0]))[1]==Lz?function(e){return new Vh(e)}:Mz,Uz=Bz,Fz=fE,zz=Tz,Wz=$z,Hz=pE,Kz=Uz,qz=Cy,Gz=200;function Vz(e,t,r){var n=-1,i=zz,a=e.length,o=!0,s=[],l=s;if(r)o=!1,i=Wz;else if(a>=Gz){var u=t?null:Kz(e);if(u)return qz(u);o=!1,i=Hz,l=new Fz}else l=t?[]:s;e:for(;++n<a;){var f=e[n],d=t?t(f):f;if(f=r||f!==0?f:0,o&&d===d){for(var h=l.length;h--;)if(l[h]===d)continue e;t&&l.push(d),s.push(f)}else i(l,d,r)||(l!==s&&l.push(d),s.push(f))}return s}var Jz=Vz,Yz=ii,Xz=Jz;function Qz(e,t){return e&&e.length?Xz(e,Yz(t)):[]}var Zz=Qz;const vw=be(Zz);function AE(e,t,r){return t===!0?vw(e,r):ie(t)?vw(e,t):e}function no(e){"@babel/helpers - typeof";return no=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},no(e)}var eW=["ref"];function yw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function qr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yw(Object(r),!0).forEach(function(n){Lf(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bw(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,NE(n.key),n)}}function rW(e,t,r){return t&&bw(e.prototype,t),r&&bw(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function nW(e,t,r){return t=ad(t),iW(e,PE()?Reflect.construct(t,r||[],ad(e).constructor):t.apply(e,r))}function iW(e,t){if(t&&(no(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return aW(e)}function aW(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function PE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(PE=function(){return!!e})()}
vendor: 35,394 bytes, lines 419-426
419function ad(e){return ad=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ad(e)}function oW(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Qm(e,t)}function Qm(e,t){return Qm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Qm(e,t)}function Lf(e,t,r){return t=NE(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function NE(e){var t=sW(e,"string");return no(t)=="symbol"?t:t+""}function sW(e,t){if(no(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(no(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function lW(e,t){if(e==null)return{};var r=uW(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function uW(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function cW(e){return e.value}function dW(e,t){if(T.isValidElement(e))return T.cloneElement(e,t);if(typeof e=="function")return T.createElement(e,t);t.ref;var r=lW(t,eW);return T.createElement(Ty,r)}var xw=1,$i=function(e){function t(){var r;tW(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=nW(this,t,[].concat(i)),Lf(r,"lastBoundingBox",{width:-1,height:-1}),r}return oW(t,e),rW(t,[{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)>xw||Math.abs(i.height-this.lastBoundingBox.height)>xw)&&(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?qr({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,a=i.layout,o=i.align,s=i.verticalAlign,l=i.margin,u=i.chartWidth,f=i.chartHeight,d,h;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(o==="center"&&a==="vertical"){var p=this.getBBoxSnapshot();d={left:((u||0)-p.width)/2}}else d=o==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(s==="middle"){var m=this.getBBoxSnapshot();h={top:((f||0)-m.height)/2}}else h=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return qr(qr({},d),h)}},{key:"render",value:function(){var n=this,i=this.props,a=i.content,o=i.width,s=i.height,l=i.wrapperStyle,u=i.payloadUniqBy,f=i.payload,d=qr(qr({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return T.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(p){n.wrapperNode=p}},dW(a,qr(qr({},this.props),{},{payload:AE(f,u,cW)})))}}],[{key:"getWithHeight",value:function(n,i){var a=qr(qr({},this.defaultProps),n.props),o=a.layout;return o==="vertical"&&K(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||i}:null}}])}(E.PureComponent);Lf($i,"displayName","Legend");Lf($i,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var ww=iu,fW=$y,hW=$t,_w=ww?ww.isConcatSpreadable:void 0;function pW(e){return hW(e)||fW(e)||!!(_w&&e&&e[_w])}var mW=pW,gW=gE,vW=mW;function TE(e,t,r,n,i){var a=-1,o=e.length;for(r||(r=vW),i||(i=[]);++a<o;){var s=e[a];t>0&&r(s)?t>1?TE(s,t-1,r,n,i):gW(i,s):n||(i[i.length]=s)}return i}var CE=TE;function yW(e){return function(t,r,n){for(var i=-1,a=Object(t),o=n(t),s=o.length;s--;){var l=o[e?s:++i];if(r(a[l],l,a)===!1)break}return t}}var bW=yW,xW=bW,wW=xW(),_W=wW,SW=_W,jW=Df;function kW(e,t){return e&&SW(e,t,jW)}var $E=kW,OW=su;function EW(e,t){return function(r,n){if(r==null)return r;if(!OW(r))return e(r,n);for(var i=r.length,a=t?i:-1,o=Object(r);(t?a--:++a<i)&&n(o[a],a,o)!==!1;);return r}}var AW=EW,PW=$E,NW=AW,TW=NW(PW),Dy=TW,CW=Dy,$W=su;function IW(e,t){var r=-1,n=$W(e)?Array(e.length):[];return CW(e,function(i,a,o){n[++r]=t(i,a,o)}),n}var IE=IW;function RW(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var MW=RW,Sw=$o;function DW(e,t){if(e!==t){var r=e!==void 0,n=e===null,i=e===e,a=Sw(e),o=t!==void 0,s=t===null,l=t===t,u=Sw(t);if(!s&&!u&&!a&&e>t||a&&o&&l&&!s&&!u||n&&o&&l||!r&&l||!i)return 1;if(!n&&!a&&!u&&e<t||u&&r&&i&&!n&&!a||s&&r&&i||!o&&i||!l)return-1}return 0}var LW=DW,BW=LW;function UW(e,t,r){for(var n=-1,i=e.criteria,a=t.criteria,o=i.length,s=r.length;++n<o;){var l=BW(i[n],a[n]);if(l){if(n>=s)return l;var u=r[n];return l*(u=="desc"?-1:1)}}return e.index-t.index}var FW=UW,Jh=wy,zW=_y,WW=ii,HW=IE,KW=MW,qW=bE,GW=FW,VW=Uo,JW=$t;function YW(e,t,r){t.length?t=Jh(t,function(a){return JW(a)?function(o){return zW(o,a.length===1?a[0]:a)}:a}):t=[VW];var n=-1;t=Jh(t,qW(WW));var i=HW(e,function(a,o,s){var l=Jh(t,function(u){return u(a)});return{criteria:l,index:++n,value:a}});return KW(i,function(a,o){return GW(a,o,r)})}var XW=YW;function QW(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var ZW=QW,e7=ZW,jw=Math.max;function t7(e,t,r){return t=jw(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=jw(n.length-t,0),o=Array(a);++i<a;)o[i]=n[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=n[i];return s[t]=r(o),e7(e,this,s)}}var r7=t7;function n7(e){return function(){return e}}var i7=n7,a7=Yi,o7=function(){try{var e=a7(Object,"defineProperty");return e({},"",{}),e}catch{}}(),RE=o7,s7=i7,kw=RE,l7=Uo,u7=kw?function(e,t){return kw(e,"toString",{configurable:!0,enumerable:!1,value:s7(t),writable:!0})}:l7,c7=u7,d7=800,f7=16,h7=Date.now;function p7(e){var t=0,r=0;return function(){var n=h7(),i=f7-(n-r);if(r=n,i>0){if(++t>=d7)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var m7=p7,g7=c7,v7=m7,y7=v7(g7),b7=y7,x7=Uo,w7=r7,_7=b7;function S7(e,t){return _7(w7(e,t,x7),e+"")}var j7=S7,k7=vy,O7=su,E7=Iy,A7=ni;function P7(e,t,r){if(!A7(r))return!1;var n=typeof t;return(n=="number"?O7(r)&&E7(t,r.length):n=="string"&&t in r)?k7(r[t],e):!1}var Bf=P7,N7=CE,T7=XW,C7=j7,Ow=Bf,$7=C7(function(e,t){if(e==null)return[];var r=t.length;return r>1&&Ow(e,t[0],t[1])?t=[]:r>2&&Ow(t[0],t[1],t[2])&&(t=[t[0]]),T7(e,N7(t,1),[])}),I7=$7;const Ly=be(I7);function vl(e){"@babel/helpers - typeof";return vl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vl(e)}function Zm(){return Zm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Zm.apply(this,arguments)}function R7(e,t){return B7(e)||L7(e,t)||D7(e,t)||M7()}function M7(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
420In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function D7(e,t){if(e){if(typeof e=="string")return Ew(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ew(e,t)}}function Ew(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function L7(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function B7(e){if(Array.isArray(e))return e}function Aw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Yh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Aw(Object(r),!0).forEach(function(n){U7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Aw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function U7(e,t,r){return t=F7(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function F7(e){var t=z7(e,"string");return vl(t)=="symbol"?t:t+""}function z7(e,t){if(vl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(vl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function W7(e){return Array.isArray(e)&&Xe(e[0])&&Xe(e[1])?e.join(" ~ "):e}var H7=function(t){var r=t.separator,n=r===void 0?" : ":r,i=t.contentStyle,a=i===void 0?{}:i,o=t.itemStyle,s=o===void 0?{}:o,l=t.labelStyle,u=l===void 0?{}:l,f=t.payload,d=t.formatter,h=t.itemSorter,p=t.wrapperClassName,m=t.labelClassName,v=t.label,b=t.labelFormatter,g=t.accessibilityLayer,y=g===void 0?!1:g,x=function(){if(f&&f.length){var P={padding:0,margin:0},B=(h?Ly(f,h):f).map(function(N,I){if(N.type==="none")return null;var R=Yh({display:"block",paddingTop:4,paddingBottom:4,color:N.color||"#000"},s),D=N.formatter||d||W7,$=N.value,M=N.name,U=$,H=M;if(D&&U!=null&&H!=null){var W=D($,M,N,I,f);if(Array.isArray(W)){var X=R7(W,2);U=X[0],H=X[1]}else U=W}return T.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(I),style:R},Xe(H)?T.createElement("span",{className:"recharts-tooltip-item-name"},H):null,Xe(H)?T.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,T.createElement("span",{className:"recharts-tooltip-item-value"},U),T.createElement("span",{className:"recharts-tooltip-item-unit"},N.unit||""))});return T.createElement("ul",{className:"recharts-tooltip-item-list",style:P},B)}return null},S=Yh({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},a),_=Yh({margin:0},u),w=!ae(v),j=w?v:"",O=de("recharts-default-tooltip",p),k=de("recharts-tooltip-label",m);w&&b&&f!==void 0&&f!==null&&(j=b(v,f));var A=y?{role:"status","aria-live":"assertive"}:{};return T.createElement("div",Zm({className:O,style:S},A),T.createElement("p",{className:k,style:_},T.isValidElement(j)?j:"".concat(j)),x())};function yl(e){"@babel/helpers - typeof";return yl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yl(e)}function Wu(e,t,r){return t=K7(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function K7(e){var t=q7(e,"string");return yl(t)=="symbol"?t:t+""}function q7(e,t){if(yl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(yl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var is="recharts-tooltip-wrapper",G7={visibility:"hidden"};function V7(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return de(is,Wu(Wu(Wu(Wu({},"".concat(is,"-right"),K(r)&&t&&K(t.x)&&r>=t.x),"".concat(is,"-left"),K(r)&&t&&K(t.x)&&r<t.x),"".concat(is,"-bottom"),K(n)&&t&&K(t.y)&&n>=t.y),"".concat(is,"-top"),K(n)&&t&&K(t.y)&&n<t.y))}function Pw(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,i=e.offsetTopLeft,a=e.position,o=e.reverseDirection,s=e.tooltipDimension,l=e.viewBox,u=e.viewBoxDimension;if(a&&K(a[n]))return a[n];var f=r[n]-s-i,d=r[n]+i;if(t[n])return o[n]?f:d;if(o[n]){var h=f,p=l[n];return h<p?Math.max(d,l[n]):Math.max(f,l[n])}var m=d+s,v=l[n]+u;return m>v?Math.max(f,l[n]):Math.max(d,l[n])}function J7(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function Y7(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,u,f,d;return o.height>0&&o.width>0&&r?(f=Pw({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),d=Pw({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),u=J7({translateX:f,translateY:d,useTranslate3d:s})):u=G7,{cssProperties:u,cssClasses:V7({translateX:f,translateY:d,coordinate:r})}}function io(e){"@babel/helpers - typeof";return io=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},io(e)}function Nw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Tw(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Nw(Object(r),!0).forEach(function(n){tg(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Nw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function X7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Q7(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,DE(n.key),n)}}function Z7(e,t,r){return t&&Q7(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function eH(e,t,r){return t=od(t),tH(e,ME()?Reflect.construct(t,r||[],od(e).constructor):t.apply(e,r))}function tH(e,t){if(t&&(io(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rH(e)}function rH(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ME(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ME=function(){return!!e})()}function od(e){return od=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},od(e)}function nH(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&eg(e,t)}function eg(e,t){return eg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},eg(e,t)}function tg(e,t,r){return t=DE(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function DE(e){var t=iH(e,"string");return io(t)=="symbol"?t:t+""}function iH(e,t){if(io(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(io(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Cw=1,aH=function(e){function t(){var r;X7(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=eH(this,t,[].concat(i)),tg(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),tg(r,"handleKeyDown",function(o){if(o.key==="Escape"){var s,l,u,f;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(s=(l=r.props.coordinate)===null||l===void 0?void 0:l.x)!==null&&s!==void 0?s:0,y:(u=(f=r.props.coordinate)===null||f===void 0?void 0:f.y)!==null&&u!==void 0?u:0}})}}),r}return nH(t,e),Z7(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>Cw||Math.abs(n.height-this.state.lastBoundingBox.height)>Cw)&&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,o=i.allowEscapeViewBox,s=i.animationDuration,l=i.animationEasing,u=i.children,f=i.coordinate,d=i.hasPayload,h=i.isAnimationActive,p=i.offset,m=i.position,v=i.reverseDirection,b=i.useTranslate3d,g=i.viewBox,y=i.wrapperStyle,x=Y7({allowEscapeViewBox:o,coordinate:f,offsetTopLeft:p,position:m,reverseDirection:v,tooltipBox:this.state.lastBoundingBox,useTranslate3d:b,viewBox:g}),S=x.cssClasses,_=x.cssProperties,w=Tw(Tw({transition:h&&a?"transform ".concat(s,"ms ").concat(l):void 0},_),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&d?"visible":"hidden",position:"absolute",top:0,left:0},y);return T.createElement("div",{tabIndex:-1,className:S,style:w,ref:function(O){n.wrapperNode=O}},u)}}])}(E.PureComponent),oH=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Fo={isSsr:oH()};function ao(e){"@babel/helpers - typeof";return ao=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ao(e)}function $w(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Iw(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$w(Object(r),!0).forEach(function(n){By(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$w(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lH(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,BE(n.key),n)}}function uH(e,t,r){return t&&lH(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function cH(e,t,r){return t=sd(t),dH(e,LE()?Reflect.construct(t,r||[],sd(e).constructor):t.apply(e,r))}function dH(e,t){if(t&&(ao(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fH(e)}function fH(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function LE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(LE=function(){return!!e})()}function sd(e){return sd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},sd(e)}function hH(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rg(e,t)}function rg(e,t){return rg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},rg(e,t)}function By(e,t,r){return t=BE(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BE(e){var t=pH(e,"string");return ao(t)=="symbol"?t:t+""}function pH(e,t){if(ao(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ao(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function mH(e){return e.dataKey}function gH(e,t){return T.isValidElement(e)?T.cloneElement(e,t):typeof e=="function"?T.createElement(e,t):T.createElement(H7,t)}var Bt=function(e){function t(){return sH(this,t),cH(this,t,arguments)}return hH(t,e),uH(t,[{key:"render",value:function(){var n=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,s=i.animationDuration,l=i.animationEasing,u=i.content,f=i.coordinate,d=i.filterNull,h=i.isAnimationActive,p=i.offset,m=i.payload,v=i.payloadUniqBy,b=i.position,g=i.reverseDirection,y=i.useTranslate3d,x=i.viewBox,S=i.wrapperStyle,_=m??[];d&&_.length&&(_=AE(m.filter(function(j){return j.value!=null&&(j.hide!==!0||n.props.includeHidden)}),v,mH));var w=_.length>0;return T.createElement(aH,{allowEscapeViewBox:o,animationDuration:s,animationEasing:l,isAnimationActive:h,active:a,coordinate:f,hasPayload:w,offset:p,position:b,reverseDirection:g,useTranslate3d:y,viewBox:x,wrapperStyle:S},gH(u,Iw(Iw({},this.props),{},{payload:_})))}}])}(E.PureComponent);By(Bt,"displayName","Tooltip");By(Bt,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Fo.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 vH=zr,yH=function(){return vH.Date.now()},bH=yH,xH=/\s/;function wH(e){for(var t=e.length;t--&&xH.test(e.charAt(t)););return t}var _H=wH,SH=_H,jH=/^\s+/;function kH(e){return e&&e.slice(0,SH(e)+1).replace(jH,"")}var OH=kH,EH=OH,Rw=ni,AH=$o,Mw=NaN,PH=/^[-+]0x[0-9a-f]+$/i,NH=/^0b[01]+$/i,TH=/^0o[0-7]+$/i,CH=parseInt;function $H(e){if(typeof e=="number")return e;if(AH(e))return Mw;if(Rw(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Rw(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=EH(e);var r=NH.test(e);return r||TH.test(e)?CH(e.slice(2),r?2:8):PH.test(e)?Mw:+e}var UE=$H,IH=ni,Xh=bH,Dw=UE,RH="Expected a function",MH=Math.max,DH=Math.min;function LH(e,t,r){var n,i,a,o,s,l,u=0,f=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(RH);t=Dw(t)||0,IH(r)&&(f=!!r.leading,d="maxWait"in r,a=d?MH(Dw(r.maxWait)||0,t):a,h="trailing"in r?!!r.trailing:h);function p(w){var j=n,O=i;return n=i=void 0,u=w,o=e.apply(O,j),o}function m(w){return u=w,s=setTimeout(g,t),f?p(w):o}function v(w){var j=w-l,O=w-u,k=t-j;return d?DH(k,a-O):k}function b(w){var j=w-l,O=w-u;return l===void 0||j>=t||j<0||d&&O>=a}function g(){var w=Xh();if(b(w))return y(w);s=setTimeout(g,v(w))}function y(w){return s=void 0,h&&n?p(w):(n=i=void 0,o)}function x(){s!==void 0&&clearTimeout(s),u=0,n=l=i=s=void 0}function S(){return s===void 0?o:y(Xh())}function _(){var w=Xh(),j=b(w);if(n=arguments,i=this,l=w,j){if(s===void 0)return m(l);if(d)return clearTimeout(s),s=setTimeout(g,t),p(l)}return s===void 0&&(s=setTimeout(g,t)),o}return _.cancel=x,_.flush=S,_}var BH=LH,UH=BH,FH=ni,zH="Expected a function";function WH(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(zH);return FH(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),UH(e,t,{leading:n,maxWait:t,trailing:i})}var HH=WH;const FE=be(HH);function bl(e){"@babel/helpers - typeof";return bl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bl(e)}function Lw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Hu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Lw(Object(r),!0).forEach(function(n){KH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function KH(e,t,r){return t=qH(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qH(e){var t=GH(e,"string");return bl(t)=="symbol"?t:t+""}function GH(e,t){if(bl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(bl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function VH(e,t){return QH(e)||XH(e,t)||YH(e,t)||JH()}function JH(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
421In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YH(e,t){if(e){if(typeof e=="string")return Bw(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Bw(e,t)}}function Bw(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function XH(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function QH(e){if(Array.isArray(e))return e}var Ku=E.forwardRef(function(e,t){var r=e.aspect,n=e.initialDimension,i=n===void 0?{width:-1,height:-1}:n,a=e.width,o=a===void 0?"100%":a,s=e.height,l=s===void 0?"100%":s,u=e.minWidth,f=u===void 0?0:u,d=e.minHeight,h=e.maxHeight,p=e.children,m=e.debounce,v=m===void 0?0:m,b=e.id,g=e.className,y=e.onResize,x=e.style,S=x===void 0?{}:x,_=E.useRef(null),w=E.useRef();w.current=y,E.useImperativeHandle(t,function(){return Object.defineProperty(_.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),_.current},configurable:!0})});var j=E.useState({containerWidth:i.width,containerHeight:i.height}),O=VH(j,2),k=O[0],A=O[1],C=E.useCallback(function(B,N){A(function(I){var R=Math.round(B),D=Math.round(N);return I.containerWidth===R&&I.containerHeight===D?I:{containerWidth:R,containerHeight:D}})},[]);E.useEffect(function(){var B=function(M){var U,H=M[0].contentRect,W=H.width,X=H.height;C(W,X),(U=w.current)===null||U===void 0||U.call(w,W,X)};v>0&&(B=FE(B,v,{trailing:!0,leading:!1}));var N=new ResizeObserver(B),I=_.current.getBoundingClientRect(),R=I.width,D=I.height;return C(R,D),N.observe(_.current),function(){N.disconnect()}},[C,v]);var P=E.useMemo(function(){var B=k.containerWidth,N=k.containerHeight;if(B<0||N<0)return null;an(ki(o)||ki(l),`The width(%s) and height(%s) are both fixed numbers,
422       maybe you don't need to use a ResponsiveContainer.`,o,l),an(!r||r>0,"The aspect(%s) must be greater than zero.",r);var I=ki(o)?B:o,R=ki(l)?N:l;r&&r>0&&(I?R=I/r:R&&(I=R*r),h&&R>h&&(R=h)),an(I>0||R>0,`The width(%s) and height(%s) of chart should be greater than 0,
423       please check the style of container, or the props width(%s) and height(%s),
424       or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
425       height and width.`,I,R,o,l,f,d,r);var D=!Array.isArray(p)&&nn(p.type).endsWith("Chart");return T.Children.map(p,function($){return T.isValidElement($)?E.cloneElement($,Hu({width:I,height:R},D?{style:Hu({height:"100%",width:"100%",maxHeight:R,maxWidth:I},$.props.style)}:{})):$})},[r,p,l,h,d,f,k,o]);return T.createElement("div",{id:b?"".concat(b):void 0,className:de("recharts-responsive-container",g),style:Hu(Hu({},S),{},{width:o,height:l,minWidth:f,minHeight:d,maxHeight:h}),ref:_},P)}),ld=function(t){return null};ld.displayName="Cell";function xl(e){"@babel/helpers - typeof";return xl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xl(e)}function Uw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ng(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Uw(Object(r),!0).forEach(function(n){ZH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Uw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ZH(e,t,r){return t=eK(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eK(e){var t=tK(e,"string");return xl(t)=="symbol"?t:t+""}function tK(e,t){if(xl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(xl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ua={widthCache:{},cacheCount:0},rK=2e3,nK={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},Fw="recharts_measurement_span";function iK(e){var t=ng({},e);return Object.keys(t).forEach(function(r){t[r]||delete t[r]}),t}var Rs=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Fo.isSsr)return{width:0,height:0};var n=iK(r),i=JSON.stringify({text:t,copyStyle:n});if(ua.widthCache[i])return ua.widthCache[i];try{var a=document.getElementById(Fw);a||(a=document.createElement("span"),a.setAttribute("id",Fw),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=ng(ng({},nK),n);Object.assign(a.style,o),a.textContent="".concat(t);var s=a.getBoundingClientRect(),l={width:s.width,height:s.height};return ua.widthCache[i]=l,++ua.cacheCount>rK&&(ua.cacheCount=0,ua.widthCache={}),l}catch{return{width:0,height:0}}},aK=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function wl(e){"@babel/helpers - typeof";return wl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wl(e)}function ud(e,t){return uK(e)||lK(e,t)||sK(e,t)||oK()}function oK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
426In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sK(e,t){if(e){if(typeof e=="string")return zw(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zw(e,t)}}function zw(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function lK(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function uK(e){if(Array.isArray(e))return e}function cK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ww(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,fK(n.key),n)}}function dK(e,t,r){return t&&Ww(e.prototype,t),r&&Ww(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function fK(e){var t=hK(e,"string");return wl(t)=="symbol"?t:t+""}function hK(e,t){if(wl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(wl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Hw=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Kw=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,pK=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,mK=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,zE={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},gK=Object.keys(zE),Ta="NaN";function vK(e,t){return e*zE[t]}var qu=function(){function e(t,r){cK(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!pK.test(r)&&(this.num=NaN,this.unit=""),gK.includes(r)&&(this.num=vK(t,r),this.unit="px")}return dK(e,[{key:"add",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num+r.num,this.unit)}},{key:"subtract",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num-r.num,this.unit)}},{key:"multiply",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num*r.num,this.unit||r.unit)}},{key:"divide",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(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=mK.exec(r))!==null&&n!==void 0?n:[],a=ud(i,3),o=a[1],s=a[2];return new e(parseFloat(o),s??"")}}])}();function WE(e){if(e.includes(Ta))return Ta;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=Hw.exec(t))!==null&&r!==void 0?r:[],i=ud(n,4),a=i[1],o=i[2],s=i[3],l=qu.parse(a??""),u=qu.parse(s??""),f=o==="*"?l.multiply(u):l.divi
426de(u);if(f.isNaN())return Ta;t=t.replace(Hw,f.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var d,h=(d=Kw.exec(t))!==null&&d!==void 0?d:[],p=ud(h,4),m=p[1],v=p[2],b=p[3],g=qu.parse(m??""),y=qu.parse(b??""),x=v==="+"?g.add(y):g.subtract(y);if(x.isNaN())return Ta;t=t.replace(Kw,x.toString())}return t}var qw=/\(([^()]*)\)/;function yK(e){for(var t=e;t.includes("(");){var r=qw.exec(t),n=ud(r,2),i=n[1];t=t.replace(qw,WE(i))}return t}function bK(e){var t=e.replace(/\s+/g,"");return t=yK(t),t=WE(t),t}function xK(e){try{return bK(e)}catch{return Ta}}function Qh(e){var t=xK(e.slice(5,-1));return t===Ta?"":t}var wK=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],_K=["dx","dy","angle","className","breakAll"];function ig(){return ig=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ig.apply(this,arguments)}function Gw(e,t){if(e==null)return{};var r=SK(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function SK(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Vw(e,t){return EK(e)||OK(e,t)||kK(e,t)||jK()}function jK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
427In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kK(e,t){if(e){if(typeof e=="string")return Jw(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Jw(e,t)}}function Jw(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function OK(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function EK(e){if(Array.isArray(e))return e}var HE=/[ \f\n\r\t\v\u2028\u2029]+/,KE=function(t){var r=t.children,n=t.breakAll,i=t.style;try{var a=[];ae(r)||(n?a=r.toString().split(""):a=r.toString().split(HE));var o=a.map(function(l){return{word:l,width:Rs(l,i).width}}),s=n?0:Rs(" ",i).width;return{wordsWithComputedWidth:o,spaceWidth:s}}catch{return null}},AK=function(t,r,n,i,a){var o=t.maxLines,s=t.children,l=t.style,u=t.breakAll,f=K(o),d=s,h=function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return I.reduce(function(R,D){var $=D.word,M=D.width,U=R[R.length-1];if(U&&(i==null||a||U.width+M+n<Number(i)))U.words.push($),U.width+=M+n;else{var H={words:[$],width:M};R.push(H)}return R},[])},p=h(r),m=function(I){return I.reduce(function(R,D){return R.width>D.width?R:D})};if(!f)return p;for(var v="…",b=function(I){var R=d.slice(0,I),D=KE({breakAll:u,style:l,children:R+v}).wordsWithComputedWidth,$=h(D),M=$.length>o||m($).width>Number(i);return[M,$]},g=0,y=d.length-1,x=0,S;g<=y&&x<=d.length-1;){var _=Math.floor((g+y)/2),w=_-1,j=b(w),O=Vw(j,2),k=O[0],A=O[1],C=b(_),P=Vw(C,1),B=P[0];if(!k&&!B&&(g=_+1),k&&B&&(y=_-1),!k&&B){S=A;break}x++}return S||p},Yw=function(t){var r=ae(t)?[]:t.toString().split(HE);return[{words:r}]},PK=function(t){var r=t.width,n=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,s=t.maxLines;if((r||n)&&!Fo.isSsr){var l,u,f=KE({breakAll:o,children:i,style:a});if(f){var d=f.wordsWithComputedWidth,h=f.spaceWidth;l=d,u=h}else return Yw(i);return AK({breakAll:o,children:i,maxLines:s,style:a},l,u,r,n)}return Yw(i)},Xw="#808080",cd=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.lineHeight,s=o===void 0?"1em":o,l=t.capHeight,u=l===void 0?"0.71em":l,f=t.scaleToFit,d=f===void 0?!1:f,h=t.textAnchor,p=h===void 0?"start":h,m=t.verticalAnchor,v=m===void 0?"end":m,b=t.fill,g=b===void 0?Xw:b,y=Gw(t,wK),x=E.useMemo(function(){return PK({breakAll:y.breakAll,children:y.children,maxLines:y.maxLines,scaleToFit:d,style:y.style,width:y.width})},[y.breakAll,y.children,y.maxLines,d,y.style,y.width]),S=y.dx,_=y.dy,w=y.angle,j=y.className,O=y.breakAll,k=Gw(y,_K);if(!Xe(n)||!Xe(a))return null;var A=n+(K(S)?S:0),C=a+(K(_)?_:0),P;switch(v){case"start":P=Qh("calc(".concat(u,")"));break;case"middle":P=Qh("calc(".concat((x.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:P=Qh("calc(".concat(x.length-1," * -").concat(s,")"));break}var B=[];if(d){var N=x[0].width,I=y.width;B.push("scale(".concat((K(I)?I/N:1)/N,")"))}return w&&B.push("rotate(".concat(w,", ").concat(A,", ").concat(C,")")),B.length&&(k.transform=B.join(" ")),T.createElement("text",ig({},se(k,!0),{x:A,y:C,className:de("recharts-text",j),textAnchor:p,fill:g.includes("url")?Xw:g}),x.map(function(R,D){var $=R.words.join(O?"":" ");return T.createElement("tspan",{x:A,dy:D===0?P:s,key:"".concat($,"-").concat(D)},$)}))};function Jn(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function NK(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Uy(e){let t,r,n;e.length!==2?(t=Jn,r=(s,l)=>Jn(e(s),l),n=(s,l)=>e(s)-l):(t=e===Jn||e===NK?e:TK,r=e,n=e);function i(s,l,u=0,f=s.length){if(u<f){if(t(l,l)!==0)return f;do{const d=u+f>>>1;r(s[d],l)<0?u=d+1:f=d}while(u<f)}return u}function a(s,l,u=0,f=s.length){if(u<f){if(t(l,l)!==0)return f;do{const d=u+f>>>1;r(s[d],l)<=0?u=d+1:f=d}while(u<f)}return u}function o(s,l,u=0,f=s.length){const d=i(s,l,u,f-1);return d>u&&n(s[d-1],l)>-n(s[d],l)?d-1:d}return{left:i,center:o,right:a}}function TK(){return 0}function qE(e){return e===null?NaN:+e}function*CK(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const $K=Uy(Jn),lu=$K.right;Uy(qE).center;class Qw extends Map{constructor(t,r=MK){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(Zw(this,t))}has(t){return super.has(Zw(this,t))}set(t,r){return super.set(IK(this,t),r)}delete(t){return super.delete(RK(this,t))}}function Zw({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function IK({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function RK({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function MK(e){return e!==null&&typeof e=="object"?e.valueOf():e}function DK(e=Jn){if(e===Jn)return GE;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function GE(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const LK=Math.sqrt(50),BK=Math.sqrt(10),UK=Math.sqrt(2);function dd(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),o=a>=LK?10:a>=BK?5:a>=UK?2:1;let s,l,u;return i<0?(u=Math.pow(10,-i)/o,s=Math.round(e*u),l=Math.round(t*u),s/u<e&&++s,l/u>t&&--l,u=-u):(u=Math.pow(10,i)*o,s=Math.round(e/u),l=Math.round(t/u),s*u<e&&++s,l*u>t&&--l),l<s&&.5<=r&&r<2?dd(e,t,r*2):[s,l,u]}function ag(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[i,a,o]=n?dd(t,e,r):dd(e,t,r);if(!(a>=i))return[];const s=a-i+1,l=new Array(s);if(n)if(o<0)for(let u=0;u<s;++u)l[u]=(a-u)/-o;else for(let u=0;u<s;++u)l[u]=(a-u)*o;else if(o<0)for(let u=0;u<s;++u)l[u]=(i+u)/-o;else for(let u=0;u<s;++u)l[u]=(i+u)*o;return l}function og(e,t,r){return t=+t,e=+e,r=+r,dd(e,t,r)[2]}function sg(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?og(t,e,r):og(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function e1(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function t1(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}
vendor: 14,280 bytes, line 427
427function VE(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?GE:DK(i);n>r;){if(n-r>600){const l=n-r+1,u=t-r+1,f=Math.log(l),d=.5*Math.exp(2*f/3),h=.5*Math.sqrt(f*d*(l-d)/l)*(u-l/2<0?-1:1),p=Math.max(r,Math.floor(t-u*d/l+h)),m=Math.min(n,Math.floor(t+(l-u)*d/l+h));VE(e,t,p,m,i)}const a=e[t];let o=r,s=n;for(as(e,r,t),i(e[n],a)>0&&as(e,r,n);o<s;){for(as(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}i(e[r],a)===0?as(e,r,s):(++s,as(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function as(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function FK(e,t,r){if(e=Float64Array.from(CK(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return t1(e);if(t>=1)return e1(e);var n,i=(n-1)*t,a=Math.floor(i),o=e1(VE(e,a).subarray(0,a+1)),s=t1(e.subarray(a+1));return o+(s-o)*(i-a)}}function zK(e,t,r=qE){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),o=+r(e[a],a,e),s=+r(e[a+1],a+1,e);return o+(s-o)*(i-a)}}function WK(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++n<i;)a[n]=e+n*r;return a}function cr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Sn(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const lg=Symbol("implicit");function Fy(){var e=new Qw,t=[],r=[],n=lg;function i(a){let o=e.get(a);if(o===void 0){if(n!==lg)return n;e.set(a,o=t.push(a)-1)}return r[o%r.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new Qw;for(const o of a)e.has(o)||e.set(o,t.push(o)-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 Fy(t,r).unknown(n)},cr.apply(i,arguments),i}function _l(){var e=Fy().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,a,o,s=!1,l=0,u=0,f=.5;delete e.unknown;function d(){var h=t().length,p=i<n,m=p?i:n,v=p?n:i;a=(v-m)/Math.max(1,h-l+u*2),s&&(a=Math.floor(a)),m+=(v-m-a*(h-l))*f,o=a*(1-l),s&&(m=Math.round(m),o=Math.round(o));var b=WK(h).map(function(g){return m+a*g});return r(p?b.reverse():b)}return e.domain=function(h){return arguments.length?(t(h),d()):t()},e.range=function(h){return arguments.length?([n,i]=h,n=+n,i=+i,d()):[n,i]},e.rangeRound=function(h){return[n,i]=h,n=+n,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(h){return arguments.length?(s=!!h,d()):s},e.padding=function(h){return arguments.length?(l=Math.min(1,u=+h),d()):l},e.paddingInner=function(h){return arguments.length?(l=Math.min(1,h),d()):l},e.paddingOuter=function(h){return arguments.length?(u=+h,d()):u},e.align=function(h){return arguments.length?(f=Math.max(0,Math.min(1,h)),d()):f},e.copy=function(){return _l(t(),[n,i]).round(s).paddingInner(l).paddingOuter(u).align(f)},cr.apply(d(),arguments)}function JE(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return JE(t())},e}function Ms(){return JE(_l.apply(null,arguments).paddingInner(1))}function zy(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function YE(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function uu(){}var Sl=.7,fd=1/Sl,za="\\s*([+-]?\\d+)\\s*",jl="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Lr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",HK=/^#([0-9a-f]{3,8})$/,KK=new RegExp(`^rgb\\(${za},${za},${za}\\)$`),qK=new RegExp(`^rgb\\(${Lr},${Lr},${Lr}\\)$`),GK=new RegExp(`^rgba\\(${za},${za},${za},${jl}\\)$`),VK=new RegExp(`^rgba\\(${Lr},${Lr},${Lr},${jl}\\)$`),JK=new RegExp(`^hsl\\(${jl},${Lr},${Lr}\\)$`),YK=new RegExp(`^hsla\\(${jl},${Lr},${Lr},${jl}\\)$`),r1={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};zy(uu,kl,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:n1,formatHex:n1,formatHex8:XK,formatHsl:QK,formatRgb:i1,toString:i1});function n1(){return this.rgb().formatHex()}function XK(){return this.rgb().formatHex8()}function QK(){return XE(this).formatHsl()}function i1(){return this.rgb().formatRgb()}function kl(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=HK.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?a1(t):r===3?new Pt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Gu(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Gu(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=KK.exec(e))?new Pt(t[1],t[2],t[3],1):(t=qK.exec(e))?new Pt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=GK.exec(e))?Gu(t[1],t[2],t[3],t[4]):(t=VK.exec(e))?Gu(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=JK.exec(e))?l1(t[1],t[2]/100,t[3]/100,1):(t=YK.exec(e))?l1(t[1],t[2]/100,t[3]/100,t[4]):r1.hasOwnProperty(e)?a1(r1[e]):e==="transparent"?new Pt(NaN,NaN,NaN,0):null}function a1(e){return new Pt(e>>16&255,e>>8&255,e&255,1)}function Gu(e,t,r,n){return n<=0&&(e=t=r=NaN),new Pt(e,t,r,n)}function ZK(e){return e instanceof uu||(e=kl(e)),e?(e=e.rgb(),new Pt(e.r,e.g,e.b,e.opacity)):new Pt}function ug(e,t,r,n){return arguments.length===1?ZK(e):new Pt(e,t,r,n??1)}function Pt(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}zy(Pt,ug,YE(uu,{brighter(e){return e=e==null?fd:Math.pow(fd,e),new Pt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Sl:Math.pow(Sl,e),new Pt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Pt(Ii(this.r),Ii(this.g),Ii(this.b),hd(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:o1,formatHex:o1,formatHex8:eq,formatRgb:s1,toString:s1}));function o1(){return`#${Oi(this.r)}${Oi(this.g)}${Oi(this.b)}`}function eq(){return`#${Oi(this.r)}${Oi(this.g)}${Oi(this.b)}${Oi((isNaN(this.opacity)?1:this.opacity)*255)}`}function s1(){const e=hd(this.opacity);return`${e===1?"rgb(":"rgba("}${Ii(this.r)}, ${Ii(this.g)}, ${Ii(this.b)}${e===1?")":`, ${e})`}`}function hd(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ii(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Oi(e){return e=Ii(e),(e<16?"0":"")+e.toString(16)}function l1(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new _r(e,t,r,n)}function XE(e){if(e instanceof _r)return new _r(e.h,e.s,e.l,e.opacity);if(e instanceof uu||(e=kl(e)),!e)return new _r;if(e instanceof _r)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,s=a-i,l=(a+i)/2;return s?(t===a?o=(r-n)/s+(r<n)*6:r===a?o=(n-t)/s+2:o=(t-r)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=l>0&&l<1?0:o,new _r(o,s,l,e.opacity)}function tq(e,t,r,n){return arguments.length===1?XE(e):new _r(e,t,r,n??1)}function _r(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}zy(_r,tq,YE(uu,{brighter(e){return e=e==null?fd:Math.pow(fd,e),new _r(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Sl:Math.pow(Sl,e),new _r(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Pt(Zh(e>=240?e-240:e+120,i,n),Zh(e,i,n),Zh(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new _r(u1(this.h),Vu(this.s),Vu(this.l),hd(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 e=hd(this.opacity);return`${e===1?"hsl(":"hsla("}${u1(this.h)}, ${Vu(this.s)*100}%, ${Vu(this.l)*100}%${e===1?")":`, ${e})`}`}}));function u1(e){return e=(e||0)%360,e<0?e+360:e}function Vu(e){return Math.max(0,Math.min(1,e||0))}function Zh(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Wy=e=>()=>e;function rq(e,t){return function(r){return e+r*t}}function nq(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function iq(e){return(e=+e)==1?QE:function(t,r){return r-t?nq(t,r,e):Wy(isNaN(t)?r:t)}}function QE(e,t){var r=t-e;return r?rq(e,r):Wy(isNaN(e)?t:e)}const c1=function e(t){var r=iq(t);function n(i,a){var o=r((i=ug(i)).r,(a=ug(a)).r),s=r(i.g,a.g),l=r(i.b,a.b),u=QE(i.opacity,a.opacity);return function(f){return i.r=o(f),i.g=s(f),i.b=l(f),i.opacity=u(f),i+""}}return n.gamma=e,n}(1);function aq(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;i<r;++i)n[i]=e[i]*(1-a)+t[i]*a;return n}}function oq(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function sq(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),a=new Array(r),o;for(o=0;o<n;++o)i[o]=zo(e[o],t[o]);for(;o<r;++o)a[o]=t[o];return function(s){for(o=0;o<n;++o)a[o]=i[o](s);return a}}function lq(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function pd(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function uq(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=zo(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var cg=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ep=new RegExp(cg.source,"g");function cq(e){return function(){return e}}function dq(e){return function(t){return e(t)+""}}function fq(e,t){var r=cg.lastIndex=ep.lastIndex=0,n,i,a,o=-1,s=[],l=[];for(e=e+"",t=t+"";(n=cg.exec(e))&&(i=ep.exec(t));)(a=i.index)>r&&(a=t.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:pd(n,i)})),r=ep.lastIndex;return r<t.length&&(a=t.slice(r),s[o]?s[o]+=a:s[++o]=a),s.length<2?l[0]?dq(l[0].x):cq(t):(t=l.length,function(u){for(var f=0,d;f<t;++f)s[(d=l[f]).i]=d.x(u);return s.join("")})}function zo(e,t){var r=typeof t,n;return t==null||r==="boolean"?Wy(t):(r==="number"?pd:r==="string"?(n=kl(t))?(t=n,c1):fq:t instanceof kl?c1:t instanceof Date?lq:oq(t)?aq:Array.isArray(t)?sq:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?uq:pd)(e,t)}function Hy(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function hq(e,t){t===void 0&&(t=e,e=zo);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r<n;)a[r]=e(i,i=t[++r]);return function(o){var s=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return a[s](o-s)}}function pq(e){return function(){return e}}function md(e){return+e}var d1=[0,1];function xt(e){return e}function dg(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:pq(isNaN(t)?NaN:.5)}function mq(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function gq(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i<n?(n=dg(i,n),a=r(o,a)):(n=dg(n,i),a=r(a,o)),function(s){return a(n(s))}}function vq(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),a=new Array(n),o=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<n;)i[o]=dg(e[o],e[o+1]),a[o]=r(t[o],t[o+1]);return function(s){var l=lu(e,s,1,n)-1;return a[l](i[l](s))}}function cu(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Uf(){var e=d1,t=d1,r=zo,n,i,a,o=xt,s,l,u;function f(){var h=Math.min(e.length,t.length);return o!==xt&&(o=mq(e[0],e[h-1])),s=h>2?vq:gq,l=u=null,d}function d(h){return h==null||isNaN(h=+h)?a:(l||(l=s(e.map(n),t,r)))(n(o(h)))}return d.invert=function(h){return o(i((u||(u=s(t,e.map(n),pd)))(
vendor: 4,156 bytes, line 427
427h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,md),f()):e.slice()},d.range=function(h){return arguments.length?(t=Array.from(h),f()):t.slice()},d.rangeRound=function(h){return t=Array.from(h),r=Hy,f()},d.clamp=function(h){return arguments.length?(o=h?!0:xt,f()):o!==xt},d.interpolate=function(h){return arguments.length?(r=h,f()):r},d.unknown=function(h){return arguments.length?(a=h,d):a},function(h,p){return n=h,i=p,f()}}function Ky(){return Uf()(xt,xt)}function yq(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function gd(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function oo(e){return e=gd(Math.abs(e)),e?e[1]:NaN}function bq(e,t){return function(r,n){for(var i=r.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),a.push(r.substring(i-=s,i+s)),!((l+=s+1)>n));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function xq(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var wq=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ol(e){if(!(t=wq.exec(e)))throw new Error("invalid format: "+e);var t;return new qy({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Ol.prototype=qy.prototype;function qy(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}qy.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 _q(e){e:for(var t=e.length,r=1,n=-1,i;r<t;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var vd;function Sq(e,t){var r=gd(e,t);if(!r)return vd=void 0,e.toPrecision(t);var n=r[0],i=r[1],a=i-(vd=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=n.length;return a===o?n:a>o?n+new Array(a-o+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+gd(e,Math.max(0,t+a-1))[0]}function f1(e,t){var r=gd(e,t);if(!r)return e+"";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 h1={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:yq,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>f1(e*100,t),r:f1,s:Sq,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function p1(e){return e}var m1=Array.prototype.map,g1=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function jq(e){var t=e.grouping===void 0||e.thousands===void 0?p1:bq(m1.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?p1:xq(m1.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(d,h){d=Ol(d);var p=d.fill,m=d.align,v=d.sign,b=d.symbol,g=d.zero,y=d.width,x=d.comma,S=d.precision,_=d.trim,w=d.type;w==="n"?(x=!0,w="g"):h1[w]||(S===void 0&&(S=12),_=!0,w="g"),(g||p==="0"&&m==="=")&&(g=!0,p="0",m="=");var j=(h&&h.prefix!==void 0?h.prefix:"")+(b==="$"?r:b==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():""),O=(b==="$"?n:/[%p]/.test(w)?o:"")+(h&&h.suffix!==void 0?h.suffix:""),k=h1[w],A=/[defgprs%]/.test(w);S=S===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function C(P){var B=j,N=O,I,R,D;
vendor: 1,998 bytes, line 427
427if(w==="c")N=k(P)+N,P="";else{P=+P;var $=P<0||1/P<0;if(P=isNaN(P)?l:k(Math.abs(P),S),_&&(P=_q(P)),$&&+P==0&&v!=="+"&&($=!1),B=($?v==="("?v:s:v==="-"||v==="("?"":v)+B,N=(w==="s"&&!isNaN(P)&&vd!==void 0?g1[8+vd/3]:"")+N+($&&v==="("?")":""),A){for(I=-1,R=P.length;++I<R;)if(D=P.charCodeAt(I),48>D||D>57){N=(D===46?i+P.slice(I+1):P.slice(I))+N,P=P.slice(0,I);break}}}x&&!g&&(P=t(P,1/0));var M=B.length+P.length+N.length,U=M<y?new Array(y-M+1).join(p):"";switch(x&&g&&(P=t(U+P,U.length?y-N.length:1/0),U=""),m){case"<":P=B+P+N+U;break;case"=":P=B+U+P+N;break;case"^":P=U.slice(0,M=U.length>>1)+B+P+N+U.slice(M);break;default:P=U+B+P+N;break}return a(P)}return C.toString=function(){return d+""},C}function f(d,h){var p=Math.max(-8,Math.min(8,Math.floor(oo(h)/3)))*3,m=Math.pow(10,-p),v=u((d=Ol(d),d.type="f",d),{suffix:g1[8+p/3]});return function(b){return v(m*b)}}return{format:u,formatPrefix:f}}var Ju,Gy,ZE;kq({thousands:",",grouping:[3],currency:["$",""]});function kq(e){return Ju=jq(e),Gy=Ju.format,ZE=Ju.formatPrefix,Ju}function Oq(e){return Math.max(0,-oo(Math.abs(e)))}function Eq(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(oo(t)/3)))*3-oo(Math.abs(e)))}function Aq(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,oo(t)-oo(e))+1}function eA(e,t,r,n){var i=sg(e,t,r),a;switch(n=Ol(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=Eq(i,o))&&(n.precision=a),ZE(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=Aq(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=Oq(i))&&(n.precision=a-(n.type==="%")*2);break}}return Gy(n)}function ai(e){var t=e.domain;return e.ticks=function(r){var n=t();return ag(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return eA(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,o=n[i],s=n[a],l,u,f=10;for(s<o&&(u=o,o=s,s=u,u=i,i=a,a=u);f-- >0;
vendor: 4,294 bytes, line 427
427){if(u=og(o,s,r),u===l)return n[i]=o,n[a]=s,t(n);if(u>0)o=Math.floor(o/u)*u,s=Math.ceil(s/u)*u;else if(u<0)o=Math.ceil(o*u)/u,s=Math.floor(s*u)/u;else break;l=u}return e},e}function yd(){var e=Ky();return e.copy=function(){return cu(e,yd())},cr.apply(e,arguments),ai(e)}function tA(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,md),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return tA(e).unknown(t)},e=arguments.length?Array.from(e,md):[0,1],ai(r)}function rA(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],o;return a<i&&(o=r,r=n,n=o,o=i,i=a,a=o),e[r]=t.floor(i),e[n]=t.ceil(a),e}function v1(e){return Math.log(e)}function y1(e){return Math.exp(e)}function Pq(e){return-Math.log(-e)}function Nq(e){return-Math.exp(-e)}function Tq(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Cq(e){return e===10?Tq:e===Math.E?Math.exp:t=>Math.pow(e,t)}function $q(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function b1(e){return(t,r)=>-e(-t,r)}function Vy(e){const t=e(v1,y1),r=t.domain;let n=10,i,a;function o(){return i=$q(n),a=Cq(n),r()[0]<0?(i=b1(i),a=b1(a),e(Pq,Nq)):e(v1,y1),t}return t.base=function(s){return arguments.length?(n=+s,o()):n},t.domain=function(s){return arguments.length?(r(s),o()):r()},t.ticks=s=>{const l=r();let u=l[0],f=l[l.length-1];const d=f<u;d&&([u,f]=[f,u]);let h=i(u),p=i(f),m,v;const b=s==null?10:+s;let g=[];if(!(n%1)&&p-h<b){if(h=Math.floor(h),p=Math.ceil(p),u>0){for(;h<=p;++h)for(m=1;m<n;++m)if(v=h<0?m/a(-h):m*a(h),!(v<u)){if(v>f)break;g.push(v)}}else for(;h<=p;++h)for(m=n-1;m>=1;--m)if(v=h>0?m/a(-h):m*a(h),!(v<u)){if(v>f)break;g.push(v)}g.length*2<b&&(g=ag(u,f,b))}else g=ag(h,p,Math.min(p-h,b)).map(a);return d?g.reverse():g},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=Ol(l)).precision==null&&(l.trim=!0),l=Gy(l)),s===1/0)return l;const u=Math.max(1,n*s/t.ticks().length);return f=>{let d=f/a(Math.round(i(f)));return d*n<n-.5&&(d*=n),d<=u?l(f):""}},t.nice=()=>r(rA(r(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function nA(){const e=Vy(Uf()).domain([1,10]);return e.copy=()=>cu(e,nA()).base(e.base()),cr.apply(e,arguments),e}function x1(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function w1(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Jy(e){var t=1,r=e(x1(t),w1(t));return r.constant=function(n){return arguments.length?e(x1(t=+n),w1(t)):t},ai(r)}function iA(){var e=Jy(Uf());return e.copy=function(){return cu(e,iA()).constant(e.constant())},cr.apply(e,arguments)}function _1(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Iq(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Rq(e){return e<0?-e*e:e*e}function Yy(e){var t=e(xt,xt),r=1;function n(){return r===1?e(xt,xt):r===.5?e(Iq,Rq):e(_1(r),_1(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},ai(t)}function Xy(){var e=Yy(Uf());return e.copy=function(){return cu(e,Xy()).exponent(e.exponent())},cr.apply(e,arguments),e}function Mq(){return Xy.apply(null,arguments).exponent(.5)}function S1(e){return Math.sign(e)*e*e}function Dq(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function aA(){var e=Ky(),t=[0,1],r=!1,n;function i(a){var o=Dq(e(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return e.invert(S1(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,md)).map(S1)),i):t.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?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return aA(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},cr.apply(i,arguments),ai(i)}function oA(){var e=[],t=[],r=[],n;function i(){var o=0,s=Math.max(1,t.length);for(r=new Array(s-1);++o<s;)r[o-1]=zK(e,o/s);return a}function a(o){return o==null||isNaN(o=+o)?n:t[lu(r,o)]}return a.invertExtent=function(o){var s=t.indexOf(o);return s<0?[NaN,NaN]:[s>
4270?r[s-1]:e[0],s<r.length?r[s]:e[e.length-1]]},a.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let s of o)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(Jn),i()},a.range=function(o){return arguments.length?(t=Array.from(o),i()):t.slice()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.quantiles=function(){return r.slice()},a.copy=function(){return oA().domain(e).range(t).unknown(n)},cr.apply(a,arguments)}function sA(){var e=0,t=1,r=1,n=[.5],i=[0,1],a;function o(l){return l!=null&&l<=l?i[lu(n,l,0,r)]:a}function s(){var l=-1;for(n=new Array(r);++l<r;)n[l]=((l+1)*t-(l-r)*e)/(r+1);return o}return o.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},o.range=function(l){return arguments.length?(r=(i=Array.from(l)).length-1,s()):i.slice()},o.invertExtent=function(l){var u=i.indexOf(l);return u<0?[NaN,NaN]:u<1?[e,n[0]]:u>=r?[n[r-1],t]:[n[u-1],n[u]]},o.unknown=function(l){return arguments.length&&(a=l),o},o.thresholds=function(){return n.slice()},o.copy=function(){return sA().domain([e,t]).range(i).unknown(a)},cr.apply(ai(o),arguments)}function lA(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[lu(e,a,0,n)]:r}return i.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return lA().domain(e).range(t).unknown(r)},cr.apply(i,arguments)}const tp=new Date,rp=new Date;function Qe(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o<s-a?o:s},i.offset=(a,o)=>(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const l=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a<o)||!(s>0))return l;let u;do l.push(u=new Date(+a)),t(a,s),e(a);while(u<a&&a<o);return l},i.filter=a=>Qe(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),r&&(i.count=(a,o)=>(tp.setTime(+a),rp.setTime(+o),e(tp),e(rp),Math.floor(r(tp,rp))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?o=>n(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const bd=Qe(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);bd.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Qe(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):bd);bd.range;const Zr=1e3,rr=Zr*60,en=rr*60,hn=en*24,Qy=hn*7,j1=hn*30,np=hn*365,Ei=Qe(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Zr)},(e,t)=>(t-e)/Zr,e=>e.getUTCSeconds());Ei.range;const Zy=Qe(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Zr)},(e,t)=>{e.setTime(+e+t*rr)},(e,t)=>(t-e)/rr,e=>e.getMinutes());Zy.range;const e0=Qe(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*rr)},(e,t)=>(t-e)/rr,e=>e.getUTCMinutes());e0.range;const t0=Qe(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Zr-e.getMinutes()*rr)},(e,t)=>{e.setTime(+e+t*en)},(e,t)=>(t-e)/en,e=>e.getHours());t0.range;const r0=Qe(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*en)},(e,t)=>(t-e)/en,e=>e.getUTCHours());r0.range;const du=Qe(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*rr)/hn,e=>e.getDate()-1);du.range;const Ff=Qe(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/hn,e=>e.getUTCDate()-1);Ff.range;const uA=Qe(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/hn,e=>Math.floor(e/hn));uA.range;function Xi(e){return Qe(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*rr)/Qy)}const zf=Xi(0),xd=Xi(1),Lq=Xi(2),Bq=Xi(3),so=Xi(4),Uq=Xi(5),Fq=Xi(6);zf.range;xd.range;Lq.range;Bq.range;so.range;Uq.range;Fq.range;function Qi(e){return Qe(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/Qy)}const Wf=Qi(0),wd=Qi(1),zq=Qi(2),Wq=Qi(3),lo=Qi(4),Hq=Qi(5),Kq=Qi(6);Wf.range;wd.range;zq.range;Wq.range;lo.range;Hq.range;Kq.range;const n0=Qe(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());n0.range;const i0=Qe(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());i0.range;const pn=Qe(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());pn.every=e=>
vendor: 8,163 bytes, line 427
427!isFinite(e=Math.floor(e))||!(e>0)?null:Qe(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});pn.range;const mn=Qe(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());mn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Qe(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});mn.range;function cA(e,t,r,n,i,a){const o=[[Ei,1,Zr],[Ei,5,5*Zr],[Ei,15,15*Zr],[Ei,30,30*Zr],[a,1,rr],[a,5,5*rr],[a,15,15*rr],[a,30,30*rr],[i,1,en],[i,3,3*en],[i,6,6*en],[i,12,12*en],[n,1,hn],[n,2,2*hn],[r,1,Qy],[t,1,j1],[t,3,3*j1],[e,1,np]];function s(u,f,d){const h=f<u;h&&([u,f]=[f,u]);const p=d&&typeof d.range=="function"?d:l(u,f,d),m=p?p.range(u,+f+1):[];return h?m.reverse():m}function l(u,f,d){const h=Math.abs(f-u)/d,p=Uy(([,,b])=>b).right(o,h);if(p===o.length)return e.every(sg(u/np,f/np,d));if(p===0)return bd.every(Math.max(sg(u,f,d),1));const[m,v]=o[h/o[p-1][2]<o[p][2]/h?p-1:p];return m.every(v)}return[s,l]}const[qq,Gq]=cA(mn,i0,Wf,uA,r0,e0),[Vq,Jq]=cA(pn,n0,zf,du,t0,Zy);function ip(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function ap(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function os(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function Yq(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,l=e.shortMonths,u=ss(i),f=ls(i),d=ss(a),h=ls(a),p=ss(o),m=ls(o),v=ss(s),b=ls(s),g=ss(l),y=ls(l),x={a:D,A:$,b:M,B:U,c:null,d:N1,e:N1,f:b9,g:P9,G:T9,H:g9,I:v9,j:y9,L:dA,m:x9,M:w9,p:H,q:W,Q:$1,s:I1,S:_9,u:S9,U:j9,V:k9,w:O9,W:E9,x:null,X:null,y:A9,Y:N9,Z:C9,"%":C1},S={a:X,A:le,b:Ee,B:De,c:null,d:T1,e:T1,f:M9,g:q9,G:V9,H:$9,I:I9,j:R9,L:hA,m:D9,M:L9,p:Vt,q:jt,Q:$1,s:I1,S:B9,u:U9,U:F9,V:z9,w:W9,W:H9,x:null,X:null,y:K9,Y:G9,Z:J9,"%":C1},_={a:A,A:C,b:P,B,c:N,d:A1,e:A1,f:f9,g:E1,G:O1,H:P1,I:P1,j:l9,L:d9,m:s9,M:u9,p:k,q:o9,Q:p9,s:m9,S:c9,u:t9,U:r9,V:n9,w:e9,W:i9,x:I,X:R,y:E1,Y:O1,Z:a9,"%":h9};x.x=w(r,x),x.X=w(n,x),x.c=w(t,x),S.x=w(r,S),S.X=w(n,S),S.c=w(t,S);function w(G,re){return function(ne){var F=[],$e=-1,ue=0,Ke=G.length,qe,kt,jn;for(ne instanceof Date||(ne=new Date(+ne));++$e<Ke;)G.charCodeAt($e)===37&&(F.push(G.slice(ue,$e)),(kt=k1[qe=G.charAt(++$e)])!=null?qe=G.charAt(++$e):kt=qe==="e"?" ":"0",(jn=re[qe])&&(qe=jn(ne,kt)),F.push(qe),ue=$e+1);return F.push(G.slice(ue,$e)),F.join("")}}function j(G,re){return function(ne){var F=os(1900,void 0,1),$e=O(F,G,ne+="",0),ue,Ke;if($e!=ne.length)return null;if("Q"in F)return new Date(F.Q);if("s"in F)return new Date(F.s*1e3+("L"in F?F.L:0));if(re&&!("Z"in F)&&(F.Z=0),"p"in F&&(F.H=F.H%12+F.p*12),F.m===void 0&&(F.m="q"in F?F.q:0),"V"in F){if(F.V<1||F.V>53)return null;"w"in F||(F.w=1),"Z"in F?(ue=ap(os(F.y,0,1)),Ke=ue.getUTCDay(),ue=Ke>4||Ke===0?wd.ceil(ue):wd(ue),ue=Ff.offset(ue,(F.V-1)*7),F.y=ue.getUTCFullYear(),F.m=ue.getUTCMonth(),F.d=ue.getUTCDate()+(F.w+6)%7):(ue=ip(os(F.y,0,1)),Ke=ue.getDay(),ue=Ke>4||Ke===0?xd.ceil(ue):xd(ue),ue=du.offset(ue,(F.V-1)*7),F.y=ue.getFullYear(),F.m=ue.getMonth(),F.d=ue.getDate()+(F.w+6)%7)}else("W"in F||"U"in F)&&("w"in F||(F.w="u"in F?F.u%7:"W"in F?1:0),Ke="Z"in F?ap(os(F.y,0,1)).getUTCDay():ip(os(F.y,0,1)).getDay(),F.m=0,F.d="W"in F?(F.w+6)%7+F.W*7-(Ke+5)%7:F.w+F.U*7-(Ke+6)%7);return"Z"in F?(F.H+=F.Z/100|0,F.M+=F.Z%100,ap(F)):ip(F)}}function O(G,re,ne,F){for(var $e=0,ue=re.length,Ke=ne.length,qe,kt;$e<ue;){if(F>=Ke)return-1;if(qe=re.charCodeAt($e++),qe===37){if(qe=re.charAt($e++),kt=_[qe in k1?re.charAt($e++):qe],!kt||(F=kt(G,ne,F))<0)return-1}else if(qe!=ne.charCodeAt(F++))return-1}return F}function k(G,re,ne){var F=u.exec(re.slice(ne));return F?(G.p=f.get(F[0].toLowerCase()),ne+F[0].length):-1}function A(G,re,ne){var F=p.exec(re.slice(ne));return F?(G.w=m.get(F[0].toLowerCase()),ne+F[0].length):-1}function C(G,re,ne){var F=d.exec(re.slice(ne));return F?(G.w=h.get(F[0].toLowerCase()),ne+F[0].length):-1}function P(G,re,ne){var F=g.exec(re.slice(ne));return F?(G.m=y.get(F[0].toLowerCase()),ne+F[0].length):-1}function B(G,re,ne){var F=v.exec(re.slice(ne));return F?(G.m=b.get(F[0].toLowerCase()),ne+F[0].length):-1}function N(G,re,ne){return O(G,t,re,ne)}function I(G,re,ne){return O(G,r,re,ne)}function R(G,re,ne){return O(G,n,re,ne)}function D(G){return o[G.getDay()]}function $(G){return a[G.getDay()]}function M(G){return l[G.getMonth()]}function U(G){return s[G.getMonth()]}function H(G){return i[+(G.getHours()>=12)]}function W(G){return 1+~~(G.getMonth()/3)}function X(G){return o[G.getUTCDay()]}function le(G){return a[G.getUTCDay()]}function Ee(G){return l[G.getUTCMonth()]}function De(G){return s[G.getUTCMonth()]}function Vt(G){return i[+(G.getUTCHours()>=12)]}function jt(G){return 1+~~(G.getUTCMonth()/3)}return{format:function(G){var re=w(G+="",x);return re.toString=function(){return G},re},parse:function(G){var re=j(G+="",!1);return re.toString=function(){return G},re},utcFormat:function(G){var re=w(G+="",S);return re.toString=function(){return G},re},utcParse:function(G){var re=j(G+="",!0);return re.toString=function(){return G},re}}}var k1={"-":"",_:" ",0:"0"},nt=/^\s*\d+/,Xq=/^%/,Qq=/[\\^$*+?|[\]().{}]/g;function fe(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(t)+i:i)}function Zq(e){return e.replace(Qq,"\\$&")}function ss(e){return new RegExp("^(?:"+e.map(Zq).join("|")+")","i")}function ls(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function e9(e,t,r){var n=nt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function t9(e,t,r){var n=nt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function r9(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function n9(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function i9(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function O1(e,t,r){var n=nt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function E1(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function a9(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function o9(e,t,r){var n=nt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function s9(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function A1(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function l9(e,t,r){var n=nt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function P1(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function u9(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function c9(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function d9(e,t,r){var n=nt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function f9(e,t,r){var n=nt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function h9(e,t,r){var n=Xq.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function p9(e,t,r){var n=nt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function m9(e,t,r){var n=nt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function N1(e,t){return fe(e.getDate(),t,2)}function g9(e,t){return fe(e.getHours(),t,2)}function v9(e,t){return fe(e.getHours()%12||12,t,2)}function y9(e,t){return fe(1+du.count(pn(e),e),t,3)}function dA(e,t){return fe(e.getMilliseconds(),t,3)}function b9(e,t){return dA(e,t)+"000"}function x9(e,t){return fe(e.getMonth()+1,t,2)}function w9(e,t){return fe(e.getMinutes(),t,2)}function _9(e,t){return fe(e.getSeconds(),t,2)}function S9(e){var t=e.getDay();return t===0?7:t}function j9(e,t){return fe(zf.count(pn(e)-1,e),t,2)}function fA(e){var t=e.getDay();return t>=4||t===0?so(e):so.ceil(e)}
427function k9(e,t){return e=fA(e),fe(so.count(pn(e),e)+(pn(e).getDay()===4),t,2)}function O9(e){return e.getDay()}function E9(e,t){return fe(xd.count(pn(e)-1,e),t,2)}function A9(e,t){return fe(e.getFullYear()%100,t,2)}function P9(e,t){return e=fA(e),fe(e.getFullYear()%100,t,2)}function N9(e,t){return fe(e.getFullYear()%1e4,t,4)}function T9(e,t){var r=e.getDay();return e=r>=4||r===0?so(e):so.ceil(e),fe(e.getFullYear()%1e4,t,4)}function C9(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+fe(t/60|0,"0",2)+fe(t%60,"0",2)}function T1(e,t){return fe(e.getUTCDate(),t,2)}function $9(e,t){return fe(e.getUTCHours(),t,2)}function I9(e,t){return fe(e.getUTCHours()%12||12,t,2)}function R9(e,t){return fe(1+Ff.count(mn(e),e),t,3)}function hA(e,t){return fe(e.getUTCMilliseconds(),t,3)}function M9(e,t){return hA(e,t)+"000"}function D9(e,t){return fe(e.getUTCMonth()+1,t,2)}function L9(e,t){return fe(e.getUTCMinutes(),t,2)}function B9(e,t){return fe(e.getUTCSeconds(),t,2)}function U9(e){var t=e.getUTCDay();return t===0?7:t}function F9(e,t){return fe(Wf.count(mn(e)-1,e),t,2)}function pA(e){var t=e.getUTCDay();return t>=4||t===0?lo(e):lo.ceil(e)}function z9(e,t){return e=pA(e),fe(lo.count(mn(e),e)+(mn(e).getUTCDay()===4),t,2)}function W9(e){return e.getUTCDay()}function H9(e,t){return fe(wd.count(mn(e)-1,e),t,2)}function K9(e,t){return fe(e.getUTCFullYear()%100,t,2)}function q9(e,t){return e=pA(e),fe(e.getUTCFullYear()%100,t,2)}function G9(e,t){return fe(e.getUTCFullYear()%1e4,t,4)}function V9(e,t){var r=e.getUTCDay();return e=r>=4||r===0?lo(e):lo.ceil(e),fe(e.getUTCFullYear()%1e4,t,4)}function J9(){return"+0000"}function C1(){return"%"}function $1(e){return+e}function I1(e){return Math.floor(+e/1e3)}var ca,mA,gA;Y9({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 Y9(e){return ca=Yq(e),mA=ca.format,ca.parse,gA=ca.utcFormat,ca.utcParse,ca}function X9(e){return new Date(e)}function Q9(e){return e instanceof Date?+e:+new Date(+e)}function a0(e,t,r,n,i,a,o,s,l,u){var f=Ky(),d=f.invert,h=f.domain,p=u(".%L"),m=u(":%S"),v=u("%I:%M"),b=u("%I %p"),g=u("%a %d"),y=u("%b %d"),x=u("%B"),S=u("%Y");function _(w){return(l(w)<w?p:s(w)<w?m:o(w)<w?v:a(w)<w?b:n(w)<w?i(w)<w?g:y:r(w)<w?x:S)(w)}return f.invert=function(w){return new Date(d(w))},f.domain=function(w){return arguments.length?h(Array.from(w,Q9)):h().map(X9)},f.ticks=function(w){var j=h();return e(j[0],j[j.length-1],w??10)},f.tickFormat=function(w,j){return j==null?_:u(j)},f.nice=function(w){var j=h();return(!w||typeof w.range!="function")&&(w=t(j[0],j[j.length-1],w??10)),w?h(rA(j,w)):f},f.copy=function(){return cu(f,a0(e,t,r,n,i,a,o,s,l,u))},f}function Z9(){return cr.apply(a0(Vq,Jq,pn,n0,zf,du,t0,Zy,Ei,mA).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function eG(){return cr.apply(a0(qq,Gq,mn,i0,Wf,Ff,r0,e0,Ei,gA).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Hf(){var e=0,t=1,r,n,i,a,o=xt,s=!1,l;function u(d){return d==null||isNaN(d=+d)?l:o(i===0?.5:(d=(a(d)-r)*i,s?Math.max(0,Math.min(1,d)):d))}u.domain=function(d){return arguments.length?([e,t]=d,r=a(e=+e),n=a(t=+t),i=r===n?0:1/(n-r),u):[e,t]},u.clamp=function(d){return arguments.length?(s=!!d,u):s},u.interpolator=function(d){return arguments.length?(o=d,u):o};function f(d){return function(h){var p,m;return arguments.length?([p,m]=h,o=d(p,m),u):[o(0),o(1)]}}return u.range=f(zo),u.rangeRound=f(Hy),u.unknown=function(d){return arguments.length?(l=d,u):l},function(d){return a=d,r=d(e),n=d(t),i=r===n?0:1/(n-r),u}}function oi(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function vA(){var e=ai(Hf()(xt));return e.copy=function(){return oi(e,vA())},Sn.apply(e,arguments)}function yA(){var e=Vy(Hf()).domain([1,10]);return e.copy=function(){return oi(e,yA()).base(e.base())},Sn.apply(e,arguments)}function bA(){var e=Jy(Hf());return e.copy=function(){return oi(e,bA()).constant(e.constant())},Sn.apply(e,arguments)}function o0(){var e=Yy(Hf());return e.copy=function(){return oi(e,o0()).exponent(e.exponent())},Sn.apply(e,arguments)}function tG(){return o0.apply(null,arguments).exponent(.5)}function xA(){var e=[],t=xt;function r(n){if(n!=null&&!isNaN(n=+n))return t((lu(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let i of n)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(Jn),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,i)=>t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>FK(e,a/n))},r.copy=function(){return xA(t).domain(e)},Sn.apply(r,arguments)}function Kf(){var e=0,t=.5,r=1,n=1,i,a,o,s,l,u=xt,f,d=!1,h;function p(v){return isNaN(v=+v)?h:(v=.5+((v=+f(v))-a)*(n*v<n*a?s:l),u(d?Math.max(0,Math.min(1,v)):v))}p.domain=function(v){return arguments.length?([e,t,r]=v,i=f(e=+e),a=f(t=+t),o=f(r=+r),s=i===a?0:.5/(a-i),l=a===o?0:.5/(o-a),n=a<i?-1:1,p):[e,t,r]},p.clamp=function(v){return arguments.length?(d=!!v,p):d},p.interpolator=function(v){return arguments.length?(u=v,p):u};function m(v){return function(b){var g,y,x;
vendor: 68,498 bytes, lines 427-453
427return arguments.length?([g,y,x]=b,u=hq(v,[g,y,x]),p):[u(0),u(.5),u(1)]}}return p.range=m(zo),p.rangeRound=m(Hy),p.unknown=function(v){return arguments.length?(h=v,p):h},function(v){return f=v,i=v(e),a=v(t),o=v(r),s=i===a?0:.5/(a-i),l=a===o?0:.5/(o-a),n=a<i?-1:1,p}}function wA(){var e=ai(Kf()(xt));return e.copy=function(){return oi(e,wA())},Sn.apply(e,arguments)}function _A(){var e=Vy(Kf()).domain([.1,1,10]);return e.copy=function(){return oi(e,_A()).base(e.base())},Sn.apply(e,arguments)}function SA(){var e=Jy(Kf());return e.copy=function(){return oi(e,SA()).constant(e.constant())},Sn.apply(e,arguments)}function s0(){var e=Yy(Kf());return e.copy=function(){return oi(e,s0()).exponent(e.exponent())},Sn.apply(e,arguments)}function rG(){return s0.apply(null,arguments).exponent(.5)}const R1=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:_l,scaleDiverging:wA,scaleDivergingLog:_A,scaleDivergingPow:s0,scaleDivergingSqrt:rG,scaleDivergingSymlog:SA,scaleIdentity:tA,scaleImplicit:lg,scaleLinear:yd,scaleLog:nA,scaleOrdinal:Fy,scalePoint:Ms,scalePow:Xy,scaleQuantile:oA,scaleQuantize:sA,scaleRadial:aA,scaleSequential:vA,scaleSequentialLog:yA,scaleSequentialPow:o0,scaleSequentialQuantile:xA,scaleSequentialSqrt:tG,scaleSequentialSymlog:bA,scaleSqrt:Mq,scaleSymlog:iA,scaleThreshold:lA,scaleTime:Z9,scaleUtc:eG,tickFormat:eA},Symbol.toStringTag,{value:"Module"}));var nG=$o;function iG(e,t,r){for(var n=-1,i=e.length;++n<i;){var a=e[n],o=t(a);if(o!=null&&(s===void 0?o===o&&!nG(o):r(o,s)))var s=o,l=a}return l}var jA=iG;function aG(e,t){return e>t}var oG=aG,sG=jA,lG=oG,uG=Uo;function cG(e){return e&&e.length?sG(e,uG,lG):void 0}var dG=cG;const qf=be(dG);function fG(e,t){return e<t}var hG=fG,pG=jA,mG=hG,gG=Uo;function vG(e){return e&&e.length?pG(e,gG,mG):void 0}var yG=vG;const Gf=be(yG);var bG=wy,xG=ii,wG=IE,_G=$t;function SG(e,t){var r=_G(e)?bG:wG;return r(e,xG(t))}var jG=SG,kG=CE,OG=jG;function EG(e,t){return kG(OG(e,t),1)}var AG=EG;const PG=be(AG);var NG=My;function TG(e,t){return NG(e,t)}var CG=TG;const Vf=be(CG);var Wo=1e9,$G={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},u0,Pe=!0,lr="[DecimalError] ",Ri=lr+"Invalid argument: ",l0=lr+"Exponent out of range: ",Ho=Math.floor,bi=Math.pow,IG=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Ft,et=1e7,ke=7,kA=9007199254740991,_d=Ho(kA/ke),J={};J.absoluteValue=J.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};J.comparedTo=J.cmp=function(e){var t,r,n,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(n=a.d.length,i=e.d.length,t=0,r=n<i?n:i;t<r;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1};J.decimalPlaces=J.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*ke;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};J.dividedBy=J.div=function(e){return on(this,new this.constructor(e))};J.dividedToIntegerBy=J.idiv=function(e){var t=this,r=t.constructor;return ye(on(t,new r(e),0,1),r.precision)};J.equals=J.eq=function(e){return!this.cmp(e)};J.exponent=function(){return He(this)};J.greaterThan=J.gt=function(e){return this.cmp(e)>0};J.greaterThanOrEqualTo=J.gte=function(e){return this.cmp(e)>=0};J.isInteger=J.isint=function(){return this.e>this.d.length-2};J.isNegative=J.isneg=function(){return this.s<0};J.isPositive=J.ispos=function(){return this.s>0};J.isZero=function(){return this.s===0};J.lessThan=J.lt=function(e){return this.cmp(e)<0};J.lessThanOrEqualTo=J.lte=function(e){return this.cmp(e)<1};J.logarithm=J.log=function(e){var t,r=this,n=r.constructor,i=n.precision,a=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Ft))throw Error(lr+"NaN");if(r.s<1)throw Error(lr+(r.s?"NaN":"-Infinity"));return r.eq(Ft)?new n(0):(Pe=!1,t=on(El(r,a),El(e,a),a),Pe=!0,ye(t,i))};J.minus=J.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?AA(t,e):OA(t,(e.s=-e.s,e))};J.modulo=J.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(lr+"NaN");return r.s?(Pe=!1,t=on(r,e,0,1).times(e),Pe=!0,r.minus(t)):ye(new n(r),i)};J.naturalExponential=J.exp=function(){return EA(this)};J.naturalLogarithm=J.ln=function(){return El(this)};J.negated=J.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};J.plus=J.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?OA(t,e):AA(t,(e.s=-e.s,e))};J.precision=J.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ri+e);if(t=He(i)+1,n=i.d.length-1,r=n*ke+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};J.squareRoot=J.sqrt=function(){var e,t,r,n,i,a,o,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(lr+"NaN")}for(e=He(s),Pe=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=Rr(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Ho((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new l(t)):n=new l(i.toString()),r=l.precision,i=o=r+3;;)if(a=n,n=a.plus(on(s,a,o+2)).times(.5),Rr(a.d).slice(0,o)===(t=Rr(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(ye(a,r+1,0),a.times(a).eq(s)){n=a;break}}else if(t!="9999")break;o+=4}return Pe=!0,ye(n,r)};J.times=J.mul=function(e){var t,r,n,i,a,o,s,l,u,f=this,d=f.constructor,h=f.d,p=(e=new d(e)).d;if(!f.s||!e.s)return new d(0);for(e.s*=f.s,r=f.e+e.e,l=h.length,u=p.length,l<u&&(a=h,h=p,p=a,o=l,l=u,u=o),a=[],o=l+u,n=o;n--;)a.push(0);for(n=u;--n>=0;){for(t=0,i=l+n;i>n;)s=a[i]+p[n]*h[i-n-1]+t,a[i--]=s%et|0,t=s/et|0;a[i]=(a[i]+t)%et|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,Pe?ye(e,d.precision):e};J.toDecimalPlaces=J.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Fr(e,0,Wo),t===void 0?t=n.rounding:Fr(t,0,8),ye(r,e+He(r)+1,t))};J.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Ki(n,!0):(Fr(e,0,Wo),t===void 0?t=i.rounding:Fr(t,0,8),n=ye(new i(n),e+1,t),r=Ki(n,!0,e+1)),r};J.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?Ki(i):(Fr(e,0,Wo),t===void 0?t=a.rounding:Fr(t,0,8),n=ye(new a(i),e+He(i)+1,t),r=Ki(n.abs(),!1,e+He(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};J.toInteger=J.toint=function(){var e=this,t=e.constructor;return ye(new t(e),He(e)+1,t.rounding)};J.toNumber=function(){return+this};J.toPower=J.pow=function(e){var t,r,n,i,a,o,s=this,l=s.constructor,u=12,f=+(e=new l(e));if(!e.s)return new l(Ft);if(s=new l(s),!s.s){if(e.s<1)throw Error(lr+"Infinity");return s}if(s.eq(Ft))return s;if(n=l.precision,e.eq(Ft))return ye(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,a=s.s,o){if((r=f<0?-f:f)<=kA){for(i=new l(Ft),t=Math.ceil(n/ke+4),Pe=!1;r%2&&(i=i.times(s),D1(i.d,t)),r=Ho(r/2),r!==0;)s=s.times(s),D1(s.d,t);return Pe=!0,e.s<0?new l(Ft).div(i):ye(i,n)}}else if(a<0)throw Error(lr+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,Pe=!1,i=e.times(El(s,n+u)),Pe=!0,i=EA(i),i.s=a,i};J.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=He(i),n=Ki(i,r<=a.toExpNeg||r>=a.toExpPos)):(Fr(e,1,Wo),t===void 0?t=a.rounding:Fr(t,0,8),i=ye(new a(i),e,t),r=He(i),n=Ki(i,e<=r||r<=a.toExpNeg,e)),n};J.toSignificantDigits=J.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Fr(e,1,Wo),t===void 0?t=n.rounding:Fr(t,0,8)),ye(new n(r),e,t)};J.toString=J.valueOf=J.val=J.toJSON=J[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=He(e),r=e.constructor;return Ki(e,t<=r.toExpNeg||t>=r.toExpPos)};function OA(e,t){var r,n,i,a,o,s,l,u,f=e.constructor,d=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),Pe?ye(t,d):t;if(l=e.d,u=t.d,o=e.e,i=t.e,l=l.slice(),a=o-i,a){for(a<0?(n=l,a=-a,s=u.length):(n=u,i=o,s=l.length),o=Math.ceil(d/ke),s=o>s?o+1:s+1,a>s&&(a=s,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(s=l.length,a=u.length,s-a<0&&(a=s,n=u,u=l,l=n),r=0;a;)r=(l[--a]=l[a]+u[a]+r)/et|0,l[a]%=et;for(r&&(l.unshift(r),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,Pe?ye(t,d):t}function Fr(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Ri+e)}function Rr(e){var t,r,n,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)n=e[t]+"",r=ke-n.length,r&&(a+=An(r)),a+=n;o=e[t],n=o+"",r=ke-n.length,r&&(a+=An(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return a+o}var on=function(){function e(n,i){var a,o=0,s=n.length;for(n=n.slice();s--;)a=n[s]*i+o,n[s]=a%et|0,o=a/et|0;return o&&n.unshift(o),n}function t(n,i,a,o){var s,l;if(a!=o)l=a>o?1:-1;else for(s=l=0;s<a;s++)if(n[s]!=i[s]){l=n[s]>i[s]?1:-1;break}return l}function r(n,i,a){for(var o=0;a--;)n[a]-=o,o=n[a]<i[a]?1:0,n[a]=o*et+n[a]-i[a];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,a,o){var s,l,u,f,d,h,p,m,v,b,g,y,x,S,_,w,j,O,k=n.constructor,A=n.s==i.s?1:-1,C=n.d,P=i.d;if(!n.s)return new k(n);if(!i.s)throw Error(lr+"Division by zero");for(l=n.e-i.e,j=P.length,_=C.length,p=new k(A),m=p.d=[],u=0;P[u]==(C[u]||0);)++u;if(P[u]>(C[u]||0)&&--l,a==null?y=a=k.precision:o?y=a+(He(n)-He(i))+1:y=a,y<0)return new k(0);if(y=y/ke+2|0,u=0,j==1)for(f=0,P=P[0],y++;(u<_||f)&&y--;u++)x=f*et+(C[u]||0),m[u]=x/P|0,f=x%P|0;else{for(f=et/(P[0]+1)|0,f>1&&(P=e(P,f),C=e(C,f),j=P.length,_=C.length),S=j,v=C.slice(0,j),b=v.length;b<j;)v[b++]=0;O=P.slice(),O.unshift(0),w=P[0],P[1]>=et/2&&++w;do f=0,s=t(P,v,j,b),s<0?(g=v[0],j!=b&&(g=g*et+(v[1]||0)),f=g/w|0,f>1?(f>=et&&(f=et-1),d=e(P,f),h=d.length,b=v.length,s=t(d,v,h,b),s==1&&(f--,r(d,j<h?O:P,h))):(f==0&&(s=f=1),d=P.slice()),h=d.length,h<b&&d.unshift(0),r(v,d,b),s==-1&&(b=v.length,s=t(P,v,j,b),s<1&&(f++,r(v,j<b?O:P,b))),b=v.length):s===0&&(f++,v=[0]),m[u++]=f,s&&v[0]?v[b++]=C[S]||0:(v=[C[S]],b=1);while((S++<_||v[0]!==void 0)&&y--)}return m[0]||m.shift(),p.e=l,ye(p,o?a+He(p)+1:a)}}();function EA(e,t){var r,n,i,a,o,s,l=0,u=0,f=e.constructor,d=f.precision;if(He(e)>16)throw Error(l0+He(e));if(!e.s)return new f(Ft);for(Pe=!1,s=d,o=new f(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(n=Math.log(bi(2,u))/Math.LN10*2+5|0,s+=n,r=i=a=new f(Ft),f.precision=s;;){if(i=ye(i.times(e),s),r=r.times(++l),o=a.plus(on(i,r,s)),Rr(o.d).slice(0,s)===Rr(a.d).slice(0,s)){for(;u--;)a=ye(a.times(a),s);return f.precision=d,t==null?(Pe=!0,ye(a,d)):a}a=o}}function He(e){for(var t=e.e*ke,r=e.d[0];r>=10;r/=10)t++;return t}function op(e,t,r){if(t>e.LN10.sd())throw Pe=!0,r&&(e.precision=r),Error(lr+"LN10 precision limit exceeded");return ye(new e(e.LN10),t)}function An(e){for(var t="";e--;)t+="0";return t}function El(e,t){var r,n,i,a,o,s,l,u,f,d=1,h=10,p=e,m=p.d,v=p.constructor,b=v.precision;if(p.s<1)throw Error(lr+(p.s?"NaN":"-Infinity"));if(p.eq(Ft))return new v(0);if(t==null?(Pe=!1,u=b):u=t,p.eq(10))return t==null&&(Pe=!0),op(v,u);if(u+=h,v.precision=u,r=Rr(m),n=r.charAt(0),a=He(p),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)p=p.times(e),r=Rr(p.d),n=r.charAt(0),d++;a=He(p),n>1?(p=new v("0."+r),a++):p=new v(n+"."+r.slice(1))}else return l=op(v,u+2,b).times(a+""),p=El(new v(n+"."+r.slice(1)),u-h).plus(l),v.precision=b,t==null?(Pe=!0,ye(p,b)):p;for(s=o=p=on(p.minus(Ft),p.plus(Ft),u),f=ye(p.times(p),u),i=3;;){if(o=ye(o.times(f),u),l=s.plus(on(o,new v(i),u)),Rr(l.d).slice(0,u)===Rr(s.d).slice(0,u))return s=s.times(2),a!==0&&(s=s.plus(op(v,u+2,b).times(a+""))),s=on(s,new v(d),u),v.precision=b,t==null?(Pe=!0,ye(s,b)):s;s=l,i+=2}}function M1(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=Ho(r/ke),e.d=[],n=(r+1)%ke,r<0&&(n+=ke),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=ke;n<i;)e.d.push(+t.slice(n,n+=ke));t=t.slice(n),n=ke-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),Pe&&(e.e>_d||e.e<-_d))throw Error(l0+r)}else e.s=0,e.e=0,e.d=[0];return e}function ye(e,t,r){var n,i,a,o,s,l,u,f,d=e.d;for(o=1,a=d[0];a>=10;a/=10)o++;if(n=t-o,n<0)n+=ke,i=t,u=d[f=0];else{if(f=Math.ceil((n+1)/ke),a=d.length,f>=a)return e;for(u=a=d[f],o=1;a>=10;a/=10)o++;n%=ke,i=n-ke+o}if(r!==void 0&&(a=bi(10,o-i-1),s=u/a%10|0,l=t<0||d[f+1]!==void 0||u%a,l=r<4?(s||l)&&(r==0||r==(e.s<0?3:2)):s>5||s==5&&(r==4||l||r==6&&(n>0?i>0?u/bi(10,o-i):0:d[f-1])%10&1||r==(e.s<0?8:7))),t<1||!d[0])return l?(a=He(e),d.length=1,t=t-a-1,d[0]=bi(10,(ke-t%ke)%ke),e.e=Ho(-t/ke)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(n==0?(d.length=f,a=1,f--):(d.length=f+1,a=bi(10,ke-n),d[f]=i>0?(u/bi(10,o-i)%bi(10,i)|0)*a:0),l)for(;;)if(f==0){(d[0]+=a)==et&&(d[0]=1,++e.e);break}else{if(d[f]+=a,d[f]!=et)break;d[f--]=0,a=1}for(n=d.length;d[--n]===0;)d.pop();if(Pe&&(e.e>_d||e.e<-_d))throw Error(l0+He(e));return e}function AA(e,t){var r,n,i,a,o,s,l,u,f,d,h=e.constructor,p=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),Pe?ye(t,p):t;if(l=e.d,d=t.d,n=t.e,u=e.e,l=l.slice(),o=u-n,o){for(f=o<0,f?(r=l,o=-o,s=d.length):(r=d,n=u,s=l.length),i=Math.max(Math.ceil(p/ke),s)+2,o>i&&(o=i,r.length=1),r.reverse(),i=o;i--;)r.push(0);r.reverse()}else{for(i=l.length,s=d.length,f=i<s,f&&(s=i),i=0;i<s;i++)if(l[i]!=d[i]){f=l[i]<d[i];break}o=0}for(f&&(r=l,l=d,d=r,t.s=-t.s),s=l.length,i=d.length-s;i>0;--i)l[s++]=0;for(i=d.length;i>o;){if(l[--i]<d[i]){for(a=i;a&&l[--a]===0;)l[a]=et-1;--l[a],l[i]+=et}l[i]-=d[i]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--n;return l[0]?(t.d=l,t.e=n,Pe?ye(t,p):t):new h(0)}function Ki(e,t,r){var n,i=He(e),a=Rr(e.d),o=a.length;return t?(r&&(n=r-o)>0?a=a.charAt(0)+"."+a.slice(1)+An(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+An(-i-1)+a,r&&(n=r-o)>0&&(a+=An(n))):i>=o?(a+=An(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+An(n))):((n=i+1)<o&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-o)>0&&(i+1===o&&(a+="."),a+=An(n))),e.s<0?"-"+a:a}function D1(e,t){if(e.length>t)return e.length=t,!0}function PA(e){var t,r,n;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Ri+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return M1(o,a.toString())}else if(typeof a!="string")throw Error(Ri+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,IG.test(a))M1(o,a);else throw Error(Ri+a)}if(i.prototype=J,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=PA,i.config=i.set=RG,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return i.config(e),i}function RG(e){if(!e||typeof e!="object")throw Error(lr+"Object expected");var t,r,n,i=["precision",1,Wo,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((n=e[r=i[t]])!==void 0)if(Ho(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Ri+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Ri+r+": "+n);return this}var u0=PA($G);Ft=new u0(1);const ge=u0;function MG(e){return UG(e)||BG(e)||LG(e)||DG()}function DG(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
428In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LG(e,t){if(e){if(typeof e=="string")return fg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return fg(e,t)}}function BG(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function UG(e){if(Array.isArray(e))return fg(e)}function fg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var FG=function(t){return t},NA={},TA=function(t){return t===NA},L1=function(t){return function r(){return arguments.length===0||arguments.length===1&&TA(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},zG=function e(t,r){return t===1?r:L1(function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];var o=i.filter(function(s){return s!==NA}).length;return o>=t?r.apply(void 0,i):e(t-o,L1(function(){for(var s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];var f=i.map(function(d){return TA(d)?l.shift():d});return r.apply(void 0,MG(f).concat(l))}))})},Jf=function(t){return zG(t.length,t)},hg=function(t,r){for(var n=[],i=t;i<r;++i)n[i-t]=i;return n},WG=Jf(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),HG=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return FG;var i=r.reverse(),a=i[0],o=i.slice(1);return function(){return o.reduce(function(s,l){return l(s)},a.apply(void 0,arguments))}},pg=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},CA=function(t){var r=null,n=null;return function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return r&&a.every(function(s,l){return s===r[l]})||(r=a,n=t.apply(void 0,a)),n}};function KG(e){var t;return e===0?t=1:t=Math.floor(new ge(e).abs().log(10).toNumber())+1,t}function qG(e,t,r){for(var n=new ge(e),i=0,a=[];n.lt(t)&&i<1e5;)a.push(n.toNumber()),n=n.add(r),i++;return a}var GG=Jf(function(e,t,r){var n=+e,i=+t;return n+r*(i-n)}),VG=Jf(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),JG=Jf(function(e,t,r){var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});const Yf={rangeStep:qG,getDigitCount:KG,interpolateNumber:GG,uninterpolateNumber:VG,uninterpolateTruncation:JG};function mg(e){return QG(e)||XG(e)||$A(e)||YG()}function YG(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
429In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function XG(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function QG(e){if(Array.isArray(e))return gg(e)}function Al(e,t){return tV(e)||eV(e,t)||$A(e,t)||ZG()}function ZG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
430In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $A(e,t){if(e){if(typeof e=="string")return gg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return gg(e,t)}}function gg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function eV(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(n=(s=o.next()).done)&&(r.push(s.value),!(t&&r.length===t));n=!0);}catch(l){i=!0,a=l}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw a}}return r}}function tV(e){if(Array.isArray(e))return e}function IA(e){var t=Al(e,2),r=t[0],n=t[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]}function RA(e,t,r){if(e.lte(0))return new ge(0);var n=Yf.getDigitCount(e.toNumber()),i=new ge(10).pow(n),a=e.div(i),o=n!==1?.05:.1,s=new ge(Math.ceil(a.div(o).toNumber())).add(r).mul(o),l=s.mul(i);return t?l:new ge(Math.ceil(l))}function rV(e,t,r){var n=1,i=new ge(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new ge(10).pow(Yf.getDigitCount(e)-1),i=new ge(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new ge(Math.floor(e)))}else e===0?i=new ge(Math.floor((t-1)/2)):r||(i=new ge(Math.floor(e)));var o=Math.floor((t-1)/2),s=HG(WG(function(l){return i.add(new ge(l-o).mul(n)).toNumber()}),hg);return s(0,t)}function MA(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new ge(0),tickMin:new ge(0),tickMax:new ge(0)};var a=RA(new ge(t).sub(e).div(r-1),n,i),o;e<=0&&t>=0?o=new ge(0):(o=new ge(e).add(t).div(2),o=o.sub(new ge(o).mod(a)));var s=Math.ceil(o.sub(e).div(a).toNumber()),l=Math.ceil(new ge(t).sub(o).div(a).toNumber()),u=s+l+1;return u>r?MA(e,t,r,n,i+1):(u<r&&(l=t>0?l+(r-u):l,s=t>0?s:s+(r-u)),{step:a,tickMin:o.sub(new ge(s).mul(a)),tickMax:o.add(new ge(l).mul(a))})}function nV(e){var t=Al(e,2),r=t[0],n=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),s=IA([r,n]),l=Al(s,2),u=l[0],f=l[1];if(u===-1/0||f===1/0){var d=f===1/0?[u].concat(mg(hg(0,i-1).map(function(){return 1/0}))):[].concat(mg(hg(0,i-1).map(function(){return-1/0})),[f]);return r>n?pg(d):d}if(u===f)return rV(u,i,a);var h=MA(u,f,o,a),p=h.step,m=h.tickMin,v=h.tickMax,b=Yf.rangeStep(m,v.add(new ge(.1).mul(p)),p);return r>n?pg(b):b}function iV(e,t){var r=Al(e,2),n=r[0],i=r[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=IA([n,i]),s=Al(o,2),l=s[0],u=s[1];if(l===-1/0||u===1/0)return[n,i];if(l===u)return[l];var f=Math.max(t,2),d=RA(new ge(u).sub(l).div(f-1),a,0),h=[].concat(mg(Yf.rangeStep(new ge(l),new ge(u).sub(new ge(.99).mul(d)),d)),[u]);return n>i?pg(h):h}var aV=CA(nV),oV=CA(iV),sV="Invariant failed";function qi(e,t){throw new Error(sV)}var lV=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function uo(e){"@babel/helpers - typeof";return uo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uo(e)}function Sd(){return Sd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Sd.apply(this,arguments)}function uV(e,t){return hV(e)||fV(e,t)||dV(e,t)||cV()}function cV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
431In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dV(e,t){if(e){if(typeof e=="string")return B1(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return B1(e,t)}}function B1(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function fV(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function hV(e){if(Array.isArray(e))return e}function pV(e,t){if(e==null)return{};var r=mV(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function mV(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function gV(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vV(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,BA(n.key),n)}}function yV(e,t,r){return t&&vV(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function bV(e,t,r){return t=jd(t),xV(e,DA()?Reflect.construct(t,r||[],jd(e).constructor):t.apply(e,r))}function xV(e,t){if(t&&(uo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return wV(e)}function wV(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function DA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(DA=function(){return!!e})()}function jd(e){return jd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},jd(e)}function _V(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vg(e,t)}function vg(e,t){return vg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},vg(e,t)}function LA(e,t,r){return t=BA(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BA(e){var t=SV(e,"string");return uo(t)=="symbol"?t:t+""}function SV(e,t){if(uo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(uo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var fu=function(e){function t(){return gV(this,t),bV(this,t,arguments)}return _V(t,e),yV(t,[{key:"render",value:function(){var n=this.props,i=n.offset,a=n.layout,o=n.width,s=n.dataKey,l=n.data,u=n.dataPointFormatter,f=n.xAxis,d=n.yAxis,h=pV(n,lV),p=se(h,!1);this.props.direction==="x"&&f.type!=="number"&&qi();var m=l.map(function(v){var b=u(v,s),g=b.x,y=b.y,x=b.value,S=b.errorVal;if(!S)return null;var _=[],w,j;if(Array.isArray(S)){var O=uV(S,2);w=O[0],j=O[1]}else w=j=S;if(a==="vertical"){var k=f.scale,A=y+i,C=A+o,P=A-o,B=k(x-w),N=k(x+j);_.push({x1:N,y1:C,x2:N,y2:P}),_.push({x1:B,y1:A,x2:N,y2:A}),_.push({x1:B,y1:C,x2:B,y2:P})}else if(a==="horizontal"){var I=d.scale,R=g+i,D=R-o,$=R+o,M=I(x-w),U=I(x+j);_.push({x1:D,y1:U,x2:$,y2:U}),_.push({x1:R,y1:M,x2:R,y2:U}),_.push({x1:D,y1:M,x2:$,y2:M})}return T.createElement(Be,Sd({className:"recharts-errorBar",key:"bar-".concat(_.map(function(H){return"".concat(H.x1,"-").concat(H.x2,"-").concat(H.y1,"-").concat(H.y2)}))},p),_.map(function(H){return T.createElement("line",Sd({},H,{key:"line-".concat(H.x1,"-").concat(H.x2,"-").concat(H.y1,"-").concat(H.y2)}))}))});return T.createElement(Be,{className:"recharts-errorBars"},m)}}])}(T.Component);LA(fu,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});LA(fu,"displayName","ErrorBar");function Pl(e){"@babel/helpers - typeof";return Pl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pl(e)}function U1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function hi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?U1(Object(r),!0).forEach(function(n){jV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jV(e,t,r){return t=kV(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kV(e){var t=OV(e,"string");return Pl(t)=="symbol"?t:t+""}function OV(e,t){if(Pl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Pl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var UA=function(t){var r=t.children,n=t.formattedGraphicalItems,i=t.legendWidth,a=t.legendContent,o=Lt(r,$i);if(!o)return null;var s=$i.defaultProps,l=s!==void 0?hi(hi({},s),o.props):{},u;return o.props&&o.props.payload?u=o.props&&o.props.payload:a==="children"?u=(n||[]).reduce(function(f,d){var h=d.item,p=d.props,m=p.sectors||p.data||[];return f.concat(m.map(function(v){return{type:o.props.iconType||h.props.legendType,value:v.name,color:v.fill,payload:v}}))},[]):u=(n||[]).map(function(f){var d=f.item,h=d.type.defaultProps,p=h!==void 0?hi(hi({},h),d.props):{},m=p.dataKey,v=p.name,b=p.legendType,g=p.hide;return{inactive:g,dataKey:m,type:l.iconType||b||"square",color:c0(d),value:v||m,payload:p}}),hi(hi(hi({},l),$i.getWithHeight(o,i)),{},{payload:u,item:o})};function Nl(e){"@babel/helpers - typeof";return Nl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nl(e)}function F1(e){return NV(e)||PV(e)||AV(e)||EV()}function EV(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
432In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AV(e,t){if(e){if(typeof e=="string")return yg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return yg(e,t)}}function PV(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function NV(e){if(Array.isArray(e))return yg(e)}function yg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function z1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Me(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?z1(Object(r),!0).forEach(function(n){Wa(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):z1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Wa(e,t,r){return t=TV(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function TV(e){var t=CV(e,"string");return Nl(t)=="symbol"?t:t+""}function CV(e,t){if(Nl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Nl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Kt(e,t,r){return ae(e)||ae(t)?r:Xe(t)?ir(e,t,r):ie(t)?t(e):r}function Ds(e,t,r,n){var i=PG(e,function(s){return Kt(s,t)});if(r==="number"){var a=i.filter(function(s){return K(s)||parseFloat(s)});return a.length?[Gf(a),qf(a)]:[1/0,-1/0]}var o=n?i.filter(function(s){return!ae(s)}):i;return o.map(function(s){return Xe(s)||s instanceof Date?s:""})}var $V=function(t){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,o=-1,s=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(s<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var l=a.range,u=0;u<s;u++){var f=u>0?i[u-1].coordinate:i[s-1].coordinate,d=i[u].coordinate,h=u>=s-1?i[0].coordinate:i[u+1].coordinate,p=void 0;if(Sr(d-f)!==Sr(h-d)){var m=[];if(Sr(h-d)===Sr(l[1]-l[0])){p=h;var v=d+l[1]-l[0];m[0]=Math.min(v,(v+f)/2),m[1]=Math.max(v,(v+f)/2)}else{p=f;var b=h+l[1]-l[0];m[0]=Math.min(d,(b+d)/2),m[1]=Math.max(d,(b+d)/2)}var g=[Math.min(d,(p+d)/2),Math.max(d,(p+d)/2)];if(t>g[0]&&t<=g[1]||t>=m[0]&&t<=m[1]){o=i[u].index;break}}else{var y=Math.min(f,h),x=Math.max(f,h);if(t>(y+d)/2&&t<=(x+d)/2){o=i[u].index;break}}}else for(var S=0;S<s;S++)if(S===0&&t<=(n[S].coordinate+n[S+1].coordinate)/2||S>0&&S<s-1&&t>(n[S].coordinate+n[S-1].coordinate)/2&&t<=(n[S].coordinate+n[S+1].coordinate)/2||S===s-1&&t>(n[S].coordinate+n[S-1].coordinate)/2){o=n[S].index;break}return o},c0=function(t){var r,n=t,i=n.type.displayName,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Me(Me({},t.type.defaultProps),t.props):t.props,o=a.stroke,s=a.fill,l;switch(i){case"Line":l=o;break;case"Area":case"Radar":l=o&&o!=="none"?o:s;break;default:l=s;break}return l},IV=function(t){var r=t.barSize,n=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var o={},s=Object.keys(a),l=0,u=s.length;l<u;l++)for(var f=a[s[l]].stackGroups,d=Object.keys(f),h=0,p=d.length;h<p;h++){var m=f[d[h]],v=m.items,b=m.cateAxisId,g=v.filter(function(j){return nn(j.type).indexOf("Bar")>=0});if(g&&g.length){var y=g[0].type.defaultProps,x=y!==void 0?Me(Me({},y),g[0].props):g[0].props,S=x.barSize,_=x[b];o[_]||(o[_]=[]);var w=ae(S)?r:S;o[_].push({item:g[0],stackList:g.slice(1),barSize:ae(w)?void 0:Hi(w,n,0)})}}return o},RV=function(t){var r=t.barGap,n=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,s=t.maxBarSize,l=o.length;if(l<1)return null;var u=Hi(r,i,0,!0),f,d=[];if(o[0].barSize===+o[0].barSize){var h=!1,p=i/l,m=o.reduce(function(S,_){return S+_.barSize||0},0);m+=(l-1)*u,m>=i&&(m-=(l-1)*u,u=0),m>=i&&p>0&&(h=!0,p*=.9,m=l*p);var v=(i-m)/2>>0,b={offset:v-u,size:0};f=o.reduce(function(S,_){var w={item:_.item,position:{offset:b.offset+b.size+u,size:h?p:_.barSize}},j=[].concat(F1(S),[w]);return b=j[j.length-1].position,_.stackList&&_.stackList.length&&_.stackList.forEach(function(O){j.push({item:O,position:b})}),j},d)}else{var g=Hi(n,i,0,!0);i-2*g-(l-1)*u<=0&&(u=0);var y=(i-2*g-(l-1)*u)/l;y>1&&(y>>=0);var x=s===+s?Math.min(y,s):y;f=o.reduce(function(S,_,w){var j=[].concat(F1(S),[{item:_.item,position:{offset:g+(y+u)*w+(y-x)/2,size:x}}]);return _.stackList&&_.stackList.length&&_.stackList.forEach(function(O){j.push({item:O,position:j[j.length-1].position})}),j},d)}return f},MV=function(t,r,n,i){var a=n.children,o=n.width,s=n.margin,l=o-(s.left||0)-(s.right||0),u=UA({children:a,legendWidth:l});if(u){var f=i||{},d=f.width,h=f.height,p=u.align,m=u.verticalAlign,v=u.layout;if((v==="vertical"||v==="horizontal"&&m==="middle")&&p!=="center"&&K(t[p]))return Me(Me({},t),{},Wa({},p,t[p]+(d||0)));if((v==="horizontal"||v==="vertical"&&p==="center")&&m!=="middle"&&K(t[m]))return Me(Me({},t),{},Wa({},m,t[m]+(h||0)))}return t},DV=function(t,r,n){return ae(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},FA=function(t,r,n,i,a){var o=r.props.children,s=ar(o,fu).filter(function(u){return DV(i,a,u.props.direction)});if(s&&s.length){var l=s.map(function(u){return u.props.dataKey});return t.reduce(function(u,f){var d=Kt(f,n);if(ae(d))return u;var h=Array.isArray(d)?[Gf(d),qf(d)]:[d,d],p=l.reduce(function(m,v){var b=Kt(f,v,0),g=h[0]-Math.abs(Array.isArray(b)?b[0]:b),y=h[1]+Math.abs(Array.isArray(b)?b[1]:b);return[Math.min(g,m[0]),Math.max(y,m[1])]},[1/0,-1/0]);return[Math.min(p[0],u[0]),Math.max(p[1],u[1])]},[1/0,-1/0])}return null},LV=function(t,r,n,i,a){var o=r.map(function(s){return FA(t,s,n,a,i)}).filter(function(s){return!ae(s)});return o&&o.length?o.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},zA=function(t,r,n,i,a){var o=r.map(function(l){var u=l.props.dataKey;return n==="number"&&u&&FA(t,l,u,i)||Ds(t,u,n,a)});if(n==="number")return o.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]);var s={};return o.reduce(function(l,u){for(var f=0,d=u.length;f<d;f++)s[u[f]]||(s[u[f]]=!0,l.push(u[f]));return l},[])},WA=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},HA=function(t,r,n,i){if(i)return t.map(function(l){return l.coordinate});var a,o,s=t.map(function(l){return l.coordinate===r&&(a=!0),l.coordinate===n&&(o=!0),l.coordinate});return a||s.push(r),o||s.push(n),s},tn=function(t,r,n){if(!t)return null;var i=t.scale,a=t.duplicateDomain,o=t.type,s=t.range,l=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,u=(r||n)&&o==="category"&&i.bandwidth?i.bandwidth()/l:0;if(u=t.axisType==="angleAxis"&&(s==null?void 0:s.length)>=2?Sr(s[0]-s[1])*2*u:u,r&&(t.ticks||t.niceTicks)){var f=(t.ticks||t.niceTicks).map(function(d){var h=a?a.indexOf(d):d;return{coordinate:i(h)+u,value:d,offset:u}});return f.filter(function(d){return!au(d.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(d,h){return{coordinate:i(d)+u,value:d,index:h,offset:u}}):i.ticks&&!n?i.ticks(t.tickCount).map(function(d){return{coordinate:i(d)+u,value:d,offset:u}}):i.domain().map(function(d,h){return{coordinate:i(d)+u,value:a?a[d]:d,index:h,offset:u}})},sp=new WeakMap,Yu=function(t,r){if(typeof r!="function")return t;sp.has(t)||sp.set(t,new WeakMap);var n=sp.get(t);if(n.has(r))return n.get(r);var i=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,i),i},BV=function(t,r,n){var i=t.scale,a=t.type,o=t.layout,s=t.axisType;if(i==="auto")return o==="radial"&&s==="radiusAxis"?{scale:_l(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:yd(),realScaleType:"linear"}:a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:Ms(),realScaleType:"point"}:a==="category"?{scale:_l(),realScaleType:"band"}:{scale:yd(),realScaleType:"linear"};if(Wi(i)){var l="scale".concat($f(i));return{scale:(R1[l]||Ms)(),realScaleType:R1[l]?l:"point"}}return ie(i)?{scale:i}:{scale:Ms(),realScaleType:"point"}},W1=1e-4,UV=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,i=t.range(),a=Math.min(i[0],i[1])-W1,o=Math.max(i[0],i[1])+W1,s=t(r[0]),l=t(r[n-1]);(s<a||s>o||l<a||l>o)&&t.domain([r[0],r[n-1]])}},FV=function(t,r){if(!t)return null;for(var n=0,i=t.length;n<i;n++)if(t[n].item===r)return t[n].position;return null},zV=function(t,r){if(!r||r.length!==2||!K(r[0])||!K(r[1]))return t;var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]),a=[t[0],t[1]];return(!K(t[0])||t[0]<n)&&(a[0]=n),(!K(t[1])||t[1]>i)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]<n&&(a[1]=n),a},WV=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n<i;++n)for(var a=0,o=0,s=0;s<r;++s){var l=au(t[s][n][1])?t[s][n][0]:t[s][n][1];l>=0?(t[s][n][0]=a,t[s][n][1]=a+l,a=t[s][n][1]):(t[s][n][0]=o,t[s][n][1]=o+l,o=t[s][n][1])}},HV=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n<i;++n)for(var a=0,o=0;o<r;++o){var s=au(t[o][n][1])?t[o][n][0]:t[o][n][1];s>=0?(t[o][n][0]=a,t[o][n][1]=a+s,a=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},KV={sign:WV,expand:oB,none:to,silhouette:sB,wiggle:lB,positive:HV},qV=function(t,r,n){var i=r.map(function(s){return s.props.dataKey}),a=KV[n],o=aB().keys(i).value(function(s,l){return+Kt(s,l,0)}).order(Wm).offset(a);return o(t)},GV=function(t,r,n,i,a,o){if(!t)return null;var s=o?r.reverse():r,l={},u=s.reduce(function(d,h){var p,m=(p=h.type)!==null&&p!==void 0&&p.defaultProps?Me(Me({},h.type.defaultProps),h.props):h.props,v=m.stackId,b=m.hide;if(b)return d;var g=m[n],y=d[g]||{hasStack:!1,stackGroups:{}};if(Xe(v)){var x=y.stackGroups[v]||{numericAxisId:n,cateAxisId:i,items:[]};x.items.push(h),y.hasStack=!0,y.stackGroups[v]=x}else y.stackGroups[ou("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[h]};return Me(Me({},d),{},Wa({},g,y))},l),f={};return Object.keys(u).reduce(function(d,h){var p=u[h];if(p.hasStack){var m={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(v,b){var g=p.stackGroups[b];return Me(Me({},v),{},Wa({},b,{numericAxisId:n,cateAxisId:i,items:g.items,stackedData:qV(t,g.items,a)}))},m)}return Me(Me({},d),{},Wa({},h,p))},f)},VV=function(t,r){var n=r.realScaleType,i=r.type,a=r.tickCount,o=r.originalDomain,s=r.allowDecimals,l=n||r.scale;if(l!=="auto"&&l!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var u=t.domain();if(!u.length)return null;var f=aV(u,a,s);return t.domain([Gf(f),qf(f)]),{niceTicks:f}}if(a&&i==="number"){var d=t.domain(),h=oV(d,a,s);return{niceTicks:h}}return null};function H1(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!ae(i[t.dataKey])){var s=Gc(r,"value",i[t.dataKey]);if(s)return s.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var l=Kt(i,ae(o)?t.dataKey:o);return ae(l)?null:t.scale(l)}var K1=function(t){var r=t.axis,n=t.ticks,i=t.offset,a=t.bandSize,o=t.entry,s=t.index;if(r.type==="category")return n[s]?n[s].coordinate+i:null;var l=Kt(o,r.dataKey,r.domain[s]);return ae(l)?null:r.scale(l)-a/2+i},JV=function(t){var r=t.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]},YV=function(t,r){var n,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Me(Me({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(Xe(a)){var o=r[a];if(o){var s=o.items.indexOf(t);return s>=0?o.stackedData[s]:null}}return null},XV=function(t){return t.reduce(function(r,n){return[Gf(n.concat([r[0]]).filter(K)),qf(n.concat([r[1]]).filter(K))]},[1/0,-1/0])},KA=function(t,r,n){return Object.keys(t).reduce(function(i,a){var o=t[a],s=o.stackedData,l=s.reduce(function(u,f){var d=XV(f.slice(r,n+1));return[Math.min(u[0],d[0]),Math.max(u[1],d[1])]},[1/0,-1/0]);return[Math.min(l[0],i[0]),Math.max(l[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},q1=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,G1=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,bg=function(t,r,n){if(ie(t))return t(r,n);if(!Array.isArray(t))return r;var i=[];if(K(t[0]))i[0]=n?t[0]:Math.min(t[0],r[0]);else if(q1.test(t[0])){var a=+q1.exec(t[0])[1];i[0]=r[0]-a}else ie(t[0])?i[0]=t[0](r[0]):i[0]=r[0];if(K(t[1]))i[1]=n?t[1]:Math.max(t[1],r[1]);else if(G1.test(t[1])){var o=+G1.exec(t[1])[1];i[1]=r[1]+o}else ie(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},kd=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!n||i>0)return i}if(t&&r&&r.length>=2){for(var a=Ly(r,function(d){return d.coordinate}),o=1/0,s=1,l=a.length;s<l;s++){var u=a[s],f=a[s-1];o=Math.min((u.coordinate||0)-(f.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0},V1=function(t,r,n){return!t||!t.length||Vf(t,ir(n,"type.defaultProps.domain"))?r:t},qA=function(t,r){var n=t.type.defaultProps?Me(Me({},t.type.defaultProps),t.props):t.props,i=n.dataKey,a=n.name,o=n.unit,s=n.formatter,l=n.tooltipType,u=n.chartType,f=n.hide;return Me(Me({},se(t,!1)),{},{dataKey:i,unit:o,formatter:s,name:a||i,color:c0(t),value:Kt(r,i),type:l,payload:r,chartType:u,hide:f})};function Tl(e){"@babel/helpers - typeof";return Tl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tl(e)}function J1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Y1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?J1(Object(r),!0).forEach(function(n){QV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):J1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function QV(e,t,r){return t=ZV(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZV(e){var t=eJ(e,"string");return Tl(t)=="symbol"?t:t+""}function eJ(e,t){if(Tl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Tl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Od=Math.PI/180,tJ=function(t){return t*180/Math.PI},lt=function(t,r,n,i){return{x:t+Math.cos(-Od*i)*n,y:r+Math.sin(-Od*i)*n}},rJ=function(t,r){var n=t.x,i=t.y,a=r.x,o=r.y;return Math.sqrt(Math.pow(n-a,2)+Math.pow(i-o,2))},nJ=function(t,r){var n=t.x,i=t.y,a=r.cx,o=r.cy,s=rJ({x:n,y:i},{x:a,y:o});if(s<=0)return{radius:s};var l=(n-a)/s,u=Math.acos(l);return i>o&&(u=2*Math.PI-u),{radius:s,angle:tJ(u),angleInRadian:u}},iJ=function(t){var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),a=Math.floor(n/360),o=Math.min(i,a);return{startAngle:r-o*360,endAngle:n-o*360}},aJ=function(t,r){var n=r.startAngle,i=r.endAngle,a=Math.floor(n/360),o=Math.floor(i/360),s=Math.min(a,o);return t+s*360},X1=function(t,r){var n=t.x,i=t.y,a=nJ({x:n,y:i},r),o=a.radius,s=a.angle,l=r.innerRadius,u=r.outerRadius;if(o<l||o>u)return!1;if(o===0)return!0;var f=iJ(r),d=f.startAngle,h=f.endAngle,p=s,m;if(d<=h){for(;p>h;)p-=360;for(;p<d;)p+=360;m=p>=d&&p<=h}else{for(;p>d;)p-=360;for(;p<h;)p+=360;m=p>=h&&p<=d}return m?Y1(Y1({},r),{},{radius:o,angle:aJ(p,r)}):null};function Cl(e){"@babel/helpers - typeof";return Cl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cl(e)}var oJ=["offset"];function sJ(e){return dJ(e)||cJ(e)||uJ(e)||lJ()}function lJ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
433In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uJ(e,t){if(e){if(typeof e=="string")return xg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return xg(e,t)}}function cJ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function dJ(e){if(Array.isArray(e))return xg(e)}function xg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function fJ(e,t){if(e==null)return{};var r=hJ(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function hJ(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Q1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ve(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Q1(Object(r),!0).forEach(function(n){pJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Q1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pJ(e,t,r){return t=mJ(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mJ(e){var t=gJ(e,"string");return Cl(t)=="symbol"?t:t+""}function gJ(e,t){if(Cl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Cl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $l(){return $l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$l.apply(this,arguments)}var vJ=function(t){var r=t.value,n=t.formatter,i=ae(t.children)?r:t.children;return ie(n)?n(i):i},yJ=function(t,r){var n=Sr(r-t),i=Math.min(Math.abs(r-t),360);return n*i},bJ=function(t,r,n){var i=t.position,a=t.viewBox,o=t.offset,s=t.className,l=a,u=l.cx,f=l.cy,d=l.innerRadius,h=l.outerRadius,p=l.startAngle,m=l.endAngle,v=l.clockWise,b=(d+h)/2,g=yJ(p,m),y=g>=0?1:-1,x,S;i==="insideStart"?(x=p+y*o,S=v):i==="insideEnd"?(x=m-y*o,S=!v):i==="end"&&(x=m+y*o,S=v),S=g<=0?S:!S;var _=lt(u,f,b,x),w=lt(u,f,b,x+(S?1:-1)*359),j="M".concat(_.x,",").concat(_.y,`
434    A`).concat(b,",").concat(b,",0,1,").concat(S?0:1,`,
435    `).concat(w.x,",").concat(w.y),O=ae(t.id)?ou("recharts-radial-line-"):t.id;return T.createElement("text",$l({},n,{dominantBaseline:"central",className:de("recharts-radial-bar-label",s)}),T.createElement("defs",null,T.createElement("path",{id:O,d:j})),T.createElement("textPath",{xlinkHref:"#".concat(O)},r))},xJ=function(t){var r=t.viewBox,n=t.offset,i=t.position,a=r,o=a.cx,s=a.cy,l=a.innerRadius,u=a.outerRadius,f=a.startAngle,d=a.endAngle,h=(f+d)/2;if(i==="outside"){var p=lt(o,s,u+n,h),m=p.x,v=p.y;return{x:m,y:v,textAnchor:m>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"end"};var b=(l+u)/2,g=lt(o,s,b,h),y=g.x,x=g.y;return{x:y,y:x,textAnchor:"middle",verticalAnchor:"middle"}},wJ=function(t){var r=t.viewBox,n=t.parentViewBox,i=t.offset,a=t.position,o=r,s=o.x,l=o.y,u=o.width,f=o.height,d=f>=0?1:-1,h=d*i,p=d>0?"end":"start",m=d>0?"start":"end",v=u>=0?1:-1,b=v*i,g=v>0?"end":"start",y=v>0?"start":"end";if(a==="top"){var x={x:s+u/2,y:l-d*i,textAnchor:"middle",verticalAnchor:p};return Ve(Ve({},x),n?{height:Math.max(l-n.y,0),width:u}:{})}if(a==="bottom"){var S={x:s+u/2,y:l+f+h,textAnchor:"middle",verticalAnchor:m};return Ve(Ve({},S),n?{height:Math.max(n.y+n.height-(l+f),0),width:u}:{})}if(a==="left"){var _={x:s-b,y:l+f/2,textAnchor:g,verticalAnchor:"middle"};return Ve(Ve({},_),n?{width:Math.max(_.x-n.x,0),height:f}:{})}if(a==="right"){var w={x:s+u+b,y:l+f/2,textAnchor:y,verticalAnchor:"middle"};return Ve(Ve({},w),n?{width:Math.max(n.x+n.width-w.x,0),height:f}:{})}var j=n?{width:u,height:f}:{};return a==="insideLeft"?Ve({x:s+b,y:l+f/2,textAnchor:y,verticalAnchor:"middle"},j):a==="insideRight"?Ve({x:s+u-b,y:l+f/2,textAnchor:g,verticalAnchor:"middle"},j):a==="insideTop"?Ve({x:s+u/2,y:l+h,textAnchor:"middle",verticalAnchor:m},j):a==="insideBottom"?Ve({x:s+u/2,y:l+f-h,textAnchor:"middle",verticalAnchor:p},j):a==="insideTopLeft"?Ve({x:s+b,y:l+h,textAnchor:y,verticalAnchor:m},j):a==="insideTopRight"?Ve({x:s+u-b,y:l+h,textAnchor:g,verticalAnchor:m},j):a==="insideBottomLeft"?Ve({x:s+b,y:l+f-h,textAnchor:y,verticalAnchor:p},j):a==="insideBottomRight"?Ve({x:s+u-b,y:l+f-h,textAnchor:g,verticalAnchor:p},j):Io(a)&&(K(a.x)||ki(a.x))&&(K(a.y)||ki(a.y))?Ve({x:s+Hi(a.x,u),y:l+Hi(a.y,f),textAnchor:"end",verticalAnchor:"end"},j):Ve({x:s+u/2,y:l+f/2,textAnchor:"middle",verticalAnchor:"middle"},j)},_J=function(t){return"cx"in t&&K(t.cx)};function mt(e){var t=e.offset,r=t===void 0?5:t,n=fJ(e,oJ),i=Ve({offset:r},n),a=i.viewBox,o=i.position,s=i.value,l=i.children,u=i.content,f=i.className,d=f===void 0?"":f,h=i.textBreakAll;if(!a||ae(s)&&ae(l)&&!E.isValidElement(u)&&!ie(u))return null;if(E.isValidElement(u))return E.cloneElement(u,i);var p;if(ie(u)){if(p=E.createElement(u,i),E.isValidElement(p))return p}else p=vJ(i);var m=_J(a),v=se(i,!0);if(m&&(o==="insideStart"||o==="insideEnd"||o==="end"))return bJ(i,p,v);var b=m?xJ(i):wJ(i);return T.createElement(cd,$l({className:de("recharts-label",d)},v,b,{breakAll:h}),p)}mt.displayName="Label";var GA=function(t){var r=t.cx,n=t.cy,i=t.angle,a=t.startAngle,o=t.endAngle,s=t.r,l=t.radius,u=t.innerRadius,f=t.outerRadius,d=t.x,h=t.y,p=t.top,m=t.left,v=t.width,b=t.height,g=t.clockWise,y=t.labelViewBox;if(y)return y;if(K(v)&&K(b)){if(K(d)&&K(h))return{x:d,y:h,width:v,height:b};if(K(p)&&K(m))return{x:p,y:m,width:v,height:b}}return K(d)&&K(h)?{x:d,y:h,width:0,height:0}:K(r)&&K(n)?{cx:r,cy:n,startAngle:a||i||0,endAngle:o||i||0,innerRadius:u||0,outerRadius:f||l||s||0,clockWise:g}:t.viewBox?t.viewBox:{}},SJ=function(t,r){return t?t===!0?T.createElement(mt,{key:"label-implicit",viewBox:r}):Xe(t)?T.createElement(mt,{key:"label-implicit",viewBox:r,value:t}):E.isValidElement(t)?t.type===mt?E.cloneElement(t,{key:"label-implicit",viewBox:r}):T.createElement(mt,{key:"label-implicit",content:t,viewBox:r}):ie(t)?T.createElement(mt,{key:"label-implicit",content:t,viewBox:r}):Io(t)?T.createElement(mt,$l({viewBox:r},t,{key:"label-implicit"})):null:null},jJ=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var i=t.children,a=GA(t),o=ar(i,mt).map(function(l,u){return E.cloneElement(l,{viewBox:r||a,key:"label-".concat(u)})});if(!n)return o;var s=SJ(t.label,r||a);return[s].concat(sJ(o))};mt.parseViewBox=GA;mt.renderCallByParent=jJ;function kJ(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var OJ=kJ;const EJ=be(OJ);function Il(e){"@babel/helpers - typeof";return Il=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Il(e)}var AJ=["valueAccessor"],PJ=["data","dataKey","clockWise","id","textBreakAll"];function NJ(e){return IJ(e)||$J(e)||CJ(e)||TJ()}function TJ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
436In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CJ(e,t){if(e){if(typeof e=="string")return wg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return wg(e,t)}}function $J(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function IJ(e){if(Array.isArray(e))return wg(e)}function wg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ed(){return Ed=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ed.apply(this,arguments)}function Z1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function e_(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Z1(Object(r),!0).forEach(function(n){RJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Z1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function RJ(e,t,r){return t=MJ(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function MJ(e){var t=DJ(e,"string");return Il(t)=="symbol"?t:t+""}function DJ(e,t){if(Il(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Il(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function t_(e,t){if(e==null)return{};var r=LJ(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function LJ(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var BJ=function(t){return Array.isArray(t.value)?EJ(t.value):t.value};function Yn(e){var t=e.valueAccessor,r=t===void 0?BJ:t,n=t_(e,AJ),i=n.data,a=n.dataKey,o=n.clockWise,s=n.id,l=n.textBreakAll,u=t_(n,PJ);return!i||!i.length?null:T.createElement(Be,{className:"recharts-label-list"},i.map(function(f,d){var h=ae(a)?r(f,d):Kt(f&&f.payload,a),p=ae(s)?{}:{id:"".concat(s,"-").concat(d)};return T.createElement(mt,Ed({},se(f,!0),u,p,{parentViewBox:f.parentViewBox,value:h,textBreakAll:l,viewBox:mt.parseViewBox(ae(o)?f:e_(e_({},f),{},{clockWise:o})),key:"label-".concat(d),index:d}))}))}Yn.displayName="LabelList";function UJ(e,t){return e?e===!0?T.createElement(Yn,{key:"labelList-implicit",data:t}):T.isValidElement(e)||ie(e)?T.createElement(Yn,{key:"labelList-implicit",data:t,content:e}):Io(e)?T.createElement(Yn,Ed({data:t},e,{key:"labelList-implicit"})):null:null}function FJ(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,i=ar(n,Yn).map(function(o,s){return E.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!r)return i;var a=UJ(e.label,t);return[a].concat(NJ(i))}Yn.renderCallByParent=FJ;function Rl(e){"@babel/helpers - typeof";return Rl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rl(e)}function _g(){return _g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_g.apply(this,arguments)}function r_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function n_(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?r_(Object(r),!0).forEach(function(n){zJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):r_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zJ(e,t,r){return t=WJ(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function WJ(e){var t=HJ(e,"string");return Rl(t)=="symbol"?t:t+""}function HJ(e,t){if(Rl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Rl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var KJ=function(t,r){var n=Sr(r-t),i=Math.min(Math.abs(r-t),359.999);return n*i},Xu=function(t){var r=t.cx,n=t.cy,i=t.radius,a=t.angle,o=t.sign,s=t.isExternal,l=t.cornerRadius,u=t.cornerIsExternal,f=l*(s?1:-1)+i,d=Math.asin(l/f)/Od,h=u?a:a+o*d,p=lt(r,n,f,h),m=lt(r,n,i,h),v=u?a-o*d:a,b=lt(r,n,f*Math.cos(d*Od),v);return{center:p,circleTangency:m,lineTangency:b,theta:d}},VA=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.startAngle,s=t.endAngle,l=KJ(o,s),u=o+l,f=lt(r,n,a,o),d=lt(r,n,a,u),h="M ".concat(f.x,",").concat(f.y,`
437    A `).concat(a,",").concat(a,`,0,
438    `).concat(+(Math.abs(l)>180),",").concat(+(o>u),`,
439    `).concat(d.x,",").concat(d.y,`
440  `);if(i>0){var p=lt(r,n,i,o),m=lt(r,n,i,u);h+="L ".concat(m.x,",").concat(m.y,`
441            A `).concat(i,",").concat(i,`,0,
442            `).concat(+(Math.abs(l)>180),",").concat(+(o<=u),`,
443            `).concat(p.x,",").concat(p.y," Z")}else h+="L ".concat(r,",").concat(n," Z");return h},qJ=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,u=t.startAngle,f=t.endAngle,d=Sr(f-u),h=Xu({cx:r,cy:n,radius:a,angle:u,sign:d,cornerRadius:o,cornerIsExternal:l}),p=h.circleTangency,m=h.lineTangency,v=h.theta,b=Xu({cx:r,cy:n,radius:a,angle:f,sign:-d,cornerRadius:o,cornerIsExternal:l}),g=b.circleTangency,y=b.lineTangency,x=b.theta,S=l?Math.abs(u-f):Math.abs(u-f)-v-x;if(S<0)return s?"M ".concat(m.x,",").concat(m.y,`
444        a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
445        a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
446      `):VA({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:u,endAngle:f});var _="M ".concat(m.x,",").concat(m.y,`
447    A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(p.x,",").concat(p.y,`
448    A`).concat(a,",").concat(a,",0,").concat(+(S>180),",").concat(+(d<0),",").concat(g.x,",").concat(g.y,`
449    A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(y.x,",").concat(y.y,`
450  `);if(i>0){var w=Xu({cx:r,cy:n,radius:i,angle:u,sign:d,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),j=w.circleTangency,O=w.lineTangency,k=w.theta,A=Xu({cx:r,cy:n,radius:i,angle:f,sign:-d,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),C=A.circleTangency,P=A.lineTangency,B=A.theta,N=l?Math.abs(u-f):Math.abs(u-f)-k-B;if(N<0&&o===0)return"".concat(_,"L").concat(r,",").concat(n,"Z");_+="L".concat(P.x,",").concat(P.y,`
451      A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(C.x,",").concat(C.y,`
452      A`).concat(i,",").concat(i,",0,").concat(+(N>180),",").concat(+(d>0),",").concat(j.x,",").concat(j.y,`
453      A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(O.x,",").concat(O.y,"Z")}else _+="L".concat(r,",").concat(n,"Z");return _},GJ={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},JA=function(t){var r=n_(n_({},GJ),t),n=r.cx,i=r.cy,a=r.innerRadius,o=r.outerRadius,s=r.cornerRadius,l=r.forceCornerRadius,u=r.cornerIsExternal,f=r.startAngle,d=r.endAngle,h=r.className;if(o<a||f===d)return null;var p=de("recharts-sector",h),m=o-a,v=Hi(s,m,0,!0),b;return v>0&&Math.abs(f-d)<360?b=qJ({cx:n,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(v,m/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:f,endAngle:d}):b=VA({cx:n,cy:i,innerRadius:a,outerRadius:o,startAngle:f,endAngle:d}),T.createElement("path",_g({},se(r,!0),{className:p,d:b,role:"img"}))};function Ml(e){"@babel/helpers - typeof";return Ml=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ml(e)}function Sg(){return Sg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Sg.apply(this,arguments)}function i_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function a_(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?i_(Object(r),!0).forEach(function(n){VJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function VJ(e,t,r){return t=JJ(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function JJ(e){var t=YJ(e,"string");return Ml(t)=="symbol"?t:t+""}function YJ(e,t){if(Ml(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ml(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var o_={curveBasisClosed:V5,curveBasisOpen:J5,curveBasis:G5,curveBumpX:$5,curveBumpY:I5,curveLinearClosed:Y5,curveLinear:Rf,curveMonotoneX:X5,curveMonotoneY:Q5,curveNatural:Z5,curveStep:eB,curveStepAfter:rB,curveStepBefore:tB},Qu=function(t){return t.x===+t.x&&t.y===+t.y},us=function(t){return t.x},cs=function(t){return t.y},XJ=function(t,r){if(ie(t))return t;var n="curve".concat($f(t));return(n==="curveMonotone"||n==="curveBump")&&r?o_["".concat(n).concat(r==="vertical"?"Y":"X")]:o_[n]||Rf},QJ=function(t){var r=t.type,n=r===void 0?"linear":r,i=t.points,a=i===void 0?[]:i,o=t.baseLine,s=t.layout,l=t.connectNulls,u=l===void 0?!1:l,f=XJ(n,s),d=u?a.filter(function(v){return Qu(v)}):a,h;if(Array.isArray(o)){var p=u?o.filter(function(v){return Qu(v)}):o,m=d.map(function(v,b){return a_(a_({},v),{},{base:p[b]})});return s==="vertical"?h=Fu().y(cs).x1(us).x0(function(v){return v.base.x}):h=Fu().x(us).y1(cs).y0(function(v){return v.base.y}),h.defined(Qu).curve(f),h(m)}return s==="vertical"&&K(o)?h=Fu().y(cs).x1(us).x0(o):K(o)?h=Fu().x(us).y1(cs).y0(o):h=XO().x(us).y(cs),h.defined(Qu).curve(f),h(d)},jg=function(t){var r=t.className,n=t.points,i=t.path,a=t.pathRef;if((!n||!n.length)&&!i)return null;var o=n&&n.length?QJ(t):i;return E.createElement("path",Sg({},se(t,!1),Vc(t),{className:de("recharts-curve",r),d:o,ref:a}))},YA={exports:{}},ZJ="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",eY=ZJ,tY=eY;function XA(){}function QA(){}QA.resetWarningCache=XA;var rY=function(){function e(n,i,a,o,s,l){if(l!==tY){var u=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 u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:QA,resetWarningCache:XA};return r.PropTypes=r,r};YA.exports=rY();var nY=YA.exports;const he=be(nY),{getOwnPropertyNames:iY,getOwnPropertySymbols:aY}=Object,{hasOwnProperty:oY}=Object.prototype;function lp(e,t){return function(n,i,a){return e(n,i,a)&&t(n,i,a)}}function Zu(e){return function(r,n,i){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,i);const{cache:a}=i,o=a.get(r),s=a.get(n);if(o&&s)return o===n&&s===r;a.set(r,n),a.set(n,r);const l=e(r,n,i);return a.delete(r),a.delete(n),l}}function sY(e){return e!=null?e[Symbol.toStringTag]:void 0}function s_(e){return iY(e).concat(aY(e))}const lY=Object.hasOwn||((e,t)=>oY.call(e,t));function Zi(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const uY="__v",cY="__o",dY="_owner",{getOwnPropertyDescriptor:l_,keys:u_}=Object;function fY(e,t){return e.byteLength===t.byteLength&&Ad(new Uint8Array(e),new Uint8Array(t))}function hY(e,t,r){let n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function pY(e,t){return e.byteLength===t.byteLength&&Ad(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function mY(e,t){return Zi(e.getTime(),t.getTime())}function gY(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function vY(e,t){return e===t}function c_(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const i=new Array(n),a=e.entries();let o,s,l=0;for(;(o=a.next())&&!o.done;){const u=t.entries();let f=!1,d=0;for(;(s=u.next())&&!s.done;){if(i[d]){d++;continue}const h=o.value,p=s.value;if(r.equals(h[0],p[0],l,d,e,t,r)&&r.equals(h[1],p[1],h[0],p[0],e,t,r)){f=i[d]=!0;break}d++}if(!f)return!1;l++}return!0}const yY=Zi;function bY(e,t,r){const n=u_(e);let i=n.length;if(u_(t).length!==i)return!1;for(;i-- >0;)if(!ZA(e,t,r,n[i]))return!1;return!0}function ds(e,t,r){const n=s_(e);let i=n.length;if(s_(t).length!==i)return!1;let a,o,s;for(;i-- >0;)if(a=n[i],!ZA(e,t,r,a)||(o=l_(e,a),s=l_(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function xY(e,t){return Zi(e.valueOf(),t.valueOf())}function wY(e,t){return e.source===t.source&&e.flags===t.flags}function d_(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const i=new Array(n),a=e.values();let o,s;for(;(o=a.next())&&!o.done;){const l=t.values();let u=!1,f=0;for(;(s=l.next())&&!s.done;){if(!i[f]&&r.equals(o.value,s.value,o.value,s.value,e,t,r)){u=i[f]=!0;break}f++}if(!u)return!1}return!0}function Ad(e,t){let r=e.byteLength;if(t.byteLength!==r||e.byteOffset!==t.byteOffset)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function _Y(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function ZA(e,t,r,n){return(n===dY||n===cY||n===uY)&&(e.$$typeof||t.$$typeof)?!0:lY(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}const SY="[object ArrayBuffer]",jY="[object Arguments]",kY="[object Boolean]",OY="[object DataView]",EY="[object Date]",AY="[object Error]",PY="[object Map]",NY="[object Number]",TY="[object Object]",CY="[object RegExp]",$Y="[object Set]",IY="[object String]",RY={"[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
453]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},MY="[object URL]",DY=Object.prototype.toString;function LY({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:l,arePrimitiveWrappersEqual:u,areRegExpsEqual:f,areSetsEqual:d,areTypedArraysEqual:h,areUrlsEqual:p,unknownTagComparators:m}){return function(b,g,y){if(b===g)return!0;if(b==null||g==null)return!1;const x=typeof b;if(x!==typeof g)return!1;if(x!=="object")return x==="number"?s(b,g,y):x==="function"?a(b,g,y):!1;const S=b.constructor;if(S!==g.constructor)return!1;if(S===Object)return l(b,g,y);if(Array.isArray(b))return t(b,g,y);if(S===Date)return n(b,g,y);if(S===RegExp)return f(b,g,y);if(S===Map)return o(b,g,y);if(S===Set)return d(b,g,y);const _=DY.call(b);if(_===EY)return n(b,g,y);if(_===CY)return f(b,g,y);if(_===PY)return o(b,g,y);if(_===$Y)return d(b,g,y);if(_===TY)return typeof b.then!="function"&&typeof g.then!="function"&&l(b,g,y);if(_===MY)return p(b,g,y);if(_===AY)return i(b,g,y);if(_===jY)return l(b,g,y);if(RY[_])return h(b,g,y);if(_===SY)return e(b,g,y);if(_===OY)return r(b,g,y);if(_===kY||_===NY||_===IY)return u(b,g,y);if(m){let w=m[_];if(!w){const j=sY(b);j&&(w=m[j])}if(w)return w(b,g,y)}return!1}}function BY({circular:e,createCustomConfig:t,strict:r}){let n={areArrayBuffersEqual:fY,areArraysEqual:r?ds:hY,areDataViewsEqual:pY,areDatesEqual:mY,areErrorsEqual:gY,areFunctionsEqual:vY,areMapsEqual:r?lp(c_,ds):c_,areNumbersEqual:yY,areObjectsEqual:r?ds:bY,arePrimitiveWrappersEqual:xY,areRegExpsEqual:wY,areSetsEqual:r?lp(d_,ds):d_,areTypedArraysEqual:r?lp(Ad,ds):Ad,areUrlsEqual:_Y,unknownTagComparators:void 0};if(t&&(n=Object.assign({},n,t(n))),e){const i=Zu(n.areArraysEqual),a=Zu(n.areMapsEqual),o=Zu(n.areObjectsEqual),s=Zu(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:o,areSetsEqual:s})}return n}function UY(e){return function(t,r,n,i,a,o,s){return e(t,r,s)}}function FY({circular:e,comparator:t,createState:r,equals:n,strict:i}){if(r)return function(s,l){const{cache:u=e?new WeakMap:void 0,meta:f}=r();return t(s,l,{cache:u,equals:n,meta:f,strict:i})};if(e)return function(s,l){return t(s,l,{cache:new WeakMap,equals:n,meta:void 0,strict:i})};const a={cache:void 0,equals:n,meta:void 0,strict:i};return function(s,l){return t(s,l,a)}}const zY=si();si({strict:!0});si({circular:!0});si({circular:!0,strict:!0});si({createInternalComparator:()=>Zi});si({strict:!0,createInternalComparator:()=>Zi});si({circular:!0,createInternalComparator:()=>Zi});si({circular:!0,createInternalComparator:()=>Zi,strict:!0});function si(e={}){const{circular:t=!1,createInternalComparator:r,createState:n,strict:i=!1}=e,a=BY(e),o=LY(a),s=r?r(o):UY(o);return FY({circular:t,comparator:o,createState:n,equals:s,strict:i})}function WY(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function f_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function i(a){r<0&&(r=a),a-r>t?(e(a),r=-1):WY(i)};requestAnimationFrame(n)}function kg(e){"@babel/helpers - typeof";return kg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kg(e)}function HY(e){return VY(e)||GY(e)||qY(e)||KY()}function KY(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
454In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qY(e,t){if(e){if(typeof e=="string")return h_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return h_(e,t)}}function h_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function GY(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function VY(e){if(Array.isArray(e))return e}function JY(){var e={},t=function(){return null},r=!1,n=function i(a){if(!r){if(Array.isArray(a)){if(!a.length)return;var o=a,s=HY(o),l=s[0],u=s.slice(1);if(typeof l=="number"){f_(i.bind(null,u),l);return}i(l),f_(i.bind(null,u));return}kg(a)==="object"&&(e=a,t(e)),typeof a=="function"&&a()}};return{stop:function(){r=!0},start:function(a){r=!1,n(a)},subscribe:function(a){return t=a,function(){t=function(){return null}}}}}function Dl(e){"@babel/helpers - typeof";return Dl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dl(e)}function p_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function m_(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
vendor: 158,049 bytes, lines 454-476
454t%2?p_(Object(r),!0).forEach(function(n){eP(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function eP(e,t,r){return t=YY(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function YY(e){var t=XY(e,"string");return Dl(t)==="symbol"?t:String(t)}function XY(e,t){if(Dl(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Dl(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var QY=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,i){return n.filter(function(a){return i.includes(a)})})},ZY=function(t){return t},eX=function(t){return t.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},Ls=function(t,r){return Object.keys(r).reduce(function(n,i){return m_(m_({},n),{},eP({},i,t(i,r[i])))},{})},g_=function(t,r,n){return t.map(function(i){return"".concat(eX(i)," ").concat(r,"ms ").concat(n)}).join(",")};function tX(e,t){return iX(e)||nX(e,t)||tP(e,t)||rX()}function rX(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
455In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nX(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function iX(e){if(Array.isArray(e))return e}function aX(e){return lX(e)||sX(e)||tP(e)||oX()}function oX(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
456In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tP(e,t){if(e){if(typeof e=="string")return Og(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Og(e,t)}}function sX(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function lX(e){if(Array.isArray(e))return Og(e)}function Og(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Pd=1e-4,rP=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},nP=function(t,r){return t.map(function(n,i){return n*Math.pow(r,i)}).reduce(function(n,i){return n+i})},v_=function(t,r){return function(n){var i=rP(t,r);return nP(i,n)}},uX=function(t,r){return function(n){var i=rP(t,r),a=[].concat(aX(i.map(function(o,s){return o*s}).slice(1)),[0]);return nP(a,n)}},y_=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r[0],a=r[1],o=r[2],s=r[3];if(r.length===1)switch(r[0]){case"linear":i=0,a=0,o=1,s=1;break;case"ease":i=.25,a=.1,o=.25,s=1;break;case"ease-in":i=.42,a=0,o=1,s=1;break;case"ease-out":i=.42,a=0,o=.58,s=1;break;case"ease-in-out":i=0,a=0,o=.58,s=1;break;default:{var l=r[0].split("(");if(l[0]==="cubic-bezier"&&l[1].split(")")[0].split(",").length===4){var u=l[1].split(")")[0].split(",").map(function(b){return parseFloat(b)}),f=tX(u,4);i=f[0],a=f[1],o=f[2],s=f[3]}}}var d=v_(i,o),h=v_(a,s),p=uX(i,o),m=function(g){return g>1?1:g<0?0:g},v=function(g){for(var y=g>1?1:g,x=y,S=0;S<8;++S){var _=d(x)-y,w=p(x);if(Math.abs(_-y)<Pd||w<Pd)return h(x);x=m(x-_/w)}return h(x)};return v.isStepper=!1,v},cX=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,a=i===void 0?8:i,o=t.dt,s=o===void 0?17:o,l=function(f,d,h){var p=-(f-d)*n,m=h*a,v=h+(p-m)*s/1e3,b=h*s/1e3+f;return Math.abs(b-d)<Pd&&Math.abs(v)<Pd?[d,0]:[b,v]};return l.isStepper=!0,l.dt=s,l},dX=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;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 y_(i);case"spring":return cX();default:if(i.split("(")[0]==="cubic-bezier")return y_(i)}return typeof i=="function"?i:null};function Ll(e){"@babel/helpers - typeof";return Ll=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ll(e)}function b_(e){return pX(e)||hX(e)||iP(e)||fX()}function fX(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
457In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hX(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function pX(e){if(Array.isArray(e))return Ag(e)}function x_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ot(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?x_(Object(r),!0).forEach(function(n){Eg(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Eg(e,t,r){return t=mX(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mX(e){var t=gX(e,"string");return Ll(t)==="symbol"?t:String(t)}function gX(e,t){if(Ll(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ll(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vX(e,t){return xX(e)||bX(e,t)||iP(e,t)||yX()}function yX(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
458In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iP(e,t){if(e){if(typeof e=="string")return Ag(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ag(e,t)}}function Ag(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function bX(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function xX(e){if(Array.isArray(e))return e}var Nd=function(t,r,n){return t+(r-t)*n},Pg=function(t){var r=t.from,n=t.to;return r!==n},wX=function e(t,r,n){var i=Ls(function(a,o){if(Pg(o)){var s=t(o.from,o.to,o.velocity),l=vX(s,2),u=l[0],f=l[1];return ot(ot({},o),{},{from:u,velocity:f})}return o},r);return n<1?Ls(function(a,o){return Pg(o)?ot(ot({},o),{},{velocity:Nd(o.velocity,i[a].velocity,n),from:Nd(o.from,i[a].from,n)}):o},r):e(t,i,n-1)};const _X=function(e,t,r,n,i){var a=QY(e,t),o=a.reduce(function(b,g){return ot(ot({},b),{},Eg({},g,[e[g],t[g]]))},{}),s=a.reduce(function(b,g){return ot(ot({},b),{},Eg({},g,{from:e[g],velocity:0,to:t[g]}))},{}),l=-1,u,f,d=function(){return null},h=function(){return Ls(function(g,y){return y.from},s)},p=function(){return!Object.values(s).filter(Pg).length},m=function(g){u||(u=g);var y=g-u,x=y/r.dt;s=wX(r,s,x),i(ot(ot(ot({},e),t),h())),u=g,p()||(l=requestAnimationFrame(d))},v=function(g){f||(f=g);var y=(g-f)/n,x=Ls(function(_,w){return Nd.apply(void 0,b_(w).concat([r(y)]))},o);if(i(ot(ot(ot({},e),t),x)),y<1)l=requestAnimationFrame(d);else{var S=Ls(function(_,w){return Nd.apply(void 0,b_(w).concat([r(1)]))},o);i(ot(ot(ot({},e),t),S))}};return d=r.isStepper?m:v,function(){return requestAnimationFrame(d),function(){cancelAnimationFrame(l)}}};function co(e){"@babel/helpers - typeof";return co=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},co(e)}var SX=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function jX(e,t){if(e==null)return{};var r=kX(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function kX(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function up(e){return PX(e)||AX(e)||EX(e)||OX()}function OX(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
459In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function EX(e,t){if(e){if(typeof e=="string")return Ng(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ng(e,t)}}function AX(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function PX(e){if(Array.isArray(e))return Ng(e)}function Ng(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function w_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function fr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?w_(Object(r),!0).forEach(function(n){xs(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xs(e,t,r){return t=aP(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function NX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TX(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,aP(n.key),n)}}function CX(e,t,r){return t&&TX(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function aP(e){var t=$X(e,"string");return co(t)==="symbol"?t:String(t)}function $X(e,t){if(co(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(co(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function IX(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Tg(e,t)}function Tg(e,t){return Tg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Tg(e,t)}function RX(e){var t=MX();return function(){var n=Td(e),i;if(t){var a=Td(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return Cg(this,i)}}function Cg(e,t){if(t&&(co(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $g(e)}function $g(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function MX(){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 Td(e){return Td=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Td(e)}var gn=function(e){IX(r,e);var t=RX(r);function r(n,i){var a;NX(this,r),a=t.call(this,n,i);var o=a.props,s=o.isActive,l=o.attributeName,u=o.from,f=o.to,d=o.steps,h=o.children,p=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind($g(a)),a.changeStyle=a.changeStyle.bind($g(a)),!s||p<=0)return a.state={style:{}},typeof h=="function"&&(a.state={style:f}),Cg(a);if(d&&d.length)a.state={style:d[0].style};else if(u){if(typeof h=="function")return a.state={style:u},Cg(a);a.state={style:l?xs({},l,u):u}}else a.state={style:{}};return a}return CX(r,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,o=i.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isActive,s=a.canBegin,l=a.attributeName,u=a.shouldReAnimate,f=a.to,d=a.from,h=this.state.style;if(s){if(!o){var p={style:l?xs({},l,f):f};this.state&&h&&(l&&h[l]!==f||!l&&h!==f)&&this.setState(p);return}if(!(zY(i.to,f)&&i.canBegin&&i.isActive)){var m=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var v=m||u?d:i.to;if(this.state&&h){var b={style:l?xs({},l,v):v};(l&&h[l]!==v||!l&&h!==v)&&this.setState(b)}this.runAnimation(fr(fr({},this.props),{},{from:v,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,o=i.from,s=i.to,l=i.duration,u=i.easing,f=i.begin,d=i.onAnimationEnd,h=i.onAnimationStart,p=_X(o,s,dX(u),l,this.changeStyle),m=function(){a.stopJSAnimation=p()};this.manager.start([h,f,m,l,d])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,s=i.begin,l=i.onAnimationStart,u=o[0],f=u.style,d=u.duration,h=d===void 0?0:d,p=function(v,b,g){if(g===0)return v;var y=b.duration,x=b.easing,S=x===void 0?"ease":x,_=b.style,w=b.properties,j=b.onAnimationEnd,O=g>0?o[g-1]:b,k=w||Object.keys(_);if(typeof S=="function"||S==="spring")return[].concat(up(v),[a.runJSAnimation.bind(a,{from:O.style,to:_,duration:y,easing:S}),y]);var A=g_(k,y,S),C=fr(fr(fr({},O.style),_),{},{transition:A});return[].concat(up(v),[C,y,j]).filter(ZY)};return this.manager.start([l].concat(up(o.reduce(p,[f,Math.max(h,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=JY());var a=i.begin,o=i.duration,s=i.attributeName,l=i.to,u=i.easing,f=i.onAnimationStart,d=i.onAnimationEnd,h=i.steps,p=i.children,m=this.manager;if(this.unSubscribe=m.subscribe(this.handleStyleChange),typeof u=="function"||typeof p=="function"||u==="spring"){this.runJSAnimation(i);return}if(h.length>1){this.runStepAnimation(i);return}var v=s?xs({},s,l):l,b=g_(Object.keys(v),o,u);m.start([f,a,fr(fr({},v),{},{transition:b}),o,d])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var s=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var l=jX(i,SX),u=E.Children.count(a),f=this.state.style;if(typeof a=="function")return a(f);if(!s||u===0||o<=0)return a;var d=function(p){var m=p.props,v=m.style,b=v===void 0?{}:v,g=m.className,y=E.cloneElement(p,fr(fr({},l),{},{style:fr(fr({},b),f),className:g}));return y};return u===1?d(E.Children.only(a)):T.createElement("div",null,E.Children.map(a,function(h){return d(h)}))}}]),r}(E.PureComponent);gn.displayName="Animate";gn.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};gn.propTypes={from:he.oneOfType([he.object,he.string]),to:he.oneOfType([he.object,he.string]),attributeName:he.string,duration:he.number,begin:he.number,easing:he.oneOfType([he.string,he.func]),steps:he.arrayOf(he.shape({duration:he.number.isRequired,style:he.object.isRequired,easing:he.oneOfType([he.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),he.func]),properties:he.arrayOf("string"),onAnimationEnd:he.func})),children:he.oneOfType([he.node,he.func]),isActive:he.bool,canBegin:he.bool,onAnimationEnd:he.func,shouldReAnimate:he.bool,onAnimationStart:he.func,onAnimationReStart:he.func};function Bl(e){"@babel/helpers - typeof";return Bl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bl(e)}function Cd(){return Cd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Cd.apply(this,arguments)}function DX(e,t){return FX(e)||UX(e,t)||BX(e,t)||LX()}function LX(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
460In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BX(e,t){if(e){if(typeof e=="string")return __(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return __(e,t)}}function __(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function UX(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function FX(e){if(Array.isArray(e))return e}function S_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function j_(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?S_(Object(r),!0).forEach(function(n){zX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zX(e,t,r){return t=WX(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function WX(e){var t=HX(e,"string");return Bl(t)=="symbol"?t:t+""}function HX(e,t){if(Bl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Bl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var k_=function(t,r,n,i,a){var o=Math.min(Math.abs(n)/2,Math.abs(i)/2),s=i>=0?1:-1,l=n>=0?1:-1,u=i>=0&&n>=0||i<0&&n<0?1:0,f;if(o>0&&a instanceof Array){for(var d=[0,0,0,0],h=0,p=4;h<p;h++)d[h]=a[h]>o?o:a[h];f="M".concat(t,",").concat(r+s*d[0]),d[0]>0&&(f+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(u,",").concat(t+l*d[0],",").concat(r)),f+="L ".concat(t+n-l*d[1],",").concat(r),d[1]>0&&(f+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(u,`,
461        `).concat(t+n,",").concat(r+s*d[1])),f+="L ".concat(t+n,",").concat(r+i-s*d[2]),d[2]>0&&(f+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(u,`,
462        `).concat(t+n-l*d[2],",").concat(r+i)),f+="L ".concat(t+l*d[3],",").concat(r+i),d[3]>0&&(f+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(u,`,
463        `).concat(t,",").concat(r+i-s*d[3])),f+="Z"}else if(o>0&&a===+a&&a>0){var m=Math.min(o,a);f="M ".concat(t,",").concat(r+s*m,`
464            A `).concat(m,",").concat(m,",0,0,").concat(u,",").concat(t+l*m,",").concat(r,`
465            L `).concat(t+n-l*m,",").concat(r,`
466            A `).concat(m,",").concat(m,",0,0,").concat(u,",").concat(t+n,",").concat(r+s*m,`
467            L `).concat(t+n,",").concat(r+i-s*m,`
468            A `).concat(m,",").concat(m,",0,0,").concat(u,",").concat(t+n-l*m,",").concat(r+i,`
469            L `).concat(t+l*m,",").concat(r+i,`
470            A `).concat(m,",").concat(m,",0,0,").concat(u,",").concat(t,",").concat(r+i-s*m," Z")}else f="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return f},KX=function(t,r){if(!t||!r)return!1;var n=t.x,i=t.y,a=r.x,o=r.y,s=r.width,l=r.height;if(Math.abs(s)>0&&Math.abs(l)>0){var u=Math.min(a,a+s),f=Math.max(a,a+s),d=Math.min(o,o+l),h=Math.max(o,o+l);return n>=u&&n<=f&&i>=d&&i<=h}return!1},qX={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},d0=function(t){var r=j_(j_({},qX),t),n=E.useRef(),i=E.useState(-1),a=DX(i,2),o=a[0],s=a[1];E.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var S=n.current.getTotalLength();S&&s(S)}catch{}},[]);var l=r.x,u=r.y,f=r.width,d=r.height,h=r.radius,p=r.className,m=r.animationEasing,v=r.animationDuration,b=r.animationBegin,g=r.isAnimationActive,y=r.isUpdateAnimationActive;if(l!==+l||u!==+u||f!==+f||d!==+d||f===0||d===0)return null;var x=de("recharts-rectangle",p);return y?T.createElement(gn,{canBegin:o>0,from:{width:f,height:d,x:l,y:u},to:{width:f,height:d,x:l,y:u},duration:v,animationEasing:m,isActive:y},function(S){var _=S.width,w=S.height,j=S.x,O=S.y;return T.createElement(gn,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:v,isActive:g,easing:m},T.createElement("path",Cd({},se(r,!0),{className:x,d:k_(j,O,_,w,h),ref:n})))}):T.createElement("path",Cd({},se(r,!0),{className:x,d:k_(l,u,f,d,h)}))};function Ig(){return Ig=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ig.apply(this,arguments)}var f0=function(t){var r=t.cx,n=t.cy,i=t.r,a=t.className,o=de("recharts-dot",a);return r===+r&&n===+n&&i===+i?E.createElement("circle",Ig({},se(t,!1),Vc(t),{className:o,cx:r,cy:n,r:i})):null};function Ul(e){"@babel/helpers - typeof";return Ul=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ul(e)}var GX=["x","y","top","left","width","height","className"];function Rg(){return Rg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Rg.apply(this,arguments)}function O_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function VX(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?O_(Object(r),!0).forEach(function(n){JX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function JX(e,t,r){return t=YX(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function YX(e){var t=XX(e,"string");return Ul(t)=="symbol"?t:t+""}function XX(e,t){if(Ul(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ul(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function QX(e,t){if(e==null)return{};var r=ZX(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ZX(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var eQ=function(t,r,n,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(r,"h").concat(n)},tQ=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.top,s=o===void 0?0:o,l=t.left,u=l===void 0?0:l,f=t.width,d=f===void 0?0:f,h=t.height,p=h===void 0?0:h,m=t.className,v=QX(t,GX),b=VX({x:n,y:a,top:s,left:u,width:d,height:p},v);return!K(n)||!K(a)||!K(d)||!K(p)||!K(s)||!K(u)?null:T.createElement("path",Rg({},se(b,!0),{className:de("recharts-cross",m),d:eQ(n,a,d,p,s,u)}))},rQ=wE,nQ=rQ(Object.getPrototypeOf,Object),iQ=nQ,aQ=wn,oQ=iQ,sQ=_n,lQ="[object Object]",uQ=Function.prototype,cQ=Object.prototype,oP=uQ.toString,dQ=cQ.hasOwnProperty,fQ=oP.call(Object);function hQ(e){if(!sQ(e)||aQ(e)!=lQ)return!1;var t=oQ(e);if(t===null)return!0;var r=dQ.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&oP.call(r)==fQ}var pQ=hQ;const mQ=be(pQ);var gQ=wn,vQ=_n,yQ="[object Boolean]";function bQ(e){return e===!0||e===!1||vQ(e)&&gQ(e)==yQ}var xQ=bQ;const wQ=be(xQ);function Fl(e){"@babel/helpers - typeof";return Fl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fl(e)}function $d(){return $d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$d.apply(this,arguments)}function _Q(e,t){return OQ(e)||kQ(e,t)||jQ(e,t)||SQ()}function SQ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
471In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jQ(e,t){if(e){if(typeof e=="string")return E_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return E_(e,t)}}function E_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function kQ(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function OQ(e){if(Array.isArray(e))return e}function A_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function P_(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?A_(Object(r),!0).forEach(function(n){EQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function EQ(e,t,r){return t=AQ(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function AQ(e){var t=PQ(e,"string");return Fl(t)=="symbol"?t:t+""}function PQ(e,t){if(Fl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Fl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var N_=function(t,r,n,i,a){var o=n-i,s;return s="M ".concat(t,",").concat(r),s+="L ".concat(t+n,",").concat(r),s+="L ".concat(t+n-o/2,",").concat(r+a),s+="L ".concat(t+n-o/2-i,",").concat(r+a),s+="L ".concat(t,",").concat(r," Z"),s},NQ={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},TQ=function(t){var r=P_(P_({},NQ),t),n=E.useRef(),i=E.useState(-1),a=_Q(i,2),o=a[0],s=a[1];E.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var x=n.current.getTotalLength();x&&s(x)}catch{}},[]);var l=r.x,u=r.y,f=r.upperWidth,d=r.lowerWidth,h=r.height,p=r.className,m=r.animationEasing,v=r.animationDuration,b=r.animationBegin,g=r.isUpdateAnimationActive;if(l!==+l||u!==+u||f!==+f||d!==+d||h!==+h||f===0&&d===0||h===0)return null;var y=de("recharts-trapezoid",p);return g?T.createElement(gn,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:h,x:l,y:u},to:{upperWidth:f,lowerWidth:d,height:h,x:l,y:u},duration:v,animationEasing:m,isActive:g},function(x){var S=x.upperWidth,_=x.lowerWidth,w=x.height,j=x.x,O=x.y;return T.createElement(gn,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:v,easing:m},T.createElement("path",$d({},se(r,!0),{className:y,d:N_(j,O,S,_,w),ref:n})))}):T.createElement("g",null,T.createElement("path",$d({},se(r,!0),{className:y,d:N_(l,u,f,d,h)})))},CQ=["option","shapeType","propTransformer","activeClassName","isActive"];function zl(e){"@babel/helpers - typeof";return zl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zl(e)}function $Q(e,t){if(e==null)return{};var r=IQ(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function IQ(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function T_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Id(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?T_(Object(r),!0).forEach(function(n){RQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function RQ(e,t,r){return t=MQ(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function MQ(e){var t=DQ(e,"string");return zl(t)=="symbol"?t:t+""}function DQ(e,t){if(zl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(zl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function LQ(e,t){return Id(Id({},t),e)}function BQ(e,t){return e==="symbols"}function C_(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return T.createElement(d0,r);case"trapezoid":return T.createElement(TQ,r);case"sector":return T.createElement(JA,r);case"symbols":if(BQ(t))return T.createElement(Ny,r);break;default:return null}}function UQ(e){return E.isValidElement(e)?e.props:e}function FQ(e){var t=e.option,r=e.shapeType,n=e.propTransformer,i=n===void 0?LQ:n,a=e.activeClassName,o=a===void 0?"recharts-active-shape":a,s=e.isActive,l=$Q(e,CQ),u;if(E.isValidElement(t))u=E.cloneElement(t,Id(Id({},l),UQ(t)));else if(ie(t))u=t(l);else if(mQ(t)&&!wQ(t)){var f=i(t,l);u=T.createElement(C_,{shapeType:r,elementProps:f})}else{var d=l;u=T.createElement(C_,{shapeType:r,elementProps:d})}return s?T.createElement(Be,{className:o},u):u}function Xf(e,t){return t!=null&&"trapezoids"in e.props}function Qf(e,t){return t!=null&&"sectors"in e.props}function Wl(e,t){return t!=null&&"points"in e.props}function zQ(e,t){var r,n,i=e.x===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.x)||e.x===t.x,a=e.y===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.y)||e.y===t.y;return i&&a}function WQ(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function HQ(e,t){var r=e.x===t.x,n=e.y===t.y,i=e.z===t.z;return r&&n&&i}function KQ(e,t){var r;return Xf(e,t)?r=zQ:Qf(e,t)?r=WQ:Wl(e,t)&&(r=HQ),r}function qQ(e,t){var r;return Xf(e,t)?r="trapezoids":Qf(e,t)?r="sectors":Wl(e,t)&&(r="points"),r}function GQ(e,t){if(Xf(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}if(Qf(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}return Wl(e,t)?t.payload:{}}function VQ(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,i=qQ(r,t),a=GQ(r,t),o=n.filter(function(l,u){var f=Vf(a,l),d=r.props[i].filter(function(m){var v=KQ(r,t);return v(m,t)}),h=r.props[i].indexOf(d[d.length-1]),p=u===h;return f&&p}),s=n.indexOf(o[o.length-1]);return s}var JQ=Math.ceil,YQ=Math.max;function XQ(e,t,r,n){for(var i=-1,a=YQ(JQ((t-e)/(r||1)),0),o=Array(a);a--;)o[n?a:++i]=e,e+=r;return o}var QQ=XQ,ZQ=UE,$_=1/0,eZ=17976931348623157e292;function tZ(e){if(!e)return e===0?e:0;if(e=ZQ(e),e===$_||e===-$_){var t=e<0?-1:1;return t*eZ}return e===e?e:0}var sP=tZ,rZ=QQ,nZ=Bf,cp=sP;function iZ(e){return function(t,r,n){return n&&typeof n!="number"&&nZ(t,r,n)&&(r=n=void 0),t=cp(t),r===void 0?(r=t,t=0):r=cp(r),n=n===void 0?t<r?1:-1:cp(n),rZ(t,r,n,e)}}var aZ=iZ,oZ=aZ,sZ=oZ(),lZ=sZ;const Rd=be(lZ);function Hl(e){"@babel/helpers - typeof";return Hl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hl(e)}function I_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function R_(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?I_(Object(r),!0).forEach(function(n){lP(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):I_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lP(e,t,r){return t=uZ(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uZ(e){var t=cZ(e,"string");return Hl(t)=="symbol"?t:t+""}function cZ(e,t){if(Hl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Hl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var dZ=["Webkit","Moz","O","ms"],fZ=function(t,r){var n=t.replace(/(\w)/,function(a){return a.toUpperCase()}),i=dZ.reduce(function(a,o){return R_(R_({},a),{},lP({},o+n,r))},{});return i[t]=r,i};function fo(e){"@babel/helpers - typeof";return fo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fo(e)}function Md(){return Md=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Md.apply(this,arguments)}function M_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function dp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?M_(Object(r),!0).forEach(function(n){Mt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):M_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function hZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function D_(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,cP(n.key),n)}}function pZ(e,t,r){return t&&D_(e.prototype,t),r&&D_(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function mZ(e,t,r){return t=Dd(t),gZ(e,uP()?Reflect.construct(t,r||[],Dd(e).constructor):t.apply(e,r))}function gZ(e,t){if(t&&(fo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vZ(e)}function vZ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(uP=function(){return!!e})()}function Dd(e){return Dd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Dd(e)}function yZ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mg(e,t)}function Mg(e,t){return Mg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Mg(e,t)}function Mt(e,t,r){return t=cP(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cP(e){var t=bZ(e,"string");return fo(t)=="symbol"?t:t+""}function bZ(e,t){if(fo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(fo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var xZ=function(t){var r=t.data,n=t.startIndex,i=t.endIndex,a=t.x,o=t.width,s=t.travellerWidth;if(!r||!r.length)return{};var l=r.length,u=Ms().domain(Rd(0,l)).range([a,a+o-s]),f=u.domain().map(function(d){return u(d)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(n),endX:u(i),scale:u,scaleValues:f}},L_=function(t){return t.changedTouches&&!!t.changedTouches.length},ho=function(e){function t(r){var n;return hZ(this,t),n=mZ(this,t,[r]),Mt(n,"handleDrag",function(i){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(i):n.state.isSlideMoving&&n.handleSlideDrag(i)}),Mt(n,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&n.handleDrag(i.changedTouches[0])}),Mt(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,a=i.endIndex,o=i.onDragEnd,s=i.startIndex;o==null||o({endIndex:a,startIndex:s})}),n.detachDragEndListener()}),Mt(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),Mt(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),Mt(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),Mt(n,"handleSlideDragStart",function(i){var a=L_(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 yZ(t,e),pZ(t,[{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,o=this.state.scaleValues,s=this.props,l=s.gap,u=s.data,f=u.length-1,d=Math.min(i,a),h=Math.max(i,a),p=t.getIndexInRange(o,d),m=t.getIndexInRange(o,h);return{startIndex:p-p%l,endIndex:m===f?f:m-m%l}}},{key:"getTextOfTick",value:function(n){var i=this.props,a=i.data,o=i.tickFormatter,s=i.dataKey,l=Kt(a[n],s,n);return ie(o)?o(l,n):l}},{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,o=i.startX,s=i.endX,l=this.props,u=l.x,f=l.width,d=l.travellerWidth,h=l.startIndex,p=l.endIndex,m=l.onChange,v=n.pageX-a;v>0?v=Math.min(v,u+f-d-s,u+f-d-o):v<0&&(v=Math.max(v,u-o,u-s));var b=this.getIndex({startX:o+v,endX:s+v});(b.startIndex!==h||b.endIndex!==p)&&m&&m(b),this.setState({startX:o+v,endX:s+v,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var a=L_(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,o=i.movingTravellerId,s=i.endX,l=i.startX,u=this.state[o],f=this.props,d=f.x,h=f.width,p=f.travellerWidth,m=f.onChange,v=f.gap,b=f.data,g={startX:this.state.startX,endX:this.state.endX},y=n.pageX-a;y>0?y=Math.min(y,d+h-p-u):y<0&&(y=Math.max(y,d-u)),g[o]=u+y;var x=this.getIndex(g),S=x.startIndex,_=x.endIndex,w=function(){var O=b.length-1;return o==="startX"&&(s>l?S%v===0:_%v===0)||s<l&&_===O||o==="endX"&&(s>l?_%v===0:S%v===0)||s>l&&_===O};this.setState(Mt(Mt({},o,u+y),"brushMoveStartX",n.pageX),function(){m&&w()&&m(x)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var a=this,o=this.state,s=o.scaleValues,l=o.startX,u=o.endX,f=this.state[i],d=s.indexOf(f);if(d!==-1){var h=d+n;if(!(h===-1||h>=s.length)){var p=s[h];i==="startX"&&p>=u||i==="endX"&&p<=l||this.setState(Mt({},i,p),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,o=n.width,s=n.height,l=n.fill,u=n.stroke;return T.createElement("rect",{stroke:u,fill:l,x:i,y:a,width:o,height:s})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,l=n.data,u=n.children,f=n.padding,d=E.Children.only(u);return d?T.cloneElement(d,{x:i,y:a,width:o,height:s,margin:f,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(n,i){var a,o,s=this,l=this.props,u=l.y,f=l.travellerWidth,d=l.height,h=l.traveller,p=l.ariaLabel,m=l.data,v=l.startIndex,b=l.endIndex,g=Math.max(n,this.props.x),y=dp(dp({},se(this.props,!1)),{},{x:g,y:u,width:f,height:d}),x=p||"Min value: ".concat((a=m[v])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=m[b])===null||o===void 0?void 0:o.name);return T.createElement(Be,{tabIndex:0,role:"slider","aria-label":x,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(_){["ArrowLeft","ArrowRight"].includes(_.key)&&(_.preventDefault(),_.stopPropagation(),s.handleTravellerMoveKeyboard(_.key==="ArrowRight"?1:-1,i))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,y))}},{key:"renderSlide",value:function(n,i){var a=this.props,o=a.y,s=a.height,l=a.stroke,u=a.travellerWidth,f=Math.min(n,i)+u,d=Math.max(Math.abs(i-n)-u,0);return T.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:f,y:o,width:d,height:s})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,a=n.endIndex,o=n.y,s=n.height,l=n.travellerWidth,u=n.stroke,f=this.state,d=f.startX,h=f.endX,p=5,m={pointerEvents:"none",fill:u};return T.createElement(Be,{className:"recharts-brush-texts"},T.createElement(cd,Md({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,h)-p,y:o+s/2},m),this.getTextOfTick(i)),T.createElement(cd,Md({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,h)+l+p,y:o+s/2},m),this.getTextOfTick(a)))}},{key:"render",value:function(){var n=this.props,i=n.data,a=n.className,o=n.children,s=n.x,l=n.y,u=n.width,f=n.height,d=n.alwaysShowText,h=this.state,p=h.startX,m=h.endX,v=h.isTextActive,b=h.isSlideMoving,g=h.isTravellerMoving,y=h.isTravellerFocused;if(!i||!i.length||!K(s)||!K(l)||!K(u)||!K(f)||u<=0||f<=0)return null;var x=de("recharts-brush",a),S=T.Children.count(o)===1,_=fZ("userSelect","none");return T.createElement(Be,{className:x,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:_},this.renderBackground(),S&&this.renderPanorama(),this.renderSlide(p,m),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(m,"endX"),(v||b||g||y||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,a=n.y,o=n.width,s=n.height,l=n.stroke,u=Math.floor(a+s/2)-1;return T.createElement(T.Fragment,null,T.createElement("rect",{x:i,y:a,width:o,height:s,fill:l,stroke:"none"}),T.createElement("line",{x1:i+1,y1:u,x2:i+o-1,y2:u,fill:"none",stroke:"#fff"}),T.createElement("line",{x1:i+1,y1:u+2,x2:i+o-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var a;return T.isValidElement(n)?a=T.cloneElement(n,i):ie(n)?a=n(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(n,i){var a=n.data,o=n.width,s=n.x,l=n.travellerWidth,u=n.updateId,f=n.startIndex,d=n.endIndex;if(a!==i.prevData||u!==i.prevUpdateId)return dp({prevData:a,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o},a&&a.length?xZ({data:a,width:o,x:s,travellerWidth:l,startIndex:f,endIndex:d}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||s!==i.prevX||l!==i.prevTravellerWidth)){i.scale.range([s,s+o-l]);var h=i.scale.domain().map(function(p){return i.scale(p)});return{prevData:a,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o,startX:i.scale(n.startIndex),endX:i.scale(n.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(n,i){for(var a=n.length,o=0,s=a-1;s-o>1;){var l=Math.floor((o+s)/2);n[l]>i?s=l:o=l}return i>=n[s]?s:o}}])}(E.PureComponent);Mt(ho,"displayName","Brush");Mt(ho,"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 wZ=Dy;function _Z(e,t){var r;return wZ(e,function(n,i,a){return r=t(n,i,a),!r}),!!r}var SZ=_Z,jZ=hE,kZ=ii,OZ=SZ,EZ=$t,AZ=Bf;function PZ(e,t,r){var n=EZ(e)?jZ:OZ;return r&&AZ(e,t,r)&&(t=void 0),n(e,kZ(t))}var NZ=PZ;const TZ=be(NZ);var Br=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},B_=RE;function CZ(e,t,r){t=="__proto__"&&B_?B_(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var $Z=CZ,IZ=$Z,RZ=$E,MZ=ii;function DZ(e,t){var r={};return t=MZ(t),RZ(e,function(n,i,a){IZ(r,i,t(n,i,a))}),r}var LZ=DZ;const BZ=be(LZ);function UZ(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}var FZ=UZ,zZ=Dy;function WZ(e,t){var r=!0;return zZ(e,function(n,i,a){return r=!!t(n,i,a),r}),r}var HZ=WZ,KZ=FZ,qZ=HZ,GZ=ii,VZ=$t,JZ=Bf;function YZ(e,t,r){var n=VZ(e)?KZ:qZ;return r&&JZ(e,t,r)&&(t=void 0),n(e,GZ(t))}var XZ=YZ;const dP=be(XZ);var QZ=["x","y"];function Kl(e){"@babel/helpers - typeof";return Kl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kl(e)}function Dg(){return Dg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Dg.apply(this,arguments)}function U_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function fs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?U_(Object(r),!0).forEach(function(n){ZZ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ZZ(e,t,r){return t=eee(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eee(e){var t=tee(e,"string");return Kl(t)=="symbol"?t:t+""}function tee(e,t){if(Kl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Kl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ree(e,t){if(e==null)return{};var r=nee(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function nee(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function iee(e,t){var r=e.x,n=e.y,i=ree(e,QZ),a="".concat(r),o=parseInt(a,10),s="".concat(n),l=parseInt(s,10),u="".concat(t.height||i.height),f=parseInt(u,10),d="".concat(t.width||i.width),h=parseInt(d,10);return fs(fs(fs(fs(fs({},t),i),o?{x:o}:{}),l?{y:l}:{}),{},{height:f,width:h,name:t.name,radius:t.radius})}function F_(e){return T.createElement(FQ,Dg({shapeType:"rectangle",propTransformer:iee,activeClassName:"recharts-active-bar"},e))}var aee=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,i){if(typeof t=="number")return t;var a=K(n)||y3(n);return a?t(n,i):(a||qi(),r)}},oee=["value","background"],fP;function po(e){"@babel/helpers - typeof";return po=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},po(e)}function see(e,t){if(e==null)return{};var r=lee(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function lee(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Ld(){return Ld=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ld.apply(this,arguments)}function z_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Fe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?z_(Object(r),!0).forEach(function(n){Dn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):z_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function W_(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,pP(n.key),n)}}function cee(e,t,r){return t&&W_(e.prototype,t),r&&W_(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function dee(e,t,r){return t=Bd(t),fee(e,hP()?Reflect.construct(t,r||[],Bd(e).constructor):t.apply(e,r))}function fee(e,t){if(t&&(po(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hee(e)}function hee(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hP=function(){return!!e})()}function Bd(e){return Bd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Bd(e)}function pee(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lg(e,t)}function Lg(e,t){return Lg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Lg(e,t)}function Dn(e,t,r){return t=pP(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pP(e){var t=mee(e,"string");return po(t)=="symbol"?t:t+""}function mee(e,t){if(po(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(po(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var sn=function(e){function t(){var r;uee(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=dee(this,t,[].concat(i)),Dn(r,"state",{isAnimationFinished:!1}),Dn(r,"id",ou("recharts-bar-")),Dn(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),o&&o()}),Dn(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),o&&o()}),r}return pee(t,e),cee(t,[{key:"renderRectanglesStatically",value:function(n){var i=this,a=this.props,o=a.shape,s=a.dataKey,l=a.activeIndex,u=a.activeBar,f=se(this.props,!1);return n&&n.map(function(d,h){var p=h===l,m=p?u:o,v=Fe(Fe(Fe({},f),d),{},{isActive:p,option:m,index:h,dataKey:s,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return T.createElement(Be,Ld({className:"recharts-bar-rectangle"},Jc(i.props,d,h),{key:"rectangle-".concat(d==null?void 0:d.x,"-").concat(d==null?void 0:d.y,"-").concat(d==null?void 0:d.value,"-").concat(h)}),T.createElement(F_,v))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,i=this.props,a=i.data,o=i.layout,s=i.isAnimationActive,l=i.animationBegin,u=i.animationDuration,f=i.animationEasing,d=i.animationId,h=this.state.prevData;return T.createElement(gn,{begin:l,duration:u,isActive:s,easing:f,from:{t:0},to:{t:1},key:"bar-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(p){var m=p.t,v=a.map(function(b,g){var y=h&&h[g];if(y){var x=xr(y.x,b.x),S=xr(y.y,b.y),_=xr(y.width,b.width),w=xr(y.height,b.height);return Fe(Fe({},b),{},{x:x(m),y:S(m),width:_(m),height:w(m)})}if(o==="horizontal"){var j=xr(0,b.height),O=j(m);return Fe(Fe({},b),{},{y:b.y+b.height-O,height:O})}var k=xr(0,b.width),A=k(m);return Fe(Fe({},b),{},{width:A})});return T.createElement(Be,null,n.renderRectanglesStatically(v))})}},{key:"renderRectangles",value:function(){var n=this.props,i=n.data,a=n.isAnimationActive,o=this.state.prevData;return a&&i&&i.length&&(!o||!Vf(o,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var n=this,i=this.props,a=i.data,o=i.dataKey,s=i.activeIndex,l=se(this.props.background,!1);return a.map(function(u,f){u.value;var d=u.background,h=see(u,oee);if(!d)return null;var p=Fe(Fe(Fe(Fe(Fe({},h),{},{fill:"#eee"},d),l),Jc(n.props,u,f)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:o,index:f,className:"recharts-bar-background-rectangle"});return T.createElement(F_,Ld({key:"background-bar-".concat(f),option:n.props.background,isActive:f===s},p))})}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.data,s=a.xAxis,l=a.yAxis,u=a.layout,f=a.children,d=ar(f,fu);if(!d)return null;var h=u==="vertical"?o[0].height/2:o[0].width/2,p=function(b,g){var y=Array.isArray(b.value)?b.value[1]:b.value;return{x:b.x,y:b.y,value:y,errorVal:Kt(b,g)}},m={clipPath:n?"url(#clipPath-".concat(i,")"):null};return T.createElement(Be,m,d.map(function(v){return T.cloneElement(v,{key:"error-bar-".concat(i,"-").concat(v.props.dataKey),data:o,xAxis:s,yAxis:l,layout:u,offset:h,dataPointFormatter:p})}))}},{key:"render",value:function(){var n=this.props,i=n.hide,a=n.data,o=n.className,s=n.xAxis,l=n.yAxis,u=n.left,f=n.top,d=n.width,h=n.height,p=n.isAnimationActive,m=n.background,v=n.id;if(i||!a||!a.length)return null;var b=this.state.isAnimationFinished,g=de("recharts-bar",o),y=s&&s.allowDataOverflow,x=l&&l.allowDataOverflow,S=y||x,_=ae(v)?this.id:v;return T.createElement(Be,{className:g},y||x?T.createElement("defs",null,T.createElement("clipPath",{id:"clipPath-".concat(_)},T.createElement("rect",{x:y?u:u-d/2,y:x?f:f-h/2,width:y?d:d*2,height:x?h:h*2}))):null,T.createElement(Be,{className:"recharts-bar-rectangles",clipPath:S?"url(#clipPath-".concat(_,")"):null},m?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(S,_),(!p||b)&&Yn.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}}])}(E.PureComponent);fP=sn;Dn(sn,"displayName","Bar");Dn(sn,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!Fo.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Dn(sn,"getComposedData",function(e){var t=e.props,r=e.item,n=e.barPosition,i=e.bandSize,a=e.xAxis,o=e.yAxis,s=e.xAxisTicks,l=e.yAxisTicks,u=e.stackedData,f=e.dataStartIndex,d=e.displayedData,h=e.offset,p=FV(n,r);if(!p)return null;var m=t.layout,v=r.type.defaultProps,b=v!==void 0?Fe(Fe({},v),r.props):r.props,g=b.dataKey,y=b.children,x=b.minPointSize,S=m==="horizontal"?o:a,_=u?S.scale.domain():null,w=JV({numericAxis:S}),j=ar(y,ld),O=d.map(function(k,A){var C,P,B,N,I,R;u?C=zV(u[f+A],_):(C=Kt(k,g),Array.isArray(C)||(C=[w,C]));var D=aee(x,fP.defaultProps.minPointSize)(C[1],A);if(m==="horizontal"){var $,M=[o.scale(C[0]),o.scale(C[1])],U=M[0],H=M[1];P=K1({axis:a,ticks:s,bandSize:i,offset:p.offset,entry:k,index:A}),B=($=H??U)!==null&&$!==void 0?$:void 0,N=p.size;var W=U-H;if(I=Number.isNaN(W)?0:W,R={x:P,y:o.y,width:N,height:o.height},Math.abs(D)>0&&Math.abs(I)<Math.abs(D)){var X=Sr(I||D)*(Math.abs(D)-Math.abs(I));B-=X,I+=X}}else{var le=[a.scale(C[0]),a.scale(C[1])],Ee=le[0],De=le[1];if(P=Ee,B=K1({axis:o,ticks:l,bandSize:i,offset:p.offset,entry:k,index:A}),N=De-Ee,I=p.size,R={x:a.x,y:B,width:a.width,height:I},Math.abs(D)>0&&Math.abs(N)<Math.abs(D)){var Vt=Sr(N||D)*(Math.abs(D)-Math.abs(N));N+=Vt}}return Fe(Fe(Fe({},k),{},{x:P,y:B,width:N,height:I,value:u?C:C[1],payload:k,background:R},j&&j[A]&&j[A].props),{},{tooltipPayload:[qA(r,k)],tooltipPosition:{x:P+N/2,y:B+I/2}})});return Fe({data:O,layout:m},h)});function ql(e){"@babel/helpers - typeof";return ql=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ql(e)}function gee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function H_(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,mP(n.key),n)}}function vee(e,t,r){return t&&H_(e.prototype,t),r&&H_(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function K_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function vr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?K_(Object(r),!0).forEach(function(n){Zf(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):K_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Zf(e,t,r){return t=mP(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mP(e){var t=yee(e,"string");return ql(t)=="symbol"?t:t+""}function yee(e,t){if(ql(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ql(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var gP=function(t,r,n,i,a){var o=t.width,s=t.height,l=t.layout,u=t.children,f=Object.keys(r),d={left:n.left,leftMirror:n.left,right:o-n.right,rightMirror:o-n.right,top:n.top,topMirror:n.top,bottom:s-n.bottom,bottomMirror:s-n.bottom},h=!!Lt(u,sn);return f.reduce(function(p,m){var v=r[m],b=v.orientation,g=v.domain,y=v.padding,x=y===void 0?{}:y,S=v.mirror,_=v.reversed,w="".concat(b).concat(S?"Mirror":""),j,O,k,A,C;if(v.type==="number"&&(v.padding==="gap"||v.padding==="no-gap")){var P=g[1]-g[0],B=1/0,N=v.categoricalDomain.sort(w3);if(N.forEach(function(le,Ee){Ee>0&&(B=Math.min((le||0)-(N[Ee-1]||0),B))}),Number.isFinite(B)){var I=B/P,R=v.layout==="vertical"?n.height:n.width;if(v.padding==="gap"&&(j=I*R/2),v.padding==="no-gap"){var D=Hi(t.barCategoryGap,I*R),$=I*R/2;j=$-D-($-D)/R*D}}}i==="xAxis"?O=[n.left+(x.left||0)+(j||0),n.left+n.width-(x.right||0)-(j||0)]:i==="yAxis"?O=l==="horizontal"?[n.top+n.height-(x.bottom||0),n.top+(x.top||0)]:[n.top+(x.top||0)+(j||0),n.top+n.height-(x.bottom||0)-(j||0)]:O=v.range,_&&(O=[O[1],O[0]]);var M=BV(v,a,h),U=M.scale,H=M.realScaleType;U.domain(g).range(O),UV(U);var W=VV(U,vr(vr({},v),{},{realScaleType:H}));i==="xAxis"?(C=b==="top"&&!S||b==="bottom"&&S,k=n.left,A=d[w]-C*v.height):i==="yAxis"&&(C=b==="left"&&!S||b==="right"&&S,k=d[w]-C*v.width,A=n.top);var X=vr(vr(vr({},v),W),{},{realScaleType:H,x:k,y:A,scale:U,width:i==="xAxis"?n.width:v.width,height:i==="yAxis"?n.height:v.height});return X.bandSize=kd(X,W),!v.hide&&i==="xAxis"?d[w]+=(C?-1:1)*X.height:v.hide||(d[w]+=(C?-1:1)*X.width),vr(vr({},p),{},Zf({},m,X))},{})},vP=function(t,r){var n=t.x,i=t.y,a=r.x,o=r.y;return{x:Math.min(n,a),y:Math.min(i,o),width:Math.abs(a-n),height:Math.abs(o-i)}},bee=function(t){var r=t.x1,n=t.y1,i=t.x2,a=t.y2;return vP({x:r,y:n},{x:i,y:a})},yP=function(){function e(t){gee(this,e),this.scale=t}return vee(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(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 o=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+o}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(r)+s}default:return this.scale(r)}if(i){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+l}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 e(r)}}])}();Zf(yP,"EPS",1e-4);var h0=function(t){var r=Object.keys(t).reduce(function(n,i){return vr(vr({},n),{},Zf({},i,yP.create(t[i])))},{});return vr(vr({},r),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,s=a.position;return BZ(i,function(l,u){return r[u].apply(l,{bandAware:o,position:s})})},isInRange:function(i){return dP(i,function(a,o){return r[o].isInRange(a)})}})};function xee(e){return(e%180+180)%180}var wee=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=xee(i),o=a*Math.PI/180,s=Math.atan(n/r),l=o>s&&o<Math.PI-s?n/Math.sin(o):r/Math.cos(o);return Math.abs(l)},_ee=ii,See=su,jee=Df;function kee(e){return function(t,r,n){var i=Object(t);if(!See(t)){var a=_ee(r);t=jee(t),r=function(s){return a(i[s],s,i)}}var o=e(t,r,n);return o>-1?i[a?t[o]:o]:void 0}}var Oee=kee,Eee=sP;function Aee(e){var t=Eee(e),r=t%1;return t===t?r?t-r:t:0}var Pee=Aee,Nee=EE,Tee=ii,Cee=Pee,$ee=Math.max;function Iee(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:Cee(r);return i<0&&(i=$ee(n+i,0)),Nee(e,Tee(t),i)}var Ree=Iee,Mee=Oee,Dee=Ree,Lee=Mee(Dee),Bee=Lee;const Uee=be(Bee);var Fee=j4(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),p0=E.createContext(void 0),m0=E.createContext(void 0),bP=E.createContext(void 0),xP=E.createContext({}),wP=E.createContext(void 0),_P=E.createContext(0),SP=E.createContext(0),q_=function(t){var r=t.state,n=r.xAxisMap,i=r.yAxisMap,a=r.offset,o=t.clipPathId,s=t.children,l=t.width,u=t.height,f=Fee(a);return T.createElement(p0.Provider,{value:n},T.createElement(m0.Provider,{value:i},T.createElement(xP.Provider,{value:a},T.createElement(bP.Provider,{value:f},T.createElement(wP.Provider,{value:o},T.createElement(_P.Provider,{value:u},T.createElement(SP.Provider,{value:l},s)))))))},zee=function(){return E.useContext(wP)},jP=function(t){var r=E.useContext(p0);r==null&&qi();var n=r[t];return n==null&&qi(),n},Wee=function(){var t=E.useContext(p0);return $n(t)},Hee=function(){var t=E.useContext(m0),r=Uee(t,function(n){return dP(n.domain,Number.isFinite)});return r||$n(t)},kP=function(t){var r=E.useContext(m0);r==null&&qi();var n=r[t];return n==null&&qi(),n},Kee=function(){var t=E.useContext(bP);return t},qee=function(){return E.useContext(xP)},g0=function(){return E.useContext(SP)},v0=function(){return E.useContext(_P)};function mo(e){"@babel/helpers - typeof";return mo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mo(e)}function Gee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vee(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,EP(n.key),n)}}function Jee(e,t,r){return t&&Vee(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Yee(e,t,r){return t=Ud(t),Xee(e,OP()?Reflect.construct(t,r||[],Ud(e).constructor):t.apply(e,r))}function Xee(e,t){if(t&&(mo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qee(e)}function Qee(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function OP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(OP=function(){return!!e})()}function Ud(e){return Ud=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ud(e)}function Zee(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bg(e,t)}function Bg(e,t){return Bg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Bg(e,t)}function G_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function V_(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?G_(Object(r),!0).forEach(function(n){y0(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):G_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function y0(e,t,r){return t=EP(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function EP(e){var t=ete(e,"string");return mo(t)=="symbol"?t:t+""}function ete(e,t){if(mo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(mo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function tte(e,t){return ate(e)||ite(e,t)||nte(e,t)||rte()}function rte(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
472In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nte(e,t){if(e){if(typeof e=="string")return J_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return J_(e,t)}}function J_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ite(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function ate(e){if(Array.isArray(e))return e}function Ug(){return Ug=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ug.apply(this,arguments)}var ote=function(t,r){var n;return T.isValidElement(t)?n=T.cloneElement(t,r):ie(t)?n=t(r):n=T.createElement("line",Ug({},r,{className:"recharts-reference-line-line"})),n},ste=function(t,r,n,i,a,o,s,l,u){var f=a.x,d=a.y,h=a.width,p=a.height;if(n){var m=u.y,v=t.y.apply(m,{position:o});if(Br(u,"discard")&&!t.y.isInRange(v))return null;var b=[{x:f+h,y:v},{x:f,y:v}];return l==="left"?b.reverse():b}if(r){var g=u.x,y=t.x.apply(g,{position:o});if(Br(u,"discard")&&!t.x.isInRange(y))return null;var x=[{x:y,y:d+p},{x:y,y:d}];return s==="top"?x.reverse():x}if(i){var S=u.segment,_=S.map(function(w){return t.apply(w,{position:o})});return Br(u,"discard")&&TZ(_,function(w){return!t.isInRange(w)})?null:_}return null};function lte(e){var t=e.x,r=e.y,n=e.segment,i=e.xAxisId,a=e.yAxisId,o=e.shape,s=e.className,l=e.alwaysShow,u=zee(),f=jP(i),d=kP(a),h=Kee();if(!u||!h)return null;an(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var p=h0({x:f.scale,y:d.scale}),m=Xe(t),v=Xe(r),b=n&&n.length===2,g=ste(p,m,v,b,h,e.position,f.orientation,d.orientation,e);if(!g)return null;var y=tte(g,2),x=y[0],S=x.x,_=x.y,w=y[1],j=w.x,O=w.y,k=Br(e,"hidden")?"url(#".concat(u,")"):void 0,A=V_(V_({clipPath:k},se(e,!0)),{},{x1:S,y1:_,x2:j,y2:O});return T.createElement(Be,{className:de("recharts-reference-line",s)},ote(o,A),mt.renderCallByParent(e,bee({x1:S,y1:_,x2:j,y2:O})))}var b0=function(e){function t(){return Gee(this,t),Yee(this,t,arguments)}return Zee(t,e),Jee(t,[{key:"render",value:function(){return T.createElement(lte,this.props)}}])}(T.Component);y0(b0,"displayName","ReferenceLine");y0(b0,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function Fg(){return Fg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Fg.apply(this,arguments)}function go(e){"@babel/helpers - typeof";return go=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},go(e)}function Y_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function X_(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Y_(Object(r),!0).forEach(function(n){eh(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Y_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ute(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cte(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,PP(n.key),n)}}function dte(e,t,r){return t&&cte(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function fte(e,t,r){return t=Fd(t),hte(e,AP()?Reflect.construct(t,r||[],Fd(e).constructor):t.apply(e,r))}function hte(e,t){if(t&&(go(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return pte(e)}function pte(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function AP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(AP=function(){return!!e})()}function Fd(e){return Fd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Fd(e)}function mte(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zg(e,t)}function zg(e,t){return zg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},zg(e,t)}function eh(e,t,r){return t=PP(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PP(e){var t=gte(e,"string");return go(t)=="symbol"?t:t+""}function gte(e,t){if(go(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(go(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var vte=function(t){var r=t.x,n=t.y,i=t.xAxis,a=t.yAxis,o=h0({x:i.scale,y:a.scale}),s=o.apply({x:r,y:n},{bandAware:!0});return Br(t,"discard")&&!o.isInRange(s)?null:s},th=function(e){function t(){return ute(this,t),fte(this,t,arguments)}return mte(t,e),dte(t,[{key:"render",value:function(){var n=this.props,i=n.x,a=n.y,o=n.r,s=n.alwaysShow,l=n.clipPathId,u=Xe(i),f=Xe(a);if(an(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!f)return null;var d=vte(this.props);if(!d)return null;var h=d.x,p=d.y,m=this.props,v=m.shape,b=m.className,g=Br(this.props,"hidden")?"url(#".concat(l,")"):void 0,y=X_(X_({clipPath:g},se(this.props,!0)),{},{cx:h,cy:p});return T.createElement(Be,{className:de("recharts-reference-dot",b)},t.renderDot(v,y),mt.renderCallByParent(this.props,{x:h-o,y:p-o,width:2*o,height:2*o}))}}])}(T.Component);eh(th,"displayName","ReferenceDot");eh(th,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});eh(th,"renderDot",function(e,t){var r;return T.isValidElement(e)?r=T.cloneElement(e,t):ie(e)?r=e(t):r=T.createElement(f0,Fg({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),r});function Wg(){return Wg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Wg.apply(this,arguments)}function vo(e){"@babel/helpers - typeof";return vo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vo(e)}function Q_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Z_(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Q_(Object(r),!0).forEach(function(n){rh(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Q_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yte(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bte(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,TP(n.key),n)}}function xte(e,t,r){return t&&bte(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function wte(e,t,r){return t=zd(t),_te(e,NP()?Reflect.construct(t,r||[],zd(e).constructor):t.apply(e,r))}function _te(e,t){if(t&&(vo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ste(e)}function Ste(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function NP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(NP=function(){return!!e})()}function zd(e){return zd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},zd(e)}function jte(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Hg(e,t)}function Hg(e,t){return Hg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Hg(e,t)}function rh(e,t,r){return t=TP(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function TP(e){var t=kte(e,"string");return vo(t)=="symbol"?t:t+""}function kte(e,t){if(vo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(vo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ote=function(t,r,n,i,a){var o=a.x1,s=a.x2,l=a.y1,u=a.y2,f=a.xAxis,d=a.yAxis;if(!f||!d)return null;var h=h0({x:f.scale,y:d.scale}),p={x:t?h.x.apply(o,{position:"start"}):h.x.rangeMin,y:n?h.y.apply(l,{position:"start"}):h.y.rangeMin},m={x:r?h.x.apply(s,{position:"end"}):h.x.rangeMax,y:i?h.y.apply(u,{position:"end"}):h.y.rangeMax};return Br(a,"discard")&&(!h.isInRange(p)||!h.isInRange(m))?null:vP(p,m)},nh=function(e){function t(){return yte(this,t),wte(this,t,arguments)}return jte(t,e),xte(t,[{key:"render",value:function(){var n=this.props,i=n.x1,a=n.x2,o=n.y1,s=n.y2,l=n.className,u=n.alwaysShow,f=n.clipPathId;an(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var d=Xe(i),h=Xe(a),p=Xe(o),m=Xe(s),v=this.props.shape;if(!d&&!h&&!p&&!m&&!v)return null;var b=Ote(d,h,p,m,this.props);if(!b&&!v)return null;var g=Br(this.props,"hidden")?"url(#".concat(f,")"):void 0;return T.createElement(Be,{className:de("recharts-reference-area",l)},t.renderRect(v,Z_(Z_({clipPath:g},se(this.props,!0)),b)),mt.renderCallByParent(this.props,b))}}])}(T.Component);rh(nh,"displayName","ReferenceArea");rh(nh,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});rh(nh,"renderRect",function(e,t){var r;return T.isValidElement(e)?r=T.cloneElement(e,t):ie(e)?r=e(t):r=T.createElement(d0,Wg({},t,{className:"recharts-reference-area-rect"})),r});function CP(e,t,r){if(t<1)return[];if(t===1&&r===void 0)return e;for(var n=[],i=0;i<e.length;i+=t)n.push(e[i]);return n}function Ete(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return wee(n,r)}function Ate(e,t,r){var n=r==="width",i=e.x,a=e.y,o=e.width,s=e.height;return t===1?{start:n?i:a,end:n?i+o:a+s}:{start:n?i+o:a+s,end:n?i:a}}function Wd(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var a=r();return e*(t-e*a/2-n)>=0&&e*(t+e*a/2-i)<=0}function Pte(e,t){return CP(e,t+1)}function Nte(e,t,r,n,i){for(var a=(n||[]).slice(),o=t.start,s=t.end,l=0,u=1,f=o,d=function(){var m=n==null?void 0:n[l];if(m===void 0)return{v:CP(n,u)};var v=l,b,g=function(){return b===void 0&&(b=r(m,v)),b},y=m.coordinate,x=l===0||Wd(e,y,g,f,s);x||(l=0,f=o,u+=1),x&&(f=y+e*(g()/2+i),l+=u)},h;u<=a.length;)if(h=d(),h)return h.v;return[]}function Gl(e){"@babel/helpers - typeof";return Gl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gl(e)}function eS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ht(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eS(Object(r),!0).forEach(function(n){Tte(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Tte(e,t,r){return t=Cte(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Cte(e){var t=$te(e,"string");return Gl(t)=="symbol"?t:t+""}function $te(e,t){if(Gl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Gl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ite(e,t,r,n,i){for(var a=(n||[]).slice(),o=a.length,s=t.start,l=t.end,u=function(h){var p=a[h],m,v=function(){return m===void 0&&(m=r(p,h)),m};if(h===o-1){var b=e*(p.coordinate+e*v()/2-l);a[h]=p=ht(ht({},p),{},{tickCoord:b>0?p.coordinate-b*e:p.coordinate})}else a[h]=p=ht(ht({},p),{},{tickCoord:p.coordinate});var g=Wd(e,p.tickCoord,v,s,l);g&&(l=p.tickCoord-e*(v()/2+i),a[h]=ht(ht({},p),{},{isShow:!0}))},f=o-1;f>=0;f--)u(f);return a}function Rte(e,t,r,n,i,a){var o=(n||[]).slice(),s=o.length,l=t.start,u=t.end;if(a){var f=n[s-1],d=r(f,s-1),h=e*(f.coordinate+e*d/2-u);o[s-1]=f=ht(ht({},f),{},{tickCoord:h>0?f.coordinate-h*e:f.coordinate});var p=Wd(e,f.tickCoord,function(){return d},l,u);p&&(u=f.tickCoord-e*(d/2+i),o[s-1]=ht(ht({},f),{},{isShow:!0}))}for(var m=a?s-1:s,v=function(y){var x=o[y],S,_=function(){return S===void 0&&(S=r(x,y)),S};if(y===0){var w=e*(x.coordinate-e*_()/2-l);o[y]=x=ht(ht({},x),{},{tickCoord:w<0?x.coordinate-w*e:x.coordinate})}else o[y]=x=ht(ht({},x),{},{tickCoord:x.coordinate});var j=Wd(e,x.tickCoord,_,l,u);j&&(l=x.tickCoord+e*(_()/2+i),o[y]=ht(ht({},x),{},{isShow:!0}))},b=0;b<m;b++)v(b);return o}function x0(e,t,r){var n=e.tick,i=e.ticks,a=e.viewBox,o=e.minTickGap,s=e.orientation,l=e.interval,u=e.tickFormatter,f=e.unit,d=e.angle;if(!i||!i.length||!n)return[];if(K(l)||Fo.isSsr)return Pte(i,typeof l=="number"&&K(l)?l:0);var h=[],p=s==="top"||s==="bottom"?"width":"height",m=f&&p==="width"?Rs(f,{fontSize:t,letterSpacing:r}):{width:0,height:0},v=function(x,S){var _=ie(u)?u(x.value,S):x.value;return p==="width"?Ete(Rs(_,{fontSize:t,letterSpacing:r}),m,d):Rs(_,{fontSize:t,letterSpacing:r})[p]},b=i.length>=2?Sr(i[1].coordinate-i[0].coordinate):1,g=Ate(a,b,p);return l==="equidistantPreserveStart"?Nte(b,g,v,i,o):(l==="preserveStart"||l==="preserveStartEnd"?h=Rte(b,g,v,i,o,l==="preserveStartEnd"):h=Ite(b,g,v,i,o),h.filter(function(y){return y.isShow}))}var Mte=["viewBox"],Dte=["viewBox"],Lte=["ticks"];function yo(e){"@babel/helpers - typeof";return yo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yo(e)}function Ca(){return Ca=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ca.apply(this,arguments)}function tS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ge(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tS(Object(r),!0).forEach(function(n){w0(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fp(e,t){if(e==null)return{};var r=Bte(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Bte(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Ute(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rS(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,IP(n.key),n)}}function Fte(e,t,r){return t&&rS(e.prototype,t),r&&rS(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function zte(e,t,r){return t=Hd(t),Wte(e,$P()?Reflect.construct(t,r||[],Hd(e).constructor):t.apply(e,r))}function Wte(e,t){if(t&&(yo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Hte(e)}function Hte(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $P(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($P=function(){return!!e})()}function Hd(e){return Hd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Hd(e)}function Kte(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Kg(e,t)}function Kg(e,t){return Kg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Kg(e,t)}function w0(e,t,r){return t=IP(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function IP(e){var t=qte(e,"string");return yo(t)=="symbol"?t:t+""}function qte(e,t){if(yo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(yo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ko=function(e){function t(r){var n;return Ute(this,t),n=zte(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return Kte(t,e),Fte(t,[{key:"shouldComponentUpdate",value:function(n,i){var a=n.viewBox,o=fp(n,Mte),s=this.props,l=s.viewBox,u=fp(s,Dte);return!Fa(a,l)||!Fa(o,u)||!Fa(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,o=i.y,s=i.width,l=i.height,u=i.orientation,f=i.tickSize,d=i.mirror,h=i.tickMargin,p,m,v,b,g,y,x=d?-1:1,S=n.tickSize||f,_=K(n.tickCoord)?n.tickCoord:n.coordinate;switch(u){case"top":p=m=n.coordinate,b=o+ +!d*l,v=b-x*S,y=v-x*h,g=_;break;case"left":v=b=n.coordinate,m=a+ +!d*s,p=m-x*S,g=p-x*h,y=_;break;case"right":v=b=n.coordinate,m=a+ +d*s,p=m+x*S,g=p+x*h,y=_;break;default:p=m=n.coordinate,b=o+ +d*l,v=b+x*S,y=v+x*h,g=_;break}return{line:{x1:p,y1:v,x2:m,y2:b},tick:{x:g,y}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,o;switch(i){case"left":o=a?"start":"end";break;case"right":o=a?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,o="end";switch(i){case"left":case"right":o="middle";break;case"top":o=a?"start":"end";break;default:o=a?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,l=n.orientation,u=n.mirror,f=n.axisLine,d=Ge(Ge(Ge({},se(this.props,!1)),se(f,!1)),{},{fill:"none"});if(l==="top"||l==="bottom"){var h=+(l==="top"&&!u||l==="bottom"&&u);d=Ge(Ge({},d),{},{x1:i,y1:a+h*s,x2:i+o,y2:a+h*s})}else{var p=+(l==="left"&&!u||l==="right"&&u);d=Ge(Ge({},d),{},{x1:i+p*o,y1:a,x2:i+p*o,y2:a+s})}return T.createElement("line",Ca({},d,{className:de("recharts-cartesian-axis-line",ir(f,"className"))}))}},{key:"renderTicks",value:function(n,i,a){var o=this,s=this.props,l=s.tickLine,u=s.stroke,f=s.tick,d=s.tickFormatter,h=s.unit,p=x0(Ge(Ge({},this.props),{},{ticks:n}),i,a),m=this.getTickTextAnchor(),v=this.getTickVerticalAnchor(),b=se(this.props,!1),g=se(f,!1),y=Ge(Ge({},b),{},{fill:"none"},se(l,!1)),x=p.map(function(S,_){var w=o.getTickLineCoord(S),j=w.line,O=w.tick,k=Ge(Ge(Ge(Ge({textAnchor:m,verticalAnchor:v},b),{},{stroke:"none",fill:u},g),O),{},{index:_,payload:S,visibleTicksCount:p.length,tickFormatter:d});return T.createElement(Be,Ca({className:"recharts-cartesian-axis-tick",key:"tick-".concat(S.value,"-").concat(S.coordinate,"-").concat(S.tickCoord)},Jc(o.props,S,_)),l&&T.createElement("line",Ca({},y,j,{className:de("recharts-cartesian-axis-tick-line",ir(l,"className"))})),f&&t.renderTickItem(f,k,"".concat(ie(d)?d(S.value,_):S.value).concat(h||"")))});return T.createElement("g",{className:"recharts-cartesian-axis-ticks"},x)}},{key:"render",value:function(){var n=this,i=this.props,a=i.axisLine,o=i.width,s=i.height,l=i.ticksGenerator,u=i.className,f=i.hide;if(f)return null;var d=this.props,h=d.ticks,p=fp(d,Lte),m=h;return ie(l)&&(m=h&&h.length>0?l(this.props):l(p)),o<=0||s<=0||!m||!m.length?null:T.createElement(Be,{className:de("recharts-cartesian-axis",u),ref:function(b){n.layerReference=b}},a&&this.renderAxisLine(),this.renderTicks(m,this.state.fontSize,this.state.letterSpacing),mt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,a){var o,s=de(i.className,"recharts-cartesian-axis-tick-value");return T.isValidElement(n)?o=T.cloneElement(n,Ge(Ge({},i),{},{className:s})):ie(n)?o=n(Ge(Ge({},i),{},{className:s})):o=T.createElement(cd,Ca({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])}(E.Component);w0(Ko,"displayName","CartesianAxis");w0(Ko,"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 Gte=["x1","y1","x2","y2","key"],Vte=["offset"];function Gi(e){"@babel/helpers - typeof";return Gi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gi(e)}function nS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function gt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nS(Object(r),!0).forEach(function(n){Jte(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Jte(e,t,r){return t=Yte(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yte(e){var t=Xte(e,"string");return Gi(t)=="symbol"?t:t+""}function Xte(e,t){if(Gi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Gi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ai(){return Ai=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ai.apply(this,arguments)}function iS(e,t){if(e==null)return{};var r=Qte(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Qte(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Zte=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,i=t.x,a=t.y,o=t.width,s=t.height,l=t.ry;return T.createElement("rect",{x:i,y:a,ry:l,width:o,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function RP(e,t){var r;if(T.isValidElement(e))r=T.cloneElement(e,t);else if(ie(e))r=e(t);else{var n=t.x1,i=t.y1,a=t.x2,o=t.y2,s=t.key,l=iS(t,Gte),u=se(l,!1);u.offset;var f=iS(u,Vte);r=T.createElement("line",Ai({},f,{x1:n,y1:i,x2:a,y2:o,fill:"none",key:s}))}return r}function ere(e){var t=e.x,r=e.width,n=e.horizontal,i=n===void 0?!0:n,a=e.horizontalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(s,l){var u=gt(gt({},e),{},{x1:t,y1:s,x2:t+r,y2:s,key:"line-".concat(l),index:l});return RP(i,u)});return T.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function tre(e){var t=e.y,r=e.height,n=e.vertical,i=n===void 0?!0:n,a=e.verticalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(s,l){var u=gt(gt({},e),{},{x1:s,y1:t,x2:s,y2:t+r,key:"line-".concat(l),index:l});return RP(i,u)});return T.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function rre(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,a=e.width,o=e.height,s=e.horizontalPoints,l=e.horizontal,u=l===void 0?!0:l;if(!u||!t||!t.length)return null;var f=s.map(function(h){return Math.round(h+i-i)}).sort(function(h,p){return h-p});i!==f[0]&&f.unshift(0);var d=f.map(function(h,p){var m=!f[p+1],v=m?i+o-h:f[p+1]-h;if(v<=0)return null;var b=p%t.length;return T.createElement("rect",{key:"react-".concat(p),y:h,x:n,height:v,width:a,stroke:"none",fill:t[b],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return T.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function nre(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,a=e.x,o=e.y,s=e.width,l=e.height,u=e.verticalPoints;if(!r||!n||!n.length)return null;var f=u.map(function(h){return Math.round(h+a-a)}).sort(function(h,p){return h-p});a!==f[0]&&f.unshift(0);var d=f.map(function(h,p){var m=!f[p+1],v=m?a+s-h:f[p+1]-h;if(v<=0)return null;var b=p%n.length;return T.createElement("rect",{key:"react-".concat(p),x:h,y:o,width:v,height:l,stroke:"none",fill:n[b],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return T.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var ire=function(t,r){var n=t.xAxis,i=t.width,a=t.height,o=t.offset;return HA(x0(gt(gt(gt({},Ko.defaultProps),n),{},{ticks:tn(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.left,o.left+o.width,r)},are=function(t,r){var n=t.yAxis,i=t.width,a=t.height,o=t.offset;return HA(x0(gt(gt(gt({},Ko.defaultProps),n),{},{ticks:tn(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.top,o.top+o.height,r)},da={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function ws(e){var t,r,n,i,a,o,s=g0(),l=v0(),u=qee(),f=gt(gt({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:da.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:da.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:da.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:da.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:da.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:da.verticalFill,x:K(e.x)?e.x:u.left,y:K(e.y)?e.y:u.top,width:K(e.width)?e.width:u.width,height:K(e.height)?e.height:u.height}),d=f.x,h=f.y,p=f.width,m=f.height,v=f.syncWithTicks,b=f.horizontalValues,g=f.verticalValues,y=Wee(),x=Hee();if(!K(p)||p<=0||!K(m)||m<=0||!K(d)||d!==+d||!K(h)||h!==+h)return null;var S=f.verticalCoordinatesGenerator||ire,_=f.horizontalCoordinatesGenerator||are,w=f.horizontalPoints,j=f.verticalPoints;if((!w||!w.length)&&ie(_)){var O=b&&b.length,k=_({yAxis:x?gt(gt({},x),{},{ticks:O?b:x.ticks}):void 0,width:s,height:l,offset:u},O?!0:v);an(Array.isArray(k),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Gi(k),"]")),Array.isArray(k)&&(w=k)}if((!j||!j.length)&&ie(S)){var A=g&&g.length,C=S({xAxis:y?gt(gt({},y),{},{ticks:A?g:y.ticks}):void 0,width:s,height:l,offset:u},A?!0:v);an(Array.isArray(C),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Gi(C),"]")),Array.isArray(C)&&(j=C)}return T.createElement("g",{className:"recharts-cartesian-grid"},T.createElement(Zte,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height,ry:f.ry}),T.createElement(ere,Ai({},f,{offset:u,horizontalPoints:w,xAxis:y,yAxis:x})),T.createElement(tre,Ai({},f,{offset:u,verticalPoints:j,xAxis:y,yAxis:x})),T.createElement(rre,Ai({},f,{horizontalPoints:w})),T.createElement(nre,Ai({},f,{verticalPoints:j})))}ws.displayName="CartesianGrid";var ore=["type","layout","connectNulls","ref"],sre=["key"];function bo(e){"@babel/helpers - typeof";return bo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bo(e)}function aS(e,t){if(e==null)return{};var r=lre(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function lre(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Bs(){return Bs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Bs.apply(this,arguments)}function oS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Rt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?oS(Object(r),!0).forEach(function(n){yr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fa(e){return fre(e)||dre(e)||cre(e)||ure()}function ure(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
473In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cre(e,t){if(e){if(typeof e=="string")return qg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return qg(e,t)}}function dre(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function fre(e){if(Array.isArray(e))return qg(e)}function qg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function hre(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sS(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,DP(n.key),n)}}function pre(e,t,r){return t&&sS(e.prototype,t),r&&sS(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function mre(e,t,r){return t=Kd(t),gre(e,MP()?Reflect.construct(t,r||[],Kd(e).constructor):t.apply(e,r))}function gre(e,t){if(t&&(bo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vre(e)}function vre(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function MP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(MP=function(){return!!e})()}function Kd(e){return Kd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Kd(e)}function yre(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gg(e,t)}function Gg(e,t){return Gg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Gg(e,t)}function yr(e,t,r){return t=DP(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function DP(e){var t=bre(e,"string");return bo(t)=="symbol"?t:t+""}function bre(e,t){if(bo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(bo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Mi=function(e){function t(){var r;hre(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=mre(this,t,[].concat(i)),yr(r,"state",{isAnimationFinished:!0,totalLength:0}),yr(r,"generateSimpleStrokeDasharray",function(o,s){return"".concat(s,"px ").concat(o-s,"px")}),yr(r,"getStrokeDasharray",function(o,s,l){var u=l.reduce(function(g,y){return g+y});if(!u)return r.generateSimpleStrokeDasharray(s,o);for(var f=Math.floor(o/u),d=o%u,h=s-o,p=[],m=0,v=0;m<l.length;v+=l[m],++m)if(v+l[m]>d){p=[].concat(fa(l.slice(0,m)),[d-v]);break}var b=p.length%2===0?[0,h]:[h];return[].concat(fa(t.repeat(l,f)),fa(p),b).map(function(g){return"".concat(g,"px")}).join(", ")}),yr(r,"id",ou("recharts-line-")),yr(r,"pathRef",function(o){r.mainCurve=o}),yr(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),yr(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return yre(t,e),pre(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.points,s=a.xAxis,l=a.yAxis,u=a.layout,f=a.children,d=ar(f,fu);if(!d)return null;var h=function(v,b){return{x:v.x,y:v.y,value:v.value,errorVal:Kt(v.payload,b)}},p={clipPath:n?"url(#clipPath-".concat(i,")"):null};return T.createElement(Be,p,d.map(function(m){return T.cloneElement(m,{key:"bar-".concat(m.props.dataKey),data:o,xAxis:s,yAxis:l,layout:u,dataPointFormatter:h})}))}},{key:"renderDots",value:function(n,i,a){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,u=s.points,f=s.dataKey,d=se(this.props,!1),h=se(l,!0),p=u.map(function(v,b){var g=Rt(Rt(Rt({key:"dot-".concat(b),r:3},d),h),{},{index:b,cx:v.x,cy:v.y,value:v.value,dataKey:f,payload:v.payload,points:u});return t.renderDotItem(l,g)}),m={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return T.createElement(Be,Bs({className:"recharts-line-dots",key:"dots"},m),p)}},{key:"renderCurveStatically",value:function(n,i,a,o){var s=this.props,l=s.type,u=s.layout,f=s.connectNulls;s.ref;var d=aS(s,ore),h=Rt(Rt(Rt({},se(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(a,")"):null,points:n},o),{},{type:l,layout:u,connectNulls:f});return T.createElement(jg,Bs({},h,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,i){var a=this,o=this.props,s=o.points,l=o.strokeDasharray,u=o.isAnimationActive,f=o.animationBegin,d=o.animationDuration,h=o.animationEasing,p=o.animationId,m=o.animateNewValues,v=o.width,b=o.height,g=this.state,y=g.prevPoints,x=g.totalLength;return T.createElement(gn,{begin:f,duration:d,isActive:u,easing:h,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(S){var _=S.t;if(y){var w=y.length/s.length,j=s.map(function(P,B){var N=Math.floor(B*w);if(y[N]){var I=y[N],R=xr(I.x,P.x),D=xr(I.y,P.y);return Rt(Rt({},P),{},{x:R(_),y:D(_)})}if(m){var $=xr(v*2,P.x),M=xr(b/2,P.y);return Rt(Rt({},P),{},{x:$(_),y:M(_)})}return Rt(Rt({},P),{},{x:P.x,y:P.y})});return a.renderCurveStatically(j,n,i)}var O=xr(0,x),k=O(_),A;if(l){var C="".concat(l).split(/[,\s]+/gim).map(function(P){return parseFloat(P)});A=a.getStrokeDasharray(k,x,C)}else A=a.generateSimpleStrokeDasharray(x,k);return a.renderCurveStatically(s,n,i,{strokeDasharray:A})})}},{key:"renderCurve",value:function(n,i){var a=this.props,o=a.points,s=a.isAnimationActive,l=this.state,u=l.prevPoints,f=l.totalLength;return s&&o&&o.length&&(!u&&f>0||!Vf(u,o))?this.renderCurveWithAnimation(n,i):this.renderCurveStatically(o,n,i)}},{key:"render",value:function(){var n,i=this.props,a=i.hide,o=i.dot,s=i.points,l=i.className,u=i.xAxis,f=i.yAxis,d=i.top,h=i.left,p=i.width,m=i.height,v=i.isAnimationActive,b=i.id;if(a||!s||!s.length)return null;var g=this.state.isAnimationFinished,y=s.length===1,x=de("recharts-line",l),S=u&&u.allowDataOverflow,_=f&&f.allowDataOverflow,w=S||_,j=ae(b)?this.id:b,O=(n=se(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},k=O.r,A=k===void 0?3:k,C=O.strokeWidth,P=C===void 0?2:C,B=N3(o)?o:{},N=B.clipDot,I=N===void 0?!0:N,R=A*2+P;return T.createElement(Be,{className:x},S||_?T.createElement("defs",null,T.createElement("clipPath",{id:"clipPath-".concat(j)},T.createElement("rect",{x:S?h:h-p/2,y:_?d:d-m/2,width:S?p:p*2,height:_?m:m*2})),!I&&T.createElement("clipPath",{id:"clipPath-dots-".concat(j)},T.createElement("rect",{x:h-R/2,y:d-R/2,width:p+R,height:m+R}))):null,!y&&this.renderCurve(w,j),this.renderErrorBar(w,j),(y||o)&&this.renderDots(w,I,j),(!v||g)&&Yn.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:i.curPoints}:n.points!==i.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,i){for(var a=n.length%2!==0?[].concat(fa(n),[0]):n,o=[],s=0;s<i;++s)o=[].concat(fa(o),fa(a));return o}},{key:"renderDotItem",value:function(n,i){var a;if(T.isValidElement(n))a=T.cloneElement(n,i);else if(ie(n))a=n(i);else{var o=i.key,s=aS(i,sre),l=de("recharts-line-dot",typeof n!="boolean"?n.className:"");a=T.createElement(f0,Bs({key:o},s,{className:l}))}return a}}])}(E.PureComponent);yr(Mi,"displayName","Line");yr(Mi,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!Fo.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});yr(Mi,"getComposedData",function(e){var t=e.props,r=e.xAxis,n=e.yAxis,i=e.xAxisTicks,a=e.yAxisTicks,o=e.dataKey,s=e.bandSize,l=e.displayedData,u=e.offset,f=t.layout,d=l.map(function(h,p){var m=Kt(h,o);return f==="horizontal"?{x:H1({axis:r,ticks:i,bandSize:s,entry:h,index:p}),y:ae(m)?null:n.scale(m),value:m,payload:h}:{x:ae(m)?null:r.scale(m),y:H1({axis:n,ticks:a,bandSize:s,entry:h,index:p}),value:m,payload:h}});return Rt({points:d,layout:f},u)});function xo(e){"@babel/helpers - typeof";return xo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xo(e)}function xre(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wre(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,UP(n.key),n)}}function _re(e,t,r){return t&&wre(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Sre(e,t,r){return t=qd(t),jre(e,LP()?Reflect.construct(t,r||[],qd(e).constructor):t.apply(e,r))}function jre(e,t){if(t&&(xo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return kre(e)}function kre(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function LP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(LP=function(){return!!e})()}function qd(e){return qd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},qd(e)}function Ore(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vg(e,t)}function Vg(e,t){return Vg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Vg(e,t)}function BP(e,t,r){return t=UP(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function UP(e){var t=Ere(e,"string");return xo(t)=="symbol"?t:t+""}function Ere(e,t){if(xo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(xo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Jg(){return Jg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Jg.apply(this,arguments)}function Are(e){var t=e.xAxisId,r=g0(),n=v0(),i=jP(t);return i==null?null:E.createElement(Ko,Jg({},i,{className:de("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(o){return tn(o,!0)}}))}var Ln=function(e){function t(){return xre(this,t),Sre(this,t,arguments)}return Ore(t,e),_re(t,[{key:"render",value:function(){return E.createElement(Are,this.props)}}])}(E.Component);BP(Ln,"displayName","XAxis");BP(Ln,"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 wo(e){"@babel/helpers - typeof";return wo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wo(e)}function Pre(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nre(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,WP(n.key),n)}}function Tre(e,t,r){return t&&Nre(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Cre(e,t,r){return t=Gd(t),$re(e,FP()?Reflect.construct(t,r||[],Gd(e).constructor):t.apply(e,r))}function $re(e,t){if(t&&(wo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ire(e)}function Ire(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function FP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(FP=function(){return!!e})()}function Gd(e){return Gd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Gd(e)}function Rre(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yg(e,t)}function Yg(e,t){return Yg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Yg(e,t)}function zP(e,t,r){return t=WP(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function WP(e){var t=Mre(e,"string");return wo(t)=="symbol"?t:t+""}function Mre(e,t){if(wo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(wo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Xg(){return Xg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Xg.apply(this,arguments)}var Dre=function(t){var r=t.yAxisId,n=g0(),i=v0(),a=kP(r);return a==null?null:E.createElement(Ko,Xg({},a,{className:de("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:i},ticksGenerator:function(s){return tn(s,!0)}}))},Bn=function(e){function t(){return Pre(this,t),Cre(this,t,arguments)}return Rre(t,e),Tre(t,[{key:"render",value:function(){return E.createElement(Dre,this.props)}}])}(E.Component);zP(Bn,"displayName","YAxis");zP(Bn,"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 lS(e){return Fre(e)||Ure(e)||Bre(e)||Lre()}function Lre(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
474In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bre(e,t){if(e){if(typeof e=="string")return Qg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Qg(e,t)}}function Ure(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Fre(e){if(Array.isArray(e))return Qg(e)}function Qg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Zg=function(t,r,n,i,a){var o=ar(t,b0),s=ar(t,th),l=[].concat(lS(o),lS(s)),u=ar(t,nh),f="".concat(i,"Id"),d=i[0],h=r;if(l.length&&(h=l.reduce(function(v,b){if(b.props[f]===n&&Br(b.props,"extendDomain")&&K(b.props[d])){var g=b.props[d];return[Math.min(v[0],g),Math.max(v[1],g)]}return v},h)),u.length){var p="".concat(d,"1"),m="".concat(d,"2");h=u.reduce(function(v,b){if(b.props[f]===n&&Br(b.props,"extendDomain")&&K(b.props[p])&&K(b.props[m])){var g=b.props[p],y=b.props[m];return[Math.min(v[0],g,y),Math.max(v[1],g,y)]}return v},h)}return a&&a.length&&(h=a.reduce(function(v,b){return K(b)?[Math.min(v[0],b),Math.max(v[1],b)]:v},h)),h},HP={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(l,u,f){this.fn=l,this.context=u,this.once=f||!1}function a(l,u,f,d,h){if(typeof f!="function")throw new TypeError("The listener must be a function");var p=new i(f,d||l,h),m=r?r+u:u;return l._events[m]?l._events[m].fn?l._events[m]=[l._events[m],p]:l._events[m].push(p):(l._events[m]=p,l._eventsCount++),l}function o(l,u){--l._eventsCount===0?l._events=new n:delete l._events[u]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var u=[],f,d;if(this._eventsCount===0)return u;for(d in f=this._events)t.call(f,d)&&u.push(r?d.slice(1):d);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(f)):u},s.prototype.listeners=function(u){var f=r?r+u:u,d=this._events[f];if(!d)return[];if(d.fn)return[d.fn];for(var h=0,p=d.length,m=new Array(p);h<p;h++)m[h]=d[h].fn;return m},s.prototype.listenerCount=function(u){var f=r?r+u:u,d=this._events[f];return d?d.fn?1:d.length:0},s.prototype.emit=function(u,f,d,h,p,m){var v=r?r+u:u;if(!this._events[v])return!1;var b=this._events[v],g=arguments.length,y,x;if(b.fn){switch(b.once&&this.removeListener(u,b.fn,void 0,!0),g){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,f),!0;case 3:return b.fn.call(b.context,f,d),!0;case 4:return b.fn.call(b.context,f,d,h),!0;case 5:return b.fn.call(b.context,f,d,h,p),!0;case 6:return b.fn.call(b.context,f,d,h,p,m),!0}for(x=1,y=new Array(g-1);x<g;x++)y[x-1]=arguments[x];b.fn.apply(b.context,y)}else{var S=b.length,_;for(x=0;x<S;x++)switch(b[x].once&&this.removeListener(u,b[x].fn,void 0,!0),g){case 1:b[x].fn.call(b[x].context);break;case 2:b[x].fn.call(b[x].context,f);break;case 3:b[x].fn.call(b[x].context,f,d);break;case 4:b[x].fn.call(b[x].context,f,d,h);break;default:if(!y)for(_=1,y=new Array(g-1);_<g;_++)y[_-1]=arguments[_];b[x].fn.apply(b[x].context,y)}}return!0},s.prototype.on=function(u,f,d){return a(this,u,f,d,!1)},s.prototype.once=function(u,f,d){return a(this,u,f,d,!0)},s.prototype.removeListener=function(u,f,d,h){var p=r?r+u:u;if(!this._events[p])return this;if(!f)return o(this,p),this;var m=this._events[p];if(m.fn)m.fn===f&&(!h||m.once)&&(!d||m.context===d)&&o(this,p);else{for(var v=0,b=[],g=m.length;v<g;v++)(m[v].fn!==f||h&&!m[v].once||d&&m[v].context!==d)&&b.push(m[v]);b.length?this._events[p]=b.length===1?b[0]:b:o(this,p)}return this},s.prototype.removeAllListeners=function(u){var f;return u?(f=r?r+u:u,this._events[f]&&o(this,f)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s})(HP);var zre=HP.exports;const Wre=be(zre);var hp=new Wre,pp="recharts.syncMouseEvents";function Vl(e){"@babel/helpers - typeof";return Vl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vl(e)}function Hre(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kre(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,KP(n.key),n)}}function qre(e,t,r){return t&&Kre(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function mp(e,t,r){return t=KP(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function KP(e){var t=Gre(e,"string");return Vl(t)=="symbol"?t:t+""}function Gre(e,t){if(Vl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Vl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Vre=function(){function e(){Hre(this,e),mp(this,"activeIndex",0),mp(this,"coordinateList",[]),mp(this,"layout","horizontal")}return qre(e,[{key:"setDetails",value:function(r){var n,i=r.coordinateList,a=i===void 0?null:i,o=r.container,s=o===void 0?null:o,l=r.layout,u=l===void 0?null:l,f=r.offset,d=f===void 0?null:f,h=r.mouseHandlerCallback,p=h===void 0?null:h;this.coordinateList=(n=a??this.coordinateList)!==null&&n!==void 0?n:[],this.container=s??this.container,this.layout=u??this.layout,this.offset=d??this.offset,this.mouseHandlerCallback=p??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,o=i.y,s=i.height,l=this.coordinateList[this.activeIndex].coordinate,u=((r=window)===null||r===void 0?void 0:r.scrollX)||0,f=((n=window)===null||n===void 0?void 0:n.scrollY)||0,d=a+l+u,h=o+this.offset.top+s/2+f;this.mouseHandlerCallback({pageX:d,pageY:h})}}}])}();function Jre(e,t,r){if(r==="number"&&t===!0&&Array.isArray(e)){var n=e==null?void 0:e[0],i=e==null?void 0:e[1];if(n&&i&&K(n)&&K(i))return!0}return!1}function Yre(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-i,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function qP(e){var t=e.cx,r=e.cy,n=e.radius,i=e.startAngle,a=e.endAngle,o=lt(t,r,n,i),s=lt(t,r,n,a);return{points:[o,s],cx:t,cy:r,radius:n,startAngle:i,endAngle:a}}function Xre(e,t,r){var n,i,a,o;if(e==="horizontal")n=t.x,a=n,i=r.top,o=r.top+r.height;else if(e==="vertical")i=t.y,o=i,n=r.left,a=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var s=t.cx,l=t.cy,u=t.innerRadius,f=t.outerRadius,d=t.angle,h=lt(s,l,u,d),p=lt(s,l,f,d);n=h.x,i=h.y,a=p.x,o=p.y}else return qP(t);return[{x:n,y:i},{x:a,y:o}]}function Jl(e){"@babel/helpers - typeof";return Jl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jl(e)}function uS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ec(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uS(Object(r),!0).forEach(function(n){Qre(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Qre(e,t,r){return t=Zre(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zre(e){var t=ene(e,"string");return Jl(t)=="symbol"?t:t+""}function ene(e,t){if(Jl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Jl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tne(e){var t,r,n=e.element,i=e.tooltipEventType,a=e.isActive,o=e.activeCoordinate,s=e.activePayload,l=e.offset,u=e.activeTooltipIndex,f=e.tooltipAxisBandSize,d=e.layout,h=e.chartName,p=(t=n.props.cursor)!==null&&t!==void 0?t:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!p||!a||!o||h!=="ScatterChart"&&i!=="axis")return null;var m,v=jg;if(h==="ScatterChart")m=o,v=tQ;else if(h==="BarChart")m=Yre(d,o,l,f),v=d0;else if(d==="radial"){var b=qP(o),g=b.cx,y=b.cy,x=b.radius,S=b.startAngle,_=b.endAngle;m={cx:g,cy:y,startAngle:S,endAngle:_,innerRadius:x,outerRadius:x},v=JA}else m={points:Xre(d,o,l)},v=jg;var w=ec(ec(ec(ec({stroke:"#ccc",pointerEvents:"none"},l),m),se(p,!1)),{},{payload:s,payloadIndex:u,className:de("recharts-tooltip-cursor",p.className)});return E.isValidElement(p)?E.cloneElement(p,w):E.createElement(v,w)}var rne=["item"],nne=["children","className","width","height","style","compact","title","desc"];function _o(e){"@babel/helpers - typeof";return _o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_o(e)}function $a(){return $a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$a.apply(this,arguments)}function cS(e,t){return one(e)||ane(e,t)||VP(e,t)||ine()}function ine(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
475In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ane(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function one(e){if(Array.isArray(e))return e}function dS(e,t){if(e==null)return{};var r=sne(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function sne(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function lne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function une(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,JP(n.key),n)}}function cne(e,t,r){return t&&une(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function dne(e,t,r){return t=Vd(t),fne(e,GP()?Reflect.construct(t,r||[],Vd(e).constructor):t.apply(e,r))}function fne(e,t){if(t&&(_o(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hne(e)}function hne(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function GP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(GP=function(){return!!e})()}function Vd(e){return Vd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Vd(e)}function pne(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ev(e,t)}function ev(e,t){return ev=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},ev(e,t)}function So(e){return vne(e)||gne(e)||VP(e)||mne()}function mne(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
476In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VP(e,t){if(e){if(typeof e=="string")return tv(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tv(e,t)}}function gne(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vne(e){if(Array.isArray(e))return tv(e)}function tv(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function fS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function L(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fS(Object(r),!0).forEach(function(n){Z(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Z(e,t,r){return t=JP(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function JP(e){var t=yne(e,"string");return _o(t)=="symbol"?t:t+""}function yne(e,t){if(_o(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(_o(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var bne={xAxis:["bottom","top"],yAxis:["left","right"]},xne={width:"100%",height:"100%"},YP={x:0,y:0};function tc(e){return e}var wne=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},_ne=function(t,r,n,i){var a=r.find(function(f){return f&&f.index===n});if(a){if(t==="horizontal")return{x:a.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:a.coordinate};if(t==="centric"){var o=a.coordinate,s=i.radius;return L(L(L({},i),lt(i.cx,i.cy,s,o)),{},{angle:o,radius:s})}var l=a.coordinate,u=i.angle;return L(L(L({},i),lt(i.cx,i.cy,l,u)),{},{angle:u,radius:l})}return YP},ih=function(t,r){var n=r.graphicalItems,i=r.dataStartIndex,a=r.dataEndIndex,o=(n??[]).reduce(function(s,l){var u=l.props.data;return u&&u.length?[].concat(So(s),So(u)):s},[]);return o.length>0?o:t&&t.length&&K(i)&&K(a)?t.slice(i,a+1):[]};function XP(e){return e==="number"?[0,"auto"]:void 0}var rv=function(t,r,n,i){var a=t.graphicalItems,o=t.tooltipAxis,s=ih(r,t);return n<0||!a||!a.length||n>=s.length?null:a.reduce(function(l,u){var f,d=(f=u.props.data)!==null&&f!==void 0?f:r;d&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(d=d.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(o.dataKey&&!o.allowDuplicatedCategory){var p=d===void 0?s:d;h=Gc(p,o.dataKey,i)}else h=d&&d[n]||s[n];return h?[].concat(So(l),[qA(u,h)]):l},[])},hS=function(t,r,n,i){var a=i||{x:t.chartX,y:t.chartY},o=wne(a,n),s=t.orderedTooltipTicks,l=t.tooltipAxis,u=t.tooltipTicks,f=$V(o,s,u,l);if(f>=0&&u){var d=u[f]&&u[f].value,h=rv(t,r,f,d),p=_ne(n,s,f,a);return{activeTooltipIndex:f,activeLabel:d,activePayload:h,activeCoordinate:p}}return null},Sne=function(t,r){var n=r.axes,i=r.graphicalItems,a=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,f=t.layout,d=t.children,h=t.stackOffset,p=WA(f,a);return n.reduce(function(m,v){var b,g=v.type.defaultProps!==void 0?L(L({},v.type.defaultProps),v.props):v.props,y=g.type,x=g.dataKey,S=g.allowDataOverflow,_=g.allowDuplicatedCategory,w=g.scale,j=g.ticks,O=g.includeHidden,k=g[o];if(m[k])return m;var A=ih(t.data,{graphicalItems:i.filter(function(W){var X,le=o in W.props?W.props[o]:(X=W.type.defaultProps)===null||X===void 0?void 0:X[o];return le===k}),dataStartIndex:l,dataEndIndex:u}),C=A.length,P,B,N;Jre(g.domain,S,y)&&(P=bg(g.domain,null,S),p&&(y==="number"||w!=="auto")&&(N=Ds(A,x,"category")));var I=XP(y);if(!P||P.length===0){var R,D=(R=g.domain)!==null&&R!==void 0?R:I;if(x){if(P=Ds(A,x,y),y==="category"&&p){var $=x3(P);_&&$?(B=P,P=Rd(0,C)):_||(P=V1(D,P,v).reduce(function(W,X){return W.indexOf(X)>=0?W:[].concat(So(W),[X])},[]))}else if(y==="category")_?P=P.filter(function(W){return W!==""&&!ae(W)}):P=V1(D,P,v).reduce(function(W,X){return W.indexOf(X)>=0||X===""||ae(X)?W:[].concat(So(W),[X])},[]);else if(y==="number"){var M=LV(A,i.filter(function(W){var X,le,Ee=o in W.props?W.props[o]:(X=W.type.defaultProps)===null||X===void 0?void 0:X[o],De="hide"in W.props?W.props.hide:(le=W.type.defaultProps)===null||le===void 0?void 0:le.hide;return Ee===k&&(O||!De)}),x,a,f);M&&(P=M)}p&&(y==="number"||w!=="auto")&&(N=Ds(A,x,"category"))}else p?P=Rd(0,C):s&&s[k]&&s[k].hasStack&&y==="number"?P=h==="expand"?[0,1]:KA(s[k].stackGroups,l,u):P=zA(A,i.filter(function(W){var X=o in W.props?W.props[o]:W.type.defaultProps[o],le="hide"in W.props?W.props.hide:W.type.defaultProps.hide;return X===k&&(O||!le)}),y,f,!0);if(y==="number")P=Zg(d,P,k,a,j),D&&(P=bg(D,P,S));else if(y==="category"&&D){var U=D,H=P.every(function(W){return U.indexOf(W)>=0});H&&(P=U)}}return L(L({},m),{},Z({},k,L(L({},g),{},{axisType:a,domain:P,categoricalDomain:N,duplicateDomain:B,originalDomain:(b=g.domain)!==null&&b!==void 0?b:I,isCategorical:p,layout:f})))},{})},jne=function(t,r){var n=r.graphicalItems,i=r.Axis,a=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,f=t.layout,d=t.children,h=ih(t.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:u}),p=h.length,m=WA(f,a),v=-1;return n.reduce(function(b,g){var y=g.type.defaultProps!==void 0?L(L({},g.type.defaultProps),g.props):g.props,x=y[o],S=XP("number");if(!b[x]){v++;var _;return m?_=Rd(0,p):s&&s[x]&&s[x].hasStack?(_=KA(s[x].stackGroups,l,u),_=Zg(d,_,x,a)):(_=bg(S,zA(h,n.filter(function(w){var j,O,k=o in w.props?w.props[o]:(j=w.type.defaultProps)===null||j===void 0?void 0:j[o],A="hide"in w.props?w.props.hide:(O=w.type.defaultProps)===null||O===void 0?void 0:O.hide;return k===x&&!A}),"number",f),i.defaultProps.allowDataOverflow),_=Zg(d,_,x,a)),L(L({},b),{},Z({},x,L(L({axisType:a},i.defaultProps),{},{hide:!0,orientation:ir(bne,"".concat(a,".").concat(v%2),null),domain:_,originalDomain:S,isCategorical:m,layout:f})))}return b},{})},kne=function(t,r){var n=r.axisType,i=n===void 0?"xAxis":n,a=r.AxisComp,o=r.graphicalItems,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,f=t.children,d="".concat(i,"Id"),h=ar(f,a),p={};return h&&h.length?p=Sne(t,{axes:h,graphicalItems:o,axisType:i,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:u}):o&&o.length&&(p=jne(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:u})),p},One=function(t){var r=$n(t),n=tn(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Ly(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:kd(r,n)}},pS=function(t){var r=t.children,n=t.defaultShowTooltip,i=Lt(r,ho),a=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},Ene=function(t){return!t||!t.length?!1:t.some(function(r){var n=nn(r&&r.type);return n&&n.indexOf("Bar")>=0})},mS=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},Ane=function(t,r){var n=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,s=t.yAxisMap,l=s===void 0?{}:s,u=n.width,f=n.height,d=n.children,h=n.margin||{},p=Lt(d,ho),m=Lt(d,$i),v=Object.keys(l).reduce(function(_,w){var j=l[w],O=j.orientation;return!j.mirror&&!j.hide?L(L({},_),{},Z({},O,_[O]+j.width)):_},{left:h.left||0,right:h.right||0}),b=Object.keys(o).reduce(function(_,w){var j=o[w],O=j.orientation;return!j.mirror&&!j.hide?L(L({},_),{},Z({},O,ir(_,"".concat(O))+j.height)):_},{top:h.top||0,bottom:h.bottom||0}),g=L(L({},b),v),y=g.bottom;p&&(g.bottom+=p.props.height||ho.defaultProps.height),m&&r&&(g=MV(g,i,n,r));var x=u-g.left-g.right,S=f-g.top-g.bottom;return L(L({brushBottom:y},g),{},{width:Math.max(x,0),height:Math.max(S,0)})},Pne=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},QP=function(t){var r=t.chartName,n=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,o=t.validateTooltipEventTypes,s=o===void 0?["axis"]:o,l=t.axisComponents,u=t.legendContent,f=t.formatAxisMap,d=t.defaultProps,h=function(g,y){var x=y.graphicalItems,S=y.stackGroups,_=y.offset,w=y.updateId,j=y.dataStartIndex,O=y.dataEndIndex,k=g.barSize,A=g.layout,C=g.barGap,P=g.barCategoryGap,B=g.maxBarSize,N=mS(A),I=N.numericAxisName,R=N.cateAxisName,D=Ene(x),$=[];return x.forEach(function(M,U){var H=ih(g.data,{graphicalItems:[M],dataStartIndex:j,dataEndIndex:O}),W=M.type.defaultProps!==void 0?L(L({},M.type.defaultProps),M.props):M.props,X=W.dataKey,le=W.maxBarSize,Ee=W["".concat(I,"Id")],De=W["".concat(R,"Id")],Vt={},jt=l.reduce(function(li,ui){var ah=y["".concat(ui.axisType,"Map")],_0=W["".concat(ui.axisType,"Id")];ah&&ah[_0]||ui.axisType==="zAxis"||qi();var S0=ah[_0];return L(L({},li),{},Z(Z({},ui.axisType,S0),"".concat(ui.axisType,"Ticks"),tn(S0)))},Vt),G=jt[R],re=jt["".concat(R,"Ticks")],ne=S&&S[Ee]&&S[Ee].hasStack&&YV(M,S[Ee].stackGroups),F=nn(M.type).indexOf("Bar")>=0,$e=kd(G,re),ue=[],Ke=D&&IV({barSize:k,stackGroups:S,totalSize:Pne(jt,R)});if(F){var qe,kt,jn=ae(le)?B:le,ea=(qe=(kt=kd(G,re,!0))!==null&&kt!==void 0?kt:jn)!==null&&qe!==void 0?qe:0;ue=RV({barGap:C,barCategoryGap:P,bandSize:ea!==$e?ea:$e,sizeList:Ke[De],maxBarSize:jn}),ea!==$e&&(ue=ue.map(function(li){return L(L({},li),{},{position:L(L({},li.position),{},{offset:li.position.offset-ea/2})})}))}var hu=M&&M.type&&M.type.getComposedData;hu&&$.push({props:L(L({},hu(L(L({},jt),{},{displayedData:H,props:g,dataKey:X,item:M,bandSize:$e,barPosition:ue,offset:_,stackedData:ne,layout:A,dataStartIndex:j,dataEndIndex:O}))),{},Z(Z(Z({key:M.key||"item-".concat(U)},I,jt[I]),R,jt[R]),"animationId",w)),childIndex:$3(M,g.children),item:M})}),$},p=function(g,y){var x=g.props,S=g.dataStartIndex,_=g.dataEndIndex,w=g.updateId;if(!Fx({props:x}))return null;var j=x.children,O=x.layout,k=x.stackOffset,A=x.data,C=x.reverseStackOrder,P=mS(O),B=P.numericAxisName,N=P.cateAxisName,I=ar(j,n),R=GV(A,I,"".concat(B,"Id"),"".concat(N,"Id"),k,C),D=l.reduce(function(W,X){var le="".concat(X.axisType,"Map");return L(L({},W),{},Z({},le,kne(x,L(L({},X),{},{graphicalItems:I,stackGroups:X.axisType===B&&R,dataStartIndex:S,dataEndIndex:_}))))},{}),$=Ane(L(L({},D),{},{props:x,graphicalItems:I}),y==null?void 0:y.legendBBox);Object.keys(D).forEach(function(W){D[W]=f(x,D[W],$,W.replace("Map",""),r)});var M=D["".concat(N,"Map")],U=One(M),H=h(x,L(L({},D),{},{dataStartIndex:S,dataEndIndex:_,updateId:w,graphicalItems:I,stackGroups:R,offset:$}));return L(L({formattedGraphicalItems:H,graphicalItems:I,offset:$,stackGroups:R},U),D)},m=function(b){function g(y){var x,S,_;return lne(this,g),_=dne(this,g,[y]),Z(_,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Z(_,"accessibilityManager",new Vre),Z(_,"handleLegendBBoxUpdate",function(w){if(w){var j=_.state,O=j.dataStartIndex,k=j.dataEndIndex,A=j.updateId;_.setState(L({legendBBox:w},p({props:_.props,dataStartIndex:O,dataEndIndex:k,updateId:A},L(L({},_.state),{},{legendBBox:w}))))}}),Z(_,"handleReceiveSyncEvent",function(w,j,O){if(_.props.syncId===w){if(O===_.eventEmitterSymbol&&typeof _.props.syncMethod!="function")return;_.applySyncEvent(j)}}),Z(_,"handleBrushChange",function(w){var j=w.startIndex,O=w.endIndex;if(j!==_.state.dataStartIndex||O!==_.state.dataEndIndex){var k=_.state.updateId;_.setState(function(){return L({dataStartIndex:j,dataEndIndex:O},p({props:_.props,dataStartIndex:j,dataEndIndex:O,updateId:k},_.state))}),_.triggerSyncEvent({dataStartIndex:j,dataEndIndex:O})}}),Z(_,"handleMouseEnter",function(w){var j=_.getMouseInfo(w);if(j){var O=L(L({},j),{},{isTooltipActive:!0});_.setState(O),_.triggerSyncEvent(O);var k=_.props.onMouseEnter;ie(k)&&k(O,w)}}),Z(_,"triggeredAfterMouseMove",function(w){var j=_.getMouseInfo(w),O=j?L(L({},j),{},{isTooltipActive:!0}):{isTooltipActive:!1};_.setState(O),_.triggerSyncEvent(O);var k=_.props.onMouseMove;ie(k)&&k(O,w)}),Z(_,"handleItemMouseEnter",function(w){_.setState(function(){return{isTooltipActive:!0,activeItem:w,activePayload:w.tooltipPayload,activeCoordinate:w.tooltipPosition||{x:w.cx,y:w.cy}}})}),Z(_,"handleItemMouseLeave",function(){_.setState(function(){return{isTooltipActive:!1}})}),Z(_,"handleMouseMove",function(w){w.persist(),_.throttleTriggeredAfterMouseMove(w)}),Z(_,"handleMouseLeave",function(w){_.throttleTriggeredAfterMouseMove.cancel();var j={isTooltipActive:!1};_.setState(j),_.triggerSyncEvent(j);var O=_.props.onMouseLeave;ie(O)&&O(j,w)}),Z(_,"handleOuterEvent",function(w){var j=C3(w),O=ir(_.props,"".concat(j));if(j&&ie(O)){var k,A;/.*touch.*/i.test(j)?A=_.getMouseInfo(w.changedTouches[0]):A=_.getMouseInfo(w),O((k=A)!==null&&k!==void 0?k:{},w)}}),Z(_,"handleClick",function(w){var j=_.getMouseInfo(w);if(j){var O=L(L({},j),{},{isTooltipActive:!0});_.setState(O),_.triggerSyncEvent(O);var k=_.props.onClick;ie(k)&&k(O,w)}}),Z(_,"handleMouseDown",function(w){var j=_.props.onMouseDown;if(ie(j)){var O=_.getMouseInfo(w);j(O,w)}}),Z(_,"handleMouseUp",function(w){var j=_.props.onMouseUp;if(ie(j)){var O=_.getMouseInfo(w);j(O,w)}}),Z(_,"handleTouchMove",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&_.throttleTriggeredAfterMouseMove(w.changedTouches[0])}),Z(_,"handleTouchStart",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&_.handleMouseDown(w.changedTouches[0])}),Z(_,"handleTouchEnd",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&_.handleMouseUp(w.changedTouches[0])}),Z(_,"handleDoubleClick",function(w){var j=_.props.onDoubleClick;if(ie(j)){var O=_.getMouseInfo(w);j(O,w)}}),Z(_,"handleContextMenu",function(w){var j=_.props.onContextMenu;if(ie(j)){var O=_.getMouseInfo(w);j(O,w)}}),Z(_,"triggerSyncEvent",function(w){_.props.syncId!==void 0&&hp.emit(pp,_.props.syncId,w,_.eventEmitterSymbol)}),Z(_,"applySyncEvent",function(w){var j=_.props,O=j.layout,k=j.syncMethod,A=_.state.updateId,C=w.dataStartIndex,P=w.dataEndIndex;if(w.dataStartIndex!==void 0||w.dataEndIndex!==void 0)_.setState(L({dataStartIndex:C,dataEndIndex:P},p({props:_.props,dataStartIndex:C,dataEndIndex:P,updateId:A},_.state)));else if(w.activeTooltipIndex!==void 0){var B=w.chartX,N=w.chartY,I=w.activeTooltipIndex,R=_.state,D=R.offset,$=R.tooltipTicks;if(!D)return;if(typeof k=="function")I=k($,w);else if(k==="value"){I=-1;for(var M=0;M<$.length;M++)if($[M].value===w.activeLabel){I=M;break}}var U=L(L({},D),{},{x:D.left,y:D.top}),H=Math.min(B,U.x+U.width),W=Math.min(N,U.y+U.height),X=$[I]&&$[I].value,le=rv(_.state,_.props.data,I),Ee=$[I]?{x:O==="horizontal"?$[I].coordinate:H,y:O==="horizontal"?W:$[I].coordinate}:YP;_.setState(L(L({},w),{},{activeLabel:X,activeCoordinate:Ee,activePayload:le,activeTooltipIndex:I}))}else _.setState(w)}),Z(_,"renderCursor",function(w){var j,O=_.state,k=O.isTooltipActive,A=O.activeCoordinate,C=O.activePayload,P=O.offset,B=O.activeTooltipIndex,N=O.tooltipAxisBandSize,I=_.getTooltipEventType(),R=(j=w.props.active)!==null&&j!==void 0?j:k,D=_.props.layout,$=w.key||"_recharts-cursor";return T.createElement(tne,{key:$,activeCoordinate:A,activePayload:C,activeTooltipIndex:B,chartName:r,element:w,isActive:R,layout:D,offset:P,tooltipAxisBandSize:N,tooltipEventType:I})}),Z(_,"renderPolarAxis",function(w,j,O){var k=ir(w,"type.axisType"),A=ir(_.state,"".concat(k,"Map")),C=w.type.defaultProps,P=C!==void 0?L(L({},C),w.props):w.props,B=A&&A[P["".concat(k,"Id")]];return E.cloneElement(w,L(L({},B),{},{className:de(k,B.className),key:w.key||"".concat(j,"-").concat(O),ticks:tn(B,!0)}))}),Z(_,"renderPolarGrid",function(w){var j=w.props,O=j.radialLines,k=j.polarAngles,A=j.polarRadius,C=_.state,P=C.radiusAxisMap,B=C.angleAxisMap,N=$n(P),I=$n(B),R=I.cx,D=I.cy,$=I.innerRadius,M=I.outerRadius;return E.cloneElement(w,{polarAngles:Array.isArray(k)?k:tn(I,!0).map(function(U){return U.coordinate}),polarRadius:Array.isArray(A)?A:tn(N,!0).map(function(U){return U.coordinate}),cx:R,cy:D,innerRadius:$,outerRadius:M,key:w.key||"polar-grid",radialLines:O})}),Z(_,"renderLegend",function(){var w=_.state.formattedGraphicalItems,j=_.props,O=j.children,k=j.width,A=j.height,C=_.props.margin||{},P=k-(C.left||0)-(C.right||0),B=UA({children:O,formattedGraphicalItems:w,legendWidth:P,legendContent:u});if(!B)return null;var N=B.item,I=dS(B,rne);return E.cloneElement(N,L(L({},I),{},{chartWidth:k,chartHeight:A,margin:C,onBBoxUpdate:_.handleLegendBBoxUpdate}))}),Z(_,"renderTooltip",function(){var w,j=_.props,O=j.children,k=j.accessibilityLayer,A=Lt(O,Bt);if(!A)return null;var C=_.state,P=C.isTooltipActive,B=C.activeCoordinate,N=C.activePayload,I=C.activeLabel,R=C.offset,D=(w=A.props.active)!==null&&w!==void 0?w:P;return E.cloneElement(A,{viewBox:L(L({},R),{},{x:R.left,y:R.top}),active:D,label:I,payload:D?N:[],coordinate:B,accessibilityLayer:k})}),Z(_,"renderBrush",function(w){var j=_.props,O=j.margin,k=j.data,A=_.state,C=A.offset,P=A.dataStartIndex,B=A.dataEndIndex,N=A.updateId;return E.cloneElement(w,{key:w.key||"_recharts-brush",onChange:Yu(_.handleBrushChange,w.props.onChange),data:k,x:K(w.props.x)?w.props.x:C.left,y:K(w.props.y)?w.props.y:C.top+C.height+C.brushBottom-(O.bottom||0),width:K(w.props.width)?w.props.width:C.width,startIndex:P,endIndex:B,updateId:"brush-".concat(N)})}),Z(_,"renderReferenceElement",function(w,j,O){if(!w)return null;var k=_,A=k.clipPathId,C=_.state,P=C.xAxisMap,B=C.yAxisMap,N=C.offset,I=w.type.defaultProps||{},R=w.props,D=R.xAxisId,$=D===void 0?I.xAxisId:D,M=R.yAxisId,U=M===void 0?I.yAxisId:M;return E.cloneElement(w,{key:w.key||"".concat(j,"-").concat(O),xAxis:P[$],yAxis:B[U],viewBox:{x:N.left,y:N.top,width:N.width,height:N.height},clipPathId:A})}),Z(_,"renderActivePoints",function(w){var j=w.item,O=w.activePoint,k=w.basePoint,A=w.childIndex,C=w.isRange,P=[],B=j.props.key,N=j.item.type.defaultProps!==void 0?L(L({},j.item.type.defaultProps),j.item.props):j.item.props,I=N.activeDot,R=N.dataKey,D=L(L({index:A,dataKey:R,cx:O.x,cy:O.y,r:4,fill:c0(j.item),strokeWidth:2,stroke:"#fff",payload:O.payload,value:O.value},se(I,!1)),Vc(I));return P.push(g.renderActiveDot(I,D,"".concat(B,"-activePoint-").concat(A))),k?P.push(g.renderActiveDot(I,L(L({},D),{},{cx:k.x,cy:k.y}),"".concat(B,"-basePoint-").concat(A))):C&&P.push(null),P}),Z(_,"renderGraphicChild",function(w,j,O){var k=_.filterFormatItem(w,j,O);if(!k)return null;var A=_.getTooltipEventType(),C=_.state,P=C.isTooltipActive,B=C.tooltipAxis,N=C.activeTooltipIndex,I=C.activeLabel,R=_.props.children,D=Lt(R,Bt),$=k.props,M=$.points,U=$.isRange,H=$.baseLine,W=k.item.type.defaultProps!==void 0?L(L({},k.item.type.defaultProps),k.item.props):k.item.props,X=W.activeDot,le=W.hide,Ee=W.activeBar,De=W.activeShape,Vt=!!(!le&&P&&D&&(X||Ee||De)),jt={};A!=="axis"&&D&&D.props.trigger==="click"?jt={onClick:Yu(_.handleItemMouseEnter,w.props.onClick)}:A!=="axis"&&(jt={onMouseLeave:Yu(_.handleItemMouseLeave,w.props.onMouseLeave),onMouseEnter:Yu(_.handleItemMouseEnter,w.props.onMouseEnter)});var G=E.cloneElement(w,L(L({},k.props),jt));function re(ui){return typeof B.dataKey=="function"?B.dataKey(ui.payload):null}if(Vt)if(N>=0){var ne,F;if(B.dataKey&&!B.allowDuplicatedCategory){var $e=typeof B.dataKey=="function"?re:"payload.".concat(B.dataKey.toString());ne=Gc(M,$e,I),F=U&&H&&Gc(H,$e,I)}else ne=M==null?void 0:M[N],F=U&&H&&H[N];if(De||Ee){var ue=w.props.activeIndex!==void 0?w.props.activeIndex:N;return[E.cloneElement(w,L(L(L({},k.props),jt),{},{activeIndex:ue})),null,null]}if(!ae(ne))return[G].concat(So(_.renderActivePoints({item:k,activePoint:ne,basePoint:F,childIndex:N,isRange:U})))}else{var Ke,qe=(Ke=_.getItemByXY(_.state.activeCoordinate))!==null&&Ke!==void 0?Ke:{graphicalItem:G},kt=qe.graphicalItem,jn=kt.item,ea=jn===void 0?w:jn,hu=kt.childIndex,li=L(L(L({},k.props),jt),{},{activeIndex:hu});return[E.cloneElement(ea,li),null,null]}return U?[G,null,null]:[G,null]}),Z(_,"renderCustomized",function(w,j,O){return E.cloneElement(w,L(L({key:"recharts-customized-".concat(O)},_.props),_.state))}),Z(_,"renderMap",{CartesianGrid:{handler:tc,once:!0},ReferenceArea:{handler:_.renderReferenceElement},ReferenceLine:{handler:tc},ReferenceDot:{handler:_.renderReferenceElement},XAxis:{handler:tc},YAxis:{handler:tc},Brush:{handler:_.renderBrush,once:!0},Bar:{handler:_.renderGraphicChild},Line:{handler:_.renderGraphicChild},Area:{handler:_.renderGraphicChild},Radar:{handler:_.renderGraphicChild},RadialBar:{handler:_.renderGraphicChild},Scatter:{handler:_.renderGraphicChild},Pie:{handler:_.renderGraphicChild},Funnel:{handler:_.renderGraphicChild},Tooltip:{handler:_.renderCursor,once:!0},PolarGrid:{handler:_.renderPolarGrid,once:!0},PolarAngleAxis:{handler:_.renderPolarAxis},PolarRadiusAxis:{handler:_.renderPolarAxis},Customized:{handler:_.renderCustomized}}),_.clipPathId="".concat((x=y.id)!==null&&x!==void 0?x:ou("recharts"),"-clip"),_.throttleTriggeredAfterMouseMove=FE(_.triggeredAfterMouseMove,(S=y.throttleDelay)!==null&&S!==void 0?S:1e3/60),_.state={},_}return pne(g,b),cne(g,[{key:"componentDidMount",value:function(){var x,S;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(x=this.props.margin.left)!==null&&x!==void 0?x:0,top:(S=this.props.margin.top)!==null&&S!==void 0?S:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var x=this.props,S=x.children,_=x.data,w=x.height,j=x.layout,O=Lt(S,Bt);if(O){var k=O.props.defaultIndex;if(!(typeof k!="number"||k<0||k>this.state.tooltipTicks.length-1)){var A=this.state.tooltipTicks[k]&&this.state.tooltipTicks[k].value,C=rv(this.state,_,k,A),P=this.state.tooltipTicks[k].coordinate,B=(this.state.offset.top+w)/2,N=j==="horizontal",I=N?{x:P,y:B}:{y:P,x:B},R=this.state.formattedGraphicalItems.find(function($){var M=$.item;return M.type.name==="Scatter"});R&&(I=L(L({},I),R.props.points[k].tooltipPosition),C=R.props.points[k].tooltipPayload);var D={activeTooltipIndex:k,isTooltipActive:!0,activeLabel:A,activePayload:C,activeCoordinate:I};this.setState(D),this.renderCursor(O),this.accessibilityManager.setIndex(k)}}}},{key:"getSnapshotBeforeUpdate",value:function(x,S){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==S.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==x.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==x.margin){var _,w;this.accessibilityManager.setDetails({offset:{left:(_=this.props.margin.left)!==null&&_!==void 0?_:0,top:(w=this.props.margin.top)!==null&&w!==void 0?w:0}})}return null}},{key:"componentDidUpdate",value:function(x){Im([Lt(x.children,Bt)],[Lt(this.props.children,Bt)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var x=Lt(this.props.children,Bt);if(x&&typeof x.props.shared=="boolean"){var S=x.props.shared?"axis":"item";return s.indexOf(S)>=0?S:a}return a}},{key:"getMouseInfo",value:function(x){if(!this.container)return null;var S=this.container,_=S.getBoundingClientRect(),w=aK(_),j={chartX:Math.round(x.pageX-w.left),chartY:Math.round(x.pageY-w.top)},O=_.width/S.offsetWidth||1,k=this.inRange(j.chartX,j.chartY,O);if(!k)return null;var A=this.state,C=A.xAxisMap,P=A.yAxisMap,B=this.getTooltipEventType(),N=hS(this.state,this.props.data,this.props.layout,k);if(B!=="axis"&&C&&P){var I=$n(C).scale,R=$n(P).scale,D=I&&I.invert?I.invert(j.chartX):null,$=R&&R.invert?R.invert(j.chartY):null;return L(L({},j),{},{xValue:D,yValue:$},N)}return N?L(L({},j),N):null}},{key:"inRange",value:function(x,S){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,w=this.props.layout,j=x/_,O=S/_;if(w==="horizontal"||w==="vertical"){var k=this.state.offset,A=j>=k.left&&j<=k.left+k.width&&O>=k.top&&O<=k.top+k.height;return A?{x:j,y:O}:null}var C=this.state,P=C.angleAxisMap,B=C.radiusAxisMap;if(P&&B){var N=$n(P);return X1({x:j,y:O},N)}return null}},{key:"parseEventsOfWrapper",value:function(){var x=this.props.children,S=this.getTooltipEventType(),_=Lt(x,Bt),w={};_&&S==="axis"&&(_.props.trigger==="click"?w={onClick:this.handleClick}:w={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 j=Vc(this.props,this.handleOuterEvent);return L(L({},j),w)}},{key:"addListener",value:function(){hp.on(pp,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){hp.removeListener(pp,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(x,S,_){for(var w=this.state.formattedGraphicalItems,j=0,O=w.length;j<O;j++){var k=w[j];if(k.item===x||k.props.key===x.key||S===nn(k.item.type)&&_===k.childIndex)return k}return null}},{key:"renderClipPath",value:function(){var x=this.clipPathId,S=this.state.offset,_=S.left,w=S.top,j=S.height,O=S.width;return T.createElement("defs",null,T.createElement("clipPath",{id:x},T.createElement("rect",{x:_,y:w,height:j,width:O})))}},{key:"getXScales",value:function(){var x=this.state.xAxisMap;return x?Object.entries(x).reduce(function(S,_){var w=cS(_,2),j=w[0],O=w[1];return L(L({},S),{},Z({},j,O.scale))},{}):null}},{key:"getYScales",value:function(){var x=this.state.yAxisMap;return x?Object.entries(x).reduce(function(S,_){var w=cS(_,2),j=w[0],O=w[1];return L(L({},S),{},Z({},j,O.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(x){var S;return(S=this.state.xAxisMap)===null||S===void 0||(S=S[x])===null||S===void 0?void 0:S.scale}},{key:"getYScaleByAxisId",value:function(x){var S;return(S=this.state.yAxisMap)===null||S===void 0||(S=S[x])===null||S===void 0?void 0:S.scale}},{key:"getItemByXY",value:function(x){var S=this.state,_=S.formattedGraphicalItems,w=S.activeItem;if(_&&_.length)for(var j=0,O=_.length;j<O;j++){var k=_[j],A=k.props,C=k.item,P=C.type.defaultProps!==void 0?L(L({},C.type.defaultProps),C.props):C.props,B=nn(C.type);if(B==="Bar"){var N=(A.data||[]).find(function($){return KX(x,$)});if(N)return{graphicalItem:k,payload:N}}else if(B==="RadialBar"){var I=(A.data||[]).find(function($){return X1(x,$)});if(I)return{graphicalItem:k,payload:I}}else if(Xf(k,w)||Qf(k,w)||Wl(k,w)){var R=VQ({graphicalItem:k,activeTooltipItem:w,itemData:P.data}),D=P.activeIndex===void 0?R:P.activeIndex;return{graphicalItem:L(L({},k),{},{childIndex:D}),payload:Wl(k,w)?P.data[R]:k.props.data[R]}}}return null}},{key:"render",value:function(){var x=this;if(!Fx(this))return null;var S=this.props,_=S.children,w=S.className,j=S.width,O=S.height,k=S.style,A=S.compact,C=S.title,P=S.desc,B=dS(S,nne),N=se(B,!1);if(A)return T.createElement(q_,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},T.createElement(Mm,$a({},N,{width:j,height:O,title:C,desc:P}),this.renderClipPath(),Wx(_,this.renderMap)));if(this.props.accessibilityLayer){var I,R;N.tabIndex=(I=this.props.tabIndex)!==null&&I!==void 0?I:0,N.role=(R=this.props.role)!==null&&R!==void 0?R:"application",N.onKeyDown=function($){x.accessibilityManager.keyboardEvent($)},N.onFocus=function(){x.accessibilityManager.focus()}}var D=this.parseEventsOfWrapper();return T.createElement(q_,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},T.createElement("div",$a({className:de("recharts-wrapper",w),style:L({position:"relative",curs
476or:"default",width:j,height:O},k)},D,{ref:function(M){x.container=M}}),T.createElement(Mm,$a({},N,{width:j,height:O,title:C,desc:P,style:xne}),this.renderClipPath(),Wx(_,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(E.Component);Z(m,"displayName",r),Z(m,"defaultProps",L({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},d)),Z(m,"getDerivedStateFromProps",function(b,g){var y=b.dataKey,x=b.data,S=b.children,_=b.width,w=b.height,j=b.layout,O=b.stackOffset,k=b.margin,A=g.dataStartIndex,C=g.dataEndIndex;if(g.updateId===void 0){var P=pS(b);return L(L(L({},P),{},{updateId:0},p(L(L({props:b},P),{},{updateId:0}),g)),{},{prevDataKey:y,prevData:x,prevWidth:_,prevHeight:w,prevLayout:j,prevStackOffset:O,prevMargin:k,prevChildren:S})}if(y!==g.prevDataKey||x!==g.prevData||_!==g.prevWidth||w!==g.prevHeight||j!==g.prevLayout||O!==g.prevStackOffset||!Fa(k,g.prevMargin)){var B=pS(b),N={chartX:g.chartX,chartY:g.chartY,isTooltipActive:g.isTooltipActive},I=L(L({},hS(g,x,j)),{},{updateId:g.updateId+1}),R=L(L(L({},B),N),I);return L(L(L({},R),p(L({props:b},R),g)),{},{prevDataKey:y,prevData:x,prevWidth:_,prevHeight:w,prevLayout:j,prevStackOffset:O,prevMargin:k,prevChildren:S})}if(!Im(S,g.prevChildren)){var D,$,M,U,H=Lt(S,ho),W=H&&(D=($=H.props)===null||$===void 0?void 0:$.startIndex)!==null&&D!==void 0?D:A,X=H&&(M=(U=H.props)===null||U===void 0?void 0:U.endIndex)!==null&&M!==void 0?M:C,le=W!==A||X!==C,Ee=!ae(x),De=Ee&&!le?g.updateId:g.updateId+1;return L(L({updateId:De},p(L(L({props:b},g),{},{updateId:De,dataStartIndex:W,dataEndIndex:X}),g)),{},{prevChildren:S,dataStartIndex:W,dataEndIndex:X})}return null}),Z(m,"renderActiveDot",function(b,g,y){var x;return E.isValidElement(b)?x=E.cloneElement(b,g):ie(b)?x=b(g):x=T.createElement(f0,g),T.createElement(Be,{className:"recharts-active-dot",key:y},x)});var v=E.forwardRef(function(g,y){return T.createElement(m,$a({},g,{ref:y}))});return v.displayName=m.displayName,v},Nne=QP({chartName:"LineChart",GraphicalChild:Mi,axisComponents:[{axisType:"xAxis",AxisComp:Ln},{axisType:"yAxis",AxisComp:Bn}],formatAxisMap:gP}),gp=QP({chartName:"BarChart",GraphicalChild:sn,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:Ln},{axisType:"yAxis",AxisComp:Bn}],formatAxisMap:gP});const Tne=[{value:7,label:"Last 7 days"},{value:30,label:"Last 30 days"},{value:90,label:"Last 90 days"}],Cne={new:"#2563eb",reviewed:"#64748b",shortlisted:"#059669",rejected:"#dc2626"};function $ne({session:e}){const[t,r]=E.useState(30),[n,i]=E.useState([]),[a,o]=E.useState([]),[s,l]=E.useState([]),[u,f]=E.useState([]),[d,h]=E.useState(!0),[p,m]=E.useState("");E.useEffect(()=>{let S=!1;async function _(){h(!0),m("");try{const[w,j,O,k]=await Promise.all([Q.from("jobs").select("id, created_at, is_active, type, job_categories(category_id)"),Q.from("applications").select("id, created_at, status, jobs(title, job_categories(categories(id, name, color)))"),Q.from("categories").select("*"),Q.from("enrollments").select("id, created_at, status, state")]);if(S)return;if(w.error)throw w.error;if(j.error)throw j.error;if(O.error)throw O.error;if(k.error)throw k.error;i(w.data||[]),o(j.data||[]),l(O.data||[]),f(k.data||[])}catch(w){m(w.message||String(w))}finally{h(!1)}}return _(),()=>{S=!0}},[]);const v=E.useMemo(()=>Ine(n,a,u,t),[n,a,u,t]),b=E.useMemo(()=>Rne(n,a,u,t),[n,a,u,t]),g=E.useMemo(()=>Dne(a),[a]),y=E.useMemo(()=>Lne(a),[a,s]),x=E.useMemo(()=>Mne(u),[u]);return c.jsxs("div",{className:"min-h-screen bg-slate-50",children:[c.jsx(nu,{session:e,active:"analytics"}),c.jsxs("main",{className:"max-w-6xl mx-auto px-6 py-10",children:[c.jsxs("div",{className:"flex items-center justify-between mb-8 flex-wrap gap-4",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"font-display text-3xl font-bold text-navy",children:"Analytics"}),c.jsx("p",{className:"text-slate-600 mt-1 text-sm",children:"Snapshot of job postings, applications, and trends."})]}),c.jsxs("div",{className:"relative",children:[c.jsx(oO,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400 pointer-events-none"}),c.jsx("select",{value:t,onChange:S=>r(Number(S.target.value)),className:"pl-9 pr-8 py-2 rounded-lg border border-slate-300 focus:border-navy outline-none text-sm bg-white cursor-pointer appearance-none",children:T
476ne.map(S=>c.jsx("option",{value:S.value,children:S.label},S.value))})]})]}),p&&c.jsxs("div",{className:"bg-red-50 border border-red-200 text-red-700 rounded-lg p-4 mb-6 flex items-start gap-3",children:[c.jsx(No,{className:"w-5 h-5 mt-0.5 shrink-0"}),c.jsx("span",{children:p})]}),d?c.jsx("div",{className:"text-center text-slate-500 py-20",children:"Loading…"}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-5 gap-4 mb-8",children:[c.jsx(hs,{icon:Is,label:"Total jobs",value:v.totalJobs,sub:`${v.activeJobs} active`,color:"bg-blue-50 text-blue-600"}),c.jsx(hs,{icon:qc,label:"Applications",value:v.totalApps,sub:`${v.newApps} new`,color:"bg-amber-50 text-amber-600"}),c.jsx(hs,{icon:Am,label:"Apps in range",value:v.appsInRange,sub:`avg ${v.appsPerDay.toFixed(1)}/day`,color:"bg-purple-50 text-purple-600"}),c.jsx(hs,{icon:ji,label:"Enrollments",value:v.totalEnrollments,sub:`${v.newEnrollments} new`,color:"bg-emerald-50 text-emerald-600"}),c.jsx(hs,{icon:Qa,label:"Enroll. in range",value:v.enrollInRange,sub:`in last ${t} days`,color:"bg-cyan-50 text-cyan-600"})]}),c.jsxs("div",{className:"bg-white rounded-2xl border border-slate-200 p-6 mb-6",children:[c.jsx("h2",{className:"font-display text-lg font-bold text-navy mb-1",children:"Activity over time"}),c.jsx("p",{className:"text-sm text-slate-500 mb-4",children:"Jobs, applications, and enrollments in the selected window."}),c.jsx("div",{className:"h-72",children:c.jsx(Ku,{width:"100%",height:"100%",children:c.jsxs(Nne,{data:b,margin:{top:10,right:20,bottom:0,left:-10},children:[c.jsx(ws,{strokeDasharray:"3 3",stroke:"#e2e8f0"}),c.jsx(Ln,{dataKey:"label",tick:{fontSize:11,fill:"#64748b"}}),c.jsx(Bn,{allowDecimals:!1,tick:{fontSize:11,fill:"#64748b"}}),c.jsx(Bt,{contentStyle:{borderRadius:8,border:"1px solid #e2e8f0",fontSize:12}}),c.jsx($i,{wrapperStyle:{fontSize:12}}),c.jsx(Mi,{type:"monotone",dataKey:"jobs",stroke:"#0a1f4d",strokeWidth:2,name:"Jobs created",dot:!1}),c.jsx(Mi,{type:"monotone",dataKey:"applications",stroke:"#f5c518",strokeWidth:2,name:"Applications",dot:!1}),c.jsx(Mi,{type:"monotone",dataKey:"enrollments",stroke:"#059669",strokeWidth:2,name:"Enrollments",dot:!1})]})})})]}),c.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[c.jsxs("div",{className:"bg-white rounded-2xl border border-slate-200 p-6",children:[c.jsx("h2",{className:"font-display text-lg font-bold text-navy mb-1",children:"Applications by status"}),c.jsx("p",{className:"text-sm text-slate-500 mb-4",children:"All-time totals."}),g.every(S=>S.count===0)?c.jsx("div",{className:"h-64 flex items-center justify-center text-sm text-slate-400",children:"No applications yet"}):c.jsx("div",{className:"h-64",children:c.jsx(Ku,{width:"100%",height:"100%",children:c.jsxs(gp,{data:g,margin:{top:10,right:10,bottom:0,left:-15},children:[c.jsx(ws,{strokeDasharray:"3 3",stroke:"#e2e8f0"}),c.jsx(Ln,{dataKey:"label",tick:{fontSize:11,fill:"#64748b"}}),c.jsx(Bn,{allowDecimals:!1,tick:{fontSize:11,fill:"#64748b"}}),c.jsx(Bt,{contentStyle:{borderRadius:8,border:"1px solid #e2e8f0",fontSize:12},cursor:{fill:"rgba(0,0,0,0.04)"}}),c.jsx(sn,{dataKey:"count",radius:[6,6,0,0],children:g.map((S,_)=>c.jsx(ld,{fill:Cne[S.status]||"#64748b"},_))})]})})})]}),c.jsxs("div",{className:"bg-white rounded-2xl border border-slate-200 p-6",children:[c.jsx("h2",{className:"font-display text-lg font-bold text-navy mb-1",children:"Applications by category"}),c.jsx("p",{className:"text-sm text-slate-500 mb-4",children:"How many applications go to jobs tagged with each category."}),y.length===0?c.jsx("div",{className:"h-64 flex items-center justify-center text-sm text-slate-400",children:"No categorized applications yet"}):c.jsx("div",{className:"h-64",children:c.jsx(Ku,{width:"100%",height:"100%",children:c.jsxs(gp,{data:y,layout:"vertical",margin:{top:5,right:20,bottom:0,left:10},children:[c.jsx(ws,{strokeDasharray:"3 3",stroke:"#e2e8f0"}),c.jsx(Ln,{type:"number",allowDecimals:!1,tick:{fontSize:11,fill:"#64748b"}}),c.jsx(Bn,{type:"category",dataKey:"name",tick:{fontSize:11,fill:"#64748b"},width:100}),c.jsx(Bt,{contentStyle:{borderRadius:8,border:"1px solid #e2e8f0",fontSize:12},cursor:{fill:"rgba(0,0,0,0.04)"}}),c.jsx(sn,{dataKey:"count",radius:[0,6,6,0],children:y.map((S,_)=>c.jsx(ld,{fill:S.color||"#0a1f4d"},_))})]})})})]})]}),c.jsxs("div",{className:"bg-white rounded-2xl border border-slate-200 p-6 mt-6",children:[c.jsx("h2",{className:"font-display text-lg font-bold text-navy mb-1",children:"Enrollments by state"}),c.jsx("p",{className:"text-sm text-slate-500 mb-4",children:"Top 10 states by e-learning enrollment count."}),x.length===0?c.jsx("div",{className:"h-64 flex items-center justify-center text-sm text-slate-400",children:"No enrollments yet"}):c.jsx("div",{className:"h-72",children:c.jsx(Ku,{width:"100%",height:"100%",children:c.jsxs(gp,{data:x,margin:{top:10,right:20,bottom:0,left:-10},children:[c.jsx(ws,{strokeDasharray:"3 3",stroke:"#e2e8f0"}),c.jsx(Ln,{dataKey:"state",tick:{fontSize:11,fill:"#64748b"},angle:-20,textAnchor:"end",height:50}),c.jsx(Bn,{allowDecimals:!1,tick:{fontSize:11,fill:"#64748b"}}),c.jsx(Bt,{contentStyle:{borderRadius:8,border:"1px solid #e2e8f0",fontSize:12},cursor:{fill:"rgba(0,0,0,0.04)"}}
476),c.jsx(sn,{dataKey:"count",fill:"#059669",radius:[6,6,0,0],name:"Enrollments"})]})})})]})]})]})]})}function hs({icon:e,label:t,value:r,sub:n,color:i}){return c.jsxs("div",{className:"bg-white rounded-2xl border border-slate-200 p-5",children:[c.jsx("div",{className:`w-10 h-10 rounded-lg ${i} flex items-center justify-center mb-3`,children:c.jsx(e,{className:"w-5 h-5",strokeWidth:2.5})}),c.jsx("div",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wider",children:t}),c.jsx("div",{className:"font-display text-3xl font-bold text-navy mt-1",children:r}),c.jsx("div",{className:"text-xs text-slate-500 mt-1",children:n})]})}function vp(e,t){const r=Date.now()-t*86400*1e3;return new Date(e).getTime()>=r}function Ine(e,t,r,n){const i=e.filter(f=>f.is_active).length,a=e.filter(f=>vp(f.created_at,n)).length,o=t.filter(f=>vp(f.created_at,n)).length,s=t.filter(f=>f.status==="new").length,l=r.filter(f=>vp(f.created_at,n)).length,u=r.filter(f=>f.status==="new").length;return{totalJobs:e.length,activeJobs:i,newJobsInRange:a,totalApps:t.length,newApps:s,appsInRange:o,appsPerDay:n>0?o/n:0,totalEnrollments:r.length,newEnrollments:u,enrollInRange:l}}function Rne(e,t,r,n){const i=[],a=new Date;a.setHours(0,0,0,0);for(let s=n-1;s>=0;s--){const l=new Date(a.getTime()-s*86400*1e3);i.push({date:l.toISOString().slice(0,10),label:l.toLocaleDateString(void 0,{month:"short",day:"numeric"}),jobs:0,applications:0,enrollments:0})}const o=Object.fromEntries(i.map((s,l)=>[s.date,l]));for(const s of e){const l=s.created_at.slice(0,10);l in o&&(i[o[l]].jobs+=1)}for(const s of t){const l=s.created_at.slice(0,10);l in o&&(i[o[l]].applications+=1)}for(const s of r){const l=s.created_at.slice(0,10);l in o&&(i[o[l]].enrollments+=1)}return i}function Mne(e){const t=new Map;for(const r of e)t.set(r.state,(t.get(r.state)||0)+1);return[...t.entries()].map(([r,n])=>({state:r,count:n})).sort((r,n)=>n.count-r.count).slice(0,10)}function Dne(e){return["new","reviewed","shortlisted","rejected"].map(r=>({status:r,label:r.charAt(0).toUpperCase()+r.slice(1),count:e.filter(n=>n.status===r).length}))}function Lne(e,t){var n;const r=new Map;for(const i of e){const a=((n=i.jobs)==null?void 0:n.job_categories)||[];for(const o of a){const s=o.categories;if(!s)continue;const l=r.get(s.id)||{id:s.id,name:s.name,color:s.color,count:0};l.count+=1,r.set(s.id,l)}}return[...r.values()].sort((i,a)=>a.count-i.count).slice(0,10)}const ZP=["new","reviewed","contacted","enrolled","rejected"],nv={new:"New",reviewed:"Reviewed",contacted:"Contacted",enrolled:"Enrolled",rejected:"Rejected"},eN={new:"bg-blue-50 text-blue-700",reviewed:"bg-slate-100 text-slate-700",contacted:"bg-amber-50 text-amber-700",enrolled:"bg-emerald-50 text-emerald-700",rejected:"bg-red-50 text-red-700"};function Bne({session:e}){const[t,r]=E.useState([]),[n,i]=E.useState(!0),[a,o]=E.useState(""),[s,l]=E.useState(""),[u,f]=E.useState("All"),[d,h]=E.useState("All"),[p,m]=E.useState(null),[v,b]=E.useState(!1);async function g(){i(!0);const{data:w,error:j}=await Q.from("enrollments").select("*").order("created_at",{ascending:!1});j?o(j.message):r(w||[]),i(!1)}E.useEffect(()=>{g()},[]);const y=E.useMemo(()=>{const w=s.trim().toLowerCase();return t.filter(j=>u!=="All"&&j.state!==u||d!=="All"&&j.status!==d?!1:w?j.full_name.toLowerCase().includes(w)||j.email.toLowerCase().includes(w)||j.phone.toLowerCase().includes(w)||j.lga.toLowerCase().includes(w)||j.state.toLowerCase().includes(w):!0)},[t,s,u,d]);async function x(w,j){const{error:O}=await Q.from("enrollments").update({status:j}).eq("id",w.id);if(O){alert("Update failed: "+O.message);return}r(k=>k.map(A=>A.id===w.id?{...A,status:j}:A)),(p==null?void 0:p.id)===w.id&&m({...p,status:j})}async function S(w){if(!confirm(`Delete ${w.full_name}'s enrollment? This cannot be undone.`))return;const{error:j}=await Q.from("enrollments").delete().eq("id",w.id);if(j){alert("Delete failed: "+j.message);return}(p==null?void 0:p.id)===w.id&&m(null),await g()}async function _({from:w,to:j,format:O}){let k=Q.from("enrollments").select("*").order("created_at",{ascending:!1});w&&(k=k.gte("created_at",w)),j&&(k=k.lte("created_at",j));const{data:A,error:C}=await k;if(C){alert("Export failed: "+C.message);return}O==="csv"?PM(A||[]):await NM(A||[]),b(!1)}return c.jsxs("div",{className:"min-h-screen bg-slate-50",children:[c.jsx(nu,{session:e,active:"enrollments"}),c.jsxs("main",{className:"max-w-6xl mx-auto px-6 py-10",children:[c.jsxs(ve,{to:"/admin",className:"text-sm text-slate-500 hover:text-navy inline-flex items-center gap-1 mb-4",children:[c.jsx(Xa,{className:"w-4 h-4"})," Back to dashboard"]}),c.jsxs("div",{className:"flex items-center justify-between mb-8 flex-wrap gap-4",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"font-display text-3xl font-bold text-navy",children:"E-Learning Enrollments"}),c.jsxs("p",{className:"text-slate-600 mt-1 text-sm",children:[t.length," total · ",t.filter(w=>w.status==="new").length," new"]})]}),c.jsxs("button",{onClick:()=>b(!0),className:"text-sm font-semibold text-slate-700 hover:text-navy inline-flex items-center gap-1.5 px-4 py-2.5 border border-slate-300 rounded-lg hover:bg-white",children:[c.jsx(fn,{className:"w-4 h-4"})," Export"]})]}),c.jsxs("div",{className:"bg-white rounded-2xl border border-slate-200 p-4 mb-6 flex flex-col md:flex-row gap-3",children:[c.jsxs("div",{className:"relative flex-1",children:[c.jsx(dy,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),c.jsx("input",{type:"text",value:s,onChange:w=>l(w.target.value),placeholder:"Search name, email, phone, location…",className:"w-full pl-10 pr-3 py-2 rounded-lg border border-slate-300 focus:border-navy focus:ring-2 focus:ring-navy/10 outline-none text-sm"})]}),c.jsxs("div",{className:"relative",children:[c.jsx(ly,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400 pointer-events-none"}),c.jsxs("select",{value:u,onChange:w=>f(w.target.value),className:"pl-9 pr-8 py-2 rounded-lg border border-slate-300 focus:border-navy outline-none text-sm appearance-none bg-white cursor-pointer min-w-[160px]",children:[c.jsx("option",{value:"All",children:"All states"}),[...Pm].sort((w,j)=>w.state.localeCompare(j.state)).map(w=>c.jsx("option",{value:w.state,children:w.state},w.state))]})]}),c.jsxs("select",{value:d,onChange:w=>h(w.target.value),className:"px-3 py-2 rounded-lg border border-slate-300 focus:border-navy outline-none text-sm bg-white cursor-pointer",children:[c.jsx("option",{value:"All",children:"All statuses"}),ZP.map(w=>c.jsx("option",{value:w,children:nv[w]},w))]})]}),a&&c.jsx("div",{className:"bg-red-50 border border-red-200 text-red-700 rounded-lg p-4 mb-6",children:a}),n?c.jsx("div",{className:"text-center text-slate-500 py-20",children:"Loading…"}):y.length===0?c.jsxs("div",{className:"bg-white rounded-2xl border border-slate-200 p-12 text-center",children:[c.jsx(ji,{className:"w-12 h-12 text-slate-300 mx-auto mb-4"}),c.jsx("h3",{className:"text-lg font-semibold text-slate-700 mb-1",children:t.length===0?"N
476o enrollments yet":"No matches"}),c.jsx("p",{className:"text-sm text-slate-500",children:t.length===0?"Enrollments from the /enroll form will appear here.":"Try a different search or filter."})]}):c.jsx("div",{className:"bg-white rounded-2xl border border-slate-200 overflow-hidden",children:c.jsxs("table",{className:"w-full",children:[c.jsx("thead",{className:"bg-slate-50 border-b border-slate-200",children:c.jsxs("tr",{children:[c.jsx("th",{className:"text-left text-xs font-semibold text-slate-600 uppercase tracking-wider px-6 py-3",children:"Name"}),c.jsx("th",{className:"text-left text-xs font-semibold text-slate-600 uppercase tracking-wider px-6 py-3 hidden md:table-cell",children:"Location"}),c.jsx("th",{className:"text-left text-xs font-semibold text-slate-600 uppercase tracking-wider px-6 py-3 hidden lg:table-cell",children:"Submitted"}),c.jsx("th",{className:"text-left text-xs font-semibold text-slate-600 uppercase tracking-wider px-6 py-3",children:"Status"}),c.jsx("th",{className:"text-right text-xs font-semibold text-slate-600 uppercase tracking-wider px-6 py-3",children:"Actions"})]})}),c.jsx("tbody",{className:"divide-y divide-slate-100",children:y.map(w=>c.jsxs("tr",{className:"hover:bg-slate-50 cursor-pointer",onClick:()=>m(w),children:[c.jsxs("td",{className:"px-6 py-4",children:[c.jsx("div",{className:"font-medium text-slate-900",children:w.full_name}),c.jsx("div",{className:"text-xs text-slate-500",children:w.email})]}),c.jsxs("td",{className:"px-6 py-4 text-sm text-slate-600 hidden md:table-cell",children:[w.lga,", ",w.state]}),c.jsx("td",{className:"px-6 py-4 text-sm text-slate-600 hidden lg:table-cell",children:zi(w.created_at)}),c.jsx("td",{className:"px-6 py-4",children:c.jsx("span",{className:`text-xs font-semibold px-2.5 py-1 rounded-full inline-block ${eN[w.status]}`,children:nv[w.status]})}),c.jsx("td",{className:"px-6 py-4 text-right",children:c.jsx("div",{className:"inline-flex items-center gap-1",onClick:j=>j.stopPropagation(),children:c.jsx("button",{onClick:()=>S(w),className:"p-2 text-slate-500 hover:text-red-600 hover:bg-red-50 rounded-lg",title:"Delete",children:c.jsx(Ur,{className:"w-4 h-4"})})})})]},w.id))})]})})]}),p&&c.jsx(Une,{enr:p,onClose:()=>m(null),onUpdateStatus:x,onDelete:S}),v&&c.jsx(fy,{title:"Export Enrollments",onClose:()=>b(!1),onExport:_})]})}function Une({enr:e,onClose:t,onUpdateStatus:r,onDelete:n}){return c.jsxs("div",{className:"fixed inset-0 z-50 flex",children:[c.jsx("div",{className:"absolute inset-0 bg-slate-900/40",onClick:t}),c.jsxs("div",{className:"ml-auto w-full max-w-2xl bg-white h-full overflow-y-auto relative shadow-2xl animate-[slideIn_0.2s_ease-out]",children:[c.jsx("style",{children:"@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }"}),c.jsxs("div",{className:"sticky top-0 bg-white border-b border-slate-200 px-6 py-4 flex items-center justify-between z-10",children:[c.jsx("h2",{className:"font-display text-xl font-bold text-navy",children:"Enrollment"}),c.jsx("button",{onClick:t,className:"p-2 hover:bg-slate-100 rounded-lg",children:c.jsx(xn,{className:"w-5 h-5"})})]}),c.jsxs("div",{className:"p-6 space-y-6",children:[c.jsxs("div",{children:[c.jsx("div",{className:"text-xl font-bold text-slate-900",children:e.full_name}),c.jsxs("div",{className:"mt-3 flex flex-wrap gap-x-5 gap-y-2 text-sm",children:[c.jsxs("a",{href:`mailto:${e.email}`,className:"inline-flex items-center gap-2 text-slate-700 hover:text-navy",children:[c.jsx(uy,{className:"w-4 h-4 text-slate-400"})," ",e.email]}),c.jsxs("a",{href:`tel:${e.phone}`,className:"inline-flex items-center gap-2 text-slate-700 hover:text-navy",children:[c.jsx(fO,{className:"w-4 h-4 text-slate-400"})," ",e.phone]}),c.jsxs("span",{className:"inline-flex items-center gap-2 text-slate-700",children:[c.jsx(cy,{className:"w-4 h-4 text-slate-400"})," ",e.lga,", ",e.state]})]}),c.jsxs("div",{className:"text-xs text-slate-500 mt-2",children:["Submitted ",zi(e.created_at)]})]}),c.jsxs("div",{children:[c.jsx("div",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wider mb-2",children:"Status"}),c.jsx("div",{className:"flex gap-2 flex-wrap",children:ZP.map(i=>c.jsx("button",{onClick:()=>r(e,i),className:`text-xs font-semibold px-3 py-1.5 rounded-full transition-colors ${e.status===i?eN[i]+" ring-2 ring-offset-1 ring-current":"bg-slate-100 text-slate-500 hover:bg-slate-200"}`,children:nv[i]},i))})]}),c.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[c.jsx(Nr,{label:"Gender",value:e.gender}),c.jsx(Nr,{label:"Age Range",value:e.age_range}),c.jsx(Nr,{label:"Education",value:e.education}),c.jsx(Nr,{label:"Current Status",value:e.current_status}),c.jsx(Nr,{label:"Device Access",value:e.device_access}
476),c.jsx(Nr,{label:"Commitment",value:e.commitment}),c.jsx(Nr,{label:"Hours / Week",value:e.hours_per_week}),c.jsx(Nr,{label:"Heard From",value:e.heard_from}),c.jsx(Nr,{label:"Wants Job Alerts",value:e.notify_jobs}),c.jsx(Nr,{label:"Open to Internship",value:e.open_to_internship})]}),c.jsxs("div",{children:[c.jsxs("div",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wider mb-2",children:["Skills of Interest (",(e.skills_interested||[]).length,")"]}),c.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[(e.skills_interested||[]).map(i=>c.jsx("span",{className:"text-xs font-medium bg-navy/10 text-navy px-2.5 py-1 rounded-full",children:i},i)),(e.skills_interested||[]).length===0&&c.jsx("span",{className:"text-sm text-slate-400 italic",children:"None selected"})]})]}),c.jsxs("div",{className:"bg-slate-50 rounded-xl p-4 text-sm",children:[c.jsx("span",{className:"font-semibold text-slate-700",children:"Consent: "}),e.consent?c.jsx("span",{className:"text-emerald-700",children:"Confirmed"}):c.jsx("span",{className:"text-red-600",children:"Not confirmed"})]}),c.jsx("div",{className:"border-t border-slate-200 pt-4",children:c.jsxs("button",{onClick:()=>n(e),className:"text-sm text-red-600 hover:bg-red-50 inline-flex items-center gap-1.5 px-3 py-2 rounded-lg",children:[c.jsx(Ur,{className:"w-4 h-4"})," Delete enrollment"]})})]})]})]})}function Nr({label:e,value:t}){return c.jsxs("div",{children:[c.jsx("div",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wider",children:e}),c.jsx("div",{className:"text-sm text-slate-800 mt-0.5",children:t||"—"})]})}function ha({session:e,children:t}){return e===void 0?c.jsx("div",{className:"min-h-screen flex items-center justify-center",children:c.jsx("div",{className:"text-slate-500",children:"Loading…"})}):e?t:c.jsx(iy,{to:"/admin/login",replace:!0})}function Fne(){const[e,t]=E.useState(void 0);return E.useEffect(()=>{Q.auth.getSession().then(({data:n})=>{t(n.session??null)});const{data:r}=Q.auth.onAuthStateChange((n,i)=>{t(i??null)});return()=>r.subscription.unsubscribe()},[]),c.jsxs(wC,{children:[c.jsx(It,{path:"/",element:c.jsx(HR,{})}),c.jsx(It,{path:"/jobs",element:c.jsx(qR,{})}),c.jsx(It,{path:"/jobs/:slug",element:c.jsx(eM,{})}),c.jsx(It,{path:"/enroll",element:c.jsx(hM,{})}),c.jsx(It,{path:"/admin/login",element:c.jsx(mM,{session:e})}),c.jsx(It,{path:"/admin",element:c.jsx(ha,{session:e,children:c.jsx(TM,{session:e})})}),c.jsx(It,{path:"/admin/applications",element:c.jsx(ha,{session:e,children:c.jsx(CM,{session:e})})}),c.jsx(It,{path:"/admin/users",element:c.jsx(ha,{session:e,children:c.jsx(MM,{session:e})})}),c.jsx(It,{path:"/admin/categories",element:c.jsx(ha,{session:e,children:c.jsx(LM,{session:e})})}),c.jsx(It,{path:"/admin/analytics",element:c.jsx(ha,{session:e,children:c.jsx($ne,{session:e})})}),c.jsx(It,{path:"/admin/enrollments",element:c.jsx(ha,{session:e,children:c.jsx(Bne,{session:e})})}),c.jsx(It,{path:"*",element:c.jsx(iy,{to:"/",replace:!0})})]})}yp.createRoot(document.getElementById("root")).render(c.jsx(T.StrictMode,{children:c.jsx(AC,{children:c.jsx(Fne,{})})}));

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.