vendor: 6,221 bytes, lines 1-9
1var G_=e=>{throw TypeError(e)};var Rv=(e,t,r)=>t.has(e)||G_("Cannot "+r);var z=(e,t,r)=>(Rv(e,t,"read from private field"),r?r.call(e):t.get(e)),Ae=(e,t,r)=>t.has(e)?G_("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),we=(e,t,r,n)=>(Rv(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Vt=(e,t,r)=>(Rv(e,t,"access private method"),r);var Rf=(e,t,r,n)=>({set _(i){we(e,t,i,r)},get _(){return z(e,t,n)}});function n5(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 Mf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ie(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var HA={exports:{}},Bm={},qA={exports:{}},Pe={};/** 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 af=Symbol.for("react.element"),i5=Symbol.for("react.portal"),a5=Symbol.for("react.fragment"),o5=Symbol.for("react.strict_mode"),s5=Symbol.for("react.profiler"),l5=Symbol.for("react.provider"),c5=Symbol.for("react.context"),u5=Symbol.for("react.forward_ref"),d5=Symbol.for("react.suspense"),f5=Symbol.for("react.memo"),h5=Symbol.for("react.lazy"),Y_=Symbol.iterator;function p5(e){return e===null||typeof e!="object"?null:(e=Y_&&e[Y_]||e["@@iterator"],typeof e=="function"?e:null)}var VA={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},KA=Object.assign,GA={};function yc(e,t,r){this.props=e,this.context=t,this.refs=GA,this.updater=r||VA}yc.prototype.isReactComponent={};yc.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")};yc.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function YA(){}YA.prototype=yc.prototype;function Nw(e,t,r){this.props=e,this.context=t,this.refs=GA,this.updater=r||VA}var Ew=Nw.prototype=new YA;Ew.constructor=Nw;KA(Ew,yc.prototype);Ew.isPureReactComponent=!0;var X_=Array.isArray,XA=Object.prototype.hasOwnProperty,kw={current:null},QA={key:!0,ref:!0,__self:!0,__source:!0};function JA(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)XA.call(t,n)&&!QA.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:af,type:e,key:a,ref:o,props:i,_owner:kw.current}}function m5(e,t){return{$$typeof:af,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Aw(e){return typeof e=="object"&&e!==null&&e.$$typeof===af}function g5(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Q_=/\/+/g;function Mv(e,t){return typeof e=="object"&&e!==null&&e.key!=null?g5(""+e.key):t.toString(36)}function Eh(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 af:case i5:o=!0}}if(o)return o=e,i=i(o),e=n===""?"."+Mv(o,0):n,X_(i)?(r="",e!=null&&(r=e.replace(Q_,"$&/")+"/"),Eh(i,t,r,"",function(u){return u})):i!=null&&(Aw(i)&&(i=m5(i,r+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(Q_,"$&/")+"/")+e)),t.push(i)),1;if(o=0,n=n===""?".":n+":",X_(e))for(var s=0;s<e.length;s++){a=e[s];var l=n+Mv(a,s);o+=Eh(a,t,r,l,i)}else if(l=p5(e),typeof l=="function")for(e=l.call(e),s=0;!(a=e.next()).done;)a=a.value,l=n+Mv(a,s++),o+=Eh(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 If(e,t,r){if(e==null)return e;var n=[],i=0;return Eh(e,n,"","",function(a){return t.call(r,a,i++)}),n}function v5(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 cr={current:null},kh={transition:null},y5={ReactCurrentDispatcher:cr,ReactCurrentBatchConfig:kh,ReactCurrentOwner:kw};function ZA(){throw Error("act(...) is not supported in production builds of React.")}Pe.Children={map:If,forEach:function(e,t,r){If(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return If(e,function(){t++}),t},toArray:function(e){return If(e,function(t){return t})||[]},only:function(e){if(!Aw(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Pe.Component=yc;Pe.Fragment=a5;Pe.Profiler=s5;Pe.PureComponent=Nw;Pe.StrictMode=o5;
vendor: 4,985 bytes, lines 9-25
9Pe.Suspense=d5;Pe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=y5;Pe.act=ZA;Pe.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=KA({},e.props),i=e.key,a=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,o=kw.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)XA.call(t,l)&&!QA.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:af,type:e.type,key:i,ref:a,props:n,_owner:o}};Pe.createContext=function(e){return e={$$typeof:c5,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:l5,_context:e},e.Consumer=e};Pe.createElement=JA;Pe.createFactory=function(e){var t=JA.bind(null,e);return t.type=e,t};Pe.createRef=function(){return{current:null}};Pe.forwardRef=function(e){return{$$typeof:u5,render:e}};Pe.isValidElement=Aw;Pe.lazy=function(e){return{$$typeof:h5,_payload:{_status:-1,_result:e},_init:v5}};Pe.memo=function(e,t){return{$$typeof:f5,type:e,compare:t===void 0?null:t}};Pe.startTransition=function(e){var t=kh.transition;kh.transition={};try{e()}finally{kh.transition=t}};Pe.unstable_act=ZA;Pe.useCallback=function(e,t){return cr.current.useCallback(e,t)};Pe.useContext=function(e){return cr.current.useContext(e)};Pe.useDebugValue=function(){};Pe.useDeferredValue=function(e){return cr.current.useDeferredValue(e)};Pe.useEffect=function(e,t){return cr.current.useEffect(e,t)};Pe.useId=function(){return cr.current.useId()};Pe.useImperativeHandle=function(e,t,r){return cr.current.useImperativeHandle(e,t,r)};Pe.useInsertionEffect=function(e,t){return cr.current.useInsertionEffect(e,t)};Pe.useLayoutEffect=function(e,t){return cr.current.useLayoutEffect(e,t)};Pe.useMemo=function(e,t){return cr.current.useMemo(e,t)};Pe.useReducer=function(e,t,r){return cr.current.useReducer(e,t,r)};Pe.useRef=function(e){return cr.current.useRef(e)};Pe.useState=function(e){return cr.current.useState(e)};Pe.useSyncExternalStore=function(e,t,r){return cr.current.useSyncExternalStore(e,t,r)};Pe.useTransition=function(){return cr.current.useTransition()};Pe.version="18.3.1";qA.exports=Pe;var w=qA.exports;const k=Ie(w),Cw=n5({__proto__:null,default:k},[w]);/** 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 x5=w,b5=Symbol.for("react.element"),w5=Symbol.for("react.fragment"),S5=Object.prototype.hasOwnProperty,_5=x5.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,j5={key:!0,ref:!0,__self:!0,__source:!0};function eC(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)S5.call(t,n)&&!j5.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:b5,type:e,key:a,ref:o,props:i,_owner:_5.current}}Bm.Fragment=w5;Bm.jsx=eC;Bm.jsxs=eC;HA.exports=Bm;var c=HA.exports,tC={exports:{}},Hr={},rC={exports:{}},nC={};/** 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(E,M){var F=E.length;E.push(M);e:for(;0<F;){var H=F-1>>>1,U=E[H];if(0<i(U,M))E[H]=M,E[F]=U,F=H;else break e}}function r(E){return E.length===0?null:E[0]}function n(E){if(E.length===0)return null;var M=E[0],F=E.pop();if(F!==M){E[0]=F;e:for(var H=0,U=E.length,K=U>>>1;H<K;){var J=2*(H+1)-1,he=E[J],Ne=J+1,Y=E[Ne];if(0>i(he,F))Ne<U&&0>i(Y,he)?(E[H]=Y,E[Ne]=F,H=Ne):(E[H]=he,E[J]=F,H=J);else if(Ne<U&&0>i(Y,F))E[H]=Y,E[Ne]=F,H=Ne;else break e}}return M}function i(E,M){var F=E.sortIndex-M.sortIndex;return F!==0?F:E.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=[],d=1,f=null,h=3,p=!1,g=!1,m=!1,v=typeof setTimeout=="function"?setTimeout:null,x=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 b(E){for(var M=r(u);M!==null;){if(M.callback===null)n(u);else if(M.startTime<=E)n(u),M.sortIndex=M.expirationTime,t(l,M);else break;M=r(u)}}function _(E){if(m=!1,b(E),!g)if(r(l)!==null)g=!0,D(S);else{var M=r(u);M!==null&&$(_,M.startTime-E)}}function S(E,M){g=!1,m&&(m=!1,x(P),P=-1),p=!0;var F=h;
vendor: 9,234 bytes, lines 25-34
25try{for(b(M),f=r(l);f!==null&&(!(f.expirationTime>M)||E&&!C());){var H=f.callback;if(typeof H=="function"){f.callback=null,h=f.priorityLevel;var U=H(f.expirationTime<=M);M=e.unstable_now(),typeof U=="function"?f.callback=U:f===r(l)&&n(l),b(M)}else n(l);f=r(l)}if(f!==null)var K=!0;else{var J=r(u);J!==null&&$(_,J.startTime-M),K=!1}return K}finally{f=null,h=F,p=!1}}var j=!1,O=null,P=-1,N=5,A=-1;function C(){return!(e.unstable_now()-A<N)}function T(){if(O!==null){var E=e.unstable_now();A=E;var M=!0;try{M=O(!0,E)}finally{M?L():(j=!1,O=null)}}else j=!1}var L;if(typeof y=="function")L=function(){y(T)};else if(typeof MessageChannel<"u"){var R=new MessageChannel,I=R.port2;R.port1.onmessage=T,L=function(){I.postMessage(null)}}else L=function(){v(T,0)};function D(E){O=E,j||(j=!0,L())}function $(E,M){P=v(function(){E(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(E){E.callback=null},e.unstable_continueExecution=function(){g||p||(g=!0,D(S))},e.unstable_forceFrameRate=function(E){0>E||125<E?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):N=0<E?Math.floor(1e3/E):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(E){switch(h){case 1:case 2:case 3:var M=3;break;default:M=h}var F=h;h=M;try{return E()}finally{h=F}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(E,M){switch(E){case 1:case 2:case 3:case 4:case 5:break;default:E=3}var F=h;h=E;try{return M()}finally{h=F}},e.unstable_scheduleCallback=function(E,M,F){var H=e.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?H+F:H):F=H,E){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=F+U,E={id:d++,callback:M,priorityLevel:E,startTime:F,expirationTime:U,sortIndex:-1},F>H?(E.sortIndex=F,t(u,E),r(l)===null&&E===r(u)&&(m?(x(P),P=-1):m=!0,$(_,F-H))):(E.sortIndex=U,t(l,E),g||p||(g=!0,D(S))),E},e.unstable_shouldYield=C,e.unstable_wrapCallback=function(E){var M=h;return function(){var F=h;h=M;try{return E.apply(this,arguments)}finally{h=F}}}})(nC);rC.exports=nC;var O5=rC.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 P5=w,zr=O5;function V(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 iC=new Set,Uu={};function ls(e,t){El(e,t),El(e+"Capture",t)}function El(e,t){for(Uu[e]=t,e=0;e<t.length;e++)iC.add(t[e])}var Wi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),px=Object.prototype.hasOwnProperty,N5=/^[: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]*$/,J_={},Z_={};function E5(e){return px.call(Z_,e)?!0:px.call(J_,e)?!1:N5.test(e)?Z_[e]=!0:(J_[e]=!0,!1)}function k5(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 A5(e,t,r,n){if(t===null||typeof t>"u"||k5(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 ur(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 qt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){qt[e]=new ur(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];qt[t]=new ur(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){qt[e]=new ur(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){qt[e]=new ur(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){qt[e]=new ur(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){qt[e]=new ur(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){qt[e]=new ur(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){qt[e]=new ur(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){qt[e]=new ur(e,5,!1,e.toLowerCase(),null,!1,!1)});var Tw=/[\-:]([a-z])/g;function $w(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(Tw,$w);qt[t]=new ur(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(Tw,$w);qt[t]=new ur(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(Tw,$w);qt[t]=new ur(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){qt[e]=new ur(e,1,!1,e.toLowerCase(),null,!1,!1)});qt.xlinkHref=new ur("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){qt[e]=new ur(e,1,!1,e.toLowerCase(),null,!0,!0)});function Rw(e,t,r,n){var i=qt.hasOwnProperty(t)?qt[t]:null;(i!==null?i.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(A5(t,r,i,n)&&(r=null),n||i===null?E5(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 Qi=P5.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Df=Symbol.for("react.element"),Fs=Symbol.for("react.portal"),Bs=Symbol.for("react.fragment"),Mw=Symbol.for("react.strict_mode"),mx=Symbol.for("react.profiler"),aC=Symbol.for("react.provider"),oC=Symbol.for("react.context"),Iw=Symbol.for("react.forward_ref"),gx=Symbol.for("react.suspense"),vx=Symbol.for("react.suspense_list"),Dw=Symbol.for("react.memo"),pa=Symbol.for("react.lazy"),sC=Symbol.for("react.offscreen"),ej=Symbol.iterator;function Vc(e){return e===null||typeof e!="object"?null:(e=ej&&e[ej]||e["@@iterator"],typeof e=="function"?e:null)}var ft=Object.assign,Iv;function mu(e){if(Iv===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Iv=t&&t[1]||""}return` 34`+Iv+e}var Dv=!1;function Lv(e,t){if(!e||Dv)return"";Dv=!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: 5,607 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{Dv=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?mu(e):""}function C5(e){switch(e.tag){case 5:return mu(e.type);case 16:return mu("Lazy");case 13:return mu("Suspense");case 19:return mu("SuspenseList");case 0:case 2:case 15:return e=Lv(e.type,!1),e;case 11:return e=Lv(e.type.render,!1),e;case 1:return e=Lv(e.type,!0),e;default:return""}}function yx(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 Bs:return"Fragment";case Fs:return"Portal";case mx:return"Profiler";case Mw:return"StrictMode";case gx:return"Suspense";case vx:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case oC:return(e.displayName||"Context")+".Consumer";case aC:return(e._context.displayName||"Context")+".Provider";case Iw:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Dw:return t=e.displayName||null,t!==null?t:yx(e.type)||"Memo";case pa:t=e._payload,e=e._init;try{return yx(e(t))}catch{}}return null}function T5(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 yx(t);case 8:return t===Mw?"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 za(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function lC(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function $5(e){var t=lC(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 Lf(e){e._valueTracker||(e._valueTracker=$5(e))}function cC(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=lC(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Yh(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 xx(e,t){var r=t.checked;return ft({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function tj(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=za(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 uC(e,t){t=t.checked,t!=null&&Rw(e,"checked",t,!1)}function bx(e,t){uC(e,t);var r=za(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")?wx(e,t.type,r):t.hasOwnProperty("defaultValue")&&wx(e,t.type,za(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function rj(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 wx(e,t,r){(t!=="number"||Yh(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var gu=Array.isArray;function nl(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=""+za(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 Sx(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(V(91));return ft({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function nj(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(V(92));if(gu(r)){if(1<r.length)throw Error(V(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:za(r)}
vendor: 8,483 bytes, line 37
37}function dC(e,t){var r=za(t.value),n=za(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 ij(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function fC(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 _x(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?fC(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ff,hC=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(Ff=Ff||document.createElement("div"),Ff.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ff.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Wu(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Su={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},R5=["Webkit","ms","Moz","O"];Object.keys(Su).forEach(function(e){R5.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Su[t]=Su[e]})});function pC(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Su.hasOwnProperty(e)&&Su[e]?(""+t).trim():t+"px"}function mC(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=pC(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var M5=ft({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 jx(e,t){if(t){if(M5[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(V(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(V(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(V(61))}if(t.style!=null&&typeof t.style!="object")throw Error(V(62))}}function Ox(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 Px=null;function Lw(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Nx=null,il=null,al=null;function aj(e){if(e=lf(e)){if(typeof Nx!="function")throw Error(V(280));var t=e.stateNode;t&&(t=qm(t),Nx(e.stateNode,e.type,t))}}function gC(e){il?al?al.push(e):al=[e]:il=e}function vC(){if(il){var e=il,t=al;if(al=il=null,aj(e),t)for(e=0;e<t.length;e++)aj(t[e])}}function yC(e,t){return e(t)}function xC(){}var Fv=!1;function bC(e,t,r){if(Fv)return e(t,r);Fv=!0;try{return yC(e,t,r)}finally{Fv=!1,(il!==null||al!==null)&&(xC(),vC())}}function zu(e,t){var r=e.stateNode;if(r===null)return null;var n=qm(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(V(231,t,typeof r));return r}var Ex=!1;if(Wi)try{var Kc={};Object.defineProperty(Kc,"passive",{get:function(){Ex=!0}}),window.addEventListener("test",Kc,Kc),window.removeEventListener("test",Kc,Kc)}catch{Ex=!1}function I5(e,t,r,n,i,a,o,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(d){this.onError(d)}}var _u=!1,Xh=null,Qh=!1,kx=null,D5={onError:function(e){_u=!0,Xh=e}};function L5(e,t,r,n,i,a,o,s,l){_u=!1,Xh=null,I5.apply(D5,arguments)}function F5(e,t,r,n,i,a,o,s,l){if(L5.apply(this,arguments),_u){if(_u){var u=Xh;_u=!1,Xh=null}else throw Error(V(198));Qh||(Qh=!0,kx=u)}}function cs(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 wC(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 oj(e){if(cs(e)!==e)throw Error(V(188))}function B5(e){var t=e.alternate;if(!t){if(t=cs(e),t===null)throw Error(V(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 oj(i),e;if(a===n)return oj(i),t;a=a.sibling}throw Error(V(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(V(189))}}if(r.alternate!==n)throw Error(V(190))}if(r.tag!==3)throw Error(V(188));return r.stateNode.current===r?e:t}function SC(e){return e=B5(e),e!==null?_C(e):null}function _C(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=_C(e);if(t!==null)return t;e=e.sibling}return null}var jC=zr.unstable_scheduleCallback,sj=zr.unstable_cancelCallback,U5=zr.unstable_shouldYield,W5=zr.unstable_requestPaint,yt=zr.unstable_now,z5=zr.unstable_getCurrentPriorityLevel,Fw=zr.unstable_ImmediatePriority,OC=zr.unstable_UserBlockingPriority,Jh=zr.unstable_NormalPriority,H5=zr.unstable_LowPriority,PC=zr.unstable_IdlePriority,Um=null,oi=null;function q5(e){if(oi&&typeof oi.onCommitFiberRoot=="function")try{oi.onCommitFiberRoot(Um,e,void 0,(e.current.flags&128)===128)}catch{}}var Mn=Math.clz32?Math.clz32:G5,V5=Math.log,K5=Math.LN2;function G5(e){return e>>>=0,e===0?32:31-(V5(e)/K5|0)|0}var Bf=64,Uf=4194304;function vu(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 Zh(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=vu(s):(a&=o,a!==0&&(n=vu(a)))}else o=r&~i,o!==0?n=vu(o):a!==0&&(n=vu(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-Mn(t),i=1<<r,n|=e[r],t&=~i;return n}function Y5(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 X5(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-Mn(a),s=1<<o,l=i[o];l===-1?(!(s&r)||s&n)&&(i[o]=Y5(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}}function Ax(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function NC(){var e=Bf;return Bf<<=1,!(Bf&4194240)&&(Bf=64),e}function Bv(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}
vendor: 4,087 bytes, line 37
37function of(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Mn(t),e[t]=r}function Q5(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-Mn(r),a=1<<i;t[i]=0,n[i]=-1,e[i]=-1,r&=~a}}function Bw(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Mn(r),i=1<<n;i&t|e[n]&t&&(e[n]|=t),r&=~i}}var Le=0;function EC(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var kC,Uw,AC,CC,TC,Cx=!1,Wf=[],Ta=null,$a=null,Ra=null,Hu=new Map,qu=new Map,ya=[],J5="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 lj(e,t){switch(e){case"focusin":case"focusout":Ta=null;break;case"dragenter":case"dragleave":$a=null;break;case"mouseover":case"mouseout":Ra=null;break;case"pointerover":case"pointerout":Hu.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":qu.delete(t.pointerId)}}function Gc(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=lf(t),t!==null&&Uw(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Z5(e,t,r,n,i){switch(t){case"focusin":return Ta=Gc(Ta,e,t,r,n,i),!0;case"dragenter":return $a=Gc($a,e,t,r,n,i),!0;case"mouseover":return Ra=Gc(Ra,e,t,r,n,i),!0;case"pointerover":var a=i.pointerId;return Hu.set(a,Gc(Hu.get(a)||null,e,t,r,n,i)),!0;case"gotpointercapture":return a=i.pointerId,qu.set(a,Gc(qu.get(a)||null,e,t,r,n,i)),!0}return!1}function $C(e){var t=_o(e.target);if(t!==null){var r=cs(t);if(r!==null){if(t=r.tag,t===13){if(t=wC(r),t!==null){e.blockedOn=t,TC(e.priority,function(){AC(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 Ah(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Tx(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Px=n,r.target.dispatchEvent(n),Px=null}else return t=lf(r),t!==null&&Uw(t),e.blockedOn=r,!1;t.shift()}return!0}function cj(e,t,r){Ah(e)&&r.delete(t)}function eF(){Cx=!1,Ta!==null&&Ah(Ta)&&(Ta=null),$a!==null&&Ah($a)&&($a=null),Ra!==null&&Ah(Ra)&&(Ra=null),Hu.forEach(cj),qu.forEach(cj)}function Yc(e,t){e.blockedOn===t&&(e.blockedOn=null,Cx||(Cx=!0,zr.unstable_scheduleCallback(zr.unstable_NormalPriority,eF)))}function Vu(e){function t(i){return Yc(i,e)}if(0<Wf.length){Yc(Wf[0],e);for(var r=1;r<Wf.length;r++){var n=Wf[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Ta!==null&&Yc(Ta,e),$a!==null&&Yc($a,e),Ra!==null&&Yc(Ra,e),Hu.forEach(t),qu.forEach(t),r=0;r<ya.length;r++)n=ya[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<ya.length&&(r=ya[0],r.blockedOn===null);)$C(r),r.blockedOn===null&&ya.shift()}var ol=Qi.ReactCurrentBatchConfig,ep=!0;function tF(e,t,r,n){var i=Le,a=ol.transition;ol.transition=null;try{Le=1,Ww(e,t,r,n)}finally{Le=i,ol.transition=a}}function rF(e,t,r,n){var i=Le,a=ol.transition;ol.transition=null;try{Le=4,Ww(e,t,r,n)}finally{Le=i,ol.transition=a}}function Ww(e,t,r,n){if(ep){var i=Tx(e,t,r,n);if(i===null)Xv(e,t,n,tp,r),lj(e,n);else if(Z5(i,e,t,r,n))n.stopPropagation();else if(lj(e,n),t&4&&-1<J5.indexOf(e)){for(;i!==null;){var a=lf(i);if(a!==null&&kC(a),a=Tx(e,t,r,n),a===null&&Xv(e,t,n,tp,r),a===i)break;i=a}i!==null&&n.stopPropagation()}else Xv(e,t,n,null,r)}}var tp=null;function Tx(e,t,r,n){if(tp=null,e=Lw(n),e=_o(e),e!==null)if(t=cs(e),t===null)e=null;else if(r=t.tag,r===13){if(e=wC(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 tp=e,null}
vendor: 10,401 bytes, line 37
37function RC(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(z5()){case Fw:return 1;case OC:return 4;case Jh:case H5:return 16;case PC:return 536870912;default:return 16}default:return 16}}var Na=null,zw=null,Ch=null;function MC(){if(Ch)return Ch;var e,t=zw,r=t.length,n,i="value"in Na?Na.value:Na.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 Ch=i.slice(e,1<n?1-n:void 0)}function Th(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 zf(){return!0}function uj(){return!1}function qr(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)?zf:uj,this.isPropagationStopped=uj,this}return ft(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=zf)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=zf)},persist:function(){},isPersistent:zf}),t}var xc={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Hw=qr(xc),sf=ft({},xc,{view:0,detail:0}),nF=qr(sf),Uv,Wv,Xc,Wm=ft({},sf,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:qw,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!==Xc&&(Xc&&e.type==="mousemove"?(Uv=e.screenX-Xc.screenX,Wv=e.screenY-Xc.screenY):Wv=Uv=0,Xc=e),Uv)},movementY:function(e){return"movementY"in e?e.movementY:Wv}}),dj=qr(Wm),iF=ft({},Wm,{dataTransfer:0}),aF=qr(iF),oF=ft({},sf,{relatedTarget:0}),zv=qr(oF),sF=ft({},xc,{animationName:0,elapsedTime:0,pseudoElement:0}),lF=qr(sF),cF=ft({},xc,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),uF=qr(cF),dF=ft({},xc,{data:0}),fj=qr(dF),fF={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},hF={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"},pF={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function mF(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=pF[e])?!!t[e]:!1}function qw(){return mF}var gF=ft({},sf,{key:function(e){if(e.key){var t=fF[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Th(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?hF[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:qw,charCode:function(e){return e.type==="keypress"?Th(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Th(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),vF=qr(gF),yF=ft({},Wm,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),hj=qr(yF),xF=ft({},sf,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:qw}),bF=qr(xF),wF=ft({},xc,{propertyName:0,elapsedTime:0,pseudoElement:0}),SF=qr(wF),_F=ft({},Wm,{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}),jF=qr(_F),OF=[9,13,27,32],Vw=Wi&&"CompositionEvent"in window,ju=null;Wi&&"documentMode"in document&&(ju=document.documentMode);var PF=Wi&&"TextEvent"in window&&!ju,IC=Wi&&(!Vw||ju&&8<ju&&11>=ju),pj=" ",mj=!1;function DC(e,t){switch(e){case"keyup":return OF.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function LC(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Us=!1;function NF(e,t){switch(e){case"compositionend":return LC(t);case"keypress":return t.which!==32?null:(mj=!0,pj);case"textInput":return e=t.data,e===pj&&mj?null:e;default:return null}}function EF(e,t){if(Us)return e==="compositionend"||!Vw&&DC(e,t)?(e=MC(),Ch=zw=Na=null,Us=!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 IC&&t.locale!=="ko"?null:t.data;default:return null}}var kF={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 gj(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!kF[e.type]:t==="textarea"}function FC(e,t,r,n){gC(n),t=rp(t,"onChange"),0<t.length&&(r=new Hw("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Ou=null,Ku=null;function AF(e){XC(e,0)}function zm(e){var t=Hs(e);if(cC(t))return e}function CF(e,t){if(e==="change")return t}var BC=!1;if(Wi){var Hv;if(Wi){var qv="oninput"in document;if(!qv){var vj=document.createElement("div");vj.setAttribute("oninput","return;"),qv=typeof vj.oninput=="function"}Hv=qv}else Hv=!1;BC=Hv&&(!document.documentMode||9<document.documentMode)}function yj(){Ou&&(Ou.detachEvent("onpropertychange",UC),Ku=Ou=null)}function UC(e){if(e.propertyName==="value"&&zm(Ku)){var t=[];FC(t,Ku,e,Lw(e)),bC(AF,t)}}function TF(e,t,r){e==="focusin"?(yj(),Ou=t,Ku=r,Ou.attachEvent("onpropertychange",UC)):e==="focusout"&&yj()}function $F(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return zm(Ku)}function RF(e,t){if(e==="click")return zm(t)}function MF(e,t){if(e==="input"||e==="change")return zm(t)}function IF(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ln=typeof Object.is=="function"?Object.is:IF;function Gu(e,t){if(Ln(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(!px.call(t,i)||!Ln(e[i],t[i]))return!1}return!0}function xj(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function bj(e,t){var r=xj(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=xj(r)}}function WC(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?WC(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function zC(){for(var e=window,t=Yh();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Yh(e.document)}return t}function Kw(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 DF(e){var t=zC(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&WC(r.ownerDocument.documentElement,r)){if(n!==null&&Kw(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=bj(r,a);var o=bj(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 LF=Wi&&"documentMode"in document&&11>=document.documentMode,Ws=null,$x=null,Pu=null,Rx=!1;function wj(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Rx||Ws==null||Ws!==Yh(n)||(n=Ws,"selectionStart"in n&&Kw(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}),Pu&&Gu(Pu,n)||(Pu=n,n=rp($x,"onSelect"),0<n.length&&(t=new Hw("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Ws)))}function Hf(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var zs={animationend:Hf("Animation","AnimationEnd"),animationiteration:Hf("Animation","AnimationIteration"),animationstart:Hf("Animation","AnimationStart"),transitionend:Hf("Transition","TransitionEnd")},Vv={},HC={};Wi&&(HC=document.createElement("div").style,"AnimationEvent"in window||(delete zs.animationend.animation,delete zs.animationiteration.animation,delete zs.animationstart.animation),"TransitionEvent"in window||delete zs.transitionend.transition);function Hm(e){if(Vv[e])return Vv[e];if(!zs[e])return e;var t=zs[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in HC)return Vv[e]=t[r];return e}var qC=Hm("animationend"),VC=Hm("animationiteration"),KC=Hm("animationstart"),GC=Hm("transitionend"),YC=new Map,Sj="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 Ka(e,t){YC.set(e,t),ls(t,[e])}for(var Kv=0;Kv<Sj.length;Kv++){var Gv=Sj[Kv],FF=Gv.toLowerCase(),BF=Gv[0].toUpperCase()+Gv.slice(1);Ka(FF,"on"+BF)}Ka(qC,"onAnimationEnd");Ka(VC,"onAnimationIteration");Ka(KC,"onAnimationStart");Ka("dblclick","onDoubleClick");Ka("focusin","onFocus");Ka("focusout","onBlur");Ka(GC,"onTransitionEnd");El("onMouseEnter",["mouseout","mouseover"]);El("onMouseLeave",["mouseout","mouseover"]);El("onPointerEnter",["pointerout","pointerover"]);El("onPointerLeave",["pointerout","pointerover"]);ls("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ls("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ls("onBeforeInput",["compositionend","keypress","textInput","paste"]);ls("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ls("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ls("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var yu="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(" "),UF=new Set("cancel close invalid load scroll toggle".split(" ").concat(yu));function _j(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,F5(n,t,void 0,e),e.currentTarget=null}function XC(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;_j(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;_j(i,s,u),a=l}}}if(Qh)throw e=kx,Qh=!1,kx=null,e}function Ze(e,t){var r=t[Fx];r===void 0&&(r=t[Fx]=new Set);var n=e+"__bubble";r.has(n)||(QC(t,e,2,!1),r.add(n))}function Yv(e,t,r){var n=0;t&&(n|=4),QC(r,e,n,t)}var qf="_reactListening"+Math.random().toString(36).slice(2);function Yu(e){if(!e[qf]){e[qf]=!0,iC.forEach(function(r){r!=="selectionchange"&&(UF.has(r)||Yv(r,!1,e),Yv(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[qf]||(t[qf]=!0,Yv("selectionchange",!1,t))}}function QC(e,t,r,n){switch(RC(t)){case 1:var i=tF;break;case 4:i=rF;break;default:i=Ww}r=i.bind(null,t,r,e),i=void 0,!Ex||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 Xv(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: 5,572 bytes, lines 37-38
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=_o(s),o===null)return;if(l=o.tag,l===5||l===6){n=a=o;continue e}s=s.parentNode}}n=n.return}bC(function(){var u=a,d=Lw(r),f=[];e:{var h=YC.get(e);if(h!==void 0){var p=Hw,g=e;switch(e){case"keypress":if(Th(r)===0)break e;case"keydown":case"keyup":p=vF;break;case"focusin":g="focus",p=zv;break;case"focusout":g="blur",p=zv;break;case"beforeblur":case"afterblur":p=zv;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=dj;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=aF;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=bF;break;case qC:case VC:case KC:p=lF;break;case GC:p=SF;break;case"scroll":p=nF;break;case"wheel":p=jF;break;case"copy":case"cut":case"paste":p=uF;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=hj}var m=(t&4)!==0,v=!m&&e==="scroll",x=m?h!==null?h+"Capture":null:h;m=[];for(var y=u,b;y!==null;){b=y;var _=b.stateNode;if(b.tag===5&&_!==null&&(b=_,x!==null&&(_=zu(y,x),_!=null&&m.push(Xu(y,_,b)))),v)break;y=y.return}0<m.length&&(h=new p(h,g,null,r,d),f.push({event:h,listeners:m}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&r!==Px&&(g=r.relatedTarget||r.fromElement)&&(_o(g)||g[zi]))break e;if((p||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,p?(g=r.relatedTarget||r.toElement,p=u,g=g?_o(g):null,g!==null&&(v=cs(g),g!==v||g.tag!==5&&g.tag!==6)&&(g=null)):(p=null,g=u),p!==g)){if(m=dj,_="onMouseLeave",x="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(m=hj,_="onPointerLeave",x="onPointerEnter",y="pointer"),v=p==null?h:Hs(p),b=g==null?h:Hs(g),h=new m(_,y+"leave",p,r,d),h.target=v,h.relatedTarget=b,_=null,_o(d)===u&&(m=new m(x,y+"enter",g,r,d),m.target=b,m.relatedTarget=v,_=m),v=_,p&&g)t:{for(m=p,x=g,y=0,b=m;b;b=bs(b))y++;for(b=0,_=x;_;_=bs(_))b++;for(;0<y-b;)m=bs(m),y--;for(;0<b-y;)x=bs(x),b--;for(;y--;){if(m===x||x!==null&&m===x.alternate)break t;m=bs(m),x=bs(x)}m=null}else m=null;p!==null&&jj(f,h,p,m,!1),g!==null&&v!==null&&jj(f,v,g,m,!0)}}e:{if(h=u?Hs(u):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var S=CF;else if(gj(h))if(BC)S=MF;else{S=$F;var j=TF}else(p=h.nodeName)&&p.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(S=RF);if(S&&(S=S(e,u))){FC(f,S,r,d);break e}j&&j(e,h,u),e==="focusout"&&(j=h._wrapperState)&&j.controlled&&h.type==="number"&&wx(h,"number",h.value)}switch(j=u?Hs(u):window,e){case"focusin":(gj(j)||j.contentEditable==="true")&&(Ws=j,$x=u,Pu=null);break;case"focusout":Pu=$x=Ws=null;break;case"mousedown":Rx=!0;break;case"contextmenu":case"mouseup":case"dragend":Rx=!1,wj(f,r,d);break;case"selectionchange":if(LF)break;case"keydown":case"keyup":wj(f,r,d)}var O;if(Vw)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else Us?DC(e,r)&&(P="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(P="onCompositionStart");P&&(IC&&r.locale!=="ko"&&(Us||P!=="onCompositionStart"?P==="onCompositionEnd"&&Us&&(O=MC()):(Na=d,zw="value"in Na?Na.value:Na.textContent,Us=!0)),j=rp(u,P),0<j.length&&(P=new fj(P,e,null,r,d),f.push({event:P,listeners:j}),O?P.data=O:(O=LC(r),O!==null&&(P.data=O)))),(O=PF?NF(e,r):EF(e,r))&&(u=rp(u,"onBeforeInput"),0<u.length&&(d=new fj("onBeforeInput","beforeinput",null,r,d),f.push({event:d,listeners:u}),d.data=O))}XC(f,t)})}function Xu(e,t,r){return{instance:e,listener:t,currentTarget:r}}function rp(e,t){for(var r=t+"Capture",n=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=zu(e,r),a!=null&&n.unshift(Xu(e,a,i)),a=zu(e,t),a!=null&&n.push(Xu(e,a,i))),e=e.return}return n}function bs(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function jj(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=zu(r,a),l!=null&&o.unshift(Xu(r,l,s))):i||(l=zu(r,a),l!=null&&o.push(Xu(r,l,s)))),r=r.return}o.length!==0&&e.push({event:t,listeners:o})}var WF=/\r\n?/g,zF=/\u0000|\uFFFD/g;function Oj(e){return(typeof e=="string"?e:""+e).replace(WF,` 38`).replace(zF,"")}function Vf(e,t,r){if(t=Oj(t),Oj(e)!==t&&r)throw Error(V(425))}function np(){}var Mx=null,Ix=null;function Dx(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 Lx=typeof setTimeout=="function"?setTimeout:void 0,HF=typeof clearTimeout=="function"?clearTimeout:void 0,Pj=typeof Promise=="function"?Promise:void 0,qF=typeof queueMicrotask=="function"?queueMicrotask:typeof Pj<"u"?function(e){return Pj.resolve(null).then(e).catch(VF)}:Lx;function VF(e){setTimeout(function(){throw e})}function Qv(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),Vu(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=i}
vendor: 4,658 bytes, line 38
38while(r);Vu(t)}function Ma(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 Nj(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 bc=Math.random().toString(36).slice(2),ti="__reactFiber$"+bc,Qu="__reactProps$"+bc,zi="__reactContainer$"+bc,Fx="__reactEvents$"+bc,KF="__reactListeners$"+bc,GF="__reactHandles$"+bc;function _o(e){var t=e[ti];if(t)return t;for(var r=e.parentNode;r;){if(t=r[zi]||r[ti]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Nj(e);e!==null;){if(r=e[ti])return r;e=Nj(e)}return t}e=r,r=e.parentNode}return null}function lf(e){return e=e[ti]||e[zi],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Hs(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(V(33))}function qm(e){return e[Qu]||null}var Bx=[],qs=-1;function Ga(e){return{current:e}}function rt(e){0>qs||(e.current=Bx[qs],Bx[qs]=null,qs--)}function Ye(e,t){qs++,Bx[qs]=e.current,e.current=t}var Ha={},Zt=Ga(Ha),xr=Ga(!1),Uo=Ha;function kl(e,t){var r=e.type.contextTypes;if(!r)return Ha;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 br(e){return e=e.childContextTypes,e!=null}function ip(){rt(xr),rt(Zt)}function Ej(e,t,r){if(Zt.current!==Ha)throw Error(V(168));Ye(Zt,t),Ye(xr,r)}function JC(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(V(108,T5(e)||"Unknown",i));return ft({},r,n)}function ap(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ha,Uo=Zt.current,Ye(Zt,e),Ye(xr,xr.current),!0}function kj(e,t,r){var n=e.stateNode;if(!n)throw Error(V(169));r?(e=JC(e,t,Uo),n.__reactInternalMemoizedMergedChildContext=e,rt(xr),rt(Zt),Ye(Zt,e)):rt(xr),Ye(xr,r)}var ki=null,Vm=!1,Jv=!1;function ZC(e){ki===null?ki=[e]:ki.push(e)}function YF(e){Vm=!0,ZC(e)}function Ya(){if(!Jv&&ki!==null){Jv=!0;var e=0,t=Le;try{var r=ki;for(Le=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}ki=null,Vm=!1}catch(i){throw ki!==null&&(ki=ki.slice(e+1)),jC(Fw,Ya),i}finally{Le=t,Jv=!1}}return null}var Vs=[],Ks=0,op=null,sp=0,rn=[],nn=0,Wo=null,Ti=1,$i="";function ho(e,t){Vs[Ks++]=sp,Vs[Ks++]=op,op=e,sp=t}function eT(e,t,r){rn[nn++]=Ti,rn[nn++]=$i,rn[nn++]=Wo,Wo=e;var n=Ti;e=$i;var i=32-Mn(n)-1;n&=~(1<<i),r+=1;var a=32-Mn(t)+i;if(30<a){var o=i-i%5;a=(n&(1<<o)-1).toString(32),n>>=o,i-=o,Ti=1<<32-Mn(t)+i|r<<i|n,$i=a+e}else Ti=1<<a|r<<i|n,$i=e}function Gw(e){e.return!==null&&(ho(e,1),eT(e,1,0))}function Yw(e){for(;e===op;)op=Vs[--Ks],Vs[Ks]=null,sp=Vs[--Ks],Vs[Ks]=null;for(;e===Wo;)Wo=rn[--nn],rn[nn]=null,$i=rn[--nn],rn[nn]=null,Ti=rn[--nn],rn[nn]=null}var Fr=null,Lr=null,it=!1,$n=null;function tT(e,t){var r=on(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 Aj(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Fr=e,Lr=Ma(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Fr=e,Lr=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Wo!==null?{id:Ti,overflow:$i}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=on(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Fr=e,Lr=null,!0):!1;default:return!1}}function Ux(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Wx(e){if(it){var t=Lr;if(t){var r=t;if(!Aj(e,t)){if(Ux(e))throw Error(V(418));t=Ma(r.nextSibling);var n=Fr;t&&Aj(e,t)?tT(n,r):(e.flags=e.flags&-4097|2,it=!1,Fr=e)}}else{if(Ux(e))throw Error(V(418));e.flags=e.flags&-4097|2,it=!1,Fr=e}}}function Cj(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Fr=e}function Kf(e){if(e!==Fr)return!1;if(!it)return Cj(e),it=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Dx(e.type,e.memoizedProps)),t&&(t=Lr)){if(Ux(e))throw rT(),Error(V(418));for(;t;)tT(e,t),t=Ma(t.nextSibling)}if(Cj(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(V(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Lr=Ma(e.nextSibling);break e}t--}
vendor: 11,483 bytes, line 38
38else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Lr=null}}else Lr=Fr?Ma(e.stateNode.nextSibling):null;return!0}function rT(){for(var e=Lr;e;)e=Ma(e.nextSibling)}function Al(){Lr=Fr=null,it=!1}function Xw(e){$n===null?$n=[e]:$n.push(e)}var XF=Qi.ReactCurrentBatchConfig;function Qc(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(V(309));var n=r.stateNode}if(!n)throw Error(V(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(V(284));if(!r._owner)throw Error(V(290,e))}return e}function Gf(e,t){throw e=Object.prototype.toString.call(t),Error(V(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Tj(e){var t=e._init;return t(e._payload)}function nT(e){function t(x,y){if(e){var b=x.deletions;b===null?(x.deletions=[y],x.flags|=16):b.push(y)}}function r(x,y){if(!e)return null;for(;y!==null;)t(x,y),y=y.sibling;return null}function n(x,y){for(x=new Map;y!==null;)y.key!==null?x.set(y.key,y):x.set(y.index,y),y=y.sibling;return x}function i(x,y){return x=Fa(x,y),x.index=0,x.sibling=null,x}function a(x,y,b){return x.index=b,e?(b=x.alternate,b!==null?(b=b.index,b<y?(x.flags|=2,y):b):(x.flags|=2,y)):(x.flags|=1048576,y)}function o(x){return e&&x.alternate===null&&(x.flags|=2),x}function s(x,y,b,_){return y===null||y.tag!==6?(y=ay(b,x.mode,_),y.return=x,y):(y=i(y,b),y.return=x,y)}function l(x,y,b,_){var S=b.type;return S===Bs?d(x,y,b.props.children,_,b.key):y!==null&&(y.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===pa&&Tj(S)===y.type)?(_=i(y,b.props),_.ref=Qc(x,y,b),_.return=x,_):(_=Fh(b.type,b.key,b.props,null,x.mode,_),_.ref=Qc(x,y,b),_.return=x,_)}function u(x,y,b,_){return y===null||y.tag!==4||y.stateNode.containerInfo!==b.containerInfo||y.stateNode.implementation!==b.implementation?(y=oy(b,x.mode,_),y.return=x,y):(y=i(y,b.children||[]),y.return=x,y)}function d(x,y,b,_,S){return y===null||y.tag!==7?(y=Lo(b,x.mode,_,S),y.return=x,y):(y=i(y,b),y.return=x,y)}function f(x,y,b){if(typeof y=="string"&&y!==""||typeof y=="number")return y=ay(""+y,x.mode,b),y.return=x,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Df:return b=Fh(y.type,y.key,y.props,null,x.mode,b),b.ref=Qc(x,null,y),b.return=x,b;case Fs:return y=oy(y,x.mode,b),y.return=x,y;case pa:var _=y._init;return f(x,_(y._payload),b)}if(gu(y)||Vc(y))return y=Lo(y,x.mode,b,null),y.return=x,y;Gf(x,y)}return null}function h(x,y,b,_){var S=y!==null?y.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return S!==null?null:s(x,y,""+b,_);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Df:return b.key===S?l(x,y,b,_):null;case Fs:return b.key===S?u(x,y,b,_):null;case pa:return S=b._init,h(x,y,S(b._payload),_)}if(gu(b)||Vc(b))return S!==null?null:d(x,y,b,_,null);Gf(x,b)}return null}function p(x,y,b,_,S){if(typeof _=="string"&&_!==""||typeof _=="number")return x=x.get(b)||null,s(y,x,""+_,S);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Df:return x=x.get(_.key===null?b:_.key)||null,l(y,x,_,S);case Fs:return x=x.get(_.key===null?b:_.key)||null,u(y,x,_,S);case pa:var j=_._init;return p(x,y,b,j(_._payload),S)}if(gu(_)||Vc(_))return x=x.get(b)||null,d(y,x,_,S,null);Gf(y,_)}return null}function g(x,y,b,_){for(var S=null,j=null,O=y,P=y=0,N=null;O!==null&&P<b.length;P++){O.index>P?(N=O,O=null):N=O.sibling;var A=h(x,O,b[P],_);if(A===null){O===null&&(O=N);break}e&&O&&A.alternate===null&&t(x,O),y=a(A,y,P),j===null?S=A:j.sibling=A,j=A,O=N}if(P===b.length)return r(x,O),it&&ho(x,P),S;if(O===null){for(;P<b.length;P++)O=f(x,b[P],_),O!==null&&(y=a(O,y,P),j===null?S=O:j.sibling=O,j=O);return it&&ho(x,P),S}for(O=n(x,O);P<b.length;P++)N=p(O,x,P,b[P],_),N!==null&&(e&&N.alternate!==null&&O.delete(N.key===null?P:N.key),y=a(N,y,P),j===null?S=N:j.sibling=N,j=N);return e&&O.forEach(function(C){return t(x,C)}),it&&ho(x,P),S}function m(x,y,b,_){var S=Vc(b);if(typeof S!="function")throw Error(V(150));if(b=S.call(b),b==null)throw Error(V(151));for(var j=S=null,O=y,P=y=0,N=null,A=b.next();O!==null&&!A.done;P++,A=b.next()){O.index>P?(N=O,O=null):N=O.sibling;var C=h(x,O,A.value,_);if(C===null){O===null&&(O=N);break}e&&O&&C.alternate===null&&t(x,O),y=a(C,y,P),j===null?S=C:j.sibling=C,j=C,O=N}if(A.done)return r(x,O),it&&ho(x,P),S;if(O===null){for(;!A.done;P++,A=b.next())A=f(x,A.value,_),A!==null&&(y=a(A,y,P),j===null?S=A:j.sibling=A,j=A);return it&&ho(x,P),S}for(O=n(x,O);!A.done;P++,A=b.next())A=p(O,x,P,A.value,_),A!==null&&(e&&A.alternate!==null&&O.delete(A.key===null?P:A.key),y=a(A,y,P),j===null?S=A:j.sibling=A,j=A);return e&&O.forEach(function(T){return t(x,T)}),it&&ho(x,P),S}function v(x,y,b,_){if(typeof b=="object"&&b!==null&&b.type===Bs&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Df:e:{for(var S=b.key,j=y;j!==null;){if(j.key===S){if(S=b.type,S===Bs){if(j.tag===7){r(x,j.sibling),y=i(j,b.props.children),y.return=x,x=y;break e}}else if(j.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===pa&&Tj(S)===j.type){r(x,j.sibling),y=i(j,b.props),y.ref=Qc(x,j,b),y.return=x,x=y;break e}r(x,j);break}else t(x,j);j=j.sibling}b.type===Bs?(y=Lo(b.props.children,x.mode,_,b.key),y.return=x,x=y):(_=Fh(b.type,b.key,b.props,null,x.mode,_),_.ref=Qc(x,y,b),_.return=x,x=_)}return o(x);case Fs:e:{for(j=b.key;y!==null;){if(y.key===j)if(y.tag===4&&y.stateNode.containerInfo===b.containerInfo&&y.stateNode.implementation===b.implementation){r(x,y.sibling),y=i(y,b.children||[]),y.return=x,x=y;break e}else{r(x,y);break}else t(x,y);y=y.sibling}y=oy(b,x.mode,_),y.return=x,x=y}return o(x);case pa:return j=b._init,v(x,y,j(b._payload),_)}if(gu(b))return g(x,y,b,_);if(Vc(b))return m(x,y,b,_);Gf(x,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,y!==null&&y.tag===6?(r(x,y.sibling),y=i(y,b),y.return=x,x=y):(r(x,y),y=ay(b,x.mode,_),y.return=x,x=y),o(x)):r(x,y)}return v}var Cl=nT(!0),iT=nT(!1),lp=Ga(null),cp=null,Gs=null,Qw=null;function Jw(){Qw=Gs=cp=null}function Zw(e){var t=lp.current;rt(lp),e._currentValue=t}function zx(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 sl(e,t){cp=e,Qw=Gs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(mr=!0),e.firstContext=null)}function cn(e){var t=e._currentValue;if(Qw!==e)if(e={context:e,memoizedValue:t,next:null},Gs===null){if(cp===null)throw Error(V(308));Gs=e,cp.dependencies={lanes:0,firstContext:e}}else Gs=Gs.next=e;return t}var jo=null;function e1(e){jo===null?jo=[e]:jo.push(e)}function aT(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,e1(t)):(r.next=i.next,i.next=r),t.interleaved=r,Hi(e,n)}function Hi(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 ma=!1;function t1(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function oT(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 Di(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ia(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,ke&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,Hi(e,r)}return i=n.interleaved,i===null?(t.next=t,e1(n)):(t.next=i.next,i.next=t),n.interleaved=t,Hi(e,r)}function $h(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,Bw(e,r)}}function $j(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 up(e,t,r,n){var i=e.updateQueue;ma=!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 d=e.alternate;d!==null&&(d=d.updateQueue,s=d.lastBaseUpdate,s!==o&&(s===null?d.firstBaseUpdate=u:s.next=u,d.lastBaseUpdate=l))}if(a!==null){var f=i.baseState;o=0,d=u=l=null,s=a;do{var h=s.lane,p=s.eventTime;if((n&h)===h){d!==null&&(d=d.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var g=e,m=s;switch(h=t,p=r,m.tag){case 1:if(g=m.payload,typeof g=="function"){f=g.call(p,f,h);break e}f=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=m.payload,h=typeof g=="function"?g.call(p,f,h):g,h==null)break e;f=ft({},f,h);break e;case 2:ma=!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},d===null?(u=d=p,l=f):d=d.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(d===null&&(l=f),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=d,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);Ho|=o,e.lanes=o,e.memoizedState=f}}function Rj(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(V(191,i));i.call(n)}}}var cf={},si=Ga(cf),Ju=Ga(cf),Zu=Ga(cf);function Oo(e){if(e===cf)throw Error(V(174));return e}function r1(e,t){switch(Ye(Zu,t),Ye(Ju,e),Ye(si,cf),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:_x(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=_x(t,e)}rt(si),Ye(si,t)}function Tl(){rt(si),rt(Ju),rt(Zu)}function sT(e){Oo(Zu.current);var t=Oo(si.current),r=_x(t,e.type);t!==r&&(Ye(Ju,e),Ye(si,r))}function n1(e){Ju.current===e&&(rt(si),rt(Ju))}var lt=Ga(0);function dp(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 Zv=[];function i1(){for(var e=0;e<Zv.length;e++)Zv[e]._workInProgressVersionPrimary=null;Zv.length=0}var Rh=Qi.ReactCurrentDispatcher,ey=Qi.ReactCurrentBatchConfig,zo=0,dt=null,Et=null,Rt=null,fp=!1,Nu=!1,ed=0,QF=0;function Kt(){throw Error(V(321))}function a1(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Ln(e[r],t[r]))return!1;return!0}function o1(e,t,r,n,i,a){if(zo=a,dt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Rh.current=e===null||e.memoizedState===null?tB:rB,e=r(n,i),Nu){a=0;
vendor: 6,592 bytes, line 38
38do{if(Nu=!1,ed=0,25<=a)throw Error(V(301));a+=1,Rt=Et=null,t.updateQueue=null,Rh.current=nB,e=r(n,i)}while(Nu)}if(Rh.current=hp,t=Et!==null&&Et.next!==null,zo=0,Rt=Et=dt=null,fp=!1,t)throw Error(V(300));return e}function s1(){var e=ed!==0;return ed=0,e}function Qn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Rt===null?dt.memoizedState=Rt=e:Rt=Rt.next=e,Rt}function un(){if(Et===null){var e=dt.alternate;e=e!==null?e.memoizedState:null}else e=Et.next;var t=Rt===null?dt.memoizedState:Rt.next;if(t!==null)Rt=t,Et=e;else{if(e===null)throw Error(V(310));Et=e,e={memoizedState:Et.memoizedState,baseState:Et.baseState,baseQueue:Et.baseQueue,queue:Et.queue,next:null},Rt===null?dt.memoizedState=Rt=e:Rt=Rt.next=e}return Rt}function td(e,t){return typeof t=="function"?t(e):t}function ty(e){var t=un(),r=t.queue;if(r===null)throw Error(V(311));r.lastRenderedReducer=e;var n=Et,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 d=u.lane;if((zo&d)===d)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 f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(s=l=f,o=n):l=l.next=f,dt.lanes|=d,Ho|=d}u=u.next}while(u!==null&&u!==a);l===null?o=n:l.next=s,Ln(n,t.memoizedState)||(mr=!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,dt.lanes|=a,Ho|=a,i=i.next;while(i!==e)}else i===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function ry(e){var t=un(),r=t.queue;if(r===null)throw Error(V(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);Ln(a,t.memoizedState)||(mr=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),r.lastRenderedState=a}return[a,n]}function lT(){}function cT(e,t){var r=dt,n=un(),i=t(),a=!Ln(n.memoizedState,i);if(a&&(n.memoizedState=i,mr=!0),n=n.queue,l1(fT.bind(null,r,n,e),[e]),n.getSnapshot!==t||a||Rt!==null&&Rt.memoizedState.tag&1){if(r.flags|=2048,rd(9,dT.bind(null,r,n,i,t),void 0,null),It===null)throw Error(V(349));zo&30||uT(r,t,i)}return i}function uT(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=dt.updateQueue,t===null?(t={lastEffect:null,stores:null},dt.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function dT(e,t,r,n){t.value=r,t.getSnapshot=n,hT(t)&&pT(e)}function fT(e,t,r){return r(function(){hT(t)&&pT(e)})}function hT(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Ln(e,r)}catch{return!0}}function pT(e){var t=Hi(e,1);t!==null&&In(t,e,1,-1)}function Mj(e){var t=Qn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:td,lastRenderedState:e},t.queue=e,e=e.dispatch=eB.bind(null,dt,e),[t.memoizedState,e]}function rd(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=dt.updateQueue,t===null?(t={lastEffect:null,stores:null},dt.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 mT(){return un().memoizedState}function Mh(e,t,r,n){var i=Qn();dt.flags|=e,i.memoizedState=rd(1|t,r,void 0,n===void 0?null:n)}function Km(e,t,r,n){var i=un();n=n===void 0?null:n;var a=void 0;if(Et!==null){var o=Et.memoizedState;if(a=o.destroy,n!==null&&a1(n,o.deps)){i.memoizedState=rd(t,r,a,n);return}}dt.flags|=e,i.memoizedState=rd(1|t,r,a,n)}function Ij(e,t){return Mh(8390656,8,e,t)}function l1(e,t){return Km(2048,8,e,t)}function gT(e,t){return Km(4,2,e,t)}function vT(e,t){return Km(4,4,e,t)}function yT(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 xT(e,t,r){return r=r!=null?r.concat([e]):null,Km(4,4,yT.bind(null,t,e),r)}function c1(){}function bT(e,t){var r=un();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&a1(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function wT(e,t){var r=un();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&a1(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function ST(e,t,r){return zo&21?(Ln(r,t)||(r=NC(),dt.lanes|=r,Ho|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,mr=!0),e.memoizedState=r)}function JF(e,t){var r=Le;Le=r!==0&&4>r?r:4,e(!0);var n=ey.transition;ey.transition={};try{e(!1),t()}finally{Le=r,ey.transition=n}}function _T(){return un().memoizedState}function ZF(e,t,r){var n=La(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},jT(e))OT(t,r);else if(r=aT(e,t,r,n),r!==null){var i=sr();In(r,e,n,i),PT(r,t,n)}}function eB(e,t,r){var n=La(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(jT(e))OT(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,Ln(s,o)){var l=t.interleaved;l===null?(i.next=i,e1(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}r=aT(e,t,i,n),r!==null&&(i=sr(),In(r,e,n,i),PT(r,t,n))}}function jT(e){var t=e.alternate;return e===dt||t!==null&&t===dt}function OT(e,t){Nu=fp=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function PT(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Bw(e,r)}}var hp={readContext:cn,useCallback:Kt,useContext:Kt,useEffect:Kt,useImperativeHandle:Kt,useInsertionEffect:Kt,useLayoutEffect:Kt,useMemo:Kt,useReducer:Kt,useRef:Kt,useState:Kt,useDebugValue:Kt,useDeferredValue:Kt,useTransition:Kt,useMutableSource:Kt,useSyncExternalStore:Kt,useId:Kt,unstable_isNewReconciler:!1},tB={readContext:cn,useCallback:function(e,t){return Qn().memoizedState=[e,t===void 0?null:t],e},useContext:cn,useEffect:Ij,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Mh(4194308,4,yT.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Mh(4194308,4,e,t)},useInsertionEffect:function(e,t){return Mh(4,2,e,t)},useMemo:function(e,t){var r=Qn();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Qn();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=ZF.bind(null,dt,e),[n.memoizedState,e]}
vendor: 7,431 bytes, lines 38-40
38,useRef:function(e){var t=Qn();return e={current:e},t.memoizedState=e},useState:Mj,useDebugValue:c1,useDeferredValue:function(e){return Qn().memoizedState=e},useTransition:function(){var e=Mj(!1),t=e[0];return e=JF.bind(null,e[1]),Qn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=dt,i=Qn();if(it){if(r===void 0)throw Error(V(407));r=r()}else{if(r=t(),It===null)throw Error(V(349));zo&30||uT(n,t,r)}i.memoizedState=r;var a={value:r,getSnapshot:t};return i.queue=a,Ij(fT.bind(null,n,a,e),[e]),n.flags|=2048,rd(9,dT.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=Qn(),t=It.identifierPrefix;if(it){var r=$i,n=Ti;r=(n&~(1<<32-Mn(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=ed++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=QF++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},rB={readContext:cn,useCallback:bT,useContext:cn,useEffect:l1,useImperativeHandle:xT,useInsertionEffect:gT,useLayoutEffect:vT,useMemo:wT,useReducer:ty,useRef:mT,useState:function(){return ty(td)},useDebugValue:c1,useDeferredValue:function(e){var t=un();return ST(t,Et.memoizedState,e)},useTransition:function(){var e=ty(td)[0],t=un().memoizedState;return[e,t]},useMutableSource:lT,useSyncExternalStore:cT,useId:_T,unstable_isNewReconciler:!1},nB={readContext:cn,useCallback:bT,useContext:cn,useEffect:l1,useImperativeHandle:xT,useInsertionEffect:gT,useLayoutEffect:vT,useMemo:wT,useReducer:ry,useRef:mT,useState:function(){return ry(td)},useDebugValue:c1,useDeferredValue:function(e){var t=un();return Et===null?t.memoizedState=e:ST(t,Et.memoizedState,e)},useTransition:function(){var e=ry(td)[0],t=un().memoizedState;return[e,t]},useMutableSource:lT,useSyncExternalStore:cT,useId:_T,unstable_isNewReconciler:!1};function jn(e,t){if(e&&e.defaultProps){t=ft({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Hx(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:ft({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Gm={isMounted:function(e){return(e=e._reactInternals)?cs(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=sr(),i=La(e),a=Di(n,i);a.payload=t,r!=null&&(a.callback=r),t=Ia(e,a,i),t!==null&&(In(t,e,i,n),$h(t,e,i))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=sr(),i=La(e),a=Di(n,i);a.tag=1,a.payload=t,r!=null&&(a.callback=r),t=Ia(e,a,i),t!==null&&(In(t,e,i,n),$h(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=sr(),n=La(e),i=Di(r,n);i.tag=2,t!=null&&(i.callback=t),t=Ia(e,i,n),t!==null&&(In(t,e,n,r),$h(t,e,n))}};function Dj(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?!Gu(r,n)||!Gu(i,a):!0}function NT(e,t,r){var n=!1,i=Ha,a=t.contextType;return typeof a=="object"&&a!==null?a=cn(a):(i=br(t)?Uo:Zt.current,n=t.contextTypes,a=(n=n!=null)?kl(e,i):Ha),t=new t(r,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Gm,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function Lj(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&&Gm.enqueueReplaceState(t,t.state,null)}function qx(e,t,r,n){var i=e.stateNode;i.props=r,i.state=e.memoizedState,i.refs={},t1(e);var a=t.contextType;typeof a=="object"&&a!==null?i.context=cn(a):(a=br(t)?Uo:Zt.current,i.context=kl(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(Hx(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&&Gm.enqueueReplaceState(i,i.state,null),up(e,r,i,n),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function $l(e,t){try{var r="",n=t;do r+=C5(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 ny(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Vx(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var iB=typeof WeakMap=="function"?WeakMap:Map;function ET(e,t,r){r=Di(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){mp||(mp=!0,r0=n),Vx(e,t)},r}function kT(e,t,r){r=Di(-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(){Vx(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){Vx(e,t),typeof n!="function"&&(Da===null?Da=new Set([this]):Da.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),r}function Fj(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new iB;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=yB.bind(null,e,t,r),t.then(e,e))}function Bj(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 Uj(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=Di(-1,1),t.tag=2,Ia(r,t,1))),r.lanes|=1),e)}var aB=Qi.ReactCurrentOwner,mr=!1;function tr(e,t,r,n){t.child=e===null?iT(t,null,r,n):Cl(t,e.child,r,n)}function Wj(e,t,r,n,i){r=r.render;var a=t.ref;return sl(t,i),n=o1(e,t,r,n,a,i),r=s1(),e!==null&&!mr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,qi(e,t,i)):(it&&r&&Gw(t),t.flags|=1,tr(e,t,n,i),t.child)}function zj(e,t,r,n,i){if(e===null){var a=r.type;return typeof a=="function"&&!v1(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=a,AT(e,t,a,n,i)):(e=Fh(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:Gu,r(o,n)&&e.ref===t.ref)return qi(e,t,i)}return t.flags|=1,e=Fa(a,n),e.ref=t.ref,e.return=t,t.child=e}function AT(e,t,r,n,i){if(e!==null){var a=e.memoizedProps;if(Gu(a,n)&&e.ref===t.ref)if(mr=!1,t.pendingProps=n=a,(e.lanes&i)!==0)e.flags&131072&&(mr=!0);else return t.lanes=e.lanes,qi(e,t,i)}return Kx(e,t,r,n,i)}function CT(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},Ye(Xs,Ar),Ar|=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,Ye(Xs,Ar),Ar|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=a!==null?a.baseLanes:r,Ye(Xs,Ar),Ar|=n}else a!==null?(n=a.baseLanes|r,t.memoizedState=null):n=r,Ye(Xs,Ar),Ar|=n;return tr(e,t,i,r),t.child}function TT(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}
vendor: 4,711 bytes, line 40
40function Kx(e,t,r,n,i){var a=br(r)?Uo:Zt.current;return a=kl(t,a),sl(t,i),r=o1(e,t,r,n,a,i),n=s1(),e!==null&&!mr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,qi(e,t,i)):(it&&n&&Gw(t),t.flags|=1,tr(e,t,r,i),t.child)}function Hj(e,t,r,n,i){if(br(r)){var a=!0;ap(t)}else a=!1;if(sl(t,i),t.stateNode===null)Ih(e,t),NT(t,r,n),qx(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=cn(u):(u=br(r)?Uo:Zt.current,u=kl(t,u));var d=r.getDerivedStateFromProps,f=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==n||l!==u)&&Lj(t,o,n,u),ma=!1;var h=t.memoizedState;o.state=h,up(t,n,o,i),l=t.memoizedState,s!==n||h!==l||xr.current||ma?(typeof d=="function"&&(Hx(t,r,d,n),l=t.memoizedState),(s=ma||Dj(t,r,s,n,h,l,u))?(f||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,oT(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:jn(t.type,s),o.props=u,f=t.pendingProps,h=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=cn(l):(l=br(r)?Uo:Zt.current,l=kl(t,l));var p=r.getDerivedStateFromProps;(d=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==f||h!==l)&&Lj(t,o,n,l),ma=!1,h=t.memoizedState,o.state=h,up(t,n,o,i);var g=t.memoizedState;s!==f||h!==g||xr.current||ma?(typeof p=="function"&&(Hx(t,r,p,n),g=t.memoizedState),(u=ma||Dj(t,r,u,n,h,g,l)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,g,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,g,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=g),o.props=n,o.state=g,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 Gx(e,t,r,n,a,i)}function Gx(e,t,r,n,i,a){TT(e,t);var o=(t.flags&128)!==0;if(!n&&!o)return i&&kj(t,r,!1),qi(e,t,a);n=t.stateNode,aB.current=t;var s=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&o?(t.child=Cl(t,e.child,null,a),t.child=Cl(t,null,s,a)):tr(e,t,s,a),t.memoizedState=n.state,i&&kj(t,r,!0),t.child}function $T(e){var t=e.stateNode;t.pendingContext?Ej(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ej(e,t.context,!1),r1(e,t.containerInfo)}function qj(e,t,r,n,i){return Al(),Xw(i),t.flags|=256,tr(e,t,r,n),t.child}var Yx={dehydrated:null,treeContext:null,retryLane:0};function Xx(e){return{baseLanes:e,cachePool:null,transitions:null}}function RT(e,t,r){var n=t.pendingProps,i=lt.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),Ye(lt,i&1),e===null)return Wx(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=Qm(o,n,0,null),e=Lo(e,n,r,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Xx(r),t.memoizedState=Yx,e):u1(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return oB(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=Fa(i,l),n.subtreeFlags=i.subtreeFlags&14680064),s!==null?a=Fa(s,a):(a=Lo(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?Xx(r):{base
vendor: 6,197 bytes, line 40
40Lanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~r,t.memoizedState=Yx,n}return a=e.child,e=a.sibling,n=Fa(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 u1(e,t){return t=Qm({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Yf(e,t,r,n){return n!==null&&Xw(n),Cl(t,e.child,null,r),e=u1(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function oB(e,t,r,n,i,a,o){if(r)return t.flags&256?(t.flags&=-257,n=ny(Error(V(422))),Yf(e,t,o,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=n.fallback,i=t.mode,n=Qm({mode:"visible",children:n.children},i,0,null),a=Lo(a,i,o,null),a.flags|=2,n.return=t,a.return=t,n.sibling=a,t.child=n,t.mode&1&&Cl(t,e.child,null,o),t.child.memoizedState=Xx(o),t.memoizedState=Yx,a);if(!(t.mode&1))return Yf(e,t,o,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var s=n.dgst;return n=s,a=Error(V(419)),n=ny(a,n,void 0),Yf(e,t,o,n)}if(s=(o&e.childLanes)!==0,mr||s){if(n=It,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,Hi(e,i),In(n,e,i,-1))}return g1(),n=ny(Error(V(421))),Yf(e,t,o,n)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=xB.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,Lr=Ma(i.nextSibling),Fr=t,it=!0,$n=null,e!==null&&(rn[nn++]=Ti,rn[nn++]=$i,rn[nn++]=Wo,Ti=e.id,$i=e.overflow,Wo=t),t=u1(t,n.children),t.flags|=4096,t)}function Vj(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),zx(e.return,t,r)}function iy(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 MT(e,t,r){var n=t.pendingProps,i=n.revealOrder,a=n.tail;if(tr(e,t,n.children,r),n=lt.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&&Vj(e,r,t);else if(e.tag===19)Vj(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(Ye(lt,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&&dp(e)===null&&(i=r),r=r.sibling;r=i,r===null?(i=t.child,t.child=null):(i=r.sibling,r.sibling=null),iy(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&&dp(e)===null){t.child=i;break}e=i.sibling,i.sibling=r,r=i,i=e}iy(t,!0,r,null,a);break;case"together":iy(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ih(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function qi(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Ho|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(V(153));if(t.child!==null){for(e=t.child,r=Fa(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Fa(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function sB(e,t,r){switch(t.tag){case 3:$T(t),Al();break;case 5:sT(t);break;case 1:br(t.type)&&ap(t);break;case 4:r1(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,i=t.memoizedProps.value;Ye(lp,n._currentValue),n._currentValue=i;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(Ye(lt,lt.current&1),t.flags|=128,null):r&t.child.childLanes?RT(e,t,r):(Ye(lt,lt.current&1),e=qi(e,t,r),e!==null?e.sibling:null);Ye(lt,lt.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return MT(e,t,r);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ye(lt,lt.current),n)break;return null;case 22:case 23:return t.lanes=0,CT(e,t,r)}return qi(e,t,r)}var IT,Qx,DT,LT;IT=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}};Qx=function(){};DT=function(e,t,r,n){var i=e.memoizedProps;if(i!==n){e=t.stateNode,Oo(si.current);var a=null;switch(r){case"input":i=xx(e,i),n=xx(e,n),a=[];break;case"select":i=ft({},i,{value:void 0}),n=ft({},n,{value:void 0}),a=[];break;case"textarea":i=Sx(e,i),n=Sx(e,n),a=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=np)}jx(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"&&(Uu.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"&&(Uu.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&Ze("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)}};LT=function(e,t,r,n){r!==n&&(t.flags|=4)};
vendor: 33,711 bytes, line 40
40function Jc(e,t){if(!it)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 Gt(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 lB(e,t,r){var n=t.pendingProps;switch(Yw(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Gt(t),null;case 1:return br(t.type)&&ip(),Gt(t),null;case 3:return n=t.stateNode,Tl(),rt(xr),rt(Zt),i1(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Kf(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,$n!==null&&(a0($n),$n=null))),Qx(e,t),Gt(t),null;case 5:n1(t);var i=Oo(Zu.current);if(r=t.type,e!==null&&t.stateNode!=null)DT(e,t,r,n,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(V(166));return Gt(t),null}if(e=Oo(si.current),Kf(t)){n=t.stateNode,r=t.type;var a=t.memoizedProps;switch(n[ti]=t,n[Qu]=a,e=(t.mode&1)!==0,r){case"dialog":Ze("cancel",n),Ze("close",n);break;case"iframe":case"object":case"embed":Ze("load",n);break;case"video":case"audio":for(i=0;i<yu.length;i++)Ze(yu[i],n);break;case"source":Ze("error",n);break;case"img":case"image":case"link":Ze("error",n),Ze("load",n);break;case"details":Ze("toggle",n);break;case"input":tj(n,a),Ze("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!a.multiple},Ze("invalid",n);break;case"textarea":nj(n,a),Ze("invalid",n)}jx(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&&Vf(n.textContent,s,e),i=["children",s]):typeof s=="number"&&n.textContent!==""+s&&(a.suppressHydrationWarning!==!0&&Vf(n.textContent,s,e),i=["children",""+s]):Uu.hasOwnProperty(o)&&s!=null&&o==="onScroll"&&Ze("scroll",n)}switch(r){case"input":Lf(n),rj(n,a,!0);break;case"textarea":Lf(n),ij(n);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(n.onclick=np)}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=fC(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[ti]=t,e[Qu]=n,IT(e,t,!1,!1),t.stateNode=e;e:{switch(o=Ox(r,n),r){case"dialog":Ze("cancel",e),Ze("close",e),i=n;break;case"iframe":case"object":case"embed":Ze("load",e),i=n;break;case"video":case"audio":for(i=0;i<yu.length;i++)Ze(yu[i],e);i=n;break;case"source":Ze("error",e),i=n;break;case"img":case"image":case"link":Ze("error",e),Ze("load",e),i=n;break;case"details":Ze("toggle",e),i=n;break;case"input":tj(e,n),i=xx(e,n),Ze("invalid",e);break;case"option":i=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},i=ft({},n,{value:void 0}),Ze("invalid",e);break;case"textarea":nj(e,n),i=Sx(e,n),Ze("invalid",e);break;default:i=n}jx(r,i),s=i;for(a in s)if(s.hasOwnProperty(a)){var l=s[a];a==="style"?mC(e,l):a==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&hC(e,l)):a==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&Wu(e,l):typeof l=="number"&&Wu(e,""+l):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(Uu.hasOwnProperty(a)?l!=null&&a==="onScroll"&&Ze("scroll",e):l!=null&&Rw(e,a,l,o))}switch(r){case"input":Lf(e),rj(e,n,!1);break;case"textarea":Lf(e),ij(e);break;case"option":n.value!=null&&e.setAttribute("value",""+za(n.value));break;case"select":e.multiple=!!n.multiple,a=n.value,a!=null?nl(e,!!n.multiple,a,!1):n.defaultValue!=null&&nl(e,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=np)}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 Gt(t),null;case 6:if(e&&t.stateNode!=null)LT(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(V(166));if(r=Oo(Zu.current),Oo(si.current),Kf(t)){if(n=t.stateNode,r=t.memoizedProps,n[ti]=t,(a=n.nodeValue!==r)&&(e=Fr,e!==null))switch(e.tag){case 3:Vf(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Vf(n.nodeValue,r,(e.mode&1)!==0)}a&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[ti]=t,t.stateNode=n}return Gt(t),null;case 13:if(rt(lt),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(it&&Lr!==null&&t.mode&1&&!(t.flags&128))rT(),Al(),t.flags|=98560,a=!1;else if(a=Kf(t),n!==null&&n.dehydrated!==null){if(e===null){if(!a)throw Error(V(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(V(317));a[ti]=t}else Al(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Gt(t),a=!1}else $n!==null&&(a0($n),$n=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||lt.current&1?At===0&&(At=3):g1())),t.updateQueue!==null&&(t.flags|=4),Gt(t),null);case 4:return Tl(),Qx(e,t),e===null&&Yu(t.stateNode.containerInfo),Gt(t),null;case 10:return Zw(t.type._context),Gt(t),null;case 17:return br(t.type)&&ip(),Gt(t),null;case 19:if(rt(lt),a=t.memoizedState,a===null)return Gt(t),null;if(n=(t.flags&128)!==0,o=a.rendering,o===null)if(n)Jc(a,!1);else{if(At!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=dp(e),o!==null){for(t.flags|=128,Jc(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 Ye(lt,lt.current&1|2),t.child}e=e.sibling}a.tail!==null&&yt()>Rl&&(t.flags|=128,n=!0,Jc(a,!1),t.lanes=4194304)}else{if(!n)if(e=dp(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Jc(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!it)return Gt(t),null}else 2*yt()-a.renderingStartTime>Rl&&r!==1073741824&&(t.flags|=128,n=!0,Jc(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=yt(),t.sibling=null,r=lt.current,Ye(lt,n?r&1|2:r&1),t):(Gt(t),null);case 22:case 23:return m1(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Ar&1073741824&&(Gt(t),t.subtreeFlags&6&&(t.flags|=8192)):Gt(t),null;case 24:return null;case 25:return null}throw Error(V(156,t.tag))}function cB(e,t){switch(Yw(t),t.tag){case 1:return br(t.type)&&ip(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Tl(),rt(xr),rt(Zt),i1(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return n1(t),null;case 13:if(rt(lt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(V(340));Al()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return rt(lt),null;case 4:return Tl(),null;case 10:return Zw(t.type._context),null;case 22:case 23:return m1(),null;case 24:return null;default:return null}}var Xf=!1,Qt=!1,uB=typeof WeakSet=="function"?WeakSet:Set,Z=null;function Ys(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){gt(e,t,n)}else r.current=null}function Jx(e,t,r){try{r()}catch(n){gt(e,t,n)}}var Kj=!1;function dB(e,t){if(Mx=ep,e=zC(),Kw(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,d=0,f=e,h=null;t:for(;;){for(var p;f!==r||i!==0&&f.nodeType!==3||(s=o+i),f!==a||n!==0&&f.nodeType!==3||(l=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(p=f.firstChild)!==null;)h=f,f=p;for(;;){if(f===e)break t;if(h===r&&++u===i&&(s=o),h===a&&++d===n&&(l=o),(p=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=p}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Ix={focusedElem:e,selectionRange:r},ep=!1,Z=t;Z!==null;)if(t=Z,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Z=e;else for(;Z!==null;){t=Z;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var m=g.memoizedProps,v=g.memoizedState,x=t.stateNode,y=x.getSnapshotBeforeUpdate(t.elementType===t.type?m:jn(t.type,m),v);x.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(V(163))}}catch(_){gt(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,Z=e;break}Z=t.return}return g=Kj,Kj=!1,g}function Eu(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&&Jx(t,r,a)}i=i.next}while(i!==n)}}function Ym(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 Zx(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 FT(e){var t=e.alternate;t!==null&&(e.alternate=null,FT(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ti],delete t[Qu],delete t[Fx],delete t[KF],delete t[GF])),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 BT(e){return e.tag===5||e.tag===3||e.tag===4}function Gj(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||BT(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 e0(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=np));else if(n!==4&&(e=e.child,e!==null))for(e0(e,t,r),e=e.sibling;e!==null;)e0(e,t,r),e=e.sibling}function t0(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(t0(e,t,r),e=e.sibling;e!==null;)t0(e,t,r),e=e.sibling}var zt=null,kn=!1;function sa(e,t,r){for(r=r.child;r!==null;)UT(e,t,r),r=r.sibling}function UT(e,t,r){if(oi&&typeof oi.onCommitFiberUnmount=="function")try{oi.onCommitFiberUnmount(Um,r)}catch{}switch(r.tag){case 5:Qt||Ys(r,t);case 6:var n=zt,i=kn;zt=null,sa(e,t,r),zt=n,kn=i,zt!==null&&(kn?(e=zt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):zt.removeChild(r.stateNode));break;case 18:zt!==null&&(kn?(e=zt,r=r.stateNode,e.nodeType===8?Qv(e.parentNode,r):e.nodeType===1&&Qv(e,r),Vu(e)):Qv(zt,r.stateNode));break;case 4:n=zt,i=kn,zt=r.stateNode.containerInfo,kn=!0,sa(e,t,r),zt=n,kn=i;break;case 0:case 11:case 14:case 15:if(!Qt&&(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)&&Jx(r,t,o),i=i.next}while(i!==n)}sa(e,t,r);break;case 1:if(!Qt&&(Ys(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){gt(r,t,s)}sa(e,t,r);break;case 21:sa(e,t,r);break;case 22:r.mode&1?(Qt=(n=Qt)||r.memoizedState!==null,sa(e,t,r),Qt=n):sa(e,t,r);break;default:sa(e,t,r)}}function Yj(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new uB),t.forEach(function(n){var i=bB.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function xn(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:zt=s.stateNode,kn=!1;break e;case 3:zt=s.stateNode.containerInfo,kn=!0;break e;case 4:zt=s.stateNode.containerInfo,kn=!0;break e}s=s.return}if(zt===null)throw Error(V(160));UT(a,o,i),zt=null,kn=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){gt(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)WT(t,e),t=t.sibling}function WT(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(xn(t,e),Xn(e),n&4){try{Eu(3,e,e.return),Ym(3,e)}catch(m){gt(e,e.return,m)}try{Eu(5,e,e.return)}catch(m){gt(e,e.return,m)}}break;case 1:xn(t,e),Xn(e),n&512&&r!==null&&Ys(r,r.return);break;case 5:if(xn(t,e),Xn(e),n&512&&r!==null&&Ys(r,r.return),e.flags&32){var i=e.stateNode;try{Wu(i,"")}catch(m){gt(e,e.return,m)}}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&&uC(i,a),Ox(s,o);var u=Ox(s,a);for(o=0;o<l.length;o+=2){var d=l[o],f=l[o+1];d==="style"?mC(i,f):d==="dangerouslySetInnerHTML"?hC(i,f):d==="children"?Wu(i,f):Rw(i,d,f,u)}switch(s){case"input":bx(i,a);break;case"textarea":dC(i,a);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var p=a.value;p!=null?nl(i,!!a.multiple,p,!1):h!==!!a.multiple&&(a.defaultValue!=null?nl(i,!!a.multiple,a.defaultValue,!0):nl(i,!!a.multiple,a.multiple?[]:"",!1))}i[Qu]=a}catch(m){gt(e,e.return,m)}}break;case 6:if(xn(t,e),Xn(e),n&4){if(e.stateNode===null)throw Error(V(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(m){gt(e,e.return,m)}}break;case 3:if(xn(t,e),Xn(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Vu(t.containerInfo)}catch(m){gt(e,e.return,m)}break;case 4:xn(t,e),Xn(e);break;case 13:xn(t,e),Xn(e),i=e.child,i.flags&8192&&(a=i.memoizedState!==null,i.stateNode.isHidden=a,!a||i.alternate!==null&&i.alternate.memoizedState!==null||(h1=yt())),n&4&&Yj(e);break;case 22:if(d=r!==null&&r.memoizedState!==null,e.mode&1?(Qt=(u=Qt)||d,xn(t,e),Qt=u):xn(t,e),Xn(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(Z=e,d=e.child;d!==null;){for(f=Z=d;Z!==null;){switch(h=Z,p=h.child,h.tag){case 0:case 11:case 14:case 15:Eu(4,h,h.return);break;case 1:Ys(h,h.return);var g=h.stateNode;if(typeof g.componentWillUnmount=="function"){n=h,r=h.return;try{t=n,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(m){gt(n,r,m)}}break;case 5:Ys(h,h.return);break;case 22:if(h.memoizedState!==null){Qj(f);continue}}p!==null?(p.return=h,Z=p):Qj(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{i=f.stateNode,u?(a=i.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(s=f.stateNode,l=f.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,s.style.display=pC("display",o))}catch(m){gt(e,e.return,m)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(m){gt(e,e.return,m)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:xn(t,e),Xn(e),n&4&&Yj(e);break;case 21:break;default:xn(t,e),Xn(e)}}function Xn(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(BT(r)){var n=r;break e}r=r.return}throw Error(V(160))}switch(n.tag){case 5:var i=n.stateNode;n.flags&32&&(Wu(i,""),n.flags&=-33);var a=Gj(e);t0(e,a,i);break;case 3:case 4:var o=n.stateNode.containerInfo,s=Gj(e);e0(e,s,o);break;default:throw Error(V(161))}}catch(l){gt(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function fB(e,t,r){Z=e,zT(e)}function zT(e,t,r){for(var n=(e.mode&1)!==0;Z!==null;){var i=Z,a=i.child;if(i.tag===22&&n){var o=i.memoizedState!==null||Xf;if(!o){var s=i.alternate,l=s!==null&&s.memoizedState!==null||Qt;s=Xf;var u=Qt;if(Xf=o,(Qt=l)&&!u)for(Z=i;Z!==null;)o=Z,l=o.child,o.tag===22&&o.memoizedState!==null?Jj(i):l!==null?(l.return=o,Z=l):Jj(i);for(;a!==null;)Z=a,zT(a),a=a.sibling;Z=i,Xf=s,Qt=u}Xj(e)}else i.subtreeFlags&8772&&a!==null?(a.return=i,Z=a):Xj(e)}}function Xj(e){for(;Z!==null;){var t=Z;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Qt||Ym(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!Qt)if(r===null)n.componentDidMount();else{var i=t.elementType===t.type?r.memoizedProps:jn(t.type,r.memoizedProps);n.componentDidUpdate(i,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&Rj(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}Rj(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 d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&Vu(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(V(163))}Qt||t.flags&512&&Zx(t)}catch(h){gt(t,t.return,h)}}if(t===e){Z=null;break}if(r=t.sibling,r!==null){r.return=t.return,Z=r;break}Z=t.return}}function Qj(e){for(;Z!==null;){var t=Z;if(t===e){Z=null;break}var r=t.sibling;if(r!==null){r.return=t.return,Z=r;break}Z=t.return}}function Jj(e){for(;Z!==null;){var t=Z;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Ym(4,t)}catch(l){gt(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var i=t.return;try{n.componentDidMount()}catch(l){gt(t,i,l)}}var a=t.return;try{Zx(t)}catch(l){gt(t,a,l)}break;case 5:var o=t.return;try{Zx(t)}catch(l){gt(t,o,l)}}}catch(l){gt(t,t.return,l)}if(t===e){Z=null;break}var s=t.sibling;if(s!==null){s.return=t.return,Z=s;break}Z=t.return}}var hB=Math.ceil,pp=Qi.ReactCurrentDispatcher,d1=Qi.ReactCurrentOwner,ln=Qi.ReactCurrentBatchConfig,ke=0,It=null,_t=null,Ht=0,Ar=0,Xs=Ga(0),At=0,nd=null,Ho=0,Xm=0,f1=0,ku=null,hr=null,h1=0,Rl=1/0,Pi=null,mp=!1,r0=null,Da=null,Qf=!1,Ea=null,gp=0,Au=0,n0=null,Dh=-1,Lh=0;function sr(){return ke&6?yt():Dh!==-1?Dh:Dh=yt()}function La(e){return e.mode&1?ke&2&&Ht!==0?Ht&-Ht:XF.transition!==null?(Lh===0&&(Lh=NC()),Lh):(e=Le,e!==0||(e=window.event,e=e===void 0?16:RC(e.type)),e):1}function In(e,t,r,n){if(50<Au)throw Au=0,n0=null,Error(V(185));of(e,r,n),(!(ke&2)||e!==It)&&(e===It&&(!(ke&2)&&(Xm|=r),At===4&&xa(e,Ht)),wr(e,n),r===1&&ke===0&&!(t.mode&1)&&(Rl=yt()+500,Vm&&Ya()))}function wr(e,t){var r=e.callbackNode;X5(e,t);var n=Zh(e,e===It?Ht:0);if(n===0)r!==null&&sj(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&sj(r),t===1)e.tag===0?YF(Zj.bind(null,e)):ZC(Zj.bind(null,e)),qF(function(){!(ke&6)&&Ya()}),r=null;else{switch(EC(n)){case 1:r=Fw;break;case 4:r=OC;break;case 16:r=Jh;break;case 536870912:r=PC;break;default:r=Jh}r=QT(r,HT.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function HT(e,t){if(Dh=-1,Lh=0,ke&6)throw Error(V(327));var r=e.callbackNode;if(ll()&&e.callbackNode!==r)return null;var n=Zh(e,e===It?Ht:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=vp(e,n);else{t=n;var i=ke;ke|=2;var a=VT();(It!==e||Ht!==t)&&(Pi=null,Rl=yt()+500,Do(e,t));do try{gB();break}catch(s){qT(e,s)}while(!0);Jw(),pp.current=a,ke=i,_t!==null?t=0:(It=null,Ht=0,t=At)}if(t!==0){if(t===2&&(i=Ax(e),i!==0&&(n=i,t=i0(e,i))),t===1)throw r=nd,Do(e,0),xa(e,n),wr(e,yt()),r;if(t===6)xa(e,n);else{if(i=e.current.alternate,!(n&30)&&!pB(i)&&(t=vp(e,n),t===2&&(a=Ax(e),a!==0&&(n=a,t=i0(e,a))),t===1))throw r=nd,Do(e,0),xa(e,n),wr(e,yt()),r;switch(e.finishedWork=i,e.finishedLanes=n,t){case 0:case 1:throw Error(V(345));case 2:po(e,hr,Pi);break;case 3:if(xa(e,n),(n&130023424)===n&&(t=h1+500-yt(),10<t)){if(Zh(e,0)!==0)break;if(i=e.suspendedLanes,(i&n)!==n){sr(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Lx(po.bind(null,e,hr,Pi),t);break}po(e,hr,Pi);break;case 4:if(xa(e,n),(n&4194240)===n)break;for(t=e.eventTimes,i=-1;0<n;){var o=31-Mn(n);a=1<<o,o=t[o],o>i&&(i=o),n&=~a}if(n=i,n=yt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*hB(n/1960))-n,10<n){e.timeoutHandle=Lx(po.bind(null,e,hr,Pi),n);break}po(e,hr,Pi);break;case 5:po(e,hr,Pi);break;default:throw Error(V(329))}}}return wr(e,yt()),e.callbackNode===r?HT.bind(null,e):null}function i0(e,t){var r=ku;return e.current.memoizedState.isDehydrated&&(Do(e,t).flags|=256),e=vp(e,t),e!==2&&(t=hr,hr=r,t!==null&&a0(t)),e}function a0(e){hr===null?hr=e:hr.push.apply(hr,e)}function pB(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(!Ln(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 xa(e,t){for(t&=~f1,t&=~Xm,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Mn(t),n=1<<r;e[r]=-1,t&=~n}}function Zj(e){if(ke&6)throw Error(V(327));ll();var t=Zh(e,0);if(!(t&1))return wr(e,yt()),null;var r=vp(e,t);if(e.tag!==0&&r===2){var n=Ax(e);n!==0&&(t=n,r=i0(e,n))}if(r===1)throw r=nd,Do(e,0),xa(e,t),wr(e,yt()),r;if(r===6)throw Error(V(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,po(e,hr,Pi),wr(e,yt()),null}function p1(e,t){var r=ke;ke|=1;try{return e(t)}finally{ke=r,ke===0&&(Rl=yt()+500,Vm&&Ya())}}function qo(e){Ea!==null&&Ea.tag===0&&!(ke&6)&&ll();var t=ke;ke|=1;var r=ln.transition,n=Le;try{if(ln.transition=null,Le=1,e)return e()}finally{Le=n,ln.transition=r,ke=t,!(ke&6)&&Ya()}}function m1(){Ar=Xs.current,rt(Xs)}function Do(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,HF(r)),_t!==null)for(r=_t.return;r!==null;){var n=r;switch(Yw(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&ip();break;case 3:Tl(),rt(xr),rt(Zt),i1();break;case 5:n1(n);break;case 4:Tl();break;case 13:rt(lt);break;case 19:rt(lt);break;case 10:Zw(n.type._context);break;case 22:case 23:m1()}r=r.return}if(It=e,_t=e=Fa(e.current,null),Ht=Ar=t,At=0,nd=null,f1=Xm=Ho=0,hr=ku=null,jo!==null){for(t=0;t<jo.length;t++)if(r=jo[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}jo=null}return e}function qT(e,t){do{var r=_t;try{if(Jw(),Rh.current=hp,fp){for(var n=dt.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}fp=!1}if(zo=0,Rt=Et=dt=null,Nu=!1,ed=0,d1.current=null,r===null||r.return===null){At=1,nd=t,_t=null;break}e:{var a=e,o=r.return,s=r,l=t;if(t=Ht,s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,d=s,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=Bj(o);if(p!==null){p.flags&=-257,Uj(p,o,s,a,t),p.mode&1&&Fj(a,u,t),t=p,l=u;var g=t.updateQueue;if(g===null){var m=new Set;m.add(l),t.updateQueue=m}else g.add(l);break e}else{if(!(t&1)){Fj(a,u,t),g1();break e}l=Error(V(426))}}else if(it&&s.mode&1){var v=Bj(o);if(v!==null){!(v.flags&65536)&&(v.flags|=256),Uj(v,o,s,a,t),Xw($l(l,s));break e}}a=l=$l(l,s),At!==4&&(At=2),ku===null?ku=[a]:ku.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var x=ET(a,l,t);$j(a,x);break e;case 1:s=l;var y=a.type,b=a.stateNode;if(!(a.flags&128)&&(typeof y.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Da===null||!Da.has(b)))){a.flags|=65536,t&=-t,a.lanes|=t;var _=kT(a,s,t);$j(a,_);break e}}a=a.return}while(a!==null)}GT(r)}catch(S){t=S,_t===r&&r!==null&&(_t=r=r.return);continue}break}while(!0)}function VT(){var e=pp.current;return pp.current=hp,e===null?hp:e}function g1(){(At===0||At===3||At===2)&&(At=4),It===null||!(Ho&268435455)&&!(Xm&268435455)||xa(It,Ht)}function vp(e,t){var r=ke;ke|=2;var n=VT();(It!==e||Ht!==t)&&(Pi=null,Do(e,t));do try{mB();break}catch(i){qT(e,i)}while(!0);if(Jw(),ke=r,pp.current=n,_t!==null)throw Error(V(261));return It=null,Ht=0,At}function mB(){for(;_t!==null;)KT(_t)}function gB(){for(;_t!==null&&!U5();)KT(_t)}function KT(e){var t=XT(e.alternate,e,Ar);e.memoizedProps=e.pendingProps,t===null?GT(e):_t=t,d1.current=null}function GT(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=cB(r,t),r!==null){r.flags&=32767,_t=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{At=6,_t=null;return}}else if(r=lB(r,t,Ar),r!==null){_t=r;return}if(t=t.sibling,t!==null){_t=t;return}_t=t=e}while(t!==null);At===0&&(At=5)}function po(e,t,r){var n=Le,i=ln.transition;try{ln.transition=null,Le=1,vB(e,t,r,n)}finally{ln.transition=i,Le=n}return null}function vB(e,t,r,n){do ll();while(Ea!==null);if(ke&6)throw Error(V(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(V(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(Q5(e,a),e===It&&(_t=It=null,Ht=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Qf||(Qf=!0,QT(Jh,function(){return ll(),null})),a=(r.flags&15990)!==0,r.subtreeFlags&15990||a){a=ln.transition,ln.transition=null;var o=Le;Le=1;var s=ke;ke|=4,d1.current=null,dB(e,r),WT(r,e),DF(Ix),ep=!!Mx,Ix=Mx=null,e.current=r,fB(r),W5(),ke=s,Le=o,ln.transition=a}else e.current=r;if(Qf&&(Qf=!1,Ea=e,gp=i),a=e.pendingLanes,a===0&&(Da=null),q5(r.stateNode),wr(e,yt()),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(mp)throw mp=!1,e=r0,r0=null,e;return gp&1&&e.tag!==0&&ll(),a=e.pendingLanes,a&1?e===n0?Au++:(Au=0,n0=e):Au=0,Ya(),null}function ll(){if(Ea!==null){var e=EC(gp),t=ln.transition,r=Le;try{if(ln.transition=null,Le=16>e?16:e,Ea===null)var n=!1;else{if(e=Ea,Ea=null,gp=0,ke&6)throw Error(V(331));var i=ke;for(ke|=4,Z=e.current;Z!==null;){var a=Z,o=a.child;if(Z.flags&16){var s=a.deletions;if(s!==null){for(var l=0;l<s.length;l++){var u=s[l];for(Z=u;Z!==null;){var d=Z;switch(d.tag){case 0:case 11:case 15:Eu(8,d,a)}var f=d.child;if(f!==null)f.return=d,Z=f;else for(;Z!==null;){d=Z;var h=d.sibling,p=d.return;if(FT(d),d===u){Z=null;break}if(h!==null){h.return=p,Z=h;break}Z=p}}}var g=a.alternate;if(g!==null){var m=g.child;if(m!==null){g.child=null;do{var v=m.sibling;m.sibling=null,m=v}while(m!==null)}}Z=a}}if(a.subtreeFlags&2064&&o!==null)o.return=a,Z=o;else e:for(;Z!==null;){if(a=Z,a.flags&2048)switch(a.tag){case 0:case 11:case 15:Eu(9,a,a.return)}var x=a.sibling;if(x!==null){x.return=a.return,Z=x;break e}Z=a.return}}var y=e.current;for(Z=y;Z!==null;){o=Z;var b=o.child;if(o.subtreeFlags&2064&&b!==null)b.return=o,Z=b;else e:for(o=y;Z!==null;){if(s=Z,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:Ym(9,s)}}catch(S){gt(s,s.return,S)}if(s===o){Z=null;break e}var _=s.sibling;if(_!==null){_.return=s.return,Z=_;break e}Z=s.return}}if(ke=i,Ya(),oi&&typeof oi.onPostCommitFiberRoot=="function")try{oi.onPostCommitFiberRoot(Um,e)}catch{}n=!0}return n}finally{Le=r,ln.transition=t}}return!1}function eO(e,t,r){t=$l(r,t),t=ET(e,t,1),e=Ia(e,t,1),t=sr(),e!==null&&(of(e,1,t),wr(e,t))}function gt(e,t,r){if(e.tag===3)eO(e,e,r);else for(;t!==null;){if(t.tag===3){eO(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Da===null||!Da.has(n))){e=$l(r,e),e=kT(t,e,1),t=Ia(t,e,1),e=sr(),t!==null&&(of(t,1,e),wr(t,e));break}}t=t.return}}function yB(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=sr(),e.pingedLanes|=e.suspendedLanes&r,It===e&&(Ht&r)===r&&(At===4||At===3&&(Ht&130023424)===Ht&&500>yt()-h1?Do(e,0):f1|=r),wr(e,t)}function YT(e,t){t===0&&(e.mode&1?(t=Uf,Uf<<=1,!(Uf&130023424)&&(Uf=4194304)):t=1);var r=sr();e=Hi(e,t),e!==null&&(of(e,t,r),wr(e,r))}function xB(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),YT(e,r)}function bB(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(V(314))}n!==null&&n.delete(t),YT(e,r)}var XT;XT=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||xr.current)mr=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return mr=!1,sB(e,t,r);mr=!!(e.flags&131072)}else mr=!1,it&&t.flags&1048576&&eT(t,sp,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Ih(e,t),e=t.pendingProps;var i=kl(t,Zt.current);sl(t,r),i=o1(null,t,n,e,i,r);var a=s1();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,br(n)?(a=!0,ap(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,t1(t),i.updater=Gm,t.stateNode=i,i._reactInternals=t,qx(t,n,e,r),t=Gx(null,t,n,!0,a,r)):(t.tag=0,it&&a&&Gw(t),tr(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Ih(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=SB(n),e=jn(n,e),i){case 0:t=Kx(null,t,n,e,r);break e;case 1:t=Hj(null,t,n,e,r);break e;case 11:t=Wj(null,t,n,e,r);break e;case 14:t=zj(null,t,n,jn(n.type,e),r);break e}throw Error(V(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:jn(n,i),Kx(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:jn(n,i),Hj(e,t,n,i,r);case 3:e:{if($T(t),e===null)throw Error(V(387));n=t.pendingProps,a=t.memoizedState,i=a.element,oT(e,t),up(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=$l(Error(V(423)),t),t=qj(e,t,n,r,i);break e}else if(n!==i){i=$l(Error(V(424)),t),t=qj(e,t,n,r,i);break e}else for(Lr=Ma(t.stateNode.containerInfo.firstChild),Fr=t,it=!0,$n=null,r=iT(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Al(),n===i){t=qi(e,t,r);break e}tr(e,t,n,r)}t=t.child}return t;case 5:return sT(t),e===null&&Wx(t),n=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,Dx(n,i)?o=null:a!==null&&Dx(n,a)&&(t.flags|=32),TT(e,t),tr(e,t,o,r),t.child;case 6:return e===null&&Wx(t),null;case 13:return RT(e,t,r);case 4:return r1(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Cl(t,null,n,r):tr(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:jn(n,i),Wj(e,t,n,i,r);case 7:return tr(e,t,t.pendingProps,r),t.child;case 8:return tr(e,t,t.pendingProps.children,r),t.child;case 12:return tr(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,Ye(lp,n._currentValue),n._currentValue=o,a!==null)if(Ln(a.value,o)){if(a.children===i.children&&!xr.current){t=qi(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=Di(-1,r&-r),l.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),zx(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(V(341));o.lanes|=r,s=o.alternate,s!==null&&(s.lanes|=r),zx(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}tr(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,sl(t,r),i=cn(i),n=n(i),t.flags|=1,tr(e,t,n,r),t.child;case 14:return n=t.type,i=jn(n,t.pendingProps),i=jn(n.type,i),zj(e,t,n,i,r);case 15:return AT(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:jn(n,i),Ih(e,t),t.tag=1,br(n)?(e=!0,ap(t)):e=!1,sl(t,r),NT(t,n,i),qx(t,n,i,r),Gx(null,t,n,!0,e,r);case 19:return MT(e,t,r);case 22:return CT(e,t,r)}throw Error(V(156,t.tag))};function QT(e,t){return jC(e,t)}function wB(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.t
vendor: 7,566 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 on(e,t,r,n){return new wB(e,t,r,n)}function v1(e){return e=e.prototype,!(!e||!e.isReactComponent)}function SB(e){if(typeof e=="function")return v1(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Iw)return 11;if(e===Dw)return 14}return 2}function Fa(e,t){var r=e.alternate;return r===null?(r=on(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 Fh(e,t,r,n,i,a){var o=2;if(n=e,typeof e=="function")v1(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Bs:return Lo(r.children,i,a,t);case Mw:o=8,i|=8;break;case mx:return e=on(12,r,t,i|2),e.elementType=mx,e.lanes=a,e;case gx:return e=on(13,r,t,i),e.elementType=gx,e.lanes=a,e;case vx:return e=on(19,r,t,i),e.elementType=vx,e.lanes=a,e;case sC:return Qm(r,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case aC:o=10;break e;case oC:o=9;break e;case Iw:o=11;break e;case Dw:o=14;break e;case pa:o=16,n=null;break e}throw Error(V(130,e==null?e:typeof e,""))}return t=on(o,r,t,i),t.elementType=e,t.type=n,t.lanes=a,t}function Lo(e,t,r,n){return e=on(7,e,n,t),e.lanes=r,e}function Qm(e,t,r,n){return e=on(22,e,n,t),e.elementType=sC,e.lanes=r,e.stateNode={isHidden:!1},e}function ay(e,t,r){return e=on(6,e,null,t),e.lanes=r,e}function oy(e,t,r){return t=on(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function _B(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=Bv(0),this.expirationTimes=Bv(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bv(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function y1(e,t,r,n,i,a,o,s,l){return e=new _B(e,t,r,s,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=on(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},t1(a),e}function jB(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Fs,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function JT(e){if(!e)return Ha;e=e._reactInternals;e:{if(cs(e)!==e||e.tag!==1)throw Error(V(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(br(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(V(171))}if(e.tag===1){var r=e.type;if(br(r))return JC(e,r,t)}return t}function ZT(e,t,r,n,i,a,o,s,l){return e=y1(r,n,!0,e,i,a,o,s,l),e.context=JT(null),r=e.current,n=sr(),i=La(r),a=Di(n,i),a.callback=t??null,Ia(r,a,i),e.current.lanes=i,of(e,i,n),wr(e,n),e}function Jm(e,t,r,n){var i=t.current,a=sr(),o=La(i);return r=JT(r),t.context===null?t.context=r:t.pendingContext=r,t=Di(a,o),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=Ia(i,t,o),e!==null&&(In(e,i,o,a),$h(e,i,o)),o}function yp(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 tO(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function x1(e,t){tO(e,t),(e=e.alternate)&&tO(e,t)}function OB(){return null}var e2=typeof reportError=="function"?reportError:function(e){console.error(e)};function b1(e){this._internalRoot=e}Zm.prototype.render=b1.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(V(409));Jm(e,t,null,null)};Zm.prototype.unmount=b1.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;qo(function(){Jm(null,e,null,null)}),t[zi]=null}};function Zm(e){this._internalRoot=e}Zm.prototype.unstable_scheduleHydration=function(e){if(e){var t=CC();e={blockedOn:null,target:e,priority:t};for(var r=0;r<ya.length&&t!==0&&t<ya[r].priority;r++);ya.splice(r,0,e),r===0&&$C(e)}};function w1(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function eg(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function rO(){}function PB(e,t,r,n,i){if(i){if(typeof n=="function"){var a=n;n=function(){var u=yp(o);a.call(u)}}var o=ZT(t,n,e,0,null,!1,!1,"",rO);return e._reactRootContainer=o,e[zi]=o.current,Yu(e.nodeType===8?e.parentNode:e),qo(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof n=="function"){var s=n;n=function(){var u=yp(l);s.call(u)}}var l=y1(e,0,!1,null,null,!1,!1,"",rO);return e._reactRootContainer=l,e[zi]=l.current,Yu(e.nodeType===8?e.parentNode:e),qo(function(){Jm(t,l,r,n)}),l}function tg(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=yp(o);s.call(l)}}Jm(t,o,e,i)}else o=PB(r,t,e,i,n);return yp(o)}kC=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=vu(t.pendingLanes);r!==0&&(Bw(t,r|1),wr(t,yt()),!(ke&6)&&(Rl=yt()+500,Ya()))}break;case 13:qo(function(){var n=Hi(e,1);if(n!==null){var i=sr();In(n,e,1,i)}}),x1(e,1)}};Uw=function(e){if(e.tag===13){var t=Hi(e,134217728);if(t!==null){var r=sr();In(t,e,134217728,r)}x1(e,134217728)}};AC=function(e){if(e.tag===13){var t=La(e),r=Hi(e,t);if(r!==null){var n=sr();In(r,e,t,n)}x1(e,t)}};CC=function(){return Le};TC=function(e,t){var r=Le;try{return Le=e,t()}finally{Le=r}};Nx=function(e,t,r){switch(t){case"input":if(bx(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=qm(n);if(!i)throw Error(V(90));cC(n),bx(n,i)}}}break;case"textarea":dC(e,r);break;case"select":t=r.value,t!=null&&nl(e,!!r.multiple,t,!1)}};yC=p1;xC=qo;var NB={usingClientEntryPoint:!1,Events:[lf,Hs,qm,gC,vC,p1]},Zc={findFiberByHostInstance:_o,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},EB={bundleType:Zc.bundleType,version:Zc.version,rendererPackageName:Zc.rendererPackageName,rendererConfig:Zc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Qi.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=SC(e),e===null?null:e.stateNode},findFiberByHostInstance:Zc.findFiberByHostInstance||OB,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
vendor: 2,411 bytes, line 40
40if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Jf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jf.isDisabled&&Jf.supportsFiber)try{Um=Jf.inject(EB),oi=Jf}catch{}}Hr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=NB;Hr.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!w1(t))throw Error(V(200));return jB(e,t,null,r)};Hr.createRoot=function(e,t){if(!w1(e))throw Error(V(299));var r=!1,n="",i=e2;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=y1(e,1,!1,null,null,r,!1,n,i),e[zi]=t.current,Yu(e.nodeType===8?e.parentNode:e),new b1(t)};Hr.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(V(188)):(e=Object.keys(e).join(","),Error(V(268,e)));return e=SC(t),e=e===null?null:e.stateNode,e};Hr.flushSync=function(e){return qo(e)};Hr.hydrate=function(e,t,r){if(!eg(t))throw Error(V(200));return tg(null,e,t,!0,r)};Hr.hydrateRoot=function(e,t,r){if(!w1(e))throw Error(V(405));var n=r!=null&&r.hydratedSources||null,i=!1,a="",o=e2;if(r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(a=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),t=ZT(t,null,e,1,r??null,i,!1,a,o),e[zi]=t.current,Yu(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 Zm(t)};Hr.render=function(e,t,r){if(!eg(t))throw Error(V(200));return tg(null,e,t,!1,r)};Hr.unmountComponentAtNode=function(e){if(!eg(e))throw Error(V(40));return e._reactRootContainer?(qo(function(){tg(null,null,e,!1,function(){e._reactRootContainer=null,e[zi]=null})}),!0):!1};Hr.unstable_batchedUpdates=p1;Hr.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!eg(r))throw Error(V(200));if(e==null||e._reactInternals===void 0)throw Error(V(38));return tg(e,t,r,!1,n)};Hr.version="18.3.1-next-f1338f8080-20240426";function t2(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t2)}catch(e){console.error(e)}}t2(),tC.exports=Hr;var us=tC.exports;const r2=Ie(us);var n2,nO=us;n2=nO.createRoot,nO.hydrateRoot;
40const kB=1,AB=1e6;let sy=0;function CB(){return sy=(sy+1)%Number.MAX_SAFE_INTEGER,sy.toString()}const ly=new Map,iO=e=>{if(ly.has(e))return;const t=setTimeout(()=>{ly.delete(e),Cu({type:"REMOVE_TOAST",toastId:e})},AB);ly.set(e,t)},TB=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,kB)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?iO(r):e.toasts.forEach(n=>{iO(n.id)}),{...e,toasts:e.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},Bh=[];let Uh={toasts:[]};function Cu(e){Uh=TB(Uh,e),Bh.forEach(t=>{t(Uh)})}function $B({...e}){const t=CB(),r=i=>Cu({type:"UPDATE_TOAST",toast:{...i,id:t}}),n=()=>Cu({type:"DISMISS_TOAST",toastId:t});return Cu({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:i=>{i||n()}}}),{id:t,dismiss:n,update:r}}function Vr(){const[e,t]=w.useState(Uh);return w.useEffect(()=>(Bh.push(t),()=>{const r=Bh.indexOf(t);r>-1&&Bh.splice(r,1)}),[e]),{...e,toast:$B,dismiss:r=>Cu({type:"DISMISS_TOAST",toastId:r})}}function oe(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function aO(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function i2(...e){return t=>{let r=!1;const n=e.map(i=>{const a=aO(i,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let i=0;i<n.length;i++){const a=n[i];typeof a=="function"?a():aO(e[i],null)}}}}function Oe(...e){return w.useCallback(i2(...e),e)}function RB(e,t){const r=w.createContext(t),n=a=>{const{children:o,...s}=a,l=w.useMemo(()=>s,Object.values(s));return c.jsx(r.Provider,{value:l,children:o})};n.displayName=e+"Provider";function i(a){const o=w.useContext(r);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,i]}function fn(e,t=[]){let r=[];function n(a,o){const s=w.createContext(o),l=r.length;r=[...r,o];const u=f=>{var x;const{scope:h,children:p,...g}=f,m=((x=h==null?void 0:h[e])==null?void 0:x[l])||s,v=w.useMemo(()=>g,Object.values(g));return c.jsx(m.Provider,{value:v,children:p})};u.displayName=a+"Provider";function d(f,h){var m;const p=((m=h==null?void 0:h[e])==null?void 0:m[l])||s,g=w.useContext(p);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[u,d]}const i=()=>{const a=r.map(o=>w.createContext(o));return function(s){const l=(s==null?void 0:s[e])||a;return w.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[n,MB(i,...t)]}function MB(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=n.reduce((s,{useScope:l,scopeName:u})=>{const f=l(a)[`__scope${u}`];return{...s,...f}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}function Vo(e){const t=DB(e),r=w.forwardRef((n,i)=>{const{children:a,...o}=n,s=w.Children.toArray(a),l=s.find(FB);if(l){const u=l.props.children,d=s.map(f=>f===l?w.Children.count(u)>1?w.Children.only(null):w.isValidElement(u)?u.props.children:null:f);return c.jsx(t,{...o,ref:i,children:w.isValidElement(u)?w.cloneElement(u,void 0,d):null})}return c.jsx(t,{...o,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}var IB=Vo("Slot");function DB(e){const t=w.forwardRef((r,n)=>{const{children:i,...a}=r;if(w.isValidElement(i)){const o=UB(i),s=BB(a,i.props);return i.type!==w.Fragment&&(s.ref=n?i2(n,o):o),w.cloneElement(i,s)}return w.Children.count(i)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var a2=Symbol("radix.slottable");function LB(e){const t=({children:r})=>c.jsx(c.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=a2,t}function FB(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===a2}function BB(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...s)=>{const l=a(...s);return i(...s),l}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}
vendor: 9,308 bytes, line 40
40:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function UB(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function rg(e){const t=e+"CollectionProvider",[r,n]=fn(t),[i,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),o=m=>{const{scope:v,children:x}=m,y=k.useRef(null),b=k.useRef(new Map).current;return c.jsx(i,{scope:v,itemMap:b,collectionRef:y,children:x})};o.displayName=t;const s=e+"CollectionSlot",l=Vo(s),u=k.forwardRef((m,v)=>{const{scope:x,children:y}=m,b=a(s,x),_=Oe(v,b.collectionRef);return c.jsx(l,{ref:_,children:y})});u.displayName=s;const d=e+"CollectionItemSlot",f="data-radix-collection-item",h=Vo(d),p=k.forwardRef((m,v)=>{const{scope:x,children:y,...b}=m,_=k.useRef(null),S=Oe(v,_),j=a(d,x);return k.useEffect(()=>(j.itemMap.set(_,{ref:_,...b}),()=>void j.itemMap.delete(_))),c.jsx(h,{[f]:"",ref:S,children:y})});p.displayName=d;function g(m){const v=a(e+"CollectionConsumer",m);return k.useCallback(()=>{const y=v.collectionRef.current;if(!y)return[];const b=Array.from(y.querySelectorAll(`[${f}]`));return Array.from(v.itemMap.values()).sort((j,O)=>b.indexOf(j.ref.current)-b.indexOf(O.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:o,Slot:u,ItemSlot:p},g,n]}var WB=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ce=WB.reduce((e,t)=>{const r=Vo(`Primitive.${t}`),n=w.forwardRef((i,a)=>{const{asChild:o,...s}=i,l=o?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(l,{...s,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function o2(e,t){e&&us.flushSync(()=>e.dispatchEvent(t))}function Fn(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function zB(e,t=globalThis==null?void 0:globalThis.document){const r=Fn(e);w.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var HB="DismissableLayer",o0="dismissableLayer.update",qB="dismissableLayer.pointerDownOutside",VB="dismissableLayer.focusOutside",oO,s2=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),wc=w.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...l}=e,u=w.useContext(s2),[d,f]=w.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=w.useState({}),g=Oe(t,O=>f(O)),m=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=m.indexOf(v),y=d?m.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,_=y>=x,S=GB(O=>{const P=O.target,N=[...u.branches].some(A=>A.contains(P));!_||N||(i==null||i(O),o==null||o(O),O.defaultPrevented||s==null||s())},h),j=YB(O=>{const P=O.target;[...u.branches].some(A=>A.contains(P))||(a==null||a(O),o==null||o(O),O.defaultPrevented||s==null||s())},h);return zB(O=>{y===u.layers.size-1&&(n==null||n(O),!O.defaultPrevented&&s&&(O.preventDefault(),s()))},h),w.useEffect(()=>{if(d)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(oO=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),sO(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=oO)}},[d,h,r,u]),w.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),sO())},[d,u]),w.useEffect(()=>{const O=()=>p({});return document.addEventListener(o0,O),()=>document.removeEventListener(o0,O)},[]),c.jsx(ce.div,{...l,ref:g,style:{pointerEvents:b?_?"auto":"none":void 0,...e.style},onFocusCapture:oe(e.onFocusCapture,j.onFocusCapture),onBlurCapture:oe(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:oe(e.onPointerDownCapture,S.onPointerDownCapture)})});wc.displayName=HB;var KB="DismissableLayerBranch",l2=w.forwardRef((e,t)=>{const r=w.useContext(s2),n=w.useRef(null),i=Oe(t,n);return w.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),c.jsx(ce.div,{...e,ref:i})});l2.displayName=KB;function GB(e,t=globalThis==null?void 0:globalThis.document){const r=Fn(e),n=w.useRef(!1),i=w.useRef(()=>{});return w.useEffect(()=>{const a=s=>{if(s.target&&!n.current){let l=function(){c2(qB,r,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function YB(e,t=globalThis==null?void 0:globalThis.document){const r=Fn(e),n=w.useRef(!1);return w.useEffect(()=>{const i=a=>{a.target&&!n.current&&c2(VB,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function sO(){const e=new CustomEvent(o0);document.dispatchEvent(e)}function c2(e,t,r,{discrete:n}){const i=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?o2(i,a):i.dispatchEvent(a)}var XB=wc,QB=l2,Lt=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},JB="Portal",uf=w.forwardRef((e,t)=>{var s;const{container:r,...n}=e,[i,a]=w.useState(!1);Lt(()=>a(!0),[]);const o=r||i&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return o?r2.createPortal(c.jsx(ce.div,{...n,ref:t}),o):null});uf.displayName=JB;function ZB(e,t){return w.useReducer((r,n)=>t[r][n]??r,e)}var vi=e=>{const{present:t,children:r}=e,n=e6(t),i=typeof r=="function"?r({present:n.isPresent}):w.Children.only(r),a=Oe(n.ref,t6(i));return typeof r=="function"||n.isPresent?w.cloneElement(i,{ref:a}):null};vi.displayName="Presence";function e6(e){const[t,r]=w.useState(),n=w.useRef(null),i=w.useRef(e),a=w.useRef("none"),o=e?"mounted":"unmounted",[s,l]=ZB(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const u=Zf(n.current);a.current=s==="mounted"?u:"none"},[s]),Lt(()=>{const u=n.current,d=i.current;if(d!==e){const h=a.current,p=Zf(u);e?l("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&h!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Lt(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=p=>{const m=Zf(n.current).includes(p.animationName);if(p.target===t&&m&&(l("ANIMATION_END"),!i.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=p=>{p.target===t&&(a.current=Zf(n.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:w.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function Zf(e){return(e==null?void 0:e.animationName)||"none"}function t6(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var r6=Cw[" useInsertionEffect ".trim().toString()]||Lt;function fi({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,a,o]=n6({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:i;{const d=w.useRef(e!==void 0);w.useEffect(()=>{const f=d.current;f!==s&&console.warn(`${n} is changing from ${f?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=s},[s,n])}const u=w.useCallback(d=>{var f;if(s){const h=i6(d)?d(e):d;h!==e&&((f=o.current)==null||f.call(o,h))}else a(d)},[s,e,a,o]);return[l,u]}function n6({defaultProp:e,onChange:t}){const[r,n]=w.useState(e),i=w.useRef(r),a=w.useRef(t);return r6(()=>{a.current=t},[t]),w.useEffect(()=>{var o;i.current!==r&&((o=a.current)==null||o.call(a,r),i.current=r)},[r,i]),[r,n,a]}function i6(e){return typeof e=="function"}var u2=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),a6="VisuallyHidden",ng=w.forwardRef((e,t)=>
40c.jsx(ce.span,{...e,ref:t,style:{...u2,...e.style}}));ng.displayName=a6;var o6=ng,S1="ToastProvider",[_1,s6,l6]=rg("Toast"),[d2,Kje]=fn("Toast",[l6]),[c6,ig]=d2(S1),f2=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:i="right",swipeThreshold:a=50,children:o}=e,[s,l]=w.useState(null),[u,d]=w.useState(0),f=w.useRef(!1),h=w.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${S1}\`. Expected non-empty \`string\`.`),c.jsx(_1.Provider,{scope:t,children:c.jsx(c6,{scope:t,label:r,duration:n,swipeDirection:i,swipeThreshold:a,toastCount:u,viewport:s,onViewportChange:l,onToastAdd:w.useCallback(()=>d(p=>p+1),[]),onToastRemove:w.useCallback(()=>d(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:h,children:o})})};f2.displayName=S1;var h2="ToastViewport",u6=["F8"],s0="toast.viewportPause",l0="toast.viewportResume",p2=w.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=u6,label:i="Notifications ({hotkey})",...a}=e,o=ig(h2,r),s=s6(r),l=w.useRef(null),u=w.useRef(null),d=w.useRef(null),f=w.useRef(null),h=Oe(t,f,o.onViewportChange),p=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),g=o.toastCount>0;w.useEffect(()=>{const v=x=>{var b;n.length!==0&&n.every(_=>x[_]||x.code===_)&&((b=f.current)==null||b.focus())};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[n]),w.useEffect(()=>{const v=l.current,x=f.current;if(g&&v&&x){const y=()=>{if(!o.isClosePausedRef.current){const j=new CustomEvent(s0);x.dispatchEvent(j),o.isClosePausedRef.current=!0}},b=()=>{if(o.isClosePausedRef.current){const j=new CustomEvent(l0);x.dispatchEvent(j),o.isClosePausedRef.current=!1}},_=j=>{!v.contains(j.relatedTarget)&&b()},S=()=>{v.contains(document.activeElement)||b()};return v.addEventListener("focusin",y),v.addEventListener("focusout",_),v.addEventListener("pointermove",y),v.addEventListener("pointerleave",S),window.addEventListener("blur",y),window.addEventListener("focus",b),()=>{v.removeEventListener("focusin",y),v.removeEventListener("focusout",_),v.removeEventListener("pointermove",y),v.removeEventListener("pointerleave",S),window.removeEventListener("blur",y),window.removeEventListener("focus",b)}}},[g,o.isClosePausedRef]);const m=w.useCallback(({tabbingDirection:v})=>{const y=s().map(b=>{const _=b.ref.current,S=[_,..._6(_)];return v==="forwards"?S:S.reverse()});return(v==="forwards"?y.reverse():y).flat()},[s]);return w.useEffect(()=>{const v=f.current;if(v){const x=y=>{var S,j,O;const b=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!b){const P=document.activeElement,N=y.shiftKey;if(y.target===v&&N){(S=u.current)==null||S.focus();return}const T=m({tabbingDirection:N?"backwards":"forwards"}),L=T.findIndex(R=>R===P);cy(T.slice(L+1))?y.preventDefault():N?(j=u.current)==null||j.focus():(O=d.current)==null||O.focus()}};return v.addEventListener("keydown",x),()=>v.removeEventListener("keydown",x)}},[s,m]),c.jsxs(QB,{ref:l,role:"region","aria-label":i.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:g?void 0:"none"},children:[g&&c.jsx(c0,{ref:u,onFocusFromOutsideViewport:()=>{const v=m({tabbingDirection:"forwards"});cy(v)}}),c.jsx(_1.Slot,{scope:r,children:c.jsx(ce.ol,{tabIndex:-1,...a,ref:h})}),g&&c.jsx(c0,{ref:d,onFocusFromOutsideViewport:()=>{const v=m({tabbingDirection:"backwards"});cy(v)}})]})});p2.displayName=h2;var m2="ToastFocusProxy",c0=w.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...i}=e,a=ig(m2,r);return c.jsx(ng,{"aria-hidden":!0,tabIndex:0,...i,ref:t,style:{position:"fixed"},onFocus:o=>{var u;const s=o.relatedTarget;!((u=a.viewport)!=null&&u.contains(s))&&n()}})});c0.displayName=m2;var df="Toast",d6="toast.swipeStart",f6="toast.swipeMove",h6="toast.swipeCancel",p6="toast.swipeEnd",g2=w.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:i,onOpenChange:a,...o}=e,[s,l]=fi({prop:n,defaultProp:i??!0,onChange:a,caller:df});return c.jsx(vi,{present:r||s,children:c.jsx(v6,{open:s,...o,ref:t,onClose:()=>l(!1),onPause:Fn(e.onPause),onResume:Fn(e.onResume),onSwipeStart:oe(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:oe(e.onSwipeMove,u=>{const{x:d,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:oe(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:oe(e.onSwipeEnd,u=>{const{x:d,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),l(!1)})})})});g2.displayName=df;var[m6,g6]=d2(df,{onClose(){}}),v6=w.forwardRef((e,t)=>
40{const{__scopeToast:r,type:n="foreground",duration:i,open:a,onClose:o,onEscapeKeyDown:s,onPause:l,onResume:u,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:h,onSwipeEnd:p,...g}=e,m=ig(df,r),[v,x]=w.useState(null),y=Oe(t,R=>x(R)),b=w.useRef(null),_=w.useRef(null),S=i||m.duration,j=w.useRef(0),O=w.useRef(S),P=w.useRef(0),{onToastAdd:N,onToastRemove:A}=m,C=Fn(()=>{var I;(v==null?void 0:v.contains(document.activeElement))&&((I=m.viewport)==null||I.focus()),o()}),T=w.useCallback(R=>{!R||R===1/0||(window.clearTimeout(P.current),j.current=new Date().getTime(),P.current=window.setTimeout(C,R))},[C]);w.useEffect(()=>{const R=m.viewport;if(R){const I=()=>{T(O.current),u==null||u()},D=()=>{const $=new Date().getTime()-j.current;O.current=O.current-$,window.clearTimeout(P.current),l==null||l()};return R.addEventListener(s0,D),R.addEventListener(l0,I),()=>{R.removeEventListener(s0,D),R.removeEventListener(l0,I)}}},[m.viewport,S,l,u,T]),w.useEffect(()=>{a&&!m.isClosePausedRef.current&&T(S)},[a,S,m.isClosePausedRef,T]),w.useEffect(()=>(N(),()=>A()),[N,A]);const L=w.useMemo(()=>v?_2(v):null,[v]);return m.viewport?c.jsxs(c.Fragment,{children:[L&&c.jsx(y6,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:L}),c.jsx(m6,{scope:r,onClose:C,children:us.createPortal(c.jsx(_1.ItemSlot,{scope:r,children:c.jsx(XB,{asChild:!0,onEscapeKeyDown:oe(s,()=>{m.isFocusedToastEscapeKeyDownRef.current||C(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:c.jsx(ce.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":m.swipeDirection,...g,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:oe(e.onKeyDown,R=>{R.key==="Escape"&&(s==null||s(R.nativeEvent),R.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,C()))}),onPointerDown:oe(e.onPointerDown,R=>{R.button===0&&(b.current={x:R.clientX,y:R.clientY})}),onPointerMove:oe(e.onPointerMove,R=>{if(!b.current)return;const I=R.clientX-b.current.x,D=R.clientY-b.current.y,$=!!_.current,E=["left","right"].includes(m.swipeDirection),M=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,F=E?M(0,I):0,H=E?0:M(0,D),U=R.pointerType==="touch"?10:2,K={x:F,y:H},J={originalEvent:R,delta:K};$?(_.current=K,eh(f6,f,J,{discrete:!1})):lO(K,m.swipeDirection,U)?(_.current=K,eh(d6,d,J,{discrete:!1}),R.target.setPointerCapture(R.pointerId)):(Math.abs(I)>U||Math.abs(D)>U)&&(b.current=null)}),onPointerUp:oe(e.onPointerUp,R=>{const I=_.current,D=R.target;if(D.hasPointerCapture(R.pointerId)&&D.releasePointerCapture(R.pointerId),_.current=null,b.current=null,I){const $=R.currentTarget,E={originalEvent:R,delta:I};lO(I,m.swipeDirection,m.swipeThreshold)?eh(p6,p,E,{discrete:!0}):eh(h6,h,E,{discrete:!0}),$.addEventListener("click",M=>M.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),y6=e=>{const{__scopeToast:t,children:r,...n}=e,i=ig(df,t),[a,o]=w.useState(!1),[s,l]=w.useState(!1);return w6(()=>o(!0)),w.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),s?null:c.jsx(uf,{asChild:!0,children:c.jsx(ng,{...n,children:a&&c.jsxs(c.Fragment,{children:[i.label," ",r]})})})},x6="ToastTitle",v2=w.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return c.jsx(ce.div,{...n,ref:t})});v2.displayName=x6;var b6="ToastDescription",y2=w.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return c.jsx(ce.div,{...n,ref:t})});y2.displayName=b6;var x2="ToastAction",b2=w.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?c.jsx(S2,{altText:r,asChild:!0,children:c.jsx(j1,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${x2}\`. Expected non-empty \`string\`.`),null)});b2.displayName=x2;var w2="ToastClose",j1=w.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,i=g6(w2,r);return c.jsx(S2,{asChild:!0,children:c.jsx(ce.button,{type:"button",...n,ref:t,onClick:oe(e.onClick,i.onClose)})})});j1.displayName=w2;var S2=w.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...i}=e;return c.jsx(ce.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...i,ref:t})});function _2(e){const t=[];
vendor: 4,279 bytes, lines 40-65
40return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),S6(n)){const i=n.ariaHidden||n.hidden||n.style.display==="none",a=n.dataset.radixToastAnnounceExclude==="";if(!i)if(a){const o=n.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(..._2(n))}}),t}function eh(e,t,r,{discrete:n}){const i=r.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?o2(i,a):i.dispatchEvent(a)}var lO=(e,t,r=0)=>{const n=Math.abs(e.x),i=Math.abs(e.y),a=n>i;return t==="left"||t==="right"?a&&n>r:!a&&i>r};function w6(e=()=>{}){const t=Fn(e);Lt(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function S6(e){return e.nodeType===e.ELEMENT_NODE}function _6(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function cy(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var j6=f2,j2=p2,O2=g2,P2=v2,N2=y2,E2=b2,k2=j1;function A2(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=A2(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Se(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=A2(e))&&(n&&(n+=" "),n+=t);return n}const cO=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,uO=Se,ff=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return uO(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(u=>{const d=r==null?void 0:r[u],f=a==null?void 0:a[u];if(d===null)return null;const h=cO(d)||cO(f);return i[u][h]}),s=r&&Object.entries(r).reduce((u,d)=>{let[f,h]=d;return h===void 0||(u[f]=h),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,d)=>{let{class:f,className:h,...p}=d;return Object.entries(p).every(g=>{let[m,v]=g;return Array.isArray(v)?v.includes({...a,...s}[m]):{...a,...s}[m]===v})?[...u,f,h]:u},[]);return uO(e,o,l,r==null?void 0:r.class,r==null?void 0:r.className)};/** 41 * @license lucide-react v0.462.0 - ISC 42 * 43 * This source code is licensed under the ISC license. 44 * See the LICENSE file in the root directory of this source tree. 45 */const O6=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),C2=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/** 46 * @license lucide-react v0.462.0 - ISC 47 * 48 * This source code is licensed under the ISC license. 49 * See the LICENSE file in the root directory of this source tree. 50 */var P6={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"};/** 51 * @license lucide-react v0.462.0 - ISC 52 * 53 * This source code is licensed under the ISC license. 54 * See the LICENSE file in the root directory of this source tree. 55 */const N6=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:o,...s},l)=>w.createElement("svg",{ref:l,...P6,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:C2("lucide",i),...s},[...o.map(([u,d])=>w.createElement(u,d)),...Array.isArray(a)?a:[a]]));/** 56 * @license lucide-react v0.462.0 - ISC 57 * 58 * This source code is licensed under the ISC license. 59 * See the LICENSE file in the root directory of this source tree. 60 */const ne=(e,t)=>{const r=w.forwardRef(({className:n,...i},a)=>w.createElement(N6,{ref:a,iconNode:t,className:C2(`lucide-${O6(e)}`,n),...i}));return r.displayName=`${e}`,r};/** 61 * @license lucide-react v0.462.0 - ISC 62 * 63 * This source code is licensed under the ISC license. 64 * See the LICENSE file in the root directory of this source tree. 65 */const dO=ne("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l
65-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** 66 * @license lucide-react v0.462.0 - ISC 67 * 68 * This source code is licensed under the ISC license. 69 * See the LICENSE file in the root directory of this source tree. 70 */const E6=ne("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** 71 * @license lucide-react v0.462.0 - ISC 72 * 73 * This source code is licensed under the ISC license. 74 * See the LICENSE file in the root directory of this source tree. 75 */const T2=ne("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 76 * @license lucide-react v0.462.0 - ISC 77 * 78 * This source code is licensed under the ISC license. 79 * See the LICENSE file in the root directory of this source tree. 80 */const k6=ne("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/** 81 * @license lucide-react v0.462.0 - ISC 82 * 83 * This source code is licensed under the ISC license. 84 * See the LICENSE file in the root directory of this source tree. 85 */const Ml=ne("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/** 86 * @license lucide-react v0.462.0 - ISC 87 * 88 * This source code is licensed under the ISC license. 89 * See the LICENSE file in the root directory of this source tree. 90 */const $2=ne("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/** 91 * @license lucide-react v0.462.0 - ISC 92 * 93 * This source code is licensed under the ISC license. 94 * See the LICENSE file in the root directory of this source tree. 95 */const R2=ne("Calculator",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["line",{x1:"8",x2:"16",y1:"6",y2:"6",key:"x4nwl0"}],["line",{x1:"16",x2:"16",y1:"14",y2:"18",key:"wjye3r"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M8 18h.01",key:"lrp35t"}]]);/** 96 * @license lucide-react v0.462.0 - ISC 97 * 98 * This source code is licensed under the ISC license. 99 * See the LICENSE file in the root directory of this source tree. 100 */const M2=ne("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"}]]);/** 101 * @license lucide-react v0.462.0 - ISC 102 * 103 * This source code is licensed under the ISC license. 104 * See the LICENSE file in the root directory of this source tree. 105 */const A6=ne("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** 106 * @license lucide-react v0.462.0 - ISC 107 * 108 * This source code is licensed under the ISC license. 109 * See the LICENSE file in the root directory of this source tree. 110 */const ag=ne("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 111 * @license lucide-react v0.462.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 O1=ne("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 116 * @license lucide-react v0.462.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 */const C6=ne("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** 121 * @license lucide-react v0.462.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 T6=ne("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 126 * @license lucide-react v0.462.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 $6=ne("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 131 * @license lucide-react v0.462.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 R6=ne("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"}]]);/** 136 * @license lucide-react v0.462.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 gr=ne("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 141 * @license lucide-react v0.462.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 ds=ne("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** 146 * @license lucide-react v0.462.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 u0=ne("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/** 151 * @license lucide-react v0.462.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 I2=ne("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"}]]);/** 156 * @license lucide-react v0.462.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 Il=ne("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"}]]);/** 161 * @license lucide-react v0.462.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 M6=ne("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** 166 * @license lucide-react v0.462.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 P1=ne("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** 171 * @license lucide-react v0.462.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 I6=ne("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]);/** 176 * @license lucide-react v0.462.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 D6=ne("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"}]]);/** 181 * @license lucide-react v0.462.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 L6=ne("Gift",[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]]);/** 186 * @license lucide-react v0.462.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 F6=ne("Headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);/** 191 * @license lucide-react v0.462.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 B6=ne("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/** 196 * @license lucide-react v0.462.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 U6=ne("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** 201 * @license lucide-react v0.462.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 W6=ne("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]]);/** 206 * @license lucide-react v0.462.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 z6=ne("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** 211 * @license lucide-react v0.462.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 D2=ne("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/** 216 * @license lucide-react v0.462.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 lr=ne("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 221 * @license lucide-react v0.462.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 Dl=ne("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"}]]);/** 226 * @license lucide-react v0.462.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 d0=ne("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"}]]);/** 231 * @license lucide-react v0.462.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 hf=ne("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"}]]);/** 236 * @license lucide-react v0.462.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 H6=ne("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** 241 * @license lucide-react v0.462.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 q6=ne("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** 246 * @license lucide-react v0.462.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 Dt=ne("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** 251 * @license lucide-react v0.462.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 L2=ne("Music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);/** 256 * @license lucide-react v0.462.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 V6=ne("Percent",[["line",{x1:"19",x2:"5",y1:"5",y2:"19",key:"1x9vlm"}],["circle",{cx:"6.5",cy:"6.5",r:"2.5",key:"4mh3h7"}],["circle",{cx:"17.5",cy:"17.5",r:"2.5",key:"1mdrzq"}]]);/** 261 * @license lucide-react v0.462.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 id=ne("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** 266 * @license lucide-react v0.462.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 f0=ne("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** 271 * @license lucide-react v0.462.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 h0=ne("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** 276 * @license lucide-react v0.462.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 F2=ne("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/** 281 * @license lucide-react v0.462.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 B2=ne("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 286 * @license lucide-react v0.462.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 K6=ne("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/** 291 * @license lucide-react v0.462.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 pf=ne("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
295y:"oel41y"}]]);/** 296 * @license lucide-react v0.462.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 xp=ne("ShoppingCart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]);/** 301 * @license lucide-react v0.462.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 G6=ne("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** 306 * @license lucide-react v0.462.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 cl=ne("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/** 311 * @license lucide-react v0.462.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 U2=ne("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/** 316 * @license lucide-react v0.462.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 bp=ne("Ticket",[["path",{d:"M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"qn84l0"}],["path",{d:"M13 5v2",key:"dyzc3o"}],["path",{d:"M13 17v2",key:"1ont0d"}],["path",{d:"M13 11v2",key:"1wjjxi"}]]);/** 321 * @license lucide-react v0.462.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 Y6=ne("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** 326 * @license lucide-react v0.462.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 og=ne("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.462.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 X6=ne("Twitter",[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]]);/** 336 * @license lucide-react v0.462.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 fO=ne("UserPlus",[["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"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/** 341 * @license lucide-react v0.462.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 p0=ne("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** 346 * @license lucide-react v0.462.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 ad=ne("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.462.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 Q6=ne("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/** 356 * @license lucide-react v0.462.0 - ISC 357 * 358 * This source code is licensed under the ISC license. 359 * See the LICENSE file in the root directory of this source tree. 360 */const sg=ne("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 12,256 bytes, line 360
360],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),N1="-",J6=e=>{const t=e8(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const s=o.split(N1);return s[0]===""&&s.length!==1&&s.shift(),W2(s,t)||Z6(o)},getConflictingClassGroupIds:(o,s)=>{const l=r[o]||[];return s&&n[o]?[...l,...n[o]]:l}}},W2=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),i=n?W2(e.slice(1),n):void 0;if(i)return i;if(t.validators.length===0)return;const a=e.join(N1);return(o=t.validators.find(({validator:s})=>s(a)))==null?void 0:o.classGroupId},hO=/^\[(.+)\]$/,Z6=e=>{if(hO.test(e)){const t=hO.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},e8=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return r8(Object.entries(e.classGroups),r).forEach(([a,o])=>{m0(o,n,a,t)}),n},m0=(e,t,r,n)=>{e.forEach(i=>{if(typeof i=="string"){const a=i===""?t:pO(t,i);a.classGroupId=r;return}if(typeof i=="function"){if(t8(i)){m0(i(n),t,r,n);return}t.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([a,o])=>{m0(o,pO(t,a),r,n)})})},pO=(e,t)=>{let r=e;return t.split(N1).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},t8=e=>e.isThemeGetter,r8=(e,t)=>t?e.map(([r,n])=>{const i=n.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([o,s])=>[t+o,s])):a);return[r,i]}):e,n8=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const i=(a,o)=>{r.set(a,o),t++,t>e&&(t=0,n=r,r=new Map)};return{get(a){let o=r.get(a);if(o!==void 0)return o;if((o=n.get(a))!==void 0)return i(a,o),o},set(a,o){r.has(a)?r.set(a,o):i(a,o)}}},z2="!",i8=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,i=t[0],a=t.length,o=s=>{const l=[];let u=0,d=0,f;for(let v=0;v<s.length;v++){let x=s[v];if(u===0){if(x===i&&(n||s.slice(v,v+a)===t)){l.push(s.slice(d,v)),d=v+a;continue}if(x==="/"){f=v;continue}}x==="["?u++:x==="]"&&u--}const h=l.length===0?s:s.substring(d),p=h.startsWith(z2),g=p?h.substring(1):h,m=f&&f>d?f-d:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:m}};return r?s=>r({className:s,parseClassName:o}):o},a8=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},o8=e=>({cache:n8(e.cacheSize),parseClassName:i8(e),...J6(e)}),s8=/\s+/,l8=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i}=t,a=[],o=e.trim().split(s8);let s="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:d,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:p}=r(u);let g=!!p,m=n(g?h.substring(0,p):h);if(!m){if(!g){s=u+(s.length>0?" "+s:s);continue}if(m=n(h),!m){s=u+(s.length>0?" "+s:s);continue}g=!1}const v=a8(d).join(":"),x=f?v+z2:v,y=x+m;if(a.includes(y))continue;a.push(y);const b=i(m,g);for(let _=0;_<b.length;++_){const S=b[_];a.push(x+S)}s=u+(s.length>0?" "+s:s)}return s};function c8(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=H2(t))&&(n&&(n+=" "),n+=r);return n}const H2=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=H2(e[n]))&&(r&&(r+=" "),r+=t);return r};function u8(e,...t){let r,n,i,a=o;function o(l){const u=t.reduce((d,f)=>f(d),e());return r=o8(u),n=r.cache.get,i=r.cache.set,a=s,s(l)}function s(l){const u=n(l);if(u)return u;const d=l8(l,r);return i(l,d),d}return function(){return a(c8.apply(null,arguments))}}const Je=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},q2=/^\[(?:([a-z-]+):)?(.+)\]$/i,d8=/^\d+\/\d+$/,f8=new Set(["px","full","screen"]),h8=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,p8=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,m8=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,g8=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,v8=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Si=e=>ul(e)||f8.has(e)||d8.test(e),la=e=>Sc(e,"length",O8),ul=e=>!!e&&!Number.isNaN(Number(e)),uy=e=>Sc(e,"number",ul),eu=e=>!!e&&Number.isInteger(Number(e)),y8=e=>e.endsWith("%")&&ul(e.slice(0,-1)),_e=e=>q2.test(e),ca=e=>h8.test(e),x8=new Set(["length","size","percentage"]),b8=e=>Sc(e,x8,V2),w8=e=>Sc(e,"position",V2),S8=new Set(["image","url"]),_8=e=>Sc(e,S8,N8),j8=e=>Sc(e,"",P8),tu=()=>!0,Sc=(e,t,r)=>{const n=q2.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},O8=e=>p8.test(e)&&!m8.test(e),V2=()=>!1,P8=e=>g8.test(e),N8=e=>v8.test(e),E8=()=>{const e=Je("colors"),t=Je("spacing"),r=Je("blur"),n=Je("brightness"),i=Je("borderColor"),a=Je("borderRadius"),o=Je("borderSpacing"),s=Je("borderWidth"),l=Je("contrast"),u=Je("grayscale"),d=Je("hueRotate"),f=Je("invert"),h=Je("gap"),p=Je("gradientColorStops"),g=Je("gradientColorStopPositions"),m=Je("inset"),v=Je("margin"),x=Je("opacity"),y=Je("padding"),b=Je("saturate"),_=Je("scale"),S=Je("sepia"),j=Je("skew"),O=Je("space"),P=Je("translate"),N=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],C=()=>["auto",_e,t],T=()=>[_e,t],L=()=>["",Si,la],R=()=>["auto",ul,_e],I=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],D=()=>["solid","dashed","dotted","double","none"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],E=()=>["start","end","center","between","around","evenly","stretch"],M=()=>["","0",_e],F=()=>["auto","avoid","all","avoid-page","page","left","right","column"],H=()=>[ul,_e];return{cacheSize:500,separator:":",theme:{colors:[tu],spacing:[Si,la],blur:["none","",ca,_e],brightness:H(),borderColor:[e],borderRadius:["none","","full",ca,_e],borderSpacing:T(),borderWidth:L(),contrast:H(),grayscale:M(),hueRotate:H(),invert:M(),gap:T(),gradientColorStops:[e],gradientColorStopPositions:[y8,la],inset:C(),margin:C(),opacity:H(),padding:T(),saturate:H(),scale:H(),sepia:M(),skew:H(),space:T(),translate:T()},classGroups:{aspect:[{aspect:["auto","square","video",_e]}],container:["container"],columns:[{columns:[ca]}],"break-after":[{"break-after":F()}],"break-before":[{"break-before":F()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...I(),_e]}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",eu,_e]}],basis:[{basis:C()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",_e]}],grow:[{grow:M()}],shrink:[{shrink:M()}],order:[{order:["first","last","none",eu,_e]}],"grid-cols":[{"grid-cols":[tu]}],"col-start-end":[{col:["auto",{span:["full",eu,_e]},_e]}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":[tu]}],"row-start-end":[{row:["auto",{span:[eu,_e]},_e]}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",_e]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",_e]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...E()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...E(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...E(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[O]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[O]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",_e,t]}],"min-w":[{"min-w":[_e,t,"min","max","fit"]}],"max-w":[{"max-w":[_e,t,"none","full","min","max","fit","prose",{screen:[ca]},ca]}],h:[{h:[_e,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[_e,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[_e,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[_e,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ca,la]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",uy]}],"font-family":[{font:[tu]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",_e]}],"line-clamp":[{"line-clamp":["none",ul,uy]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Si,_e]}],"list-image":[{"list-image":["none",_e]}],"list-style-type":[{list:["none","disc","decimal",_e]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Si,la]}],"underline-offset":[{"underline-offset":["auto",Si,_e]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",_e]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",_e]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...I(),w8]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",b8]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},_8]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}
vendor: 5,180 bytes, line 360
360],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...D(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:D()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...D()]}],"outline-offset":[{"outline-offset":[Si,_e]}],"outline-w":[{outline:[Si,la]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[Si,la]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ca,j8]}],"shadow-color":[{shadow:[tu]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...$(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",ca,_e]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[b]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",_e]}],duration:[{duration:H()}],ease:[{ease:["linear","in","out","in-out",_e]}],delay:[{delay:H()}],animate:[{animate:["none","spin","ping","pulse","bounce",_e]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[eu,_e]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[j]}],"skew-y":[{"skew-y":[j]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",_e]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",_e]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}
vendor: 3,855 bytes, line 360
360],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",_e]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Si,la,uy]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},k8=u8(E8);function te(...e){return k8(Se(e))}const A8=j6,K2=w.forwardRef(({className:e,...t},r)=>c.jsx(j2,{ref:r,className:te("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));K2.displayName=j2.displayName;const C8=ff("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),G2=w.forwardRef(({className:e,variant:t,...r},n)=>c.jsx(O2,{ref:n,className:te(C8({variant:t}),e),...r}));
360G2.displayName=O2.displayName;const T8=w.forwardRef(({className:e,...t},r)=>c.jsx(E2,{ref:r,className:te("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));T8.displayName=E2.displayName;const Y2=w.forwardRef(({className:e,...t},r)=>c.jsx(k2,{ref:r,className:te("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:c.jsx(sg,{className:"h-4 w-4"})}));Y2.displayName=k2.displayName;const X2=w.forwardRef(({className:e,...t},r)=>c.jsx(P2,{ref:r,className:te("text-sm font-semibold",e),...t}));X2.displayName=P2.displayName;const Q2=w.forwardRef(({className:e,...t},r)=>c.jsx(N2,{ref:r,className:te("text-sm opacity-90",e),...t}));Q2.displayName=N2.displayName;function $8(){const{toasts:e}=Vr();return c.jsxs(A8,{children:[e.map(function({id:t,title:r,description:n,action:i,...a}){return c.jsxs(G2,{...a,children:[c.jsxs("div",{className:"grid gap-1",children:[r&&c.jsx(X2,{children:r}),n&&c.jsx(Q2,{children:n})]}),i,c.jsx(Y2,{})]},t)}),c.jsx(K2,{})]})}var mO=["light","dark"],R8="(prefers-color-scheme: dark)",M8=w.createContext(void 0),I8={setTheme:e=>{},themes:[]},D8=()=>{var e;return(e=w.useContext(M8))!=null?e:I8};w.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:i,defaultTheme:a,value:o,attrs:s,nonce:l})=>{let u=a==="system",d=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${s.map(g=>`'${g}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,f=i?mO.includes(a)&&a?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${a}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",h=(g,m=!1,v=!0)=>{let x=o?o[g]:g,y=m?g+"|| ''":`'${x}'`,b="";return i&&v&&!m&&mO.includes(g)&&(b+=`d.style.colorScheme = '${g}';`),r==="class"?m||x?b+=`c.add(${y})`:b+="null":x&&(b+=`d[s](n,${y})`),b},p=e?`!function(){${d}${h(e)}}()`:n?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${R8}',m=window.matchMedia(t);if(m.media!==t||m.matches){${h("dark")}}else{${h("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${h(o?"x[e]":"e",!0)}}${u?"":"else{"+h(a,!1,!1)+"}"}${f}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${h(o?"x[e]":"e",!0)}}else{${h(a,!1,!1)};}${f}}catch(t){}}();`;return w.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:p}})});var L8=e=>{switch(e){case"success":return U8;case"info":return z8;case"warning":return W8;case"error":return H8;default:return null}},F8=Array(12).fill(0),B8=({visible:e,className:t})=>k.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},k.createElement("div",{className:"sonner-spinner"},F8.map((r,n)=>k.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),U8=k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},k.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),W8=k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},k.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),z8=k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},k.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),H8=k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},k.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),q8=k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},k.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),k.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),V8=()=>{let[e,t]=k.useState(document.hidden);return k.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},g0=1,K8=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>
vendor: 1,050 bytes, line 360
360{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:r,...n}=e,i=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:g0++,a=this.toasts.find(s=>s.id===i),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),a?this.toasts=this.toasts.map(s=>s.id===i?(this.publish({...s,...e,id:i,title:r}),{...s,...e,id:i,dismissible:o,title:r}):s):this.addToast({title:r,...n,dismissible:o,id:i}),i},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
360this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let n=e instanceof Promise?e:e(),i=r!==void 0,a,o=n.then(async l=>{if(a=["resolve",l],k.isValidElement(l))i=!1,this.create({id:r,type:"default",message:l});else if(Y8(l)&&!l.ok){i=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:r,type:"error",message:u,description:d})}else if(t.success!==void 0){i=!1;let u=typeof t.success=="function"?await t.success(l):t.success,d=typeof t.description=="function"?await t.description(l):t.description;this.create({id:r,type:"success",message:u,description:d})}}).catch(async l=>{if(a=["reject",l],t.error!==void 0){i=!1;let u=typeof t.error=="function"?await t.error(l):t.error,d=typeof t.description=="function"?await t.description(l):t.description;this.create({id:r,type:"error",message:u,description:d})}}).finally(()=>{var l;i&&(this.dismiss(r),r=void 0),(l=t.finally)==null||l.call(t)}),s=()=>new Promise((l,u)=>o.then(()=>a[0]==="reject"?u(a[1]):l(a[1])).catch(u));return typeof r!="string"&&typeof r!="number"?{unwrap:s}:Object.assign(r,{unwrap:s})},this.custom=(e,t)=>{let r=(t==null?void 0:t.id)||g0++;return this.create({jsx:e(r),id:r,...t}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},fr=new K8,G8=(e,t)=>{let r=(t==null?void 0:t.id)||g0++;return fr.addToast({title:e,...t,id:r}),r},Y8=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",X8=G8,Q8=()=>fr.toasts,J8=()=>fr.getActiveToasts();Object.assign(X8,{success:fr.success,info:fr.info,warning:fr.warning,error:fr.error,custom:fr.custom,message:fr.message,promise:fr.promise,dismiss:fr.dismiss,loading:fr.loading},{getHistory:Q8,getToasts:J8});function Z8(e,{insertAt:t}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}Z8(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
360left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
360:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
360--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} 361`);function th(e){return e.label!==void 0}var eU=3,tU="32px",rU="16px",gO=4e3,nU=356,iU=14,aU=20,oU=200;function bn(...e){return e.filter(Boolean).join(" ")}function sU(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}var lU=e=>{var t,r,n,i,a,o,s,l,u,d,f;let{invert:h,toast:p,unstyled:g,interacting:m,setHeights:v,visibleToasts:x,heights:y,index:b,toasts:_,expanded:S,removeToast:j,defaultRichColors:O,closeButton:P,style:N,cancelButtonStyle:A,actionButtonStyle:C,className:T="",descriptionClassName:L="",duration:R,position:I,gap:D,loadingIcon:$,expandByDefault:E,classNames:M,icons:F,closeButtonAriaLabel:H="Close toast",pauseWhenPageIsHidden:U}=e,[K,J]=k.useState(null),[he,Ne]=k.useState(null),[Y,ye]=k.useState(!1),[q,Q]=k.useState(!1),[X,B]=k.useState(!1),[je,ge]=k.useState(!1),[He,Be]=k.useState(!1),[ht,dr]=k.useState(0),[Or,ao]=k.useState(0),Pr=k.useRef(p.duration||R||gO),Yn=k.useRef(null),mn=k.useRef(null),Cf=b===0,Tf=b+1<=x,Yr=p.type,vs=p.dismissible!==!1,X3=p.className||"",Q3=p.descriptionClassName||"",$f=k.useMemo(()=>y.findIndex(be=>be.toastId===p.id)||0,[y,p.id]),J3=k.useMemo(()=>{var be;return(be=p.closeButton)!=null?be:P},[p.closeButton,P]),H_=k.useMemo(()=>p.duration||R||gO,[p.duration,R]),Tv=k.useRef(0),ys=k.useRef(0),q_=k.useRef(0),xs=k.useRef(null),[Z3,e5]=I.split("-"),V_=k.useMemo(()=>y.reduce((be,Ue,nt)=>nt>=$f?be:be+Ue.height,0),[y,$f]),K_=V8(),t5=p.invert||h,$v=Yr==="loading";ys.current=k.useMemo(()=>$f*D+V_,[$f,V_]),k.useEffect(()=>{Pr.current=H_},[H_]),k.useEffect(()=>{ye(!0)},[]),k.useEffect(()=>{let be=mn.current;if(be){let Ue=be.getBoundingClientRect().height;return ao(Ue),v(nt=>[{toastId:p.id,height:Ue,position:p.position},...nt]),()=>v(nt=>nt.filter(gn=>gn.toastId!==p.id))}},[v,p.id]),k.useLayoutEffect(()=>{if(!Y)return;let be=mn.current,Ue=be.style.height;be.style.height="auto";let nt=be.getBoundingClientRect().height;be.style.height=Ue,ao(nt),v(gn=>gn.find(vn=>vn.toastId===p.id)?gn.map(vn=>vn.toastId===p.id?{...vn,height:nt}:vn):[{toastId:p.id,height:nt,position:p.position},...gn])},[Y,p.title,p.description,v,p.id]);let ia=k.useCallback(()=>{Q(!0),dr(ys.current),v(be=>be.filter(Ue=>Ue.toastId!==p.id)),setTimeout(()=>{j(p)},oU)},[p,j,v,ys]);k.useEffect(()=>{if(p.promise&&Yr==="loading"||p.duration===1/0||p.type==="loading")return;let be;return S||m||U&&K_?(()=>{if(q_.current<Tv.current){let Ue=new Date().getTime()-Tv.current;Pr.current=Pr.current-Ue}
361q_.current=new Date().getTime()})():Pr.current!==1/0&&(Tv.current=new Date().getTime(),be=setTimeout(()=>{var Ue;(Ue=p.onAutoClose)==null||Ue.call(p,p),ia()},Pr.current)),()=>clearTimeout(be)},[S,m,p,Yr,U,K_,ia]),k.useEffect(()=>{p.delete&&ia()},[ia,p.delete]);function r5(){var be,Ue,nt;return F!=null&&F.loading?k.createElement("div",{className:bn(M==null?void 0:M.loader,(be=p==null?void 0:p.classNames)==null?void 0:be.loader,"sonner-loader"),"data-visible":Yr==="loading"},F.loading):$?k.createElement("div",{className:bn(M==null?void 0:M.loader,(Ue=p==null?void 0:p.classNames)==null?void 0:Ue.loader,"sonner-loader"),"data-visible":Yr==="loading"},$):k.createElement(B8,{className:bn(M==null?void 0:M.loader,(nt=p==null?void 0:p.classNames)==null?void 0:nt.loader),visible:Yr==="loading"})}return k.createElement("li",{tabIndex:0,ref:mn,className:bn(T,X3,M==null?void 0:M.toast,(t=p==null?void 0:p.classNames)==null?void 0:t.toast,M==null?void 0:M.default,M==null?void 0:M[Yr],(r=p==null?void 0:p.classNames)==null?void 0:r[Yr]),"data-sonner-toast":"","data-rich-colors":(n=p.richColors)!=null?n:O,"data-styled":!(p.jsx||p.unstyled||g),"data-mounted":Y,"data-promise":!!p.promise,"data-swiped":He,"data-removed":q,"data-visible":Tf,"data-y-position":Z3,"data-x-position":e5,"data-index":b,"data-front":Cf,"data-swiping":X,"data-dismissible":vs,"data-type":Yr,"data-invert":t5,"data-swipe-out":je,"data-swipe-direction":he,"data-expanded":!!(S||E&&Y),style:{"--index":b,"--toasts-before":b,"--z-index":_.length-b,"--offset":`${q?ht:ys.current}px`,"--initial-height":E?"auto":`${Or}px`,...N,...p.style},onDragEnd:()=>{B(!1),J(null),xs.current=null},onPointerDown:be=>{$v||!vs||(Yn.current=new Date,dr(ys.current),be.target.setPointerCapture(be.pointerId),be.target.tagName!=="BUTTON"&&(B(!0),xs.current={x:be.clientX,y:be.clientY}))},onPointerUp:()=>{var be,Ue,nt,gn;if(je||!vs)return;xs.current=null;let vn=Number(((be=mn.current)==null?void 0:be.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),aa=Number(((Ue=mn.current)==null?void 0:Ue.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),oo=new Date().getTime()-((nt=Yn.current)==null?void 0:nt.getTime()),yn=K==="x"?vn:aa,oa=Math.abs(yn)/oo;if(Math.abs(yn)>=aU||oa>.11){dr(ys.current),(gn=p.onDismiss)==null||gn.call(p,p),Ne(K==="x"?vn>0?"right":"left":aa>0?"down":"up"),ia(),ge(!0),Be(!1);return}B(!1),J(null)},onPointerMove:be=>{var Ue,nt,gn,vn;if(!xs.current||!vs||((Ue=window.getSelection())==null?void 0:Ue.toString().length)>0)return;let aa=be.clientY-xs.current.y,oo=be.clientX-xs.current.x,yn=(nt=e.swipeDirections)!=null?nt:sU(I);!K&&(Math.abs(oo)>1||Math.abs(aa)>1)&&J(Math.abs(oo)>Math.abs(aa)?"x":"y");let oa={x:0,y:0};K==="y"?(yn.includes("top")||yn.includes("bottom"))&&(yn.includes("top")&&aa<0||yn.includes("bottom")&&aa>0)&&(oa.y=aa):K==="x"&&(yn.includes("left")||yn.includes("right"))&&(yn.includes("left")&&oo<0||yn.includes("right")&&oo>0)&&(oa.x=oo),(Math.abs(oa.x)>0||Math.abs(oa.y)>0)&&Be(!0),(gn=mn.current)==null||gn.style.setProperty("--swipe-amount-x",`${oa.x}px`),(vn=mn.current)==null||vn.style.setProperty("--swipe-amount-y",`${oa.y}px`)}},J3&&!p.jsx?k.createElement("button",{"aria-label":H,"data-disabled":$v,"data-close-button":!0,onClick:$v||!vs?()=>{}:()=>{var be;ia(),(be=p.onDismiss)==null||be.call(p,p)},className:bn(M==null?void 0:M.closeButton,(i=p==null?void 0:p.classNames)==null?void 0:i.closeButton)},(a=F==null?void 0:F.close)!=null?a:q8):null,p.jsx||w.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:k.createElement(k.Fragment,null,Yr||p.icon||p.promise?k.createElement("div",{"data-icon":"",className:bn(M==null?void 0:M.icon,(o=p==null?void 0:p.classNames)==null?void 0:o.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||r5():null,p.type!=="loading"?p.icon||(F==null?void 0:F[Yr])||L8(Yr):null):null,k.createElement("div",{"data-content":"",className:bn(M==null?void 0:M.content,(s=p==null?void 0:p.classNames)==null?void 0:s.content)},k.createElement("div",{"data-title":"",className:bn(M==null?void 0:M.title,(l=p==null?void 0:p.classNames)==null?void 0:l.title)},typeof p.title=="function"?p.title():p.title),p.description?k.createElement("div",{"data-description":"",className:bn(L,Q3,M==null?void 0:M.description,(u=p==null?void 0:p.classNames)==null?void 0:u.description)},typeof p.description=="function"?p.description():p.description):null),w.isValidElement(p.cancel)?p.cancel:p.cancel&&th(p.cancel)?k.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||A,onClick:be=>{var Ue,nt;th(p.cancel)&&vs&&((nt=(Ue=p.cancel).onClick)==null||nt.call(Ue,be),ia())},className:bn(M==null?void 0:M.cancelButton,(d=p==null?void 0:p.classNames)==null?void 0:d.cancelButton)},p.cancel.label):null,w.isValidElement(p.action)?p.action:p.action&&th(p.action)?k.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||C,onClick:be=>{var Ue,nt;th(p.action)&&((nt=(Ue=p.action).onClick)==null||nt.call(Ue,be),!be.defaultPrevented&&ia())},className:bn(M==null?void 0:M.actionButton,(f=p==null?void 0:p.classNames)==null?void 0:f.actionButton)},p.action.label):null))};function vO(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function cU(e,t){let r={};return[e,t].forEach((n,i)=>{let a=i===1,o=a?"--mobile-offset":"--offset",s=a?rU:tU;function l(u){["top","right","bottom","left"].forEach(d=>{r[`${o}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof n=="number"||typeof n=="string"?l(n):typeof n=="object"?["top","right","bottom","left"].forEach(u=>{n[u]===void 0?r[`${o}-${u}`]=s:r[`${o}-${u}`]=typeof n[u]=="number"?`${n[u]}px`:n[u]}):l(s)}),r}var uU=w.forwardRef(function(e,t){let{invert:r,position:n="bottom-right",hotkey:i=["altKey","KeyT"],expand:a,closeButton:o,className:s,offset:l,mobileOffset:u,theme:d="light",richColors:f,duration:h,style:p,visibleToasts:g=eU,toastOptions:m,dir:v=vO(),gap:x=iU,loadingIcon:y,icons:b,containerAriaLabel:_="Notifications",pauseWhenPageIsHidden:S}=e,[j,O]=k.useState([]),P=k.useMemo(()=>Array.from(new Set([n].concat(j.filter(U=>U.position).map(U=>U.position)))),[j,n]),[N,A]=k.useState([]),[C,T]=k.useState(!1),[L,R]=k.useState(!1),[I,D]=k.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
361k":"light"),$=k.useRef(null),E=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),M=k.useRef(null),F=k.useRef(!1),H=k.useCallback(U=>{O(K=>{var J;return(J=K.find(he=>he.id===U.id))!=null&&J.delete||fr.dismiss(U.id),K.filter(({id:he})=>he!==U.id)})},[]);return k.useEffect(()=>fr.subscribe(U=>{if(U.dismiss){O(K=>K.map(J=>J.id===U.id?{...J,delete:!0}:J));return}setTimeout(()=>{r2.flushSync(()=>{O(K=>{let J=K.findIndex(he=>he.id===U.id);return J!==-1?[...K.slice(0,J),{...K[J],...U},...K.slice(J+1)]:[U,...K]})})})}),[]),k.useEffect(()=>{if(d!=="system"){D(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?D("dark"):D("light")),typeof window>"u")return;let U=window.matchMedia("(prefers-color-scheme: dark)");try{U.addEventListener("change",({matches:K})=>{D(K?"dark":"light")})}catch{U.addListener(({matches:J})=>{try{D(J?"dark":"light")}catch(he){console.error(he)}})}},[d]),k.useEffect(()=>{j.length<=1&&T(!1)},[j]),k.useEffect(()=>{let U=K=>{var J,he;i.every(Ne=>K[Ne]||K.code===Ne)&&(T(!0),(J=$.current)==null||J.focus()),K.code==="Escape"&&(document.activeElement===$.current||(he=$.current)!=null&&he.contains(document.activeElement))&&T(!1)};return document.addEventListener("keydown",U),()=>document.removeEventListener("keydown",U)},[i]),k.useEffect(()=>{if($.current)return()=>{M.current&&(M.current.focus({preventScroll:!0}),M.current=null,F.current=!1)}},[$.current]),k.createElement("section",{ref:t,"aria-label":`${_} ${E}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},P.map((U,K)=>{var J;let[he,Ne]=U.split("-");return j.length?k.createElement("ol",{key:U,dir:v==="auto"?vO():v,tabIndex:-1,ref:$,className:s,"data-sonner-toaster":!0,"data-theme":I,"data-y-position":he,"data-lifted":C&&j.length>1&&!a,"data-x-position":Ne,style:{"--front-toast-height":`${((J=N[0])==null?void 0:J.height)||0}px`,"--width":`${nU}px`,"--gap":`${x}px`,...p,...cU(l,u)},onBlur:Y=>{F.current&&!Y.currentTarget.contains(Y.relatedTarget)&&(F.current=!1,M.current&&(M.current.focus({preventScroll:!0}),M.current=null))},onFocus:Y=>{Y.target instanceof HTMLElement&&Y.target.dataset.dismissible==="false"||F.current||(F.current=!0,M.current=Y.relatedTarget)},onMouseEnter:()=>T(!0),onMouseMove:()=>T(!0),onMouseLeave:()=>{L||T(!1)},onDragEnd:()=>T(!1),onPointerDown:Y=>{Y.target instanceof HTMLElement&&Y.target.dataset.dismissible==="false"||R(!0)},onPointerUp:()=>R(!1)},j.filter(Y=>!Y.position&&K===0||Y.position===U).map((Y,ye)=>{var q,Q;return k.createElement(lU,{key:Y.id,icons:b,index:ye,toast:Y,defaultRichColors:f,duration:(q=m==null?void 0:m.duration)!=null?q:h,className:m==null?void 0:m.className,descriptionClassName:m==null?void 0:m.descriptionClassName,invert:r,visibleToasts:g,closeButton:(Q=m==null?void 0:m.closeButton)!=null?Q:o,interacting:L,position:U,style:m==null?void 0:m.style,unstyled:m==null?void 0:m.unstyled,classNames:m==null?void 0:m.classNames,cancelButtonStyle:m==null?void 0:m.cancelButtonStyle,actionButtonStyle:m==null?void 0:m.actionButtonStyle,removeToast:H,toasts:j.filter(X=>X.position==Y.position),heights:N.filter(X=>X.position==Y.position),setHeights:A,expandByDefault:a,gap:x,loadingIcon:y,expanded:C,pauseWhenPageIsHidden:S,swipeDirections:e.swipeDirections})})):null}))});const dU=({...e})=>{const{theme:t="system"}=D8();return c.jsx(uU,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var fU=Cw[" useId ".trim().toString()]||(()=>{}),hU=0;function Li(e){const[t,r]=w.useState(fU());return Lt(()=>{r(n=>n??String(hU++))},[e]),t?`radix-${t}`:""}const pU=["top","right","bottom","left"],qa=Math.min,$r=Math.max,wp=Math.round,rh=Math.floor,li=e=>({x:e,y:e}
vendor: 11,913 bytes, line 361
361),mU={left:"right",right:"left",bottom:"top",top:"bottom"},gU={start:"end",end:"start"};function v0(e,t,r){return $r(e,qa(t,r))}function Vi(e,t){return typeof e=="function"?e(t):e}function Ki(e){return e.split("-")[0]}function _c(e){return e.split("-")[1]}function E1(e){return e==="x"?"y":"x"}function k1(e){return e==="y"?"height":"width"}const vU=new Set(["top","bottom"]);function ni(e){return vU.has(Ki(e))?"y":"x"}function A1(e){return E1(ni(e))}function yU(e,t,r){r===void 0&&(r=!1);const n=_c(e),i=A1(e),a=k1(i);let o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=Sp(o)),[o,Sp(o)]}function xU(e){const t=Sp(e);return[y0(e),t,y0(t)]}function y0(e){return e.replace(/start|end/g,t=>gU[t])}const yO=["left","right"],xO=["right","left"],bU=["top","bottom"],wU=["bottom","top"];function SU(e,t,r){switch(e){case"top":case"bottom":return r?t?xO:yO:t?yO:xO;case"left":case"right":return t?bU:wU;default:return[]}}function _U(e,t,r,n){const i=_c(e);let a=SU(Ki(e),r==="start",n);return i&&(a=a.map(o=>o+"-"+i),t&&(a=a.concat(a.map(y0)))),a}function Sp(e){return e.replace(/left|right|bottom|top/g,t=>mU[t])}function jU(e){return{top:0,right:0,bottom:0,left:0,...e}}function J2(e){return typeof e!="number"?jU(e):{top:e,right:e,bottom:e,left:e}}function _p(e){const{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function bO(e,t,r){let{reference:n,floating:i}=e;const a=ni(t),o=A1(t),s=k1(o),l=Ki(t),u=a==="y",d=n.x+n.width/2-i.width/2,f=n.y+n.height/2-i.height/2,h=n[s]/2-i[s]/2;let p;switch(l){case"top":p={x:d,y:n.y-i.height};break;case"bottom":p={x:d,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:f};break;case"left":p={x:n.x-i.width,y:f};break;default:p={x:n.x,y:n.y}}switch(_c(t)){case"start":p[o]-=h*(r&&u?-1:1);break;case"end":p[o]+=h*(r&&u?-1:1);break}return p}const OU=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:a=[],platform:o}=r,s=a.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:f}=bO(u,n,l),h=n,p={},g=0;for(let m=0;m<s.length;m++){const{name:v,fn:x}=s[m],{x:y,y:b,data:_,reset:S}=await x({x:d,y:f,initialPlacement:n,placement:h,strategy:i,middlewareData:p,rects:u,platform:o,elements:{reference:e,floating:t}});d=y??d,f=b??f,p={...p,[v]:{...p[v],..._}},S&&g<=50&&(g++,typeof S=="object"&&(S.placement&&(h=S.placement),S.rects&&(u=S.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):S.rects),{x:d,y:f}=bO(u,h,l)),m=-1)}return{x:d,y:f,placement:h,strategy:i,middlewareData:p}};async function od(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:a,rects:o,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=Vi(t,e),g=J2(p),v=s[h?f==="floating"?"reference":"floating":f],x=_p(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(v)))==null||r?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:u,rootBoundary:d,strategy:l})),y=f==="floating"?{x:n,y:i,width:o.floating.width,height:o.floating.height}:o.reference,b=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),_=await(a.isElement==null?void 0:a.isElement(b))?await(a.getScale==null?void 0:a.getScale(b))||{x:1,y:1}:{x:1,y:1},S=_p(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:b,strategy:l}):y);return{top:(x.top-S.top+g.top)/_.y,bottom:(S.bottom-x.bottom+g.bottom)/_.y,left:(x.left-S.left+g.left)/_.x,right:(S.right-x.right+g.right)/_.x}}const PU=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:i,rects:a,platform:o,elements:s,middlewareData:l}=t,{element:u,padding:d=0}=Vi(e,t)||{};if(u==null)return{};const f=J2(d),h={x:r,y:n},p=A1(i),g=k1(p),m=await o.getDimensions(u),v=p==="y",x=v?"top":"left",y=v?"bottom":"right",b=v?"clientHeight":"clientWidth",_=a.reference[g]+a.reference[p]-h[p]-a.floating[g],S=h[p]-a.reference[p],j=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let O=j?j[b]:0;(!O||!await(o.isElement==null?void 0:o.isElement(j)))&&(O=s.floating[b]||a.floating[g]);const P=_/2-S/2,N=O/2-m[g]/2-1,A=qa(f[x],N),C=qa(f[y],N),T=A,L=O-m[g]-C,R=O/2-m[g]/2+P,I=v0(T,R,L),D=!l.arrow&&_c(i)!=null&&R!==I&&a.reference[g]/2-(R<T?A:C)-m[g]/2<0,$=D?R<T?R-T:R-L:0;return{[p]:h[p]+$,data:{[p]:I,centerOffset:R-I-$,...D&&{alignmentOffset:$}},reset:D}}}),NU=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:i,middlewareData:a,rects:o,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...v}=Vi(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const x=Ki(i),y=ni(s),b=Ki(s)===s,_=await(l.isRTL==null?void 0:l.isRTL(u.floating)),S=h||(b||!m?[Sp(s)]:xU(s)),j=g!=="none";!h&&j&&S.push(..._U(s,m,g,_));const O=[s,...S],P=await od(t,v),N=[];let A=((n=a.flip)==null?void 0:n.overflows)||[];if(d&&N.push(P[x]),f){const R=yU(i,o,_);N.push(P[R[0]],P[R[1]])}if(A=[...A,{placement:i,overflows:N}],!N.every(R=>R<=0)){var C,T;const R=(((C=a.flip)==null?void 0:C.index)||0)+1,I=O[R];if(I&&(!(f==="alignment"?y!==ni(I):!1)||A.every(E=>E.overflows[0]>0&&ni(E.placement)===y)))return{data:{index:R,overflows:A},reset:{placement:I}};let D=(T=A.filter($=>$.overflows[0]<=0).sort(($,E)=>$.overflows[1]-E.overflows[1])[0])==null?void 0:T.placement;if(!D)switch(p){case"bestFit":{var L;const $=(L=A.filter(E=>{if(j){const M=ni(E.placement);return M===y||M==="y"}return!0}).map(E=>[E.placement,E.overflows.filter(M=>M>0).reduce((M,F)=>M+F,0)]).sort((E,M)=>E[1]-M[1])[0])==null?void 0:L[0];$&&(D=$);break}case"initialPlacement":D=s;break}if(i!==D)return{reset:{placement:D}}}return{}}}};function wO(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function SO(e){return pU.some(t=>e[t]>=0)}const EU=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...i}=Vi(e,t);switch(n){case"referenceHidden":{const a=await od(t,{...i,elementContext:"reference"}),o=wO(a,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:SO(o)}}}case"escaped":{const a=await od(t,{...i,altBoundary:!0}),o=wO(a,r.floating);return{data:{escapedOffsets:o,escaped:SO(o)}}}default:return{}}}}},Z2=new Set(["left","top"]);async function kU(e,t){const{placement:r,platform:n,elements:i}=e,a=await(n.isRTL==null?void 0:n.isRTL(i.floating)),o=Ki(r),s=_c(r),l=ni(r)==="y",u=Z2.has(o)?-1:1,d=a&&l?-1:1,f=Vi(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof g=="number"&&(p=s==="end"?g*-1:g),l?{x:p*d,y:h*u}:{x:h*u,y:p*d}}const AU=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:a,placement:o,middlewareData:s}=t,l=await kU(t,e);return o===((r=s.offset)==null?void 0:r.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:i+l.x,y:a+l.y,data:{...l,placement:o}}}}},CU=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:v=>{let{x,y}=v;return{x,y}}},...l}=Vi(e,t),u={x:r,y:n},d=await od(t,l),f=ni(Ki(i)),h=E1(f);let p=u[h],g=u[f];if(a){const v=h==="y"?"top":"left",x=h==="y"?"bottom":"right",y=p+d[v],b=p-d[x];p=v0(y,p,b)}if(o){const v=f==="y"?"top":"left",x=f==="y"?"bottom":"right",y=g+d[v],b=g-d[x];g=v0(y,g,b)}const m=s.fn({...t,[h]:p,[f]:g});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[h]:a,[f]:o}}}}}},TU=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=Vi(e,t),d={x:r,y:n},f=ni(i),h=E1(f);let p=d[h],g=d[f];const m=Vi(s,t),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const b=h==="y"?"height":"width",_=a.reference[h]-a.floating[b]+v.mainAxis,S=a.reference[h]+a.reference[b]-v.mainAxis;p<_?p=_:p>S&&(p=S)}if(u){var x,y;const b=h==="y"?"width":"height",_=Z2.has(Ki(i)),S=a.reference[f]-a.floating[b]+(_&&((x=o.offset)==null?void 0:x[f])||0)+(_?0:v.crossAxis),j=a.reference[f]+a.reference[b]+(_?0:((y=o.offset)==null?void 0:y[f])||0)-(_?v.crossAxis:0);g<S?g=S:g>j&&(g=j)}return{[h]:p,[f]:g}}}},$U=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:a,platform:o,elements:s}=t,{apply:l=()=>{},...u}=Vi(e,t),d=await od(t,u),f=Ki(i),h=_c(i),p=ni(i)==="y",{width:g,height:m}=a.floating;let v,x;f==="top"||f==="bottom"?(v=f,x=h===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(x=f,v=h==="end"?"top":"bottom");const y=m-d.top-d.bottom,b=g-d.left-d.right,_=qa(m-d[v],y),S=qa(g-d[x],b),j=!t.middlewareData.shift;let O=_,P=S;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(P=b),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(O=y),j&&!h){const A=$r(d.left,0),C=$r(d.right,0),T=$r(d.top,0),L=$r(d.bottom,0);p?P=g-2*(A!==0||C!==0?A+C:$r(d.left,d.right)):O=m-2*(T!==0||L!==0?T+L:$r(d.top,d.bottom))}await l({...t,availableWidth:P,availableHeight:O});const N=await o.getDimensions(s.floating);return g!==N.width||m!==N.height?{reset:{rects:!0}}:{}}}};function lg(){return typeof window<"u"}function jc(e){return e$(e)?(e.nodeName||"").toLowerCase():"#document"}function Br(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function yi(e){var t;return(t=(e$(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function e$(e){return lg()?e instanceof Node||e instanceof Br(e).Node:!1}function Bn(e){return lg()?e instanceof Element||e instanceof Br(e).Element:!1}function hi(e){return lg()?e instanceof HTMLElement||e instanceof Br(e).HTMLElement:!1}function _O(e){return!lg()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Br(e).ShadowRoot}const RU=new Set(["inline","contents"]);function mf(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=Un(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!RU.has(i)}const MU=new Set(["table","td","th"]);function IU(e){return MU.has(jc(e))}const DU=[":popover-open",":modal"];function cg(e){return DU.some(t=>{try{return e.matches(t)}catch{return!1}})}const LU=["transform","translate","scale","rotate","perspective"],FU=["transform","translate","scale","rotate","perspective","filter"],BU=["paint","layout","strict","content"];function C1(e){const t=T1(),r=Bn(e)?Un(e):e;return LU.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||FU.some(n=>(r.willChange||"").includes(n))||BU.some(n=>(r.contain||"").includes(n))}function UU(e){let t=Va(e);for(;hi(t)&&!Ll(t);){if(C1(t))return t;if(cg(t))return null;t=Va(t)}return null}function T1(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const WU=new Set(["html","body","#document"]);function Ll(e){return WU.has(jc(e))}function Un(e){return Br(e).getComputedStyle(e)}function ug(e){return Bn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Va(e){if(jc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||_O(e)&&e.host||yi(e);return _O(t)?t.host:t}function t$(e){const t=Va(e);return Ll(t)?e.ownerDocument?e.ownerDocument.body:e.body:hi(t)&&mf(t)?t:t$(t)}function sd(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=t$(e),a=i===((n=e.ownerDocument)==null?void 0:n.body),o=Br(i);if(a){const s=x0(o);
vendor: 5,792 bytes, line 361
361return t.concat(o,o.visualViewport||[],mf(i)?i:[],s&&r?sd(s):[])}return t.concat(i,sd(i,[],r))}function x0(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function r$(e){const t=Un(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=hi(e),a=i?e.offsetWidth:r,o=i?e.offsetHeight:n,s=wp(r)!==a||wp(n)!==o;return s&&(r=a,n=o),{width:r,height:n,$:s}}function $1(e){return Bn(e)?e:e.contextElement}function dl(e){const t=$1(e);if(!hi(t))return li(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:a}=r$(t);let o=(a?wp(r.width):r.width)/n,s=(a?wp(r.height):r.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const zU=li(0);function n$(e){const t=Br(e);return!T1()||!t.visualViewport?zU:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function HU(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Br(e)?!1:t}function Ko(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),a=$1(e);let o=li(1);t&&(n?Bn(n)&&(o=dl(n)):o=dl(e));const s=HU(a,r,n)?n$(a):li(0);let l=(i.left+s.x)/o.x,u=(i.top+s.y)/o.y,d=i.width/o.x,f=i.height/o.y;if(a){const h=Br(a),p=n&&Bn(n)?Br(n):n;let g=h,m=x0(g);for(;m&&n&&p!==g;){const v=dl(m),x=m.getBoundingClientRect(),y=Un(m),b=x.left+(m.clientLeft+parseFloat(y.paddingLeft))*v.x,_=x.top+(m.clientTop+parseFloat(y.paddingTop))*v.y;l*=v.x,u*=v.y,d*=v.x,f*=v.y,l+=b,u+=_,g=Br(m),m=x0(g)}}return _p({width:d,height:f,x:l,y:u})}function R1(e,t){const r=ug(e).scrollLeft;return t?t.left+r:Ko(yi(e)).left+r}function i$(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-(r?0:R1(e,n)),a=n.top+t.scrollTop;return{x:i,y:a}}function qU(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const a=i==="fixed",o=yi(n),s=t?cg(t.floating):!1;if(n===o||s&&a)return r;let l={scrollLeft:0,scrollTop:0},u=li(1);const d=li(0),f=hi(n);if((f||!f&&!a)&&((jc(n)!=="body"||mf(o))&&(l=ug(n)),hi(n))){const p=Ko(n);u=dl(n),d.x=p.x+n.clientLeft,d.y=p.y+n.clientTop}const h=o&&!f&&!a?i$(o,l,!0):li(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+d.x+h.x,y:r.y*u.y-l.scrollTop*u.y+d.y+h.y}}function VU(e){return Array.from(e.getClientRects())}function KU(e){const t=yi(e),r=ug(e),n=e.ownerDocument.body,i=$r(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=$r(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+R1(e);const s=-r.scrollTop;return Un(n).direction==="rtl"&&(o+=$r(t.clientWidth,n.clientWidth)-i),{width:i,height:a,x:o,y:s}}function GU(e,t){const r=Br(e),n=yi(e),i=r.visualViewport;let a=n.clientWidth,o=n.clientHeight,s=0,l=0;if(i){a=i.width,o=i.height;const u=T1();(!u||u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:a,height:o,x:s,y:l}}const YU=new Set(["absolute","fixed"]);function XU(e,t){const r=Ko(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,a=hi(e)?dl(e):li(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y,l=i*a.x,u=n*a.y;return{width:o,height:s,x:l,y:u}}function jO(e,t,r){let n;if(t==="viewport")n=GU(e,r);else if(t==="document")n=KU(yi(e));else if(Bn(t))n=XU(t,r);else{const i=n$(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return _p(n)}function a$(e,t){const r=Va(e);return r===t||!Bn(r)||Ll(r)?!1:Un(r).position==="fixed"||a$(r,t)}function QU(e,t){const r=t.get(e);if(r)return r;let n=sd(e,[],!1).filter(s=>Bn(s)&&jc(s)!=="body"),i=null;const a=Un(e).position==="fixed";let o=a?Va(e):e;for(;Bn(o)&&!Ll(o);){const s=Un(o),l=C1(o);!l&&s.position==="fixed"&&(i=null),(a?!l&&!i:!l&&s.position==="static"&&!!i&&YU.has(i.position)||mf(o)&&!l&&a$(e,o))?n=n.filter(d=>d!==o):i=s,o=Va(o)}return t.set(e,n),n}function JU(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const o=[...r==="clippingAncestors"?cg(t)?[]:QU(t,this._c):[].concat(r),n],s=o[0],l=o.reduce((u,d)=>{const f=jO(t,d,i);return u.top=$r(f.top,u.top),u.right=qa(f.right,u.right),u.bottom=qa(f.bottom,u.bottom),u.left=$r(f.left,u.left),u},jO(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function ZU(e){const{width:t,height:r}=r$(e);return{width:t,height:r}}function eW(e,t,r){const n=hi(t),i=yi(t),a=r==="fixed",o=Ko(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=li(0);function u(){l.x=R1(i)}if(n||!n&&!a)if((jc(t)!=="body"||mf(i))&&(s=ug(t)),n){const p=Ko(t,!0,a,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else i&&u();a&&!n&&i&&u();const d=i&&!n&&!a?i$(i,s):li(0),f=o.left+s.scrollLeft-l.x-d.x,h=o.top+s.scrollTop-l.y-d.y;return{x:f,y:h,width:o.width,height:o.height}}function dy(e){return Un(e).position==="static"}function OO(e,t){if(!hi(e)||Un(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return yi(e)===r&&(r=r.ownerDocument.body),r}function o$(e,t){const r=Br(e);if(cg(e))return r;if(!hi(e)){let i=Va(e);for(;i&&!Ll(i);){if(Bn(i)&&!dy(i))return i;i=Va(i)}return r}let n=OO(e,t);for(;n&&IU(n)&&dy(n);)n=OO(n,t);return n&&Ll(n)&&dy(n)&&!C1(n)?r:n||UU(e)||r}const tW=async function(e){const t=this.getOffsetParent||o$,r=this.getDimensions,n=await r(e.floating);return{reference:eW(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function rW(e){return Un(e).direction==="rtl"}const nW={convertOffsetParentRelativeRectToViewportRelativeRect:qU,getDocumentElement:yi,getClippingRect:JU,getOffsetParent:o$,getElementRects:tW,getClientRects:VU,getDimensions:ZU,getScale:dl,isElement:Bn,isRTL:rW};function s$(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function iW(e,t){let r=null,n;const i=yi(e);function a(){var s;clearTimeout(n),(s=r)==null||s.disconnect(),r=null}function o(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();const u=e.getBoundingClientRect(),{left:d,top:f,width:h,height:p}=u;if(s||t(),!h||!p)return;
vendor: 8,614 bytes, line 361
361const g=rh(f),m=rh(i.clientWidth-(d+h)),v=rh(i.clientHeight-(f+p)),x=rh(d),b={rootMargin:-g+"px "+-m+"px "+-v+"px "+-x+"px",threshold:$r(0,qa(1,l))||1};let _=!0;function S(j){const O=j[0].intersectionRatio;if(O!==l){if(!_)return o();O?o(!1,O):n=setTimeout(()=>{o(!1,1e-7)},1e3)}O===1&&!s$(u,e.getBoundingClientRect())&&o(),_=!1}try{r=new IntersectionObserver(S,{...b,root:i.ownerDocument})}catch{r=new IntersectionObserver(S,b)}r.observe(e)}return o(!0),a}function aW(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=$1(e),d=i||a?[...u?sd(u):[],...sd(t)]:[];d.forEach(x=>{i&&x.addEventListener("scroll",r,{passive:!0}),a&&x.addEventListener("resize",r)});const f=u&&s?iW(u,r):null;let h=-1,p=null;o&&(p=new ResizeObserver(x=>{let[y]=x;y&&y.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(t)})),r()}),u&&!l&&p.observe(u),p.observe(t));let g,m=l?Ko(e):null;l&&v();function v(){const x=Ko(e);m&&!s$(m,x)&&r(),m=x,g=requestAnimationFrame(v)}return r(),()=>{var x;d.forEach(y=>{i&&y.removeEventListener("scroll",r),a&&y.removeEventListener("resize",r)}),f==null||f(),(x=p)==null||x.disconnect(),p=null,l&&cancelAnimationFrame(g)}}const oW=AU,sW=CU,lW=NU,cW=$U,uW=EU,PO=PU,dW=TU,fW=(e,t,r)=>{const n=new Map,i={platform:nW,...r},a={...i.platform,_c:n};return OU(e,t,{...i,platform:a})};var hW=typeof document<"u",pW=function(){},Wh=hW?w.useLayoutEffect:pW;function jp(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!jp(e[n],t[n]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){const a=i[n];if(!(a==="_owner"&&e.$$typeof)&&!jp(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function l$(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function NO(e,t){const r=l$(e);return Math.round(t*r)/r}function fy(e){const t=w.useRef(e);return Wh(()=>{t.current=e}),t}function mW(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[d,f]=w.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=w.useState(n);jp(h,n)||p(n);const[g,m]=w.useState(null),[v,x]=w.useState(null),y=w.useCallback(E=>{E!==j.current&&(j.current=E,m(E))},[]),b=w.useCallback(E=>{E!==O.current&&(O.current=E,x(E))},[]),_=a||g,S=o||v,j=w.useRef(null),O=w.useRef(null),P=w.useRef(d),N=l!=null,A=fy(l),C=fy(i),T=fy(u),L=w.useCallback(()=>{if(!j.current||!O.current)return;const E={placement:t,strategy:r,middleware:h};C.current&&(E.platform=C.current),fW(j.current,O.current,E).then(M=>{const F={...M,isPositioned:T.current!==!1};R.current&&!jp(P.current,F)&&(P.current=F,us.flushSync(()=>{f(F)}))})},[h,t,r,C,T]);Wh(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,f(E=>({...E,isPositioned:!1})))},[u]);const R=w.useRef(!1);Wh(()=>(R.current=!0,()=>{R.current=!1}),[]),Wh(()=>{if(_&&(j.current=_),S&&(O.current=S),_&&S){if(A.current)return A.current(_,S,L);L()}},[_,S,L,A,N]);const I=w.useMemo(()=>({reference:j,floating:O,setReference:y,setFloating:b}),[y,b]),D=w.useMemo(()=>({reference:_,floating:S}),[_,S]),$=w.useMemo(()=>{const E={position:r,left:0,top:0};if(!D.floating)return E;const M=NO(D.floating,d.x),F=NO(D.floating,d.y);return s?{...E,transform:"translate("+M+"px, "+F+"px)",...l$(D.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:M,top:F}},[r,s,D.floating,d.x,d.y]);return w.useMemo(()=>({...d,update:L,refs:I,elements:D,floatingStyles:$}),[d,L,I,D,$])}const gW=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:i}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?PO({element:n.current,padding:i}).fn(r):{}:n?PO({element:n,padding:i}).fn(r):{}}}},vW=(e,t)=>({...oW(e),options:[e,t]}),yW=(e,t)=>({...sW(e),options:[e,t]}),xW=(e,t)=>({...dW(e),options:[e,t]}),bW=(e,t)=>({...lW(e),options:[e,t]}),wW=(e,t)=>({...cW(e),options:[e,t]}),SW=(e,t)=>({...uW(e),options:[e,t]}),_W=(e,t)=>({...gW(e),options:[e,t]});var jW="Arrow",c$=w.forwardRef((e,t)=>{const{children:r,width:n=10,height:i=5,...a}=e;return c.jsx(ce.svg,{...a,ref:t,width:n,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});c$.displayName=jW;var OW=c$;function M1(e){const[t,r]=w.useState(void 0);return Lt(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let o,s;if("borderBoxSize"in a){const l=a.borderBoxSize,u=Array.isArray(l)?l[0]:l;o=u.inlineSize,s=u.blockSize}else o=e.offsetWidth,s=e.offsetHeight;r({width:o,height:s})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var I1="Popper",[u$,Oc]=fn(I1),[PW,d$]=u$(I1),f$=e=>{const{__scopePopper:t,children:r}=e,[n,i]=w.useState(null);return c.jsx(PW,{scope:t,anchor:n,onAnchorChange:i,children:r})};f$.displayName=I1;var h$="PopperAnchor",p$=w.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...i}=e,a=d$(h$,r),o=w.useRef(null),s=Oe(t,o);return w.useEffect(()=>{a.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:c.jsx(ce.div,{...i,ref:s})});p$.displayName=h$;var D1="PopperContent",[NW,EW]=u$(D1),m$=w.forwardRef((e,t)=>{var Y,ye,q,Q,X,B;const{__scopePopper:r,side:n="bottom",sideOffset:i=0,align:a="center",alignOffset:o=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:g,...m}=e,v=d$(D1,r),[x,y]=w.useState(null),b=Oe(t,je=>y(je)),[_,S]=w.useState(null),j=M1(_),O=(j==null?void 0:j.width)??0,P=(j==null?void 0:j.height)??0,N=n+(a!=="center"?"-"+a:""),A=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},C=Array.isArray(u)?u:[u],T=C.length>0,L={padding:A,boundary:C.filter(AW),altBoundary:T},{refs:R,floatingStyles:I,placement:D,isPositioned:$,middlewareData:E}=mW({strategy:"fixed",placement:N,whileElementsMounted:(...je)=>aW(...je,{animationFrame:p==="always"}),elements:{reference:v.anchor},middleware:[vW({mainAxis:i+P,alignmentAxis:o}),l&&yW({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?xW():void 0,...L}),l&&bW({...L}),wW({...L,apply:({elements:je,rects:ge,availableWidth:He,availableHeight:Be})=>{const{width:ht,height:dr}=ge.reference,Or=je.floating.style;Or.setProperty("--radix-popper-available-width",`${He}px`),Or.setProperty("--radix-popper-available-height",`${Be}px`),Or.setProperty("--radix-popper-anchor-width",`${ht}px`),Or.setProperty("--radix-popper-anchor-height",`${dr}px`)}}),_&&_W({element:_,padding:s}),CW({arrowWidth:O,arrowHeight:P}),h&&SW({strategy:"referenceHidden",...L})]}),[M,F]=y$(D),H=Fn(g);Lt(()=>{$&&(H==null||H())},[$,H]);const U=(Y=E.arrow)==null?void 0:Y.x,K=(ye=E.arrow)==null?void 0:ye.y,J=((q=E.arrow)==null?void 0:q.centerOffset)!==0,[he,Ne]=w.useState();return Lt(()=>{x&&Ne(window.getComputedStyle(x).zIndex)},[x]),c.jsx("div",{ref:R.setFloating,"data-radix-popper-content-wrapper":"",style:{...I,transform:$?I.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:he,"--radix-popper-transform-origin":[(Q=E.transformOrigin)==null?void 0:Q.x,(X=E.transformOrigin)==null?void 0:X.y].join(" "),...((B=E.hide)==null?void 0:B.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(NW,{scope:r,placedSide:M,onArrowChange:S,arrowX:U,arrowY:K,shouldHideArrow:J,children:c.jsx(ce.div,{"data-side":M,"data-align":F,...m,ref:b,style:{...m.style,animation:$?void 0:"none"}})})})});m$.displayName=D1;var g$="PopperArrow",kW={top:"bottom",right:"left",bottom:"top",left:"right"},v$=w.forwardRef(function(t,r){const{__scopePopper:n,...i}=t,a=EW(g$,n),o=kW[a.placedSide];return c.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0}
vendor: 5,139 bytes, line 361
361,children:c.jsx(OW,{...i,ref:r,style:{...i.style,display:"block"}})})});v$.displayName=g$;function AW(e){return e!==null}var CW=e=>({name:"transformOrigin",options:e,fn(t){var v,x,y;const{placement:r,rects:n,middlewareData:i}=t,o=((v=i.arrow)==null?void 0:v.centerOffset)!==0,s=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[u,d]=y$(r),f={start:"0%",center:"50%",end:"100%"}[d],h=(((x=i.arrow)==null?void 0:x.x)??0)+s/2,p=(((y=i.arrow)==null?void 0:y.y)??0)+l/2;let g="",m="";return u==="bottom"?(g=o?f:`${h}px`,m=`${-l}px`):u==="top"?(g=o?f:`${h}px`,m=`${n.floating.height+l}px`):u==="right"?(g=`${-l}px`,m=o?f:`${p}px`):u==="left"&&(g=`${n.floating.width+l}px`,m=o?f:`${p}px`),{data:{x:g,y:m}}}});function y$(e){const[t,r="center"]=e.split("-");return[t,r]}var x$=f$,dg=p$,L1=m$,F1=v$,[fg,Gje]=fn("Tooltip",[Oc]),B1=Oc(),b$="TooltipProvider",TW=700,EO="tooltip.open",[$W,w$]=fg(b$),S$=e=>{const{__scopeTooltip:t,delayDuration:r=TW,skipDelayDuration:n=300,disableHoverableContent:i=!1,children:a}=e,o=w.useRef(!0),s=w.useRef(!1),l=w.useRef(0);return w.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),c.jsx($W,{scope:t,isOpenDelayedRef:o,delayDuration:r,onOpen:w.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:w.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,n)},[n]),isPointerInTransitRef:s,onPointerInTransitChange:w.useCallback(u=>{s.current=u},[]),disableHoverableContent:i,children:a})};S$.displayName=b$;var _$="Tooltip",[Yje,hg]=fg(_$),b0="TooltipTrigger",RW=w.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,i=hg(b0,r),a=w$(b0,r),o=B1(r),s=w.useRef(null),l=Oe(t,s,i.onTriggerChange),u=w.useRef(!1),d=w.useRef(!1),f=w.useCallback(()=>u.current=!1,[]);return w.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),c.jsx(dg,{asChild:!0,...o,children:c.jsx(ce.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...n,ref:l,onPointerMove:oe(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),d.current=!0)}),onPointerLeave:oe(e.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:oe(e.onPointerDown,()=>{i.open&&i.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:oe(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:oe(e.onBlur,i.onClose),onClick:oe(e.onClick,i.onClose)})})});RW.displayName=b0;var MW="TooltipPortal",[Xje,IW]=fg(MW,{forceMount:void 0}),Fl="TooltipContent",j$=w.forwardRef((e,t)=>{const r=IW(Fl,e.__scopeTooltip),{forceMount:n=r.forceMount,side:i="top",...a}=e,o=hg(Fl,e.__scopeTooltip);return c.jsx(vi,{present:n||o.open,children:o.disableHoverableContent?c.jsx(O$,{side:i,...a,ref:t}):c.jsx(DW,{side:i,...a,ref:t})})}),DW=w.forwardRef((e,t)=>{const r=hg(Fl,e.__scopeTooltip),n=w$(Fl,e.__scopeTooltip),i=w.useRef(null),a=Oe(t,i),[o,s]=w.useState(null),{trigger:l,onClose:u}=r,d=i.current,{onPointerInTransitChange:f}=n,h=w.useCallback(()=>{s(null),f(!1)},[f]),p=w.useCallback((g,m)=>{const v=g.currentTarget,x={x:g.clientX,y:g.clientY},y=WW(x,v.getBoundingClientRect()),b=zW(x,y),_=HW(m.getBoundingClientRect()),S=VW([...b,..._]);s(S),f(!0)},[f]);return w.useEffect(()=>()=>h(),[h]),w.useEffect(()=>{if(l&&d){const g=v=>p(v,d),m=v=>p(v,l);return l.addEventListener("pointerleave",g),d.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",g),d.removeEventListener("pointerleave",m)}}},[l,d,p,h]),w.useEffect(()=>{if(o){const g=m=>{const v=m.target,x={x:m.clientX,y:m.clientY},y=(l==null?void 0:l.contains(v))||(d==null?void 0:d.contains(v)),b=!qW(x,o);y?h():b&&(h(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,d,o,u,h]),c.jsx(O$,{...e,ref:a})}),[LW,FW]=fg(_$,{isInside:!1}),BW=LB("TooltipContent"),O$=w.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,l=hg(Fl,r),u=B1(r),{onClose:d}=l;return w.useEffect(()=>(document.addEventListener(EO,d),()=>document.removeEventListener(EO,d)),[d]),w.useEffect(()=>{if(l.trigger){const f=h=>{const p=h.target;p!=null&&p.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),c.jsx(wc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:c.jsxs(L1,{"data-state":l.stateAttribute,...u,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(BW,{children:n}),c.jsx(LW,{scope:r,isInside:!0,children:c.jsx(o6,{id:l.contentId,role:"tooltip",children:i||n})})]})})});j$.displayName=Fl;var P$="TooltipArrow",UW=w.forwardRef((e,t)=>
361{const{__scopeTooltip:r,...n}=e,i=B1(r);return FW(P$,r).isInside?null:c.jsx(F1,{...i,...n,ref:t})});UW.displayName=P$;function WW(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,i,a)){case a:return"left";case i:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function zW(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function HW(e){const{top:t,right:r,bottom:n,left:i}=e;return[{x:i,y:t},{x:r,y:t},{x:r,y:n},{x:i,y:n}]}function qW(e,t){const{x:r,y:n}=e;let i=!1;for(let a=0,o=t.length-1;a<t.length;o=a++){const s=t[a],l=t[o],u=s.x,d=s.y,f=l.x,h=l.y;d>n!=h>n&&r<(f-u)*(n-d)/(h-d)+u&&(i=!i)}return i}function VW(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),KW(t)}function KW(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const i=e[n];for(;t.length>=2;){const a=t[t.length-1],o=t[t.length-2];if((a.x-o.x)*(i.y-o.y)>=(a.y-o.y)*(i.x-o.x))t.pop();else break}t.push(i)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const i=e[n];for(;r.length>=2;){const a=r[r.length-1],o=r[r.length-2];if((a.x-o.x)*(i.y-o.y)>=(a.y-o.y)*(i.x-o.x))r.pop();else break}r.push(i)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var GW=S$,N$=j$;const YW=GW,XW=w.forwardRef(({className:e,sideOffset:t=4,...r},n)=>c.jsx(N$,{ref:n,sideOffset:t,className:te("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));XW.displayName=N$.displayName;var pg=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},mg=typeof window>"u"||"Deno"in globalThis;function On(){}function QW(e,t){return typeof e=="function"?e(t):e}function JW(e){return typeof e=="number"&&e>=0&&e!==1/0}function ZW(e,t){return Math.max(e+(t||0)-Date.now(),0)}function w0(e,t){return typeof e=="function"?e(t):e}function ez(e,t){return typeof e=="function"?e(t):e}function kO(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(n){if(t.queryHash!==U1(o,t.options))return!1}else if(!cd(t.queryKey,o))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function AO(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(ld(t.options.mutationKey)!==ld(a))return!1}else if(!cd(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function U1(e,t){return((t==null?void 0:t.queryKeyHashFn)||ld)(e)}function ld(e){return JSON.stringify(e,(t,r)=>S0(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function cd(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>cd(e[r],t[r])):!1}function E$(e,t){if(e===t)return e;const r=CO(e)&&CO(t);if(r||S0(e)&&S0(t)){const n=r?e:Object.keys(e),i=n.length,a=r?t:Object.keys(t),o=a.length,s=r?[]:{},l=new Set(n);let u=0;for(let d=0;d<o;d++){const f=r?d:a[d];(!r&&l.has(f)||r)&&e[f]===void 0&&t[f]===void 0?(s[f]=void 0,u++):(s[f]=E$(e[f],t[f]),s[f]===e[f]&&e[f]!==void 0&&u++)}return i===o&&u===i?e:s}return t}function CO(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function S0(e){if(!TO(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!TO(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function TO(e){return Object.prototype.toString.call(e)==="[object Object]"}function tz(e){return new Promise(t=>{setTimeout(t,e)})}function rz(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?E$(e,t):t}function nz(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function iz(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var W1=Symbol();function k$(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===W1?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Co,Sa,bl,IA,az=(IA=class extends pg{constructor(){super();Ae(this,Co);Ae(this,Sa);Ae(this,bl);we(this,bl,t=>{if(!mg&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){z(this,Sa)||this.setEventListener(z(this,bl))}onUnsubscribe(){var t;this.hasListeners()||((t=z(this,Sa))==null||t.call(this),we(this,Sa,void 0))}setEventListener(t){var r;we(this,bl,t),(r=z(this,Sa))==null||r.call(this),we(this,Sa,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){z(this,Co)!==t&&(we(this,Co,t),this.onFocus())}onFocus(){const t=this.isFocused();
vendor: 4,924 bytes, line 361
361this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof z(this,Co)=="boolean"?z(this,Co):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Co=new WeakMap,Sa=new WeakMap,bl=new WeakMap,IA),A$=new az,wl,_a,Sl,DA,oz=(DA=class extends pg{constructor(){super();Ae(this,wl,!0);Ae(this,_a);Ae(this,Sl);we(this,Sl,t=>{if(!mg&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){z(this,_a)||this.setEventListener(z(this,Sl))}onUnsubscribe(){var t;this.hasListeners()||((t=z(this,_a))==null||t.call(this),we(this,_a,void 0))}setEventListener(t){var r;we(this,Sl,t),(r=z(this,_a))==null||r.call(this),we(this,_a,t(this.setOnline.bind(this)))}setOnline(t){z(this,wl)!==t&&(we(this,wl,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return z(this,wl)}},wl=new WeakMap,_a=new WeakMap,Sl=new WeakMap,DA),Op=new oz;function sz(){let e,t;const r=new Promise((i,a)=>{e=i,t=a});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}function lz(e){return Math.min(1e3*2**e,3e4)}function C$(e){return(e??"online")==="online"?Op.isOnline():!0}var T$=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function hy(e){return e instanceof T$}function $$(e){let t=!1,r=0,n=!1,i;const a=sz(),o=m=>{var v;n||(h(new T$(m)),(v=e.abort)==null||v.call(e))},s=()=>{t=!0},l=()=>{t=!1},u=()=>A$.isFocused()&&(e.networkMode==="always"||Op.isOnline())&&e.canRun(),d=()=>C$(e.networkMode)&&e.canRun(),f=m=>{var v;n||(n=!0,(v=e.onSuccess)==null||v.call(e,m),i==null||i(),a.resolve(m))},h=m=>{var v;n||(n=!0,(v=e.onError)==null||v.call(e,m),i==null||i(),a.reject(m))},p=()=>new Promise(m=>{var v;i=x=>{(n||u())&&m(x)},(v=e.onPause)==null||v.call(e)}).then(()=>{var m;i=void 0,n||(m=e.onContinue)==null||m.call(e)}),g=()=>{if(n)return;let m;const v=r===0?e.initialPromise:void 0;try{m=v??e.fn()}catch(x){m=Promise.reject(x)}Promise.resolve(m).then(f).catch(x=>{var j;if(n)return;const y=e.retry??(mg?0:3),b=e.retryDelay??lz,_=typeof b=="function"?b(r,x):b,S=y===!0||typeof y=="number"&&r<y||typeof y=="function"&&y(r,x);if(t||!S){h(x);return}r++,(j=e.onFail)==null||j.call(e,r,x),tz(_).then(()=>u()?void 0:p()).then(()=>{t?h(x):g()})})};return{promise:a,cancel:o,continue:()=>(i==null||i(),a),cancelRetry:s,continueRetry:l,canStart:d,start:()=>(d()?g():p().then(g),a)}}var cz=e=>setTimeout(e,0);function uz(){let e=[],t=0,r=s=>{s()},n=s=>{s()},i=cz;const a=s=>{t?e.push(s):i(()=>{r(s)})},o=()=>{const s=e;e=[],s.length&&i(()=>{n(()=>{s.forEach(l=>{r(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||o()}return l},batchCalls:s=>(...l)=>{a(()=>{s(...l)})},schedule:a,setNotifyFunction:s=>{r=s},setBatchNotifyFunction:s=>{n=s},setScheduler:s=>{i=s}}}var nr=uz(),To,LA,R$=(LA=class{constructor(){Ae(this,To)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),JW(this.gcTime)&&we(this,To,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(mg?1/0:5*60*1e3))}clearGcTimeout(){z(this,To)&&(clearTimeout(z(this,To)),we(this,To,void 0))}},To=new WeakMap,LA),_l,$o,Zr,Ro,Yt,rf,Mo,Nn,Oi,FA,dz=(FA=class extends R${constructor(t){super();Ae(this,Nn);Ae(this,_l);Ae(this,$o);Ae(this,Zr);Ae(this,Ro);Ae(this,Yt);Ae(this,rf);Ae(this,Mo);we(this,Mo,!1),we(this,rf,t.defaultOptions),this.setOptions(t.options),this.observers=[],we(this,Ro,t.client),we(this,Zr,z(this,Ro).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,we(this,_l,hz(this.options)),this.state=t.state??z(this,_l),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=z(this,Yt))==null?void 0:t.promise}setOptions(t){this.options={...z(this,rf),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&z(this,Zr).remove(this)}setData(t,r){const n=rz(this.state.data,t,this.options);return Vt(this,Nn,Oi).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){Vt(this,Nn,Oi).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=z(this,Yt))==null?void 0:n.promise;return(i=z(this,Yt))==null||i.cancel(t),r?r.then(On).catch(On):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(z(this,_l))}isActive(){return this.observers.some(t=>ez(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===W1||this.state.dataUpdateCount+this.state.errorUpdate
361Count===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>w0(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!ZW(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=z(this,Yt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=z(this,Yt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),z(this,Zr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(z(this,Yt)&&(z(this,Mo)?z(this,Yt).cancel({revert:!0}):z(this,Yt).cancelRetry()),this.scheduleGc()),z(this,Zr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Vt(this,Nn,Oi).call(this,{type:"invalidate"})}fetch(t,r){var u,d,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(z(this,Yt))return z(this,Yt).continueRetry(),z(this,Yt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(p=>p.options.queryFn);h&&this.setOptions(h.options)}const n=new AbortController,i=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(we(this,Mo,!0),n.signal)})},a=()=>{const h=k$(this.options,r),g=(()=>{const m={client:z(this,Ro),queryKey:this.queryKey,meta:this.meta};return i(m),m})();return we(this,Mo,!1),this.options.persister?this.options.persister(h,g,this):h(g)},s=(()=>{const h={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:z(this,Ro),state:this.state,fetchFn:a};return i(h),h})();(u=this.options.behavior)==null||u.onFetch(s,this),we(this,$o,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=s.fetchOptions)==null?void 0:d.meta))&&Vt(this,Nn,Oi).call(this,{type:"fetch",meta:(f=s.fetchOptions)==null?void 0:f.meta});const l=h=>{var p,g,m,v;hy(h)&&h.silent||Vt(this,Nn,Oi).call(this,{type:"error",error:h}),hy(h)||((g=(p=z(this,Zr).config).onError)==null||g.call(p,h,this),(v=(m=z(this,Zr).config).onSettled)==null||v.call(m,this.state.data,h,this)),this.scheduleGc()};return we(this,Yt,$$({initialPromise:r==null?void 0:r.initialPromise,fn:s.fetchFn,abort:n.abort.bind(n),onSuccess:h=>{var p,g,m,v;if(h===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(h)}catch(x){l(x);return}(g=(p=z(this,Zr).config).onSuccess)==null||g.call(p,h,this),(v=(m=z(this,Zr).config).onSettled)==null||v.call(m,h,this.state.error,this),this.scheduleGc()},onError:l,onFail:(h,p)=>{Vt(this,Nn,Oi).call(this,{type:"failed",failureCount:h,error:p})},onPause:()=>{Vt(this,Nn,Oi).call(this,{type:"pause"})},onContinue:()=>{Vt(this,Nn,Oi).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0})),z(this,Yt).start()}},_l=new WeakMap,$o=new WeakMap,Zr=new WeakMap,Ro=new WeakMap,Yt=new WeakMap,rf=new WeakMap,Mo=new WeakMap,Nn=new WeakSet,Oi=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...fz(n.data,this.options),fetchMeta:t.meta??null};case"success":return we(this,$o,void 0),{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return hy(i)&&i.revert&&z(this,$o)?{...z(this,$o),fetchStatus:"idle"}
vendor: 3,703 bytes, line 361
361:{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),nr.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),z(this,Zr).notify({query:this,type:"updated",action:t})})},FA);function fz(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:C$(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function hz(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Jn,BA,pz=(BA=class extends pg{constructor(t={}){super();Ae(this,Jn);this.config=t,we(this,Jn,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??U1(i,r);let o=this.get(a);return o||(o=new dz({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){z(this,Jn).has(t.queryHash)||(z(this,Jn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=z(this,Jn).get(t.queryHash);r&&(t.destroy(),r===t&&z(this,Jn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){nr.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return z(this,Jn).get(t)}getAll(){return[...z(this,Jn).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>kO(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>kO(t,n)):r}notify(t){nr.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){nr.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){nr.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Jn=new WeakMap,BA),Zn,er,Io,ei,fa,UA,mz=(UA=class extends R${constructor(t){super();Ae(this,ei);Ae(this,Zn);Ae(this,er);Ae(this,Io);this.mutationId=t.mutationId,we(this,er,t.mutationCache),we(this,Zn,[]),this.state=t.state||gz(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){z(this,Zn).includes(t)||(z(this,Zn).push(t),this.clearGcTimeout(),z(this,er).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){we(this,Zn,z(this,Zn).filter(r=>r!==t)),this.scheduleGc(),z(this,er).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){z(this,Zn).length||(this.state.status==="pending"?this.scheduleGc():z(this,er).remove(this))}continue(){var t;return((t=z(this,Io))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,o,s,l,u,d,f,h,p,g,m,v,x,y,b,_,S,j,O,P;const r=()=>{Vt(this,ei,fa).call(this,{type:"continue"})};we(this,Io,$$({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(N,A)=>{Vt(this,ei,fa).call(this,{type:"failed",failureCount:N,error:A})},onPause:()=>{Vt(this,ei,fa).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>z(this,er).canRun(this)}));const n=this.state.status==="pending",i=!z(this,Io).canStart();try{if(n)r();else{Vt(this,ei,fa).call(this,{type:"pending",variables:t,isPaused:i}),await((o=(a=z(this,er).config).onMutate)==null?void 0:o.call(a,t,this));
361const A=await((l=(s=this.options).onMutate)==null?void 0:l.call(s,t));A!==this.state.context&&Vt(this,ei,fa).call(this,{type:"pending",context:A,variables:t,isPaused:i})}const N=await z(this,Io).start();return await((d=(u=z(this,er).config).onSuccess)==null?void 0:d.call(u,N,t,this.state.context,this)),await((h=(f=this.options).onSuccess)==null?void 0:h.call(f,N,t,this.state.context)),await((g=(p=z(this,er).config).onSettled)==null?void 0:g.call(p,N,null,this.state.variables,this.state.context,this)),await((v=(m=this.options).onSettled)==null?void 0:v.call(m,N,null,t,this.state.context)),Vt(this,ei,fa).call(this,{type:"success",data:N}),N}catch(N){try{throw await((y=(x=z(this,er).config).onError)==null?void 0:y.call(x,N,t,this.state.context,this)),await((_=(b=this.options).onError)==null?void 0:_.call(b,N,t,this.state.context)),await((j=(S=z(this,er).config).onSettled)==null?void 0:j.call(S,void 0,N,this.state.variables,this.state.context,this)),await((P=(O=this.options).onSettled)==null?void 0:P.call(O,void 0,N,t,this.state.context)),N}finally{Vt(this,ei,fa).call(this,{type:"error",error:N})}}finally{z(this,er).runNext(this)}}},Zn=new WeakMap,er=new WeakMap,Io=new WeakMap,ei=new WeakSet,fa=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),nr.batch(()=>{z(this,Zn).forEach(n=>{n.onMutationUpdate(t)}),z(this,er).notify({mutation:this,type:"updated",action:t})})},UA);function gz(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ci,En,nf,WA,vz=(WA=class extends pg{constructor(t={}){super();Ae(this,Ci);Ae(this,En);Ae(this,nf);this.config=t,we(this,Ci,new Set),we(this,En,new Map),we(this,nf,0)}build(t,r,n){const i=new mz({mutationCache:this,mutationId:++Rf(this,nf)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){z(this,Ci).add(t);const r=nh(t);if(typeof r=="string"){const n=z(this,En).get(r);n?n.push(t):z(this,En).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(z(this,Ci).delete(t)){const r=nh(t);if(typeof r=="string"){const n=z(this,En).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&z(this,En).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=nh(t);if(typeof r=="string"){const n=z(this,En).get(r),i=n==null?void 0:n.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=nh(t);if(typeof r=="string"){const i=(n=z(this,En).get(r))==null?void 0:n.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){nr.batch(()=>{z(this,Ci).forEach(t=>{this.notify({type:"removed",mutation:t})}),z(this,Ci).clear(),z(this,En).clear()})}getAll(){return Array.from(z(this,Ci))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>AO(r,n))}findAll(t={}){return this.getAll().filter(r=>AO(t,r))}notify(t){nr.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>
vendor: 6,897 bytes, lines 361-370
361r.state.isPaused);return nr.batch(()=>Promise.all(t.map(r=>r.continue().catch(On))))}},Ci=new WeakMap,En=new WeakMap,nf=new WeakMap,WA);function nh(e){var t;return(t=e.options.scope)==null?void 0:t.id}function $O(e){return{onFetch:(t,r)=>{var d,f,h,p,g;const n=t.options,i=(h=(f=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:f.fetchMore)==null?void 0:h.direction,a=((p=t.state.data)==null?void 0:p.pages)||[],o=((g=t.state.data)==null?void 0:g.pageParams)||[];let s={pages:[],pageParams:[]},l=0;const u=async()=>{let m=!1;const v=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},x=k$(t.options,t.fetchOptions),y=async(b,_,S)=>{if(m)return Promise.reject();if(_==null&&b.pages.length)return Promise.resolve(b);const O=(()=>{const C={client:t.client,queryKey:t.queryKey,pageParam:_,direction:S?"backward":"forward",meta:t.options.meta};return v(C),C})(),P=await x(O),{maxPages:N}=t.options,A=S?iz:nz;return{pages:A(b.pages,P,N),pageParams:A(b.pageParams,_,N)}};if(i&&a.length){const b=i==="backward",_=b?yz:RO,S={pages:a,pageParams:o},j=_(n,S);s=await y(S,j,b)}else{const b=e??a.length;do{const _=l===0?o[0]??n.initialPageParam:RO(n,s);if(l>0&&_==null)break;s=await y(s,_),l++}while(l<b)}return s};t.options.persister?t.fetchFn=()=>{var m,v;return(v=(m=t.options).persister)==null?void 0:v.call(m,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=u}}}function RO(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function yz(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var pt,ja,Oa,jl,Ol,Pa,Pl,Nl,zA,xz=(zA=class{constructor(e={}){Ae(this,pt);Ae(this,ja);Ae(this,Oa);Ae(this,jl);Ae(this,Ol);Ae(this,Pa);Ae(this,Pl);Ae(this,Nl);we(this,pt,e.queryCache||new pz),we(this,ja,e.mutationCache||new vz),we(this,Oa,e.defaultOptions||{}),we(this,jl,new Map),we(this,Ol,new Map),we(this,Pa,0)}mount(){Rf(this,Pa)._++,z(this,Pa)===1&&(we(this,Pl,A$.subscribe(async e=>{e&&(await this.resumePausedMutations(),z(this,pt).onFocus())})),we(this,Nl,Op.subscribe(async e=>{e&&(await this.resumePausedMutations(),z(this,pt).onOnline())})))}unmount(){var e,t;Rf(this,Pa)._--,z(this,Pa)===0&&((e=z(this,Pl))==null||e.call(this),we(this,Pl,void 0),(t=z(this,Nl))==null||t.call(this),we(this,Nl,void 0))}isFetching(e){return z(this,pt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return z(this,ja).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=z(this,pt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=z(this,pt).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(w0(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return z(this,pt).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=z(this,pt).get(n.queryHash),a=i==null?void 0:i.state.data,o=QW(t,a);if(o!==void 0)return z(this,pt).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return nr.batch(()=>z(this,pt).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=z(this,pt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=z(this,pt);nr.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=z(this,pt);return nr.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=nr.batch(()=>z(this,pt).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(On).catch(On)}invalidateQueries(e,t={}){return nr.batch(()=>(z(this,pt).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=nr.batch(()=>z(this,pt).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,r);return r.throwOnError||(a=a.catch(On)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(On)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=z(this,pt).build(this,t);return r.isStaleByTime(w0(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(On).catch(On)}fetchInfiniteQuery(e){return e.behavior=$O(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(On).catch(On)}ensureInfiniteQueryData(e){return e.behavior=$O(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Op.isOnline()?z(this,ja).resumePausedMutations():Promise.resolve()}getQueryCache(){return z(this,pt)}getMutationCache(){return z(this,ja)}getDefaultOptions(){return z(this,Oa)}setDefaultOptions(e){we(this,Oa,e)}setQueryDefaults(e,t){z(this,jl).set(ld(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...z(this,jl).values()],r={};return t.forEach(n=>{cd(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){z(this,Ol).set(ld(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...z(this,Ol).values()],r={};return t.forEach(n=>{cd(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...z(this,Oa).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=U1(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===W1&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...z(this,Oa).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){z(this,pt).clear(),z(this,ja).clear()}},pt=new WeakMap,ja=new WeakMap,Oa=new WeakMap,jl=new WeakMap,Ol=new WeakMap,Pa=new WeakMap,Pl=new WeakMap,Nl=new WeakMap,zA),bz=w.createContext(void 0),wz=({client:e,children:t})=>(w.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),c.jsx(bz.Provider,{value:e,children:t}));/** 362 * @remix-run/router v1.23.0 363 * 364 * Copyright (c) Remix Software Inc. 365 * 366 * This source code is licensed under the MIT license found in the 367 * LICENSE.md file in the root directory of this source tree. 368 * 369 * @license MIT 370 */function ud(){return ud=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
vendor: 4,127 bytes, line 370
370for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ud.apply(this,arguments)}var ka;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(ka||(ka={}));const MO="popstate";function Sz(e){e===void 0&&(e={});function t(n,i){let{pathname:a,search:o,hash:s}=n.location;return _0("",{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:Pp(i)}return jz(t,r,null,e)}function bt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function M$(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function _z(){return Math.random().toString(36).substr(2,8)}function IO(e,t){return{usr:e.state,key:e.key,idx:t}}function _0(e,t,r,n){return r===void 0&&(r=null),ud({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Pc(t):t,{state:r,key:t&&t.key||n||_z()})}function Pp(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 Pc(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 jz(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:a=!1}=n,o=i.history,s=ka.Pop,l=null,u=d();u==null&&(u=0,o.replaceState(ud({},o.state,{idx:u}),""));function d(){return(o.state||{idx:null}).idx}function f(){s=ka.Pop;let v=d(),x=v==null?null:v-u;u=v,l&&l({action:s,location:m.location,delta:x})}function h(v,x){s=ka.Push;let y=_0(m.location,v,x);u=d()+1;let b=IO(y,u),_=m.createHref(y);try{o.pushState(b,"",_)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;i.location.assign(_)}a&&l&&l({action:s,location:m.location,delta:1})}function p(v,x){s=ka.Replace;let y=_0(m.location,v,x);u=d();let b=IO(y,u),_=m.createHref(y);o.replaceState(b,"",_),a&&l&&l({action:s,location:m.location,delta:0})}function g(v){let x=i.location.origin!=="null"?i.location.origin:i.location.href,y=typeof v=="string"?v:Pp(v);return y=y.replace(/ $/,"%20"),bt(x,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,x)}let m={get action(){return s},get location(){return e(i,o)},listen(v){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(MO,f),l=v,()=>{i.removeEventListener(MO,f),l=null}},createHref(v){return t(i,v)},createURL:g,encodeLocation(v){let x=g(v);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:h,replace:p,go(v){return o.go(v)}};return m}var DO;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(DO||(DO={}));function Oz(e,t,r){return r===void 0&&(r="/"),Pz(e,t,r,!1)}function Pz(e,t,r,n){let i=typeof t=="string"?Pc(t):t,a=z1(i.pathname||"/",r);if(a==null)return null;let o=I$(e);Nz(o);let s=null;for(let l=0;s==null&&l<o.length;++l){let u=Lz(a);s=Iz(o[l],u,n)}return s}function I$(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("/")&&(bt(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. 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=Ba([n,l.relativePath]),d=r.concat(l);a.children&&a.children.length>0&&(bt(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),I$(a.children,t,d,u)),!(a.path==null&&!a.index)&&t.push({path:u,score:Rz(u,a.index),routesMeta:d})};return e.forEach((a,o)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))i(a,o);else for(let l of D$(a.path))i(a,o,l)}),t}function D$(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=D$(n.join("/")),s=[];return s.push(...o.map(l=>
vendor: 10,313 bytes, lines 370-379
370l===""?a:[a,l].join("/"))),i&&s.push(...o),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function Nz(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Mz(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Ez=/^:[\w-]+$/,kz=3,Az=2,Cz=1,Tz=10,$z=-2,LO=e=>e==="*";function Rz(e,t){let r=e.split("/"),n=r.length;return r.some(LO)&&(n+=$z),t&&(n+=Az),r.filter(i=>!LO(i)).reduce((i,a)=>i+(Ez.test(a)?kz:a===""?Cz:Tz),n)}function Mz(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 Iz(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,d=a==="/"?t:t.slice(a.length)||"/",f=FO({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},d),h=l.route;if(!f&&u&&r&&!n[n.length-1].route.index&&(f=FO({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!f)return null;Object.assign(i,f.params),o.push({params:i,pathname:Ba([a,f.pathname]),pathnameBase:Wz(Ba([a,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(a=Ba([a,f.pathnameBase]))}return o}function FO(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=Dz(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,d,f)=>{let{paramName:h,isOptional:p}=d;if(h==="*"){let m=s[f]||"";o=a.slice(0,a.length-m.length).replace(/(.)\/+$/,"$1")}const g=s[f];return p&&!g?u[h]=void 0:u[h]=(g||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:o,pattern:e}}function Dz(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),M$(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 Lz(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return M$(!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 z1(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)||"/"}function Fz(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?Pc(e):e;return{pathname:r?r.startsWith("/")?r:Bz(r,t):t,search:zz(n),hash:Hz(i)}}function Bz(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 py(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 Uz(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function H1(e,t){let r=Uz(e);return t?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function q1(e,t,r,n){n===void 0&&(n=!1);let i;typeof e=="string"?i=Pc(e):(i=ud({},e),bt(!i.pathname||!i.pathname.includes("?"),py("?","pathname","search",i)),bt(!i.pathname||!i.pathname.includes("#"),py("#","pathname","hash",i)),bt(!i.search||!i.search.includes("#"),py("#","search","hash",i)));let a=e===""||i.pathname==="",o=a?"/":i.pathname,s;if(o==null)s=r;else{let f=t.length-1;if(!n&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),f-=1;i.pathname=h.join("/")}s=f>=0?t[f]:"/"}let l=Fz(i,s),u=o&&o!=="/"&&o.endsWith("/"),d=(a||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}const Ba=e=>e.join("/").replace(/\/\/+/g,"/"),Wz=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),zz=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Hz=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function qz(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const L$=["post","put","patch","delete"];new Set(L$);const Vz=["get",...L$];new Set(Vz);/** 371 * React Router v6.30.1 372 * 373 * Copyright (c) Remix Software Inc. 374 * 375 * This source code is licensed under the MIT license found in the 376 * LICENSE.md file in the root directory of this source tree. 377 * 378 * @license MIT 379 */function dd(){return dd=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},dd.apply(this,arguments)}const V1=w.createContext(null),Kz=w.createContext(null),Xa=w.createContext(null),gg=w.createContext(null),Qa=w.createContext({outlet:null,matches:[],isDataRoute:!1}),F$=w.createContext(null);function Gz(e,t){let{relative:r}=t===void 0?{}:t;Nc()||bt(!1);let{basename:n,navigator:i}=w.useContext(Xa),{hash:a,pathname:o,search:s}=U$(e,{relative:r}),l=o;return n!=="/"&&(l=o==="/"?n:Ba([n,o])),i.createHref({pathname:l,search:s,hash:a})}function Nc(){return w.useContext(gg)!=null}function Kr(){return Nc()||bt(!1),w.useContext(gg).location}function B$(e){w.useContext(Xa).static||w.useLayoutEffect(e)}function Ji(){let{isDataRoute:e}=w.useContext(Qa);return e?s9():Yz()}function Yz(){Nc()||bt(!1);let e=w.useContext(V1),{basename:t,future:r,navigator:n}=w.useContext(Xa),{matches:i}=w.useContext(Qa),{pathname:a}=Kr(),o=JSON.stringify(H1(i,r.v7_relativeSplatPath)),s=w.useRef(!1);return B$(()=>{s.current=!0}),w.useCallback(function(u,d){if(d===void 0&&(d={}),!s.current)return;if(typeof u=="number"){n.go(u);return}let f=q1(u,JSON.parse(o),a,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Ba([t,f.pathname])),(d.replace?n.replace:n.push)(f,d.state,d)},[t,n,o,a,e])}function U$(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=w.useContext(Xa),{matches:i}=w.useContext(Qa),{pathname:a}=Kr(),o=JSON.stringify(H1(i,n.v7_relativeSplatPath));return w.useMemo(()=>q1(e,JSON.parse(o),a,r==="path"),[e,o,a,r])}function Xz(e,t){return Qz(e,t)}function Qz(e,t,r,n){Nc()||bt(!1);let{navigator:i}=w.useContext(Xa),{matches:a}=w.useContext(Qa),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=Kr(),d;if(t){var f;let v=typeof t=="string"?Pc(t):t;l==="/"||(f=v.pathname)!=null&&f.startsWith(l)||bt(!1),d=v}else d=u;let h=d.pathname||"/",p=h;if(l!=="/"){let v=l.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(v.length).join("/")}let g=Oz(e,{pathname:p}),m=r9(g&&g.map(v=>Object.assign({},v,{params:Object.assign({},s,v.params),pathname:Ba([l,i.encodeLocation?i.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?l:Ba([l,i.encodeLocation?i.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),a,r,n);return t&&m?w.createElement(gg.Provider,{value:{location:dd({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:ka.Pop}},m):m}function Jz(){let e=o9(),t=qz(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 w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},t),r?w.createElement("pre",{style:i},r):null,null)}const Zz=w.createElement(Jz,null);class e9 extends w.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?w.createElement(Qa.Provider,{value:this.props.routeContext},w.createElement(F$.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function t9(e){let{routeContext:t,match:r,children:n}=e,i=w.useContext(V1);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),w.createElement(Qa.Provider,{value:t},n)}function r9(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 d=o.findIndex(f=>f.route.id&&(s==null?void 0:s[f.route.id])!==void 0);d>=0||bt(!1),o=o.slice(0,Math.min(o.length,d+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let d=0;d<o.length;d++){let f=o[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=d),f.route.id){let{loaderData:h,errors:p}=r,g=f.route.loader&&h[f.route.id]===void 0&&(!p||p[f.route.id]===void 0);if(f.route.lazy||g){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((d,f,h)=>{let p,g=!1,m=null,v=null;r&&(p=s&&f.route.id?s[f.route.id]:void 0,m=f.route.errorElement||Zz,l&&(u<0&&h===0?(g=!0,v=null):u===h&&(g=!0,v=f.route.hydrateFallbackElement||null)));let x=t.concat(o.slice(0,h+1)),y=()=>{let b;return p?b=m:g?b=v:f.route.Component?b=w.createElement(f.route.Component,null):f.route.element?b=f.route.element:b=d,w.createElement(t9,{match:f,routeContext:{outlet:d,matches:x,isDataRoute:r!=null},children:b})};return r&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?w.createElement(e9,{location:r.location,revalidation:r.revalidation,component:m,error:p,children:y(),routeC
379ontext:{outlet:null,matches:x,isDataRoute:!0}}):y()},null)}var W$=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(W$||{}),Np=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}(Np||{});function n9(e){let t=w.useContext(V1);return t||bt(!1),t}function i9(e){let t=w.useContext(Kz);return t||bt(!1),t}function a9(e){let t=w.useContext(Qa);return t||bt(!1),t}function z$(e){let t=a9(),r=t.matches[t.matches.length-1];return r.route.id||bt(!1),r.route.id}function o9(){var e;let t=w.useContext(F$),r=i9(Np.UseRouteError),n=z$(Np.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function s9(){let{router:e}=n9(W$.UseNavigateStable),t=z$(Np.UseNavigateStable),r=w.useRef(!1);return B$(()=>{r.current=!0}),w.useCallback(function(i,a){a===void 0&&(a={}),r.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,dd({fromRouteId:t},a)))},[e,t])}function l9(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function j0(e){let{to:t,replace:r,state:n,relative:i}=e;Nc()||bt(!1);let{future:a,static:o}=w.useContext(Xa),{matches:s}=w.useContext(Qa),{pathname:l}=Kr(),u=Ji(),d=q1(t,H1(s,a.v7_relativeSplatPath),l,i==="path"),f=JSON.stringify(d);return w.useEffect(()=>u(JSON.parse(f),{replace:r,state:n,relative:i}),[u,f,i,r,n]),null}function ot(e){bt(!1)}function c9(e){let{basename:t="/",children:r=null,location:n,navigationType:i=ka.Pop,navigator:a,static:o=!1,future:s}=e;Nc()&&bt(!1);let l=t.replace(/^\/*/,"/"),u=w.useMemo(()=>({basename:l,navigator:a,static:o,future:dd({v7_relativeSplatPath:!1},s)}),[l,s,a,o]);typeof n=="string"&&(n=Pc(n));let{pathname:d="/",search:f="",hash:h="",state:p=null,key:g="default"}=n,m=w.useMemo(()=>{let v=z1(d,l);return v==null?null:{location:{pathname:v,search:f,hash:h,state:p,key:g},navigationType:i}},[l,d,f,h,p,g,i]);return m==null?null:w.createElement(Xa.Provider,{value:u},w.createElement(gg.Provider,{children:r,value:m}))}function u9(e){let{children:t,location:r}=e;return Xz(O0(t),r)}new Promise(()=>{});function O0(e,t){t===void 0&&(t=[]);let r=[];return w.Children.forEach(e,(n,i)=>{if(!w.isValidElement(n))return;let a=[...t,i];if(n.type===w.Fragment){r.push.apply(r,O0(n.props.children,a));return}n.type!==ot&&bt(!1),!n.props.index||!n.props.children||bt(!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=O0(n.props.children,a)),r.push(o)}),r}/** 380 * React Router DOM v6.30.1 381 * 382 * Copyright (c) Remix Software Inc. 383 * 384 * This source code is licensed under the MIT license found in the 385 * LICENSE.md file in the root directory of this source tree. 386 * 387 * @license MIT 388 */function P0(){return P0=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},P0.apply(this,arguments)}function d9(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 f9(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function h9(e,t){return e.button===0&&(!t||t==="_self")&&!f9(e)}function N0(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(i=>[r,i]):[[r,n]])},[]))}function p9(e,t){let r=N0(e);return t&&t.forEach((n,i)=>
388{r.has(i)||t.getAll(i).forEach(a=>{r.append(i,a)})}),r}const m9=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],g9="6";try{window.__reactRouterVersion=g9}catch{}const v9="startTransition",BO=Cw[v9];function y9(e){let{basename:t,children:r,future:n,window:i}=e,a=w.useRef();a.current==null&&(a.current=Sz({window:i,v5Compat:!0}));let o=a.current,[s,l]=w.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},d=w.useCallback(f=>{u&&BO?BO(()=>l(f)):l(f)},[l,u]);return w.useLayoutEffect(()=>o.listen(d),[o,d]),w.useEffect(()=>l9(n),[n]),w.createElement(c9,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:o,future:n})}const x9=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",b9=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Re=w.forwardRef(function(t,r){let{onClick:n,relative:i,reloadDocument:a,replace:o,state:s,target:l,to:u,preventScrollReset:d,viewTransition:f}=t,h=d9(t,m9),{basename:p}=w.useContext(Xa),g,m=!1;if(typeof u=="string"&&b9.test(u)&&(g=u,x9))try{let b=new URL(window.location.href),_=u.startsWith("//")?new URL(b.protocol+u):new URL(u),S=z1(_.pathname,p);_.origin===b.origin&&S!=null?u=S+_.search+_.hash:m=!0}catch{}let v=Gz(u,{relative:i}),x=w9(u,{replace:o,state:s,target:l,preventScrollReset:d,relative:i,viewTransition:f});function y(b){n&&n(b),b.defaultPrevented||x(b)}return w.createElement("a",P0({},h,{href:g||v,onClick:m||a?n:y,ref:r,target:l}))});var UO;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(UO||(UO={}));var WO;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(WO||(WO={}));function w9(e,t){let{target:r,replace:n,state:i,preventScrollReset:a,relative:o,viewTransition:s}=t===void 0?{}:t,l=Ji(),u=Kr(),d=U$(e,{relative:o});return w.useCallback(f=>{if(h9(f,r)){f.preventDefault();let h=n!==void 0?n:Pp(u)===Pp(d);l(e,{replace:h,state:i,preventScrollReset:a,relative:o,viewTransition:s})}},[u,l,d,n,i,r,e,a,o,s])}function H$(e){let t=w.useRef(N0(e)),r=w.useRef(!1),n=Kr(),i=w.useMemo(()=>p9(n.search,r.current?null:t.current),[n.search]),a=Ji(),o=w.useCallback((s,l)=>{const u=N0(typeof s=="function"?s(i):s);r.current=!0,a("?"+u,l)},[a,i]);return[i,o]}var ri=function(){return ri=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},ri.apply(this,arguments)};function Ec(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 S9(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(d){try{u(n.next(d))}catch(f){o(f)}}function l(d){try{u(n.throw(d))}catch(f){o(f)}}function u(d){d.done?a(d.value):i(d.value).then(s,l)}u((n=n.apply(e,t||[])).next())})}function _9(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}const j9=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class K1 extends Error{constructor(t,r="FunctionsError",n){super(t),this.name=r,this.context=n}}class O9 extends K1{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class zO extends K1{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class HO extends K1{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var E0;(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"})(E0||(E0={}));class P9{constructor(t,{headers:r={},customFetch:n,region:i=E0.Any}={}){this.url=t,this.headers=r,this.region=i,this.fetch=j9(n)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return S9(this,arguments,void 0,function*(r,n={}){var i;let a,o;try{const{headers:s,method:l,body:u,signal:d,timeout:f}=n;let h={},{region:p}=n;p||(p=this.region);const g=new URL(`${this.url}/${r}`);p&&p!=="any"&&(h["x-region"]=p,g.searchParams.set("forceFunctionRegion",p));let m;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",m=u):typeof u=="string"?(h["Content-Type"]="text/plain",m=u):typeof FormData<"u"&&u instanceof FormData?m=u:(h["Content-Type"]="application/json",m=JSON.stringify(u)):u&&typeof u!="string"&&!(typeof Blob<"u"&&u instanceof Blob)&&!(u instanceof ArrayBuffer)&&!(typeof FormData<"u"&&u instanceof FormData)?m=JSON.stringify(u):m=u;let v=d;f&&(o=new AbortController,a=setTimeout(()=>
388o.abort(),f),d?(v=o.signal,d.addEventListener("abort",()=>o.abort())):v=o.signal);const x=yield this.fetch(g.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},h),this.headers),s),body:m,signal:v}).catch(S=>{throw new O9(S)}),y=x.headers.get("x-relay-error");if(y&&y==="true")throw new zO(x);if(!x.ok)throw new HO(x);let b=((i=x.headers.get("Content-Type"))!==null&&i!==void 0?i:"text/plain").split(";")[0].trim(),_;return b==="application/json"?_=yield x.json():b==="application/octet-stream"||b==="application/pdf"?_=yield x.blob():b==="text/event-stream"?_=x:b==="multipart/form-data"?_=yield x.formData():_=yield x.text(),{data:_,error:null,response:x}}catch(s){return{data:null,error:s,response:s instanceof HO||s instanceof zO?s.context:void 0}}finally{a&&clearTimeout(a)}})}}var N9=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}},E9=class{constructor(e){var t,r;this.shouldThrowOnError=!1,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,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}then(e,t){var r=this;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");const n=this.fetch;let i=n(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async a=>{let o=null,s=null,l=null,u=a.status,d=a.statusText;if(a.ok){var f,h;if(r.method!=="HEAD"){var p;const x=await a.text();x===""||(r.headers.get("Accept")==="text/csv"||r.headers.get("Accept")&&(!((p=r.headers.get("Accept"))===null||p===void 0)&&p.includes("application/vnd.pgrst.plan+text"))?s=x:s=JSON.parse(x))}const m=(f=r.headers.get("Prefer"))===null||f===void 0?void 0:f.match(/count=(exact|planned|estimated)/),v=(h=a.headers.get("content-range"))===null||h===void 0?void 0:h.split("/");m&&v&&v.length>1&&(l=parseInt(v[1])),r.isMaybeSingle&&r.method==="GET"&&Array.isArray(s)&&(s.length>1?(o={code:"PGRST116",details:`Results contain ${s.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},s=null,l=null,u=406,d="Not Acceptable"):s.length===1?s=s[0]:s=null)}else{var g;const m=await a.text();try{o=JSON.parse(m),Array.isArray(o)&&a.status===404&&(s=[],o=null,u=200,d="OK")}catch{a.status===404&&m===""?(u=204,d="No Content"):o={message:m}}if(o&&r.isMaybeSingle&&(!(o==null||(g=o.details)===null||g===void 0)&&g.includes("0 rows"))&&(o=null,u=200,d="OK"),o&&r.shouldThrowOnError)throw new N9(o)}return{error:o,data:s,count:l,status:u,statusText:d}});return this.shouldThrowOnError||(i=i.catch(a=>{var o;let s="";const l=a==null?void 0:a.cause;if(l){var u,d,f,h;const g=(u=l==null?void 0:l.message)!==null&&u!==void 0?u:"",m=(d=l==null?void 0:l.code)!==null&&d!==void 0?d:"";s=`${(f=a==null?void 0:a.name)!==null&&f!==void 0?f:"FetchError"}: ${a==null?void 0:a.message}`,s+=` 389 390Caused by: ${(h=l==null?void 0:l.name)!==null&&h!==void 0?h:"Error"}: ${g}`,m&&(s+=` (${m})`),l!=null&&l.stack&&(s+=` 391${l.stack}`)}else{var p;s=(p=a==null?void 0:a.stack)!==null&&p!==void 0?p:""}return{error:{message:`${(o=a==null?void 0:a.name)!==null&&o!==void 0?o:"FetchError"}: ${a==null?void 0:a.message}`,details:s,hint:"",code:""},data:null,count:null,status:0,statusText:""}})),i.then(e,t)}returns(){return this}overrideTypes(){return this}},k9=class extends E9{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.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}
391explain({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 qO=new RegExp("[,()]");var Is=class extends k9{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"&&qO.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"&&qO.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).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}},A9=class{constructor(e,{headers:t={},schema:r,fetch:n}){this.url=e,this.headers=new Headers(t),this.schema=r,this.fetch=n}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 Is({method:i,url:s,headers:l,schema:this.schema,fetch:this.fetch})}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 Is({method:i,url:a,headers:o,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch})}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((d,f)=>d.concat(Object.keys(f)),[]);if(u.length>0){const d=[...new Set(u)].map(f=>`"${f}"`);s.searchParams.set("columns",d.join(","))}}return new Is({method:o,url:s,headers:l,schema:this.schema,body:e,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch})}update(e,{count:t}={}){var r;const n="PATCH",{url:i,headers:a}=this.cloneRequestState();return t&&a.append("Prefer",`count=${t}`),new Is({method:n,url:i,headers:a,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch})}delete({count:e}={}){var t;const r="DELETE",{url:n,headers:i}=this.cloneRequestState();return e&&i.append("Prefer",`count=${e}`),new Is({method:r,url:n,headers:i,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch})}},C9=class q${constructor(t,{headers:r={},schema:n,fetch:i}={}){this.url=t,this.headers=new Headers(r),this.schemaName=n,this.fetch=i}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new A9(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})}schema(t){return new q$(this.url,{headers:this.headers,schema:t,fetch:this.fetch})}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 d=p=>p!==null&&typeof p=="object"&&(!Array.isArray(p)||p.some(d)),f=n&&Object.values(r).some(d);f?(s="POST",u=r):n||i?(s=n?"HEAD":"GET",Object.entries(r).filter(([p,g])=>g!==void 0).map(([p,g])=>[p,Array.isArray(g)?`{${g.join(",")}}`:`${g}
391`]).forEach(([p,g])=>{l.searchParams.append(p,g)})):(s="POST",u=r);const h=new Headers(this.headers);return f?h.set("Prefer",a?`count=${a},return=minimal`:"return=minimal"):a&&h.set("Prefer",`count=${a}`),new Is({method:s,url:l,headers:h,schema:this.schemaName,body:u,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch})}};class T9{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.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"&&globalThis.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 r=globalThis.process;if(r){const n=r.versions;if(n&&n.node){const i=n.node,a=parseInt(i.replace(/^v/,"").split(".")[0]);return a>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${a} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${a} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 392import ws from "ws" 393new 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.constructor)return t.constructor;let r=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(r+=` 394 395Suggested solution: ${t.workaround}`),new Error(r)}static createWebSocket(t,r){const n=this.getWebSocketConstructor();return new n(t,r)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const $9="2.91.0",R9=`realtime-js/${$9}`,M9="1.0.0",V$="2.0.0",VO=V$,k0=1e4,I9=1e3,D9=100;var ga;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(ga||(ga={}));var Nt;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(Nt||(Nt={}));var An;(function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"})(An||(An={}));var A0;(function(e){e.websocket="websocket"})(A0||(A0={}));var bo;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(bo||(bo={}));class L9{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,d=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},f=Object.keys(d).length===0?"":JSON.stringify(d);if(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(f.length>255)throw new Error(`metadata length ${f.length} exceeds maximum of 255`);const h=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+s.length+o.length+u.length+f.length,p=new ArrayBuffer(this.HEADER_LENGTH+h);let g=new DataView(p),m=0;g.setUint8(m++,this.KINDS.userBroadcastPush),g.setUint8(m++,l.length),g.setUint8(m++,s.length),g.setUint8(m++,o.length),g.setUint8(m++,u.length),g.setUint8(m++,f.length),g.setUint8(m++,r),Array.from(l,x=>g.setUint8(m++,x.charCodeAt(0))),Array.from(s,x=>g.setUint8(m++,x.charCodeAt(0))),Array.from(o,x=>g.setUint8(m++,x.charCodeAt(0))),Array.from(u,x=>g.setUint8(m++,x.charCodeAt(0))),Array.from(f,x=>g.setUint8(m++,x.charCodeAt(0)));var v=new Uint8Array(p.byteLength+n.byteLength);return v.set(new Uint8Array(p),0),v.set(new Uint8Array(n),p.byteLength),v.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 d=n.decode(t.slice(l,l+a));l=l+a;
395const f=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,g={type:this.BROADCAST_EVENT,event:d,payload:p};return o>0&&(g.meta=JSON.parse(f)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:g}}_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)))}}class K${constructor(t,r){this.callback=t,this.timerCalc=r,this.timer=void 0,this.tries=0,this.callback=t,this.timerCalc=r}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var Ve;(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"})(Ve||(Ve={}));const KO=(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]=F9(o,e,t,i),a),{}):{}},F9=(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)?G$(a,o):C0(o)},G$=(e,t)=>{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return z9(t,r)}switch(e){case Ve.bool:return B9(t);case Ve.float4:case Ve.float8:case Ve.int2:case Ve.int4:case Ve.int8:case Ve.numeric:case Ve.oid:return U9(t);case Ve.json:case Ve.jsonb:return W9(t);case Ve.timestamp:return H9(t);case Ve.abstime:case Ve.date:case Ve.daterange:case Ve.int4range:case Ve.int8range:case Ve.money:case Ve.reltime:case Ve.text:case Ve.time:case Ve.timestamptz:case Ve.timetz:case Ve.tsrange:case Ve.tstzrange:return C0(t);default:return C0(t)}},C0=e=>e,B9=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},U9=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},W9=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},z9=(e,t)=>
395{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=>G$(t,s))}return e},H9=e=>typeof e=="string"?e.replace(" ","T"):e,Y$=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};class my{constructor(t,r,n={},i=k0){this.channel=t,this.event=r,this.payload=n,this.timeout=i,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(t){this.timeout=t,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,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()}))}updatePayload(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,r){var n;return this._hasReceived(t)&&r((n=this.receivedResp)===null||n===void 0?void 0:n.response),this.recHooks.push({status:t,callback:r}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=r=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=r,this._matchReceive(r)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,r){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,response:r})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:t,response:r}){this.recHooks.filter(n=>n.status===t).forEach(n=>n.callback(r))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var GO;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(GO||(GO={}));class Tu{constructor(t,r){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const n=(r==null?void 0:r.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(n.state,{},i=>{const{onJoin:a,onLeave:o,onSync:s}=this.caller;this.joinRef=this.channel._joinRef(),this.state=Tu.syncState(this.state,i,a,o),this.pendingDiffs.forEach(l=>{this.state=Tu.syncDiff(this.state,l,a,o)}),this.pendingDiffs=[],s()}),this.channel._on(n.diff,{},i=>{const{onJoin:a,onLeave:o,onSync:s}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(i):(this.state=Tu.syncDiff(this.state,i,a,o),s())}),this.onJoin((i,a,o)=>{this.channel._trigger("presence",{event:"join",key:i,currentPresences:a,newPresences:o})}),this.onLeave((i,a,o)=>{this.channel._trigger("presence",{event:"leave",key:i,currentPresences:a,leftPresences:o})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,r,n,i){const a=this.cloneDeep(t),o=this.transformState(r),s={},l={};return this.map(a,(u,d)=>{o[u]||(l[u]=d)}),this.map(o,(u,d)=>{const f=a[u];if(f){const h=d.map(v=>v.presence_ref),p=f.map(v=>v.presence_ref),g=d.filter(v=>p.indexOf(v.presence_ref)<0),m=f.filter(v=>h.indexOf(v.presence_ref)<0);g.length>0&&(s[u]=g),m.length>0&&(l[u]=m)}else s[u]=d}),this.syncDiff(a,{joins:s,leaves:l},n,i)}static syncDiff(t,r,n,i){const{joins:a,leaves:o}={joins:this.transformState(r.joins),leaves:this.transformState(r.leaves)};return n||(n=()=>{}),i||(i=()=>{}),this.map(a,(s,l)=>{var u;const d=(u=t[s])!==null&&u!==void 0?u:[];if(t[s]=this.cloneDeep(l),d.length>0){const f=t[s].map(p=>p.presence_ref),h=d.filter(p=>f.indexOf(p.presence_ref)<0);t[s].unshift(...h)}n(s,d,l)}),this.map(o,(s,l)=>{let u=t[s];if(!u)return;const d=l.map(f=>f.presence_ref);u=u.filter(f=>d.indexOf(f.presence_ref)<0),t[s]=u,i(s,u,l),u.length===0&&delete t[s]}),t}static map(t,r){return Object.getOwnPropertyNames(t).map(n=>r(n,t[n]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((r,n)=>{const i=t[n];return"metas"in i?r[n]=i.metas.map(a=>(a.presence_ref=a.phx_ref,delete a.phx_ref,delete a.phx_ref_prev,a)):r[n]=i,r},{})}static cloneDeep(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var YO;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(YO||(YO={}));var $u;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})($u||($u={}));var Ni;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(Ni||(Ni={}));class Qs{constructor(t,r={config:{}},n){var i,a;if(this.topic=t,this.params=r,this.socket=n,this.bindings={},this.state=Nt.closed,this.joinedOnce=!1,this.pushBuffer=[],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.timeout=this.socket.timeout,this.joinPush=new my(this,An.join,this.params,this.timeout),this.rejoinTimer=new K$(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Nt.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(o=>o.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Nt.closed,this.socket._remove(this)}),this._onError(o=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,o),this.state=Nt.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Nt.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",o=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,o),this.state=Nt.errored,this.rejoinTimer.scheduleTimeout())}),this._on(An.reply,{},(o,s)=>{this._trigger(this._replyEventName(s),o)}),this.presence=new Tu(this),this.broadcastEndpointURL=Y$(this.socket.endPoint),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`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.state==Nt.closed){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:[],d=!!this.bindings[$u.PRESENCE]&&this.bindings[$u.PRESENCE].length>0||((a=this.params.config.presence)===null||a===void 0?void 0:a.enabled)===!0,f={},h={broadcast:o,presence:Object.assign(Object.assign({},s),{enabled:d}),postgres_changes:u,private:l};this.socket.accessTokenValue&&(f.access_token=this.socket.accessTokenValue),this._onError(p=>t==null?void 0:t(Ni.CHANNEL_ERROR,p)),this._onClose(()=>t==null?void 0:t(Ni.CLOSED)),this.updateJoinPayload(Object.assign({config:h},f)),this.joinedOnce=!0,this._rejoin(r),this.joinPush.receive("ok",async({postgres_changes:p})=>{var g;if(this.socket._isManualToken()||this.socket.setAuth(),p===void 0){t==null||t(Ni.SUBSCRIBED);return}else{const m=this.bindings.postgres_changes,v=(g=m==null?void 0:m.length)!==null&&g!==void 0?g:0,x=[];for(let y=0;y<v;y++){const b=m[y],{filter:{event:_,schema:S,table:j,filter:O}}=b,P=p&&p[y];
395if(P&&P.event===_&&Qs.isFilterValueEqual(P.schema,S)&&Qs.isFilterValueEqual(P.table,j)&&Qs.isFilterValueEqual(P.filter,O))x.push(Object.assign(Object.assign({},b),{id:P.id}));else{this.unsubscribe(),this.state=Nt.errored,t==null||t(Ni.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=x,t&&t(Ni.SUBSCRIBED);return}}).receive("error",p=>{this.state=Nt.errored,t==null||t(Ni.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(p).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(Ni.TIMED_OUT)})}return this}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){return this.state===Nt.joined&&t===$u.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(async()=>await this.subscribe())),this._on(t,r,n)}async httpSend(t,r,n={}){var i;if(r==null)return Promise.reject("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._canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated
395in 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.name==="AbortError"?"timed out":"error"}}else return new Promise(a=>{var o,s,l;const u=this._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.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=Nt.leaving;const r=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(An.close,"leave",this._joinRef())};this.joinPush.destroy();let n=null;return new Promise(i=>{n=new my(this,An.leave,{},t),n.receive("ok",()=>{r(),i("ok")}).receive("timeout",()=>{r(),i("timed out")}).receive("error",()=>{i("error")}),n.send(),this._canPush()||n.trigger("ok",{})}).finally(()=>{n==null||n.destroy()})}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Nt.closed,this.bindings={}}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}_push(t,r,n=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let i=new my(this,t,r,n);return this._canPush()?i.send():this._addToPushBuffer(i),i}_addToPushBuffer(t){if(t.startTimeout(),this.pushBuffer.push(t),this.pushBuffer.length>D9){const r=this.pushBuffer.shift();r&&(r.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${r.event}`,r.payload))}}_onMessage(t,r,n){return r}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,r,n){var i,a;const o=t.toLocaleLowerCase(),{close:s,error:l,leave:u,join:d}=An;if(n&&[s,l,u,d].indexOf(o)>=0&&n!==this._joinRef())return;let h=this._onMessage(o,r,n);if(r&&!h)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(o)?(i=this.bindings.postgres_changes)===null||i===void 0||i.filter(p=>{var g,m,v;return((g=p.filter)===null||g===void 0?void 0:g.event)==="*"||((v=(m=p.filter)===null||m===void 0?void 0:m.event)===null||v===void 0?void 0:v.toLocaleLowerCase())===o}).map(p=>p.callback(h,n)):(a=this.bindings[o])===null||a===void 0||a.filter(p=>{var g,m,v,x,y,b,_,S;if(["broadcast","presence","postgres_changes"].includes(o))if("id"in p){const j=p.id,O=(g=p.filter)===null||g===void 0?void 0:g.event;return j&&((m=r.ids)===null||m===void 0?void 0:m.includes(j))&&(O==="*"||(O==null?void 0:O.toLocaleLowerCase())===((v=r.data)===null||v===void 0?void 0:v.type.toLocaleLowerCase()))&&(!(!((x=p.filter)===null||x===void 0)&&x.table)||p.filter.table===((y=r.data)===null||y===void 0?void 0:y.table))}else{const j=(_=(b=p==null?void 0:p.filter)===null||b===void 0?void 0:b.event)===null||_===void 0?void 0:_.toLocaleLowerCase();return j==="*"||j===((S=r==null?void 0:r.event)===null||S===void 0?void 0:S.toLocaleLowerCase())}else return p.type.toLocaleLowerCase()===o}).map(p=>{if(typeof h=="object"&&"ids"in h){const g=h.data,{schema:m,table:v,commit_timestamp:x,type:y,errors:b}=g;h=Object.assign(Object.assign({},{schema:m,table:v,commit_timestamp:x,eventType:y,new:{},old:{},errors:b}),this._getPayloadRecords(g))}p.callback(h,n)})}_isClosed(){return this.state===Nt.closed}_isJoined(){return this.state===Nt.joined}_isJoining(){return this.state===Nt.joining}_isLeaving(){return this.state===Nt.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,r,n){const i=t.toLocaleLowerCase(),a={type:i,filter:r,callback:n};return this.bindings[i]?this.bindings[i].push(a):this.bindings[i]=[a],this}_off(t,r){const n=t.toLocaleLowerCase();return this.bindings[n]&&(this.bindings[n]=this.bindings[n].filter(i=>{var a;return!(((a=i.type)===null||a===void 0?void 0:a.toLocaleLowerCase())===n&&Qs.isEqual(i.filter,r))})),this}static isEqual(t,r){if(Object.keys(t).length!==Object.keys(r).length)return!1;for(const n in t)if(t[n]!==r[n])return!1;return!0}static isFilterValueEqual(t,r){return(t??void 0)===(r??void 0)}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(An.close,{},t)}_onError(t){this._on(An.error,{},r=>t(r))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Nt.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const r={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(r.new=KO(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=KO(t.columns,t.old_record)),r}}const gy=()=>{},ih={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},q9=[1e3,2e3,5e3,1e4],V9=1e4,K9=` 396 addEventListener("message", (e) => { 397 if (e.data.event === "start") { 398 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 399 } 400 });`;class G9{constructor(t,r){var n;if(this.accessTokenValue=null,this.apiKey=null,this._manuallySetToken=!1,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=k0,this.transport=null,this.heartbeatIntervalMs=ih.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=gy,this.ref=0,this.reconnectTimer=null,this.vsn=VO,this.logger=gy,this.conn=null,this.sendBuffer=[],this.serializer
400=new L9,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._heartbeatSentAt=null,this._resolveFetch=i=>i?(...a)=>i(...a):(...a)=>fetch(...a),!(!((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,this.endPoint=`${t}/${A0.websocket}`,this.httpEndpoint=Y$(t),this._initializeOptions(r),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(r==null?void 0:r.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=T9.createWebSocket(this.endpointURL())}catch(t){this._setConnectionState("disconnected");const r=t.message;throw r.includes("Node.js")?new Error(`${r} 401 402To use Realtime in Node.js, you need to provide a WebSocket implementation: 403 404Option 1: Use Node.js 22+ which has native WebSocket support 405Option 2: Install and provide the "ws" package: 406 407 npm install ws 408 409 import ws from "ws" 410 const client = new RealtimeClient(url, { 411 ...options, 412 transport: ws 413 })`):new Error(`WebSocket not available: ${r}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:this.vsn}))}disconnect(t,r){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const n=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(n),this._setConnectionState("disconnected")},typeof this.conn.close=="function"&&(t?this.conn.close(t,r??""):this.conn.close()),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(t){const r=await t.unsubscribe();return this.channels.length===0&&this.disconnect(),r}async removeAllChannels(){const t=await Promise.all(this.channels.map(r=>r.unsubscribe()));return this.channels=[],this.disconnect(),t}log(t,r,n){this.logger(t,r,n)}connectionState(){switch(this.conn&&this.conn.readyState){case ga.connecting:return bo.Connecting;case ga.open:return bo.Open;case ga.closing:return bo.Closing;default:return bo.Closed}}isConnected(){return this.connectionState()===bo.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(t,r={config:{}}){const n=`realtime:${t}`,i=this.getChannels().find(a=>a.topic===n);if(i)return i;{const a=new Qs(`realtime:${t}`,r,this);return this.channels.push(a),a}}push(t){const{topic:r,event:n,payload:i,ref:a}=t,o=()=>{this.encode(t,s=>{var l;(l=this.conn)===null||l===void 0||l.send(s)})};this.log("push",`${r} ${n} (${a})`,i),this.isConnected()?o():this.sendBuffer.push(o)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){var t;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(r){this.log("error","error in heartbeat callback",r)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this._heartbeatSentAt=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(r){this.log("error","error in heartbeat callback",r)}this._wasManualDisconnect=!1,(t=this.conn)===null||t===void 0||t.close(I9,"heartbeat timeout"),setTimeout(()=>{var r;this.isConnected()||(r=this.reconnectTimer)===null||r===void 0||r.sc
vendor: 3,886 bytes, line 413
413heduleTimeout()},ih.HEARTBEAT_TIMEOUT_FALLBACK);return}this._heartbeatSentAt=Date.now(),this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(r){this.log("error","error in heartbeat callback",r)}this._setAuthSafely("heartbeat")}onHeartbeat(t){this.heartbeatCallback=t}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}_leaveOpenTopic(t){let r=this.channels.find(n=>n.topic===t&&(n._isJoined()||n._isJoining()));r&&(this.log("transport",`leaving duplicate topic "${t}"`),r.unsubscribe())}_remove(t){this.channels=this.channels.filter(r=>r.topic!==t.topic)}_onConnMessage(t){this.decode(t.data,r=>{if(r.topic==="phoenix"&&r.event==="phx_reply"&&r.ref&&r.ref===this.pendingHeartbeatRef){const u=this._heartbeatSentAt?Date.now()-this._heartbeatSentAt:void 0;try{this.heartbeatCallback(r.payload.status==="ok"?"ok":"error",u)}catch(d){this.log("error","error in heartbeat callback",d)}this._heartbeatSentAt=null,this.pendingHeartbeatRef=null}const{topic:n,event:i,payload:a,ref:o}=r,s=o?`(${o})`:"",l=a.status||"";this.log("receive",`${l} ${n} ${i} ${s}`.trim(),a),this.channels.filter(u=>u._isMember(n)).forEach(u=>u._trigger(i,a,o)),this._triggerStateCallbacks("message",r)})}_clearTimer(t){var r;t==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):t==="reconnect"&&((r=this.reconnectTimer)===null||r===void 0||r.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),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),this.conn.readyState===ga.open&&this._onConnOpen())}_teardownConnection(){if(this.conn){if(this.conn.readyState===ga.open||this.conn.readyState===ga.connecting)try{this.conn.close()}catch(t){this.log("error","Error closing connection",t)}this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null}this._clearAllTimers(),this._terminateWorker(),this.channels.forEach(t=>t.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).then(()=>{this.flushSendBuffer()}).catch(r=>{this.log("error","error waiting for auth on connect",r),this.flushSendBuffer()}),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_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.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)}_onConnClose(t){var r;this._setConnectionState("disconnected"),this.log("transport","close",t),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(r=this.reconnectTimer)===null||r===void 0||r.sc
413heduleTimeout(),this._triggerStateCallbacks("close",t)}_onConnError(t){this._setConnectionState("disconnected"),this.log("transport",`${t}`),this._triggerChanError(),this._triggerStateCallbacks("error",t)}_triggerChanError(){this.channels.forEach(t=>t._trigger(An.error))}_appendParams(t,r){if(Object.keys(r).length===0)return t;const n=t.match(/\?/)?"&":"?",i=new URLSearchParams(r);return`${t}${n}${i}`}_workerObjectUrl(t){let r;if(t)r=t;else{const n=new Blob([K9],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_setConnectionState(t,r=!1){this._connectionState=t,t==="connecting"?this._wasManualDisconnect=!1:t==="disconnecting"&&(this._wasManualDisconnect=r)}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:R9};r&&i.updateJoinPayload(a),i.joinedOnce&&i._isJoined()&&i._push(An.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)})}_triggerStateCallbacks(t,r){try{this.stateChangeCallbacks[t].forEach(n=>{try{n(r)}catch(i){this.log("error",`error in ${t} callback`,i)}})}catch(n){this.log("error",`error triggering ${t} callbacks`,n)}}_setupReconnectionTimer(){this.reconnectTimer=new K$(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},ih.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(t){var r,n,i,a,o,s,l,u,d,f,h,p;switch(this.transport=(r=t==null?void 0:t.transport)!==null&&r!==void 0?r:null,this.timeout=(n=t==null?void 0:t.timeout)!==null&&n!==void 0?n:k0,this.heartbeatIntervalMs=(i=t==null?void 0:t.heartbeatIntervalMs)!==null&&i!==void 0?i:ih.HEARTBEAT_INTERVAL,this.worker=(a=t==null?void 0:t.worker)!==null&&a!==void 0?a:!1,this.accessToken=(o=t==null?void 0:t.accessToken)!==null&&o!==void 0?o:null,this.heartbeatCallback=(s=t==null?void 0:t.heartbeatCallback)!==null&&s!==void 0?s:gy,this.vsn=(l=t==null?void 0:t.vsn)!==null&&l!==void 0?l:VO,t!=null&&t.params&&(this.params=t.params),t!=null&&t.logger&&(this.logger=t.logger),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(u=t==null?void 0:t.reconnectAfterMs)!==null&&u!==void 0?u:g=>q9[g-1]||V9,this.vsn){case M9:this.encode=(d=t==null?void 0:t.encode)!==null&&d!==void 0?d:(g,m)=>m(JSON.stringify(g)),this.decode=(f=t==null?void 0:t.decode)!==null&&f!==void 0?f:(g,m)=>m(JSON.parse(g));break;case V$:this.encode=(h=t==null?void 0:t.encode)!==null&&h!==void 0?h:this.serializer.encode.bind(this.serializer),this.decode=(p=t==null?void 0:t.decode)!==null&&p!==void 0?p:this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${this.vsn}`)}if(this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl}}}var fd=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 Y9(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 X9(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 Q9(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:i,body:a,headers:o}){const s=Y9(e.baseUrl,n,i),l=await X9(e.auth),u=await t(s,{method:r,headers:{...a?{"Content-Type":"application/json"}:{},...l,...o},body:a?JSON.stringify(a):void 0}),d=await u.text(),f=(u.headers.get("content-type")||"").includes("application/json"),h=f&&d?JSON.parse(d):d;if(!u.ok){const p=f?h:void 0,g=p==null?void 0:p.error;throw new fd((g==null?void 0:g.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:g==null?void 0:g.type,icebergCode:g==null?void 0:g.code,details:p})}return{status:u.status,headers:u.headers,data:h}}}}function ah(e){return e.join("�")}var J9=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:ah(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/${ah(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${ah(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${ah(e.namespace)}`}),!0}catch(t){if(t instanceof fd&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(r){if(r instanceof fd&&r.status===409)return;throw r}}};function ws(e){return e.join("�")}var Z9=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/${ws(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/${ws(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/${ws(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/${ws(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/${ws(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/${ws(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(r){if(r instanceof fd&&r.status===404)return!1;throw r}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(r){if(r instanceof fd&&r.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw r}}},eH=class{constructor(e){var n;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const r=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=Q9({baseUrl:r,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(n=e.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new J9(this.client,t),this.tableOps=new Z9(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)}
413async 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)}},vg=class extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}};function st(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var tH=class extends vg{constructor(e,t,r){super(e),this.name="StorageApiError",this.status=t,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},T0=class extends vg{constructor(e,t){super(e),this.name="StorageUnknownError",this.originalError=t}};const G1=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),rH=()=>Response,$0=e=>{if(Array.isArray(e))return e.map(r=>$0(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]=$0(n)}),t},nH=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)},iH=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e);function hd(e){"@babel/helpers - typeof";return hd=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},hd(e)}function aH(e,t){if(hd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(hd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oH(e){var t=aH(e,"string");return hd(t)=="symbol"?t:t+""}function sH(e,t,r){return(t=oH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function XO(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?XO(Object(r),!0).forEach(function(n){sH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):XO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const vy=e=>{var t;return e.msg||e.message||e.error_description||(typeof e.error=="string"?e.error:(t=e.error)===null||t===void 0?void 0:t.message)||JSON.stringify(e)},lH=async(e,t,r)=>{e instanceof await rH()&&!(r!=null&&r.noResolveJson)?e.json().then(n=>{const i=e.status||500,a=(n==null?void 0:n.statusCode)||i+"";t(new tH(vy(n),i,a))}).catch(n=>{t(new T0(vy(n),n))}):t(new T0(vy(e),e))},cH=(e,t,r,n)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"||!n?i:(nH(n)?(i.headers=fe({"Content-Type":"application/json"},t==null?void 0:t.headers),i.body=JSON.stringify(n)):i.body=n,t!=null&&t.duplex&&(i.duplex=t.duplex),fe(fe({},i),r))};async function gf(e,t,r,n,i,a){return new Promise((o,s)=>{e(r,cH(t,n,i,a)).then(l=>{if(!l.ok)throw l;return n!=null&&n.noResolveJson?l:l.json()}).then(l=>o(l)).catch(l=>lH(l,s,n))})}async function pd(e,t,r,n){return gf(e,"GET",t,r,n)}async function Pn(e,t,r,n,i){return gf(e,"POST",t,n,i,r)}async function R0(e,t,r,n,i){return gf(e,"PUT",t,n,i,r)}async function uH(e,t,r,n){return gf(e,"HEAD",t,fe(fe({},r),{},{noResolveJson:!0}),n)}async function Y1(e,t,r,n,i){return gf(e,"DELETE",t,n,i,r)}var dH=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(st(t))return{data:null,error:t};throw t}}};let X$;X$=Symbol.toStringTag;var fH=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[X$]="BlobDownloadBuilder",this.promise=null}asStream(){return new dH(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(st(t))return{data:null,error:t};throw t}}};const hH={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},QO={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var pH=class{constructor(e,t={},r,n){this.shouldThrowOnError=!1,this.url=e,this.headers=t,this.bucketId=r,this.fetch=G1(n)}throwOnError(){return this.shouldThrowOnError=!0,this}async uploadOrUpdate(e,t,r,n){var i=this;try{let a;const o=fe(fe({},QO),n);let s=fe(fe({},i.headers),e==="POST"&&{"x-upsert":String(o.upsert)});const l=o.metadata;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
413instanceof ReadableStream||a&&typeof a=="object"&&"pipe"in a&&typeof a.pipe=="function")&&!o.duplex&&(o.duplex="half")),n!=null&&n.headers&&(s=fe(fe({},s),n.headers));const u=i._removeEmptyFolders(t),d=i._getFinalPath(u),f=await(e=="PUT"?R0:Pn)(i.fetch,`${i.url}/object/${d}`,a,fe({headers:s},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{data:{path:u,id:f.Id,fullPath:f.Key},error:null}}catch(a){if(i.shouldThrowOnError)throw a;if(st(a))return{data:null,error:a};throw a}}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}`);s.searchParams.set("token",t);try{let l;const u=fe({upsert:QO.upsert},n),d=fe(fe({},i.headers),{"x-upsert":String(u.upsert)});return typeof Blob<"u"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",u.cacheControl),l.append("",r)):typeof FormData<"u"&&r instanceof FormData?(l=r,l.append("cacheControl",u.cacheControl)):(l=r,d["cache-control"]=`max-age=${u.cacheControl}`,d["content-type"]=u.contentType),{data:{path:a,fullPath:(await R0(i.fetch,s.toString(),l,{headers:d})).Key},error:null}}catch(l){if(i.shouldThrowOnError)throw l;if(st(l))return{data:null,error:l};throw l}}async createSignedUploadUrl(e,t){var r=this;try{let n=r._getFinalPath(e);const i=fe({},r.headers);t!=null&&t.upsert&&(i["x-upsert"]="true");const a=await Pn(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 vg("No token returned by API");return{data:{signedUrl:o.toString(),path:e,token:s},error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(st(n))return{data:null,error:n};throw n}}async update(e,t,r){return this.uploadOrUpdate("PUT",e,t,r)}async move(e,t,r){var n=this;try{return{data:await Pn(n.fetch,`${n.url}/object/move`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,de
413stinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers}),error:null}}catch(i){if(n.shouldThrowOnError)throw i;if(st(i))return{data:null,error:i};throw i}}async copy(e,t,r){var n=this;try{return{data:{path:(await Pn(n.fetch,`${n.url}/object/copy`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers})).Key},error:null}}catch(i){if(n.shouldThrowOnError)throw i;if(st(i))return{data:null,error:i};throw i}}async createSignedUrl(e,t,r){var n=this;try{let i=n._getFinalPath(e),a=await Pn(n.fetch,`${n.url}/object/sign/${i}`,fe({expiresIn:t},r!=null&&r.transform?{transform:r.transform}:{}),{headers:n.headers});const o=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return a={signedUrl:encodeURI(`${n.url}${a.signedURL}${o}`)},{data:a,error:null}}catch(i){if(n.shouldThrowOnError)throw i;if(st(i))return{data:null,error:i};throw i}}async createSignedUrls(e,t,r){var n=this;try{const i=await Pn(n.fetch,`${n.url}/object/sign/${n.bucketId}`,{expiresIn:t,paths:e},{headers:n.headers}),a=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return{data:i.map(o=>fe(fe({},o),{},{signedUrl:o.signedURL?encodeURI(`${n.url}${o.signedURL}${a}`):null})),error:null}}catch(i){if(n.shouldThrowOnError)throw i;if(st(i))return{data:null,error:i};throw i}}download(e,t){const r=typeof(t==null?void 0:t.transform)<"u"?"render/image/authenticated":"object",n=this.transformOptsToQueryString((t==null?void 0:t.transform)||{}),i=n?`?${n}`:"",a=this._getFinalPath(e),o=()=>pd(this.fetch,`${this.url}/${r}/${a}${i}`,{headers:this.headers,noResolveJson:!0});return new fH(o,this.shouldThrowOnError)}async info(e){var t=this;const r=t._getFinalPath(e);try{return{data:$0(await pd(t.fetch,`${t.url}/object/info/${r}`,{headers:t.headers})),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(st(n))return{data:null,error:n};throw n}}async exists(e){var t=this;const r=t._getFinalPath(e);try{return await uH(t.fetch,`${t.url}/object/${r}`,{headers:t.headers}),{data:!0,error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(st(n)&&n instanceof T0){const i=n.originalError;if([400,404].includes(i==null?void 0:i.status))return{data:!1,error:n}}throw n}}getPublicUrl(e,t){const r=this._getFinalPath(e),n=[],i=t!=null&&t.download?`download=${t.download===!0?"":t.download}`:"";i!==""&&n.push(i);const a=typeof(t==null?void 0:t.transform)<"u"?"render/image":"object",o=this.transformOptsToQueryString((t==null?void 0:t.transform)||{});o!==""&&n.push(o);let s=n.join("&");return s!==""&&(s=`?${s}`),{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${r}${s}`)}}}async remove(e){var t=this;try{return{data:await Y1(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(st(r))return{data:null,error:r};throw r}}async list(e,t,r){var n=this;try{const i=fe(fe(fe({},hH),t),{},{prefix:e||""});return{data:await Pn(n.fetch,`${n.url}/object/list/${n.bucketId}`,i,{headers:n.headers},r),error:null}}catch(i){if(n.shouldThrowOnError)throw i;if(st(i))return{data:null,error:i};throw i}}async listV2(e,t){var r=this;try{const n=fe({},e);return{data:await Pn(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,n,{headers:r.headers},t),error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(st(n))return{data:null,error:n};throw n}}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,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}};const Q$="2.91.0",J$={"X-Client-Info":`storage-js/${Q$}`};var mH=class{constructor(e,t={},r,n){this.shouldThrowOnError=!1;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.")),this.url=i.href.replace(/\/$/,""),this.headers=fe(fe({},J$),t),this.fetch=G1(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async listBuckets(e){var t=this;try{const r=t.listBucketOptionsToQueryString(e);return{data:await pd(t.fetch,`${t.url}/bucket${r}`,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(st(r))return{data:null,error:r};throw r}}async getBucket(e){var t=this;try{return{data:await pd(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(st(r))return{data:null,error:r};throw r}}async createBucket(e,t={public:!1}){var r=this;try{return{data:await Pn(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}),error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(st(n))return{data:null,error:n};throw n}}async updateBucket(e,t){var r=this;try{return{data:await R0(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}),error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(st(n))return{data:null,error:n};throw n}}async emptyBucket(e){var t=this;try{return{data:await Pn(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(st(r))return{data:null,error:r};throw r}}async deleteBucket(e){var t=this;try{return{data:await Y1(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(st(r))return{data:null,error:r};throw r}}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():""}},gH=class{constructor(e,t={},r){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=fe(fe({},J$),t),this.fetch=G1(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async createBucket(e){var t=this;try{return{data:await Pn(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(st(r))return{data:null,error:r};throw r}}async listBuckets(e){var t=this;
413try{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{data:await pd(t.fetch,i,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(st(r))return{data:null,error:r};throw r}}async deleteBucket(e){var t=this;try{return{data:await Y1(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(st(r))return{data:null,error:r};throw r}}from(e){var t=this;if(!iH(e))throw new vg("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 eH({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}}}}})}};const X1={"X-Client-Info":`storage-js/${Q$}`,"Content-Type":"application/json"};var Z$=class extends Error{constructor(e){super(e),this.__isStorageVectorsError=!0,this.name="StorageVectorsError"}};function Mr(e){return typeof e=="object"&&e!==null&&"__isStorageVectorsError"in e}var yy=class extends Z${constructor(e,t,r){super(e),this.name="StorageVectorsApiError",this.status=t,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},vH=class extends Z${constructor(e,t){super(e),this.name="StorageVectorsUnknownError",this.originalError=t}};const Q1=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),yH=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)},JO=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),xH=async(e,t,r)=>{if(e&&typeof e=="object"&&"status"in e&&"ok"in e&&typeof e.status=="number"&&!(r!=null&&r.noResolveJson)){const n=e.status||500,i=e;if(typeof i.json=="function")i.json().then(a=>{const o=(a==null?void 0:a.statusCode)||(a==null?void 0:a.code)||n+"";t(new yy(JO(a),n,o))}).catch(()=>{const a=n+"";t(new yy(i.statusText||`HTTP ${n} error`,n,a))});else{const a=n+"";t(new yy(i.statusText||`HTTP ${n} error`,n,a))}}else t(new vH(JO(e),e))},bH=(e,t,r,n)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};return n?(yH(n)?(i.headers=fe({"Content-Type":"application/json"},t==null?void 0:t.headers),i.body=JSON.stringify(n)):i.body=n,fe(fe({},i),r)):i};async function wH(e,t,r,n,i,a){return new Promise((o,s)=>{e(r,bH(t,n,i,a)).then(l=>{if(!l.ok)throw l;if(n!=null&&n.noResolveJson)return l;const u=l.headers.get("content-type");return!u||!u.includes("application/json")?{}:l.json()}).then(l=>o(l)).catch(l=>xH(l,s,n))})}async function Ir(e,t,r,n,i){return wH(e,"POST",t,n,i,r)}var SH=class{constructor(e,t={},r){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=fe(fe({},X1),t),this.fetch=Q1(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async createIndex(e){var t=this;try{return{data:await Ir(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{},error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Mr(r))return{data:null,error:r};throw r}}async getIndex(e,t){var r=this;try{return{data:await Ir(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers}),error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(Mr(n))return{data:null,error:n};throw n}}async listIndexes(e){var t=this;try{return{data:await Ir(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Mr(r))return{data:null,error:r};throw r}}async deleteIndex(e,t){var r=this;try{return{data:await Ir(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers})||{},error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(Mr(n))return{data:null,error:n};throw n}}},_H=class{constructor(e,t={},r){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=fe(fe({},X1),t),this.fetch=Q1(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async putVectors(e){var t=this;try{if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return{data:await Ir(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{},error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Mr(r))return{data:null,error:r};throw r}}async getVectors(e){var t=this;try{return{data:await Ir(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Mr(r))return{data:null,error:r};throw r}}async listVectors(e){var t=this;try{if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
413if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return{data:await Ir(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Mr(r))return{data:null,error:r};throw r}}async queryVectors(e){var t=this;try{return{data:await Ir(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Mr(r))return{data:null,error:r};throw r}}async deleteVectors(e){var t=this;try{if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return{data:await Ir(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{},error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Mr(r))return{data:null,error:r};throw r}}},jH=class{constructor(e,t={},r){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=fe(fe({},X1),t),this.fetch=Q1(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async createBucket(e){var t=this;try{return{data:await Ir(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{},error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Mr(r))return{data:null,error:r};throw r}}async getBucket(e){var t=this;try{return{data:await Ir(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Mr(r))return{data:null,error:r};throw r}}async listBuckets(e={}){var t=this;try{return{data:await Ir(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Mr(r))return{data:null,error:r};throw r}}async deleteBucket(e){var t=this;try{return{data:await Ir(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{},error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Mr(r))return{data:null,error:r};throw r}}},OH=class extends jH{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new PH(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)}},PH=class extends SH{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,fe(fe({},e),{},{vectorBucketName:r.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,r=this;return t().call(r,fe(fe({},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 NH(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},NH=class extends _H{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,fe(fe({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(e){var t=()=>super.getVectors,r=this;return t().call(r,fe(fe({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,r=this;return t().call(r,fe(fe({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,r=this;return t().call(r,fe(fe({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,r=this;return t().call(r,fe(fe({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},EH=class extends mH{constructor(e,t={},r,n){super(e,t,r,n)}from(e){return new pH(this.url,this.headers,e,this.fetch)}get vectors(){return new OH(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new gH(this.url+"/iceberg",this.headers,this.fetch)}};const eR="2.91.0",Ds=30*1e3,M0=3,xy=M0*Ds,kH="http://localhost:9999",AH="supabase.auth.token",CH={"X-Client-Info":`gotrue-js/${eR}`},I0="X-Supabase-Api-Version",tR={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},TH=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,$H=10*60*1e3;
413class md extends Error{constructor(t,r,n){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}}function ae(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class RH extends md{constructor(t,r,n){super(t,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function MH(e){return ae(e)&&e.name==="AuthApiError"}class wo extends md{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class Zi extends md{constructor(t,r,n,i){super(t,n,i),this.name=r,this.status=n}}class Nr extends Zi{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function IH(e){return ae(e)&&e.name==="AuthSessionMissingError"}class Ss extends Zi{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class oh extends Zi{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class sh extends Zi{constructor(t,r=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function DH(e){return ae(e)&&e.name==="AuthImplicitGrantRedirectError"}class ZO extends Zi{constructor(t,r=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class LH extends Zi{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 D0 extends Zi{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function by(e){return ae(e)&&e.name==="AuthRetryableFetchError"}class eP extends Zi{constructor(t,r,n){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}}class L0 extends Zi{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const Ep="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),tP=` 414\r=`.split(""),FH=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<tP.length;t+=1)e[tP[t].charCodeAt(0)]=-2;for(let t=0;t<Ep.length;t+=1)e[Ep[t].charCodeAt(0)]=t;return e})();function rP(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(Ep[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(Ep[n]),t.queuedBits-=6}}function rR(e,t,r){const n=FH[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 nP(e){const t=[],r=o=>{t.push(String.fromCodePoint(o))},n={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},a=o=>{WH(o,n,r)};for(let o=0;o<e.length;o+=1)rR(e.charCodeAt(o),i,a);return t.join("")}function BH(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 UH(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}BH(n,t)}}function WH(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 fl(e){const t=[],r={queue:0,queuedBits:0},n=i=>{t.push(i)};for(let i=0;i<e.length;
414i+=1)rR(e.charCodeAt(i),r,n);return new Uint8Array(t)}function zH(e){const t=[];return UH(e,r=>t.push(r)),new Uint8Array(t)}function Po(e){const t=[],r={queue:0,queuedBits:0},n=i=>{t.push(i)};return e.forEach(i=>rP(i,r,n)),rP(null,r,n),t.join("")}function HH(e){return Math.round(Date.now()/1e3)+e}function qH(){return Symbol("auth-callback")}const Ut=()=>typeof window<"u"&&typeof document<"u",so={tested:!1,writable:!1},nR=()=>{if(!Ut())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(so.tested)return so.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),so.tested=!0,so.writable=!0}catch{so.tested=!0,so.writable=!1}return so.writable};function VH(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((i,a)=>{t[a]=i})}catch{}return r.searchParams.forEach((n,i)=>{t[i]=n}),t}const iR=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),KH=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",Ls=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},lo=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch{return r}},Bt=async(e,t)=>{await e.removeItem(t)};class yg{constructor(){this.promise=new yg.promiseConstructor((t,r)=>{this.resolve=t,this.reject=r})}}yg.promiseConstructor=Promise;function wy(e){const t=e.split(".");if(t.length!==3)throw new L0("Invalid JWT structure");for(let n=0;n<t.length;n++)if(!TH.test(t[n]))throw new L0("JWT not in base64url format");return{header:JSON.parse(nP(t[0])),payload:JSON.parse(nP(t[1])),signature:fl(t[2]),raw:{header:t[0],payload:t[1]}}}async function GH(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function YH(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 XH(e){return("0"+e.toString(16)).substr(-2)}function QH(){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,XH).join("")}async function JH(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 ZH(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 JH(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function _s(e,t,r=!1){const n=QH();let i=n;r&&(i+="/PASSWORD_RECOVERY"),await Ls(e,`${t}-code-verifier`,i);const a=await ZH(n);return[a,n===a?"plain":"s256"]}const eq=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function tq(e){const t=e.headers.get(I0);if(!t||!t.match(eq))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function rq(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 nq(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 iq=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function js(e){if(!iq.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Sy(){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 aq(e,t){return new Proxy(e,{get:(r,n,i)=>{if(n==="__isInsecureUserWarningProxy")return!0;
414if(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 iP(e){return JSON.parse(JSON.stringify(e))}const mo=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),oq=[502,503,504];async function aP(e){var t;if(!KH(e))throw new D0(mo(e),0);if(oq.includes(e.status))throw new D0(mo(e),e.status);let r;try{r=await e.json()}catch(a){throw new wo(mo(a),a)}let n;const i=tq(e);if(i&&i.getTime()>=tR["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 eP(mo(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(n==="session_not_found")throw new Nr}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 eP(mo(r),e.status,r.weak_password.reasons);throw new RH(mo(r),e.status||500,n)}const sq=(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 de(e,t,r,n){var i;const a=Object.assign({},n==null?void 0:n.headers);a[I0]||(a[I0]=tR["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 lq(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 lq(e,t,r,n,i,a){const o=sq(t,n,i,a);let s;try{s=await e(r,Object.assign({},o))}catch(l){throw console.error(l),new D0(mo(l),0)}if(s.ok||await aP(s),n!=null&&n.noResolveJson)return s;try{return await s.json()}catch(l){await aP(l)}}function Sn(e){var t;let r=null;dq(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=HH(e.expires_in)));const n=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:r,user:n},error:null}}function oP(e){const t=Sn(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 ba(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function cq(e){return{data:e,error:null}}function uq(e){const{action_link:t,email_otp:r,hashed_token:n,redirect_to:i,verification_type:a}=e,o=Ec(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 sP(e){return e}function dq(e){return e.access_token&&e.refresh_token&&e.expires_in}const _y=["global","local","others"];class fq{constructor({url:t="",headers:r={},fetch:n}){this.url=t,this.headers=r,this.fetch=iR(n),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)}}
vendor: 4,780 bytes, line 414
414async signOut(t,r=_y[0]){if(_y.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${_y.join(", ")}`);try{return await de(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(n){if(ae(n))return{data:null,error:n};throw n}}async inviteUserByEmail(t,r={}){try{return await de(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:ba})}catch(n){if(ae(n))return{data:{user:null},error:n};throw n}}async generateLink(t){try{const{options:r}=t,n=Ec(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 de(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:i,headers:this.headers,xform:uq,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(ae(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(t){try{return await de(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:ba})}catch(r){if(ae(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},d=await de(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:sP});if(d.error)throw d.error;const f=await d.json(),h=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,p=(l=(s=d.headers.get("link"))===null||s===void 0?void 0:s.split(","))!==null&&l!==void 0?l:[];return p.length>0&&(p.forEach(g=>{const m=parseInt(g.split(";")[0].split("=")[1].substring(0,1)),v=JSON.parse(g.split(";")[1].split("=")[1]);u[`${v}Page`]=m}),u.total=parseInt(h)),{data:Object.assign(Object.assign({},f),u),error:null}}catch(u){if(ae(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){js(t);try{return await de(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:ba})}catch(r){if(ae(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){js(t);try{return await de(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:ba})}catch(n){if(ae(n))return{data:{user:null},error:n};throw n}}async deleteUser(t,r=!1){js(t);try{return await de(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:ba})}catch(n){if(ae(n))return{data:{user:null},error:n};throw n}}async _listFactors(t){js(t.userId);try{const{data:r,error:n}=await de(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(ae(r))return{data:null,error:r};throw r}}async _deleteFactor(t){js(t.userId),js(t.id);try{return{data:await de(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(r){if(ae(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},d=await de(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:sP});if(d.error)throw d.error;const f=await d.json(),h=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,p=(l=(s=d.headers.get("link"))===null||s===void 0?void 0:s.split(","))!==null&&l!==void 0?l:[];return p.length>0&&(p.forEach(g=>{const m=parseInt(g.split(";")[0].split("=")[1].substring(0,1)),v=JSON.parse(g.split(";")[1].split("=")[1]);u[`${v}Page`]=m}),u.total=parseInt(h)),{data:Object.assign(Object.assign({},f),u),error:null}}catch(u){if(ae(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(t){try{return await de(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ae(r))return{data:null,error:r};throw r}}async _getOAuthClient(t){try{return await de(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ae(r))return{data:null,error:r};throw r}}async _updateOAuthClient(t,r){try{return await de(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ae(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(t){try{return await de(this.fetch,"DELET
414E",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(ae(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(t){try{return await de(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ae(r))return{data:null,error:r};throw r}}}function lP(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}const Os={debug:!!(globalThis&&nR()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class aR extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class hq extends aR{}async function pq(e,t,r){Os.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const n=new globalThis.AbortController;return t>0&&setTimeout(()=>{n.abort(),Os.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async i=>{if(i){Os.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,i.name);try{return await r()}finally{Os.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,i.name)}}else{if(t===0)throw Os.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new hq(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(Os.debug)try{const a=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(a,null," "))}catch(a){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",a)}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"),await r()}}))}function mq(){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 oR(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function gq(e){return parseInt(e,16)}function vq(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")}function yq(e){var t;const{chainId:r,domain:n,expirationTime:i,issuedAt:a=new Date,nonce:o,notBefore:s,requestId:l,resources:u,scheme:d,uri:f,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(!f)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(` 415`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const p=oR(e.address),g=d?`${d}://${n}`:n,m=e.statement?`${e.statement} 416`:"",v=`${g} wants you to sign in with your Ethereum account: 417${p} 418 419${m}`;let x=`URI: ${f} 420Version: ${h} 421Chain ID: ${r}${o?` 422Nonce: ${o}`:""} 423Issued At: ${a.toISOString()}`;if(i&&(x+=` 424Expiration Time: ${i.toISOString()}`),s&&(x+=` 425Not Before: ${s.toISOString()}`),l&&(x+=` 426Request ID: ${l}`),u){let y=` 427Resources:`;for(const b of u){if(!b||typeof b!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${b}`);y+=` 428- ${b}`}x+=y}return`${v} 429${x}`}
429class St 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}}class kp extends St{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function xq({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 St({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 St({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 St({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 St({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 St({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new St({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 St({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new St({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(sR(o)){if(a.rp.id!==o)return new St({message:`The RP ID "${a.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new St({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 St({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 St({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 St({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function bq({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 St({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new St({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const n=window.location.hostname;if(sR(n)){if(r.rpId!==n)return new St({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new St({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new St({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 St({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class wq{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 Sq=new wq;function _q(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=Ec(e,["challenge","user","excludeCredentials"]),a=fl(t).buffer,o=Object.assign(Object.assign({},r),{id:fl(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:fl(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return s}function jq(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=Ec(e,["challenge","allowCredentials"]),i=fl(t).buffer,a=Object.assign(Object.assign({}
429,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:fl(s.id).buffer,type:s.type||"public-key",transports:s.transports})}}return a}function Oq(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:Po(new Uint8Array(e.response.attestationObject)),clientDataJSON:Po(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function Pq(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:Po(new Uint8Array(i.authenticatorData)),clientDataJSON:Po(new Uint8Array(i.clientDataJSON)),signature:Po(new Uint8Array(i.signature)),userHandle:i.userHandle?Po(new Uint8Array(i.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function sR(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function cP(){var e,t;return!!(Ut()&&"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 Nq(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new kp("Browser returned unexpected credential type",t)}:{data:null,error:new kp("Empty credential response",t)}}catch(t){return{data:null,error:xq({error:t,options:e})}}}async function Eq(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new kp("Browser returned unexpected credential type",t)}:{data:null,error:new kp("Empty credential response",t)}}catch(t){return{data:null,error:bq({error:t,options:e})}}}const kq={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},Aq={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Ap(...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]=Ap(s,o):n[a]=Ap(o)}else n[a]=o}return n}function Cq(e,t){return Ap(kq,e,t||{})}function Tq(e,t){return Ap(Aq,e,t||{})}class $q{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){try{const{data:o,error:s}=await this.client.mfa.challenge({factorId:t,webauthn:r});if(!o)return{data:null,error:s};const l=i??Sq.createNewAbortSignal();if(o.webauthn.type==="create"){const{user:u}=o.webauthn.credential_options.publicKey;u.name||(u.name=`${u.id}:${n}`),u.displayName||(u.displayName=u.name)}switch(o.webauthn.type){case"create":{const u=Cq(o.webauthn.credential_options.publicKey,a==null?void 0:a.create),{data:d,error:f}=await Nq({publicKey:u,signal:l});return d?{data:{factorId:t,challengeId:o.id,webauthn:{type:o.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}case"request":{const u=Tq(o.webauthn.credential_options.publicKey,a==null?void 0:a.request),{data:d,error:f}=await Eq(Object.assign(Object.assign({},o.webauthn.credential_options),{publicKey:u,signal:l}));return d?{data:{factorId:t,challengeId:o.id,webauthn:{type:o.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}}}catch(o){return ae(o)?{data:null,error:o}:{data:null,error:new wo("Unexpected error in challenge",o)}}}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 md("rpId is required for WebAuthn authentication")};try{if(!cP())return{data:null,error:new wo("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 ae(o)?{data:null,error:o}:{data:null,error:new wo("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 md("rpId is required for WebAuthn registration")};try{if(!cP())return{data:null,error:new wo("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(d=>{var f;return(f=d.data)===null||f===void 0?void 0:f.all.find(h=>h.factor_type==="webauthn"&&h.friendly_name===t&&h.status!=="unverified")}).then(d=>d?this.client.mfa.unenroll({factorId:d==null?void 0:d.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 ae(o)?{data:null,error:o}:{data:null,error:new wo("Unexpected error in register",o)}}}}mq();const Rq={url:kH,storageKey:AH,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:CH,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:1e4};async function uP(e,t,r){return await r()}const Ps={};class gd{get jwks(){var t,r;return(r=(t=Ps[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){Ps[this.storageKey]=Object.assign(Object.assign({},Ps[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=Ps[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){Ps[this.storageKey]=Object.assign(Object.assign({},Ps[this.storageKey]),{cachedAt:t})}constructor(t){var r,n,i;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 a=Object.assign(Object.assign({},Rq),t);if(this.storageKey=a.storageKey,this.instanceID=(r=gd.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,gd.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!a.debug,typeof a.debug=="function"&&(this.logger=a.debug),this.instanceID>0&&Ut()){const o=`${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(o),this.logDebugMessages&&console.trace(o)}if(this.persistSession=a.persistSession,this.autoRefreshToken=a.autoRefreshToken,this.admin=new fq({url:a.url,headers:a.headers,fetch:a.fetch}),this.url=a.url,this.headers=a.headers,this.fetch=iR(a.fetch),this.lock=a.lock||uP,this.detectSessionInUrl=a.detectSessionInUrl,this.flowType=a.flowType,this.hasCustomAuthorizationHeader=a.hasCustomAuthorizationHeader,this.throwOnError=a.throwOnError,this.lockAcquireTimeout=a.lockAcquireTimeout,a.lock?this.lock=a.lock:this.persistSession&&Ut()&&
429(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=pq:this.lock=uP,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 $q(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.persistSession?(a.storage?this.storage=a.storage:nR()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=lP(this.memoryStorage)),a.userStorage&&(this.userStorage=a.userStorage)):(this.memoryStorage={},this.storage=lP(this.memoryStorage)),Ut()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(i=this.broadcastChannel)===null||i===void 0||i.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o),await this._notifyAllSubscribers(o.data.event,o.data.session,!1)})}this.initialize()}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${eR}) ${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(Ut()&&(r=VH(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),Ut()&&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),DH(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 ae(r)?this._returnResult({error:r}):this._returnResult({error:new wo("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var r,n,i;try{const a=await de(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:Sn}),{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(ae(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:d,password:f,options:h}=t;let p=null,g=null;this.flowType==="pkce"&&([p,g]=await _s(this.storage,this.storageKey)),a=await de(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:h==null?void 0:h.emailRedirectTo,body:{email:d,password:f,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:g},xform:Sn})}else if("phone"in t){const{phone:d,password:f,options:h}=t;a=await de(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:f,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:Sn})}else throw new oh("You must provide either an email or phone number and a password");const{data:o,error:s}=a;if(s||!o)return await Bt(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 Bt(this.storage,`${this.storageKey}-code-verifier`),ae(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 de(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:oP})}else if("phone"in t){const{phone:a,password:o,options:s}=t;r=await de(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:oP})}else throw new oh("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 Ss;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(ae(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.o
429ptions)===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,d,f,h;let p,g;if("message"in t)p=t.message,g=t.signature;else{const{chain:m,wallet:v,statement:x,options:y}=t;let b;if(Ut())if(typeof v=="object")b=v;else{const N=window;if("ethereum"in N&&typeof N.ethereum=="object"&&"request"in N.ethereum&&typeof N.ethereum.request=="function")b=N.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 v!="object"||!(y!=null&&y.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");b=v}const _=new URL((r=y==null?void 0:y.url)!==null&&r!==void 0?r:window.location.href),S=await b.request({method:"eth_requestAccounts"}).then(N=>N).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!S||S.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const j=oR(S[0]);let O=(n=y==null?void 0:y.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!O){const N=await b.request({method:"eth_chainId"});O=gq(N)}const P={domain:_.host,address:j,statement:x,uri:_.href,version:"1",chainId:O,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:(d=y==null?void 0:y.signInWithEthereum)===null||d===void 0?void 0:d.resources};p=yq(P),g=await b.request({method:"personal_sign",params:[vq(p),j]})}try{const{data:m,error:v}=await de(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:p,signature:g},!((f=t.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(h=t.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:Sn});if(v)throw v;if(!m||!m.session||!m.user){const x=new Ss;return this._returnResult({data:{user:null,session:null},error:x})}return m.session&&(await this._saveSession(m.session),await this._notifyAllSubscribers("SIGNED_IN",m.session)),this._returnResult({data:Object.assign({},m),error:v})}catch(m){if(ae(m))return this._returnResult({data:{user:null,session:null},error:m});throw m}}async signInWithSolana(t){var r,n,i,a,o,s,l,u,d,f,h,p;let g,m;if("message"in t)g=t.message,m=t.signature;else{const{chain:v,wallet:x,statement:y,options:b}=t;let _;if(Ut())if(typeof x=="object")_=x;else{const j=window;if("solana"in j&&typeof j.solana=="object"&&("signIn"in j.solana&&typeof j.solana.signIn=="function"||"signMessage"in j.solana&&typeof j.solana.signMessage=="function"))_=j.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 x!="object"||!(b!=null&&b.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");_=x}const S=new URL((r=b==null?void 0:b.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in _&&_.signIn){const j=await _.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},b==null?void 0:b.signInWithSolana),{version:"1",domain:S.host,uri:S.href}),y?{statement:y}:null));let O;if(Array.isArray(j)&&j[0]&&typeof j[0]=="object")O=j[0];else if(j&&typeof j=="object"&&"signedMessage"in j&&"signature"in j)O=j;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in O&&"signature"in O&&(typeof O.signedMessage=="string"||O.signedMessage instanceof Uint8Array)&&O.signature instanceof Uint8Array)g=typeof O.signedMessage=="string"?O.signedMessage:new TextDecoder().decode(O.signedMessage),m=O.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in _)||typeof _.signMessage!="function"||!("publicKey"in _)||typeof _!="object"||!_.publicKey||!("toBase58"in _.publicKey)||typeof _.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");g=[`${S.host} wants you to sign in with your Solana account:`,_.publicKey.toBase58(),...y?["",y,""]:[""],"Version: 1",`URI: ${S.href}`,`Issued At: ${(i=(n=b==null?void 0:b.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&i!==void 0?i:new Date().toISOString()}`,...!((a=b==null?void 0:b.signInWithSolana)===null||a===void 0)&&a.notBefore?[`Not Before: ${b.signInWithSolana.notBefore}`]:[],...!((o=b==null?void 0:b.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${b.signInWithSolana.expirationTime}`]:[],...!((s=b==null?void 0:b.signInWithSolana)===null||s===void 0)&&s.chainId?[`Chain ID: ${b.signInWithSolana.chainId}`]:[],...!((l=b==null?void 0:b.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${b.signInWithSolana.nonce}`]:[],...!((u=b==null?void 0:b.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${b.signInWithSolana.requestId}`]:[],...!((f=(d=b==null?void 0:b.signInWithSolana)===null||d===void 0?void 0:d.resources)===null||f===void 0)&&f.length?["Resources",...b.signInWithSolana.resources.map(O=>`- ${O}`)]:[]].join(` 430`);const j=await _.signMessage(new TextEncoder().encode(g),"utf8");if(!j||!(j instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");m=j}}try{const{data:v,error:x}=await de(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:g,signature:Po(m)}
430,!((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:Sn});if(x)throw x;if(!v||!v.session||!v.user){const y=new Ss;return this._returnResult({data:{user:null,session:null},error:y})}return v.session&&(await this._saveSession(v.session),await this._notifyAllSubscribers("SIGNED_IN",v.session)),this._returnResult({data:Object.assign({},v),error:x})}catch(v){if(ae(v))return this._returnResult({data:{user:null,session:null},error:v});throw v}}async _exchangeCodeForSession(t){const r=await lo(this.storage,`${this.storageKey}-code-verifier`),[n,i]=(r??"").split("/");try{if(!n&&this.flowType==="pkce")throw new LH;const{data:a,error:o}=await de(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:n},xform:Sn});if(await Bt(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!a||!a.session||!a.user){const s=new Ss;return this._returnResult({data:{user:null,session:null,redirectType:null},error:s})}return a.session&&(await this._saveSession(a.session),setTimeout(async()=>{await this._notifyAllSubscribers("SIGNED_IN",a.session)},0)),this._returnResult({data:Object.assign(Object.assign({},a),{redirectType:i??null}),error:o})}catch(a){if(await Bt(this.storage,`${this.storageKey}-code-verifier`),ae(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 de(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:Sn}),{data:l,error:u}=s;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!l||!l.session||!l.user){const d=new Ss;return this._returnResult({data:{user:null,session:null},error:d})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:u})}catch(r){if(ae(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,d=null;this.flowType==="pkce"&&([u,d]=await _s(this.storage,this.storageKey));const{error:f}=await de(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:d},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:f})}if("phone"in t){const{phone:s,options:l}=t,{data:u,error:d}=await de(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:d})}throw new oh("You must provide either an email or phone number.")}catch(s){if(await Bt(this.storage,`${this.storageKey}-code-verifier`),ae(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 de(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:a}}),redirectTo:i,xform:Sn});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(ae(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 _s(this.storage,this.storageKey));const u=await de(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:cq});return!((a=u.data)===null||a===void 0)&&a.url&&Ut()&&!(!((o=t.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(s){if(await Bt(this.storage,`${this.storageKey}-code-verifier`),ae(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 Nr;const{error:i}=await de(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(ae(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 de(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 de(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 oh("You must provide either an email or phone number and a type")}catch(r){if(ae(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 lo(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
430id"),await this._removeSession())),!t)return{data:{session:null},error:null};const n=t.expires_at?t.expires_at*1e3-Date.now()<xy:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",t.expires_at),!n){if(this.userStorage){const o=await lo(this.userStorage,this.storageKey+"-user");o!=null&&o.user?t.user=o.user:t.user=Sy()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};t.user=aq(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 de(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:ba}):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 Nr}:await de(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:ba})})}catch(r){if(ae(r))return IH(r)&&(await this._removeSession(),await Bt(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 Nr;const o=i.session;let s=null,l=null;this.flowType==="pkce"&&t.email!=null&&([s,l]=await _s(this.storage,this.storageKey));const{data:u,error:d}=await de(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:ba});if(d)throw d;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 Bt(this.storage,`${this.storageKey}-code-verifier`),ae(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 Nr;const r=Date.now()/1e3;let n=r,i=!0,a=null;const{payload:o}=wy(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)throw 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(ae(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 Nr;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(ae(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(t,r){try{if(!Ut())throw new sh("No browser detected.");
430if(t.error||t.error_description||t.error_code)throw new sh(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 ZO("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new sh("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 ZO("No code detected.");const{data:y,error:b}=await this._exchangeCodeForSession(t.code);if(b)throw b;const _=new URL(window.location.href);return _.searchParams.delete("code"),window.history.replaceState(window.history.state,"",_.toString()),{data:{session:y.session,redirectType:null},error:null}}const{provider_token:n,provider_refresh_token:i,access_token:a,refresh_token:o,expires_in:s,expires_at:l,token_type:u}=t;if(!a||!s||!o||!u)throw new sh("No session defined in URL");const d=Math.round(Date.now()/1e3),f=parseInt(s);let h=d+f;l&&(h=parseInt(l));const p=h-d;p*1e3<=Ds&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${p}s, should have been closer to ${f}s`);const g=h-f;d-g>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",g,h,d):d-g<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",g,h,d);const{data:m,error:v}=await this._getUser(a);if(v)throw v;const x={provider_token:n,provider_refresh_token:i,access_token:a,expires_in:f,expires_at:h,refresh_token:o,token_type:u,user:m.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:x,redirectType:t.type},error:null})}catch(n){if(ae(n))return this._returnResult({data:{session:null,redirectType:null},error:n});throw n}}_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 lo(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)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&&!(MH(s)&&(s.status===404||s.status===401||s.status===403)))return this._returnResult({error:s})}return t!=="others"&&(await this._removeSession(),await Bt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const r=qH(),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),console.error(a)}})}async resetPasswordForEmail(t,r={}){let n=null,i=null;this.flowType==="pkce"&&([n,i]=await _s(this.storage,this.storageKey,!0));try{return await de(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 Bt(this.storage,`${this.storageKey}-code-verifier`),ae(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(ae(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,d;const{data:f,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 de(this.fetch,"GET",p,{headers:this.headers,jwt:(d=(u=f.session)===null||u===void 0?void 0:u.access_token)!==null&&d!==void 0?d:void 0})});if(i)throw i;return Ut()&&!(!((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(ae(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:d}=t,f=await de(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:d,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:Sn}),{data:h,error:p}=f;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 Ss}):(h.session&&(await this._saveSession(h.session),await this._notifyAllSubscribers("USER_UPDATED",h.session)),this._returnResult({data:h,error:p}))}catch(i){if(await Bt(this.storage,`${this.storageKey}-code-verifier`),ae(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;
430return await de(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(ae(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 YH(async i=>(i>0&&await GH(200*Math.pow(2,i-1)),this._debug(r,"refreshing attempt",i),await de(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Sn})),(i,a)=>{const o=200*Math.pow(2,i);return a&&by(a)&&Date.now()+o-n<Ds})}catch(n){if(this._debug(r,"error",n),ae(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),Ut()&&!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 lo(this.storage,this.storageKey);if(i&&this.userStorage){let o=await lo(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:i.user},await Ls(this.userStorage,this.storageKey+"-user",o)),i.user=(t=o==null?void 0:o.user)!==null&&t!==void 0?t:Sy()}else if(i&&!i.user&&!i.user){const o=await lo(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(i.user=o.user,await Bt(this.storage,this.storageKey+"-user"),await Ls(this.storage,this.storageKey,i)):i.user=Sy()}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()<xy;if(this._debug(n,`session has${a?"":" not"} expired with margin of ${xy}s`),a){if(this.autoRefreshToken&&i.refresh_token){const{error:o}=await this._callRefreshToken(i.refresh_token);o&&(console.error(o),by(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 Nr;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const i=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(i,"begin");try{this.refreshingDeferred=new yg;const{data:a,error:o}=await this._refreshAccessToken(t);if(o)throw o;if(!a.session)throw new Nr;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),ae(a)){const o={data:null,error:a};return by(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 Bt(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 Ls(this.userStorage,this.storageKey+"-user",{user:r.user});const i=Object.assign({},r);delete i.user;const a=iP(i);await Ls(this.storage,this.storageKey,a)}else{const i=iP(r);await Ls(this.storage,this.storageKey,i)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Bt(this.storage,this.storageKey),await Bt(this.storage,this.storageKey+"-code-verifier"),await Bt(this.storage,this.storageKey+"-user"),this.userStorage&&await Bt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&Ut()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
430catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),Ds);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)/Ds);this._debug("#_autoRefreshTokenTick()",`access token expires in ${i} ticks, a tick lasts ${Ds}ms, refresh threshold is ${M0} ticks`),i<=M0&&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.isAcquireTimeout||t instanceof aR)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Ut()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),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 _s(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 de(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(ae(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 de(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(ae(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"?Oq(t.webauthn.credential_response):Pq(t.webauthn.credential_response)})}:{code:t.code}),{data:s,error:l}=await de(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(ae(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 de(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:_q(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:jq(s.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(ae(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(){var t,r;const{data:{session:n},error:i}
430=await this.getSession();if(i)return this._returnResult({data:null,error:i});if(!n)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:a}=wy(n.access_token);let o=null;a.aal&&(o=a.aal);let s=o;((r=(t=n.user.factors)===null||t===void 0?void 0:t.filter(d=>d.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(s="aal2");const u=a.amr||[];return{data:{currentLevel:o,nextLevel:s,currentAuthenticationMethods:u},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 de(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 Nr})})}catch(r){if(ae(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 Nr});const o=await de(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&&Ut()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(ae(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 Nr});const o=await de(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&&Ut()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(ae(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 de(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 Nr})})}catch(t){if(ae(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 de(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 Nr})})}catch(r){if(ae(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+$H>i)return n;const{data:a,error:o}=await de(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:g}
430=await this.getSession();if(g||!p.session)return this._returnResult({data:null,error:g});n=p.session.access_token}const{header:i,payload:a,signature:o,raw:{header:s,payload:l}}=wy(n);r!=null&&r.allowExpired||rq(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 d=nq(i.alg),f=await crypto.subtle.importKey("jwk",u,d,!0,["verify"]);if(!await crypto.subtle.verify(d,f,o,zH(`${s}.${l}`)))throw new L0("Invalid JWT signature");return{data:{claims:a,header:i,signature:o},error:null}}catch(n){if(ae(n))return this._returnResult({data:null,error:n});throw n}}}gd.nextInstanceID={};const Mq=gd,Iq="2.91.0";let xu="";typeof Deno<"u"?xu="deno":typeof document<"u"?xu="web":typeof navigator<"u"&&navigator.product==="ReactNative"?xu="react-native":xu="node";const Dq={"X-Client-Info":`supabase-js-${xu}/${Iq}`},Lq={headers:Dq},Fq={schema:"public"},Bq={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},Uq={};function vd(e){"@babel/helpers - typeof";return vd=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},vd(e)}function Wq(e,t){if(vd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(vd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zq(e){var t=Wq(e,"string");return vd(t)=="symbol"?t:t+""}function Hq(e,t,r){return(t=zq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dP(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 mt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dP(Object(r),!0).forEach(function(n){Hq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const qq=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),Vq=()=>Headers,Kq=(e,t,r)=>{const n=qq(r),i=Vq();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,mt(mt({},o),{},{headers:u}))}};function Gq(e){return e.endsWith("/")?e:e+"/"}function Yq(e,t){var r,n;const{db:i,auth:a,realtime:o,global:s}=e,{db:l,auth:u,realtime:d,global:f}=t,h={db:mt(mt({},l),i),auth:mt(mt({},u),a),realtime:mt(mt({},d),o),storage:{},global:mt(mt(mt({},f),s),{},{headers:mt(mt({},(r=f==null?void 0:f.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 Xq(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(Gq(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var Qq=class extends Mq{constructor(e){super(e)}},Jq=class{constructor(e,t,r){var n,i;this.supabaseUrl=e,this.supabaseKey=t;const a=Xq(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:Fq,realtime:Uq,auth:mt(mt({},Bq),{},{storageKey:o}),global:Lq},l=Yq(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:(d,f)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(f)} 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=Kq(t,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(mt({headers:this.headers,accessToken:this._getAccessToken.bind(this)},l.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(d=>this.realtime.setAuth(d)).catch(d=>console.warn("Failed to set initial Realtime auth token:",d)),this.rest=new C9(new URL("rest/v1",a).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch}),this.storage=new EH(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new P9(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)}
430channel(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},d,f){const h={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new Qq({url:this.authUrl.href,headers:mt(mt({},h),d),storageKey:a,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:i,flowType:o,lock:s,debug:l,throwOnError:u,fetch:f,hasCustomAuthorizationHeader:Object.keys(this.headers).some(p=>p.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new G9(this.realtimeUrl.href,mt(mt({},e),{},{params:mt(mt({},{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 Zq=(e,t,r)=>new Jq(e,t,r);function e7(){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}e7()&&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 t7="https://dgcvwblydnysyqnwacjq.supabase.co",r7="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImRnY3Z3Ymx5ZG55c3lxbndhY2pxIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjkxNTk3MzMsImV4cCI6MjA4NDczNTczM30.D8CRmvdgBHZSD0x_hi4MrvirLYwKvoHuDfMFOGKAgdU",Ee=Zq(t7,r7,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}}),lR=w.createContext(void 0),n7=({children:e})=>{const[t,r]=w.useState(null),[n,i]=w.useState(null),[a,o]=w.useState(!0);w.useEffect(()=>{const{data:{subscription:d}}=Ee.auth.onAuthStateChange((f,h)=>{i(h),r((h==null?void 0:h.user)??null),o(!1)});return Ee.auth.getSession().then(({data:{session:f}})=>{i(f),r((f==null?void 0:f.user)??null),o(!1)}),()=>d.unsubscribe()},[]);const s=async(d,f,h)=>{const{error:p}=await Ee.auth.signUp({email:d,password:f,options:{emailRedirectTo:window.location.origin,data:{full_name:h}}});return{error:p}},l=async(d,f)=>{const{error:h}=await Ee.auth.signInWithPassword({email:d,password:f});return{error:h}},u=async()=>{await Ee.auth.signOut()};return c.jsx(lR.Provider,{value:{user:t,session:n,loading:a,signUp:s,signIn:l,signOut:u},children:e})},qn=()=>{const e=w.useContext(lR);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e},i7="G-9EJK71P126",cR=()=>typeof window<"u"&&typeof window.gtag=="function",a7=(e,t)=>{cR()&&window.gtag("config",i7,{page_path:e,page_title:document.title,page_location:window.location.href})},hl=(e,t)=>{cR()&&window.gtag("event",e,t??{})},Bl=(e,t)=>{hl("cta_click",{cta_name:e,location:t})},o7=e=>{hl("purchase",{transaction_id:e.transactionId,value:e.value,currency:e.currency??"USD",coupon:e.coupon,items:[{item_id:"30day_sleep_solution",item_name:"30-Day Sleep Solution",price:e.value,quantity:1}]})},jy=({children:e})=>{const{user:t,loading:r}=qn(),[n,i]=w.useState(null),[a,o]=w.useState(!0);return w.useEffect(()=>{r||(async()=>{if(!t){o(!1);return}try{const{data:l,error:u}=await Ee.from("profiles").select("has_purchased").eq("user_id",t.id).single();u?(console.error("Error checking purchase status:",u),i(!1)):i((l==null?void 0:l.has_purchased)??!1)}catch(l){console.error("Error checking purchase status:",l),i(!1)}finally{o(!1)}})()},[t,r]),r||a?c.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:c.jsx("div",{className:"text-center",children:c.jsx("div",{className:"animate-pulse text-muted-foreground",children:"Loading..."})})}):t?n?c.jsx(c.Fragment,{children:e}):c.jsx(j0,{to:"/checkout",replace:!0}):c.jsx(j0,{to:"/login",replace:!0})},uR=()=>{const{user:e,loading:t}=qn(),[r,n]=w.useState(!1),[i,a]=w.useState(!0);return w.useEffect(()=>{t||(async()=>
430{if(!e){n(!1),a(!1);return}try{const{data:s,error:l}=await Ee.rpc("has_role",{_user_id:e.id,_role:"admin"});l?(console.error("Error checking admin role:",l),n(!1)):n(s===!0)}catch(s){console.error("Error checking admin role:",s),n(!1)}finally{a(!1)}})()},[e,t]),{isAdmin:r,loading:i||t,user:e}},Ns=({children:e})=>{const{isAdmin:t,loading:r,user:n}=uR(),i=Kr();return r?c.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:c.jsxs("div",{className:"flex flex-col items-center gap-4",children:[c.jsx(lr,{className:"h-8 w-8 animate-spin text-primary"}),c.jsx("p",{className:"text-muted-foreground",children:"Checking permissions..."})]})}):n?t?c.jsx(c.Fragment,{children:e}):c.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:c.jsxs("div",{className:"text-center",children:[c.jsx("h1",{className:"text-2xl font-bold text-foreground mb-2",children:"Access Denied"}),c.jsx("p",{className:"text-muted-foreground",children:"You don't have permission to access this area."})]})}):c.jsx(j0,{to:"/admin/login",state:{from:i},replace:!0})},F0=ff("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-all duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90 shadow-md hover:shadow-lg",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",hero:"bg-gradient-to-r from-primary to-primary/80 text-primary-foreground font-semibold shadow-lg hover:shadow-xl hover:scale-105 transform",cta:"bg-gradient-to-r from-primary via-primary to-secondary text-primary-foreground font-bold shadow-xl hover:shadow-2xl hover:scale-105 transform border-0",glass:"bg-card/20 backdrop-blur-md border border-border/30 text-foreground hover:bg-card/40"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",xl:"h-14 roun
430ded-lg px-10 text-lg",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),se=w.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...i},a)=>{const o=n?IB:"button";return c.jsx(o,{className:te(F0({variant:t,size:r,className:e})),ref:a,...i})});se.displayName="Button";var Oy="focusScope.autoFocusOnMount",Py="focusScope.autoFocusOnUnmount",fP={bubbles:!1,cancelable:!0},s7="FocusScope",xg=w.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,l]=w.useState(null),u=Fn(i),d=Fn(a),f=w.useRef(null),h=Oe(t,m=>l(m)),p=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(n){let m=function(b){if(p.paused||!s)return;const _=b.target;s.contains(_)?f.current=_:ha(f.current,{select:!0})},v=function(b){if(p.paused||!s)return;const _=b.relatedTarget;_!==null&&(s.contains(_)||ha(f.current,{select:!0}))},x=function(b){if(document.activeElement===document.body)for(const S of b)S.removedNodes.length>0&&ha(s)};document.addEventListener("focusin",m),document.addEventListener("focusout",v);const y=new MutationObserver(x);return s&&y.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",v),y.disconnect()}}},[n,s,p.paused]),w.useEffect(()=>{if(s){pP.add(p);const m=document.activeElement;if(!s.contains(m)){const x=new CustomEvent(Oy,fP);s.addEventListener(Oy,u),s.dispatchEvent(x),x.defaultPrevented||(l7(h7(dR(s)),{select:!0}),document.activeElement===m&&ha(s))}return()=>{s.removeEventListener(Oy,u),setTimeout(()=>{const x=new CustomEvent(Py,fP);s.addEventListener(Py,d),s.dispatchEvent(x),x.defaultPrevented||ha(m??document.body,{select:!0}),s.removeEventListener(Py,d),pP.remove(p)},0)}}},[s,u,d,p]);const g=w.useCallback(m=>{if(!r&&!n||p.paused)return;const v=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,x=document.activeElement;if(v&&x){const y=m.currentTarget,[b,_]=c7(y);b&&_?!m.shiftKey&&x===_?(m.preventDefault(),r&&ha(b,{select:!0})):m.shiftKey&&x===b&&(m.preventDefault(),r&&ha(_,{select:!0})):x===y&&m.preventDefault()}},[r,n,p.paused]);return c.jsx(ce.div,{tabIndex:-1,...o,ref:h,onKeyDown:g})});xg.displayName=s7;function l7(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(ha(n,{select:t}),document.activeElement!==r)return}function c7(e){const t=dR(e),r=hP(t,e),n=hP(t.reverse(),e);return[r,n]}function dR(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function hP(e,t){for(const r of e)if(!u7(r,{upTo:t}))return r}function u7(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function d7(e){return e instanceof HTMLInputElement&&"select"in e}function ha(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&d7(e)&&t&&e.select()}}var pP=f7();function f7(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=mP(e,t),e.unshift(t)},remove(t){var r;e=mP(e,t),(r=e[0])==null||r.resume()}}}function mP(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function h7(e){return e.filter(t=>t.tagName!=="A")}var Ny=0;function J1(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??gP()),document.body.insertAdjacentElement("beforeend",e[1]??gP()),Ny++,()=>{Ny===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ny--}},[])}function gP(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var zh="right-scroll-bar-position",Hh="width-before-scroll-bar",p7="with-scroll-bars-hidden",m7="--removed-body-scroll-bar-size";function Ey(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function g7(e,t){var r=w.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var i=r.value;i!==n&&(r.value=n,r.callback(n,i))}}}})[0];return r.callback=t,r.facade}var v7=typeof window<"u"?w.useLayoutEffect:w.useEffect,vP=new WeakMap;function y7(e,t){var r=g7(null,function(n){return e.forEach(function(i){return Ey(i,n)})});return v7(function(){var n=vP.get(r);if(n){var i=new Set(n),a=new Set(e),o=r.current;
vendor: 4,196 bytes, lines 430-445
430i.forEach(function(s){a.has(s)||Ey(s,null)}),a.forEach(function(s){i.has(s)||Ey(s,o)})}vP.set(r,e)},[e]),r}function x7(e){return e}function b7(e,t){t===void 0&&(t=x7);var r=[],n=!1,i={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var o=t(a,n);return r.push(o),function(){r=r.filter(function(s){return s!==o})}},assignSyncMedium:function(a){for(n=!0;r.length;){var o=r;r=[],o.forEach(a)}r={push:function(s){return a(s)},filter:function(){return r}}},assignMedium:function(a){n=!0;var o=[];if(r.length){var s=r;r=[],s.forEach(a),o=r}var l=function(){var d=o;o=[],d.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(d){o.push(d),u()},filter:function(d){return o=o.filter(d),r}}}};return i}function w7(e){e===void 0&&(e={});var t=b7(null);return t.options=ri({async:!0,ssr:!1},e),t}var fR=function(e){var t=e.sideCar,r=Ec(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return w.createElement(n,ri({},r))};fR.isSideCarExport=!0;function S7(e,t){return e.useMedium(t),fR}var hR=w7(),ky=function(){},bg=w.forwardRef(function(e,t){var r=w.useRef(null),n=w.useState({onScrollCapture:ky,onWheelCapture:ky,onTouchMoveCapture:ky}),i=n[0],a=n[1],o=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,p=e.noRelative,g=e.noIsolation,m=e.inert,v=e.allowPinchZoom,x=e.as,y=x===void 0?"div":x,b=e.gapMode,_=Ec(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=h,j=y7([r,t]),O=ri(ri({},_),i);return w.createElement(w.Fragment,null,d&&w.createElement(S,{sideCar:hR,removeScrollBar:u,shards:f,noRelative:p,noIsolation:g,inert:m,setCallbacks:a,allowPinchZoom:!!v,lockRef:r,gapMode:b}),o?w.cloneElement(w.Children.only(s),ri(ri({},O),{ref:j})):w.createElement(y,ri({},O,{className:l,ref:j}),s))});bg.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};bg.classNames={fullWidth:Hh,zeroRight:zh};var _7=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function j7(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=_7();return t&&e.setAttribute("nonce",t),e}function O7(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function P7(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var N7=function(){var e=0,t=null;return{add:function(r){e==0&&(t=j7())&&(O7(t,r),P7(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},E7=function(){var e=N7();return function(t,r){w.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},pR=function(){var e=E7(),t=function(r){var n=r.styles,i=r.dynamic;return e(n,i),null};return t},k7={left:0,top:0,right:0,gap:0},Ay=function(e){return parseInt(e||"",10)||0},A7=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Ay(r),Ay(n),Ay(i)]},C7=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return k7;var t=A7(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},T7=pR(),pl="data-scroll-locked",$7=function(e,t,r,n){var i=e.left,a=e.top,o=e.right,s=e.gap;return r===void 0&&(r="margin"),` 431 .`.concat(p7,` { 432 overflow: hidden `).concat(n,`; 433 padding-right: `).concat(s,"px ").concat(n,`; 434 } 435 body[`).concat(pl,`] { 436 overflow: hidden `).concat(n,`; 437 overscroll-behavior: contain; 438 `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` 439 padding-left: `.concat(i,`px; 440 padding-top: `).concat(a,`px; 441 padding-right: `).concat(o,`px; 442 margin-left:0; 443 margin-top:0; 444 margin-right: `).concat(s,"px ").concat(n,`; 445 `),r==="padding"&&"padding-right: ".concat(s,"px ").concat(n,";
445")].filter(Boolean).join(""),` 446 } 447 448 .`).concat(zh,` { 449 right: `).concat(s,"px ").concat(n,`; 450 } 451 452 .`).concat(Hh,` { 453 margin-right: `).concat(s,"px ").concat(n,`; 454 } 455 456 .`).concat(zh," .").concat(zh,` { 457 right: 0 `).concat(n,`; 458 } 459 460 .`).concat(Hh," .").concat(Hh,` { 461 margin-right: 0 `).concat(n,`; 462 } 463 464 body[`).concat(pl,`] { 465 `).concat(m7,": ").concat(s,`px; 466 } 467`)},yP=function(){var e=parseInt(document.body.getAttribute(pl)||"0",10);return isFinite(e)?e:0},R7=function(){w.useEffect(function(){return document.body.setAttribute(pl,(yP()+1).toString()),function(){var e=yP()-1;e<=0?document.body.removeAttribute(pl):document.body.setAttribute(pl,e.toString())}},[])},M7=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n;R7();var a=w.useMemo(function(){return C7(i)},[i]);return w.createElement(T7,{styles:$7(a,!t,i,r?"":"!important")})},B0=!1;if(typeof window<"u")try{var lh=Object.defineProperty({},"passive",{get:function(){return B0=!0,!0}});window.addEventListener("test",lh,lh),window.removeEventListener("test",lh,lh)}catch{B0=!1}var Es=B0?{passive:!1}:!1,I7=function(e){return e.tagName==="TEXTAREA"},mR=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!I7(e)&&r[t]==="visible")},D7=function(e){return mR(e,"overflowY")},L7=function(e){return mR(e,"overflowX")},xP=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var i=gR(e,n);if(i){var a=vR(e,n),o=a[1],s=a[2];if(o>s)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},F7=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},B7=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},gR=function(e,t){return e==="v"?D7(t):L7(t)},vR=function(e,t){return e==="v"?F7(t):B7(t)},U7=function(e,t){return e==="h"&&t==="rtl"?-1:1},W7=function(e,t,r,n,i){var a=U7(e,window.getComputedStyle(t).direction),o=a*n,s=r.target,l=t.contains(s),u=!1,d=o>0,f=0,h=0;do{if(!s)break;var p=vR(e,s),g=p[0],m=p[1],v=p[2],x=m-v-a*g;(g||x)&&gR(e,s)&&(f+=x,h+=g);var y=s.parentNode;s=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(d&&(Math.abs(f)<1||!i)||!d&&(Math.abs(h)<1||!i))&&(u=!0),u},ch=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},bP=function(e){return[e.deltaX,e.deltaY]},wP=function(e){return e&&"current"in e?e.current:e},z7=function(e,t){return e[0]===t[0]&&e[1]===t[1]},H7=function(e){return` 468 .block-interactivity-`.concat(e,` {pointer-events: none;} 469 .allow-interactivity-`).concat(e,` {pointer-events: all;} 470`)},q7=0,ks=[];function V7(e){var t=w.useRef([]),r=w.useRef([0,0]),n=w.useRef(),i=w.useState(q7++)[0],a=w.useState(pR)[0],o=w.useRef(e);w.useEffect(function(){o.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=_9([e.lockRef.current],(e.shards||[]).map(wP),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=w.useCallback(function(m,v){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!o.current.allowPinchZoom;var x=ch(m),y=r.current,b="deltaX"in m?m.deltaX:y[0]-x[0],_="deltaY"in m?m.deltaY:y[1]-x[1],S,j=m.target,O=Math.abs(b)>Math.abs(_)?"h":"v";if("touches"in m&&O==="h"&&j.type==="range")return!1;var P=xP(O,j);if(!P)return!0;if(P?S=O:(S=O==="v"?"h":"v",P=xP(O,j)),!P)return!1;if(!n.current&&"changedTouches"in m&&(b||_)&&(n.current=S),!S)return!0;var N=n.current||S;return W7(N,v,m,N==="h"?b:_,!0)},[]),l=w.useCallback(function(m){var v=m;if(!(!ks.length||ks[ks.length-1]!==a)){var x="deltaY"in v?bP(v):ch(v),y=t.current.filter(function(S){return S.name===v.type&&(S.target===v.target||v.target===S.shadowParent)&&z7(S.delta,x)})[0];if(y&&y.should){v.cancelable&&v.preventDefault();return}
vendor: 4,334 bytes, line 470
470if(!y){var b=(o.current.shards||[]).map(wP).filter(Boolean).filter(function(S){return S.contains(v.target)}),_=b.length>0?s(v,b[0]):!o.current.noIsolation;_&&v.cancelable&&v.preventDefault()}}},[]),u=w.useCallback(function(m,v,x,y){var b={name:m,delta:v,target:x,should:y,shadowParent:K7(x)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(_){return _!==b})},1)},[]),d=w.useCallback(function(m){r.current=ch(m),n.current=void 0},[]),f=w.useCallback(function(m){u(m.type,bP(m),m.target,s(m,e.lockRef.current))},[]),h=w.useCallback(function(m){u(m.type,ch(m),m.target,s(m,e.lockRef.current))},[]);w.useEffect(function(){return ks.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",l,Es),document.addEventListener("touchmove",l,Es),document.addEventListener("touchstart",d,Es),function(){ks=ks.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,Es),document.removeEventListener("touchmove",l,Es),document.removeEventListener("touchstart",d,Es)}},[]);var p=e.removeScrollBar,g=e.inert;return w.createElement(w.Fragment,null,g?w.createElement(a,{styles:H7(i)}):null,p?w.createElement(M7,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function K7(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const G7=S7(hR,V7);var wg=w.forwardRef(function(e,t){return w.createElement(bg,ri({},e,{ref:t,sideCar:G7}))});wg.classNames=bg.classNames;var Y7=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},As=new WeakMap,uh=new WeakMap,dh={},Cy=0,yR=function(e){return e&&(e.host||yR(e.parentNode))},X7=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=yR(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Q7=function(e,t,r,n){var i=X7(t,Array.isArray(e)?e:[e]);dh[r]||(dh[r]=new WeakMap);var a=dh[r],o=[],s=new Set,l=new Set(i),u=function(f){!f||s.has(f)||(s.add(f),u(f.parentNode))};i.forEach(u);var d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(h){if(s.has(h))d(h);else try{var p=h.getAttribute(n),g=p!==null&&p!=="false",m=(As.get(h)||0)+1,v=(a.get(h)||0)+1;As.set(h,m),a.set(h,v),o.push(h),m===1&&g&&uh.set(h,!0),v===1&&h.setAttribute(r,"true"),g||h.setAttribute(n,"true")}catch(x){console.error("aria-hidden: cannot operate on ",h,x)}})};return d(t),s.clear(),Cy++,function(){o.forEach(function(f){var h=As.get(f)-1,p=a.get(f)-1;As.set(f,h),a.set(f,p),h||(uh.has(f)||f.removeAttribute(n),uh.delete(f)),p||f.removeAttribute(r)}),Cy--,Cy||(As=new WeakMap,As=new WeakMap,uh=new WeakMap,dh={})}},Z1=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=Y7(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),Q7(n,i,r,"aria-hidden")):function(){return null}},Sg="Dialog",[xR,Qje]=fn(Sg),[J7,Vn]=xR(Sg),bR=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=w.useRef(null),l=w.useRef(null),[u,d]=fi({prop:n,defaultProp:i??!1,onChange:a,caller:Sg});return c.jsx(J7,{scope:t,triggerRef:s,contentRef:l,contentId:Li(),titleId:Li(),descriptionId:Li(),open:u,onOpenChange:d,onOpenToggle:w.useCallback(()=>d(f=>!f),[d]),modal:o,children:r})};bR.displayName=Sg;var wR="DialogTrigger",SR=w.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Vn(wR,r),a=Oe(t,i.triggerRef);return c.jsx(ce.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":rS(i.open),...n,ref:a,onClick:oe(e.onClick,i.onOpenToggle)})});SR.displayName=wR;var eS="DialogPortal",[Z7,_R]=xR(eS,{forceMount:void 0}),jR=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:i}=e,a=Vn(eS,t);return c.jsx(Z7,{scope:t,forceMount:r,children:w.Children.map(n,o=>c.jsx(vi,{present:r||a.open,children:c.jsx(uf,{asChild:!0,container:i,children:o})}))})};jR.displayName=eS;var Cp="DialogOverlay",OR=w.forwardRef((e,t)=>{const r=_R(Cp,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=Vn(Cp,e.__scopeDialog);return a.modal?c.jsx(vi,{present:n||a.open,children:c.jsx(tV,{...i,ref:t})}):null});OR.displayName=Cp;var eV=Vo("DialogOverlay.RemoveScroll"),tV=w.forwardRef((e,t)=>
vendor: 4,981 bytes, lines 470-474
470{const{__scopeDialog:r,...n}=e,i=Vn(Cp,r);return c.jsx(wg,{as:eV,allowPinchZoom:!0,shards:[i.contentRef],children:c.jsx(ce.div,{"data-state":rS(i.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Go="DialogContent",PR=w.forwardRef((e,t)=>{const r=_R(Go,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=Vn(Go,e.__scopeDialog);return c.jsx(vi,{present:n||a.open,children:a.modal?c.jsx(rV,{...i,ref:t}):c.jsx(nV,{...i,ref:t})})});PR.displayName=Go;var rV=w.forwardRef((e,t)=>{const r=Vn(Go,e.__scopeDialog),n=w.useRef(null),i=Oe(t,r.contentRef,n);return w.useEffect(()=>{const a=n.current;if(a)return Z1(a)},[]),c.jsx(NR,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:oe(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:oe(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:oe(e.onFocusOutside,a=>a.preventDefault())})}),nV=w.forwardRef((e,t)=>{const r=Vn(Go,e.__scopeDialog),n=w.useRef(!1),i=w.useRef(!1);return c.jsx(NR,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(n.current||(s=r.triggerRef.current)==null||s.focus(),a.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:a=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((u=r.triggerRef.current)==null?void 0:u.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),NR=w.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=Vn(Go,r),l=w.useRef(null),u=Oe(t,l);return J1(),c.jsxs(c.Fragment,{children:[c.jsx(xg,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:a,children:c.jsx(wc,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":rS(s.open),...o,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(iV,{titleId:s.titleId}),c.jsx(oV,{contentRef:l,descriptionId:s.descriptionId})]})]})}),tS="DialogTitle",ER=w.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Vn(tS,r);return c.jsx(ce.h2,{id:i.titleId,...n,ref:t})});ER.displayName=tS;var kR="DialogDescription",AR=w.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Vn(kR,r);return c.jsx(ce.p,{id:i.descriptionId,...n,ref:t})});AR.displayName=kR;var CR="DialogClose",TR=w.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Vn(CR,r);return c.jsx(ce.button,{type:"button",...n,ref:t,onClick:oe(e.onClick,()=>i.onOpenChange(!1))})});TR.displayName=CR;function rS(e){return e?"open":"closed"}var $R="DialogTitleWarning",[Jje,RR]=RB($R,{contentName:Go,titleName:tS,docsSlug:"dialog"}),iV=({titleId:e})=>{const t=RR($R),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 471 472If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 473 474For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return w.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},aV="DialogDescriptionWarning",oV=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${RR(aV).contentName}}.`;return w.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},MR=bR,sV=SR,IR=jR,_g=OR,jg=PR,Og=ER,Pg=AR,DR=TR;const lV=MR,cV=sV,uV=IR,LR=w.forwardRef(({className:e,...t},r)=>c.jsx(_g,{className:te("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));LR.displayName=_g.displayName;const dV=ff("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),FR=w.forwardRef(({side:e="right",className:t,children:r,...n},i)=>c.jsxs(uV,{children:[c.jsx(LR,{}),c.jsxs(jg,{ref:i,className:te(dV({side:e}),t),...n,children:[r,c.jsxs(DR,{className:"absolute right-4 top-4 roun
474ded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-secondary hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[c.jsx(sg,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));FR.displayName=jg.displayName;const fV=w.forwardRef(({className:e,...t},r)=>c.jsx(Og,{ref:r,className:te("text-lg font-semibold text-foreground",e),...t}));fV.displayName=Og.displayName;const hV=w.forwardRef(({className:e,...t},r)=>c.jsx(Pg,{ref:r,className:te("text-sm text-muted-foreground",e),...t}));hV.displayName=Pg.displayName;const Gr=()=>{const[e,t]=w.useState(!1),r=Kr(),n=Ji(),{user:i,signOut:a}=qn(),o=[{href:"/",label:"Home"}],s=[{href:"/dashboard",label:"Dashboard"},{href:"/sleep-tracker",label:"Sleep Tracker"}],l=i?[...o,...s]:o,u=f=>r.pathname===f,d=async()=>{await a(),n("/")};return c.jsx("header",{className:"fixed top-0 left-0 right-0 z-50 bg-card/80 backdrop-blur-lg border-b border-border/50",children:c.jsx("div",{className:"container mx-auto px-4",children:c.jsxs("div",{className:"flex items-center justify-between h-16",children:[c.jsxs(Re,{to:"/",className:"flex items-center gap-2",children:[c.jsx(Dt,{className:"h-8 w-8 text-primary"}),c.jsx("span",{className:"font-serif text-xl font-semibold text-foreground",children:"30 Day Sleep"})]}),c.jsx("nav",{className:"hidden md:flex items-center gap-8",children:l.map(f=>c.jsx(Re,{to:f.href,className:`text-sm font-medium transition-colors hover:text-primary ${u(f.href)?"text-primary":"text-muted-foreground"}`,children:f.label},f.href))}),c.jsx("div",{className:"hidden md:flex items-center gap-4",children:i?c.jsxs(se,{variant:"ghost",size:"sm",onClick:d,children:[c.jsx(d0,{className:"h-4 w-4 mr-2"}),"Sign Out"]}):c.jsxs(c.Fragment,{children:[c.jsx(Re,{to:"/login",children:c.jsx(se,{variant:"ghost",size:"sm",children:"Login"})}),c.jsx(Re,{to:"/checkout",onClick:()=>Bl("Buy Now","header_desktop"),children:c.jsx(se,{variant:"hero",size:"sm",children:"Buy Now"})})]})}),c.jsxs(lV,{open:e,onOpenChange:t,children:[c.jsx(cV,{asChild:!0,className:"md:hidden",children:c.jsx(se,{variant:"ghost",size:"icon",children:c.jsx(H6,{className:"h-6 w-6"})})}),c.jsx(FR,{side:"right",className:"w-[300px] bg-card",children:c.jsxs("div",{className:"flex flex-col gap-6 mt-8",children:[l.map(f=>c.jsx(Re,{to:f.href,onClick:()=>t(!1),className:`text-lg font-medium transition-colors hover:text-primary ${u(f.href)?"text-primary":"text-foreground"}`,children:f.label},f.href)),c.jsx("div",{className:"pt-6 border-t border-border space-y-4",children:i?c.jsxs(se,{variant:"outline",className:"w-full",onClick:()=>{d(),t(!1)},children:[c.jsx(d0,{className:"h-4 w-4 mr-2"}),"Sign Out"]}):c.jsxs(c.Fragment,{children:[c.jsx(Re,{to:"/login",onClick:()=>t(!1),children:c.jsx(se,{variant:"outline",className:"w-full",children:"Login"})}),c.jsx(Re,{to:"/checkout",onClick:()=>{Bl("Buy Now","header_mobile"),t(!1)},children:c.jsx(se,{variant:"hero",className:"w-full",children:"Buy Now"})})]})})]})})]})]})})})},pV="/assets/logo-lHHubgg8.png",xi=()=>c.jsx("footer",{className:"bg-secondary text-secondary-foreground",children:c.jsxs("div",{className:"container mx-auto px-4 py-16",children:[c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-12",children:[c.jsxs("div",{className:"space-y-4",children:[c.jsx(Re,{to:"/",className:"flex items-center gap-2",children:c.jsx("img",{src:pV,alt:"Perfect 30 Days Sleep",className:"h-12 w-auto"})}),c.jsx("p",{className:"text-secondary-foreground/70 text-sm leading-relaxed",children:"Transform your sleep in just 30 days with our science-backed program designed for lasting results."}),c.jsxs("div",{className:"flex gap-4 pt-2",children:[c.jsx("a",{href:"#",className:"text-secondary-foreground/60 hover:text-primary transition-colors",children:c.jsx(W6,{className:"h-5 w-5"})}),c.jsx("a",{href:"https://www.facebook.com/perfect30daysleep",target:"_blank",rel:"noopener noreferrer","aria-label":"Facebook",className:"text-secondary-foreground/60 hover:text-primary transition-colors",children:c.jsx(I6,{className:"h-5 w-5"})}
474),c.jsx("a",{href:"#",className:"text-secondary-foreground/60 hover:text-primary transition-colors",children:c.jsx(X6,{className:"h-5 w-5"})}),c.jsx("a",{href:"#",className:"text-secondary-foreground/60 hover:text-primary transition-colors",children:c.jsx(hf,{className:"h-5 w-5"})})]})]}),c.jsxs("div",{children:[c.jsx("h4",{className:"font-semibold text-lg mb-4",children:"Quick Links"}),c.jsxs("ul",{className:"space-y-3",children:[c.jsx("li",{children:c.jsx(Re,{to:"/course",className:"text-secondary-foreground/70 hover:text-primary transition-colors text-sm",children:"The Course"})}),c.jsx("li",{children:c.jsx(Re,{to:"/sleep-tracker",className:"text-secondary-foreground/70 hover:text-primary transition-colors text-sm",children:"Sleep Tracker"})}),c.jsx("li",{children:c.jsx(Re,{to:"/calculator",className:"text-secondary-foreground/70 hover:text-primary transition-colors text-sm",children:"Sleep Calculator"})}),c.jsx("li",{children:c.jsx("a",{href:"https://perfect30daysleep.goaffpro.com/",target:"_blank",rel:"noopener noreferrer",className:"text-secondary-foreground/70 hover:text-primary transition-colors text-sm",children:"Become an Affiliate"})})]})]}),c.jsxs("div",{children:[c.jsx("h4",{className:"font-semibold text-lg mb-4",children:"Legal"}),c.jsxs("ul",{className:"space-y-3",children:[c.jsx("li",{children:c.jsx(Re,{to:"/privacy",className:"text-secondary-foreground/70 hover:text-primary transition-colors text-sm",children:"Privacy Policy"})}),c.jsx("li",{children:c.jsx(Re,{to:"/terms",className:"text-secondary-foreground/70 hover:text-primary transition-colors text-sm",children:"Terms of Use"})}),c.jsx("li",{children:c.jsx(Re,{to:"/refund",className:"text-secondary-foreground/70 hover:text-primary transition-colors text-sm",children:"Refund Policy"})}),c.jsx("li",{children:c.jsx(Re,{to:"/contact",className:"text-secondary-foreground/70 hover:text-primary transition-colors text-sm",children:"Contact Us"})})]})]}),c.jsxs("div",{children:[c.jsx("h4",{className:"font-semibold text-lg mb-4",children:"Get in Touch"}),c.jsxs("ul",{className:"space-y-3 text-sm text-secondary-foreground/70",children:[c.jsx("li",{children:c.jsx("a",{href:"mailto:[email protected]",className:"hover:text-primary transition-colors",children:"[email protected]"})}),c.jsx("li",{children:"Response time: 24-48 hours"})]})]})]}),c.jsx("div",{className:"border-t border-secondary-foreground/20 mt-12 pt-8 text-center text-sm text-secondary-foreground/60",children:c.jsxs("p",{children:["© ",new Date().getFullYear()," 30 Day Sleep Solution. All rights reserved."]})})]})}),mV="/assets/hero-night-sky-Dz1HpNer.jpg",gV=()=>{const[e,t]=w.useState({hours:23,minutes:59,seconds:59});w.useEffect(()=>{const n=setInterval(()=>{t(i=>i.seconds>0?{...i,seconds:i.seconds-1}:i.minutes>0?{...i,minutes:i.minutes-1,seconds:59}:i.hours>0?{hours:i.hours-1,minutes:59,seconds:59}:{hours:23,minutes:59,seconds:59})},1e3);return()=>clearInterval(n)},[]);const r=({value:n,label:i})=>c.jsxs("div",{className:"flex flex-col items-center",children:[c.jsx("div",{className:"bg-card/20 backdrop-blur-md border border-border/30 rounded-lg px-4 py-3 min-w-[70px]",children:c.jsx("span",{className:"text-3xl md:text-4xl font-bold text-primary-foreground font-mono",children:n.toString().padStart(2,"0")})}),c.jsx("span",{className:"text-xs text-primary-foreground/60 mt-2 uppercase tracking-wider",children:i})]});return c.jsxs("div",{className:"flex flex-col items-center gap-4",children:[c.jsx("p",{className:"text-sm text-primary-foreground/80 font-medium",children:"â° This offer expires in:"}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx(r,{value:e.hours,label:"Hours"}),c.jsx("span",{className:"text-3xl text-primary-foreground/40 font-bold",children:":"}),c.jsx(r,{value:e.minutes,label:"Minutes"}),c.jsx("span",{className:"text-3xl text-primary-foreground/40 font-bold",children:":"}),c.jsx(r,{value:e.seconds,label:"Seconds"})]})]})},vV=()=>c.jsxs("section",{className:"relative min-h-screen flex items-center justify-center overflow-hidden",children:[c.jsx("div",{className:"absolute inset-0 bg-cover bg-center bg-no-repeat",style:{backgroundImage:`url(${mV})`},children:c.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-secondary/80 via-secondary/60 to-background"})}),c.jsx("div",{className:"relative container mx-auto px-4 pt-24 pb-12",children:c.jsxs("div",{className:"max-w-4xl mx-auto text-center space-y-8",children:[c.jsxs("div",{className:"inline-flex items-center gap-2 bg-primary/20 backdrop-blur-sm border border-primary/30 rounded-full px-4 py-2 text-sm text-primary-foreground",children:[c.jsx("span",{className:"animate-pulse",children:"ð"}),c.jsx("span",{children:"Limited Time Offer - Save 33% Today"})]}),c.jsxs("h1",{className:"font-serif text-4xl md:text-5xl lg:text-7xl font-bold text-primary-foreground leading-tight",children:["Transform Your Sleep",c.jsx("span",{className:"block text-primary",children:"in Just 30 Days"})]}),c.jsx("p",{className:"text-lg md:text-xl text-primary-foreground
474/80 max-w-2xl mx-auto leading-relaxed",children:"A science-backed program designed to help you fall asleep faster, stay asleep longer, and wake up feeling refreshed and energized."}),c.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-6 text-primary-foreground/90",children:[c.jsxs("div",{className:"flex items-center gap-1",children:[[...Array(5)].map((e,t)=>c.jsx(cl,{className:"h-5 w-5 fill-primary text-primary"},t)),c.jsx("span",{className:"ml-2 font-medium",children:"4.9/5"})]}),c.jsx("div",{className:"hidden sm:block w-px h-6 bg-primary-foreground/30"}),c.jsx("span",{children:"10,000+ Happy Sleepers"}),c.jsx("div",{className:"hidden sm:block w-px h-6 bg-primary-foreground/30"}),c.jsx("span",{children:"30-Day Money Back Guarantee"})]}),c.jsx(gV,{}),c.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4 pt-4",children:[c.jsx(Re,{to:"/checkout",onClick:()=>Bl("Start Your Journey","hero_primary"),children:c.jsxs(se,{variant:"cta",size:"xl",children:["Start Your Journey - $199",c.jsx("span",{className:"ml-2 line-through opacity-60",children:"$297"})]})}),c.jsxs(se,{variant:"glass",size:"lg",className:"gap-2",onClick:()=>hl("watch_preview_click",{location:"hero_secondary"}),children:[c.jsx(id,{className:"h-4 w-4"}),"Watch Preview"]})]}),c.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-4 pt-8 text-sm text-primary-foreground/70",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(gr,{className:"h-4 w-4 text-primary"}),c.jsx("span",{children:"Instant Access"})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(gr,{className:"h-4 w-4 text-primary"}),c.jsx("span",{children:"Lifetime Updates"})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(gr,{className:"h-4 w-4 text-primary"}),c.jsx("span",{children:"Secure Checkout"})]})]})]})}),c.jsx("div",{className:"absolute bottom-8 left-1/2 transform -translate-x-1/2 animate-bounce",children:c.jsx("div",{className:"w-6 h-10 border-2 border-primary-foreground/30 rounded-full flex justify-center pt-2",children:c.jsx("div",{className:"w-1.5 h-3 bg-primary-foreground/50 rounded-full animate-pulse"})})})]}),re=w.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:te("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));re.displayName="Card";const ct=w.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:te("flex flex-col space-y-1.5 p-6",e),...t}));ct.displayName="CardHeader";const ut=w.forwardRef(({className:e,...t},r)=>c.jsx("h3",{ref:r,className:te("text-2xl font-semibold leading-none tracking-tight",e),...t}));ut.displayName="CardTitle";const Ng=w.forwardRef(({className:e,...t},r)=>c.jsx("p",{ref:r,className:te("text-sm text-muted-foreground",e),...t}));Ng.displayName="CardDescription";const ie=w.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:te("p-6 pt-0",e),...t}));ie.displayName="CardContent";const yV=w.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:te("flex items-center p-6 pt-0",e),...t}));yV.displayName="CardFooter";const xV=[{icon:Dt,title:"30 Daily Lessons",description:"Bite-sized, actionable lessons delivered each day to gradually improve your sleep habits."},{icon:$2,title:"Science-Backed Methods",description:"Techniques rooted in cognitive behavioral therapy for insomnia (CBT-I) and sleep science."},{icon:L2,title:"Guided Meditations",description:"Calming audio tracks and sleep meditations to help you relax before bed."},{icon:ds,title:"Sleep Tracking Tools",description:"Monitor your progress with our built-in sleep diary and progress tracker."},{icon:Ml,title:"Downloadable Resources",description:"PDFs, worksheets, and quick-start guides you can access anytime, anywhere."},{icon:B6,title:"Lifetime Access",description:"Keep all materials forever with free updates as the program evolves."}],bV=()=>c.jsx("section",{className:"py-24 bg-background",children:c.jsxs("div",{className:"container mx-auto px-4",children:[c.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-16",children:[c.jsx("span",{className:"text-primary text-sm font-semibold tracking-wider up
474percase",children:"What's Included"}),c.jsx("h2",{className:"font-serif text-3xl md:text-4xl lg:text-5xl font-bold text-foreground mt-4 mb-6",children:"Everything You Need for Better Sleep"}),c.jsx("p",{className:"text-muted-foreground text-lg",children:"A complete toolkit designed to transform your relationship with sleep and help you wake up refreshed every morning."})]}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:xV.map((e,t)=>c.jsx(re,{className:"group bg-card border-border/50 hover:border-primary/30 transition-all duration-300 hover:shadow-lg hover:-translate-y-1",children:c.jsxs(ie,{className:"p-8",children:[c.jsx("div",{className:"w-14 h-14 rounded-xl bg-primary/10 flex items-center justify-center mb-6 group-hover:bg-primary/20 transition-colors",children:c.jsx(e.icon,{className:"h-7 w-7 text-primary"})}),c.jsx("h3",{className:"text-xl font-semibold text-foreground mb-3",children:e.title}),c.jsx("p",{className:"text-muted-foreground leading-relaxed",children:e.description})]})},t))})]})}),wV=ff("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Ai({className:e,variant:t,...r}){return c.jsx("div",{className:te(wV({variant:t}),e),...r})}const SV="/assets/dr-sleeping-CfTJZL5O.jpg",_V=[{icon:ds,title:"Circadian Rhythm Reset",description:"Your body's internal clock controls when you feel sleepy. Our program helps realign your natural sleep-wake cycle for effortless rest."},{icon:G6,title:"Sleep Hygiene Optimization",description:"Environmental and behavioral factors that promote quality sleep. Small changes that lead to dramatic improvements in how you rest."},{icon:$2,title:"Cognitive Behavioral Strategies",description:"Evidence-based techniques used by sleep clinics worldwide. We address the mental patterns that keep you awake at night."}],jV=()=>c.jsx("section",{className:"py-24 bg-background",children:c.jsxs("div",{className:"container mx-auto px-4",children:[c.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center mb-16",children:[c.jsxs("div",{className:"space-y-8",children:[c.jsxs("div",{children:[c.jsx(Ai,{className:"mb-4 uppercase tracking-wider",children:"The Science"}),c.jsx("h2",{className:"text-3xl md:text-4xl lg:text-5xl font-bold text-foreground mb-4",children:"Why Your Brain Needs Better Sleep"}),c.jsx("p",{className:"text-lg text-muted-foreground",children:"Our 30-day program is built on proven sleep science principles developed through decades of research. Here's the foundation of your transformation."})]}),c.jsx("div",{className:"space-y-4",children:_V.map((e,t)=>c.jsx(re,{className:"border-border/50 bg-card/50",children:c.jsxs(ie,{className:"p-4 flex items-start gap-4",children:[c.jsx("div",{className:"p-2 rounded-lg bg-primary/10 text-primary shrink-0",children:c.jsx(e.icon,{className:"h-6 w-6"})}),c.jsxs("div",{children:[c.jsx("h3",{className:"font-semibold text-foreground mb-1",children:e.title}),c.jsx("p",{className:"text-sm text-muted-foreground",children:e.description})]})]})},t))})]}),c.jsx("div",{className:"relative lg:order-last",children:c.jsxs("div",{className:"relative rounded-2xl overflow-hidden shadow-2xl",children:[c.jsx("img",{src:SV,alt:"Dr. Robert Mitchell demonstrating peaceful sleep",className:"w-full h-auto object-cover"}),c.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-background/20 to-transparent"})]})})]}),c.jsxs("div",{className:"bg-primary/5 border-l-4 border-primary rounded-r-lg p-6 md:p-8",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[c.jsx(D2,{className:"h-6 w-6 text-primary"}),c.jsx("h3",{className:"text-xl font-bold text-foreground uppercase tracking-wide",children:"Try This Tonight"})]}),c.jsxs("p",{className:"text-lg text-foreground mb-4",children:[c.jsx("strong",{children:'Set a "wind-down" alarm 90 minutes before bed.'})," When it goes off, stop eating, dim the lights, and put away all screens. This simple routine signals your brain that sleep is coming."]}),c.jsxs("p",{className:"text-muted-foreground mb-4",children:[c.jsx("strong",{children:"Why it works:"})," Your body needs time to transition from wakefulness to sleep. The 90-minute window allows your core temperature to drop and melatonin production to begin naturallyâtwo essential triggers for deep, restorative sleep."]}),c.jsxs("blockquote",{className:"border-l-2 border-primary/50 pl-4 italic text-muted-foreground",children:['"This single habit has helped more of my patients than any sleep medication ever could."',c.jsx("footer",{className:"mt-2 text-sm font-semibold text-foreground not-italic",children:"â Dr. Robert Mitchell"})]})]})]})}),OV="/assets/bedroom-peaceful-Ckpayd6P.jpg",PV=()=>{const e=["30 structured daily lessons with video content","Guided sleep meditations & relaxation audio","Printable sleep diary & tracking worksheets","Quick-start guide for immediate results","Bonus: Sleep environment optimization checklist"];return c.jsx("section",{className:"py-24 bg-background",children:c.jsx("div",{className:"container mx-auto px-4",children:c.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-16 items-center",children:[c.jsxs("div",{className:"relative",children:[c.jsxs("div",{className:"relative rounded-2xl overflow-hidden shadow-2xl",children:[c.jsx("img",{src:OV,alt:"Peaceful bedroom environment",className:"w-full h-auto"}),c.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-secondary/60 to-transparent"})]}),c.jsxs("div",{className:"absolute -bottom-6 -right-6 bg-card rounded-xl shadow-xl p-4 flex items-center gap-3",children:[c.jsx("div",{className:"w-12 h-12 rounded-full bg-primary/20 flex items-center justify-center",children:c.jsx(Q6,{className:"h-6 w-6 text-primary"})}),c.jsxs("div",{children:[c.jsx("p",{className:"font-semibold text-foreground",children:"30+ Videos"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Daily lessons"})]})]}),c.jsxs("div",{className:"absolute -top-6 -left-6 bg-card rounded-xl shadow-xl p-4 flex items-center gap-3",children:[c.jsx("div",{className:"w-12 h-12 rounded-full bg-primary/20 flex items-center justify-center",children:c.jsx(L2,{className:"h-6 w-6 text-primary"})}),c.jsxs("div",{children:[c.jsx("p",{className:"font-semibold text-foreground",children:"12 Audios"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Meditations"})]})]})]}),c.jsxs("div",{className:"space-y-8",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-primary text-sm font-semibold tracking-wider up
474percase",children:"The Program"}),c.jsx("h2",{className:"font-serif text-3xl md:text-4xl lg:text-5xl font-bold text-foreground mt-4 mb-6",children:"Your Journey to Better Sleep Starts Here"}),c.jsx("p",{className:"text-muted-foreground text-lg leading-relaxed",children:"Our carefully designed 30-day program takes you step-by-step through proven techniques that address the root causes of poor sleep, not just the symptoms."})]}),c.jsx("ul",{className:"space-y-4",children:e.map((t,r)=>c.jsxs("li",{className:"flex items-start gap-3",children:[c.jsx(gr,{className:"h-6 w-6 text-primary flex-shrink-0 mt-0.5"}),c.jsx("span",{className:"text-foreground",children:t})]},r))}),c.jsxs("div",{className:"flex items-center gap-4 pt-4",children:[c.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[c.jsx(Il,{className:"h-5 w-5 text-primary"}),c.jsx("span",{children:"Instant Download"})]}),c.jsx("div",{className:"w-px h-6 bg-border"}),c.jsx("span",{className:"text-muted-foreground",children:"Works on all devices"})]})]})]})})})},NV=[{step:"Step One",title:"Sign Up Today",description:"Get immediate access to the Thirty-Day Sleep Solution and start your journey toward deeper, more restful nights."}
474,{step:"Step Two",title:"Follow Daily Action Steps",description:"Each evening, complete simple, science-based activities designed to calm your mind and reset your sleep routine."},{step:"Step Three",title:"Wake Up Rested",description:"See the results build day by dayâso you wake up energized, focused, and ready to enjoy your mornings again."}],EV=()=>c.jsx("section",{className:"py-24 bg-secondary/30",children:c.jsxs("div",{className:"container mx-auto px-4",children:[c.jsxs("div",{className:"text-center mb-16",children:[c.jsx("span",{className:"text-primary text-sm font-semibold tracking-wider uppercase",children:"Simple Process"}),c.jsx("h2",{className:"font-serif text-3xl md:text-4xl lg:text-5xl font-bold text-foreground mt-4 mb-2",children:"How It Works"}),c.jsx("p",{className:"text-2xl md:text-3xl font-bold text-foreground mb-6",children:"(3 Simple Steps)"}),c.jsx("p",{className:"text-lg text-muted-foreground max-w-3xl mx-auto leading-relaxed",children:"Better sleep doesn't have to be hard. The Thirty-Day Sleep Solution gives you a simple daily plan to reset your routineâso you can go from restless nights to waking up refreshed and energized."})]}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8 max-w-6xl mx-auto",children:NV.map((e,t)=>c.jsx(re,{className:"bg-card border-border/50 hover:border-primary/30 transition-all duration-300 hover:shadow-lg hover:-translate-y-1",children:c.jsxs(ie,{className:"p-8 text-center",children:[c.jsx("p",{className:"text-primary font-semibold text-lg",children:e.step}),c.jsx("h3",{className:"text-xl font-bold text-foreground mt-2",children:e.title}),c.jsx("p",{className:"text-muted-foreground mt-3 leading-relaxed",children:e.description})]})},t))})]})}),kV=[{name:"Sarah M.",role:"Working Mom",content:"I've struggled with insomnia for years. This program finally helped me understand WHY I wasn't sleeping and gave me practical tools to fix it. I now fall asleep within 15 minutes!",rating:5},{name:"Michael R.",role:"Entrepreneur",content:"As a business owner, my mind was always racing at night. The meditation techniques and wind-down routines have been game-changers. I wake up energized now.",rating:5},{name:"Jennifer K.",role:"Nurse",content:"Shift work destroyed my sleep patterns. This program taught me how to adapt and get quality rest even with irregular hours. Worth every penny!",rating:5},{name:"David L.",role:"Retired Teacher",content:"At 65, I thought poor sleep was just part of aging. Wrong! The daily lessons were easy to follow and I saw improvements within the first week.",rating:5},{name:"Emma T.",role:"College Student",content:"Between studying and stress, I was surviving on 4 hours of sleep. Now I get 7-8 hours and my grades have actually improved because I can focus better!",rating:5},{name:"Robert H.",role:"Software Engineer",content:"The sleep tracker helped me identify that late-night coding was my biggest problem. Simple changes, huge results. Sleeping better than I have in a decade.",rating:5}],AV=()=>c.jsx("section",{className:"py-24 bg-card",children:c.jsxs("div",{className:"container mx-auto px-4",children:[c.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-16",children:[c.jsx("span",{className:"text-primary text-sm font-semibold tracking-wider uppercase",children:"Success Stories"}),c.jsx("h2",{className:"font-serif text-3xl md:text-4xl lg:text-5xl font-bold text-foreground mt-4 mb-6",children:"Join Thousands of Happy Sleepers"}),c.jsx("p",{className:"text-muted-foreground text-lg",children:"Real stories from real people who transformed their sleep with our 30-day program."})]}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:kV.map((e,t)=>c.jsx(re,{className:"bg-background border-border/50 hover:shadow-lg transition-all duration-300",children:c.jsxs(ie,{className:"p-6",children:[c.jsx("div",{className:"flex items-center gap-1 mb-4",children:[...Array(e.rating)].map((r,n)=>c.jsx(cl,{className:"h-4 w-4 fill-primary text-primary"},n))}),c.jsxs("p",{className:"text-foreground mb-6 leading-relaxed",children:['"',e.content,'"']}),c.jsxs("div",{className:"border-t border-border pt-4",children:[c.jsx("p",{className:"font-semibold text-foreground",children:e.name}),c.jsx("p",{className:"text-sm text-muted-foreground",children:e.role})]})]})},t))})]})}),CV="/assets/founder-BQvEXLAH.png",TV=()=>{const e=["Fall asleep faster by resetting your natural rhythm","Wake up refreshed with deeper, more restorative sleep","Lower stress at night with calming techniques","Bu
474ild lasting habits that keep your sleep on track"];return c.jsx("section",{className:"py-24 bg-secondary",children:c.jsx("div",{className:"container mx-auto px-4",children:c.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center",children:[c.jsx("div",{className:"relative flex justify-center lg:justify-end",children:c.jsxs("div",{className:"relative",children:[c.jsx("div",{className:"absolute inset-0 bg-primary/20 rounded-full blur-3xl scale-110"}),c.jsx("img",{src:CV,alt:"Dr. Robert Mitchell - Sleep Expert",className:"relative w-72 h-auto rounded-2xl shadow-2xl"})]})}),c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"inline-flex items-center gap-2 bg-primary/20 text-primary-foreground px-4 py-2 rounded-full",children:[c.jsx(pf,{className:"h-5 w-5 text-primary"}),c.jsx("span",{className:"text-sm font-semibold text-secondary-foreground",children:"30-Day Money-Back Guarantee"})]}),c.jsxs("h2",{className:"font-serif text-3xl md:text-4xl lg:text-5xl font-bold text-secondary-foreground",children:["Sleep Better or"," ",c.jsx("span",{className:"text-primary",children:"Your Money Back"})]}),c.jsx("p",{className:"text-secondary-foreground/80 text-lg leading-relaxed",children:"Hi, I'm Dr. Robert Mitchell. After 25 years of helping thousands overcome sleep challenges, I've distilled everything into this 30-day program. I'm so confident it will transform your sleep that I offer a full money-back guarantee."}),c.jsx("ul",{className:"space-y-4",children:e.map((t,r)=>c.jsxs("li",{className:"flex items-start gap-3",children:[c.jsx("div",{className:"flex-shrink-0 w-6 h-6 rounded-full bg-primary flex items-center justify-center mt-0.5",children:c.jsx(gr,{className:"h-4 w-4 text-primary-foreground"})}),c.jsx("span",{className:"text-secondary-foreground/90",children:t})]},r))}),c.jsx("div",{className:"pt-4 border-t border-secondary-foreground/20",children:c.jsxs("p",{className:"text-secondary-foreground/70 text-sm",children:[c.jsx("strong",{className:"text-secondary-foreground",children:"No Risk, No Hassle:"})," Try the complete 30-Day Sleep Solution. If you don't feel a real difference in your sleep quality, simply reach out within 30 days for a full refund. No questions asked."]})})]})]})})})},$V=()=>{const e=["30 Daily Video Lessons","Guided Sleep Meditations (12 tracks)","Downloadable PDF Workbooks","Sleep Diary & Progress Tracker","Quick-Start Guide","Environment Optimization Checklist","Lifetime Access & Free Updates","30-Day Money-Back Guarantee"];return c.jsx("section",{className:"py-24 bg-secondary",children:c.jsxs("div",{className:"container mx-auto px-4",children:[c.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-16",children:[c.jsx("span",{className:"text-primary text-sm font-semibold tracking-wider uppercase",children:"Special Offer"}),c.jsx("h2",{className:"font-serif text-3xl md:text-4xl lg:text-5xl font-bold text-secondary-foreground mt-4 mb-6",children:"Invest in Your Sleep Today"}),c.jsx("p",{className:"text-secondary-foreground/70 text-lg",children:"Get instant access to the complete 30-day program at a special limited-time price."})]}),c.jsxs("div",{className:"max-w-lg mx-auto",children:[c.jsxs(re,{className:"bg-card border-primary/30 shadow-2xl overflow-hidden",children:[c.jsx("div",{className:"bg-primary text-primary-foreground text-center py-3 text-sm font-semibold",children:"ð SAVE 50% - Limited Time Only"}),c.jsxs(ie,{className:"p-8",children:[c.jsxs("div",{className:"text-center mb-8",children:[c.jsxs("div",{className:"flex items-center justify-center gap-3 mb-2",children:[c.jsx("span",{className:"text-2xl text-muted-foreground line-through",children:"$297"}),c.jsx("span",{className:"font-serif text-6xl font-bold text-foreground",children:"$199"})]}),c.jsx("p",{className:"text-muted-foreground",children:"One-time payment ⢠Lifetime access"})]}),c.jsx("ul",{className:"space-y-3 mb-8",children:e.map((t,r)=>c.jsxs("li",{className:"flex items-center gap-3",children:[c.jsx(gr,{className:"h-5 w-5 text-primary flex-shrink-0"}),c.jsx("span",{className:"text-foreground",children:t})]},r))}),c.jsx(Re,{to:"/checkout",onClick:()=>Bl("Get Instant Access Now","pricing_buy"),children:c.jsx(se,{variant:"cta",size:"xl",className:"w-full",children:"Get Instant Access Now"})}),c.jsxs("div",{className:"flex items-center justify-center gap-6 mt-6 pt-6 border-t border-border",children:[c.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[c.jsx(pf,{className:"h-4 w-4 text-primary"}),c.jsx("span",{children:"Secure Checkout"})]}),c.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[c.jsx(u0,{className:"h-4 w-4 text-primary"}),c.jsx("span",{children:"Stripe Payments"})]})]})]})]}),c.jsx("div",{className:"text-center mt-8",children:c.jsxs("p",{className:"text-secondary-foreground
474/80 max-w-md mx-auto",children:[c.jsx("strong",{children:"30-Day Money-Back Guarantee:"})," If you're not satisfied for any reason, we'll refund your purchase. No questions asked."]})})]})]})})};var Eg="Collapsible",[RV,BR]=fn(Eg),[MV,nS]=RV(Eg),UR=w.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[l,u]=fi({prop:n,defaultProp:i??!1,onChange:o,caller:Eg});return c.jsx(MV,{scope:r,disabled:a,contentId:Li(),open:l,onOpenToggle:w.useCallback(()=>u(d=>!d),[u]),children:c.jsx(ce.div,{"data-state":aS(l),"data-disabled":a?"":void 0,...s,ref:t})})});UR.displayName=Eg;var WR="CollapsibleTrigger",zR=w.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,i=nS(WR,r);return c.jsx(ce.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":aS(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...n,ref:t,onClick:oe(e.onClick,i.onOpenToggle)})});zR.displayName=WR;var iS="CollapsibleContent",HR=w.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=nS(iS,e.__scopeCollapsible);return c.jsx(vi,{present:r||i.open,children:({present:a})=>c.jsx(IV,{...n,ref:t,present:a})})});HR.displayName=iS;var IV=w.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:i,...a}=e,o=nS(iS,r),[s,l]=w.useState(n),u=w.useRef(null),d=Oe(t,u),f=w.useRef(0),h=f.current,p=w.useRef(0),g=p.current,m=o.open||s,v=w.useRef(m),x=w.useRef(void 0);return w.useEffect(()=>{const y=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(y)},[]),Lt(()=>{const y=u.current;if(y){x.current=x.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";const b=y.getBoundingClientRect();f.current=b.height,p.current=b.width,v.current||(y.style.transitionDuration=x.current.transitionDuration,y.style.animationName=x.current.animationName),l(n)}},[o.open,n]),c.jsx(ce.div,{"data-state":aS(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!m,...a,ref:d,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...e.style},children:m&&i})});function aS(e){return e?"open":"closed"}var DV=UR,LV=zR,FV=HR,BV=w.createContext(void 0);function oS(e){const t=w.useContext(BV);return e||t||"ltr"}var Kn="Accordion",UV=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[sS,WV,zV]=rg(Kn),[kg,Zje]=fn(Kn,[zV,BR]),lS=BR(),qR=k.forwardRef((e,t)=>{const{type:r,...n}=e,i=n,a=n;return c.jsx(sS.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?c.jsx(KV,{...a,ref:t}):c.jsx(VV,{...i,ref:t})})});qR.displayName=Kn;var[VR,HV]=kg(Kn),[KR,qV]=kg(Kn,{collapsible:!1}),VV=k.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:i=()=>{},collapsible:a=!1,...o}=e,[s,l]=fi({prop:r,defaultProp:n??"",onChange:i,caller:Kn});return c.jsx(VR,{scope:e.__scopeAccordion,value:k.useMemo(()=>s?[s]:[],[s]),onItemOpen:l,onItemClose:k.useCallback(()=>a&&l(""),[a,l]),children:c.jsx(KR,{scope:e.__scopeAccordion,collapsible:a,children:c.jsx(GR,{...o,ref:t})})})}),KV=k.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:i=()=>{},...a}=e,[o,s]=fi({prop:r,defaultProp:n??[],onChange:i,caller:Kn}),l=k.useCallback(d=>s((f=[])=>[...f,d]),[s]),u=k.useCallback(d=>s((f=[])=>f.filter(h=>h!==d)),[s]);return c.jsx(VR,{scope:e.__scopeAccordion,value:o,onItemOpen:l,onItemClose:u,children:c.jsx(KR,{scope:e.__scopeAccordion,collapsible:!0,children:c.jsx(GR,{...a,ref:t})})})}),[GV,Ag]=kg(Kn),GR=k.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:i,orientation:a="vertical",...o}=e,s=k.useRef(null),l=Oe(s,t),u=WV(r),f=oS(i)==="ltr",h=oe(e.onKeyDown,p=>{var P;if(!UV.includes(p.key))return;const g=p.target,m=u().filter(N=>{var A;return!((A=N.ref.current)!=null&&A.disabled)}),v=m.findIndex(N=>N.ref.current===g),x=m.length;if(v===-1)return;p.preventDefault();let y=v;const b=0,_=x-1,S=()=>{y=v+1,y>_&&(y=b)},j=()=>{y=v-1,y<b&&(y=_)};switch(p.key){case"Home":y=b;break;case"End":y=_;break;case"ArrowRight":a==="horizontal"&&(f?S():j());break;case"ArrowDown":a==="vertical"&&S();break;case"ArrowLeft":a==="horizontal"&&(f?j():S());break;case"ArrowUp":a==="vertical"&&j();break}const O=y%x;(P=m[O].ref.current)==null||P.focus()});return c.jsx(GV,{scope:r,disabled:n,direction:i,orientation:a,children:c.jsx(sS.Slot,{scope:r,children:c.jsx(ce.div,{...o,"data-orientation":a,ref:l,onKeyDown:n?void 0:h})})})}),Tp="AccordionItem",[YV,cS]=kg(Tp),YR=k.forwardRef((e,t)=>
474{const{__scopeAccordion:r,value:n,...i}=e,a=Ag(Tp,r),o=HV(Tp,r),s=lS(r),l=Li(),u=n&&o.value.includes(n)||!1,d=a.disabled||e.disabled;return c.jsx(YV,{scope:r,open:u,disabled:d,triggerId:l,children:c.jsx(DV,{"data-orientation":a.orientation,"data-state":tM(u),...s,...i,ref:t,disabled:d,open:u,onOpenChange:f=>{f?o.onItemOpen(n):o.onItemClose(n)}})})});YR.displayName=Tp;var XR="AccordionHeader",QR=k.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,i=Ag(Kn,r),a=cS(XR,r);return c.jsx(ce.h3,{"data-orientation":i.orientation,"data-state":tM(a.open),"data-disabled":a.disabled?"":void 0,...n,ref:t})});QR.displayName=XR;var U0="AccordionTrigger",JR=k.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,i=Ag(Kn,r),a=cS(U0,r),o=qV(U0,r),s=lS(r);return c.jsx(sS.ItemSlot,{scope:r,children:c.jsx(LV,{"aria-disabled":a.open&&!o.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId,...s,...n,ref:t})})});JR.displayName=U0;var ZR="AccordionContent",eM=k.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,i=Ag(Kn,r),a=cS(ZR,r),o=lS(r);return c.jsx(FV,{role:"region","aria-labelledby":a.triggerId,"data-orientation":i.orientation,...o,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});eM.displayName=ZR;function tM(e){return e?"open":"closed"}var XV=qR,QV=YR,JV=QR,rM=JR,nM=eM;const ZV=XV,iM=w.forwardRef(({className:e,...t},r)=>c.jsx(QV,{ref:r,className:te("border-b",e),...t}));iM.displayName="AccordionItem";const aM=w.forwardRef(({className:e,children:t,...r},n)=>c.jsx(JV,{className:"flex",children:c.jsxs(rM,{ref:n,className:te("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...r,children:[t,c.jsx(O1,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));aM.displayName=rM.displayName;const oM=w.forwardRef(({className:e,children:t,...r},n)=>c.jsx(nM,{ref:n,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:c.jsx("div",{className:te("pb-4 pt-0",e),children:t})}));oM.displayName=nM.displayName;const eK=[{question:"How long does it take to see results?",answer:"Most participants report noticeable improvements within the first 7-10 days. However, the full 30-day program is designed to create lasting habits that will transform your sleep for years to come."},{question:"Is this program suitable for all types of sleep problems?",answer:"Yes! Whether you struggle with falling asleep, staying asleep, waking up too early, or just feeling tired despite sleeping, our comprehensive approach addresses all common sleep issues. However, if you have a diagnosed sleep disorder like sleep apnea, please consult with your doctor."},{question:"How much time do I need to dedicate each day?",answer:"Each daily lesson takes about 10-15 minutes. The sleep techniques themselves become integrated into your natural routine, so you're not adding extra timeâyou're making better use of the time you already have."},{question:"Do I get lifetime access?",answer:"Absolutely! Once you purchase, you have unlimited lifetime access to all course materials, including any future updates we make to the program."},{question:"What if the program doesn't work for me?",answer:"We're confident in our program, but we understand everyone is different. That's why we offer a full 30-day money-back guarantee. If you're not satisfied for any reason, simply contact us for a complete refundâno questions asked."},{question:"Can I access the course on my phone?",answer:"Yes! Our course platform is fully responsive and works beautifully on smartphones, tablets, and computers. Watch lessons, listen to meditations, and track your progress from anywhere."},{question:"Is this based on real science?",answer:"Absolutely. Our program is grounded in Cognitive Behavioral Therapy for Insomnia (CBT-I), which is considered the gold standard treatment for sleep issues by sleep experts and medical professionals worldwide."}],tK=()=>c.jsx("section",{className:"py-24 bg-background",children:c.jsxs("div",{className:"container mx-auto px-4",children:[c.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-16",children:[c.jsx("span",{className:"text-primary text-sm font-semibold tracking-wider up
474percase",children:"FAQ"}),c.jsx("h2",{className:"font-serif text-3xl md:text-4xl lg:text-5xl font-bold text-foreground mt-4 mb-6",children:"Common Questions"}),c.jsx("p",{className:"text-muted-foreground text-lg",children:"Everything you need to know about the 30-Day Sleep Solution program."})]}),c.jsx("div",{className:"max-w-3xl mx-auto",children:c.jsx(ZV,{type:"single",collapsible:!0,className:"space-y-4",children:eK.map((e,t)=>c.jsxs(iM,{value:`item-${t}`,className:"bg-card border border-border rounded-lg px-6",children:[c.jsx(aM,{className:"text-left font-semibold text-foreground hover:text-primary",children:e.question}),c.jsx(oM,{className:"text-muted-foreground leading-relaxed",children:e.answer})]},t))})})]})}),rK=()=>c.jsx("section",{className:"py-24 bg-gradient-to-br from-secondary via-secondary to-primary/20",children:c.jsx("div",{className:"container mx-auto px-4",children:c.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[c.jsx(Dt,{className:"h-16 w-16 text-primary mx-auto mb-8"}),c.jsx("h2",{className:"font-serif text-3xl md:text-4xl lg:text-5xl font-bold text-secondary-foreground mb-6",children:"Ready to Wake Up Refreshed?"}),c.jsx("p",{className:"text-xl text-secondary-foreground/70 mb-10 max-w-2xl mx-auto",children:"Join over 10,000 people who have already transformed their sleep with our 30-day program. Your journey to better rest starts now."}),c.jsx("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4",children:c.jsx(Re,{to:"/checkout",onClick:()=>Bl("Start Sleeping Better Tonight","bottom_cta"),children:c.jsxs(se,{variant:"cta",size:"xl",className:"group",children:["Start Sleeping Better Tonight",c.jsx(T2,{className:"ml-2 h-5 w-5 group-hover:translate-x-1 transition-transform"})]})})}),c.jsx("p",{className:"mt-6 text-sm text-secondary-foreground/60",children:"30-day money-back guarantee ⢠Secure checkout ⢠Instant access"})]})})}),nK=()=>c.jsxs("div",{className:"min-h-screen",children:[c.jsx(Gr,{}),c.jsxs("main",{children:[c.jsx(vV,{}),c.jsx(bV,{}),c.jsx(jV,{}),c.jsx(PV,{}),c.jsx(EV,{}),c.jsx(AV,{}),c.jsx(TV,{}),c.jsx($V,{}),c.jsx(tK,{}),c.jsx(rK,{})]}),c.jsx(xi,{})]}),ze=w.forwardRef(({className:e,type:t,...r},n)=>c.jsx("input",{type:t,className:te("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...r}));ze.displayName="Input";var iK="Label",sM=w.forwardRef((e,t)=>c.jsx(ce.label,{...e,ref:t,onMouseDown:r=>{var i;r.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));sM.displayName=iK;var lM=sM;const aK=ff("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Me=w.forwardRef(({className:e,...t},r)=>c.jsx(lM,{ref:r,className:te(aK(),e),...t}));Me.displayName=lM.displayName;const oK=()=>{var h,p;const[e,t]=w.useState(""),[r,n]=w.useState(""),[i,a]=w.useState(!1),{signIn:o}=qn(),s=Ji(),l=Kr(),{toast:u}=Vr(),d=((p=(h=l.state)==null?void 0:h.from)==null?void 0:p.pathname)||"/dashboard",f=async g=>{g.preventDefault(),a(!0);const{error:m}=await o(e,r);m?u({title:"Error",description:m.message,variant:"destructive"}):(u({title:"Welcome back!",description:"You've successfully signed in."}),s(d,{replace:!0})),a(!1)};return c.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[c.jsx(Gr,{}),c.jsx("main",{className:"flex-1 flex items-center justify-center px-4 pt-24 pb-16",children:c.jsxs(re,{className:"w-full max-w-md bg-card border-border",children:[c.jsxs(ct,{className:"text-center",children:[c.jsx("div",{className:"w-16 h-16 rounded-full bg-primary/10 flex items-center justify-center mx-auto mb-4",children:c.jsx(Dt,{className:"h-8 w-8 text-primary"})}),c.jsx(ut,{className:"font-serif text-2xl",children:"Welcome Back"}
474),c.jsx(Ng,{children:"Sign in to access your course and track your progress"})]}),c.jsxs(ie,{children:[c.jsxs("form",{onSubmit:f,className:"space-y-4",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx(Me,{htmlFor:"email",children:"Email"}),c.jsxs("div",{className:"relative",children:[c.jsx(hf,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground"}),c.jsx(ze,{id:"email",type:"email",placeholder:"[email protected]",value:e,onChange:g=>t(g.target.value),className:"pl-10 bg-background",required:!0})]})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx(Me,{htmlFor:"password",children:"Password"}),c.jsx(Re,{to:"/forgot-password",className:"text-sm text-primary hover:underline",children:"Forgot password?"})]}),c.jsxs("div",{className:"relative",children:[c.jsx(Dl,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground"}),c.jsx(ze,{id:"password",type:"password",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",value:r,onChange:g=>n(g.target.value),className:"pl-10 bg-background",required:!0})]})]}),c.jsx(se,{type:"submit",variant:"hero",className:"w-full",disabled:i,children:i?"Signing in...":"Sign In"})]}),c.jsxs("div",{className:"mt-6 text-center text-sm text-muted-foreground",children:["Don't have an account?"," ",c.jsx(Re,{to:"/signup",className:"text-primary hover:underline font-medium",children:"Sign Up"})]})]})]})})]})},sK=()=>{const[e,t]=w.useState(""),[r,n]=w.useState(""),[i,a]=w.useState(""),[o,s]=w.useState(!1),{signUp:l}=qn(),u=Ji(),{toast:d}=Vr(),f=async h=>{h.preventDefault(),s(!0);const{error:p}=await l(e,r,i);p?d({title:"Error",description:p.message,variant:"destructive"}):(d({title:"Welcome!",description:"Your account has been created successfully."}),u("/dashboard")),s(!1)};return c.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[c.jsx(Gr,{}),c.jsx("main",{className:"flex-1 flex items-center justify-center px-4 pt-24 pb-16",children:c.jsxs(re,{className:"w-full max-w-md bg-card border-border",children:[c.jsxs(ct,{className:"text-center",children:[c.jsx("div",{className:"w-16 h-16 rounded-full bg-primary/10 flex items-center justify-center mx-auto mb-4",children:c.jsx(Dt,{className:"h-8 w-8 text-primary"})}),c.jsx(ut,{className:"font-serif text-2xl",children:"Create Your Account"}),c.jsx(Ng,{children:"Start your journey to better sleep today"})]}),c.jsxs(ie,{children:[c.jsxs("form",{onSubmit:f,className:"space-y-4",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx(Me,{htmlFor:"fullName",children:"Full Name"}),c.jsxs("div",{className:"relative",children:[c.jsx(p0,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground"}),c.jsx(ze,{id:"fullName",type:"text",placeholder:"John Doe",value:i,onChange:h=>a(h.target.value),className:"pl-10 bg-background",required:!0})]})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(Me,{htmlFor:"email",children:"Email"}),c.jsxs("div",{className:"relative",children:[c.jsx(hf,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground"}),c.jsx(ze,{id:"email",type:"email",placeholder:"[email protected]",value:e,onChange:h=>t(h.target.value),className:"pl-10 bg-background",required:!0})]})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(Me,{htmlFor:"password",children:"Password"}),c.jsxs("div",{className:"relative",children:[c.jsx(Dl,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground"}),c.jsx(ze,{id:"password",type:"password",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",value:r,onChange:h=>n(h.target.value),className:"pl-10 bg-background",required:!0,minLength:6})]})]}),c.jsx(se,{type:"submit",variant:"hero",className:"w-full",disabled:o,children:o?"Creating Account...":"Create Account"})]}),c.jsxs("div",{className:"mt-6 text-center text-sm text-muted-foreground",children:["Already have an account?"," ",c.jsx(Re,{to:"/login",className:"text-primary hover:underline font-medium",children:"Sign In"})]})]})]})})]})};var uS="Progress",dS=100,[lK,eOe]=fn(uS),[cK,uK]=lK(uS),cM=w.forwardRef((e,t)=>
474{const{__scopeProgress:r,value:n=null,max:i,getValueLabel:a=dK,...o}=e;(i||i===0)&&!SP(i)&&console.error(fK(`${i}`,"Progress"));const s=SP(i)?i:dS;n!==null&&!_P(n,s)&&console.error(hK(`${n}`,"Progress"));const l=_P(n,s)?n:null,u=$p(l)?a(l,s):void 0;return c.jsx(cK,{scope:r,value:l,max:s,children:c.jsx(ce.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":$p(l)?l:void 0,"aria-valuetext":u,role:"progressbar","data-state":fM(l,s),"data-value":l??void 0,"data-max":s,...o,ref:t})})});cM.displayName=uS;var uM="ProgressIndicator",dM=w.forwardRef((e,t)=>{const{__scopeProgress:r,...n}=e,i=uK(uM,r);return c.jsx(ce.div,{"data-state":fM(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...n,ref:t})});dM.displayName=uM;function dK(e,t){return`${Math.round(e/t*100)}%`}function fM(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function $p(e){return typeof e=="number"}function SP(e){return $p(e)&&!isNaN(e)&&e>0}function _P(e,t){return $p(e)&&!isNaN(e)&&e<=t&&e>=0}function fK(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${dS}\`.`}function hK(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be: 475 - a positive number 476 - less than the value passed to \`max\` (or ${dS} if no \`max\` prop is set) 477 - \`null\` or \`undefined\` if the progress is indeterminate. 478 479Defaulting to \`null\`.`}var hM=cM,pK=dM;const fS=w.forwardRef(({className:e,value:t,...r},n)=>c.jsx(hM,{ref:n,className:te("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...r,children:c.jsx(pK,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));fS.displayName=hM.displayName;function ve(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function _r(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function rr(e,t){const r=ve(e);return isNaN(t)?_r(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Wn(e,t){const r=ve(e);if(isNaN(t))return _r(e,NaN);if(!t)return r;const n=r.getDate(),i=_r(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const a=i.getDate();return n>=a?i:(r.setFullYear(i.getFullYear(),i.getMonth(),n),r)}const hS=6048e5,mK=864e5,pM=6e4,mM=36e5,fh=43200,jP=1440;let gK={};function kc(){return gK}function pi(e,t){var s,l,u,d;const r=kc(),n=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??r.weekStartsOn??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,i=ve(e),a=i.getDay(),o=(a<n?7:0)+a-n;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function Yo(e){return pi(e,{weekStartsOn:1})}function gM(e){const t=ve(e),r=t.getFullYear(),n=_r(e,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);const i=Yo(n),a=_r(e,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const o=Yo(a);return t.getTime()>=i.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function Xo(e){const t=ve(e);return t.setHours(0,0,0,0),t}function Ul(e){const t=ve(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function ii(e,t){const r=Xo(e),n=Xo(t),i=+r-Ul(r),a=+n-Ul(n);return Math.round((i-a)/mK)}function vK(e){const t=gM(e),r=_r(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),Yo(r)}function W0(e,t){const r=t*7;return rr(e,r)}function yK(e,t){return Wn(e,t*12)}function xK(e){let t;return e.forEach(function(r){const n=ve(r);(t===void 0||t<n||isNaN(Number(n)))&&(t=n)}),t||new Date(NaN)}function bK(e){let t;return e.forEach(r=>{const n=ve(r);(!t||t>n||isNaN(+n))&&(t=n)}),t||new Date(NaN)}function qh(e,t){const r=ve(e),n=ve(t),i=r.getTime()-n.getTime();return i<0?-1:i>0?1:i}function wK(e){return _r(e,Date.now())}function vr(e,t){const r=Xo(e),n=Xo(t);return+r==+n}function pS(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function SK(e){if(!pS(e)&&typeof e!="number")return!1;const t=ve(e);return!isNaN(Number(t))}function Wl(e,t){const r=ve(e),n=ve(t),i=r.getFullYear()-n.getFullYear(),a=r.getMonth()-n.getMonth();return i*12+a}function _K(e,t,r){const n=pi(e,r),i=pi(t,r),a=+n-Ul(n),o=+i-Ul(i);return Math.round((a-o)/hS)}function jK(e){return t=>{const n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}function OK(e,t){return+ve(e)-+ve(t)}function PK(e){const t=ve(e);return t.setHours(23,59,59,999),t}function Cg(e){const t=ve(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function NK(e){const t=ve(e);return+PK(t)==+Cg(t)}function EK(e,t){const r=ve(e),n=ve(t),i=qh(r,n),a=Math.abs(Wl(r,n));let o;if(a<1)o=0;else{r.getMonth()===1&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-i*a);let s=qh(r,n)===-i;NK(ve(e))&&a===1&&qh(e,n)===1&&(s=!1),o=i*(a-Number(s))}return o===0?0:o}function kK(e,t,r){const n=OK(e,t)/1e3;return jK(r==null?void 0:r.roundingMethod)(n)}function Sr(e){const t=ve(e);return t.setDate(1),t.setHours(0,0,0,0),t}function vM(e){const t=ve(e),r=_r(e,0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}function mS(e,t){var s,l,u,d;const r=kc(),n=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??r.weekStartsOn??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,i=ve(e),a=i.getDay(),o=(a<n?-7:0)+6-(a-n);return i.setDate(i.getDate()+o),i.setHours(23,59,59,999),i}function yM(e){return mS(e,{weekStartsOn:1}
vendor: 13,671 bytes, line 479
479)}const AK={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},CK=(e,t,r)=>{let n;const i=AK[e];return typeof i=="string"?n=i:t===1?n=i.one:n=i.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function Ty(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const TK={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},$K={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},RK={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},MK={date:Ty({formats:TK,defaultWidth:"full"}),time:Ty({formats:$K,defaultWidth:"full"}),dateTime:Ty({formats:RK,defaultWidth:"full"})},IK={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},DK=(e,t,r,n)=>IK[e];function ru(e){return(t,r)=>{const n=r!=null&&r.context?String(r.context):"standalone";let i;if(n==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,s=r!=null&&r.width?String(r.width):o;i=e.formattingValues[s]||e.formattingValues[o]}else{const o=e.defaultWidth,s=r!=null&&r.width?String(r.width):e.defaultWidth;i=e.values[s]||e.values[o]}const a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}const LK={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},FK={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},BK={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},UK={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},WK={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},zK={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},HK=(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},qK={ordinalNumber:HK,era:ru({values:LK,defaultWidth:"wide"}),quarter:ru({values:FK,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ru({values:BK,defaultWidth:"wide"}),day:ru({values:UK,defaultWidth:"wide"}),dayPeriod:ru({values:WK,defaultWidth:"wide",formattingValues:zK,defaultFormattingWidth:"wide"})};function nu(e){return(t,r={})=>{const n=r.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;const o=a[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?KK(s,f=>f.test(o)):VK(s,f=>f.test(o));let u;u=e.valueCallback?e.valueCallback(l):l,u=r.valueCallback?r.valueCallback(u):u;const d=t.slice(o.length);return{value:u,rest:d}}}function VK(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function KK(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function GK(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const i=n[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=r.valueCallback?r.valueCallback(o):o;const s=t.slice(i.length);return{value:o,rest:s}}}const YK=/^(\d+)(th|st|nd|rd)?/i,XK=/\d+/i,QK={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},JK={any:[/^b/i,/^(a|c)/i]},ZK={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},eG={any:[/1/i,/2/i,/3/i,/4/i]},tG={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},rG={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},nG={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},iG={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},aG={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},oG={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},sG={ordinalNumber:GK({matchPattern:YK,parsePattern:XK,valueCallback:e=>parseInt(e,10)}),era:nu({matchPatterns:QK,defaultMatchWidth:"wide",parsePatterns:JK,defaultParseWidth:"any"}),quarter:nu({matchPatterns:ZK,defaultMatchWidth:"wide",parsePatterns:eG,defaultParseWidth:"any",valueCallback:e=>e+1}),month:nu({matchPatterns:tG,defaultMatchWidth:"wide",parsePatterns:rG,defaultParseWidth:"any"}),day:nu({matchPatterns:nG,defaultMatchWidth:"wide",parsePatterns:iG,defaultParseWidth:"any"}),dayPeriod:nu({matchPatterns:aG,defaultMatchWidth:"any",parsePatterns:oG,defaultParseWidth:"any"})},gS={code:"en-US",formatDistance:CK,formatLong:MK,formatRelative:DK,localize:qK,match:sG,options:{weekStartsOn:0,firstWeekContainsDate:1}};function lG(e){const t=ve(e);return ii(t,vM(t))+1}function xM(e){const t=ve(e),r=+Yo(t)-+vK(t);return Math.round(r/hS)+1}function bM(e,t){var d,f,h,p;const r=ve(e),n=r.getFullYear(),i=kc(),a=(t==null?void 0:t.firstWeekContainsDate)??((f=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??i.firstWeekContainsDate??((p=(h=i.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,o=_r(e,0);o.setFullYear(n+1,0,a),o.setHours(0,0,0,0);const s=pi(o,t),l=_r(e,0);l.setFullYear(n,0,a),l.setHours(0,0,0,0);const u=pi(l,t);return r.getTime()>=s.getTime()?n+1:r.getTime()>=u.getTime()?n:n-1}function cG(e,t){var s,l,u,d;const r=kc(),n=(t==null?void 0:t.firstWeekContainsDate)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,i=bM(e,t),a=_r(e,0);return a.setFullYear(i,0,n),a.setHours(0,0,0,0),pi(a,t)}function wM(e,t){const r=ve(e),n=+pi(r,t)-+cG(r,t);return Math.round(n/hS)+1}function De(e,t){const r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}const ua={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return De(t==="yy"?n%100:n,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):De(r+1,2)},d(e,t){return De(e.getDate(),t.length)},a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,t){return De(e.getHours()%12||12,t.length)},H(e,t){return De(e.getHours(),t.length)},m(e,t){return De(e.getMinutes(),t.length)},s(e,t){return De(e.getSeconds(),t.length)},S(e,t){const r=t.length,n=e.getMilliseconds(),i=Math.trunc(n*Math.pow(10,r-3));return De(i,t.length)}},Cs={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},OP={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){const n=e.getFullYear(),i=n>0?n:1-n;return r.ordinalNumber(i,{unit:"year"})}return ua.y(e,t)},Y:function(e,t,r,n){const i=bM(e,n),a=i>0?i:1-i;if(t==="YY"){const o=a%100;return De(o,2)}return t==="Yo"?r.ordinalNumber(a,{unit:"year"}):De(a,t.length)},R:function(e,t){const r=gM(e);return De(r,t.length)},u:function(e,t){const r=e.getFullYear();return De(r,t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return De(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return De(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return ua.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return De(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const i=wM(e,n);return t==="wo"?r.ordinalNumber(i,{unit:"week"}):De(i,t.length)},I:function(e,t,r){const n=xM(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):De(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):ua.d(e,t)},D:function(e,t,r){const n=lG(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):De(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const i=e.getDay(),a=(i-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return De(a,2);case"eo":return r.ordinalNumber(a,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});case"eeee":default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const i=e.getDay(),a=(i-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return De(a,t.length);case"co":return r.ordinalNumber(a,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});case"cccc":default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),i=n===0?7:n;switch(t){case"i":return String(i);case"ii":return De(i,t.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let i;
vendor: 4,422 bytes, line 479
479switch(n===12?i=Cs.noon:n===0?i=Cs.midnight:i=n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let i;switch(n>=17?i=Cs.evening:n>=12?i=Cs.afternoon:n>=4?i=Cs.morning:i=Cs.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return ua.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):ua.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):De(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):De(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):ua.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):ua.s(e,t)},S:function(e,t){return ua.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return NP(n);case"XXXX":case"XX":return go(n);case"XXXXX":case"XXX":default:return go(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return NP(n);case"xxxx":case"xx":return go(n);case"xxxxx":case"xxx":default:return go(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+PP(n,":");case"OOOO":default:return"GMT"+go(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+PP(n,":");case"zzzz":default:return"GMT"+go(n,":")}},t:function(e,t,r){const n=Math.trunc(e.getTime()/1e3);return De(n,t.length)},T:function(e,t,r){const n=e.getTime();return De(n,t.length)}};function PP(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),i=Math.trunc(n/60),a=n%60;return a===0?r+String(i):r+String(i)+t+De(a,2)}function NP(e,t){return e%60===0?(e>0?"-":"+")+De(Math.abs(e)/60,2):go(e,t)}function go(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),i=De(Math.trunc(n/60),2),a=De(n%60,2);return r+i+t+a}const EP=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},SM=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},uG=(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],i=r[2];if(!i)return EP(e,t);let a;switch(n){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",EP(n,t)).replace("{{time}}",SM(i,t))},dG={p:SM,P:uG},fG=/^D+$/,hG=/^Y+$/,pG=["D","DD","YY","YYYY"];function mG(e){return fG.test(e)}function gG(e){return hG.test(e)}function vG(e,t,r){const n=yG(e,t,r);if(console.warn(n),pG.includes(e))throw new RangeError(n)}function yG(e,t,r){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const xG=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,bG=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,wG=/^'([^]*?)'?$/,SG=/''/g,_G=/[a-zA-Z]/;function xt(e,t,r){var d,f,h,p,g,m,v,x;const n=kc(),i=(r==null?void 0:r.locale)??n.locale??gS,a=(r==null?void 0:r.firstWeekContainsDate)??((f=(d=r==null?void 0:r.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??n.firstWeekContainsDate??((p=(h=n.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,o=(r==null?void 0:r.weekStartsOn)??((m=(g=r==null?void 0:r.locale)==null?void 0:g.options)==null?void 0:m.weekStartsOn)??n.weekStartsOn??((x=(v=n.locale)==null?void 0:v.options)==null?void 0:x.weekStartsOn)??0,s=ve(e);
479if(!SK(s))throw new RangeError("Invalid time value");let l=t.match(bG).map(y=>{const b=y[0];if(b==="p"||b==="P"){const _=dG[b];return _(y,i.formatLong)}return y}).join("").match(xG).map(y=>{if(y==="''")return{isToken:!1,value:"'"};const b=y[0];if(b==="'")return{isToken:!1,value:jG(y)};if(OP[b])return{isToken:!0,value:y};if(b.match(_G))throw new RangeError("Format string contains an unescaped latin alphabet character `"+b+"`");return{isToken:!1,value:y}});i.localize.preprocessor&&(l=i.localize.preprocessor(s,l));const u={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return l.map(y=>{if(!y.isToken)return y.value;const b=y.value;(!(r!=null&&r.useAdditionalWeekYearTokens)&&gG(b)||!(r!=null&&r.useAdditionalDayOfYearTokens)&&mG(b))&&vG(b,t,String(e));const _=OP[b[0]];return _(s,b,i.localize,u)}).join("")}function jG(e){const t=e.match(wG);return t?t[1].replace(SG,"'"):e}function OG(e,t,r){const n=kc(),i=(r==null?void 0:r.locale)??n.locale??gS,a=2520,o=qh(e,t);if(isNaN(o))throw new RangeError("Invalid time value");const s=Object.assign({},r,{addSuffix:r==null?void 0:r.addSuffix,comparison:o});let l,u;o>0?(l=ve(t),u=ve(e)):(l=ve(e),u=ve(t));const d=kK(u,l),f=(Ul(u)-Ul(l))/1e3,h=Math.round((d-f)/60);let p;if(h<2)return r!=null&&r.includeSeconds?d<5?i.formatDistance("lessThanXSeconds",5,s):d<10?i.formatDistance("lessThanXSeconds",10,s):d<20?i.formatDistance("lessThanXSeconds",20,s):d<40?i.formatDistance("halfAMinute",0,s):d<60?i.formatDistance("lessThanXMinutes",1,s):i.formatDistance("xMinutes",1,s):h===0?i.formatDistance("lessThanXMinutes",1,s):i.formatDistance("xMinutes",h,s);if(h<45)return i.formatDistance("xMinutes",h,s);if(h<90)return i.formatDistance("aboutXHours",1,s);if(h<jP){const g=Math.round(h/60);return i.formatDistance("aboutXHours",g,s)}else{if(h<a)return i.formatDistance("xDays",1,s);if(h<fh){const g=Math.round(h/jP);return i.formatDistance("xDays",g,s)}else if(h<fh*2)return p=Math.round(h/fh),i.formatDistance("aboutXMonths",p,s)}if(p=EK(u,l),p<12){const g=Math.round(h/fh);return i.formatDistance("xMonths",g,s)}else{const g=p%12,m=Math.trunc(p/12);return g<3?i.formatDistance("aboutXYears",m,s):g<9?i.formatDistance("overXYears",m,s):i.formatDistance("almostXYears",m+1,s)}}function PG(e,t){return OG(e,wK(e),t)}function NG(e){const t=ve(e),r=t.getFullYear(),n=t.getMonth(),i=_r(e,0);return i.setFullYear(r,n+1,0),i.setHours(0,0,0,0),i.getDate()}function EG(e){return Math.trunc(+ve(e)/1e3)}function kG(e){const t=ve(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(0,0,0,0),t}function AG(e,t){return _K(kG(e),Sr(e),t)+1}function z0(e,t){const r=ve(e),n=ve(t);return r.getTime()>n.getTime()}function _M(e,t){const r=ve(e),n=ve(t);return+r<+n}function vS(e,t){const r=ve(e),n=ve(t);return r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()}function CG(e,t){const r=ve(e),n=ve(t);return r.getFullYear()===n.getFullYear()}function Vh(e,t){return rr(e,-t)}function TG(e,t){const n=IG(e);let i;if(n.date){const l=DG(n.date,2);i=LG(l.restDateString,l.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);const a=i.getTime();let o=0,s;if(n.time&&(o=FG(n.time),isNaN(o)))return new Date(NaN);if(n.timezone){if(s=BG(n.timezone),isNaN(s))return new Date(NaN)}else{const l=new Date(a+o),u=new Date(0);return u.setFullYear(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()),u.setHours(l.getUTCHours(),l.getUTCMinutes(),l.getUTCSeconds(),l.getUTCMilliseconds()),u}return new Date(a+o+s)}const hh={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},$G=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,RG=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,MG=/^([+-])(\d{2})(?::?(\d{2}))?$/;function IG(e){const t={},r=e.split(hh.dateTimeDelimiter);let n;if(r.length>2)return t;if(/:/.test(r[0])?n=r[0]:(t.date=r[0],n=r[1],hh.timeZoneDelimiter.test(t.date)&&(t.date=e.split(hh.timeZoneDelimiter)[0],n=e.substr(t.date.length,e.length))),n){const i=hh.timezone.exec(n);i?(t.time=n.replace(i[1],""),t.timezone=i[1]):t.time=n}return t}function DG(e,t){const r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),n=e.match(r);if(!n)return{year:NaN,restDateString:""};const i=n[1]?parseInt(n[1]):null,a=n[2]?parseInt(n[2]):null;return{year:a===null?i:a*100,restDateString:e.slice((n[1]||n[2]).length)}}function LG(e,t){if(t===null)return new Date(NaN);const r=e.match($G);if(!r)return new Date(NaN);const n=!!r[4],i=iu(r[1]),a=iu(r[2])-1,o=iu(r[3]),s=iu(r[4]),l=iu(r[5])-1;if(n)return qG(t,s,l)?UG(t,s,l):new Date(NaN);{const u=new Date(0);return!zG(t,a,o)||!HG(t,i)?new Date(NaN):(u.setUTCFullYear(t,a,Math.max(i,o)),u)}}function iu(e){return e?parseInt(e):1}function FG(e){const t=e.match(RG);if(!t)return NaN;const r=$y(t[1]),n=$y(t[2]),i=$y(t[3]);
479return VG(r,n,i)?r*mM+n*pM+i*1e3:NaN}function $y(e){return e&&parseFloat(e.replace(",","."))||0}function BG(e){if(e==="Z")return 0;const t=e.match(MG);if(!t)return 0;const r=t[1]==="+"?-1:1,n=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return KG(n,i)?r*(n*mM+i*pM):NaN}function UG(e,t,r){const n=new Date(0);n.setUTCFullYear(e,0,4);const i=n.getUTCDay()||7,a=(t-1)*7+r+1-i;return n.setUTCDate(n.getUTCDate()+a),n}const WG=[31,null,31,30,31,30,31,31,30,31,30,31];function jM(e){return e%400===0||e%4===0&&e%100!==0}function zG(e,t,r){return t>=0&&t<=11&&r>=1&&r<=(WG[t]||(jM(e)?29:28))}function HG(e,t){return t>=1&&t<=(jM(e)?366:365)}function qG(e,t,r){return t>=1&&t<=53&&r>=0&&r<=6}function VG(e,t,r){return e===24?t===0&&r===0:r>=0&&r<60&&t>=0&&t<60&&e>=0&&e<25}function KG(e,t){return t>=0&&t<=59}function Ry(e,t){const r=ve(e),n=r.getFullYear(),i=r.getDate(),a=_r(e,0);a.setFullYear(n,t,15),a.setHours(0,0,0,0);const o=NG(a);return r.setMonth(t,Math.min(i,o)),r}function kP(e,t){const r=ve(e);return isNaN(+r)?_r(e,NaN):(r.setFullYear(t),r)}var pe=function(){return pe=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},pe.apply(this,arguments)};function GG(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 OM(e,t,r){for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}function vf(e){return e.mode==="multiple"}function yf(e){return e.mode==="range"}function Tg(e){return e.mode==="single"}var YG={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rdp-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"};function XG(e,t){return xt(e,"LLLL y",t)}function QG(e,t){return xt(e,"d",t)}function JG(e,t){return xt(e,"LLLL",t)}function ZG(e){return"".concat(e)}function eY(e,t){return xt(e,"cccccc",t)}function tY(e,t){return xt(e,"yyyy",t)}var rY=Object.freeze({__proto__:null,formatCaption:XG,formatDay:QG,formatMonthCaption:JG,formatWeekNumber:ZG,formatWeekdayName:eY,formatYearCaption:tY}),nY=function(e,t,r){return xt(e,"do MMMM (EEEE)",r)},iY=function(){return"Month: "},aY=function(){return"Go to next month"},oY=function(){return"Go to previous month"},sY=function(e,t){return xt(e,"cccc",t)},lY=function(e){return"Week n. ".concat(e)},cY=function(){return"Year: "},uY=Object.freeze({__proto__:null,labelDay:nY,labelMonthDropdown:iY,labelNext:aY,labelPrevious:oY,labelWeekNumber:lY,labelWeekday:sY,labelYearDropdown:cY});function dY(){var e="buttons",t=YG,r=gS,n={},i={},a=1,o={},s=new Date;return{captionLayout:e,classNames:t,formatters:rY,labels:uY,locale:r,modifiersClassNames:n,modifiers:i,numberOfMonths:a,styles:o,today:s,mode:"default"}}function fY(e){var t=e.fromYear,r=e.toYear,n=e.fromMonth,i=e.toMonth,a=e.fromDate,o=e.toDate;return n?a=Sr(n):t&&(a=new Date(t,0,1)),i?o=Cg(i):r&&(o=new Date(r,11,31)),{fromDate:a?Xo(a):void 0,toDate:o?Xo(o):void 0}}var PM=w.createContext(void 0);function hY(e){var t,r=e.initialProps,n=dY(),i=fY(r),a=i.fromDate,o=i.toDate,s=(t=r.captionLayout)!==null&&t!==void 0?t:n.captionLayout;s!=="buttons"&&(!a||!o)&&(s="buttons");var l;(Tg(r)||vf(r)||yf(r))&&(l=r.onSelect);var u=pe(pe(pe({},n),r),{captionLayout:s,classNames:pe(pe({},n.classNames),r.classNames),components:pe({},r.components),formatters:pe(pe({},n.formatters),r.formatters),fromDate:a,labels:pe(pe({},n.labels),r.labels),mode:r.mode||n.mode,modifiers:pe(pe({},n.modifiers),r.modifiers),modifiersClassNames:pe(pe({},n.modifiersClassNames),r.modifiersClassNames),onSelect:l,styles:pe(pe({},n.styles),r.styles),toDate:o});return c.jsx(PM.Provider,{value:u,children:e.children})}function Qe(){var e=w.useContext(PM);if(!e)throw new Error("useDayPicker must be used within a DayPickerProvider.");return e}function NM(e){var t=Qe(),r=t.locale,n=t.classNames,i=t.styles,a=t.formatters.formatCaption;return c.jsx("div",{className:n.caption_label,style:i.caption_label,"aria-live":"polite",role:"presentation",id:e.id,children:a(e.displayMonth,{locale:r})})}function pY(e){return c.jsx("svg",pe({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e,{children:c.jsx("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.7
47978175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"})}))}function EM(e){var t,r,n=e.onChange,i=e.value,a=e.children,o=e.caption,s=e.className,l=e.style,u=Qe(),d=(r=(t=u.components)===null||t===void 0?void 0:t.IconDropdown)!==null&&r!==void 0?r:pY;return c.jsxs("div",{className:s,style:l,children:[c.jsx("span",{className:u.classNames.vhidden,children:e["aria-label"]}),c.jsx("select",{name:e.name,"aria-label":e["aria-label"],className:u.classNames.dropdown,style:u.styles.dropdown,value:i,onChange:n,children:a}),c.jsxs("div",{className:u.classNames.caption_label,style:u.styles.caption_label,"aria-hidden":"true",children:[o,c.jsx(d,{className:u.classNames.dropdown_icon,style:u.styles.dropdown_icon})]})]})}function mY(e){var t,r=Qe(),n=r.fromDate,i=r.toDate,a=r.styles,o=r.locale,s=r.formatters.formatMonthCaption,l=r.classNames,u=r.components,d=r.labels.labelMonthDropdown;if(!n)return c.jsx(c.Fragment,{});if(!i)return c.jsx(c.Fragment,{});var f=[];if(CG(n,i))for(var h=Sr(n),p=n.getMonth();p<=i.getMonth();p++)f.push(Ry(h,p));else for(var h=Sr(new Date),p=0;p<=11;p++)f.push(Ry(h,p));var g=function(v){var x=Number(v.target.value),y=Ry(Sr(e.displayMonth),x);e.onChange(y)},m=(t=u==null?void 0:u.Dropdown)!==null&&t!==void 0?t:EM;return c.jsx(m,{name:"months","aria-label":d(),className:l.dropdown_month,style:a.dropdown_month,onChange:g,value:e.displayMonth.getMonth(),caption:s(e.displayMonth,{locale:o}),children:f.map(function(v){return c.jsx("option",{value:v.getMonth(),children:s(v,{locale:o})},v.getMonth())})})}
479function gY(e){var t,r=e.displayMonth,n=Qe(),i=n.fromDate,a=n.toDate,o=n.locale,s=n.styles,l=n.classNames,u=n.components,d=n.formatters.formatYearCaption,f=n.labels.labelYearDropdown,h=[];if(!i)return c.jsx(c.Fragment,{});if(!a)return c.jsx(c.Fragment,{});for(var p=i.getFullYear(),g=a.getFullYear(),m=p;m<=g;m++)h.push(kP(vM(new Date),m));var v=function(y){var b=kP(Sr(r),Number(y.target.value));e.onChange(b)},x=(t=u==null?void 0:u.Dropdown)!==null&&t!==void 0?t:EM;return c.jsx(x,{name:"years","aria-label":f(),className:l.dropdown_year,style:s.dropdown_year,onChange:v,value:r.getFullYear(),caption:d(r,{locale:o}),children:h.map(function(y){return c.jsx("option",{value:y.getFullYear(),children:d(y,{locale:o})},y.getFullYear())})})}function vY(e,t){var r=w.useState(e),n=r[0],i=r[1],a=t===void 0?n:t;return[a,i]}function yY(e){var t=e.month,r=e.defaultMonth,n=e.today,i=t||r||n||new Date,a=e.toDate,o=e.fromDate,s=e.numberOfMonths,l=s===void 0?1:s;if(a&&Wl(a,i)<0){var u=-1*(l-1);i=Wn(a,u)}return o&&Wl(i,o)<0&&(i=o),Sr(i)}function xY(){var e=Qe(),t=yY(e),r=vY(t,e.month),n=r[0],i=r[1],a=function(o){var s;if(!e.disableNavigation){var l=Sr(o);i(l),(s=e.onMonthChange)===null||s===void 0||s.call(e,l)}};return[n,a]}function bY(e,t){for(var r=t.reverseMonths,n=t.numberOfMonths,i=Sr(e),a=Sr(Wn(i,n)),o=Wl(a,i),s=[],l=0;l<o;l++){var u=Wn(i,l);s.push(u)}return r&&(s=s.reverse()),s}function wY(e,t){if(!t.disableNavigation){var r=t.toDate,n=t.pagedNavigation,i=t.numberOfMonths,a=i===void 0?1:i,o=n?a:1,s=Sr(e);if(!r)return Wn(s,o);var l=Wl(r,e);if(!(l<a))return Wn(s,o)}}function SY(e,t){if(!t.disableNavigation){var r=t.fromDate,n=t.pagedNavigation,i=t.numberOfMonths,a=i===void 0?1:i,o=n?a:1,s=Sr(e);if(!r)return Wn(s,-o);var l=Wl(s,r);if(!(l<=0))return Wn(s,-o)}}var kM=w.createContext(void 0);function _Y(e){var t=Qe(),r=xY(),n=r[0],i=r[1],a=bY(n,t),o=wY(n,t),s=SY(n,t),l=function(f){return a.some(function(h){return vS(f,h)})},u=function(f,h){l(f)||(h&&_M(f,h)?i(Wn(f,1+t.numberOfMonths*-1)):i(f))},d={currentMonth:n,displayMonths:a,goToMonth:i,goToDate:u,previousMonth:s,nextMonth:o,isDateDisplayed:l};return c.jsx(kM.Provider,{value:d,children:e.children})}function xf(){var e=w.useContext(kM);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}function AP(e){var t,r=Qe(),n=r.classNames,i=r.styles,a=r.components,o=xf().goToMonth,s=function(d){o(Wn(d,e.displayIndex?-e.dis
479playIndex:0))},l=(t=a==null?void 0:a.CaptionLabel)!==null&&t!==void 0?t:NM,u=c.jsx(l,{id:e.id,displayMonth:e.displayMonth});return c.jsxs("div",{className:n.caption_dropdowns,style:i.caption_dropdowns,children:[c.jsx("div",{className:n.vhidden,children:u}),c.jsx(mY,{onChange:s,displayMonth:e.displayMonth}),c.jsx(gY,{onChange:s,displayMonth:e.displayMonth})]})}function jY(e){return c.jsx("svg",pe({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:c.jsx("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"})}))}function OY(e){return c.jsx("svg",pe({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:c.jsx("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"})}))}var Rp=w.forwardRef(function(e,t){var r=Qe(),n=r.classNames,i=r.styles,a=[n.button_reset,n.button];e.className&&a.push(e.className);var o=a.join(" "),s=pe(pe({},i.button_reset),i.button);return e.style&&Object.assign(s,e.style),c.jsx("button",pe({},e,{ref:t,type:"button",className:o,style:s}))});function PY(e){var t,r,n=Qe(),i=n.dir,a=n.locale,o=n.classNames,s=n.styles,l=n.labels,u=l.labelPrevious,d=l.labelNext,f=n.components;if(!e.nextMonth&&!e.previousMonth)return c.jsx(c.Fragment,{});var h=u(e.previousMonth,{locale:a}),p=[o.nav_button,o.nav_button_previous].join(" "),g=d(e.nextMonth,{locale:a}),m=[o.nav_button,o.nav_button_next].join(" "),v=(t=f==null?void 0:f.IconRight)!==null&&t!==void 0?t:OY,x=(r=f==null?void 0:f.IconLeft)!==null&&r!==void 0?r:jY;return c.jsxs("div",{className:o.nav,style:s.nav,children:[!e.hidePrevious&&c.jsx(Rp,{name:"previous-month","aria-label":h,className:p,style:s.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:i==="rtl"?c.jsx(v,{className:o.nav_icon,style:s.nav_icon}):c.jsx(x,{className:o.nav_icon,style:s.nav_icon})}),!e.hideNext&&c.jsx(Rp,{name:"next-month","aria-label":g,className:m,style:s.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:i==="rtl"?c.jsx(x,{className:o.nav_icon,style:s.nav_icon}):c.jsx(v,{className:o.nav_icon,style:s.nav_icon})})]})}function CP(e){var t=Qe().numberOfMonths,r=xf(),n=r.previousMonth,i=r.nextMonth,a=r.goToMonth,o=r.displayMonths,s=o.findIndex(function(g){return vS(e.displayMonth,g)}),l=s===0,u=s===o.length-1,d=t>1&&(l||!u),f=t>1&&(u||!l),h=function(){n&&a(n)},p=function(){i&&a(i)};return c.jsx(PY,{displayMonth:e.displayMonth,hideNext:d,hidePrevious:f,nextMonth:i,previousMonth:n,onPreviousClick:h,onNextClick:p})}function NY(e){var t,r=Qe(),n=r.classNames,i=r.disableNavigation,a=r.styles,o=r.captionLayout,s=r.components,l=(t=s==null?void 0:s.CaptionLabel)!==null&&t!==void 0?t:NM,u;return i?u=c.jsx(l,{id:e.id,displayMonth:e.displayMonth}):o==="dropdown"?u=c.jsx(AP,{displayMonth:e.displayMonth,id:e.id}):o==="dropdown-buttons"?u=c.jsxs(c.Fragment,{children:[c.jsx(AP,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),c.jsx(CP,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):u=c.jsxs(c.Fragment,{children:[c.jsx(l,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),c.jsx(CP,{displayMonth:e.displayMonth,id:e.id})]}),c.jsx("div",{className:n.caption,style:a.caption,children:u})}function EY(e){var t=Qe(),r=t.footer,n=t.styles,i=t.classNames.tfoot;return r?c.jsx("tfoot",{className:i,style:n.tfoot,children:c.jsx("tr",{children:c.jsx("td",{colSpan:8,children:r})})}):c.jsx(c.Fragment,{})}function kY(e,t,r){for(var n=r?Yo(new Date):pi(new Date,{locale:e,weekStartsOn:t}),i=[],a=0;a<7;a++){var o=rr(n,a);i.push(o)}return i}function AY(){var e=Qe(),t=e.classNames,r=e.styles,n=e.showWeekNumber,i=e.locale,a=e.weekStartsOn,o=e.ISOWeek,s=e.formatters.formatWeekdayName,l=e.labels.labelWeekday,u=kY(i,a,o);return c.jsxs("tr",{style:r.head_row,className:t.head_row,children:[n&&c.jsx("td",{style:r.head_cell,className:t.head_cell}),u.map(function(d,f){return c.jsx("th",{scope:"col",className:t.head_cell,style:r.head_cell,"aria-label":l(d,{locale:i}),children:s(d,{locale:i})},f)})]})}function CY(){var e,t=Qe(),r=t.classNames,n=t.styles,i=t.components,a=(e=i==null?void 0:i.HeadRow)!==null&&e!==void 0?e:AY;return c.jsx("thead",{style:n.head,className:r.head,children:c.jsx(a,{})})}function TY(e){var t=Qe(),r=t.locale,n=t.formatters.formatDay;return c.jsx(c.Fragment,{children:n(e.date,{locale:r})})}var yS=w.createContext(void 0);function $Y(e){if(!vf(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return c.jsx(yS.Provider,{value:t,children:e.children})}return c.jsx(RY,{initialProps:e.initialProps,children:e.children})}function RY(e){var t=e.initialProps,r=e.children,n=t.selected,i=t.min,a=t.max,o=function(u,d,f){var h,p;(h=t.onDayClick)===null||h===void 0||h.call(t,u,d,f);var g=!!(d.selected&&i&&(n==null?void 0:n.length)===i);if(!g){var m=!!(!d.selected&&a&&(n==null?void 0:n.length)===a);if(!m){var v=n?OM([],n):[];if(d.selected){var x=v.findIndex(function(y){return vr(u,y)});v.splice(x,1)}else v.push(u);(p=t.onSelect)===null||p===void 0||p.call(t,v,u,d,f)}}},s={disabled:[]};n&&s.disabled.push(function(u){var d=a&&n.length>a-1,f=n.some(function(h){return vr(h,u)});return!!(d&&!f)});
479var l={selected:n,onDayClick:o,modifiers:s};return c.jsx(yS.Provider,{value:l,children:r})}function xS(){var e=w.useContext(yS);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}function MY(e,t){var r=t||{},n=r.from,i=r.to;return n&&i?vr(i,e)&&vr(n,e)?void 0:vr(i,e)?{from:i,to:void 0}:vr(n,e)?void 0:z0(n,e)?{from:e,to:i}:{from:n,to:e}:i?z0(e,i)?{from:i,to:e}:{from:e,to:i}:n?_M(e,n)?{from:e,to:n}:{from:n,to:e}:{from:e,to:void 0}}var bS=w.createContext(void 0);function IY(e){if(!yf(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return c.jsx(bS.Provider,{value:t,children:e.children})}return c.jsx(DY,{initialProps:e.initialProps,children:e.children})}function DY(e){var t=e.initialProps,r=e.children,n=t.selected,i=n||{},a=i.from,o=i.to,s=t.min,l=t.max,u=function(p,g,m){var v,x;(v=t.onDayClick)===null||v===void 0||v.call(t,p,g,m);var y=MY(p,n);(x=t.onSelect)===null||x===void 0||x.call(t,y,p,g,m)},d={range_start:[],range_end:[],range_middle:[],disabled:[]};if(a?(d.range_start=[a],o?(d.range_end=[o],vr(a,o)||(d.range_middle=[{after:a,before:o}])):d.range_end=[a]):o&&(d.range_start=[o],d.range_end=[o]),s&&(a&&!o&&d.disabled.push({after:Vh(a,s-1),before:rr(a,s-1)}),a&&o&&d.disabled.push({after:a,before:rr(a,s-1)}),!a&&o&&d.disabled.push({after:Vh(o,s-1),before:rr(o,s-1)})),l){if(a&&!o&&(d.disabled.push({before:rr(a,-l+1)}),d.disabled.push({after:rr(a,l-1)})),a&&o){var f=ii(o,a)+1,h=l-f;d.disabled.push({before:Vh(a,h)}),d.disabled.push({after:rr(o,h)})}!a&&o&&(d.disabled.push({before:rr(o,-l+1)}),d.disabled.push({after:rr(o,l-1)}))}return c.jsx(bS.Provider,{value:{selected:n,onDayClick:u,modifiers:d},children:r})}function wS(){var e=w.useContext(bS);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function Kh(e){return Array.isArray(e)?OM([],e):e!==void 0?[e]:[]}function LY(e){var t={};return Object.entries(e).forEach(function(r){var n=r[0],i=r[1];t[n]=Kh(i)}),t}var zn;(function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"})(zn||(zn={}));var FY=zn.Selected,_i=zn.Disabled,BY=zn.Hidden,UY=zn.Today,My=zn.RangeEnd,Iy=zn.RangeMiddle,Dy=zn.RangeStart,WY=zn.Outside;function zY(e,t,r){var n,i=(n={},n[FY]=Kh(e.selected),n[_i]=Kh(e.disabled),n[BY]=Kh(e.hidden),n[UY]=[e.today],n[My]=[],n[Iy]=[],n[Dy]=[],n[WY]=[],n);return e.fromDate&&i[_i].push({before:e.fromDate}),e.toDate&&i[_i].push({after:e.toDate}),vf(e)?i[_i]=i[_i].concat(t.modifiers[_i]):yf(e)&&(i[_i]=i[_i].concat(r.modifiers[_i]),i[Dy]=r.modifiers[Dy],i[Iy]=r.modifiers[Iy],i[My]=r.modifiers[My]),i}var AM=w.createContext(void 0);function HY(e){var t=Qe(),r=xS(),n=wS(),i=zY(t,r,n),a=LY(t.modifiers),o=pe(pe({},i),a);return c.jsx(AM.Provider,{value:o,children:e.children})}function CM(){var e=w.useContext(AM);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function qY(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function VY(e){return!!(e&&typeof e=="object"&&"from"in e)}function KY(e){return!!(e&&typeof e=="object"&&"after"in e)}function GY(e){return!!(e&&typeof e=="object"&&"before"in e)}function YY(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function XY(e,t){var r,n=t.from,i=t.to;if(n&&i){var a=ii(i,n)<0;a&&(r=[i,n],n=r[0],i=r[1]);var o=ii(e,n)>=0&&ii(i,e)>=0;return o}return i?vr(i,e):n?vr(n,e):!1}function QY(e){return pS(e)}function JY(e){return Array.isArray(e)&&e.every(pS)}function ZY(e,t){return t.some(function(r){if(typeof r=="boolean")return r;if(QY(r))return vr(e,r);if(JY(r))return r.includes(e);if(VY(r))return XY(e,r);if(YY(r))return r.dayOfWeek.includes(e.getDay());if(qY(r)){var n=ii(r.before,e),i=ii(r.after,e),a=n>0,o=i<0,s=z0(r.before,r.after);return s?o&&a:a||o}return KY(r)?ii(e,r.after)>0:GY(r)?ii(r.before,e)>0:typeof r=="function"?r(e):!1})}function SS(e,t,r){var n=Object.keys(t).reduce(function(a,o){var s=t[o];return ZY(e,s)&&a.push(o),a},[]),i={};
479return n.forEach(function(a){return i[a]=!0}),r&&!vS(e,r)&&(i.outside=!0),i}function eX(e,t){for(var r=Sr(e[0]),n=Cg(e[e.length-1]),i,a,o=r;o<=n;){var s=SS(o,t),l=!s.disabled&&!s.hidden;if(!l){o=rr(o,1);continue}if(s.selected)return o;s.today&&!a&&(a=o),i||(i=o),o=rr(o,1)}return a||i}var tX=365;function TM(e,t){var r=t.moveBy,n=t.direction,i=t.context,a=t.modifiers,o=t.retry,s=o===void 0?{count:0,lastFocused:e}:o,l=i.weekStartsOn,u=i.fromDate,d=i.toDate,f=i.locale,h={day:rr,week:W0,month:Wn,year:yK,startOfWeek:function(v){return i.ISOWeek?Yo(v):pi(v,{locale:f,weekStartsOn:l})},endOfWeek:function(v){return i.ISOWeek?yM(v):mS(v,{locale:f,weekStartsOn:l})}},p=h[r](e,n==="after"?1:-1);n==="before"&&u?p=xK([u,p]):n==="after"&&d&&(p=bK([d,p]));var g=!0;if(a){var m=SS(p,a);g=!m.disabled&&!m.hidden}return g?p:s.count>tX?s.lastFocused:TM(p,{moveBy:r,direction:n,context:i,modifiers:a,retry:pe(pe({},s),{count:s.count+1})})}var $M=w.createContext(void 0);function rX(e){var t=xf(),r=CM(),n=w.useState(),i=n[0],a=n[1],o=w.useState(),s=o[0],l=o[1],u=eX(t.displayMonths,r),d=i??(s&&t.isDateDisplayed(s))?s:u,f=function(){l(i),a(void 0)},h=function(v){a(v)},p=Qe(),g=function(v,x){if(i){var y=TM(i,{moveBy:v,direction:x,context:p,modifiers:r});vr(i,y)||(t.goToDate(y,i),h(y))}},m={focusedDay:i,focusTarget:d,blur:f,focus:h,focusDayAfter:function(){return g("day","after")},focusDayBefore:function(){return g("day","before")},focusWeekAfter:function(){return g("week","after")},focusWeekBefore:function(){return g("week","before")},focusMonthBefore:function(){return g("month","before")},focusMonthAfter:function(){return g("month","after")},focusYearBefore:function(){return g("year","before")},focusYearAfter:function(){return g("year","after")},focusStartOfWeek:function(){return g("startOfWeek","before")},focusEndOfWeek:function(){return g("endOfWeek","after")}};return c.jsx($M.Provider,{value:m,children:e.children})}function _S(){var e=w.useContext($M);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}function nX(e,t){var r=CM(),n=SS(e,r,t);return n}var jS=w.createContext(void 0);function iX(e){if(!Tg(e.initialProps)){var t={selected:void 0};return c.jsx(jS.Provider,{value:t,children:e.children})}return c.jsx(aX,{initialProps:e.initialProps,children:e.children})}function aX(e){var t=e.initialProps,r=e.children,n=function(a,o,s){var l,u,d;if((l=t.onDayClick)===null||l===void 0||l.call(t,a,o,s),o.selected&&!t.required){(u=t.onSelect)===null||u===void 0||u.call(t,void 0,a,o,s);return}(d=t.onSelect)===null||d===void 0||d.call(t,a,a,o,s)},i={selected:t.selected,onDayClick:n};return c.jsx(jS.Provider,{value:i,children:r})}function RM(){var e=w.useContext(jS);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function oX(e,t){var r=Qe(),n=RM(),i=xS(),a=wS(),o=_S(),s=o.focusDayAfter,l=o.focusDayBefore,u=o.focusWeekAfter,d=o.focusWeekBefore,f=o.blur,h=o.focus,p=o.focusMonthBefore,g=o.focusMonthAfter,m=o.focusYearBefore,v=o.focusYearAfter,x=o.focusStartOfWeek,y=o.focusEndOfWeek,b=function($){var E,M,F,H;Tg(r)?(E=n.onDayClick)===null||E===void 0||E.call(n,e,t,$):vf(r)?(M=i.onDayClick)===null||M===void 0||M.call(i,e,t,$):yf(r)?(F=a.onDayClick)===null||F===void 0||F.call(a,e,t,$):(H=r.onDayClick)===null||H===void 0||H.call(r,e,t,$)},_=function($){var E;h(e),(E=r.onDayFocus)===null||E===void 0||E.call(r,e,t,$)},S=function($){var E;f(),(E=r.onDayBlur)===null||E===void 0||E.call(r,e,t,$)},j=function($){var E;(E=r.onDayMouseEnter)===null||E===void 0||E.call(r,e,t,$)},O=function($){var E;(E=r.onDayMouseLeave)===null||E===void 0||E.call(r,e,t,$)},P=function($){var E;(E=r.onDayPointerEnter)===null||E===void 0||E.call(r,e,t,$)},N=function($){var E;(E=r.onDayPointerLeave)===null||E===void 0||E.call(r,e,t,$)},A=function($){var E;(E=r.onDayTouchCancel)===null||E===void 0||E.call(r,e,t,$)},C=function($){var E;(E=r.onDayTouchEnd)===null||E===void 0||E.call(r,e,t,$)},T=function($){var E;(E=r.onDayTouchMove)===null||E===void 0||E.call(r,e,t,$)},L=function($){var E;(E=r.onDayTouchStart)===null||E===void 0||E.call(r,e,t,$)},R=function($){var E;(E=r.onDayKeyUp)===null||E===void 0||E.call(r,e,t,$)},I=function($){var E;switch($.key){case"ArrowLeft":$.preventDefault(),$.stopPropagation(),r.dir==="rtl"?s():l();break;case"ArrowRight":$.preventDefault(),$.stopPropagation(),r.dir==="rtl"?l(
479):s();break;case"ArrowDown":$.preventDefault(),$.stopPropagation(),u();break;case"ArrowUp":$.preventDefault(),$.stopPropagation(),d();break;case"PageUp":$.preventDefault(),$.stopPropagation(),$.shiftKey?m():p();break;case"PageDown":$.preventDefault(),$.stopPropagation(),$.shiftKey?v():g();break;case"Home":$.preventDefault(),$.stopPropagation(),x();break;case"End":$.preventDefault(),$.stopPropagation(),y();break}(E=r.onDayKeyDown)===null||E===void 0||E.call(r,e,t,$)},D={onClick:b,onFocus:_,onBlur:S,onKeyDown:I,onKeyUp:R,onMouseEnter:j,onMouseLeave:O,onPointerEnter:P,onPointerLeave:N,onTouchCancel:A,onTouchEnd:C,onTouchMove:T,onTouchStart:L};return D}function sX(){var e=Qe(),t=RM(),r=xS(),n=wS(),i=Tg(e)?t.selected:vf(e)?r.selected:yf(e)?n.selected:void 0;return i}function lX(e){return Object.values(zn).includes(e)}function cX(e,t){var r=[e.classNames.day];return Object.keys(t).forEach(function(n){var i=e.modifiersClassNames[n];if(i)r.push(i);else if(lX(n)){var a=e.classNames["day_".concat(n)];a&&r.push(a)}}),r}function uX(e,t){var r=pe({},e.styles.day);return Object.keys(t).forEach(function(n){var i;r=pe(pe({},r),(i=e.modifiersStyles)===null||i===void 0?void 0:i[n])}),r}function dX(e,t,r){var n,i,a,o=Qe(),s=_S(),l=nX(e,t),u=oX(e,l),d=sX(),f=!!(o.onDayCl
479ick||o.mode!=="default");w.useEffect(function(){var j;l.outside||s.focusedDay&&f&&vr(s.focusedDay,e)&&((j=r.current)===null||j===void 0||j.focus())},[s.focusedDay,e,r,f,l.outside]);var h=cX(o,l).join(" "),p=uX(o,l),g=!!(l.outside&&!o.showOutsideDays||l.hidden),m=(a=(i=o.components)===null||i===void 0?void 0:i.DayContent)!==null&&a!==void 0?a:TY,v=c.jsx(m,{date:e,displayMonth:t,activeModifiers:l}),x={style:p,className:h,children:v,role:"gridcell"},y=s.focusTarget&&vr(s.focusTarget,e)&&!l.outside,b=s.focusedDay&&vr(s.focusedDay,e),_=pe(pe(pe({},x),(n={disabled:l.disabled,role:"gridcell"},n["aria-selected"]=l.selected,n.tabIndex=b||y?0:-1,n)),u),S={isButton:f,isHidden:g,activeModifiers:l,selectedDays:d,buttonProps:_,divProps:x};return S}function fX(e){var t=w.useRef(null),r=dX(e.date,e.displayMonth,t);return r.isHidden?c.jsx("div",{role:"gridcell"}):r.isButton?c.jsx(Rp,pe({name:"day",ref:t},r.buttonProps)):c.jsx("div",pe({},r.divProps))}function hX(e){var t=e.number,r=e.dates,n=Qe(),i=n.onWeekNumberClick,a=n.styles,o=n.classNames,s=n.locale,l=n.labels.labelWeekNumber,u=n.formatters.formatWeekNumber,d=u(Number(t),{locale:s});if(!i)return c.jsx("span",{className:o.weeknumber,style:a.weeknumber,children:d});var f=l(Number(t),{locale:s}),h=function(p){i(t,r,p)};return c.jsx(Rp,{name:"week-number","aria-label":f,className:o.weeknumber,style:a.weeknumber,onClick:h,children:d})}function pX(e){var t,r,n=Qe(),i=n.styles,a=n.classNames,o=n.showWeekNumber,s=n.components,l=(t=s==null?void 0:s.Day)!==null&&t!==void 0?t:fX,u=(r=s==null?void 0:s.WeekNumber)!==null&&r!==void 0?r:hX,d;return o&&(d=c.jsx("td",{className:a.cell,style:i.cell,children:c.jsx(u,{number:e.weekNumber,dates:e.dates})})),c.jsxs("tr",{className:a.row,style:i.row,children:[d,e.dates.map(function(f){return c.jsx("td",{className:a.cell,style:i.cell,role:"presentation",children:c.jsx(l,{displayMonth:e.displayMonth,date:f})},EG(f))})]})}function TP(e,t,r){for(var n=r!=null&&r.ISOWeek?yM(t):mS(t,r),i=r!=null&&r.ISOWeek?Yo(e):pi(e,r),a=ii(n,i),o=[],s=0;s<=a;s++)o.push(rr(i,s));var l=o.reduce(function(u,d){var f=r!=null&&r.ISOWeek?xM(d):wM(d,r),h=u.find(function(p){return p.weekNumber===f});return h?(h.dates.push(d),u):(u.push({weekNumber:f,dates:[d]}),u)},[]);return l}function mX(e,t){var r=TP(Sr(e),Cg(e),t);if(t!=null&&t.useFixedWeeks){var n=AG(e,t);if(n<6){var i=r[r.length-1],a=i.dates[i.dates.length-1],o=W0(a,6-n),s=TP(W0(a,1),o,t);r.push.apply(r,s)}}return r}function gX(e){var t,r,n,i=Qe(),a=i.locale,o=i.classNames,s=i.styles,l=i.hideHead,u=i.fixedWeeks,d=i.components,f=i.weekStartsOn,h=i.firstWeekContainsDate,p=i.ISOWeek,g=mX(e.displayMonth,{useFixedWeeks:!!u,ISOWeek:p,locale:a,weekStartsOn:f,firstWeekContainsDate:h}),m=(t=d==null?void 0:d.Head)!==null&&t!==void 0?t:CY,v=(r=d==null?void 0:d.Row)!==null&&r!==void 0?r:pX,x=(n=d==null?void 0:d.Footer)!==null&&n!==void 0?n:EY;return c.jsxs("table",{id:e.id,className:o.table,style:s.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!l&&c.jsx(m,{}),c.jsx("tbody",{className:o.tbody,style:s.tbody,children:g.map(function(y){return c.jsx(v,{displayMonth:e.displayMonth,dates:y.dates,weekNumber:y.weekNumber},y.weekNumber)})}),c.jsx(x,{displayMonth:e.displayMonth})]})}function vX(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var yX=vX()?w.useLayoutEffect:w.useEffect,Ly=!1,xX=0;function $P(){return"react-day-picker-".concat(++xX)}function bX(e){var t,r=e??(Ly?$P():null),n=w.useState(r),i=n[0],a=n[1];return yX(function(){i===null&&a($P())},[]),w.useEffect(function(){Ly===!1&&(Ly=!0)},[]),(t=e??i)!==null&&t!==void 0?t:void 0}function wX(e){var t,r,n=Qe(),i=n.dir,a=n.classNames,o=n.styles,s=n.components,l=xf().displayMonths,u=bX(n.id?"".concat(n.id,"-").concat(e.displayIndex):void 0),d=n.id?"".concat(n.id,"-grid-").concat(e.displayIndex):void 0,f=[a.month],h=o.month,p=e.displayIndex===0,g=e.displayIndex===l.length-1,m=!p&&!g;i==="rtl"&&(t=[p,g],g=t[0],p=t[1]),p&&(f.push(a.caption_start),h=pe(pe({},h),o.caption_start)),g&&(f.push(a.caption_end),h=pe(pe({},h),o.caption_end)),m&&(f.push(a.caption_between),h=pe(pe({},h),o.caption_between));var v=(r=s==null?void 0:s.Caption)!==null&&r!==void 0?r:NY;return c.jsxs("div",{className:f.join(" "),style:h,children:[c.jsx(v,{id:u,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),c.jsx(gX,{id:d,"aria-labelledby":u,displayMonth:e.displayMonth})]},e.displayIndex)}function SX(e){var t=Qe(),r=t.classNames,n=t.styles;return c.jsx("div",{className:r.months,style:n.months,children:e.children})}function _X(e){var t,r,n=e.initialProps,i=Qe(),a=_S(),o=xf(),s=w.useState(!1),l=s[0],u=s[1];w.useEffect(function(){i.initialFocus&&a.focusTarget&&(l||(a.focus(a.focusTarget),u(!0)))},[i.initialFocus,l,a.focus,a.focusTarget,a]);var d=[i.classNames.root,i.className];i.numberOfMonths>1&&d.push(i.classNames.multiple_months),i.showWeekNumber&&d.push(i.classNames.with_weeknumber);var f=pe(pe({},i.styles.root),i.style),h=Object.keys(n).filter(function(g){return g.startsWith("data-")}).reduce(function(g,m){var v;return pe(pe({},g),(v={},v[m]=n[m],v))},{}),p=(r=(t=n.components)===null||t===void 0?void 0:t.Months)!==null&&r!==void 0?r:SX;return c.jsx("div",pe({className:d.join(" "),style:f,dir:i.dir,id:i.id,nonce:n.nonce,title:n.title,lang:n.lang},h,{children:c.jsx(p,{children:o.displayMonths.map(function(g,m){return c.jsx(wX,{displayIndex:m,displayMonth:g},m)})})}))}function jX(e){var t=e.children,r=GG(e,["children"]);return c.jsx(hY,{initialProps:r,children:c.jsx(_Y,{children:c.jsx(iX,{initialProps:r,children:c.jsx($Y,{initialProps:r,children:c.jsx(IY,{initialProps:r,children:c.jsx(HY,{children:c.jsx(rX,{children:t})})})})})})})}function OX(e){return c.jsx(jX,pe({},e,{children:c.jsx(_X,{initialProps:e})}))}function OS({className:e,classNames:t,showOutsideDays:r=!0,...n}){return c.jsx(OX,{showOutsideDays:r,className:te("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:sp
479ace-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:te(F0({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",day:te(F0({variant:"ghost"}),"h-9 w-9 p-0 font-normal aria-selected:opacity-100"),day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},components:{IconLeft:({...i})=>c.jsx(C6,{className:"h-4 w-4"}),IconRight:({...i})=>c.jsx(T6,{className:"h-4 w-4"})},...n})}OS.displayName="Calendar";var $g="Popover",[MM,tOe]=fn($g,[Oc]),bf=Oc(),[PX,Ja]=MM($g),IM=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=bf(t),l=w.useRef(null),[u,d]=w.useState(!1),[f,h]=fi({prop:n,defaultProp:i??!1,onChange:a,caller:$g});return c.jsx(x$,{...s,children:c.jsx(PX,{scope:t,contentId:Li(),triggerRef:l,open:f,onOpenChange:h,onOpenToggle:w.useCallback(()=>h(p=>!p),[h]),hasCustomAnchor:u,onCustomAnchorAdd:w.useCallback(()=>d(!0),[]),onCustomAnchorRemove:w.useCallback(()=>d(!1),[]),modal:o,children:r})})};IM.displayName=$g;var DM="PopoverAnchor",NX=w.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,i=Ja(DM,r),a=bf(r),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return w.useEffect(()=>(o(),()=>s()),[o,s]),c.jsx(dg,{...a,...n,ref:t})});NX.displayName=DM;var LM="PopoverTrigger",FM=w.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,i=Ja(LM,r),a=bf(r),o=Oe(t,i.triggerRef),s=c.jsx(ce.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":HM(i.open),...n,ref:o,onClick:oe(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:c.jsx(dg,{asChild:!0,...a,children:s})});FM.displayName=LM;var PS="PopoverPortal",[EX,kX]=MM(PS,{forceMount:void 0}),BM=e=>{const{__scopePopover:t,forceMount:r,children:n,container:i}=e,a=Ja(PS,t);return c.jsx(EX,{scope:t,forceMount:r,children:c.jsx(vi,{present:r||a.open,children:c.jsx(uf,{asChild:!0,container:i,children:n})})})};BM.displayName=PS;var zl="PopoverContent",UM=w.forwardRef((e,t)=>{const r=kX(zl,e.__scopePopover),{forceMount:n=r.forceMount,...i}=e,a=Ja(zl,e.__scopePopover);return c.jsx(vi,{present:n||a.open,children:a.modal?c.jsx(CX,{...i,ref:t}):c.jsx(TX,{...i,ref:t})})});UM.displayName=zl;var AX=Vo("PopoverContent.RemoveScroll"),CX=w.forwardRef((e,t)=>{const r=Ja(zl,e.__scopePopover),n=w.useRef(null),i=Oe(t,n),a=w.useRef(!1);return w.useEffect(()=>{const o=n.current;if(o)return Z1(o)},[]),c.jsx(wg,{as:AX,allowPinchZoom:!0,children:c.jsx(WM,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:oe(e.onCloseAutoFocus,o=>{var s;o.preventDefault(),a.current||(s=r.triggerRef.current)==null||s.focus()}),onPointerDownOutside:oe(e.onPointerDownOutside,o=>{const s=o.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0,u=s.button===2||l;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:oe(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})})}),TX=w.forwardRef((e,t)=>{const r=Ja(zl,e.__scopePopover),n=w.useRef(!1),i=w.useRef(!1);return c.jsx(WM,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(n.current||(s=r.triggerRef.current)==null||s.focus(),a.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:a=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((u=r.triggerRef.current)==null?void 0:u.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),WM=w.forwardRef((e,t)=>
479{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:d,...f}=e,h=Ja(zl,r),p=bf(r);return J1(),c.jsx(xg,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:a,children:c.jsx(wc,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:d,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>h.onOpenChange(!1),children:c.jsx(L1,{"data-state":HM(h.open),role:"dialog",id:h.contentId,...p,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),zM="PopoverClose",$X=w.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,i=Ja(zM,r);return c.jsx(ce.button,{type:"button",...n,ref:t,onClick:oe(e.onClick,()=>i.onOpenChange(!1))})});$X.displayName=zM;var RX="PopoverArrow",MX=w.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,i=bf(r);return c.jsx(F1,{...i,...n,ref:t})});MX.displayName=RX;function HM(e){return e?"open":"closed"}var IX=IM,DX=FM,LX=BM,qM=UM;const VM=IX,KM=DX,NS=w.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},i)=>c.jsx(LX,{children:c.jsx(qM,{ref:i,align:t,sideOffset:r,className:te("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));NS.displayName=qM.displayName;const GM=()=>{const{user:e}=qn(),[t,r]=w.useState([]),[n,i]=w.useState(!0),[a,o]=w.useState(null);w.useEffect(()=>{e?(s(),l()):(r([]),i(!1))},[e]);const s=async()=>{if(!e)return;const{data:b,error:_}=await Ee.from("course_progress").select("day_number, sleep_rating, notes, completed_at").eq("user_id",e.id);!_&&b&&r(b),i(!1)},l=async()=>{if(!e)return;const{data:b,error:_}=await Ee.from("profiles").select("start_date").eq("user_id",e.id).single();!_&&(b!=null&&b.start_date)&&o(new Date(b.start_date))},u=async b=>{if(!e)return;const{error:_}=await Ee.from("profiles").update({start_date:b.toISOString().split("T")[0]}).eq("user_id",e.id);_||o(b)},d=t.map(b=>b.day_number),f=async(b,_,S)=>{if(!e)return;if(t.find(O=>O.day_number===b)){const{error:O}=await Ee.from("course_progress").update({sleep_rating:_,notes:S}).eq("user_id",e.id).eq("day_number",b);O||r(P=>P.map(N=>N.day_number===b?{...N,sleep_rating:_,notes:S}:N))}else{const{error:O}=await Ee.from("course_progress").insert({user_id:e.id,day_number:b,sleep_rating:_,notes:S});O||r(P=>[...P,{day_number:b,sleep_rating:_,notes:S,completed_at:new Date().toISOString()}])}},h=async()=>{e&&(await Ee.from("course_progress").delete().eq("user_id",e.id),await Ee.from("profiles").update({start_date:null}).eq("user_id",e.id),r([]),o(null))},p=b=>t.find(_=>_.day_number===b),g=d.length,m=30-g,v=g/30*100,x=()=>{if(!a||g===0)return 0;const b=[...d].sort((P,N)=>P-N);let _=0;const j=Math.floor((new Date().getTime()-a.getTime())/(1e3*60*60*24)),O=Math.min(j+1,30);for(let P=O;P>=1&&b.includes(P);P--)_++;return _},y=(()=>{const b=t.map(_=>_.sleep_rating).filter(_=>_!==null);return b.length===0?null:b.reduce((_,S)=>_+S,0)/b.length})();return{completedDays:d,progressEntries:t,loading:n,startDate:a,updateStartDate:u,completeDay:f,resetProgress:h,getEntryForDay:p,progressPercentage:v,daysCompleted:g,daysRemaining:m,currentStreak:x(),avgSleepScore:y,refetch:s}},YM=()=>{const{user:e}=qn(),[t,r]=w.useState([]),[n,i]=w.useState(!0);w.useEffect(()=>{e?a():(r([]),i(!1))},[e]);const a=async()=>{if(!e)return;const{data:d,error:f}=await Ee.from("sleep_entries").select("*").eq("user_id",e.id).order("entry_date",{ascending:!1});!f&&d&&r(d),i(!1)},o=async d=>{if(!e)return{error:new Error("Not authenticated")};const[f,h]=d.bedtime.split(":").map(Number),[p,g]=d.wake_time.split(":").map(Number);let m=p-f+(g-h)/60;m<0&&(m+=24);const{error:v}=await Ee.from("sleep_entries").insert({user_id:e.id,entry_date:new Date().toISOString().split("T")[0],bedtime:d.bedtime,wake_time:d.wake_time,total_sleep_hours:Math.round(m*100)/100,qual
479ity_rating:d.quality_rating,notes:d.notes||null});return v||await a(),{error:v}},s=async d=>{e&&(await Ee.from("sleep_entries").delete().eq("id",d),r(f=>f.filter(h=>h.id!==d)))},l=t.length>0?t.reduce((d,f)=>d+(f.total_sleep_hours||0),0)/t.length:0,u=t.length>0?t.reduce((d,f)=>d+(f.quality_rating||0),0)/t.length:0;return{entries:t,loading:n,addEntry:o,deleteEntry:s,avgSleep:l,avgQuality:u,refetch:a}},yd=[{day:1,title:"Track sleep without judgment",description:"Record your natural sleep patterns for one night without trying to change anything. Simply note when you went to bed, when you woke up, and how you felt.",whyItWorks:"Creates baseline data and self-awareness. You can't improve what you don't measure, and awareness is the first step to meaningful change.",tip:"Your body starts preparing for sleep 2 hours before you actually feel tired. Notice these subtle signals."},{day:2,title:"Set consistent wake time",description:"Choose a fixed wake time and commit to it every day, including weekends. Set your alarm for the same time regardless of when you fall asleep.",whyItWorks:"A consistent wake time anchors your circadian rhythm. This is the single most important habit for improving sleep quality.",tip:"The single most important thing for better sleep is a consistent wake time - even more than bedtime."},{day:3,title:"Get morning light exposure",description:"Spend 10-15 minutes in natural sunlight within 30 minutes of waking. Go outside, even on cloudy days - outdoor light is 10-50x brighter than indoor.",whyItWorks:"Morning sunlight suppresses melatonin production and helps set your internal clock, making you feel alert during the day and sleepy at night.",tip:"Just 10 minutes of morning sunlight is 50x more effective at resetting your clock than indoor lighting."},{day:4,title:"Release sleep pressure",description:"Only go to bed when you feel genuinely sleepy, not just tired or bored. Learn to distinguish between fatigue and true sleepiness.",whyItWorks:"Building sleep pressure (adenosine) is essential for falling asleep quickly. Lying awake in bed weakens the mental connection between bed and sleep.",tip:"Sleepiness comes in waves. If you miss one wave, wait for the next one rather than forcing it."},{day:5,title:"Create wind-down ritual",description:"Design a 30-60 minute pre-bed routine with calming activities: dim lights, light reading, gentle stretching, or a warm shower.",whyItWorks:"A consistent routine signals your brain that sleep is approaching, triggering the relaxation response and natural melatonin production.",tip:"Your wind-down routine should feel like a treat, not a chore. Choose activities you genuinely enjoy."},{day:6,title:"Dim lights after sunset",description:"Reduce artificial lighting 2-3 hours before bed. Use warm, dim lights instead of bright overhead fixtures. Consider blue light glasses if needed.",whyItWorks:"Bright light, especially blue light, suppresses melatonin production. Dimming lights allows your natural sleep hormone to rise.",tip:"Even brief exposure to bright light at night can delay your body clock by up to an hour."},{day:7,title:"Review first week patterns",description:"Look back at your sleep tracking from this week. Note patterns: What time did you feel most sleepy? Most alert? What affected your sleep quality?",whyItWorks:"Understanding your personal patterns reveals what needs adjusting. Everyone's ideal sleep schedule is slightly different.",tip:"Most people have a natural dip in alertness around 2-3 PM. This is normal and not a sign of poor sleep."},{day:8,title:"Move caffeine earlier",description:"No caffeine after 2 PM (or 8-10 hours before your target bedtime). This includes coffee, tea, cola, energy drinks, and chocolate.",whyItWorks:"Caffeine has a half-life of 5-7 hours, meaning half is still in your system hours later. It blocks adenosine, the chemical that makes you sleepy.",tip:"A cup of coffee at 2 PM still has 25% of its caffeine in your system at midnight."},{day:9,title:"Shift hydration earlier",description:"Drink most of your fluids before dinner. Reduce liquid intake 2-3 hours before bed to minimize nighttime bathroom trips.",whyItWorks:"Waking to urinate fragments sleep and makes it harder to return to deep sleep. Front-loading hydration prevents this disruption.",tip:"If you wake to use the bathroom, resist checking your phone - the light will make it harder to fall back asleep."},{day:10,title:"Reserve bed for sleep",description:"Use your bed only for sleep (and intimacy). Remove work, phones, tablets, and TV from the bedroom. If you can't sleep, get up.",whyItWorks:"Stimulus control strengthens the mental association between bed and sleep. Your brain learns that bed = sleep, not stress or entertainment.",tip:"If you can't fall asleep in 20 minutes, get up and do something boring in dim light until you feel sleepy."},{day:11,title:"Cool bedroom slightly",description:"Set your room temperature to 65-68°F (18-20°C
479). Use breathable bedding and consider cooling sheets or a fan if needed.",whyItWorks:"Your core body temperature needs to drop 2-3°F to initiate sleep. A cool room facilitates this natural process.",tip:"Warming your hands and feet with socks or a warm bath actually helps your core cool down faster."},{day:12,title:"Eat earlier at night",description:"Finish your last meal 2-3 hours before bed. If you need a snack, choose something light with complex carbs and protein.",whyItWorks:"Digestion requires energy and can raise core body temperature. Heavy meals close to bedtime can cause discomfort and disrupt sleep.",tip:"A small snack with tryptophan (like a banana or small serving of nuts) can actually help promote sleep."},{day:13,title:"Add gentle daily movement",description:"Get 20-30 minutes of walking or light exercise earlier in the day. Avoid intense exercise within 3 hours of bedtime.",whyItWorks:"Regular exercise improves sleep quality by increasing time in deep sleep. It also helps regulate your circadian rhythm.",tip:"Even a 10-minute walk can improve sleep quality. Movement doesn't have to be intense to be effective."},{day:14,title:"Practice body scan",description:"Spend 10 minutes doing progressive muscle relaxation before bed. Systematically tense and release each muscle group from toes to head.",whyItWorks:"Physical tension blocks relaxation. Progressive muscle relaxation activates the parasympathetic nervous system and signals safety to your brain.",tip:"Many people hold tension in their jaw, shoulders, and forehead without realizing it. Pay extra attention to these areas."},{day:15,title:"Write worries down",description:"Spend 5 minutes before bed writing down any concerns, tomorrow's to-do list, or anything on your mind. Close the notebook and set it aside.",whyItWorks:"Externalizing thoughts onto paper tells your brain 'I've captured this, I won't forget.' This reduces rumination and mental load.",tip:"Writing by hand is more effective than typing for processing emotions and clearing your mind."},{day:16,title:"Slow breathing practice",description:"Practice 4-7-8 breathing: Inhale for 4 counts, hold for 7, exhale for 8. Do 4 cycles before bed or when you can't sleep.",whyItWorks:"Slow, extended exhales activate your parasympathetic nervous system, lowering heart rate and blood pressure. It's a physiological 'calm down' signal.",tip:"The extended exhale is the key. It stimulates the vagus nerve and triggers your relaxation response."},{day:17,title:"Reframe sleep thoughts",description:"When you think 'I'll never fall asleep' or 'Tomorrow will be terrible,' challenge it. Replace with 'I've slept before, I will again.'",whyItWorks:"Catastrophic thoughts about sleep create anxiety that actually prevents sleep. Cognitive reframing breaks this self-fulfilling prophecy.",tip:"One night of poor sleep rarely affects next-day performance as much as you fear. Your body is resilient."},{day:18,title:"Remove clock watching",description:"Turn clocks away from view while in bed. Cover or dim any clock displays. Use your phone alarm but keep it face-down.",whyItWorks:"Clock watching increases anxiety ('It's already 2 AM!') and mental arithmetic, which are stimulating rather than relaxing.",tip:"If you must know the time, make it require effort - this reduces compulsive checking."},{day:19,title:"Practice paradoxical intention",description:"Instead of trying to fall asleep, try to stay awake (while lying comfortably in bed with eyes closed). Just observe your thoughts without acting.",whyItWorks:"The effort to sleep creates performance anxiety. Paradoxical intention removes this pressure, and sleep often follows naturally.",tip:"This technique works because it removes the pressure to perform. Sleep isn't something you can force."},{day:20,title:"Create mental imagery",description:"Visualize a peaceful, detailed scene as you drift off: a beach, forest, or favorite calm place. Engage all senses in the visualization.",whyItWorks:"Visualization occupies the mind with calming content, preventing anxious thoughts. It also activates the same brain regions as actually being there.",tip:"The more detailed your imagery, the more effective. Notice colors, textures, sounds, smells, and sensations."},{day:21,title:"Review week 3 progress",description:"Assess your sleep improvements over the past two weeks. What techniques work best for you? What still needs adjustment?",whyItWorks:"Reflection consolidates learning and helps you identify your personal toolkit for better sleep.",tip:"Everyone responds differently to techniques. Focus on what works for you, not what 'should' work."}
479,{day:22,title:"Calculate sleep efficiency",description:"Sleep efficiency = (time asleep / time in bed) Ã 100%. Your goal is 85% or higher. Track this for a few nights.",whyItWorks:"Sleep efficiency is a key CBT-I metric. High efficiency means you're sleeping most of the time you're in bed, indicating healthy sleep.",tip:"If your efficiency is below 85%, try spending slightly less time in bed to build stronger sleep pressure."},{day:23,title:"Adjust bedtime window",description:"Based on your sleep efficiency, fine-tune your bedtime. If efficiency is low, go to bed later. If high and you need more sleep, go earlier.",whyItWorks:"Matching your time in bed to your actual sleep need prevents the frustration of lying awake and strengthens the bed-sleep association.",tip:"Start with small adjustments - 15-30 minutes at a time. Give each change a few days to take effect."},{day:24,title:"Handle night waking",description:"If you wake and can't fall back asleep in 15-20 minutes, get up. Do something calm in dim light until sleepy, then return to bed.",whyItWorks:"This prevents associating your bed with frustration. It maintains the bed as a place of rest, not a place of struggle.",tip:"Keep a boring book nearby for middle-of-night reading. Nothing too engaging - you want to get sleepy, not absorbed."},{day:25,title:"Build sleep resilience",description:"Accept that you'll have occasional poor sleep nights. When they happen, maintain your routine and trust that the next night will be better.",whyItWorks:"Resilience prevents one bad night from becoming a week of worry. Anxiety about sleep is often worse than the sleep loss itself.",tip:"Even after a poor night, stick to your wake time. Your body will naturally correct with better sleep the following night."},{day:26,title:"Optimize bedroom darkness",description:"Evaluate your bedroom for light leaks. Consider blackout curtains, a sleep mask, or covering LED lights. Even small lights can affect sleep.",whyItWorks:"Light, especially blue and green wavelengths, suppresses melatonin production even through closed eyelids.",tip:"Cover even small indicator lights on electronics. Your eyes can detect light through closed lids."},{day:27,title:"Address weekend consistency",description:"Keep your sleep schedule within 1 hour of your weekday schedule on weekends. Resist the urge to 'catch up' with long sleep-ins.",whyItWorks:"Large weekend schedule shifts cause 'social jet lag,' disrupting your circadian rhythm just like traveling across time zones.",tip:"If you need extra rest on weekends, try a short afternoon nap (20 minutes) instead of sleeping late."},{day:28,title:"Create relapse prevention plan",description:"Write down the 3-5 techniques that work best for you. Create a plan for what to do when sleep struggles return (and they will occasionally).",whyItWorks:"Having a written plan reduces anxiety about future issues. You know exactly what to do when challenges arise.",tip:"Sleep naturally fluctuates. Having a plan means temporary setbacks don't become chronic problems."},{day:29,title:"Celebrate your progress",description:"Review how far you've come in 30 days. Compare your current sleep to Day 1. Acknowledge the habits you've built.",whyItWorks:"Positive reinforcement strengthens new habits. Celebrating progress motivates continued adherence to healthy practices.",tip:"Progress isn't always linear. If you've improved at all, that's success worth celebrating."},{day:30,title:"Set long-term sleep goals",description:"Choose 3 core habits to maintain going forward. Write them down. Plan how you'll keep yourself accountable.",whyItWorks:"Transitioning from 'program' to 'lifestyle' requires intentional commitment. Identifying key habits makes maintenance manageable.",tip:"The best sleep habits are the ones you'll actually stick with. Choose what feels sustainable for you."}],XM=[{title:"30-Day Sleep Action Plan",description:"Complete guide with all 30 days of actions and the science behind them",type:"PDF",size:"2.1 MB",icon:"FileText"},{title:"Sleep Diary Worksheet",description:"Track your sleep patterns, quality, and habits",type:"PDF",size:"520 KB",icon:"FileText"},{title:"Bedroom Optimization Checklist",description:"Step-by-step guide to creating the perfect sleep environment",type:"PDF",size:"380 KB",icon:"FileText"},{title:"Quick Start Guide",description:"Essential tips to get started on your sleep journey",type:"PDF",size:"290 KB",icon:"FileText"},{title:"Sleep Science Reference Card",description:"Key facts about sleep cycles, circadian rhythm, and sleep hygiene",type:"PDF",size:"450 KB",icon:"FileText"}],QM=[{title:"Evening Wind-Down Meditation",description:"Guided relaxation to prepare your mind for sleep",duration:"15 min",category:"Meditation"},{title:"Body Scan Relaxation",description:"Progressive muscle relaxation from head to toe",duration:"20 min",category:"Meditation"},{title:"Deep Sleep Waves",description:"Delta wave binaural beats for deep sleep",duration:"30 min",category:"Binaural Beats"},{title:"Peaceful Night Sounds",description:"Gentle rain and nature sounds for relaxation",duration:"60 min",category:"Ambient"},{title:"Morning Awakening",description:"Gentle meditation for a refreshed morning",duration:"10 min",category:"Meditation"},{title:"Stress Release Meditation",description:"Let go of the day's tension before sleep",duration:"18 min",category:"Meditation"}],FX=e=>{const t=n=>{const i=n.getFullYear(),a=String(n.getMonth()+1).padStart(2,"0"),o=String(n.getDate()).padStart(2,"0");return`${i}${a}${o}`};return`BEGIN:VCALENDAR 480VERSION:2.0 481PRODID:-//30-Day Sleep Solution//EN 482CALSCALE:GREGORIAN 483METHOD:PUBLISH 484X-WR-CALNAME:30-Day Sleep Solution 485${yd.map((n,i)=>{const a=new Date(e);a.setDate(a.getDate()+i);const o=t(a),s=new Date(a);s.setDate(s.getDate()+1);const l=t(s);return`BEGIN:VEVENT 486DTSTART;VALUE=DATE:${o} 487DTEND;VALUE=DATE:${l} 488SUMMARY:Day ${n.day}: ${n.title} 489DESCRIPTION:${n.description.replace(/\n/g,"\\n")} 490END:VEVENT`}).join(` 491`)} 492END:VCALENDAR`},JM=e=>{const t=FX(e),r=new Blob([t],{type:"text/calendar;charset=utf-8"}),n=URL.createObjectURL(r),i=document.createElement("a");i.href=n,i.download="30-day-sleep-solution.ics",document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(n)},ZM=({day:e,title:t,isCompleted:r,sleepRating:n,isLocked:i,onClick:a})=>c.jsxs("button",{onClick:a,disabled:i,className:te("relative p-4 rounded-lg border text-left transition-all duration-200","hover:shadow-md hover:border-primary/50",r&&"bg-primary/10 border-primary/30",i&&"opacity-50 cursor-not-allowed hover:shadow-none hover:border-border",!r&&!i&&"bg-card border-border hover:bg-accent/50"),children:[c.jsxs("div",{className:"flex items-start justify-between mb-2",children:[c.jsx("span",{className:"text-2xl font-bold text-foreground",children:e}),r?c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx(ag,{className:"h-4 w-4 text-primary"}),n&&c.jsxs("span",{className:"text-xs font-medium text-primary",children:[n,"/10"]})]}):i?c.jsx(Dl,{className:"h-4 w-4 text-muted-foreground"}):null]}),c.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:t})]}),Hl=MR,BX=IR,eI=w.forwardRef(({className:e,...t},r)=>c.jsx(_g,{ref:r,className:te("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));eI.displayName=_g.displayName;const Qo=w.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(BX,{children:[c.jsx(eI,{}),c.jsxs(jg,{ref:n,className:te("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
492nded-lg",e),...r,children:[t,c.jsxs(DR,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[c.jsx(sg,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Qo.displayName=jg.displayName;const Jo=({className:e,...t})=>c.jsx("div",{className:te("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Jo.displayName="DialogHeader";const ES=({className:e,...t})=>c.jsx("div",{className:te("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ES.displayName="DialogFooter";const Zo=w.forwardRef(({className:e,...t},r)=>c.jsx(Og,{ref:r,className:te("text-lg font-semibold leading-none tracking-tight",e),...t}));Zo.displayName=Og.displayName;const tI=w.forwardRef(({className:e,...t},r)=>c.jsx(Pg,{ref:r,className:te("text-sm text-muted-foreground",e),...t}));tI.displayName=Pg.displayName;const Ac=w.forwardRef(({className:e,...t},r)=>c.jsx("textarea",{className:te("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
492ing-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...t}));Ac.displayName="Textarea";function Mp(e,[t,r]){return Math.min(r,Math.max(t,e))}function kS(e){const t=w.useRef({value:e,previous:e});return w.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var rI=["PageUp","PageDown"],nI=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],iI={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Cc="Slider",[H0,UX,WX]=rg(Cc),[aI,rOe]=fn(Cc,[WX]),[zX,Rg]=aI(Cc),oI=w.forwardRef((e,t)=>{const{name:r,min:n=0,max:i=100,step:a=1,orientation:o="horizontal",disabled:s=!1,minStepsBetweenThumbs:l=0,defaultValue:u=[n],value:d,onValueChange:f=()=>{},onValueCommit:h=()=>{},inverted:p=!1,form:g,...m}=e,v=w.useRef(new Set),x=w.useRef(0),b=o==="horizontal"?HX:qX,[_=[],S]=fi({prop:d,defaultProp:u,onChange:C=>{var L;(L=[...v.current][x.current])==null||L.focus(),f(C)}}),j=w.useRef(_);function O(C){const T=XX(_,C);A(C,T)}function P(C){A(C,x.current)}function N(){const C=j.current[x.current];_[x.current]!==C&&h(_)}function A(C,T,{commit:L}={commit:!1}){const R=eQ(a),I=tQ(Math.round((C-n)/a)*a+n,R),D=Mp(I,[n,i]);S(($=[])=>{const E=GX($,D,T);if(ZX(E,l*a)){x.current=E.indexOf(D);const M=String(E)!==String($);return M&&L&&h(E),M?E:$}else return $})}return c.jsx(zX,{scope:e.__scopeSlider,name:r,disabled:s,min:n,max:i,valueIndexToChangeRef:x,thumbs:v.current,values:_,orientation:o,form:g,children:c.jsx(H0.Provider,{scope:e.__scopeSlider,children:c.jsx(H0.Slot,{scope:e.__scopeSlider,children:c.jsx(b,{"aria-disabled":s,"data-disabled":s?"":void 0,...m,ref:t,onPointerDown:oe(m.onPointerDown,()=>{s||(j.current=_)}),min:n,max:i,inverted:p,onSlideStart:s?void 0:O,onSlideMove:s?void 0:P,onSlideEnd:s?void 0:N,onHomeKeyDown:()=>!s&&A(n,0,{commit:!0}),onEndKeyDown:()=>!s&&A(i,_.length-1,{commit:!0}),onStepKeyDown:({event:C,direction:T})=>{if(!s){const I=rI.includes(C.key)||C.shiftKey&&nI.includes(C.key)?10:1,D=x.current,$=_[D],E=a*I*T;A($+E,D,{commit:!0})}}})})})})});oI.displayName=Cc;var[sI,lI]=aI(Cc,{startEdge:"left",endEdge:"right",size:"width",direction:1}),HX=w.forwardRef((e,t)=>{const{min:r,max:n,dir:i,inverted:a,onSlideStart:o,onSlideMove:s,onSlideEnd:l,onStepKeyDown:u,...d}=e,[f,h]=w.useState(null),p=Oe(t,b=>h(b)),g=w.useRef(void 0),m=oS(i),v=m==="ltr",x=v&&!a||!v&&a;function y(b){const _=g.current||f.getBoundingClientRect(),S=[0,_.width],O=AS(S,x?[r,n]:[n,r]);return g.current=_,O(b-_.left)}return c.jsx(sI,{scope:e.__scopeSlider,startEdge:x?"left":"right",endEdge:x?"right":"left",direction:x?1:-1,size:"width",children:c.jsx(cI,{dir:m,"data-orientation":"horizontal",...d,ref:p,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:b=>{const _=y(b.clientX);o==null||o(_)},onSlideMove:b=>{const _=y(b.clientX);s==null||s(_)},onSlideEnd:()=>{g.current=void 0,l==null||l()},onStepKeyDown:b=>{const S=iI[x?"from-left":"from-right"].includes(b.key);u==null||u({event:b,direction:S?-1:1})}})})}),qX=w.forwardRef((e,t)=>{const{min:r,max:n,inverted:i,onSlideStart:a,onSlideMove:o,onSlideEnd:s,onStepKeyDown:l,...u}=e,d=w.useRef(null),f=Oe(t,d),h=w.useRef(void 0),p=!i;function g(m){const v=h.current||d.current.getBoundingClientRect(),x=[0,v.height],b=AS(x,p?[n,r]:[r,n]);return h.current=v,b(m-v.top)}return c.jsx(sI,{scope:e.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1,children:c.jsx(cI,{"data-orientation":"vertical",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:m=>{const v=g(m.clientY);a==null||a(v)},onSlideMove:m=>{const v=g(m.clientY);o==null||o(v)},onSlideEnd:()=>{h.current=void 0,s==null||s()},onStepKeyDown:m=>{const x=iI[p?"from-bottom":"from-top"].includes(m.key);l==null||l({event:m,direction:x?-1:1})}})})}),cI=w.forwardRef((e,t)=>
492{const{__scopeSlider:r,onSlideStart:n,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:l,...u}=e,d=Rg(Cc,r);return c.jsx(ce.span,{...u,ref:t,onKeyDown:oe(e.onKeyDown,f=>{f.key==="Home"?(o(f),f.preventDefault()):f.key==="End"?(s(f),f.preventDefault()):rI.concat(nI).includes(f.key)&&(l(f),f.preventDefault())}),onPointerDown:oe(e.onPointerDown,f=>{const h=f.target;h.setPointerCapture(f.pointerId),f.preventDefault(),d.thumbs.has(h)?h.focus():n(f)}),onPointerMove:oe(e.onPointerMove,f=>{f.target.hasPointerCapture(f.pointerId)&&i(f)}),onPointerUp:oe(e.onPointerUp,f=>{const h=f.target;h.hasPointerCapture(f.pointerId)&&(h.releasePointerCapture(f.pointerId),a(f))})})}),uI="SliderTrack",dI=w.forwardRef((e,t)=>{const{__scopeSlider:r,...n}=e,i=Rg(uI,r);return c.jsx(ce.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...n,ref:t})});dI.displayName=uI;var q0="SliderRange",fI=w.forwardRef((e,t)=>{const{__scopeSlider:r,...n}=e,i=Rg(q0,r),a=lI(q0,r),o=w.useRef(null),s=Oe(t,o),l=i.values.length,u=i.values.map(h=>mI(h,i.min,i.max)),d=l>1?Math.min(...u):0,f=100-Math.max(...u);return c.jsx(ce.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...n,ref:s,style:{...e.style,[a.startEdge]:d+"%",[a.endEdge]:f+"%"}})});fI.displayName=q0;var V0="SliderThumb",hI=w.forwardRef((e,t)=>{const r=UX(e.__scopeSlider),[n,i]=w.useState(null),a=Oe(t,s=>i(s)),o=w.useMemo(()=>n?r().findIndex(s=>s.ref.current===n):-1,[r,n]);return c.jsx(VX,{...e,ref:a,index:o})}),VX=w.forwardRef((e,t)=>{const{__scopeSlider:r,index:n,name:i,...a}=e,o=Rg(V0,r),s=lI(V0,r),[l,u]=w.useState(null),d=Oe(t,y=>u(y)),f=l?o.form||!!l.closest("form"):!0,h=M1(l),p=o.values[n],g=p===void 0?0:mI(p,o.min,o.max),m=YX(n,o.values.length),v=h==null?void 0:h[s.size],x=v?QX(v,g,s.direction):0;return w.useEffect(()=>{if(l)return o.thumbs.add(l),()=>{o.thumbs.delete(l)}},[l,o.thumbs]),c.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${g}% + ${x}px)`},children:[c.jsx(H0.ItemSlot,{scope:e.__scopeSlider,children:c.jsx(ce.span,{role:"slider","aria-label":e["aria-label"]||m,"aria-valuemin":o.min,"aria-valuenow":p,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,tabIndex:o.disabled?void 0:0,...a,ref:d,style:p===void 0?{display:"none"}:e.style,onFocus:oe(e.onFocus,()=>{o.valueIndexToChangeRef.current=n})})}),f&&c.jsx(pI,{name:i??(o.name?o.name+(o.values.length>1?"[]":""):void 0),form:o.form,value:p},n)]})});hI.displayName=V0;var KX="RadioBubbleInput",pI=w.forwardRef(({__scopeSlider:e,value:t,...r},n)=>{const i=w.useRef(null),a=Oe(i,n),o=kS(t);return w.useEffect(()=>{const s=i.current;if(!s)return;const l=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==t&&d){const f=new Event("input",{bubbles:!0});d.call(s,t),s.dispatchEvent(f)}},[o,t]),c.jsx(ce.input,{style:{display:"none"},...r,ref:a,defaultValue:t})});pI.displayName=KX;function GX(e=[],t,r){const n=[...e];return n[r]=t,n.sort((i,a)=>i-a)}function mI(e,t,r){const a=100/(r-t)*(e-t);return Mp(a,[0,100])}function YX(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function XX(e,t){if(e.length===1)return 0;const r=e.map(i=>Math.abs(i-t)),n=Math.min(...r);return r.indexOf(n)}function QX(e,t,r){const n=e/2,a=AS([0,50],[0,n]);return(n-a(t)*r)*r}function JX(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}function ZX(e,t){if(t>0){const r=JX(e);return Math.min(...r)>=t}return!0}function AS(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function eQ(e){return(String(e).split(".")[1]||"").length}function tQ(e,t){const r=Math.pow(10,t);return Math.round(e*r)/r}var gI=oI,rQ=dI,nQ=fI,iQ=hI;const vI=w.forwardRef(({className:e,...t},r)=>c.jsxs(gI,{ref:r,className:te("relative flex w-full touch-none select-none items-center",e),...t,children:[c.jsx(rQ,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:c.jsx(nQ,{className:"absolute h-full bg-primary"})}),c.jsx(iQ,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));vI.displayName=gI.displayName;const yI=({isOpen:e,onClose:t,dayContent:r,isCompleted:n,existingRating:i,existingNotes:a,onComplete:o})=>{const[s,l]=w.useState(i||5),[u,d]=w.useState(a||""),[f,h]=w.useState(!1),[p,g]=w.useState(n);if(!r)return null;const m=async()=>{h(!0);try{await o(s,u),g(!0)}catch(v){console.error("Error completing day:",v)}finally{h(!1)}};return c.jsx(Hl,{open:e,onOpenChange:t,children:c.jsxs(Qo,{className:"max-w-lg max-h-[90vh] overflow-y-auto",children:[c.jsx(Jo,{children:c.jsxs(Zo,{className:"flex items-center gap-2 text-xl",children:[c.jsx(Dt,{className:"h-5 w-5 text-primary"}),"Day ",r.day,": ",r.title]})}),c.jsxs("div",{className:"space-y-6 py-4",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx("h3",{className:"font-semibold text-foreground",children:"Today's Action"}),c.jsx("p",{className:"text-muted-foreground",children:r.description})]}),c.jsxs("div",{className:"space-y-2 p-4 rounded-lg bg-accent/50 border border-border",children:[c.jsx("h3",{className:"font-semibold text-foreground",children:"Why It Works"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:r.whyItWorks})]}),c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("h3",{className:"font-semibold text-foreground",children:"Sleep Quality Rating"}),c.jsxs("span",{className:"text-2xl font-bold text-primary",children:[s,"/10"]})]}),c.jsx(vI,{value:[s],onValueChange:v=>l(v[0]),min:1,max:10,step:1,className:"w-full",disabled:n}),c.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[c.jsx("span",{children:"Poor"}),c.jsx("span",{children:"Excellent"})]})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx("h3",{className:"font-semibold text-foreground",children:"Notes (optional)"}),c.jsx(Ac,{placeholder:"How did you sleep? Any observations...",value:u,onChange:v=>d(v.target.value),disabled:n,className:"min-h-[80px]"})]}),p&&c.jsx("div",{className:"p-4 rounded-lg bg-primary/10 border border-primary/30",children:c.jsxs("div",{className:"flex items-start gap-3",children:[c.jsx(D2,{className:"h-5 w-5 text-primary flex-shrink-0 mt-0.5"}),c.jsxs("div",{children:[c.jsx("h4",{className:"font-semibold text-foreground mb-1",children:"Today's Tip"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:r.tip})]})]})}),n?c.jsx("div",{className:"text-center text-sm text-muted-foreground",children:"â Completed"}):c.jsx(se,{onClick:m,disabled:f,className:"w-full",size:"lg",children:f?"
492Saving...":"Mark as Complete"})]})]})})},aQ=()=>{var D;const{user:e}=qn(),{loading:t,completedDays:r,progressPercentage:n,startDate:i,updateStartDate:a,resetProgress:o,completeDay:s,getEntryForDay:l,daysCompleted:u,daysRemaining:d,currentStreak:f,avgSleepScore:h}=GM(),{entries:p,avgSleep:g,avgQuality:m}=YM(),[v,x]=w.useState(null),[y,b]=w.useState(!1),[_,S]=w.useState("07:00"),[j,O]=w.useState([]),P=$=>{x($),b(!0)},N=()=>{b(!1),x(null)},A=async($,E)=>{v&&await s(v,$,E)},C=()=>{i&&JM(i)},T=async()=>{confirm("Are you sure you want to reset all your progress? This cannot be undone.")&&await o()},L=()=>{const[$,E]=_.split(":").map(Number),M=new Date;M.setHours($,E,0,0);const F=[6,5,4,3],H=15,U=F.map(K=>{const J=K*90+H,he=new Date(M.getTime()-J*6e4);return xt(he,"h:mm a")});O(U)},R=v&&yd.find($=>$.day===v)||null,I=v?l(v):void 0;return t?c.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:c.jsx("div",{className:"text-center",children:c.jsx("div",{className:"animate-pulse text-muted-foreground",children:"Loading your progress..."})})}):c.jsxs("div",{className:"min-h-screen bg-background",children:[c.jsx(Gr,{}),c.jsx("main",{className:"pt-24 pb-16",children:c.jsxs("div",{className:"container mx-auto px-4",children:[c.jsxs("section",{className:"mb-12",children:[c.jsxs("h1",{className:"font-serif text-3xl md:text-4xl font-bold text-foreground mb-2",children:["Welcome Back",(D=e==null?void 0:e.user_metadata)!=null&&D.full_name?`, ${e.user_metadata.full_name.split(" ")[0]}`:"","! ð"]}),c.jsx("p",{className:"text-muted-foreground text-lg mb-6",children:"Your 30-Day Sleep Solution journey"}),c.jsx(re,{className:"bg-card border-border overflow-hidden",children:c.jsx("div",{className:"aspect-video bg-muted flex items-center justify-center",children:c.jsxs("div",{className:"text-center",children:[c.jsx(id,{className:"h-16 w-16 text-muted-foreground mx-auto mb-4"}),c.jsx("p",{className:"text-muted-foreground",children:"Welcome Video Coming Soon"})]})})})]}),c.jsx("section",{className:"mb-8",children:c.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4",children:[c.jsx(re,{className:"bg-card border-border",children:c.jsxs(ie,{className:"p-4 text-center",children:[c.jsx("div",{className:"w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center mx-auto mb-2",children:c.jsx(Ml,{className:"h-5 w-5 text-primary"})}),c.jsx("span",{className:"text-2xl font-bold text-foreground",children:u}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Days Done"})]})}),c.jsx(re,{className:"bg-card border-border",children:c.jsxs(ie,{className:"p-4 text-center",children:[c.jsx("div",{className:"w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center mx-auto mb-2",children:c.jsx(og,{className:"h-5 w-5 text-primary"})}),c.jsx("span",{className:"text-2xl font-bold text-foreground",children:p.length}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Sleep Entries"})]})}),c.jsx(re,{className:"bg-card border-border",children:c.jsxs(ie,{className:"p-4 text-center",children:[c.jsx("div",{className:"w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center mx-auto mb-2",children:c.jsx(ds,{className:"h-5 w-5 text-primary"})}),c.jsx("span",{className:"text-2xl font-bold text-foreground",children:g!==null?`${g.toFixed(1)}h`:"â"}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Avg Sleep"})]})}),c.jsx(re,{className:"bg-card border-border",children:c.jsxs(ie,{className:"p-4 text-center",children:[c.jsx("div",{className:"w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center mx-auto mb-2",children:c.jsx(cl,{className:"h-5 w-5 text-primary"})}),c.jsx("span",{className:"text-2xl font-bold text-foreground",children:h!==null?h.toFixed(1):"â"}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Avg Score /10"})]})})]})}),c.jsx("section",{className:"mb-6",children:c.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[c.jsxs(se,{variant:"destructive",size:"sm",onClick:T,className:"gap-2",children:[c.jsx(F2,{className:"h-4 w-4"}),"Reset Progress"]}),c.jsxs(VM,{children:[c.jsx(KM,{asChild:!0,children:c.jsxs(se,{variant:"outline",size:"sm",className:"gap-2",children:[c.jsx(M2,{className:"h-4 w-4"}),i?xt(i,"MMM d, yyyy"):"Set Start Date"]})}),c.jsx(NS,{className:"w-auto p-0",align:"start",children:c.jsx(OS,{mode:"single",selected:i||void 0,onSelect:$=>$&&a($),initialFocus:!0})})]}),c.jsxs(se,{variant:"outline",size:"sm",onClick:C,disabled:!i,className:"gap-2",children:[c.jsx(Il,{className:"h-4 w-4"}),"Export Calendar"]})]})}),c.jsxs("section",{className:"mb-8",children:[c.jsxs("div",{className:"flex items-center justify-between mb-2",children:[c.jsx("span",{className:"text-sm text-muted-foreground",children:"Course Progress"}),c.jsxs("span",{className:"text-sm font-medium text-foreground",children:[n,"%"]})]}),c.jsx(fS,{value:n,className:"h-3"})]}),c.jsxs("section",{className:"mb-12",children:[c.jsx("h2",{className:"font-serif text-2xl font-bold text-foreground mb-6",children:"Your 30-Day Journey"}),c.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-5 lg:grid-cols-6 gap-3",children:yd.map($=>{var E;return c.jsx(ZM,{day:$.day,title:$.title,isCompleted:r.includes($.day),sleepRating:(E=l($.day))==null?void 0:E.sleep_rating,onClick:()=>P($.day)},$.day)})})]}),c.jsxs("section",{className:"mb-12",children:[c.jsx("h2",{className:"font-serif text-2xl font-bold text-foreground mb-6",children:"Resources & Worksheets"}),c.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:XM.map(($,E)=>c.jsx(re,{className:"bg-card border-border hover:border-primary/30 transition-colors",children:c.jsxs(ie,{className:"p-4 flex items-start gap-3",children:[c.jsx("div",{className:"w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center flex-shrink-0",children:c.jsx(D6,{className:"h-5 w-5 text-primary"})}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("h4",{className:"font-medium text-foreground text-sm mb-1",children:$.title}),c.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:$.description}),c.jsxs("span",{className:"text-xs text-muted-foreground mt-1",children:[$.type," ⢠",$.size]})]})]})},E))})]}),c.jsxs("section",{className:"mb-12",children:[c.jsx("h2",{className:"font-serif text-2xl font-bold text-foreground mb-6",children:"Meditation & Sleep Sounds"}),c.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:QM.map(($,E)=>c.jsx(re,{className:"bg-card border-border hover:border-primary/30 transition-colors cursor-pointer",children:c.jsxs(ie,{className:"p-4 flex items-center gap-3",children:[c.jsx("div",{className:"w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center flex-shrink-0",children:c.jsx(F6,{className:"h-6 w-6 text-primary"})}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("h4",{className:"font-medium text-foreground text-sm",children:$.title}),c.jsxs("p",{className:"text-xs text-muted-foreground",children:[$.duration," ⢠",$.category]})]}),c.jsx(id,{className:"h-5 w-5 text-muted-foreground"})]})},E))})]}),c.jsx("section",{className:"mb-12",children:c.jsxs(re,{className:"bg-card border-border",children:[c.jsx(ct,{children:c.jsxs(ut,{className:"flex items-center gap-2",children:[c.jsx(Dt,{className:"h-5 w-5 text-primary"}),"Sleep Calculator"]})}),c.jsxs(ie,{className:"space-y-4",children:[c.jsx("p",{className:"text-muted-foreground text-sm",children:"Enter your desired wake-up time to find optimal bedtimes based on sleep cycles."}),c.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[c.jsx(ze,{type:"time",value:_,onCh
vendor: 5,000 bytes, line 492
492ange:$=>S($.target.value),className:"w-32"}),c.jsx(se,{onClick:L,children:"Calculate Bedtimes"})]}),j.length>0&&c.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3 mt-4",children:j.map(($,E)=>c.jsxs("div",{className:`p-3 rounded-lg text-center ${E===0?"bg-primary/20 border border-primary/40":"bg-muted"}`,children:[c.jsx("p",{className:"font-bold text-foreground",children:$}),c.jsxs("p",{className:"text-xs text-muted-foreground",children:[6-E," cycles"]}),E===0&&c.jsx("p",{className:"text-xs text-primary mt-1",children:"Recommended"})]},E))})]})]})}),c.jsx("section",{children:c.jsx("div",{className:"flex flex-wrap gap-4",children:c.jsx(Re,{to:"/sleep-tracker",children:c.jsxs(se,{variant:"outline",className:"gap-2",children:[c.jsx(Dt,{className:"h-4 w-4"}),"Log Tonight's Sleep"]})})})})]})}),c.jsx(xi,{}),c.jsx(yI,{isOpen:y,onClose:N,dayContent:R,isCompleted:v?r.includes(v):!1,existingRating:I==null?void 0:I.sleep_rating,existingNotes:I==null?void 0:I.notes,onComplete:A})]})};var Mg="Checkbox",[oQ,nOe]=fn(Mg),[sQ,CS]=oQ(Mg);function lQ(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:l,required:u,value:d="on",internal_do_not_use_render:f}=e,[h,p]=fi({prop:r,defaultProp:i??!1,onChange:l,caller:Mg}),[g,m]=w.useState(null),[v,x]=w.useState(null),y=w.useRef(!1),b=g?!!o||!!g.closest("form"):!0,_={checked:h,disabled:a,setChecked:p,control:g,setControl:m,name:s,form:o,value:d,hasConsumerStoppedPropagationRef:y,required:u,defaultChecked:Ua(i)?!1:i,isFormControl:b,bubbleInput:v,setBubbleInput:x};return c.jsx(sQ,{scope:t,..._,children:cQ(f)?f(_):n})}var xI="CheckboxTrigger",bI=w.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},i)=>{const{control:a,value:o,disabled:s,checked:l,required:u,setControl:d,setChecked:f,hasConsumerStoppedPropagationRef:h,isFormControl:p,bubbleInput:g}=CS(xI,e),m=Oe(i,d),v=w.useRef(l);return w.useEffect(()=>{const x=a==null?void 0:a.form;if(x){const y=()=>f(v.current);return x.addEventListener("reset",y),()=>x.removeEventListener("reset",y)}},[a,f]),c.jsx(ce.button,{type:"button",role:"checkbox","aria-checked":Ua(l)?"mixed":l,"aria-required":u,"data-state":OI(l),"data-disabled":s?"":void 0,disabled:s,value:o,...n,ref:m,onKeyDown:oe(t,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:oe(r,x=>{f(y=>Ua(y)?!0:!y),g&&p&&(h.current=x.isPropagationStopped(),h.current||x.stopPropagation())})})});bI.displayName=xI;var TS=w.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:i,defaultChecked:a,required:o,disabled:s,value:l,onCheckedChange:u,form:d,...f}=e;return c.jsx(lQ,{__scopeCheckbox:r,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:u,name:n,form:d,value:l,internal_do_not_use_render:({isFormControl:h})=>c.jsxs(c.Fragment,{children:[c.jsx(bI,{...f,ref:t,__scopeCheckbox:r}),h&&c.jsx(jI,{__scopeCheckbox:r})]})})});TS.displayName=Mg;var wI="CheckboxIndicator",SI=w.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...i}=e,a=CS(wI,r);return c.jsx(vi,{present:n||Ua(a.checked)||a.checked===!0,children:c.jsx(ce.span,{"data-state":OI(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});SI.displayName=wI;var _I="CheckboxBubbleInput",jI=w.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:o,required:s,disabled:l,name:u,value:d,form:f,bubbleInput:h,setBubbleInput:p}=CS(_I,e),g=Oe(r,p),m=kS(a),v=M1(n);w.useEffect(()=>{const y=h;if(!y)return;const b=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(b,"checked").set,j=!i.current;if(m!==a&&S){const O=new Event("click",{bubbles:j});y.indeterminate=Ua(a),S.call(y,Ua(a)?!1:a),y.dispatchEvent(O)}},[h,m,a,i]);const x=w.useRef(Ua(a)?!1:a);return c.jsx(ce.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??x.current,required:s,disabled:l,name:u,value:d,form:f,...t,tabIndex:-1,ref:g,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});jI.displayName=_I;function cQ(e){return typeof e=="function"}function Ua(e){return e==="indeterminate"}function OI(e){return Ua(e)?"indeterminate":e?"checked":"unchecked"}const PI=w.forwardRef(({className:e,...t},r)=>c.jsx(TS,{ref:r,className:te("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:c.jsx(SI,{className:te("flex items-center justify-center text-current"),children:c.jsx(ag,{className:"h-4 w-4"})})}));PI.displayName=TS.displayName;const uQ=()=>{qn();const{toast:e}=Vr();Ji();const[t]=H$(),[r,n]=w.useState(""),[i,a]=w.useState(!1),[o,s]=w.useState(null),[l,u]=w.useState(0),[d,f]=w.useState(!1),[h,p]=w.useState(!1),[g,m]=w.useState(!1),v=297,x=199,y=x-l,b=async()=>
492{if(!r.trim()){e({title:"Enter a coupon code",description:"Please enter a coupon code to apply.",variant:"destructive"});return}p(!0),hl("coupon_apply",{code:r.trim()});try{const{data:j,error:O}=await Ee.functions.invoke("validate-coupon",{body:{couponCode:r.trim()}});if(O)throw O;if(j!=null&&j.valid){a(!0),s(r.trim());let P=0;j.amount_off?P=j.amount_off/100:j.percent_off&&(P=Math.round(x*j.percent_off/100)),u(P),hl("coupon_applied",{code:r.trim(),discount:P}),e({title:"Coupon applied!",description:`You saved $${P} on your order.`})}else e({title:"Invalid coupon",description:(j==null?void 0:j.error)||"Please check your coupon code and try again.",variant:"destructive"})}catch(j){console.error("Coupon validation error:",j),e({title:"Error validating coupon",description:"Please try again later.",variant:"destructive"})}finally{p(!1)}},_=async()=>{if(!g){e({title:"Please agree to terms",description:"You must agree to the terms of use and privacy policy.",variant:"destructive"});return}f(!0),Bl("Complete Purchase","checkout_pay"),hl("begin_checkout",{value:y,currency:"USD",coupon:o??void 0});try{const{data:j,error:O}=await Ee.functions.invoke("create-checkout-session",{body:o?{couponCode:o}:{}});if(O)throw O;if(j!=null&&j.url)window.location.href=j.url;else throw new Error("No checkout URL returned")}catch(j){console.error("Checkout error:",j),e({title:"Checkout failed",description:"There was an error processing your request. Please try again.",variant:"destructive"})}finally{f(!1)}},S=["30 Daily Video Lessons","Guided Sleep Meditations","Downloadable PDF Workbooks","Sleep Tracking Tools","Lifetime Access","30-Day Money-Back Guarantee"];return t.get("canceled")==="true"&&e({title:"Checkout canceled",description:"Your order was not completed. Feel free to try again!"}),c.jsxs("div",{className:"min-h-screen bg-background",children:[c.jsx(Gr,{}),c.jsx("main",{className:"pt-24 pb-16",children:c.jsxs("div",{className:"container mx-auto px-4 max-w-6xl",children:[c.jsxs(Re,{to:"/",className:"inline-flex items-center gap-2 text-muted-foreground hover:text-primary transition-colors mb-8",children:[c.jsx(E6,{className:"h-4 w-4"}),"Back to Home"]}),c.jsx(re,{className:"mb-8 border-primary/20 bg-primary/5",children:c.jsxs(ie,{className:"p-4 flex items-center justify-between",children:[c.jsxs("p",{className:"text-foreground",children:["Already purchased?"," ",c.jsx(Re,{to:"/login",className:"text-primary font-semibold hover:underline",children:"Log in"})," ","to access your dashboard."]}),c.jsx(se,{variant:"outline",size:"sm",asChild:!0,children:c.jsx(Re,{to:"/login",children:"Log In"})})]})}),c.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-12",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"font-serif text-3xl font-bold text-foreground mb-2",children:"Complete Your Order"}),c.jsx("p",{className:"text-muted-foreground mb-8",children:"You're one step away from better sleep!"}),c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"space-y-4",children:[c.jsx("h3",{className:"font-semibold text-foreground text-lg",children:"Have a Coupon?"}),c.jsxs("div",{className:"flex gap-3",children:[c.jsx(ze,{placeholder:"Enter coupon code",value:r,onChange:j=>n(j.target.value),className:"bg-card",disabled:i}),c.jsx(se,{type:"button",variant:"outline",onClick:b,disabled:i||h,children:h?c.jsx(lr,{className:"h-4 w-4 animate-spin"}):i?c.jsx(gr,{className:"h-4 w-4"}):"Apply"})]}),i&&c.jsxs("p",{className:"text-sm text-primary flex items-center gap-2",children:[c.jsx(V6,{className:"h-4 w-4"}),"Coupon applied! You saved $",l,"."]})]}),c.jsxs("div",{className:"space-y-4 pt-4 border-t border-border",children:[c.jsxs("h3",{className:"font-semibold text-foreground text-lg flex items-center gap-2",children:[c.jsx(u0,{className:"h-5 w-5 text-primary"}),"Payment Information"]}),c.jsx(re,{className:"bg-card border-border",children:c.jsxs(ie,{className:"p-6 text-center text-muted-foreground",children:[c.jsx(Dl,{className:"h-8 w-8 mx-auto mb-3 text-primary"}),c.jsx("p",{className:"font-medium text-foreground",children:"Secure Payment via Stripe"}),c.jsx("p",{className:"text-sm",children:"You'll be redirected to Stripe's secure checkout to complete your payment."})]})})]}),c.jsxs("div",{className:"flex items-start gap-3",children:[c.jsx(PI,{id:"terms",className:"mt-1",checked:g,onCheckedChange:j=>m(j)}),c.jsxs("label",{htmlFor:"terms",className:"text-sm text-muted-foreground",children:["I agree to the"," ",c.jsx(Re,{to:"/terms",className:"text-primary hover:underline",children:"Terms of Use"})," ","and"," ",c.jsx(Re,{to:"/privacy",className:"text-primary hover:underline",children:"Privacy Policy"})]})]}),c.jsx(se,{onClick:_,variant:"cta",size:"xl",className:"w-full",disabled:d,children:d?c.jsxs(c.Fragment,{children:[c.jsx(lr,{className:"h-5 w-5 mr-2 animate-spin"}),"Processing..."]}):c.jsxs(c.Fragment,{children:[c.jsx(Dl,{className:"h-5 w-5 mr-2"}),"Complete Purchase - $",y]})}),c.jsxs("div",{className:"flex items-center justify-center gap-6 pt-4",children:[c.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[c.jsx(pf,{className:"h-4 w-4 text-primary"}),c.jsx("span",{children:"Secure Checkout"})]}),c.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[c.jsx(u0,{className:"h-4 w-4 text-primary"}),c.jsx("span",{children:"Stripe Payments"})]})]})]})]}),c.jsx("div",{children:c.jsxs(re,{className:"bg-card border-border sticky top-24",children:[c.jsx(ct,{className:"border-b border-border",children:c.jsxs(ut,{className:"flex items-center gap-2",children:[c.jsx(Dt,{className:"h-5 w-5 text-primary"}),"Order Summary"]})}),c.jsxs(ie,{className:"p-6 space-y-6",children:[c.jsxs("div",{className:"flex items-start gap-4",children:[c.jsx("div",{className:"w-20 h-20 rounded-lg bg-primary/10 flex items-center justify-center flex-shrink-0",children:c.jsx(Dt,{className:"h-10 w-10 text-primary"})}),c.jsxs("div",{className:"flex-1",children:[c.jsx("h4",{className:"font-semibold text-foreground",children:"30-Day Sleep Solution"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Complete digital program"}),c.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[c.jsxs("span",{className:"text-lg font-bold text-foreground",children:["$",x]}),c.jsxs("span",{className:"text-sm text-muted-foreground line-through",children:["$",v]})]})]})]}),c.jsxs("div",{className:"border-t border-border pt-4",children:[c.jsx("h4",{className:"font-medium text-foreground mb-3",children:"What's Included:"}),c.jsx("ul",{className:"space-y-2",children:S.map((j,O)=>c.jsxs("li",{className:"flex items-center gap-2 text-sm",children:[c.jsx(gr,{className:"h-4 w-4 text-primary flex-shrink-0"}),c.jsx("span",{className:"text-muted-foreground",children:j})]},O))})]}),c.jsxs("div",{className:"border-t border-border pt-4 space-y-2",children:[c.jsxs("div",{className:"flex justify-between text-sm",children:[c.jsx("span",{className:"text-muted-foreground",children:"Subtotal"}),c.jsxs("span",{className:"text-foreground",children:["$",x]})]}),i&&c.jsxs("div",{className:"flex justify-between text-sm text-primary",children:[c.jsx("span",{children:"Coupon Discount"}),c.jsxs("span",{children:["-$",l]})]}),c.jsxs("div",{className:"flex justify-between font-semibold text-lg pt-2 border-t border-border",children:[c.jsx("span",{className:"text-foreground",children:"Total"}),c.jsxs("span",{className:"text-primary",children:["$",y]})]})]}),c.jsxs("div",{className:"bg-primary/5 rounded-lg p-4 border border-primary/20",children:[c.jsx("p",{className:"text-sm text-foreground font-medium mb-1",children:"30-Day Money-Back Guarantee"}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Not satisfied? Get a full refund within 30 days, no questions asked."})]})]})]})})]})]})})]})},dQ=()=>{const e=Ji(),[t]=H$(),{toast:r}=Vr(),[n,i]=w.useState(!0),[a,o]=w.useState(""),[s,l]=w.useState(""),[u,d]=w.useState(""),[f,h]=w.useState(!1),[p,g]=w.useState(!1),[m,v]=w.useState(!1),[x,y]=w.useState(""),b=t.get("session_id");w.useEffect(()=>{(async()=>
492{if(!b){y("No session ID found. Please contact support."),i(!1);return}try{const{data:O,error:P}=await Ee.functions.invoke("complete-registration",{body:{session_id:b}});if(P)throw P;O.email&&o(O.email),O.existingUser&&v(!0);const N=typeof O.amount=="number"?O.amount/100:199;o7({value:N,currency:(O.currency||"usd").toUpperCase(),transactionId:b,coupon:O.coupon||void 0})}catch(O){console.error("Error fetching session:",O),y("Could not verify your purchase. Please contact support.")}finally{i(!1)}})()},[b]);const _=async j=>{if(j.preventDefault(),s.length<6){r({title:"Password too short",description:"Password must be at least 6 characters.",variant:"destructive"});return}if(s!==u){r({title:"Passwords don't match",description:"Please make sure your passwords match.",variant:"destructive"});return}g(!0);try{const{data:O,error:P}=await Ee.functions.invoke("complete-registration",{body:{session_id:b,password:s}});if(P)throw P;if(O.existingUser){r({title:"Account already exists",description:"Please log in with your existing account."}),e("/login");return}const{error:N}=await Ee.auth.signInWithPassword({email:a,password:s});if(N)throw N;r({title:"Welcome!",description:"Your account has been created. Enjoy the program!"}),e("/dashboard")}catch(O){console.error("Error creating account:",O),r({title:"Error",description:O instanceof Error?O.message:"Failed to create account. Please contact support.",variant:"destructive"})}finally{g(!1)}},S=()=>{e("/login")};return n?c.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center px-4",children:c.jsxs("div",{className:"text-center space-y-4",children:[c.jsx(lr,{className:"w-10 h-10 animate-spin text-primary mx-auto"}),c.jsx("p",{className:"text-muted-foreground",children:"Verifying your purchase..."})]})}):x?c.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center px-4",children:c.jsxs("div",{className:"max-w-md w-full text-center space-y-6",children:[c.jsx("div",{className:"w-20 h-20 rounded-full bg-destructive/10 flex items-center justify-center mx-auto",children:c.jsx(Dl,{className:"w-10 h-10 text-destructive"})}),c.jsxs("div",{className:"space-y-2",children:[c.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"Something went wrong"}),c.jsx("p",{className:"text-muted-foreground",children:x})]}),c.jsx(se,{onClick:()=>e("/"),variant:"outline",children:"Return Home"})]})}):c.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center px-4",children:c.jsxs("div",{className:"max-w-md w-full space-y-8",children:[c.jsxs("div",{className:"text-center",children:[c.jsx("div",{className:"w-20 h-20 rounded-full bg-primary/10 flex items-center justify-center mx-auto mb-6",children:c.jsx(gr,{className:"w-10 h-10 text-primary"})}),c.jsx("h1",{className:"text-3xl font-bold text-foreground",children:"Thank You for Your Purchase!"}),c.jsx("p",{className:"text-muted-foreground mt-2",children:"Your payment was successful. Let's set up your account."})]}),m?c.jsxs("div",{className:"bg-card border border-border rounded-lg p-6 space-y-4",children:[c.jsxs("p",{className:"text-center text-foreground",children:["We found an existing account for ",c.jsx("strong",{children:a}),"."]}),c.jsx("p",{className:"text-center text-muted-foreground text-sm",children:"Your purchase has been added to your account. Please log in to access the program."}),c.jsx(se,{onClick:S,className:"w-full",children:"Log In to Your Account"})]}):c.jsxs("form",{onSubmit:_,className:"bg-card border border-border rounded-lg p-6 space-y-6",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx(Me,{htmlFor:"email",children:"Email"}),c.jsx(ze,{id:"email",type:"email",value:a,disabled:!0,className:"bg-muted"})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(Me,{htmlFor:"password",children:"Create Password"}),c.jsxs("div",{className:"relative",children:[c.jsx(ze,{id:"password",type:f?"text":"password",value:s,onChange:j=>l(j.target.value),placeholder:"At least 6 characters",required:!0,minLength:6}),c.jsx(se,{type:"button",variant:"ghost",size:"sm",className:"absolute right-1 top-1/2 -translate-y-1/2 h-8 w-8 p-0",onClick:()=>
492h(!f),children:f?c.jsx(M6,{className:"h-4 w-4"}):c.jsx(P1,{className:"h-4 w-4"})})]})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(Me,{htmlFor:"confirmPassword",children:"Confirm Password"}),c.jsx(ze,{id:"confirmPassword",type:f?"text":"password",value:u,onChange:j=>d(j.target.value),placeholder:"Confirm your password",required:!0,minLength:6})]}),c.jsx(se,{type:"submit",className:"w-full",disabled:p,children:p?c.jsxs(c.Fragment,{children:[c.jsx(lr,{className:"w-4 h-4 mr-2 animate-spin"}),"Creating Account..."]}):"Complete Setup & Access Dashboard"}),c.jsx("p",{className:"text-xs text-center text-muted-foreground",children:"By creating an account, you'll get instant access to your 30-Day Sleep Solution program."})]})]})})},fQ=()=>{const e=Kr();return w.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),c.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:c.jsxs("div",{className:"text-center",children:[c.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),c.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),c.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},hQ=()=>{const{toast:e}=Vr(),[t,r]=w.useState(!1),[n,i]=w.useState({name:"",email:"",subject:"",message:""}),a=async o=>{o.preventDefault(),r(!0),await new Promise(s=>setTimeout(s,1500)),e({title:"Message sent!",description:"We'll get back to you within 24-48 hours."}),i({name:"",email:"",subject:"",message:""}),r(!1)};return c.jsxs("div",{className:"min-h-screen bg-background",children:[c.jsx(Gr,{}),c.jsx("main",{className:"pt-24 pb-16",children:c.jsxs("div",{className:"container mx-auto px-4 max-w-5xl",children:[c.jsxs("div",{className:"text-center mb-12",children:[c.jsx("h1",{className:"font-serif text-3xl md:text-4xl font-bold text-foreground mb-4",children:"Contact Us"}),c.jsx("p",{className:"text-muted-foreground text-lg max-w-xl mx-auto",children:"Have a question or need help? We're here for you. Send us a message and we'll respond as quickly as possible."})]}),c.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[c.jsxs("div",{className:"space-y-6",children:[c.jsx(re,{className:"bg-card border-border",children:c.jsxs(ie,{className:"p-6 flex items-start gap-4",children:[c.jsx("div",{className:"w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center flex-shrink-0",children:c.jsx(hf,{className:"h-6 w-6 text-primary"})}),c.jsxs("div",{children:[c.jsx("h3",{className:"font-semibold text-foreground mb-1",children:"Email Us"}),c.jsx("a",{href:"mailto:[email protected]",className:"text-primary hover:underline",children:"[email protected]"})]})]})}),c.jsx(re,{className:"bg-card border-border",children:c.jsxs(ie,{className:"p-6 flex items-start gap-4",children:[c.jsx("div",{className:"w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center flex-shrink-0",children:c.jsx(ds,{className:"h-6 w-6 text-primary"})}),c.jsxs("div",{children:[c.jsx("h3",{className:"font-semibold text-foreground mb-1",children:"Response Time"}),c.jsx("p",{className:"text-muted-foreground",children:"We typically respond within 24-48 hours"})]})]})}),c.jsx(re,{className:"bg-card border-border",children:c.jsxs(ie,{className:"p-6 flex items-start gap-4",children:[c.jsx("div",{className:"w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center flex-shrink-0",children:c.jsx(q6,{className:"h-6 w-6 text-primary"})}),c.jsxs("div",{children:[c.jsx("h3",{className:"font-semibold text-foreground mb-1",children:"Common Topics"}),c.jsxs("ul",{className:"text-sm text-muted-foreground space-y-1",children:[c.jsx("li",{children:"⢠Course access issues"}),c.jsx("li",{children:"⢠Refund requests"}),c.jsx("li",{children:"⢠Technical support"}),c.jsx("li",{children:"⢠Affiliate inquiries"})]})]})]})})]}),c.jsx("div",{className:"lg:col-span-2",children:c.jsx(re,{className:"bg-card border-border",children:c.jsx(ie,{className:"p-8",children:c.jsxs("form",{onSubmit:a,className:"space-y-6",children:[c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-6",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx(Me,{htmlFor:"name",children:"Your Name"}),c.jsx(ze,{id:"name",placeholder:"John Doe",value:n.name,onChange:o=>i({...n,name:o.target.value}),className:"bg-background",required:!0})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(Me,{htmlFor:"email",children:"Email Address"}),c.jsx(ze,{id:"email",type:"email",placeholder:"[email protected]",value:n.email,onChange:o=>i({...n,email:o.target.value}),className:"bg-background",required:!0})]})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(Me,{htmlFor:"subject",children:"Subject"}),c.jsx(ze,{id:"subject",placeholder:"How can we help?",value:n.subject,onChange:o=>i({...n,subject:o.target.value}),className:"bg-background",required:!0})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(Me,{htmlFor:"message",children:"Message"}),c.jsx(Ac,{id:"message",placeholder:"Tell us more about your question or concern...",value:n.message,onChange:o=>i({...n,message:o.target.value}),className:"bg-background min-h-[150px]",required:!0})]}),c.jsx(se,{type:"submit",variant:"hero",size:"lg",className:"gap-2",disabled:t,children:t?c.jsx(c.Fragment,{children:"Sending..."}):c.jsxs(c.Fragment,{children:[c.jsx(K6,{className:"h-4 w-4"}),"Send Message"]})})]})})})})]})]})}),c.jsx(xi,{})]})},pQ=()=>c.jsxs("div",{className:"min-h-screen bg-background",children:[c.jsx(Gr,{}),c.jsx("main",{className:"pt-24 pb-16",children:c.jsxs("div",{className:"container mx-auto px-4 max-w-3xl",children:[c.jsx("h1",{className:"font-serif text-3xl md:text-4xl font-bold text-foreground mb-8",children:"Terms of Use"}),c.jsxs("div",{className:"prose prose-lg text-muted-foreground space-y-6",children:[c.jsx("p",{children:"Last updated: January 23, 2026"}),c.jsxs("section",{children:[c.jsx("h2",{className:"text-xl font-semibold text-foreground mt-8 mb-4",children:"1. Acceptance of Terms"}),c.jsx("p",{children:"By accessing and using the 30-Day Sleep Solution website and program, you agree to be bound by these Terms of Use. If you do not agree to these terms, please do not use our services."})]}),c.jsxs("section",{children:[c.jsx("h2",{className:"text-xl font-semibold text-foreground mt-8 mb-4",children:"2. Use of the Program"}),c.jsx("p",{children:"The 30-Day Sleep Solution is a digital educational program designed to help improve your sleep habits. The content is for informational purposes only and is not intended to replace professional medical advice, diagnosis, or treatment."})]}),c.jsxs("section",{children:[c.jsx("h2",{className:"text-xl font-semibold text-foreground mt-8 mb-4",children:"3. Account and Access"}),c.jsx("p",{children:"Upon purchase, you will receive access to the program materials. You are responsible for maintaining the confidentiality of your account credentials. Sharing your account access with others is prohibited."})]}),c.jsxs("section",{children:[c.jsx("h2",{className:"text-xl font-semibold text-foreground mt-8 mb-4",children:"4. Intellectual Property"}),c.jsx("p",{children:"All content within the 30-Day Sleep Solution, including videos, audio files, PDFs, and written materials, is protected by copyright. You may not reproduce, distribute, or create derivative works without written permission."})]}),c.jsxs("section",{children:[c.jsx("h2",{className:"text-xl font-semibold text-foreground mt-8 mb-4",children:"5. Payment and Pricing"}),c.jsx("p",{children:"Prices are listed in USD and may change without notice. Payment is processed securely through Stripe. All purchases are subject to our refund policy."})]}),c.jsxs("section",{children:[c.jsx("h2",{className:"text-xl font-semibold text-foreground mt-8 mb-4",children:"6. Limitation of Liability"}),c.jsx("p",{children:'The 30-Day Sleep Solution is provided "as is" without warranties of any kind. We are not liable for any damages resulting from the use or inability to use our program.'})]}),c.jsxs("section",{children:[c.jsx("h2",{className:"text-xl font-semibold text-foreground mt-8 mb-4",children:"7.
492Changes to Terms"}),c.jsx("p",{children:"We reserve the right to modify these terms at any time. Continued use of the program after changes constitutes acceptance of the new terms."})]})]})]})}),c.jsx(xi,{})]}),mQ=()=>c.jsxs("div",{className:"min-h-screen bg-background",children:[c.jsx(Gr,{}),c.jsx("main",{className:"pt-24 pb-16",children:c.jsxs("div",{className:"container mx-auto px-4 max-w-3xl",children:[c.jsx("h1",{className:"font-serif text-3xl md:text-4xl font-bold text-foreground mb-8",children:"Privacy Policy"}),c.jsxs("div",{className:"prose prose-lg text-muted-foreground space-y-6",children:[c.jsx("p",{children:"Last updated: January 23, 2026"}),c.jsxs("section",{children:[c.jsx("h2",{className:"text-xl font-semibold text-foreground mt-8 mb-4",children:"1. Information We Collect"}),c.jsx("p",{children:"We collect information you provide directly to us, including your name, email address, and payment information when you purchase our program. We also collect usage data to improve our services."})]}),c.jsxs("section",{children:[c.jsx("h2",{className:"text-xl font-semibold text-foreground mt-8 mb-4",children:"2. How We Use Your Information"}),c.jsx("p",{children:"We use the information we collect to provide and maintain our services, process transactions, send you related information including purchase confirmations and updates, and communicate with you about products, services, and promotions."})]}),c.jsxs("section",{children:[c.jsx("h2",{className:"text-xl font-semibold text-foreground mt-8 mb-4",children:"3. Data Security"}),c.jsx("p",{children:"We implement appropriate security measures to protect your personal information. Payment processing is handled securely through Stripe, and we do not store your full payment card details on our servers."})]}),c.jsxs("section",{children:[c.jsx("h2",{className:"text-xl font-semibold text-foreground mt-8 mb-4",children:"4. Cookies and Tracking"}),c.jsx("p",{children:"We use cookies and similar tracking technologies to track activity on our website and improve your experience. You can instruct your browser to refuse all cookies or indicate when a cookie is being sent."})]}),c.jsxs("section",{children:[c.jsx("h2",{className:"text-xl font-semibold text-foreground mt-8 mb-4",children:"5. Third-Party Services"}),c.jsx("p",{children:"We may employ third-party companies and individuals to facilitate our service, including payment processors (Stripe), email services, and analytics providers. These third parties have access to your information only to perform specific tasks on our behalf."})]}),c.jsxs("section",{children:[c.jsx("h2",{className:"text-xl font-semibold text-foreground mt-8 mb-4",children:"6. Your Rights"}),c.jsx("p",{children:"You have the right to access, update, or delete your personal information. You can also opt out of marketing communications at any time by clicking the unsubscribe link in our emails."})]}),c.jsxs("section",{children:[c.jsx("h2",{className:"text-xl font-semibold text-foreground mt-8 mb-4",children:"7. Contact Us"}),c.jsx("p",{children:"If you have any questions about this Privacy Policy, please contact us at [email protected]."})]})]})]})}),c.jsx(xi,{})]}),gQ=()=>c.jsxs("div",{className:"min-h-screen bg-background",children:[c.jsx(Gr,{}),c.jsx("main",{className:"pt-24 pb-16",children:c.jsxs("div",{className:"container mx-auto px-4 max-w-3xl",children:[c.jsx("h1",{className:"font-serif text-3xl md:text-4xl font-bold text-foreground mb-8",children:"Refund Policy"}),c.jsx(re,{className:"bg-primary/5 border-primary/20 mb-8",children:c.jsxs(ie,{className:"p-6 flex items-center gap-4",children:[c.jsx("div",{className:"w-16 h-16 rounded-full bg-primary/10 flex items-center justify-center flex-shrink-0",children:c.jsx(pf,{className:"h-8 w-8 text-primary"})}),c.jsxs("div",{children:[c.jsx("h2",{className:"text-xl font-semibold text-foreground mb-1",children:"30-Day Money-Back Guarantee"}),c.jsx("p",{className:"text-muted-foreground",children:"We're confident you'll love the 30-Day Sleep Solution. If not, we'll give you a full refund."})]})]})}),c.jsxs("div",{className:"prose prose-lg text-muted-foreground space-y-6",children:[c.jsx("p",{children:"Last updated: January 23, 2026"}),c.jsxs("section",{children:[c.jsx("h2",{className:"text-xl font-semibold text-foreground mt-8 mb-4",children:"Our Promise"}),c.jsx("p",{children:"We believe in the quality of our program. If you're not completely satisfied with the 30-Day Sleep Solution for any reason, you can request a full refund within 30 days of your purchase dateâno questions asked."})]}),c.jsxs("section",{children:[c.jsx("h2",{className:"text-xl font-semibold text-foreground mt-8 mb-4",children:"How to Request a Refund"}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 my-6",children:[c.jsx(re,{className:"bg-card border-border",children:c.jsxs(ie,{className:"p-4 text-center",children:[c.jsx(hf,{className:"h-6 w-6 text-primary mx-auto mb-2"}),c.jsx("p",{className:"font-medium text-foreground text-sm",children:"Email us"}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"[email protected]"})]})}),c.jsx(re,{className:"bg-card border-border",children:c.jsxs(ie,{className:"p-4 text-center",children:[c.jsx(ds,{className:"h-6 w-6 text-primary mx-auto mb-2"}),c.jsx("p",{className:"font-medium text-foreground text-sm",children:"Within 30 days"}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Of purchase date"})]})}),c.jsx(re,{className:"bg-card border-border",children:c.jsxs(ie,{className:"p-4 text-center",children:[c.jsx(gr,{className:"h-6 w-6 text-primary mx-auto mb-2"}),c.jsx("p",{className:"font-medium text-foreground text-sm",children:"Refund processed"}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Within 5-7 business days"})]})})]}
492),c.jsx("p",{children:"Simply send an email to [email protected] with your purchase details and we'll process your refund promptly. No need to explain whyâwe respect your decision."})]}),c.jsxs("section",{children:[c.jsx("h2",{className:"text-xl font-semibold text-foreground mt-8 mb-4",children:"Refund Eligibility"}),c.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[c.jsx("li",{children:"Refund requests must be made within 30 days of the original purchase date"}),c.jsx("li",{children:"The refund will be issued to the original payment method"}),c.jsx("li",{children:"Each customer is eligible for one refund per product"}),c.jsx("li",{children:"Course access will be revoked upon refund processing"})]})]}),c.jsxs("section",{children:[c.jsx("h2",{className:"text-xl font-semibold text-foreground mt-8 mb-4",children:"Processing Time"}),c.jsx("p",{children:"Once we receive your refund request, we'll process it within 24-48 hours. The refund will appear in your account within 5-7 business days, depending on your bank or card issuer."})]}),c.jsxs("section",{children:[c.jsx("h2",{className:"text-xl font-semibold text-foreground mt-8 mb-4",children:"Questions?"}),c.jsx("p",{children:"If you have any questions about our refund policy, please don't hesitate to reach out to us at [email protected]. We're here to help!"})]})]})]})}),c.jsx(xi,{})]}),vQ=()=>{const{toast:e}=Vr(),[t,r]=w.useState(!1),[n,i]=w.useState({name:"",email:"",website:"",audience:"",message:""}),a=async s=>{s.preventDefault(),r(!0),await new Promise(l=>setTimeout(l,1500)),e({title:"Application submitted!",description:"We'll review your application and get back to you within 48 hours."}),i({name:"",email:"",website:"",audience:"",message:""}),r(!1)},o=[{icon:I2,title:"Generous Commissions",description:"Earn 30% commission on every sale you refer. That's $14+ per sale!"},{icon:og,title:"High Conversion Rates",description:"Our optimized sales page converts at 5%+, maximizing your earnings."},{icon:L6,title:"Marketing Materials",description:"Get access to banners, email swipes, and social media content."},{icon:ad,title:"Dedicated Support",description:"Our affiliate team is here to help you succeed with personalized tips."}];return c.jsxs("div",{className:"min-h-screen bg-background",children:[c.jsx(Gr,{}),c.jsx("main",{className:"pt-24 pb-16",children:c.jsxs("div",{className:"container mx-auto px-4",children:[c.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-16",children:[c.jsx("span",{className:"text-primary text-sm font-semibold tracking-wider uppercase",children:"Partner Program"}),c.jsx("h1",{className:"font-serif text-3xl md:text-4xl lg:text-5xl font-bold text-foreground mt-4 mb-6",children:"Become an Affiliate Partner"}),c.jsx("p",{className:"text-muted-foreground text-lg",children:"Earn money by helping others sleep better. Join our affiliate program and earn generous commissions for every sale you refer."})]}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-16",children:o.map((s,l)=>c.jsx(re,{className:"bg-card border-border",children:c.jsxs(ie,{className:"p-6",children:[c.jsx("div",{className:"w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center mb-4",children:c.jsx(s.icon,{className:"h-6 w-6 text-primary"})}),c.jsx("h3",{className:"font-semibold text-foreground mb-2",children:s.title}),c.jsx("p",{className:"text-sm text-muted-foreground",children:s.description})]})},l))}),c.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-12 max-w-6xl mx-auto",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"font-serif text-2xl font-bold text-foreground mb-6",children:"How It Works"}),c.jsx("div",{className:"space-y-6",children:[{step:1,title:"Apply",description:"Fill out the form and tell us about your audience."},{step:2,title:"Get Approved",description:"We review applications within 48 hours."},{step:3,title:"Promote",description:"Share your unique link with your audience."},{step:4,title:"Earn",description:"Get paid monthly for every sale you generate."}].map(s=>c.jsxs("div",{className:"flex items-start gap-4",children:[c.jsx("div",{className:"w-10 h-10 rounded-full bg-primary text-primary-foreground flex items-center justify-center font-bold flex-shrink-0",children:s.step}),c.jsxs("div",{children:[c.jsx("h4",{className:"font-semibold text-foreground",children:s.title}),c.jsx("p",{className:"text-muted-foreground",children:s.description})]})]},s.step))}),c.jsx(re,{className:"bg-primary/5 border-primary/20 mt-8",children:c.jsxs(ie,{className:"p-6",children:[c.jsx("h4",{className:"font-semibold text-foreground mb-2",children:"Commission Structure"}),c.jsxs("ul",{className:"space-y-2 text-sm text-muted-foreground",children:[c.jsxs("li",{className:"flex items-center gap-2",children:[c.jsx(gr,{className:"h-4 w-4 text-primary"}),"30% commission per sale ($14+ per referral)"]}),c.jsxs("li",{className:"flex items-center gap-2",children:[c.jsx(gr,{className:"h-4 w-4 text-primary"}),"30-day cookie duration"]}),c.jsxs("li",{className:"flex items-center gap-2",children:[c.jsx(gr,{className:"h-4 w-4 text-primary"}),"Monthly payouts via PayPal"]}),c.jsxs("li",{className:"flex items-center gap-2",children:[c.jsx(gr,{className:"h-4 w-4 text-primary"}),"No minimum payout threshold"]})]})]})})]}),c.jsxs(re,{className:"bg-card border-border",children:[c.jsx(ct,{children:c.jsx(ut,{children:"Apply Now"})}),c.jsx(ie,{children:c.jsxs("form",{onSubmit:a,className:"space-y-4",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx(Me,{htmlFor:"name",children:"Full Name"}),c.jsx(ze,{id:"name",placeholder:"Your name",value:n.name,onChange:s=>i({...n,name:s.target.value}),className:"bg-background",required:!0})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(Me,{htmlFor:"email",children:"Email Address"}),c.jsx(ze,{id:"email",type:"email",placeholder:"[email protected]",value:n.email,onChange:s=>i({...n,email:s.target.value}),className:"bg-background",required:!0})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(Me,{htmlFor:"website",children:"Website / Social Media"}),c.jsx(ze,{id:"website",placeholder:"https://yourwebsite.com or @handle",value:n.website,onChange:s=>i({...n,website:s.target.value}),className:"bg-background"})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(Me,{htmlFor:"audience",children:"Audience Size"}),c.jsx(ze,{id:"audience",placeholder:"e.g., 10,000 email subscribers",value:n.audience,onChange:s=>i({...n,audience:s.target.value}),className:"bg-background"})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(Me,{htmlFor:"message",children:"Tell us about yourself"}),c.jsx(Ac,{id:"message",placeholder:"Why would you be a great fit for our affiliate program?",value:n.message,onChange:s=>i({...n,message:s.target.value}),className:"bg-background min-h-[100px]"})]}),c.jsxs(se,{type:"submit",variant:"hero",className:"w-full gap-2",disabled:t,children:[t?"Submitting...":"Submit Application",c.jsx(T2,{className:"h-4 w-4"})]})]})})]})]})]})}),c.jsx(xi,{})]})},yQ=()=>{const{toast:e}=Vr(),{completedDays:t,progressPercentage:r,loading:n,startDate:i,updateStartDate:a,resetProgress:o,completeDay:s,getEntryForDay:l,daysCompleted:u,daysRemaining:d,currentStreak:f,avgSleepScore:h}=GM(),[p,g]=w.useState(null),[m,v]=w.useState(!1),x=P=>{g(P),v(!0)},y=()=>{v(!1),g(null)},b=async(P,N)=>{p&&(await s(p,P,N),e({title:"Day completed!",description:`Great job completing Day ${p}!`}))},_=()=>{if(!i){e({title:"Set a start date first",description:"Please select your course start date before exporting.",variant:"destructive"});return}JM(i),e({title:"Calendar exported!",description:"Your 30-day sleep calendar has been downloaded."})},S=async()=>{confirm("Are you sure you want to reset all your progress? This cannot be undone.")&&(await o(),e({title:"Progress reset",description:"Your course progress has been reset."}))},j=p?yd.find(P=>P.day===p):null,O=p?l(p):void 0;return n?c.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:c.jsx("div",{className:"animate-pulse text-muted-foreground",children:"Loading your course..."})}):c.jsxs("div",{className:"min-h-screen flex flex-col bg-background",children:[c.jsx(Gr,{}),c.jsxs("main",{className:"flex-1 pt-20",children:[c.jsx("section",{className:"py-8 px-4 bg-accent/30",children:c.jsxs("div",{className:"max-w-4xl mx-auto",children:[c.jsx("h2",{className:"text-xl font-semibold text-foreground mb-4 text-center",children:"Welcome to Your Sleep Journey"}),c.jsx("div",{className:"aspect-video bg-muted rounded-lg flex items-center justify-center border border-border",children:c.jsxs("div",{className:"text-center text-muted-foreground",children:[c.jsx(id,{className:"h-12 w-12 mx-auto mb-2 opacity-50"}),c.jsx("p",{children:"Welcome Video"}),c.jsx("p",{className:"text-sm",children:"(Video coming soon)"})]})})]})}),c.jsx("section",{className:"py-8 px-4",children:c.jsxs("div",{className:"max-w-6xl mx-auto text-center",children:[c.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[c.jsx(Dt,{className:"h-6 w-6 text-primary"}),c.jsx("h1",{className:"text-2xl md:text-3xl font-bold text-foreground",children:"30-Day Sleep Solution"})]}),c.jsx("p",{className:"text-muted-foreground mb-6",children:"Transform your sleep, transform your life"}),c.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-4 mb-8",children:[c.jsxs(VM,{children:[c.jsx(KM,{asChild:!0,children:c.jsxs(se,{variant:"outline",className:"gap-2",children:[c.jsx(M2,{className:"h-4 w-4"}),i?xt(i,"MMM d, yyyy"):"Set Start Date"]})}),c.jsx(NS,{className:"w-auto p-0",align:"center",children:c.jsx(OS,{mode:"single",selected:i||void 0,onSelect:P=>P&&a(P),initialFocus:!0,className:te("p-3 pointer-events-auto")})})]}),c.jsxs(se,{variant:"outline",onClick:_,className:"gap-2",children:[c.jsx(Il,{className:"h-4 w-4"}),"Export to Calendar"]}),c.jsxs(se,{variant:"ghost",onClick:S,className:"gap-2 text-muted-foreground",children:[c.jsx(F2,{className:"h-4 w-4"}),"Reset Progress"]})]}),c.jsxs("div",{className:"max-w-2xl mx-auto mb-6",children:[c.jsx(fS,{value:r,className:"h-3"}),c.jsxs("p",{className:"text-sm text-muted-foreground mt-2",children:[Math.round(r),"% Complete"]})]}),c.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 max-w-2xl mx-auto mb-8",children:[c.jsxs("div",{className:"bg-card rounded-lg p-4 border border-border",children:[c.jsx("div",{className:"text-2xl font-bold text-primary",children:u}),c.jsx("div",{className:"text-sm text-muted-foreground",children:"Days Completed"})]}),c.jsxs("div",{className:"bg-card rounded-lg p-4 border border-border",children:[c.jsx("div",{className:"text-2xl font-bold text-foreground",children:d}),c.jsx("div",{className:"text-sm text-muted-foreground",children:"Days Remaining"})]}),c.jsxs("div",{className:"bg-card rounded-lg p-4 border border-border",children:[c.jsx("div",{className:"text-2xl font-bold text-primary",children:f}),c.jsx("div",{className:"text-sm text-muted-foreground",children:"Current Streak"})]}),c.jsxs("div",{className:"bg-card rounded-lg p-4 border border-border",children:[c.jsx("div",{className:"text-2xl font-bold text-foreground",children:h!==null?h.toFixed(1):"â"}),c.jsx("div",{className:"text-sm text-muted-foreground",children:"Avg Sleep Score"})]})]})]})}),c.jsx("section",{className:"py-8 px-4 bg-accent/20",children:c.jsxs("div",{className:"max-w-6xl mx-auto",children:[c.jsx("h2",{className:"text-xl font-semibold text-foreground mb-6 text-center",children:"Your 30-Day Journey"}),c.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-5 md:grid-cols-6 gap-3",children:yd.map(P=>{const N=l(P.day);return c.jsx(ZM,{day:P.day,title:P.title,isCompleted:t.includes(P.day),sleepRating:(N==null?void 0:N.sleep_rating)??void 0,onClick:()=>x(P.day)},P.day)})})]})}),c.jsx("section",{className:"py-8 px-4",children:c.jsxs("div",{className:"max-w-4xl mx-auto",children:[c.jsx("h2",{className:"text-xl font-semibold text-foreground mb-6 text-center",children:"Resources & Worksheets"}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:XM.map((P,N)=>c.jsxs("div",{className:"bg-card rounded-lg p-4 border border-border flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("h3",{className:"font-medium text-foreground",children:P.title}),c.jsxs("p",{className:"text-sm text-muted-foreground",children:[P.type," ⢠",P.size]})]}),c.jsxs(se,{variant:"outline",size:"sm",className:"gap-2",children:[c.jsx(Il,{className:"h-4 w-4"}),"Download"]})]},N))})]})}),c.jsx("section",{className:"py-8 px-4 bg-accent/20",children:c.jsxs("div",{className:"max-w-4xl mx-auto",children:[c.jsx("h2",{className:"text-xl font-semibold text-foreground mb-6 text-center",children:"Meditation & Sleep Sounds"}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:QM.map((P,N)=>c.jsxs("div",{className:"bg-card rounded-lg p-4 border border-border flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("h3",{className:"font-medium text-foreground",children:P.title}),c.jsxs("p",{className:"text-sm text-muted-foreground",children:[P.category," ⢠",P.duration]})]}),c.jsxs(se,{variant:"outline",size:"sm",className:"gap-2",children:[c.jsx(id,{className:"h-4 w-4"}),"Play"]})]},N))})]})}),c.jsx("section",{className:"py-8 px-4",children:c.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[c.jsx("h2",{className:"text-xl font-semibold text-foreground mb-4",children:"Sleep Calculator"}),c.jsx("p",{className:"text-muted-foreground mb-4",children:"Find your optimal bedtime and wake time"}),c.jsx(Re,{to:"/calculator",children:c.jsxs(se,{variant:"outline",className:"gap-2",children:[c.jsx(R2,{className:"h-4 w-4"}),"Open Sleep Calculator"]})})]})})]}),c.jsx(xi,{}),c.jsx(yI,{isOpen:m,onClose:y,dayContent:j||null,isCompleted:p?t.includes(p):!1,existingRating:(O==null?void 0:O.sleep_rating)??void 0,existingNotes:(O==null?void 0:O.notes)??void 0,onComplete:b})]})},xQ=()=>{const{entries:e,loading:t,addEntry:r,avgSleep:n,avgQuality:i}=YM(),{toast:a}=Vr(),[o,s]=w.useState({bedtime:"",wakeTime:"",quality:4,notes:""}),[l,u]=w.useState(!1),[d,f]=w.useState(!1),h=async g=>{g.preventDefault(),f(!0);const{error:m}=await r({bedtime:o.bedtime,wake_time:o.wakeTime,quality_rating:o.quality,notes:o.notes});m?a({title:"Error",description:m.message,variant:"destructive"}):(a({title:"Sleep logged!",description:"Your sleep entry has been saved."}),s({bedtime:"",wakeTime:"",quality:4,notes:""}),u(!1)),f(!1)},p=g=>new Date(g).toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric"});return t?c.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:c.jsx("div",{className:"animate-pulse text-primary",children:"Loading..."})}):c.jsxs("div",{className:"min-h-screen bg-background",children:[c.jsx(Gr,{}),c.jsx("main",{className:"pt-24 pb-16",children:c.jsxs("div",{className:"container mx-auto px-4 max-w-5xl",children:[c.jsxs("div",{className:"flex items-center justify-between mb-8",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"font-serif text-3xl md:text-4xl font-bold text-foreground mb-2",children:"Sleep Tracker"}),c.jsx("p",{className:"text-muted-foreground",children:"Track your sleep patterns and see your progress over time."})]}),c.jsxs(se,{variant:"hero",className:"gap-2",onClick:()=>u(!l),children:[c.jsx(f0,{className:"h-4 w-4"}),"Log Sleep"]})]}),c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-6 mb-8",children:[c.jsx(re,{className:"bg-card border-border",children:c.jsxs(ie,{className:"p-6 flex items-center gap-4",children:[c.jsx("div",{className:"w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center",children:c.jsx(ds,{className:"h-6 w-6 text-primary"})}),c.jsxs("div",{children:[c.jsxs("p",{className:"text-2xl font-bold text-foreground",children:[n.toFixed(1),"h"]}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Avg. Sleep Time"})]})]})}),c.jsx(re,{className:"bg-card border-border",children:c.jsxs(ie,{className:"p-6 flex items-center gap-4",children:[c.jsx("div",{className:"w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center",children:c.jsx(cl,{className:"h-6 w-6 text-primary"})}),c.jsxs("div",{children:[c.jsxs("p",{className:"text-2xl font-bold text-foreground",children:[i.toFixed
492(1),"/5"]}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Avg. Quality"})]})]})}),c.jsx(re,{className:"bg-card border-border",children:c.jsxs(ie,{className:"p-6 flex items-center gap-4",children:[c.jsx("div",{className:"w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center",children:c.jsx(og,{className:"h-6 w-6 text-primary"})}),c.jsxs("div",{children:[c.jsx("p",{className:"text-2xl font-bold text-foreground",children:e.length}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Total Entries"})]})]})})]}),l&&c.jsxs(re,{className:"bg-card border-primary/30 mb-8",children:[c.jsx(ct,{children:c.jsx(ut,{children:"Log Your Sleep"})}),c.jsx(ie,{children:c.jsxs("form",{onSubmit:h,className:"space-y-6",children:[c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-6",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsxs(Me,{htmlFor:"bedtime",className:"flex items-center gap-2",children:[c.jsx(Dt,{className:"h-4 w-4 text-primary"}),"Bedtime"]}),c.jsx(ze,{id:"bedtime",type:"time",value:o.bedtime,onChange:g=>s({...o,bedtime:g.target.value}),required:!0,className:"bg-background"})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsxs(Me,{htmlFor:"wakeTime",className:"flex items-center gap-2",children:[c.jsx(U2,{className:"h-4 w-4 text-primary"}),"Wake Time"]}),c.jsx(ze,{id:"wakeTime",type:"time",value:o.wakeTime,onChange:g=>s({...o,wakeTime:g.target.value}),required:!0,className:"bg-background"})]})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(Me,{children:"Sleep Quality"}),c.jsx("div",{className:"flex gap-2",children:[1,2,3,4,5].map(g=>c.jsx("button",{type:"button",onClick:()=>s({...o,quality:g}),className:`w-10 h-10 rounded-full flex items-center justify-center transition-all ${o.quality>=g?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:c.jsx(cl,{className:`h-5 w-5 ${o.quality>=g?"fill-current":""}`})},g))})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(Me,{htmlFor:"notes",children:"Notes (optional)"}),c.jsx(Ac,{id:"notes",placeholder:"How did you sleep? Any factors that affected your rest?",value:o.notes,onChange:g=>s({...o,notes:g.target.value}),className:"bg-background"})]}),c.jsxs("div",{className:"flex gap-3",children:[c.jsx(se,{type:"submit",variant:"hero",disabled:d,children:d?"Saving...":"Save Entry"}),c.jsx(se,{type:"button",variant:"outline",onClick:()=>u(!1),children:"Cancel"})]})]})})]}),c.jsxs(re,{className:"bg-card border-border",children:[c.jsx(ct,{children:c.jsx(ut,{children:"Sleep History"})}),c.jsx(ie,{children:e.length>0?c.jsx("div",{className:"space-y-4",children:e.map(g=>{var m;return c.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between p-4 rounded-lg bg-background border border-border",children:[c.jsxs("div",{className:"flex items-center gap-4 mb-3 sm:mb-0",children:[c.jsx("div",{className:"w-12 h-12 rounded-lg bg-primary/10 flex items-center justify-center",children:c.jsx(Dt,{className:"h-6 w-6 text-primary"})}),c.jsxs("div",{children:[c.jsx("p",{className:"font-medium text-foreground",children:p(g.entry_date)}),c.jsxs("p",{className:"text-sm text-muted-foreground",children:[g.bedtime," â ",g.wake_time]})]})]}),c.jsxs("div",{className:"flex items-center gap-6",children:[c.jsxs("div",{className:"text-center",children:[c.jsxs("p",{className:"text-lg font-bold text-foreground",children:[(m=g.total_sleep_hours)==null?void 0:m.toFixed(1),"h"]}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Sleep"})]}),c.jsx("div",{className:"flex items-center gap-1",children:[...Array(5)].map((v,x)=>c.jsx(cl,{className:`h-4 w-4 ${x<(g.quality_rating||0)?"text-primary fill-primary":"text-muted-foreground"}`},x))})]})]},g.id)})}):c.jsxs("div",{className:"text-center py-12 text-muted-foreground",children:[c.jsx(Dt,{className:"h-12 w-12 mx-auto mb-4 opacity-50"}),c.jsx("p",{className:"font-medium",children:"No sleep entries yet"}),c.jsx("p",{className:"text-sm",children:'Click "Log Sleep" to start tracking your rest.'})]})})]})]})}),c.jsx(xi,{})]})},bQ=()=>{const[e,t]=w.useState("07:00"),[r,n]=w.useState([]),i=()=>{const[o,s]=e.split(":").map(Number),l=new Date;l.setHours(o,s,0,0);
492const u=[6,5,4,3],d=15,f=u.map(h=>{const p=h*90+d;return new Date(l.getTime()-p*60*1e3).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})});n(f)},a=[{cycles:6,hours:"9 hours",recommendation:"Ideal for most adults"},{cycles:5,hours:"7.5 hours",recommendation:"Good for most adults"},{cycles:4,hours:"6 hours",recommendation:"Minimum for adults"},{cycles:3,hours:"4.5 hours",recommendation:"Emergency only"}];return c.jsxs("div",{className:"min-h-screen bg-background",children:[c.jsx(Gr,{}),c.jsx("main",{className:"pt-24 pb-16",children:c.jsxs("div",{className:"container mx-auto px-4 max-w-3xl",children:[c.jsxs("div",{className:"text-center mb-12",children:[c.jsx("div",{className:"w-16 h-16 rounded-full bg-primary/10 flex items-center justify-center mx-auto mb-6",children:c.jsx(R2,{className:"h-8 w-8 text-primary"})}),c.jsx("h1",{className:"font-serif text-3xl md:text-4xl font-bold text-foreground mb-4",children:"Sleep Calculator"}),c.jsx("p",{className:"text-muted-foreground text-lg max-w-xl mx-auto",children:"Find your ideal bedtime based on sleep cycles. Enter when you need to wake up, and we'll calculate the best times to fall asleep."})]}),c.jsx(re,{className:"bg-card border-border mb-8",children:c.jsx(ie,{className:"p-8",children:c.jsxs("div",{className:"flex flex-col sm:flex-row gap-6 items-end",children:[c.jsxs("div",{className:"flex-1 space-y-2",children:[c.jsxs(Me,{htmlFor:"wakeTime",className:"flex items-center gap-2",children:[c.jsx(U2,{className:"h-4 w-4 text-primary"}),"I need to wake up at:"]}),c.jsx(ze,{id:"wakeTime",type:"time",value:e,onChange:o=>t(o.target.value),className:"bg-background text-lg h-12"})]}),c.jsxs(se,{variant:"hero",size:"lg",onClick:i,className:"gap-2",children:[c.jsx(Dt,{className:"h-4 w-4"}),"Calculate Bedtimes"]})]})})}),r.length>0&&c.jsxs(re,{className:"bg-card border-primary/30 mb-8",children:[c.jsx(ct,{children:c.jsxs(ut,{className:"flex items-center gap-2",children:[c.jsx(ds,{className:"h-5 w-5 text-primary"}),"Recommended Bedtimes"]})}),c.jsxs(ie,{children:[c.jsxs("p",{className:"text-muted-foreground mb-6",children:["To wake up at ",e,", try going to bed at one of these times:"]}),c.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:r.map((o,s)=>c.jsxs("div",{className:`p-4 rounded-lg text-center transition-colors ${s===1?"bg-primary text-primary-foreground ring-2 ring-primary ring-offset-2 ring-offset-background":"bg-background border border-border"}`,children:[c.jsx("p",{className:`text-2xl font-bold ${s===1?"":"text-foreground"}`,children:o}),c.jsx("p",{className:`text-sm mt-1 ${s===1?"text-primary-foreground/80":"text-muted-foreground"}`,children:a[s].hours}),s===1&&c.jsx("span",{className:"inline-block mt-2 text-xs bg-primary-foreground/20 px-2 py-0.5 rounded-full",children:"Recommended"})]},s))})]})]}),c.jsx(re,{className:"bg-primary/5 border-primary/20",children:c.jsx(ie,{className:"p-6",children:c.jsxs("div",{className:"flex items-start gap-4",children:[c.jsx(U6,{className:"h-6 w-6 text-primary flex-shrink-0 mt-1"}),c.jsxs("div",{children:[c.jsx("h3",{className:"font-semibold text-foreground mb-2",children:"How It Works"}),c.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed mb-4",children:"Sleep occurs in cycles of approximately 90 minutes. Waking up at the end of a complete cycle helps you feel more refreshed. This calculator factors in an average of 15 minutes to fall asleep."}),c.jsx("div",{className:"grid grid-cols-2 gap-4 text-sm",children:a.map((o,s)=>c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("div",{className:"w-2 h-2 rounded-full bg-primary"}),c.jsxs("span",{className:"text-muted-foreground",children:[o.cycles," cycles = ",o.hours]})]},s))})]})]})})})]})}),c.jsx(xi,{})]})},wQ=()=>{var m,v;const[e,t]=w.useState(""),[r,n]=w.useState(""),[i,a]=w.useState(!1),{signIn:o}=qn(),{isAdmin:s,loading:l,user:u}=uR(),d=Ji(),f=Kr(),{toast:h}=Vr(),p=((v=(m=f.state)==null?void 0:m.from)==null?void 0:v.pathname)||"/admin";w.useEffect(()=>{!l&&u&&s&&d(p,{replace:!0})},[l,u,s,d,p]);const g=async x=>{x.preventDefault(),a(!0);try{const{error:y}=await o(e,r);if(y){h({title:"Login failed",description:y.message,variant:"destructive"});return}}catch{h({title:"Login failed",description:"An unexpected error occurred",variant:"destructive"})}finally{a(!1)}};return l?c.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:c.jsx(lr,{className:"h-8 w-8 animate-spin text-primary"})}):c.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center p-4",children:c.jsxs(re,{className:"w-full max-w-md",children:[c.jsxs(ct,{className:"text-center",children:[c.jsx("div",{className:"flex justify-center mb-4",children:c.jsx("div",{className:"h-16 w-16 rounded-full bg-primary/10 flex items-center justify-center",children:c.jsx(Dt,{className:"h-8 w-8 text-primary"})})}),c.jsx(ut,{className:"text-2xl font-bold",children:"Admin Login"}),c.jsx(Ng,{children:"Sign in to access the admin dashboard"})]}),c.jsx(ie,{children:c.jsxs("form",{onSubmit:g,className:"space-y-4",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx(Me,{htmlFor:"email",children:"Email"}
492),c.jsx(ze,{id:"email",type:"email",value:e,onChange:x=>t(x.target.value),placeholder:"[email protected]",required:!0})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(Me,{htmlFor:"password",children:"Password"}),c.jsx(ze,{id:"password",type:"password",value:r,onChange:x=>n(x.target.value),placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",required:!0})]}),c.jsx(se,{type:"submit",className:"w-full",disabled:i,children:i?c.jsxs(c.Fragment,{children:[c.jsx(lr,{className:"h-4 w-4 mr-2 animate-spin"}),"Signing in..."]}):c.jsxs(c.Fragment,{children:[c.jsx(pf,{className:"h-4 w-4 mr-2"}),"Sign In"]})})]})})]})})},SQ=[{href:"/admin",label:"Dashboard",icon:z6},{href:"/admin/users",label:"Users",icon:ad},{href:"/admin/orders",label:"Orders",icon:xp},{href:"/admin/refunds",label:"Refunds",icon:h0},{href:"/admin/coupons",label:"Coupons",icon:bp},{href:"/admin/analytics",label:"Analytics",icon:A6}],_Q=()=>{const e=Kr(),{signOut:t}=qn(),r=async()=>{await t(),window.location.href="/admin/login"};return c.jsxs("aside",{className:"w-64 min-h-screen bg-card border-r border-border flex flex-col",children:[c.jsx("div",{className:"p-6 border-b border-border",children:c.jsxs(Re,{to:"/admin",className:"flex items-center gap-2",children:[c.jsx(Dt,{className:"h-8 w-8 text-primary"}),c.jsxs("div",{children:[c.jsx("span",{className:"font-serif font-bold text-foreground",children:"Admin"}),c.jsx("span",{className:"block text-xs text-muted-foreground",children:"30-Day Sleep"})]})]})}),c.jsx("nav",{className:"flex-1 p-4 space-y-1",children:SQ.map(n=>{const i=e.pathname===n.href||n.href!=="/admin"&&e.pathname.startsWith(n.href);return c.jsxs(Re,{to:n.href,className:te("flex items-center gap-3 px-4 py-3 rounded-lg transition-colors",i?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground"),children:[c.jsx(n.icon,{className:"h-5 w-5"}),c.jsx("span",{className:"font-medium",children:n.label})]},n.href)})}),c.jsx("div",{className:"p-4 border-t border-border",children:c.jsxs(se,{variant:"ghost",className:"w-full justify-start gap-3 text-muted-foreground hover:text-foreground",onClick:r,children:[c.jsx(d0,{className:"h-5 w-5"}),"Sign Out"]})})]})},Hn=({children:e,title:t,description:r})=>c.jsxs("div",{className:"min-h-screen bg-background flex",children:[c.jsx(_Q,{}),c.jsxs("main",{className:"flex-1 p-8",children:[c.jsxs("div",{className:"mb-8",children:[c.jsx("h1",{className:"text-3xl font-bold text-foreground",children:t}),r&&c.jsx("p",{className:"text-muted-foreground mt-1",children:r})]}),e]})]}),da=({title:e,value:t,icon:r,description:n,trend:i,className:a})=>c.jsx(re,{className:te("bg-card",a),children:c.jsx(ie,{className:"p-6",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsx("p",{className:"text-sm text-muted-foreground",children:e}),c.jsx("p",{className:"text-2xl font-bold text-foreground",children:t}),n&&c.jsx("p",{className:"text-xs text-muted-foreground",children:n}),i&&c.jsxs("p",{className:te("text-xs font-medium",i.isPositive?"text-green-500":"text-red-500"),children:[i.isPositive?"+":"-",Math.abs(i.value),"% from last month"]})]}),c.jsx("div",{className:"h-12 w-12 rounded-full bg-primary/10 flex items-center justify-center",children:c.jsx(r,{className:"h-6 w-6 text-primary"})})]})})});function Aa({className:e,...t}){return c.jsx("div",{className:te("animate-pulse rounded-md bg-muted",e),...t})}const jQ=()=>{var v,x,y,b,_,S;const[e,t]=w.useState(null),[r,n]=w.useState(null),[i,a]=w.useState([]),[o,s]=w.useState([]),[l,u]=w.useState(!0),[d,f]=w.useState(!0);w.useEffect(()=>{h(),p()},[]);const h=async()=>{try{const{data:j,error:O}=await Ee.from("purchases").select("*").order("created_at",{ascending:!1});if(O)throw O;const P=j||[],N=P.filter(R=>R.status==="completed").reduce((R,I)=>R+(I.amount||0),0)/100,A=P.filter(R=>R.status==="completed").length,C=P.filter(R=>R.refund_status==="requested"||R.refund_status==="pending").length,T=P.filter(R=>R.coupon_code).length,L=A>0?N/A:0;t({totalRevenue:N,totalOrders:A,pendingRefunds:C,couponUsage:T,averageOrderValue:L}),s(P.slice(0,5))}catch(j){console.error("Error fetching dashboard data:",j)}finally{u(!1)}},p=async()=>{try{const{data:j,error:O}=await Ee.functions.invoke("admin-users",{body:{action:"activity"}});if(O)throw O;a(j.activities||[]),n(j.stats||null)}catch(j){console.error("Error fetching activity feed:",j)}finally{f(!1)}},g=j=>{switch(j){case"signup":return c.jsx(fO,{className:"h-4 w-4 text-blue-500"});case"purchase":return c.jsx(xp,{className:"h-4 w-4 text-green-500"});case"refund_request":return c.jsx(h0,{className:"h-4 w-4 text-orange-500"});case"course_progress":return c.jsx(Ml,{className:"h-4 w-4 text-purple-500"});default:return c.jsx(dO,{className:"h-4 w-4"})}},m=j=>{var O,P,N;switch(j.type){case"signup":return`New signup: ${j.email}`;case"purchase":const A=(O=j.details)!=null&&O.amount?`$${(j.details.amount/100).toFixed(2)}`:"",C=(P=j.details)!=null&&P.coupon?` (used ${j.details.coupon})`:"";return`Purchase: ${j.email} - ${A}${C}`;case"refund_request":return`Refund requested: ${j.email}`;case"course_progress":return`${j.email} completed Day ${(N=j.details)==null?void 0:N.day}`;default:return`Activity: ${j.email}`}};return l?c.jsx(Hn,{title:"Dashboard",description:"Overview of your business",children:c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:[...Array(8)].map((j,O)=>c.jsx(Aa,{className:"h-32"},O))})}):c.jsxs(Hn,{title:"Dashboard",description:"God's eye view of your sleep course business",children:[c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-6",children:[c.jsx(da,{title:"Total Revenue",value:`$${((v
492=e==null?void 0:e.totalRevenue)==null?void 0:v.toLocaleString())||0}`,icon:I2,description:"All-time revenue"}),c.jsx(da,{title:"Total Users",value:((x=r==null?void 0:r.totalUsers)==null?void 0:x.toString())||"-",icon:ad,description:`${(r==null?void 0:r.totalPurchased)||0} purchased`}),c.jsx(da,{title:"Conversion Rate",value:`${(r==null?void 0:r.conversionRate)||0}%`,icon:og,description:"Users who purchased"}),c.jsx(da,{title:"Active Learners",value:((y=r==null?void 0:r.activeUsers)==null?void 0:y.toString())||"-",icon:Ml,description:"Last 7 days"})]}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4 mb-6",children:[c.jsx(da,{title:"Today's Signups",value:((b=r==null?void 0:r.todaySignups)==null?void 0:b.toString())||"0",icon:fO,description:"New registrations"}),c.jsx(da,{title:"Today's Revenue",value:`$${(((r==null?void 0:r.todayRevenue)||0)/100).toFixed(2)}`,icon:k6,description:"Today's earnings"}),c.jsx(da,{title:"Pending Refunds",value:((_=e==null?void 0:e.pendingRefunds)==null?void 0:_.toString())||"0",icon:h0,description:"Awaiting review"}),c.jsx(da,{title:"Coupon Usage",value:((S=e==null?void 0:e.couponUsage)==null?void 0:S.toString())||"0",icon:bp,description:"Orders with coupons"})]}),c.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[c.jsxs(re,{children:[c.jsx(ct,{children:c.jsxs(ut,{className:"flex items-center gap-2",children:[c.jsx(dO,{className:"h-5 w-5"}),"Live Activity Feed"]})}),c.jsx(ie,{children:d?c.jsx("div",{className:"flex items-center justify-center py-8",children:c.jsx(lr,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):i.length>0?c.jsx("div",{className:"space-y-3 max-h-[400px] overflow-y-auto",children:i.slice(0,15).map((j,O)=>c.jsxs("div",{className:"flex items-start gap-3 p-2 rounded-lg hover:bg-muted/50 transition-colors",children:[c.jsx("div",{className:"mt-0.5",children:g(j.type)}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("p",{className:"text-sm truncate",children:m(j)}),c.jsx("p",{className:"text-xs text-muted-foreground",children:PG(new Date(j.timestamp),{addSuffix:!0})})]})]},O))}):c.jsx("p",{className:"text-center text-muted-foreground py-8",children:"No recent activity in the last 24 hours"})})]}),c.jsxs(re,{children:[c.jsx(ct,{children:c.jsxs(ut,{className:"flex items-center gap-2",children:[c.jsx(xp,{className:"h-5 w-5"}),"Recent Orders"]})}),c.jsx(ie,{children:o.length===0?c.jsx("p",{className:"text-muted-foreground text-center py-8",children:"No orders yet"}):c.jsx("div",{className:"overflow-x-auto",children:c.jsxs("table",{className:"w-full",children:[c.jsx("thead",{children:c.jsxs("tr",{className:"border-b border-border",children:[c.jsx("th",{className:"text-left py-3 px-2 text-sm font-medium text-muted-foreground",children:"Customer"}),c.jsx("th",{className:"text-left py-3 px-2 text-sm font-medium text-muted-foreground",children:"Amount"}),c.jsx("th",{className:"text-left py-3 px-2 text-sm font-medium text-muted-foreground",children:"Coupon"}),c.jsx("th",{className:"text-left py-3 px-2 text-sm font-medium text-muted-foreground",children:"Date"})]})}),c.jsx("tbody",{children:o.map(j=>c.jsxs("tr",{className:"border-b border-border last:border-0",children:[c.jsx("td",{className:"py-3 px-2 text-sm text-foreground truncate max-w-[150px]",children:j.customer_email||"Guest"}),c.jsxs("td",{className:"py-3 px-2 text-sm text-foreground",children:["$",((j.amount||0)/100).toFixed(2)]}),c.jsx("td",{className:"py-3 px-2",children:j.coupon_code?c.jsx(Ai,{variant:"outline",className:"text-xs",children:j.coupon_code}):c.jsx("span",{className:"text-muted-foreground",children:"-"})}),c.jsx("td",{className:"py-3 px-2 text-sm text-muted-foreground",children:xt(new Date(j.created_at),"MMM d")})]},j.id))})]})})})]})]})]})},$S=w.forwardRef(({className:e,...t},r)=>c.jsx("div",{className:"relative w-full overflow-auto",children:c.jsx("table",{ref:r,className:te("w-full caption-bottom text-sm",e),...t})}));$S.displayName="Table";const RS=w.forwardRef(({className:e,...t},r)=>c.jsx("thead",{ref:r,className:te("[&_tr]:border-b",e),...t}));RS.displayName="TableHeader";const MS=w.forwardRef(({className:e,...t},r)=>c.jsx("tbody",{ref:r,className:te("[&_tr:last-child]:border-0",e),...t}));MS.displayName="TableBody";const OQ=w.forwardRef(({className:e,...t},r)=>c.jsx("tfoot",{ref:r,className:te("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));OQ.displayName="TableFooter";const ml=w.forwardRef(({className:e,...t},r)=>c.jsx("tr",{ref:r,className:te("border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50",e),...t}));ml.displayName="TableRow";const en=w.forwardRef(({className:e,...t},r)=>c.jsx("th",{ref:r,className:te("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));en.displayName="TableHead";const Cr=w.forwardRef(({className:e,...t},r)=>c.jsx("td",{ref:r,className:te("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));Cr.displayName="TableCell";const PQ=w.forwardRef(({className:e,...t},r)=>c.jsx("caption",{ref:r,className:te("mt-4 text-sm text-muted-foreground",e),...t}));PQ.displayName="TableCaption";var NQ=[" ","Enter","ArrowUp","ArrowDown"],EQ=[" ","Enter"],es="Select",[Ig,Dg,kQ]=rg(es),[Tc,iOe]=fn(es,[kQ,Oc]),Lg=Oc(),[AQ,Za]=Tc(es),[CQ,TQ]=Tc(es),NI=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:l,dir:u,name:d,autoComplete:f,disabled:h,required:p,form:g}=e,m=Lg(t),[v,x]=w.useState(null),[y,b]=w.useState(null),[_,S]=w.useState(!1),j=oS(u),[O,P]=fi({prop:n,defaultProp:i??!1,onChange:a,caller:es}),[N,A]=fi({prop:o,defaultProp:s,onChange:l,caller:es}),C=w.useRef(null),T=v?g||!!v.closest("form"):!0,[L,R]=w.useState(new Set),I=Array.from(L).map(D=>D.props.value).join(";");return c.jsx(x$,{...m,children:c.jsxs(AQ,{required:p,scope:t,trigger:v,onTriggerChange:x,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:_,onValueNodeHasChildrenChange:S,contentId:Li(),value:N,onValueChange:A,open:O,onOpenChange:P,dir:j,triggerPointerDownPosRef:C,disabled:h,children:[c.jsx(Ig.Provider,{scope:t,children:c.jsx(CQ,{scope:e.__scopeSelect,onNativeOptionAdd:w.useCallback(D=>{R($=>new Set($).add(D))},[]),onNativeOptionRemove:w.useCallback(D=>{R($=>{const E=new Set($);return E.delete(D),E})},[]),children:r})}),T?c.jsxs(QI,{"aria-hidden":!0,required:p,tabIndex:-1,name:d,autoComplete:f,value:N,onChange:D=>A(D.target.value),disabled:h,form:g,children:[N===void 0?c.jsx("option",{value:""}):null,Array.from(L)]},I):null]})})};NI.displayName=es;var EI="SelectTrigger",kI=w.forwardRef((e,t)=>
vendor: 16,729 bytes, line 492
492{const{__scopeSelect:r,disabled:n=!1,...i}=e,a=Lg(r),o=Za(EI,r),s=o.disabled||n,l=Oe(t,o.onTriggerChange),u=Dg(r),d=w.useRef("touch"),[f,h,p]=ZI(m=>{const v=u().filter(b=>!b.disabled),x=v.find(b=>b.value===o.value),y=eD(v,m,x);y!==void 0&&o.onValueChange(y.value)}),g=m=>{s||(o.onOpenChange(!0),p()),m&&(o.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return c.jsx(dg,{asChild:!0,...a,children:c.jsx(ce.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":JI(o.value)?"":void 0,...i,ref:l,onClick:oe(i.onClick,m=>{m.currentTarget.focus(),d.current!=="mouse"&&g(m)}),onPointerDown:oe(i.onPointerDown,m=>{d.current=m.pointerType;const v=m.target;v.hasPointerCapture(m.pointerId)&&v.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(g(m),m.preventDefault())}),onKeyDown:oe(i.onKeyDown,m=>{const v=f.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(v&&m.key===" ")&&NQ.includes(m.key)&&(g(),m.preventDefault())})})})});kI.displayName=EI;var AI="SelectValue",CI=w.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:i,children:a,placeholder:o="",...s}=e,l=Za(AI,r),{onValueNodeHasChildrenChange:u}=l,d=a!==void 0,f=Oe(t,l.onValueNodeChange);return Lt(()=>{u(d)},[u,d]),c.jsx(ce.span,{...s,ref:f,style:{pointerEvents:"none"},children:JI(l.value)?c.jsx(c.Fragment,{children:o}):a})});CI.displayName=AI;var $Q="SelectIcon",TI=w.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...i}=e;return c.jsx(ce.span,{"aria-hidden":!0,...i,ref:t,children:n||"â¼"})});TI.displayName=$Q;var RQ="SelectPortal",$I=e=>c.jsx(uf,{asChild:!0,...e});$I.displayName=RQ;var ts="SelectContent",RI=w.forwardRef((e,t)=>{const r=Za(ts,e.__scopeSelect),[n,i]=w.useState();if(Lt(()=>{i(new DocumentFragment)},[]),!r.open){const a=n;return a?us.createPortal(c.jsx(MI,{scope:e.__scopeSelect,children:c.jsx(Ig.Slot,{scope:e.__scopeSelect,children:c.jsx("div",{children:e.children})})}),a):null}return c.jsx(II,{...e,ref:t})});RI.displayName=ts;var _n=10,[MI,eo]=Tc(ts),MQ="SelectContentImpl",IQ=Vo("SelectContent.RemoveScroll"),II=w.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:p,sticky:g,hideWhenDetached:m,avoidCollisions:v,...x}=e,y=Za(ts,r),[b,_]=w.useState(null),[S,j]=w.useState(null),O=Oe(t,Y=>_(Y)),[P,N]=w.useState(null),[A,C]=w.useState(null),T=Dg(r),[L,R]=w.useState(!1),I=w.useRef(!1);w.useEffect(()=>{if(b)return Z1(b)},[b]),J1();const D=w.useCallback(Y=>{const[ye,...q]=T().map(B=>B.ref.current),[Q]=q.slice(-1),X=document.activeElement;for(const B of Y)if(B===X||(B==null||B.scrollIntoView({block:"nearest"}),B===ye&&S&&(S.scrollTop=0),B===Q&&S&&(S.scrollTop=S.scrollHeight),B==null||B.focus(),document.activeElement!==X))return},[T,S]),$=w.useCallback(()=>D([P,b]),[D,P,b]);w.useEffect(()=>{L&&$()},[L,$]);const{onOpenChange:E,triggerPointerDownPosRef:M}=y;w.useEffect(()=>{if(b){let Y={x:0,y:0};const ye=Q=>{var X,B;Y={x:Math.abs(Math.round(Q.pageX)-(((X=M.current)==null?void 0:X.x)??0)),y:Math.abs(Math.round(Q.pageY)-(((B=M.current)==null?void 0:B.y)??0))}},q=Q=>{Y.x<=10&&Y.y<=10?Q.preventDefault():b.contains(Q.target)||E(!1),document.removeEventListener("pointermove",ye),M.current=null};return M.current!==null&&(document.addEventListener("pointermove",ye),document.addEventListener("pointerup",q,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ye),document.removeEventListener("pointerup",q,{capture:!0})}}},[b,E,M]),w.useEffect(()=>{const Y=()=>E(!1);return window.addEventListener("blur",Y),window.addEventListener("resize",Y),()=>{window.removeEventListener("blur",Y),window.removeEventListener("resize",Y)}},[E]);const[F,H]=ZI(Y=>{const ye=T().filter(X=>!X.disabled),q=ye.find(X=>X.ref.current===document.activeElement),Q=eD(ye,Y,q);Q&&setTimeout(()=>Q.ref.current.focus())}),U=w.useCallback((Y,ye,q)=>{const Q=!I.current&&!q;(y.value!==void 0&&y.value===ye||Q)&&(N(Y),Q&&(I.current=!0))},[y.value]),K=w.useCallback(()=>b==null?void 0:b.focus(),[b]),J=w.useCallback((Y,ye,q)=>{const Q=!I.current&&!q;(y.value!==void 0&&y.value===ye||Q)&&C(Y)},[y.value]),he=n==="popper"?K0:DI,Ne=he===K0?{side:s,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:p,sticky:g,hideWhenDetached:m,avoidCollisions:v}:{};return c.jsx(MI,{scope:r,content:b,viewport:S,onViewportChange:j,itemRefCallback:U,selectedItem:P,onItemLeave:K,itemTextRefCallback:J,focusSelectedItem:$,selectedItemText:A,position:n,isPositioned:L,searchRef:F,children:c.jsx(wg,{as:IQ,allowPinchZoom:!0,children:c.jsx(xg,{asChild:!0,trapped:y.open,onMountAutoFocus:Y=>{Y.preventDefault()},onUnmountAutoFocus:oe(i,Y=>{var ye;(ye=y.trigger)==null||ye.focus({preventScroll:!0}),Y.preventDefault()}),children:c.jsx(wc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:Y=>Y.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:c.jsx(he,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:Y=>Y.preventDefault(),...x,...Ne,onPlaced:()=>R(!0),ref:O,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:oe(x.onKeyDown,Y=>{const ye=Y.ctrlKey||Y.altKey||Y.metaKey;if(Y.key==="Tab"&&Y.preventDefault(),!ye&&Y.key.length===1&&H(Y.key),["ArrowUp","ArrowDown","Home","End"].includes(Y.key)){let Q=T().filter(X=>!X.disabled).map(X=>X.ref.current);if(["ArrowUp","End"].includes(Y.key)&&(Q=Q.slice().reverse()),["ArrowUp","ArrowDown"].includes(Y.key)){const X=Y.target,B=Q.indexOf(X);Q=Q.slice(B+1)}setTimeout(()=>D(Q)),Y.preventDefault()}})})})})})})});II.displayName=MQ;var DQ="SelectItemAlignedPosition",DI=w.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...i}=e,a=Za(ts,r),o=eo(ts,r),[s,l]=w.useState(null),[u,d]=w.useState(null),f=Oe(t,O=>d(O)),h=Dg(r),p=w.useRef(!1),g=w.useRef(!0),{viewport:m,selectedItem:v,selectedItemText:x,focusSelectedItem:y}=o,b=w.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&u&&m&&v&&x){const O=a.trigger.getBoundingClientRect(),P=u.getBoundingClientRect(),N=a.valueNode.getBoundingClientRect(),A=x.getBoundingClientRect();if(a.dir!=="rtl"){const X=A.left-P.left,B=N.left-X,je=O.left-B,ge=O.width+je,He=Math.max(ge,P.width),Be=window.innerWidth-_n,ht=Mp(B,[_n,Math.max(_n,Be-He)]);s.style.minWidth=ge+"px",s.style.left=ht+"px"}else{const X=P.right-A.right,B=window.innerWidth-N.right-X,je=window.innerWidth-O.right-B,ge=O.width+je,He=Math.max(ge,P.width),Be=window.innerWidth-_n,ht=Mp(B,[_n,Math.max(_n,Be-He)]);s.style.minWidth=ge+"px",s.style.right=ht+"px"}const C=h(),T=window.innerHeight-_n*2,L=m.scrollHeight,R=window.getComputedStyle(u),I=parseInt(R.borderTopWidth,10),D=parseInt(R.paddingTop,10),$=parseInt(R.borderBottomWidth,10),E=parseInt(R.paddingBottom,10),M=I+D+L+E+$,F=Math.min(v.offsetHeight*5,M),H=window.getComputedStyle(m),U=parseInt(H.paddingTop,10),K=parseInt(H.paddingBottom,10),J=O.top+O.height/2-_n,he=T-J,Ne=v.offsetHeight/2,Y=v.offsetTop+Ne,ye=I+D+Y,q=M-ye;if(ye<=J){const X=C.length>0&&v===C[C.length-1].ref.current;s.style.bottom="0px";const B=u.clientHeight-m.offsetTop-m.offsetHeight,je=Math.max(he,Ne+(X?K:0)+B+$),ge=ye+je;s.style.height=ge+"px"}else{const X=C.length>0&&v===C[0].ref.current;s.style.top="0px";const je=Math.max(J,I+m.offsetTop+(X?U:0)+Ne)+q;s.style.height=je+"px",m.scrollTop=ye-J+m.offsetTop}s.style.margin=`${_n}px 0`,s.style.minHeight=F+"px",s.style.maxHeight=T+"px",n==null||n(),requestAnimationFrame(()=>p.current=!0)}},[h,a.trigger,a.valueNode,s,u,m,v,x,a.dir,n]);Lt(()=>b(),[b]);const[_,S]=w.useState();Lt(()=>{u&&S(window.getComputedStyle(u).zIndex)},[u]);const j=w.useCallback(O=>{O&&g.current===!0&&(b(),y==null||y(),g.current=!1)},[b,y]);return c.jsx(FQ,{scope:r,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:j,children:c.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:c.jsx(ce.div,{...i,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});DI.displayName=DQ;var LQ="SelectPopperPosition",K0=w.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:i=_n,...a}=e,o=Lg(r);return c.jsx(L1,{...o,...a,ref:t,align:n,collisionPadding:i,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});K0.displayName=LQ;var[FQ,IS]=Tc(ts,{}),G0="SelectViewport",LI=w.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...i}=e,a=eo(G0,r),o=IS(G0,r),s=Oe(t,a.onViewportChange),l=w.useRef(0);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),c.jsx(Ig.Slot,{scope:r,children:c.jsx(ce.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:oe(i.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=o;if(h!=null&&h.current&&f){const p=Math.abs(l.current-d.scrollTop);if(p>0){const g=window.innerHeight-_n*2,m=parseFloat(f.style.minHeight),v=parseFloat(f.style.height),x=Math.max(m,v);if(x<g){const y=x+p,b=Math.min(g,y),_=y-b;f.style.height=b+"px",f.style.bottom==="0px"&&(d.scrollTop=_>0?_:0,f.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});LI.displayName=G0;var FI="SelectGroup",[BQ,UQ]=Tc(FI),WQ=w.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=Li();return c.jsx(BQ,{scope:r,id:i,children:c.jsx(ce.div,{role:"group","aria-labelledby":i,...n,ref:t})})});WQ.displayName=FI;var BI="SelectLabel",UI=w.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=UQ(BI,r);return c.jsx(ce.div,{id:i.id,...n,ref:t})});UI.displayName=BI;var Ip="SelectItem",[zQ,WI]=Tc(Ip),zI=w.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:i=!1,textValue:a,...o}=e,s=Za(Ip,r),l=eo(Ip,r),u=s.value===n,[d,f]=w.useState(a??""),[h,p]=w.useState(!1),g=Oe(t,y=>{var b;return(b=l.itemRefCallback)==null?void 0:b.call(l,y,n,i)}),m=Li(),v=w.useRef("touch"),x=()=>{i||(s.onValueChange(n),s.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return c.jsx(zQ,{scope:r,value:n,disabled:i,textId:m,isSelected:u,onItemTextChange:w.useCallback(y=>{f(b=>b||((y==null?void 0:y.textContent)??"").trim())},[]),children:c.jsx(Ig.ItemSlot,{scope:r,value:n,disabled:i,textValue:d,children:c.jsx(ce.div,{role:"option","aria-labelledby":m,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...o,ref:g,onFocus:oe(o.onFocus,()=>p(!0)),onBlur:oe(o.onBlur,()=>p(!1)),onClick:oe(o.onClick,()=>{v.current!=="mouse"&&x()}),onPointerUp:oe(o.onPointerUp,()=>{v.current==="mouse"&&x()}),onPointerDown:oe(o.onPointerDown,y=>{v.current=y.pointerType}),onPointerMove:oe(o.onPointerMove,y=>{var b;v.current=y.pointerType,i?(b=l.onItemLeave)==null||b.call(l):v.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:oe(o.onPointerLeave,y=>{var b;y.currentTarget===document.activeElement&&((b=l.onItemLeave)==null||b.call(l))}),onKeyDown:oe(o.onKeyDown,y=>{var _;((_=l.searchRef)==null?void 0:_.current)!==""&&y.key===" "||(EQ.includes(y.key)&&x(),y.key===" "&&y.preventDefault())})})})})});zI.displayName=Ip;var bu="SelectItemText",HI=w.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:i,...a}=e,o=Za(bu,r),s=eo(bu,r),l=WI(bu,r),u=TQ(bu,r),[d,f]=w.useState(null),h=Oe(t,x=>f(x),l.onItemTextChange,x=>{var y;return(y=s.itemTextRefCallback)==null?void 0:y.call(s,x,l.value,l.disabled)}),p=d==null?void 0:d.textContent,g=w.useMemo(()=>c.jsx("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:v}=u;return Lt(()=>(m(g),()=>v(g)),[m,v,g]),c.jsxs(c.Fragment,{children:[c.jsx(ce.span,{id:l.textId,...a,ref:h}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?us.createPortal(a.children,o.valueNode):null]})});HI.displayName=bu;var qI="SelectItemIndicator",VI=w.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return WI(qI,r).isSelected?c.jsx(ce.span,{"aria-hidden":!0,...n,ref:t}):null});VI.displayName=qI;var Y0="SelectScrollUpButton",KI=w.forwardRef((e,t)=>{const r=eo(Y0,e.__scopeSelect),n=IS(Y0,e.__scopeSelect),[i,a]=w.useState(!1),o=Oe(t,n.onScrollButtonChange);return Lt(()=>{if(r.viewport&&r.isPositioned){let s=function(){const u=l.scrollTop>0;a(u)};const l=r.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[r.viewport,r.isPositioned]),i?c.jsx(YI,{...e,ref:o,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});KI.displayName=Y0;var X0="SelectScrollDownButton",GI=w.forwardRef((e,t)=>{const r=eo(X0,e.__scopeSelect),n=IS(X0,e.__scopeSelect),[i,a]=w.useState(!1),o=Oe(t,n.onScrollButtonChange);return Lt(()=>{if(r.viewport&&r.isPositioned){let s=function(){const u=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<u;a(d)};const l=r.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[r.viewport,r.isPositioned]),i?c.jsx(YI,{...e,ref:o,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});GI.displayName=X0;var YI=w.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...i}=e,a=eo("SelectScrollButton",r),o=w.useRef(null),s=Dg(r),l=w.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return w.useEffect(()=>()=>l(),[l]),Lt(()=>{var d;const u=s().find(f=>f.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[s]),c.jsx(ce.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:oe(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(n,50))}),onPointerMove:oe(i.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),o.current===null&&(o.current=window.setInterval(n,50))}),onPointerLeave:oe(i.onPointerLeave,()=>{l()})})}),HQ="SelectSeparator",XI=w.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return c.jsx(ce.div,{"aria-hidden":!0,...n,ref:t})});XI.displayName=HQ;var Q0="SelectArrow",qQ=w.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=Lg(r),a=Za(Q0,r),o=eo(Q0,r);return a.open&&o.position==="popper"?c.jsx(F1,{...i,...n,ref:t}):null});qQ.displayName=Q0;var VQ="SelectBubbleInput",QI=w.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const i=w.useRef(null),a=Oe(n,i),o=kS(t);return w.useEffect(()=>{const s=i.current;if(!s)return;const l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==t&&d){const f=new Event("change",{bubbles:!0});d.call(s,t),s.dispatchEvent(f)}},[o,t]),c.jsx(ce.select,{...r,style:{...u2,...r.style},ref:a,defaultValue:t})});QI.displayName=VQ;function JI(e){return e===""||e===void 0}function ZI(e){const t=Fn(e),r=w.useRef(""),n=w.useRef(0),i=w.useCallback(o=>{const s=r.current+o;t(s),function l(u){r.current=u,window.clearTimeout(n.current),u!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(s)},[t]),a=w.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return w.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,i,a]}function eD(e,t,r){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=r?e.indexOf(r):-1;let o=KQ(e,Math.max(a,0));i.length===1&&(o=o.filter(u=>u!==r));const l=o.find(u=>u.textValue.toLowerCase().startsWith(i.toLowerCase()));return l!==r?l:void 0}function KQ(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var GQ=NI,tD=kI,YQ=CI,XQ=TI,QQ=$I,rD=RI,JQ=LI,nD=UI,iD=zI,ZQ=HI,eJ=VI,aD=KI,oD=GI,sD=XI;const Dp=GQ,Lp=YQ,xd=w.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(tD,{ref:n,className:te("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
492ing-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[t,c.jsx(XQ,{asChild:!0,children:c.jsx(O1,{className:"h-4 w-4 opacity-50"})})]}));xd.displayName=tD.displayName;const lD=w.forwardRef(({className:e,...t},r)=>c.jsx(aD,{ref:r,className:te("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx($6,{className:"h-4 w-4"})}));lD.displayName=aD.displayName;const cD=w.forwardRef(({className:e,...t},r)=>c.jsx(oD,{ref:r,className:te("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(O1,{className:"h-4 w-4"})}));cD.displayName=oD.displayName;const bd=w.forwardRef(({className:e,children:t,position:r="popper",...n},i)=>c.jsx(QQ,{children:c.jsxs(rD,{ref:i,className:te("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:[c.jsx(lD,{}),c.jsx(JQ,{className:te("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),c.jsx(cD,{})]})}));bd.displayName=rD.displayName;const tJ=w.forwardRef(({className:e,...t},r)=>c.jsx(nD,{ref:r,className:te("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));tJ.displayName=nD.displayName;const pr=w.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(iD,{ref:n,className:te("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...r,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(eJ,{children:c.jsx(ag,{className:"h-4 w-4"})})}),c.jsx(ZQ,{children:t})]}));pr.displayName=iD.displayName;const rJ=w.forwardRef(({className:e,...t},r)=>c.jsx(sD,{ref:r,className:te("-mx-1 my-1 h-px bg-muted",e),...t}));rJ.displayName=sD.displayName;const nJ=()=>{var y,b;const[e,t]=w.useState([]),[r,n]=w.useState(!0),[i,a]=w.useState(""),[o,s]=w.useState("all"),[l,u]=w.useState(null),[d,f]=w.useState(!1),{toast:h}=Vr();w.useEffect(()=>{p()},[]);const p=async()=>{try{const{data:_,error:S}=await Ee.functions.invoke("admin-users",{body:{action:"list"}});if(S)throw S;t(_.users||[])}catch(_){console.error("Error fetching users:",_),h({title:"Error",description:"Failed to load users",variant:"destructive"})}finally{n(!1)}},g=async _=>{f(!0);try{const{data:S,error:j}=await Ee.functions.invoke("admin-users",{body:{action:"get",userId:_}});if(j)throw j;u(S.user)}catch(S){console.error("Error fetching user details:",S),h({title:"Error",description:"Failed to load user details",variant:"destructive"})}finally{f(!1)}},m=e.filter(_=>{var j,O;const S=((j=_.email)==null?void 0:j.toLowerCase().includes(i.toLowerCase()))||((O=_.full_name)==null?void 0:O.toLowerCase().includes(i.toLowerCase()));return o==="all"?S:o==="purchased"?S&&_.has_purchased:o==="not_purchased"?S&&!_.has_purchased:o==="with_coupon"?S&&_.coupon_used:S}),v=()=>{const _=["Email","Full Name","Registered","Has Purchased","Purchase Amount","Coupon Used","Days Completed"],S=m.map(A=>[A.email,A.full_name||"",xt(new Date(A.created_at),"yyyy-MM-dd"),A.has_purchased?"Yes":"No",A.purchase_amount?`$${(A.purchase_amount/100).toFixed(2)}`:"",A.coupon_used||"",A.days_completed.toString()]),j=[_.join(","),...S.map(A=>A.join(","))].join(` 493`),O=new Blob([j],{type:"text/csv"}),P=URL.createObjectURL(O),N=document.createElement("a");N.href=P,N.download=`users-export-${xt(new Date,"yyyy-MM-dd")}.csv`,N.click(),URL.revokeObjectURL(P)},x={total:e.length,purchased:e.filter(_=>_.has_purchased).length,withCoupon:e.filter(_=>_.coupon_used).length,active:e.filter(_=>_.days_completed>0).length};return c.jsxs(Hn,{title:"Users",description:"Manage all registered users",children:[c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4 mb-6",children:[c.jsxs(re,{children:[c.jsx(ct,{className:"pb-2",children:c.jsx(ut,{className:"text-sm font-medium text-muted-foreground",children:"Total Users"})}),c.jsx(ie,{children:c.jsx("div",{className:"text-2xl font-bold",children:x.total})})]}),c.jsxs(re,{children:[c.jsx(ct,{className:"pb-2",children:c.jsx(ut,{className:"text-sm font-medium text-muted-foreground",children:"Purchased"})}),c.jsxs(ie,{children:[c.jsx("div",{className:"text-2xl font-bold text-green-600",children:x.purchased}),c.jsxs("p",{className:"text-xs text-muted-foreground",children:[x.total>0?(x.purchased/x.total*100).toFixed(1):0,"% conversion"]})]})]}),c.jsxs(re,{children:[c.jsx(ct,{className:"pb-2",children:c.jsx(ut,{className:"text-sm font-medium text-muted-foreground",children:"Used Coupon"})}),c.jsx(ie,{children:c.jsx("div",{className:"text-2xl font-bold text-primary",children:x.withCoupon})})]}),c.jsxs(re,{children:[c.jsx(ct,{className:"pb-2",children:c.jsx(ut,{className:"text-sm font-medium text-muted-foreground",children:"Active Learners"})}),c.jsxs(ie,{children:[c.jsx("div",{className:"text-2xl font-bold",children:x.active}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Started course"})]})]})]}),c.jsx(re,{className:"mb-6",children:c.jsx(ie,{className:"pt-6",children:c.jsxs("div",{className:"flex flex-col md:flex-row gap-4",children:[c.jsxs("div",{className:"relative flex-1",children:[c.jsx(B2,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground"}),c.jsx(ze,{placeholder:"Search by email or name...",value:i,onChange:_=>a(_.target.value),className:"pl-10"})]}),c.jsxs(Dp,{value:o,onValueChange:s,children:[c.jsx(xd,{className:"w-[180px]",children:c.jsx(Lp,{placeholder:"Filter users"})}),c.jsxs(bd,{children:[c.jsx(pr,{value:"all",children:"All Users"}),c.jsx(pr,{value:"purchased",children:"Purchased"}),c.jsx(pr,{value:"not_purchased",children:"Not Purchased"}),c.jsx(pr,{value:"with_coupon",children:"Used Coupon"})]})]}),c.jsxs(se,{variant:"outline",onClick:v,children:[c.jsx(Il,{className:"h-4 w-4 mr-2"}),"Export CSV"]})]})})}),c.jsx(re,{children:c.jsx(ie,{className:"pt-6",children:r?c.jsx("div",{className:"flex items-center justify-center py-8",children:c.jsx(lr,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):c.jsxs($S,{children:[c.jsx(RS,{children:c.jsxs(ml,{children:[c.jsx(en,{children:"User"}),c.jsx(en,{children:"Registered"}),c.jsx(en,{children:"Status"}),c.jsx(en,{children:"Purchase"}),c.jsx(en,{children:"Coupon"}),c.jsx(en,{children:"Progress"}),c.jsx(en,{children:"Actions"})]})}),c.jsxs(MS,{children:[m.map(_=>c.jsxs(ml,{children:[c.jsx(Cr,{children:c.jsxs("div",{children:[c.jsx("div",{className:"font-medium",children:_.email}),_.full_name&&c.jsx("div",{className:"text-sm text-muted-foreground",children:_.full_name})]})}),c.jsx(Cr,{children:xt(new Date(_.created_at),"MMM d, yyyy")}),c.jsx(Cr,{children:_.has_purchased?c.jsx(Ai,{variant:"default",className:"bg-green-600",children:"Purchased"}):c.jsx(Ai,{variant:"secondary",children:"Free"})}),c.jsx(Cr,{children:_.purchase_amount?c.jsxs("span",{className:"font-medium",children:["$",(_.purchase_amount/100).toFixed(2)]}):c.jsx("span",{className:"text-muted-foreground",children:"-"})}),c.jsx(Cr,{children:_.coupon_used?c.jsx(Ai,{variant:"outline",children:_.coupon_used}):c.jsx("span",{className:"text-muted-foreground",children:"-"})}),c.jsx(Cr,{children:c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx(Ml,{className:"h-4 w-4 text-muted-foreground"}),c.jsxs("span",{children:[_.days_completed,"/30"]})]})}),c.jsx(Cr,{children:c.jsxs(se,{variant:"ghost",size:"sm",onClick:()=>g(_.id),children:[c.jsx(p0,{className:"h-4 w-4 mr-1"}),"View"]}
493)})]},_.id)),m.length===0&&c.jsx(ml,{children:c.jsx(Cr,{colSpan:7,className:"text-center py-8",children:c.jsx("p",{className:"text-muted-foreground",children:"No users found"})})})]})]})})}),c.jsx(Hl,{open:!!l,onOpenChange:()=>u(null),children:c.jsxs(Qo,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[c.jsx(Jo,{children:c.jsx(Zo,{children:"User Details"})}),d?c.jsx("div",{className:"flex items-center justify-center py-8",children:c.jsx(lr,{className:"h-8 w-8 animate-spin"})}):l?c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsxs("h3",{className:"font-semibold flex items-center gap-2",children:[c.jsx(p0,{className:"h-4 w-4"}),"Profile"]}),c.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Email:"}),c.jsx("p",{className:"font-medium",children:l.email})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Name:"}),c.jsx("p",{className:"font-medium",children:((y=l.profile)==null?void 0:y.full_name)||"Not set"})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Registered:"}),c.jsx("p",{className:"font-medium",children:xt(new Date(l.created_at),"MMM d, yyyy")})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Status:"}),c.jsx("p",{children:(b=l.profile)!=null&&b.has_purchased?c.jsx(Ai,{variant:"default",className:"bg-green-600",children:"Purchased"}):c.jsx(Ai,{variant:"secondary",children:"Free"})})]})]})]}),l.purchases.length>0&&c.jsxs("div",{className:"space-y-2",children:[c.jsxs("h3",{className:"font-semibold flex items-center gap-2",children:[c.jsx(xp,{className:"h-4 w-4"}),"Purchases (",l.purchases.length,")"]}),c.jsx("div",{className:"space-y-2",children:l.purchases.map(_=>c.jsxs("div",{className:"flex items-center justify-between p-3 bg-muted rounded-lg",children:[c.jsxs("div",{children:[c.jsxs("p",{className:"font-medium",children:["$",(_.amount/100).toFixed(2)]}),c.jsx("p",{className:"text-sm text-muted-foreground",children:xt(new Date(_.created_at),"MMM d, yyyy")})]}),c.jsxs("div",{className:"text-right",children:[_.coupon_code&&c.jsx(Ai,{variant:"outline",children:_.coupon_code}),c.jsx("p",{className:"text-sm text-muted-foreground capitalize",children:_.status})]})]},_.id))})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsxs("h3",{className:"font-semibold flex items-center gap-2",children:[c.jsx(Ml,{className:"h-4 w-4"}),"Course Progress (",l.course_progress.length,"/30 days)"]}),l.course_progress.length>0?c.jsx("div",{className:"grid grid-cols-6 gap-2",children:Array.from({length:30},(_,S)=>{const j=l.course_progress.find(O=>O.day_number===S+1);return c.jsx("div",{className:`p-2 text-center rounded text-sm ${j?"bg-green-600 text-white":"bg-muted text-muted-foreground"}`,children:S+1},S)})}):c.jsx("p",{className:"text-sm text-muted-foreground",children:"No course progress yet"})]}),l.sleep_entries.length>0&&c.jsxs("div",{className:"space-y-2",children:[c.jsxs("h3",{className:"font-semibold flex items-center gap-2",children:[c.jsx(Dt,{className:"h-4 w-4"}),"Recent Sleep Entries (",l.sleep_entries.length,")"]}),c.jsx("div",{className:"text-sm space-y-1",children:l.sleep_entries.slice(0,5).map((_,S)=>{var j;return c.jsxs("div",{className:"flex justify-between p-2 bg-muted rounded",children:[c.jsx("span",{children:xt(new Date(_.entry_date),"MMM d")}),c.jsxs("span",{children:[_.bedtime," - ",_.wake_time]}),c.jsxs("span",{children:[(j=_.total_sleep_hours)==null?void 0:j.toFixed(1),"h"]}),_.quality_rating&&c.jsxs("span",{children:["â ",_.quality_rating,"/5"]})]},S)})})]})]}):null]})})]})},iJ=()=>{var p;const[e,t]=w.useState([]),[r,n]=w.useState([]),[i,a]=w.useState(!0),[o,s]=w.useState(""),[l,u]=w.useState("all"),[d,f]=w.useState(null);w.useEffect(()=>{(async()=>{try{const{data:m,error:v}=await Ee.from("purchases").select("*").order("created_at",{ascending:!1});if(v)throw v;t(m||[]),n(m||[])}catch(m){console.error("Error fetching orders:",m)}finally{a(!1)}})()},[]),w.useEffect(()=>{let g=e;o&&(g=g.filter(m=>{var v,x;return((v=m.customer_email)==null?void 0:v.toLowerCase().includes(o.toLowerCase()))||((x=m.stripe_session_id)==null?void 0:x.toLowerCase().includes(o.toLowerCase()))})),l!=="all"&&(g=g.filter(m=>m.status===l)),n(g)},[o,l,e]);const h=()=>{const g=["Date","Customer","Amount","Status","Coupon","Refund Status"],m=r.map(_=>[new Date(_.created_at).toLocaleDateString(),_.customer_email||"N/A",`$${((_.amount||0)/100).toFixed(2)}`,_.status||"N/A",_.coupon_code||"N/A",_.refund_status||"none"]),v=[g,...m].map(_=>_.join(",")).join(` 494`),x=new Blob([v],{type:"text/csv"}),y=URL.createObjectURL(x),b=document.createElement("a");b.href=y,b.download=`orders-${new Date().toISOString().split("T")[0]}.csv`,b.click()};return i?c.jsx(Hn,{title:"Orders",description:"View and manage all purchases",children:c.jsx(Aa,{className:"h-96"})}):c.jsxs(Hn,{title:"Orders",description:"View and manage all purchases",children:[c.jsx(re,{className:"mb-6",children:c.jsx(ie,{className:"p-4",children:c.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[c.jsxs("div",{className:"relative flex-1",children:[c.jsx(B2,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),c.jsx(ze,{placeholder:"Search by email or session ID...",value:o,onChange:g=>s(g.target.value),className:"pl-10"})]}),c.jsxs(Dp,{value:l,onValueChange:u,children:[c.jsx(xd,{className:"w-[180px]",children:c.jsx(Lp,{placeholder:"Status"})}),c.jsxs(bd,{children:[c.jsx(pr,{value:"all",children:"All Status"}),c.jsx(pr,{value:"completed",children:"Completed"}),c.jsx(pr,{value:"pending",children:"Pending"}),c.jsx(pr,{value:"refunded",children:"Refunded"})]})]}),c.jsxs(se,{variant:"outline",onClick:h,children:[c.jsx(Il,{className:"h-4 w-4 mr-2"}),"Export CSV"]})]})})}),c.jsxs(re,{children:[c.jsx(ct,{children:c.jsxs(ut,{children:["All Orders (",r.length,")"]})}),c.jsx(ie,{children:r.length===0?c.jsx("p",{className:"text-muted-foreground text-center py-8",children:"No orders found"}):c.jsx("div",{className:"overflow-x-auto",children:c.jsxs("table",{className:"w-full",children:[c.jsx("thead",{children:c.jsxs("tr",{className:"border-b border-border",children:[c.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-muted-foreground",children:"Date"}),c.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-muted-foreground",children:"Customer"}),c.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-muted-foreground",children:"Amount"}),c.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-muted-foreground",children:"Status"}),c.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-muted-foreground",children:"Coupon"}),c.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-muted-foreground",children:"Refund"}),c.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-muted-foreground",children:"Actions"})]})}),c.jsx("tbody",{children:r.map(g=>{var m;return c.jsxs("tr",{className:"border-b border-border last:border-0 hover:bg-muted/50",children:[c.jsx("td",{className:"py-3 px-4 text-sm text-foreground",children:new Date(g.created_at).toLocaleDateString()}),c.jsx("td",{className:"py-3 px-4 text-sm text-foreground",children:g.customer_email||"Guest"}),c.jsxs("td",{className:"py-3 px-4 text-sm text-foreground",children:["$",((g.amount||0)/100).toFixed(2)," ",(m=g.currency)==null?void 0:m.toUpperCase()]}),c.jsx("td",{className:"py-3 px-4",children:c.jsx("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-xs font-medium ${g.status==="completed"?"bg-green-500/10 text-green-500":g.status==="refunded"?"bg-red-500/10 text-red-500":"bg-yellow-500/10 text-yellow-500"}`,children:g.status})}),c.jsx("td",{className:"py-3 px-4 text-sm text-muted-foreground",children:g.coupon_code||"-"}),c.jsx("td",{className:"py-3 px-4",children:g.refund_status&&g.refund_status!=="none"?c.jsx("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-xs font-medium ${g.refund_status==="requested"?"bg-yellow-500/10 text-yellow-500":g.refund_status==="completed"?"bg-green-500/10 text-green-500":"bg-muted text-muted-foreground"}`,children:g.refund_status}):c.jsx("span",{className:"text-muted-foreground text-sm",children:"-"})}),c.jsx("td",{className:"py-3 px-4",children:c.jsx(se,{variant:"ghost",size:"sm",onClick:()=>f(g),children:c.jsx(P1,{className:"h-4 w-4"})})})]},g.id)})})]})})})]}),c.jsx(Hl,{open:!!d,onOpenChange:()=>f(null),children:c.jsxs(Qo,{children:[c.jsx(Jo,{children:c.jsx(Zo,{children:"Order Details"})}),d&&c.jsx("div",{className:"space-y-4",children:c.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[c.jsxs("div",{children:[c.jsx("p",{className:"text-sm text-muted-foreground",children:"Order ID"}),c.jsx("p",{className:"text-sm font-mono text-foreground",children:d.id})]}),c.jsxs("div",{children:[c.jsx("p",{className:"text-sm text-muted-foreground",children:"Date"}),c.jsx("p",{className:"text-sm text-foreground",children:new Date(d.created_at).toLocaleStr
494ing()})]}),c.jsxs("div",{children:[c.jsx("p",{className:"text-sm text-muted-foreground",children:"Customer Email"}),c.jsx("p",{className:"text-sm text-foreground",children:d.customer_email||"N/A"})]}),c.jsxs("div",{children:[c.jsx("p",{className:"text-sm text-muted-foreground",children:"Amount"}),c.jsxs("p",{className:"text-sm text-foreground",children:["$",((d.amount||0)/100).toFixed(2)," ",(p=d.currency)==null?void 0:p.toUpperCase()]})]}),c.jsxs("div",{children:[c.jsx("p",{className:"text-sm text-muted-foreground",children:"Status"}),c.jsx("p",{className:"text-sm text-foreground",children:d.status})]}),c.jsxs("div",{children:[c.jsx("p",{className:"text-sm text-muted-foreground",children:"Coupon Code"}),c.jsx("p",{className:"text-sm text-foreground",children:d.coupon_code||"None"})]}),c.jsxs("div",{children:[c.jsx("p",{className:"text-sm text-muted-foreground",children:"Stripe Session"}),c.jsx("p",{className:"text-sm font-mono text-foreground truncate",children:d.stripe_session_id||"N/A"})]}),c.jsxs("div",{children:[c.jsx("p",{className:"text-sm text-muted-foreground",children:"Stripe Customer"}),c.jsx("p",{className:"text-sm font-mono text-foreground truncate",children:d.stripe_customer_id||"N/A"})]})]})})]})})]})},aJ=()=>{const[e,t]=w.useState([]),[r,n]=w.useState(!0),[i,a]=w.useState(null),[o,s]=w.useState(null),[l,u]=w.useState(null),[d,f]=w.useState(""),{toast:h}=Vr(),p=async()=>{try{const{data:y,error:b}=await Ee.from("purchases").select("*").neq("refund_status","none").order("refund_requested_at",{ascending:!1});if(b)throw b;t(y||[])}catch(y){console.error("Error fetching refunds:",y)}finally{n(!1)}};w.useEffect(()=>{p()},[]);const g=async()=>{if(!(!o||!l)){a(o.id);try{if(l==="approve"){const{data:y,error:b}=await Ee.functions.invoke("admin-refund",{body:{purchase_id:o.id,action:"approve"}});if(b)throw b;h({title:"Refund processed",description:"The refund has been processed successfully."})}else{const{error:y}=await Ee.from("purchases").update({refund_status:"rejected",refund_processed_at:new Date().toISOString()}).eq("id",o.id);if(y)throw y;h({title:"Refund rejected",description:"The refund request has been rejected."})}await p()}catch(y){console.error("Error processing refund:",y),h({title:"Error",description:"Failed to process the refund. Please try again.",variant:"destructive"})}finally{a(null),s(null),u(null),f("")}}},m=y=>{switch(y){case"requested":return"bg-yellow-500/10 text-yellow-500";case"approved":case"completed":return"bg-green-500/10 text-green-500";case"rejected":return"bg-red-500/10 text-red-500";default:return"bg-muted text-muted-foreground"}};if(r)return c.jsx(Hn,{title:"Refunds",description:"Manage refund requests",children:c.jsx(Aa,{className:"h-96"})});const v=e.filter(y=>y.refund_status==="requested"),x=e.filter(y=>y.refund_status!=="requested");return c.jsxs(Hn,{title:"Refunds",description:"Manage refund requests",children:[c.jsxs(re,{className:"mb-6",children:[c.jsx(ct,{children:c.jsxs(ut,{className:"flex items-center gap-2",children:[c.jsx(R6,{className:"h-5 w-5 text-yellow-500"}),"Pending Refunds (",v.length,")"]})}),c.jsx(ie,{children:v.length===0?c.jsx("p",{className:"text-muted-foreground text-center py-8",children:"No pending refund requests"}):c.jsx("div",{className:"space-y-4",children:v.map(y=>c.jsxs("div",{className:"flex items-center justify-between p-4 bg-muted/50 rounded-lg",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsx("p",{className:"font-medium text-foreground",children:y.customer_email||"Guest"}),c.jsxs("p",{className:"text-sm text-muted-foreground",children:["Amount: $",((y.amount||0)/100).toFixed(2)," ⢠Requested: ",y.refund_requested_at?new Date(y.refund_requested_at).toLocaleDateString():"N/A"]}),y.refund_reason&&c.jsxs("p",{className:"text-sm text-muted-foreground",children:["Reason: ",y.refund_reason]})]}),c.jsxs("div",{className:"flex gap-2",children:[c.jsxs(se,{variant:"outline",size:"sm",onClick:()=>{s(y),u("reject")},disabled:!!i,children:[c.jsx(sg,{className:"h-4 w-4 mr-1"}),"Reject"]}),c.jsx(se,{size:"sm",onClick:()=>{s(y),u("approve")},disabled:!!i,children:i===y.id?c.jsx(lr,{className:"h-4 w-4 animate-spin"}):c.jsxs(c.Fragment,{children:[c.jsx(ag,{className:"h-4 w-4 mr-1"}),"Approve"]})})]})]},y.id))})})]}),c.jsxs(re,{children:[c.jsx(ct,{children:c.jsxs(ut,{children:["Refund History (",x.length,")"]})}),c.jsx(ie,{children:x.length===0?c.jsx("p",{className:"text-muted-foreground text-center py-8",children:"No processed refunds"}):c.jsx("div",{className:"overflow-x-auto",children:c.jsxs("table",{className:"w-full",children:[c.jsx("thead",{children:c.jsxs("tr",{className:"border-b border-border",children:[c.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-muted-foreground",children:"Customer"}),c.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-muted-foreground",children:"Amount"}),c.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-muted-foreground",children:"Status"}),c.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-muted-foreground",children:"Requested"}),c.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-muted-foreground",children:"Processed"})]})}),c.jsx("tbody",{children:x.map(y=>c.jsxs("tr",{className:"border-b border-border last:border-0",children:[c.jsx("td",{className:"py-3 px-4 text-sm text-foreground",children:y.customer_email||"Guest"}),c.jsxs("td",{className:"py-3 px-4 text-sm text-foreground",children:["$",((y.amount||0)/100).toFixed(2)]}),c.jsx("td",{className:"py-3 px-4",children:c.jsx("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-xs font-medium ${m(y.refund_status)}`,children:y.refund_status})}),c.jsx("td",{className:"py-3 px-4 text-sm text-muted-foreground",children:y.refund_requested_at?new Date(y.refund_requested_at).toLocaleDateString():"N/A"}),c.jsx("td",{className:"py-3 px-4 text-sm text-muted-foreground",children:y.refund_processed_at?new Date(y.refund_processed_at).toLocaleDateString():"N/A"})]},y.id))})]})})})]}),c.jsx(Hl,{open:!!o&&!!l,onOpenChange:()=>{s(null),u(null),f("")},children:c.jsxs(Qo,{children:[c.jsxs(Jo,{children:[c.jsx(Zo,{children:l==="approve"?"Approve Refund":"Reject Refund"}),c.jsx(tI,{children:l==="approve"?"This will process a refund through Stripe. The customer will receive their money back.":"The customer will be notified that their refund request was rejected."})]}),o&&c.jsxs("div",{className:"py-4",children:[c.jsxs("p",{className:"text-sm text-muted-foreground",children:["Customer: ",c.jsx("span",{className:"text-foreground",children:o.customer_email})]}),c.jsxs("p",{className:"text-sm text-muted-foreground",children:["Amount: ",c.jsxs("span",{className:"text-foreground",children:["$",((o.amount||0)/100).toFixed(2)]})]})]}),l==="reject"&&c.jsxs("div",{className:"space-y-2",children:[c.jsx("label",{className:"text-sm font-medium",children:"Reason (optional)"}),c.jsx(Ac,{placeholder:"Explain why the refund was rejected...",value:d,onChange:y=>f(y.target.value)})]}),c.jsxs(ES,{children:[c.jsx(se,{variant:"outline",onClick:()=>{s(null),u(null)},children:"Cancel"}),c.jsx(se,{variant:l==="approve"?"default":"destructive",onClick:g,disabled:!!i,children:i?c.jsx(lr,{className:"h-4 w-4 animate-spin"}):l==="approve"?"Process Refund":"Reject Refund"})]})]})})]})},oJ=()=>{const[e,t]=w.useState([]),[r,n]=w.useState(!0),[i,a]=w.useState(!1),[o,s]=w.useState(null),[l,u]=w.useState(!1),[d,f]=w.useState(!1),[h,p]=w.useState(null),[g,m]=w.useState([]),[v,x]=w.useState(!1),{toast:y}=Vr(),[b,_]=w.useState(""),[S,j]=w.useState("percent"),[O,P]=w.useState(""),[N,A]=w.useState("once"),[C,T]=w.useState(""),L=async()=>{try{const{data:E,error:M}=await Ee.functions.invoke("admin-coupons",{body:{action:"list"}});if(M)throw M;
494t((E==null?void 0:E.coupons)||[])}catch(E){console.error("Error fetching coupons:",E),y({title:"Error",description:"Failed to load coupons",variant:"destructive"})}finally{n(!1)}};w.useEffect(()=>{L()},[]);const R=async E=>{p(E),x(!0),f(!0);try{const{data:M,error:F}=await Ee.from("purchases").select("id, customer_email, amount, created_at, status").eq("coupon_code",E).order("created_at",{ascending:!1});if(F)throw F;m(M||[])}catch(M){console.error("Error fetching coupon usage:",M),y({title:"Error",description:"Failed to load coupon usage",variant:"destructive"})}finally{x(!1)}},I=async()=>{if(!b.trim()||!O){y({title:"Missing fields",description:"Please fill in all required fields",variant:"destructive"});return}a(!0);try{const{data:E,error:M}=await Ee.functions.invoke("admin-coupons",{body:{action:"create",name:b.trim(),percent_off:S==="percent"?Number(O):void 0,amount_off:S==="amount"?Number(O)*100:void 0,currency:S==="amount"?"usd":void 0,duration:N,duration_in_months:N==="repeating"?Number(C):void 0}});if(M)throw M;y({title:"Coupon created",description:`Coupon "${b}" has been created successfully.`}),u(!1),$(),await L()}catch(E){console.error("Error creating coupon:",E),y({title:"Error",description:"Failed to create coupon. Please try again.",variant:"destructive"})}finally{a(!1)}},D=async E=>{s(E);try{const{error:M}=await Ee.functions.invoke("admin-coupons",{body:{action:"delete",coupon_id:E}});if(M)throw M;y({title:"Coupon deleted",description:"The coupon has been deleted successfully."}),await L()}catch(M){console.error("Error deleting coupon:",M),y({title:"Error",description:"Failed to delete coupon. Please try again.",variant:"destructive"})}finally{s(null)}},$=()=>{_(""),j("percent"),P(""),A("once"),T("")};return r?c.jsx(Hn,{title:"Coupons",description:"Create and manage discount coupons",children:c.jsx(Aa,{className:"h-96"})}):c.jsxs(Hn,{title:"Coupons",description:"Create and manage discount coupons",children:[c.jsxs("div",{className:"flex justify-between items-center mb-6",children:[c.jsx("div",{}),c.jsxs(se,{onClick:()=>u(!0),children:[c.jsx(f0,{className:"h-4 w-4 mr-2"}),"Create Coupon"]})]}),c.jsx(Hl,{open:d,onOpenChange:f,children:c.jsxs(Qo,{className:"max-w-2xl",children:[c.jsx(Jo,{children:c.jsxs(Zo,{className:"flex items-center gap-2",children:[c.jsx(ad,{className:"h-5 w-5"}),"Coupon Usage: ",h]})}),v?c.jsx("div",{className:"flex items-center justify-center py-8",children:c.jsx(lr,{className:"h-8 w-8 animate-spin"})}):g.length>0?c.jsxs($S,{children:[c.jsx(RS,{children:c.jsxs(ml,{children:[c.jsx(en,{children:"Customer Email"}),c.jsx(en,{children:"Amount Paid"}),c.jsx(en,{children:"Date"}),c.jsx(en,{children:"Status"})]})}),c.jsx(MS,{children:g.map(E=>c.jsxs(ml,{children:[c.jsx(Cr,{className:"font-medium",children:E.customer_email||"Unknown"}),c.jsxs(Cr,{children:["$",((E.amount||0)/100).toFixed(2)]}),c.jsx(Cr,{children:xt(new Date(E.created_at),"MMM d, yyyy h:mm a")}),c.jsx(Cr,{children:c.jsx(Ai,{variant:E.status==="completed"?"default":"secondary",children:E.status||"unknown"})})]},E.id))})]}):c.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[c.jsx(ad,{className:"h-12 w-12 mx-auto mb-2 opacity-50"}),c.jsx("p",{children:"No one has used this coupon yet"})]})]})}),c.jsxs(re,{children:[c.jsx(ct,{children:c.jsxs(ut,{className:"flex items-center gap-2",children:[c.jsx(bp,{className:"h-5 w-5 text-primary"}),"All Coupons (",e.length,")"]})}),c.jsx(ie,{children:e.length===0?c.jsxs("div",{className:"text-center py-8",children:[c.jsx(bp,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),c.jsx("p",{className:"text-muted-foreground mb-4",children:"No coupons created yet"}),c.jsxs(se,{onClick:()=>u(!0),children:[c.jsx(f0,{className:"h-4 w-4 mr-2"}),"Create Your First Coupon"]})]}):c.jsx("div",{className:"overflow-x-auto",children:c.jsxs("table",{className:"w-full",children:[c.jsx("thead",{children:c.jsxs("tr",{className:"border-b border-border",children:[c.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-muted-foreground",children:"Code/Name"}),c.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-muted-foreground",children:"Discount"}),c.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-muted-foreground",children:"Duration"}),c.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-muted-foreground",children:"Times Used"}),c.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-muted-foreground",children:"Status"}),c.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-muted-foreground",children:"Actions"})]})}),c.jsx("tbody",{children:e.map(E=>
494c.jsxs("tr",{className:"border-b border-border last:border-0 hover:bg-muted/50",children:[c.jsx("td",{className:"py-3 px-4",children:c.jsxs("div",{children:[c.jsx("p",{className:"font-mono text-sm text-foreground",children:E.id}),E.name&&c.jsx("p",{className:"text-xs text-muted-foreground",children:E.name})]})}),c.jsx("td",{className:"py-3 px-4 text-sm text-foreground",children:E.percent_off?`${E.percent_off}% off`:E.amount_off?`$${(E.amount_off/100).toFixed(2)} off`:"N/A"}),c.jsx("td",{className:"py-3 px-4 text-sm text-muted-foreground capitalize",children:E.duration}),c.jsx("td",{className:"py-3 px-4 text-sm text-foreground",children:E.times_redeemed}),c.jsx("td",{className:"py-3 px-4",children:c.jsx("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-xs font-medium ${E.valid?"bg-green-500/10 text-green-500":"bg-red-500/10 text-red-500"}`,children:E.valid?"Active":"Inactive"})}),c.jsx("td",{className:"py-3 px-4",children:c.jsxs("div",{className:"flex gap-1",children:[c.jsxs(se,{variant:"ghost",size:"sm",onClick:()=>R(E.id),children:[c.jsx(P1,{className:"h-4 w-4 mr-1"}),"Usage"]}),c.jsx(se,{variant:"ghost",size:"sm",onClick:()=>D(E.id),disabled:o===E.id,children:o===E.id?c.jsx(lr,{className:"h-4 w-4 animate-spin"}):c.jsx(Y6,{className:"h-4 w-4 text-destructive"})})]})})]},E.id))})]})})})]}),c.jsx(Hl,{open:l,onOpenChange:u,children:c.jsxs(Qo,{children:[c.jsx(Jo,{children:c.jsx(Zo,{children:"Create New Coupon"})}),c.jsxs("div",{className:"space-y-4 py-4",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx(Me,{htmlFor:"couponName",children:"Coupon Name"}),c.jsx(ze,{id:"couponName",placeholder:"e.g., AFFILIATE10, SUMMER2024",value:b,onChange:E=>_(E.target.value.toUpperCase())}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"This will be the coupon code customers enter at checkout"})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(Me,{children:"Discount Type"}),c.jsxs(Dp,{value:S,onValueChange:E=>j(E),children:[c.jsx(xd,{children:c.jsx(Lp,{})}),c.jsxs(bd,{children:[c.jsx(pr,{value:"percent",children:"Percentage Off"}),c.jsx(pr,{value:"amount",children:"Fixed Amount Off"})]})]})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(Me,{htmlFor:"discountValue",children:S==="percent"?"Discount Percentage":"Discount Amount ($)"}),c.jsx(ze,{id:"discountValue",type:"number",placeholder:S==="percent"?"e.g., 10":"e.g., 20",value:O,onChange:E=>P(E.target.value),min:"1",max:S==="percent"?"100":void 0})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(Me,{children:"Duration"}),c.jsxs(Dp,{value:N,onValueChange:E=>A(E),children:[c.jsx(xd,{children:c.jsx(Lp,{})}),c.jsxs(bd,{children:[c.jsx(pr,{value:"once",children:"Once (single purchase)"}),c.jsx(pr,{value:"forever",children:"Forever (all future purchases)"}),c.jsx(pr,{value:"repeating",children:"Repeating (specific months)"})]})]})]}),N==="repeating"&&c.jsxs("div",{className:"space-y-2",children:[c.jsx(Me,{htmlFor:"durationMonths",children:"Number of Months"}),c.jsx(ze,{id:"durationMonths",type:"number",placeholder:"e.g., 3",value:C,onChange:E=>T(E.target.value),min:"1"})]})]}),c.jsxs(ES,{children:[c.jsx(se,{variant:"outline",onClick:()=>{u(!1),$()},children:"Cancel"}),c.jsx(se,{onClick:I,disabled:i,children:i?c.jsxs(c.Fragment,{children:[c.jsx(lr,{className:"h-4 w-4 mr-2 animate-spin"}),"Creating..."]}):"Create Coupon"})]})]})})]})};var sJ=Array.isArray,jr=sJ,lJ=typeof Mf=="object"&&Mf&&Mf.Object===Object&&Mf,uD=lJ,cJ=uD,uJ=typeof self=="object"&&self&&self.Object===Object&&self,dJ=cJ||uJ||Function("return this")(),bi=dJ,fJ=bi,hJ=fJ.Symbol,wf=hJ,RP=wf,dD=Object.prototype,pJ=dD.hasOwnProperty,mJ=dD.toString,au=RP?RP.toStringTag:void 0;function gJ(e){var t=pJ.call(e,au),r=e[au];try{e[au]=void 0;var n=!0}catch{}var i=mJ.call(e);return n&&(t?e[au]=r:delete e[au]),i}var vJ=gJ,yJ=Object.prototype,xJ=yJ.toString;function bJ(e){return xJ.call(e)}var wJ=bJ,MP=wf,SJ=vJ,_J=wJ,jJ="[object Null]",OJ="[object Undefined]",IP=MP?MP.toStringTag:void 0;function PJ(e){return e==null?e===void 0?OJ:jJ:IP&&IP in Object(e)?SJ(e):_J(e)}var ea=PJ;function NJ(e){return e!=null&&typeof e=="object"}var ta=NJ,EJ=ea,kJ=ta,AJ="[object Symbol]";function CJ(e){return typeof e=="symbol"||kJ(e)&&EJ(e)==AJ}var $c=CJ,TJ=jr,$J=$c,RJ=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,MJ=/^\w*$/;function IJ(e,t){if(TJ(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||$J(e)?!0:MJ.test(e)||!RJ.test(e)||t!=null&&e in Object(t)}var DS=IJ;function DJ(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var to=DJ;const Rc=Ie(to);var LJ=ea,FJ=to,BJ="[object AsyncFunction]",UJ="[object Function]",WJ="[object GeneratorFunction]",zJ="[object Proxy]";function HJ(e){if(!FJ(e))return!1;var t=LJ(e);return t==UJ||t==WJ||t==BJ||t==zJ}var LS=HJ;const me=Ie(LS);var qJ=bi,VJ=qJ["__core-js_shared__"],KJ=VJ,Fy=KJ,DP=function(){var e=/[^.]+$/.exec(Fy&&Fy.keys&&Fy.keys.IE_PROTO||"");
vendor: 3,981 bytes, line 494
494return e?"Symbol(src)_1."+e:""}();function GJ(e){return!!DP&&DP in e}var YJ=GJ,XJ=Function.prototype,QJ=XJ.toString;function JJ(e){if(e!=null){try{return QJ.call(e)}catch{}try{return e+""}catch{}}return""}var fD=JJ,ZJ=LS,eZ=YJ,tZ=to,rZ=fD,nZ=/[\\^$.*+?()[\]{}|]/g,iZ=/^\[object .+?Constructor\]$/,aZ=Function.prototype,oZ=Object.prototype,sZ=aZ.toString,lZ=oZ.hasOwnProperty,cZ=RegExp("^"+sZ.call(lZ).replace(nZ,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function uZ(e){if(!tZ(e)||eZ(e))return!1;var t=ZJ(e)?cZ:iZ;return t.test(rZ(e))}var dZ=uZ;function fZ(e,t){return e==null?void 0:e[t]}var hZ=fZ,pZ=dZ,mZ=hZ;function gZ(e,t){var r=mZ(e,t);return pZ(r)?r:void 0}var fs=gZ,vZ=fs,yZ=vZ(Object,"create"),Fg=yZ,LP=Fg;function xZ(){this.__data__=LP?LP(null):{},this.size=0}var bZ=xZ;function wZ(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var SZ=wZ,_Z=Fg,jZ="__lodash_hash_undefined__",OZ=Object.prototype,PZ=OZ.hasOwnProperty;function NZ(e){var t=this.__data__;if(_Z){var r=t[e];return r===jZ?void 0:r}return PZ.call(t,e)?t[e]:void 0}var EZ=NZ,kZ=Fg,AZ=Object.prototype,CZ=AZ.hasOwnProperty;function TZ(e){var t=this.__data__;return kZ?t[e]!==void 0:CZ.call(t,e)}var $Z=TZ,RZ=Fg,MZ="__lodash_hash_undefined__";function IZ(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=RZ&&t===void 0?MZ:t,this}var DZ=IZ,LZ=bZ,FZ=SZ,BZ=EZ,UZ=$Z,WZ=DZ;function Mc(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])}}Mc.prototype.clear=LZ;Mc.prototype.delete=FZ;Mc.prototype.get=BZ;Mc.prototype.has=UZ;Mc.prototype.set=WZ;var zZ=Mc;function HZ(){this.__data__=[],this.size=0}var qZ=HZ;function VZ(e,t){return e===t||e!==e&&t!==t}var FS=VZ,KZ=FS;function GZ(e,t){for(var r=e.length;r--;)if(KZ(e[r][0],t))return r;return-1}var Bg=GZ,YZ=Bg,XZ=Array.prototype,QZ=XZ.splice;function JZ(e){var t=this.__data__,r=YZ(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():QZ.call(t,r,1),--this.size,!0}var ZZ=JZ,eee=Bg;function tee(e){var t=this.__data__,r=eee(t,e);return r<0?void 0:t[r][1]}var ree=tee,nee=Bg;function iee(e){return nee(this.__data__,e)>-1}var aee=iee,oee=Bg;function see(e,t){var r=this.__data__,n=oee(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var lee=see,cee=qZ,uee=ZZ,dee=ree,fee=aee,hee=lee;function Ic(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])}}Ic.prototype.clear=cee;Ic.prototype.delete=uee;Ic.prototype.get=dee;Ic.prototype.has=fee;Ic.prototype.set=hee;var Ug=Ic,pee=fs,mee=bi,gee=pee(mee,"Map"),BS=gee,FP=zZ,vee=Ug,yee=BS;function xee(){this.size=0,this.__data__={hash:new FP,map:new(yee||vee),string:new FP}}var bee=xee;function wee(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var See=wee,_ee=See;function jee(e,t){var r=e.__data__;return _ee(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Wg=jee,Oee=Wg;function Pee(e){var t=Oee(this,e).delete(e);return this.size-=t?1:0,t}var Nee=Pee,Eee=Wg;function kee(e){return Eee(this,e).get(e)}var Aee=kee,Cee=Wg;function Tee(e){return Cee(this,e).has(e)}var $ee=Tee,Ree=Wg;function Mee(e,t){var r=Ree(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var Iee=Mee,Dee=bee,Lee=Nee,Fee=Aee,Bee=$ee,Uee=Iee;function Dc(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])}}Dc.prototype.clear=Dee;Dc.prototype.delete=Lee;Dc.prototype.get=Fee;Dc.prototype.has=Bee;Dc.prototype.set=Uee;var US=Dc,hD=US,Wee="Expected a function";function WS(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Wee);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(WS.Cache||hD),r}WS.Cache=hD;var pD=WS;const zee=Ie(pD);var Hee=pD,qee=500;function Vee(e){var t=Hee(e,function(n){return r.size===qee&&r.clear(),n}
vendor: 6,743 bytes, lines 494-502
494),r=t.cache;return t}var Kee=Vee,Gee=Kee,Yee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Xee=/\\(\\)?/g,Qee=Gee(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Yee,function(r,n,i,a){t.push(i?a.replace(Xee,"$1"):n||r)}),t}),Jee=Qee;function Zee(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 zS=Zee,BP=wf,ete=zS,tte=jr,rte=$c,nte=1/0,UP=BP?BP.prototype:void 0,WP=UP?UP.toString:void 0;function mD(e){if(typeof e=="string")return e;if(tte(e))return ete(e,mD)+"";if(rte(e))return WP?WP.call(e):"";var t=e+"";return t=="0"&&1/e==-nte?"-0":t}var ite=mD,ate=ite;function ote(e){return e==null?"":ate(e)}var gD=ote,ste=jr,lte=DS,cte=Jee,ute=gD;function dte(e,t){return ste(e)?e:lte(e,t)?[e]:cte(ute(e))}var vD=dte,fte=$c,hte=1/0;function pte(e){if(typeof e=="string"||fte(e))return e;var t=e+"";return t=="0"&&1/e==-hte?"-0":t}var zg=pte,mte=vD,gte=zg;function vte(e,t){t=mte(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[gte(t[r++])];return r&&r==n?e:void 0}var HS=vte,yte=HS;function xte(e,t,r){var n=e==null?void 0:yte(e,t);return n===void 0?r:n}var yD=xte;const Ur=Ie(yD);function bte(e){return e==null}var wte=bte;const xe=Ie(wte);var Ste=ea,_te=jr,jte=ta,Ote="[object String]";function Pte(e){return typeof e=="string"||!_te(e)&&jte(e)&&Ste(e)==Ote}var Nte=Pte;const rs=Ie(Nte);var xD={exports:{}},Fe={};/** 495 * @license React 496 * react-is.production.min.js 497 * 498 * Copyright (c) Facebook, Inc. and its affiliates. 499 * 500 * This source code is licensed under the MIT license found in the 501 * LICENSE file in the root directory of this source tree. 502 */var qS=Symbol.for("react.element"),VS=Symbol.for("react.portal"),Hg=Symbol.for("react.fragment"),qg=Symbol.for("react.strict_mode"),Vg=Symbol.for("react.profiler"),Kg=Symbol.for("react.provider"),Gg=Symbol.for("react.context"),Ete=Symbol.for("react.server_context"),Yg=Symbol.for("react.forward_ref"),Xg=Symbol.for("react.suspense"),Qg=Symbol.for("react.suspense_list"),Jg=Symbol.for("react.memo"),Zg=Symbol.for("react.lazy"),kte=Symbol.for("react.offscreen"),bD;bD=Symbol.for("react.module.reference");function hn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case qS:switch(e=e.type,e){case Hg:case Vg:case qg:case Xg:case Qg:return e;default:switch(e=e&&e.$$typeof,e){case Ete:case Gg:case Yg:case Zg:case Jg:case Kg:return e;default:return t}}case VS:return t}}}Fe.ContextConsumer=Gg;Fe.ContextProvider=Kg;Fe.Element=qS;Fe.ForwardRef=Yg;Fe.Fragment=Hg;Fe.Lazy=Zg;Fe.Memo=Jg;Fe.Portal=VS;Fe.Profiler=Vg;Fe.StrictMode=qg;Fe.Suspense=Xg;Fe.SuspenseList=Qg;Fe.isAsyncMode=function(){return!1};Fe.isConcurrentMode=function(){return!1};Fe.isContextConsumer=function(e){return hn(e)===Gg};Fe.isContextProvider=function(e){return hn(e)===Kg};Fe.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===qS};Fe.isForwardRef=function(e){return hn(e)===Yg};Fe.isFragment=function(e){return hn(e)===Hg};Fe.isLazy=function(e){return hn(e)===Zg};Fe.isMemo=function(e){return hn(e)===Jg};Fe.isPortal=function(e){return hn(e)===VS};Fe.isProfiler=function(e){return hn(e)===Vg};Fe.isStrictMode=function(e){return hn(e)===qg};Fe.isSuspense=function(e){return hn(e)===Xg};Fe.isSuspenseList=function(e){return hn(e)===Qg};Fe.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Hg||e===Vg||e===qg||e===Xg||e===Qg||e===kte||typeof e=="object"&&e!==null&&(e.$$typeof===Zg||e.$$typeof===Jg||e.$$typeof===Kg||e.$$typeof===Gg||e.$$typeof===Yg||e.$$typeof===bD||e.getModuleId!==void 0)};Fe.typeOf=hn;xD.exports=Fe;var Ate=xD.exports,Cte=ea,Tte=ta,$te="[object Number]";function Rte(e){return typeof e=="number"||Tte(e)&&Cte(e)==$te}var wD=Rte;const Mte=Ie(wD);var Ite=wD;function Dte(e){return Ite(e)&&e!=+e}var Lte=Dte;const Sf=Ie(Lte);var ir=function(t){return t===0?0:t>0?1:-1},No=function(t){return rs(t)&&t.indexOf("%")===t.length-1},G=function(t){return Mte(t)&&!Sf(t)},Fte=function(t){return xe(t)},Ct=function(t){return G(t)||rs(t)},Bte=0,Lc=function(t){var r=++Bte;return"".concat(t||"").concat(r)},ar=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(!G(t)&&!rs(t))return n;var a;if(No(t)){var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return Sf(a)&&(a=n),i&&a>r&&(a=r),a},wa=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},Ute=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},Rr=function(t,r){return G(t)&&G(r)?function(n){return t+n*(r-t)}:function(){return r}};function Fp(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):Ur(n,t))===r})}var Wte=function(t,r){return G(t)&&G(r)?t-r:rs(t)&&rs(r)?t.localeCompare(r):t instanceof Date&&r instanceof Date?t.getTime()-r.getTime():String(t).localeCompare(String(r))};function gl(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 J0(e){"@babel/helpers - typeof";return J0=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},J0(e)}var zte=["viewBox","children"],Hte=["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
502dering","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"],zP=["points","pathLength"],By={svg:zte,polygon:zP,polyline:zP},KS=["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
502Capture","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"],Bp=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(w.isValidElement(t)&&(n=t.props),!Rc(n))return null;var i={};return Object.keys(n).forEach(function(a){KS.includes(a)&&(i[a]=r||function(o){return n[a](n,o)})}),i},qte=function(t,r,n){return function(i){return t(r,n,i),null}},ns=function(t,r,n){if(!Rc(t)||J0(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(a){var o=t[a];KS.includes(a)&&typeof o=="function"&&(i||(i={}),i[a]=qte(o,r,n))}),i},Vte=["children"],Kte=["children"];function HP(e,t){if(e==null)return{};var r=Gte(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 Gte(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 Z0(e){"@babel/helpers - typeof";return Z0=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},Z0(e)}var qP={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"},Fi=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},VP=null,Uy=null,GS=function e(t){if(t===VP&&Array.isArray(Uy))return Uy;var r=[];return w.Children.forEach(t,function(n){xe(n)||(Ate.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),Uy=r,VP=t,r};function Wr(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return Fi(i)}):n=[Fi(t)],GS(e).forEach(function(i){var a=Ur(i,"type.displayName")||Ur(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}function Tr(e,t){var r=Wr(e,t);return r&&r[0]}var KP=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,i=r.height;return!(!G(n)||n<=0||!G(i)||i<=0)},Yte=["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"],Xte=function(t){return t&&t.type&&rs(t.type)&&Yte.indexOf(t.type)>=0},Qte=function(t){return t&&Z0(t)==="object"&&"clipDot"in t},Jte=function(t,r,n,i){var a,o=(a=By==null?void 0:By[i])!==null&&a!==void 0?a:[];return r.startsWith("data-")||!me(t)&&(i&&o.includes(r)||Hte.includes(r))||n&&KS.includes(r)},le=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(w.isValidElement(t)&&(i=t.props),!Rc(i))return null;var a={};
502return Object.keys(i).forEach(function(o){var s;Jte((s=i)===null||s===void 0?void 0:s[o],o,r,n)&&(a[o]=i[o])}),a},eb=function e(t,r){if(t===r)return!0;var n=w.Children.count(t);if(n!==w.Children.count(r))return!1;if(n===0)return!0;if(n===1)return GP(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(!GP(a,o))return!1}return!0},GP=function(t,r){if(xe(t)&&xe(r))return!0;if(!xe(t)&&!xe(r)){var n=t.props||{},i=n.children,a=HP(n,Vte),o=r.props||{},s=o.children,l=HP(o,Kte);return i&&s?gl(a,l)&&eb(i,s):!i&&!s?gl(a,l):!1}return!1},YP=function(t,r){var n=[],i={};return GS(t).forEach(function(a,o){if(Xte(a))n.push(a);else if(a){var s=Fi(a.type),l=r[s]||{},u=l.handler,d=l.once;if(u&&(!d||!i[s])){var f=u(a,s,o);n.push(f),i[s]=!0}}}),n},Zte=function(t){var r=t&&t.type;return r&&qP[r]?qP[r]:null},ere=function(t,r){return GS(r).indexOf(t)},tre=["children","width","height","viewBox","className","style","title","desc"];function tb(){return tb=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},tb.apply(this,arguments)}function rre(e,t){if(e==null)return{};var r=nre(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 nre(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 rb(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=rre(e,tre),d=i||{width:r,height:n,x:0,y:0},f=Se("recharts-surface",a);return k.createElement("svg",tb({},le(u,!0,"svg"),{className:f,width:r,height:n,style:o,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height)}),k.createElement("title",null,s),k.createElement("desc",null,l),t)}var ire=["children","className"];function nb(){return nb=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},nb.apply(this,arguments)}function are(e,t){if(e==null)return{};var r=ore(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 ore(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 Ce=k.forwardRef(function(e,t){var r=e.children,n=e.className,i=are(e,ire),a=Se("recharts-layer",n);return k.createElement("g",nb({className:a},le(i,!0),{ref:t}),r)}),Dn=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 sre(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 lre=sre,cre=lre;function ure(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:cre(e,t,r)}var dre=ure,fre="\\ud800-\\udfff",hre="\\u0300-\\u036f",pre="\\ufe20-\\ufe2f",mre="\\u20d0-\\u20ff",gre=hre+pre+mre,vre="\\ufe0e\\ufe0f",yre="\\u200d",xre=RegExp("["+yre+fre+gre+vre+"]");function bre(e){return xre.test(e)}var SD=bre;function wre(e){return e.split("")}var Sre=wre,_D="\\ud800-\\udfff",_re="\\u0300-\\u036f",jre="\\ufe20-\\ufe2f",Ore="\\u20d0-\\u20ff",Pre=_re+jre+Ore,Nre="\\ufe0e\\ufe0f",Ere="["+_D+"]",ib="["+Pre+"]",ab="\\ud83c[\\udffb-\\udfff]",kre="(?:"+ib+"|"+ab+")",jD="[^"+_D+"]",OD="(?:\\ud83c[\\udde6-\\uddff]){2}",PD="[\\ud800-\\udbff][\\udc00-\\udfff]",Are="\\u200d",ND=kre+"?",ED="["+Nre+"]?",Cre="(?:"+Are+"(?:"+[jD,OD,PD].join("|")+")"+ED+ND+")*",Tre=ED+ND+Cre,$re="(?:"+[jD+ib+"?",ib,OD,PD,Ere].join("|")+")",Rre=RegExp(ab+"(?="+ab+")|"+$re+Tre,"g");function Mre(e){return e.match(Rre)||[]}var Ire=Mre,Dre=Sre,Lre=SD,Fre=Ire;function Bre(e){return Lre(e)?Fre(e):Dre(e)}var Ure=Bre,Wre=dre,zre=SD,Hre=Ure,qre=gD;function Vre(e){return function(t){t=qre(t);var r=zre(t)?Hre(t):void 0,n=r?r[0]:t.charAt(0),i=r?Wre(r,1).join(""):t.slice(1);return n[e]()+i}}var Kre=Vre,Gre=Kre,Yre=Gre("toUpperCase"),Xre=Yre;const ev=Ie(Xre);function Ge(e){return function(){return e}}const kD=Math.cos,Up=Math.sin,Gn=Math.sqrt,Wp=Math.PI,tv=2*Wp,ob=Math.PI,sb=2*ob,vo=1e-6,Qre=sb-vo;function AD(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function Jre(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return AD;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 Zre{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?AD:Jre(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}
502,${+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,d=o-t,f=s-r,h=d*d+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(h>vo)if(!(Math.abs(f*l-u*d)>vo)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-o,g=i-s,m=l*l+u*u,v=p*p+g*g,x=Math.sqrt(m),y=Math.sqrt(h),b=a*Math.tan((ob-Math.acos((m+h-v)/(2*x*y)))/2),_=b/y,S=b/x;Math.abs(_-1)>vo&&this._append`L${t+_*d},${r+_*f}`,this._append`A${a},${a},0,0,${+(f*p>d*g)},${this._x1=t+S*l},${this._y1=r+S*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,d=r+l,f=1^o,h=o?i-a:a-i;this._x1===null?this._append`M${u},${d}`:(Math.abs(this._x1-u)>vo||Math.abs(this._y1-d)>vo)&&this._append`L${u},${d}`,n&&(h<0&&(h=h%sb+sb),h>Qre?this._append`A${n},${n},0,1,${f},${t-s},${r-l}A${n},${n},0,1,${f},${this._x1=u},${this._y1=d}`:h>vo&&this._append`A${n},${n},0,${+(h>=ob)},${f},${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 YS(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 Zre(t)}function XS(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function CD(e){this._context=e}CD.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 rv(e){return new CD(e)}function TD(e){return e[0]}function $D(e){return e[1]}function RD(e,t){var r=Ge(!0),n=null,i=rv,a=null,o=YS(s);e=typeof e=="function"?e:e===void 0?TD:Ge(e),t=typeof t=="function"?t:t===void 0?$D:Ge(t);function s(l){var u,d=(l=XS(l)).length,f,h=!1,p;for(n==null&&(a=i(p=o())),u=0;u<=d;++u)!(u<d&&r(f=l[u],u,l))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+e(f,u,l),+t(f,u,l));if(p)return a=null,p+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:Ge(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:Ge(+l),s):t},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Ge(!!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 ph(e,t,r){var n=null,i=Ge(!0),a=null,o=rv,s=null,l=YS(u);e=typeof e=="function"?e:e===void 0?TD:Ge(+e),t=typeof t=="function"?t:Ge(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?$D:Ge(+r);function u(f){var h,p,g,m=(f=XS(f)).length,v,x=!1,y,b=new Array(m),_=new Array(m);for(a==null&&(s=o(y=l())),h=0;h<=m;++h){if(!(h<m&&i(v=f[h],h,f))===x)if(x=!x)p=h,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),g=h-1;g>=p;--g)s.point(b[g],_[g]);s.lineEnd(),s.areaEnd()}x&&(b[h]=+e(v,h,f),_[h]=+t(v,h,f),s.point(n?+n(v,h,f):b[h],r?+r(v,h,f):_[h]))}if(y)return s=null,y+""||null}function d(){return RD().defined(i).curve(o).context(a)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:Ge(+f),n=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Ge(+f),u):e},u.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Ge(+f),u):n},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:Ge(+f),r=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Ge(+f),u):t},u.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Ge(+f),u):r},u.lineX0=u.lineY0=function(){return d().x(e).y(t)},u.lineY1=function(){return d().x(e).y(r)},u.lineX1=function(){return d().x(n).y(t)},u.defined=function(f){return arguments.length?(i=typeof f=="function"?f:Ge(!!f),u):i},u.curve=function(f){return arguments.length?(o=f,a!=null&&(s=o(a)),u):o},u.context=function(f){return arguments.length?(f==null?a=s=null:s=o(a=f),u):a},u}class MD{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 ene(e){return new MD(e,!0)}function tne(e){return new MD(e,!1)}const QS={draw(e,t){const r=Gn(t/Wp);e.moveTo(r,0),e.arc(0,0,r,0,tv)}},rne={draw(e,t){const r=Gn(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()}},ID=Gn(1/3),nne=ID*2,ine={draw(e,t){const r=Gn(t/nne),n=r*ID;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},ane={draw(e,t){const r=Gn(t),n=-r/2;e.rect(n,n,r,r)}},one=.8908130915292852,DD=Up(Wp/10)/Up(7*Wp/10),sne=Up(tv/10)*DD,lne=-kD(tv/10)*DD,cne={draw(e,t){const r=Gn(t*one),n=sne*r,i=lne*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=tv*a/5,s=kD(o),l=Up(o);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*i,l*n+s*i)}e.closePath()}},Wy=Gn(3),une={draw(e,t){const r=-Gn(t/(Wy*3));e.moveTo(0,r*2),e.lineTo(-Wy*r,-r),e.lineTo(Wy*r,-r),e.closePath()}},Xr=-.5,Qr=Gn(3)/2,lb=1/Gn(12),dne=(lb/2+1)*3,fne={draw(e,t){const r=Gn(t/dne),n=r/2,i=r*lb,a=n,o=r*lb+r,s=-a,l=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(s,l),e.lineTo(Xr*n-Qr*i,Qr*n+Xr*i),e.lineTo(Xr*a-Qr*o,Qr*a+Xr*o),e.lineTo(Xr*s-Qr*l,Qr*s+Xr*l),e.lineTo(Xr*n+Qr*i,Xr*i-Qr*n),e.lineTo(Xr*a+Qr*o,Xr*o-Qr*a),e.lineTo(Xr*s+Qr*l,Xr*l-Qr*s),e.closePath()}};function hne(e,t){let r=null,n=YS(i);e=typeof e=="function"?e:Ge(e||QS),t=typeof t=="function"?t:Ge(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:Ge(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:Ge(+a),i):t}
vendor: 6,368 bytes, line 502
502,i.context=function(a){return arguments.length?(r=a??null,i):r},i}function zp(){}function Hp(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 LD(e){this._context=e}LD.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:Hp(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:Hp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function pne(e){return new LD(e)}function FD(e){this._context=e}FD.prototype={areaStart:zp,areaEnd:zp,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:Hp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function mne(e){return new FD(e)}function BD(e){this._context=e}BD.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:Hp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function gne(e){return new BD(e)}function UD(e){this._context=e}UD.prototype={areaStart:zp,areaEnd:zp,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 vne(e){return new UD(e)}function XP(e){return e<0?-1:1}function QP(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(XP(a)+XP(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function JP(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function zy(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 qp(e){this._context=e}qp.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:zy(this,this._t0,JP(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,zy(this,JP(this,r=QP(this,e,t)),r);break;default:zy(this,this._t0,r=QP(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function WD(e){this._context=new zD(e)}(WD.prototype=Object.create(qp.prototype)).point=function(e,t){qp.prototype.point.call(this,t,e)};function zD(e){this._context=e}zD.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 yne(e){return new qp(e)}function xne(e){return new WD(e)}function HD(e){this._context=e}HD.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=ZP(e),i=ZP(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 ZP(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 bne(e){return new HD(e)}function nv(e,t){this._context=e,this._t=t}nv.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: 12,000 bytes, lines 502-505
502default:{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 wne(e){return new nv(e,.5)}function Sne(e){return new nv(e,0)}function _ne(e){return new nv(e,1)}function ql(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 cb(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function jne(e,t){return e[t]}function One(e){const t=[];return t.key=e,t}function Pne(){var e=Ge([]),t=cb,r=ql,n=jne;function i(a){var o=Array.from(e.apply(this,arguments),One),s,l=o.length,u=-1,d;for(const f of a)for(s=0,++u;s<l;++s)(o[s][u]=[0,+n(f,o[s].key,u,a)]).data=f;for(s=0,d=XS(t(o));s<l;++s)o[d[s]].index=s;return r(o,d),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:Ge(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:Ge(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?cb:typeof a=="function"?a:Ge(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a??ql,i):r},i}function Nne(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}ql(e,t)}}function Ene(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}ql(e,t)}}function kne(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 d=e[t[s]],f=d[n][1]||0,h=d[n-1][1]||0,p=(f-h)/2,g=0;g<s;++g){var m=e[t[g]],v=m[n][1]||0,x=m[n-1][1]||0;p+=v-x}l+=f,u+=p*f}i[n-1][1]+=i[n-1][0]=r,l&&(r-=u/l)}i[n-1][1]+=i[n-1][0]=r,ql(e,t)}}function wd(e){"@babel/helpers - typeof";return wd=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},wd(e)}var Ane=["type","size","sizeType"];function ub(){return ub=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},ub.apply(this,arguments)}function eN(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 tN(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eN(Object(r),!0).forEach(function(n){Cne(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Cne(e,t,r){return t=Tne(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Tne(e){var t=$ne(e,"string");return wd(t)=="symbol"?t:t+""}function $ne(e,t){if(wd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(wd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Rne(e,t){if(e==null)return{};var r=Mne(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 Mne(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 qD={symbolCircle:QS,symbolCross:rne,symbolDiamond:ine,symbolSquare:ane,symbolStar:cne,symbolTriangle:une,symbolWye:fne},Ine=Math.PI/180,Dne=function(t){var r="symbol".concat(ev(t));return qD[r]||QS},Lne=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*Ine;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}},Fne=function(t,r){qD["symbol".concat(ev(t))]=r},JS=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=Rne(t,Ane),u=tN(tN({},l),{},{type:n,size:a,sizeType:s}),d=function(){var v=Dne(n),x=hne().type(v).size(Lne(a,s,n));return x()},f=u.className,h=u.cx,p=u.cy,g=le(u,!0);return h===+h&&p===+p&&a===+a?k.createElement("path",ub({},g,{className:Se("recharts-symbols",f),transform:"translate(".concat(h,", ").concat(p,")"),d:d()})):null};JS.registerSymbol=Fne;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 db(){return db=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},db.apply(this,arguments)}function rN(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 Bne(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rN(Object(r),!0).forEach(function(n){Sd(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Une(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wne(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,KD(n.key),n)}}function zne(e,t,r){return t&&Wne(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Hne(e,t,r){return t=Vp(t),qne(e,VD()?Reflect.construct(t,r||[],Vp(e).constructor):t.apply(e,r))}function qne(e,t){if(t&&(Vl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Vne(e)}function Vne(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function VD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(VD=function(){return!!e})()}function Vp(e){return Vp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Vp(e)}function Kne(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&&fb(e,t)}function fb(e,t){return fb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},fb(e,t)}function Sd(e,t,r){return t=KD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function KD(e){var t=Gne(e,"string");return Vl(t)=="symbol"?t:t+""}function Gne(e,t){if(Vl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Vl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Jr=32,ZS=function(e){function t(){return Une(this,t),Hne(this,t,arguments)}return Kne(t,e),zne(t,[{key:"renderIcon",value:function(n){var i=this.props.inactiveColor,a=Jr/2,o=Jr/6,s=Jr/3,l=n.inactive?i:n.color;if(n.type==="plainline")return k.createElement("line",{strokeWidth:4,fill:"none",stroke:l,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:a,x2:Jr,y2:a,className:"recharts-legend-icon"});if(n.type==="line")return k.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(a,"h").concat(s,` 503 A`).concat(o,",").concat(o,",0,1,1,").concat(2*s,",").concat(a,` 504 H`).concat(Jr,"M").concat(2*s,",").concat(a,` 505 A`).concat(o,",").concat(o,",0,1,1,").concat(s,",").concat(a),className:"recharts-legend-icon"});if(n.type==="rect")return k.createElement("path",{stroke:"none",fill:l,d:"M0,".concat(Jr/8,"h").concat(Jr,"v").concat(Jr*3/4,"h").concat(-Jr,"z"),className:"recharts-legend-icon"});if(k.isValidElement(n.legendIcon)){var u=Bne({},n);return delete u.legendIcon,k.cloneElement(n.legendIcon,u)}return k.createElement(JS,{fill:l,cx:a,cy:a,size:Jr,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,d={x:0,y:0,width:Jr,height:Jr},f={display:s==="horizontal"?"inline-block":"block",marginRight:10},h={display:"inline-block",verticalAlign:"middle",marginRight:4};return a.map(function(p,g){var m=p.formatter||l,v=Se(Sd(Sd({"recharts-legend-item":!0},"legend-item-".concat(g),!0),"inactive",p.inactive));if(p.type==="none")return null;var x=me(p.value)?null:p.value;Dn(!me(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 k.createElement("li",db({className:v,style:f,key:"legend-item-".concat(g)},ns(n.props,p,g)),k.createElement(rb,{width:o,height:o,viewBox:d,style:h},n.renderIcon(p)),k.createElement("span",{className:"recharts-legend-item-text",style:{color:y}},m?m(x,p,g):x))})}},{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 k.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(w.PureComponent);Sd(ZS,"displayName","Legend");Sd(ZS,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var Yne=Ug;function Xne(){this.__data__=new Yne,this.size=0}var Qne=Xne;function Jne(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var Zne=Jne;function eie(e){return this.__data__.get(e)}var tie=eie;function rie(e){return this.__data__.has(e)}var nie=rie,iie=Ug,aie=BS,oie=US,sie=200;function lie(e,t){var r=this.__data__;if(r instanceof iie){var n=r.__data__;if(!aie||n.length<sie-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new oie(n)}return r.set(e,t),this.size=r.size,this}var cie=lie,uie=Ug,die=Qne,fie=Zne,hie=tie,pie=nie,mie=cie;function Fc(e){var t=this.__data__=new uie(e);this.size=t.size}Fc.prototype.clear=die;Fc.prototype.delete=fie;Fc.prototype.get=hie;Fc.prototype.has=pie;Fc.prototype.set=mie;var GD=Fc,gie="__lodash_hash_undefined__";function vie(e){return this.__data__.set(e,gie),this}var yie=vie;function xie(e){return this.__data__.has(e)}var bie=xie,wie=US,Sie=yie,_ie=bie;function Kp(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new wie;++t<r;)this.add(e[t])}Kp.prototype.add=Kp.prototype.push=Sie;Kp.prototype.has=_ie;var YD=Kp;function jie(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 XD=jie;function Oie(e,t){return e.has(t)}var QD=Oie,Pie=YD,Nie=XD,Eie=QD,kie=1,Aie=2;function Cie(e,t,r,n,i,a){var o=r&kie,s=e.length,l=t.length;if(s!=l&&!(o&&l>s))return!1;var u=a.get(e),d=a.get(t);if(u&&d)return u==t&&d==e;var f=-1,h=!0,p=r&Aie?new Pie:void 0;for(a.set(e,t),a.set(t,e);++f<s;){var g=e[f],m=t[f];if(n)var v=o?n(m,g,f,t,e,a):n(g,m,f,e,t,a);if(v!==void 0){if(v)continue;h=!1;break}
vendor: 5,280 bytes, line 505
505if(p){if(!Nie(t,function(x,y){if(!Eie(p,y)&&(g===x||i(g,x,r,n,a)))return p.push(y)})){h=!1;break}}else if(!(g===m||i(g,m,r,n,a))){h=!1;break}}return a.delete(e),a.delete(t),h}var JD=Cie,Tie=bi,$ie=Tie.Uint8Array,Rie=$ie;function Mie(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var Iie=Mie;function Die(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var e_=Die,nN=wf,iN=Rie,Lie=FS,Fie=JD,Bie=Iie,Uie=e_,Wie=1,zie=2,Hie="[object Boolean]",qie="[object Date]",Vie="[object Error]",Kie="[object Map]",Gie="[object Number]",Yie="[object RegExp]",Xie="[object Set]",Qie="[object String]",Jie="[object Symbol]",Zie="[object ArrayBuffer]",eae="[object DataView]",aN=nN?nN.prototype:void 0,Hy=aN?aN.valueOf:void 0;function tae(e,t,r,n,i,a,o){switch(r){case eae:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Zie:return!(e.byteLength!=t.byteLength||!a(new iN(e),new iN(t)));case Hie:case qie:case Gie:return Lie(+e,+t);case Vie:return e.name==t.name&&e.message==t.message;case Yie:case Qie:return e==t+"";case Kie:var s=Bie;case Xie:var l=n&Wie;if(s||(s=Uie),e.size!=t.size&&!l)return!1;var u=o.get(e);if(u)return u==t;n|=zie,o.set(e,t);var d=Fie(s(e),s(t),n,i,a,o);return o.delete(e),d;case Jie:if(Hy)return Hy.call(e)==Hy.call(t)}return!1}var rae=tae;function nae(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var ZD=nae,iae=ZD,aae=jr;function oae(e,t,r){var n=t(e);return aae(e)?n:iae(n,r(e))}var sae=oae;function lae(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 cae=lae;function uae(){return[]}var dae=uae,fae=cae,hae=dae,pae=Object.prototype,mae=pae.propertyIsEnumerable,oN=Object.getOwnPropertySymbols,gae=oN?function(e){return e==null?[]:(e=Object(e),fae(oN(e),function(t){return mae.call(e,t)}))}:hae,vae=gae;function yae(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var xae=yae,bae=ea,wae=ta,Sae="[object Arguments]";function _ae(e){return wae(e)&&bae(e)==Sae}var jae=_ae,sN=jae,Oae=ta,e4=Object.prototype,Pae=e4.hasOwnProperty,Nae=e4.propertyIsEnumerable,Eae=sN(function(){return arguments}())?sN:function(e){return Oae(e)&&Pae.call(e,"callee")&&!Nae.call(e,"callee")},t_=Eae,Gp={exports:{}};function kae(){return!1}var Aae=kae;Gp.exports;(function(e,t){var r=bi,n=Aae,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})(Gp,Gp.exports);var t4=Gp.exports,Cae=9007199254740991,Tae=/^(?:0|[1-9]\d*)$/;function $ae(e,t){var r=typeof e;return t=t??Cae,!!t&&(r=="number"||r!="symbol"&&Tae.test(e))&&e>-1&&e%1==0&&e<t}var r_=$ae,Rae=9007199254740991;function Mae(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Rae}var n_=Mae,Iae=ea,Dae=n_,Lae=ta,Fae="[object Arguments]",Bae="[object Array]",Uae="[object Boolean]",Wae="[object Date]",zae="[object Error]",Hae="[object Function]",qae="[object Map]",Vae="[object Number]",Kae="[object Object]",Gae="[object RegExp]",Yae="[object Set]",Xae="[object String]",Qae="[object WeakMap]",Jae="[object ArrayBuffer]",Zae="[object DataView]",eoe="[object Float32Array]",toe="[object Float64Array]",roe="[object Int8Array]",noe="[object Int16Array]",ioe="[object Int32Array]",aoe="[object Uint8Array]",ooe="[object Uint8ClampedArray]",soe="[object Uint16Array]",loe="[object Uint32Array]",et={};et[eoe]=et[toe]=et[roe]=et[noe]=et[ioe]=et[aoe]=et[ooe]=et[soe]=et[loe]=!0;et[Fae]=et[Bae]=et[Jae]=et[Uae]=et[Zae]=et[Wae]=et[zae]=et[Hae]=et[qae]=et[Vae]=et[Kae]=et[Gae]=et[Yae]=et[Xae]=et[Qae]=!1;function coe(e){return Lae(e)&&Dae(e.length)&&!!et[Iae(e)]}var uoe=coe;function doe(e){return function(t){return e(t)}}var r4=doe,Yp={exports:{}};Yp.exports;(function(e,t){var r=uD,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})(Yp,Yp.exports);var foe=Yp.exports,hoe=uoe,poe=r4,lN=foe,cN=lN&&lN.isTypedArray,moe=cN?poe(cN):hoe,n4=moe,goe=xae,voe=t_,yoe=jr,xoe=t4,boe=r_,woe=n4,Soe=Object.prototype,_oe=Soe.hasOwnProperty;function joe(e,t){var r=yoe(e),n=!r&&voe(e),i=!r&&!n&&xoe(e),a=!r&&!n&&!i&&woe(e),o=r||n||i||a,s=o?goe(e.length,String):[],l=s.length;for(var u in e)(t||_oe.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||boe(u,l)))&&s.push(u);return s}var Ooe=joe,Poe=Object.prototype;function Noe(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Poe;return e===r}var Eoe=Noe;function koe(e,t){return function(r){return e(t(r))}}var i4=koe,Aoe=i4,Coe=Aoe(Object.keys,Object),Toe=Coe,$oe=Eoe,Roe=Toe,Moe=Object.prototype,Ioe=Moe.hasOwnProperty;function Doe(e){if(!$oe(e))return Roe(e);var t=[];for(var r in Object(e))Ioe.call(e,r)&&r!="constructor"&&t.push(r);return t}var Loe=Doe,Foe=LS,Boe=n_;function Uoe(e){return e!=null&&Boe(e.length)&&!Foe(e)}var _f=Uoe,Woe=Ooe,zoe=Loe,Hoe=_f;function qoe(e){return Hoe(e)?Woe(e):zoe(e)}var iv=qoe,Voe=sae,Koe=vae,Goe=iv;function Yoe(e){return Voe(e,Goe,Koe)}var Xoe=Yoe,uN=Xoe,Qoe=1,Joe=Object.prototype,Zoe=Joe.hasOwnProperty;function ese(e,t,r,n,i,a){var o=r&Qoe,s=uN(e),l=s.length,u=uN(t),d=u.length;
vendor: 5,894 bytes, line 505
505if(l!=d&&!o)return!1;for(var f=l;f--;){var h=s[f];if(!(o?h in t:Zoe.call(t,h)))return!1}var p=a.get(e),g=a.get(t);if(p&&g)return p==t&&g==e;var m=!0;a.set(e,t),a.set(t,e);for(var v=o;++f<l;){h=s[f];var x=e[h],y=t[h];if(n)var b=o?n(y,x,h,t,e,a):n(x,y,h,e,t,a);if(!(b===void 0?x===y||i(x,y,r,n,a):b)){m=!1;break}v||(v=h=="constructor")}if(m&&!v){var _=e.constructor,S=t.constructor;_!=S&&"constructor"in e&&"constructor"in t&&!(typeof _=="function"&&_ instanceof _&&typeof S=="function"&&S instanceof S)&&(m=!1)}return a.delete(e),a.delete(t),m}var tse=ese,rse=fs,nse=bi,ise=rse(nse,"DataView"),ase=ise,ose=fs,sse=bi,lse=ose(sse,"Promise"),cse=lse,use=fs,dse=bi,fse=use(dse,"Set"),a4=fse,hse=fs,pse=bi,mse=hse(pse,"WeakMap"),gse=mse,hb=ase,pb=BS,mb=cse,gb=a4,vb=gse,o4=ea,Bc=fD,dN="[object Map]",vse="[object Object]",fN="[object Promise]",hN="[object Set]",pN="[object WeakMap]",mN="[object DataView]",yse=Bc(hb),xse=Bc(pb),bse=Bc(mb),wse=Bc(gb),Sse=Bc(vb),yo=o4;(hb&&yo(new hb(new ArrayBuffer(1)))!=mN||pb&&yo(new pb)!=dN||mb&&yo(mb.resolve())!=fN||gb&&yo(new gb)!=hN||vb&&yo(new vb)!=pN)&&(yo=function(e){var t=o4(e),r=t==vse?e.constructor:void 0,n=r?Bc(r):"";if(n)switch(n){case yse:return mN;case xse:return dN;case bse:return fN;case wse:return hN;case Sse:return pN}return t});var _se=yo,qy=GD,jse=JD,Ose=rae,Pse=tse,gN=_se,vN=jr,yN=t4,Nse=n4,Ese=1,xN="[object Arguments]",bN="[object Array]",mh="[object Object]",kse=Object.prototype,wN=kse.hasOwnProperty;function Ase(e,t,r,n,i,a){var o=vN(e),s=vN(t),l=o?bN:gN(e),u=s?bN:gN(t);l=l==xN?mh:l,u=u==xN?mh:u;var d=l==mh,f=u==mh,h=l==u;if(h&&yN(e)){if(!yN(t))return!1;o=!0,d=!1}if(h&&!d)return a||(a=new qy),o||Nse(e)?jse(e,t,r,n,i,a):Ose(e,t,l,r,n,i,a);if(!(r&Ese)){var p=d&&wN.call(e,"__wrapped__"),g=f&&wN.call(t,"__wrapped__");if(p||g){var m=p?e.value():e,v=g?t.value():t;return a||(a=new qy),i(m,v,r,n,a)}}return h?(a||(a=new qy),Pse(e,t,r,n,i,a)):!1}var Cse=Ase,Tse=Cse,SN=ta;function s4(e,t,r,n,i){return e===t?!0:e==null||t==null||!SN(e)&&!SN(t)?e!==e&&t!==t:Tse(e,t,r,n,s4,i)}var i_=s4,$se=GD,Rse=i_,Mse=1,Ise=2;function Dse(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],d=s[1];if(o&&s[2]){if(u===void 0&&!(l in e))return!1}else{var f=new $se;if(n)var h=n(u,d,l,e,t,f);if(!(h===void 0?Rse(d,u,Mse|Ise,n,f):h))return!1}}return!0}var Lse=Dse,Fse=to;function Bse(e){return e===e&&!Fse(e)}var l4=Bse,Use=l4,Wse=iv;function zse(e){for(var t=Wse(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Use(i)]}return t}var Hse=zse;function qse(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var c4=qse,Vse=Lse,Kse=Hse,Gse=c4;function Yse(e){var t=Kse(e);return t.length==1&&t[0][2]?Gse(t[0][0],t[0][1]):function(r){return r===e||Vse(r,e,t)}}var Xse=Yse;function Qse(e,t){return e!=null&&t in Object(e)}var Jse=Qse,Zse=vD,ele=t_,tle=jr,rle=r_,nle=n_,ile=zg;function ale(e,t,r){t=Zse(t,e);for(var n=-1,i=t.length,a=!1;++n<i;){var o=ile(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&&nle(i)&&rle(o,i)&&(tle(e)||ele(e)))}var ole=ale,sle=Jse,lle=ole;function cle(e,t){return e!=null&&lle(e,t,sle)}var ule=cle,dle=i_,fle=yD,hle=ule,ple=DS,mle=l4,gle=c4,vle=zg,yle=1,xle=2;function ble(e,t){return ple(e)&&mle(t)?gle(vle(e),t):function(r){var n=fle(r,e);return n===void 0&&n===t?hle(r,e):dle(t,n,yle|xle)}}var wle=ble;function Sle(e){return e}var Uc=Sle;function _le(e){return function(t){return t==null?void 0:t[e]}}var jle=_le,Ole=HS;function Ple(e){return function(t){return Ole(t,e)}}var Nle=Ple,Ele=jle,kle=Nle,Ale=DS,Cle=zg;function Tle(e){return Ale(e)?Ele(Cle(e)):kle(e)}var $le=Tle,Rle=Xse,Mle=wle,Ile=Uc,Dle=jr,Lle=$le;function Fle(e){return typeof e=="function"?e:e==null?Ile:typeof e=="object"?Dle(e)?Mle(e[0],e[1]):Rle(e):Lle(e)}var wi=Fle;function Ble(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 u4=Ble;function Ule(e){return e!==e}var Wle=Ule;function zle(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}var Hle=zle,qle=u4,Vle=Wle,Kle=Hle;function Gle(e,t,r){return t===t?Kle(e,t,r):qle(e,Vle,r)}var Yle=Gle,Xle=Yle;function Qle(e,t){var r=e==null?0:e.length;return!!r&&Xle(e,t,0)>-1}var Jle=Qle;function Zle(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 ece=Zle;function tce(){}var rce=tce,Vy=a4,nce=rce,ice=e_,ace=1/0,oce=Vy&&1/ice(new Vy([,-0]))[1]==ace?function(e){return new Vy(e)}:nce,sce=oce,lce=YD,cce=Jle,uce=ece,dce=QD,fce=sce,hce=e_,pce=200;function mce(e,t,r){var n=-1,i=cce,a=e.length,o=!0,s=[],l=s;if(r)o=!1,i=uce;else if(a>=pce){var u=t?null:fce(e);if(u)return hce(u);o=!1,i=dce,l=new lce}else l=t?[]:s;e:for(;++n<a;){var d=e[n],f=t?t(d):d;if(d=r||d!==0?d:0,o&&f===f){for(var h=l.length;h--;)if(l[h]===f)continue e;t&&l.push(f),s.push(d)}else i(l,f,r)||(l!==s&&l.push(f),s.push(d))}return s}var gce=mce,vce=wi,yce=gce;function xce(e,t){return e&&e.length?yce(e,vce(t)):[]}var bce=xce;const _N=Ie(bce);function d4(e,t,r){return t===!0?_N(e,r):me(t)?_N(e,t):e}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)}var wce=["ref"];function jN(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 ji(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jN(Object(r),!0).forEach(function(n){av(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jN(Object(r)).forEac
vendor: 4,282 bytes, line 505
505h(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Sce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ON(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,h4(n.key),n)}}function _ce(e,t,r){return t&&ON(e.prototype,t),r&&ON(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function jce(e,t,r){return t=Xp(t),Oce(e,f4()?Reflect.construct(t,r||[],Xp(e).constructor):t.apply(e,r))}function Oce(e,t){if(t&&(Kl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Pce(e)}function Pce(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f4(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(f4=function(){return!!e})()}function Xp(e){return Xp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Xp(e)}function Nce(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&&yb(e,t)}function yb(e,t){return yb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},yb(e,t)}function av(e,t,r){return t=h4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h4(e){var t=Ece(e,"string");return Kl(t)=="symbol"?t:t+""}function Ece(e,t){if(Kl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Kl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kce(e,t){if(e==null)return{};var r=Ace(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 Ace(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 Cce(e){return e.value}function Tce(e,t){if(k.isValidElement(e))return k.cloneElement(e,t);if(typeof e=="function")return k.createElement(e,t);t.ref;var r=kce(t,wce);return k.createElement(ZS,r)}var PN=1,vl=function(e){function t(){var r;Sce(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=jce(this,t,[].concat(i)),av(r,"lastBoundingBox",{width:-1,height:-1}),r}return Nce(t,e),_ce(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)>PN||Math.abs(i.height-this.lastBoundingBox.height)>PN)&&(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?ji({},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,d=i.chartHeight,f,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();f={left:((u||0)-p.width)/2}}else f=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 g=this.getBBoxSnapsh
505ot();h={top:((d||0)-g.height)/2}}else h=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return ji(ji({},f),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,d=i.payload,f=ji(ji({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return k.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(p){n.wrapperNode=p}},Tce(a,ji(ji({},this.props),{},{payload:d4(d,u,Cce)})))}}],[{key:"getWithHeight",value:function(n,i){var a=ji(ji({},this.defaultProps),n.props),o=a.layout;return o==="vertical"&&G(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||i}:null}}])}(w.PureComponent);av(vl,"displayName","Legend");av(vl,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var NN=wf,$ce=t_,Rce=jr,EN=NN?NN.isConcatSpreadable:void 0;function Mce(e){return Rce(e)||$ce(e)||!!(EN&&e&&e[EN])}var Ice=Mce,Dce=ZD,Lce=Ice;function p4(e,t,r,n,i){var a=-1,o=e.length;for(r||(r=Lce),i||(i=[]);++a<o;){var s=e[a];t>0&&r(s)?t>1?p4(s,t-1,r,n,i):Dce(i,s):n||(i[i.length]=s)}return i}var m4=p4;function Fce(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 Bce=Fce,Uce=Bce,Wce=Uce(),zce=Wce,Hce=zce,qce=iv;function Vce(e,t){return e&&Hce(e,t,qce)}var g4=Vce,Kce=_f;function Gce(e,t){return function(r,n){if(r==null)return r;if(!Kce(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 Yce=Gce,Xce=g4,Qce=Yce,Jce=Qce(Xce),a_=Jce,Zce=a_,eue=_f;function tue(e,t){var r=-1,n=eue(e)?Array(e.length):[];return Zce(e,function(i,a,o){n[++r]=t(i,a,o)}),n}var v4=tue;function rue(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var nue=rue,kN=$c;function iue(e,t){if(e!==t){var r=e!==void 0,n=e===null,i=e===e,a=kN(e),o=t!==void 0,s=t===null,l=t===t,u=kN(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 aue=iue,oue=aue;function sue(e,t,r){for(var n=-1,i=e.criteria,a=t.criteria,o=i.length,s=r.length;++n<o;){var l=oue(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 lue=sue,Ky=zS,cue=HS,uue=wi,due=v4,fue=nue,hue=r4,pue=lue,mue=Uc,gue=jr;function vue(e,t,r){t.length?t=Ky(t,function(a){return gue(a)?function(o){return cue(o,a.length===1?a[0]:a)}:a}):t=[mue];var n=-1;t=Ky(t,hue(uue));var i=due(e,function(a,o,s){var l=Ky(t,function(u){return u(a)});return{criteria:l,index:++n,value:a}});return fue(i,function(a,o){return pue(a,o,r)})}var yue=vue;function xue(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 bue=xue,wue=bue,AN=Math.max;function Sue(e,t,r){return t=AN(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=AN(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),wue(e,this,s)}}var _ue=Sue;function jue(e){return function(){return e}}var Oue=jue,Pue=fs,Nue=function(){try{var e=Pue(Object,"defineProperty");return e({},"",{}),e}catch{}}(),y4=Nue,Eue=Oue,CN=y4,kue=Uc,Aue=CN?function(e,t){return CN(e,"toString",{configurable:!0,enumerable:!1,value:Eue(t),writable:!0})}:kue,Cue=Aue,Tue=800,$ue=16,Rue=Date.now;function Mue(e){var t=0,r=0;return function(){var n=Rue(),i=$ue-(n-r);if(r=n,i>0){if(++t>=Tue)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Iue=Mue,Due=Cue,Lue=Iue,Fue=Lue(Due),Bue=Fue,Uue=Uc,Wue=_ue,zue=Bue;function Hue(e,t){return zue(Wue(e,t,Uue),e+"")}var que=Hue,Vue=FS,Kue=_f,Gue=r_,Yue=to;function Xue(e,t,r){if(!Yue(r))return!1;var n=typeof t;return(n=="number"?Kue(r)&&Gue(t,r.length):n=="string"&&t in r)?Vue(r[t],e):!1}var ov=Xue,Que=m4,Jue=yue,Zue=que,TN=ov,ede=Zue(function(e,t){if(e==null)return[];var r=t.length;return r>1&&TN(e,t[0],t[1])?t=[]:r>2&&TN(t[0],t[1],t[2])&&(t=[t[0]]),Jue(e,Que(t,1),[])}),tde=ede;const o_=Ie(tde);function _d(e){"@babel/helpers - typeof";return _d=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},_d(e)}function xb(){return xb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
vendor: 32,522 bytes, lines 505-513
505for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},xb.apply(this,arguments)}function rde(e,t){return ode(e)||ade(e,t)||ide(e,t)||nde()}function nde(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 506In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ide(e,t){if(e){if(typeof e=="string")return $N(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 $N(e,t)}}function $N(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 ade(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(d){u=!0,i=d}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function ode(e){if(Array.isArray(e))return e}function RN(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 Gy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?RN(Object(r),!0).forEach(function(n){sde(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):RN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sde(e,t,r){return t=lde(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lde(e){var t=cde(e,"string");return _d(t)=="symbol"?t:t+""}function cde(e,t){if(_d(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(_d(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ude(e){return Array.isArray(e)&&Ct(e[0])&&Ct(e[1])?e.join(" ~ "):e}var dde=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,d=t.payload,f=t.formatter,h=t.itemSorter,p=t.wrapperClassName,g=t.labelClassName,m=t.label,v=t.labelFormatter,x=t.accessibilityLayer,y=x===void 0?!1:x,b=function(){if(d&&d.length){var T={padding:0,margin:0},L=(h?o_(d,h):d).map(function(R,I){if(R.type==="none")return null;var D=Gy({display:"block",paddingTop:4,paddingBottom:4,color:R.color||"#000"},s),$=R.formatter||f||ude,E=R.value,M=R.name,F=E,H=M;if($&&F!=null&&H!=null){var U=$(E,M,R,I,d);if(Array.isArray(U)){var K=rde(U,2);F=K[0],H=K[1]}else F=U}return k.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(I),style:D},Ct(H)?k.createElement("span",{className:"recharts-tooltip-item-name"},H):null,Ct(H)?k.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,k.createElement("span",{className:"recharts-tooltip-item-value"},F),k.createElement("span",{className:"recharts-tooltip-item-unit"},R.unit||""))});return k.createElement("ul",{className:"recharts-tooltip-item-list",style:T},L)}return null},_=Gy({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},a),S=Gy({margin:0},u),j=!xe(m),O=j?m:"",P=Se("recharts-default-tooltip",p),N=Se("recharts-tooltip-label",g);j&&v&&d!==void 0&&d!==null&&(O=v(m,d));var A=y?{role:"status","aria-live":"assertive"}:{};return k.createElement("div",xb({className:P,style:_},A),k.createElement("p",{className:N,style:S},k.isValidElement(O)?O:"".concat(O)),b())};function jd(e){"@babel/helpers - typeof";return jd=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},jd(e)}function gh(e,t,r){return t=fde(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fde(e){var t=hde(e,"string");return jd(t)=="symbol"?t:t+""}function hde(e,t){if(jd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(jd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ou="recharts-tooltip-wrapper",pde={visibility:"hidden"};function mde(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return Se(ou,gh(gh(gh(gh({},"".concat(ou,"-right"),G(r)&&t&&G(t.x)&&r>=t.x),"".concat(ou,"-left"),G(r)&&t&&G(t.x)&&r<t.x),"".concat(ou,"-bottom"),G(n)&&t&&G(t.y)&&n>=t.y),"".concat(ou,"-top"),G(n)&&t&&G(t.y)&&n<t.y))}function MN(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&&G(a[n]))return a[n];var d=r[n]-s-i,f=r[n]+i;if(t[n])return o[n]?d:f;if(o[n]){var h=d,p=l[n];return h<p?Math.max(f,l[n]):Math.max(d,l[n])}var g=f+s,m=l[n]+u;return g>m?Math.max(d,l[n]):Math.max(f,l[n])}function gde(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 vde(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,d,f;return o.height>0&&o.width>0&&r?(d=MN({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),f=MN({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),u=gde({translateX:d,translateY:f,useTranslate3d:s})):u=pde,{cssProperties:u,cssClasses:mde({translateX:d,translateY:f,coordinate:r})}}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 IN(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 DN(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?IN(Object(r),!0).forEach(function(n){wb(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):IN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xde(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,b4(n.key),n)}}function bde(e,t,r){return t&&xde(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function wde(e,t,r){return t=Qp(t),Sde(e,x4()?Reflect.construct(t,r||[],Qp(e).constructor):t.apply(e,r))}function Sde(e,t){if(t&&(Gl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _de(e)}function _de(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x4(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(x4=function(){return!!e})()}function Qp(e){return Qp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Qp(e)}function jde(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&&bb(e,t)}function bb(e,t){return bb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},bb(e,t)}function wb(e,t,r){return t=b4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b4(e){var t=Ode(e,"string");return Gl(t)=="symbol"?t:t+""}function Ode(e,t){if(Gl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Gl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var LN=1,Pde=function(e){function t(){var r;yde(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=wde(this,t,[].concat(i)),wb(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),wb(r,"handleKeyDown",function(o){if(o.key==="Escape"){var s,l,u,d;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=(d=r.props.coordinate)===null||d===void 0?void 0:d.y)!==null&&u!==void 0?u:0}})}}),r}return jde(t,e),bde(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>LN||Math.abs(n.height-this.state.lastBoundingBox.height)>LN)&&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,d=i.coordinate,f=i.hasPayload,h=i.isAnimationActive,p=i.offset,g=i.position,m=i.reverseDirection,v=i.useTranslate3d,x=i.viewBox,y=i.wrapperStyle,b=vde({allowEscapeViewBox:o,coordinate:d,offsetTopLeft:p,position:g,reverseDirection:m,tooltipBox:this.state.lastBoundingBox,useTranslate3d:v,viewBox:x}),_=b.cssClasses,S=b.cssProperties,j=DN(DN({transition:h&&a?"transform ".concat(s,"ms ").concat(l):void 0},S),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&f?"visible":"hidden",position:"absolute",top:0,left:0},y);return k.createElement("div",{tabIndex:-1,className:_,style:j,ref:function(P){n.wrapperNode=P}},u)}}])}(w.PureComponent),Nde=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},ci={isSsr:Nde(),get:function(t){return ci[t]},set:function(t,r){if(typeof t=="string")ci[t]=r;else{var n=Object.keys(t);n&&n.length&&n.forEach(function(i){ci[i]=t[i]})}}};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 FN(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 BN(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?FN(Object(r),!0).forEach(function(n){s_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):FN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ede(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kde(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,S4(n.key),n)}}function Ade(e,t,r){return t&&kde(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Cde(e,t,r){return t=Jp(t),Tde(e,w4()?Reflect.construct(t,r||[],Jp(e).constructor):t.apply(e,r))}function Tde(e,t){if(t&&(Yl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $de(e)}function $de(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w4(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(w4=function(){return!!e})()}function Jp(e){return Jp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Jp(e)}function Rde(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&&Sb(e,t)}function Sb(e,t){return Sb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Sb(e,t)}function s_(e,t,r){return t=S4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function S4(e){var t=Mde(e,"string");return Yl(t)=="symbol"?t:t+""}function Mde(e,t){if(Yl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Yl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ide(e){return e.dataKey}function Dde(e,t){return k.isValidElement(e)?k.cloneElement(e,t):typeof e=="function"?k.createElement(e,t):k.createElement(dde,t)}var tn=function(e){function t(){return Ede(this,t),Cde(this,t,arguments)}return Rde(t,e),Ade(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,d=i.coordinate,f=i.filterNull,h=i.isAnimationActive,p=i.offset,g=i.payload,m=i.payloadUniqBy,v=i.position,x=i.reverseDirection,y=i.useTranslate3d,b=i.viewBox,_=i.wrapperStyle,S=g??[];f&&S.length&&(S=d4(g.filter(function(O){return O.value!=null&&(O.hide!==!0||n.props.includeHidden)}),m,Ide));var j=S.length>0;return k.createElement(Pde,{allowEscapeViewBox:o,animationDuration:s,animationEasing:l,isAnimationActive:h,active:a,coordinate:d,hasPayload:j,offset:p,position:v,reverseDirection:x,useTranslate3d:y,viewBox:b,wrapperStyle:_},Dde(u,BN(BN({},this.props),{},{payload:S})))}}])}(w.PureComponent);s_(tn,"displayName","Tooltip");s_(tn,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!ci.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 Lde=bi,Fde=function(){return Lde.Date.now()},Bde=Fde,Ude=/\s/;function Wde(e){for(var t=e.length;t--&&Ude.test(e.charAt(t)););return t}var zde=Wde,Hde=zde,qde=/^\s+/;function Vde(e){return e&&e.slice(0,Hde(e)+1).replace(qde,"")}var Kde=Vde,Gde=Kde,UN=to,Yde=$c,WN=NaN,Xde=/^[-+]0x[0-9a-f]+$/i,Qde=/^0b[01]+$/i,Jde=/^0o[0-7]+$/i,Zde=parseInt;function efe(e){if(typeof e=="number")return e;if(Yde(e))return WN;if(UN(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=UN(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Gde(e);var r=Qde.test(e);return r||Jde.test(e)?Zde(e.slice(2),r?2:8):Xde.test(e)?WN:+e}var _4=efe,tfe=to,Yy=Bde,zN=_4,rfe="Expected a function",nfe=Math.max,ife=Math.min;function afe(e,t,r){var n,i,a,o,s,l,u=0,d=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(rfe);t=zN(t)||0,tfe(r)&&(d=!!r.leading,f="maxWait"in r,a=f?nfe(zN(r.maxWait)||0,t):a,h="trailing"in r?!!r.trailing:h);function p(j){var O=n,P=i;return n=i=void 0,u=j,o=e.apply(P,O),o}function g(j){return u=j,s=setTimeout(x,t),d?p(j):o}function m(j){var O=j-l,P=j-u,N=t-O;return f?ife(N,a-P):N}function v(j){var O=j-l,P=j-u;return l===void 0||O>=t||O<0||f&&P>=a}function x(){var j=Yy();if(v(j))return y(j);s=setTimeout(x,m(j))}function y(j){return s=void 0,h&&n?p(j):(n=i=void 0,o)}function b(){s!==void 0&&clearTimeout(s),u=0,n=l=i=s=void 0}function _(){return s===void 0?o:y(Yy())}function S(){var j=Yy(),O=v(j);if(n=arguments,i=this,l=j,O){if(s===void 0)return g(l);if(f)return clearTimeout(s),s=setTimeout(x,t),p(l)}return s===void 0&&(s=setTimeout(x,t)),o}return S.cancel=b,S.flush=_,S}var ofe=afe,sfe=ofe,lfe=to,cfe="Expected a function";function ufe(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(cfe);return lfe(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),sfe(e,t,{leading:n,maxWait:t,trailing:i})}var dfe=ufe;const j4=Ie(dfe);function Od(e){"@babel/helpers - typeof";return Od=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},Od(e)}function HN(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 vh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?HN(Object(r),!0).forEach(function(n){ffe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):HN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ffe(e,t,r){return t=hfe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hfe(e){var t=pfe(e,"string");return Od(t)=="symbol"?t:t+""}function pfe(e,t){if(Od(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Od(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mfe(e,t){return xfe(e)||yfe(e,t)||vfe(e,t)||gfe()}function gfe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 507In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vfe(e,t){if(e){if(typeof e=="string")return qN(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 qN(e,t)}}function qN(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 yfe(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(d){u=!0,i=d}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function xfe(e){if(Array.isArray(e))return e}var Xy=w.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,d=u===void 0?0:u,f=e.minHeight,h=e.maxHeight,p=e.children,g=e.debounce,m=g===void 0?0:g,v=e.id,x=e.className,y=e.onResize,b=e.style,_=b===void 0?{}:b,S=w.useRef(null),j=w.useRef();j.current=y,w.useImperativeHandle(t,function(){return Object.defineProperty(S.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),S.current},configurable:!0})});var O=w.useState({containerWidth:i.width,containerHeight:i.height}),P=mfe(O,2),N=P[0],A=P[1],C=w.useCallback(function(L,R){A(function(I){var D=Math.round(L),$=Math.round(R);return I.containerWidth===D&&I.containerHeight===$?I:{containerWidth:D,containerHeight:$}})},[]);w.useEffect(function(){var L=function(M){var F,H=M[0].contentRect,U=H.width,K=H.height;C(U,K),(F=j.current)===null||F===void 0||F.call(j,U,K)};m>0&&(L=j4(L,m,{trailing:!0,leading:!1}));var R=new ResizeObserver(L),I=S.current.getBoundingClientRect(),D=I.width,$=I.height;return C(D,$),R.observe(S.current),function(){R.disconnect()}},[C,m]);var T=w.useMemo(function(){var L=N.containerWidth,R=N.containerHeight;if(L<0||R<0)return null;Dn(No(o)||No(l),`The width(%s) and height(%s) are both fixed numbers, 508 maybe you don't need to use a ResponsiveContainer.`,o,l),Dn(!r||r>0,"The aspect(%s) must be greater than zero.",r);var I=No(o)?L:o,D=No(l)?R:l;r&&r>0&&(I?D=I/r:D&&(I=D*r),h&&D>h&&(D=h)),Dn(I>0||D>0,`The width(%s) and height(%s) of chart should be greater than 0, 509 please check the style of container, or the props width(%s) and height(%s), 510 or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the 511 height and width.`,I,D,o,l,d,f,r);var $=!Array.isArray(p)&&Fi(p.type).endsWith("Chart");return k.Children.map(p,function(E){return k.isValidElement(E)?w.cloneElement(E,vh({width:I,height:D},$?{style:vh({height:"100%",width:"100%",maxHeight:D,maxWidth:I},E.props.style)}:{})):E})},[r,p,l,h,f,d,N,o]);return k.createElement("div",{id:v?"".concat(v):void 0,className:Se("recharts-responsive-container",x),style:vh(vh({},_),{},{width:o,height:l,minWidth:d,minHeight:f,maxHeight:h}),ref:S},T)}),sv=function(t){return null};sv.displayName="Cell";function Pd(e){"@babel/helpers - typeof";return Pd=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},Pd(e)}function VN(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 _b(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?VN(Object(r),!0).forEach(function(n){bfe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):VN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bfe(e,t,r){return t=wfe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wfe(e){var t=Sfe(e,"string");return Pd(t)=="symbol"?t:t+""}function Sfe(e,t){if(Pd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Pd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ts={widthCache:{},cacheCount:0},_fe=2e3,jfe={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},KN="recharts_measurement_span";function Ofe(e){var t=_b({},e);return Object.keys(t).forEach(function(r){t[r]||delete t[r]}),t}var Ru=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||ci.isSsr)return{width:0,height:0};var n=Ofe(r),i=JSON.stringify({text:t,copyStyle:n});if(Ts.widthCache[i])return Ts.widthCache[i];try{var a=document.getElementById(KN);a||(a=document.createElement("span"),a.setAttribute("id",KN),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=_b(_b({},jfe),n);Object.assign(a.style,o),a.textContent="".concat(t);var s=a.getBoundingClientRect(),l={width:s.width,height:s.height};return Ts.widthCache[i]=l,++Ts.cacheCount>_fe&&(Ts.cacheCount=0,Ts.widthCache={}),l}catch{return{width:0,height:0}}},Pfe=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Nd(e){"@babel/helpers - typeof";return Nd=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},Nd(e)}function Zp(e,t){return Afe(e)||kfe(e,t)||Efe(e,t)||Nfe()}function Nfe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 512In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Efe(e,t){if(e){if(typeof e=="string")return GN(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 GN(e,t)}}function GN(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 kfe(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(d){u=!0,i=d}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Afe(e){if(Array.isArray(e))return e}function Cfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YN(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,$fe(n.key),n)}}function Tfe(e,t,r){return t&&YN(e.prototype,t),r&&YN(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function $fe(e){var t=Rfe(e,"string");return Nd(t)=="symbol"?t:t+""}function Rfe(e,t){if(Nd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Nd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var XN=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,QN=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Mfe=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Ife=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,O4={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Dfe=Object.keys(O4),Js="NaN";function Lfe(e,t){return e*O4[t]}var yh=function(){function e(t,r){Cfe(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!Mfe.test(r)&&(this.num=NaN,this.unit=""),Dfe.includes(r)&&(this.num=Lfe(t,r),this.unit="px")}return Tfe(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=Ife.exec(r))!==null&&n!==void 0?n:[],a=Zp(i,3),o=a[1],s=a[2];return new e(parseFloat(o),s??"")}}])}();function P4(e){if(e.includes(Js))return Js;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=XN.exec(t))!==null&&r!==void 0?r:[],i=Zp(n,4),a=i[1],o=i[2],s=i[3],l=yh.parse(a??""),u=yh.parse(s??""),d=o==="*"?l.multiply(u):l.divide(u);if(d.isNaN())return Js;t=t.replace(XN,d.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,h=(f=QN.exec(t))!==null&&f!==void 0?f:[],p=Zp(h,4),g=p[1],m=p[2],v=p[3],x=yh.parse(g??""),y=yh.parse(v??""),b=m==="+"?x.add(y):x.subtract(y);if(b.isNaN())return Js;t=t.replace(QN,b.toString())}return t}var JN=/\(([^()]*)\)/;function Ffe(e){for(var t=e;t.includes("(");){var r=JN.exec(t),n=Zp(r,2),i=n[1];t=t.replace(JN,P4(i))}return t}function Bfe(e){var t=e.replace(/\s+/g,"");return t=Ffe(t),t=P4(t),t}function Ufe(e){try{return Bfe(e)}catch{return Js}}function Qy(e){var t=Ufe(e.slice(5,-1));return t===Js?"":t}var Wfe=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],zfe=["dx","dy","angle","className","breakAll"];function jb(){return jb=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},jb.apply(this,arguments)}function ZN(e,t){if(e==null)return{};var r=Hfe(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 Hfe(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 eE(e,t){return Gfe(e)||Kfe(e,t)||Vfe(e,t)||qfe()}function qfe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 513In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vfe(e,t){if(e){if(typeof e=="string")return tE(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 tE(e,t)}}function tE(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 Kfe(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(d){u=!0,i=d}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Gfe(e){if(Array.isArray(e))return e}var N4=/[ \f\n\r\t\v\u2028\u2029]+/,E4=function(t){var r=t.children,n=t.breakAll,i=t.style;try{var a=[];xe(r)||(n?a=r.toString().split(""):a=r.toString().split(N4));var o=a.map(function(l){return{word:l,width:Ru(l,i).width}}),s=n?0:Ru(" ",i).width;return{wordsWithComputedWidth:o,spaceWidth:s}}catch{return null}},Yfe=function(t,r,n,i,a){var o=t.maxLines,s=t.children,l=t.style,u=t.breakAll,d=G(o),f=s,h=function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return I.reduce(function(D,$){var E=$.word,M=$.width,F=D[D.length-1];if(F&&(i==null||a||F.width+M+n<Number(i)))F.words.push(E),F.width+=M+n;else{var H={words:[E],width:M};D.push(H)}return D},[])},p=h(r),g=function(I){return I.reduce(function(D,$){return D.width>$.width?D:$})};if(!d)return p;for(var m="â¦",v=function(I){var D=f.slice(0,I),$=E4({breakAll:u,style:l,children:D+m}).wordsWithComputedWidth,E=h($),M=E.length>o||g(E).width>Number(i);return[M,E]},x=0,y=f.length-1,b=0,_;x<=y&&b<=f.length-1;){var S=Math.floor((x+y)/2),j=S-1,O=v(j),P=eE(O,2),N=P[0],A=P[1],C=v(S),T=eE(C,1),L=T[0];if(!N&&!L&&(x=S+1),N&&L&&(y=S-1),!N&&L){_=A;break}b++}return _||p},rE=function(t){var r=xe(t)?[]:t.toString().split(N4);return[{words:r}]},Xfe=function(t){var r=t.width,n=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,s=t.maxLines;if((r||n)&&!ci.isSsr){var l,u,d=E4({breakAll:o,children:i,style:a});if(d){var f=d.wordsWithComputedWidth,h=d.spaceWidth;l=f,u=h}else return rE(i);return Yfe({breakAll:o,children:i,maxLines:s,style:a},l,u,r,n)}return rE(i)},nE="#808080",is=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,d=t.scaleToFit,f=d===void 0?!1:d,h=t.textAnchor,p=h===void 0?"start":h,g=t.verticalAnchor,m=g===void 0?"end":g,v=t.fill,x=v
513===void 0?nE:v,y=ZN(t,Wfe),b=w.useMemo(function(){return Xfe({breakAll:y.breakAll,children:y.children,maxLines:y.maxLines,scaleToFit:f,style:y.style,width:y.width})},[y.breakAll,y.children,y.maxLines,f,y.style,y.width]),_=y.dx,S=y.dy,j=y.angle,O=y.className,P=y.breakAll,N=ZN(y,zfe);if(!Ct(n)||!Ct(a))return null;var A=n+(G(_)?_:0),C=a+(G(S)?S:0),T;switch(m){case"start":T=Qy("calc(".concat(u,")"));break;case"middle":T=Qy("calc(".concat((b.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:T=Qy("calc(".concat(b.length-1," * -").concat(s,")"));break}var L=[];if(f){var R=b[0].width,I=y.width;L.push("scale(".concat((G(I)?I/R:1)/R,")"))}return j&&L.push("rotate(".concat(j,", ").concat(A,", ").concat(C,")")),L.length&&(N.transform=L.join(" ")),k.createElement("text",jb({},le(N,!0),{x:A,y:C,className:Se("recharts-text",O),textAnchor:p,fill:x.includes("url")?nE:x}),b.map(function(D,$){var E=D.words.join(P?"":" ");return k.createElement("tspan",{x:A,dy:$===0?T:s,key:"".concat(E,"-").concat($)},E)}))};function Wa(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Qfe(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function l_(e){let t,r,n;e.length!==2?(t=Wa,r=(s,l)=>Wa(e(s),l),n=(s,l)=>e(s)-l):(t=e===Wa||e===Qfe?e:Jfe,r=e,n=e);function i(s,l,u=0,d=s.length){if(u<d){if(t(l,l)!==0)return d;do{const f=u+d>>>1;r(s[f],l)<0?u=f+1:d=f}while(u<d)}return u}function a(s,l,u=0,d=s.length){if(u<d){if(t(l,l)!==0)return d;do{const f=u+d>>>1;r(s[f],l)<=0?u=f+1:d=f}while(u<d)}return u}function o(s,l,u=0,d=s.length){const f=i(s,l,u,d-1);return f>u&&n(s[f-1],l)>-n(s[f],l)?f-1:f}return{left:i,center:o,right:a}}function Jfe(){return 0}function k4(e){return e===null?NaN:+e}function*Zfe(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const ehe=l_(Wa),jf=ehe.right;l_(k4).center;class iE extends Map{constructor(t,r=nhe){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(aE(this,t))}has(t){return super.has(aE(this,t))}set(t,r){return super.set(the(this,t),r)}delete(t){return super.delete(rhe(this,t))}}function aE({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function the({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function rhe({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function nhe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function ihe(e=Wa){if(e===Wa)return A4;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 A4(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const ahe=Math.sqrt(50),ohe=Math.sqrt(10),she=Math.sqrt(2);function em(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>=ahe?10:a>=ohe?5:a>=she?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?em(e,t,r*2):[s,l,u]}function Ob(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?em(t,e,r):em(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 Pb(e,t,r){return t=+t,e=+e,r=+r,em(e,t,r)[2]}function Nb(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?Pb(t,e,r):Pb(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function oE(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function sE(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function C4(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?A4:ihe(i);n>r;){if(n-r>600){const l=n-r+1,u=t-r+1,d=Math.log(l),f=.5*Math.exp(2*d/3),h=.5*Math.sqrt(d*f*(l-f)/l)*(u-l/2<0?-1:1),p=Math.max(r,Math.floor(t-u*f/l+h)),g=Math.min(n,Math.floor(t+(l-u)*f/l+h));C4(e,t,p,g,i)}const a=e[t];let o=r,s=n;for(su(e,r,t),i(e[n],a)>0&&su(e,r,n);o<s;){for(su(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}i(e[r],a)===0?su(e,r,s):(++s,su(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function su(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function lhe(e,t,r){if(e=Float64Array.from(Zfe(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return sE(e);if(t>=1)return oE(e);var n,i=(n-1)*t,a=Math.floor(i),o=oE(C4(e,a).subarray(0,a+1)),s=sE(e.subarray(a+1));return o+(s-o)*(i-a)}}function che(e,t,r=k4){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 uhe(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 pn(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function ra(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}
vendor: 6,685 bytes, line 513
513const Eb=Symbol("implicit");function c_(){var e=new iE,t=[],r=[],n=Eb;function i(a){let o=e.get(a);if(o===void 0){if(n!==Eb)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 iE;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 c_(t,r).unknown(n)},pn.apply(i,arguments),i}function Ed(){var e=c_().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,a,o,s=!1,l=0,u=0,d=.5;delete e.unknown;function f(){var h=t().length,p=i<n,g=p?i:n,m=p?n:i;a=(m-g)/Math.max(1,h-l+u*2),s&&(a=Math.floor(a)),g+=(m-g-a*(h-l))*d,o=a*(1-l),s&&(g=Math.round(g),o=Math.round(o));var v=uhe(h).map(function(x){return g+a*x});return r(p?v.reverse():v)}return e.domain=function(h){return arguments.length?(t(h),f()):t()},e.range=function(h){return arguments.length?([n,i]=h,n=+n,i=+i,f()):[n,i]},e.rangeRound=function(h){return[n,i]=h,n=+n,i=+i,s=!0,f()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(h){return arguments.length?(s=!!h,f()):s},e.padding=function(h){return arguments.length?(l=Math.min(1,u=+h),f()):l},e.paddingInner=function(h){return arguments.length?(l=Math.min(1,h),f()):l},e.paddingOuter=function(h){return arguments.length?(u=+h,f()):u},e.align=function(h){return arguments.length?(d=Math.max(0,Math.min(1,h)),f()):d},e.copy=function(){return Ed(t(),[n,i]).round(s).paddingInner(l).paddingOuter(u).align(d)},pn.apply(f(),arguments)}function T4(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return T4(t())},e}function Mu(){return T4(Ed.apply(null,arguments).paddingInner(1))}function u_(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function $4(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Of(){}var kd=.7,tm=1/kd,yl="\\s*([+-]?\\d+)\\s*",Ad="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ui="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",dhe=/^#([0-9a-f]{3,8})$/,fhe=new RegExp(`^rgb\\(${yl},${yl},${yl}\\)$`),hhe=new RegExp(`^rgb\\(${ui},${ui},${ui}\\)$`),phe=new RegExp(`^rgba\\(${yl},${yl},${yl},${Ad}\\)$`),mhe=new RegExp(`^rgba\\(${ui},${ui},${ui},${Ad}\\)$`),ghe=new RegExp(`^hsl\\(${Ad},${ui},${ui}\\)$`),vhe=new RegExp(`^hsla\\(${Ad},${ui},${ui},${Ad}\\)$`),lE={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};u_(Of,Cd,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:cE,formatHex:cE,formatHex8:yhe,formatHsl:xhe,formatRgb:uE,toString:uE});function cE(){return this.rgb().formatHex()}function yhe(){return this.rgb().formatHex8()}function xhe(){return R4(this).formatHsl()}function uE(){return this.rgb().formatRgb()}function Cd(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=dhe.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?dE(t):r===3?new yr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?xh(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?xh(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=fhe.exec(e))?new yr(t[1],t[2],t[3],1):(t=hhe.exec(e))?new yr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=phe.exec(e))?xh(t[1],t[2],t[3],t[4]):(t=mhe.exec(e))?xh(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=ghe.exec(e))?pE(t[1],t[2]/100,t[3]/100,1):(t=vhe.exec(e))?pE(t[1],t[2]/100,t[3]/100,t[4]):lE.hasOwnProperty(e)?dE(lE[e]):e==="transparent"?new yr(NaN,NaN,NaN,0):null}function dE(e){return new yr(e>>16&255,e>>8&255,e&255,1)}function xh(e,t,r,n){return n<=0&&(e=t=r=NaN),new yr(e,t,r,n)}function bhe(e){return e instanceof Of||(e=Cd(e)),e?(e=e.rgb(),new yr(e.r,e.g,e.b,e.opacity)):new yr}function kb(e,t,r,n){return arguments.length===1?bhe(e):new yr(e,t,r,n??1)}function yr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}u_(yr,kb,$4(Of,{brighter(e){return e=e==null?tm:Math.pow(tm,e),new yr(this.r*e,this.g*e,this.b*e,this.opacity)}
vendor: 5,764 bytes, line 513
513,darker(e){return e=e==null?kd:Math.pow(kd,e),new yr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new yr(Fo(this.r),Fo(this.g),Fo(this.b),rm(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:fE,formatHex:fE,formatHex8:whe,formatRgb:hE,toString:hE}));function fE(){return`#${Eo(this.r)}${Eo(this.g)}${Eo(this.b)}`}function whe(){return`#${Eo(this.r)}${Eo(this.g)}${Eo(this.b)}${Eo((isNaN(this.opacity)?1:this.opacity)*255)}`}function hE(){const e=rm(this.opacity);return`${e===1?"rgb(":"rgba("}${Fo(this.r)}, ${Fo(this.g)}, ${Fo(this.b)}${e===1?")":`, ${e})`}`}function rm(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Fo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Eo(e){return e=Fo(e),(e<16?"0":"")+e.toString(16)}function pE(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Rn(e,t,r,n)}function R4(e){if(e instanceof Rn)return new Rn(e.h,e.s,e.l,e.opacity);if(e instanceof Of||(e=Cd(e)),!e)return new Rn;if(e instanceof Rn)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 Rn(o,s,l,e.opacity)}function She(e,t,r,n){return arguments.length===1?R4(e):new Rn(e,t,r,n??1)}function Rn(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}u_(Rn,She,$4(Of,{brighter(e){return e=e==null?tm:Math.pow(tm,e),new Rn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?kd:Math.pow(kd,e),new Rn(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 yr(Jy(e>=240?e-240:e+120,i,n),Jy(e,i,n),Jy(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Rn(mE(this.h),bh(this.s),bh(this.l),rm(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=rm(this.opacity);return`${e===1?"hsl(":"hsla("}${mE(this.h)}, ${bh(this.s)*100}%, ${bh(this.l)*100}%${e===1?")":`, ${e})`}`}}));function mE(e){return e=(e||0)%360,e<0?e+360:e}function bh(e){return Math.max(0,Math.min(1,e||0))}function Jy(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 d_=e=>()=>e;function _he(e,t){return function(r){return e+r*t}}function jhe(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 Ohe(e){return(e=+e)==1?M4:function(t,r){return r-t?jhe(t,r,e):d_(isNaN(t)?r:t)}}function M4(e,t){var r=t-e;return r?_he(e,r):d_(isNaN(e)?t:e)}const gE=function e(t){var r=Ohe(t);function n(i,a){var o=r((i=kb(i)).r,(a=kb(a)).r),s=r(i.g,a.g),l=r(i.b,a.b),u=M4(i.opacity,a.opacity);return function(d){return i.r=o(d),i.g=s(d),i.b=l(d),i.opacity=u(d),i+""}}return n.gamma=e,n}(1);function Phe(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 Nhe(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Ehe(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]=Wc(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 khe(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function nm(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function Ahe(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]=Wc(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var Ab=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Zy=new RegExp(Ab.source,"g");function Che(e){return function(){return e}}function The(e){return function(t){return e(t)+""}}function $he(e,t){var r=Ab.lastIndex=Zy.lastIndex=0,n,i,a,o=-1,s=[],l=[];for(e=e+"",t=t+"";(n=Ab.exec(e))&&(i=Zy.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:nm(n,i)})),r=Zy.lastIndex;return r<t.length&&(a=t.slice(r),s[o]?s[o]+=a:s[++o]=a),s.length<2?l[0]?The(l[0].x):Che(t):(t=l.length,function(u){for(var d=0,f;d<t;++d)s[(f=l[d]).i]=f.x(u);return s.join("")})}function Wc(e,t){var r=typeof t,n;return t==null||r==="boolean"?d_(t):(r==="number"?nm:r==="string"?(n=Cd(t))?(t=n,gE):$he:t instanceof Cd?gE:t instanceof Date?khe:Nhe(t)?Phe:Array.isArray(t)?Ehe:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Ahe:nm)(e,t)}function f_(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function Rhe(e,t){t===void 0&&(t=e,e=Wc);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 Mhe(e){return function(){return e}}function im(e){return+e}var vE=[0,1];function or(e){return e}function Cb(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:Mhe(isNaN(t)?NaN:.5)}function Ihe(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function Dhe(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i<n?(n=Cb(i,n),a=r(o,a)):(n=Cb(n,i),a=r(a,o)),function(s){return a(n(s))}}function Lhe(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]=Cb(e[o],e[o+1]),a[o]=r(t[o],t[o+1]);return function(s){var l=jf(e,s,1,n)-1;return a[l](i[l](s))}}function Pf(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}
vendor: 4,392 bytes, line 513
513function lv(){var e=vE,t=vE,r=Wc,n,i,a,o=or,s,l,u;function d(){var h=Math.min(e.length,t.length);return o!==or&&(o=Ihe(e[0],e[h-1])),s=h>2?Lhe:Dhe,l=u=null,f}function f(h){return h==null||isNaN(h=+h)?a:(l||(l=s(e.map(n),t,r)))(n(o(h)))}return f.invert=function(h){return o(i((u||(u=s(t,e.map(n),nm)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,im),d()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),d()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),r=f_,d()},f.clamp=function(h){return arguments.length?(o=h?!0:or,d()):o!==or},f.interpolate=function(h){return arguments.length?(r=h,d()):r},f.unknown=function(h){return arguments.length?(a=h,f):a},function(h,p){return n=h,i=p,d()}}function h_(){return lv()(or,or)}function Fhe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function am(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Xl(e){return e=am(Math.abs(e)),e?e[1]:NaN}function Bhe(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 Uhe(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var Whe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Td(e){if(!(t=Whe.exec(e)))throw new Error("invalid format: "+e);var t;return new p_({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]})}Td.prototype=p_.prototype;function p_(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+""}p_.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 zhe(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 I4;function Hhe(e,t){var r=am(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(I4=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")+am(e,Math.max(0,t+a-1))[0]}function yE(e,t){var r=am(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 xE={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Fhe,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)=>yE(e*100,t),r:yE,s:Hhe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function bE(e){return e}var wE=Array.prototype.map,SE=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function qhe(e){var t=e.grouping===void 0||e.thousands===void 0?bE:Bhe(wE.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?bE:Uhe(wE.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(f){f=Td(f);var h=f.fill,p=f.align,g=f.sign,m=f.symbol,v=f.zero,x=f.width,y=f.comma,b=f.precision,_=f.trim,S=f.type;S==="n"?(y=!0,S="g"):xE[S]||(b===void 0&&(b=12),_=!0,S="g"),(v||h==="0"&&p==="=")&&(v=!0,h="0",p="=");var j=m==="$"?r:m==="#"&&/[boxX]/.test(S)?"0"+S.toLowerCase():"",O=m==="$"?n:/[%p]/.test(S)?o:"",P=xE[S],N=/[defgprs%]/.test(S);b=b===void 0?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b));function A(C){var T=j,L=O,R,I,D;if(S==="c")L=P(C)+L,C="";else{C=+C;
vendor: 4,292 bytes, line 513
513var $=C<0||1/C<0;if(C=isNaN(C)?l:P(Math.abs(C),b),_&&(C=zhe(C)),$&&+C==0&&g!=="+"&&($=!1),T=($?g==="("?g:s:g==="-"||g==="("?"":g)+T,L=(S==="s"?SE[8+I4/3]:"")+L+($&&g==="("?")":""),N){for(R=-1,I=C.length;++R<I;)if(D=C.charCodeAt(R),48>D||D>57){L=(D===46?i+C.slice(R+1):C.slice(R))+L,C=C.slice(0,R);break}}}y&&!v&&(C=t(C,1/0));var E=T.length+C.length+L.length,M=E<x?new Array(x-E+1).join(h):"";switch(y&&v&&(C=t(M+C,M.length?x-L.length:1/0),M=""),p){case"<":C=T+C+L+M;break;case"=":C=T+M+C+L;break;case"^":C=M.slice(0,E=M.length>>1)+T+C+L+M.slice(E);break;default:C=M+T+C+L;break}return a(C)}return A.toString=function(){return f+""},A}function d(f,h){var p=u((f=Td(f),f.type="f",f)),g=Math.max(-8,Math.min(8,Math.floor(Xl(h)/3)))*3,m=Math.pow(10,-g),v=SE[8+g/3];return function(x){return p(m*x)+v}}return{format:u,formatPrefix:d}}var wh,m_,D4;Vhe({thousands:",",grouping:[3],currency:["$",""]});function Vhe(e){return wh=qhe(e),m_=wh.format,D4=wh.formatPrefix,wh}function Khe(e){return Math.max(0,-Xl(Math.abs(e)))}function Ghe(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Xl(t)/3)))*3-Xl(Math.abs(e)))}function Yhe(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Xl(t)-Xl(e))+1}function L4(e,t,r,n){var i=Nb(e,t,r),a;switch(n=Td(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=Ghe(i,o))&&(n.precision=a),D4(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=Yhe(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=Khe(i))&&(n.precision=a-(n.type==="%")*2);break}}return m_(n)}function ro(e){var t=e.domain;return e.ticks=function(r){var n=t();return Ob(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return L4(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,d=10;for(s<o&&(u=o,o=s,s=u,u=i,i=a,a=u);d-- >0;){if(u=Pb(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 om(){var e=h_();return e.copy=function(){return Pf(e,om())},pn.apply(e,arguments),ro(e)}function F4(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,im),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return F4(e).unknown(t)},e=arguments.length?Array.from(e,im):[0,1],ro(r)}function B4(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 _E(e){return Math.log(e)}function jE(e){return Math.exp(e)}function Xhe(e){return-Math.log(-e)}function Qhe(e){return-Math.exp(-e)}function Jhe(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Zhe(e){return e===10?Jhe:e===Math.E?Math.exp:t=>Math.pow(e,t)}function epe(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 OE(e){return(t,r)=>-e(-t,r)}function g_(e){const t=e(_E,jE),r=t.domain;let n=10,i,a;function o(){return i=epe(n),a=Zhe(n),r()[0]<0?(i=OE(i),a=OE(a),e(Xhe,Qhe)):e(_E,jE),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],d=l[l.length-1];const f=d<u;f&&([u,d]=[d,u]);let h=i(u),p=i(d),g,m;const v=s==null?10:+s;let x=[];if(!(n%1)&&p-h<v){if(h=Math.floor(h),p=Math.ceil(p),u>0){for(;h<=p;++h)for(g=1;g<n;++g)if(m=h<0?g/a(-h):g*a(h),!(m<u)){if(m>d)break;x.push(m)}}else for(;h<=p;++h)for(g=n-1;g>=1;--g)if(m=h>0?g/a(-h):g*a(h),!(m<u)){if(m>d)break;x.push(m)}x.length*2<v&&(x=Ob(u,d,v))}else x=Ob(h,p,Math.min(p-h,v)).map(a);return f?x.reverse():x},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=Td(l)).precision==null&&(l.trim=!0),l=m_(l)),s===1/0)return l;const u=Math.max(1,n*s/t.ticks().length);return d=>{let f=d/a(Math.round(i(d)));return f*n<n-.5&&(f*=n),f<=u?l(d):""}},t.nice=()=>r(B4(r(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function U4(){const e=g_(lv()).domain([1,10]);return e.copy=()=>Pf(e,U4()).base(e.base()),pn.apply(e,arguments),e}
513function PE(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function NE(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function v_(e){var t=1,r=e(PE(t),NE(t));return r.constant=function(n){return arguments.length?e(PE(t=+n),NE(t)):t},ro(r)}function W4(){var e=v_(lv());return e.copy=function(){return Pf(e,W4()).constant(e.constant())},pn.apply(e,arguments)}function EE(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function tpe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function rpe(e){return e<0?-e*e:e*e}function y_(e){var t=e(or,or),r=1;function n(){return r===1?e(or,or):r===.5?e(tpe,rpe):e(EE(r),EE(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},ro(t)}function x_(){var e=y_(lv());return e.copy=function(){return Pf(e,x_()).exponent(e.exponent())},pn.apply(e,arguments),e}function npe(){return x_.apply(null,arguments).exponent(.5)}function kE(e){return Math.sign(e)*e*e}function ipe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function z4(){var e=h_(),t=[0,1],r=!1,n;function i(a){var o=ipe(e(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return e.invert(kE(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,im)).map(kE)),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 z4(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},pn.apply(i,arguments),ro(i)}function H4(){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]=che(e,o/s);return a}function a(o){return o==null||isNaN(o=+o)?n:t[jf(r,o)]}return a.invertExtent=function(o){var s=t.indexOf(o);return s<0?[NaN,NaN]:[s>0?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(Wa),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 H4().domain(e).range(t).unknown(n)},pn.apply(a,arguments)}function q4(){var e=0,t=1,r=1,n=[.5],i=[0,1],a;function o(l){return l!=null&&l<=l?i[jf(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 q4().domain([e,t]).range(i).unknown(a)},pn.apply(ro(o),arguments)}function V4(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[jf(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 V4().domain(e).range(t).unknown(r)},pn.apply(i,arguments)}const ex=new Date,tx=new Date;function Tt(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=>Tt(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)=>(ex.setTime(+a),tx.setTime(+o),e(ex),e(tx),Math.floor(r(ex,tx))),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 sm=Tt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);sm.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Tt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):sm);sm.range;const Ri=1e3,sn=Ri*60,Mi=sn*60,Gi=Mi*24,b_=Gi*7,AE=Gi*30,rx=Gi*365,ko=Tt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ri)},(e,t)=>(t-e)/Ri,e=>e.getUTCSeconds());ko.range;const w_=Tt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ri)},(e,t)=>{e.setTime(+e+t*sn)},(e,t)=>(t-e)/sn,e=>e.getMinutes());w_.range;const S_=Tt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*sn)},(e,t)=>(t-e)/sn,e=>e.getUTCMinutes());S_.range;const __=Tt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ri-e.getMinutes()*sn)},(e,t)=>{e.setTime(+e+t*Mi)},(e,t)=>(t-e)/Mi,e=>e.getHours());__.range;const j_=Tt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Mi)},(e,t)=>(t-e)/Mi,e=>e.getUTCHours());j_.range;const Nf=Tt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*sn)/Gi,e=>e.getDate()-1);Nf.range;const cv=Tt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Gi,e=>e.getUTCDate()-1);cv.range;const K4=Tt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Gi,e=>Math.floor(e/Gi));K4.range;function hs(e){return Tt(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())*sn)/b_)}const uv=hs(0),lm=hs(1),ape=hs(2),ope=hs(3),Ql=hs(4),spe=hs(5),lpe=hs(6);uv.range;lm.range;ape.range;ope.range;Ql.range;spe.range;lpe.range;function ps(e){return Tt(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)/b_)}const dv=ps(0),cm=ps(1),cpe=ps(2),upe=ps(3),Jl=ps(4),dpe=ps(5),fpe=ps(6);dv.range;cm.range;cpe.range;upe.range;Jl.range;dpe.range;fpe.range;const O_=Tt(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());O_.range;const P_=Tt(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());P_.range;const Yi=Tt(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());Yi.every=e=>
vendor: 4,308 bytes, line 513
513!isFinite(e=Math.floor(e))||!(e>0)?null:Tt(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)});Yi.range;const Xi=Tt(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());Xi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Tt(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)});Xi.range;function G4(e,t,r,n,i,a){const o=[[ko,1,Ri],[ko,5,5*Ri],[ko,15,15*Ri],[ko,30,30*Ri],[a,1,sn],[a,5,5*sn],[a,15,15*sn],[a,30,30*sn],[i,1,Mi],[i,3,3*Mi],[i,6,6*Mi],[i,12,12*Mi],[n,1,Gi],[n,2,2*Gi],[r,1,b_],[t,1,AE],[t,3,3*AE],[e,1,rx]];function s(u,d,f){const h=d<u;h&&([u,d]=[d,u]);const p=f&&typeof f.range=="function"?f:l(u,d,f),g=p?p.range(u,+d+1):[];return h?g.reverse():g}function l(u,d,f){const h=Math.abs(d-u)/f,p=l_(([,,v])=>v).right(o,h);if(p===o.length)return e.every(Nb(u/rx,d/rx,f));if(p===0)return sm.every(Math.max(Nb(u,d,f),1));const[g,m]=o[h/o[p-1][2]<o[p][2]/h?p-1:p];return g.every(m)}return[s,l]}const[hpe,ppe]=G4(Xi,P_,dv,K4,j_,S_),[mpe,gpe]=G4(Yi,O_,uv,Nf,__,w_);function nx(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 ix(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 lu(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function vpe(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=cu(i),d=uu(i),f=cu(a),h=uu(a),p=cu(o),g=uu(o),m=cu(s),v=uu(s),x=cu(l),y=uu(l),b={a:$,A:E,b:M,B:F,c:null,d:IE,e:IE,f:Bpe,g:Xpe,G:Jpe,H:Dpe,I:Lpe,j:Fpe,L:Y4,m:Upe,M:Wpe,p:H,q:U,Q:FE,s:BE,S:zpe,u:Hpe,U:qpe,V:Vpe,w:Kpe,W:Gpe,x:null,X:null,y:Ype,Y:Qpe,Z:Zpe,"%":LE},_={a:K,A:J,b:he,B:Ne,c:null,d:DE,e:DE,f:nme,g:hme,G:mme,H:eme,I:tme,j:rme,L:Q4,m:ime,M:ame,p:Y,q:ye,Q:FE,s:BE,S:ome,u:sme,U:lme,V:cme,w:ume,W:dme,x:null,X:null,y:fme,Y:pme,Z:gme,"%":LE},S={a:A,A:C,b:T,B:L,c:R,d:RE,e:RE,f:$pe,g:$E,G:TE,H:ME,I:ME,j:kpe,L:Tpe,m:Epe,M:Ape,p:N,q:Npe,Q:Mpe,s:Ipe,S:Cpe,u:Spe,U:_pe,V:jpe,w:wpe,W:Ope,x:I,X:D,y:$E,Y:TE,Z:Ppe,"%":Rpe};b.x=j(r,b),b.X=j(n,b),b.c=j(t,b),_.x=j(r,_),_.X=j(n,_),_.c=j(t,_);function j(q,Q){return function(X){var B=[],je=-1,ge=0,He=q.length,Be,ht,dr;for(X instanceof Date||(X=new Date(+X));++je<He;)q.charCodeAt(je)===37&&(B.push(q.slice(ge,je)),(ht=CE[Be=q.charAt(++je)])!=null?Be=q.charAt(++je):ht=Be==="e"?" ":"0",(dr=Q[Be])&&(Be=dr(X,ht)),B.push(Be),ge=je+1);return B.push(q.slice(ge,je)),B.join("")}}function O(q,Q){return function(X){var B=lu(1900,void 0,1),je=P(B,q,X+="",0),ge,He;if(je!=X.length)return null;if("Q"in B)return new Date(B.Q);if("s"in B)return new Date(B.s*1e3+("L"in B?B.L:0));if(Q&&!("Z"in B)&&(B.Z=0),"p"in B&&(B.H=B.H%12+B.p*12),B.m===void 0&&(B.m="q"in B?B.q:0),"V"in B){if(B.V<1||B.V>53)return null;"w"in B||(B.w=1),"Z"in B?(ge=ix(lu(B.y,0,1)),He=ge.getUTCDay(),ge=He>4||He===0?cm.ceil(ge):cm(ge),ge=cv.offset(ge,(B.V-1)*7),B.y=ge.getUTCFullYear(),B.m=ge.getUTCMonth(),B.d=ge.getUTCDate()+(B.w+6)%7):(ge=nx(lu(B.y,0,1)),He=ge.getDay(),ge=He>4||He===0?lm.ceil(ge):lm(ge),ge=Nf.offset(ge,(B.V-1)*7),B.y=ge.getFullYear(),B.m=ge.getMonth(),B.d=ge.getDate()+(B.w+6)%7)}else("W"in B||"U"in B)&&("w"in B||(B.w="u"in B?B.u%7:"W"in B?1:0),He="Z"in B?ix(lu(B.y,0,1)).getUTCDay():nx(lu(B.y,0,1)).getDay(),B.m=0,B.d="W"in B?(B.w+6)%7+B.W*7-(He+5)%7:B.w+B.U*7-(He+6)%7);return"Z"in B?(B.H+=B.Z/100|0,B.M+=B.Z%100,ix(B)):nx(B)}}function P(q,Q,X,B){for(var je=0,ge=Q.length,He=X.length,Be,ht;je<ge;){if(B>=He)return-1;if(Be=Q.charCodeAt(je++),Be===37){if(Be=Q.charAt(je++),ht=S[Be in CE?Q.charAt(je++):Be],!ht||(B=ht(q,X,B))<0)return-1}else if(Be!=X.charCodeAt(B++))return-1}return B}function N(q,Q,X){var B=u.exec(Q.slice(X));return B?(q.p=d.get(B[0].toLowerCase()),X+B[0].length):-1}function A(q,Q,X){var B=p.exec(Q.slice(X));return B?(q.w=g.get(B[0].toLowerCase()),X+B[0].length):-1}function C(q,Q,X){var B=f.exec(Q.slice(X));return B?(q.w=h.get(B[0].toLowerCase()),X+B[0].length):-1}function T(q,Q,X){var B=x.exec(Q.slice(X));
vendor: 5,767 bytes, line 513
513return B?(q.m=y.get(B[0].toLowerCase()),X+B[0].length):-1}function L(q,Q,X){var B=m.exec(Q.slice(X));return B?(q.m=v.get(B[0].toLowerCase()),X+B[0].length):-1}function R(q,Q,X){return P(q,t,Q,X)}function I(q,Q,X){return P(q,r,Q,X)}function D(q,Q,X){return P(q,n,Q,X)}function $(q){return o[q.getDay()]}function E(q){return a[q.getDay()]}function M(q){return l[q.getMonth()]}function F(q){return s[q.getMonth()]}function H(q){return i[+(q.getHours()>=12)]}function U(q){return 1+~~(q.getMonth()/3)}function K(q){return o[q.getUTCDay()]}function J(q){return a[q.getUTCDay()]}function he(q){return l[q.getUTCMonth()]}function Ne(q){return s[q.getUTCMonth()]}function Y(q){return i[+(q.getUTCHours()>=12)]}function ye(q){return 1+~~(q.getUTCMonth()/3)}return{format:function(q){var Q=j(q+="",b);return Q.toString=function(){return q},Q},parse:function(q){var Q=O(q+="",!1);return Q.toString=function(){return q},Q},utcFormat:function(q){var Q=j(q+="",_);return Q.toString=function(){return q},Q},utcParse:function(q){var Q=O(q+="",!0);return Q.toString=function(){return q},Q}}}var CE={"-":"",_:" ",0:"0"},Ft=/^\s*\d+/,ype=/^%/,xpe=/[\\^$*+?|[\]().{}]/g;function Te(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 bpe(e){return e.replace(xpe,"\\$&")}function cu(e){return new RegExp("^(?:"+e.map(bpe).join("|")+")","i")}function uu(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function wpe(e,t,r){var n=Ft.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function Spe(e,t,r){var n=Ft.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function _pe(e,t,r){var n=Ft.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function jpe(e,t,r){var n=Ft.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function Ope(e,t,r){var n=Ft.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function TE(e,t,r){var n=Ft.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function $E(e,t,r){var n=Ft.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function Ppe(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 Npe(e,t,r){var n=Ft.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function Epe(e,t,r){var n=Ft.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function RE(e,t,r){var n=Ft.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function kpe(e,t,r){var n=Ft.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function ME(e,t,r){var n=Ft.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function Ape(e,t,r){var n=Ft.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function Cpe(e,t,r){var n=Ft.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function Tpe(e,t,r){var n=Ft.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function $pe(e,t,r){var n=Ft.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function Rpe(e,t,r){var n=ype.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function Mpe(e,t,r){var n=Ft.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function Ipe(e,t,r){var n=Ft.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function IE(e,t){return Te(e.getDate(),t,2)}function Dpe(e,t){return Te(e.getHours(),t,2)}function Lpe(e,t){return Te(e.getHours()%12||12,t,2)}function Fpe(e,t){return Te(1+Nf.count(Yi(e),e),t,3)}function Y4(e,t){return Te(e.getMilliseconds(),t,3)}function Bpe(e,t){return Y4(e,t)+"000"}function Upe(e,t){return Te(e.getMonth()+1,t,2)}function Wpe(e,t){return Te(e.getMinutes(),t,2)}function zpe(e,t){return Te(e.getSeconds(),t,2)}function Hpe(e){var t=e.getDay();return t===0?7:t}function qpe(e,t){return Te(uv.count(Yi(e)-1,e),t,2)}function X4(e){var t=e.getDay();return t>=4||t===0?Ql(e):Ql.ceil(e)}function Vpe(e,t){return e=X4(e),Te(Ql.count(Yi(e),e)+(Yi(e).getDay()===4),t,2)}function Kpe(e){return e.getDay()}function Gpe(e,t){return Te(lm.count(Yi(e)-1,e),t,2)}function Ype(e,t){return Te(e.getFullYear()%100,t,2)}function Xpe(e,t){return e=X4(e),Te(e.getFullYear()%100,t,2)}function Qpe(e,t){return Te(e.getFullYear()%1e4,t,4)}function Jpe(e,t){var r=e.getDay();return e=r>=4||r===0?Ql(e):Ql.ceil(e),Te(e.getFullYear()%1e4,t,4)}function Zpe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Te(t/60|0,"0",2)+Te(t%60,"0",2)}function DE(e,t){return Te(e.getUTCDate(),t,2)}function eme(e,t){return Te(e.getUTCHours(),t,2)}function tme(e,t){return Te(e.getUTCHours()%12||12,t,2)}function rme(e,t){return Te(1+cv.count(Xi(e),e),t,3)}function Q4(e,t){return Te(e.getUTCMilliseconds(),t,3)}function nme(e,t){return Q4(e,t)+"000"}function ime(e,t){return Te(e.getUTCMonth()+1,t,2)}function ame(e,t){return Te(e.getUTCMinutes(),t,2)}function ome(e,t){return Te(e.getUTCSeconds(),t,2)}function sme(e){var t=e.getUTCDay();return t===0?7:t}function lme(e,t){return Te(dv.count(Xi(e)-1,e),t,2)}function J4(e){var t=e.getUTCDay();return t>=4||t===0?Jl(e):Jl.ceil(e)}function cme(e,t){return e=J4(e),Te(Jl.count(Xi(e),e)+(Xi(e).getUTCDay()===4),t,2)}function ume(e){return e.getUTCDay()}function dme(e,t){return Te(cm.count(Xi(e)-1,e),t,2)}function fme(e,t){return Te(e.getUTCFullYear()%100,t,2)}function hme(e,t){return e=J4(e),Te(e.getUTCFullYear()%100,t,2)}function pme(e,t){return Te(e.getUTCFullYear()%1e4,t,4)}function mme(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Jl(e):Jl.ceil(e),Te(e.getUTCFullYear()%1e4,t,4)}function gme(){return"+0000"}function LE(){return"%"}function FE(e){return+e}function BE(e){return Math.floor(+e/1e3)}var $s,Z4,eL;vme({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
513ay","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 vme(e){return $s=vpe(e),Z4=$s.format,$s.parse,eL=$s.utcFormat,$s.utcParse,$s}function yme(e){return new Date(e)}function xme(e){return e instanceof Date?+e:+new Date(+e)}function N_(e,t,r,n,i,a,o,s,l,u){var d=h_(),f=d.invert,h=d.domain,p=u(".%L"),g=u(":%S"),m=u("%I:%M"),v=u("%I %p"),x=u("%a %d"),y=u("%b %d"),b=u("%B"),_=u("%Y");function S(j){return(l(j)<j?p:s(j)<j?g:o(j)<j?m:a(j)<j?v:n(j)<j?i(j)<j?x:y:r(j)<j?b:_)(j)}return d.invert=function(j){return new Date(f(j))},d.domain=function(j){return arguments.length?h(Array.from(j,xme)):h().map(yme)},d.ticks=function(j){var O=h();return e(O[0],O[O.length-1],j??10)},d.tickFormat=function(j,O){return O==null?S:u(O)},d.nice=function(j){var O=h();return(!j||typeof j.range!="function")&&(j=t(O[0],O[O.length-1],j??10)),j?h(B4(O,j)):d},d.copy=function(){return Pf(d,N_(e,t,r,n,i,a,o,s,l,u))},d}function bme(){return pn.apply(N_(mpe,gpe,Yi,O_,uv,Nf,__,w_,ko,Z4).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function wme(){return pn.apply(N_(hpe,ppe,Xi,P_,dv,cv,j_,S_,ko,eL).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function fv(){var e=0,t=1,r,n,i,a,o=or,s=!1,l;function u(f){return f==null||isNaN(f=+f)?l:o(i===0?.5:(f=(a(f)-r)*i,s?Math.max(0,Math.min(1,f)):f))}u.domain=function(f){return arguments.length?([e,t]=f,r=a(e=+e),n=a(t=+t),i=r===n?0:1/(n-r),u):[e,t]},u.clamp=function(f){return arguments.length?(s=!!f,u):s},u.interpolator=function(f){return arguments.length?(o=f,u):o};function d(f){return function(h){var p,g;return arguments.length?([p,g]=h,o=f(p,g),u):[o(0),o(1)]}}return u.range=d(Wc),u.rangeRound=d(f_),u.unknown=function(f){return arguments.length?(l=f,u):l},function(f){return a=f,r=f(e),n=f(t),i=r===n?0:1/(n-r),u}}function no(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function tL(){var e=ro(fv()(or));return e.copy=function(){return no(e,tL())},ra.apply(e,arguments)}function rL(){var e=g_(fv()).domain([1,10]);return e.copy=function(){return no(e,rL()).base(e.base())},ra.apply(e,arguments)}function nL(){var e=v_(fv());return e.copy=function(){return no(e,nL()).constant(e.constant())},ra.apply(e,arguments)}function E_(){var e=y_(fv());return e.copy=function(){return no(e,E_()).exponent(e.exponent())},ra.apply(e,arguments)}function Sme(){return E_.apply(null,arguments).exponent(.5)}function iL(){var e=[],t=or;function r(n){if(n!=null&&!isNaN(n=+n))return t((jf(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(Wa),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)=>lhe(e,a/n))},r.copy=function(){return iL(t).domain(e)},ra.apply(r,arguments)}function hv(){var e=0,t=.5,r=1,n=1,i,a,o,s,l,u=or,d,f=!1,h;function p(m){return isNaN(m=+m)?h:(m=.5+((m=+d(m))-a)*(n*m<n*a?s:l),u(f?Math.max(0,Math.min(1,m)):m))}p.domain=function(m){return arguments.length?([e,t,r]=m,i=d(e=+e),a=d(t=+t),o=d(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(m){return arguments.length?(f=!!m,p):f},p.interpolator=function(m){return arguments.length?(u=m,p):u};function g(m){return function(v){var x,y,b;return arguments.length?([x,y,b]=v,u=Rhe(m,[x,y,b]),p):[u(0),u(.5),u(1)]}}return p.range=g(Wc),p.rangeRound=g(f_),p.unknown=function(m){return arguments.length?(h=m,p):h},function(m){return d=m,i=m(e),a=m(t),o=m(r),s=i===a?0:.5/(a-i),l=a===o?0:.5/(o-a),n=a<i?-1:1,p}}function aL(){var e=ro(hv()(or));return e.copy=function(){return no(e,aL())},ra.apply(e,arguments)}function oL(){var e=g_(hv()).domain([.1,1,10]);return e.copy=function(){return no(e,oL()).base(e.base())},ra.apply(e,arguments)}function sL(){var e=v_(hv());return e.copy=function(){return no(e,sL()).constant(e.constant())},ra.apply(e,arguments)}function k_(){var e=y_(hv());return e.copy=function(){return no(e,k_()).exponent(e.exponent())},ra.apply(e,arguments)}function _me(){return k_.apply(null,arguments).exponent(.5)}const UE=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Ed,scaleDiverging:aL,scaleDivergingLog:oL,scaleDivergingPow:k_,scaleDivergingSqrt:_me,
vendor: 63,863 bytes, lines 513-540
513scaleDivergingSymlog:sL,scaleIdentity:F4,scaleImplicit:Eb,scaleLinear:om,scaleLog:U4,scaleOrdinal:c_,scalePoint:Mu,scalePow:x_,scaleQuantile:H4,scaleQuantize:q4,scaleRadial:z4,scaleSequential:tL,scaleSequentialLog:rL,scaleSequentialPow:E_,scaleSequentialQuantile:iL,scaleSequentialSqrt:Sme,scaleSequentialSymlog:nL,scaleSqrt:npe,scaleSymlog:W4,scaleThreshold:V4,scaleTime:bme,scaleUtc:wme,tickFormat:L4},Symbol.toStringTag,{value:"Module"}));var jme=$c;function Ome(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&&!jme(o):r(o,s)))var s=o,l=a}return l}var pv=Ome;function Pme(e,t){return e>t}var lL=Pme,Nme=pv,Eme=lL,kme=Uc;function Ame(e){return e&&e.length?Nme(e,kme,Eme):void 0}var Cme=Ame;const mv=Ie(Cme);function Tme(e,t){return e<t}var cL=Tme,$me=pv,Rme=cL,Mme=Uc;function Ime(e){return e&&e.length?$me(e,Mme,Rme):void 0}var Dme=Ime;const gv=Ie(Dme);var Lme=zS,Fme=wi,Bme=v4,Ume=jr;function Wme(e,t){var r=Ume(e)?Lme:Bme;return r(e,Fme(t))}var zme=Wme,Hme=m4,qme=zme;function Vme(e,t){return Hme(qme(e,t),1)}var Kme=Vme;const Gme=Ie(Kme);var Yme=i_;function Xme(e,t){return Yme(e,t)}var Qme=Xme;const Ef=Ie(Qme);var zc=1e9,Jme={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},C_,at=!0,dn="[DecimalError] ",Bo=dn+"Invalid argument: ",A_=dn+"Exponent out of range: ",Hc=Math.floor,xo=Math.pow,Zme=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Dr,$t=1e7,tt=7,uL=9007199254740991,um=Hc(uL/tt),ee={};ee.absoluteValue=ee.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};ee.comparedTo=ee.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};ee.decimalPlaces=ee.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*tt;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};ee.dividedBy=ee.div=function(e){return Bi(this,new this.constructor(e))};ee.dividedToIntegerBy=ee.idiv=function(e){var t=this,r=t.constructor;return qe(Bi(t,new r(e),0,1),r.precision)};ee.equals=ee.eq=function(e){return!this.cmp(e)};ee.exponent=function(){return jt(this)};ee.greaterThan=ee.gt=function(e){return this.cmp(e)>0};ee.greaterThanOrEqualTo=ee.gte=function(e){return this.cmp(e)>=0};ee.isInteger=ee.isint=function(){return this.e>this.d.length-2};ee.isNegative=ee.isneg=function(){return this.s<0};ee.isPositive=ee.ispos=function(){return this.s>0};ee.isZero=function(){return this.s===0};ee.lessThan=ee.lt=function(e){return this.cmp(e)<0};ee.lessThanOrEqualTo=ee.lte=function(e){return this.cmp(e)<1};ee.logarithm=ee.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(Dr))throw Error(dn+"NaN");if(r.s<1)throw Error(dn+(r.s?"NaN":"-Infinity"));return r.eq(Dr)?new n(0):(at=!1,t=Bi($d(r,a),$d(e,a),a),at=!0,qe(t,i))};ee.minus=ee.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?hL(t,e):dL(t,(e.s=-e.s,e))};ee.modulo=ee.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(dn+"NaN");return r.s?(at=!1,t=Bi(r,e,0,1).times(e),at=!0,r.minus(t)):qe(new n(r),i)};ee.naturalExponential=ee.exp=function(){return fL(this)};ee.naturalLogarithm=ee.ln=function(){return $d(this)};ee.negated=ee.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};ee.plus=ee.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?dL(t,e):hL(t,(e.s=-e.s,e))};ee.precision=ee.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Bo+e);if(t=jt(i)+1,n=i.d.length-1,r=n*tt+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};ee.squareRoot=ee.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(dn+"NaN")}for(e=jt(s),at=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=ai(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Hc((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(Bi(s,a,o+2)).times(.5),ai(a.d).slice(0,o)===(t=ai(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(qe(a,r+1,0),a.times(a).eq(s)){n=a;break}}else if(t!="9999")break;o+=4}return at=!0,qe(n,r)};ee.times=ee.mul=function(e){var t,r,n,i,a,o,s,l,u,d=this,f=d.constructor,h=d.d,p=(e=new f(e)).d;if(!d.s||!e.s)return new f(0);for(e.s*=d.s,r=d.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%$t|0,t=s/$t|0;a[i]=(a[i]+t)%$t|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,at?qe(e,f.precision):e};ee.toDecimalPlaces=ee.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(mi(e,0,zc),t===void 0?t=n.rounding:mi(t,0,8),qe(r,e+jt(r)+1,t))};ee.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=as(n,!0):(mi(e,0,zc),t===void 0?t=i.rounding:mi(t,0,8),n=qe(new i(n),e+1,t),r=as(n,!0,e+1)),r};ee.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?as(i):(mi(e,0,zc),t===void 0?t=a.rounding:mi(t,0,8),n=qe(new a(i),e+jt(i)+1,t),r=as(n.abs(),!1,e+jt(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};ee.toInteger=ee.toint=function(){var e=this,t=e.constructor;return qe(new t(e),jt(e)+1,t.rounding)};ee.toNumber=function(){return+this};ee.toPower=ee.pow=function(e){var t,r,n,i,a,o,s=this,l=s.constructor,u=12,d=+(e=new l(e));if(!e.s)return new l(Dr);if(s=new l(s),!s.s){if(e.s<1)throw Error(dn+"Infinity");return s}if(s.eq(Dr))return s;if(n=l.precision,e.eq(Dr))return qe(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,a=s.s,o){if((r=d<0?-d:d)<=uL){for(i=new l(Dr),t=Math.ceil(n/tt+4),at=!1;r%2&&(i=i.times(s),zE(i.d,t)),r=Hc(r/2),r!==0;)s=s.times(s),zE(s.d,t);return at=!0,e.s<0?new l(Dr).div(i):qe(i,n)}}else if(a<0)throw Error(dn+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,at=!1,i=e.times($d(s,n+u)),at=!0,i=fL(i),i.s=a,i};ee.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=jt(i),n=as(i,r<=a.toExpNeg||r>=a.toExpPos)):(mi(e,1,zc),t===void 0?t=a.rounding:mi(t,0,8),i=qe(new a(i),e,t),r=jt(i),n=as(i,e<=r||r<=a.toExpNeg,e)),n};ee.toSignificantDigits=ee.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(mi(e,1,zc),t===void 0?t=n.rounding:mi(t,0,8)),qe(new n(r),e,t)};ee.toString=ee.valueOf=ee.val=ee.toJSON=ee[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=jt(e),r=e.constructor;return as(e,t<=r.toExpNeg||t>=r.toExpPos)};function dL(e,t){var r,n,i,a,o,s,l,u,d=e.constructor,f=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),at?qe(t,f):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(f/tt),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)/$t|0,l[a]%=$t;for(r&&(l.unshift(r),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,at?qe(t,f):t}function mi(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Bo+e)}function ai(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=tt-n.length,r&&(a+=va(r)),a+=n;o=e[t],n=o+"",r=tt-n.length,r&&(a+=va(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return a+o}var Bi=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%$t|0,o=a/$t|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*$t+n[a]-i[a];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,a,o){var s,l,u,d,f,h,p,g,m,v,x,y,b,_,S,j,O,P,N=n.constructor,A=n.s==i.s?1:-1,C=n.d,T=i.d;if(!n.s)return new N(n);if(!i.s)throw Error(dn+"Division by zero");for(l=n.e-i.e,O=T.length,S=C.length,p=new N(A),g=p.d=[],u=0;T[u]==(C[u]||0);)++u;if(T[u]>(C[u]||0)&&--l,a==null?y=a=N.precision:o?y=a+(jt(n)-jt(i))+1:y=a,y<0)return new N(0);if(y=y/tt+2|0,u=0,O==1)for(d=0,T=T[0],y++;(u<S||d)&&y--;u++)b=d*$t+(C[u]||0),g[u]=b/T|0,d=b%T|0;else{for(d=$t/(T[0]+1)|0,d>1&&(T=e(T,d),C=e(C,d),O=T.length,S=C.length),_=O,m=C.slice(0,O),v=m.length;v<O;)m[v++]=0;P=T.slice(),P.unshift(0),j=T[0],T[1]>=$t/2&&++j;do d=0,s=t(T,m,O,v),s<0?(x=m[0],O!=v&&(x=x*$t+(m[1]||0)),d=x/j|0,d>1?(d>=$t&&(d=$t-1),f=e(T,d),h=f.length,v=m.length,s=t(f,m,h,v),s==1&&(d--,r(f,O<h?P:T,h))):(d==0&&(s=d=1),f=T.slice()),h=f.length,h<v&&f.unshift(0),r(m,f,v),s==-1&&(v=m.length,s=t(T,m,O,v),s<1&&(d++,r(m,O<v?P:T,v))),v=m.length):s===0&&(d++,m=[0]),g[u++]=d,s&&m[0]?m[v++]=C[_]||0:(m=[C[_]],v=1);while((_++<S||m[0]!==void 0)&&y--)}return g[0]||g.shift(),p.e=l,qe(p,o?a+jt(p)+1:a)}}();function fL(e,t){var r,n,i,a,o,s,l=0,u=0,d=e.constructor,f=d.precision;if(jt(e)>16)throw Error(A_+jt(e));if(!e.s)return new d(Dr);for(t==null?(at=!1,s=f):s=t,o=new d(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(n=Math.log(xo(2,u))/Math.LN10*2+5|0,s+=n,r=i=a=new d(Dr),d.precision=s;;){if(i=qe(i.times(e),s),r=r.times(++l),o=a.plus(Bi(i,r,s)),ai(o.d).slice(0,s)===ai(a.d).slice(0,s)){for(;u--;)a=qe(a.times(a),s);return d.precision=f,t==null?(at=!0,qe(a,f)):a}a=o}}function jt(e){for(var t=e.e*tt,r=e.d[0];r>=10;r/=10)t++;return t}function ax(e,t,r){if(t>e.LN10.sd())throw at=!0,r&&(e.precision=r),Error(dn+"LN10 precision limit exceeded");return qe(new e(e.LN10),t)}function va(e){for(var t="";e--;)t+="0";return t}function $d(e,t){var r,n,i,a,o,s,l,u,d,f=1,h=10,p=e,g=p.d,m=p.constructor,v=m.precision;if(p.s<1)throw Error(dn+(p.s?"NaN":"-Infinity"));if(p.eq(Dr))return new m(0);if(t==null?(at=!1,u=v):u=t,p.eq(10))return t==null&&(at=!0),ax(m,u);if(u+=h,m.precision=u,r=ai(g),n=r.charAt(0),a=jt(p),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)p=p.times(e),r=ai(p.d),n=r.charAt(0),f++;a=jt(p),n>1?(p=new m("0."+r),a++):p=new m(n+"."+r.slice(1))}else return l=ax(m,u+2,v).times(a+""),p=$d(new m(n+"."+r.slice(1)),u-h).plus(l),m.precision=v,t==null?(at=!0,qe(p,v)):p;for(s=o=p=Bi(p.minus(Dr),p.plus(Dr),u),d=qe(p.times(p),u),i=3;;){if(o=qe(o.times(d),u),l=s.plus(Bi(o,new m(i),u)),ai(l.d).slice(0,u)===ai(s.d).slice(0,u))return s=s.times(2),a!==0&&(s=s.plus(ax(m,u+2,v).times(a+""))),s=Bi(s,new m(f),u),m.precision=v,t==null?(at=!0,qe(s,v)):s;s=l,i+=2}}function WE(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=Hc(r/tt),e.d=[],n=(r+1)%tt,r<0&&(n+=tt),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=tt;n<i;)e.d.push(+t.slice(n,n+=tt));t=t.slice(n),n=tt-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),at&&(e.e>um||e.e<-um))throw Error(A_+r)}else e.s=0,e.e=0,e.d=[0];return e}function qe(e,t,r){var n,i,a,o,s,l,u,d,f=e.d;for(o=1,a=f[0];a>=10;a/=10)o++;if(n=t-o,n<0)n+=tt,i=t,u=f[d=0];else{if(d=Math.ceil((n+1)/tt),a=f.length,d>=a)return e;for(u=a=f[d],o=1;a>=10;a/=10)o++;n%=tt,i=n-tt+o}if(r!==void 0&&(a=xo(10,o-i-1),s=u/a%10|0,l=t<0||f[d+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/xo(10,o-i):0:f[d-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return l?(a=jt(e),f.length=1,t=t-a-1,f[0]=xo(10,(tt-t%tt)%tt),e.e=Hc(-t/tt)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(n==0?(f.length=d,a=1,d--):(f.length=d+1,a=xo(10,tt-n),f[d]=i>0?(u/xo(10,o-i)%xo(10,i)|0)*a:0),l)for(;;)if(d==0){(f[0]+=a)==$t&&(f[0]=1,++e.e);break}else{if(f[d]+=a,f[d]!=$t)break;f[d--]=0,a=1}for(n=f.length;f[--n]===0;)f.pop();if(at&&(e.e>um||e.e<-um))throw Error(A_+jt(e));return e}function hL(e,t){var r,n,i,a,o,s,l,u,d,f,h=e.constructor,p=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),at?qe(t,p):t;if(l=e.d,f=t.d,n=t.e,u=e.e,l=l.slice(),o=u-n,o){for(d=o<0,d?(r=l,o=-o,s=f.length):(r=f,n=u,s=l.length),i=Math.max(Math.ceil(p/tt),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=f.length,d=i<s,d&&(s=i),i=0;i<s;i++)if(l[i]!=f[i]){d=l[i]<f[i];break}o=0}for(d&&(r=l,l=f,f=r,t.s=-t.s),s=l.length,i=f.length-s;i>0;--i)l[s++]=0;for(i=f.length;i>o;){if(l[--i]<f[i]){for(a=i;a&&l[--a]===0;)l[a]=$t-1;--l[a],l[i]+=$t}l[i]-=f[i]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--n;return l[0]?(t.d=l,t.e=n,at?qe(t,p):t):new h(0)}function as(e,t,r){var n,i=jt(e),a=ai(e.d),o=a.length;return t?(r&&(n=r-o)>0?a=a.charAt(0)+"."+a.slice(1)+va(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+va(-i-1)+a,r&&(n=r-o)>0&&(a+=va(n))):i>=o?(a+=va(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+va(n))):((n=i+1)<o&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-o)>0&&(i+1===o&&(a+="."),a+=va(n))),e.s<0?"-"+a:a}function zE(e,t){if(e.length>t)return e.length=t,!0}function pL(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(Bo+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 WE(o,a.toString())}else if(typeof a!="string")throw Error(Bo+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,Zme.test(a))WE(o,a);else throw Error(Bo+a)}if(i.prototype=ee,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=pL,i.config=i.set=ege,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 ege(e){if(!e||typeof e!="object")throw Error(dn+"Object expected");var t,r,n,i=["precision",1,zc,"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(Hc(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Bo+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Bo+r+": "+n);return this}var C_=pL(Jme);Dr=new C_(1);const We=C_;function tge(e){return age(e)||ige(e)||nge(e)||rge()}function rge(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 514In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nge(e,t){if(e){if(typeof e=="string")return Tb(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 Tb(e,t)}}function ige(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function age(e){if(Array.isArray(e))return Tb(e)}function Tb(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 oge=function(t){return t},mL={"@@functional/placeholder":!0},gL=function(t){return t===mL},HE=function(t){return function r(){return arguments.length===0||arguments.length===1&&gL(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},sge=function e(t,r){return t===1?r:HE(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!==mL}).length;return o>=t?r.apply(void 0,i):e(t-o,HE(function(){for(var s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];var d=i.map(function(f){return gL(f)?l.shift():f});return r.apply(void 0,tge(d).concat(l))}))})},vv=function(t){return sge(t.length,t)},$b=function(t,r){for(var n=[],i=t;i<r;++i)n[i-t]=i;return n},lge=vv(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),cge=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return oge;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))}},Rb=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},vL=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 uge(e){var t;return e===0?t=1:t=Math.floor(new We(e).abs().log(10).toNumber())+1,t}function dge(e,t,r){for(var n=new We(e),i=0,a=[];n.lt(t)&&i<1e5;)a.push(n.toNumber()),n=n.add(r),i++;return a}var fge=vv(function(e,t,r){var n=+e,i=+t;return n+r*(i-n)}),hge=vv(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),pge=vv(function(e,t,r){var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});const yv={rangeStep:dge,getDigitCount:uge,interpolateNumber:fge,uninterpolateNumber:hge,uninterpolateTruncation:pge};function Mb(e){return vge(e)||gge(e)||yL(e)||mge()}function mge(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 515In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gge(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function vge(e){if(Array.isArray(e))return Ib(e)}function Rd(e,t){return bge(e)||xge(e,t)||yL(e,t)||yge()}function yge(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 516In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yL(e,t){if(e){if(typeof e=="string")return Ib(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 Ib(e,t)}}function Ib(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 xge(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 bge(e){if(Array.isArray(e))return e}function xL(e){var t=Rd(e,2),r=t[0],n=t[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]}function bL(e,t,r){if(e.lte(0))return new We(0);var n=yv.getDigitCount(e.toNumber()),i=new We(10).pow(n),a=e.div(i),o=n!==1?.05:.1,s=new We(Math.ceil(a.div(o).toNumber())).add(r).mul(o),l=s.mul(i);return t?l:new We(Math.ceil(l))}function wge(e,t,r){var n=1,i=new We(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new We(10).pow(yv.getDigitCount(e)-1),i=new We(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new We(Math.floor(e)))}else e===0?i=new We(Math.floor((t-1)/2)):r||(i=new We(Math.floor(e)));var o=Math.floor((t-1)/2),s=cge(lge(function(l){return i.add(new We(l-o).mul(n)).toNumber()}),$b);return s(0,t)}function wL(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 We(0),tickMin:new We(0),tickMax:new We(0)};var a=bL(new We(t).sub(e).div(r-1),n,i),o;e<=0&&t>=0?o=new We(0):(o=new We(e).add(t).div(2),o=o.sub(new We(o).mod(a)));var s=Math.ceil(o.sub(e).div(a).toNumber()),l=Math.ceil(new We(t).sub(o).div(a).toNumber()),u=s+l+1;return u>r?wL(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 We(s).mul(a)),tickMax:o.add(new We(l).mul(a))})}function Sge(e){var t=Rd(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=xL([r,n]),l=Rd(s,2),u=l[0],d=l[1];if(u===-1/0||d===1/0){var f=d===1/0?[u].concat(Mb($b(0,i-1).map(function(){return 1/0}))):[].concat(Mb($b(0,i-1).map(function(){return-1/0})),[d]);return r>n?Rb(f):f}if(u===d)return wge(u,i,a);var h=wL(u,d,o,a),p=h.step,g=h.tickMin,m=h.tickMax,v=yv.rangeStep(g,m.add(new We(.1).mul(p)),p);return r>n?Rb(v):v}function _ge(e,t){var r=Rd(e,2),n=r[0],i=r[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=xL([n,i]),s=Rd(o,2),l=s[0],u=s[1];if(l===-1/0||u===1/0)return[n,i];if(l===u)return[l];var d=Math.max(t,2),f=bL(new We(u).sub(l).div(d-1),a,0),h=[].concat(Mb(yv.rangeStep(new We(l),new We(u).sub(new We(.99).mul(f)),f)),[u]);return n>i?Rb(h):h}var jge=vL(Sge),Oge=vL(_ge),Pge="Invariant failed";function os(e,t){throw new Error(Pge)}var Nge=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];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 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 Ege(e,t){return Tge(e)||Cge(e,t)||Age(e,t)||kge()}function kge(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 517In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Age(e,t){if(e){if(typeof e=="string")return qE(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 qE(e,t)}}function qE(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 Cge(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(d){u=!0,i=d}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Tge(e){if(Array.isArray(e))return e}function $ge(e,t){if(e==null)return{};var r=Rge(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 Rge(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 Mge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ige(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,jL(n.key),n)}}function Dge(e,t,r){return t&&Ige(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Lge(e,t,r){return t=fm(t),Fge(e,SL()?Reflect.construct(t,r||[],fm(e).constructor):t.apply(e,r))}function Fge(e,t){if(t&&(Zl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Bge(e)}function Bge(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function SL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(SL=function(){return!!e})()}function fm(e){return fm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},fm(e)}function Uge(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&&Db(e,t)}function Db(e,t){return Db=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Db(e,t)}function _L(e,t,r){return t=jL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jL(e){var t=Wge(e,"string");return Zl(t)=="symbol"?t:t+""}function Wge(e,t){if(Zl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Zl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var kf=function(e){function t(){return Mge(this,t),Lge(this,t,arguments)}return Uge(t,e),Dge(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,d=n.xAxis,f=n.yAxis,h=$ge(n,Nge),p=le(h,!1);this.props.direction==="x"&&d.type!=="number"&&os();var g=l.map(function(m){var v=u(m,s),x=v.x,y=v.y,b=v.value,_=v.errorVal;if(!_)return null;var S=[],j,O;if(Array.isArray(_)){var P=Ege(_,2);j=P[0],O=P[1]}else j=O=_;if(a==="vertical"){var N=d.scale,A=y+i,C=A+o,T=A-o,L=N(b-j),R=N(b+O);S.push({x1:R,y1:C,x2:R,y2:T}),S.push({x1:L,y1:A,x2:R,y2:A}),S.push({x1:L,y1:C,x2:L,y2:T})}else if(a==="horizontal"){var I=f.scale,D=x+i,$=D-o,E=D+o,M=I(b-j),F=I(b+O);S.push({x1:$,y1:F,x2:E,y2:F}),S.push({x1:D,y1:M,x2:D,y2:F}),S.push({x1:$,y1:M,x2:E,y2:M})}return k.createElement(Ce,dm({className:"recharts-errorBar",key:"bar-".concat(S.map(function(H){return"".concat(H.x1,"-").concat(H.x2,"-").concat(H.y1,"-").concat(H.y2)}))},p),S.map(function(H){return k.createElement("line",dm({},H,{key:"line-".concat(H.x1,"-").concat(H.x2,"-").concat(H.y1,"-").concat(H.y2)}))}))});return k.createElement(Ce,{className:"recharts-errorBars"},g)}}])}(k.Component);_L(kf,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});_L(kf,"displayName","ErrorBar");function Md(e){"@babel/helpers - typeof";return Md=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},Md(e)}function VE(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 co(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?VE(Object(r),!0).forEach(function(n){zge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):VE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zge(e,t,r){return t=Hge(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hge(e){var t=qge(e,"string");return Md(t)=="symbol"?t:t+""}function qge(e,t){if(Md(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Md(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var OL=function(t){var r=t.children,n=t.formattedGraphicalItems,i=t.legendWidth,a=t.legendContent,o=Tr(r,vl);if(!o)return null;var s=vl.defaultProps,l=s!==void 0?co(co({},s),o.props):{},u;return o.props&&o.props.payload?u=o.props&&o.props.payload:a==="children"?u=(n||[]).reduce(function(d,f){var h=f.item,p=f.props,g=p.sectors||p.data||[];return d.concat(g.map(function(m){return{type:o.props.iconType||h.props.legendType,value:m.name,color:m.fill,payload:m}}))},[]):u=(n||[]).map(function(d){var f=d.item,h=f.type.defaultProps,p=h!==void 0?co(co({},h),f.props):{},g=p.dataKey,m=p.name,v=p.legendType,x=p.hide;return{inactive:x,dataKey:g,type:l.iconType||v||"square",color:T_(f),value:m||g,payload:p}}),co(co(co({},l),vl.getWithHeight(o,i)),{},{payload:u,item:o})};function Id(e){"@babel/helpers - typeof";return Id=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},Id(e)}function KE(e){return Yge(e)||Gge(e)||Kge(e)||Vge()}function Vge(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 518In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kge(e,t){if(e){if(typeof e=="string")return Lb(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 Lb(e,t)}}function Gge(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Yge(e){if(Array.isArray(e))return Lb(e)}function Lb(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 GE(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 vt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?GE(Object(r),!0).forEach(function(n){xl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):GE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xl(e,t,r){return t=Xge(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xge(e){var t=Qge(e,"string");return Id(t)=="symbol"?t:t+""}function Qge(e,t){if(Id(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Id(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 xe(e)||xe(t)?r:Ct(t)?Ur(e,t,r):me(t)?t(e):r}function Iu(e,t,r,n){var i=Gme(e,function(s){return kt(s,t)});if(r==="number"){var a=i.filter(function(s){return G(s)||parseFloat(s)});return a.length?[gv(a),mv(a)]:[1/0,-1/0]}var o=n?i.filter(function(s){return!xe(s)}):i;return o.map(function(s){return Ct(s)||s instanceof Date?s:""})}var Jge=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 d=u>0?i[u-1].coordinate:i[s-1].coordinate,f=i[u].coordinate,h=u>=s-1?i[0].coordinate:i[u+1].coordinate,p=void 0;if(ir(f-d)!==ir(h-f)){var g=[];if(ir(h-f)===ir(l[1]-l[0])){p=h;var m=f+l[1]-l[0];g[0]=Math.min(m,(m+d)/2),g[1]=Math.max(m,(m+d)/2)}else{p=d;var v=h+l[1]-l[0];g[0]=Math.min(f,(v+f)/2),g[1]=Math.max(f,(v+f)/2)}var x=[Math.min(f,(p+f)/2),Math.max(f,(p+f)/2)];if(t>x[0]&&t<=x[1]||t>=g[0]&&t<=g[1]){o=i[u].index;break}}else{var y=Math.min(d,h),b=Math.max(d,h);if(t>(y+f)/2&&t<=(b+f)/2){o=i[u].index;break}}}else for(var _=0;_<s;_++)if(_===0&&t<=(n[_].coordinate+n[_+1].coordinate)/2||_>0&&_<s-1&&t>(n[_].coordinate+n[_-1].coordinate)/2&&t<=(n[_].coordinate+n[_+1].coordinate)/2||_===s-1&&t>(n[_].coordinate+n[_-1].coordinate)/2){o=n[_].index;break}return o},T_=function(t){var r,n=t,i=n.type.displayName,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?vt(vt({},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},Zge=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 d=a[s[l]].stackGroups,f=Object.keys(d),h=0,p=f.length;h<p;h++){var g=d[f[h]],m=g.items,v=g.cateAxisId,x=m.filter(function(O){return Fi(O.type).indexOf("Bar")>=0});if(x&&x.length){var y=x[0].type.defaultProps,b=y!==void 0?vt(vt({},y),x[0].props):x[0].props,_=b.barSize,S=b[v];o[S]||(o[S]=[]);var j=xe(_)?r:_;o[S].push({item:x[0],stackList:x.slice(1),barSize:xe(j)?void 0:ar(j,n,0)})}}return o},eve=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=ar(r,i,0,!0),d,f=[];if(o[0].barSize===+o[0].barSize){var h=!1,p=i/l,g=o.reduce(function(_,S){return _+S.barSize||0},0);g+=(l-1)*u,g>=i&&(g-=(l-1)*u,u=0),g>=i&&p>0&&(h=!0,p*=.9,g=l*p);var m=(i-g)/2>>0,v={offset:m-u,size:0};d=o.reduce(function(_,S){var j={item:S.item,position:{offset:v.offset+v.size+u,size:h?p:S.barSize}},O=[].concat(KE(_),[j]);return v=O[O.length-1].position,S.stackList&&S.stackList.length&&S.stackList.forEach(function(P){O.push({item:P,position:v})}),O},f)}else{var x=ar(n,i,0,!0);i-2*x-(l-1)*u<=0&&(u=0);var y=(i-2*x-(l-1)*u)/l;y>1&&(y>>=0);var b=s===+s?Math.min(y,s):y;d=o.reduce(function(_,S,j){var O=[].concat(KE(_),[{item:S.item,position:{offset:x+(y+u)*j+(y-b)/2,size:b}}]);return S.stackList&&S.stackList.length&&S.stackList.forEach(function(P){O.push({item:P,position:O[O.length-1].position})}),O},f)}return d},tve=function(t,r,n,i){var a=n.children,o=n.width,s=n.margin,l=o-(s.left||0)-(s.right||0),u=OL({children:a,legendWidth:l});if(u){var d=i||{},f=d.width,h=d.height,p=u.align,g=u.verticalAlign,m=u.layout;if((m==="vertical"||m==="horizontal"&&g==="middle")&&p!=="center"&&G(t[p]))return vt(vt({},t),{},xl({},p,t[p]+(f||0)));if((m==="horizontal"||m==="vertical"&&p==="center")&&g!=="middle"&&G(t[g]))return vt(vt({},t),{},xl({},g,t[g]+(h||0)))}return t},rve=function(t,r,n){return xe(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},PL=function(t,r,n,i,a){var o=r.props.children,s=Wr(o,kf).filter(function(u){return rve(i,a,u.props.direction)});if(s&&s.length){var l=s.map(function(u){return u.props.dataKey});return t.reduce(function(u,d){var f=kt(d,n);if(xe(f))return u;var h=Array.isArray(f)?[gv(f),mv(f)]:[f,f],p=l.reduce(function(g,m){var v=kt(d,m,0),x=h[0]-Math.abs(Array.isArray(v)?v[0]:v),y=h[1]+Math.abs(Array.isArray(v)?v[1]:v);return[Math.min(x,g[0]),Math.max(y,g[1])]},[1/0,-1/0]);return[Math.min(p[0],u[0]),Math.max(p[1],u[1])]},[1/0,-1/0])}return null},nve=function(t,r,n,i,a){var o=r.map(function(s){return PL(t,s,n,a,i)}).filter(function(s){return!xe(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},NL=function(t,r,n,i,a){var o=r.map(function(l){var u=l.props.dataKey;return n==="number"&&u&&PL(t,l,u,i)||Iu(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 d=0,f=u.length;d<f;d++)s[u[d]]||(s[u[d]]=!0,l.push(u[d]));return l},[])},EL=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},kL=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},Ii=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?ir(s[0]-s[1])*2*u:u,r&&(t.ticks||t.niceTicks)){var d=(t.ticks||t.niceTicks).map(function(f){var h=a?a.indexOf(f):f;return{coordinate:i(h)+u,value:f,offset:u}});return d.filter(function(f){return!Sf(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,h){return{coordinate:i(f)+u,value:f,index:h,offset:u}}):i.ticks&&!n?i.ticks(t.tickCount).map(function(f){return{coordinate:i(f)+u,value:f,offset:u}}):i.domain().map(function(f,h){return{coordinate:i(f)+u,value:a?a[f]:f,index:h,offset:u}})},ox=new WeakMap,Sh=function(t,r){if(typeof r!="function")return t;ox.has(t)||ox.set(t,new WeakMap);var n=ox.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},AL=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:Ed(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:om(),realScaleType:"linear"}:a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:Mu(),realScaleType:"point"}:a==="category"?{scale:Ed(),realScaleType:"band"}:{scale:om(),realScaleType:"linear"};if(rs(i)){var l="scale".concat(ev(i));return{scale:(UE[l]||Mu)(),realScaleType:UE[l]?l:"point"}}return me(i)?{scale:i}:{scale:Mu(),realScaleType:"point"}},YE=1e-4,CL=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])-YE,o=Math.max(i[0],i[1])+YE,s=t(r[0]),l=t(r[n-1]);(s<a||s>o||l<a||l>o)&&t.domain([r[0],r[n-1]])}},ive=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},ave=function(t,r){if(!r||r.length!==2||!G(r[0])||!G(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(!G(t[0])||t[0]<n)&&(a[0]=n),(!G(t[1])||t[1]>i)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]<n&&(a[1]=n),a},ove=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=Sf(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])}},sve=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=Sf(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)}},lve={sign:ove,expand:Nne,none:ql,silhouette:Ene,wiggle:kne,positive:sve},cve=function(t,r,n){var i=r.map(function(s){return s.props.dataKey}),a=lve[n],o=Pne().keys(i).value(function(s,l){return+kt(s,l,0)}).order(cb).offset(a);return o(t)},uve=function(t,r,n,i,a,o){if(!t)return null;var s=o?r.reverse():r,l={},u=s.reduce(function(f,h){var p,g=(p=h.type)!==null&&p!==void 0&&p.defaultProps?vt(vt({},h.type.defaultProps),h.props):h.props,m=g.stackId,v=g.hide;if(v)return f;var x=g[n],y=f[x]||{hasStack:!1,stackGroups:{}};if(Ct(m)){var b=y.stackGroups[m]||{numericAxisId:n,cateAxisId:i,items:[]};b.items.push(h),y.hasStack=!0,y.stackGroups[m]=b}else y.stackGroups[Lc("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[h]};return vt(vt({},f),{},xl({},x,y))},l),d={};return Object.keys(u).reduce(function(f,h){var p=u[h];if(p.hasStack){var g={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(m,v){var x=p.stackGroups[v];return vt(vt({},m),{},xl({},v,{numericAxisId:n,cateAxisId:i,items:x.items,stackedData:cve(t,x.items,a)}))},g)}return vt(vt({},f),{},xl({},h,p))},d)},TL=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 d=jge(u,a,s);return t.domain([gv(d),mv(d)]),{niceTicks:d}}if(a&&i==="number"){var f=t.domain(),h=Oge(f,a,s);return{niceTicks:h}}return null};function XE(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&&!xe(i[t.dataKey])){var s=Fp(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,xe(o)?t.dataKey:o);return xe(l)?null:t.scale(l)}var QE=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 xe(l)?null:r.scale(l)-a/2+i},dve=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]},fve=function(t,r){var n,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?vt(vt({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(Ct(a)){var o=r[a];if(o){var s=o.items.indexOf(t);return s>=0?o.stackedData[s]:null}}return null},hve=function(t){return t.reduce(function(r,n){return[gv(n.concat([r[0]]).filter(G)),mv(n.concat([r[1]]).filter(G))]},[1/0,-1/0])},$L=function(t,r,n){return Object.keys(t).reduce(function(i,a){var o=t[a],s=o.stackedData,l=s.reduce(function(u,d){var f=hve(d.slice(r,n+1));return[Math.min(u[0],f[0]),Math.max(u[1],f[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})},JE=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,ZE=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Fb=function(t,r,n){if(me(t))return t(r,n);if(!Array.isArray(t))return r;var i=[];if(G(t[0]))i[0]=n?t[0]:Math.min(t[0],r[0]);else if(JE.test(t[0])){var a=+JE.exec(t[0])[1];i[0]=r[0]-a}else me(t[0])?i[0]=t[0](r[0]):i[0]=r[0];if(G(t[1]))i[1]=n?t[1]:Math.max(t[1],r[1]);else if(ZE.test(t[1])){var o=+ZE.exec(t[1])[1];i[1]=r[1]+o}else me(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},hm=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=o_(r,function(f){return f.coordinate}),o=1/0,s=1,l=a.length;s<l;s++){var u=a[s],d=a[s-1];o=Math.min((u.coordinate||0)-(d.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0},ek=function(t,r,n){return!t||!t.length||Ef(t,Ur(n,"type.defaultProps.domain"))?r:t},RL=function(t,r){var n=t.type.defaultProps?vt(vt({},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,d=n.hide;return vt(vt({},le(t,!1)),{},{dataKey:i,unit:o,formatter:s,name:a||i,color:T_(t),value:kt(r,i),type:l,payload:r,chartType:u,hide:d})};function Dd(e){"@babel/helpers - typeof";return Dd=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},Dd(e)}function tk(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 Ei(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tk(Object(r),!0).forEach(function(n){ML(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ML(e,t,r){return t=pve(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pve(e){var t=mve(e,"string");return Dd(t)=="symbol"?t:t+""}function mve(e,t){if(Dd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Dd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gve(e,t){return bve(e)||xve(e,t)||yve(e,t)||vve()}function vve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 519In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yve(e,t){if(e){if(typeof e=="string")return rk(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 rk(e,t)}}function rk(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 xve(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(d){u=!0,i=d}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function bve(e){if(Array.isArray(e))return e}var pm=Math.PI/180,wve=function(t){return t*180/Math.PI},Xe=function(t,r,n,i){return{x:t+Math.cos(-pm*i)*n,y:r+Math.sin(-pm*i)*n}},IL=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},Sve=function(t,r,n,i,a){var o=t.width,s=t.height,l=t.startAngle,u=t.endAngle,d=ar(t.cx,o,o/2),f=ar(t.cy,s,s/2),h=IL(o,s,n),p=ar(t.innerRadius,h,0),g=ar(t.outerRadius,h,h*.8),m=Object.keys(r);return m.reduce(function(v,x){var y=r[x],b=y.domain,_=y.reversed,S;if(xe(y.range))i==="angleAxis"?S=[l,u]:i==="radiusAxis"&&(S=[p,g]),_&&(S=[S[1],S[0]]);else{S=y.range;var j=S,O=gve(j,2);l=O[0],u=O[1]}var P=AL(y,a),N=P.realScaleType,A=P.scale;A.domain(b).range(S),CL(A);var C=TL(A,Ei(Ei({},y),{},{realScaleType:N})),T=Ei(Ei(Ei({},y),C),{},{range:S,radius:g,realScaleType:N,scale:A,cx:d,cy:f,innerRadius:p,outerRadius:g,startAngle:l,endAngle:u});return Ei(Ei({},v),{},ML({},x,T))},{})},_ve=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))},jve=function(t,r){var n=t.x,i=t.y,a=r.cx,o=r.cy,s=_ve({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:wve(u),angleInRadian:u}},Ove=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}},Pve=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},nk=function(t,r){var n=t.x,i=t.y,a=jve({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 d=Ove(r),f=d.startAngle,h=d.endAngle,p=s,g;if(f<=h){for(;p>h;)p-=360;for(;p<f;)p+=360;g=p>=f&&p<=h}else{for(;p>f;)p-=360;for(;p<h;)p+=360;g=p>=h&&p<=f}return g?Ei(Ei({},r),{},{radius:o,angle:Pve(p,r)}):null},DL=function(t){return!w.isValidElement(t)&&!me(t)&&typeof t!="boolean"?t.className:""};function Ld(e){"@babel/helpers - typeof";return Ld=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},Ld(e)}var Nve=["offset"];function Eve(e){return Tve(e)||Cve(e)||Ave(e)||kve()}function kve(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 520In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ave(e,t){if(e){if(typeof e=="string")return Bb(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 Bb(e,t)}}function Cve(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Tve(e){if(Array.isArray(e))return Bb(e)}function Bb(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 $ve(e,t){if(e==null)return{};var r=Rve(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 Rve(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 ik(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 Pt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ik(Object(r),!0).forEach(function(n){Mve(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ik(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Mve(e,t,r){return t=Ive(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ive(e){var t=Dve(e,"string");return Ld(t)=="symbol"?t:t+""}function Dve(e,t){if(Ld(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ld(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Fd(){return Fd=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},Fd.apply(this,arguments)}var Lve=function(t){var r=t.value,n=t.formatter,i=xe(t.children)?r:t.children;return me(n)?n(i):i},Fve=function(t,r){var n=ir(r-t),i=Math.min(Math.abs(r-t),360);return n*i},Bve=function(t,r,n){var i=t.position,a=t.viewBox,o=t.offset,s=t.className,l=a,u=l.cx,d=l.cy,f=l.innerRadius,h=l.outerRadius,p=l.startAngle,g=l.endAngle,m=l.clockWise,v=(f+h)/2,x=Fve(p,g),y=x>=0?1:-1,b,_;i==="insideStart"?(b=p+y*o,_=m):i==="insideEnd"?(b=g-y*o,_=!m):i==="end"&&(b=g+y*o,_=m),_=x<=0?_:!_;var S=Xe(u,d,v,b),j=Xe(u,d,v,b+(_?1:-1)*359),O="M".concat(S.x,",").concat(S.y,` 521 A`).concat(v,",").concat(v,",0,1,").concat(_?0:1,`, 522 `).concat(j.x,",").concat(j.y),P=xe(t.id)?Lc("recharts-radial-line-"):t.id;return k.createElement("text",Fd({},n,{dominantBaseline:"central",className:Se("recharts-radial-bar-label",s)}),k.createElement("defs",null,k.createElement("path",{id:P,d:O})),k.createElement("textPath",{xlinkHref:"#".concat(P)},r))},Uve=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,d=a.startAngle,f=a.endAngle,h=(d+f)/2;if(i==="outside"){var p=Xe(o,s,u+n,h),g=p.x,m=p.y;return{x:g,y:m,textAnchor:g>=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 v=(l+u)/2,x=Xe(o,s,v,h),y=x.x,b=x.y;return{x:y,y:b,textAnchor:"middle",verticalAnchor:"middle"}},Wve=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,d=o.height,f=d>=0?1:-1,h=f*i,p=f>0?"end":"start",g=f>0?"start":"end",m=u>=0?1:-1,v=m*i,x=m>0?"end":"start",y=m>0?"start":"end";if(a==="top"){var b={x:s+u/2,y:l-f*i,textAnchor:"middle",verticalAnchor:p};return Pt(Pt({},b),n?{height:Math.max(l-n.y,0),width:u}:{})}if(a==="bottom"){var _={x:s+u/2,y:l+d+h,textAnchor:"middle",verticalAnchor:g};return Pt(Pt({},_),n?{height:Math.max(n.y+n.height-(l+d),0),width:u}:{})}if(a==="left"){var S={x:s-v,y:l+d/2,textAnchor:x,verticalAnchor:"middle"};return Pt(Pt({},S),n?{width:Math.max(S.x-n.x,0),height:d}:{})}if(a==="right"){var j={x:s+u+v,y:l+d/2,textAnchor:y,verticalAnchor:"middle"};return Pt(Pt({},j),n?{width:Math.max(n.x+n.width-j.x,0),height:d}:{})}var O=n?{width:u,height:d}:{};return a==="insideLeft"?Pt({x:s+v,y:l+d/2,textAnchor:y,verticalAnchor:"middle"},O):a==="insideRight"?Pt({x:s+u-v,y:l+d/2,textAnchor:x,verticalAnchor:"middle"},O):a==="insideTop"?Pt({x:s+u/2,y:l+h,textAnchor:"middle",verticalAnchor:g},O):a==="insideBottom"?Pt({x:s+u/2,y:l+d-h,textAnchor:"middle",verticalAnchor:p},O):a==="insideTopLeft"?Pt({x:s+v,y:l+h,textAnchor:y,verticalAnchor:g},O):a==="insideTopRight"?Pt({x:s+u-v,y:l+h,textAnchor:x,verticalAnchor:g},O):a==="insideBottomLeft"?Pt({x:s+v,y:l+d-h,textAnchor:y,verticalAnchor:p},O):a==="insideBottomRight"?Pt({x:s+u-v,y:l+d-h,textAnchor:x,verticalAnchor:p},O):Rc(a)&&(G(a.x)||No(a.x))&&(G(a.y)||No(a.y))?Pt({x:s+ar(a.x,u),y:l+ar(a.y,d),textAnchor:"end",verticalAnchor:"end"},O):Pt({x:s+u/2,y:l+d/2,textAnchor:"middle",verticalAnchor:"middle"},O)},zve=function(t){return"cx"in t&&G(t.cx)};function Mt(e){var t=e.offset,r=t===void 0?5:t,n=$ve(e,Nve),i=Pt({offset:r},n),a=i.viewBox,o=i.position,s=i.value,l=i.children,u=i.content,d=i.className,f=d===void 0?"":d,h=i.textBreakAll;if(!a||xe(s)&&xe(l)&&!w.isValidElement(u)&&!me(u))return null;if(w.isValidElement(u))return w.cloneElement(u,i);var p;if(me(u)){if(p=w.createElement(u,i),w.isValidElement(p))return p}else p=Lve(i);var g=zve(a),m=le(i,!0);if(g&&(o==="insideStart"||o==="insideEnd"||o==="end"))return Bve(i,p,m);var v=g?Uve(i):Wve(i);return k.createElement(is,Fd({className:Se("recharts-label",f)},m,v,{breakAll:h}),p)}Mt.displayName="Label";var LL=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,d=t.outerRadius,f=t.x,h=t.y,p=t.top,g=t.left,m=t.width,v=t.height,x=t.clockWise,y=t.labelViewBox;if(y)return y;if(G(m)&&G(v)){if(G(f)&&G(h))return{x:f,y:h,width:m,height:v};if(G(p)&&G(g))return{x:p,y:g,width:m,height:v}}return G(f)&&G(h)?{x:f,y:h,width:0,height:0}:G(r)&&G(n)?{cx:r,cy:n,startAngle:a||i||0,endAngle:o||i||0,innerRadius:u||0,outerRadius:d||l||s||0,clockWise:x}:t.viewBox?t.viewBox:{}},Hve=function(t,r){return t?t===!0?k.createElement(Mt,{key:"label-implicit",viewBox:r}):Ct(t)?k.createElement(Mt,{key:"label-implicit",viewBox:r,value:t}):w.isValidElement(t)?t.type===Mt?w.cloneElement(t,{key:"label-implicit",viewBox:r}):k.createElement(Mt,{key:"label-implicit",content:t,viewBox:r}):me(t)?k.createElement(Mt,{key:"label-implicit",content:t,viewBox:r}):Rc(t)?k.createElement(Mt,Fd({viewBox:r},t,{key:"label-implicit"})):null:null},qve=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=LL(t),o=Wr(i,Mt).map(function(l,u){return w.cloneElement(l,{viewBox:r||a,key:"label-".concat(u)})});if(!n)return o;var s=Hve(t.label,r||a);return[s].concat(Eve(o))};Mt.parseViewBox=LL;Mt.renderCallByParent=qve;function Vve(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var Kve=Vve;const Gve=Ie(Kve);function Bd(e){"@babel/helpers - typeof";return Bd=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},Bd(e)}var Yve=["valueAccessor"],Xve=["data","dataKey","clockWise","id","textBreakAll"];function Qve(e){return tye(e)||eye(e)||Zve(e)||Jve()}function Jve(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 523In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zve(e,t){if(e){if(typeof e=="string")return Ub(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 Ub(e,t)}}function eye(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function tye(e){if(Array.isArray(e))return Ub(e)}function Ub(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 mm(){return mm=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},mm.apply(this,arguments)}function ak(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 ok(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ak(Object(r),!0).forEach(function(n){rye(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ak(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rye(e,t,r){return t=nye(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nye(e){var t=iye(e,"string");return Bd(t)=="symbol"?t:t+""}function iye(e,t){if(Bd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Bd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function sk(e,t){if(e==null)return{};var r=aye(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 aye(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 oye=function(t){return Array.isArray(t.value)?Gve(t.value):t.value};function Ui(e){var t=e.valueAccessor,r=t===void 0?oye:t,n=sk(e,Yve),i=n.data,a=n.dataKey,o=n.clockWise,s=n.id,l=n.textBreakAll,u=sk(n,Xve);return!i||!i.length?null:k.createElement(Ce,{className:"recharts-label-list"},i.map(function(d,f){var h=xe(a)?r(d,f):kt(d&&d.payload,a),p=xe(s)?{}:{id:"".concat(s,"-").concat(f)};return k.createElement(Mt,mm({},le(d,!0),u,p,{parentViewBox:d.parentViewBox,value:h,textBreakAll:l,viewBox:Mt.parseViewBox(xe(o)?d:ok(ok({},d),{},{clockWise:o})),key:"label-".concat(f),index:f}))}))}Ui.displayName="LabelList";function sye(e,t){return e?e===!0?k.createElement(Ui,{key:"labelList-implicit",data:t}):k.isValidElement(e)||me(e)?k.createElement(Ui,{key:"labelList-implicit",data:t,content:e}):Rc(e)?k.createElement(Ui,mm({data:t},e,{key:"labelList-implicit"})):null:null}function lye(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=Wr(n,Ui).map(function(o,s){return w.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!r)return i;var a=sye(e.label,t);return[a].concat(Qve(i))}Ui.renderCallByParent=lye;function Ud(e){"@babel/helpers - typeof";return Ud=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},Ud(e)}function Wb(){return Wb=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},Wb.apply(this,arguments)}function lk(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 ck(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lk(Object(r),!0).forEach(function(n){cye(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cye(e,t,r){return t=uye(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uye(e){var t=dye(e,"string");return Ud(t)=="symbol"?t:t+""}function dye(e,t){if(Ud(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ud(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var fye=function(t,r){var n=ir(r-t),i=Math.min(Math.abs(r-t),359.999);return n*i},_h=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,d=l*(s?1:-1)+i,f=Math.asin(l/d)/pm,h=u?a:a+o*f,p=Xe(r,n,d,h),g=Xe(r,n,i,h),m=u?a-o*f:a,v=Xe(r,n,d*Math.cos(f*pm),m);return{center:p,circleTangency:g,lineTangency:v,theta:f}},FL=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.startAngle,s=t.endAngle,l=fye(o,s),u=o+l,d=Xe(r,n,a,o),f=Xe(r,n,a,u),h="M ".concat(d.x,",").concat(d.y,` 524 A `).concat(a,",").concat(a,`,0, 525 `).concat(+(Math.abs(l)>180),",").concat(+(o>u),`, 526 `).concat(f.x,",").concat(f.y,` 527 `);if(i>0){var p=Xe(r,n,i,o),g=Xe(r,n,i,u);h+="L ".concat(g.x,",").concat(g.y,` 528 A `).concat(i,",").concat(i,`,0, 529 `).concat(+(Math.abs(l)>180),",").concat(+(o<=u),`, 530 `).concat(p.x,",").concat(p.y," Z")}else h+="L ".concat(r,",").concat(n," Z");return h},hye=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,d=t.endAngle,f=ir(d-u),h=_h({cx:r,cy:n,radius:a,angle:u,sign:f,cornerRadius:o,cornerIsExternal:l}),p=h.circleTangency,g=h.lineTangency,m=h.theta,v=_h({cx:r,cy:n,radius:a,angle:d,sign:-f,cornerRadius:o,cornerIsExternal:l}),x=v.circleTangency,y=v.lineTangency,b=v.theta,_=l?Math.abs(u-d):Math.abs(u-d)-m-b;if(_<0)return s?"M ".concat(g.x,",").concat(g.y,` 531 a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0 532 a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0 533 `):FL({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:u,endAngle:d});var S="M ".concat(g.x,",").concat(g.y,` 534 A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(p.x,",").concat(p.y,` 535 A`).concat(a,",").concat(a,",0,").concat(+(_>180),",").concat(+(f<0),",").concat(x.x,",").concat(x.y,` 536 A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(y.x,",").concat(y.y,` 537 `);if(i>0){var j=_h({cx:r,cy:n,radius:i,angle:u,sign:f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),O=j.circleTangency,P=j.lineTangency,N=j.theta,A=_h({cx:r,cy:n,radius:i,angle:d,sign:-f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),C=A.circleTangency,T=A.lineTangency,L=A.theta,R=l?Math.abs(u-d):Math.abs(u-d)-N-L;if(R<0&&o===0)return"".concat(S,"L").concat(r,",").concat(n,"Z");S+="L".concat(T.x,",").concat(T.y,` 538 A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(C.x,",").concat(C.y,` 539 A`).concat(i,",").concat(i,",0,").concat(+(R>180),",").concat(+(f>0),",").concat(O.x,",").concat(O.y,` 540 A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(P.x,",").concat(P.y,"Z")}else S+="L".concat(r,",").concat(n,"Z");return S},pye={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},BL=function(t){var r=ck(ck({},pye),t),n=r.cx,i=r.cy,a=r.innerRadius,o=r.outerRadius,s=r.cornerRadius,l=r.forceCornerRadius,u=r.cornerIsExternal,d=r.startAngle,f=r.endAngle,h=r.className;if(o<a||d===f)return null;var p=Se("recharts-sector",h),g=o-a,m=ar(s,g,0,!0),v;return m>0&&Math.abs(d-f)<360?v=hye({cx:n,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(m,g/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:d,endAngle:f}):v=FL({cx:n,cy:i,innerRadius:a,outerRadius:o,startAngle:d,endAngle:f}),k.createElement("path",Wb({},le(r,!0),{className:p,d:v,role:"img"}))};function Wd(e){"@babel/helpers - typeof";return Wd=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},Wd(e)}function zb(){return zb=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},zb.apply(this,arguments)}function uk(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 dk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
540t%2?uk(Object(r),!0).forEach(function(n){mye(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mye(e,t,r){return t=gye(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gye(e){var t=vye(e,"string");return Wd(t)=="symbol"?t:t+""}function vye(e,t){if(Wd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Wd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var fk={curveBasisClosed:mne,curveBasisOpen:gne,curveBasis:pne,curveBumpX:ene,curveBumpY:tne,curveLinearClosed:vne,curveLinear:rv,curveMonotoneX:yne,curveMonotoneY:xne,curveNatural:bne,curveStep:wne,curveStepAfter:_ne,curveStepBefore:Sne},jh=function(t){return t.x===+t.x&&t.y===+t.y},du=function(t){return t.x},fu=function(t){return t.y},yye=function(t,r){if(me(t))return t;var n="curve".concat(ev(t));return(n==="curveMonotone"||n==="curveBump")&&r?fk["".concat(n).concat(r==="vertical"?"Y":"X")]:fk[n]||rv},xye=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,d=yye(n,s),f=u?a.filter(function(m){return jh(m)}):a,h;if(Array.isArray(o)){var p=u?o.filter(function(m){return jh(m)}):o,g=f.map(function(m,v){return dk(dk({},m),{},{base:p[v]})});return s==="vertical"?h=ph().y(fu).x1(du).x0(function(m){return m.base.x}):h=ph().x(du).y1(fu).y0(function(m){return m.base.y}),h.defined(jh).curve(d),h(g)}return s==="vertical"&&G(o)?h=ph().y(fu).x1(du).x0(o):G(o)?h=ph().x(du).y1(fu).y0(o):h=RD().x(du).y(fu),h.defined(jh).curve(d),h(f)},gm=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?xye(t):i;return w.createElement("path",zb({},le(t,!1),Bp(t),{className:Se("recharts-curve",r),d:o,ref:a}))},UL={exports:{}},bye="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",wye=bye,Sye=wye;function WL(){}function zL(){}zL.resetWarningCache=WL;var _ye=function(){function e(n,i,a,o,s,l){if(l!==Sye){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:zL,resetWarningCache:WL};return r.PropTypes=r,r};UL.exports=_ye();var jye=UL.exports;const $e=Ie(jye);var Oye=Object.getOwnPropertyNames,Pye=Object.getOwnPropertySymbols,Nye=Object.prototype.hasOwnProperty;function hk(e,t){return function(n,i,a){return e(n,i,a)&&t(n,i,a)}}function Oh(e){return function(r,n,i){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,i);var a=i.cache,o=a.get(r),s=a.get(n);if(o&&s)return o===n&&s===r;a.set(r,n),a.set(n,r);var l=e(r,n,i);return a.delete(r),a.delete(n),l}}function pk(e){return Oye(e).concat(Pye(e))}var Eye=Object.hasOwn||function(e,t){return Nye.call(e,t)};function ms(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var kye="__v",Aye="__o",Cye="_owner",mk=Object.getOwnPropertyDescriptor,gk=Object.keys;function Tye(e,t,r){var 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 $ye(e,t){return ms(e.getTime(),t.getTime())}function Rye(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function Mye(e,t){return e===t}function vk(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var i=new Array(n),a=e.entries(),o,s,l=0;(o=a.next())&&!o.done;){for(var u=t.entries(),d=!1,f=0;(s=u.next())&&!s.done;){if(i[f]){f++;continue}var h=o.value,p=s.value;if(r.equals(h[0],p[0],l,f,e,t,r)&&r.equals(h[1],p[1],h[0],p[0],e,t,r)){d=i[f]=!0;break}f++}if(!d)return!1;l++}return!0}var Iye=ms;function Dye(e,t,r){var n=gk(e),i=n.length;if(gk(t).length!==i)return!1;for(;i-- >0;)if(!HL(e,t,r,n[i]))return!1;return!0}function hu(e,t,r){var n=pk(e),i=n.length;if(pk(t).length!==i)return!1;for(var a,o,s;i-- >0;)if(a=n[i],!HL(e,t,r,a)||(o=mk(e,a),s=mk(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function Lye(e,t){return ms(e.valueOf(),t.valueOf())}function Fye(e,t){return e.source===t.source&&e.flags===t.flags}function yk(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var i=new Array(n),a=e.values(),o,s;(o=a.next())&&!o.done;){for(var l=t.values(),u=!1,d=0;(s=l.next())&&!s.done;){if(!i[d]&&r.equals(o.value,s.value,o.value,s.value,e,t,r)){u=i[d]=!0;break}d++}if(!u)return!1}return!0}function Bye(e,t){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function Uye(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 HL(e,t,r,n){return(n===Cye||n===Aye||n===kye)&&(e.$$typeof||t.$$typeof)?!0:Eye(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var Wye="[object Arguments]",zye="[object Boolean]",Hye="[object Date]",qye="[object Error]",Vye="[object Map]",Kye="[object Number]",Gye="[object Object]",Yye="[object RegExp]",Xye="[object Set]",Qye="[object String]",Jye="[object URL]",Zye=Array.isArray,xk=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,bk=Object.assign,exe=Object.prototype.toString.call.bind(Object.prototype.toString);function txe(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areErrorsEqual,i=e.areFunctionsEqual,a=e.areMapsEqual,o=e.areNumbersEqual,s=e.areObjectsEqual,l=e.arePrimitiveWrappersEqual,u=e.areRegExpsEqual,d=e.areSetsEqual,f=e.areTypedArraysEqual,h=e.areUrlsEqual;return function(g,m,v){if(g===m)return!0;
540if(g==null||m==null)return!1;var x=typeof g;if(x!==typeof m)return!1;if(x!=="object")return x==="number"?o(g,m,v):x==="function"?i(g,m,v):!1;var y=g.constructor;if(y!==m.constructor)return!1;if(y===Object)return s(g,m,v);if(Zye(g))return t(g,m,v);if(xk!=null&&xk(g))return f(g,m,v);if(y===Date)return r(g,m,v);if(y===RegExp)return u(g,m,v);if(y===Map)return a(g,m,v);if(y===Set)return d(g,m,v);var b=exe(g);return b===Hye?r(g,m,v):b===Yye?u(g,m,v):b===Vye?a(g,m,v):b===Xye?d(g,m,v):b===Gye?typeof g.then!="function"&&typeof m.then!="function"&&s(g,m,v):b===Jye?h(g,m,v):b===qye?n(g,m,v):b===Wye?s(g,m,v):b===zye||b===Kye||b===Qye?l(g,m,v):!1}}function rxe(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,i={areArraysEqual:n?hu:Tye,areDatesEqual:$ye,areErrorsEqual:Rye,areFunctionsEqual:Mye,areMapsEqual:n?hk(vk,hu):vk,areNumbersEqual:Iye,areObjectsEqual:n?hu:Dye,arePrimitiveWrappersEqual:Lye,areRegExpsEqual:Fye,areSetsEqual:n?hk(yk,hu):yk,areTypedArraysEqual:n?hu:Bye,areUrlsEqual:Uye};if(r&&(i=bk({},i,r(i))),t){var a=Oh(i.areArraysEqual),o=Oh(i.areMapsEqual),s=Oh(i.areObjectsEqual),l=Oh(i.areSetsEqual);i=bk({},i,{areArraysEqual:a,areMapsEqual:o,areObjectsEqual:s,areSetsEqual:l})}return i}function nxe(e){return function(t,r,n,i,a,o,s){return e(t,r,s)}}function ixe(e){var t=e.circular,r=e.comparator,n=e.createState,i=e.equals,a=e.strict;if(n)return function(l,u){var d=n(),f=d.cache,h=f===void 0?t?new WeakMap:void 0:f,p=d.meta;return r(l,u,{cache:h,equals:i,meta:p,strict:a})};if(t)return function(l,u){return r(l,u,{cache:new WeakMap,equals:i,meta:void 0,strict:a})};var o={cache:void 0,equals:i,meta:void 0,strict:a};return function(l,u){return r(l,u,o)}}var axe=io();io({strict:!0});io({circular:!0});io({circular:!0,strict:!0});io({createInternalComparator:function(){return ms}});io({strict:!0,createInternalComparator:function(){return ms}});io({circular:!0,createInternalComparator:function(){return ms}});io({circular:!0,createInternalComparator:function(){return ms},strict:!0});function io(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,i=e.createState,a=e.strict,o=a===void 0?!1:a,s=rxe(e),l=txe(s),u=n?n(l):nxe(l);return ixe({circular:r,comparator:l,createState:i,equals:u,strict:o})}function oxe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function wk(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):oxe(i)};requestAnimationFrame(n)}function Hb(e){"@babel/helpers - typeof";return Hb=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},Hb(e)}function sxe(e){return dxe(e)||uxe(e)||cxe(e)||lxe()}function lxe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 541In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cxe(e,t){if(e){if(typeof e=="string")return Sk(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 Sk(e,t)}}function Sk(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 uxe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function dxe(e){if(Array.isArray(e))return e}function fxe(){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=sxe(o),l=s[0],u=s.slice(1);if(typeof l=="number"){wk(i.bind(null,u),l);return}i(l),wk(i.bind(null,u));return}Hb(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 zd(e){"@babel/helpers - typeof";return zd=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},zd(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 jk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
vendor: 58,692 bytes, lines 541-559
541t%2?_k(Object(r),!0).forEach(function(n){qL(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 qL(e,t,r){return t=hxe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hxe(e){var t=pxe(e,"string");return zd(t)==="symbol"?t:String(t)}function pxe(e,t){if(zd(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(zd(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var mxe=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,i){return n.filter(function(a){return i.includes(a)})})},gxe=function(t){return t},vxe=function(t){return t.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},Du=function(t,r){return Object.keys(r).reduce(function(n,i){return jk(jk({},n),{},qL({},i,t(i,r[i])))},{})},Ok=function(t,r,n){return t.map(function(i){return"".concat(vxe(i)," ").concat(r,"ms ").concat(n)}).join(",")};function yxe(e,t){return wxe(e)||bxe(e,t)||VL(e,t)||xxe()}function xxe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 542In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bxe(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(d){u=!0,i=d}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function wxe(e){if(Array.isArray(e))return e}function Sxe(e){return Oxe(e)||jxe(e)||VL(e)||_xe()}function _xe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 543In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VL(e,t){if(e){if(typeof e=="string")return qb(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 qb(e,t)}}function jxe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Oxe(e){if(Array.isArray(e))return qb(e)}function qb(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 vm=1e-4,KL=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},GL=function(t,r){return t.map(function(n,i){return n*Math.pow(r,i)}).reduce(function(n,i){return n+i})},Pk=function(t,r){return function(n){var i=KL(t,r);return GL(i,n)}},Pxe=function(t,r){return function(n){var i=KL(t,r),a=[].concat(Sxe(i.map(function(o,s){return o*s}).slice(1)),[0]);return GL(a,n)}},Nk=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(v){return parseFloat(v)}),d=yxe(u,4);i=d[0],a=d[1],o=d[2],s=d[3]}}}var f=Pk(i,o),h=Pk(a,s),p=Pxe(i,o),g=function(x){return x>1?1:x<0?0:x},m=function(x){for(var y=x>1?1:x,b=y,_=0;_<8;++_){var S=f(b)-y,j=p(b);if(Math.abs(S-y)<vm||j<vm)return h(b);b=g(b-S/j)}return h(b)};return m.isStepper=!1,m},Nxe=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(d,f,h){var p=-(d-f)*n,g=h*a,m=h+(p-g)*s/1e3,v=h*s/1e3+d;return Math.abs(v-f)<vm&&Math.abs(m)<vm?[f,0]:[v,m]};return l.isStepper=!0,l.dt=s,l},Exe=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 Nk(i);case"spring":return Nxe();default:if(i.split("(")[0]==="cubic-bezier")return Nk(i)}return typeof i=="function"?i:null};function Hd(e){"@babel/helpers - typeof";return Hd=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},Hd(e)}function Ek(e){return Cxe(e)||Axe(e)||YL(e)||kxe()}function kxe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 544In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Axe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Cxe(e){if(Array.isArray(e))return Kb(e)}function kk(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 Wt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kk(Object(r),!0).forEach(function(n){Vb(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Vb(e,t,r){return t=Txe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Txe(e){var t=$xe(e,"string");return Hd(t)==="symbol"?t:String(t)}function $xe(e,t){if(Hd(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Hd(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Rxe(e,t){return Dxe(e)||Ixe(e,t)||YL(e,t)||Mxe()}function Mxe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 545In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YL(e,t){if(e){if(typeof e=="string")return Kb(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 Kb(e,t)}}function Kb(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 Ixe(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(d){u=!0,i=d}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Dxe(e){if(Array.isArray(e))return e}var ym=function(t,r,n){return t+(r-t)*n},Gb=function(t){var r=t.from,n=t.to;return r!==n},Lxe=function e(t,r,n){var i=Du(function(a,o){if(Gb(o)){var s=t(o.from,o.to,o.velocity),l=Rxe(s,2),u=l[0],d=l[1];return Wt(Wt({},o),{},{from:u,velocity:d})}return o},r);return n<1?Du(function(a,o){return Gb(o)?Wt(Wt({},o),{},{velocity:ym(o.velocity,i[a].velocity,n),from:ym(o.from,i[a].from,n)}):o},r):e(t,i,n-1)};const Fxe=function(e,t,r,n,i){var a=mxe(e,t),o=a.reduce(function(v,x){return Wt(Wt({},v),{},Vb({},x,[e[x],t[x]]))},{}),s=a.reduce(function(v,x){return Wt(Wt({},v),{},Vb({},x,{from:e[x],velocity:0,to:t[x]}))},{}),l=-1,u,d,f=function(){return null},h=function(){return Du(function(x,y){return y.from},s)},p=function(){return!Object.values(s).filter(Gb).length},g=function(x){u||(u=x);var y=x-u,b=y/r.dt;s=Lxe(r,s,b),i(Wt(Wt(Wt({},e),t),h())),u=x,p()||(l=requestAnimationFrame(f))},m=function(x){d||(d=x);var y=(x-d)/n,b=Du(function(S,j){return ym.apply(void 0,Ek(j).concat([r(y)]))},o);if(i(Wt(Wt(Wt({},e),t),b)),y<1)l=requestAnimationFrame(f);else{var _=Du(function(S,j){return ym.apply(void 0,Ek(j).concat([r(1)]))},o);i(Wt(Wt(Wt({},e),t),_))}};return f=r.isStepper?g:m,function(){return requestAnimationFrame(f),function(){cancelAnimationFrame(l)}}};function ec(e){"@babel/helpers - typeof";return ec=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},ec(e)}var Bxe=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function Uxe(e,t){if(e==null)return{};var r=Wxe(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 Wxe(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 sx(e){return Vxe(e)||qxe(e)||Hxe(e)||zxe()}function zxe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 546In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hxe(e,t){if(e){if(typeof e=="string")return Yb(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 Yb(e,t)}}function qxe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Vxe(e){if(Array.isArray(e))return Yb(e)}function Yb(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 Ak(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 wn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ak(Object(r),!0).forEach(function(n){wu(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ak(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function wu(e,t,r){return t=XL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Kxe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gxe(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,XL(n.key),n)}}function Yxe(e,t,r){return t&&Gxe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function XL(e){var t=Xxe(e,"string");return ec(t)==="symbol"?t:String(t)}function Xxe(e,t){if(ec(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ec(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qxe(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&&Xb(e,t)}function Xb(e,t){return Xb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Xb(e,t)}function Jxe(e){var t=Zxe();return function(){var n=xm(e),i;if(t){var a=xm(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return Qb(this,i)}}function Qb(e,t){if(t&&(ec(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Jb(e)}function Jb(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zxe(){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 xm(e){return xm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},xm(e)}var gi=function(e){Qxe(r,e);var t=Jxe(r);function r(n,i){var a;Kxe(this,r),a=t.call(this,n,i);var o=a.props,s=o.isActive,l=o.attributeName,u=o.from,d=o.to,f=o.steps,h=o.children,p=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(Jb(a)),a.changeStyle=a.changeStyle.bind(Jb(a)),!s||p<=0)return a.state={style:{}},typeof h=="function"&&(a.state={style:d}),Qb(a);if(f&&f.length)a.state={style:f[0].style};else if(u){if(typeof h=="function")return a.state={style:u},Qb(a);a.state={style:l?wu({},l,u):u}}else a.state={style:{}};return a}return Yxe(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,d=a.to,f=a.from,h=this.state.style;if(s){if(!o){var p={style:l?wu({},l,d):d};this.state&&h&&(l&&h[l]!==d||!l&&h!==d)&&this.setState(p);return}if(!(axe(i.to,d)&&i.canBegin&&i.isActive)){var g=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var m=g||u?f:i.to;if(this.state&&h){var v={style:l?wu({},l,m):m};(l&&h[l]!==m||!l&&h!==m)&&this.setState(v)}this.runAnimation(wn(wn({},this.props),{},{from:m,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,d=i.begin,f=i.onAnimationEnd,h=i.onAnimationStart,p=Fxe(o,s,Exe(u),l,this.changeStyle),g=function(){a.stopJSAnimation=p()};this.manager.start([h,d,g,l,f])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,s=i.begin,l=i.onAnimationStart,u=o[0],d=u.style,f=u.duration,h=f===void 0?0:f,p=function(m,v,x){if(x===0)return m;var y=v.duration,b=v.easing,_=b===void 0?"ease":b,S=v.style,j=v.properties,O=v.onAnimationEnd,P=x>0?o[x-1]:v,N=j||Object.keys(S);if(typeof _=="function"||_==="spring")return[].concat(sx(m),[a.runJSAnimation.bind(a,{from:P.style,to:S,duration:y,easing:_}),y]);var A=Ok(N,y,_),C=wn(wn(wn({},P.style),S),{},{transition:A});return[].concat(sx(m),[C,y,O]).filter(gxe)};return this.manager.start([l].concat(sx(o.reduce(p,[d,Math.max(h,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=fxe());var a=i.begin,o=i.duration,s=i.attributeName,l=i.to,u=i.easing,d=i.onAnimationStart,f=i.onAnimationEnd,h=i.steps,p=i.children,g=this.manager;if(this.unSubscribe=g.subscribe(this.handleStyleChange),typeof u=="function"||typeof p=="function"||u==="spring"){this.runJSAnimation(i);return}if(h.length>1){this.runStepAnimation(i);return}var m=s?wu({},s,l):l,v=Ok(Object.keys(m),o,u);g.start([d,a,wn(wn({},m),{},{transition:v}),o,f])}},{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=Uxe(i,Bxe),u=w.Children.count(a),d=this.state.style;if(typeof a=="function")return a(d);if(!s||u===0||o<=0)return a;var f=function(p){var g=p.props,m=g.style,v=m===void 0?{}:m,x=g.className,y=w.cloneElement(p,wn(wn({},l),{},{style:wn(wn({},v),d),className:x}));return y};return u===1?f(w.Children.only(a)):k.createElement("div",null,w.Children.map(a,function(h){return f(h)}))}}]),r}(w.PureComponent);gi.displayName="Animate";gi.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};gi.propTypes={from:$e.oneOfType([$e.object,$e.string]),to:$e.oneOfType([$e.object,$e.string]),attributeName:$e.string,duration:$e.number,begin:$e.number,easing:$e.oneOfType([$e.string,$e.func]),steps:$e.arrayOf($e.shape({duration:$e.number.isRequired,style:$e.object.isRequired,easing:$e.oneOfType([$e.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),$e.func]),properties:$e.arrayOf("string"),onAnimationEnd:$e.func})),children:$e.oneOfType([$e.node,$e.func]),isActive:$e.bool,canBegin:$e.bool,onAnimationEnd:$e.func,shouldReAnimate:$e.bool,onAnimationStart:$e.func,onAnimationReStart:$e.func};function qd(e){"@babel/helpers - typeof";return qd=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},qd(e)}function bm(){return bm=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},bm.apply(this,arguments)}function e0e(e,t){return i0e(e)||n0e(e,t)||r0e(e,t)||t0e()}function t0e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 547In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function r0e(e,t){if(e){if(typeof e=="string")return Ck(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 Ck(e,t)}}function Ck(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 n0e(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(d){u=!0,i=d}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function i0e(e){if(Array.isArray(e))return e}function Tk(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 $k(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Tk(Object(r),!0).forEach(function(n){a0e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function a0e(e,t,r){return t=o0e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o0e(e){var t=s0e(e,"string");return qd(t)=="symbol"?t:t+""}function s0e(e,t){if(qd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(qd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Rk=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,d;if(o>0&&a instanceof Array){for(var f=[0,0,0,0],h=0,p=4;h<p;h++)f[h]=a[h]>o?o:a[h];d="M".concat(t,",").concat(r+s*f[0]),f[0]>0&&(d+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(u,",").concat(t+l*f[0],",").concat(r)),d+="L ".concat(t+n-l*f[1],",").concat(r),f[1]>0&&(d+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(u,`, 548 `).concat(t+n,",").concat(r+s*f[1])),d+="L ".concat(t+n,",").concat(r+i-s*f[2]),f[2]>0&&(d+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(u,`, 549 `).concat(t+n-l*f[2],",").concat(r+i)),d+="L ".concat(t+l*f[3],",").concat(r+i),f[3]>0&&(d+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(u,`, 550 `).concat(t,",").concat(r+i-s*f[3])),d+="Z"}else if(o>0&&a===+a&&a>0){var g=Math.min(o,a);d="M ".concat(t,",").concat(r+s*g,` 551 A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t+l*g,",").concat(r,` 552 L `).concat(t+n-l*g,",").concat(r,` 553 A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t+n,",").concat(r+s*g,` 554 L `).concat(t+n,",").concat(r+i-s*g,` 555 A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t+n-l*g,",").concat(r+i,` 556 L `).concat(t+l*g,",").concat(r+i,` 557 A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t,",").concat(r+i-s*g," Z")}else d="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return d},l0e=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),d=Math.max(a,a+s),f=Math.min(o,o+l),h=Math.max(o,o+l);return n>=u&&n<=d&&i>=f&&i<=h}return!1},c0e={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},$_=function(t){var r=$k($k({},c0e),t),n=w.useRef(),i=w.useState(-1),a=e0e(i,2),o=a[0],s=a[1];w.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var _=n.current.getTotalLength();_&&s(_)}catch{}},[]);var l=r.x,u=r.y,d=r.width,f=r.height,h=r.radius,p=r.className,g=r.animationEasing,m=r.animationDuration,v=r.animationBegin,x=r.isAnimationActive,y=r.isUpdateAnimationActive;if(l!==+l||u!==+u||d!==+d||f!==+f||d===0||f===0)return null;var b=Se("recharts-rectangle",p);return y?k.createElement(gi,{canBegin:o>0,from:{width:d,height:f,x:l,y:u},to:{width:d,height:f,x:l,y:u},duration:m,animationEasing:g,isActive:y},function(_){var S=_.width,j=_.height,O=_.x,P=_.y;return k.createElement(gi,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:m,isActive:x,easing:g},k.createElement("path",bm({},le(r,!0),{className:b,d:Rk(O,P,S,j,h),ref:n})))}):k.createElement("path",bm({},le(r,!0),{className:b,d:Rk(l,u,d,f,h)}))},u0e=["points","className","baseLinePoints","connectNulls"];function Zs(){return Zs=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},Zs.apply(this,arguments)}function d0e(e,t){if(e==null)return{};var r=f0e(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 f0e(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 Mk(e){return g0e(e)||m0e(e)||p0e(e)||h0e()}function h0e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 558In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function p0e(e,t){if(e){if(typeof e=="string")return Zb(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 Zb(e,t)}}function m0e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function g0e(e){if(Array.isArray(e))return Zb(e)}function Zb(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 Ik=function(t){return t&&t.x===+t.x&&t.y===+t.y},v0e=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=[[]];return t.forEach(function(n){Ik(n)?r[r.length-1].push(n):r[r.length-1].length>0&&r.push([])}),Ik(t[0])&&r[r.length-1].push(t[0]),r[r.length-1].length<=0&&(r=r.slice(0,-1)),r},Lu=function(t,r){var n=v0e(t);r&&(n=[n.reduce(function(a,o){return[].concat(Mk(a),Mk(o))},[])]);var i=n.map(function(a){return a.reduce(function(o,s,l){return"".concat(o).concat(l===0?"M":"L").concat(s.x,",").concat(s.y)},"")}).join("");return n.length===1?"".concat(i,"Z"):i},y0e=function(t,r,n){var i=Lu(t,n);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(Lu(r.reverse(),n).slice(1))},x0e=function(t){var r=t.points,n=t.className,i=t.baseLinePoints,a=t.connectNulls,o=d0e(t,u0e);if(!r||!r.length)return null;var s=Se("recharts-polygon",n);if(i&&i.length){var l=o.stroke&&o.stroke!=="none",u=y0e(r,i,a);return k.createElement("g",{className:s},k.createElement("path",Zs({},le(o,!0),{fill:u.slice(-1)==="Z"?o.fill:"none",stroke:"none",d:u})),l?k.createElement("path",Zs({},le(o,!0),{fill:"none",d:Lu(r,a)})):null,l?k.createElement("path",Zs({},le(o,!0),{fill:"none",d:Lu(i,a)})):null)}var d=Lu(r,a);return k.createElement("path",Zs({},le(o,!0),{fill:d.slice(-1)==="Z"?o.fill:"none",className:s,d}))};function ew(){return ew=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},ew.apply(this,arguments)}var xv=function(t){var r=t.cx,n=t.cy,i=t.r,a=t.className,o=Se("recharts-dot",a);return r===+r&&n===+n&&i===+i?w.createElement("circle",ew({},le(t,!1),Bp(t),{className:o,cx:r,cy:n,r:i})):null};function Vd(e){"@babel/helpers - typeof";return Vd=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},Vd(e)}var b0e=["x","y","top","left","width","height","className"];function tw(){return tw=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},tw.apply(this,arguments)}function Dk(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 w0e(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Dk(Object(r),!0).forEach(function(n){S0e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Dk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function S0e(e,t,r){return t=_0e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _0e(e){var t=j0e(e,"string");return Vd(t)=="symbol"?t:t+""}function j0e(e,t){if(Vd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Vd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function O0e(e,t){if(e==null)return{};var r=P0e(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 P0e(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 N0e=function(t,r,n,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(r,"h").concat(n)},E0e=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,d=t.width,f=d===void 0?0:d,h=t.height,p=h===void 0?0:h,g=t.className,m=O0e(t,b0e),v=w0e({x:n,y:a,top:s,left:u,width:f,height:p},m);return!G(n)||!G(a)||!G(f)||!G(p)||!G(s)||!G(u)?null:k.createElement("path",tw({},le(v,!0),{className:Se("recharts-cross",g),d:N0e(n,a,f,p,s,u)}))},k0e=pv,A0e=lL,C0e=wi;function T0e(e,t){return e&&e.length?k0e(e,C0e(t),A0e):void 0}var $0e=T0e;const R0e=Ie($0e);var M0e=pv,I0e=wi,D0e=cL;function L0e(e,t){return e&&e.length?M0e(e,I0e(t),D0e):void 0}var F0e=L0e;const B0e=Ie(F0e);var U0e=["cx","cy","angle","ticks","axisLine"],W0e=["ticks","tick","angle","tickFormatter","stroke"];function tc(e){"@babel/helpers - typeof";return tc=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},tc(e)}function Fu(){return Fu=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},Fu.apply(this,arguments)}function Lk(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 uo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Lk(Object(r),!0).forEach(function(n){bv(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Fk(e,t){if(e==null)return{};var r=z0e(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 z0e(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 H0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bk(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,JL(n.key),n)}}function q0e(e,t,r){return t&&Bk(e.prototype,t),r&&Bk(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function V0e(e,t,r){return t=wm(t),K0e(e,QL()?Reflect.construct(t,r||[],wm(e).constructor):t.apply(e,r))}function K0e(e,t){if(t&&(tc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return G0e(e)}function G0e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function QL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(QL=function(){return!!e})()}function wm(e){return wm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},wm(e)}function Y0e(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&&rw(e,t)}function rw(e,t){return rw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},rw(e,t)}function bv(e,t,r){return t=JL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function JL(e){var t=X0e(e,"string");return tc(t)=="symbol"?t:t+""}function X0e(e,t){if(tc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(tc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var wv=function(e){function t(){return H0e(this,t),V0e(this,t,arguments)}return Y0e(t,e),q0e(t,[{key:"getTickValueCoord",value:function(n){var i=n.coordinate,a=this.props,o=a.angle,s=a.cx,l=a.cy;return Xe(s,l,i,o)}},{key:"getTickTextAnchor",value:function(){var n=this.props.orientation,i;switch(n){case"left":i="end";break;case"right":i="start";break;default:i="middle";break}return i}},{key:"getViewBox",value:function(){var n=this.props,i=n.cx,a=n.cy,o=n.angle,s=n.ticks,l=R0e(s,function(d){return d.coordinate||0}),u=B0e(s,function(d){return d.coordinate||0});return{cx:i,cy:a,startAngle:o,endAngle:o,innerRadius:u.coordinate||0,outerRadius:l.coordinate||0}}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,a=n.cy,o=n.angle,s=n.ticks,l=n.axisLine,u=Fk(n,U0e),d=s.reduce(function(g,m){return[Math.min(g[0],m.coordinate),Math.max(g[1],m.coordinate)]},[1/0,-1/0]),f=Xe(i,a,d[0],o),h=Xe(i,a,d[1],o),p=uo(uo(uo({},le(u,!1)),{},{fill:"none"},le(l,!1)),{},{x1:f.x,y1:f.y,x2:h.x,y2:h.y});return k.createElement("line",Fu({className:"recharts-polar-radius-axis-line"},p))}},{key:"renderTicks",value:function(){var n=this,i=this.props,a=i.ticks,o=i.tick,s=i.angle,l=i.tickFormatter,u=i.stroke,d=Fk(i,W0e),f=this.getTickTextAnchor(),h=le(d,!1),p=le(o,!1),g=a.map(function(m,v){var x=n.getTickValueCoord(m),y=uo(uo(uo(uo({textAnchor:f,transform:"rotate(".concat(90-s,", ").concat(x.x,", ").concat(x.y,")")},h),{},{stroke:"none",fill:u},p),{},{index:v},x),{},{payload:m});return k.createElement(Ce,Fu({className:Se("recharts-polar-radius-axis-tick",DL(o)),key:"tick-".concat(m.coordinate)},ns(n.props,m,v)),t.renderTickItem(o,y,l?l(m.value,v):m.value))});return k.createElement(Ce,{className:"recharts-polar-radius-axis-ticks"},g)}},{key:"render",value:function(){var n=this.props,i=n.ticks,a=n.axisLine,o=n.tick;return!i||!i.length?null:k.createElement(Ce,{className:Se("recharts-polar-radius-axis",this.props.className)},a&&this.renderAxisLine(),o&&this.renderTicks(),Mt.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(n,i,a){var o;return k.isValidElement(n)?o=k.cloneElement(n,i):me(n)?o=n(i):o=k.createElement(is,Fu({},i,{className:"recharts-polar-radius-axis-tick-value"}),a),o}}])}(w.PureComponent);bv(wv,"displayName","PolarRadiusAxis");bv(wv,"axisType","radiusAxis");bv(wv,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function rc(e){"@babel/helpers - typeof";return rc=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},rc(e)}function So(){return So=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},So.apply(this,arguments)}function Uk(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 fo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Uk(Object(r),!0).forEach(function(n){Sv(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Uk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Q0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wk(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,e3(n.key),n)}}function J0e(e,t,r){return t&&Wk(e.prototype,t),r&&Wk(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Z0e(e,t,r){return t=Sm(t),ebe(e,ZL()?Reflect.construct(t,r||[],Sm(e).constructor):t.apply(e,r))}function ebe(e,t){if(t&&(rc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return tbe(e)}function tbe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ZL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ZL=function(){return!!e})()}function Sm(e){return Sm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Sm(e)}function rbe(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&&nw(e,t)}function nw(e,t){return nw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},nw(e,t)}function Sv(e,t,r){return t=e3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function e3(e){var t=nbe(e,"string");return rc(t)=="symbol"?t:t+""}function nbe(e,t){if(rc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(rc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ibe=Math.PI/180,zk=1e-5,_v=function(e){function t(){return Q0e(this,t),Z0e(this,t,arguments)}return rbe(t,e),J0e(t,[{key:"getTickLineCoord",value:function(n){var i=this.props,a=i.cx,o=i.cy,s=i.radius,l=i.orientation,u=i.tickSize,d=u||8,f=Xe(a,o,s,n.coordinate),h=Xe(a,o,s+(l==="inner"?-1:1)*d,n.coordinate);return{x1:f.x,y1:f.y,x2:h.x,y2:h.y}}},{key:"getTickTextAnchor",value:function(n){var i=this.props.orientation,a=Math.cos(-n.coordinate*ibe),o;return a>zk?o=i==="outer"?"start":"end":a<-zk?o=i==="outer"?"end":"start":o="middle",o}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,a=n.cy,o=n.radius,s=n.axisLine,l=n.axisLineType,u=fo(fo({},le(this.props,!1)),{},{fill:"none"},le(s,!1));if(l==="circle")return k.createElement(xv,So({className:"recharts-polar-angle-axis-line"},u,{cx:i,cy:a,r:o}));var d=this.props.ticks,f=d.map(function(h){return Xe(i,a,o,h.coordinate)});return k.createElement(x0e,So({className:"recharts-polar-angle-axis-line"},u,{points:f}))}},{key:"renderTicks",value:function(){var n=this,i=this.props,a=i.ticks,o=i.tick,s=i.tickLine,l=i.tickFormatter,u=i.stroke,d=le(this.props,!1),f=le(o,!1),h=fo(fo({},d),{},{fill:"none"},le(s,!1)),p=a.map(function(g,m){var v=n.getTickLineCoord(g),x=n.getTickTextAnchor(g),y=fo(fo(fo({textAnchor:x},d),{},{stroke:"none",fill:u},f),{},{index:m,payload:g,x:v.x2,y:v.y2});return k.createElement(Ce,So({className:Se("recharts-polar-angle-axis-tick",DL(o)),key:"tick-".concat(g.coordinate)},ns(n.props,g,m)),s&&k.createElement("line",So({className:"recharts-polar-angle-axis-tick-line"},h,v)),o&&t.renderTickItem(o,y,l?l(g.value,m):g.value))});return k.createElement(Ce,{className:"recharts-polar-angle-axis-ticks"},p)}},{key:"render",value:function(){var n=this.props,i=n.ticks,a=n.radius,o=n.axisLine;return a<=0||!i||!i.length?null:k.createElement(Ce,{className:Se("recharts-polar-angle-axis",this.props.className)},o&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(n,i,a){var o;return k.isValidElement(n)?o=k.cloneElement(n,i):me(n)?o=n(i):o=k.createElement(is,So({},i,{className:"recharts-polar-angle-axis-tick-value"}),a),o}}])}(w.PureComponent);Sv(_v,"displayName","PolarAngleAxis");Sv(_v,"axisType","angleAxis");Sv(_v,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var abe=i4,obe=abe(Object.getPrototypeOf,Object),sbe=obe,lbe=ea,cbe=sbe,ube=ta,dbe="[object Object]",fbe=Function.prototype,hbe=Object.prototype,t3=fbe.toString,pbe=hbe.hasOwnProperty,mbe=t3.call(Object);function gbe(e){if(!ube(e)||lbe(e)!=dbe)return!1;var t=cbe(e);if(t===null)return!0;var r=pbe.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&t3.call(r)==mbe}var vbe=gbe;const ybe=Ie(vbe);var xbe=ea,bbe=ta,wbe="[object Boolean]";function Sbe(e){return e===!0||e===!1||bbe(e)&&xbe(e)==wbe}var _be=Sbe;const jbe=Ie(_be);function Kd(e){"@babel/helpers - typeof";return Kd=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},Kd(e)}function _m(){return _m=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},_m.apply(this,arguments)}function Obe(e,t){return kbe(e)||Ebe(e,t)||Nbe(e,t)||Pbe()}function Pbe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 559In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nbe(e,t){if(e){if(typeof e=="string")return Hk(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 Hk(e,t)}}function Hk(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 Ebe(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(d){u=!0,i=d}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function kbe(e){if(Array.isArray(e))return e}function qk(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 Vk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qk(Object(r),!0).forEach(function(n){Abe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Abe(e,t,r){return t=Cbe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Cbe(e){var t=Tbe(e,"string");return Kd(t)=="symbol"?t:t+""}function Tbe(e,t){if(Kd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Kd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Kk=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},$be={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Rbe=function(t){var r=Vk(Vk({},$be),t),n=w.useRef(),i=w.useState(-1),a=Obe(i,2),o=a[0],s=a[1];w.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var b=n.current.getTotalLength();b&&s(b)}catch{}},[]);var l=r.x,u=r.y,d=r.upperWidth,f=r.lowerWidth,h=r.height,p=r.className,g=r.animationEasing,m=r.animationDuration,v=r.animationBegin,x=r.isUpdateAnimationActive;if(l!==+l||u!==+u||d!==+d||f!==+f||h!==+h||d===0&&f===0||h===0)return null;var y=Se("recharts-trapezoid",p);return x?k.createElement(gi,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:h,x:l,y:u},to:{upperWidth:d,lowerWidth:f,height:h,x:l,y:u},duration:m,animationEasing:g,isActive:x},function(b){var _=b.upperWidth,S=b.lowerWidth,j=b.height,O=b.x,P=b.y;return k.createElement(gi,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:m,easing:g},k.createElement("path",_m({},le(r,!0),{className:y,d:Kk(O,P,_,S,j),ref:n})))}):k.createElement("g",null,k.createElement("path",_m({},le(r,!0),{className:y,d:Kk(l,u,d,f,h)})))},Mbe=["option","shapeType","propTransformer","activeClassName","isActive"];function Gd(e){"@babel/helpers - typeof";return Gd=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},Gd(e)}function Ibe(e,t){if(e==null)return{};var r=Dbe(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 Dbe(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 Gk(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 jm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Gk(Object(r),!0).forEach(function(n){Lbe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Lbe(e,t,r){return t=Fbe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fbe(e){var t=Bbe(e,"string");return Gd(t)=="symbol"?t:t+""}function Bbe(e,t){if(Gd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Gd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ube(e,t){return jm(jm({},t),e)}function Wbe(e,t){return e==="symbols"}function Yk(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return k.createElement($_,r);case"trapezoid":return k.createElement(Rbe,r);case"sector":return k.createElement(BL,r);case"symbols":if(Wbe(t))return k.createElement(JS,r);break;default:return null}}function zbe(e){return w.isValidElement(e)?e.props:e}function r3(e){var t=e.option,r=e.shapeType,n=e.propTransformer,i=n===void 0?Ube:n,a=e.activeClassName,o=a===void 0?"recharts-active-shape":a,s=e.isActive,l=Ibe(e,Mbe),u;if(w.isValidElement(t))u=w.cloneElement(t,jm(jm({},l),zbe(t)));else if(me(t))u=t(l);else if(ybe(t)&&!jbe(t)){var d=i(t,l);u=k.createElement(Yk,{shapeType:r,elementProps:d})}else{var f=l;u=k.createElement(Yk,{shapeType:r,elementProps:f})}return s?k.createElement(Ce,{className:o},u):u}function jv(e,t){return t!=null&&"trapezoids"in e.props}function Ov(e,t){return t!=null&&"sectors"in e.props}function Yd(e,t){return t!=null&&"points"in e.props}function Hbe(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 qbe(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function Vbe(e,t){var r=e.x===t.x,n=e.y===t.y,i=e.z===t.z;return r&&n&&i}function Kbe(e,t){var r;return jv(e,t)?r=Hbe:Ov(e,t)?r=qbe:Yd(e,t)&&(r=Vbe),r}function Gbe(e,t){var r;return jv(e,t)?r="trapezoids":Ov(e,t)?r="sectors":Yd(e,t)&&(r="points"),r}function Ybe(e,t){if(jv(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(Ov(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 Yd(e,t)?t.payload:{}}function Xbe(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,i=Gbe(r,t),a=Ybe(r,t),o=n.filter(function(l,u){var d=Ef(a,l),f=r.props[i].filter(function(g){var m=Kbe(r,t);return m(g,t)}),h=r.props[i].indexOf(f[f.length-1]),p=u===h;return d&&p}),s=n.indexOf(o[o.length-1]);return s}var Gh;function nc(e){"@babel/helpers - typeof";return nc=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},nc(e)}function el(){return el=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},el.apply(this,arguments)}function Xk(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 Ke(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Xk(Object(r),!0).forEach(function(n){an(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Qbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qk(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,i3(n.key),n)}}function Jbe(e,t,r){return t&&Qk(e.prototype,t),r&&Qk(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Zbe(e,t,r){return t=Om(t),ewe(e,n3()?Reflect.construct(t,r||[],Om(e).constructor):t.apply(e,r))}function ewe(e,t){if(t&&(nc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return twe(e)}function twe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function n3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(n3=function(){return!!e})()}function Om(e){return Om=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Om(e)}function rwe(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&&iw(e,t)}function iw(e,t){return iw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},iw(e,t)}function an(e,t,r){return t=i3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i3(e){var t=nwe(e,"string");return nc(t)=="symbol"?t:t+""}function nwe(e,t){if(nc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(nc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var na=function(e){function t(r){var n;return Qbe(this,t),n=Zbe(this,t,[r]),an(n,"pieRef",null),an(n,"sectorRefs",[]),an(n,"id",Lc("recharts-pie-")),an(n,"handleAnimationEnd",function(){var i=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),me(i)&&i()}),an(n,"handleAnimationStart",function(){var i=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),me(i)&&i()}),n.state={isAnimationFinished:!r.isAnimationActive,prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,sectorToFocus:0},n}return rwe(t,e),Jbe(t,[{key:"isActiveIndex",value:function(n){var i=this.props.activeIndex;return Array.isArray(i)?i.indexOf(n)!==-1:n===i}},{key:"hasActiveIndex",value:function(){var n=this.props.activeIndex;return Array.isArray(n)?n.length!==0:n||n===0}},{key:"renderLabels",value:function(n){var i=this.props.isAnimationActive;if(i&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.label,s=a.labelLine,l=a.dataKey,u=a.valueKey,d=le(this.props,!1),f=le(o,!1),h=le(s,!1),p=o&&o.offsetRadius||20,g=n.map(function(m,v){var x=(m.startAngle+m.endAngle)/2,y=Xe(m.cx,m.cy,m.outerRadius+p,x),b=Ke(Ke(Ke(Ke({},d),m),{},{stroke:"none"},f),{},{index:v,textAnchor:t.getTextAnchor(y.x,m.cx)},y),_=Ke(Ke(Ke(Ke({},d),m),{},{fill:"none",stroke:m.fill},h),{},{index:v,points:[Xe(m.cx,m.cy,m.outerRadius,x),y]}),S=l;return xe(l)&&xe(u)?S="value":xe(l)&&(S=u),k.createElement(Ce,{key:"label-".concat(m.startAngle,"-").concat(m.endAngle,"-").concat(m.midAngle,"-").concat(v)},s&&t.renderLabelLineItem(s,_,"line"),t.renderLabelItem(o,b,kt(m,S)))});return k.createElement(Ce,{className:"recharts-pie-labels"},g)}},{key:"renderSectorsStatically",value:function(n){var i=this,a=this.props,o=a.activeShape,s=a.blendStroke,l=a.inactiveShape;return n.map(function(u,d){if((u==null?void 0:u.startAngle)===0&&(u==null?void 0:u.endAngle)===0&&n.length!==1)return null;var f=i.isActiveIndex(d),h=l&&i.hasActiveIndex()?l:null,p=f?o:h,g=Ke(Ke({},u),{},{stroke:s?u.fill:u.stroke,tabIndex:-1});return k.createElement(Ce,el({ref:function(v){v&&!i.sectorRefs.includes(v)&&i.sectorRefs.push(v)},tabIndex:-1,className:"recharts-pie-sector"},ns(i.props,u,d),{key:"sector-".concat(u==null?void 0:u.startAngle,"-").concat(u==null?void 0:u.endAngle,"-").concat(u.midAngle,"-").concat(d)}),k.createElement(r3,el({option:p,isActive:f,shapeType:"sector"},g)))})}},{key:"renderSectorsWithAnimation",value:function(){var n=this,i=this.props,a=i.sectors,o=i.isAnimationActive,s=i.animationBegin,l=i.animationDuration,u=i.animationEasing,d=i.animationId,f=this.state,h=f.prevSectors,p=f.prevIsAnimationActive;return k.createElement(gi,{begin:s,duration:l,isActive:o,easing:u,from:{t:0},to:{t:1},key:"pie-".concat(d,"-").concat(p),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(g){var m=g.t,v=[],x=a&&a[0],y=x.startAngle;return a.forEach(function(b,_){var S=h&&h[_],j=_>0?Ur(b,"paddingAngle",0):0;if(S){var O=Rr(S.endAngle-S.startAngle,b.endAngle-b.startAngle),P=Ke(Ke({},b),{},{startAngle:y+j,endAngle:y+O(m)+j});v.push(P),y=P.endAngle}else{var N=b.endAngle,A=b.startAngle,C=Rr(0,N-A),T=C(m),L=Ke(Ke({},b),{},{startAngle:y+j,endAngle:y+T+j});v.push(L),y=L.endAngle}}),k.createElement(Ce,null,n.renderSectorsStatically(v))})}},{key:"attachKeyboardHandlers",value:function(n){var i=this;n.onkeydown=function(a){if(!a.altKey)switch(a.key){case"ArrowLeft":{var o=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[o].focus(),i.setState({sectorToFocus:o});break}case"ArrowRight":{var s=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[s].focus(),i.setState({sectorToFocus:s});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var n=this.props,i=n.sectors,a=n.isAnimationActive,o=this.state.prevSectors;return a&&i&&i.length&&(!o||!Ef(o,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var n=this,i=this.props,a=i.hide,o=i.sectors,s=i.className,l=i.label,u=i.cx,d=i.cy,f=i.innerRadius,h=i.outerRadius,p=i.isAnimationActive,g=this.state.isAnimationFinished;if(a||!o||!o.length||!G(u)||!G(d)||!G(f)||!G(h))return null;var m=Se("recharts-pie",s);return k.createElement(Ce,{tabIndex:this.props.rootTabIndex,className:m,ref:function(x){n.pieRef=x}},this.renderSectors(),l&&this.renderLabels(o),Mt.renderCallByParent(this.props,null,!1),(!p||g)&&Ui.renderCallByParent(this.props,o,!1))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return i.prevIsAnimationActive!==n.isAnimationActive?{prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:[],isAnimationFinished:!0}:n.isAnimationActive&&n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:n.sectors!==i.curSectors?{curSectors:n.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(n,i){return n>i?"start":n<i?"end":"middle"}},{key:"renderLabelLineItem",value:function(n,i,a){if(k.isValidElement(n))return k.cloneElement(n,i);if(me(n))return n(i);var o=Se("recharts-pie-label-line",typeof n!="boolean"?n.className:"");return k.createElement(gm,el({},i,{key:a,type:"linear",className:o}))}},{key:"renderLabelItem",value:function(n,i,a){if(k.isValidElement(n))return k.cloneElement(n,i);var o=a;if(me(n)&&(o=n(i),k.isValidElement(o)))return o;var s=Se("recharts-pie-label-text",typeof n!="boolean"&&!me(n)?n.className:"");return k.createElement(is,el({},i,{alignmentBaseline:"middle",className:s}),o)}}])}(w.PureComponent);Gh=na;an(na,"displayName","Pie");an(na,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!ci.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});an(na,"parseDeltaAngle",function(e,t){var r=ir(t-e),n=Math.min(Math.abs(t-e),360);return r*n});an(na,"getRealPieData",function(e){var t=e.data,r=e.children,n=le(e,!1),i=Wr(r,sv);return t&&t.length?t.map(function(a,o){return Ke(Ke(Ke({payload:a},n),a),i&&i[o]&&i[o].props)}):i&&i.length?i.map(function(a){return Ke(Ke({},n),a.props)}):[]});an(na,"parseCoordinateOfPie",function(e,t){var r=t.top,n=t.left,i=t.width,a=t.height,o=IL(i,a),s=n+ar(e.cx,i,i/2),l=r+ar(e.cy,a,a/2),u=ar(e.innerRadius,o,0),d=ar(e.outerRadius,o,o*.8),f=e.maxRadius||Math.sqrt(i*i+a*a)/2;return{cx:s,cy:l,innerRadius:u,outerRadius:d,maxRadius:f}});an(na,"getComposedData",function(e){var t=e.item,r=e.offset,n=t.type.defaultProps!==void 0?Ke(Ke({},t.type.defaultProps),t.props):t.props,i=Gh.getRealPieData(n);if(!i||!i.length)return null;var a=n.cornerRadius,o=n.startAngle,s=n.endAngle,l=n.paddingAngle,u=n.dataKey,d=n.nameKey,f=n.valueKey,h=n.tooltipType,p=Math.abs(n.minAngle),g=Gh.parseCoordinateOfPie(n,r),m=Gh.parseDeltaAngle(o,s),v=Math.abs(m),x=u;xe(u)&&xe(f)?(Dn(!1,`Use "dataKey" to specify the value of pie,
560 the props "valueKey" will be deprecated in 1.1.0`),x="value"):xe(u)&&(Dn(!1,`Use "dataKey" to specify the value of pie, 561 the props "valueKey" will be deprecated in 1.1.0`),x=f);var y=i.filter(function(P){return kt(P,x,0)!==0}).length,b=(v>=360?y:y-1)*l,_=v-y*p-b,S=i.reduce(function(P,N){var A=kt(N,x,0);return P+(G(A)?A:0)},0),j;if(S>0){var O;j=i.map(function(P,N){var A=kt(P,x,0),C=kt(P,d,N),T=(G(A)?A:0)/S,L;N?L=O.endAngle+ir(m)*l*(A!==0?1:0):L=o;var R=L+ir(m)*((A!==0?p:0)+T*_),I=(L+R)/2,D=(g.innerRadius+g.outerRadius)/2,$=[{name:C,value:A,payload:P,dataKey:x,type:h}],E=Xe(g.cx,g.cy,D,I);return O=Ke(Ke(Ke({percent:T,cornerRadius:a,name:C,tooltipPayload:$,midAngle:I,middleRadius:D,tooltipPosition:E},P),g),{},{value:kt(P,x),startAngle:L,endAngle:R,payload:P,paddingAngle:ir(m)*l}),O})}return Ke(Ke({},g),{},{sectors:j,data:i})});var iwe=Math.ceil,awe=Math.max;function owe(e,t,r,n){for(var i=-1,a=awe(iwe((t-e)/(r||1)),0),o=Array(a);a--;)o[n?a:++i]=e,e+=r;return o}var swe=owe,lwe=_4,Jk=1/0,cwe=17976931348623157e292;function uwe(e){if(!e)return e===0?e:0;if(e=lwe(e),e===Jk||e===-Jk){var t=e<0?-1:1;return t*cwe}return e===e?e:0}var a3=uwe,dwe=swe,fwe=ov,lx=a3;function hwe(e){return function(t,r,n){return n&&typeof n!="number"&&fwe(t,r,n)&&(r=n=void 0),t=lx(t),r===void 0?(r=t,t=0):r=lx(r),n=n===void 0?t<r?1:-1:lx(n),dwe(t,r,n,e)}}var pwe=hwe,mwe=pwe,gwe=mwe(),vwe=gwe;const Pm=Ie(vwe);function Xd(e){"@babel/helpers - typeof";return Xd=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},Xd(e)}function Zk(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 eA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zk(Object(r),!0).forEach(function(n){o3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function o3(e,t,r){return t=ywe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ywe(e){var t=xwe(e,"string");return Xd(t)=="symbol"?t:t+""}function xwe(e,t){if(Xd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Xd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var bwe=["Webkit","Moz","O","ms"],wwe=function(t,r){var n=t.replace(/(\w)/,function(a){return a.toUpperCase()}),i=bwe.reduce(function(a,o){return eA(eA({},a),{},o3({},o+n,r))},{});return i[t]=r,i};function ic(e){"@babel/helpers - typeof";return ic=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},ic(e)}function Nm(){return Nm=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},Nm.apply(this,arguments)}function tA(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 cx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tA(Object(r),!0).forEach(function(n){kr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Swe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rA(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,l3(n.key),n)}}function _we(e,t,r){return t&&rA(e.prototype,t),r&&rA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function jwe(e,t,r){return t=Em(t),Owe(e,s3()?Reflect.construct(t,r||[],Em(e).constructor):t.apply(e,r))}function Owe(e,t){if(t&&(ic(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Pwe(e)}function Pwe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}
vendor: 123,625 bytes, lines 561-566
561return(s3=function(){return!!e})()}function Em(e){return Em=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Em(e)}function Nwe(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&&aw(e,t)}function aw(e,t){return aw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},aw(e,t)}function kr(e,t,r){return t=l3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l3(e){var t=Ewe(e,"string");return ic(t)=="symbol"?t:t+""}function Ewe(e,t){if(ic(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ic(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var kwe=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=Mu().domain(Pm(0,l)).range([a,a+o-s]),d=u.domain().map(function(f){return u(f)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(n),endX:u(i),scale:u,scaleValues:d}},nA=function(t){return t.changedTouches&&!!t.changedTouches.length},ac=function(e){function t(r){var n;return Swe(this,t),n=jwe(this,t,[r]),kr(n,"handleDrag",function(i){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(i):n.state.isSlideMoving&&n.handleSlideDrag(i)}),kr(n,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&n.handleDrag(i.changedTouches[0])}),kr(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()}),kr(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),kr(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),kr(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),kr(n,"handleSlideDragStart",function(i){var a=nA(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 Nwe(t,e),_we(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,d=u.length-1,f=Math.min(i,a),h=Math.max(i,a),p=t.getIndexInRange(o,f),g=t.getIndexInRange(o,h);return{startIndex:p-p%l,endIndex:g===d?d:g-g%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 me(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,d=l.width,f=l.travellerWidth,h=l.startIndex,p=l.endIndex,g=l.onChange,m=n.pageX-a;m>0?m=Math.min(m,u+d-f-s,u+d-f-o):m<0&&(m=Math.max(m,u-o,u-s));var v=this.getIndex({startX:o+m,endX:s+m});(v.startIndex!==h||v.endIndex!==p)&&g&&g(v),this.setState({startX:o+m,endX:s+m,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var a=nA(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],d=this.props,f=d.x,h=d.width,p=d.travellerWidth,g=d.onChange,m=d.gap,v=d.data,x={startX:this.state.startX,endX:this.state.endX},y=n.pageX-a;y>0?y=Math.min(y,f+h-p-u):y<0&&(y=Math.max(y,f-u)),x[o]=u+y;var b=this.getIndex(x),_=b.startIndex,S=b.endIndex,j=function(){var P=v.length-1;return o==="startX"&&(s>l?_%m===0:S%m===0)||s<l&&S===P||o==="endX"&&(s>l?S%m===0:_%m===0)||s>l&&S===P};this.setState(kr(kr({},o,u+y),"brushMoveStartX",n.pageX),function(){g&&j()&&g(b)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var a=this,o=this.state,s=o.scaleValues,l=o.startX,u=o.endX,d=this.state[i],f=s.indexOf(d);if(f!==-1){var h=f+n;if(!(h===-1||h>=s.length)){var p=s[h];i==="startX"&&p>=u||i==="endX"&&p<=l||this.setState(kr({},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 k.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,d=n.padding,f=w.Children.only(u);return f?k.cloneElement(f,{x:i,y:a,width:o,height:s,margin:d,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(n,i){var a,o,s=this,l=this.props,u=l.y,d=l.travellerWidth,f=l.height,h=l.traveller,p=l.ariaLabel,g=l.data,m=l.startIndex,v=l.endIndex,x=Math.max(n,this.props.x),y=cx(cx({},le(this.props,!1)),{},{x,y:u,width:d,height:f}),b=p||"Min value: ".concat((a=g[m])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=g[v])===null||o===void 0?void 0:o.name);return k.createElement(Ce,{tabIndex:0,role:"slider","aria-label":b,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(S){["ArrowLeft","ArrowRight"].includes(S.key)&&(S.preventDefault(),S.stopPropagation(),s.handleTravellerMoveKeyboard(S.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,d=Math.min(n,i)+u,f=Math.max(Math.abs(i-n)-u,0);return k.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:d,y:o,width:f,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,d=this.state,f=d.startX,h=d.endX,p=5,g={pointerEvents:"none",fill:u};return k.createElement(Ce,{className:"recharts-brush-texts"},k.createElement(is,Nm({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,h)-p,y:o+s/2},g),this.getTextOfTick(i)),k.createElement(is,Nm({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,h)+l+p,y:o+s/2},g),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,d=n.height,f=n.alwaysShowText,h=this.state,p=h.startX,g=h.endX,m=h.isTextActive,v=h.isSlideMoving,x=h.isTravellerMoving,y=h.isTravellerFocused;if(!i||!i.length||!G(s)||!G(l)||!G(u)||!G(d)||u<=0||d<=0)return null;var b=Se("recharts-brush",a),_=k.Children.count(o)===1,S=wwe("userSelect","none");return k.createElement(Ce,{className:b,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:S},this.renderBackground(),_&&this.renderPanorama(),this.renderSlide(p,g),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(g,"endX"),(m||v||x||y||f)&&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 k.createElement(k.Fragment,null,k.createElement("rect",{x:i,y:a,width:o,height:s,fill:l,stroke:"none"}),k.createElement("line",{x1:i+1,y1:u,x2:i+o-1,y2:u,fill:"none",stroke:"#fff"}),k.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 k.isValidElement(n)?a=k.cloneElement(n,i):me(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,d=n.startIndex,f=n.endIndex;if(a!==i.prevData||u!==i.prevUpdateId)return cx({prevData:a,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o},a&&a.length?kwe({data:a,width:o,x:s,travellerWidth:l,startIndex:d,endIndex:f}):{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}}])}(w.PureComponent);kr(ac,"displayName","Brush");kr(ac,"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 Awe=a_;function Cwe(e,t){var r;return Awe(e,function(n,i,a){return r=t(n,i,a),!r}),!!r}var Twe=Cwe,$we=XD,Rwe=wi,Mwe=Twe,Iwe=jr,Dwe=ov;function Lwe(e,t,r){var n=Iwe(e)?$we:Mwe;return r&&Dwe(e,t,r)&&(t=void 0),n(e,Rwe(t))}var Fwe=Lwe;const Bwe=Ie(Fwe);var di=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},iA=y4;function Uwe(e,t,r){t=="__proto__"&&iA?iA(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var Wwe=Uwe,zwe=Wwe,Hwe=g4,qwe=wi;function Vwe(e,t){var r={};return t=qwe(t),Hwe(e,function(n,i,a){zwe(r,i,t(n,i,a))}),r}var Kwe=Vwe;const Gwe=Ie(Kwe);function Ywe(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 Xwe=Ywe,Qwe=a_;function Jwe(e,t){var r=!0;return Qwe(e,function(n,i,a){return r=!!t(n,i,a),r}),r}var Zwe=Jwe,e1e=Xwe,t1e=Zwe,r1e=wi,n1e=jr,i1e=ov;function a1e(e,t,r){var n=n1e(e)?e1e:t1e;return r&&i1e(e,t,r)&&(t=void 0),n(e,r1e(t))}var o1e=a1e;const c3=Ie(o1e);var s1e=["x","y"];function Qd(e){"@babel/helpers - typeof";return Qd=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},Qd(e)}function ow(){return ow=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},ow.apply(this,arguments)}function aA(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 pu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?aA(Object(r),!0).forEach(function(n){l1e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):aA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function l1e(e,t,r){return t=c1e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c1e(e){var t=u1e(e,"string");return Qd(t)=="symbol"?t:t+""}function u1e(e,t){if(Qd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Qd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function d1e(e,t){if(e==null)return{};var r=f1e(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 f1e(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 h1e(e,t){var r=e.x,n=e.y,i=d1e(e,s1e),a="".concat(r),o=parseInt(a,10),s="".concat(n),l=parseInt(s,10),u="".concat(t.height||i.height),d=parseInt(u,10),f="".concat(t.width||i.width),h=parseInt(f,10);return pu(pu(pu(pu(pu({},t),i),o?{x:o}:{}),l?{y:l}:{}),{},{height:d,width:h,name:t.name,radius:t.radius})}function oA(e){return k.createElement(r3,ow({shapeType:"rectangle",propTransformer:h1e,activeClassName:"recharts-active-bar"},e))}var p1e=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=G(n)||Fte(n);return a?t(n,i):(a||os(),r)}},m1e=["value","background"],u3;function oc(e){"@babel/helpers - typeof";return oc=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},oc(e)}function g1e(e,t){if(e==null)return{};var r=v1e(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 v1e(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 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 sA(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 wt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sA(Object(r),!0).forEach(function(n){Ca(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function y1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lA(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,f3(n.key),n)}}function x1e(e,t,r){return t&&lA(e.prototype,t),r&&lA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function b1e(e,t,r){return t=Am(t),w1e(e,d3()?Reflect.construct(t,r||[],Am(e).constructor):t.apply(e,r))}function w1e(e,t){if(t&&(oc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return S1e(e)}function S1e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(d3=function(){return!!e})()}function Am(e){return Am=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Am(e)}function _1e(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&&sw(e,t)}function sw(e,t){return sw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},sw(e,t)}function Ca(e,t,r){return t=f3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f3(e){var t=j1e(e,"string");return oc(t)=="symbol"?t:t+""}function j1e(e,t){if(oc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(oc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var gs=function(e){function t(){var r;y1e(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=b1e(this,t,[].concat(i)),Ca(r,"state",{isAnimationFinished:!1}),Ca(r,"id",Lc("recharts-bar-")),Ca(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),o&&o()}),Ca(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),o&&o()}),r}return _1e(t,e),x1e(t,[{key:"renderRectanglesStatically",value:function(n){var i=this,a=this.props,o=a.shape,s=a.dataKey,l=a.activeIndex,u=a.activeBar,d=le(this.props,!1);return n&&n.map(function(f,h){var p=h===l,g=p?u:o,m=wt(wt(wt({},d),f),{},{isActive:p,option:g,index:h,dataKey:s,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return k.createElement(Ce,km({className:"recharts-bar-rectangle"},ns(i.props,f,h),{key:"rectangle-".concat(f==null?void 0:f.x,"-").concat(f==null?void 0:f.y,"-").concat(f==null?void 0:f.value,"-").concat(h)}),k.createElement(oA,m))})}},{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,d=i.animationEasing,f=i.animationId,h=this.state.prevData;return k.createElement(gi,{begin:l,duration:u,isActive:s,easing:d,from:{t:0},to:{t:1},key:"bar-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(p){var g=p.t,m=a.map(function(v,x){var y=h&&h[x];if(y){var b=Rr(y.x,v.x),_=Rr(y.y,v.y),S=Rr(y.width,v.width),j=Rr(y.height,v.height);return wt(wt({},v),{},{x:b(g),y:_(g),width:S(g),height:j(g)})}if(o==="horizontal"){var O=Rr(0,v.height),P=O(g);return wt(wt({},v),{},{y:v.y+v.height-P,height:P})}var N=Rr(0,v.width),A=N(g);return wt(wt({},v),{},{width:A})});return k.createElement(Ce,null,n.renderRectanglesStatically(m))})}},{key:"renderRectangles",value:function(){var n=this.props,i=n.data,a=n.isAnimationActive,o=this.state.prevData;return a&&i&&i.length&&(!o||!Ef(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=le(this.props.background,!1);return a.map(function(u,d){u.value;var f=u.background,h=g1e(u,m1e);if(!f)return null;var p=wt(wt(wt(wt(wt({},h),{},{fill:"#eee"},f),l),ns(n.props,u,d)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:o,index:d,className:"recharts-bar-background-rectangle"});return k.createElement(oA,km({key:"background-bar-".concat(d),option:n.props.background,isActive:d===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,d=a.children,f=Wr(d,kf);if(!f)return null;var h=u==="vertical"?o[0].height/2:o[0].width/2,p=function(v,x){var y=Array.isArray(v.value)?v.value[1]:v.value;return{x:v.x,y:v.y,value:y,errorVal:kt(v,x)}},g={clipPath:n?"url(#clipPath-".concat(i,")"):null};return k.createElement(Ce,g,f.map(function(m){return k.cloneElement(m,{key:"error-bar-".concat(i,"-").concat(m.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,d=n.top,f=n.width,h=n.height,p=n.isAnimationActive,g=n.background,m=n.id;if(i||!a||!a.length)return null;var v=this.state.isAnimationFinished,x=Se("recharts-bar",o),y=s&&s.allowDataOverflow,b=l&&l.allowDataOverflow,_=y||b,S=xe(m)?this.id:m;return k.createElement(Ce,{className:x},y||b?k.createElement("defs",null,k.createElement("clipPath",{id:"clipPath-".concat(S)},k.createElement("rect",{x:y?u:u-f/2,y:b?d:d-h/2,width:y?f:f*2,height:b?h:h*2}))):null,k.createElement(Ce,{className:"recharts-bar-rectangles",clipPath:_?"url(#clipPath-".concat(S,")"):null},g?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(_,S),(!p||v)&&Ui.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}}])}(w.PureComponent);u3=gs;Ca(gs,"displayName","Bar");Ca(gs,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!ci.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Ca(gs,"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,d=e.dataStartIndex,f=e.displayedData,h=e.offset,p=ive(n,r);if(!p)return null;var g=t.layout,m=r.type.defaultProps,v=m!==void 0?wt(wt({},m),r.props):r.props,x=v.dataKey,y=v.children,b=v.minPointSize,_=g==="horizontal"?o:a,S=u?_.scale.domain():null,j=dve({numericAxis:_}),O=Wr(y,sv),P=f.map(function(N,A){var C,T,L,R,I,D;u?C=ave(u[d+A],S):(C=kt(N,x),Array.isArray(C)||(C=[j,C]));var $=p1e(b,u3.defaultProps.minPointSize)(C[1],A);if(g==="horizontal"){var E,M=[o.scale(C[0]),o.scale(C[1])],F=M[0],H=M[1];T=QE({axis:a,ticks:s,bandSize:i,offset:p.offset,entry:N,index:A}),L=(E=H??F)!==null&&E!==void 0?E:void 0,R=p.size;var U=F-H;if(I=Number.isNaN(U)?0:U,D={x:T,y:o.y,width:R,height:o.height},Math.abs($)>0&&Math.abs(I)<Math.abs($)){var K=ir(I||$)*(Math.abs($)-Math.abs(I));L-=K,I+=K}}else{var J=[a.scale(C[0]),a.scale(C[1])],he=J[0],Ne=J[1];if(T=he,L=QE({axis:o,ticks:l,bandSize:i,offset:p.offset,entry:N,index:A}),R=Ne-he,I=p.size,D={x:a.x,y:L,width:a.width,height:I},Math.abs($)>0&&Math.abs(R)<Math.abs($)){var Y=ir(R||$)*(Math.abs($)-Math.abs(R));R+=Y}}return wt(wt(wt({},N),{},{x:T,y:L,width:R,height:I,value:u?C:C[1],payload:N,background:D},O&&O[A]&&O[A].props),{},{tooltipPayload:[RL(r,N)],tooltipPosition:{x:T+R/2,y:L+I/2}})});return wt({data:P,layout:g},h)});function Jd(e){"@babel/helpers - typeof";return Jd=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},Jd(e)}function O1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cA(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,h3(n.key),n)}}function P1e(e,t,r){return t&&cA(e.prototype,t),r&&cA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function uA(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 Cn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uA(Object(r),!0).forEach(function(n){Pv(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Pv(e,t,r){return t=h3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h3(e){var t=N1e(e,"string");return Jd(t)=="symbol"?t:t+""}function N1e(e,t){if(Jd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Jd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var p3=function(t,r,n,i,a){var o=t.width,s=t.height,l=t.layout,u=t.children,d=Object.keys(r),f={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=!!Tr(u,gs);return d.reduce(function(p,g){var m=r[g],v=m.orientation,x=m.domain,y=m.padding,b=y===void 0?{}:y,_=m.mirror,S=m.reversed,j="".concat(v).concat(_?"Mirror":""),O,P,N,A,C;if(m.type==="number"&&(m.padding==="gap"||m.padding==="no-gap")){var T=x[1]-x[0],L=1/0,R=m.categoricalDomain.sort(Wte);if(R.forEach(function(J,he){he>0&&(L=Math.min((J||0)-(R[he-1]||0),L))}),Number.isFinite(L)){var I=L/T,D=m.layout==="vertical"?n.height:n.width;if(m.padding==="gap"&&(O=I*D/2),m.padding==="no-gap"){var $=ar(t.barCategoryGap,I*D),E=I*D/2;O=E-$-(E-$)/D*$}}}i==="xAxis"?P=[n.left+(b.left||0)+(O||0),n.left+n.width-(b.right||0)-(O||0)]:i==="yAxis"?P=l==="horizontal"?[n.top+n.height-(b.bottom||0),n.top+(b.top||0)]:[n.top+(b.top||0)+(O||0),n.top+n.height-(b.bottom||0)-(O||0)]:P=m.range,S&&(P=[P[1],P[0]]);var M=AL(m,a,h),F=M.scale,H=M.realScaleType;F.domain(x).range(P),CL(F);var U=TL(F,Cn(Cn({},m),{},{realScaleType:H}));i==="xAxis"?(C=v==="top"&&!_||v==="bottom"&&_,N=n.left,A=f[j]-C*m.height):i==="yAxis"&&(C=v==="left"&&!_||v==="right"&&_,N=f[j]-C*m.width,A=n.top);var K=Cn(Cn(Cn({},m),U),{},{realScaleType:H,x:N,y:A,scale:F,width:i==="xAxis"?n.width:m.width,height:i==="yAxis"?n.height:m.height});return K.bandSize=hm(K,U),!m.hide&&i==="xAxis"?f[j]+=(C?-1:1)*K.height:m.hide||(f[j]+=(C?-1:1)*K.width),Cn(Cn({},p),{},Pv({},g,K))},{})},m3=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)}},E1e=function(t){var r=t.x1,n=t.y1,i=t.x2,a=t.y2;return m3({x:r,y:n},{x:i,y:a})},g3=function(){function e(t){O1e(this,e),this.scale=t}return P1e(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)}}])}();Pv(g3,"EPS",1e-4);var R_=function(t){var r=Object.keys(t).reduce(function(n,i){return Cn(Cn({},n),{},Pv({},i,g3.create(t[i])))},{});return Cn(Cn({},r),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,s=a.position;return Gwe(i,function(l,u){return r[u].apply(l,{bandAware:o,position:s})})},isInRange:function(i){return c3(i,function(a,o){return r[o].isInRange(a)})}})};function k1e(e){return(e%180+180)%180}var A1e=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=k1e(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)},C1e=wi,T1e=_f,$1e=iv;function R1e(e){return function(t,r,n){var i=Object(t);if(!T1e(t)){var a=C1e(r);t=$1e(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 M1e=R1e,I1e=a3;function D1e(e){var t=I1e(e),r=t%1;return t===t?r?t-r:t:0}var L1e=D1e,F1e=u4,B1e=wi,U1e=L1e,W1e=Math.max;function z1e(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:U1e(r);return i<0&&(i=W1e(n+i,0)),F1e(e,B1e(t),i)}var H1e=z1e,q1e=M1e,V1e=H1e,K1e=q1e(V1e),G1e=K1e;const Y1e=Ie(G1e);var X1e=zee(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("")}),M_=w.createContext(void 0),I_=w.createContext(void 0),v3=w.createContext(void 0),y3=w.createContext({}),x3=w.createContext(void 0),b3=w.createContext(0),w3=w.createContext(0),dA=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,d=X1e(a);return k.createElement(M_.Provider,{value:n},k.createElement(I_.Provider,{value:i},k.createElement(y3.Provider,{value:a},k.createElement(v3.Provider,{value:d},k.createElement(x3.Provider,{value:o},k.createElement(b3.Provider,{value:u},k.createElement(w3.Provider,{value:l},s)))))))},Q1e=function(){return w.useContext(x3)},S3=function(t){var r=w.useContext(M_);r==null&&os();var n=r[t];return n==null&&os(),n},J1e=function(){var t=w.useContext(M_);return wa(t)},Z1e=function(){var t=w.useContext(I_),r=Y1e(t,function(n){return c3(n.domain,Number.isFinite)});return r||wa(t)},_3=function(t){var r=w.useContext(I_);r==null&&os();var n=r[t];return n==null&&os(),n},eSe=function(){var t=w.useContext(v3);return t},tSe=function(){return w.useContext(y3)},D_=function(){return w.useContext(w3)},L_=function(){return w.useContext(b3)};function sc(e){"@babel/helpers - typeof";return sc=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},sc(e)}function rSe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nSe(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,O3(n.key),n)}}function iSe(e,t,r){return t&&nSe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function aSe(e,t,r){return t=Cm(t),oSe(e,j3()?Reflect.construct(t,r||[],Cm(e).constructor):t.apply(e,r))}function oSe(e,t){if(t&&(sc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sSe(e)}function sSe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function j3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(j3=function(){return!!e})()}function Cm(e){return Cm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Cm(e)}function lSe(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&&lw(e,t)}function lw(e,t){return lw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},lw(e,t)}function fA(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 hA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fA(Object(r),!0).forEach(function(n){F_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function F_(e,t,r){return t=O3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function O3(e){var t=cSe(e,"string");return sc(t)=="symbol"?t:t+""}function cSe(e,t){if(sc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(sc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function uSe(e,t){return pSe(e)||hSe(e,t)||fSe(e,t)||dSe()}function dSe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 562In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fSe(e,t){if(e){if(typeof e=="string")return pA(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 pA(e,t)}}function pA(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 hSe(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(d){u=!0,i=d}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function pSe(e){if(Array.isArray(e))return e}function cw(){return cw=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},cw.apply(this,arguments)}var mSe=function(t,r){var n;return k.isValidElement(t)?n=k.cloneElement(t,r):me(t)?n=t(r):n=k.createElement("line",cw({},r,{className:"recharts-reference-line-line"})),n},gSe=function(t,r,n,i,a,o,s,l,u){var d=a.x,f=a.y,h=a.width,p=a.height;if(n){var g=u.y,m=t.y.apply(g,{position:o});if(di(u,"discard")&&!t.y.isInRange(m))return null;var v=[{x:d+h,y:m},{x:d,y:m}];return l==="left"?v.reverse():v}if(r){var x=u.x,y=t.x.apply(x,{position:o});if(di(u,"discard")&&!t.x.isInRange(y))return null;var b=[{x:y,y:f+p},{x:y,y:f}];return s==="top"?b.reverse():b}if(i){var _=u.segment,S=_.map(function(j){return t.apply(j,{position:o})});return di(u,"discard")&&Bwe(S,function(j){return!t.isInRange(j)})?null:S}return null};function vSe(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=Q1e(),d=S3(i),f=_3(a),h=eSe();if(!u||!h)return null;Dn(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var p=R_({x:d.scale,y:f.scale}),g=Ct(t),m=Ct(r),v=n&&n.length===2,x=gSe(p,g,m,v,h,e.position,d.orientation,f.orientation,e);if(!x)return null;var y=uSe(x,2),b=y[0],_=b.x,S=b.y,j=y[1],O=j.x,P=j.y,N=di(e,"hidden")?"url(#".concat(u,")"):void 0,A=hA(hA({clipPath:N},le(e,!0)),{},{x1:_,y1:S,x2:O,y2:P});return k.createElement(Ce,{className:Se("recharts-reference-line",s)},mSe(o,A),Mt.renderCallByParent(e,E1e({x1:_,y1:S,x2:O,y2:P})))}var B_=function(e){function t(){return rSe(this,t),aSe(this,t,arguments)}return lSe(t,e),iSe(t,[{key:"render",value:function(){return k.createElement(vSe,this.props)}}])}(k.Component);F_(B_,"displayName","ReferenceLine");F_(B_,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function uw(){return uw=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},uw.apply(this,arguments)}function lc(e){"@babel/helpers - typeof";return lc=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},lc(e)}function mA(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 gA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mA(Object(r),!0).forEach(function(n){Nv(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ySe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xSe(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,N3(n.key),n)}}function bSe(e,t,r){return t&&xSe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function wSe(e,t,r){return t=Tm(t),SSe(e,P3()?Reflect.construct(t,r||[],Tm(e).constructor):t.apply(e,r))}function SSe(e,t){if(t&&(lc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _Se(e)}function _Se(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function P3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(P3=function(){return!!e})()}function Tm(e){return Tm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Tm(e)}function jSe(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&&dw(e,t)}function dw(e,t){return dw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},dw(e,t)}function Nv(e,t,r){return t=N3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function N3(e){var t=OSe(e,"string");return lc(t)=="symbol"?t:t+""}function OSe(e,t){if(lc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(lc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var PSe=function(t){var r=t.x,n=t.y,i=t.xAxis,a=t.yAxis,o=R_({x:i.scale,y:a.scale}),s=o.apply({x:r,y:n},{bandAware:!0});return di(t,"discard")&&!o.isInRange(s)?null:s},Ev=function(e){function t(){return ySe(this,t),wSe(this,t,arguments)}return jSe(t,e),bSe(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=Ct(i),d=Ct(a);if(Dn(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!d)return null;var f=PSe(this.props);if(!f)return null;var h=f.x,p=f.y,g=this.props,m=g.shape,v=g.className,x=di(this.props,"hidden")?"url(#".concat(l,")"):void 0,y=gA(gA({clipPath:x},le(this.props,!0)),{},{cx:h,cy:p});return k.createElement(Ce,{className:Se("recharts-reference-dot",v)},t.renderDot(m,y),Mt.renderCallByParent(this.props,{x:h-o,y:p-o,width:2*o,height:2*o}))}}])}(k.Component);Nv(Ev,"displayName","ReferenceDot");Nv(Ev,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});Nv(Ev,"renderDot",function(e,t){var r;return k.isValidElement(e)?r=k.cloneElement(e,t):me(e)?r=e(t):r=k.createElement(xv,uw({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),r});function fw(){return fw=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},fw.apply(this,arguments)}function cc(e){"@babel/helpers - typeof";return cc=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},cc(e)}function vA(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 yA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vA(Object(r),!0).forEach(function(n){kv(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function NSe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ESe(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,k3(n.key),n)}}function kSe(e,t,r){return t&&ESe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ASe(e,t,r){return t=$m(t),CSe(e,E3()?Reflect.construct(t,r||[],$m(e).constructor):t.apply(e,r))}function CSe(e,t){if(t&&(cc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return TSe(e)}function TSe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(E3=function(){return!!e})()}function $m(e){return $m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},$m(e)}function $Se(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&&hw(e,t)}function hw(e,t){return hw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},hw(e,t)}function kv(e,t,r){return t=k3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function k3(e){var t=RSe(e,"string");return cc(t)=="symbol"?t:t+""}function RSe(e,t){if(cc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(cc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var MSe=function(t,r,n,i,a){var o=a.x1,s=a.x2,l=a.y1,u=a.y2,d=a.xAxis,f=a.yAxis;if(!d||!f)return null;var h=R_({x:d.scale,y:f.scale}),p={x:t?h.x.apply(o,{position:"start"}):h.x.rangeMin,y:n?h.y.apply(l,{position:"start"}):h.y.rangeMin},g={x:r?h.x.apply(s,{position:"end"}):h.x.rangeMax,y:i?h.y.apply(u,{position:"end"}):h.y.rangeMax};return di(a,"discard")&&(!h.isInRange(p)||!h.isInRange(g))?null:m3(p,g)},Av=function(e){function t(){return NSe(this,t),ASe(this,t,arguments)}return $Se(t,e),kSe(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,d=n.clipPathId;Dn(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=Ct(i),h=Ct(a),p=Ct(o),g=Ct(s),m=this.props.shape;if(!f&&!h&&!p&&!g&&!m)return null;var v=MSe(f,h,p,g,this.props);if(!v&&!m)return null;var x=di(this.props,"hidden")?"url(#".concat(d,")"):void 0;return k.createElement(Ce,{className:Se("recharts-reference-area",l)},t.renderRect(m,yA(yA({clipPath:x},le(this.props,!0)),v)),Mt.renderCallByParent(this.props,v))}}])}(k.Component);kv(Av,"displayName","ReferenceArea");kv(Av,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});kv(Av,"renderRect",function(e,t){var r;return k.isValidElement(e)?r=k.cloneElement(e,t):me(e)?r=e(t):r=k.createElement($_,fw({},t,{className:"recharts-reference-area-rect"})),r});function A3(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 ISe(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return A1e(n,r)}function DSe(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 Rm(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 LSe(e,t){return A3(e,t+1)}function FSe(e,t,r,n,i){for(var a=(n||[]).slice(),o=t.start,s=t.end,l=0,u=1,d=o,f=function(){var g=n==null?void 0:n[l];if(g===void 0)return{v:A3(n,u)};var m=l,v,x=function(){return v===void 0&&(v=r(g,m)),v},y=g.coordinate,b=l===0||Rm(e,y,x,d,s);b||(l=0,d=o,u+=1),b&&(d=y+e*(x()/2+i),l+=u)},h;u<=a.length;)if(h=f(),h)return h.v;return[]}function Zd(e){"@babel/helpers - typeof";return Zd=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},Zd(e)}function xA(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 Xt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xA(Object(r),!0).forEach(function(n){BSe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function BSe(e,t,r){return t=USe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function USe(e){var t=WSe(e,"string");return Zd(t)=="symbol"?t:t+""}function WSe(e,t){if(Zd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Zd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zSe(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],g,m=function(){return g===void 0&&(g=r(p,h)),g};if(h===o-1){var v=e*(p.coordinate+e*m()/2-l);a[h]=p=Xt(Xt({},p),{},{tickCoord:v>0?p.coordinate-v*e:p.coordinate})}else a[h]=p=Xt(Xt({},p),{},{tickCoord:p.coordinate});var x=Rm(e,p.tickCoord,m,s,l);x&&(l=p.tickCoord-e*(m()/2+i),a[h]=Xt(Xt({},p),{},{isShow:!0}))},d=o-1;d>=0;d--)u(d);return a}function HSe(e,t,r,n,i,a){var o=(n||[]).slice(),s=o.length,l=t.start,u=t.end;if(a){var d=n[s-1],f=r(d,s-1),h=e*(d.coordinate+e*f/2-u);o[s-1]=d=Xt(Xt({},d),{},{tickCoord:h>0?d.coordinate-h*e:d.coordinate});var p=Rm(e,d.tickCoord,function(){return f},l,u);p&&(u=d.tickCoord-e*(f/2+i),o[s-1]=Xt(Xt({},d),{},{isShow:!0}))}for(var g=a?s-1:s,m=function(y){var b=o[y],_,S=function(){return _===void 0&&(_=r(b,y)),_};if(y===0){var j=e*(b.coordinate-e*S()/2-l);o[y]=b=Xt(Xt({},b),{},{tickCoord:j<0?b.coordinate-j*e:b.coordinate})}else o[y]=b=Xt(Xt({},b),{},{tickCoord:b.coordinate});var O=Rm(e,b.tickCoord,S,l,u);O&&(l=b.tickCoord+e*(S()/2+i),o[y]=Xt(Xt({},b),{},{isShow:!0}))},v=0;v<g;v++)m(v);return o}function U_(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,d=e.unit,f=e.angle;if(!i||!i.length||!n)return[];if(G(l)||ci.isSsr)return LSe(i,typeof l=="number"&&G(l)?l:0);var h=[],p=s==="top"||s==="bottom"?"width":"height",g=d&&p==="width"?Ru(d,{fontSize:t,letterSpacing:r}):{width:0,height:0},m=function(b,_){var S=me(u)?u(b.value,_):b.value;return p==="width"?ISe(Ru(S,{fontSize:t,letterSpacing:r}),g,f):Ru(S,{fontSize:t,letterSpacing:r})[p]},v=i.length>=2?ir(i[1].coordinate-i[0].coordinate):1,x=DSe(a,v,p);return l==="equidistantPreserveStart"?FSe(v,x,m,i,o):(l==="preserveStart"||l==="preserveStartEnd"?h=HSe(v,x,m,i,o,l==="preserveStartEnd"):h=zSe(v,x,m,i,o),h.filter(function(y){return y.isShow}))}var qSe=["viewBox"],VSe=["viewBox"],KSe=["ticks"];function uc(e){"@babel/helpers - typeof";return uc=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},uc(e)}function tl(){return tl=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},tl.apply(this,arguments)}function bA(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?bA(Object(r),!0).forEach(function(n){W_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ux(e,t){if(e==null)return{};var r=GSe(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 GSe(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 YSe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wA(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,T3(n.key),n)}}function XSe(e,t,r){return t&&wA(e.prototype,t),r&&wA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function QSe(e,t,r){return t=Mm(t),JSe(e,C3()?Reflect.construct(t,r||[],Mm(e).constructor):t.apply(e,r))}function JSe(e,t){if(t&&(uc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ZSe(e)}function ZSe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function C3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(C3=function(){return!!e})()}function Mm(e){return Mm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Mm(e)}function e_e(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&&pw(e,t)}function pw(e,t){return pw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},pw(e,t)}function W_(e,t,r){return t=T3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function T3(e){var t=t_e(e,"string");return uc(t)=="symbol"?t:t+""}function t_e(e,t){if(uc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(uc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var qc=function(e){function t(r){var n;return YSe(this,t),n=QSe(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return e_e(t,e),XSe(t,[{key:"shouldComponentUpdate",value:function(n,i){var a=n.viewBox,o=ux(n,qSe),s=this.props,l=s.viewBox,u=ux(s,VSe);return!gl(a,l)||!gl(o,u)||!gl(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,d=i.tickSize,f=i.mirror,h=i.tickMargin,p,g,m,v,x,y,b=f?-1:1,_=n.tickSize||d,S=G(n.tickCoord)?n.tickCoord:n.coordinate;switch(u){case"top":p=g=n.coordinate,v=o+ +!f*l,m=v-b*_,y=m-b*h,x=S;break;case"left":m=v=n.coordinate,g=a+ +!f*s,p=g-b*_,x=p-b*h,y=S;break;case"right":m=v=n.coordinate,g=a+ +f*s,p=g+b*_,x=p+b*h,y=S;break;default:p=g=n.coordinate,v=o+ +f*l,m=v+b*_,y=m+b*h,x=S;break}return{line:{x1:p,y1:m,x2:g,y2:v},tick:{x,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,d=n.axisLine,f=Ot(Ot(Ot({},le(this.props,!1)),le(d,!1)),{},{fill:"none"});if(l==="top"||l==="bottom"){var h=+(l==="top"&&!u||l==="bottom"&&u);f=Ot(Ot({},f),{},{x1:i,y1:a+h*s,x2:i+o,y2:a+h*s})}else{var p=+(l==="left"&&!u||l==="right"&&u);f=Ot(Ot({},f),{},{x1:i+p*o,y1:a,x2:i+p*o,y2:a+s})}return k.createElement("line",tl({},f,{className:Se("recharts-cartesian-axis-line",Ur(d,"className"))}))}},{key:"renderTicks",value:function(n,i,a){var o=this,s=this.props,l=s.tickLine,u=s.stroke,d=s.tick,f=s.tickFormatter,h=s.unit,p=U_(Ot(Ot({},this.props),{},{ticks:n}),i,a),g=this.getTickTextAnchor(),m=this.getTickVerticalAnchor(),v=le(this.props,!1),x=le(d,!1),y=Ot(Ot({},v),{},{fill:"none"},le(l,!1)),b=p.map(function(_,S){var j=o.getTickLineCoord(_),O=j.line,P=j.tick,N=Ot(Ot(Ot(Ot({textAnchor:g,verticalAnchor:m},v),{},{stroke:"none",fill:u},x),P),{},{index:S,payload:_,visibleTicksCount:p.length,tickFormatter:f});return k.createElement(Ce,tl({className:"recharts-cartesian-axis-tick",key:"tick-".concat(_.value,"-").concat(_.coordinate,"-").concat(_.tickCoord)},ns(o.props,_,S)),l&&k.createElement("line",tl({},y,O,{className:Se("recharts-cartesian-axis-tick-line",Ur(l,"className"))})),d&&t.renderTickItem(d,N,"".concat(me(f)?f(_.value,S):_.value).concat(h||"")))});return k.createElement("g",{className:"recharts-cartesian-axis-ticks"},b)}},{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,d=i.hide;if(d)return null;var f=this.props,h=f.ticks,p=ux(f,KSe),g=h;return me(l)&&(g=h&&h.length>0?l(this.props):l(p)),o<=0||s<=0||!g||!g.length?null:k.createElement(Ce,{className:Se("recharts-cartesian-axis",u),ref:function(v){n.layerReference=v}},a&&this.renderAxisLine(),this.renderTicks(g,this.state.fontSize,this.state.letterSpacing),Mt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,a){var o,s=Se(i.className,"recharts-cartesian-axis-tick-value");return k.isValidElement(n)?o=k.cloneElement(n,Ot(Ot({},i),{},{className:s})):me(n)?o=n(Ot(Ot({},i),{},{className:s})):o=k.createElement(is,tl({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])}(w.Component);W_(qc,"displayName","CartesianAxis");W_(qc,"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 r_e=["x1","y1","x2","y2","key"],n_e=["offset"];function ss(e){"@babel/helpers - typeof";return ss=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},ss(e)}function SA(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 Jt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?SA(Object(r),!0).forEach(function(n){i_e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):SA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function i_e(e,t,r){return t=a_e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a_e(e){var t=o_e(e,"string");return ss(t)=="symbol"?t:t+""}function o_e(e,t){if(ss(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ss(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ao(){return Ao=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},Ao.apply(this,arguments)}function _A(e,t){if(e==null)return{};var r=s_e(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 s_e(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 l_e=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 k.createElement("rect",{x:i,y:a,ry:l,width:o,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function $3(e,t){var r;if(k.isValidElement(e))r=k.cloneElement(e,t);else if(me(e))r=e(t);else{var n=t.x1,i=t.y1,a=t.x2,o=t.y2,s=t.key,l=_A(t,r_e),u=le(l,!1);u.offset;var d=_A(u,n_e);r=k.createElement("line",Ao({},d,{x1:n,y1:i,x2:a,y2:o,fill:"none",key:s}))}return r}function c_e(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=Jt(Jt({},e),{},{x1:t,y1:s,x2:t+r,y2:s,key:"line-".concat(l),index:l});return $3(i,u)});return k.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function u_e(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=Jt(Jt({},e),{},{x1:s,y1:t,x2:s,y2:t+r,key:"line-".concat(l),index:l});return $3(i,u)});return k.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function d_e(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 d=s.map(function(h){return Math.round(h+i-i)}).sort(function(h,p){return h-p});i!==d[0]&&d.unshift(0);var f=d.map(function(h,p){var g=!d[p+1],m=g?i+o-h:d[p+1]-h;if(m<=0)return null;var v=p%t.length;return k.createElement("rect",{key:"react-".concat(p),y:h,x:n,height:m,width:a,stroke:"none",fill:t[v],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return k.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function f_e(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 d=u.map(function(h){return Math.round(h+a-a)}).sort(function(h,p){return h-p});a!==d[0]&&d.unshift(0);var f=d.map(function(h,p){var g=!d[p+1],m=g?a+s-h:d[p+1]-h;if(m<=0)return null;var v=p%n.length;return k.createElement("rect",{key:"react-".concat(p),x:h,y:o,width:m,height:l,stroke:"none",fill:n[v],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return k.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var h_e=function(t,r){var n=t.xAxis,i=t.width,a=t.height,o=t.offset;return kL(U_(Jt(Jt(Jt({},qc.defaultProps),n),{},{ticks:Ii(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.left,o.left+o.width,r)},p_e=function(t,r){var n=t.yAxis,i=t.width,a=t.height,o=t.offset;return kL(U_(Jt(Jt(Jt({},qc.defaultProps),n),{},{ticks:Ii(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.top,o.top+o.height,r)},Rs={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function mw(e){var t,r,n,i,a,o,s=D_(),l=L_(),u=tSe(),d=Jt(Jt({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Rs.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:Rs.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:Rs.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Rs.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:Rs.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:Rs.verticalFill,x:G(e.x)?e.x:u.left,y:G(e.y)?e.y:u.top,width:G(e.width)?e.width:u.width,height:G(e.height)?e.height:u.height}),f=d.x,h=d.y,p=d.width,g=d.height,m=d.syncWithTicks,v=d.horizontalValues,x=d.verticalValues,y=J1e(),b=Z1e();if(!G(p)||p<=0||!G(g)||g<=0||!G(f)||f!==+f||!G(h)||h!==+h)return null;var _=d.verticalCoordinatesGenerator||h_e,S=d.horizontalCoordinatesGenerator||p_e,j=d.horizontalPoints,O=d.verticalPoints;if((!j||!j.length)&&me(S)){var P=v&&v.length,N=S({yAxis:b?Jt(Jt({},b),{},{ticks:P?v:b.ticks}):void 0,width:s,height:l,offset:u},P?!0:m);Dn(Array.isArray(N),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(ss(N),"]")),Array.isArray(N)&&(j=N)}if((!O||!O.length)&&me(_)){var A=x&&x.length,C=_({xAxis:y?Jt(Jt({},y),{},{ticks:A?x:y.ticks}):void 0,width:s,height:l,offset:u},A?!0:m);Dn(Array.isArray(C),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(ss(C),"]")),Array.isArray(C)&&(O=C)}return k.createElement("g",{className:"recharts-cartesian-grid"},k.createElement(l_e,{fill:d.fill,fillOpacity:d.fillOpacity,x:d.x,y:d.y,width:d.width,height:d.height,ry:d.ry}),k.createElement(c_e,Ao({},d,{offset:u,horizontalPoints:j,xAxis:y,yAxis:b})),k.createElement(u_e,Ao({},d,{offset:u,verticalPoints:O,xAxis:y,yAxis:b})),k.createElement(d_e,Ao({},d,{horizontalPoints:j})),k.createElement(f_e,Ao({},d,{verticalPoints:O})))}mw.displayName="CartesianGrid";var m_e=["type","layout","connectNulls","ref"],g_e=["key"];function dc(e){"@babel/helpers - typeof";return dc=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},dc(e)}function jA(e,t){if(e==null)return{};var r=v_e(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 v_e(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 Bu(){return Bu=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},Bu.apply(this,arguments)}function OA(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 Er(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?OA(Object(r),!0).forEach(function(n){Tn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):OA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ms(e){return w_e(e)||b_e(e)||x_e(e)||y_e()}function y_e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 563In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function x_e(e,t){if(e){if(typeof e=="string")return gw(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 gw(e,t)}}function b_e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function w_e(e){if(Array.isArray(e))return gw(e)}function gw(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 S_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PA(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,M3(n.key),n)}}function __e(e,t,r){return t&&PA(e.prototype,t),r&&PA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function j_e(e,t,r){return t=Im(t),O_e(e,R3()?Reflect.construct(t,r||[],Im(e).constructor):t.apply(e,r))}function O_e(e,t){if(t&&(dc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return P_e(e)}function P_e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function R3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(R3=function(){return!!e})()}function Im(e){return Im=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Im(e)}function N_e(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&&vw(e,t)}function vw(e,t){return vw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},vw(e,t)}function Tn(e,t,r){return t=M3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function M3(e){var t=E_e(e,"string");return dc(t)=="symbol"?t:t+""}function E_e(e,t){if(dc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(dc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Af=function(e){function t(){var r;S_e(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=j_e(this,t,[].concat(i)),Tn(r,"state",{isAnimationFinished:!0,totalLength:0}),Tn(r,"generateSimpleStrokeDasharray",function(o,s){return"".concat(s,"px ").concat(o-s,"px")}),Tn(r,"getStrokeDasharray",function(o,s,l){var u=l.reduce(function(x,y){return x+y});if(!u)return r.generateSimpleStrokeDasharray(s,o);for(var d=Math.floor(o/u),f=o%u,h=s-o,p=[],g=0,m=0;g<l.length;m+=l[g],++g)if(m+l[g]>f){p=[].concat(Ms(l.slice(0,g)),[f-m]);break}var v=p.length%2===0?[0,h]:[h];return[].concat(Ms(t.repeat(l,d)),Ms(p),v).map(function(x){return"".concat(x,"px")}).join(", ")}),Tn(r,"id",Lc("recharts-line-")),Tn(r,"pathRef",function(o){r.mainCurve=o}),Tn(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),Tn(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return N_e(t,e),__e(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,d=a.children,f=Wr(d,kf);if(!f)return null;var h=function(m,v){return{x:m.x,y:m.y,value:m.value,errorVal:kt(m.payload,v)}},p={clipPath:n?"url(#clipPath-".concat(i,")"):null};return k.createElement(Ce,p,f.map(function(g){return k.cloneElement(g,{key:"bar-".concat(g.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,d=s.dataKey,f=le(this.props,!1),h=le(l,!0),p=u.map(function(m,v){var x=Er(Er(Er({key:"dot-".concat(v),r:3},f),h),{},{index:v,cx:m.x,cy:m.y,value:m.value,dataKey:d,payload:m.payload,points:u});return t.renderDotItem(l,x)}),g={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return k.createElement(Ce,Bu({className:"recharts-line-dots",key:"dots"},g),p)}},{key:"renderCurveStatically",value:function(n,i,a,o){var s=this.props,l=s.type,u=s.layout,d=s.connectNulls;s.ref;var f=jA(s,m_e),h=Er(Er(Er({},le(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(a,")"):null,points:n},o),{},{type:l,layout:u,connectNulls:d});return k.createElement(gm,Bu({},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,d=o.animationBegin,f=o.animationDuration,h=o.animationEasing,p=o.animationId,g=o.animateNewValues,m=o.width,v=o.height,x=this.state,y=x.prevPoints,b=x.totalLength;return k.createElement(gi,{begin:d,duration:f,isActive:u,easing:h,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(_){var S=_.t;if(y){var j=y.length/s.length,O=s.map(function(T,L){var R=Math.floor(L*j);if(y[R]){var I=y[R],D=Rr(I.x,T.x),$=Rr(I.y,T.y);return Er(Er({},T),{},{x:D(S),y:$(S)})}if(g){var E=Rr(m*2,T.x),M=Rr(v/2,T.y);return Er(Er({},T),{},{x:E(S),y:M(S)})}return Er(Er({},T),{},{x:T.x,y:T.y})});return a.renderCurveStatically(O,n,i)}var P=Rr(0,b),N=P(S),A;if(l){var C="".concat(l).split(/[,\s]+/gim).map(function(T){return parseFloat(T)});A=a.getStrokeDasharray(N,b,C)}else A=a.generateSimpleStrokeDasharray(b,N);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,d=l.totalLength;return s&&o&&o.length&&(!u&&d>0||!Ef(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,d=i.yAxis,f=i.top,h=i.left,p=i.width,g=i.height,m=i.isAnimationActive,v=i.id;if(a||!s||!s.length)return null;var x=this.state.isAnimationFinished,y=s.length===1,b=Se("recharts-line",l),_=u&&u.allowDataOverflow,S=d&&d.allowDataOverflow,j=_||S,O=xe(v)?this.id:v,P=(n=le(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},N=P.r,A=N===void 0?3:N,C=P.strokeWidth,T=C===void 0?2:C,L=Qte(o)?o:{},R=L.clipDot,I=R===void 0?!0:R,D=A*2+T;return k.createElement(Ce,{className:b},_||S?k.createElement("defs",null,k.createElement("clipPath",{id:"clipPath-".concat(O)},k.createElement("rect",{x:_?h:h-p/2,y:S?f:f-g/2,width:_?p:p*2,height:S?g:g*2})),!I&&k.createElement("clipPath",{id:"clipPath-dots-".concat(O)},k.createElement("rect",{x:h-D/2,y:f-D/2,width:p+D,height:g+D}))):null,!y&&this.renderCurve(j,O),this.renderErrorBar(j,O),(y||o)&&this.renderDots(j,I,O),(!m||x)&&Ui.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(Ms(n),[0]):n,o=[],s=0;s<i;++s)o=[].concat(Ms(o),Ms(a));return o}},{key:"renderDotItem",value:function(n,i){var a;if(k.isValidElement(n))a=k.cloneElement(n,i);else if(me(n))a=n(i);else{var o=i.key,s=jA(i,g_e),l=Se("recharts-line-dot",typeof n!="boolean"?n.className:"");a=k.createElement(xv,Bu({key:o},s,{className:l}))}return a}}])}(w.PureComponent);Tn(Af,"displayName","Line");Tn(Af,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!ci.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});Tn(Af,"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,d=t.layout,f=l.map(function(h,p){var g=kt(h,o);return d==="horizontal"?{x:XE({axis:r,ticks:i,bandSize:s,entry:h,index:p}),y:xe(g)?null:n.scale(g),value:g,payload:h}:{x:xe(g)?null:r.scale(g),y:XE({axis:n,ticks:a,bandSize:s,entry:h,index:p}),value:g,payload:h}});return Er({points:f,layout:d},u)});function fc(e){"@babel/helpers - typeof";return fc=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},fc(e)}function k_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A_e(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,L3(n.key),n)}}function C_e(e,t,r){return t&&A_e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function T_e(e,t,r){return t=Dm(t),$_e(e,I3()?Reflect.construct(t,r||[],Dm(e).constructor):t.apply(e,r))}function $_e(e,t){if(t&&(fc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return R_e(e)}function R_e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function I3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(I3=function(){return!!e})()}function Dm(e){return Dm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Dm(e)}function M_e(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&&yw(e,t)}function yw(e,t){return yw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},yw(e,t)}function D3(e,t,r){return t=L3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function L3(e){var t=I_e(e,"string");return fc(t)=="symbol"?t:t+""}function I_e(e,t){if(fc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(fc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xw(){return xw=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},xw.apply(this,arguments)}function D_e(e){var t=e.xAxisId,r=D_(),n=L_(),i=S3(t);return i==null?null:w.createElement(qc,xw({},i,{className:Se("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(o){return Ii(o,!0)}}))}var hc=function(e){function t(){return k_e(this,t),T_e(this,t,arguments)}return M_e(t,e),C_e(t,[{key:"render",value:function(){return w.createElement(D_e,this.props)}}])}(w.Component);D3(hc,"displayName","XAxis");D3(hc,"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 pc(e){"@babel/helpers - typeof";return pc=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},pc(e)}function L_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function F_e(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,U3(n.key),n)}}function B_e(e,t,r){return t&&F_e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function U_e(e,t,r){return t=Lm(t),W_e(e,F3()?Reflect.construct(t,r||[],Lm(e).constructor):t.apply(e,r))}function W_e(e,t){if(t&&(pc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return z_e(e)}function z_e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function F3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(F3=function(){return!!e})()}function Lm(e){return Lm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Lm(e)}function H_e(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&&bw(e,t)}function bw(e,t){return bw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},bw(e,t)}function B3(e,t,r){return t=U3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function U3(e){var t=q_e(e,"string");return pc(t)=="symbol"?t:t+""}function q_e(e,t){if(pc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(pc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ww(){return ww=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},ww.apply(this,arguments)}var V_e=function(t){var r=t.yAxisId,n=D_(),i=L_(),a=_3(r);return a==null?null:w.createElement(qc,ww({},a,{className:Se("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:i},ticksGenerator:function(s){return Ii(s,!0)}}))},mc=function(e){function t(){return L_e(this,t),U_e(this,t,arguments)}return H_e(t,e),B_e(t,[{key:"render",value:function(){return w.createElement(V_e,this.props)}}])}(w.Component);B3(mc,"displayName","YAxis");B3(mc,"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 NA(e){return X_e(e)||Y_e(e)||G_e(e)||K_e()}function K_e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 564In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function G_e(e,t){if(e){if(typeof e=="string")return Sw(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 Sw(e,t)}}function Y_e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function X_e(e){if(Array.isArray(e))return Sw(e)}function Sw(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 _w=function(t,r,n,i,a){var o=Wr(t,B_),s=Wr(t,Ev),l=[].concat(NA(o),NA(s)),u=Wr(t,Av),d="".concat(i,"Id"),f=i[0],h=r;if(l.length&&(h=l.reduce(function(m,v){if(v.props[d]===n&&di(v.props,"extendDomain")&&G(v.props[f])){var x=v.props[f];return[Math.min(m[0],x),Math.max(m[1],x)]}return m},h)),u.length){var p="".concat(f,"1"),g="".concat(f,"2");h=u.reduce(function(m,v){if(v.props[d]===n&&di(v.props,"extendDomain")&&G(v.props[p])&&G(v.props[g])){var x=v.props[p],y=v.props[g];return[Math.min(m[0],x,y),Math.max(m[1],x,y)]}return m},h)}return a&&a.length&&(h=a.reduce(function(m,v){return G(v)?[Math.min(m[0],v),Math.max(m[1],v)]:m},h)),h},W3={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,d){this.fn=l,this.context=u,this.once=d||!1}function a(l,u,d,f,h){if(typeof d!="function")throw new TypeError("The listener must be a function");var p=new i(d,f||l,h),g=r?r+u:u;return l._events[g]?l._events[g].fn?l._events[g]=[l._events[g],p]:l._events[g].push(p):(l._events[g]=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=[],d,f;if(this._eventsCount===0)return u;for(f in d=this._events)t.call(d,f)&&u.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(d)):u},s.prototype.listeners=function(u){var d=r?r+u:u,f=this._events[d];if(!f)return[];if(f.fn)return[f.fn];for(var h=0,p=f.length,g=new Array(p);h<p;h++)g[h]=f[h].fn;return g},s.prototype.listenerCount=function(u){var d=r?r+u:u,f=this._events[d];return f?f.fn?1:f.length:0},s.prototype.emit=function(u,d,f,h,p,g){var m=r?r+u:u;if(!this._events[m])return!1;var v=this._events[m],x=arguments.length,y,b;if(v.fn){switch(v.once&&this.removeListener(u,v.fn,void 0,!0),x){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,d),!0;case 3:return v.fn.call(v.context,d,f),!0;case 4:return v.fn.call(v.context,d,f,h),!0;case 5:return v.fn.call(v.context,d,f,h,p),!0;case 6:return v.fn.call(v.context,d,f,h,p,g),!0}for(b=1,y=new Array(x-1);b<x;b++)y[b-1]=arguments[b];v.fn.apply(v.context,y)}else{var _=v.length,S;for(b=0;b<_;b++)switch(v[b].once&&this.removeListener(u,v[b].fn,void 0,!0),x){case 1:v[b].fn.call(v[b].context);break;case 2:v[b].fn.call(v[b].context,d);break;case 3:v[b].fn.call(v[b].context,d,f);break;case 4:v[b].fn.call(v[b].context,d,f,h);break;default:if(!y)for(S=1,y=new Array(x-1);S<x;S++)y[S-1]=arguments[S];v[b].fn.apply(v[b].context,y)}}return!0},s.prototype.on=function(u,d,f){return a(this,u,d,f,!1)},s.prototype.once=function(u,d,f){return a(this,u,d,f,!0)},s.prototype.removeListener=function(u,d,f,h){var p=r?r+u:u;if(!this._events[p])return this;if(!d)return o(this,p),this;var g=this._events[p];if(g.fn)g.fn===d&&(!h||g.once)&&(!f||g.context===f)&&o(this,p);else{for(var m=0,v=[],x=g.length;m<x;m++)(g[m].fn!==d||h&&!g[m].once||f&&g[m].context!==f)&&v.push(g[m]);v.length?this._events[p]=v.length===1?v[0]:v:o(this,p)}return this},s.prototype.removeAllListeners=function(u){var d;return u?(d=r?r+u:u,this._events[d]&&o(this,d)):(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})(W3);var Q_e=W3.exports;const J_e=Ie(Q_e);var dx=new J_e,fx="recharts.syncMouseEvents";function ef(e){"@babel/helpers - typeof";return ef=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},ef(e)}function Z_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eje(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,z3(n.key),n)}}function tje(e,t,r){return t&&eje(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function hx(e,t,r){return t=z3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function z3(e){var t=rje(e,"string");return ef(t)=="symbol"?t:t+""}function rje(e,t){if(ef(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ef(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var nje=function(){function e(){Z_e(this,e),hx(this,"activeIndex",0),hx(this,"coordinateList",[]),hx(this,"layout","horizontal")}return tje(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,d=r.offset,f=d===void 0?null:d,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=f??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,d=((n=window)===null||n===void 0?void 0:n.scrollY)||0,f=a+l+u,h=o+this.offset.top+s/2+d;this.mouseHandlerCallback({pageX:f,pageY:h})}}}])}();function ije(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&&G(n)&&G(i))return!0}return!1}function aje(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 H3(e){var t=e.cx,r=e.cy,n=e.radius,i=e.startAngle,a=e.endAngle,o=Xe(t,r,n,i),s=Xe(t,r,n,a);return{points:[o,s],cx:t,cy:r,radius:n,startAngle:i,endAngle:a}}function oje(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,d=t.outerRadius,f=t.angle,h=Xe(s,l,u,f),p=Xe(s,l,d,f);n=h.x,i=h.y,a=p.x,o=p.y}else return H3(t);return[{x:n,y:i},{x:a,y:o}]}function tf(e){"@babel/helpers - typeof";return tf=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},tf(e)}function EA(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 Ph(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?EA(Object(r),!0).forEach(function(n){sje(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):EA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sje(e,t,r){return t=lje(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lje(e){var t=cje(e,"string");return tf(t)=="symbol"?t:t+""}function cje(e,t){if(tf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(tf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function uje(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,d=e.tooltipAxisBandSize,f=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 g,m=gm;if(h==="ScatterChart")g=o,m=E0e;else if(h==="BarChart")g=aje(f,o,l,d),m=$_;else if(f==="radial"){var v=H3(o),x=v.cx,y=v.cy,b=v.radius,_=v.startAngle,S=v.endAngle;g={cx:x,cy:y,startAngle:_,endAngle:S,innerRadius:b,outerRadius:b},m=BL}else g={points:oje(f,o,l)},m=gm;var j=Ph(Ph(Ph(Ph({stroke:"#ccc",pointerEvents:"none"},l),g),le(p,!1)),{},{payload:s,payloadIndex:u,className:Se("recharts-tooltip-cursor",p.className)});return w.isValidElement(p)?w.cloneElement(p,j):w.createElement(m,j)}var dje=["item"],fje=["children","className","width","height","style","compact","title","desc"];function gc(e){"@babel/helpers - typeof";return gc=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},gc(e)}function rl(){return rl=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},rl.apply(this,arguments)}function kA(e,t){return mje(e)||pje(e,t)||V3(e,t)||hje()}function hje(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 565In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pje(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(d){u=!0,i=d}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function mje(e){if(Array.isArray(e))return e}function AA(e,t){if(e==null)return{};var r=gje(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 gje(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 vje(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yje(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,K3(n.key),n)}}function xje(e,t,r){return t&&yje(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function bje(e,t,r){return t=Fm(t),wje(e,q3()?Reflect.construct(t,r||[],Fm(e).constructor):t.apply(e,r))}function wje(e,t){if(t&&(gc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Sje(e)}function Sje(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function q3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(q3=function(){return!!e})()}function Fm(e){return Fm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Fm(e)}function _je(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&&jw(e,t)}function jw(e,t){return jw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},jw(e,t)}function vc(e){return Pje(e)||Oje(e)||V3(e)||jje()}function jje(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 566In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function V3(e,t){if(e){if(typeof e=="string")return Ow(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 Ow(e,t)}}function Oje(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Pje(e){if(Array.isArray(e))return Ow(e)}function Ow(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 CA(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 W(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?CA(Object(r),!0).forEach(function(n){ue(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):CA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ue(e,t,r){return t=K3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function K3(e){var t=Nje(e,"string");return gc(t)=="symbol"?t:t+""}function Nje(e,t){if(gc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(gc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Eje={xAxis:["bottom","top"],yAxis:["left","right"]},kje={width:"100%",height:"100%"},G3={x:0,y:0};function Nh(e){return e}var Aje=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},Cje=function(t,r,n,i){var a=r.find(function(d){return d&&d.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 W(W(W({},i),Xe(i.cx,i.cy,s,o)),{},{angle:o,radius:s})}var l=a.coordinate,u=i.angle;return W(W(W({},i),Xe(i.cx,i.cy,l,u)),{},{angle:u,radius:l})}return G3},Cv=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(vc(s),vc(u)):s},[]);return o.length>0?o:t&&t.length&&G(i)&&G(a)?t.slice(i,a+1):[]};function Y3(e){return e==="number"?[0,"auto"]:void 0}var Pw=function(t,r,n,i){var a=t.graphicalItems,o=t.tooltipAxis,s=Cv(r,t);return n<0||!a||!a.length||n>=s.length?null:a.reduce(function(l,u){var d,f=(d=u.props.data)!==null&&d!==void 0?d:r;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(o.dataKey&&!o.allowDuplicatedCategory){var p=f===void 0?s:f;h=Fp(p,o.dataKey,i)}else h=f&&f[n]||s[n];return h?[].concat(vc(l),[RL(u,h)]):l},[])},TA=function(t,r,n,i){var a=i||{x:t.chartX,y:t.chartY},o=Aje(a,n),s=t.orderedTooltipTicks,l=t.tooltipAxis,u=t.tooltipTicks,d=Jge(o,s,u,l);if(d>=0&&u){var f=u[d]&&u[d].value,h=Pw(t,r,d,f),p=Cje(n,s,d,a);return{activeTooltipIndex:d,activeLabel:f,activePayload:h,activeCoordinate:p}}return null},Tje=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,d=t.layout,f=t.children,h=t.stackOffset,p=EL(d,a);return n.reduce(function(g,m){var v,x=m.type.defaultProps!==void 0?W(W({},m.type.defaultProps),m.props):m.props,y=x.type,b=x.dataKey,_=x.allowDataOverflow,S=x.allowDuplicatedCategory,j=x.scale,O=x.ticks,P=x.includeHidden,N=x[o];if(g[N])return g;var A=Cv(t.data,{graphicalItems:i.filter(function(U){var K,J=o in U.props?U.props[o]:(K=U.type.defaultProps)===null||K===void 0?void 0:K[o];return J===N}),dataStartIndex:l,dataEndIndex:u}),C=A.length,T,L,R;ije(x.domain,_,y)&&(T=Fb(x.domain,null,_),p&&(y==="number"||j!=="auto")&&(R=Iu(A,b,"category")));var I=Y3(y);if(!T||T.length===0){var D,$=(D=x.domain)!==null&&D!==void 0?D:I;if(b){if(T=Iu(A,b,y),y==="category"&&p){var E=Ute(T);S&&E?(L=T,T=Pm(0,C)):S||(T=ek($,T,m).reduce(function(U,K){return U.indexOf(K)>=0?U:[].concat(vc(U),[K])},[]))}else if(y==="category")S?T=T.filter(function(U){return U!==""&&!xe(U)}):T=ek($,T,m).reduce(function(U,K){return U.indexOf(K)>=0||K===""||xe(K)?U:[].concat(vc(U),[K])},[]);else if(y==="number"){var M=nve(A,i.filter(function(U){var K,J,he=o in U.props?U.props[o]:(K=U.type.defaultProps)===null||K===void 0?void 0:K[o],Ne="hide"in U.props?U.props.hide:(J=U.type.defaultProps)===null||J===void 0?void 0:J.hide;return he===N&&(P||!Ne)}),b,a,d);M&&(T=M)}p&&(y==="number"||j!=="auto")&&(R=Iu(A,b,"category"))}else p?T=Pm(0,C):s&&s[N]&&s[N].hasStack&&y==="number"?T=h==="expand"?[0,1]:$L(s[N].stackGroups,l,u):T=NL(A,i.filter(function(U){var K=o in U.props?U.props[o]:U.type.defaultProps[o],J="hide"in U.props?U.props.hide:U.type.defaultProps.hide;return K===N&&(P||!J)}),y,d,!0);if(y==="number")T=_w(f,T,N,a,O),$&&(T=Fb($,T,_));else if(y==="category"&&$){var F=$,H=T.every(function(U){return F.indexOf(U)>=0});H&&(T=F)}}return W(W({},g),{},ue({},N,W(W({},x),{},{axisType:a,domain:T,categoricalDomain:R,duplicateDomain:L,originalDomain:(v=x.domain)!==null&&v!==void 0?v:I,isCategorical:p,layout:d})))},{})},$je=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,d=t.layout,f=t.children,h=Cv(t.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:u}),p=h.length,g=EL(d,a),m=-1;return n.reduce(function(v,x){var y=x.type.defaultProps!==void 0?W(W({},x.type.defaultProps),x.props):x.props,b=y[o],_=Y3("number");if(!v[b]){m++;var S;return g?S=Pm(0,p):s&&s[b]&&s[b].hasStack?(S=$L(s[b].stackGroups,l,u),S=_w(f,S,b,a)):(S=Fb(_,NL(h,n.filter(function(j){var O,P,N=o in j.props?j.props[o]:(O=j.type.defaultProps)===null||O===void 0?void 0:O[o],A="hide"in j.props?j.props.hide:(P=j.type.defaultProps)===null||P===void 0?void 0:P.hide;return N===b&&!A}),"number",d),i.defaultProps.allowDataOverflow),S=_w(f,S,b,a)),W(W({},v),{},ue({},b,W(W({axisType:a},i.defaultProps),{},{hide:!0,orientation:Ur(Eje,"".concat(a,".").concat(m%2),null),domain:S,originalDomain:_,isCategorical:g,layout:d})))}return v},{})},Rje=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,d=t.children,f="".concat(i,"Id"),h=Wr(d,a),p={};return h&&h.length?p=Tje(t,{axes:h,graphicalItems:o,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:u}):o&&o.length&&(p=$je(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:u})),p},Mje=function(t){var r=wa(t),n=Ii(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:o_(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:hm(r,n)}},$A=function(t){var r=t.children,n=t.defaultShowTooltip,i=Tr(r,ac),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}},Ije=function(t){return!t||!t.length?!1:t.some(function(r){var n=Fi(r&&r.type);return n&&n.indexOf("Bar")>=0})},RA=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"}},Dje=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,d=n.height,f=n.children,h=n.margin||{},p=Tr(f,ac),g=Tr(f,vl),m=Object.keys(l).reduce(function(S,j){var O=l[j],P=O.orientation;return!O.mirror&&!O.hide?W(W({},S),{},ue({},P,S[P]+O.width)):S},{left:h.left||0,right:h.right||0}),v=Object.keys(o).reduce(function(S,j){var O=o[j],P=O.orientation;return!O.mirror&&!O.hide?W(W({},S),{},ue({},P,Ur(S,"".concat(P))+O.height)):S},{top:h.top||0,bottom:h.bottom||0}),x=W(W({},v),m),y=x.bottom;p&&(x.bottom+=p.props.height||ac.defaultProps.height),g&&r&&(x=tve(x,i,n,r));var b=u-x.left-x.right,_=d-x.top-x.bottom;return W(W({brushBottom:y},x),{},{width:Math.max(b,0),height:Math.max(_,0)})},Lje=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},z_=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,d=t.formatAxisMap,f=t.defaultProps,h=function(x,y){var b=y.graphicalItems,_=y.stackGroups,S=y.offset,j=y.updateId,O=y.dataStartIndex,P=y.dataEndIndex,N=x.barSize,A=x.layout,C=x.barGap,T=x.barCategoryGap,L=x.maxBarSize,R=RA(A),I=R.numericAxisName,D=R.cateAxisName,$=Ije(b),E=[];return b.forEach(function(M,F){var H=Cv(x.data,{graphicalItems:[M],dataStartIndex:O,dataEndIndex:P}),U=M.type.defaultProps!==void 0?W(W({},M.type.defaultProps),M.props):M.props,K=U.dataKey,J=U.maxBarSize,he=U["".concat(I,"Id")],Ne=U["".concat(D,"Id")],Y={},ye=l.reduce(function(Pr,Yn){var mn=y["".concat(Yn.axisType,"Map")],Cf=U["".concat(Yn.axisType,"Id")];mn&&mn[Cf]||Yn.axisType==="zAxis"||os();var Tf=mn[Cf];return W(W({},Pr),{},ue(ue({},Yn.axisType,Tf),"".concat(Yn.axisType,"Ticks"),Ii(Tf)))},Y),q=ye[D],Q=ye["".concat(D,"Ticks")],X=_&&_[he]&&_[he].hasStack&&fve(M,_[he].stackGroups),B=Fi(M.type).indexOf("Bar")>=0,je=hm(q,Q),ge=[],He=$&&Zge({barSize:N,stackGroups:_,totalSize:Lje(ye,D)});if(B){var Be,ht,dr=xe(J)?L:J,Or=(Be=(ht=hm(q,Q,!0))!==null&&ht!==void 0?ht:dr)!==null&&Be!==void 0?Be:0;ge=eve({barGap:C,barCategoryGap:T,bandSize:Or!==je?Or:je,sizeList:He[Ne],maxBarSize:dr}),Or!==je&&(ge=ge.map(function(Pr){return W(W({},Pr),{},{position:W(W({},Pr.position),{},{offset:Pr.position.offset-Or/2})})}))}var ao=M&&M.type&&M.type.getComposedData;ao&&E.push({props:W(W({},ao(W(W({},ye),{},{displayedData:H,props:x,dataKey:K,item:M,bandSize:je,barPosition:ge,offset:S,stackedData:X,layout:A,dataStartIndex:O,dataEndIndex:P}))),{},ue(ue(ue({key:M.key||"item-".concat(F)},I,ye[I]),D,ye[D]),"animationId",j)),childIndex:ere(M,x.children),item:M})}),E},p=function(x,y){var b=x.props,_=x.dataStartIndex,S=x.dataEndIndex,j=x.updateId;if(!KP({props:b}))return null;var O=b.children,P=b.layout,N=b.stackOffset,A=b.data,C=b.reverseStackOrder,T=RA(P),L=T.numericAxisName,R=T.cateAxisName,I=Wr(O,n),D=uve(A,I,"".concat(L,"Id"),"".concat(R,"Id"),N,C),$=l.reduce(function(U,K){var J="".concat(K.axisType,"Map");return W(W({},U),{},ue({},J,Rje(b,W(W({},K),{},{graphicalItems:I,stackGroups:K.axisType===L&&D,dataStartIndex:_,dataEndIndex:S}))))},{}),E=Dje(W(W({},$),{},{props:b,graphicalItems:I}),y==null?void 0:y.legendBBox);Object.keys($).forEach(function(U){$[U]=d(b,$[U],E,U.replace("Map",""),r)});var M=$["".concat(R,"Map")],F=Mje(M),H=h(b,W(W({},$),{},{dataStartIndex:_,dataEndIndex:S,updateId:j,graphicalItems:I,stackGroups:D,offset:E}));return W(W({formattedGraphicalItems:H,graphicalItems:I,offset:E,stackGroups:D},F),$)},g=function(v){function x(y){var b,_,S;return vje(this,x),S=bje(this,x,[y]),ue(S,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ue(S,"accessibilityManager",new nje),ue(S,"handleLegendBBoxUpdate",function(j){if(j){var O=S.state,P=O.dataStartIndex,N=O.dataEndIndex,A=O.updateId;S.setState(W({legendBBox:j},p({props:S.props,dataStartIndex:P,dataEndIndex:N,updateId:A},W(W({},S.state),{},{legendBBox:j}))))}}),ue(S,"handleReceiveSyncEvent",function(j,O,P){if(S.props.syncId===j){if(P===S.eventEmitterSymbol&&typeof S.props.syncMethod!="function")return;S.applySyncEvent(O)}}),ue(S,"handleBrushChange",function(j){var O=j.startIndex,P=j.endIndex;if(O!==S.state.dataStartIndex||P!==S.state.dataEndIndex){var N=S.state.updateId;S.setState(function(){return W({dataStartIndex:O,dataEndIndex:P},p({props:S.props,dataStartIndex:O,dataEndIndex:P,updateId:N},S.state))}),S.triggerSyncEvent({dataStartIndex:O,dataEndIndex:P})}}),ue(S,"handleMouseEnter",function(j){var O=S.getMouseInfo(j);if(O){var P=W(W({},O),{},{isTooltipActive:!0});S.setState(P),S.triggerSyncEvent(P);var N=S.props.onMouseEnter;me(N)&&N(P,j)}}),ue(S,"triggeredAfterMouseMove",function(j){var O=S.getMouseInfo(j),P=O?W(W({},O),{},{isTooltipActive:!0}):{isTooltipActive:!1};S.setState(P),S.triggerSyncEvent(P);var N=S.props.onMouseMove;me(N)&&N(P,j)}),ue(S,"handleItemMouseEnter",function(j){S.setState(function(){return{isTooltipActive:!0,activeItem:j,activePayload:j.tooltipPayload,activeCoordinate:j.tooltipPosition||{x:j.cx,y:j.cy}}})}),ue(S,"handleItemMouseLeave",function(){S.setState(function(){return{isTooltipActive:!1}})}),ue(S,"handleMouseMove",function(j){j.persist(),S.throttleTriggeredAfterMouseMove(j)}),ue(S,"handleMouseLeave",function(j){S.throttleTriggeredAfterMouseMove.cancel();var O={isTooltipActive:!1};S.setState(O),S.triggerSyncEvent(O);var P=S.props.onMouseLeave;me(P)&&P(O,j)}),ue(S,"handleOuterEvent",function(j){var O=Zte(j),P=Ur(S.props,"".concat(O));if(O&&me(P)){var N,A;/.*touch.*/i.test(O)?A=S.getMouseInfo(j.changedTouches[0]):A=S.getMouseInfo(j),P((N=A)!==null&&N!==void 0?N:{},j)}}),ue(S,"handleClick",function(j){var O=S.getMouseInfo(j);if(O){var P=W(W({},O),{},{isTooltipActive:!0});S.setState(P),S.triggerSyncEvent(P);var N=S.props.onClick;me(N)&&N(P,j)}}),ue(S,"handleMouseDown",function(j){var O=S.props.onMouseDown;if(me(O)){var P=S.getMouseInfo(j);O(P,j)}}),ue(S,"handleMouseUp",function(j){var O=S.props.onMouseUp;if(me(O)){var P=S.getMouseInfo(j);O(P,j)}}),ue(S,"handleTouchMove",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&S.throttleTriggeredAfterMouseMove(j.changedTouches[0])}),ue(S,"handleTouchStart",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&S.handleMouseDown(j.changedTouches[0])}),ue(S,"handleTouchEnd",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&S.handleMouseUp(j.changedTouches[0])}),ue(S,"handleDoubleClick",function(j){var O=S.props.onDoubleClick;if(me(O)){var P=S.getMouseInfo(j);O(P,j)}}),ue(S,"handleContextMenu",function(j){var O=S.props.onContextMenu;if(me(O)){var P=S.getMouseInfo(j);O(P,j)}}),ue(S,"triggerSyncEvent",function(j){S.props.syncId!==void 0&&dx.emit(fx,S.props.syncId,j,S.eventEmitterSymbol)}),ue(S,"applySyncEvent",function(j){var O=S.props,P=O.layout,N=O.syncMethod,A=S.state.updateId,C=j.dataStartIndex,T=j.dataEndIndex;if(j.dataStartIndex!==void 0||j.dataEndIndex!==void 0)S.setState(W({dataStartIndex:C,dataEndIndex:T},p({props:S.props,dataStartIndex:C,dataEndIndex:T,updateId:A},S.state)));else if(j.activeTooltipIndex!==void 0){var L=j.chartX,R=j.chartY,I=j.activeTooltipIndex,D=S.state,$=D.offset,E=D.tooltipTicks;if(!$)return;if(typeof N=="function")I=N(E,j);else if(N==="value"){I=-1;for(var M=0;M<E.length;M++)if(E[M].value===j.activeLabel){I=M;break}}var F=W(W({},$),{},{x:$.left,y:$.top}),H=Math.min(L,F.x+F.width),U=Math.min(R,F.y+F.height),K=E[I]&&E[I].value,J=Pw(S.state,S.props.data,I),he=E[I]?{x:P==="horizontal"?E[I].coordinate:H,y:P==="horizontal"?U:E[I].coordinate}:G3;S.setState(W(W({},j),{},{activeLabel:K,activeCoordinate:he,activePayload:J,activeTooltipIndex:I}))}else S.setState(j)}),ue(S,"renderCursor",function(j){var O,P=S.state,N=P.isTooltipActive,A=P.activeCoordinate,C=P.activePayload,T=P.offset,L=P.activeTooltipIndex,R=P.tooltipAxisBandSize,I=S.getTooltipEventType(),D=(O=j.props.active)!==null&&O!==void 0?O:N,$=S.props.layout,E=j.key||"_recharts-cursor";return k.createElement(uje,{key:E,activeCoordinate:A,activePayload:C,activeTooltipIndex:L,chartName:r,element:j,isActive:D,layout:$,offset:T,tooltipAxisBandSize:R,tooltipEventType:I})}),ue(S,"renderPolarAxis",function(j,O,P){var N=Ur(j,"type.axisType"),A=Ur(S.state,"".concat(N,"Map")),C=j.type.defaultProps,T=C!==void 0?W(W({},C),j.props):j.props,L=A&&A[T["".concat(N,"Id")]];return w.cloneElement(j,W(W({},L),{},{className:Se(N,L.className),key:j.key||"".concat(O,"-").concat(P),ticks:Ii(L,!0)}))}),ue(S,"renderPolarGrid",function(j){var O=j.props,P=O.radialLines,N=O.polarAngles,A=O.polarRadius,C=S.state,T=C.radiusAxisMap,L=C.angleAxisMap,R=wa(T),I=wa(L),D=I.cx,$=I.cy,E=I.innerRadius,M=I.outerRadius;return w.cloneElement(j,{polarAngles:Array.isArray(N)?N:Ii(I,!0).map(function(F){return F.coordinate}),polarRadius:Array.isArray(A)?A:Ii(R,!0).map(function(F){return F.coordinate}),cx:D,cy:$,innerRadius:E,outerRadius:M,key:j.key||"polar-grid",radialLines:P})}),ue(S,"renderLegend",function(){var j=S.state.formattedGraphicalItems,O=S.props,P=O.children,N=O.width,A=O.height,C=S.props.margin||{},T=N-(C.left||0)-(C.right||0),L=OL({children:P,formattedGraphicalItems:j,legendWidth:T,legendContent:u});if(!L)return null;var R=L.item,I=AA(L,dje);return w.cloneElement(R,W(W({},I),{},{chartWidth:N,chartHeight:A,margin:C,onBBoxUpdate:S.handleLegendBBoxUpdate}))}),ue(S,"renderTooltip",function(){var j,O=S.props,P=O.children,N=O.accessibilityLayer,A=Tr(P,tn);if(!A)return null;var C=S.state,T=C.isTooltipActive,L=C.activeCoordinate,R=C.activePayload,I=C.activeLabel,D=C.offset,$=(j=A.props.active)!==null&&j!==void 0?j:T;return w.cloneElement(A,{viewBox:W(W({},D),{},{x:D.left,y:D.top}),active:$,label:I,payload:$?R:[],coordinate:L,accessibilityLayer:N})}),ue(S,"renderBrush",function(j){var O=S.props,P=O.margin,N=O.data,A=S.state,C=A.offset,T=A.dataStartIndex,L=A.dataEndIndex,R=A.updateId;return w.cloneElement(j,{key:j.key||"_recharts-brush",onChange:Sh(S.handleBrushChange,j.props.onChange),data:N,x:G(j.props.x)?j.props.x:C.left,y:G(j.props.y)?j.props.y:C.top+C.height+C.brushBottom-(P.bottom||0),width:G(j.props.width)?j.props.width:C.width,startIndex:T,endIndex:L,updateId:"brush-".concat(R)})}),ue(S,"renderReferenceElement",function(j,O,P){if(!j)return null;var N=S,A=N.clipPathId,C=S.state,T=C.xAxisMap,L=C.yAxisMap,R=C.offset,I=j.type.defaultProps||{},D=j.props,$=D.xAxisId,E=$===void 0?I.xAxisId:$,M=D.yAxisId,F=M===void 0?I.yAxisId:M;return w.cloneElement(j,{key:j.key||"".concat(O,"-").concat(P),xAxis:T[E],yAxis:L[F],viewBox:{x:R.left,y:R.top,width:R.width,height:R.height},clipPathId:A})}),ue(S,"renderActivePoints",function(j){var O=j.item,P=j.activePoint,N=j.basePoint,A=j.childIndex,C=j.isRange,T=[],L=O.props.key,R=O.item.type.defaultProps!==void 0?W(W({},O.item.type.defaultProps),O.item.props):O.item.props,I=R.activeDot,D=R.dataKey,$=W(W({index:A,dataKey:D,cx:P.x,cy:P.y,r:4,fill:T_(O.item),strokeWidth:2,stroke:"#fff",payload:P.payload,value:P.value},le(I,!1)),Bp(I));return T.push(x.renderActiveDot(I,$,"".concat(L,"-activePoint-").concat(A))),N?T.push(x.renderActiveDot(I,W(W({},$),{},{cx:N.x,cy:N.y}),"".concat(L,"-basePoint-").concat(A))):C&&T.push(null),T}),ue(S,"renderGraphicChild",function(j,O,P){var N=S.filterFormatItem(j,O,P);if(!N)return null;var A=S.getTooltipEventType(),C=S.state,T=C.isTooltipActive,L=C.tooltipAxis,R=C.activeTooltipIndex,I=C.activeLabel,D=S.props.children,$=Tr(D,tn),E=N.props,M=E.points,F=E.isRange,H=E.baseLine,U=N.item.type.defaultProps!==void 0?W(W({},N.item.type.defaultProps),N.item.props):N.item.props,K=U.activeDot,J=U.hide,he=U.activeBar,Ne=U.activeShape,Y=!!(!J&&T&&$&&(K||he||Ne)),ye={};A!=="axis"&&$&&$.props.trigger==="click"?ye={onClick:Sh(S.handleItemMouseEnter,j.props.onClick)}:A!=="axis"&&(ye={onMouseLeave:Sh(S.handleItemMouseLeave,j.props.onMouseLeave),onMouseEnter:Sh(S.handleItemMouseEnter,j.props.onMouseEnter)});var q=w.cloneElement(j,W(W({},N.props),ye));function Q(Yn){return typeof L.dataKey=="function"?L.dataKey(Yn.payload):null}if(Y)if(R>=0){var X,B;if(L.dataKey&&!L.allowDuplicatedCategory){var je=typeof L.dataKey=="function"?Q:"payload.".concat(L.dataKey.toString());X=Fp(M,je,I),B=F&&H&&Fp(H,je,I)}else X=M==null?void 0:M[R],B=F&&H&&H[R];if(Ne||he){var ge=j.props.activeIndex!==void 0?j.props.activeIndex:R;return[w.cloneElement(j,W(W(W({},N.props),ye),{},{activeIndex:ge})),null,null]}if(!xe(X))return[q].concat(vc(S.renderActivePoints({item:N,activePoint:X,basePoint:B,childIndex:R,isRange:F})))}else{var He,Be=(He=S.getItemByXY(S.state.activeCoordinate))!==null&&He!==void 0?He:{graphicalItem:q},ht=Be.graphicalItem,dr=ht.item,Or=dr===void 0?j:dr,ao=ht.childIndex,Pr=W(W(W({},N.props),ye),{},{activeIndex:ao});return[w.cloneElement(Or,Pr),null,null]}return F?[q,null,null]:[q,null]}),ue(S,"renderCustomized",function(j,O,P){return w.cloneElement(j,W(W({key:"recharts-customized-".concat(P)},S.props),S.state))}),ue(S,"renderMap",{CartesianGrid:{handler:Nh,once:!0},ReferenceArea:{handler:S.renderReferenceElement},ReferenceLine:{handler:Nh},ReferenceDot:{handler:S.renderReferenceElement},XAxis:{handler:Nh},YAxis:{handler:Nh},Brush:{handler:S.renderBrush,once:!0},Bar:{handler:S.renderGraphicChild},Line:{handler:S.renderGraphicChild},Area:{handler:S.renderGraphicChild},Radar:{handler:S.renderGraphicChild},RadialBar:{handler:S.renderGraphicChild},Scatter:{handler:S.renderGraphicChild},Pie:{handler:S.renderGraphicChild},Funnel:{handler:S.renderGraphicChild},Tooltip:{handler:S.renderCursor,once:!0},PolarGrid:{handler:S.renderPolarGrid,once:!0},PolarAngleAxis:{handler:S.renderPolarAxis},PolarRadiusAxis:{handler:S.renderPolarAxis},Customized:{handler:S.renderCustomized}}),S.clipPathId="".concat((b=y.id)!==null&&b!==void 0?b:Lc("recharts"),"-clip"),S.throttleTriggeredAfterMouseMove=j4(S.triggeredAfterMouseMove,(_=y.throttleDelay)!==null&&_!==void 0?_:1e3/60),S.state={},S}return _je(x,v),xje(x,[{key:"componentDidMount",value:function(){var b,_;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(b=this.props.margin.left)!==null&&b!==void 0?b:0,top:(_=this.props.margin.top)!==null&&_!==void 0?_:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var b=this.props,_=b.children,S=b.data,j=b.height,O=b.layout,P=Tr(_,tn);if(P){var N=P.props.defaultIndex;if(!(typeof N!="number"||N<0||N>this.state.tooltipTicks.length-1)){var A=this.state.tooltipTicks[N]&&this.state.tooltipTicks[N].value,C=Pw(this.state,S,N,A),T=this.state.tooltipTicks[N].coordinate,L=(this.state.offset.top+j)/2,R=O==="horizontal",I=R?{x:T,y:L}:{y:T,x:L},D=this.state.formattedGraphicalItems.find(function(E){var M=E.item;return M.type.name==="Scatter"});D&&(I=W(W({},I),D.props.points[N].tooltipPosition),C=D.props.points[N].tooltipPayload);var $={activeTooltipIndex:N,isTooltipActive:!0,activeLabel:A,activePayload:C,activeCoordinate:I};this.setState($),this.renderCursor(P),this.accessibilityManager.setIndex(N)}}}},{key:"getSnapshotBeforeUpdate",value:function(b,_){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==_.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==b.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==b.margin){var S,j;this.accessibilityManager.setDetails({offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(j=this.props.margin.top)!==null&&j!==void 0?j:0}})}return null}},{key:"componentDidUpdate",value:function(b){eb([Tr(b.children,tn)],[Tr(this.props.children,tn)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var b=Tr(this.props.children,tn);if(b&&typeof b.props.shared=="boolean"){var _=b.props.shared?"axis":"item";return s.indexOf(_)>=0?_:a}return a}},{key:"getMouseInfo",value:function(b){if(!this.container)return null;var _=this.container,S=_.getBoundingClientRect(),j=Pfe(S),O={chartX:Math.round(b.pageX-j.left),chartY:Math.round(b.pageY-j.top)},P=S.width/_.offsetWidth||1,N=this.inRange(O.chartX,O.chartY,P);if(!N)return null;var A=this.state,C=A.xAxisMap,T=A.yAxisMap,L=this.getTooltipEventType(),R=TA(this.state,this.props.data,this.props.layout,N);if(L!=="axis"&&C&&T){var I=wa(C).scale,D=wa(T).scale,$=I&&I.invert?I.invert(O.chartX):null,E=D&&D.invert?D.invert(O.chartY):null;return W(W({},O),{},{xValue:$,yValue:E},R)}return R?W(W({},O),R):null}},{key:"inRange",value:function(b,_){var S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,j=this.props.layout,O=b/S,P=_/S;if(j==="horizontal"||j==="vertical"){var N=this.state.offset,A=O>=N.left&&O<=N.left+N.width&&P>=N.top&&P<=N.top+N.height;return A?{x:O,y:P}:null}var C=this.state,T=C.angleAxisMap,L=C.radiusAxisMap;if(T&&L){var R=wa(T);return nk({x:O,y:P},R)}return null}},{key:"parseEventsOfWrapper",value:function(){var b=this.props.children,_=this.getTooltipEventType(),S=Tr(b,tn),j={};S&&_==="axis"&&(S.props.trigger==="click"?j={onClick:this.handleClick}:j={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 O=Bp(this.props,this.handleOuterEvent);return W(W({},O),j)}},{key:"addListener",value:function(){dx.on(fx,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){dx.removeListener(fx,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(b,_,S){for(var j=this.state.formattedGraphicalItems,O=0,P=j.length;O<P;O++){var N=j[O];if(N.item===b||N.props.key===b.key||_===Fi(N.item.type)&&S===N.childIndex)return N}return null}},{key:"renderClipPath",value:function(){var b=this.clipPathId,_=this.state.offset,S=_.left,j=_.top,O=_.height,P=_.width;return k.createElement("defs",null,k.createElement("clipPath",{id:b},k.createElement("rect",{x:S,y:j,height:O,width:P})))}},{key:"getXScales",value:function(){var b=this.state.xAxisMap;return b?Object.entries(b).reduce(function(_,S){var j=kA(S,2),O=j[0],P=j[1];return W(W({},_),{},ue({},O,P.scale))},{}):null}},{key:"getYScales",value:function(){var b=this.state.yAxisMap;return b?Object.entries(b).reduce(function(_,S){var j=kA(S,2),O=j[0],P=j[1];return W(W({},_),{},ue({},O,P.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(b){var _;return(_=this.state.xAxisMap)===null||_===void 0||(_=_[b])===null||_===void 0?void 0:_.scale}},{key:"getYScaleByAxisId",value:function(b){var _;return(_=this.state.yAxisMap)===null||_===void 0||(_=_[b])===null||_===void 0?void 0:_.scale}},{key:"getItemByXY",value:function(b){var _=this.state,S=_.formattedGraphicalItems,j=_.activeItem;if(S&&S.length)for(var O=0,P=S.length;O<P;O++){var N=S[O],A=N.props,C=N.item,T=C.type.defaultProps!==void 0?W(W({},C.type.defaultProps),C.props):C.props,L=Fi(C.type);if(L==="Bar"){var R=(A.data||[]).find(function(E){return l0e(b,E)});if(R)return{graphicalItem:N,payload:R}}else if(L==="RadialBar"){var I=(A.data||[]).find(function(E){return nk(b,E)});if(I)return{graphicalItem:N,payload:I}}else if(jv(N,j)||Ov(N,j)||Yd(N,j)){var D=Xbe({graphicalItem:N,activeTooltipItem:j,itemData:T.data}),$=T.activeIndex===void 0?D:T.activeIndex;return{graphicalItem:W(W({},N),{},{childIndex:$}),payload:Yd(N,j)?T.data[D]:N.props.data[D]}}}return null}},{key:"render",value:function(){var b=this;if(!KP(this))return null;var _=this.props,S=_.children,j=_.className,O=_.width,P=_.height,N=_.style,A=_.compact,C=_.title,T=_.desc,L=AA(_,fje),R=le(L,!1);if(A)return k.createElement(dA,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},k.createElement(rb,rl({},R,{width:O,height:P,title:C,desc:T}),this.renderClipPath(),YP(S,this.renderMap)));if(this.props.accessibilityLayer){var I,D;R.tabIndex=(I=this.props.tabIndex)!==null&&I!==void 0?I:0,R.role=(D=this.props.role)!==null&&D!==void 0?D:"application",R.onKeyDown=function(E){b.accessibilityManager.keyboardEvent(E)},R.onFocus=function(){b.accessibilityManager.focus()}}var $=this.parseEventsOfWrapper();return k.createElement(dA,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},k.createElement("div",rl({className:Se("recharts-wrapper",j),style:W({position:"relative",cursor:"default",width:O,height:P},N)},$,{ref:function(M){b.container=M}}),k.createElement(rb,rl({},R,{width:O,height:P,title:C,desc:T,style:kje}),this.renderClipPath(),YP(S,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(w.Component);ue(g,"displayName",r),ue(g,"defaultProps",W({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),ue(g,"getDerivedStateFromProps",function(v,x){var y=v.dataKey,b=v.data,_=v.children,S=v.width,j=v.height,O=v.layout,P=v.stackOffset,N=v.margin,A=x.dataStartIndex,C=x.dataEndIndex;if(x.updateId===void 0){var T=$A(v);return W(W(W({},T),{},{updateId:0},p(W(W({props:v},T),{},{updateId:0}),x)),{},{prevDataKey:y,prevData:b,prevWidth:S,prevHeight:j,prevLayout:O,prevStackOffset:P,prevMargin:N,prevChildren:_})}if(y!==x.prevDataKey||b!==x.prevData||S!==x.prevWidth||j!==x.prevHeight||O!==x.prevLayout||P!==x.prevStackOffset||!gl(N,x.prevMargin)){var L=$A(v),R={chartX:x.chartX,chartY:x.chartY,isTooltipActive:x.isTooltipActive},I=W(W({},TA(x,b,O)),{},{updateId:x.updateId+1}),D=W(W(W({},L),R),I);return W(W(W({},D),p(W({props:v},D),x)),{},{prevDataKey:y,prevData:b,prevWidth:S,prevHeight:j,prevLayout:O,prevStackOffset:P,prevMargin:N,prevChildren:_})}if(!eb(_,x.prevChildren)){var $,E,M,F,H=Tr(_,ac),U=H&&($=(E=H.props)===null||E===void 0?void 0:E.startIndex)!==null&&$!==void 0?$:A,K=H&&(M=(F=H.props)===null||F===void 0?void 0:F.endIndex)!==null&&M!==void 0?M:C,J=U!==A||K!==C,he=!xe(b),Ne=he&&!J?x.updateId:x.updateId+1;return W(W({updateId:Ne},p(W(W({props:v},x),{},{updateId:Ne,dataStartIndex:U,dataEndIndex:K}),x)),{},{prevChildren:_,dataStartIndex:U,dataEndIndex:K})}return null}),ue(g,"renderActiveDot",function(v,x,y){var b;return w.isValidElement(v)?b=w.cloneElement(v,x):me(v)?b=v(x):b=k.createElement(xv,x),k.createElement(Ce,{className:"recharts-active-dot",key:y},b)});var m=w.forwardRef(function(x,y){return k.createElement(g,rl({},x,{ref:y}))});return m.displayName=g.displayName,m},Fje=z_({chartName:"LineChart",GraphicalChild:Af,axisComponents:[{axisType:"xAxis",AxisComp:hc},{axisType:"yAxis",AxisComp:mc}],formatAxisMap:p3}),Bje=z_({chartName:"BarChart",GraphicalChild:gs,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:hc},{axisType:"yAxis",AxisComp:mc}],formatAxisMap:p3}),Uje=z_({chartName:"PieChart",GraphicalChild:na,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:_v},{axisType:"radiusAxis",AxisComp:wv}],formatAxisMap:Sve,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}
566);const MA=["hsl(var(--primary))","hsl(var(--chart-2))","hsl(var(--chart-3))","hsl(var(--chart-4))","hsl(var(--chart-5))"],Wje=()=>{const[e,t]=w.useState(!0),[r,n]=w.useState([]),[i,a]=w.useState([]),[o,s]=w.useState({totalRevenue:0,totalOrders:0,avgOrderValue:0,couponUsageRate:0});return w.useEffect(()=>{(async()=>{try{const{data:u,error:d}=await Ee.from("purchases").select("*").eq("status","completed").order("created_at",{ascending:!0});if(d)throw d;const f=u||[],h=[];for(let S=29;S>=0;S--){const j=Xo(Vh(new Date,S)),O=xt(j,"yyyy-MM-dd"),P=f.filter(N=>xt(TG(N.created_at),"yyyy-MM-dd")===O);h.push({date:xt(j,"MMM dd"),revenue:P.reduce((N,A)=>N+(A.amount||0)/100,0),orders:P.length})}n(h);const p={};let g=0,m=0;f.forEach(S=>{S.coupon_code?(g++,p[S.coupon_code]=(p[S.coupon_code]||0)+1):m++});const v=[...Object.entries(p).map(([S,j])=>({name:S,value:j}))];m>0&&v.push({name:"No Coupon",value:m}),a(v);const x=f.reduce((S,j)=>S+(j.amount||0)/100,0),y=f.length,b=y>0?x/y:0,_=y>0?g/y*100:0;s({totalRevenue:x,totalOrders:y,avgOrderValue:b,couponUsageRate:_})}catch(u){console.error("Error fetching analytics:",u)}finally{t(!1)}})()},[]),e?c.jsx(Hn,{title:"Analytics",description:"Revenue and conversion insights",children:c.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[c.jsx(Aa,{className:"h-80"}),c.jsx(Aa,{className:"h-80"}),c.jsx(Aa,{className:"h-80"}),c.jsx(Aa,{className:"h-80"})]})}):c.jsxs(Hn,{title:"Analytics",description:"Revenue and conversion insights",children:[c.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4 mb-8",children:[c.jsx(re,{children:c.jsxs(ie,{className:"pt-6",children:[c.jsx("p",{className:"text-sm text-muted-foreground",children:"Total Revenue"}),c.jsxs("p",{className:"text-2xl font-bold text-foreground",children:["$",o.totalRevenue.toLocaleString()]})]})}),c.jsx(re,{children:c.jsxs(ie,{className:"pt-6",children:[c.jsx("p",{className:"text-sm text-muted-foreground",children:"Total Orders"}),c.jsx("p",{className:"text-2xl font-bold text-foreground",children:o.totalOrders})]})}),c.jsx(re,{children:c.jsxs(ie,{className:"pt-6",children:[c.jsx("p",{className:"text-sm text-muted-foreground",children:"Avg. Order Value"}),c.jsxs("p",{className:"text-2xl font-bold text-foreground",children:["$",o.avgOrderValue.toFixed(2)]})]})}),c.jsx(re,{children:c.jsxs(ie,{className:"pt-6",children:[c.jsx("p",{className:"text-sm text-muted-foreground",children:"Coupon Usage Rate"}),c.jsxs("p",{className:"text-2xl font-bold text-foreground",children:[o.couponUsageRate.toFixed(1),"%"]})]})})]}),c.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[c.jsxs(re,{className:"lg:col-span-2",children:[c.jsx(ct,{children:c.jsx(ut,{children:"Revenue Over Time (Last 30 Days)"})}),c.jsx(ie,{children:c.jsx("div",{className:"h-80",children:c.jsx(Xy,{width:"100%",height:"100%",children:c.jsxs(Fje,{data:r,children:[c.jsx(mw,{strokeDasharray:"3 3",className:"stroke-border"}),c.jsx(hc,{dataKey:"date",className:"text-xs",tick:{fill:"hsl(var(--muted-foreground))"}}),c.jsx(mc,{className:"text-xs",tick:{fill:"hsl(var(--muted-foreground))"},tickFormatter:l=>`$${l}`}),c.jsx(tn,{contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"8px"},formatter:l=>[`$${l.toFixed(2)}`,"Revenue"]}),c.jsx(Af,{type:"monotone",dataKey:"revenue",stroke:"hsl(var(--primary))",strokeWidth:2,dot:!1})]})})})})]}),c.jsxs(re,{children:[c.jsx(ct,{children:c.jsx(ut,{children:"Orders Per Day (Last 30 Days)"})}),c.jsx(ie,{children:c.jsx("div",{className:"h-64",children:c.jsx(Xy,{width:"100%",height:"100%",children:c.jsxs(Bje,{data:r,children:[c.jsx(mw,{strokeDasharray:"3 3",className:"stroke-border"}),c.jsx(hc,{dataKey:"date",className:"text-xs",tick:{fill:"hsl(var(--muted-foreground))"},interval:6}),c.jsx(mc,{className:"text-xs",tick:{fill:"hsl(var(--muted-foreground))"}}),c.jsx(tn,{contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"8px"}}),c.jsx(gs,{dataKey:"orders",fill:"hsl(var(--primary))",radius:[4,4,0,0]})]})})})})]}),c.jsxs(re,{children:[c.jsx(ct,{children:c.jsx(ut,{children:"Coupon Usage Distribution"})}),c.jsx(ie,{children:c.jsx("div",{className:"h-64",children:i.length===0?c.jsx("div",{className:"h-full flex items-center justify-center text-muted-foreground",children:"No coupon data available"}):c.jsx(Xy,{width:"100%",height:"100%",children:c.jsxs(Uje,{children:[c.jsx(na,{data:i,cx:"50%",cy:"50%",innerRadius:60,outerRadius:80,paddingAngle:5,dataKey:"value",label:({name:l,percent:u})=>`${l} (${(u*100).toFixed(0)}%)`,children:i.map((l,u)=>c.jsx(sv,{fill:MA[u%MA.length]},`cell-${u}`))}),c.jsx(tn,{contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"8px"}})]})})})})]})]})]})},zje=new xz,Hje=()=>{const e=Kr();return w.useEffect(()=>{a7(e.pathname+e.search)},[e.pathname,e.search]),null},qje=()=>c.jsx(wz,{client:zje,children:c.jsx(n7,{children:c.jsxs(YW,{children:[c.jsx($8,{}),c.jsx(dU,{}),c.jsxs(y9,{children:[c.jsx(Hje,{}),c.jsxs(u9,{children:[c.jsx(ot,{path:"/",element:c.jsx(nK,{})}),c.jsx(ot,{path:"/login",element:c.jsx(oK,{})}),c.jsx(ot,{path:"/signup",element:c.jsx(sK,{})}),c.jsx(ot,{path:"/checkout",element:c.jsx(uQ,{})}),c.jsx(ot,{path:"/purchase-success",element:c.jsx(dQ,{})}),c.jsx(ot,{path:"/contact",element:c.jsx(hQ,{})}),c.jsx(ot,{path:"/terms",element:c.jsx(pQ,{})}),c.jsx(ot,{path:"/privacy",element:c.jsx(mQ,{})}),c.jsx(ot,{path:"/refund",element:c.jsx(gQ,{})}),c.jsx(ot,{path:"/affiliate",element:c.jsx(vQ,{})}),c.jsx(ot,{path:"/calculator",element:c.jsx(bQ,{})}),c.jsx(ot,{path:"/dashboard",element:c.jsx(jy,{children:c.jsx(aQ,{})})}),c.jsx(ot,{path:"/course",element:c.jsx(jy,{children:c.jsx(yQ,{})})}),c.jsx(ot,{path:"/sleep-tracker",element:c.jsx(jy,{children:c.jsx(xQ,{})})}),c.jsx(ot,{path:"/admin/login",element:c.jsx(wQ,{})}),c.jsx(ot,{path:"/admin",element:c.jsx(Ns,{children:c.jsx(jQ,{})})}),c.jsx(ot,{path:"/admin/users",element:c.jsx(Ns,{children:c.jsx(nJ,{})})}),c.jsx(ot,{path:"/admin/orders",element:c.jsx(Ns,{children:c.jsx(iJ,{})})}),c.jsx(ot,{path:"/admin/refunds",element:c.jsx(Ns,{children:c.jsx(aJ,{})})}),c.jsx(ot,{path:"/admin/coupons",element:c.jsx(Ns,{children:c.jsx(oJ,{})})}),c.jsx(ot,{path:"/admin/analytics",element:c.jsx(Ns,{children:c.jsx(Wje,{})})}),c.jsx(ot,{path:"*",element:c.jsx(fQ,{})})]})]})]})})});n2(document.getElementById("root")).render(c.jsx(qje,{}));
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.