vendor: 4,651 bytes, lines 1-9
1var vQ=Object.defineProperty;var A4=e=>{throw TypeError(e)};var xQ=(e,t,r)=>t in e?vQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ar=(e,t,r)=>xQ(e,typeof t!="symbol"?t+"":t,r),Iw=(e,t,r)=>t.has(e)||A4("Cannot "+r);var ue=(e,t,r)=>(Iw(e,t,"read from private field"),r?r.call(e):t.get(e)),dt=(e,t,r)=>t.has(e)?A4("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Qe=(e,t,r,n)=>(Iw(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Ot=(e,t,r)=>(Iw(e,t,"access private method"),r);var Wg=(e,t,r,n)=>({set _(i){Qe(e,t,i,r)},get _(){return ue(e,t,n)}});function bQ(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 s=Object.getOwnPropertyDescriptor(n,i);s&&Object.defineProperty(e,i,s.get?s:{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 s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=r(i);fetch(i.href,s)}})();var Gg=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ht(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function wQ(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var Lw={exports:{}},Xf={},$w={exports:{}},Tt={};/** 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 k4;function jQ(){if(k4)return Tt;k4=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),h=Symbol.iterator;function m(I){return I===null||typeof I!="object"?null:(I=h&&I[h]||I["@@iterator"],typeof I=="function"?I:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,v={};function y(I,B,H){this.props=I,this.context=B,this.refs=v,this.updater=H||g}y.prototype.isReactComponent={},y.prototype.setState=function(I,B){if(typeof I!="object"&&typeof I!="function"&&I!=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,I,B,"setState")},y.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function x(){}x.prototype=y.prototype;function w(I,B,H){this.props=I,this.context=B,this.refs=v,this.updater=H||g}var _=w.prototype=new x;_.constructor=w,b(_,y.prototype),_.isPureReactComponent=!0;var j=Array.isArray,S=Object.prototype.hasOwnProperty,k={current:null},T={key:!0,ref:!0,__self:!0,__source:!0};function P(I,B,H){var J,ee={},Y=null,X=null;if(B!=null)for(J in B.ref!==void 0&&(X=B.ref),B.key!==void 0&&(Y=""+B.key),B)S.call(B,J)&&!T.hasOwnProperty(J)&&(ee[J]=B[J]);var ne=arguments.length-2;if(ne===1)ee.children=H;else if(1<ne){for(var Q=Array(ne),ie=0;ie<ne;ie++)Q[ie]=arguments[ie+2];ee.children=Q}if(I&&I.defaultProps)for(J in ne=I.defaultProps,ne)ee[J]===void 0&&(ee[J]=ne[J]);return{$$typeof:e,type:I,key:Y,ref:X,props:ee,_owner:k.current}}function M(I,B){return{$$typeof:e,type:I.type,key:B,ref:I.ref,props:I.props,_owner:I._owner}}
vendor: 11,459 bytes, lines 9-33
9function C(I){return typeof I=="object"&&I!==null&&I.$$typeof===e}function O(I){var B={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(H){return B[H]})}var D=/\/+/g;function L(I,B){return typeof I=="object"&&I!==null&&I.key!=null?O(""+I.key):B.toString(36)}function F(I,B,H,J,ee){var Y=typeof I;(Y==="undefined"||Y==="boolean")&&(I=null);var X=!1;if(I===null)X=!0;else switch(Y){case"string":case"number":X=!0;break;case"object":switch(I.$$typeof){case e:case t:X=!0}}if(X)return X=I,ee=ee(X),I=J===""?"."+L(X,0):J,j(ee)?(H="",I!=null&&(H=I.replace(D,"$&/")+"/"),F(ee,B,H,"",function(ie){return ie})):ee!=null&&(C(ee)&&(ee=M(ee,H+(!ee.key||X&&X.key===ee.key?"":(""+ee.key).replace(D,"$&/")+"/")+I)),B.push(ee)),1;if(X=0,J=J===""?".":J+":",j(I))for(var ne=0;ne<I.length;ne++){Y=I[ne];var Q=J+L(Y,ne);X+=F(Y,B,H,Q,ee)}else if(Q=m(I),typeof Q=="function")for(I=Q.call(I),ne=0;!(Y=I.next()).done;)Y=Y.value,Q=J+L(Y,ne++),X+=F(Y,B,H,Q,ee);else if(Y==="object")throw B=String(I),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.");return X}function U(I,B,H){if(I==null)return I;var J=[],ee=0;return F(I,J,"","",function(Y){return B.call(H,Y,ee++)}),J}function G(I){if(I._status===-1){var B=I._result;B=B(),B.then(function(H){(I._status===0||I._status===-1)&&(I._status=1,I._result=H)},function(H){(I._status===0||I._status===-1)&&(I._status=2,I._result=H)}),I._status===-1&&(I._status=0,I._result=B)}if(I._status===1)return I._result.default;throw I._result}var W={current:null},q={transition:null},V={ReactCurrentDispatcher:W,ReactCurrentBatchConfig:q,ReactCurrentOwner:k};function z(){throw Error("act(...) is not supported in production builds of React.")}return Tt.Children={map:U,forEach:function(I,B,H){U(I,function(){B.apply(this,arguments)},H)},count:function(I){var B=0;return U(I,function(){B++}),B},toArray:function(I){return U(I,function(B){return B})||[]},only:function(I){if(!C(I))throw Error("React.Children.only expected to receive a single React element child.");return I}},Tt.Component=y,Tt.Fragment=r,Tt.Profiler=i,Tt.PureComponent=w,Tt.StrictMode=n,Tt.Suspense=c,Tt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=V,Tt.act=z,Tt.cloneElement=function(I,B,H){if(I==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+I+".");var J=b({},I.props),ee=I.key,Y=I.ref,X=I._owner;if(B!=null){if(B.ref!==void 0&&(Y=B.ref,X=k.current),B.key!==void 0&&(ee=""+B.key),I.type&&I.type.defaultProps)var ne=I.type.defaultProps;for(Q in B)S.call(B,Q)&&!T.hasOwnProperty(Q)&&(J[Q]=B[Q]===void 0&&ne!==void 0?ne[Q]:B[Q])}var Q=arguments.length-2;if(Q===1)J.children=H;else if(1<Q){ne=Array(Q);for(var ie=0;ie<Q;ie++)ne[ie]=arguments[ie+2];J.children=ne}return{$$typeof:e,type:I.type,key:ee,ref:Y,props:J,_owner:X}},Tt.createContext=function(I){return I={$$typeof:o,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},I.Provider={$$typeof:s,_context:I},I.Consumer=I},Tt.createElement=P,Tt.createFactory=function(I){var B=P.bind(null,I);return B.type=I,B},Tt.createRef=function(){return{current:null}},Tt.forwardRef=function(I){return{$$typeof:l,render:I}},Tt.isValidElement=C,Tt.lazy=function(I){return{$$typeof:u,_payload:{_status:-1,_result:I},_init:G}},Tt.memo=function(I,B){return{$$typeof:d,type:I,compare:B===void 0?null:B}},Tt.startTransition=function(I){var B=q.transition;q.transition={};try{I()}finally{q.transition=B}},Tt.unstable_act=z,Tt.useCallback=function(I,B){return W.current.useCallback(I,B)},Tt.useContext=function(I){return W.current.useContext(I)},Tt.useDebugValue=function(){},Tt.useDeferredValue=function(I){return W.current.useDeferredValue(I)},Tt.useEffect=function(I,B){return W.current.useEffect(I,B)},Tt.useId=function(){return W.current.useId()},Tt.useImperativeHandle=function(I,B,H){return W.current.useImperativeHandle(I,B,H)},Tt.useInsertionEffect=function(I,B){return W.current.useInsertionEffect(I,B)},Tt.useLayoutEffect=function(I,B){return W.current.useLayoutEffect(I,B)},Tt.useMemo=function(I,B){return W.current.useMemo(I,B)},Tt.useReducer=function(I,B,H){return W.current.useReducer(I,B,H)},Tt.useRef=function(I){return W.current.useRef(I)},Tt.useState=function(I){return W.current.useState(I)},Tt.useSyncExternalStore=function(I,B,H){return W.current.useSyncExternalStore(I,B,H)},Tt.useTransition=function(){return W.current.useTransition()},Tt.version="18.3.1",Tt}var E4;function rp(){return E4||(E4=1,$w.exports=jQ()),$w.exports}/** 10 * @license React 11 * react-jsx-runtime.production.min.js 12 * 13 * Copyright (c) Facebook, Inc. and its affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var T4;function NQ(){if(T4)return Xf;T4=1;var e=rp(),t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function o(l,c,d){var u,h={},m=null,g=null;d!==void 0&&(m=""+d),c.key!==void 0&&(m=""+c.key),c.ref!==void 0&&(g=c.ref);for(u in c)n.call(c,u)&&!s.hasOwnProperty(u)&&(h[u]=c[u]);if(l&&l.defaultProps)for(u in c=l.defaultProps,c)h[u]===void 0&&(h[u]=c[u]);return{$$typeof:t,type:l,key:m,ref:g,props:h,_owner:i.current}}return Xf.Fragment=r,Xf.jsx=o,Xf.jsxs=o,Xf}var P4;function _Q(){return P4||(P4=1,Lw.exports=NQ()),Lw.exports}var a=_Q(),A=rp();const te=Ht(A),Ck=bQ({__proto__:null,default:te},[A]);var Kg={},Fw={exports:{}},ta={},Bw={exports:{}},Uw={};/** 18 * @license React 19 * scheduler.production.min.js 20 * 21 * Copyright (c) Facebook, Inc. and its affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */var C4;function SQ(){return C4||(C4=1,(function(e){function t(q,V){var z=q.length;q.push(V);e:for(;0<z;){var I=z-1>>>1,B=q[I];if(0<i(B,V))q[I]=V,q[z]=B,z=I;else break e}}function r(q){return q.length===0?null:q[0]}function n(q){if(q.length===0)return null;var V=q[0],z=q.pop();if(z!==V){q[0]=z;e:for(var I=0,B=q.length,H=B>>>1;I<H;){var J=2*(I+1)-1,ee=q[J],Y=J+1,X=q[Y];if(0>i(ee,z))Y<B&&0>i(X,ee)?(q[I]=X,q[Y]=z,I=Y):(q[I]=ee,q[J]=z,I=J);else if(Y<B&&0>i(X,z))q[I]=X,q[Y]=z,I=Y;else break e}}return V}function i(q,V){var z=q.sortIndex-V.sortIndex;return z!==0?z:q.id-V.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var c=[],d=[],u=1,h=null,m=3,g=!1,b=!1,v=!1,y=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(q){for(var V=r(d);V!==null;){if(V.callback===null)n(d);else if(V.startTime<=q)n(d),V.sortIndex=V.expirationTime,t(c,V);else break;V=r(d)}}function j(q){if(v=!1,_(q),!b)if(r(c)!==null)b=!0,G(S);else{var V=r(d);V!==null&&W(j,V.startTime-q)}}function S(q,V){b=!1,v&&(v=!1,x(P),P=-1),g=!0;var z=m;try{for(_(V),h=r(c);h!==null&&(!(h.expirationTime>V)||q&&!O());){var I=h.callback;if(typeof I=="function"){h.callback=null,m=h.priorityLevel;var B=I(h.expirationTime<=V);V=e.unstable_now(),typeof B=="function"?h.callback=B:h===r(c)&&n(c),_(V)}else n(c);h=r(c)}if(h!==null)var H=!0;else{var J=r(d);J!==null&&W(j,J.startTime-V),H=!1}return H}finally{h=null,m=z,g=!1}}var k=!1,T=null,P=-1,M=5,C=-1;function O(){return!(e.unstable_now()-C<M)}function D(){if(T!==null){var q=e.unstable_now();C=q;var V=!0;try{V=T(!0,q)}finally{V?L():(k=!1,T=null)}}else k=!1}var L;if(typeof w=="function")L=function(){w(D)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,U=F.port2;F.port1.onmessage=D,L=function(){U.postMessage(null)}}else L=function(){y(D,0)};function G(q){T=q,k||(k=!0,L())}function W(q,V){P=y(function(){q(e.unstable_now())},V)}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(q){q.callback=null},e.unstable_continueExecution=function(){b||g||(b=!0,G(S))},e.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<q?Math.floor(1e3/q):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return r(c)},e.unstable_next=function(q){switch(m){case 1:case 2:case 3:var V=3;break;default:V=m}var z=m;m=V;try{return q()}finally{m=z}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(q,V){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var z=m;m=q;try{return V()}finally{m=z}},e.unstable_scheduleCallback=function(q,V,z){var I=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?I+z:I):z=I,q){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=z+B,q={id:u++,callback:V,priorityLevel:q,startTime:z,expirationTime:B,sortIndex:-1},z>I?(q.sortIndex=z,t(d,q),r(c)===null&&q===r(d)&&(v?(x(P),P=-1):v=!0,W(j,z-I))):(q.sortIndex=B,t(c,q),b||g||(b=!0,G(S))),q},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(q){var V=m;return function(){var z=m;m=V;try{return q.apply(this,arguments)}finally{m=z}}}})(Uw)),Uw}var O4;function AQ(){return O4||(O4=1,Bw.exports=SQ()),Bw.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 M4;function kQ(){if(M4)return ta;M4=1;var e=rp(),t=AQ();function r(f){for(var p="https://reactjs.org/docs/error-decoder.html?invariant="+f,N=1;N<arguments.length;N++)p+="&args[]="+encodeURIComponent(arguments[N]);return"Minified React error #"+f+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=new Set,i={};function s(f,p){o(f,p),o(f+"Capture",p)}function o(f,p){for(i[f]=p,f=0;f<p.length;f++)n.add(p[f])}var l=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c=Object.prototype.hasOwnProperty,d=/^[: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]*$/,u={},h={};function m(f){return c.call(h,f)?!0:c.call(u,f)?!1:d.test(f)?h[f]=!0:(u[f]=!0,!1)}function g(f,p,N,E){if(N!==null&&N.type===0)return!1;switch(typeof p){case"function":case"symbol":return!0;case"boolean":return E?!1:N!==null?!N.acceptsBooleans:(f=f.toLowerCase().slice(0,5),f!=="data-"&&f!=="aria-");default:return!1}}function b(f,p,N,E){if(p===null||typeof p>"u"||g(f,p,N,E))return!0;
vendor: 30,477 bytes, lines 33-37
33if(E)return!1;if(N!==null)switch(N.type){case 3:return!p;case 4:return p===!1;case 5:return isNaN(p);case 6:return isNaN(p)||1>p}return!1}function v(f,p,N,E,R,$,K){this.acceptsBooleans=p===2||p===3||p===4,this.attributeName=E,this.attributeNamespace=R,this.mustUseProperty=N,this.propertyName=f,this.type=p,this.sanitizeURL=$,this.removeEmptyString=K}var y={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(f){y[f]=new v(f,0,!1,f,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(f){var p=f[0];y[p]=new v(p,1,!1,f[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(f){y[f]=new v(f,2,!1,f.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(f){y[f]=new v(f,2,!1,f,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(f){y[f]=new v(f,3,!1,f.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(f){y[f]=new v(f,3,!0,f,null,!1,!1)}),["capture","download"].forEach(function(f){y[f]=new v(f,4,!1,f,null,!1,!1)}),["cols","rows","size","span"].forEach(function(f){y[f]=new v(f,6,!1,f,null,!1,!1)}),["rowSpan","start"].forEach(function(f){y[f]=new v(f,5,!1,f.toLowerCase(),null,!1,!1)});var x=/[\-:]([a-z])/g;function w(f){return f[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(f){var p=f.replace(x,w);y[p]=new v(p,1,!1,f,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(f){var p=f.replace(x,w);y[p]=new v(p,1,!1,f,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(f){var p=f.replace(x,w);y[p]=new v(p,1,!1,f,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(f){y[f]=new v(f,1,!1,f.toLowerCase(),null,!1,!1)}),y.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(f){y[f]=new v(f,1,!1,f.toLowerCase(),null,!0,!0)});function _(f,p,N,E){var R=y.hasOwnProperty(p)?y[p]:null;(R!==null?R.type!==0:E||!(2<p.length)||p[0]!=="o"&&p[0]!=="O"||p[1]!=="n"&&p[1]!=="N")&&(b(p,N,R,E)&&(N=null),E||R===null?m(p)&&(N===null?f.removeAttribute(p):f.setAttribute(p,""+N)):R.mustUseProperty?f[R.propertyName]=N===null?R.type===3?!1:"":N:(p=R.attributeName,E=R.attributeNamespace,N===null?f.removeAttribute(p):(R=R.type,N=R===3||R===4&&N===!0?"":""+N,E?f.setAttributeNS(E,p,N):f.setAttribute(p,N))))}var j=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,S=Symbol.for("react.element"),k=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),O=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),W=Symbol.for("react.offscreen"),q=Symbol.iterator;function V(f){return f===null||typeof f!="object"?null:(f=q&&f[q]||f["@@iterator"],typeof f=="function"?f:null)}var z=Object.assign,I;function B(f){if(I===void 0)try{throw Error()}catch(N){var p=N.stack.trim().match(/\n( *(at )?)/);I=p&&p[1]||""}return` 34`+I+f}var H=!1;function J(f,p){if(!f||H)return"";H=!0;var N=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(p)if(p=function(){throw Error()},Object.defineProperty(p.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(p,[])}catch(we){var E=we}Reflect.construct(f,[],p)}else{try{p.call()}catch(we){E=we}f.call(p.prototype)}else{try{throw Error()}catch(we){E=we}f()}}catch(we){if(we&&E&&typeof we.stack=="string"){for(var R=we.stack.split(` 35`),$=E.stack.split(` 36`),K=R.length-1,re=$.length-1;1<=K&&0<=re&&R[K]!==$[re];)re--;for(;1<=K&&0<=re;K--,re--)if(R[K]!==$[re]){if(K!==1||re!==1)do if(K--,re--,0>re||R[K]!==$[re]){var le=` 37`+R[K].replace(" at new "," at ");return f.displayName&&le.includes("<anonymous>")&&(le=le.replace("<anonymous>",f.displayName)),le}while(1<=K&&0<=re);break}}}finally{H=!1,Error.prepareStackTrace=N}return(f=f?f.displayName||f.name:"")?B(f):""}function ee(f){switch(f.tag){case 5:return B(f.type);case 16:return B("Lazy");case 13:return B("Suspense");case 19:return B("SuspenseList");case 0:case 2:case 15:return f=J(f.type,!1),f;case 11:return f=J(f.type.render,!1),f;case 1:return f=J(f.type,!0),f;default:return""}}function Y(f){if(f==null)return null;if(typeof f=="function")return f.displayName||f.name||null;if(typeof f=="string")return f;switch(f){case T:return"Fragment";case k:return"Portal";case M:return"Profiler";case P:return"StrictMode";case L:return"Suspense";case F:return"SuspenseList"}if(typeof f=="object")switch(f.$$typeof){case O:return(f.displayName||"Context")+".Consumer";case C:return(f._context.displayName||"Context")+".Provider";case D:var p=f.render;return f=f.displayName,f||(f=p.displayName||p.name||"",f=f!==""?"ForwardRef("+f+")":"ForwardRef"),f;case U:return p=f.displayName||null,p!==null?p:Y(f.type)||"Memo";case G:p=f._payload,f=f._init;try{return Y(f(p))}catch{}}return null}function X(f){var p=f.type;switch(f.tag){case 24:return"Cache";case 9:return(p.displayName||"Context")+".Consumer";case 10:return(p._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return f=p.render,f=f.displayName||f.name||"",p.displayName||(f!==""?"ForwardRef("+f+")":"ForwardRef");case 7:return"Fragment";case 5:return p;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Y(p);case 8:return p===P?"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 p=="function")return p.displayName||p.name||null;if(typeof p=="string")return p}return null}function ne(f){switch(typeof f){case"boolean":case"number":case"string":case"undefined":return f;case"object":return f;default:return""}}function Q(f){var p=f.type;return(f=f.nodeName)&&f.toLowerCase()==="input"&&(p==="checkbox"||p==="radio")}function ie(f){var p=Q(f)?"checked":"value",N=Object.getOwnPropertyDescriptor(f.constructor.prototype,p),E=""+f[p];if(!f.hasOwnProperty(p)&&typeof N<"u"&&typeof N.get=="function"&&typeof N.set=="function"){var R=N.get,$=N.set;return Object.defineProperty(f,p,{configurable:!0,get:function(){return R.call(this)},set:function(K){E=""+K,$.call(this,K)}}),Object.defineProperty(f,p,{enumerable:N.enumerable}),{getValue:function(){return E},setValue:function(K){E=""+K},stopTracking:function(){f._valueTracker=null,delete f[p]}}}}function me(f){f._valueTracker||(f._valueTracker=ie(f))}function oe(f){if(!f)return!1;var p=f._valueTracker;if(!p)return!0;var N=p.getValue(),E="";return f&&(E=Q(f)?f.checked?"true":"false":f.value),f=E,f!==N?(p.setValue(f),!0):!1}function Ne(f){if(f=f||(typeof document<"u"?document:void 0),typeof f>"u")return null;try{return f.activeElement||f.body}catch{return f.body}}function _e(f,p){var N=p.checked;return z({},p,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:N??f._wrapperState.initialChecked})}function xe(f,p){var N=p.defaultValue==null?"":p.defaultValue,E=p.checked!=null?p.checked:p.defaultChecked;N=ne(p.value!=null?p.value:N),f._wrapperState={initialChecked:E,initialValue:N,controlled:p.type==="checkbox"||p.type==="radio"?p.checked!=null:p.value!=null}}function Ee(f,p){p=p.checked,p!=null&&_(f,"checked",p,!1)}function Pe(f,p){Ee(f,p);var N=ne(p.value),E=p.type;if(N!=null)E==="number"?(N===0&&f.value===""||f.value!=N)&&(f.value=""+N):f.value!==""+N&&(f.value=""+N);else if(E==="submit"||E==="reset"){f.removeAttribute("value");return}p.hasOwnProperty("value")?ae(f,p.type,N):p.hasOwnProperty("defaultValue")&&ae(f,p.type,ne(p.defaultValue)),p.checked==null&&p.defaultChecked!=null&&(f.defaultChecked=!!p.defaultChecked)}function Z(f,p,N){if(p.hasOwnProperty("value")||p.hasOwnProperty("defaultValue")){var E=p.type;if(!(E!=="submit"&&E!=="reset"||p.value!==void 0&&p.value!==null))return;p=""+f._wrapperState.initialValue,N||p===f.value||(f.value=p),f.defaultValue=p}N=f.name,N!==""&&(f.name=""),f.defaultChecked=!!f._wrapperState.initialChecked,N!==""&&(f.name=N)}function ae(f,p,N){(p!=="number"||Ne(f.ownerDocument)!==f)&&(N==null?f.defaultValue=""+f._wrapperState.initialValue:f.defaultValue!==""+N&&(f.defaultValue=""+N))}var pe=Array.isArray;function ye(f,p,N,E){if(f=f.options,p){p={};for(var R=0;R<N.length;R++)p["$"+N[R]]=!0;for(N=0;N<f.length;N++)R=p.hasOwnProperty("$"+f[N].value),f[N].selected!==R&&(f[N].selected=R),R&&E&&(f[N].defaultSelected=!0)}else{for(N=""+ne(N),p=null,R=0;R<f.length;R++){if(f[R].value===N){f[R].selected=!0,E&&(f[R].defaultSelected=!0);return}p!==null||f[R].disabled||(p=f[R])}p!==null&&(p.selected=!0)}}function he(f,p){if(p.dangerouslySetInnerHTML!=null)throw Error(r(91));return z({},p,{value:void 0,defaultValue:void 0,children:""+f._wrapperState.initialValue})}function He(f,p){var N=p.value;if(N==null){if(N=p.children,p=p.defaultValue,N!=null){if(p!=null)throw Error(r(92));if(pe(N)){if(1<N.length)throw Error(r(93));N=N[0]}p=N}p==null&&(p=""),N=p}f._wrapperState={initialValue:ne(N)}}function Te(f,p){var N=ne(p.value),E=ne(p.defaultValue);N!=null&&(N=""+N,N!==f.value&&(f.value=N),p.defaultValue==null&&f.defaultValue!==N&&(f.defaultValue=N)),E!=null&&(f.defaultValue=""+E)}function it(f){var p=f.textContent;p===f._wrapperState.initialValue&&p!==""&&p!==null&&(f.value=p)}function _t(f){switch(f){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 Bt(f,p){return f==null||f==="http://www.w3.org/1999/xhtml"?_t(p):f==="http://www.w3.org/2000/svg"&&p==="foreignObject"?"http://www.w3.org/1999/xhtml":f}var Et,Yn=(function(f){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(p,N,E,R){MSApp.execUnsafeLocalFunction(function(){return f(p,N,E,R)})}:f})(function(f,p){if(f.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in f)f.innerHTML=p;else{for(Et=Et||document.createElement("div"),Et.innerHTML="<svg>"+p.valueOf().toString()+"</svg>",p=Et.firstChild;f.firstChild;)f.removeChild(f.firstChild);for(;p.firstChild;)f.appendChild(p.firstChild)}});function Dt(f,p){if(p){var N=f.firstChild;if(N&&N===f.lastChild&&N.nodeType===3){N.nodeValue=p;return}}f.textContent=p}var kr={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},Me=["Webkit","ms","Moz","O"];Object.keys(kr).forEach(function(f){Me.forEach(function(p){p=p+f.charAt(0).toUpperCase()+f.substring(1),kr[p]=kr[f]})});function ze(f,p,N){return p==null||typeof p=="boolean"||p===""?"":N||typeof p!="number"||p===0||kr.hasOwnProperty(f)&&kr[f]?(""+p).trim():p+"px"}function jt(f,p){f=f.style;for(var N in p)if(p.hasOwnProperty(N)){var E=N.indexOf("--")===0,R=ze(N,p[N],E);N==="float"&&(N="cssFloat"),E?f.setProperty(N,R):f[N]=R}}var vt=z({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 fr(f,p){if(p){if(vt[f]&&(p.children!=null||p.dangerouslySetInnerHTML!=null))throw Error(r(137,f));if(p.dangerouslySetInnerHTML!=null){if(p.children!=null)throw Error(r(60));if(typeof p.dangerouslySetInnerHTML!="object"||!("__html"in p.dangerouslySetInnerHTML))throw Error(r(61))}if(p.style!=null&&typeof p.style!="object")throw Error(r(62))}}function un(f,p){if(f.indexOf("-")===-1)return typeof p.is=="string";switch(f){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 dn=null;function Ci(f){return f=f.target||f.srcElement||window,f.correspondingUseElement&&(f=f.correspondingUseElement),f.nodeType===3?f.parentNode:f}var Oi=null,Rn=null,ni=null;function Ip(f){if(f=Df(f)){if(typeof Oi!="function")throw Error(r(280));var p=f.stateNode;p&&(p=og(p),Oi(f.stateNode,f.type,p))}}function Js(f){Rn?ni?ni.push(f):ni=[f]:Rn=f}function Lp(){if(Rn){var f=Rn,p=ni;if(ni=Rn=null,Ip(f),p)for(f=0;f<p.length;f++)Ip(p[f])}}function uf(f,p){return f(p)}function $p(){}var df=!1;function Fp(f,p,N){if(df)return f(p,N);df=!0;try{return uf(f,p,N)}finally{df=!1,(Rn!==null||ni!==null)&&($p(),Lp())}}function ml(f,p){var N=f.stateNode;if(N===null)return null;var E=og(N);if(E===null)return null;N=E[p];e:switch(p){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(E=!E.disabled)||(f=f.type,E=!(f==="button"||f==="input"||f==="select"||f==="textarea")),f=!E;break e;default:f=!1}if(f)return null;if(N&&typeof N!="function")throw Error(r(231,p,typeof N));return N}var ff=!1;if(l)try{var Wt={};Object.defineProperty(Wt,"passive",{get:function(){ff=!0}}),window.addEventListener("test",Wt,Wt),window.removeEventListener("test",Wt,Wt)}catch{ff=!1}function tb(f,p,N,E,R,$,K,re,le){var we=Array.prototype.slice.call(arguments,3);try{p.apply(N,we)}catch(De){this.onError(De)}}var eo=!1,fe=null,Ye=!1,gt=null,hr={onError:function(f){eo=!0,fe=f}};function Ur(f,p,N,E,R,$,K,re,le){eo=!1,fe=null,tb.apply(hr,arguments)}function pl(f,p,N,E,R,$,K,re,le){if(Ur.apply(this,arguments),eo){if(eo){var we=fe;eo=!1,fe=null}else throw Error(r(198));Ye||(Ye=!0,gt=we)}}function Rr(f){var p=f,N=f;if(f.alternate)for(;p.return;)p=p.return;else{f=p;do p=f,(p.flags&4098)!==0&&(N=p.return),f=p.return;while(f)}return p.tag===3?N:null}function We(f){if(f.tag===13){var p=f.memoizedState;if(p===null&&(f=f.alternate,f!==null&&(p=f.memoizedState)),p!==null)return p.dehydrated}return null}function ai(f){if(Rr(f)!==f)throw Error(r(188))}function Bp(f){var p=f.alternate;if(!p){if(p=Rr(f),p===null)throw Error(r(188));return p!==f?null:f}for(var N=f,E=p;;){var R=N.return;if(R===null)break;var $=R.alternate;if($===null){if(E=R.return,E!==null){N=E;continue}break}if(R.child===$.child){for($=R.child;$;){if($===N)return ai(R),f;if($===E)return ai(R),p;$=$.sibling}throw Error(r(188))}if(N.return!==E.return)N=R,E=$;else{for(var K=!1,re=R.child;re;){if(re===N){K=!0,N=R,E=$;break}if(re===E){K=!0,E=R,N=$;break}re=re.sibling}if(!K){for(re=$.child;re;){if(re===N){K=!0,N=$,E=R;break}if(re===E){K=!0,E=$,N=R;break}re=re.sibling}if(!K)throw Error(r(189))}}if(N.alternate!==E)throw Error(r(190))}if(N.tag!==3)throw Error(r(188));return N.stateNode.current===N?f:p}function hf(f){return f=Bp(f),f!==null?mf(f):null}function mf(f){if(f.tag===5||f.tag===6)return f;for(f=f.child;f!==null;){var p=mf(f);if(p!==null)return p;f=f.sibling}return null}var pf=t.unstable_scheduleCallback,gf=t.unstable_cancelCallback,TY=t.unstable_shouldYield,PY=t.unstable_requestPaint,Er=t.unstable_now,CY=t.unstable_getCurrentPriorityLevel,rb=t.unstable_ImmediatePriority,tC=t.unstable_UserBlockingPriority,Up=t.unstable_NormalPriority,OY=t.unstable_LowPriority,rC=t.unstable_IdlePriority,qp=null,Mi=null;function MY(f){if(Mi&&typeof Mi.onCommitFiberRoot=="function")try{Mi.onCommitFiberRoot(qp,f,void 0,(f.current.flags&128)===128)}catch{}}var ii=Math.clz32?Math.clz32:IY,RY=Math.log,DY=Math.LN2;function IY(f){return f>>>=0,f===0?32:31-(RY(f)/DY|0)|0}var zp=64,Vp=4194304;function yf(f){switch(f&-f){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 f&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return f&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return f}}function Hp(f,p){var N=f.pendingLanes;if(N===0)return 0;var E=0,R=f.suspendedLanes,$=f.pingedLanes,K=N&268435455;if(K!==0){var re=K&~R;re!==0?E=yf(re):($&=K,$!==0&&(E=yf($)))}else K=N&~R,K!==0?E=yf(K):$!==0&&(E=yf($));if(E===0)return 0;if(p!==0&&p!==E&&(p&R)===0&&(R=E&-E,$=p&-p,R>=$||R===16&&($&4194240)!==0))return p;if((E&4)!==0&&(E|=N&16),p=f.entangledLanes,p!==0)for(f=f.entanglements,p&=E;0<p;)N=31-ii(p),R=1<<N,E|=f[N],p&=~R;return E}function LY(f,p){switch(f){case 1:case 2:case 4:return p+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 p+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 $Y(f,p){for(var N=f.suspendedLanes,E=f.pingedLanes,R=f.expirationTimes,$=f.pendingLanes;0<$;){var K=31-ii($),re=1<<K,le=R[K];le===-1?((re&N)===0||(re&E)!==0)&&(R[K]=LY(re,p)):le<=p&&(f.expiredLanes|=re),$&=~re}}function nb(f){return f=f.pendingLanes&-1073741825,f!==0?f:f&1073741824?1073741824:0}function nC(){var f=zp;return zp<<=1,(zp&4194240)===0&&(zp=64),f}function ab(f){for(var p=[],N=0;31>N;N++)p.push(f);return p}function vf(f,p,N){f.pendingLanes|=p,p!==536870912&&(f.suspendedLanes=0,f.pingedLanes=0),f=f.eventTimes,p=31-ii(p),f[p]=N}function FY(f,p){var N=f.pendingLanes&~p;f.pendingLanes=p,f.suspendedLanes=0,f.pingedLanes=0,f.expiredLanes&=p,f.mutableReadLanes&=p,f.entangledLanes&=p,p=f.entanglements;var E=f.eventTimes;for(f=f.expirationTimes;0<N;){var R=31-ii(N),$=1<<R;p[R]=0,E[R]=-1,f[R]=-1,N&=~$}}function ib(f,p){var N=f.entangledLanes|=p;for(f=f.entanglements;N;){var E=31-ii(N),R=1<<E;R&p|f[E]&p&&(f[E]|=p),N&=~R}}var Qt=0;function aC(f){return f&=-f,1<f?4<f?(f&268435455)!==0?16:536870912:4:1}var iC,sb,sC,oC,lC,ob=!1,Wp=[],to=null,ro=null,no=null,xf=new Map,bf=new Map,ao=[],BY="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 cC(f,p){switch(f){case"focusin":case"focusout":to=null;break;case"dragenter":case"dragleave":ro=null;break;case"mouseover":case"mouseout":no=null;break;case"pointerover":case"pointerout":xf.delete(p.pointerId);break;case"gotpointercapture":case"lostpointercapture":bf.delete(p.pointerId)}}function wf(f,p,N,E,R,$){return f===null||f.nativeEvent!==$?(f={blockedOn:p,domEventName:N,eventSystemFlags:E,nativeEvent:$,targetContainers:[R]},p!==null&&(p=Df(p),p!==null&&sb(p)),f):(f.eventSystemFlags|=E,p=f.targetContainers,R!==null&&p.indexOf(R)===-1&&p.push(R),f)}function UY(f,p,N,E,R){switch(p){case"focusin":return to=wf(to,f,p,N,E,R),!0;case"dragenter":return ro=wf(ro,f,p,N,E,R),!0;case"mouseover":return no=wf(no,f,p,N,E,R),!0;case"pointerover":var $=R.pointerId;return xf.set($,wf(xf.get($)||null,f,p,N,E,R)),!0;case"gotpointercapture":return $=R.pointerId,bf.set($,wf(bf.get($)||null,f,p,N,E,R)),!0}return!1}function uC(f){var p=gl(f.target);if(p!==null){var N=Rr(p);if(N!==null){if(p=N.tag,p===13){if(p=We(N),p!==null){f.blockedOn=p,lC(f.priority,function(){sC(N)});return}}else if(p===3&&N.stateNode.current.memoizedState.isDehydrated){f.blockedOn=N.tag===3?N.stateNode.containerInfo:null;return}}}f.blockedOn=null}function Gp(f){if(f.blockedOn!==null)return!1;for(var p=f.targetContainers;0<p.length;){var N=cb(f.domEventName,f.eventSystemFlags,p[0],f.nativeEvent);if(N===null){N=f.nativeEvent;var E=new N.constructor(N.type,N);dn=E,N.target.dispatchEvent(E),dn=null}else return p=Df(N),p!==null&&sb(p),f.blockedOn=N,!1;p.shift()}return!0}function dC(f,p,N){Gp(f)&&N.delete(p)}function qY(){ob=!1,to!==null&&Gp(to)&&(to=null),ro!==null&&Gp(ro)&&(ro=null),no!==null&&Gp(no)&&(no=null),xf.forEach(dC),bf.forEach(dC)}function jf(f,p){f.blockedOn===p&&(f.blockedOn=null,ob||(ob=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,qY)))}function Nf(f){function p(R){return jf(R,f)}if(0<Wp.length){jf(Wp[0],f);for(var N=1;N<Wp.length;N++){var E=Wp[N];E.blockedOn===f&&(E.blockedOn=null)}}for(to!==null&&jf(to,f),ro!==null&&jf(ro,f),no!==null&&jf(no,f),xf.forEach(p),bf.forEach(p),N=0;N<ao.length;N++)E=ao[N],E.blockedOn===f&&(E.blockedOn=null);for(;0<ao.length&&(N=ao[0],N.blockedOn===null);)uC(N),N.blockedOn===null&&ao.shift()}var zc=j.ReactCurrentBatchConfig,Kp=!0;function zY(f,p,N,E){var R=Qt,$=zc.transition;zc.transition=null;try{Qt=1,lb(f,p,N,E)}finally{Qt=R,zc.transition=$}}function VY(f,p,N,E){var R=Qt,$=zc.transition;zc.transition=null;try{Qt=4,lb(f,p,N,E)}finally{Qt=R,zc.transition=$}}function lb(f,p,N,E){if(Kp){var R=cb(f,p,N,E);if(R===null)Ab(f,p,E,Yp,N),cC(f,E);else if(UY(R,f,p,N,E))E.stopPropagation();else if(cC(f,E),p&4&&-1<BY.indexOf(f)){for(;R!==null;){var $=Df(R);if($!==null&&iC($),$=cb(f,p,N,E),$===null&&Ab(f,p,E,Yp,N),$===R)break;R=$}R!==null&&E.stopPropagation()}else Ab(f,p,E,null,N)}}var Yp=null;function cb(f,p,N,E){if(Yp=null,f=Ci(E),f=gl(f),f!==null)if(p=Rr(f),p===null)f=null;else if(N=p.tag,N===13){if(f=We(p),f!==null)return f;f=null}else if(N===3){if(p.stateNode.current.memoizedState.isDehydrated)return p.tag===3?p.stateNode.containerInfo:null;f=null}else p!==f&&(f=null);return Yp=f,null}function fC(f){switch(f){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(CY()){case rb:return 1;case tC:return 4;case Up:case OY:return 16;case rC:return 536870912;default:return 16}default:return 16}}var io=null,ub=null,Xp=null;function hC(){if(Xp)return Xp;var f,p=ub,N=p.length,E,R="value"in io?io.value:io.textContent,$=R.length;for(f=0;f<N&&p[f]===R[f];f++);var K=N-f;for(E=1;E<=K&&p[N-E]===R[$-E];E++);return Xp=R.slice(f,1<E?1-E:void 0)}function Qp(f){var p=f.keyCode;return"charCode"in f?(f=f.charCode,f===0&&p===13&&(f=13)):f=p,f===10&&(f=13),32<=f||f===13?f:0}function Zp(){return!0}function mC(){return!1}function ua(f){function p(N,E,R,$,K){this._reactName=N,this._targetInst=R,this.type=E,this.nativeEvent=$,this.target=K,this.currentTarget=null;for(var re in f)f.hasOwnProperty(re)&&(N=f[re],this[re]=N?N($):$[re]);return this.isDefaultPrevented=($.defaultPrevented!=null?$.defaultPrevented:$.returnValue===!1)?Zp:mC,this.isPropagationStopped=mC,this}return z(p.prototype,{preventDefault:function(){this.defaultPrevented=!0;var N=this.nativeEvent;N&&(N.preventDefault?N.preventDefault():typeof N.returnValue!="unknown"&&(N.returnValue=!1),this.isDefaultPrevented=Zp)},stopPropagation:function(){var N=this.nativeEvent;N&&(N.stopPropagation?N.stopPropagation():typeof N.cancelBubble!="unknown"&&(N.cancelBubble=!0),this.isPropagationStopped=Zp)},persist:function(){},isPersistent:Zp}),p}var Vc={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(f){return f.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},db=ua(Vc),_f=z({},Vc,{view:0,detail:0}),HY=ua(_f),fb,hb,Sf,Jp=z({},_f,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pb,button:0,buttons:0,relatedTarget:function(f){return f.relatedTarget===void 0?f.fromElement===f.srcElement?f.toElement:f.fromElement:f.relatedTarget},movementX:function(f){return"movementX"in f?f.movementX:(f!==Sf&&(Sf&&f.type==="mousemove"?(fb=f.screenX-Sf.screenX,hb=f.screenY-Sf.screenY):hb=fb=0,Sf=f),fb)},movementY:function(f){return"movementY"in f?f.movementY:hb}}),pC=ua(Jp),WY=z({},Jp,{dataTransfer:0}),GY=ua(WY),KY=z({},_f,{relatedTarget:0}),mb=ua(KY),YY=z({},Vc,{animationName:0,elapsedTime:0,pseudoElement:0}),XY=ua(YY),QY=z({},Vc,{clipboardData:function(f){return"clipboardData"in f?f.clipboardData:window.clipboardData}}),ZY=ua(QY),JY=z({},Vc,{data:0}),gC=ua(JY),eX={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},tX={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"},rX={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function nX(f){var p=this.nativeEvent;return p.getModifierState?p.getModifierState(f):(f=rX[f])?!!p[f]:!1}function pb(){return nX}var aX=z({},_f,{key:function(f){if(f.key){var p=eX[f.key]||f.key;if(p!=="Unidentified")return p}return f.type==="keypress"?(f=Qp(f),f===13?"Enter":String.fromCharCode(f)):f.type==="keydown"||f.type==="keyup"?tX[f.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pb,charCode:function(f){return f.type==="keypress"?Qp(f):0},keyCode:function(f){return f.type==="keydown"||f.type==="keyup"?f.keyCode:0},which:function(f){return f.type==="keypress"?Qp(f):f.type==="keydown"||f.type==="keyup"?f.keyCode:0}}),iX=ua(aX),sX=z({},Jp,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),yC=ua(sX),oX=z({},_f,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pb}),lX=ua(oX),cX=z({},Vc,{propertyName:0,elapsedTime:0,pseudoElement:0}),uX=ua(cX),dX=z({},Jp,{deltaX:function(f){return"deltaX"in f?f.deltaX:"wheelDeltaX"in f?-f.wheelDeltaX:0},deltaY:function(f){return"deltaY"in f?f.deltaY:"wheelDeltaY"in f?-f.wheelDeltaY:"wheelDelta"in f?-f.wheelDelta:0},deltaZ:0,deltaMode:0}),fX=ua(dX),hX=[9,13,27,32],gb=l&&"CompositionEvent"in window,Af=null;l&&"documentMode"in document&&(Af=document.documentMode);var mX=l&&"TextEvent"in window&&!Af,vC=l&&(!gb||Af&&8<Af&&11>=Af),xC=" ",bC=!1;function wC(f,p){switch(f){case"keyup":return hX.indexOf(p.keyCode)!==-1;case"keydown":return p.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jC(f){return f=f.detail,typeof f=="object"&&"data"in f?f.data:null}var Hc=!1;function pX(f,p){switch(f){case"compositionend":return jC(p);case"keypress":return p.which!==32?null:(bC=!0,xC);case"textInput":return f=p.data,f===xC&&bC?null:f;default:return null}}function gX(f,p){if(Hc)return f==="compositionend"||!gb&&wC(f,p)?(f=hC(),Xp=ub=io=null,Hc=!1,f):null;switch(f){case"paste":return null;case"keypress":if(!(p.ctrlKey||p.altKey||p.metaKey)||p.ctrlKey&&p.altKey){if(p.char&&1<p.char.length)return p.char;if(p.which)return String.fromCharCode(p.which)}return null;case"compositionend":return vC&&p.locale!=="ko"?null:p.data;default:return null}}var yX={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 NC(f){var p=f&&f.nodeName&&f.nodeName.toLowerCase();return p==="input"?!!yX[f.type]:p==="textarea"}function _C(f,p,N,E){Js(E),p=ag(p,"onChange"),0<p.length&&(N=new db("onChange","change",null,N,E),f.push({event:N,listeners:p}))}var kf=null,Ef=null;function vX(f){qC(f,0)}function eg(f){var p=Xc(f);if(oe(p))return f}function xX(f,p){if(f==="change")return p}var SC=!1;if(l){var yb;if(l){var vb="oninput"in document;if(!vb){var AC=document.createElement("div");AC.setAttribute("oninput","return;
37"),vb=typeof AC.oninput=="function"}yb=vb}else yb=!1;SC=yb&&(!document.documentMode||9<document.documentMode)}function kC(){kf&&(kf.detachEvent("onpropertychange",EC),Ef=kf=null)}function EC(f){if(f.propertyName==="value"&&eg(Ef)){var p=[];_C(p,Ef,f,Ci(f)),Fp(vX,p)}}function bX(f,p,N){f==="focusin"?(kC(),kf=p,Ef=N,kf.attachEvent("onpropertychange",EC)):f==="focusout"&&kC()}function wX(f){if(f==="selectionchange"||f==="keyup"||f==="keydown")return eg(Ef)}function jX(f,p){if(f==="click")return eg(p)}function NX(f,p){if(f==="input"||f==="change")return eg(p)}function _X(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var si=typeof Object.is=="function"?Object.is:_X;function Tf(f,p){if(si(f,p))return!0;if(typeof f!="object"||f===null||typeof p!="object"||p===null)return!1;var N=Object.keys(f),E=Object.keys(p);if(N.length!==E.length)return!1;for(E=0;E<N.length;E++){var R=N[E];if(!c.call(p,R)||!si(f[R],p[R]))return!1}return!0}function TC(f){for(;f&&f.firstChild;)f=f.firstChild;return f}function PC(f,p){var N=TC(f);f=0;for(var E;N;){if(N.nodeType===3){if(E=f+N.textContent.length,f<=p&&E>=p)return{node:N,offset:p-f};f=E}e:{for(;N;){if(N.nextSibling){N=N.nextSibling;break e}N=N.parentNode}N=void 0}N=TC(N)}}function CC(f,p){return f&&p?f===p?!0:f&&f.nodeType===3?!1:p&&p.nodeType===3?CC(f,p.parentNode):"contains"in f?f.contains(p):f.compareDocumentPosition?!!(f.compareDocumentPosition(p)&16):!1:!1}function OC(){for(var f=window,p=Ne();p instanceof f.HTMLIFrameElement;){try{var N=typeof p.contentWindow.location.href=="string"}catch{N=!1}if(N)f=p.contentWindow;else break;p=Ne(f.document)}return p}function xb(f){var p=f&&f.nodeName&&f.nodeName.toLowerCase();return p&&(p==="input"&&(f.type==="text"||f.type==="search"||f.type==="tel"||f.type==="url"||f.type==="password")||p==="textarea"||f.contentEditable==="true")}function SX(f){var p=OC(),N=f.focusedElem,E=f.selectionRange;if(p!==N&&N&&N.ownerDocument&&CC(N.ownerDocument.documentElement,N)){if(E!==null&&xb(N)){if(p=E.start,f=E.end,f===void 0&&(f=p),"selectionStart"in N)N.selectionStart=p,N.selectionEnd=Math.min(f,N.value.length);else if(f=(p=N.ownerDocument||document)&&p.defaultView||window,f.getSelection){f=f.getSelection();var R=N.textContent.length,$=Math.min(E.start,R);E=E.end===void 0?$:Math.min(E.end,R),!f.extend&&$>E&&(R=E,E=$,$=R),R=PC(N,$);var K=PC(N,E);R&&K&&(f.rangeCount!==1||f.anchorNode!==R.node||f.anchorOffset!==R.offset||f.focusNode!==K.node||f.focusOffset!==K.offset)&&(p=p.createRange(),p.setStart(R.node,R.offset),f.removeAllRanges(),$>E?(f.addRange(p),f.extend(K.node,K.offset)):(p.setEnd(K.node,K.offset),f.addRange(p)))}}for(p=[],f=N;f=f.parentNode;)f.nodeType===1&&p.push({element:f,left:f.scrollLeft,top:f.scrollTop});for(typeof N.focus=="function"&&N.focus(),N=0;N<p.length;N++)f=p[N],f.element.scrollLeft=f.left,f.element.scrollTop=f.top}}var AX=l&&"documentMode"in document&&11>=document.documentMode,Wc=null,bb=null,Pf=null,wb=!1;function MC(f,p,N){var E=N.window===N?N.document:N.nodeType===9?N:N.ownerDocument;wb||Wc==null||Wc!==Ne(E)||(E=Wc,"selectionStart"in E&&xb(E)?E={start:E.selectionStart,end:E.selectionEnd}:(E=(E.ownerDocument&&E.ownerDocument.defaultView||window).getSelection(),E={anchorNode:E.anchorNode,anchorOffset:E.anchorOffset,focusNode:E.focusNode,focusOffset:E.focusOffset}),Pf&&Tf(Pf,E)||(Pf=E,E=ag(bb,"onSelect"),0<E.length&&(p=new db("onSelect","select",null,p,N),f.push({event:p,listeners:E}),p.target=Wc)))}function tg(f,p){var N={};return N[f.toLowerCase()]=p.toLowerCase(),N["Webkit"+f]="webkit"+p,N["Moz"+f]="moz"+p,N}var Gc={animationend:tg("Animation","AnimationEnd"),animationiteration:tg("Animation","AnimationIteration"),animationstart:tg("Animation","AnimationStart"),transitionend:tg("Transition","TransitionEnd")},jb={},RC={};l&&(RC=document.createElement("div").style,"AnimationEvent"in window||(delete Gc.animationend.animation,delete Gc.animationiteration.animation,delete Gc.animationstart.animation),"TransitionEvent"in window||delete Gc.transitionend.transition);function rg(f){if(jb[f])return jb[f];if(!Gc[f])return f;var p=Gc[f],N;for(N in p)if(p.hasOwnProperty(N)&&N in RC)return jb[f]=p[N];return f}var DC=rg("animationend"),IC=rg("animationiteration"),LC=rg("animationstart"),$C=rg("transitionend"),FC=new Map,BC="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 so(f,p){FC.set(f,p),s(p,[f])}for(var Nb=0;Nb<BC.length;Nb++){var _b=BC[Nb],kX=_b.toLowerCase(),EX=_b[0].toUpperCase()+_b.slice(1);so(kX,"on"+EX)}so(DC,"onAnimationEnd"),so(IC,"onAnimationIteration"),so(LC,"onAnimationStart"),so("dblclick","onDoubleClick"),so("focusin","onFocus"),so("focusout","onBlur"),so($C,"onTransitionEnd"),o("onMouseEnter",["mouseout","mouseover"]),o("onMouseLeave",["mouseout","mouseover"]),o("onPointerEnter",["pointerout","pointerover"]),o("onPointerLeave",["pointerout","pointerover"]),s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),s("onSelect","focusout contextmenu dragend focu
37sin keydown keyup mousedown mouseup selectionchange".split(" ")),s("onBeforeInput",["compositionend","keypress","textInput","paste"]),s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Cf="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(" "),TX=new Set("cancel close invalid load scroll toggle".split(" ").concat(Cf));function UC(f,p,N){var E=f.type||"unknown-event";f.currentTarget=N,pl(E,p,void 0,f),f.currentTarget=null}function qC(f,p){p=(p&4)!==0;for(var N=0;N<f.length;N++){var E=f[N],R=E.event;E=E.listeners;e:{var $=void 0;if(p)for(var K=E.length-1;0<=K;K--){var re=E[K],le=re.instance,we=re.currentTarget;if(re=re.listener,le!==$&&R.isPropagationStopped())break e;UC(R,re,we),$=le}else for(K=0;K<E.length;K++){if(re=E[K],le=re.instance,we=re.currentTarget,re=re.listener,le!==$&&R.isPropagationStopped())break e;UC(R,re,we),$=le}}}if(Ye)throw f=gt,Ye=!1,gt=null,f}function lr(f,p){var N=p[Ob];N===void 0&&(N=p[Ob]=new Set);var E=f+"__bubble";N.has(E)||(zC(p,f,2,!1),N.add(E))}function Sb(f,p,N){var E=0;p&&(E|=4),zC(N,f,E,p)}var ng="_reactListening"+Math.random().toString(36).slice(2);function Of(f){if(!f[ng]){f[ng]=!0,n.forEach(function(N){N!=="selectionchange"&&(TX.has(N)||Sb(N,!1,f),Sb(N,!0,f))});var p=f.nodeType===9?f:f.ownerDocument;p===null||p[ng]||(p[ng]=!0,Sb("selectionchange",!1,p))}}function zC(f,p,N,E){switch(fC(p)){case 1:var R=zY;break;case 4:R=VY;break;default:R=lb}N=R.bind(null,p,N,f),R=void 0,!ff||p!=="touchstart"&&p!=="touchmove"&&p!=="wheel"||(R=!0),E?R!==void 0?f.addEventListener(p,N,{capture:!0,passive:R}):f.addEventListener(p,N,!0):R!==void 0?f.addEventListener(p,N,{passive:R}):f.addEventListener(p,N,!1)}function Ab(f,p,N,E,R){var $=E;if((p&1)===0&&(p&2)===0&&E!==null)e:for(;;){if(E===null)return;var K=E.tag;if(K===3||K===4){var re=E.stateNode.containerInfo;if(re===R||re.nodeType===8&&re.parentNode===R)break;if(K===4)for(K=E.return;K!==null;){var le=K.tag;if((le===3||le===4)&&(le=K.stateNode.containerInfo,le===R||le.nodeType===8&&le.parentNode===R))return;K=K.return}for(;re!==null;){if(K=gl(re),K===null)return;if(le=K.tag,le===5||le===6){E=$=K;continue e}re=re.parentNode}}E=E.return}Fp(function(){var we=$,De=Ci(N),$e=[];e:{var Re=FC.get(f);if(Re!==void 0){var Xe=db,tt=f;switch(f){case"keypress":if(Qp(N)===0)break e;case"keydown":case"keyup":Xe=iX;break;case"focusin":tt="focus",Xe=mb;break;case"focusout":tt="blur",Xe=mb;break;case"beforeblur":case"afterblur":Xe=mb;break;case"click":if(N.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Xe=pC;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Xe=GY;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Xe=lX;break;case DC:case IC:case LC:Xe=XY;break;case $C:Xe=uX;break;case"scroll":Xe=HY;break;case"wheel":Xe=fX;break;case"copy":case"cut":case"paste":Xe=ZY;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Xe=yC}var at=(p&4)!==0,Tr=!at&&f==="scroll",ge=at?Re!==null?Re+"Capture":null:Re;at=[];for(var de=we,ve;de!==null;){ve=de;var Ue=ve.stateNode;if(ve.tag===5&&Ue!==null&&(ve=Ue,ge!==null&&(Ue=ml(de,ge),Ue!=null&&at.push(Mf(de,Ue,ve)))),Tr)break;de=de.return}0<at.length&&(Re=new Xe(Re,tt,null,N,De),$e.push({event:Re,listeners:at}))}}if((p&7)===0){e:{if(Re=f==="mouseover"||f==="pointerover",Xe=f==="mouseout"||f==="pointerout",Re&&N!==dn&&(tt=N.relatedTarget||N.fromElement)&&(gl(tt)||tt[fs]))break e;if((Xe||Re)&&(Re=De.window===De?De:(Re=De.ownerDocument)?Re.defaultView||Re.parentWindow:window,Xe?(tt=N.relatedTarget||N.toElement,Xe=we,tt=tt?gl(tt):null,tt!==null&&(Tr=Rr(tt),tt!==Tr||tt.tag!==5&&tt.tag!==6)&&(tt=null)):(Xe=null,tt=we),Xe!==tt)){if(at=pC,Ue="onMouseLeave",ge="onMouseEnter",de="mouse",(f==="pointerout"||f==="pointerover")&&(at=yC,Ue="onPointerLeave",ge="onPointerEnter",de="pointer"),Tr=Xe==null?Re:Xc(Xe),ve=tt==null?Re:Xc(tt),Re=new at(Ue,de+"leave",Xe,N,De),Re.target=Tr,Re.relatedTarget=ve,Ue=null,gl(De)===we&&(at=new at(ge,de+"enter",tt,N,De),at.target=ve,at.relatedTarget=Tr,Ue=at),Tr=Ue,Xe&&tt)t:{for(at=Xe,ge=tt,de=0,ve=at;ve;ve=Kc(ve))de++;for(ve=0,Ue=ge;Ue;Ue=Kc(Ue))ve++;for(;0<de-ve;)at=Kc(at),de--;for(;0<ve-de;)ge=Kc(ge),ve--;for(;de--;){if(at===ge||ge!==null&&at===ge.alternate)break t;at=Kc(at),ge=Kc(ge)}at=null}else at=null;Xe!==null&&VC($e,Re,Xe,at,!1),tt!==null&&Tr!==null&&VC($e,Tr,tt,at,!0)}}
vendor: 7,719 bytes, lines 37-38
37e:{if(Re=we?Xc(we):window,Xe=Re.nodeName&&Re.nodeName.toLowerCase(),Xe==="select"||Xe==="input"&&Re.type==="file")var ot=xX;else if(NC(Re))if(SC)ot=NX;else{ot=wX;var ct=bX}else(Xe=Re.nodeName)&&Xe.toLowerCase()==="input"&&(Re.type==="checkbox"||Re.type==="radio")&&(ot=jX);if(ot&&(ot=ot(f,we))){_C($e,ot,N,De);break e}ct&&ct(f,Re,we),f==="focusout"&&(ct=Re._wrapperState)&&ct.controlled&&Re.type==="number"&&ae(Re,"number",Re.value)}switch(ct=we?Xc(we):window,f){case"focusin":(NC(ct)||ct.contentEditable==="true")&&(Wc=ct,bb=we,Pf=null);break;case"focusout":Pf=bb=Wc=null;break;case"mousedown":wb=!0;break;case"contextmenu":case"mouseup":case"dragend":wb=!1,MC($e,N,De);break;case"selectionchange":if(AX)break;case"keydown":case"keyup":MC($e,N,De)}var ut;if(gb)e:{switch(f){case"compositionstart":var yt="onCompositionStart";break e;case"compositionend":yt="onCompositionEnd";break e;case"compositionupdate":yt="onCompositionUpdate";break e}yt=void 0}else Hc?wC(f,N)&&(yt="onCompositionEnd"):f==="keydown"&&N.keyCode===229&&(yt="onCompositionStart");yt&&(vC&&N.locale!=="ko"&&(Hc||yt!=="onCompositionStart"?yt==="onCompositionEnd"&&Hc&&(ut=hC()):(io=De,ub="value"in io?io.value:io.textContent,Hc=!0)),ct=ag(we,yt),0<ct.length&&(yt=new gC(yt,f,null,N,De),$e.push({event:yt,listeners:ct}),ut?yt.data=ut:(ut=jC(N),ut!==null&&(yt.data=ut)))),(ut=mX?pX(f,N):gX(f,N))&&(we=ag(we,"onBeforeInput"),0<we.length&&(De=new gC("onBeforeInput","beforeinput",null,N,De),$e.push({event:De,listeners:we}),De.data=ut))}qC($e,p)})}function Mf(f,p,N){return{instance:f,listener:p,currentTarget:N}}function ag(f,p){for(var N=p+"Capture",E=[];f!==null;){var R=f,$=R.stateNode;R.tag===5&&$!==null&&(R=$,$=ml(f,N),$!=null&&E.unshift(Mf(f,$,R)),$=ml(f,p),$!=null&&E.push(Mf(f,$,R))),f=f.return}return E}function Kc(f){if(f===null)return null;do f=f.return;while(f&&f.tag!==5);return f||null}function VC(f,p,N,E,R){for(var $=p._reactName,K=[];N!==null&&N!==E;){var re=N,le=re.alternate,we=re.stateNode;if(le!==null&&le===E)break;re.tag===5&&we!==null&&(re=we,R?(le=ml(N,$),le!=null&&K.unshift(Mf(N,le,re))):R||(le=ml(N,$),le!=null&&K.push(Mf(N,le,re)))),N=N.return}K.length!==0&&f.push({event:p,listeners:K})}var PX=/\r\n?/g,CX=/\u0000|\uFFFD/g;function HC(f){return(typeof f=="string"?f:""+f).replace(PX,` 38`).replace(CX,"")}function ig(f,p,N){if(p=HC(p),HC(f)!==p&&N)throw Error(r(425))}function sg(){}var kb=null,Eb=null;function Tb(f,p){return f==="textarea"||f==="noscript"||typeof p.children=="string"||typeof p.children=="number"||typeof p.dangerouslySetInnerHTML=="object"&&p.dangerouslySetInnerHTML!==null&&p.dangerouslySetInnerHTML.__html!=null}var Pb=typeof setTimeout=="function"?setTimeout:void 0,OX=typeof clearTimeout=="function"?clearTimeout:void 0,WC=typeof Promise=="function"?Promise:void 0,MX=typeof queueMicrotask=="function"?queueMicrotask:typeof WC<"u"?function(f){return WC.resolve(null).then(f).catch(RX)}:Pb;function RX(f){setTimeout(function(){throw f})}function Cb(f,p){var N=p,E=0;do{var R=N.nextSibling;if(f.removeChild(N),R&&R.nodeType===8)if(N=R.data,N==="/$"){if(E===0){f.removeChild(R),Nf(p);return}E--}else N!=="$"&&N!=="$?"&&N!=="$!"||E++;N=R}while(N);Nf(p)}function oo(f){for(;f!=null;f=f.nextSibling){var p=f.nodeType;if(p===1||p===3)break;if(p===8){if(p=f.data,p==="$"||p==="$!"||p==="$?")break;if(p==="/$")return null}}return f}function GC(f){f=f.previousSibling;for(var p=0;f;){if(f.nodeType===8){var N=f.data;if(N==="$"||N==="$!"||N==="$?"){if(p===0)return f;p--}else N==="/$"&&p++}f=f.previousSibling}return null}var Yc=Math.random().toString(36).slice(2),Ri="__reactFiber$"+Yc,Rf="__reactProps$"+Yc,fs="__reactContainer$"+Yc,Ob="__reactEvents$"+Yc,DX="__reactListeners$"+Yc,IX="__reactHandles$"+Yc;function gl(f){var p=f[Ri];if(p)return p;for(var N=f.parentNode;N;){if(p=N[fs]||N[Ri]){if(N=p.alternate,p.child!==null||N!==null&&N.child!==null)for(f=GC(f);f!==null;){if(N=f[Ri])return N;f=GC(f)}return p}f=N,N=f.parentNode}return null}function Df(f){return f=f[Ri]||f[fs],!f||f.tag!==5&&f.tag!==6&&f.tag!==13&&f.tag!==3?null:f}function Xc(f){if(f.tag===5||f.tag===6)return f.stateNode;throw Error(r(33))}function og(f){return f[Rf]||null}var Mb=[],Qc=-1;function lo(f){return{current:f}}function cr(f){0>Qc||(f.current=Mb[Qc],Mb[Qc]=null,Qc--)}function nr(f,p){Qc++,Mb[Qc]=f.current,f.current=p}var co={},wn=lo(co),Xn=lo(!1),yl=co;function Zc(f,p){var N=f.type.contextTypes;if(!N)return co;var E=f.stateNode;if(E&&E.__reactInternalMemoizedUnmaskedChildContext===p)return E.__reactInternalMemoizedMaskedChildContext;var R={},$;for($ in N)R[$]=p[$];return E&&(f=f.stateNode,f.__reactInternalMemoizedUnmaskedChildContext=p,f.__reactInternalMemoizedMaskedChildContext=R),R}function Qn(f){return f=f.childContextTypes,f!=null}function lg(){cr(Xn),cr(wn)}function KC(f,p,N){if(wn.current!==co)throw Error(r(168));nr(wn,p),nr(Xn,N)}function YC(f,p,N){var E=f.stateNode;if(p=p.childContextTypes,typeof E.getChildContext!="function")return N;E=E.getChildContext();for(var R in E)if(!(R in p))throw Error(r(108,X(f)||"Unknown",R));return z({},N,E)}function cg(f){return f=(f=f.stateNode)&&f.__reactInternalMemoizedMergedChildContext||co,yl=wn.current,nr(wn,f),nr(Xn,Xn.current),!0}function XC(f,p,N){var E=f.stateNode;if(!E)throw Error(r(169));N?(f=YC(f,p,yl),E.__reactInternalMemoizedMergedChildContext=f,cr(Xn),cr(wn),nr(wn,f)):cr(Xn),nr(Xn,N)}var hs=null,ug=!1,Rb=!1;function QC(f){hs===null?hs=[f]:hs.push(f)}function LX(f){ug=!0,QC(f)}function uo(){if(!Rb&&hs!==null){Rb=!0;var f=0,p=Qt;try{var N=hs;for(Qt=1;f<N.length;f++){var E=N[f];do E=E(!0);while(E!==null)}hs=null,ug=!1}catch(R){throw hs!==null&&(hs=hs.slice(f+1)),pf(rb,uo),R}finally{Qt=p,Rb=!1}}return null}var Jc=[],eu=0,dg=null,fg=0,Pa=[],Ca=0,vl=null,ms=1,ps="";function xl(f,p){Jc[eu++]=fg,Jc[eu++]=dg,dg=f,fg=p}function ZC(f,p,N){Pa[Ca++]=ms,Pa[Ca++]=ps,Pa[Ca++]=vl,vl=f;var E=ms;f=ps;var R=32-ii(E)-1;E&=~(1<<R),N+=1;var $=32-ii(p)+R;if(30<$){var K=R-R%5;$=(E&(1<<K)-1).toString(32),E>>=K,R-=K,ms=1<<32-ii(p)+R|N<<R|E,ps=$+f}else ms=1<<$|N<<R|E,ps=f}function Db(f){f.return!==null&&(xl(f,1),ZC(f,1,0))}function Ib(f){for(;f===dg;)dg=Jc[--eu],Jc[eu]=null,fg=Jc[--eu],Jc[eu]=null;for(;f===vl;)vl=Pa[--Ca],Pa[Ca]=null,ps=Pa[--Ca],Pa[Ca]=null,ms=Pa[--Ca],Pa[Ca]=null}var da=null,fa=null,mr=!1,oi=null;function JC(f,p){var N=Da(5,null,null,0);N.elementType="DELETED",N.stateNode=p,N.return=f,p=f.deletions,p===null?(f.deletions=[N],f.flags|=16):p.push(N)}function eO(f,p){switch(f.tag){case 5:var N=f.type;return p=p.nodeType!==1||N.toLowerCase()!==p.nodeName.toLowerCase()?null:p,p!==null?(f.stateNode=p,da=f,fa=oo(p.firstChild),!0):!1;case 6:return p=f.pendingProps===""||p.nodeType!==3?null:p,p!==null?(f.stateNode=p,da=f,fa=null,!0):!1;case 13:return p=p.nodeType!==8?null:p,p!==null?(N=vl!==null?{id:ms,overflow:ps}:null,f.memoizedState={dehydrated:p,treeContext:N,retryLane:1073741824},N=Da(18,null,null,0),N.stateNode=p,N.return=f,f.child=N,da=f,fa=null,!0):!1;default:return!1}}function Lb(f){return(f.mode&1)!==0&&(f.flags&128)===0}function $b(f){if(mr){var p=fa;if(p){var N=p;if(!eO(f,p)){if(Lb(f))throw Error(r(418));p=oo(N.nextSibling);var E=da;p&&eO(f,p)?JC(E,N):(f.flags=f.flags&-4097|2,mr=!1,da=f)}}else{if(Lb(f))throw Error(r(418));f.flags=f.flags&-4097|2,mr=!1,da=f}}}function tO(f){for(f=f.return;f!==null&&f.tag!==5&&f.tag!==3&&f.tag!==13;)f=f.return;da=f}function hg(f){if(f!==da)return!1;if(!mr)return tO(f),mr=!0,!1;var p;if((p=f.tag!==3)&&!(p=f.tag!==5)&&(p=f.type,p=p!=="head"&&p!=="body"&&!Tb(f.type,f.memoizedProps)),p&&(p=fa)){if(Lb(f))throw rO(),Error(r(418));for(;p;)JC(f,p),p=oo(p.nextSibling)}if(tO(f),f.tag===13){if(f=f.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));e:{for(f=f.nextSibling,p=0;f;
vendor: 4,857 bytes, line 38
38){if(f.nodeType===8){var N=f.data;if(N==="/$"){if(p===0){fa=oo(f.nextSibling);break e}p--}else N!=="$"&&N!=="$!"&&N!=="$?"||p++}f=f.nextSibling}fa=null}}else fa=da?oo(f.stateNode.nextSibling):null;return!0}function rO(){for(var f=fa;f;)f=oo(f.nextSibling)}function tu(){fa=da=null,mr=!1}function Fb(f){oi===null?oi=[f]:oi.push(f)}var $X=j.ReactCurrentBatchConfig;function If(f,p,N){if(f=N.ref,f!==null&&typeof f!="function"&&typeof f!="object"){if(N._owner){if(N=N._owner,N){if(N.tag!==1)throw Error(r(309));var E=N.stateNode}if(!E)throw Error(r(147,f));var R=E,$=""+f;return p!==null&&p.ref!==null&&typeof p.ref=="function"&&p.ref._stringRef===$?p.ref:(p=function(K){var re=R.refs;K===null?delete re[$]:re[$]=K},p._stringRef=$,p)}if(typeof f!="string")throw Error(r(284));if(!N._owner)throw Error(r(290,f))}return f}function mg(f,p){throw f=Object.prototype.toString.call(p),Error(r(31,f==="[object Object]"?"object with keys {"+Object.keys(p).join(", ")+"}":f))}function nO(f){var p=f._init;return p(f._payload)}function aO(f){function p(ge,de){if(f){var ve=ge.deletions;ve===null?(ge.deletions=[de],ge.flags|=16):ve.push(de)}}function N(ge,de){if(!f)return null;for(;de!==null;)p(ge,de),de=de.sibling;return null}function E(ge,de){for(ge=new Map;de!==null;)de.key!==null?ge.set(de.key,de):ge.set(de.index,de),de=de.sibling;return ge}function R(ge,de){return ge=xo(ge,de),ge.index=0,ge.sibling=null,ge}function $(ge,de,ve){return ge.index=ve,f?(ve=ge.alternate,ve!==null?(ve=ve.index,ve<de?(ge.flags|=2,de):ve):(ge.flags|=2,de)):(ge.flags|=1048576,de)}function K(ge){return f&&ge.alternate===null&&(ge.flags|=2),ge}function re(ge,de,ve,Ue){return de===null||de.tag!==6?(de=Pw(ve,ge.mode,Ue),de.return=ge,de):(de=R(de,ve),de.return=ge,de)}function le(ge,de,ve,Ue){var ot=ve.type;return ot===T?De(ge,de,ve.props.children,Ue,ve.key):de!==null&&(de.elementType===ot||typeof ot=="object"&&ot!==null&&ot.$$typeof===G&&nO(ot)===de.type)?(Ue=R(de,ve.props),Ue.ref=If(ge,de,ve),Ue.return=ge,Ue):(Ue=$g(ve.type,ve.key,ve.props,null,ge.mode,Ue),Ue.ref=If(ge,de,ve),Ue.return=ge,Ue)}function we(ge,de,ve,Ue){return de===null||de.tag!==4||de.stateNode.containerInfo!==ve.containerInfo||de.stateNode.implementation!==ve.implementation?(de=Cw(ve,ge.mode,Ue),de.return=ge,de):(de=R(de,ve.children||[]),de.return=ge,de)}function De(ge,de,ve,Ue,ot){return de===null||de.tag!==7?(de=kl(ve,ge.mode,Ue,ot),de.return=ge,de):(de=R(de,ve),de.return=ge,de)}function $e(ge,de,ve){if(typeof de=="string"&&de!==""||typeof de=="number")return de=Pw(""+de,ge.mode,ve),de.return=ge,de;if(typeof de=="object"&&de!==null){switch(de.$$typeof){case S:return ve=$g(de.type,de.key,de.props,null,ge.mode,ve),ve.ref=If(ge,null,de),ve.return=ge,ve;case k:return de=Cw(de,ge.mode,ve),de.return=ge,de;case G:var Ue=de._init;return $e(ge,Ue(de._payload),ve)}if(pe(de)||V(de))return de=kl(de,ge.mode,ve,null),de.return=ge,de;mg(ge,de)}return null}function Re(ge,de,ve,Ue){var ot=de!==null?de.key:null;if(typeof ve=="string"&&ve!==""||typeof ve=="number")return ot!==null?null:re(ge,de,""+ve,Ue);if(typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case S:return ve.key===ot?le(ge,de,ve,Ue):null;case k:return ve.key===ot?we(ge,de,ve,Ue):null;case G:return ot=ve._init,Re(ge,de,ot(ve._payload),Ue)}if(pe(ve)||V(ve))return ot!==null?null:De(ge,de,ve,Ue,null);mg(ge,ve)}return null}function Xe(ge,de,ve,Ue,ot){if(typeof Ue=="string"&&Ue!==""||typeof Ue=="number")return ge=ge.get(ve)||null,re(de,ge,""+Ue,ot);if(typeof Ue=="object"&&Ue!==null){switch(Ue.$$typeof){case S:return ge=ge.get(Ue.key===null?ve:Ue.key)||null,le(de,ge,Ue,ot);case k:return ge=ge.get(Ue.key===null?ve:Ue.key)||null,we(de,ge,Ue,ot);case G:var ct=Ue._init;return Xe(ge,de,ve,ct(Ue._payload),ot)}if(pe(Ue)||V(Ue))return ge=ge.get(ve)||null,De(de,ge,Ue,ot,null);mg(de,Ue)}return null}function tt(ge,de,ve,Ue){for(var ot=null,ct=null,ut=de,yt=de=0,tn=null;ut!==null&&yt<ve.length;yt++){ut.index>yt?(tn=ut,ut=null):tn=ut.sibling;var Ut=Re(ge,ut,ve[yt],Ue);if(Ut===null){ut===null&&(ut=tn);break}f&&ut&&Ut.alternate===null&&p(ge,ut),de=$(Ut,de,yt),ct===null?ot=Ut:ct.sibling=Ut,ct=Ut,ut=tn}if(yt===ve.length)return N(ge,ut),mr&&xl(ge,yt),ot;if(ut===null){for(;yt<ve.length;yt++)ut=$e(ge,ve[yt],Ue),ut!==null&&(de=$(ut,de,yt),ct===null?ot=ut:ct.sibling=ut,ct=ut);return mr&&xl(ge,yt),ot}for(ut=E(ge,ut);yt<ve.length;yt++)tn=Xe(ut,ge,yt,ve[yt],Ue),tn!==null&&(f&&tn.alternate!==null&&ut.delete(tn.key===null?yt:tn.key),de=$(tn,de,yt),ct===null?ot=tn:ct.sibling=tn,ct=tn);return f&&ut.forEach(function(bo){return p(ge,bo)}),mr&&xl(ge,yt),ot}function at(ge,de,ve,Ue){var ot=V(ve);if(typeof ot!="function")throw Error(r(150));if(ve=ot.call(ve),ve==null)throw Error(r(151));for(var ct=ot=null,ut=de,yt=de=0,tn=null,Ut=ve.next();ut!==null&&!Ut.done;yt++,Ut=ve.next()){ut.index>yt?(tn=ut,ut=null):tn=ut.sibling;var bo=Re(ge,ut,Ut.value,Ue);
vendor: 11,291 bytes, line 38
38if(bo===null){ut===null&&(ut=tn);break}f&&ut&&bo.alternate===null&&p(ge,ut),de=$(bo,de,yt),ct===null?ot=bo:ct.sibling=bo,ct=bo,ut=tn}if(Ut.done)return N(ge,ut),mr&&xl(ge,yt),ot;if(ut===null){for(;!Ut.done;yt++,Ut=ve.next())Ut=$e(ge,Ut.value,Ue),Ut!==null&&(de=$(Ut,de,yt),ct===null?ot=Ut:ct.sibling=Ut,ct=Ut);return mr&&xl(ge,yt),ot}for(ut=E(ge,ut);!Ut.done;yt++,Ut=ve.next())Ut=Xe(ut,ge,yt,Ut.value,Ue),Ut!==null&&(f&&Ut.alternate!==null&&ut.delete(Ut.key===null?yt:Ut.key),de=$(Ut,de,yt),ct===null?ot=Ut:ct.sibling=Ut,ct=Ut);return f&&ut.forEach(function(yQ){return p(ge,yQ)}),mr&&xl(ge,yt),ot}function Tr(ge,de,ve,Ue){if(typeof ve=="object"&&ve!==null&&ve.type===T&&ve.key===null&&(ve=ve.props.children),typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case S:e:{for(var ot=ve.key,ct=de;ct!==null;){if(ct.key===ot){if(ot=ve.type,ot===T){if(ct.tag===7){N(ge,ct.sibling),de=R(ct,ve.props.children),de.return=ge,ge=de;break e}}else if(ct.elementType===ot||typeof ot=="object"&&ot!==null&&ot.$$typeof===G&&nO(ot)===ct.type){N(ge,ct.sibling),de=R(ct,ve.props),de.ref=If(ge,ct,ve),de.return=ge,ge=de;break e}N(ge,ct);break}else p(ge,ct);ct=ct.sibling}ve.type===T?(de=kl(ve.props.children,ge.mode,Ue,ve.key),de.return=ge,ge=de):(Ue=$g(ve.type,ve.key,ve.props,null,ge.mode,Ue),Ue.ref=If(ge,de,ve),Ue.return=ge,ge=Ue)}return K(ge);case k:e:{for(ct=ve.key;de!==null;){if(de.key===ct)if(de.tag===4&&de.stateNode.containerInfo===ve.containerInfo&&de.stateNode.implementation===ve.implementation){N(ge,de.sibling),de=R(de,ve.children||[]),de.return=ge,ge=de;break e}else{N(ge,de);break}else p(ge,de);de=de.sibling}de=Cw(ve,ge.mode,Ue),de.return=ge,ge=de}return K(ge);case G:return ct=ve._init,Tr(ge,de,ct(ve._payload),Ue)}if(pe(ve))return tt(ge,de,ve,Ue);if(V(ve))return at(ge,de,ve,Ue);mg(ge,ve)}return typeof ve=="string"&&ve!==""||typeof ve=="number"?(ve=""+ve,de!==null&&de.tag===6?(N(ge,de.sibling),de=R(de,ve),de.return=ge,ge=de):(N(ge,de),de=Pw(ve,ge.mode,Ue),de.return=ge,ge=de),K(ge)):N(ge,de)}return Tr}var ru=aO(!0),iO=aO(!1),pg=lo(null),gg=null,nu=null,Bb=null;function Ub(){Bb=nu=gg=null}function qb(f){var p=pg.current;cr(pg),f._currentValue=p}function zb(f,p,N){for(;f!==null;){var E=f.alternate;if((f.childLanes&p)!==p?(f.childLanes|=p,E!==null&&(E.childLanes|=p)):E!==null&&(E.childLanes&p)!==p&&(E.childLanes|=p),f===N)break;f=f.return}}function au(f,p){gg=f,Bb=nu=null,f=f.dependencies,f!==null&&f.firstContext!==null&&((f.lanes&p)!==0&&(Zn=!0),f.firstContext=null)}function Oa(f){var p=f._currentValue;if(Bb!==f)if(f={context:f,memoizedValue:p,next:null},nu===null){if(gg===null)throw Error(r(308));nu=f,gg.dependencies={lanes:0,firstContext:f}}else nu=nu.next=f;return p}var bl=null;function Vb(f){bl===null?bl=[f]:bl.push(f)}function sO(f,p,N,E){var R=p.interleaved;return R===null?(N.next=N,Vb(p)):(N.next=R.next,R.next=N),p.interleaved=N,gs(f,E)}function gs(f,p){f.lanes|=p;var N=f.alternate;for(N!==null&&(N.lanes|=p),N=f,f=f.return;f!==null;)f.childLanes|=p,N=f.alternate,N!==null&&(N.childLanes|=p),N=f,f=f.return;return N.tag===3?N.stateNode:null}var fo=!1;function Hb(f){f.updateQueue={baseState:f.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function oO(f,p){f=f.updateQueue,p.updateQueue===f&&(p.updateQueue={baseState:f.baseState,firstBaseUpdate:f.firstBaseUpdate,lastBaseUpdate:f.lastBaseUpdate,shared:f.shared,effects:f.effects})}function ys(f,p){return{eventTime:f,lane:p,tag:0,payload:null,callback:null,next:null}}function ho(f,p,N){var E=f.updateQueue;if(E===null)return null;if(E=E.shared,(It&2)!==0){var R=E.pending;return R===null?p.next=p:(p.next=R.next,R.next=p),E.pending=p,gs(f,N)}return R=E.interleaved,R===null?(p.next=p,Vb(E)):(p.next=R.next,R.next=p),E.interleaved=p,gs(f,N)}function yg(f,p,N){if(p=p.updateQueue,p!==null&&(p=p.shared,(N&4194240)!==0)){var E=p.lanes;E&=f.pendingLanes,N|=E,p.lanes=N,ib(f,N)}}function lO(f,p){var N=f.updateQueue,E=f.alternate;if(E!==null&&(E=E.updateQueue,N===E)){var R=null,$=null;if(N=N.firstBaseUpdate,N!==null){do{var K={eventTime:N.eventTime,lane:N.lane,tag:N.tag,payload:N.payload,callback:N.callback,next:null};$===null?R=$=K:$=$.next=K,N=N.next}while(N!==null);$===null?R=$=p:$=$.next=p}else R=$=p;N={baseState:E.baseState,firstBaseUpdate:R,lastBaseUpdate:$,shared:E.shared,effects:E.effects},f.updateQueue=N;return}f=N.lastBaseUpdate,f===null?N.firstBaseUpdate=p:f.next=p,N.lastBaseUpdate=p}function vg(f,p,N,E){var R=f.updateQueue;fo=!1;var $=R.firstBaseUpdate,K=R.lastBaseUpdate,re=R.shared.pending;if(re!==null){R.shared.pending=null;var le=re,we=le.next;le.next=null,K===null?$=we:K.next=we,K=le;var De=f.alternate;De!==null&&(De=De.updateQueue,re=De.lastBaseUpdate,re!==K&&(re===null?De.firstBaseUpdate=we:re.next=we,De.lastBaseUpdate=le))}if($!==null){var $e=R.baseState;K=0,De=we=le=null,re=$;do{var Re=re.lane,Xe=re.eventTime;if((E&Re)===Re){De!==null&&(De=De.next={eventTime:Xe,lane:0,tag:re.tag,payload:re.payload,callback:re.callback,next:null});e:{var tt=f,at=re;switch(Re=p,Xe=N,at.tag){case 1:if(tt=at.payload,typeof tt=="function"){$e=tt.call(Xe,$e,Re);break e}$e=tt;break e;case 3:tt.flags=tt.flags&-65537|128;case 0:if(tt=at.payload,Re=typeof tt=="function"?tt.call(Xe,$e,Re):tt,Re==null)break e;$e=z({},$e,Re);break e;case 2:fo=!0}}re.callback!==null&&re.lane!==0&&(f.flags|=64,Re=R.effects,Re===null?R.effects=[re]:Re.push(re))}else Xe={eventTime:Xe,lane:Re,tag:re.tag,payload:re.payload,callback:re.callback,next:null},De===null?(we=De=Xe,le=$e):De=De.next=Xe,K|=Re;if(re=re.next,re===null){if(re=R.shared.pending,re===null)break;Re=re,re=Re.next,Re.next=null,R.lastBaseUpdate=Re,R.shared.pending=null}}while(!0);if(De===null&&(le=$e),R.baseState=le,R.firstBaseUpdate=we,R.lastBaseUpdate=De,p=R.shared.interleaved,p!==null){R=p;do K|=R.lane,R=R.next;while(R!==p)}else $===null&&(R.shared.lanes=0);Nl|=K,f.lanes=K,f.memoizedState=$e}}function cO(f,p,N){if(f=p.effects,p.effects=null,f!==null)for(p=0;p<f.length;p++){var E=f[p],R=E.callback;if(R!==null){if(E.callback=null,E=N,typeof R!="function")throw Error(r(191,R));R.call(E)}}}var Lf={},Di=lo(Lf),$f=lo(Lf),Ff=lo(Lf);function wl(f){if(f===Lf)throw Error(r(174));return f}function Wb(f,p){switch(nr(Ff,p),nr($f,f),nr(Di,Lf),f=p.nodeType,f){case 9:case 11:p=(p=p.documentElement)?p.namespaceURI:Bt(null,"");break;default:f=f===8?p.parentNode:p,p=f.namespaceURI||null,f=f.tagName,p=Bt(p,f)}cr(Di),nr(Di,p)}function iu(){cr(Di),cr($f),cr(Ff)}function uO(f){wl(Ff.current);var p=wl(Di.current),N=Bt(p,f.type);p!==N&&(nr($f,f),nr(Di,N))}function Gb(f){$f.current===f&&(cr(Di),cr($f))}var yr=lo(0);function xg(f){for(var p=f;p!==null;){if(p.tag===13){var N=p.memoizedState;if(N!==null&&(N=N.dehydrated,N===null||N.data==="$?"||N.data==="$!"))return p}else if(p.tag===19&&p.memoizedProps.revealOrder!==void 0){if((p.flags&128)!==0)return p}else if(p.child!==null){p.child.return=p,p=p.child;continue}if(p===f)break;for(;p.sibling===null;){if(p.return===null||p.return===f)return null;p=p.return}p.sibling.return=p.return,p=p.sibling}return null}var Kb=[];function Yb(){for(var f=0;f<Kb.length;f++)Kb[f]._workInProgressVersionPrimary=null;Kb.length=0}var bg=j.ReactCurrentDispatcher,Xb=j.ReactCurrentBatchConfig,jl=0,vr=null,qr=null,Jr=null,wg=!1,Bf=!1,Uf=0,FX=0;function jn(){throw Error(r(321))}function Qb(f,p){if(p===null)return!1;for(var N=0;N<p.length&&N<f.length;N++)if(!si(f[N],p[N]))return!1;return!0}function Zb(f,p,N,E,R,$){if(jl=$,vr=p,p.memoizedState=null,p.updateQueue=null,p.lanes=0,bg.current=f===null||f.memoizedState===null?zX:VX,f=N(E,R),Bf){$=0;do{if(Bf=!1,Uf=0,25<=$)throw Error(r(301));$+=1,Jr=qr=null,p.updateQueue=null,bg.current=HX,f=N(E,R)}while(Bf)}if(bg.current=_g,p=qr!==null&&qr.next!==null,jl=0,Jr=qr=vr=null,wg=!1,p)throw Error(r(300));return f}function Jb(){var f=Uf!==0;return Uf=0,f}function Ii(){var f={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Jr===null?vr.memoizedState=Jr=f:Jr=Jr.next=f,Jr}function Ma(){if(qr===null){var f=vr.alternate;f=f!==null?f.memoizedState:null}else f=qr.next;var p=Jr===null?vr.memoizedState:Jr.next;if(p!==null)Jr=p,qr=f;else{if(f===null)throw Error(r(310));qr=f,f={memoizedState:qr.memoizedState,baseState:qr.baseState,baseQueue:qr.baseQueue,queue:qr.queue,next:null},Jr===null?vr.memoizedState=Jr=f:Jr=Jr.next=f}return Jr}function qf(f,p){return typeof p=="function"?p(f):p}function ew(f){var p=Ma(),N=p.queue;if(N===null)throw Error(r(311));N.lastRenderedReducer=f;var E=qr,R=E.baseQueue,$=N.pending;if($!==null){if(R!==null){var K=R.next;R.next=$.next,$.next=K}E.baseQueue=R=$,N.pending=null}if(R!==null){$=R.next,E=E.baseState;var re=K=null,le=null,we=$;do{var De=we.lane;if((jl&De)===De)le!==null&&(le=le.next={lane:0,action:we.action,hasEagerState:we.hasEagerState,eagerState:we.eagerState,next:null}),E=we.hasEagerState?we.eagerState:f(E,we.action);else{var $e={lane:De,action:we.action,hasEagerState:we.hasEagerState,eagerState:we.eagerState,next:null};le===null?(re=le=$e,K=E):le=le.next=$e,vr.lanes|=De,Nl|=De}we=we.next}while(we!==null&&we!==$);le===null?K=E:le.next=re,si(E,p.memoizedState)||(Zn=!0),p.memoizedState=E,p.baseState=K,p.baseQueue=le,N.lastRenderedState=E}if(f=N.interleaved,f!==null){R=f;do $=R.lane,vr.lanes|=$,Nl|=$,R=R.next;while(R!==f)}else R===null&&(N.lanes=0);return[p.memoizedState,N.dispatch]}function tw(f){var p=Ma(),N=p.queue;if(N===null)throw Error(r(311));N.lastRenderedReducer=f;var E=N.dispatch,R=N.pending,$=p.memoizedState;if(R!==null){N.pending=null;var K=R=R.next;do $=f($,K.action),K=K.next;while(K!==R);si($,p.memoizedState)||(Zn=!0),p.memoizedState=$,p.baseQueue===null&&(p.baseState=$),N.lastRenderedState=$}return[$,E]}function dO(){}function fO(f,p){var N=vr,E=Ma(),R=p(),$=!si(E.memoizedState,R);if($&&(E.memoizedState=R,Zn=!0),E=E.queue,rw(pO.bind(null,N,E,f),[f]),E.getSnapshot!==p||$||Jr!==null&&Jr.memoizedState.tag&1){if(N.flags|=2048,zf(9,mO.bind(null,N,E,R,p),void 0,null),en===null)throw Error(r(349));(jl&30)!==0||hO(N,p,R)}return R}function hO(f,p,N){f.flags|=16384,f={getSnapshot:p,value:N},p=vr.updateQueue,p===null?(p={lastEffect:null,stores:null},vr.updateQueue=p,p.stores=[f]):(N=p.stores,N===null?p.stores=[f]:N.push(f))}function mO(f,p,N,E){p.value=N,p.getSnapshot=E,gO(p)&&yO(f)}function pO(f,p,N){return N(function(){gO(p)&&yO(f)})}function gO(f){var p=f.getSnapshot;f=f.value;try{var N=p();return!si(f,N)}catch{return!0}}function yO(f){var p=gs(f,1);p!==null&&di(p,f,1,-1)}function vO(f){var p=Ii();return typeof f=="function"&&(f=f()),p.memoizedState=p.baseState=f,f={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:qf,lastRenderedState:f},p.queue=f,f=f.dispatch=qX.bind(null,vr,f),[p.memoizedState,f]}function zf(f,p,N,E){return f={tag:f,create:p,destroy:N,deps:E,next:null},p=vr.updateQueue,p===null?(p={lastEffect:null,stores:null},vr.updateQueue=p,p.lastEffect=f.next=f):(N=p.lastEffect,N===null?p.lastEffect=f.next=f:(E=N.next,N.next=f,f.next=E,p.lastEffect=f)),f}function xO(){return Ma().memoizedState}function jg(f,p,N,E){var R=Ii();vr.flags|=f,R.memoizedState=zf(1|p,N,void 0,E===void 0?null:E)}function Ng(f,p,N,E){var R=Ma();E=E===void 0?null:E;var $=void 0;if(qr!==null){var K=qr.memoizedState;if($=K.destroy,E!==null&&Qb(E,K.deps)){R.memoizedState=zf(p,N,$,E
vendor: 4,416 bytes, line 38
38);return}}vr.flags|=f,R.memoizedState=zf(1|p,N,$,E)}function bO(f,p){return jg(8390656,8,f,p)}function rw(f,p){return Ng(2048,8,f,p)}function wO(f,p){return Ng(4,2,f,p)}function jO(f,p){return Ng(4,4,f,p)}function NO(f,p){if(typeof p=="function")return f=f(),p(f),function(){p(null)};if(p!=null)return f=f(),p.current=f,function(){p.current=null}}function _O(f,p,N){return N=N!=null?N.concat([f]):null,Ng(4,4,NO.bind(null,p,f),N)}function nw(){}function SO(f,p){var N=Ma();p=p===void 0?null:p;var E=N.memoizedState;return E!==null&&p!==null&&Qb(p,E[1])?E[0]:(N.memoizedState=[f,p],f)}function AO(f,p){var N=Ma();p=p===void 0?null:p;var E=N.memoizedState;return E!==null&&p!==null&&Qb(p,E[1])?E[0]:(f=f(),N.memoizedState=[f,p],f)}function kO(f,p,N){return(jl&21)===0?(f.baseState&&(f.baseState=!1,Zn=!0),f.memoizedState=N):(si(N,p)||(N=nC(),vr.lanes|=N,Nl|=N,f.baseState=!0),p)}function BX(f,p){var N=Qt;Qt=N!==0&&4>N?N:4,f(!0);var E=Xb.transition;Xb.transition={};try{f(!1),p()}finally{Qt=N,Xb.transition=E}}function EO(){return Ma().memoizedState}function UX(f,p,N){var E=yo(f);if(N={lane:E,action:N,hasEagerState:!1,eagerState:null,next:null},TO(f))PO(p,N);else if(N=sO(f,p,N,E),N!==null){var R=In();di(N,f,E,R),CO(N,p,E)}}function qX(f,p,N){var E=yo(f),R={lane:E,action:N,hasEagerState:!1,eagerState:null,next:null};if(TO(f))PO(p,R);else{var $=f.alternate;if(f.lanes===0&&($===null||$.lanes===0)&&($=p.lastRenderedReducer,$!==null))try{var K=p.lastRenderedState,re=$(K,N);if(R.hasEagerState=!0,R.eagerState=re,si(re,K)){var le=p.interleaved;le===null?(R.next=R,Vb(p)):(R.next=le.next,le.next=R),p.interleaved=R;return}}catch{}finally{}N=sO(f,p,R,E),N!==null&&(R=In(),di(N,f,E,R),CO(N,p,E))}}function TO(f){var p=f.alternate;return f===vr||p!==null&&p===vr}function PO(f,p){Bf=wg=!0;var N=f.pending;N===null?p.next=p:(p.next=N.next,N.next=p),f.pending=p}function CO(f,p,N){if((N&4194240)!==0){var E=p.lanes;E&=f.pendingLanes,N|=E,p.lanes=N,ib(f,N)}}var _g={readContext:Oa,useCallback:jn,useContext:jn,useEffect:jn,useImperativeHandle:jn,useInsertionEffect:jn,useLayoutEffect:jn,useMemo:jn,useReducer:jn,useRef:jn,useState:jn,useDebugValue:jn,useDeferredValue:jn,useTransition:jn,useMutableSource:jn,useSyncExternalStore:jn,useId:jn,unstable_isNewReconciler:!1},zX={readContext:Oa,useCallback:function(f,p){return Ii().memoizedState=[f,p===void 0?null:p],f},useContext:Oa,useEffect:bO,useImperativeHandle:function(f,p,N){return N=N!=null?N.concat([f]):null,jg(4194308,4,NO.bind(null,p,f),N)},useLayoutEffect:function(f,p){return jg(4194308,4,f,p)},useInsertionEffect:function(f,p){return jg(4,2,f,p)},useMemo:function(f,p){var N=Ii();return p=p===void 0?null:p,f=f(),N.memoizedState=[f,p],f},useReducer:function(f,p,N){var E=Ii();return p=N!==void 0?N(p):p,E.memoizedState=E.baseState=p,f={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:f,lastRenderedState:p},E.queue=f,f=f.dispatch=UX.bind(null,vr,f),[E.memoizedState,f]},useRef:function(f){var p=Ii();return f={current:f},p.memoizedState=f},useState:vO,useDebugValue:nw,useDeferredValue:function(f){return Ii().memoizedState=f},useTransition:function(){var f=vO(!1),p=f[0];return f=BX.bind(null,f[1]),Ii().memoizedState=f,[p,f]},useMutableSource:function(){},useSyncExternalStore:function(f,p,N){var E=vr,R=Ii();if(mr){if(N===void 0)throw Error(r(407));N=N()}else{if(N=p(),en===null)throw Error(r(349));(jl&30)!==0||hO(E,p,N)}R.memoizedState=N;var $={value:N,getSnapshot:p};return R.queue=$,bO(pO.bind(null,E,$,f),[f]),E.flags|=2048,zf(9,mO.bind(null,E,$,N,p),void 0,null),N},useId:function(){var f=Ii(),p=en.identifierPrefix;if(mr){var N=ps,E=ms;N=(E&~(1<<32-ii(E)-1)).toString(32)+N,p=":"+p+"R"+N,N=Uf++,0<N&&(p+="H"+N.toString(32)),p+=":"}else N=FX++,p=":"+p+"r"+N.toString(32)+":";return f.memoizedState=p},unstable_isNewReconciler:!1},VX={readContext:Oa,useCallback:SO,useContext:Oa,useEffect:rw,useImperativeHandle:_O,useInsertionEffect:wO,useLayoutEffect:jO,useMemo:AO,useReducer:ew,useRef:xO,useState:function(){return ew(qf)},useDebugValue:nw,useDeferredValue:function(f){var p=Ma();return kO(p,qr.memoizedState,f)},useTransition:function(){var f=ew(qf)[0],p=Ma().memoizedState;return[f,p]},useMutableSource:dO,useSyncExternalStore:fO,useId:EO,unstable_isNewReconciler:!1},HX={readContext:Oa,useCallback:SO,useContext:Oa,useEffect:rw,useImperativeHandle:_O,useInsertionEffect:wO,useLayoutEffect:jO,useMemo:AO,useReducer:tw,useRef
vendor: 2,077 bytes, line 38
38:xO,useState:function(){return tw(qf)},useDebugValue:nw,useDeferredValue:function(f){var p=Ma();return qr===null?p.memoizedState=f:kO(p,qr.memoizedState,f)},useTransition:function(){var f=tw(qf)[0],p=Ma().memoizedState;return[f,p]},useMutableSource:dO,useSyncExternalStore:fO,useId:EO,unstable_isNewReconciler:!1};function li(f,p){if(f&&f.defaultProps){p=z({},p),f=f.defaultProps;for(var N in f)p[N]===void 0&&(p[N]=f[N]);return p}return p}function aw(f,p,N,E){p=f.memoizedState,N=N(E,p),N=N==null?p:z({},p,N),f.memoizedState=N,f.lanes===0&&(f.updateQueue.baseState=N)}var Sg={isMounted:function(f){return(f=f._reactInternals)?Rr(f)===f:!1},enqueueSetState:function(f,p,N){f=f._reactInternals;var E=In(),R=yo(f),$=ys(E,R);$.payload=p,N!=null&&($.callback=N),p=ho(f,$,R),p!==null&&(di(p,f,R,E),yg(p,f,R))},enqueueReplaceState:function(f,p,N){f=f._reactInternals;var E=In(),R=yo(f),$=ys(E,R);$.tag=1,$.payload=p,N!=null&&($.callback=N),p=ho(f,$,R),p!==null&&(di(p,f,R,E),yg(p,f,R))},enqueueForceUpdate:function(f,p){f=f._reactInternals;var N=In(),E=yo(f),R=ys(N,E);R.tag=2,p!=null&&(R.callback=p),p=ho(f,R,E),p!==null&&(di(p,f,E,N),yg(p,f,E))}};function OO(f,p,N,E,R,$,K){return f=f.stateNode,typeof f.shouldComponentUpdate=="function"?f.shouldComponentUpdate(E,$,K):p.prototype&&p.prototype.isPureReactComponent?!Tf(N,E)||!Tf(R,$):!0}function MO(f,p,N){var E=!1,R=co,$=p.contextType;return typeof $=="object"&&$!==null?$=Oa($):(R=Qn(p)?yl:wn.current,E=p.contextTypes,$=(E=E!=null)?Zc(f,R):co),p=new p(N,$),f.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=Sg,f.stateNode=p,p._reactInternals=f,E&&(f=f.stateNode,f.__reactInternalMemoizedUnmaskedChildContext=R,f.__reactInternalMemoizedMaskedChildContext=$),p}function RO(f,p,N,E){f=p.state,typeof p.componentWillReceiveProps=="function"&&p.componentWillReceiveProps(N,E),typeof p.UNSAFE_componentWillReceiveProps=="function"&&p.UNSAFE_componentWillReceiveProps(N,E),p.state!==f&&Sg.enqueueReplaceState(p,p.state,null)}function iw(f,p,N,E){var R=f.stateNode;R.props=N,R.state=f.memoizedState,R.refs={},Hb(f);
vendor: 3,909 bytes, lines 38-40
38var $=p.contextType;typeof $=="object"&&$!==null?R.context=Oa($):($=Qn(p)?yl:wn.current,R.context=Zc(f,$)),R.state=f.memoizedState,$=p.getDerivedStateFromProps,typeof $=="function"&&(aw(f,p,$,N),R.state=f.memoizedState),typeof p.getDerivedStateFromProps=="function"||typeof R.getSnapshotBeforeUpdate=="function"||typeof R.UNSAFE_componentWillMount!="function"&&typeof R.componentWillMount!="function"||(p=R.state,typeof R.componentWillMount=="function"&&R.componentWillMount(),typeof R.UNSAFE_componentWillMount=="function"&&R.UNSAFE_componentWillMount(),p!==R.state&&Sg.enqueueReplaceState(R,R.state,null),vg(f,N,R,E),R.state=f.memoizedState),typeof R.componentDidMount=="function"&&(f.flags|=4194308)}function su(f,p){try{var N="",E=p;do N+=ee(E),E=E.return;while(E);var R=N}catch($){R=` 39Error generating stack: `+$.message+` 40`+$.stack}return{value:f,source:p,stack:R,digest:null}}function sw(f,p,N){return{value:f,source:null,stack:N??null,digest:p??null}}function ow(f,p){try{console.error(p.value)}catch(N){setTimeout(function(){throw N})}}var WX=typeof WeakMap=="function"?WeakMap:Map;function DO(f,p,N){N=ys(-1,N),N.tag=3,N.payload={element:null};var E=p.value;return N.callback=function(){Og||(Og=!0,jw=E),ow(f,p)},N}function IO(f,p,N){N=ys(-1,N),N.tag=3;var E=f.type.getDerivedStateFromError;if(typeof E=="function"){var R=p.value;N.payload=function(){return E(R)},N.callback=function(){ow(f,p)}}var $=f.stateNode;return $!==null&&typeof $.componentDidCatch=="function"&&(N.callback=function(){ow(f,p),typeof E!="function"&&(po===null?po=new Set([this]):po.add(this));var K=p.stack;this.componentDidCatch(p.value,{componentStack:K!==null?K:""})}),N}function LO(f,p,N){var E=f.pingCache;if(E===null){E=f.pingCache=new WX;var R=new Set;E.set(p,R)}else R=E.get(p),R===void 0&&(R=new Set,E.set(p,R));R.has(N)||(R.add(N),f=sQ.bind(null,f,p,N),p.then(f,f))}function $O(f){do{var p;if((p=f.tag===13)&&(p=f.memoizedState,p=p!==null?p.dehydrated!==null:!0),p)return f;f=f.return}while(f!==null);return null}function FO(f,p,N,E,R){return(f.mode&1)===0?(f===p?f.flags|=65536:(f.flags|=128,N.flags|=131072,N.flags&=-52805,N.tag===1&&(N.alternate===null?N.tag=17:(p=ys(-1,1),p.tag=2,ho(N,p,1))),N.lanes|=1),f):(f.flags|=65536,f.lanes=R,f)}var GX=j.ReactCurrentOwner,Zn=!1;function Dn(f,p,N,E){p.child=f===null?iO(p,null,N,E):ru(p,f.child,N,E)}function BO(f,p,N,E,R){N=N.render;var $=p.ref;return au(p,R),E=Zb(f,p,N,E,$,R),N=Jb(),f!==null&&!Zn?(p.updateQueue=f.updateQueue,p.flags&=-2053,f.lanes&=~R,vs(f,p,R)):(mr&&N&&Db(p),p.flags|=1,Dn(f,p,E,R),p.child)}function UO(f,p,N,E,R){if(f===null){var $=N.type;return typeof $=="function"&&!Tw($)&&$.defaultProps===void 0&&N.compare===null&&N.defaultProps===void 0?(p.tag=15,p.type=$,qO(f,p,$,E,R)):(f=$g(N.type,null,E,p,p.mode,R),f.ref=p.ref,f.return=p,p.child=f)}if($=f.child,(f.lanes&R)===0){var K=$.memoizedProps;if(N=N.compare,N=N!==null?N:Tf,N(K,E)&&f.ref===p.ref)return vs(f,p,R)}return p.flags|=1,f=xo($,E),f.ref=p.ref,f.return=p,p.child=f}function qO(f,p,N,E,R){if(f!==null){var $=f.memoizedProps;if(Tf($,E)&&f.ref===p.ref)if(Zn=!1,p.pendingProps=E=$,(f.lanes&R)!==0)(f.flags&131072)!==0&&(Zn=!0);else return p.lanes=f.lanes,vs(f,p,R)}return lw(f,p,N,E,R)}function zO(f,p,N){var E=p.pendingProps,R=E.children,$=f!==null?f.memoizedState:null;if(E.mode==="hidden")if((p.mode&1)===0)p.memoizedState={baseLanes:0,cachePool:null,transitions:null},nr(lu,ha),ha|=N;else{if((N&1073741824)===0)return f=$!==null?$.baseLanes|N:N,p.lanes=p.childLanes=1073741824,p.memoizedState={baseLanes:f,cachePool:null,transitions:null},p.updateQueue=null,nr(lu,ha),ha|=f,null;p.memoizedState={baseLanes:0,cachePool:null,transitions:null},E=$!==null?$.baseLanes:N,nr(lu,ha),ha|=E}else $!==null?(E=$.baseLanes|N,p.memoizedState=null):E=N,nr(lu,ha),ha|=E;return Dn(f,p,R,N),p.child}function VO(f,p){var N=p.ref;(f===null&&N!==null||f!==null&&f.ref!==N)&&(p.flags|=512,p.flags|=2097152)}
vendor: 13,879 bytes, line 40
40function lw(f,p,N,E,R){var $=Qn(N)?yl:wn.current;return $=Zc(p,$),au(p,R),N=Zb(f,p,N,E,$,R),E=Jb(),f!==null&&!Zn?(p.updateQueue=f.updateQueue,p.flags&=-2053,f.lanes&=~R,vs(f,p,R)):(mr&&E&&Db(p),p.flags|=1,Dn(f,p,N,R),p.child)}function HO(f,p,N,E,R){if(Qn(N)){var $=!0;cg(p)}else $=!1;if(au(p,R),p.stateNode===null)kg(f,p),MO(p,N,E),iw(p,N,E,R),E=!0;else if(f===null){var K=p.stateNode,re=p.memoizedProps;K.props=re;var le=K.context,we=N.contextType;typeof we=="object"&&we!==null?we=Oa(we):(we=Qn(N)?yl:wn.current,we=Zc(p,we));var De=N.getDerivedStateFromProps,$e=typeof De=="function"||typeof K.getSnapshotBeforeUpdate=="function";$e||typeof K.UNSAFE_componentWillReceiveProps!="function"&&typeof K.componentWillReceiveProps!="function"||(re!==E||le!==we)&&RO(p,K,E,we),fo=!1;var Re=p.memoizedState;K.state=Re,vg(p,E,K,R),le=p.memoizedState,re!==E||Re!==le||Xn.current||fo?(typeof De=="function"&&(aw(p,N,De,E),le=p.memoizedState),(re=fo||OO(p,N,re,E,Re,le,we))?($e||typeof K.UNSAFE_componentWillMount!="function"&&typeof K.componentWillMount!="function"||(typeof K.componentWillMount=="function"&&K.componentWillMount(),typeof K.UNSAFE_componentWillMount=="function"&&K.UNSAFE_componentWillMount()),typeof K.componentDidMount=="function"&&(p.flags|=4194308)):(typeof K.componentDidMount=="function"&&(p.flags|=4194308),p.memoizedProps=E,p.memoizedState=le),K.props=E,K.state=le,K.context=we,E=re):(typeof K.componentDidMount=="function"&&(p.flags|=4194308),E=!1)}else{K=p.stateNode,oO(f,p),re=p.memoizedProps,we=p.type===p.elementType?re:li(p.type,re),K.props=we,$e=p.pendingProps,Re=K.context,le=N.contextType,typeof le=="object"&&le!==null?le=Oa(le):(le=Qn(N)?yl:wn.current,le=Zc(p,le));var Xe=N.getDerivedStateFromProps;(De=typeof Xe=="function"||typeof K.getSnapshotBeforeUpdate=="function")||typeof K.UNSAFE_componentWillReceiveProps!="function"&&typeof K.componentWillReceiveProps!="function"||(re!==$e||Re!==le)&&RO(p,K,E,le),fo=!1,Re=p.memoizedState,K.state=Re,vg(p,E,K,R);var tt=p.memoizedState;re!==$e||Re!==tt||Xn.current||fo?(typeof Xe=="function"&&(aw(p,N,Xe,E),tt=p.memoizedState),(we=fo||OO(p,N,we,E,Re,tt,le)||!1)?(De||typeof K.UNSAFE_componentWillUpdate!="function"&&typeof K.componentWillUpdate!="function"||(typeof K.componentWillUpdate=="function"&&K.componentWillUpdate(E,tt,le),typeof K.UNSAFE_componentWillUpdate=="function"&&K.UNSAFE_componentWillUpdate(E,tt,le)),typeof K.componentDidUpdate=="function"&&(p.flags|=4),typeof K.getSnapshotBeforeUpdate=="function"&&(p.flags|=1024)):(typeof K.componentDidUpdate!="function"||re===f.memoizedProps&&Re===f.memoizedState||(p.flags|=4),typeof K.getSnapshotBeforeUpdate!="function"||re===f.memoizedProps&&Re===f.memoizedState||(p.flags|=1024),p.memoizedProps=E,p.memoizedState=tt),K.props=E,K.state=tt,K.context=le,E=we):(typeof K.componentDidUpdate!="function"||re===f.memoizedProps&&Re===f.memoizedState||(p.flags|=4),typeof K.getSnapshotBeforeUpdate!="function"||re===f.memoizedProps&&Re===f.memoizedState||(p.flags|=1024),E=!1)}return cw(f,p,N,E,$,R)}function cw(f,p,N,E,R,$){VO(f,p);var K=(p.flags&128)!==0;if(!E&&!K)return R&&XC(p,N,!1),vs(f,p,$);E=p.stateNode,GX.current=p;var re=K&&typeof N.getDerivedStateFromError!="function"?null:E.render();return p.flags|=1,f!==null&&K?(p.child=ru(p,f.child,null,$),p.child=ru(p,null,re,$)):Dn(f,p,re,$),p.memoizedState=E.state,R&&XC(p,N,!0),p.child}function WO(f){var p=f.stateNode;p.pendingContext?KC(f,p.pendingContext,p.pendingContext!==p.context):p.context&&KC(f,p.context,!1),Wb(f,p.containerInfo)}function GO(f,p,N,E,R){return tu(),Fb(R),p.flags|=256,Dn(f,p,N,E),p.child}var uw={dehydrated:null,treeContext:null,retryLane:0};function dw(f){return{baseLanes:f,cachePool:null,transitions:null}}function KO(f,p,N){var E=p.pendingProps,R=yr.current,$=!1,K=(p.flags&128)!==0,re;if((re=K)||(re=f!==null&&f.memoizedState===null?!1:(R&2)!==0),re?($=!0,p.flags&=-129):(f===null||f.memoizedState!==null)&&(R|=1),nr(yr,R&1),f===null)return $b(p),f=p.memoizedState,f!==null&&(f=f.dehydrated,f!==null)?((p.mode&1)===0?p.lanes=1:f.data==="$!"?p.lanes=8:p.lanes=1073741824,null):(K=E.children,f=E.fallback,$?(E=p.mode,$=p.child,K={mode:"hidden",children:K},(E&1)===0&&$!==null?($.childLanes=0,$.pendingProps=K):$=Fg(K,E,0,null),f=kl(f,E,N,null),$.return=p,f.return=p,$.sibling=f,p.child=$,p.child.memoizedState=dw(N),p.memoizedState=uw,f):fw(p,K));if(R=f.memoizedState,R!==null&&(re=R.dehydrated,re!==null))return KX(f,p,K,E,re,R,N);if($){$=E.fallback,K=p.mode,R=f.child,re=R.sibling;var le={mode:"hidden",children:E.children};return(K&1)===0&&p.child!==R?(E=p.child,E.childLanes=0,E.pendingProps=le,p.deletions=null):(E=xo(R,le),E.subtreeFlags=R.subtreeFlags&14680064),re!==null?$=xo(re,$):($=kl($,K,N,null),$.flags|=2),$.return=p,E.return=p,E.sibling=$,p.child=E,E=$,$=p.child,K=f.child.memoizedState,K=K===null?dw(N):{baseLanes:K.baseLanes|N,cachePool:null,transitions:K.transitions},$.memoizedState=K,$.childLanes=f.childLanes&~N,p.memoizedState=uw,E}return $=f.child,f=$.sibling,E=xo($,{mode:"visible",children:E.children}),(p.mode&1)===0&&(E.lanes=N),E.return=p,E.sibling=null,f!==null&&(N=p.deletions,N===null?(p.deletions=[f],p.flags|=16):N.push(f)),p.child=E,p.memoizedState=null,E}function fw(f,p){return p=Fg({mode:"visible",children:p},f.mode,0,null),p.return=f,f.child=p}function Ag(f,p,N,E){return E!==null&&Fb(E),ru(p,f.child,null,N),f=fw(p,p.pendingProps.children),f.flags|=2,p.memoizedState=null,f}function KX(f,p,N,E,R,$,K){if(N)return p.flags&256?(p.flags&=-257,E=sw(Error(r(422))),Ag(f,p,K,E)):p.memoizedState!==null?(p.child=f.child,p.flags|=128,null):($=E.fallback,R=p.mode,E=Fg({mode:"visible",children:E.children},R,0,null),$=kl($,R,K,null),$.flags|=2,E.return=p,$.return=p,E.sibling=$,p.child=E,(p.mode&1)!==0&&ru(p,f.child,null,K),p.child.memoizedState=dw(K),p.memoizedState=uw,$);if((p.mode&1)===0)return Ag(f,p,K,null);if(R.data==="$!"){if(E=R.nextSibling&&R.nextSibling.dataset,E)var re=E.dgst;return E=re,$=Error(r(419)),E=sw($,E,void 0),Ag(f,p,K,E)}if(re=(K&f.childLanes)!==0,Zn||re){if(E=en,E!==null){switch(K&-K){case 4:R=2;break;case 16:R=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:R=32;break;case 536870912:R=268435456;break;default:R=0}R=(R&(E.suspendedLanes|K))!==0?0:R,R!==0&&R!==$.retryLane&&($.retryLane=R,gs(f,R),di(E,f,R,-1))}return Ew(),E=sw(Error(r(421))),Ag(f,p,K,E)}return R.data==="$?"?(p.flags|=128,p.child=f.child,p=oQ.bind(null,f),R._reactRetry=p,null):(f=$.treeContext,fa=oo(R.nextSibling),da=p,mr=!0,oi=null,f!==null&&(Pa[Ca++]=ms,Pa[Ca++]=ps,Pa[Ca++]=vl,ms=f.id,ps=f.overflow,vl=p),p=fw(p,E.children),p.flags|=4096,p)}function YO(f,p,N){f.lanes|=p;var E=f.alternate;E!==null&&(E.lanes|=p),zb(f.return,p,N)}function hw(f,p,N,E,R){var $=f.memoizedState;$===null?f.memoizedState={isBackwards:p,rendering:null,renderingStartTime:0,last:E,tail:N,tailMode:R}:($.isBackwards=p,$.rendering=null,$.renderingStartTime=0,$.last=E,$.tail=N,$.tailMode=R)}function XO(f,p,N){var E=p.pendingProps,R=E.revealOrder,$=E.tail;if(Dn(f,p,E.children,N),E=yr.current,(E&2)!==0)E=E&1|2,p.flags|=128;else{if(f!==null&&(f.flags&128)!==0)e:for(f=p.child;f!==null;){if(f.tag===13)f.memoizedState!==null&&YO(f,N,p);else if(f.tag===19)YO(f,N,p);else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===p)break e;for(;f.sibling===null;){if(f.return===null||f.return===p)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}E&=1}if(nr(yr,E),(p.mode&1)===0)p.memoizedState=null;else switch(R){case"forwards":for(N=p.child,R=null;N!==null;)f=N.alternate,f!==null&&xg(f)===null&&(R=N),N=N.sibling;N=R,N===null?(R=p.child,p.child=null):(R=N.sibling,N.sibling=null),hw(p,!1,R,N,$);break;case"backwards":for(N=null,R=p.child,p.child=null;R!==null;){if(f=R.alternate,f!==null&&xg(f)===null){p.child=R;break}f=R.sibling,R.sibling=N,N=R,R=f}hw(p,!0,N,null,$);break;case"together":hw(p,!1,null,null,void 0);break;default:p.memoizedState=null}return p.child}function kg(f,p){(p.mode&1)===0&&f!==null&&(f.alternate=null,p.alternate=null,p.flags|=2)}function vs(f,p,N){if(f!==null&&(p.dependencies=f.dependencies),Nl|=p.lanes,(N&p.childLanes)===0)return null;if(f!==null&&p.child!==f.child)throw Error(r(153));if(p.child!==null){for(f=p.child,N=xo(f,f.pendingProps),p.child=N,N.return=p;f.sibling!==null;)f=f.sibling,N=N.sibling=xo(f,f.pendingProps),N.return=p;N.sibling=null}return p.child}function YX(f,p,N){switch(p.tag){case 3:WO(p),tu();break;case 5:uO(p);break;case 1:Qn(p.type)&&cg(p);break;case 4:Wb(p,p.stateNode.containerInfo);break;case 10:var E=p.type._context,R=p.memoizedProps.value;nr(pg,E._currentValue),E._currentValue=R;break;case 13:if(E=p.memoizedState,E!==null)return E.dehydrated!==null?(nr(yr,yr.current&1),p.flags|=128,null):(N&p.child.childLanes)!==0?KO(f,p,N):(nr(yr,yr.current&1),f=vs(f,p,N),f!==null?f.sibling:null);nr(yr,yr.current&1);break;case 19:if(E=(N&p.childLanes)!==0,(f.flags&128)!==0){if(E)return XO(f,p,N);p.flags|=128}if(R=p.memoizedState,R!==null&&(R.rendering=null,R.tail=null,R.lastEffect=null),nr(yr,yr.current),E)break;return null;case 22:case 23:return p.lanes=0,zO(f,p,N)}return vs(f,p,N)}var QO,mw,ZO,JO;QO=function(f,p){for(var N=p.child;N!==null;){if(N.tag===5||N.tag===6)f.appendChild(N.stateNode);else if(N.tag!==4&&N.child!==null){N.child.return=N,N=N.child;continue}if(N===p)break;for(;N.sibling===null;){if(N.return===null||N.return===p)return;N=N.return}N.sibling.return=N.return,N=N.sibling}},mw=function(){},ZO=function(f,p,N,E){var R=f.memoizedProps;if(R!==E){f=p.stateNode,wl(Di.current);var $=null;switch(N){case"input":R=_e(f,R),E=_e(f,E),$=[];break;case"select":R=z({},R,{value:void 0}),E=z({},E,{value:void 0}),$=[];break;case"textarea":R=he(f,R),E=he(f,E),$=[];break;default:typeof R.onClick!="function"&&typeof E.onClick=="function"&&(f.onclick=sg)}fr(N,E);var K;N=null;for(we in R)if(!E.hasOwnProperty(we)&&R.hasOwnProperty(we)&&R[we]!=null)if(we==="style"){var re=R[we];for(K in re)re.hasOwnProperty(K)&&(N||(N={}),N[K]="")}else we!=="dangerouslySetInnerHTML"&&we!=="children"&&we!=="suppressContentEditableWarning"&&we!=="suppressHydrationWarning"&&we!=="autoFocus"&&(i.hasOwnProperty(we)?$||($=[]):($=$||[]).push(we,null));for(we in E){var le=E[we];if(re=R!=null?R[we]:void 0,E.hasOwnProperty(we)&&le!==re&&(le!=null||re!=null))if(we==="style")if(re){for(K in re)!re.hasOwnProperty(K)||le&&le.hasOwnProperty(K)||(N||(N={}),N[K]="");for(K in le)le.hasOwnProperty(K)&&re[K]!==le[K]&&(N||(N={}),N[K]=le[K])}else N||($||($=[]),$.push(we,N)),N=le;else we==="dangerouslySetInnerHTML"?(le=le?le.__html:void 0,re=re?re.__html:void 0,le!=null&&re!==le&&($=$||[]).push(we,le)):we==="children"?typeof le!="string"&&typeof le!="number"||($=$||[]).push(we,""+le):we!=="suppressContentEditableWarning"&&we!=="suppressHydrationWarning"&&(i.hasOwnProperty(we)?(le!=null&&we==="onScroll"&&lr("scroll",f),$||re===le||($=[])):($=$||[]).push(we,le))}N&&($=$||[]).push("style",N);var we=$;(p.updateQueue=we)&&(p.flags|=4)}},JO=function(f,p,N,E){N!==E&&(p.flags|=4)};function Vf(f,p){if(!mr)switch(f.tailMode){case"hidden":p=f.tail;for(var N=null;p!==null;)p.alternate!==null&&(N=p),p=p.sibling;N===null?f.tail=null:N.sibling=null;break;case"collapsed":N=f.tail;for(var E=null;N!==null;)N.alternate!==null&&(E=N),N=N.sibling;E===null?p||f.tail===null?f.tail=null:f.tail.sibling=null:E.sibling=null}}function Nn(f){var p=f.alternate!==null&&f.alternate.child===f.child,N=0,E=0;if(p)for(var R=f.child;R!==null;)N|=R.lanes|R.childLanes,E|=R.subtreeFlags&14680064,E|=R.flags&14680064,R.return=f,R=R.sibling;else for(R=f.child;R!==null;)N|=R.lanes|R.childLanes,E|=R.subtreeFlags,E|=R.flags,R.return=f,R=R.sibling;return f.subtreeFlags|=E,f.childLanes=N,p}function XX(f,p,N){var E=p.pendingProps;switch(Ib(p),p.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Nn(p),null;case 1:return Qn(p.type)&&lg(),Nn(p),null;case 3:return E=p.stateNode,iu(),cr(Xn),cr(wn),Yb(),E.pendingContext&&(E.context=E.pendingContext,E.pendingContext=null),(f===null||f.child===null)&&(hg(p)?p.flags|=4:f===null||f.memoizedState.isDehydrated&&(p.flags&256)===0||(p.flags|=1024,oi!==null&&(Sw(oi),oi=null))),mw(f,p),Nn(p),null;case 5:Gb(p);var R=wl(Ff.current);if(N=p.type,f!==null&&p.stateNode!=null)ZO(f,p,N,E,R),f.ref!==p.ref&&(p.flags|=512,p.flags|=2097152);else{if(!E){if(p.stateNode===null)throw Error(r(166));return Nn(p),null}if(f=wl(Di.current),hg(p)){E=p.stateNode,N=p.type;var $=p.memoizedProps;switch(E[Ri]=p,E[Rf]=$,f=(p.mode&1)!==0,N){case"dialog":lr("cancel",E),lr("close",E);break;case"iframe":case"object":case"embed":lr("load",E);break;case"video":case"audio":for(R=0;R<Cf.length;R++)lr(Cf[R],E);break;case"source":lr("error",E);break;case"img":case"image":case"link":lr("error",E),lr("load",E);break;case"details":lr("toggle",E);break;case"input":xe(E,$),lr("invalid",E);break;case"select":E._wrapperState={wasMultiple:!!$.multiple},lr("invalid",E);break;case"textarea":He(E,$),lr("invalid",E)}fr(N,$),R=null;for(var K in $)if($.hasOwnProperty(K)){var re=$[K];K==="children"?typeof re=="string"?E.textContent!==re&&($.suppressHydrationWarning!==!0&&ig(E.textContent,re,f),R=["children",re]):typeof re=="number"&&E.textContent!==""+re&&($.suppressHydrationWarning!==!0&&ig(E.textContent,re,f),R=["children",""+re]):i.hasOwnProperty(K)&&re!=null&&K==="onScroll"&&lr("scroll",E)}switch(N){case"input":me(E),Z(E,$,!0);break;case"textarea":me(E),it(E);break;case"select":case"option":break;default:typeof $.onClick=="function"&&(E.onclick=sg)}E=R,p.updateQueue=E,E!==null&&(p.flags|=4)}else{K=R.nodeType===9?R:R.ownerDocument,f==="http://www.w3.org/1999/xhtml"&&(f=_t(N)),f==="http://www.w3.org/1999/xhtml"?N==="script"?(f=K.createElement("div"),f.innerHTML="<script><\/script>
40",f=f.removeChild(f.firstChild)):typeof E.is=="string"?f=K.createElement(N,{is:E.is}):(f=K.createElement(N),N==="select"&&(K=f,E.multiple?K.multiple=!0:E.size&&(K.size=E.size))):f=K.createElementNS(f,N),f[Ri]=p,f[Rf]=E,QO(f,p,!1,!1),p.stateNode=f;e:{switch(K=un(N,E),N){case"dialog":lr("cancel",f),lr("close",f),R=E;break;case"iframe":case"object":case"embed":lr("load",f),R=E;break;case"video":case"audio":for(R=0;R<Cf.length;R++)lr(Cf[R],f);R=E;break;case"source":lr("error",f),R=E;break;case"img":case"image":case"link":lr("error",f),lr("load",f),R=E;break;case"details":lr("toggle",f),R=E;break;case"input":xe(f,E),R=_e(f,E),lr("invalid",f);break;case"option":R=E;break;case"select":f._wrapperState={wasMultiple:!!E.multiple},R=z({},E,{value:void 0}),lr("invalid",f);break;case"textarea":He(f,E),R=he(f,E),lr("invalid",f);break;default:R=E}fr(N,R),re=R;for($ in re)if(re.hasOwnProperty($)){var le=re[$];$==="style"?jt(f,le):$==="dangerouslySetInnerHTML"?(le=le?le.__html:void 0,le!=null&&Yn(f,le)):$==="children"?typeof le=="string"?(N!=="textarea"||le!=="")&&Dt(f,le):typeof le=="number"&&Dt(f,""+le):$!=="suppressContentEditableWarning"&&$!=="suppressHydrationWarning"&&$!=="autoFocus"&&(i.hasOwnProperty($)?le!=null&&$==="onScroll"&&lr("scroll",f):le!=null&&_(f,$,le,K))}switch(N){case"input":me(f),Z(f,E,!1);break;case"textarea":me(f),it(f);break;case"option":E.value!=null&&f.setAttribute("value",""+ne(E.value));break;case"select":f.multiple=!!E.multiple,$=E.value,$!=null?ye(f,!!E.multiple,$,!1):E.defaultValue!=null&&ye(f,!!E.multiple,E.defaultValue,!0);break;default:typeof R.onClick=="function"&&(f.onclick=sg)}switch(N){case"button":case"input":case"select":case"textarea":E=!!E.autoFocus;break e;case"img":E=!0;break e;default:E=!1}}E&&(p.flags|=4)}p.ref!==null&&(p.flags|=512,p.flags|=2097152)}return Nn(p),null;case 6:if(f&&p.stateNode!=null)JO(f,p,f.memoizedProps,E);else{if(typeof E!="string"&&p.stateNode===null)throw Error(r(166));if(N=wl(Ff.current),wl(Di.current),hg(p)){if(E=p.stateNode,N=p.memoizedProps,E[Ri]=p,($=E.nodeValue!==N)&&(f=da,f!==null))switch(f.tag){case 3:ig(E.nodeValue,N,(f.mode&1)!==0);break;case 5:f.memoizedProps.suppressHydrationWarning!==!0&&ig(E.nodeValue,N,(f.mode&1)!==0)}$&&(p.flags|=4)}else E=(N.nodeType===9?N:N.ownerDocument).createTextNode(E),E[Ri]=p,p.stateNode=E}return Nn(p),null;case 13:if(cr(yr),E=p.memoizedState,f===null||f.memoizedState!==null&&f.memoizedState.dehydrated!==null){if(mr&&fa!==null&&(p.mode&1)!==0&&(p.flags&128)===0)rO(),tu(),p.flags|=98560,$=!1;else if($=hg(p),E!==null&&E.dehydrated!==null){if(f===null){if(!$)throw Error(r(318));if($=p.memoizedState,$=$!==null?$.dehydrated:null,!$)throw Error(r(317));$[Ri]=p}else tu(),(p.flags&128)===0&&(p.memoizedState=null),p.flags|=4;Nn(p),$=!1}else oi!==null&&(Sw(oi),oi=null),$=!0;if(!$)return p.flags&65536?p:null}return(p.flags&128)!==0?(p.lanes=N,p):(E=E!==null,E!==(f!==null&&f.memoizedState!==null)&&E&&(p.child.flags|=8192,(p.mode&1)!==0&&(f===null||(yr.current&1)!==0?zr===0&&(zr=3):Ew())),p.updateQueue!==null&&(p.flags|=4),Nn(p),null);case 4:return iu(),mw(f,p),f===null&&Of(p.stateNode.containerInfo),Nn(p),null;case 10:return qb(p.type._context),Nn(p),null;case 17:return Qn(p.type)&&lg(),Nn(p),null;case 19:if(cr(yr),$=p.memoizedState,$===null)return Nn(p),null;if(E=(p.flags&128)!==0,K=$.rendering,K===null)if(E)Vf($,!1);else{if(zr!==0||f!==null&&(f.flags&128)!==0)for(f=p.child;f!==null;){if(K=xg(f),K!==null){for(p.flags|=128,Vf($,!1),E=K.updateQueue,E!==null&&(p.updateQueue=E,p.flags|=4),p.subtreeFlags=0,E=N,N=p.child;N!==null;)$=N,f=E,$.flags&=14680066,K=$.alternate,K===null?($.childLanes=0,$.lanes=f,$.child=null,$.subtreeFlags=0,$.memoizedProps=null,$.memoizedState=null,$.updateQueue=null,$.dependencies=null,$.stateNode=null):($.childLanes=K.childLanes,$.lanes=K.lanes,$.child=K.child,$.subtreeFlags=0,$.deletions=null,$.memoizedProps=K.memoizedProps,$.memoizedState=K.memoizedState,$.updateQueue=K.updateQueue,$.type=K.type,f=K.dependencies,$.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext}),N=N.sibling;return nr(yr,yr.current&1|2),p.child}f=f.sibling}$.tail!==null&&Er()>cu&&(p.flags|=128,E=!0,Vf($,!1),p.lanes=4194304)}else{if(!E)if(f=xg(K),f!==null){if(p.flags|=128,E=!0,N=f.updateQueue,N!==null&&(p.updateQueue=N,p.flags|=4),Vf($,!0),$.tail===null&&$.tailMode==="hidden"&&!K.alternate&&!mr)return Nn(p),null}else 2*Er()-$.renderingStartTime>cu&&N!==1073741824&&(p.flags|=128,E=!0,Vf($,!1),p.lanes=4194304);$.isBackwards?(K.sibling=p.child,p.child=K):(N=$.last,N!==null?N.sibling=K:p.child=K,$.last=K)}return $.tail!==null?(p=$.tail,$.rendering=p,$.tail=p.sibling,$.renderingStartTime=Er(),p.sibling=null,N=yr.current,nr(yr,E?N&1|2:N&1),p):(Nn(p),null);case 22:case 23:return kw(),E=p.memoizedState!==null,f!==null&&f.memoizedState!==null!==E&&(p.flags|=8192),E&&(p.mode&1)!==0?(ha&1073741824)!==0&&(Nn(p),p.subtreeFlags&6&&(p.flags|=8192)):Nn(p),null;case 24:return null;case 25:return null}throw Error(r(156,p.tag))}function QX(f,p){switch(Ib(p),p.tag){case 1:return Qn(p.type)&&lg(),f=p.flags,f&65536?(p.flags=f&-65537|128,p):null;case 3:return iu(),cr(Xn),cr(wn),Yb(),f=p.flags,(f&65536)!==0&&(f&128)===0?(p.flags=f&-65537|128,p):null;case 5:return Gb(p),null;case 13:if(cr(yr),f=p.memoizedState,f!==null&&f.dehydrated!==null){if(p.alternate===null)throw Error(r(340));tu()}return f=p.flags,f&65536?(p.flags=f&-65537|128,p):null;case 19:return cr(yr),null;case 4:return iu(),null;case 10:return qb(p.type._context),null;case 22:case 23:return kw(),null;case 24:return null;default:return null}}var Eg=!1,_n=!1,ZX=typeof WeakSet=="function"?WeakSet:Set,Ze=null;function ou(f,p){var N=f.ref;if(N!==null)if(typeof N=="function")try{N(null)}catch(E){br(f,p,E)}else N.current=null}function pw(f,p,N){try{N()}catch(E){br(f,p,E)}}var e4=!1;function JX(f,p){if(kb=Kp,f=OC(),xb(f)){if("selectionStart"in f)var N={start:f.selectionStart,end:f.selectionEnd};else e:{N=(N=f.ownerDocument)&&N.defaultView||window;
vendor: 20,891 bytes, line 40
40var E=N.getSelection&&N.getSelection();if(E&&E.rangeCount!==0){N=E.anchorNode;var R=E.anchorOffset,$=E.focusNode;E=E.focusOffset;try{N.nodeType,$.nodeType}catch{N=null;break e}var K=0,re=-1,le=-1,we=0,De=0,$e=f,Re=null;t:for(;;){for(var Xe;$e!==N||R!==0&&$e.nodeType!==3||(re=K+R),$e!==$||E!==0&&$e.nodeType!==3||(le=K+E),$e.nodeType===3&&(K+=$e.nodeValue.length),(Xe=$e.firstChild)!==null;)Re=$e,$e=Xe;for(;;){if($e===f)break t;if(Re===N&&++we===R&&(re=K),Re===$&&++De===E&&(le=K),(Xe=$e.nextSibling)!==null)break;$e=Re,Re=$e.parentNode}$e=Xe}N=re===-1||le===-1?null:{start:re,end:le}}else N=null}N=N||{start:0,end:0}}else N=null;for(Eb={focusedElem:f,selectionRange:N},Kp=!1,Ze=p;Ze!==null;)if(p=Ze,f=p.child,(p.subtreeFlags&1028)!==0&&f!==null)f.return=p,Ze=f;else for(;Ze!==null;){p=Ze;try{var tt=p.alternate;if((p.flags&1024)!==0)switch(p.tag){case 0:case 11:case 15:break;case 1:if(tt!==null){var at=tt.memoizedProps,Tr=tt.memoizedState,ge=p.stateNode,de=ge.getSnapshotBeforeUpdate(p.elementType===p.type?at:li(p.type,at),Tr);ge.__reactInternalSnapshotBeforeUpdate=de}break;case 3:var ve=p.stateNode.containerInfo;ve.nodeType===1?ve.textContent="":ve.nodeType===9&&ve.documentElement&&ve.removeChild(ve.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(Ue){br(p,p.return,Ue)}if(f=p.sibling,f!==null){f.return=p.return,Ze=f;break}Ze=p.return}return tt=e4,e4=!1,tt}function Hf(f,p,N){var E=p.updateQueue;if(E=E!==null?E.lastEffect:null,E!==null){var R=E=E.next;do{if((R.tag&f)===f){var $=R.destroy;R.destroy=void 0,$!==void 0&&pw(p,N,$)}R=R.next}while(R!==E)}}function Tg(f,p){if(p=p.updateQueue,p=p!==null?p.lastEffect:null,p!==null){var N=p=p.next;do{if((N.tag&f)===f){var E=N.create;N.destroy=E()}N=N.next}while(N!==p)}}function gw(f){var p=f.ref;if(p!==null){var N=f.stateNode;switch(f.tag){case 5:f=N;break;default:f=N}typeof p=="function"?p(f):p.current=f}}function t4(f){var p=f.alternate;p!==null&&(f.alternate=null,t4(p)),f.child=null,f.deletions=null,f.sibling=null,f.tag===5&&(p=f.stateNode,p!==null&&(delete p[Ri],delete p[Rf],delete p[Ob],delete p[DX],delete p[IX])),f.stateNode=null,f.return=null,f.dependencies=null,f.memoizedProps=null,f.memoizedState=null,f.pendingProps=null,f.stateNode=null,f.updateQueue=null}function r4(f){return f.tag===5||f.tag===3||f.tag===4}function n4(f){e:for(;;){for(;f.sibling===null;){if(f.return===null||r4(f.return))return null;f=f.return}for(f.sibling.return=f.return,f=f.sibling;f.tag!==5&&f.tag!==6&&f.tag!==18;){if(f.flags&2||f.child===null||f.tag===4)continue e;f.child.return=f,f=f.child}if(!(f.flags&2))return f.stateNode}}function yw(f,p,N){var E=f.tag;if(E===5||E===6)f=f.stateNode,p?N.nodeType===8?N.parentNode.insertBefore(f,p):N.insertBefore(f,p):(N.nodeType===8?(p=N.parentNode,p.insertBefore(f,N)):(p=N,p.appendChild(f)),N=N._reactRootContainer,N!=null||p.onclick!==null||(p.onclick=sg));else if(E!==4&&(f=f.child,f!==null))for(yw(f,p,N),f=f.sibling;f!==null;)yw(f,p,N),f=f.sibling}function vw(f,p,N){var E=f.tag;if(E===5||E===6)f=f.stateNode,p?N.insertBefore(f,p):N.appendChild(f);else if(E!==4&&(f=f.child,f!==null))for(vw(f,p,N),f=f.sibling;f!==null;)vw(f,p,N),f=f.sibling}var fn=null,ci=!1;function mo(f,p,N){for(N=N.child;N!==null;)a4(f,p,N),N=N.sibling}function a4(f,p,N){if(Mi&&typeof Mi.onCommitFiberUnmount=="function")try{Mi.onCommitFiberUnmount(qp,N)}catch{}switch(N.tag){case 5:_n||ou(N,p);case 6:var E=fn,R=ci;fn=null,mo(f,p,N),fn=E,ci=R,fn!==null&&(ci?(f=fn,N=N.stateNode,f.nodeType===8?f.parentNode.removeChild(N):f.removeChild(N)):fn.removeChild(N.stateNode));break;case 18:fn!==null&&(ci?(f=fn,N=N.stateNode,f.nodeType===8?Cb(f.parentNode,N):f.nodeType===1&&Cb(f,N),Nf(f)):Cb(fn,N.stateNode));break;case 4:E=fn,R=ci,fn=N.stateNode.containerInfo,ci=!0,mo(f,p,N),fn=E,ci=R;break;case 0:case 11:case 14:case 15:if(!_n&&(E=N.updateQueue,E!==null&&(E=E.lastEffect,E!==null))){R=E=E.next;do{var $=R,K=$.destroy;$=$.tag,K!==void 0&&(($&2)!==0||($&4)!==0)&&pw(N,p,K),R=R.next}while(R!==E)}mo(f,p,N);break;case 1:if(!_n&&(ou(N,p),E=N.stateNode,typeof E.componentWillUnmount=="function"))try{E.props=N.memoizedProps,E.state=N.memoizedState,E.componentWillUnmount()}catch(re){br(N,p,re)}mo(f,p,N);break;case 21:mo(f,p,N);break;case 22:N.mode&1?(_n=(E=_n)||N.memoizedState!==null,mo(f,p,N),_n=E):mo(f,p,N);break;default:mo(f,p,N)}}function i4(f){var p=f.updateQueue;if(p!==null){f.updateQueue=null;var N=f.stateNode;N===null&&(N=f.stateNode=new ZX),p.forEach(function(E){var R=lQ.bind(null,f,E);N.has(E)||(N.add(E),E.then(R,R))})}}function ui(f,p){var N=p.deletions;if(N!==null)for(var E=0;E<N.length;E++){var R=N[E];try{var $=f,K=p,re=K;e:for(;re!==null;){switch(re.tag){case 5:fn=re.stateNode,ci=!1;break e;case 3:fn=re.stateNode.containerInfo,ci=!0;break e;case 4:fn=re.stateNode.containerInfo,ci=!0;break e}re=re.return}if(fn===null)throw Error(r(160));a4($,K,R),fn=null,ci=!1;var le=R.alternate;le!==null&&(le.return=null),R.return=null}catch(we){br(R,p,we)}}if(p.subtreeFlags&12854)for(p=p.child;p!==null;)s4(p,f),p=p.sibling}function s4(f,p){var N=f.alternate,E=f.flags;switch(f.tag){case 0:case 11:case 14:case 15:if(ui(p,f),Li(f),E&4){try{Hf(3,f,f.return),Tg(3,f)}catch(at){br(f,f.return,at)}try{Hf(5,f,f.return)}catch(at){br(f,f.return,at)}}break;case 1:ui(p,f),Li(f),E&512&&N!==null&&ou(N,N.return);break;case 5:if(ui(p,f),Li(f),E&512&&N!==null&&ou(N,N.return),f.flags&32){var R=f.stateNode;try{Dt(R,"")}catch(at){br(f,f.return,at)}}if(E&4&&(R=f.stateNode,R!=null)){var $=f.memoizedProps,K=N!==null?N.memoizedProps:$,re=f.type,le=f.updateQueue;if(f.updateQueue=null,le!==null)try{re==="input"&&$.type==="radio"&&$.name!=null&&Ee(R,$),un(re,K);var we=un(re,$);for(K=0;K<le.length;K+=2){var De=le[K],$e=le[K+1];De==="style"?jt(R,$e):De==="dangerouslySetInnerHTML"?Yn(R,$e):De==="children"?Dt(R,$e):_(R,De,$e,we)}switch(re){case"input":Pe(R,$);break;case"textarea":Te(R,$);break;case"select":var Re=R._wrapperState.wasMultiple;R._wrapperState.wasMultiple=!!$.multiple;var Xe=$.value;Xe!=null?ye(R,!!$.multiple,Xe,!1):Re!==!!$.multiple&&($.defaultValue!=null?ye(R,!!$.multiple,$.defaultValue,!0):ye(R,!!$.multiple,$.multiple?[]:"",!1))}R[Rf]=$}catch(at){br(f,f.return,at)}}break;case 6:if(ui(p,f),Li(f),E&4){if(f.stateNode===null)throw Error(r(162));R=f.stateNode,$=f.memoizedProps;try{R.nodeValue=$}catch(at){br(f,f.return,at)}}break;case 3:if(ui(p,f),Li(f),E&4&&N!==null&&N.memoizedState.isDehydrated)try{Nf(p.containerInfo)}catch(at){br(f,f.return,at)}break;case 4:ui(p,f),Li(f);break;case 13:ui(p,f),Li(f),R=f.child,R.flags&8192&&($=R.memoizedState!==null,R.stateNode.isHidden=$,!$||R.alternate!==null&&R.alternate.memoizedState!==null||(ww=Er())),E&4&&i4(f);break;case 22:if(De=N!==null&&N.memoizedState!==null,f.mode&1?(_n=(we=_n)||De,ui(p,f),_n=we):ui(p,f),Li(f),E&8192){if(we=f.memoizedState!==null,(f.stateNode.isHidden=we)&&!De&&(f.mode&1)!==0)for(Ze=f,De=f.child;De!==null;){for($e=Ze=De;Ze!==null;){switch(Re=Ze,Xe=Re.child,Re.tag){case 0:case 11:case 14:case 15:Hf(4,Re,Re.return);break;case 1:ou(Re,Re.return);var tt=Re.stateNode;if(typeof tt.componentWillUnmount=="function"){E=Re,N=Re.return;try{p=E,tt.props=p.memoizedProps,tt.state=p.memoizedState,tt.componentWillUnmount()}catch(at){br(E,N,at)}}break;case 5:ou(Re,Re.return);break;case 22:if(Re.memoizedState!==null){c4($e);continue}}Xe!==null?(Xe.return=Re,Ze=Xe):c4($e)}De=De.sibling}e:for(De=null,$e=f;;){if($e.tag===5){if(De===null){De=$e;try{R=$e.stateNode,we?($=R.style,typeof $.setProperty=="function"?$.setProperty("display","none","important"):$.display="none"):(re=$e.stateNode,le=$e.memoizedProps.style,K=le!=null&&le.hasOwnProperty("display")?le.display:null,re.style.display=ze("display",K))}catch(at){br(f,f.return,at)}}}else if($e.tag===6){if(De===null)try{$e.stateNode.nodeValue=we?"":$e.memoizedProps}catch(at){br(f,f.return,at)}}else if(($e.tag!==22&&$e.tag!==23||$e.memoizedState===null||$e===f)&&$e.child!==null){$e.child.return=$e,$e=$e.child;continue}if($e===f)break e;for(;$e.sibling===null;){if($e.return===null||$e.return===f)break e;De===$e&&(De=null),$e=$e.return}De===$e&&(De=null),$e.sibling.return=$e.return,$e=$e.sibling}}break;case 19:ui(p,f),Li(f),E&4&&i4(f);break;case 21:break;default:ui(p,f),Li(f)}}function Li(f){var p=f.flags;if(p&2){try{e:{for(var N=f.return;N!==null;){if(r4(N)){var E=N;break e}N=N.return}throw Error(r(160))}switch(E.tag){case 5:var R=E.stateNode;E.flags&32&&(Dt(R,""),E.flags&=-33);var $=n4(f);vw(f,$,R);break;case 3:case 4:var K=E.stateNode.containerInfo,re=n4(f);yw(f,re,K);break;default:throw Error(r(161))}}catch(le){br(f,f.return,le)}f.flags&=-3}p&4096&&(f.flags&=-4097)}function eQ(f,p,N){Ze=f,o4(f)}function o4(f,p,N){for(var E=(f.mode&1)!==0;Ze!==null;){var R=Ze,$=R.child;if(R.tag===22&&E){var K=R.memoizedState!==null||Eg;if(!K){var re=R.alternate,le=re!==null&&re.memoizedState!==null||_n;re=Eg;var we=_n;if(Eg=K,(_n=le)&&!we)for(Ze=R;Ze!==null;)K=Ze,le=K.child,K.tag===22&&K.memoizedState!==null?u4(R):le!==null?(le.return=K,Ze=le):u4(R);for(;$!==null;)Ze=$,o4($),$=$.sibling;Ze=R,Eg=re,_n=we}l4(f)}else(R.subtreeFlags&8772)!==0&&$!==null?($.return=R,Ze=$):l4(f)}}function l4(f){for(;Ze!==null;){var p=Ze;if((p.flags&8772)!==0){var N=p.alternate;try{if((p.flags&8772)!==0)switch(p.tag){case 0:case 11:case 15:_n||Tg(5,p);break;case 1:var E=p.stateNode;if(p.flags&4&&!_n)if(N===null)E.componentDidMount();else{var R=p.elementType===p.type?N.memoizedProps:li(p.type,N.memoizedProps);E.componentDidUpdate(R,N.memoizedState,E.__reactInternalSnapshotBeforeUpdate)}var $=p.updateQueue;$!==null&&cO(p,$,E);break;case 3:var K=p.updateQueue;if(K!==null){if(N=null,p.child!==null)switch(p.child.tag){case 5:N=p.child.stateNode;break;case 1:N=p.child.stateNode}cO(p,K,N)}break;case 5:var re=p.stateNode;if(N===null&&p.flags&4){N=re;var le=p.memoizedProps;switch(p.type){case"button":case"input":case"select":case"textarea":le.autoFocus&&N.focus();break;case"img":le.src&&(N.src=le.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(p.memoizedState===null){var we=p.alternate;if(we!==null){var De=we.memoizedState;if(De!==null){var $e=De.dehydrated;$e!==null&&Nf($e)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}_n||p.flags&512&&gw(p)}catch(Re){br(p,p.return,Re)}}if(p===f){Ze=null;break}if(N=p.sibling,N!==null){N.return=p.return,Ze=N;break}Ze=p.return}}function c4(f){for(;Ze!==null;){var p=Ze;if(p===f){Ze=null;break}var N=p.sibling;if(N!==null){N.return=p.return,Ze=N;break}Ze=p.return}}function u4(f){for(;Ze!==null;){var p=Ze;try{switch(p.tag){case 0:case 11:case 15:var N=p.return;try{Tg(4,p)}catch(le){br(p,N,le)}break;case 1:var E=p.stateNode;if(typeof E.componentDidMount=="function"){var R=p.return;try{E.componentDidMount()}catch(le){br(p,R,le)}}var $=p.return;try{gw(p)}catch(le){br(p,$,le)}break;case 5:var K=p.return;try{gw(p)}catch(le){br(p,K,le)}}}catch(le){br(p,p.return,le)}if(p===f){Ze=null;break}var re=p.sibling;if(re!==null){re.return=p.return,Ze=re;break}Ze=p.return}}var tQ=Math.ceil,Pg=j.ReactCurrentDispatcher,xw=j.ReactCurrentOwner,Ra=j.ReactCurrentBatchConfig,It=0,en=null,Dr=null,hn=0,ha=0,lu=lo(0),zr=0,Wf=null,Nl=0,Cg=0,bw=0,Gf=null,Jn=null,ww=0,cu=1/0,xs=null,Og=!1,jw=null,po=null,Mg=!1,go=null,Rg=0,Kf=0,Nw=null,Dg=-1,Ig=0;function In(){return(It&6)!==0?Er():Dg!==-1?Dg:Dg=Er()}function yo(f){return(f.mode&1)===0?1:(It&2)!==0&&hn!==0?hn&-hn:$X.transition!==null?(Ig===0&&(Ig=nC()),Ig):(f=Qt,f!==0||(f=window.event,f=f===void 0?16:fC(f.type)),f)}function di(f,p,N,E){if(50<Kf)throw Kf=0,Nw=null,Error(r(185));vf(f,N,E),((It&2)===0||f!==en)&&(f===en&&((It&2)===0&&(Cg|=N),zr===4&&vo(f,hn)),ea(f,E),N===1&&It===0&&(p.mode&1)===0&&(cu=Er()+500,ug&&uo()))}function ea(f,p){var N=f.callbackNode;$Y(f,p);var E=Hp(f,f===en?hn:0);if(E===0)N!==null&&gf(N),f.callbackNode=null,f.callbackPriority=0;else if(p=E&-E,f.callbackPriority!==p){if(N!=null&&gf(N),p===1)f.tag===0?LX(f4.bind(null,f)):QC(f4.bind(null,f)),MX(function(){(It&6)===0&&uo()}),N=null;else{switch(aC(E)){case 1:N=rb;break;case 4:N=tC;break;case 16:N=Up;break;case 536870912:N=rC;break;default:N=Up}N=b4(N,d4.bind(null,f))}f.callbackPriority=p,f.callbackNode=N}}function d4(f,p){if(Dg=-1,Ig=0,(It&6)!==0)throw Error(r(327));var N=f.callbackNode;if(uu()&&f.callbackNode!==N)return null;var E=Hp(f,f===en?hn:0);if(E===0)return null;if((E&30)!==0||(E&f.expiredLanes)!==0||p)p=Lg(f,E);else{p=E;var R=It;It|=2;var $=m4();(en!==f||hn!==p)&&(xs=null,cu=Er()+500,Sl(f,p));do try{aQ();break}catch(re){h4(f,re)}while(!0);Ub(),Pg.current=$,It=R,Dr!==null?p=0:(en=null,hn=0,p=zr)}if(p!==0){if(p===2&&(R=nb(f),R!==0&&(E=R,p=_w(f,R))),p===1)throw N=Wf,Sl(f,0),vo(f,E),ea(f,Er()),N;if(p===6)vo(f,E);else{if(R=f.current.alternate,(E&30)===0&&!rQ(R)&&(p=Lg(f,E),p===2&&($=nb(f),$!==0&&(E=$,p=_w(f,$))),p===1))throw N=Wf,Sl(f,0),vo(f,E),ea(f,Er()),N;switch(f.finishedWork=R,f.finishedLanes=E,p){case 0:case 1:throw Error(r(345));case 2:Al(f,Jn,xs);break;case 3:if(vo(f,E),(E&130023424)===E&&(p=ww+500-Er(),10<p)){if(Hp(f,0)!==0)break;if(R=f.suspendedLanes,(R&E)!==E){In(),f.pingedLanes|=f.suspendedLanes&R;break}f.timeoutHandle=Pb(Al.bind(null,f,Jn,xs),p);break}Al(f,Jn,xs);break;case 4:if(vo(f,E),(E&4194240)===E)break;for(p=f.eventTimes,R=-1;0<E;){var K=31-ii(E);$=1<<K,K=p[K],K>R&&(R=K),E&=~$}if(E=R,E=Er()-E,E=(120>E?120:480>E?480:1080>E?1080:1920>E?1920:3e3>E?3e3:4320>E?4320:1960*tQ(E/1960))-E,10<E){f.timeoutHandle=Pb(Al.bind(null,f,Jn,xs),E);break}Al(f,Jn,xs);break;case 5:Al(f,Jn,xs);break;default:throw Error(r(329))}}}return ea(f,Er()),f.callbackNode===N?d4.bind(null,f):null}function _w(f,p){var N=Gf;return f.current.memoizedState.isDehydrated&&(Sl(f,p).flags|=256),f=Lg(f,p),f!==2&&(p=Jn,Jn=N,p!==null&&Sw(p)),f}function Sw(f){Jn===null?Jn=f:Jn.push.apply(Jn,f)}function rQ(f){for(var p=f;;){if(p.flags&16384){var N=p.updateQueue;if(N!==null&&(N=N.stores,N!==null))for(var E=0;E<N.length;E++){var R=N[E],$=R.getSnapshot;R=R.value;try{if(!si($(),R))return!1}catch{return!1}}}if(N=p.child,p.subtreeFlags&16384&&N!==null)N.return=p,p=N;else{if(p===f)break;for(;p.sibling===null;){if(p.return===null||p.return===f)return!0;p=p.return}p.sibling.return=p.return,p=p.sibling}}return!0}function vo(f,p){for(p&=~bw,p&=~Cg,f.suspendedLanes|=p,f.pingedLanes&=~p,f=f.expirationTimes;0<p;){var N=31-ii(p),E=1<<N;f[N]=-1,p&=~E}}function f4(f){if((It&6)!==0)throw Error(r(327));uu();var p=Hp(f,0);if((p&1)===0)return ea(f,Er()),null;var N=Lg(f,p);if(f.tag!==0&&N===2){var E=nb(f);E!==0&&(p=E,N=_w(f,E))}if(N===1)throw N=Wf,Sl(f,0),vo(f,p),ea(f,Er()),N;if(N===6)throw Error(r(345));return f.finishedWork=f.current.alternate,f.finishedLanes=p,Al(f,Jn,xs),ea(f,Er()),null}function Aw(f,p){var N=It;It|=1;try{return f(p)}finally{It=N,It===0&&(cu=Er()+500,ug&&uo())}}function _l(f){go!==null&&go.tag===0&&(It&6)===0&&uu();var p=It;It|=1;var N=Ra.transition,E=Qt;try{if(Ra.transition=null,Qt=1,f)return f()}finally{Qt=E,Ra.transition=N,It=p,(It&6)===0&&uo()}}function kw(){ha=lu.current,cr(lu)}function Sl(f,p){f.finishedWork=null,f.finishedLanes=0;var N=f.timeoutHandle;if(N!==-1&&(f.timeoutHandle=-1,OX(N)),Dr!==null)for(N=Dr.return;N!==null;){var E=N;switch(Ib(E),E.tag){case 1:E=E.type.childContextTypes,E!=null&&lg();break;case 3:iu(),cr(Xn),cr(wn),Yb();break;case 5:Gb(E);break;case 4:iu();break;case 13:cr(yr);break;case 19:cr(yr);break;case 10:qb(E.type._context);break;case 22:case 23:kw()}N=N.return}if(en=f,Dr=f=xo(f.current,null),hn=ha=p,zr=0,Wf=null,bw=Cg=Nl=0,Jn=Gf=null,bl!==null){for(p=0;p<bl.length;p++)if(N=bl[p],E=N.interleaved,E!==null){N.interleaved=null;var R=E.next,$=N.pending;if($!==null){var K=$.next;$.next=R,E.next=K}N.pending=E}bl=null}return f}function h4(f,p){do{var N=Dr;try{if(Ub(),bg.current=_g,wg){for(var E=vr.memoizedState;E!==null;){var R=E.queue;R!==null&&(R.pending=null),E=E.next}wg=!1}if(jl=0,Jr=qr=vr=null,Bf=!1,Uf=0,xw.current=null,N===null||N.return===null){zr=1,Wf=p,Dr=null;break}e:{var $=f,K=N.return,re=N,le=p;if(p=hn,re.flags|=32768,le!==null&&typeof le=="object"&&typeof le.then=="function"){var we=le,De=re,$e=De.tag;if((De.mode&1)===0&&($e===0||$e===11||$e===15)){var Re=De.alternate;Re?(De.updateQueue=Re.updateQueue,De.memoizedState=Re.memoizedState,De.lanes=Re.lanes):(De.updateQueue=null,De.memoizedState=null)}var Xe=$O(K);if(Xe!==null){Xe.flags&=-257,FO(Xe,K,re,$,p),Xe.mode&1&&LO($,we,p),p=Xe,le=we;var tt=p.updateQueue;if(tt===null){var at=new Set;at.add(le),p.updateQueue=at}else tt.add(le);break e}else{if((p&1)===0){LO($,we,p),Ew();break e}le=Error(r(426))}}else if(mr&&re.mode&1){var Tr=$O(K);if(Tr!==null){(Tr.flags&65536)===0&&(Tr.flags|=256),FO(Tr,K,re,$,p),Fb(su(le,re));break e}}$=le=su(le,re),zr!==4&&(zr=2),Gf===null?Gf=[$]:Gf.push($),$=K;do{switch($.tag){case 3:$.flags|=65536,p&=-p,$.lanes|=p;var ge=DO($,le,p);lO($,ge);break e;case 1:re=le;var de=$.type,ve=$.stateNode;if(($.flags&128)===0&&(typeof de.getDerivedStateFromError=="function"||ve!==null&&typeof ve.componentDidCatch=="function"&&(po===null||!po.has(ve)))){$.flags|=65536,p&=-p,$.lanes|=p;var Ue=IO($,re,p);lO($,Ue);break e}}$=$.return}while($!==null)}g4(N)}catch(ot){p=ot,Dr===N&&N!==null&&(Dr=N=N.return);continue}break}while(!0)}function m4(){var f=Pg.current;return Pg.current=_g,f===null?_g:f}function Ew(){(zr===0||zr===3||zr===2)&&(zr=4),en===null||(Nl&268435455)===0&&(Cg&268435455)===0||vo(en,hn)}function Lg(f,p){var N=It;It|=2;var E=m4();(en!==f||hn!==p)&&(xs=null,Sl(f,p));do try{nQ();break}catch(R){h4(f,R)}while(!0);if(Ub(),It=N,Pg.current=E,Dr!==null)throw Error(r(261));return en=null,hn=0,zr}function nQ(){for(;Dr!==null;)p4(Dr)}function aQ(){for(;Dr!==null&&!TY();)p4(Dr)}function p4(f){var p=x4(f.alternate,f,ha);f.memoizedProps=f.pendingProps,p===null?g4(f):Dr=p,xw.current=null}function g4(f){var p=f;do{var N=p.alternate;if(f=p.return,(p.flags&32768)===0){if(N=XX(N,p,ha),N!==null){Dr=N;return}}else{if(N=QX(N,p),N!==null){N.flags&=32767,Dr=N;return}if(f!==null)f.flags|=32768,f.subtreeFlags=0,f.deletions=null;else{zr=6,Dr=null;return}}if(p=p.sibling,p!==null){Dr=p;return}Dr=p=f}while(p!==null);zr===0&&(zr=5)}function Al(f,p,N){var E=Qt,R=Ra.transition;try{Ra.transition=null,Qt=1,iQ(f,p,N,E)}finally{Ra.transition=R,Qt=E}return null}function iQ(f,p,N,E){do uu();while(go!==null);if((It&6)!==0)throw Error(r(327));N=f.finishedWork;var R=f.finishedLanes;if(N===null)return null;if(f.finishedWork=null,f.finishedLanes=0,N===f.current)throw Error(r(177));f.callbackNode=null,f.callbackPriority=0;var $=N.lanes|N.childLanes;if(FY(f,$),f===en&&(Dr=en=null,hn=0),(N.subtreeFlags&2064)===0&&(N.flags&2064)===0||Mg||(Mg=!0,b4(Up,function(){return uu(),null})),$=(N.flags&15990)!==0,(N.subtreeFlags&15990)!==0||$){$=Ra.transition,Ra.transition=null;var K=Qt;Qt=1;var re=It;It|=4,xw.current=null,JX(f,N),s4(N,f),SX(Eb),Kp=!!kb,Eb=kb=null,f.current=N,eQ(N),PY(),It=re,Qt=K,Ra.transition=$}else f.current=N;if(Mg&&(Mg=!1,go=f,Rg=R),$=f.pendingLanes,$===0&&(po=null),MY(N.stateNode),ea(f,Er()),p!==null)for(E=f.onRecoverableError,N=0;N<p.length;N++)R=p[N],E(R.value,{componentStack:R.stack,digest:R.digest});if(Og)throw Og=!1,f=jw,jw=null,f;return(Rg&1)!==0&&f.tag!==0&&uu(),$=f.pendingLanes,($&1)!==0?f===Nw?Kf++:(Kf=0,Nw=f):Kf=0,uo(),null}function uu(){if(go!==null){var f=aC(Rg),p=Ra.transition,N=Qt;try{if(Ra.transition=null,Qt=16>f?16:f,go===null)var E=!1;else{if(f=go,go=null,Rg=0,(It&6)!==0)throw Error(r(331));var R=It;for(It|=4,Ze=f.current;Ze!==null;){var $=Ze,K=$.child;if((Ze.flags&16)!==0){var re=$.deletions;if(re!==null){for(var le=0;le<re.length;le++){var we=re[le];for(Ze=we;Ze!==null;){var De=Ze;switch(De.tag){case 0:case 11:case 15:Hf(8,De,$)}var $e=De.child;if($e!==null)$e.return=De,Ze=$e;else for(;Ze!==null;){De=Ze;var Re=De.sibling,Xe=De.return;if(t4(De),De===we){Ze=null;break}if(Re!==null){Re.return=Xe,Ze=Re;break}Ze=Xe}}}var tt=$.alternate;if(tt!==null){var at=tt.child;if(at!==null){tt.child=null;do{var Tr=at.sibling;at.sibling=null,at=Tr}while(at!==null)}}Ze=$}}if(($.subtreeFlags&2064)!==0&&K!==null)K.return=$,Ze=K;else e:for(;Ze!==null;){if($=Ze,($.flags&2048)!==0)switch($.tag){case 0:case 11:case 15:Hf(9,$,$.return)}var ge=$.sibling;if(ge!==null){ge.return=$.return,Ze=ge;break e}Ze=$.return}}var de=f.current;for(Ze=de;Ze!==null;){K=Ze;var ve=K.child;if((K.subtreeFlags&2064)!==0&&ve!==null)ve.return=K,Ze=ve;else e:for(K=de;Ze!==null;){if(re=Ze,(re.flags&2048)!==0)try{switch(re.tag){case 0:case 11:case 15:Tg(9,re)}}catch(ot){br(re,re.return,ot)}if(re===K){Ze=null;break e}var Ue=re.sibling;if(Ue!==null){Ue.return=re.return,Ze=Ue;break e}Ze=re.return}}if(It=R,uo(),Mi&&typeof Mi.onPostCommitFiberRoot=="function")try{Mi.onPostCommitFiberRoot(qp,f)}catch{}E=!0}return E}finally{Qt=N,Ra.transition=p}}return!1}function y4(f,p,N){p=su(N,p),p=DO(f,p,1),f=ho(f,p,1),p=In(),f!==null&&(vf(f,1,p),ea(f,p))}function br(f,p,N){if(f.tag===3)y4(f,f,N);else for(;p!==null;){if(p.tag===3){y4(p,f,N);break}else if(p.tag===1){var E=p.stateNode;
vendor: 4,912 bytes, line 40
40if(typeof p.type.getDerivedStateFromError=="function"||typeof E.componentDidCatch=="function"&&(po===null||!po.has(E))){f=su(N,f),f=IO(p,f,1),p=ho(p,f,1),f=In(),p!==null&&(vf(p,1,f),ea(p,f));break}}p=p.return}}function sQ(f,p,N){var E=f.pingCache;E!==null&&E.delete(p),p=In(),f.pingedLanes|=f.suspendedLanes&N,en===f&&(hn&N)===N&&(zr===4||zr===3&&(hn&130023424)===hn&&500>Er()-ww?Sl(f,0):bw|=N),ea(f,p)}function v4(f,p){p===0&&((f.mode&1)===0?p=1:(p=Vp,Vp<<=1,(Vp&130023424)===0&&(Vp=4194304)));var N=In();f=gs(f,p),f!==null&&(vf(f,p,N),ea(f,N))}function oQ(f){var p=f.memoizedState,N=0;p!==null&&(N=p.retryLane),v4(f,N)}function lQ(f,p){var N=0;switch(f.tag){case 13:var E=f.stateNode,R=f.memoizedState;R!==null&&(N=R.retryLane);break;case 19:E=f.stateNode;break;default:throw Error(r(314))}E!==null&&E.delete(p),v4(f,N)}var x4;x4=function(f,p,N){if(f!==null)if(f.memoizedProps!==p.pendingProps||Xn.current)Zn=!0;else{if((f.lanes&N)===0&&(p.flags&128)===0)return Zn=!1,YX(f,p,N);Zn=(f.flags&131072)!==0}else Zn=!1,mr&&(p.flags&1048576)!==0&&ZC(p,fg,p.index);switch(p.lanes=0,p.tag){case 2:var E=p.type;kg(f,p),f=p.pendingProps;var R=Zc(p,wn.current);au(p,N),R=Zb(null,p,E,f,R,N);var $=Jb();return p.flags|=1,typeof R=="object"&&R!==null&&typeof R.render=="function"&&R.$$typeof===void 0?(p.tag=1,p.memoizedState=null,p.updateQueue=null,Qn(E)?($=!0,cg(p)):$=!1,p.memoizedState=R.state!==null&&R.state!==void 0?R.state:null,Hb(p),R.updater=Sg,p.stateNode=R,R._reactInternals=p,iw(p,E,f,N),p=cw(null,p,E,!0,$,N)):(p.tag=0,mr&&$&&Db(p),Dn(null,p,R,N),p=p.child),p;case 16:E=p.elementType;e:{switch(kg(f,p),f=p.pendingProps,R=E._init,E=R(E._payload),p.type=E,R=p.tag=uQ(E),f=li(E,f),R){case 0:p=lw(null,p,E,f,N);break e;case 1:p=HO(null,p,E,f,N);break e;case 11:p=BO(null,p,E,f,N);break e;case 14:p=UO(null,p,E,li(E.type,f),N);break e}throw Error(r(306,E,""))}return p;case 0:return E=p.type,R=p.pendingProps,R=p.elementType===E?R:li(E,R),lw(f,p,E,R,N);case 1:return E=p.type,R=p.pendingProps,R=p.elementType===E?R:li(E,R),HO(f,p,E,R,N);case 3:e:{if(WO(p),f===null)throw Error(r(387));E=p.pendingProps,$=p.memoizedState,R=$.element,oO(f,p),vg(p,E,null,N);var K=p.memoizedState;if(E=K.element,$.isDehydrated)if($={element:E,isDehydrated:!1,cache:K.cache,pendingSuspenseBoundaries:K.pendingSuspenseBoundaries,transitions:K.transitions},p.updateQueue.baseState=$,p.memoizedState=$,p.flags&256){R=su(Error(r(423)),p),p=GO(f,p,E,N,R);break e}else if(E!==R){R=su(Error(r(424)),p),p=GO(f,p,E,N,R);break e}else for(fa=oo(p.stateNode.containerInfo.firstChild),da=p,mr=!0,oi=null,N=iO(p,null,E,N),p.child=N;N;)N.flags=N.flags&-3|4096,N=N.sibling;else{if(tu(),E===R){p=vs(f,p,N);break e}Dn(f,p,E,N)}p=p.child}return p;case 5:return uO(p),f===null&&$b(p),E=p.type,R=p.pendingProps,$=f!==null?f.memoizedProps:null,K=R.children,Tb(E,R)?K=null:$!==null&&Tb(E,$)&&(p.flags|=32),VO(f,p),Dn(f,p,K,N),p.child;case 6:return f===null&&$b(p),null;case 13:return KO(f,p,N);case 4:return Wb(p,p.stateNode.containerInfo),E=p.pendingProps,f===null?p.child=ru(p,null,E,N):Dn(f,p,E,N),p.child;case 11:return E=p.type,R=p.pendingProps,R=p.elementType===E?R:li(E,R),BO(f,p,E,R,N);case 7:return Dn(f,p,p.pendingProps,N),p.child;case 8:return Dn(f,p,p.pendingProps.children,N),p.child;case 12:return Dn(f,p,p.pendingProps.children,N),p.child;case 10:e:{if(E=p.type._context,R=p.pendingProps,$=p.memoizedProps,K=R.value,nr(pg,E._currentValue),E._currentValue=K,$!==null)if(si($.value,K)){if($.children===R.children&&!Xn.current){p=vs(f,p,N);break e}}else for($=p.child,$!==null&&($.return=p);$!==null;){var re=$.dependencies;if(re!==null){K=$.child;for(var le=re.firstContext;le!==null;){if(le.context===E){if($.tag===1){le=ys(-1,N&-N),le.tag=2;var we=$.updateQueue;if(we!==null){we=we.shared;var De=we.pending;De===null?le.next=le:(le.next=De.next,De.next=le),we.pending=le}}$.lanes|=N,le=$.alternate,le!==null&&(le.lanes|=N),zb($.return,N,p),re.lanes|=N;break}le=le.next}}else if($.tag===10)K=$.type===p.type?null:$.child;else if($.tag===18){if(K=$.return,K===null)throw Error(r(341));K.lanes|=N,re=K.alternate,re!==null&&(re.lanes|=N),zb(K,N,p),K=$.sibling}else K=$.child;if(K!==null)K.return=$;else for(K=$;K!==null;){if(K===p){K=null;break}if($=K.sibling,$!==null){$.return=K.return,K=$;break}K=K.return}$=K}Dn(f,p,R.children,N),p=p.child}return p;case 9:return R=p.type,E=p.pendingProps.children,au(p,N),R=Oa(R),E=E(R),p.flags|=1,Dn(f,p,E,N),p.child;case 14:return E=p.type,R=li(E,p.pendingProps),R=li(E.type,R),UO(f,p,E,R,N);case 15:return qO(f,p,p.type,p.pendingProps,N);case 17:return E=p.type,R=p.pendingProps,R=p.elementType===E?R:li(E,R),kg(f,p),p.tag=1,Qn(E)?(f=!0,cg(p)):f=!1,au(p,N),MO(p,E,R),iw(p,E,R,N),cw(null,p,E,!0,f,N);case 19:return XO(f,p,N);case 22:return zO(f,p,N)}throw Error(r(156,p.tag))};function b4(f,p){return pf(f,p)}function cQ(f,p,N,E){this.tag=f,this.key=N,this.sibling=this.child=this.return=this.stateNode=this.t
vendor: 4,386 bytes, line 40
40ype=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=p,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=E,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Da(f,p,N,E){return new cQ(f,p,N,E)}function Tw(f){return f=f.prototype,!(!f||!f.isReactComponent)}function uQ(f){if(typeof f=="function")return Tw(f)?1:0;if(f!=null){if(f=f.$$typeof,f===D)return 11;if(f===U)return 14}return 2}function xo(f,p){var N=f.alternate;return N===null?(N=Da(f.tag,p,f.key,f.mode),N.elementType=f.elementType,N.type=f.type,N.stateNode=f.stateNode,N.alternate=f,f.alternate=N):(N.pendingProps=p,N.type=f.type,N.flags=0,N.subtreeFlags=0,N.deletions=null),N.flags=f.flags&14680064,N.childLanes=f.childLanes,N.lanes=f.lanes,N.child=f.child,N.memoizedProps=f.memoizedProps,N.memoizedState=f.memoizedState,N.updateQueue=f.updateQueue,p=f.dependencies,N.dependencies=p===null?null:{lanes:p.lanes,firstContext:p.firstContext},N.sibling=f.sibling,N.index=f.index,N.ref=f.ref,N}function $g(f,p,N,E,R,$){var K=2;if(E=f,typeof f=="function")Tw(f)&&(K=1);else if(typeof f=="string")K=5;else e:switch(f){case T:return kl(N.children,R,$,p);case P:K=8,R|=8;break;case M:return f=Da(12,N,p,R|2),f.elementType=M,f.lanes=$,f;case L:return f=Da(13,N,p,R),f.elementType=L,f.lanes=$,f;case F:return f=Da(19,N,p,R),f.elementType=F,f.lanes=$,f;case W:return Fg(N,R,$,p);default:if(typeof f=="object"&&f!==null)switch(f.$$typeof){case C:K=10;break e;case O:K=9;break e;case D:K=11;break e;case U:K=14;break e;case G:K=16,E=null;break e}throw Error(r(130,f==null?f:typeof f,""))}return p=Da(K,N,p,R),p.elementType=f,p.type=E,p.lanes=$,p}function kl(f,p,N,E){return f=Da(7,f,E,p),f.lanes=N,f}function Fg(f,p,N,E){return f=Da(22,f,E,p),f.elementType=W,f.lanes=N,f.stateNode={isHidden:!1},f}function Pw(f,p,N){return f=Da(6,f,null,p),f.lanes=N,f}function Cw(f,p,N){return p=Da(4,f.children!==null?f.children:[],f.key,p),p.lanes=N,p.stateNode={containerInfo:f.containerInfo,pendingChildren:null,implementation:f.implementation},p}function dQ(f,p,N,E,R){this.tag=p,this.containerInfo=f,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ab(0),this.expirationTimes=ab(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ab(0),this.identifierPrefix=E,this.onRecoverableError=R,this.mutableSourceEagerHydrationData=null}function Ow(f,p,N,E,R,$,K,re,le){return f=new dQ(f,p,N,re,le),p===1?(p=1,$===!0&&(p|=8)):p=0,$=Da(3,null,null,p),f.current=$,$.stateNode=f,$.memoizedState={element:E,isDehydrated:N,cache:null,transitions:null,pendingSuspenseBoundaries:null},Hb($),f}function fQ(f,p,N){var E=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:k,key:E==null?null:""+E,children:f,containerInfo:p,implementation:N}}function w4(f){if(!f)return co;f=f._reactInternals;e:{if(Rr(f)!==f||f.tag!==1)throw Error(r(170));var p=f;do{switch(p.tag){case 3:p=p.stateNode.context;break e;case 1:if(Qn(p.type)){p=p.stateNode.__reactInternalMemoizedMergedChildContext;break e}}p=p.return}while(p!==null);throw Error(r(171))}if(f.tag===1){var N=f.type;if(Qn(N))return YC(f,N,p)}return p}function j4(f,p,N,E,R,$,K,re,le){return f=Ow(N,E,!0,f,R,$,K,re,le),f.context=w4(null),N=f.current,E=In(),R=yo(N),$=ys(E,R),$.callback=p??null,ho(N,$,R),f.current.lanes=R,vf(f,R,E),ea(f,E),f}function Bg(f,p,N,E){var R=p.current,$=In(),K=yo(R);return N=w4(N),p.context===null?p.context=N:p.pendingContext=N,p=ys($,K),p.payload={element:f},E=E===void 0?null:E,E!==null&&(p.callback=E),f=ho(R,p,K),f!==null&&(di(f,R,K,$),yg(f,R,K)),K}function Ug(f){if(f=f.current,!f.child)return null;switch(f.child.tag){case 5:return f.child.stateNode;default:return f.child.stateNode}}function N4(f,p){if(f=f.memoizedState,f!==null&&f.dehydrated!==null){var N=f.retryLane;f.retryLane=N!==0&&N<p?N:p}}function Mw(f,p){N4(f,p),(f=f.alternate)&&N4(f,p)}function hQ(){return null}var _4=typeof reportError=="function"?reportError:function(f){console.error(f)};function Rw(f){this._internalRoot=f}qg.prototype.render=Rw.prototype.render=function(f){var p=this._internalRoot;if(p===null)throw Error(r(409));
vendor: 6,313 bytes, line 40
40Bg(f,p,null,null)},qg.prototype.unmount=Rw.prototype.unmount=function(){var f=this._internalRoot;if(f!==null){this._internalRoot=null;var p=f.containerInfo;_l(function(){Bg(null,f,null,null)}),p[fs]=null}};function qg(f){this._internalRoot=f}qg.prototype.unstable_scheduleHydration=function(f){if(f){var p=oC();f={blockedOn:null,target:f,priority:p};for(var N=0;N<ao.length&&p!==0&&p<ao[N].priority;N++);ao.splice(N,0,f),N===0&&uC(f)}};function Dw(f){return!(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)}function zg(f){return!(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11&&(f.nodeType!==8||f.nodeValue!==" react-mount-point-unstable "))}function S4(){}function mQ(f,p,N,E,R){if(R){if(typeof E=="function"){var $=E;E=function(){var we=Ug(K);$.call(we)}}var K=j4(p,E,f,0,null,!1,!1,"",S4);return f._reactRootContainer=K,f[fs]=K.current,Of(f.nodeType===8?f.parentNode:f),_l(),K}for(;R=f.lastChild;)f.removeChild(R);if(typeof E=="function"){var re=E;E=function(){var we=Ug(le);re.call(we)}}var le=Ow(f,0,!1,null,null,!1,!1,"",S4);return f._reactRootContainer=le,f[fs]=le.current,Of(f.nodeType===8?f.parentNode:f),_l(function(){Bg(p,le,N,E)}),le}function Vg(f,p,N,E,R){var $=N._reactRootContainer;if($){var K=$;if(typeof R=="function"){var re=R;R=function(){var le=Ug(K);re.call(le)}}Bg(p,K,f,R)}else K=mQ(N,p,f,R,E);return Ug(K)}iC=function(f){switch(f.tag){case 3:var p=f.stateNode;if(p.current.memoizedState.isDehydrated){var N=yf(p.pendingLanes);N!==0&&(ib(p,N|1),ea(p,Er()),(It&6)===0&&(cu=Er()+500,uo()))}break;case 13:_l(function(){var E=gs(f,1);if(E!==null){var R=In();di(E,f,1,R)}}),Mw(f,1)}},sb=function(f){if(f.tag===13){var p=gs(f,134217728);if(p!==null){var N=In();di(p,f,134217728,N)}Mw(f,134217728)}},sC=function(f){if(f.tag===13){var p=yo(f),N=gs(f,p);if(N!==null){var E=In();di(N,f,p,E)}Mw(f,p)}},oC=function(){return Qt},lC=function(f,p){var N=Qt;try{return Qt=f,p()}finally{Qt=N}},Oi=function(f,p,N){switch(p){case"input":if(Pe(f,N),p=N.name,N.type==="radio"&&p!=null){for(N=f;N.parentNode;)N=N.parentNode;for(N=N.querySelectorAll("input[name="+JSON.stringify(""+p)+'][type="radio"]'),p=0;p<N.length;p++){var E=N[p];if(E!==f&&E.form===f.form){var R=og(E);if(!R)throw Error(r(90));oe(E),Pe(E,R)}}}break;case"textarea":Te(f,N);break;case"select":p=N.value,p!=null&&ye(f,!!N.multiple,p,!1)}},uf=Aw,$p=_l;var pQ={usingClientEntryPoint:!1,Events:[Df,Xc,og,Js,Lp,Aw]},Yf={findFiberByHostInstance:gl,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},gQ={bundleType:Yf.bundleType,version:Yf.version,rendererPackageName:Yf.rendererPackageName,rendererConfig:Yf.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:j.ReactCurrentDispatcher,findHostInstanceByFiber:function(f){return f=hf(f),f===null?null:f.stateNode},findFiberByHostInstance:Yf.findFiberByHostInstance||hQ,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Hg=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hg.isDisabled&&Hg.supportsFiber)try{qp=Hg.inject(gQ),Mi=Hg}catch{}}return ta.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=pQ,ta.createPortal=function(f,p){var N=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Dw(p))throw Error(r(200));return fQ(f,p,null,N)},ta.createRoot=function(f,p){if(!Dw(f))throw Error(r(299));var N=!1,E="",R=_4;return p!=null&&(p.unstable_strictMode===!0&&(N=!0),p.identifierPrefix!==void 0&&(E=p.identifierPrefix),p.onRecoverableError!==void 0&&(R=p.onRecoverableError)),p=Ow(f,1,!1,null,null,N,!1,E,R),f[fs]=p.current,Of(f.nodeType===8?f.parentNode:f),new Rw(p)},ta.findDOMNode=function(f){if(f==null)return null;if(f.nodeType===1)return f;var p=f._reactInternals;if(p===void 0)throw typeof f.render=="function"?Error(r(188)):(f=Object.keys(f).join(","),Error(r(268,f)));return f=hf(p),f=f===null?null:f.stateNode,f},ta.flushSync=function(f){return _l(f)},ta.hydrate=function(f,p,N){if(!zg(p))throw Error(r(200));return Vg(null,f,p,!0,N)},ta.hydrateRoot=function(f,p,N){if(!Dw(f))throw Error(r(405));var E=N!=null&&N.hydratedSources||null,R=!1,$="",K=_4;if(N!=null&&(N.unstable_strictMode===!0&&(R=!0),N.identifierPrefix!==void 0&&($=N.identifierPrefix),N.onRecoverableError!==void 0&&(K=N.onRecoverableError)),p=j4(p,null,f,1,N??null,R,!1,$,K),f[fs]=p.current,Of(f),E)for(f=0;f<E.length;f++)N=E[f],R=N._getVersion,R=R(N._source),p.mutableSourceEagerHydrationData==null?p.mutableSourceEagerHydrationData=[N,R]:p.mutableSourceEagerHydrationData.push(N,R);return new qg(p)},ta.render=function(f,p,N){if(!zg(p))throw Error(r(200));return Vg(null,f,p,!1,N)},ta.unmountComponentAtNode=function(f){if(!zg(f))throw Error(r(40));return f._reactRootContainer?(_l(function(){Vg(null,null,f,!1,function(){f._reactRootContainer=null,f[fs]=null})}),!0):!1},ta.unstable_batchedUpdates=Aw,ta.unstable_renderSubtreeIntoContainer=function(f,p,N,E){if(!zg(N))throw Error(r(200));if(f==null||f._reactInternals===void 0)throw Error(r(38));return Vg(f,p,N,!1,E)},ta.version="18.3.1-next-f1338f8080-20240426",ta}var R4;function Ok(){if(R4)return Fw.exports;R4=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Fw.exports=kQ(),Fw.exports}var D4;function EQ(){if(D4)return Kg;D4=1;var e=Ok();return Kg.createRoot=e.createRoot,Kg.hydrateRoot=e.hydrateRoot,Kg}var TQ=EQ();const PQ=Ht(TQ),CQ=20,OQ=1e6,ks={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let qw=0;function MQ(){return qw=(qw+1)%Number.MAX_VALUE,qw.toString()}const zw=new Map,I4=e=>{if(zw.has(e))return;const t=setTimeout(()=>{zw.delete(e),Ph({type:ks.REMOVE_TOAST,toastId:e})},OQ);zw.set(e,t)},RQ=(e,t)=>{switch(t.type){case ks.ADD_TOAST:return{...e,toasts:[t.toast,...e.toasts].slice(0,CQ)};case ks.UPDATE_TOAST:return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case ks.DISMISS_TOAST:{const{toastId:r}=t;
40return r?I4(r):e.toasts.forEach(n=>{I4(n.id)}),{...e,toasts:e.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case ks.REMOVE_TOAST:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},ky=[];let Ey={toasts:[]};function Ph(e){Ey=RQ(Ey,e),ky.forEach(t=>{t(Ey)})}function Le({...e}){const t=MQ(),r=i=>Ph({type:ks.UPDATE_TOAST,toast:{...i,id:t}}),n=()=>Ph({type:ks.DISMISS_TOAST,toastId:t});return Ph({type:ks.ADD_TOAST,toast:{...e,id:t,open:!0,onOpenChange:i=>{i||n()}}}),{id:t,dismiss:n,update:r}}function np(){const[e,t]=A.useState(Ey);return A.useEffect(()=>(ky.push(t),()=>{const r=ky.indexOf(t);r>-1&&ky.splice(r,1)}),[e]),{...e,toast:Le,dismiss:r=>Ph({type:ks.DISMISS_TOAST,toastId:r})}}function EB(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=EB(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function bt(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=EB(e))&&(n&&(n+=" "),n+=t);return n}const L4=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,$4=bt,ap=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return $4(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:s}=t,o=Object.keys(i).map(d=>{const u=r==null?void 0:r[d],h=s==null?void 0:s[d];if(u===null)return null;const m=L4(u)||L4(h);return i[d][m]}),l=r&&Object.entries(r).reduce((d,u)=>{let[h,m]=u;return m===void 0||(d[h]=m),d},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((d,u)=>{let{class:h,className:m,...g}=u;return Object.entries(g).every(b=>{let[v,y]=b;return Array.isArray(y)?y.includes({...s,...l}[v]):{...s,...l}[v]===y})?[...d,h,m]:d},[]);return $4(e,o,c,r==null?void 0:r.class,r==null?void 0:r.className)};/** 41 * @license lucide-react v0.475.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 DQ=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),TB=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/** 46 * @license lucide-react v0.475.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 IQ={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.475.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 LQ=A.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:s,iconNode:o,...l},c)=>A.createElement("svg",{ref:c,...IQ,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:TB("lucide",i),...l},[...o.map(([d,u])=>A.createElement(d,u)),...Array.isArray(s)?s:[s]]));/** 56 * @license lucide-react v0.475.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 Ae=(e,t)=>
60{const r=A.forwardRef(({className:n,...i},s)=>A.createElement(LQ,{ref:s,iconNode:t,className:TB(`lucide-${DQ(e)}`,n),...i}));return r.displayName=`${e}`,r};/** 61 * @license lucide-react v0.475.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 $Q=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],F4=Ae("Activity",$Q);/** 66 * @license lucide-react v0.475.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 FQ=[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]],BQ=Ae("ArrowDownRight",FQ);/** 71 * @license lucide-react v0.475.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 UQ=[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"M11 4h10",key:"1w87gc"}],["path",{d:"M11 8h7",key:"djye34"}],["path",{d:"M11 12h4",key:"q8tih4"}]],qQ=Ae("ArrowDownWideNarrow",UQ);/** 76 * @license lucide-react v0.475.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 zQ=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Ky=Ae("ArrowDown",zQ);/** 81 * @license lucide-react v0.475.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 VQ=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Uo=Ae("ArrowLeft",VQ);/** 86 * @license lucide-react v0.475.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 HQ=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],qo=Ae("ArrowRight",HQ);/** 91 * @license lucide-react v0.475.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 WQ=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],PB=Ae("ArrowUpDown",WQ);/** 96 * @license lucide-react v0.475.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 GQ=[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["path",{d:"M11 12h4",key:"q8tih4"}],["path",{d:"M11 16h7",key:"uosisv"}],["path",{d:"M11 20h10",key:"jvxblo"}]],KQ=Ae("ArrowUpNarrowWide",GQ);/** 101 * @license lucide-react v0.475.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 YQ=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],XQ=Ae("ArrowUpRight",YQ);/** 106 * @license lucide-react v0.475.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 QQ=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Yy=Ae("ArrowUp",QQ);/** 111 * @license lucide-react v0.475.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 ZQ=[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]],Es=Ae("Award",ZQ);/** 116 * @license lucide-react v0.475.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 JQ=[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M9 9h.01",key:"1q5me6"}],["path",{d:"M15 15h.01",key:"lqbp3k"}]],eZ=Ae("BadgePercent",JQ);/** 121 * @license lucide-react v0.475.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 tZ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]],CB=Ae("Ban",tZ);/** 126 * @license lucide-react v0.475.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 rZ=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],Ko=Ae("Bell",rZ);/** 131 * @license lucide-react v0.475.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 nZ=[["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"}]],Pc=Ae("BookOpen",nZ);/** 136 * @license lucide-react v0.475.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 aZ=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],_i=Ae("Bot",aZ);/** 141 * @license lucide-react v0.475.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 iZ=[["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"}
145]],ln=Ae("Brain",iZ);/** 146 * @license lucide-react v0.475.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 sZ=[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],oZ=Ae("Briefcase",sZ);/** 151 * @license lucide-react v0.475.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 lZ=[["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"}]],Xy=Ae("Calendar",lZ);/** 156 * @license lucide-react v0.475.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 cZ=[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],uZ=Ae("Camera",cZ);/** 161 * @license lucide-react v0.475.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 dZ=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M7 16h8",key:"srdodz"}],["path",{d:"M7 11h12",key:"127s9w"}],["path",{d:"M7 6h3",key:"w9rmul"}]],Qy=Ae("ChartBar",dZ);/** 166 * @license lucide-react v0.475.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 fZ=[["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"}]],Zy=Ae("ChartColumn",fZ);/** 171 * @license lucide-react v0.475.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 hZ=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]],Mk=Ae("ChartLine",hZ);/** 176 * @license lucide-react v0.475.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 mZ=[["line",{x1:"12",x2:"12",y1:"20",y2:"10",key:"1vz5eb"}],["line",{x1:"18",x2:"18",y1:"20",y2:"4",key:"cun8e5"}
180],["line",{x1:"6",x2:"6",y1:"20",y2:"16",key:"hq0ia6"}]],OB=Ae("ChartNoAxesColumnIncreasing",mZ);/** 181 * @license lucide-react v0.475.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 pZ=[["line",{x1:"18",x2:"18",y1:"20",y2:"10",key:"1xfpm4"}],["line",{x1:"12",x2:"12",y1:"20",y2:"4",key:"be30l9"}],["line",{x1:"6",x2:"6",y1:"20",y2:"14",key:"1r4le6"}]],FS=Ae("ChartNoAxesColumn",pZ);/** 186 * @license lucide-react v0.475.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 gZ=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Yo=Ae("Check",gZ);/** 191 * @license lucide-react v0.475.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 yZ=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Zi=Ae("ChevronDown",yZ);/** 196 * @license lucide-react v0.475.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 vZ=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],MB=Ae("ChevronLeft",vZ);/** 201 * @license lucide-react v0.475.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 xZ=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ip=Ae("ChevronRight",xZ);/** 206 * @license lucide-react v0.475.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 bZ=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Hh=Ae("ChevronUp",bZ);/** 211 * @license lucide-react v0.475.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 wZ=[["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"}]],Lt=Ae("CircleAlert",wZ);/** 216 * @license lucide-react v0.475.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 jZ=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Eo=Ae("CircleCheckBig",jZ);/** 221 * @license lucide-react v0.475.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 NZ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],dc=Ae("CircleCheck",NZ);/** 226 * @license lucide-react v0.475.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 _Z=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],BS=Ae("CircleHelp",_Z);/** 231 * @license lucide-react v0.475.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 SZ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]],AZ=Ae("CirclePlay",SZ);/** 236 * @license lucide-react v0.475.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 kZ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],Ch=Ae("CirclePlus",kZ);/** 241 * @license lucide-react v0.475.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 EZ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Rk=Ae("Circle",EZ);/** 246 * @license lucide-react v0.475.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 TZ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],Za=Ae("Clock",TZ);/** 251 * @license lucide-react v0.475.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 PZ=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],CZ=Ae("CloudUpload",PZ);/** 256 * @license lucide-react v0.475.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 OZ=[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]],Dk=Ae("Code",OZ);/** 261 * @license lucide-react v0.475.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 MZ=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Wh=Ae("Copy",MZ);/** 266 * @license lucide-react v0.475.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 RZ=[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]],DZ=Ae("Crown",RZ);/** 271 * @license lucide-react v0.475.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 IZ=[["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"}]],Ev=Ae("DollarSign",IZ);/** 276 * @license lucide-react v0.475.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 LZ=[["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"}]],Gn=Ae("Download",LZ);/** 281 * @license lucide-react v0.475.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 $Z=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],RB=Ae("Ellipsis",$Z);/** 286 * @license lucide-react v0.475.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 FZ=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Br=Ae("ExternalLink",FZ);/** 291 * @license lucide-react v0.475.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 BZ=[["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"}]],Fd=Ae("Eye",BZ);/** 296 * @license lucide-react v0.475.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 UZ=[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]],qZ=Ae("Facebook",UZ);/** 301 * @license lucide-react v0.475.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 zZ=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]],VZ=Ae("FileSpreadsheet",zZ);/** 306 * @license lucide-react v0.475.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 HZ=[["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"}]],DB=Ae("FileText",HZ);/** 311 * @license lucide-react v0.475.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 WZ=[["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:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],US=Ae("FileWarning",WZ);/** 316 * @license lucide-react v0.475.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 GZ=[["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"}]],Ik=Ae("File",GZ);/** 321 * @license lucide-react v0.475.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 KZ=[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]],Lk=Ae("Filter",KZ);/** 326 * @license lucide-react v0.475.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 YZ=[["path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z",key:"i9b6wo"}],["line",{x1:"4",x2:"4",y1:"22",y2:"15",key:"1cm3nv"}]],XZ=Ae("Flag",YZ);/** 331 * @license lucide-react v0.475.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 QZ=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],B4=Ae("FolderOpen",QZ);/** 336 * @license lucide-react v0.475.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 ZZ=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],JZ=Ae("Gauge",ZZ);/** 341 * @license lucide-react v0.475.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 eJ=[["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"}]],$k=Ae("Gift",eJ);/** 346 * @license lucide-react v0.475.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 tJ=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],U4=Ae("Github",tJ);/** 351 * @license lucide-react v0.475.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 rJ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Gh=Ae("Globe",rJ);/** 356 * @license lucide-react v0.475.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 nJ=[["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"}]],aJ=Ae("Heart",nJ);/** 361 * @license lucide-react v0.475.0 - ISC 362 * 363 * This source code is licensed under the ISC license. 364 * See the LICENSE file in the root directory of this source tree. 365 */const iJ=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]],Fk=Ae("House",iJ);/** 366 * @license lucide-react v0.475.0 - ISC 367 * 368 * This source code is licensed under the ISC license. 369 * See the LICENSE file in the root directory of this source tree. 370 */const sJ=[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]],oJ=Ae("ImagePlus",sJ);/** 371 * @license lucide-react v0.475.0 - ISC 372 * 373 * This source code is licensed under the ISC license. 374 * See the LICENSE file in the root directory of this source tree. 375 */const lJ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Bk=Ae("Info",lJ);/** 376 * @license lucide-react v0.475.0 - ISC 377 * 378 * This source code is licensed under the ISC license. 379 * See the LICENSE file in the root directory of this source tree. 380 */const cJ=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],uJ=Ae("Layers",cJ);/** 381 * @license lucide-react v0.475.0 - ISC 382 * 383 * This source code is licensed under the ISC license. 384 * See the LICENSE file in the root directory of this source tree. 385 */const dJ=[["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"}]],Uk=Ae("Lightbulb",dJ);/** 386 * @license lucide-react v0.475.0 - ISC 387 * 388 * This source code is licensed under the ISC license. 389 * See the LICENSE file in the root directory of this source tree. 390 */const fJ=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],IB=Ae("Link",fJ);/** 391 * @license lucide-react v0.475.0 - ISC 392 * 393 * This source code is licensed under the ISC license. 394 * See the LICENSE file in the root directory of this source tree. 395 */const hJ=[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}
395]],qS=Ae("Linkedin",hJ);/** 396 * @license lucide-react v0.475.0 - ISC 397 * 398 * This source code is licensed under the ISC license. 399 * See the LICENSE file in the root directory of this source tree. 400 */const mJ=[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]],pJ=Ae("ListChecks",mJ);/** 401 * @license lucide-react v0.475.0 - ISC 402 * 403 * This source code is licensed under the ISC license. 404 * See the LICENSE file in the root directory of this source tree. 405 */const gJ=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],kt=Ae("LoaderCircle",gJ);/** 406 * @license lucide-react v0.475.0 - ISC 407 * 408 * This source code is licensed under the ISC license. 409 * See the LICENSE file in the root directory of this source tree. 410 */const yJ=[["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"}]],zS=Ae("Lock",yJ);/** 411 * @license lucide-react v0.475.0 - ISC 412 * 413 * This source code is licensed under the ISC license. 414 * See the LICENSE file in the root directory of this source tree. 415 */const vJ=[["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"}]],sp=Ae("Mail",vJ);/** 416 * @license lucide-react v0.475.0 - ISC 417 * 418 * This source code is licensed under the ISC license. 419 * See the LICENSE file in the root directory of this source tree. 420 */const xJ=[["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"}]],bJ=Ae("Menu",xJ);/** 421 * @license lucide-react v0.475.0 - ISC 422 * 423 * This source code is licensed under the ISC license. 424 * See the LICENSE file in the root directory of this source tree. 425 */const wJ=[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]],jJ=Ae("MessageCircle",wJ);/** 426 * @license lucide-react v0.475.0 - ISC 427 * 428 * This source code is licensed under the ISC license. 429 * See the LICENSE file in the root directory of this source tree. 430 */const NJ=[["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"}]],pr=Ae("MessageSquare",NJ);/** 431 * @license lucide-react v0.475.0 - ISC 432 * 433 * This source code is licensed under the ISC license. 434 * See the LICENSE file in the root directory of this source tree. 435 */const _J=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],SJ=Ae("Monitor",_J);/** 436 * @license lucide-react v0.475.0 - ISC 437 * 438 * This source code is licensed under the ISC license. 439 * See the LICENSE file in the root directory of this source tree. 440 */const AJ=[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]],q4=Ae("MousePointerClick",AJ);/** 441 * @license lucide-react v0.475.0 - ISC 442 * 443 * This source code is licensed under the ISC license. 444 * See the LICENSE file in the root directory of this source tree. 445 */const kJ=[["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2",key:"7pis2x"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M10 6h8v4h-8V6Z",key:"smlsk5"}]],VS=Ae("Newspaper",kJ);/** 446 * @license lucide-react v0.475.0 - ISC 447 * 448 * This source code is licensed under the ISC license. 449 * See the LICENSE file in the root directory of this source tree. 450 */const EJ=[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]],TJ=Ae("Pause",EJ);/** 451 * @license lucide-react v0.475.0 - ISC 452 * 453 * This source code is licensed under the ISC license. 454 * See the LICENSE file in the root directory of this source tree. 455 */const PJ=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],LB=Ae("Pen",PJ);/** 456 * @license lucide-react v0.475.0 - ISC 457 * 458 * This source code is licensed under the ISC license. 459 * See the LICENSE file in the root directory of this source tree. 460 */const CJ=[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7
460a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]],$B=Ae("Pin",CJ);/** 461 * @license lucide-react v0.475.0 - ISC 462 * 463 * This source code is licensed under the ISC license. 464 * See the LICENSE file in the root directory of this source tree. 465 */const OJ=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],qk=Ae("Play",OJ);/** 466 * @license lucide-react v0.475.0 - ISC 467 * 468 * This source code is licensed under the ISC license. 469 * See the LICENSE file in the root directory of this source tree. 470 */const MJ=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Kh=Ae("Plus",MJ);/** 471 * @license lucide-react v0.475.0 - ISC 472 * 473 * This source code is licensed under the ISC license. 474 * See the LICENSE file in the root directory of this source tree. 475 */const RJ=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],DJ=Ae("Power",RJ);/** 476 * @license lucide-react v0.475.0 - ISC 477 * 478 * This source code is licensed under the ISC license. 479 * See the LICENSE file in the root directory of this source tree. 480 */const IJ=[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]],LJ=Ae("Quote",IJ);/** 481 * @license lucide-react v0.475.0 - ISC 482 * 483 * This source code is licensed under the ISC license. 484 * See the LICENSE file in the root directory of this source tree. 485 */const $J=[["path",{d:"M4.9 16.1C1 12.2 1 5.8 4.9 1.9",key:"s0qx1y"}],["path",{d:"M7.8 4.7a6.14 6.14 0 0 0-.8 7.5",key:"1idnkw"}],["circle",{cx:"12",cy:"9",r:"2",key:"1092wv"}],["path",{d:"M16.2 4.8c2 2 2.26 5.11.8 7.47",key:"ojru2q"}],["path",{d:"M19.1 1.9a9.96 9.96 0 0 1 0 14.1",key:"rhi7fg"}],["path",{d:"M9.5 18h5",key:"mfy3pd"}],["path",{d:"m8 22 4-11 4 11",key:"25yftu"}]],Jy=Ae("RadioTower",$J);/** 486 * @license lucide-react v0.475.0 - ISC 487 * 488 * This source code is licensed under the ISC license. 489 * See the LICENSE file in the root directory of this source tree. 490 */const FJ=[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]],BJ=Ae("RefreshCcw",FJ);/** 491 * @license lucide-react v0.475.0 - ISC 492 * 493 * This source code is licensed under the ISC license. 494 * See the LICENSE file in the root directory of this source tree. 495 */const UJ=[["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"}]],Xr=Ae("RefreshCw",UJ);/** 496 * @license lucide-react v0.475.0 - ISC 497 * 498 * This source code is licensed under the ISC license. 499 * See the LICENSE file in the root directory of this source tree. 500 */const qJ=[["polyline",{points:"9 17 4 12 9 7",key:"hvgpf2"}],["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}]],zJ=Ae("Reply",qJ);/** 501 * @license lucide-react v0.475.0 - ISC 502 * 503 * This source code is licensed under the ISC license. 504 * See the LICENSE file in the root directory of this source tree. 505 */const VJ=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],HJ=Ae("Rocket",VJ);/** 506 * @license lucide-react v0.475.0 - ISC 507 * 508 * This source code is licensed under the ISC license. 509 * See the LICENSE file in the root directory of this source tree. 510 */const WJ=[["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"}]],HS=Ae("RotateCcw",WJ);/** 511 * @license lucide-react v0.475.0 - ISC 512 * 513 * This source code is licensed under the ISC license. 514 * See the LICENSE file in the root directory of this source tree. 515 */const GJ=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],Tv=Ae("Save",GJ);/** 516 * @license lucide-react v0.475.0 - ISC 517 * 518 * This source code is licensed under the ISC license. 519 * See the LICENSE file in the root directory of this source tree. 520 */const KJ=[["path",{d:"m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"7g6ntu"}],["path",{d:"m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"ijws7r"}],["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M12 3v18",key:"108xh3"}
520],["path",{d:"M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2",key:"3gwbw2"}]],FB=Ae("Scale",KJ);/** 521 * @license lucide-react v0.475.0 - ISC 522 * 523 * This source code is licensed under the ISC license. 524 * See the LICENSE file in the root directory of this source tree. 525 */const YJ=[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["path",{d:"M7 12h10",key:"b7w52i"}]],XJ=Ae("ScanLine",YJ);/** 526 * @license lucide-react v0.475.0 - ISC 527 * 528 * This source code is licensed under the ISC license. 529 * See the LICENSE file in the root directory of this source tree. 530 */const QJ=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],al=Ae("Search",QJ);/** 531 * @license lucide-react v0.475.0 - ISC 532 * 533 * This source code is licensed under the ISC license. 534 * See the LICENSE file in the root directory of this source tree. 535 */const ZJ=[["path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",key:"117uat"}],["path",{d:"M6 12h16",key:"s4cdu5"}]],WS=Ae("SendHorizontal",ZJ);/** 536 * @license lucide-react v0.475.0 - ISC 537 * 538 * This source code is licensed under the ISC license. 539 * See the LICENSE file in the root directory of this source tree. 540 */const JJ=[["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"}]],Bd=Ae("Send",JJ);/** 541 * @license lucide-react v0.475.0 - ISC 542 * 543 * This source code is licensed under the ISC license. 544 * See the LICENSE file in the root directory of this source tree. 545 */const eee=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"M4.5 10H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-.5",key:"tn8das"}],["path",{d:"M4.5 14H4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-.5",key:"1g2pve"}],["path",{d:"M6 6h.01",key:"1utrut"}],["path",{d:"M6 18h.01",key:"uhywen"}],["path",{d:"m15.7 13.4-.9-.3",key:"1jwmzr"}],["path",{d:"m9.2 10.9-.9-.3",key:"qapnim"}],["path",{d:"m10.6 15.7.3-.9",key:"quwk0k"}],["path",{d:"m13.6 15.7-.4-1",key:"cb9xp7"}],["path",{d:"m10.8 9.3-.4-1",key:"1uaiz5"}],["path",{d:"m8.3 13.6 1-.4",key:"s6srou"}],["path",{d:"m14.7 10.8 1-.4",key:"4d31cq"}],["path",{d:"m13.4 8.3-.3.9",key:"1bm987"}]],tee=Ae("ServerCog",eee);/** 546 * @license lucide-react v0.475.0 - ISC 547 * 548 * This source code is licensed under the ISC license. 549 * See the LICENSE file in the root directory of this source tree. 550 */const ree=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],fc=Ae("Server",ree);/** 551 * @license lucide-react v0.475.0 - ISC 552 * 553 * This source code is licensed under the ISC license. 554 * See the LICENSE file in the root directory of this source tree. 555 */const nee=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],ji=Ae("Settings",nee);/** 556 * @license lucide-react v0.475.0 - ISC 557 * 558 * This source code is licensed under the ISC license. 559 * See the LICENSE file in the root directory of this source tree. 560 */const aee=[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]],zk=Ae("Share2",aee);/** 561 * @license lucide-react v0.475.0 - ISC 562 * 563 * This source code is licensed under the ISC license. 564 * See the LICENSE file in the root directory of this source tree. 565 */const iee=[["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["polyline",{points:"16 6 12 2 8 6",key:"m901s6"}],["line",{x1:"12",x2:"12",y1:"2",y2:"15",key:"1p0rca"}]],GS=Ae("Share",iee);/** 566 * @license lucide-react v0.475.0 - ISC 567 * 568 * This source code is licensed under the ISC license. 569 * See the LICENSE file in the root directory of this source tree. 570 */const see=[["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
570y:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],oee=Ae("ShieldAlert",see);/** 571 * @license lucide-react v0.475.0 - ISC 572 * 573 * This source code is licensed under the ISC license. 574 * See the LICENSE file in the root directory of this source tree. 575 */const lee=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Yh=Ae("ShieldCheck",lee);/** 576 * @license lucide-react v0.475.0 - ISC 577 * 578 * This source code is licensed under the ISC license. 579 * See the LICENSE file in the root directory of this source tree. 580 */const cee=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],Ar=Ae("Shield",cee);/** 581 * @license lucide-react v0.475.0 - ISC 582 * 583 * This source code is licensed under the ISC license. 584 * See the LICENSE file in the root directory of this source tree. 585 */const uee=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]],z4=Ae("Smile",uee);/** 586 * @license lucide-react v0.475.0 - ISC 587 * 588 * This source code is licensed under the ISC license. 589 * See the LICENSE file in the root directory of this source tree. 590 */const dee=[["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"}]],er=Ae("Sparkles",dee);/** 591 * @license lucide-react v0.475.0 - ISC 592 * 593 * This source code is licensed under the ISC license. 594 * See the LICENSE file in the root directory of this source tree. 595 */const fee=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],Oh=Ae("SquarePen",fee);/** 596 * @license lucide-react v0.475.0 - ISC 597 * 598 * This source code is licensed under the ISC license. 599 * See the LICENSE file in the root directory of this source tree. 600 */const hee=[["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"}]],Kr=Ae("Star",hee);/** 601 * @license lucide-react v0.475.0 - ISC 602 * 603 * This source code is licensed under the ISC license. 604 * See the LICENSE file in the root directory of this source tree. 605 */const mee=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],Xo=Ae("Target",mee);/** 606 * @license lucide-react v0.475.0 - ISC 607 * 608 * This source code is licensed under the ISC license. 609 * See the LICENSE file in the root directory of this source tree. 610 */const pee=[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]],KS=Ae("Terminal",pee);/** 611 * @license lucide-react v0.475.0 - ISC 612 * 613 * This source code is licensed under the ISC license. 614 * See the LICENSE file in the root directory of this source tree. 615 */const gee=[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]],yee=Ae("ThumbsDown",gee);/** 616 * @license lucide-react v0.475.0 - ISC 617 * 618 * This source code is licensed under the ISC license. 619 * See the LICENSE file in the root directory of this source tree. 620 */const vee=[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]],Ju=Ae("ThumbsUp",vee);
620/** 621 * @license lucide-react v0.475.0 - ISC 622 * 623 * This source code is licensed under the ISC license. 624 * See the LICENSE file in the root directory of this source tree. 625 */const xee=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],bee=Ae("Timer",xee);/** 626 * @license lucide-react v0.475.0 - ISC 627 * 628 * This source code is licensed under the ISC license. 629 * See the LICENSE file in the root directory of this source tree. 630 */const wee=[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"6",ry:"6",key:"f2vt7d"}],["circle",{cx:"16",cy:"12",r:"2",key:"4ma0v8"}]],V4=Ae("ToggleRight",wee);/** 631 * @license lucide-react v0.475.0 - ISC 632 * 633 * This source code is licensed under the ISC license. 634 * See the LICENSE file in the root directory of this source tree. 635 */const jee=[["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"}]],Ud=Ae("Trash2",jee);/** 636 * @license lucide-react v0.475.0 - ISC 637 * 638 * This source code is licensed under the ISC license. 639 * See the LICENSE file in the root directory of this source tree. 640 */const Nee=[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]],Vk=Ae("TrendingDown",Nee);/** 641 * @license lucide-react v0.475.0 - ISC 642 * 643 * This source code is licensed under the ISC license. 644 * See the LICENSE file in the root directory of this source tree. 645 */const _ee=[["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"}]],Qr=Ae("TrendingUp",_ee);/** 646 * @license lucide-react v0.475.0 - ISC 647 * 648 * This source code is licensed under the ISC license. 649 * See the LICENSE file in the root directory of this source tree. 650 */const See=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Ji=Ae("TriangleAlert",See);/** 651 * @license lucide-react v0.475.0 - ISC 652 * 653 * This source code is licensed under the ISC license. 654 * See the LICENSE file in the root directory of this source tree. 655 */const Aee=[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]],BB=Ae("Trophy",Aee);/** 656 * @license lucide-react v0.475.0 - ISC 657 * 658 * This source code is licensed under the ISC license. 659 * See the LICENSE file in the root directory of this source tree. 660 */const kee=[["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"}]],Qo=Ae("Twitter",kee);/** 661 * @license lucide-react v0.475.0 - ISC 662 * 663 * This source code is licensed under the ISC license. 664 * See the LICENSE file in the root directory of this source tree. 665 */const Eee=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]],Ts=Ae("Upload",Eee);/** 666 * @license lucide-react v0.475.0 - ISC 667 * 668 * This source code is licensed under the ISC license. 669 * See the LICENSE file in the root directory of this source tree. 670 */const Tee=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]],Pee=Ae("UserCheck",Tee);/** 671 * @license lucide-react v0.475.0 - ISC 672 * 673 * This source code is licensed under the ISC license. 674 * See the LICENSE file in the root directory of this source tree. 675 */const Cee=[["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:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]],Oee=Ae("UserX",Cee);/** 676 * @license lucide-react v0.475.0 - ISC 677 * 678 * This source code is licensed under the ISC license. 679 * See the LICENSE file in the root directory of this source tree. 680 */const Mee=[["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"}]],Nu=Ae("User",Mee);/** 681 * @license lucide-react v0.475.0 - ISC 682 * 683 * This source code is licensed under the ISC license. 684 * See the LICENSE file in the root directory of this source tree. 685 */const Ree=[["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"}]],la=Ae("Users",Ree);/** 686 * @license lucide-react v0.475.0 - ISC 687 * 688 * This source code is licensed under the ISC license. 689 * See the LICENSE file in the root directory of this source tree. 690 */const Dee=[["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"}]],YS=Ae("Video",Dee);/** 691 * @license lucide-react v0.475.0 - ISC 692 * 693 * This source code is licensed under the ISC license. 694 * See the LICENSE file in the root directory of this source tree. 695 */const Iee=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],XS=Ae("WandSparkles",Iee);/** 696 * @license lucide-react v0.475.0 - ISC 697 * 698 * This source code is licensed under the ISC license. 699 * See the LICENSE file in the root directory of this source tree. 700 */const Lee=[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 5,303 bytes, lines 700-705
700],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ks=Ae("X",Lee);/** 701 * @license lucide-react v0.475.0 - ISC 702 * 703 * This source code is licensed under the ISC license. 704 * See the LICENSE file in the root directory of this source tree. 705 */const $ee=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],ss=Ae("Zap",$ee),Hk="-",Fee=e=>{const t=Uee(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const l=o.split(Hk);return l[0]===""&&l.length!==1&&l.shift(),UB(l,t)||Bee(o)},getConflictingClassGroupIds:(o,l)=>{const c=r[o]||[];return l&&n[o]?[...c,...n[o]]:c}}},UB=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),i=n?UB(e.slice(1),n):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(Hk);return(o=t.validators.find(({validator:l})=>l(s)))==null?void 0:o.classGroupId},H4=/^\[(.+)\]$/,Bee=e=>{if(H4.test(e)){const t=H4.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Uee=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const i in r)QS(r[i],n,i,t);return n},QS=(e,t,r,n)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:W4(t,i);s.classGroupId=r;return}if(typeof i=="function"){if(qee(i)){QS(i(n),t,r,n);return}t.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([s,o])=>{QS(o,W4(t,s),r,n)})})},W4=(e,t)=>{let r=e;return t.split(Hk).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},qee=e=>e.isThemeGetter,zee=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const i=(s,o)=>{r.set(s,o),t++,t>e&&(t=0,n=r,r=new Map)};return{get(s){let o=r.get(s);if(o!==void 0)return o;if((o=n.get(s))!==void 0)return i(s,o),o},set(s,o){r.has(s)?r.set(s,o):i(s,o)}}},ZS="!",JS=":",Vee=JS.length,Hee=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=i=>{const s=[];let o=0,l=0,c=0,d;for(let b=0;b<i.length;b++){let v=i[b];if(o===0&&l===0){if(v===JS){s.push(i.slice(c,b)),c=b+Vee;continue}if(v==="/"){d=b;continue}}v==="["?o++:v==="]"?o--:v==="("?l++:v===")"&&l--}const u=s.length===0?i:i.substring(c),h=Wee(u),m=h!==u,g=d&&d>c?d-c:void 0;return{modifiers:s,hasImportantModifier:m,baseClassName:h,maybePostfixModifierPosition:g}};if(t){const i=t+JS,s=n;n=o=>o.startsWith(i)?s(o.substring(i.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:o,maybePostfixModifierPosition:void 0}}if(r){const i=n;n=s=>r({className:s,parseClassName:i})}return n},Wee=e=>e.endsWith(ZS)?e.substring(0,e.length-1):e.startsWith(ZS)?e.substring(1):e,Gee=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const i=[];let s=[];return n.forEach(o=>{o[0]==="["||t[o]?(i.push(...s.sort(),o),s=[]):s.push(o)}),i.push(...s.sort()),i}},Kee=e=>({cache:zee(e.cacheSize),parseClassName:Hee(e),sortModifiers:Gee(e),...Fee(e)}),Yee=/\s+/,Xee=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:s}=t,o=[],l=e.trim().split(Yee);let c="";for(let d=l.length-1;d>=0;d-=1){const u=l[d],{isExternal:h,modifiers:m,hasImportantModifier:g,baseClassName:b,maybePostfixModifierPosition:v}=r(u);if(h){c=u+(c.length>0?" "+c:c);continue}let y=!!v,x=n(y?b.substring(0,v):b);if(!x){if(!y){c=u+(c.length>0?" "+c:c);continue}if(x=n(b),!x){c=u+(c.length>0?" "+c:c);continue}y=!1}const w=s(m).join(":"),_=g?w+ZS:w,j=_+x;if(o.includes(j))continue;o.push(j);const S=i(x,y);for(let k=0;k<S.length;++k){const T=S[k];o.push(_+T)}c=u+(c.length>0?" "+c:c)}return c};function Qee(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=qB(t))&&(n&&(n+=" "),n+=r);return n}const qB=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=qB(e[n]))&&(r&&(r+=" "),r+=t);return r};function Zee(e,...t){let r,n,i,s=o;function o(c){const d=t.reduce((u,h)=>h(u),e());return r=Kee(d),n=r.cache.get,i=r.cache.set,s=l,l(c)}function l(c){const d=n(c);if(d)return d;const u=Xee(c,r);return i(c,u),u}return function(){return s(Qee.apply(null,arguments))}}const Vr=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},zB=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,VB=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Jee=/^\d+\/\d+$/,ete=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,tte=/\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$/,rte=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,nte=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ate=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,du=e=>Jee.test(e),At=e=>!!e&&!Number.isNaN(Number(e)),wo=e=>!!e&&Number.isInteger(Number(e)),Vw=e=>e.endsWith("%")&&At(e.slice(0,-1)),bs=e=>ete.test(e),ite=()=>!0,ste=e=>tte.test(e)&&!rte.test(e),HB=()=>!1,ote=e=>nte.test(e),lte=e=>ate.test(e),cte=e=>!rt(e)&&!nt(e),ute=e=>qd(e,KB,HB),rt=e=>zB.test(e),El=e=>qd(e,YB,ste),Hw=e=>qd(e,pte,At),G4=e=>qd(e,WB,HB),dte=e=>qd(e,GB,lte),Yg=e=>qd(e,XB,ote),nt=e=>VB.test(e),Qf=e=>zd(e,YB),fte=e=>zd(e,gte),K4=e=>zd(e,WB),hte=e=>zd(e,KB),mte=e=>zd(e,GB),Xg=e=>zd(e,XB,!0),qd=(e,t,r)=>{const n=zB.exec(e);
vendor: 4,475 bytes, line 705
705return n?n[1]?t(n[1]):r(n[2]):!1},zd=(e,t,r=!1)=>{const n=VB.exec(e);return n?n[1]?t(n[1]):r:!1},WB=e=>e==="position"||e==="percentage",GB=e=>e==="image"||e==="url",KB=e=>e==="length"||e==="size"||e==="bg-size",YB=e=>e==="length",pte=e=>e==="number",gte=e=>e==="family-name",XB=e=>e==="shadow",yte=()=>{const e=Vr("color"),t=Vr("font"),r=Vr("text"),n=Vr("font-weight"),i=Vr("tracking"),s=Vr("leading"),o=Vr("breakpoint"),l=Vr("container"),c=Vr("spacing"),d=Vr("radius"),u=Vr("shadow"),h=Vr("inset-shadow"),m=Vr("text-shadow"),g=Vr("drop-shadow"),b=Vr("blur"),v=Vr("perspective"),y=Vr("aspect"),x=Vr("ease"),w=Vr("animate"),_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...j(),nt,rt],k=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],P=()=>[nt,rt,c],M=()=>[du,"full","auto",...P()],C=()=>[wo,"none","subgrid",nt,rt],O=()=>["auto",{span:["full",wo,nt,rt]},wo,nt,rt],D=()=>[wo,"auto",nt,rt],L=()=>["auto","min","max","fr",nt,rt],F=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],U=()=>["start","end","center","stretch","center-safe","end-safe"],G=()=>["auto",...P()],W=()=>[du,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],q=()=>[e,nt,rt],V=()=>[...j(),K4,G4,{position:[nt,rt]}],z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],I=()=>["auto","cover","contain",hte,ute,{size:[nt,rt]}],B=()=>[Vw,Qf,El],H=()=>["","none","full",d,nt,rt],J=()=>["",At,Qf,El],ee=()=>["solid","dashed","dotted","double"],Y=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>[At,Vw,K4,G4],ne=()=>["","none",b,nt,rt],Q=()=>["none",At,nt,rt],ie=()=>["none",At,nt,rt],me=()=>[At,nt,rt],oe=()=>[du,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[bs],breakpoint:[bs],color:[ite],container:[bs],"drop-shadow":[bs],ease:["in","out","in-out"],font:[cte],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[bs],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[bs],shadow:[bs],spacing:["px",At],text:[bs],"text-shadow":[bs],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",du,rt,nt,y]}],container:["container"],columns:[{columns:[At,rt,nt,l]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:S()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],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:[wo,"auto",nt,rt]}],basis:[{basis:[du,"full","auto",l,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[At,du,"auto","initial","none",rt]}],grow:[{grow:["",At,nt,rt]}],shrink:[{shrink:["",At,nt,rt]}],order:[{order:[wo,"first","last","none",nt,rt]}],"grid-cols":[{"grid-cols":C()}],"col-start-end":[{col:O()}],"col-start":[{"col-start":D()}
vendor: 11,014 bytes, line 705
705],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":C()}],"row-start-end":[{row:O()}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":L()}],"auto-rows":[{"auto-rows":L()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...F(),"normal"]}],"justify-items":[{"justify-items":[...U(),"normal"]}],"justify-self":[{"justify-self":["auto",...U()]}],"align-content":[{content:["normal",...F()]}],"align-items":[{items:[...U(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...U(),{baseline:["","last"]}]}],"place-content":[{"place-content":F()}],"place-items":[{"place-items":[...U(),"baseline"]}],"place-self":[{"place-self":["auto",...U()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:G()}],mx:[{mx:G()}],my:[{my:G()}],ms:[{ms:G()}],me:[{me:G()}],mt:[{mt:G()}],mr:[{mr:G()}],mb:[{mb:G()}],ml:[{ml:G()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],w:[{w:[l,"screen",...W()]}],"min-w":[{"min-w":[l,"screen","none",...W()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[o]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",r,Qf,El]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,nt,Hw]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Vw,rt]}],"font-family":[{font:[fte,rt,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,nt,rt]}],"line-clamp":[{"line-clamp":[At,"none",nt,Hw]}],leading:[{leading:[s,...P()]}],"list-image":[{"list-image":["none",nt,rt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",nt,rt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:q()}],"text-color":[{text:q()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[At,"from-font","auto",nt,El]}],"text-decoration-color":[{decoration:q()}],"underline-offset":[{"underline-offset":[At,"auto",nt,rt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",nt,rt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",nt,rt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:V()}],"bg-repeat":[{bg:z()}],"bg-size":[{bg:I()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},wo,nt,rt],radial:["",nt,rt],conic:[wo,nt,rt]},mte,dte]}],"bg-color":[{bg:q()}],"gradient-from-pos":[{from:B()}],"gradient-via-pos":[{via:B()}],"gradient-to-pos":[{to:B()}],"gradient-from":[{from:q()}],"gradient-via":[{via:q()}],"gradient-to":[{to:q()}],rounded:[{rounded:H()}],"rounded-s":[{"rounded-s":H()}],"rounded-e":[{"rounded-e":H()}],"rounded-t":[{"rounded-t":H()}],"rounded-r":[{"rounded-r":H()}],"rounded-b":[{"rounded-b":H()}],"rounded-l":[{"rounded-l":H()}],"rounded-ss":[{"rounded-ss":H()}],"rounded-se":[{"rounded-se":H()}],"rounded-ee":[{"rounded-ee":H()}],"rounded-es":[{"rounded-es":H()}],"rounded-tl":[{"rounded-tl":H()}],"rounded-tr":[{"rounded-tr":H()}],"rounded-br":[{"rounded-br":H()}],"rounded-bl":[{"rounded-bl":H()}],"border-w":[{border:J()}],"border-w-x":[{"border-x":J()}],"border-w-y":[{"border-y":J()}],"border-w-s":[{"border-s":J()}],"border-w-e":[{"border-e":J()}],"border-w-t":[{"border-t":J()}],"border-w-r":[{"border-r":J()}],"border-w-b":[{"border-b":J()}],"border-w-l":[{"border-l":J()}],"divide-x":[{"divide-x":J()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":J()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ee(),"hidden","none"]}],"divide-style":[{divide:[...ee(),"hidden","none"]}],"border-color":[{border:q()}],"border-color-x":[{"border-x":q()}],"border-color-y":[{"border-y":q()}],"border-color-s":[{"border-s":q()}],"border-color-e":[{"border-e":q()}],"border-color-t":[{"border-t":q()}],"border-color-r":[{"border-r":q()}],"border-color-b":[{"border-b":q()}],"border-color-l":[{"border-l":q()}],"divide-color":[{divide:q()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[At,nt,rt]}],"outline-w":[{outline:["",At,Qf,El]}],"outline-color":[{outline:q()}],shadow:[{shadow:["","none",u,Xg,Yg]}],"shadow-color":[{shadow:q()}],"inset-shadow":[{"inset-shadow":["none",h,Xg,Yg]}],"inset-shadow-color":[{"inset-shadow":q()}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:q()}],"ring-offset-w":[{"ring-offset":[At,El]}],"ring-offset-color":[{"ring-offset":q()}],"inset-ring-w":[{"inset-ring":J()}],"inset-ring-color":[{"inset-ring":q()}],"text-shadow":[{"text-shadow":["none",m,Xg,Yg]}],"text-shadow-color":[{"text-shadow":q()}],opacity:[{opacity:[At,nt,rt]}],"mix-blend":[{"mix-blend":[...Y(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Y()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[At]}],"mask-image-linear-from-pos":[{"mask-linear-from":X()}],"mask-image-linear-to-pos":[{"mask-linear-to":X()}],"mask-image-linear-from-color":[{"mask-linear-from":q()}],"mask-image-linear-to-color":[{"mask-linear-to":q()}],"mask-image-t-from-pos":[{"mask-t-from":X()}],"mask-image-t-to-pos":[{"mask-t-to":X()}],"mask-image-t-from-color":[{"mask-t-from":q()}],"mask-image-t-to-color":[{"mask-t-to":q()}],"mask-image-r-from-pos":[{"mask-r-from":X()}],"mask-image-r-to-pos":[{"mask-r-to":X()}],"mask-image-r-from-color":[{"mask-r-from":q()}],"mask-image-r-to-color":[{"mask-r-to":q()}],"mask-image-b-from-pos":[{"mask-b-from":X()}],"mask-image-b-to-pos":[{"mask-b-to":X()}],"mask-image-b-from-color":[{"mask-b-from":q()}],"mask-image-b-to-color":[{"mask-b-to":q()}],"mask-image-l-from-pos":[{"mask-l-from":X()}],"mask-image-l-to-pos":[{"mask-l-to":X()}],"mask-image-l-from-color":[{"mask-l-from":q()}],"mask-image-l-to-color":[{"mask-l-to":q()}],"mask-image-x-from-pos":[{"mask-x-from":X()}],"mask-image-x-to-pos":[{"mask-x-to":X()}],"mask-image-x-from-color":[{"mask-x-from":q()}],"mask-image-x-to-color":[{"mask-x-to":q()}],"mask-image-y-from-pos":[{"mask-y-from":X()}],"mask-image-y-to-pos":[{"mask-y-to":X()}],"mask-image-y-from-color":[{"mask-y-from":q()}],"mask-image-y-to-color":[{"mask-y-to":q()}],"mask-image-radial":[{"mask-radial":[nt,rt]}],"mask-image-radial-from-pos":[{"mask-radial-from":X()}],"mask-image-radial-to-pos":[{"mask-radial-to":X()}],"mask-image-radial-from-color":[{"mask-radial-from":q()}],"mask-image-radial-to-color":[{"mask-radial-to":q()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":j()}],"mask-image-conic-pos":[{"mask-conic":[At]}],"mask-image-conic-from-pos":[{"mask-conic-from":X()}],"mask-image-conic-to-pos":[{"mask-conic-to":X()}],"mask-image-conic-from-color":[{"mask-conic-from":q()}],"mask-image-conic-to-color":[{"mask-conic-to":q()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:V()}],"mask-repeat":[{mask:z()}],"mask-size":[{mask:I()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",nt,rt]}],filter:[{filter:["","none",nt,rt]}],blur:[{blur:ne()}],brightness:[{brightness:[At,nt,rt]}],contrast:[{contrast:[At,nt,rt]}],"drop-shadow":[{"drop-shadow":["","none",g,Xg,Yg]}],"drop-shadow-color":[{"drop-shadow":q()}],grayscale:[{grayscale:["",At,nt,rt]}],"hue-rotate":[{"hue-rotate":[At,nt,rt]}],invert:[{invert:["",At,nt,rt]}],saturate:[{saturate:[At,nt,rt]}],sepia:[{sepia:["",At,nt,rt]}],"backdrop-filter":[{"backdrop-filter":["","none",nt,rt]}],"backdrop-blur":[{"backdrop-blur":ne()}],"backdrop-brightness":[{"backdrop-brightness":[At,nt,rt]}],"backdrop-contrast":[{"backdrop-contrast":[At,nt,rt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",At,nt,rt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[At,nt,rt]}],"backdrop-invert":[{"backdrop-invert":["",At,nt,rt]}],"backdrop-opacity":[{"backdrop-opacity":[At,nt,rt]}],"backdrop-saturate":[{"backdrop-saturate":[At,nt,rt]}],"backdrop-sepia":[{"backdrop-sepia":["",At,nt,rt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",nt,rt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[At,"initial",nt,rt]}],ease:[{ease:["linear","initial",x,nt,rt]}],delay:[{delay:[At,nt,rt]}],animate:[{animate:["none",w,nt,rt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,nt,rt]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:Q()}],"rotate-x":[{"rotate-x":Q()}],"rotate-y":[{"rotate-y":Q()}],"rotate-z":[{"rotate-z":Q()}],scale:[{scale:ie()}],"scale-x":[{"scale-x":ie()}],"scale-y":[{"scale-y":ie()}],"scale-z":[{"scale-z":ie()}],"scale-3d":["scale-3d"],skew:[{skew:me()}],"skew-x":[{"skew-x":me()}],"skew-y":[{"skew-y":me()}],transform:[{transform:[nt,rt,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:oe()}],"translate-x":[{"translate-x":oe()}],"translate-y":[{"translate-y":oe()}],"translate-z":[{"translate-z":oe()}],"translate-none":["translate-none"],accent:[{accent:q()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:q()}
vendor: 5,810 bytes, line 705
705],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",nt,rt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",nt,rt]}],fill:[{fill:["none",...q()]}],"stroke-w":[{stroke:[At,Qf,El,Hw]}],stroke:[{stroke:["none",...q()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},vte=Zee(yte);function Ie(...e){return vte(bt(e))}const QB=A.forwardRef(({...e},t)=>a.jsx("div",{ref:t,className:"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}));QB.displayName="ToastProvider";const ZB=A.forwardRef(({...e},t)=>a.jsx("div",{ref:t,className:"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}));ZB.displayName="ToastViewport";const xte=ap("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"}}),JB=A.forwardRef(({className:e,variant:t,...r},n)=>
705a.jsx("div",{ref:n,className:Ie(xte({variant:t}),e),...r}));JB.displayName="Toast";const bte=A.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:Ie("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 hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));bte.displayName="ToastAction";const e8=A.forwardRef(({className:e,...t},r)=>a.jsx("button",{ref:r,className:Ie("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:a.jsx(Ks,{className:"h-4 w-4"})}));e8.displayName="ToastClose";const t8=A.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:Ie("text-sm font-semibold",e),...t}));t8.displayName="ToastTitle";const r8=A.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:Ie("text-sm opacity-90",e),...t}));r8.displayName="ToastDescription";function wte(){const{toasts:e}=np();return a.jsxs(QB,{children:[e.map(function({id:t,title:r,description:n,action:i,...s}){return a.jsxs(JB,{...s,children:[a.jsxs("div",{className:"grid gap-1",children:[r&&a.jsx(t8,{children:r}),n&&a.jsx(r8,{children:n})]}),i,a.jsx(e8,{})]},t)}),a.jsx(ZB,{})]})}var op=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(){}},jte={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Po,Pk,yB,Nte=(yB=class{constructor(){dt(this,Po,jte);dt(this,Pk,!1)}setTimeoutProvider(e){Qe(this,Po,e)}setTimeout(e,t){return ue(this,Po).setTimeout(e,t)}clearTimeout(e){ue(this,Po).clearTimeout(e)}setInterval(e,t){return ue(this,Po).setInterval(e,t)}clearInterval(e){ue(this,Po).clearInterval(e)}},Po=new WeakMap,Pk=new WeakMap,yB),Ul=new Nte;function _te(e){setTimeout(e,0)}var hc=typeof window>"u"||"Deno"in globalThis;function aa(){}function Ste(e,t){return typeof e=="function"?e(t):e}function eA(e){return typeof e=="number"&&e>=0&&e!==1/0}function n8(e,t){return Math.max(e+(t||0)-Date.now(),0)}function zo(e,t){return typeof e=="function"?e(t):e}function qa(e,t){return typeof e=="function"?e(t):e}function Y4(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:s,queryKey:o,stale:l}=e;if(o){if(n){if(t.queryHash!==Wk(o,t.options))return!1}else if(!Qh(t.queryKey,o))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||i&&i!==t.state.fetchStatus||s&&!s(t))}function X4(e,t){const{exact:r,status:n,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(r){if(Xh(t.options.mutationKey)!==Xh(s))return!1}else if(!Qh(t.options.mutationKey,s))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Wk(e,t){return((t==null?void 0:t.queryKeyHashFn)||Xh)(e)}function Xh(e){return JSON.stringify(e,(t,r)=>rA(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function Qh(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Qh(e[r],t[r])):!1}var Ate=Object.prototype.hasOwnProperty;function a8(e,t){if(e===t)return e;const r=Q4(e)&&Q4(t);if(!r&&!(rA(e)&&rA(t)))return t;const i=(r?e:Object.keys(e)).length,s=r?t:Object.keys(t),o=s.length,l=r?new Array(o):{};let c=0;for(let d=0;d<o;d++){const u=r?d:s[d],h=e[u],m=t[u];if(h===m){l[u]=h,(r?d<i:Ate.call(e,u))&&c++;continue}if(h===null||m===null||typeof h!="object"||typeof m!="object"){l[u]=m;continue}const g=a8(h,m);l[u]=g,g===h&&c++}return i===o&&c===i?e:l}function tA(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function Q4(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function rA(e){if(!Z4(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Z4(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Z4(e){return Object.prototype.toString.call(e)==="[object Object]"}function kte(e){return new Promise(t=>{Ul.setTimeout(t,e)})}function nA(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?a8(e,t):t}function Ete(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function Tte(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Gk=Symbol();function i8(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Gk?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Pte(e,t){return typeof e=="function"?e(...t):!!e}var Yl,Co,Uu,vB,Cte=(vB=class extends op{constructor(){super();dt(this,Yl);dt(this,Co);dt(this,Uu);Qe(this,Uu,t=>{if(!hc&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){ue(this,Co)||this.setEventListener(ue(this,Uu))}onUnsubscribe(){var t;this.hasListeners()||((t=ue(this,Co))==null||t.call(this),Qe(this,Co,void 0))}setEventListener(t){var r;Qe(this,Uu,t),(r=ue(this,Co))==null||r.call(this),Qe(this,Co,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){ue(this,Yl)!==t&&(Qe(this,Yl,t),this.onFocus())}onFocus(){const t=this.isFocused();
705this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof ue(this,Yl)=="boolean"?ue(this,Yl):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Yl=new WeakMap,Co=new WeakMap,Uu=new WeakMap,vB),Kk=new Cte;function aA(){let e,t;const r=new Promise((i,s)=>{e=i,t=s});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}var Ote=_te;function Mte(){let e=[],t=0,r=l=>{l()},n=l=>{l()},i=Ote;const s=l=>{t?e.push(l):i(()=>{r(l)})},o=()=>{const l=e;e=[],l.length&&i(()=>{n(()=>{l.forEach(c=>{r(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||o()}return c},batchCalls:l=>(...c)=>{s(()=>{l(...c)})},schedule:s,setNotifyFunction:l=>{r=l},setBatchNotifyFunction:l=>{n=l},setScheduler:l=>{i=l}}}var yn=Mte(),qu,Oo,zu,xB,Rte=(xB=class extends op{constructor(){super();dt(this,qu,!0);dt(this,Oo);dt(this,zu);Qe(this,zu,t=>{if(!hc&&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(){ue(this,Oo)||this.setEventListener(ue(this,zu))}onUnsubscribe(){var t;this.hasListeners()||((t=ue(this,Oo))==null||t.call(this),Qe(this,Oo,void 0))}setEventListener(t){var r;Qe(this,zu,t),(r=ue(this,Oo))==null||r.call(this),Qe(this,Oo,t(this.setOnline.bind(this)))}setOnline(t){ue(this,qu)!==t&&(Qe(this,qu,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return ue(this,qu)}},qu=new WeakMap,Oo=new WeakMap,zu=new WeakMap,xB),e0=new Rte;function Dte(e){return Math.min(1e3*2**e,3e4)}function s8(e){return(e??"online")==="online"?e0.isOnline():!0}var iA=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function o8(e){let t=!1,r=0,n;const i=aA(),s=()=>i.status!=="pending",o=v=>{var y;if(!s()){const x=new iA(v);m(x),(y=e.onCancel)==null||y.call(e,x)}},l=()=>{t=!0},c=()=>{t=!1},d=()=>Kk.isFocused()&&(e.networkMode==="always"||e0.isOnline())&&e.canRun(),u=()=>s8(e.networkMode)&&e.canRun(),h=v=>{s()||(n==null||n(),i.resolve(v))},m=v=>{s()||(n==null||n(),i.reject(v))},g=()=>new Promise(v=>{var y;n=x=>{(s()||d())&&v(x)},(y=e.onPause)==null||y.call(e)}).then(()=>{var v;n=void 0,s()||(v=e.onContinue)==null||v.call(e)}),b=()=>{if(s())return;let v;const y=r===0?e.initialPromise:void 0;try{v=y??e.fn()}catch(x){v=Promise.reject(x)}Promise.resolve(v).then(h).catch(x=>{var k;if(s())return;const w=e.retry??(hc?0:3),_=e.retryDelay??Dte,j=typeof _=="function"?_(r,x):_,S=w===!0||typeof w=="number"&&r<w||typeof w=="function"&&w(r,x);if(t||!S){m(x);return}r++,(k=e.onFail)==null||k.call(e,r,x),kte(j).then(()=>d()?void 0:g()).then(()=>{t?m(x):b()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(n==null||n(),i),cancelRetry:l,continueRetry:c,canStart:u,start:()=>(u()?b():g().then(b),i)}}var Xl,bB,l8=(bB=class{constructor(){dt(this,Xl)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),eA(this.gcTime)&&Qe(this,Xl,Ul.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(hc?1/0:300*1e3))}clearGcTimeout(){ue(this,Xl)&&(Ul.clearTimeout(ue(this,Xl)),Qe(this,Xl,void 0))}},Xl=new WeakMap,bB),Ql,Vu,Ua,Zl,rn,Qm,Jl,gi,js,wB,Ite=(wB=class extends l8{constructor(t){super();dt(this,gi);dt(this,Ql);dt(this,Vu);dt(this,Ua);dt(this,Zl);dt(this,rn);dt(this,Qm);dt(this,Jl);Qe(this,Jl,!1),Qe(this,Qm,t.defaultOptions),this.setOptions(t.options),this.observers=[],Qe(this,Zl,t.client),Qe(this,Ua,ue(this,Zl).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Qe(this,Ql,J4(this.options)),this.state=t.state??ue(this,Ql),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=ue(this,rn))==null?void 0:t.promise}setOptions(t){if(this.options={...ue(this,Qm),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=J4(this.options);r.data!==void 0&&(this.setData(r.data,{updatedAt:r.dataUpdatedAt,manual:!0}),Qe(this,Ql,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&ue(this,Ua
vendor: 4,125 bytes, line 705
705).remove(this)}setData(t,r){const n=nA(this.state.data,t,this.options);return Ot(this,gi,js).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){Ot(this,gi,js).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=ue(this,rn))==null?void 0:n.promise;return(i=ue(this,rn))==null||i.cancel(t),r?r.then(aa).catch(aa):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(ue(this,Ql))}isActive(){return this.observers.some(t=>qa(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Gk||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>zo(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:!n8(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=ue(this,rn))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=ue(this,rn))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),ue(this,Ua).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(ue(this,rn)&&(ue(this,Jl)?ue(this,rn).cancel({revert:!0}):ue(this,rn).cancelRetry()),this.scheduleGc()),ue(this,Ua).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ot(this,gi,js).call(this,{type:"invalidate"})}async fetch(t,r){var c,d,u,h,m,g,b,v,y,x,w,_;if(this.state.fetchStatus!=="idle"&&((c=ue(this,rn))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(ue(this,rn))return ue(this,rn).continueRetry(),ue(this,rn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const j=this.observers.find(S=>S.options.queryFn);j&&this.setOptions(j.options)}const n=new AbortController,i=j=>{Object.defineProperty(j,"signal",{enumerable:!0,get:()=>(Qe(this,Jl,!0),n.signal)})},s=()=>{const j=i8(this.options,r),k=(()=>{const T={client:ue(this,Zl),queryKey:this.queryKey,meta:this.meta};return i(T),T})();return Qe(this,Jl,!1),this.options.persister?this.options.persister(j,k,this):j(k)},l=(()=>{const j={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:ue(this,Zl),state:this.state,fetchFn:s};return i(j),j})();(d=this.options.behavior)==null||d.onFetch(l,this),Qe(this,Vu,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=l.fetchOptions)==null?void 0:u.meta))&&Ot(this,gi,js).call(this,{type:"fetch",meta:(h=l.fetchOptions)==null?void 0:h.meta}),Qe(this,rn,o8({initialPromise:r==null?void 0:r.initialPromise,fn:l.fetchFn,onCancel:j=>{j instanceof iA&&j.revert&&this.setState({...ue(this,Vu),fetchStatus:"idle"}),n.abort()},onFail:(j,S)=>{Ot(this,gi,js).call(this,{type:"failed",failureCount:j,error:S})},onPause:()=>{Ot(this,gi,js).call(this,{type:"pause"})},onContinue:()=>{Ot(this,gi,js).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const j=await ue(this,rn).start();if(j===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(j),(g=(m=ue(this,Ua).config).onSuccess)==null||g.call(m,j,this),(v=(b=ue(this,Ua).config).onSettled)==null||v.call(b,j,this.state.error,this),j}catch(j){if(j instanceof iA){if(j.silent)return ue(this,rn).promise;if(j.revert){if(this.state.data===void 0)throw j;return this.state.data}}throw Ot(this,gi,js).call(this,{type:"error",error:j}
vendor: 14,759 bytes, line 705
705),(x=(y=ue(this,Ua).config).onError)==null||x.call(y,j,this),(_=(w=ue(this,Ua).config).onSettled)==null||_.call(w,this.state.data,j,this),j}finally{this.scheduleGc()}}},Ql=new WeakMap,Vu=new WeakMap,Ua=new WeakMap,Zl=new WeakMap,rn=new WeakMap,Qm=new WeakMap,Jl=new WeakMap,gi=new WeakSet,js=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,...c8(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...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}};return Qe(this,Vu,t.manual?i:void 0),i;case"error":const s=t.error;return{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),yn.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),ue(this,Ua).notify({query:this,type:"updated",action:t})})},wB);function c8(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:s8(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function J4(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 ra,Mt,Zm,Ln,ec,Hu,Ss,Mo,Jm,Wu,Gu,tc,rc,Ro,Ku,Xt,yh,sA,oA,lA,cA,uA,dA,fA,u8,jB,Lte=(jB=class extends op{constructor(t,r){super();dt(this,Xt);dt(this,ra);dt(this,Mt);dt(this,Zm);dt(this,Ln);dt(this,ec);dt(this,Hu);dt(this,Ss);dt(this,Mo);dt(this,Jm);dt(this,Wu);dt(this,Gu);dt(this,tc);dt(this,rc);dt(this,Ro);dt(this,Ku,new Set);this.options=r,Qe(this,ra,t),Qe(this,Mo,null),Qe(this,Ss,aA()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(ue(this,Mt).addObserver(this),eM(ue(this,Mt),this.options)?Ot(this,Xt,yh).call(this):this.updateResult(),Ot(this,Xt,cA).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return hA(ue(this,Mt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return hA(ue(this,Mt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ot(this,Xt,uA).call(this),Ot(this,Xt,dA).call(this),ue(this,Mt).removeObserver(this)}setOptions(t){const r=this.options,n=ue(this,Mt);if(this.options=ue(this,ra).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof qa(this.options.enabled,ue(this,Mt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ot(this,Xt,fA).call(this),ue(this,Mt).setOptions(this.options),r._defaulted&&!tA(this.options,r)&&ue(this,ra).getQueryCache().notify({type:"observerOptionsUpdated",query:ue(this,Mt),observer:this});const i=this.hasListeners();i&&tM(ue(this,Mt),n,this.options,r)&&Ot(this,Xt,yh).call(this),this.updateResult(),i&&(ue(this,Mt)!==n||qa(this.options.enabled,ue(this,Mt))!==qa(r.enabled,ue(this,Mt))||zo(this.options.staleTime,ue(this,Mt))!==zo(r.staleTime,ue(this,Mt)))&&Ot(this,Xt,sA).call(this);const s=Ot(this,Xt,oA).call(this);i&&(ue(this,Mt)!==n||qa(this.options.enabled,ue(this,Mt))!==qa(r.enabled,ue(this,Mt))||s!==ue(this,Ro))&&Ot(this,Xt,lA).call(this,s)}getOptimisticResult(t){const r=ue(this,ra).getQueryCache().build(ue(this,ra),t),n=this.createResult(r,t);return Fte(this,n)&&(Qe(this,Ln,n),Qe(this,Hu,this.options),Qe(this,ec,ue(this,Mt).state)),n}getCurrentResult(){return ue(this,Ln)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),i==="promise"&&!this.options.experimental_prefetchInRender&&ue(this,Ss).status==="pending"&&ue(this,Ss).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(n,i))})}trackProp(t){ue(this,Ku).add(t)}getCurrentQuery(){return ue(this,Mt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=ue(this,ra).defaultQueryOptions(t),n=ue(this,ra).getQueryCache().build(ue(this,ra),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Ot(this,Xt,yh).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),ue(this,Ln)))}createResult(t,r){var M;const n=ue(this,Mt),i=this.options,s=ue(this,Ln),o=ue(this,ec),l=ue(this,Hu),d=t!==n?t.state:ue(this,Zm),{state:u}=t;let h={...u},m=!1,g;if(r._optimisticResults){const C=this.hasListeners(),O=!C&&eM(t,r),D=C&&tM(t,n,r,i);(O||D)&&(h={...h,...c8(u.data,t.options)}),r._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:b,errorUpdatedAt:v,status:y}=h;g=h.data;let x=!1;if(r.placeholderData!==void 0&&g===void 0&&y==="pending"){let C;s!=null&&s.isPlaceholderData&&r.placeholderData===(l==null?void 0:l.placeholderData)?(C=s.data,x=!0):C=typeof r.placeholderData=="function"?r.placeholderData((M=ue(this,Gu))==null?void 0:M.state.data,ue(this,Gu)):r.placeholderData,C!==void 0&&(y="success",g=nA(s==null?void 0:s.data,C,r),m=!0)}if(r.select&&g!==void 0&&!x)if(s&&g===(o==null?void 0:o.data)&&r.select===ue(this,Jm))g=ue(this,Wu);else try{Qe(this,Jm,r.select),g=r.select(g),g=nA(s==null?void 0:s.data,g,r),Qe(this,Wu,g),Qe(this,Mo,null)}catch(C){Qe(this,Mo,C)}ue(this,Mo)&&(b=ue(this,Mo),g=ue(this,Wu),v=Date.now(),y="error");const w=h.fetchStatus==="fetching",_=y==="pending",j=y==="error",S=_&&w,k=g!==void 0,P={status:y,fetchStatus:h.fetchStatus,isPending:_,isSuccess:y==="success",isError:j,isInitialLoading:S,isLoading:S,data:g,dataUpdatedAt:h.dataUpdatedAt,error:b,errorUpdatedAt:v,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>d.dataUpdateCount||h.errorUpdateCount>d.errorUpdateCount,isFetching:w,isRefetching:w&&!_,isLoadingError:j&&!k,isPaused:h.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:j&&k,isStale:Yk(t,r),refetch:this.refetch,promise:ue(this,Ss),isEnabled:qa(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const C=L=>{P.status==="error"?L.reject(P.error):P.data!==void 0&&L.resolve(P.data)},O=()=>{const L=Qe(this,Ss,P.promise=aA());C(L)},D=ue(this,Ss);switch(D.status){case"pending":t.queryHash===n.queryHash&&C(D);break;case"fulfilled":(P.status==="error"||P.data!==D.value)&&O();break;case"rejected":(P.status!=="error"||P.error!==D.reason)&&O();break}}return P}updateResult(){const t=ue(this,Ln),r=this.createResult(ue(this,Mt),this.options);if(Qe(this,ec,ue(this,Mt).state),Qe(this,Hu,this.options),ue(this,ec).data!==void 0&&Qe(this,Gu,ue(this,Mt)),tA(r,t))return;Qe(this,Ln,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,s=typeof i=="function"?i():i;if(s==="all"||!s&&!ue(this,Ku).size)return!0;const o=new Set(s??ue(this,Ku));return this.options.throwOnError&&o.add("error"),Object.keys(ue(this,Ln)).some(l=>{const c=l;return ue(this,Ln)[c]!==t[c]&&o.has(c)})};Ot(this,Xt,u8).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ot(this,Xt,cA).call(this)}},ra=new WeakMap,Mt=new WeakMap,Zm=new WeakMap,Ln=new WeakMap,ec=new WeakMap,Hu=new WeakMap,Ss=new WeakMap,Mo=new WeakMap,Jm=new WeakMap,Wu=new WeakMap,Gu=new WeakMap,tc=new WeakMap,rc=new WeakMap,Ro=new WeakMap,Ku=new WeakMap,Xt=new WeakSet,yh=function(t){Ot(this,Xt,fA).call(this);let r=ue(this,Mt).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(aa)),r},sA=function(){Ot(this,Xt,uA).call(this);const t=zo(this.options.staleTime,ue(this,Mt));if(hc||ue(this,Ln).isStale||!eA(t))return;const n=n8(ue(this,Ln).dataUpdatedAt,t)+1;Qe(this,tc,Ul.setTimeout(()=>{ue(this,Ln).isStale||this.updateResult()},n))},oA=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(ue(this,Mt)):this.options.refetchInterval)??!1},lA=function(t){Ot(this,Xt,dA).call(this),Qe(this,Ro,t),!(hc||qa(this.options.enabled,ue(this,Mt))===!1||!eA(ue(this,Ro))||ue(this,Ro)===0)&&Qe(this,rc,Ul.setInterval(()=>{(this.options.refetchIntervalInBackground||Kk.isFocused())&&Ot(this,Xt,yh).call(this)},ue(this,Ro)))},cA=function(){Ot(this,Xt,sA).call(this),Ot(this,Xt,lA).call(this,Ot(this,Xt,oA).call(this))},uA=function(){ue(this,tc)&&(Ul.clearTimeout(ue(this,tc)),Qe(this,tc,void 0))},dA=function(){ue(this,rc)&&(Ul.clearInterval(ue(this,rc)),Qe(this,rc,void 0))},fA=function(){const t=ue(this,ra).getQueryCache().build(ue(this,ra),this.options);if(t===ue(this,Mt))return;const r=ue(this,Mt);Qe(this,Mt,t),Qe(this,Zm,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},u8=function(t){yn.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(ue(this,Ln))}),ue(this,ra).getQueryCache().notify({query:ue(this,Mt),type:"observerResultsUpdated"})})},jB);function $te(e,t){return qa(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function eM(e,t){return $te(e,t)||e.state.data!==void 0&&hA(e,t,t.refetchOnMount)}function hA(e,t,r){if(qa(t.enabled,e)!==!1&&zo(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Yk(e,t)}return!1}function tM(e,t,r,n){return(e!==t||qa(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Yk(e,r)}function Yk(e,t){return qa(t.enabled,e)!==!1&&e.isStaleByTime(zo(t.staleTime,e))}function Fte(e,t){return!tA(e.getCurrentResult(),t)}function rM(e){return{onFetch:(t,r)=>{var u,h,m,g,b;const n=t.options,i=(m=(h=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:h.fetchMore)==null?void 0:m.direction,s=((g=t.state.data)==null?void 0:g.pages)||[],o=((b=t.state.data)==null?void 0:b.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const d=async()=>{let v=!1;const y=_=>{Object.defineProperty(_,"signal",{enumerable:!0,get:()=>(t.signal.aborted?v=!0:t.signal.addEventListener("abort",()=>{v=!0}),t.signal)})},x=i8(t.options,t.fetchOptions),w=async(_,j,S)=>{if(v)return Promise.reject();if(j==null&&_.pages.length)return Promise.resolve(_);const T=(()=>{const O={client:t.client,queryKey:t.queryKey,pageParam:j,direction:S?"backward":"forward",meta:t.options.meta};return y(O),O})(),P=await x(T),{maxPages:M}=t.options,C=S?Tte:Ete;return{pages:C(_.pages,P,M),pageParams:C(_.pageParams,j,M)}};if(i&&s.length){const _=i==="backward",j=_?Bte:nM,S={pages:s,pageParams:o},k=j(n,S);l=await w(S,k,_)}else{const _=e??s.length;do{const j=c===0?o[0]??n.initialPageParam:nM(n,l);if(c>0&&j==null)break;l=await w(l,j),c++}while(c<_)}return l};t.options.persister?t.fetchFn=()=>{var v,y;return(y=(v=t.options).persister)==null?void 0:y.call(v,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=d}}}function nM(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 Bte(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 ep,$i,$n,nc,Fi,No,NB,Ute=(NB=class extends l8{constructor(t){super();dt(this,Fi);dt(this,ep);dt(this,$i);dt(this,$n);dt(this,nc);Qe(this,ep,t.client),this.mutationId=t.mutationId,Qe(this,$n,t.mutationCache),Qe(this,$i,[]),this.state=t.state||qte(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){ue(this,$i).includes(t)||(ue(this,$i).push(t),this.clearGcTimeout(),ue(this,$n).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Qe(this,$i,ue(this,$i).filter(r=>r!==t)),this.scheduleGc(),ue(this,$n).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){ue(this,$i).length||(this.state.status==="pending"?this.scheduleGc():ue(this,$n).remove(this))}continue(){var t;return((t=ue(this,nc))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,l,c,d,u,h,m,g,b,v,y,x,w,_,j,S,k,T,P,M;const r=()=>{Ot(this,Fi,No).call(this,{type:"continue"})},n={client:ue(this,ep),meta:this.options.meta,mutationKey:this.options.mutationKey};Qe(this,nc,o8({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(C,O)=>{Ot(this,Fi,No).call(this,{type:"failed",failureCount:C,error:O})},onPause:()=>{Ot(this,Fi,No).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>ue(this,$n).canRun(this)}));const i=this.state.status==="pending",s=!ue(this,nc).canStart();try{if(i)r();else{Ot(this,Fi,No).call(this,{type:"pending",variables:t,isPaused:s}),await((l=(o=ue(this,$n).config).onMutate)==null?void 0:l.call(o,t,this,n));const O=await((d=(c=this.options).onMutate)==null?void 0:d.call(c,t,n));O!==this.state.context&&Ot(this,Fi,No).call(this,{type:"pending",context:O,variables:t,isPaused:s})}const C=await ue(this,nc).start();return await((h=(u=ue(this,$n).config).onSuccess)==null?void 0:h.call(u,C,t,this.state.context,this,n)),await((g=(m=this.options).onSuccess)==null?void 0:g.call(m,C,t,this.state.context,n)),await((v=(b=ue(this,$n).config).onSettled)==null?void 0:v.call(b,C,null,this.state.variables,this.state.context,this,n)),await((x=(y=this.options).onSettled)==null?void 0:x.call(y,C,null,t,this.state.context,n)),Ot(this,Fi,No).call(this,{type:"success",data:C}),C}catch(C){try{throw await((_=(w=ue(this,$n).config).onError)==null?void 0:_.call(w,C,t,this.state.context,this,n)),await((S=(j=this.options).onError)==null?void 0:S.call(j,C,t,this.state.context,n)),await((T=(k=ue(this,$n).config).onSettled)==null?void 0:T.call(k,void 0,C,this.state.variables,this.state.context,this,n)),await((M=(P=this.options).onSettled)==null?void 0:M.call(P,void 0,C,t,this.state.context,n)),C}finally{Ot(this,Fi,No).call(this,{type:"error",error:C})}}finally{ue(this,$n).runNext(this)}}},ep=new WeakMap,$i=new WeakMap,$n=new WeakMap,nc=new WeakMap,Fi=new WeakSet,No=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};
705case"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),yn.batch(()=>{ue(this,$i).forEach(n=>{n.onMutationUpdate(t)}),ue(this,$n).notify({mutation:this,type:"updated",action:t})})},NB);function qte(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var As,yi,tp,_B,zte=(_B=class extends op{constructor(t={}){super();dt(this,As);dt(this,yi);dt(this,tp);this.config=t,Qe(this,As,new Set),Qe(this,yi,new Map),Qe(this,tp,0)}build(t,r,n){const i=new Ute({client:t,mutationCache:this,mutationId:++Wg(this,tp)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){ue(this,As).add(t);const r=Qg(t);if(typeof r=="string"){const n=ue(this,yi).get(r);n?n.push(t):ue(this,yi).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(ue(this,As).delete(t)){const r=Qg(t);if(typeof r=="string"){const n=ue(this,yi).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&ue(this,yi).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Qg(t);if(typeof r=="string"){const n=ue(this,yi).get(r),i=n==null?void 0:n.find(s=>s.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=Qg(t);if(typeof r=="string"){const i=(n=ue(this,yi).get(r))==null?void 0:n.find(s=>s!==t&&s.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){yn.batch(()=>{ue(this,As).forEach(t=>{this.notify({type:"removed",mutation:t})}),ue(this,As).clear(),ue(this,yi).clear()})}getAll(){return Array.from(ue(this,As))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>X4(r,n))}findAll(t={}){return this.getAll().filter(r=>X4(t,r))}notify(t){yn.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>
vendor: 6,401 bytes, line 705
705r.state.isPaused);return yn.batch(()=>Promise.all(t.map(r=>r.continue().catch(aa))))}},As=new WeakMap,yi=new WeakMap,tp=new WeakMap,_B);function Qg(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Bi,SB,Vte=(SB=class extends op{constructor(t={}){super();dt(this,Bi);this.config=t,Qe(this,Bi,new Map)}build(t,r,n){const i=r.queryKey,s=r.queryHash??Wk(i,r);let o=this.get(s);return o||(o=new Ite({client:t,queryKey:i,queryHash:s,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){ue(this,Bi).has(t.queryHash)||(ue(this,Bi).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=ue(this,Bi).get(t.queryHash);r&&(t.destroy(),r===t&&ue(this,Bi).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){yn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return ue(this,Bi).get(t)}getAll(){return[...ue(this,Bi).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Y4(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Y4(t,n)):r}notify(t){yn.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){yn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){yn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Bi=new WeakMap,SB),wr,Do,Io,Yu,Xu,Lo,Qu,Zu,AB,Hte=(AB=class{constructor(e={}){dt(this,wr);dt(this,Do);dt(this,Io);dt(this,Yu);dt(this,Xu);dt(this,Lo);dt(this,Qu);dt(this,Zu);Qe(this,wr,e.queryCache||new Vte),Qe(this,Do,e.mutationCache||new zte),Qe(this,Io,e.defaultOptions||{}),Qe(this,Yu,new Map),Qe(this,Xu,new Map),Qe(this,Lo,0)}mount(){Wg(this,Lo)._++,ue(this,Lo)===1&&(Qe(this,Qu,Kk.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,wr).onFocus())})),Qe(this,Zu,e0.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,wr).onOnline())})))}unmount(){var e,t;Wg(this,Lo)._--,ue(this,Lo)===0&&((e=ue(this,Qu))==null||e.call(this),Qe(this,Qu,void 0),(t=ue(this,Zu))==null||t.call(this),Qe(this,Zu,void 0))}isFetching(e){return ue(this,wr).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return ue(this,Do).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=ue(this,wr).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=ue(this,wr).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(zo(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return ue(this,wr).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=ue(this,wr).get(n.queryHash),s=i==null?void 0:i.state.data,o=Ste(t,s);if(o!==void 0)return ue(this,wr).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return yn.batch(()=>ue(this,wr).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=ue(this,wr).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=ue(this,wr);yn.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=ue(this,wr);return yn.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=yn.batch(()=>ue(this,wr).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(aa).catch(aa)}invalidateQueries(e,t={}){return yn.batch(()=>(ue(this,wr).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=yn.batch(()=>ue(this,wr).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let s=i.fetch(void 0,r);return r.throwOnError||(s=s.catch(aa)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(n).then(aa)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=ue(this,wr).build(this,t);return r.isStaleByTime(zo(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(aa).catch(aa)}fetchInfiniteQuery(e){return e.behavior=rM(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(aa).catch(aa)}ensureInfiniteQueryData(e){return e.behavior=rM(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return e0.isOnline()?ue(this,Do).resumePausedMutations():Promise.resolve()}getQueryCache(){return ue(this,wr)}getMutationCache(){return ue(this,Do)}getDefaultOptions(){return ue(this,Io)}setDefaultOptions(e){Qe(this,Io,e)}setQueryDefaults(e,t){ue(this,Yu).set(Xh(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...ue(this,Yu).values()],r={};return t.forEach(n=>{Qh(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){ue(this,Xu).set(Xh(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...ue(this,Xu).values()],r={};return t.forEach(n=>{Qh(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...ue(this,Io).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Wk(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===Gk&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...ue(this,Io).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){ue(this,wr).clear(),ue(this,Do).clear()}},wr=new WeakMap,Do=new WeakMap,Io=new WeakMap,Yu=new WeakMap,Xu=new WeakMap,Lo=new WeakMap,Qu=new WeakMap,Zu=new WeakMap,AB),d8=A.createContext(void 0),Wte=e=>{const t=A.useContext(d8);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Gte=({client:e,children:t})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),a.jsx(d8.Provider,{value:e,children:t})),f8=A.createContext(!1),Kte=()=>A.useContext(f8);f8.Provider;function Yte(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}
705var Xte=A.createContext(Yte()),Qte=()=>A.useContext(Xte),Zte=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Jte=e=>{A.useEffect(()=>{e.clearReset()},[e])},ere=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||Pte(r,[e.error,n])),tre=e=>{if(e.suspense){const r=i=>i==="static"?i:Math.max(i??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...i)=>r(n(...i)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},rre=(e,t)=>e.isLoading&&e.isFetching&&!t,nre=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,aM=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function are(e,t,r){var h,m,g,b,v;const n=Kte(),i=Qte(),s=Wte(),o=s.defaultQueryOptions(e);(m=(h=s.getDefaultOptions().queries)==null?void 0:h._experimental_beforeQuery)==null||m.call(h,o),o._optimisticResults=n?"isRestoring":"optimistic",tre(o),Zte(o,i),Jte(i);const l=!s.getQueryCache().get(o.queryHash),[c]=A.useState(()=>new t(s,o)),d=c.getOptimisticResult(o),u=!n&&e.subscribed!==!1;if(A.useSyncExternalStore(A.useCallback(y=>{const x=u?c.subscribe(yn.batchCalls(y)):aa;return c.updateResult(),x},[c,u]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),A.useEffect(()=>{c.setOptions(o)},[o,c]),nre(o,d))throw aM(o,c,i);if(ere({result:d,errorResetBoundary:i,throwOnError:o.throwOnError,query:s.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw d.error;if((b=(g=s.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||b.call(g,o,d),o.experimental_prefetchInRender&&!hc&&rre(d,n)){const y=l?aM(o,c,i):(v=s.getQueryCache().get(o.queryHash))==null?void 0:v.promise;y==null||y.catch(aa).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?d:c.trackResult(d)}function ire(e,t){return are(e,Lte)}const sre=new Hte({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});var lp=Ok();const ore=Ht(lp);/** 706 * @remix-run/router v1.23.0 707 * 708 * Copyright (c) Remix Software Inc. 709 * 710 * This source code is licensed under the MIT license found in the 711 * LICENSE.md file in the root directory of this source tree. 712 * 713 * @license MIT 714 */function Zh(){return Zh=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},Zh.apply(this,arguments)}var $o;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})($o||($o={}));const iM="popstate";function lre(e){e===void 0&&(e={});function t(n,i){let{pathname:s,search:o,hash:l}=n.location;return mA("",{pathname:s,search:o,hash:l},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(n,i){return typeof i=="string"?i:t0(i)}return ure(t,r,null,e)}function $r(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function h8(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function cre(){return Math.random().toString(36).substr(2,8)}function sM(e,t){return{usr:e.state,key:e.key,idx:t}}function mA(e,t,r,n){return r===void 0&&(r=null),Zh({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Vd(t):t,{state:r,key:t&&t.key||n||cre()})}function t0(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 Vd(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 ure(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:s=!1}=n,o=i.history,l=$o.Pop,c=null,d=u();d==null&&(d=0,o.replaceState(Zh({},o.state,{idx:d}),""));function u(){return(o.state||{idx:null}).idx}function h(){l=$o.Pop;let y=u(),x=y==null?null:y-d;d=y,c&&c({action:l,location:v.location,delta:x})}function m(y,x){l=$o.Push;let w=mA(v.location,y,x);d=u()+1;let _=sM(w,d),j=v.createHref(w);try{o.pushState(_,"",j)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;i.location.assign(j)}s&&c&&c({action:l,location:v.location,delta:1})}function g(y,x){l=$o.Replace;let w=mA(v.location,y,x);d=u();let _=sM(w,d),j=v.createHref(w);o.replaceState(_,"",j),s&&c&&c({action:l,location:v.location,delta:0})}function b(y){let x=i.location.origin!=="null"?i.location.origin:i.location.href,w=typeof y=="string"?y:t0(y);return w=w.replace(/ $/,"%20"),$r(x,"No window.location.(origin|href) available to create URL for href: "+w),new URL(w,x)}let v={get action(){return l},get location(){return e(i,o)},listen(y){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(iM,h),c=y,()=>{i.removeEventListener(iM,h),c=null}},createHref(y){return t(i,y)},createURL:b,encodeLocation(y){let x=b(y);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:m,replace:g,go(y){return o.go(y)}};return v}var oM;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(oM||(oM={}));function dre(e,t,r){return r===void 0&&(r="/"),fre(e,t,r)}function fre(e,t,r,n){let i=typeof t=="string"?Vd(t):t,s=Xk(i.pathname||"/",r);if(s==null)return null;let o=m8(e);hre(o);let l=null;for(let c=0;l==null&&c<o.length;++c){let d=Sre(s);l=jre(o[c],d)}return l}function m8(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let i=(s,o,l)=>{let c={relativePath:l===void 0?s.path||"":l,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};c.relativePath.startsWith("/")&&($r(c.relativePath.startsWith(n),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+n+'" is not val
714id. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(n.length));let d=Vo([n,c.relativePath]),u=r.concat(c);s.children&&s.children.length>0&&($r(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+d+'".')),m8(s.children,t,u,d)),!(s.path==null&&!s.index)&&t.push({path:d,score:bre(d,s.index),routesMeta:u})};return e.forEach((s,o)=>{var l;if(s.path===""||!((l=s.path)!=null&&l.includes("?")))i(s,o);else for(let c of p8(s.path))i(s,o,c)}),t}function p8(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),s=r.replace(/\?$/,"");if(n.length===0)return i?[s,""]:[s];let o=p8(n.join("/")),l=[];return l.push(...o.map(c=>c===""?s:[s,c].join("/"))),i&&l.push(...o),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function hre(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:wre(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const mre=/^:[\w-]+$/,pre=3,gre=2,yre=1,vre=10,xre=-2,lM=e=>e==="*";function bre(e,t){let r=e.split("/"),n=r.length;return r.some(lM)&&(n+=xre),t&&(n+=gre),r.filter(i=>!lM(i)).reduce((i,s)=>i+(mre.test(s)?pre:s===""?yre:vre),n)}function wre(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 jre(e,t,r){let{routesMeta:n}=e,i={},s="/",o=[];for(let l=0;l<n.length;++l){let c=n[l],d=l===n.length-1,u=s==="/"?t:t.slice(s.length)||"/",h=Nre({path:c.relativePath,caseSensitive:c.caseSensitive,end:d},u),m=c.route;if(!h)return null;
vendor: 9,241 bytes, lines 714-723
714Object.assign(i,h.params),o.push({params:i,pathname:Vo([s,h.pathname]),pathnameBase:Tre(Vo([s,h.pathnameBase])),route:m}),h.pathnameBase!=="/"&&(s=Vo([s,h.pathnameBase]))}return o}function Nre(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=_re(e.path,e.caseSensitive,e.end),i=t.match(r);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:n.reduce((d,u,h)=>{let{paramName:m,isOptional:g}=u;if(m==="*"){let v=l[h]||"";o=s.slice(0,s.length-v.length).replace(/(.)\/+$/,"$1")}const b=l[h];return g&&!b?d[m]=void 0:d[m]=(b||"").replace(/%2F/g,"/"),d},{}),pathname:s,pathnameBase:o,pattern:e}}function _re(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),h8(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,l,c)=>(n.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function Sre(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return h8(!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 Xk(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 Are(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?Vd(e):e;return{pathname:r?r.startsWith("/")?r:kre(r,t):t,search:Pre(n),hash:Cre(i)}}function kre(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 Ww(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 Ere(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function g8(e,t){let r=Ere(e);return t?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function y8(e,t,r,n){n===void 0&&(n=!1);let i;typeof e=="string"?i=Vd(e):(i=Zh({},e),$r(!i.pathname||!i.pathname.includes("?"),Ww("?","pathname","search",i)),$r(!i.pathname||!i.pathname.includes("#"),Ww("#","pathname","hash",i)),$r(!i.search||!i.search.includes("#"),Ww("#","search","hash",i)));let s=e===""||i.pathname==="",o=s?"/":i.pathname,l;if(o==null)l=r;else{let h=t.length-1;if(!n&&o.startsWith("..")){let m=o.split("/");for(;m[0]==="..";)m.shift(),h-=1;i.pathname=m.join("/")}l=h>=0?t[h]:"/"}let c=Are(i,l),d=o&&o!=="/"&&o.endsWith("/"),u=(s||o===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(d||u)&&(c.pathname+="/"),c}const Vo=e=>e.join("/").replace(/\/\/+/g,"/"),Tre=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Pre=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Cre=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Ore(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const v8=["post","put","patch","delete"];new Set(v8);const Mre=["get",...v8];new Set(Mre);/** 715 * React Router v6.30.1 716 * 717 * Copyright (c) Remix Software Inc. 718 * 719 * This source code is licensed under the MIT license found in the 720 * LICENSE.md file in the root directory of this source tree. 721 * 722 * @license MIT 723 */function Jh(){return Jh=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},Jh.apply(this,arguments)}const Qk=A.createContext(null),Rre=A.createContext(null),Cc=A.createContext(null),Pv=A.createContext(null),Oc=A.createContext({outlet:null,matches:[],isDataRoute:!1}),x8=A.createContext(null);function Dre(e,t){let{relative:r}=t===void 0?{}:t;cp()||$r(!1);let{basename:n,navigator:i}=A.useContext(Cc),{hash:s,pathname:o,search:l}=w8(e,{relative:r}),c=o;return n!=="/"&&(c=o==="/"?n:Vo([n,o])),i.createHref({pathname:c,search:l,hash:s})}function cp(){return A.useContext(Pv)!=null}function os(){return cp()||$r(!1),A.useContext(Pv).location}function b8(e){A.useContext(Cc).static||A.useLayoutEffect(e)}function Hd(){let{isDataRoute:e}=A.useContext(Oc);return e?Kre():Ire()}function Ire(){cp()||$r(!1);let e=A.useContext(Qk),{basename:t,future:r,navigator:n}=A.useContext(Cc),{matches:i}=A.useContext(Oc),{pathname:s}=os(),o=JSON.stringify(g8(i,r.v7_relativeSplatPath)),l=A.useRef(!1);return b8(()=>{l.current=!0}),A.useCallback(function(d,u){if(u===void 0&&(u={}),!l.current)return;if(typeof d=="number"){n.go(d);return}let h=y8(d,JSON.parse(o),s,u.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:Vo([t,h.pathname])),(u.replace?n.replace:n.push)(h,u.state,u)},[t,n,o,s,e])}function w8(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=A.useContext(Cc),{matches:i}=A.useContext(Oc),{pathname:s}=os(),o=JSON.stringify(g8(i,n.v7_relativeSplatPath));return A.useMemo(()=>y8(e,JSON.parse(o),s,r==="path"),[e,o,s,r])}function Lre(e,t){return $re(e,t)}function $re(e,t,r,n){cp()||$r(!1);let{navigator:i}=A.useContext(Cc),{matches:s}=A.useContext(Oc),o=s[s.length-1],l=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:"/";o&&o.route;let d=os(),u;if(t){var h;let y=typeof t=="string"?Vd(t):t;c==="/"||(h=y.pathname)!=null&&h.startsWith(c)||$r(!1),u=y}else u=d;let m=u.pathname||"/",g=m;if(c!=="/"){let y=c.replace(/^\//,"").split("/");g="/"+m.replace(/^\//,"").split("/").slice(y.length).join("/")}let b=dre(e,{pathname:g}),v=zre(b&&b.map(y=>Object.assign({},y,{params:Object.assign({},l,y.params),pathname:Vo([c,i.encodeLocation?i.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?c:Vo([c,i.encodeLocation?i.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),s,r,n);return t&&v?A.createElement(Pv.Provider,{value:{location:Jh({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:$o.Pop}},v):v}function Fre(){let e=Gre(),t=Ore(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 A.createElement(A.Fragment,null,A.createElement("h2",null,"Unexpected Application Error!"),A.createElement("h3",{style:{fontStyle:"italic"}},t),r?A.createElement("pre",{style:i},r):null,null)}const Bre=A.createElement(Fre,null);class Ure extends A.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?A.createElement(Oc.Provider,{value:this.props.routeContext},A.createElement(x8.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function qre(e){let{routeContext:t,match:r,children:n}=e,i=A.useContext(Qk);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),A.createElement(Oc.Provider,{value:t},n)}function zre(e,t,r,n){var i;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var s;if(!r)return null;if(r.errors)e=r.matches;else if((s=n)!=null&&s.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,l=(i=r)==null?void 0:i.errors;if(l!=null){let u=o.findIndex(h=>h.route.id&&(l==null?void 0:l[h.route.id])!==void 0);u>=0||$r(!1),o=o.slice(0,Math.min(o.length,u+1))}let c=!1,d=-1;if(r&&n&&n.v7_partialHydration)for(let u=0;u<o.length;u++){let h=o[u];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(d=u),h.route.id){let{loaderData:m,errors:g}=r,b=h.route.loader&&m[h.route.id]===void 0&&(!g||g[h.route.id]===void 0);if(h.route.lazy||b){c=!0,d>=0?o=o.slice(0,d+1):o=[o[0]];break}}}return o.reduceRight((u,h,m)=>{let g,b=!1,v=null,y=null;r&&(g=l&&h.route.id?l[h.route.id]:void 0,v=h.route.errorElement||Bre,c&&(d<0&&m===0?(Yre("route-fallback"),b=!0,y=null):d===m&&(b=!0,y=h.route.hydrateFallbackElement||null)));let x=t.concat(o.slice(0,m+1)),w=()=>{let _;return g?_=v:b?_=y:h.route.Component?_=A.createElement(h.route.Component,null):h.route.element?_=h.route.element:_=u,A.createElement(qre,{match:h,routeC
723ontext:{outlet:u,matches:x,isDataRoute:r!=null},children:_})};return r&&(h.route.ErrorBoundary||h.route.errorElement||m===0)?A.createElement(Ure,{location:r.location,revalidation:r.revalidation,component:v,error:g,children:w(),routeContext:{outlet:null,matches:x,isDataRoute:!0}}):w()},null)}var j8=(function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e})(j8||{}),N8=(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})(N8||{});function Vre(e){let t=A.useContext(Qk);return t||$r(!1),t}function Hre(e){let t=A.useContext(Rre);return t||$r(!1),t}function Wre(e){let t=A.useContext(Oc);return t||$r(!1),t}function _8(e){let t=Wre(),r=t.matches[t.matches.length-1];return r.route.id||$r(!1),r.route.id}function Gre(){var e;let t=A.useContext(x8),r=Hre(),n=_8();return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function Kre(){let{router:e}=Vre(j8.UseNavigateStable),t=_8(N8.UseNavigateStable),r=A.useRef(!1);return b8(()=>{r.current=!0}),A.useCallback(function(i,s){s===void 0&&(s={}),r.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Jh({fromRouteId:t},s)))},[e,t])}const cM={};function Yre(e,t,r){cM[e]||(cM[e]=!0)}function Xre(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function vh(e){$r(!1)}function Qre(e){let{basename:t="/",children:r=null,location:n,navigationType:i=$o.Pop,navigator:s,static:o=!1,future:l}=e;cp()&&$r(!1);let c=t.replace(/^\/*/,"/"),d=A.useMemo(()=>({basename:c,navigator:s,static:o,future:Jh({v7_relativeSplatPath:!1},l)}),[c,l,s,o]);typeof n=="string"&&(n=Vd(n));let{pathname:u="/",search:h="",hash:m="",state:g=null,key:b="default"}=n,v=A.useMemo(()=>{let y=Xk(u,c);return y==null?null:{location:{pathname:y,search:h,hash:m,state:g,key:b},navigationType:i}},[c,u,h,m,g,b,i]);return v==null?null:A.createElement(Cc.Provider,{value:d},A.createElement(Pv.Provider,{children:r,value:v}))}function Zre(e){let{children:t,location:r}=e;return Lre(pA(t),r)}new Promise(()=>{});function pA(e,t){t===void 0&&(t=[]);let r=[];return A.Children.forEach(e,(n,i)=>{if(!A.isValidElement(n))return;let s=[...t,i];if(n.type===A.Fragment){r.push.apply(r,pA(n.props.children,s));return}n.type!==vh&&$r(!1),!n.props.index||!n.props.children||$r(!1);let o={id:n.props.id||s.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=pA(n.props.children,s)),r.push(o)}),r}/** 724 * React Router DOM v6.30.1 725 * 726 * Copyright (c) Remix Software Inc. 727 * 728 * This source code is licensed under the MIT license found in the 729 * LICENSE.md file in the root directory of this source tree. 730 * 731 * @license MIT 732 */function gA(){return gA=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},gA.apply(this,arguments)}function Jre(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,s;for(s=0;s<n.length;s++)i=n[s],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function ene(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function tne(e,t){return e.button===0&&(!t||t==="_self")&&!ene(e)}const rne=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],nne="6";try{window.__reactRouterVersion=nne}catch{}const ane="startTransition",uM=Ck[ane];function ine(e){let{basename:t,children:r,future:n,window:i}=e,s=A.useRef();s.current==null&&(s.current=lre({window:i,v5Compat:!0}));let o=s.current,[l,c]=A.useState({action:o.action,location:o.location}),{v7_startTransition:d}=n||{},u=A.useCallback(h=>{d&&uM?uM(()=>c(h)):c(h)},[c,d]);return A.useLayoutEffect(()=>o.listen(u),[o,u]),A.useEffect(()=>Xre(n),[n]),A.createElement(Qre,{basename:t,children:r,location:l.location,navigationType:l.action,navigator:o,future:n})}const sne=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",one=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,pt=A.forwardRef(function(t,r){let{onClick:n,relative:i,reloadDocument:s,replace:o,state:l,target:c,to:d,preventScrollReset:u,viewTransition:h}=t,m=Jre(t,rne),{basename:g}=A.useContext(Cc),b,v=!1;
732if(typeof d=="string"&&one.test(d)&&(b=d,sne))try{let _=new URL(window.location.href),j=d.startsWith("//")?new URL(_.protocol+d):new URL(d),S=Xk(j.pathname,g);j.origin===_.origin&&S!=null?d=S+j.search+j.hash:v=!0}catch{}let y=Dre(d,{relative:i}),x=lne(d,{replace:o,state:l,target:c,preventScrollReset:u,relative:i,viewTransition:h});function w(_){n&&n(_),_.defaultPrevented||x(_)}return A.createElement("a",gA({},m,{href:b||y,onClick:v||s?n:w,ref:r,target:c}))});var dM;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(dM||(dM={}));var fM;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(fM||(fM={}));function lne(e,t){let{target:r,replace:n,state:i,preventScrollReset:s,relative:o,viewTransition:l}=t===void 0?{}:t,c=Hd(),d=os(),u=w8(e,{relative:o});return A.useCallback(h=>{if(tne(h,r)){h.preventDefault();let m=n!==void 0?n:t0(d)===t0(u);c(e,{replace:m,state:i,preventScrollReset:s,relative:o,viewTransition:l})}},[d,c,u,n,i,r,e,s,o,l])}function S8(e,t){return function(){return e.apply(t,arguments)}}const{toString:cne}=Object.prototype,{getPrototypeOf:Zo}=Object,{iterator:up,toStringTag:A8}=Symbol,em=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),k8=e=>typeof e=="string"&&(e==="__proto__"||e==="constructor"||e==="prototype"),E8=(e,t,r)=>e===Object.prototype||!r&&t===null,une=e=>{if(!Object.isExtensible(e))return!1;const t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every(r=>{if(k8(r))return!1;const n=Object.getOwnPropertyDescriptor(e,r);return!!n&&n.configurable&&n.writable===!0})},tm=(e,t)=>{let r=e;const n=[];for(;r!=null;){if(n.indexOf(r)!==-1)return!1;n.push(r);const i=Zo(r);if(E8(r,i,r===e))return!1;if(em(r,t))return!0;r=i}return!1},dne=(e,t)=>e!=null&&tm(e,t)?e[t]:void 0,fne=e=>{if(e==null||typeof e!="object"&&typeof e!="function")return e;const t=Zo(e);if(t===null&&une(e))return e;const r=Object.create(null),n=Object.create(null),i=[];let s=e;for(;s!=null&&i.indexOf(s)===-1;){i.push(s);const o=s===e?t:Zo(s);if(E8(s,o,s===e))break;const l=Object.getOwnPropertyNames(s);Object.getOwnPropertySymbols&&l.push(...Object.getOwnPropertySymbols(s));for(const c of l)k8(c)||em(n,c)||(r[c]=e[c],n[c]=!0);s=o}return r},Zk=(e=>t=>{const r=cne.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Ja=e=>(e=e.toLowerCase(),t=>Zk(t)===e),Cv=e=>t=>typeof t===e,{isArray:mc}=Array,pc=Cv("undefined");function Wd(e){return e!==null&&!pc(e)&&e.constructor!==null&&!pc(e.constructor)&&sa(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const T8=Ja("ArrayBuffer");function hne(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&T8(e.buffer),t}const mne=Cv("string"),sa=Cv("function"),P8=Cv("number"),Gd=e=>e!==null&&typeof e=="object",pne=e=>e===!0||e===!1,Ty=e=>{if(!Gd(e))return!1;const t=Zo(e);return(t===null||t===Object.prototype||Zo(t)===null)&&!tm(e,A8)&&!tm(e,up)},gne=e=>{if(!Gd(e)||Wd(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},yne=Ja("Date"),vne=Ja("File"),xne=e=>!!(e&&typeof e.uri<"u"),bne=e=>e&&typeof e.getParts<"u",wne=Ja("Blob"),jne=Ja("FileList"),Nne=Ja("Set"),_ne=e=>Gd(e)&&sa(e.pipe);function Sne(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const hM=Sne(),mM=typeof hM.FormData<"u"?hM.FormData:void 0,Ane=e=>{if(!e)return!1;if(mM&&e instanceof mM)return!0;const t=Zo(e);if(!t||t===Object.prototype||!sa(e.append))return!1;const r=Zk(e);return r==="formdata"||r==="object"&&sa(e.toString)&&e.toString()==="[object FormData]"},kne=Ja("URLSearchParams"),[Ene,Tne,Pne,Cne]=["ReadableStream","Request","Response","Headers"].map(Ja),One=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function dp(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,i;if(typeof e!="object"&&(e=[e]),mc(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{if(Wd(e))return;const s=r?Object.getOwnPropertyNames(e):Object.keys(e),o=s.length;let l;for(n=0;n<o;n++)l=s[n],t.call(null,e[l],l,e)}}function C8(e,t){if(Wd(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,i;for(;n-- >0;)if(i=r[n],t===i.toLowerCase())return i;return null}const ql=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,O8=e=>!pc(e)&&e!==ql;function yA(...e){const{caseless:t,skipUndefined:r}=O8(this)&&this||{},n={},i=(s,o)=>
vendor: 14,081 bytes, lines 732-734
732{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const l=t&&typeof o=="string"&&C8(n,o)||o,c=em(n,l)?n[l]:void 0;Ty(c)&&Ty(s)?n[l]=yA(c,s):Ty(s)?n[l]=yA({},s):mc(s)?n[l]=s.slice():(!r||!pc(s))&&(n[l]=s)};for(let s=0,o=e.length;s<o;s++){const l=e[s];if(!l||Wd(l)||(dp(l,i),typeof l!="object"||mc(l)))continue;const c=Object.getOwnPropertySymbols(l);for(let d=0;d<c.length;d++){const u=c[d];Vne.call(l,u)&&i(l[u],u)}}return n}const Mne=(e,t,r,{allOwnKeys:n}={})=>(dp(t,(i,s)=>{r&&sa(i)?Object.defineProperty(e,s,{__proto__:null,value:S8(i,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,s,{__proto__:null,value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),e),Rne=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Dne=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),r&&Object.assign(e.prototype,r)},Ine=(e,t,r,n)=>{let i,s,o;const l={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)o=i[s],(!n||n(o,e,t))&&!l[o]&&(t[o]=e[o],l[o]=!0);e=r!==!1&&Zo(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Lne=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},$ne=e=>{if(!e)return null;if(mc(e))return e;let t=e.length;if(!P8(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Fne=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Zo(Uint8Array)),Bne=(e,t)=>{const n=(e&&e[up]).call(e);let i;for(;(i=n.next())&&!i.done;){const s=i.value;t.call(e,s[0],s[1])}},Une=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},qne=Ja("HTMLFormElement"),zne=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),{propertyIsEnumerable:Vne}=Object.prototype,Hne=Ja("RegExp"),M8=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};dp(r,(i,s)=>{let o;(o=t(i,s,e))!==!1&&(n[s]=o||i)}),Object.defineProperties(e,n)},Wne=e=>{M8(e,(t,r)=>{if(sa(e)&&["arguments","caller","callee"].includes(r))return!1;const n=e[r];if(sa(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Gne=(e,t)=>{const r={},n=i=>{i.forEach(s=>{r[s]=!0})};return mc(e)?n(e):n(String(e).split(t)),r},Kne=()=>{},Yne=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Xne(e){return!!(e&&sa(e.append)&&e[A8]==="FormData"&&e[up])}const Qne=e=>{const t=new WeakSet,r=n=>{if(Gd(n)){if(t.has(n))return;if(Wd(n))return n;if(!("toJSON"in n)){t.add(n);let i;if(Nne(n)){i=[];for(const s of n){const o=r(s);!pc(o)&&i.push(o)}}else i=mc(n)?[]:{},dp(n,(s,o)=>{const l=r(s);!pc(l)&&(i[o]=l)});return t.delete(n),i}}return n};return r(e)},Zne=Ja("AsyncFunction"),Jne=e=>e&&(Gd(e)||sa(e))&&sa(e.then)&&sa(e.catch),R8=((e,t)=>e?setImmediate:t?((r,n)=>(ql.addEventListener("message",({source:i,data:s})=>{i===ql&&s===r&&n.length&&n.shift()()},!1),i=>{n.push(i),ql.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",sa(ql.postMessage)),eae=typeof queueMicrotask<"u"?queueMicrotask.bind(ql):typeof process<"u"&&process.nextTick||R8,D8=e=>e!=null&&sa(e[up]),tae=e=>e!=null&&tm(e,up)&&D8(e),ce={isArray:mc,isArrayBuffer:T8,isBuffer:Wd,isFormData:Ane,isArrayBufferView:hne,isString:mne,isNumber:P8,isBoolean:pne,isObject:Gd,isPlainObject:Ty,isEmptyObject:gne,isReadableStream:Ene,isRequest:Tne,isResponse:Pne,isHeaders:Cne,isUndefined:pc,isDate:yne,isFile:vne,isReactNativeBlob:xne,isReactNative:bne,isBlob:wne,isRegExp:Hne,isFunction:sa,isStream:_ne,isURLSearchParams:kne,isTypedArray:Fne,isFileList:jne,forEach:dp,merge:yA,extend:Mne,trim:One,stripBOM:Rne,inherits:Dne,toFlatObject:Ine,kindOf:Zk,kindOfTest:Ja,endsWith:Lne,toArray:$ne,forEachEntry:Bne,matchAll:Une,isHTMLForm:qne,hasOwnProperty:em,hasOwnProp:em,hasOwnInPrototypeChain:tm,getSafeProp:dne,toSafeFlatObject:fne,reduceDescriptors:M8,freezeMethods:Wne,toObjectSet:Gne,toCamelCase:zne,noop:Kne,toFiniteNumber:Yne,findKey:C8,global:ql,isContextDefined:O8,isSpecCompliantForm:Xne,toJSONObject:Qne,isAsyncFn:Zne,isThenable:Jne,setImmediate:R8,asap:eae,isIterable:D8,isSafeIterable:tae},rae=ce.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),nae=e=>{const t={};let r,n,i;return e&&e.split(` 733`).forEach(function(o){i=o.indexOf(":"),r=o.substring(0,i).trim().toLowerCase(),n=o.substring(i+1).trim();const l=ce.hasOwnProp(t,r);!r||l&&ce.hasOwnProp(rae,r)||(r==="set-cookie"?l?t[r].push(n):t[r]=[n]:t[r]=l?t[r]+", "+n:n)}),t};function aae(e){let t=0,r=e.length;for(;t<r;){const n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;r>t;){const n=e.charCodeAt(r-1);if(n!==9&&n!==32)break;r-=1}return t===0&&r===e.length?e:e.slice(t,r)}const iae=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),sae=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Jk(e,t){return ce.isArray(e)?e.map(r=>Jk(r,t)):aae(String(e).replace(t,""))}const oae=e=>Jk(e,iae),lae=e=>Jk(e,sae);function I8(e){const t=Object.create(null);return ce.forEach(e.toJSON(),(r,n)=>{t[n]=lae(r)}),t}const pM=Symbol("internals");function Zf(e){return e&&String(e).trim().toLowerCase()}function Py(e){return e===!1||e==null?e:ce.isArray(e)?e.map(Py):oae(String(e))}function cae(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const uae=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Gw(e){let t=0,r=e.length;for(;t<r;){const n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;r>t;){const n=e.charCodeAt(r-1);if(n!==9&&n!==32)break;r-=1}return t===0&&r===e.length?e:e.slice(t,r)}function dae(e){const t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let r="";for(let n=1;n<t;n++){const i=e.charCodeAt(n);if(i===34||i===92&&(n+=1,n>=t))return e;r+=e[n]}return r}function fae(e){const t=Object.create(null),r=String(e);let n=0,i=!1,s=!1;function o(l){const c=Gw(r.slice(n,l)),d=c.indexOf("=");if(d<1)return;const u=Gw(c.slice(0,d));if(!uae.test(u))return;const h=u.toLowerCase();if(h==="__proto__"||h==="constructor"||h==="prototype")return;const m=Gw(c.slice(d+1));t[h]=dae(m)}for(let l=0;l<r.length;l++){const c=r.charCodeAt(l);i?s?s=!1:c===92?s=!0:c===34&&(i=!1):c===34?i=!0:(c===44||c===59)&&(o(l),n=l+1)}return o(r.length),t}const hae=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Kw(e,t,r,n,i){if(ce.isFunction(n))return n.call(this,t,r);if(i&&(t=r),!!ce.isString(t)){if(ce.isString(n))return t.indexOf(n)!==-1;if(ce.isRegExp(n))return n.test(t)}}function mae(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function pae(e,t){const r=ce.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{__proto__:null,value:function(i,s,o){return this[n].call(this,t,i,s,o)},configurable:!0})})}let Cn=class{constructor(t){t&&this.set(t)}set(t,r,n){const i=this;function s(l,c,d){const u=Zf(c);if(!u)return;const h=ce.findKey(i,u);(!h||i[h]===void 0||d===!0||d===void 0&&i[h]!==!1)&&(i[h||c]=Py(l))}const o=(l,c)=>ce.forEach(l,(d,u)=>s(d,u,c));if(ce.isPlainObject(t)||t instanceof this.constructor)o(t,r);else if(ce.isString(t)&&(t=t.trim())&&!hae(t))o(nae(t),r);else if(ce.isObject(t)&&ce.isSafeIterable(t)){let l=Object.create(null),c,d;for(const u of t){if(!ce.isArray(u))throw new TypeError("Object iterator must return a key-value pair");d=u[0],ce.hasOwnProp(l,d)?(c=l[d],l[d]=ce.isArray(c)?[...c,u[1]]:[c,u[1]]):l[d]=u[1]}o(l,r)}else t!=null&&s(r,t,n);return this}get(t,r){if(t=Zf(t),t){const n=ce.findKey(this,t);if(n){const i=this[n];if(!r)return i;if(r===!0)return cae(i);if(ce.isFunction(r))return r.call(this,i,n);if(ce.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Zf(t),t){const n=ce.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Kw(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let i=!1;function s(o){if(o=Zf(o),o){const l=ce.findKey(n,o);l&&(!r||Kw(n,n[l],l,r))&&(delete n[l],i=!0)}}return ce.isArray(t)?t.forEach(s):s(t),i}clear(t){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const s=r[n];(!t||Kw(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const r=this,n={};return ce.forEach(this,(i,s)=>{const o=ce.findKey(n,s);if(o){r[o]=Py(i),delete r[s];return}const l=t?mae(s):String(s).trim();l!==s&&delete r[s],r[l]=Py(i),n[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return ce.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=t&&ce.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(` 734`)}getSetCookie(){const t=this.get("set-cookie");return ce.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return fae(t)}static concat(t,...r){const n=new this(t);return r.forEach(i=>n.set(i)),n}static accessor(t){const n=(this[pM]=this[pM]={accessors:{}}).accessors,i=this.prototype;function s(o){const l=Zf(o);n[l]||(pae(i,o),n[l]=!0)}return ce.isArray(t)?t.forEach(s):s(t),this}};Cn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ce.reduceDescriptors(Cn.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});ce.freezeMethods(Cn);const r0="[REDACTED ****]";function gae(e){if(ce.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(ce.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function yae(e,t){const r=new Set(t.map(s=>String(s).toLowerCase())),n=[],i=s=>{if(s===null||typeof s!="object"||ce.isBuffer(s))return s;if(n.indexOf(s)!==-1)return;s instanceof Cn&&(s=s.toJSON()),n.push(s);let o;if(ce.isArray(s))o=[],s.forEach((l,c)=>{const d=i(l);ce.isUndefined(d)||(o[c]=d)});else{if(!ce.isPlainObject(s)&&gae(s))return n.pop(),s;o=Object.create(null);for(const[l,c]of Object.entries(s)){const d=r.has(l.toLowerCase())?r0:i(c);ce.isUndefined(d)||(o[l]=d)}}return n.pop(),o};return i(e)}function gM(e){try{return String(e)}catch{return""}}function vae(e){return e.errors.map(r=>{try{return r&&r.message?gM(r.message):gM(r)}catch{return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let Ke=class L8 extends Error{static from(t,r,n,i,s,o){let l=t.message;!l&&ce.isArray(t.errors)&&t.errors.length&&(l=vae(t));const c=new L8(l,r||t.code,n,i,s);return Object.defineProperty(c,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),o&&Object.assign(c,o),c}constructor(t,r,n,i,s){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),n&&(this.config=n),i&&(this.request=i),s&&(this.response=s,this.status=s.status)}toJSON(){const t=this.config,r=t&&ce.hasOwnProp(t,"redact")?t.redact:void 0,n=ce.isArray(r)&&r.length>0?yae(t,r):ce.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};Ke.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Ke.ERR_BAD_OPTION="ERR_BAD_OPTION";Ke.ECONNABORTED="ECONNABORTED";Ke.ETIMEDOUT="ETIMEDOUT";Ke.ECONNREFUSED="ECONNREFUSED";Ke.ERR_NETWORK="ERR_NETWORK";Ke.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Ke.ERR_DEPRECATED="ERR_DEPRECATED";Ke.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Ke.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Ke.ERR_CANCELED="ERR_CANCELED";Ke.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Ke.ERR_INVALID_URL="ERR_INVALID_URL";Ke.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const xae=null,$8=100;function vA(e){return ce.isPlainObject(e)||ce.isArray(e)}function F8(e){return ce.endsWith(e,"[]")?e.slice(0,-2):e}function Yw(e,t,r){return e?e.concat(t).map(function(i,s){return i=F8(i),!r&&s?"["+i+"]":i}).join(r?".":""):t}function bae(e){return ce.isArray(e)&&!e.some(vA)}const wae=ce.toFlatObject(ce,{},null,function(t){return/^is[A-Z]/.test(t)});function Ov(e,t,r){if(!ce.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(w,_)=>{const j=ce.getSafeProp(r,w);return ce.isUndefined(j)?_:j},i=n("metaTokens",!0),s=n("visitor")||v,o=n("dots",!1),l=n("indexes",!1),c=n("Blob")||typeof Blob<"u"&&Blob,d=n("maxDepth",$8),u=c&&ce.isSpecCompliantForm(t),h=[];if(!ce.isFunction(s))throw new TypeError("visitor must be a function");function m(w){if(w===null)return"";if(ce.isDate(w))return w.toISOString();if(ce.isBoolean(w))return w.toString();if(!u&&ce.isBlob(w))throw new Ke("Blob is not supported. Use a Buffer instead.");if(ce.isArrayBuffer(w)||ce.isTypedArray(w)){if(u&&typeof c=="function")return new c([w]);throw new Ke("Blob is not supported. Use a Buffer instead.",Ke.ERR_NOT_SUPPORT)}return w}function g(w){if(w>d)throw new Ke("Object is too deeply nested ("+w+" levels). Max depth: "+d,Ke.ERR_FORM_DATA_DEPTH_EXCEEDED)}function b(w,_){if(d===1/0)return JSON.stringify(w);const j=[];return JSON.stringify(w,function(k,T){if(!ce.isObject(T))return T;for(;j.length&&j[j.length-1]!==this;)j.pop();return j.push(T),g(_+j.length-1),T})}function v(w,_,j){let S=w;if(ce.isReactNative(t)&&ce.isReactNativeBlob(w))return t.append(Yw(j,_,o),m(w)),!1;if(w&&!j&&typeof w=="object"){if(ce.endsWith(_,"{}"))_=i?_:_.slice(0,-2),w=b(w,1);else if(ce.isArray(w)&&bae(w)||(ce.isFileList(w)||ce.endsWith(_,"[]"))&&(S=ce.toArray(w)))return _=F8(_),S.forEac
734h(function(T,P){!(ce.isUndefined(T)||T===null)&&t.append(l===!0?Yw([_],P,o):l===null?_:_+"[]",m(T))}),!1}return vA(w)?!0:(t.append(Yw(j,_,o),m(w)),!1)}const y=Object.assign(wae,{defaultVisitor:v,convertValue:m,isVisitable:vA});function x(w,_,j=0){if(!ce.isUndefined(w)){if(g(j),h.indexOf(w)!==-1)throw new Error("Circular reference detected in "+_.join("."));h.push(w),ce.forEach(w,function(k,T){(!(ce.isUndefined(k)||k===null)&&s.call(t,k,ce.isString(T)?T.trim():T,_,y))===!0&&x(k,_?_.concat(T):[T],j+1)}),h.pop()}}if(!ce.isObject(e))throw new TypeError("data must be an object");return x(e),t}function yM(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(n){return t[n]})}function eE(e,t){this._pairs=[],e&&Ov(e,this,t)}const B8=eE.prototype;B8.append=function(t,r){this._pairs.push([t,r])};B8.toString=function(t){const r=t?n=>t.call(this,n,yM):yM;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function jae(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function U8(e,t,r){if(!t)return e;e=e||"";const n=ce.isFunction(r)?{serialize:r}:r,i=ce.getSafeProp(n,"encode")||jae,s=ce.getSafeProp(n,"serialize");let o;if(s?o=s(t,n):o=ce.isURLSearchParams(t)?t.toString():new eE(t,n).toString(i),o){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}const Jf=Symbol("internals");function q8(e){return e?e.length:0}function vM(e){if(e)for(;e.length&&e[e.length-1]===null;)e.pop()}function eh(e,t){const r=e.handlers,n=q8(r);r!==t.handlersRef?(t.handlersRef=r,t.handlerEntries.clear()):n!==t.handlersLength&&(n?t.handlerEntries.forEach(function(s,o){r[s.index]!==s.handler&&t.handlerEntries.delete(o)}):t.handlerEntries.clear()),t.handlersLength=n}class xM{constructor(){this.handlers=[],this[Jf]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(t,r,n){const i={fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null},s=this[Jf];this.handlers==null&&(this.handlers=[]),eh(this,s);const o=s.nextId++;return this.handlers.push(i),s.handlerEntries.set(o,{handler:i,index:this.handlers.length-1}),s.handlersLength=this.handlers.length,o}eject(t){const r=this[Jf];eh(this,r);const n=r.handlerEntries.get(t);if(n){if(r.handlerEntries.delete(t),this.handlers[n.index]!==n.handler)return;this.handlers[n.index]=null,r.iterationDepth||(vM(this.handlers),r.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],eh(this,this[Jf]))}forEach(t){const r=this[Jf];eh(this,r),r.iterationDepth++;try{ce.forEach(this.handlers,function(i){i!==null&&t(i)})}finally{--r.iterationDepth||(eh(this,r),vM(this.handlers),r.handlersLength=q8(this.handlers))}}}const tE={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Nae=typeof URLSearchParams<"u"?URLSearchParams:eE,_ae=typeof FormData<"u"?FormData:null,Sae=typeof Blob<"u"?Blob:null,Aae={isBrowser:!0,classes:{URLSearchParams:Nae,FormData:_ae,Blob:Sae},protocols:["http","https","file","blob","url","data"]},rE=typeof window<"u"&&typeof document<"u",xA=typeof navigator=="object"&&navigator||void 0,kae=rE&&(!xA||["ReactNative","NativeScript","NS"].indexOf(xA.product)<0),Eae=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Tae=rE&&window.location.href||"http://localhost",Pae=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:rE,hasStandardBrowserEnv:kae,hasStandardBrowserWebWorkerEnv:Eae,navigator:xA,origin:Tae},Symbol.toStringTag,{value:"Module"})),sn={...Pae,...Aae};function Cae(e,t){return Ov(e,new sn.classes.URLSearchParams,{visitor:function(r,n,i,s){return sn.isNode&&ce.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}const bM=$8;function z8(e){if(e>bM)throw new Ke("FormData field is too deeply nested ("+e+" levels). Max depth: "+bM,Ke.ER
vendor: 11,023 bytes, line 734
734R_FORM_DATA_DEPTH_EXCEEDED)}function Oae(e){const t=[],r=/[^.[\]]+|\[([^.[\]]*)]/g;let n;for(;(n=r.exec(e))!==null;)z8(t.length),t.push(n[0]==="[]"?"":n[1]||n[0]);return t}function Mae(e){const t={},r=Object.keys(e);let n;const i=r.length;let s;for(n=0;n<i;n++)s=r[n],t[s]=e[s];return t}function V8(e){function t(r,n,i,s){z8(s);let o=r[s++];if(o==="__proto__")return!0;const l=Number.isFinite(+o),c=s>=r.length;return o=!o&&ce.isArray(i)?i.length:o,c?(ce.hasOwnProp(i,o)?i[o]=ce.isArray(i[o])?i[o].concat(n):[i[o],n]:i[o]=n,!l):((!ce.hasOwnProp(i,o)||!ce.isObject(i[o]))&&(i[o]=[]),t(r,n,i[o],s)&&ce.isArray(i[o])&&(i[o]=Mae(i[o])),!l)}if(ce.isFormData(e)&&ce.isFunction(e.entries)){const r={};return ce.forEachEntry(e,(n,i)=>{t(Oae(n),i,r,0)}),r}return null}const H8=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),fu=(e,t)=>e!=null&&ce.hasOwnProp(e,t)?e[t]:void 0;function Rae(e,t,r){if(ce.isString(e))try{return(t||JSON.parse)(e),ce.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const fp={transitional:tE,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,s=ce.isObject(t);if(s&&ce.isHTMLForm(t)&&(t=new FormData(t)),ce.isFormData(t))return i?JSON.stringify(V8(t)):t;if(ce.isArrayBuffer(t)||ce.isBuffer(t)||ce.isStream(t)||ce.isFile(t)||ce.isBlob(t)||ce.isReadableStream(t))return t;if(ce.isArrayBufferView(t))return t.buffer;if(ce.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(s){const c=fu(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return Cae(t,c).toString();if((l=ce.isFileList(t))||n.indexOf("multipart/form-data")>-1){const d=fu(this,"env"),u=d&&d.FormData;return Ov(l?{"files[]":t}:t,u&&new u,c)}}return s||i?(r.setContentType("application/json",!1),Rae(t)):t}],transformResponse:[function(t){const r=fu(this,"transitional")||fp.transitional,n=r&&r.forcedJSONParsing,i=fu(this,"responseType"),s=i==="json";if(ce.isResponse(t)||ce.isReadableStream(t))return t;if(t&&ce.isString(t)&&(n&&!i||s)){const l=!(r&&r.silentJSONParsing)&&s;try{return JSON.parse(t,fu(this,"parseReviver"))}catch(c){if(l)throw c.name==="SyntaxError"?Ke.from(c,Ke.ERR_BAD_RESPONSE,this,null,fu(this,"response")):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:sn.classes.FormData,Blob:sn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ce.forEach(H8,e=>{fp.headers[e]={}});function Xw(e,t){const r=this||fp,n=t||r,i=Cn.from(n.headers);let s=n.data;return ce.forEach(e,function(l){s=l.call(r,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function W8(e){return!!(e&&e.__CANCEL__)}let hp=class extends Ke{constructor(t,r,n){super(t??"canceled",Ke.ERR_CANCELED,r,n),this.name="CanceledError",this.__CANCEL__=!0}};function G8(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new Ke("Request failed with status code "+r.status,r.status>=400&&r.status<500?Ke.ERR_BAD_REQUEST:Ke.ERR_BAD_RESPONSE,r.config,r.request,r))}const Dae=/[\t\n\r]/g;function K8(e){if(typeof e!="string")return e;let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t).replace(Dae,"")}function Qw(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function Iae(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i=0,s=0,o;return t=t!==void 0?t:1e3,function(c){const d=Date.now(),u=n[s];o||(o=d),r[i]=c,n[i]=d;let h=s,m=0;for(;h!==i;)m+=r[h++],h=h%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),d-o<t)return;const g=u&&d-u;return g?Math.round(m*1e3/g):void 0}}function Lae(e,t){let r=0,n=1e3/t,i,s;const o=(u,h=Date.now())=>{r=h,i=null,s&&(clearTimeout(s),s=null),e(...u)};return[(...u)=>{const h=Date.now(),m=h-r;m>=n?o(u,h):(i=u,s||(s=setTimeout(()=>{s=null,o(i)},n-m)))},()=>i&&o(i),(...u)=>o(u)]}const n0=(e,t,r=3)=>{let n=0;const i=Iae(50,250);return Lae(s=>{if(!s||!ce.isNumber(s.loaded))return;const o=s.loaded,l=s.lengthComputable?s.total:void 0,c=Math.max(0,l!=null?Math.min(o,l):o),d=Math.max(0,c-n),u=i(d);n=Math.max(n,c);const h={loaded:c,total:l,progress:l?c/l:void 0,bytes:d,rate:u||void 0,estimated:u&&l?(l-c)/u:void 0,event:s,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(h)},r)},wM=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},jM=(e,t=ce.asap)=>(...r)=>t(()=>e(...r)),$ae=sn.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,sn.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(sn.origin),sn.navigator&&/(msie|trident)/i.test(sn.navigator.userAgent)):()=>!0,Fae=sn.hasStandardBrowserEnv?{write(e,t,r,n,i,s,o){if(typeof document>"u")return;const l=[`${e}=${encodeURIComponent(t)}`];ce.isNumber(r)&&l.push(`expires=${new Date(r).toUTCString()}`),ce.isString(n)&&l.push(`path=${n}`),ce.isString(i)&&l.push(`domain=${i}`),s===!0&&l.push("secure"),ce.isString(o)&&l.push(`SameSite=${o}`),document.cookie=l.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let r=0;r<t.length;r++){const n=t[r].replace(/^\s+/,""),i=n.indexOf("=");if(i!==-1&&n.slice(0,i)===e)try{return decodeURIComponent(n.slice(i+1))}catch{return n.slice(i+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Bae(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Uae(e,t){if(!t)return e;let r=e.length;for(;r>0&&e.charCodeAt(r-1)===47;)r--;return e.slice(0,r)+"/"+t.replace(/^\/+/,"")}const qae=/^https?:(?!\/\/)/i;function zae(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(t,r,n="")=>`${r}${n}${r0}`)}function Vae(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${r0}@`),r=t.indexOf("#"),i=(r===-1?t:t.slice(0,r)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${r0}`);return r===-1?i:`${i}#${zae(t.slice(r+1))}`}function NM(e,t){if(typeof e=="string"){const r=K8(e);if(qae.test(r))throw new Ke(`Invalid URL ${JSON.stringify(Vae(r))}: missing "//" after protocol`,Ke.ERR_INVALID_URL,t)}}function Y8(e,t,r,n){NM(t,n);let i=!Bae(t);return e&&(i||r===!1)?(NM(e,n),Uae(e,t)):t}const _M=e=>e instanceof Cn?{...e}:e,Hae=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function gc(e,t){e=e||{},t=t||{};const r=Object.create(null);Object.defineProperty(r,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function n(u,h,m,g){return ce.isPlainObject(u)&&ce.isPlainObject(h)?ce.merge.call({caseless:g},u,h):ce.isPlainObject(h)?ce.merge({},h):ce.isArray(h)?h.slice():h}function i(u,h,m,g){if(ce.isUndefined(h)){if(!ce.isUndefined(u))return n(void 0,u,m,g)}else return n(u,h,m,g)}function s(u,h){if(!ce.isUndefined(h))return n(void 0,h)}function o(u,h){if(ce.isUndefined(h)){if(!ce.isUndefined(u))return n(void 0,u)}else return n(void 0,h)}function l(u){const h=ce.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!ce.isUndefined(h))if(ce.isPlainObject(h)){if(ce.hasOwnProp(h,u))return h[u]}else return;const m=ce.hasOwnProp(e,"transitional")?e.transitional:void 0;if(ce.isPlainObject(m)&&ce.hasOwnProp(m,u))return m[u]}function c(u,h,m){if(ce.hasOwnProp(t,m))return n(u,h);if(ce.hasOwnProp(e,m))return n(void 0,u)}const d={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutErrorMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:c,headers:(u,h,m)=>i(_M(u),_M(h),m,!0)};return ce.forEach(Hae({...e,...t}),function(h){if(h==="__proto__"||h==="constructor"||h==="prototype")return;const m=ce.hasOwnProp(d,h)?d[h]:i,g=ce.hasOwnProp(e,h)?e[h]:void 0,b=ce.hasOwnProp(t,h)?t[h]:void 0,v=m(g,b,h);ce.isUndefined(v)&&m!==c||(r[h]=v)}),ce.hasOwnProp(t,"validateStatus")&&ce.isUndefined(t.validateStatus)&&l("validateStatusUndefinedResolves")===!1&&(ce.hasOwnProp(e,"validateStatus")?r.validateStatus=n(void 0,e.validateStatus):delete r.validateStatus),r}const Wae=["content-type","content-length"];function Gae(e,t,r){if(r!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([n,i])=>{Wae.includes(n.toLowerCase())&&e.set(n,i)})}const Kae=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,r)=>String.fromCharCode(parseInt(r,16)));function X8(e){const t=gc({},e),r=m=>ce.hasOwnProp(t,m)?t[m]:void 0,n=r("data");let i=r("withXSRFToken");const s=r("xsrfHeaderName"),o=r("xsrfCookieName");let l=r("headers");const c=r("auth"),d=r("baseURL"),u=r("allowAbsoluteUrls"),h=r("url");if(t.headers=l=Cn.from(l),t.url=U8(Y8(d,h,u,t),r("params"),r("paramsSerializer")),c){const m=ce.getSafeProp(c,"username")||"",g=ce.getSafeProp(c,"password")||"";try{l.set("Authorization","Basic "+btoa(m+":"+(g?Kae(g):"")))}catch(b){throw Ke.from(b,Ke.ERR_BAD_OPTION_VALUE,e)}}if(ce.isFormData(n)){const m=ce.getSafeProp(n,"getHeaders");sn.hasStandardBrowserEnv||sn.hasStandardBrowserWebWorkerEnv||ce.isReactNative(n)?l.setContentType(void 0):ce.isFunction(m)&&Gae(l,m.call(n),r("formDataHeaderPolicy"))}if(sn.hasStandardBrowserEnv&&(ce.isFunction(i)&&(i=i(t)),i===!0||i==null&&$ae(t.url))){const g=s&&o&&Fae.read(o);g&&l.set(s,g)}return t}const Yae=typeof XMLHttpRequest<"u",Xae=Yae&&function(e){return new Promise(function(r,n){const i=X8(e);let s=i.data;const o=Cn.from(i.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:d}=i,u,h,m,g,b,v;function y(){g&&g(),b&&b(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let x=new XMLHttpRequest;x.open(i.method.toUpperCase(),i.url,!0),x.timeout=i.timeout;function w(j){if(!x)return;if(x.status===0&&(Qw(K8(i.url))||Qw(sn.origin))!=="file"&&!(x.responseURL&&x.responseURL.startsWith("file:"))){n(new Ke("Request aborted",Ke.ECONNABORTED,e,x)),y(),x=null;return}try{j?v&&v(j):b&&b()}catch(P){setTimeout(()=>{throw P})}if(!x)return;const S=Cn.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),T={data:!l||l==="text"||l==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:S,config:e,request:x};G8(function(M){r(M),y()},function(M){n(M),y()},T),x=null}"onloadend"in x?x.onloadend=w:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.startsWith("file:"))||setTimeout(w)},x.onabort=function(){x&&(n(new Ke("Request aborted",Ke.ECONNABORTED,e,x)),y(),x=null)},x.onerror=function(S){const k=S&&S.message?S.message:"Network Error",T=new Ke(k,Ke.ERR_NETWORK,e,x);
734T.event=S||null,n(T),y(),x=null},x.ontimeout=function(){let S=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const k=i.transitional||tE;i.timeoutErrorMessage&&(S=i.timeoutErrorMessage),n(new Ke(S,k.clarifyTimeoutError?Ke.ETIMEDOUT:Ke.ECONNABORTED,e,x)),y(),x=null},s===void 0&&o.setContentType(null),"setRequestHeader"in x&&ce.forEach(I8(o),function(S,k){x.setRequestHeader(k,S)}),ce.isUndefined(i.withCredentials)||(x.withCredentials=!!i.withCredentials),l&&l!=="json"&&(x.responseType=i.responseType),d&&([m,b,v]=n0(d,!0),x.addEventListener("progress",m)),c&&x.upload&&([h,g]=n0(c),x.upload.addEventListener("progress",h),x.upload.addEventListener("loadend",g)),(i.cancelToken||i.signal)&&(u=j=>{x&&(n(!j||j.type?new hp(null,e,x):j),x.abort(),y(),x=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const _=Qw(i.url);if(_&&!sn.protocols.includes(_)){n(new Ke("Unsupported protocol "+_+":",Ke.ERR_BAD_REQUEST,e)),y();return}x.send(s||null)})},Qae=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const r=new AbortController;let n=!1;const i=function(c){if(!n){n=!0,o();const d=c instanceof Error?c:this.reason;r.abort(d instanceof Ke?d:new hp(d instanceof Error?d.message:d))}};let s=t&&setTimeout(()=>{s=null,i(new Ke(`timeout of ${t}ms exceeded`,Ke.ETIMEDOUT))},t);const o=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),e=null)};e.forEach(c=>{if(!n){if(c.aborted){i.call(c);return}c.addEventListener("abort",i,{once:!0})}});const{signal:l}=r;return l.unsubscribe=()=>ce.asap(o),l},Zae=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,i;for(;n<r;)i=n+t,yield e.slice(n,i),n=i},Jae=async function*(e,t){for await(const r of eie(e))yield*Zae(r,t)},eie=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},SM=(e,t,r,n)=>{const i=Jae(e,t);let s=0,o,l=c=>{o||(o=!0,n&&n(c))};return new ReadableStream({async pull(c){try{const{done:d,value:u}=await i.next();if(d){l(),c.close();return}let h=u.byteLength;if(r){let m=s+=h;r(m)}c.enqueue(new Uint8Array(u))}catch(d){throw l(d),d}},cancel(c){return l(c),i.return()}},{highWaterMark:2})},AM=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,Q8=(e,t,r)=>t+2<r&&AM(e.charCodeAt(t+1))&&AM(e.charCodeAt(t+2)),kM=e=>e<=57?e-48:(e&223)-55,tie=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,rie=e=>e===9||e===10||e===12||e===13||e===32,nie=e=>{const t=Math.floor(e/4),r=e%4;return t*3+(r===2?1:r===3?2:0)},aie=e=>{const t=e.length;let r=0;return t>0&&e.charCodeAt(t-1)===61&&(r++,t>1&&e.charCodeAt(t-2)===61&&r++),Math.floor((t-r)*3/4)},iie=e=>{const t=e.length;let r=0,n=0,i=!1;for(let s=0;s<t;s++){let o=e.charCodeAt(s);if(o===37&&Q8(e,s,t)&&(o=kM(e.charCodeAt(s+1))*16+kM(e.charCodeAt(s+2)),s+=2),!rie(o)){if(o===61){n++;continue}if(!tie(o)||n>0){i=!0;continue}r++}}return i||n>2||n>0&&(r+n)%4!==0||r%4===1?aie(e):nie(r)},sie=(e,t)=>{if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const r=e.indexOf(",");if(r<0)return 0;const n=e.slice(5,r),i=e.slice(r+1);if(/;base64/i.test(n))return t(i);let o=0;for(let l=0,c=i.length;l<c;l++){const d=i.charCodeAt(l);if(d===37&&Q8(i,l,c))o+=1,l+=2;else if(d<128)o+=1;else if(d<2048)o+=2;else if(d>=55296&&d<=56319&&l+1<c){const u=i.charCodeAt(l+1);u>=56320&&u<=57343?(o+=4,l++):o+=3}else o+=3}return o};function oie(e){const t=typeof e=="string"?e.indexOf("#"):-1;return sie(t===-1?e:e.slice(0,t),iie)}const nE="1.20.0",EM=64*1024,lie={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction:Zg}=ce,cie=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,r)=>String.fromCharCode(parseInt(r,16))),TM=e=>{if(!ce.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},PM=(e,...t)=>{try{return!!e(...t)}catch{return!1}},uie=e=>{const t=e.indexOf("://");let r=e;return t!==-1&&(r=r.slice(t+3)),r.includes("@")||r.includes(":")},die=e=>{const t=ce.global!==void 0&&ce.global!==null?ce.global:globalThis,{ReadableStream:r,TextEncoder:n}=t;e=ce.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:i,Request:s,Response:o}=e,l=i?Zg(i):typeof fetch=="function",c=Zg(s),d=Zg(o);if(!l)return!1;const u=l&&Zg(r),h=l&&(typeof n=="function"?(x=>w=>x.encode(w))(new n):async x=>
vendor: 7,069 bytes, lines 734-736
734new Uint8Array(await new s(x).arrayBuffer())),m=c&&u&&PM(()=>{let x=!1;const w=new s(sn.origin,{body:new r,method:"POST",get duplex(){return x=!0,"half"}}),_=w.headers.has("Content-Type");return w.body!=null&&w.body.cancel(),x&&!_}),g=d&&u&&PM(()=>ce.isReadableStream(new o("").body)),b={stream:g&&(x=>x.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(x=>{!b[x]&&(b[x]=(w,_)=>{let j=w&&w[x];if(j)return j.call(w);throw new Ke(`Response type '${x}' is not supported`,Ke.ERR_NOT_SUPPORT,_)})});const v=async x=>{if(x==null)return 0;if(ce.isBlob(x))return x.size;if(ce.isSpecCompliantForm(x))return(await new s(sn.origin,{method:"POST",body:x}).arrayBuffer()).byteLength;if(ce.isArrayBufferView(x)||ce.isArrayBuffer(x))return x.byteLength;if(ce.isURLSearchParams(x)&&(x=x+""),ce.isString(x))return(await h(x)).byteLength},y=async(x,w)=>{const _=ce.toFiniteNumber(x.getContentLength());return _??v(w)};return async x=>{let{url:w,method:_,data:j,signal:S,cancelToken:k,timeout:T,onDownloadProgress:P,onUploadProgress:M,responseType:C,headers:O,withCredentials:D="same-origin",fetchOptions:L,maxContentLength:F,maxBodyLength:U,maxRedirects:G}=X8(x);const W=ce.isNumber(F)&&F>-1,q=ce.isNumber(U)&&U>-1,V=X=>ce.hasOwnProp(x,X)?x[X]:void 0;let z=i||fetch;C=C?(C+"").toLowerCase():"text";let I=Qae([S,k&&k.toAbortSignal()],T),B=null;const H=I&&I.unsubscribe&&(()=>{I.unsubscribe()});let J,ee=null;const Y=()=>new Ke("Request body larger than maxBodyLength limit",Ke.ERR_BAD_REQUEST,x,B);try{let X;const ne=V("auth");if(ne){const Z=ce.getSafeProp(ne,"username")||"",ae=ce.getSafeProp(ne,"password")||"";X={username:Z,password:ae}}if(uie(w)){const Z=new URL(w,sn.origin);if(!X&&(Z.username||Z.password)){const ae=TM(Z.username),pe=TM(Z.password);X={username:ae,password:pe}}(Z.username||Z.password)&&(Z.username="",Z.password="",w=Z.href)}if(X&&(O.delete("authorization"),O.set("Authorization","Basic "+btoa(cie((X.username||"")+":"+(X.password||""))))),W&&typeof w=="string"&&w.startsWith("data:")&&oie(w)>F)throw new Ke("maxContentLength size of "+F+" exceeded",Ke.ERR_BAD_RESPONSE,x,B);if(q&&_!=="get"&&_!=="head"){const Z=await v(j);if(typeof Z=="number"&&isFinite(Z)&&(J=Z,Z>U))throw Y()}const Q=q&&(ce.isReadableStream(j)||ce.isStream(j)),ie=(Z,ae,pe)=>SM(Z,EM,ye=>{if(q&&ye>U)throw ee=Y();ae&&ae(ye)},pe);if(m&&_!=="get"&&_!=="head"&&(M||Q)){if(J=J??await y(O,j),J!==0||Q){let Z=new s(w,{method:"POST",body:j,duplex:"half"}),ae;if(ce.isFormData(j)&&(ae=Z.headers.get("content-type"))&&O.setContentType(ae),Z.body){const[pe,ye]=M&&wM(J,n0(jM(M)))||[];j=ie(Z.body,pe,ye)}}}else if(Q&&!c&&u&&_!=="get"&&_!=="head")j=ie(j);else if(Q&&c&&!m&&_!=="get"&&_!=="head")throw new Ke("Stream request bodies are not supported by the current fetch implementation",Ke.ERR_NOT_SUPPORT,x,B);ce.isString(D)||(D=D?"include":"omit");const me=c&&"credentials"in s.prototype;if(ce.isFormData(j)){const Z=O.getContentType();Z&&/^multipart\/form-data/i.test(Z)&&!/boundary=/i.test(Z)&&O.delete("content-type")}O.set("User-Agent","axios/"+nE,!1);const oe=L==null?L:Object.assign(Object.create(null),L);oe&&(delete oe.body,delete oe.headers,delete oe.method,delete oe.signal,delete oe.duplex,delete oe.credentials);const Ne=Object.assign(Object.create(null),oe,{signal:I,method:_.toUpperCase(),headers:I8(O.normalize()),body:j,duplex:"half",credentials:me?D:void 0});c&&(ce.forEach(lie,(Z,ae)=>{Ne[ae]===void 0&&(Ne[ae]=Z)}),Ne.signal===void 0&&(Ne.signal=null),Ne.body===void 0&&(Ne.body=null)),G===0&&(Ne.redirect="manual",oe&&(oe.redirect="manual")),B=c&&new s(w,Ne);let _e=await(c?z(B,oe):z(w,Ne));const xe=Cn.from(_e.headers);if(W){const Z=ce.toFiniteNumber(xe.getContentLength());if(Z!=null&&Z>F)throw new Ke("maxContentLength size of "+F+" exceeded",Ke.ERR_BAD_RESPONSE,x,B)}const Ee=g&&(C==="stream"||C==="response");if(g&&_e.body&&(P||W||Ee&&H)){const Z={};["status","statusText","headers"].forEach(Te=>{Z[Te]=_e[Te]});const ae=ce.toFiniteNumber(xe.getContentLength()),[pe,ye]=P&&wM(ae,n0(jM(P),!0))||[];let he=0;const He=Te=>{if(W&&(he=Te,he>F))throw new Ke("maxContentLength size of "+F+" exceeded",Ke.ERR_BAD_RESPONSE,x,B);pe&&pe(Te)};_e=new o(SM(_e.body,EM,He,()=>{ye&&ye(),H&&H()}),Z)}C=C||"text";let Pe=await b[ce.findKey(b,C)||"text"](_e,x);if(W&&!g&&!Ee){let Z;if(Pe!=null&&(typeof Pe.byteLength=="number"?Z=Pe.byteLength:typeof Pe.size=="number"?Z=Pe.size:typeof Pe=="string"&&(Z=typeof n=="function"?new n().encode(Pe).byteLength:Pe.length)),typeof Z=="number"&&Z>F)throw new Ke("maxContentLength size of "+F+" exceeded",Ke.ERR_BAD_RESPONSE,x,B)}return!Ee&&H&&H(),await new Promise((Z,ae)=>{G8(Z,ae,{data:Pe,headers:Cn.from(_e.headers),status:_e.status,statusText:_e.statusText,config:x,request:B})})}catch(X){if(H&&H(),I&&I.aborted&&I.reason instanceof Ke){const ne=I.reason;throw ne.config=x,B&&(ne.request=B),X!==ne&&Object.defineProperty(ne,"cause",{__proto__:null,value:X,writable:!0,enumerable:!1,configurable:!0}),ne}if(ee)throw B&&!ee.request&&(ee.request=B),ee;if(X instanceof Ke)throw B&&!X.request&&(X.request=B),X;if(X&&X.name==="TypeError"&&/Load failed|fetch/i.test(X.message)){const ne=new Ke("Network Error",Ke.ERR_NETWORK,x,B,X&&X.response);throw Object.defineProperty(ne,"cause",{__proto__:null,value:X.cause||X,writable:!0,enumerable:!1,configurable:!0}),ne}throw Ke.from(X,X&&X.code,x,B,X&&X.response)}}},fie=new Map,Z8=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:i}=t,s=[n,i,r];let o=s.length,l=o,c,d,u=fie;for(;l--;)c=s[l],d=u.get(c),d===void 0&&u.set(c,d=l?new Map:die(t)),u=d;return d};Z8();const aE={http:xae,xhr:Xae,fetch:{get:Z8}};ce.forEach(aE,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const CM=e=>`- ${e}`,hie=e=>ce.isFunction(e)||e===null||e===!1;function mie(e,t){e=ce.isArray(e)?e:[e];const{length:r}=e;let n,i;const s={};for(let o=0;o<r;o++){n=e[o];let l;if(i=n,!hie(n)&&(i=aE[(l=String(n)).toLowerCase()],i===void 0))throw new Ke(`Unknown adapter '${l}'`);if(i&&(ce.isFunction(i)||(i=i.get(t))))break;s[l||"#"+o]=i}if(!i){const o=Object.entries(s).map(([c,d])=>`adapter ${c} `+(d===!1?"is not supported by the environment":"is not available in the build"));let l=r?o.length>1?`since : 735`+o.map(CM).join(` 736`):" "+CM(o[0]):"as no adapter specified";throw new Ke("There is no suitable adapter to dispatch the request "+l,Ke.ERR_NOT_SUPPORT)}return i}const J8={getAdapter:mie,adapters:aE};function Zw(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new hp(null,e)}function Jw(e){const t=ce.toSafeFlatObject(e);return Zw(t),t.headers=Cn.from(ce.getSafeProp(t,"headers")),t.data=Xw.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),J8.getAdapter(t.adapter||fp.adapter,t)(t).then(function(i){Zw(t),t.response=i;try{i.data=Xw.call(t,t.transformResponse,i)}finally{delete t.response}return i.headers=Cn.from(i.headers),i},function(i){if(!W8(i)&&(Zw(t),i&&i.response)){t.response=i.response;
vendor: 4,859 bytes, lines 736-740
736try{i.response.data=Xw.call(t,t.transformResponse,i.response)}finally{delete t.response}i.response.headers=Cn.from(i.response.headers)}return Promise.reject(i)})}const Mv={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Mv[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const OM={};Mv.transitional=function(t,r,n){function i(s,o){return"[Axios v"+nE+"] Transitional option '"+s+"'"+o+(n?". "+n:"")}return(s,o,l)=>{if(t===!1)throw new Ke(i(o," has been removed"+(r?" in "+r:"")),Ke.ERR_DEPRECATED);return r&&!OM[o]&&(OM[o]=!0,console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(s,o,l):!0}};Mv.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function pie(e,t,r){if(typeof e!="object"||e===null)throw new Ke("options must be an object",Ke.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const s=n[i],o=Object.prototype.hasOwnProperty.call(t,s)?t[s]:void 0;if(o){const l=e[s],c=l===void 0||o(l,s,e);if(c!==!0)throw new Ke("option "+s+" must be "+c,Ke.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Ke("Unknown option "+s,Ke.ERR_BAD_OPTION)}}const Cy={assertOptions:pie,validators:Mv},Sn=Cy.validators;let ac=class{constructor(t){this.defaults=t||{},this.interceptors={request:new xM,response:new xM}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error)try{let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack;let o="";if(typeof s=="string"){const l=s.indexOf(` 737`);o=l===-1?"":s.slice(l+1)}if(!n.stack)n.stack=o;else if(o){const l=o.indexOf(` 738`),c=l===-1?-1:o.indexOf(` 739`,l+1),d=c===-1?"":o.slice(c+1);String(n.stack).endsWith(d)||(n.stack+=` 740`+o)}}catch{}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=gc(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:s}=r;n!==void 0&&Cy.assertOptions(n,{silentJSONParsing:Sn.transitional(Sn.boolean),forcedJSONParsing:Sn.transitional(Sn.boolean),clarifyTimeoutError:Sn.transitional(Sn.boolean),legacyInterceptorReqResOrdering:Sn.transitional(Sn.boolean),advertiseZstdAcceptEncoding:Sn.transitional(Sn.boolean),validateStatusUndefinedResolves:Sn.transitional(Sn.boolean)},!1),i!=null&&(ce.isFunction(i)?r.paramsSerializer={serialize:i}:Cy.assertOptions(i,{encode:Sn.function,serialize:Sn.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Cy.assertOptions(r,{baseUrl:Sn.spelling("baseURL"),withXsrfToken:Sn.spelling("withXSRFToken")},!0),r.method=(ce.getSafeProp(r,"method")||ce.getSafeProp(this.defaults,"method")||"get").toLowerCase();let o=s&&ce.merge(s.common,s[r.method]);s&&ce.forEach(H8.concat("common"),b=>{delete s[b]}),r.headers=Cn.concat(o,s);const l=[];let c=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(r)===!1)return;c=c&&v.synchronous;const y=r.transitional||tE;y&&y.legacyInterceptorReqResOrdering?l.unshift(v.fulfilled,v.rejected):l.push(v.fulfilled,v.rejected)});const d=[];this.interceptors.response.forEach(function(v){d.push(v.fulfilled,v.rejected)});let u,h=0,m;if(!c){const b=[Jw.bind(this),void 0];for(b.unshift(...l),b.push(...d),m=b.length,u=Promise.resolve(r);h<m;)u=u.then(b[h++],b[h++]);return u}m=l.length;let g=r;for(;h<m;){const b=l[h++],v=l[h++];try{g=b?b(g):g}catch(y){if(!v){u=Promise.reject(y);break}try{const x=v.call(this,y);ce.isThenable(x)&&(u=Promise.resolve(x).then(()=>Jw.call(this,g)))}catch(x){u=Promise.reject(x)}break}}if(!u)try{u=Jw.call(this,g)}catch(b){u=Promise.reject(b)}for(h=0,m=d.length;h<m;)u=u.then(d[h++],d[h++]);return u}getUri(t){t=gc(this.defaults,t);const r=Y8(t.baseURL,t.url,t.allowAbsoluteUrls,t);return U8(r,t.params,t.paramsSerializer)}};ce.forEach(["delete","get","head","options"],function(t){ac.prototype[t]=function(r,n){return this.request(gc(n||{},{method:t,url:r,data:n&&ce.hasOwnProp(n,"data")?n.data:void 0}))}});ce.forEach(["post","put","patch","query"],function(t){function r(n){return function(s,o,l){return this.request(gc(l||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}ac.prototype[t]=r(),t!=="query"&&(ac.prototype[t+"Form"]=r(!0))});let gie=class e7{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});const n=this;this.promise.then(i=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](i);n._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(l=>{n.subscribe(l),s=l}).then(i);return o.cancel=function(){n.unsubscribe(s)},o},t(function(s,o,l){n.reason||(n.reason=new hp(s,o,l),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}
740subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new e7(function(i){t=i}),cancel:t}}};function yie(e){return function(r){return e.apply(null,r)}}function vie(e){return ce.isObject(e)&&e.isAxiosError===!0}const Oy={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Oy).forEach(([e,t])=>{Oy[t]===void 0&&(Oy[t]=e)});function t7(e){const t=new ac(e),r=S8(ac.prototype.request,t);return ce.extend(r,ac.prototype,t,{allOwnKeys:!0}),ce.extend(r,t,null,{allOwnKeys:!0}),r.create=function(i){return t7(gc(e,i))},r}const Or=t7(fp);Or.Axios=ac;Or.CanceledError=hp;Or.CancelToken=gie;Or.isCancel=W8;Or.VERSION=nE;Or.toFormData=Ov;Or.AxiosError=Ke;Or.Cancel=Or.CanceledError;Or.all=function(t){return Promise.all(t)};Or.spread=yie;Or.isAxiosError=vie;Or.mergeConfig=gc;Or.AxiosHeaders=Cn;Or.formToJSON=e=>V8(ce.isHTMLForm(e)?new FormData(e):e);Or.getAdapter=J8.getAdapter;Or.HttpStatusCode=Oy;Or.default=Or;const{Axios:jDe,AxiosError:NDe,CanceledError:_De,isCancel:SDe,CancelToken:ADe,VERSION:kDe,all:EDe,Cancel:TDe,isAxiosError:PDe,spread:CDe,toFormData:ODe,AxiosHeaders:MDe,HttpStatusCode:RDe,formToJSON:DDe,getAdapter:IDe,mergeConfig:LDe,create:$De}=Or,r7=typeof window>"u",MM=!r7&&window.self!==window.top,xie=!r7&&typeof document>"u",n7=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),mn=[];for(let e=0;e<256;++e)mn.push((e+256).toString(16).slice(1));function bie(e,t=0){return(mn[e[t+0]]+mn[e[t+1]]+mn[e[t+2]]+mn[e[t+3]]+"-"+mn[e[t+4]]+mn[e[t+5]]+"-"+mn[e[t+6]]+mn[e[t+7]]+"-"+mn[e[t+8]]+mn[e[t+9]]+"-"+mn[e[t+10]]+mn[e[t+11]]+mn[e[t+12]]+mn[e[t+13]]+mn[e[t+14]]+mn[e[t+15]]).toLowerCase()}let e1;const wie=new Uint8Array(16);function jie(){if(!e1){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");e1=crypto.getRandomValues.bind(crypto)}return e1(wie)}const Nie=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),RM={randomUUID:Nie};function _ie(e,t,r){var i;e=e||{};const n=e.random??((i=e.rng)==null?void 0:i.call(e))??jie();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,bie(n)}function Sie(e,t,r){return RM.randomUUID&&!e?RM.randomUUID():_ie(e)}const th=typeof window<"u"?window:{base44SharedInstances:{}};function Aie(e,t){return th.base44SharedInstances||(th.base44SharedInstances={}),th.base44SharedInstances[e]||(th.base44SharedInstances[e]={instance:t()}),th.base44SharedInstances[e].instance}const kie="__user_heartbeat_event__",Eie="__initialization_event__",Tie="__session_duration_event__",DM="analytics-enable",IM="base44_analytics_session_id",Pie={enabled:!0,maxQueueSize:1e3,throttleTime:1e3,batchSize:30,heartBeatInterval:60*1e3},Cie="analytics",Yt=Aie(Cie,()=>({requestsQueue:[],isProcessing:!1,isHeartBeatProcessing:!1,wasInitializationTracked:!1,sessionContext:null,sessionStartTime:null,fallbackSessionId:null,config:{...Pie,...Fie()}})),Oie=({axiosClient:e,serverUrl:t,appId:r,userAuthModule:n,enabled:i})=>{var s;const{maxQueueSize:o,throttleTime:l,batchSize:c}=Yt.config;if(!i||!(!((s=Yt.config)===null||s===void 0)&&s.enabled)||xie)return{track:()=>{},cleanup:()=>{}};let d;const u=`${t}/api/apps/${r}/analytics/track/batch`,h=async j=>{await e.request({method:"POST",url:`/apps/${r}/analytics/track/batch`,data:{events:j}})},m=j=>{try{const S=JSON.stringify({events:j}),k=new Blob([S],{type:"application/json"});return typeof navigator>"u"||S.length>6e4||!navigator.sendBeacon(u,k)}catch{return!1}},g=async(j,S={})=>
740{if(j.length===0)return;const k=await $ie(n),T=j.map(Lie(k));try{(!S.isBeacon||!m(T))&&await h(T)}catch{}},b=()=>{$M(g,{throttleTime:l,batchSize:c})},v=j=>{if(Yt.requestsQueue.length>=o)return;const S=Iie();Yt.requestsQueue.push({...j,...S}),b()},y=()=>{$M(g,{throttleTime:l,batchSize:c}),d=FM(v),Rie()},x=()=>{LM(),d==null||d(),Die(v);const j=Yt.requestsQueue.splice(0);g(j,{isBeacon:!0})},w=()=>{typeof window>"u"||(document.visibilityState==="hidden"?x():document.visibilityState==="visible"&&y())},_=()=>{LM(),d==null||d(),typeof window<"u"&&window.removeEventListener("visibilitychange",w)};return b(),d=FM(v),Mie(v),typeof window<"u"&&window.addEventListener("visibilitychange",w),{track:v,cleanup:_}};function LM(){Yt.isProcessing=!1}async function $M(e,t){if(Yt.isProcessing)return;Yt.isProcessing=!0;const{throttleTime:r=1e3,batchSize:n=30}=t??{};for(;Yt.isProcessing&&Yt.requestsQueue.length>0;){const i=Yt.requestsQueue.splice(0,n);i.length&&await e(i),await new Promise(s=>setTimeout(s,r))}Yt.isProcessing=!1}function FM(e){var t;if(typeof window>"u"||Yt.isHeartBeatProcessing||((t=Yt.config.heartBeatInterval)!==null&&t!==void 0?t:0)<10)return()=>{};Yt.isHeartBeatProcessing=!0;const r=setInterval(()=>{e({eventName:kie})},Yt.config.heartBeatInterval);return()=>{clearInterval(r),Yt.isHeartBeatProcessing=!1}}function Mie(e){typeof window>"u"||Yt.wasInitializationTracked||(Yt.wasInitializationTracked=!0,e({eventName:Eie,properties:{referrer:document==null?void 0:document.referrer}}))}function Rie(){typeof window>"u"||Yt.sessionStartTime!==null||(Yt.sessionStartTime=new Date().toISOString())}function Die(e){if(typeof window>"u"||Yt.sessionStartTime===null)return;const t=new Date().getTime()-new Date(Yt.sessionStartTime).getTime();Yt.sessionStartTime=null,e({eventName:Tie,properties:{sessionDuration:t}})}function Iie(){var e,t;return{timestamp:new Date().toISOString(),pageUrl:typeof window<"u"&&(t=(e=window.location)===null||e===void 0?void 0:e.pathname)!==null&&t!==void 0?t:null}}function Lie(e){return t=>({event_name:t.eventName,properties:t.properties,timestamp:t.timestamp,page_url:t.pageUrl,...e})}let xh=null;function BM(){Yt.sessionContext=null,xh=null}async function $ie(e){if(!Yt.sessionContext){if(!e.hasToken())return{user_id:null,session_id:a0()};if(!xh){const n=a0();xh=e.me().then(i=>({user_id:i.id,session_id:n})).catch(()=>({user_id:null,session_id:n}))}const t=xh,r=await t;return xh===t&&(Yt.sessionContext=r),r}return Yt.sessionContext}function Fie(){if(typeof window>"u"||!window.location)return;const t=new URLSearchParams(window.location.search).get(DM);if(t==null||!t.length)return;const r=new URLSearchParams(window.location.search);r.delete(DM);const n=window.location.pathname+(r.toString()?"?"+r.toString():"");return window.history.replaceState({},"",n),{enabled:t==="true"}}function UM(){var e;return(e=Yt.fallbackSessionId)!==null&&e!==void 0?e:Yt.fallbackSessionId=n7()}function a0(){if(typeof window>"u")return UM();try{const e=localStorage.getItem(IM);if(!e){const t=n7();return localStorage.setItem(IM,t),t}return e}catch{return UM()}}class a7 extends Error{constructor(t,r,n,i,s){super(t),this.name="Base44Error",this.status=r,this.code=n,this.data=i,this.originalError=s}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,data:this.data}}}function ju({baseURL:e,headers:t={},token:r,interceptResponses:n=!0,onError:i}){const s=Or.create({baseURL:e,headers:{"Content-Type":"application/json",Accept:"application/json",...t}});return r&&(s.defaults.headers.common.Authorization=`Bearer ${r}`),s.interceptors.request.use(o=>{typeof window<"u"&&(window.location&&o.headers.set("X-Origin-URL",window.location.href),o.headers.get("Authorization")||o.headers.set("X-Base44-Anonymous-Id",a0()));const l=Sie();if(o.requestId=l,MM)try{window.parent.postMessage({type:"api-request-start",requestId:l,data:{url:e+o.url,method:o.method,body:o.data instanceof FormData?"[FormData object]":o.data}},"*")}catch{}return o}),n&&s.interceptors.response.use(o=>{var l;const c=(l=o.config)===null||l===void 0?void 0:l.requestId;try{MM&&c&&window.parent.postMessage({type:"api-request-end",requestId:c,data:{statusCode:o.status,response:o.data}},"*")}catch{}return o.data},o=>{var l,c,d,u,h,m,g,b,v,y,x,w,_,j,S;const k=((c=(l=o.response)===null||l===void 0?void 0:l.data)===null||c===void 0?void 0:c.message)||((u=(d=o.response)===null||d===void 0?void 0:d.data)===null||u===void 0?void 0:u.detail)||o.message,T=new a7(k,(h=o.response)===null||h===void 0?void 0:h.status,(w=(b=(g=(m=o.response)===null||m===void 0?void 0:m.data)===null||g===void 0?void 0:g.code)!==null&&b!==void 0?b:(x=(y=(v=o.response)===null||v===void 0?void 0:v.headers)===null||y===void 0?void 0:y.get)===null||x===void 0?void 0:x.call(y,"x-base44-connector-error"))!==null&&w!==void 0?w:(j=(_=o.response)===null||_===void 0?void 0:_.headers)===null||j===void 0?void 0:j["x-base44-connector-error"],(S=o.response)===null||S===void 0?void 0:S.data,o);return i==null||i(T),Promise.reject(T)}),s}function qM(e){const{axios:t,appId:r,getSocket:n}=e;return new Proxy({}
740,{get(i,s){if(!(typeof s!="string"||s==="then"||s.startsWith("_")))return Uie(t,r,s,n)}})}function Bie(e){var t;try{const r=JSON.parse(e);return{type:r.type,data:r.data,id:r.id||((t=r.data)===null||t===void 0?void 0:t.id),timestamp:r.timestamp||new Date().toISOString()}}catch(r){return console.warn("[Base44 SDK] Failed to parse realtime message:",r),null}}function Uie(e,t,r,n){const i=`/apps/${t}/entities/${r}`;return{async list(s,o,l,c){const d={};return s&&(d.sort=s),o&&(d.limit=o),l&&(d.skip=l),c&&(d.fields=Array.isArray(c)?c.join(","):c),e.get(i,{params:d})},async filter(s,o,l,c,d){const u={q:JSON.stringify(s)};return o&&(u.sort=o),l&&(u.limit=l),c&&(u.skip=c),d&&(u.fields=Array.isArray(d)?d.join(","):d),e.get(i,{params:u})},async get(s){return e.get(`${i}/${s}`)},async create(s){return e.post(i,s)},async update(s,o){return e.put(`${i}/${s}`,o)},async delete(s){return e.delete(`${i}/${s}`)},async deleteMany(s){return e.delete(i,{data:s})},async bulkCreate(s){return e.post(`${i}/bulk`,s)},async updateMany(s,o){return e.patch(`${i}/update-many`,{query:s,data:o})},async bulkUpdate(s){return e.put(`${i}/bulk`,s)},async importEntities(s){const o=new FormData;return o.append("file",s,s.name),e.post(`${i}/import`,o,{headers:{"Content-Type":"multipart/form-data"}})},subscribe(s){const o=`entities:${t}:${r}`;return n().subscribeToRoom(o,{update_model:d=>{var u;const h=Bie(d.data);if(h){h.type!=="delete"&&(!((u=h.data)===null||u===void 0)&&u._oversize)&&console.error(`[Base44 SDK] Realtime broadcast for ${r}#${h.id} was oversize and got slimmed for transport. Fields >10 KB are empty and the rest of the record may be a stub. Call \`entities.${r}.get("${h.id}")\` to fetch the full record.`);try{s(h)}catch(m){console.error("[Base44 SDK] Subscription callback error:",m)}}}})}}}function qie(e,t){return{async call(r,n,i){if(!(r!=null&&r.trim()))throw new Error("Integration slug is required and cannot be empty");if(!(n!=null&&n.trim()))throw new Error("Operation ID is required and cannot be empty");const{pathParams:s,queryParams:o,...l}=i??{},c={...l,...s&&{path_params:s},...o&&{query_params:o}};return await e.post(`/apps/${t}/integrations/custom/${r}/${n}`,c)}}}function zM(e,t){const r=qie(e,t);return new Proxy({},{get(n,i){if(!(typeof i!="string"||i==="then"||i.startsWith("_")))return i==="custom"?r:new Proxy({},{get(s,o){if(!(typeof o!="string"||o==="then"||o.startsWith("_")))return async l=>{if(typeof l=="string")throw new Error(`Integration ${o} must receive an object with named parameters, received: ${l}`);let c,d;return l instanceof FormData||l&&Object.values(l).some(u=>u instanceof File)?(c=new FormData,Object.keys(l).forEach(u=>{l[u]instanceof File?c.append(u,l[u],l[u].name):typeof l[u]=="object"&&l[u]!==null?c.append(u,JSON.stringify(l[u])):c.append(u,l[u])}),d="multipart/form-data"):(c=l,d="application/json"),i==="Core"?e.post(`/apps/${t}/integration-endpoints/Core/${o}`,c||l,{headers:{"Content-Type":d}}):e.post(`/apps/${t}/integration-endpoints/installable/${i}/integration-endpoints/${o}`,c||l,{headers:{"Content-Type":d}})}}})}})}function zie(){return typeof window>"u"?!1:window!==window.parent}function Vie(e,t,r){const s=Math.round(window.screenX+(window.outerWidth-500)/2),o=Math.round(window.screenY+(window.outerHeight-600)/2),l=window.open(e,"base44_auth",`width=500,height=600,left=${s},top=${o},resizable=yes,scrollbars=yes`);if(!l)return;const c=()=>{window.removeEventListener("message",d),clearInterval(u),l.closed||l.close()},d=h=>{var m;if(h.origin!==r||h.source!==l||!(!((m=h.data)===null||m===void 0)&&m.access_token))return;c();const g=new URL(t),{access_token:b,is_new_user:v}=h.data;g.searchParams.set("access_token",b),v!=null&&g.searchParams.set("is_new_user",String(v)),window.location.href=g.toString()},u=setInterval(()=>{l.closed&&c()},500);window.addEventListener("message",d)}function Hie(e,t,r,n){let i=null;const s=()=>{i=null};let o=!!n.token;return{hasToken(){return o},async me(){const l=i??e.get(`/apps/${r}/entities/User/me`).finally(()=>{i===l&&(i=null)});return i=l,l},async updateMe(l){return e.put(`/apps/${r}/entities/User/me`,l)},redirectToLogin(l){if(typeof window>"u")throw new Error("Login method can only be used in a browser environment");const c=l?new URL(l,window.location.origin).toString():window.location.href,d=`${n.appBaseUrl}/login?from_url=${encodeURIComponent(c)}`;window.location.href=d},loginWithProvider(l,c="/"){const d=new URL(c,window.location.origin).toString(),u=`app_id=${r}&from_url=${encodeURIComponent(d)}`;let h;l==="sso"?h=`/apps/${r}/auth/sso/login`:h=`/apps/auth${l==="google"?"":`/${l}`}/login`;const m=`${n.appBaseUrl}/api${h}?${u}`;if(zie()){const g=`${m}&popup_origin=${encodeURIComponent(window.location.origin)}`;return Vie(g,d,window.location.origin)}window.location.href=m},logout(l){if(delete e.defaults.headers.common.Authorization,s(),BM(),o=!1,typeof window<"u"){if(window.localStorage)try{window.localStorage.removeItem("base44_access_token"),window.localStorage.removeItem("token")}catch(u){console.error("Failed to remove token from localStorage:",u)}const c=l||window.location.href,d=`${n.appBaseUrl}/api/apps/auth/logout?from_url=${encodeURIComponent(c)}`;window.location.href=d}},setToken(l,c=!0){if(l&&(s(),BM(),o=!0,e.defaults.headers.common.Authorization=`Bearer ${l}`,t.defaults.headers.common.Authorization=`Bearer ${l}`,c&&typeof window<"u"&&window.localStorage))try{window.localStorage.setItem("base44_access_token",l),window.localStorage.setItem("token",l)}catch(d){console.error("Failed to save token to localStorage:",d)}},async loginViaEmailPassword(l,c,d){var u;try{const h=await e.post(`/apps/${r}/auth/login`,{email:l,password:c,...d&&{turnstile_token:d}}),{access_token:m,user:g}=h;return m&&this.setToken(m),{access_token:m,user:g}}catch(h){throw((u=h.response)===null||u===void 0?void 0:u.status)===401&&await this.logout(),h}},async isAuthenticated(){try{return await this.me(),!0}catch{return!1}},inviteUser(l,c){return e.post(`/apps/${r}/users/invite-user`,{user_email:l,role:c})},register(l){return e.post(`/apps/${r}/auth/register`,l)},verifyOtp({email:l,otpCode:c}){return e.post(`/apps/${r}/auth/verify-otp`,{email:l,otp_code:c})},resendOtp(l){return e.post(`/apps/${r}/auth/resend-otp`,{email:l})},resetPasswordRequest(l){return e.post(`/apps/${r}/auth/reset-password-request`,{email:l})},resetPassword({resetToken:l,newPassword:c}){return e.post(`/apps/${r}/auth/reset-password`,{reset_token:l,new_password:c})},changePassword({userId:l,currentPassword:c,newPassword:d}){return e.post(`/apps/${r}/auth/change-password`,{user_id:l,current_password:c,new_password:d})}}}function Wie(e,t){return{async getAccessToken(r){const n=`/apps/${t}/auth/sso/accesstoken/${r}`;return e.get(n)},async getIdToken(r){const n=`/apps/${t}/auth/sso/idtoken/${r}`;return e.get(n)}}}const Gie=new Set(["GET","POST","PUT","PATCH","DELETE","HEAD"]);function Kie(e,t){return{async getAccessToken(r){if(!r||typeof r!="string")throw new Error("Integration type is required and must be a string");return(await e.get(`/apps/${t}/external-auth/tokens/${encodeURIComponent(r)}`)).access_token},async getConnection(r){var n;if(!r||typeof r!="string")throw new Error("Integration type is required and must be a string");const s=await e.get(`/apps/${t}/external-auth/tokens/${encodeURIComponent(r)}`);return{accessToken:s.access_token,connectionConfig:(n=s.connection_config)!==null&&n!==void 0?n:null}},async getWorkspaceConnection(r){var n;if(!r||typeof r!="string")throw new Error("Connector ID is required and must be a string");const s=await e.get(`/apps/${t}/external-auth/tokens/connectors/${encodeURIComponent(r)}`);return{accessToken:s.access_token,connectionConfig:(n=s.connection_config)!==null&&n!==void 0?n:null}},async getCurrentAppUserAccessToken(r){if(!r||typeof r!="string")throw new Error("Connector ID is required and must be a string");return(await e.get(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(r)}/token`)).access_token},async getCurrentAppUserConnection(r){var n;if(!r||typeof r!="string")throw new Error("Connector ID is required and must be a string");const s=await e.get(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(r)}/token`);return{accessToken:s.access_token,connectionConfig:(n=s.connection_config)!==null&&n!==void 0?n:null}},async callApi(r,n){return i7(r,"Integration type"),Yie(e,`/apps/${t}/connectors/${encodeURIComponent(r)}/call`,n)}}}function i7(e,t){if(!e||typeof e!="string")throw new Error(`${t} is required and must be a string`)}async function Yie(e,t,r){var n,i,s,o,l,c,d,u,h;if(!r||typeof r!="object")throw new Error("Request is required and must be an object");i7(r.path,"Request path");const m=(n=r.method)!==null&&n!==void 0?n:"GET";if(!Gie.has(m))throw new Error("Request method must be one of GET, POST, PUT, PATCH, DELETE, or HEAD");const b=await e.post(t,{method:m,...r.host==null?{}:{host:r.host},path:r.path,query:(i=r.query)!==null&&i!==void 0?i:{},headers:(s=r.headers)!==null&&s!==void 0?s:{},body:(o=r.body)!==null&&o!==void 0?o:null});return{success:b.success,phase:b.phase,status:(l=b.status_code)!==null&&l!==void 0?l:null,data:b.data,dataBase64:(c=b.data_base64)!==null&&c!==void 0?c:null,contentType:(d=b.content_type)!==null&&d!==void 0?d:null,headers:(u=b.headers)!==null&&u!==void 0?u:{},creditsCharged:(h=b.credits_charged)!==null&&h!==void 0?h:0}}function Xie(e,t){return{async connectAppUser(r){if(!r||typeof r!="string")throw new Error("Connector ID is required and must be a string");return(await e.post(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(r)}/initiate`)).redirect_url},async disconnectAppUser(r){if(!r||typeof r!="string")throw new Error("Connector ID is required and must be a string");await e.delete(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(r)}`)}}}function Ps(e={}){const{storageKey:t="base44_access_token",paramName:r="access_token",saveToStorage:n=!0,removeFromUrl:i=!0}=e;let s=null;if(typeof window<"u"&&window.location)try{const o=new URLSearchParams(window.location.search);
740if(s=o.get(r),s){if(n&&s7(s,{storageKey:t}),i){o.delete(r);const l=`${window.location.pathname}${o.toString()?`?${o.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,l)}return s}}catch(o){console.error("Error retrieving token from URL:",o)}if(typeof window<"u"&&window.localStorage)try{return s=window.localStorage.getItem(t),s}catch(o){console.error("Error retrieving token from local storage:",o)}return null}function s7(e,t){const{storageKey:r="base44_access_token"}=t;if(typeof window>"u"||!window.localStorage||!e)return!1;try{return window.localStorage.setItem(r,e),window.localStorage.setItem("token",e),!0}catch(n){return console.error("Error saving token to local storage:",n),!1}}function Qie(e){const{storageKey:t="base44_access_token"}=e;if(typeof window>"u"||!window.localStorage)return!1;try{return window.localStorage.removeItem(t),!0}catch(r){return console.error("Error removing token from local storage:",r),!1}}function Zie(e,t){const{serverUrl:r,appId:n,loginPath:i="/login"}=t;if(!r||!n)throw new Error("serverUrl and appId are required to construct login URL");const s=encodeURIComponent(e||(typeof window<"u"?window.location.href:""));return`${r}${i}?from_url=${s}&app_id=${n}`}function Jie({axios:e,serviceRoleAxios:t,appId:r,serverUrl:n,functionsVersion:i,platformHeaders:s}){const o=new Headers(s),l=c=>{const d=c.defaults.headers.common.Authorization;return typeof d=="string"&&d.startsWith("Bearer ")?d:null};return async function(d,u={}){ese(d);const{fetch:h=fetch,...m}=u,g=new Headers(u.headers),b=(v,y)=>{y&&!g.has(v)&&g.set(v,y)};return b("Authorization",l(e)),b("Base44-Service-Authorization",l(t)),b("Base44-App-Id",r),b("Base44-Api-Url",n),b("Base44-Functions-Version",i),b("Base44-State",o.get("Base44-State")),b("X-Data-Env",o.get("X-Data-Env")),h(d,{...m,headers:g})}}function ese(e){if(typeof e!="string"||e==="")throw new Error("fetchWithAuth() requires a path, such as '/api/orders'.");const t=e.replace(/[\t\n\r]/g,"").replace(/^[\x00-\x20]+/,"");if(!t.startsWith("/")||t.startsWith("//")||t.startsWith("/\\"))throw new Error(`fetchWithAuth() only sends requests to your app's own origin, so your app's credentials never reach a third party. "${e}" is not a path on it â pass a relative path such as '/api/orders'. Use base44.functions.fetch() to call a Base44 backend function, or plain fetch() for another origin.`)}function VM(e,t,r){const n=(s,o)=>s?`${String(s).replace(/\/$/,"")}${o}`:o,i=s=>{const o=new Headers;if(r!=null&&r.getAuthHeaders){const l=r.getAuthHeaders();Object.entries(l).forEach(([c,d])=>{d!=null&&o.set(c,String(d))})}return s&&new Headers(s).forEach((l,c)=>{o.set(c,l)}),o};return{async invoke(s,o){if(typeof o=="string")throw new Error(`Function ${s} must receive an object with named parameters, received: ${o}`);let l,c;return o instanceof FormData||o&&Object.values(o).some(d=>d instanceof File)?(l=new FormData,Object.keys(o).forEach(d=>{o[d]instanceof File?l.append(d,o[d],o[d].name):typeof o[d]=="object"&&o[d]!==null?l.append(d,JSON.stringify(o[d])):l.append(d,o[d])}),c="multipart/form-data"):(l=o,c="application/json"),e.post(`/apps/${t}/functions/${s}`,l||o,{headers:{"Content-Type":c}})},async fetch(s,o={}){const c=`/functions${s.startsWith("/")?s:`/${s}`}`,d=i(o.headers),u={...o,headers:d};return await fetch(n(r==null?void 0:r.baseURL,c),u)}}}function HM({axios:e,getSocket:t,appId:r,serverUrl:n,token:i}){const s=`/apps/${r}/agents`,o={},l=()=>e.get(`${s}/conversations`),c=v=>e.get(`${s}/conversations/${v}`);return{getConversations:l,getConversation:c,listConversations:v=>e.get(`${s}/conversations`,{params:v}),createConversation:v=>e.post(`${s}/conversations`,v),addMessage:async(v,y)=>e.post(`${s}/conversations/v2/${v.id}/messages`,y),subscribeToConversation:(v,y)=>{const x=`/agent-conversations/${v}`,w=t(),_=c(v).then(j=>(o[v]=j,j));return w.subscribeToRoom(x,{connect:()=>{},update_model:async({data:j})=>{const S=JSON.parse(j);if(S._message){await _;const k=S._message,T=o[v];if(T){const P=T.messages||[],M=P.findIndex(O=>O.id===k.id),C=M!==-1?P.map((O,D)=>D===M?k:O):[...P,k];o[v]={...T,messages:C},y==null||y(o[v])}}}})},getWhatsAppConnectURL:v=>{const y=`${n}/api/apps/${r}/agents/${encodeURIComponent(v)}/whatsapp`,x=i??Ps();return x?`${y}?token=${x}`:y},getTelegramConnectURL:v=>{const y=`${n}/api/apps/${r}/agents/${encodeURIComponent(v)}/telegram`,x=i??Ps();return x?`${y}?token=${x}`:y}}}function WM({serverUrl:e,token:t,appId:r}){return{connection:()=>{var i;return{baseURL:`${e}/api/apps/${r}/ai/openai/v1`,token:(i=t??Ps())!==null&&i!==void 0?i:""}}}}function GM(e,t){const r=`/app-logs/${t}`;return{async logUserInApp(n){await e.post(`${r}/log-user-in-app/${n}`)},async fetchLogs(n={}){return await e.get(r,{params:n})},async getStats(n={}){return await e.get(`${r}/stats`,{params:n})}}}function tse(e,t){return{async getPublicSettings(){return e.get(`/apps/public/prod/public-settings/by-id/${t}`)}}}function rse(e,t){return{async inviteUser(r,n){if(n!=="user"&&n!=="admin")throw new Error(`Invalid role: "${n}". Role must be either "user" or "admin".`);return await e.post(`/apps/${t}/runtime/users/invite-user`,{user_email:r,role:n})}}}const es=Object.create(null);es.open="0";es.close="1";es.ping="2";es.pong="3";es.message="4";es.upgrade="5";es.noop="6";
vendor: 6,044 bytes, line 740
740const My=Object.create(null);Object.keys(es).forEach(e=>{My[es[e]]=e});const bA={type:"error",data:"parser error"},o7=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",l7=typeof ArrayBuffer=="function",c7=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,iE=({type:e,data:t},r,n)=>o7&&t instanceof Blob?r?n(t):KM(t,n):l7&&(t instanceof ArrayBuffer||c7(t))?r?n(t):KM(new Blob([t]),n):n(es[e]+(t||"")),KM=(e,t)=>{const r=new FileReader;return r.onload=function(){const n=r.result.split(",")[1];t("b"+(n||""))},r.readAsDataURL(e)};function YM(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let t1;function nse(e,t){if(o7&&e.data instanceof Blob)return e.data.arrayBuffer().then(YM).then(t);if(l7&&(e.data instanceof ArrayBuffer||c7(e.data)))return t(YM(e.data));iE(e,!1,r=>{t1||(t1=new TextEncoder),t(t1.encode(r))})}const XM="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bh=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<XM.length;e++)bh[XM.charCodeAt(e)]=e;const ase=e=>{let t=e.length*.75,r=e.length,n,i=0,s,o,l,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const d=new ArrayBuffer(t),u=new Uint8Array(d);for(n=0;n<r;n+=4)s=bh[e.charCodeAt(n)],o=bh[e.charCodeAt(n+1)],l=bh[e.charCodeAt(n+2)],c=bh[e.charCodeAt(n+3)],u[i++]=s<<2|o>>4,u[i++]=(o&15)<<4|l>>2,u[i++]=(l&3)<<6|c&63;return d},ise=typeof ArrayBuffer=="function",sE=(e,t)=>{if(typeof e!="string")return{type:"message",data:u7(e,t)};const r=e.charAt(0);return r==="b"?{type:"message",data:sse(e.substring(1),t)}:My[r]?e.length>1?{type:My[r],data:e.substring(1)}:{type:My[r]}:bA},sse=(e,t)=>{if(ise){const r=ase(e);return u7(r,t)}else return{base64:!0,data:e}},u7=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},d7="�",ose=(e,t)=>{const r=e.length,n=new Array(r);let i=0;e.forEach((s,o)=>{iE(s,!1,l=>{n[o]=l,++i===r&&t(n.join(d7))})})},lse=(e,t)=>{const r=e.split(d7),n=[];for(let i=0;i<r.length;i++){const s=sE(r[i],t);if(n.push(s),s.type==="error")break}return n};function cse(){return new TransformStream({transform(e,t){nse(e,r=>{const n=r.length;let i;if(n<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,n);else if(n<65536){i=new Uint8Array(3);const s=new DataView(i.buffer);s.setUint8(0,126),s.setUint16(1,n)}else{i=new Uint8Array(9);const s=new DataView(i.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(n))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(r)})}})}let r1;function Jg(e){return e.reduce((t,r)=>t+r.length,0)}function ey(e,t){if(e[0].length===t)return e.shift();const r=new Uint8Array(t);let n=0;for(let i=0;i<t;i++)r[i]=e[0][n++],n===e[0].length&&(e.shift(),n=0);return e.length&&n<e[0].length&&(e[0]=e[0].slice(n)),r}function use(e,t){r1||(r1=new TextDecoder);const r=[];let n=0,i=-1,s=!1;return new TransformStream({transform(o,l){for(r.push(o);;){if(n===0){if(Jg(r)<1)break;const c=ey(r,1);s=(c[0]&128)===128,i=c[0]&127,i<126?n=3:i===126?n=1:n=2}else if(n===1){if(Jg(r)<2)break;const c=ey(r,2);i=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),n=3}else if(n===2){if(Jg(r)<8)break;const c=ey(r,8),d=new DataView(c.buffer,c.byteOffset,c.length),u=d.getUint32(0);if(u>Math.pow(2,21)-1){l.enqueue(bA);break}i=u*Math.pow(2,32)+d.getUint32(4),n=3}else{if(Jg(r)<i)break;const c=ey(r,i);l.enqueue(sE(s?c:r1.decode(c),t)),n=0}if(i===0||i>e){l.enqueue(bA);break}}}})}const f7=4;function Lr(e){if(e)return dse(e)}function dse(e){for(var t in Lr.prototype)e[t]=Lr.prototype[t];return e}Lr.prototype.on=Lr.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Lr.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this};Lr.prototype.off=Lr.prototype.removeListener=Lr.prototype.removeAllListeners=Lr.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var n,i=0;i<r.length;i++)if(n=r[i],n===t||n.fn===t){r.splice(i,1);break}return r.length===0&&delete this._callbacks["$"+e],this};Lr.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),r=this._callbacks["$"+e],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(r){r=r.slice(0);for(var n=0,i=r.length;n<i;++n)r[n].apply(this,t)}return this};Lr.prototype.emitReserved=Lr.prototype.emit;Lr.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Lr.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Rv=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,r)=>r(t,0),za=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),fse="arraybuffer";function h7(e,...t){return t.reduce((r,n)=>(e.hasOwnProperty(n)&&(r[n]=e[n]),r),{})}const hse=za.setTimeout,mse=za.clearTimeout;function Dv(e,t){t.useNativeTimers?(e.setTimeoutFn=hse.bind(za),e.clearTimeoutFn=mse.bind(za)):(e.setTimeoutFn=za.setTimeout.bind(za),e.clearTimeoutFn=za.clearTimeout.bind(za))}const pse=1.33;function gse(e){return typeof e=="string"?yse(e):Math.ceil((e.byteLength||e.size)*pse)}function yse(e){let t=0,r=0;for(let n=0,i=e.length;n<i;n++)t=e.charCodeAt(n),t<128?r+=1:t<2048?r+=2:t<55296||t>=57344?r+=3:(n++,r+=4);return r}function m7(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function vse(e){let t="";for(let r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t}function xse(e){let t={},r=e.split("&");for(let n=0,i=r.length;n<i;n++){let s=r[n].split("=");
vendor: 5,883 bytes, line 740
740t[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return t}class bse extends Error{constructor(t,r,n){super(t),this.description=r,this.context=n,this.type="TransportError"}}class oE extends Lr{constructor(t){super(),this.writable=!1,Dv(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,r,n){return super.emitReserved("error",new bse(t,r,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const r=sE(t,this.socket.binaryType);this.onPacket(r)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,r={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const r=vse(t);return r.length?"?"+r:""}}class wse extends oE{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const r=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let n=0;this._polling&&(n++,this.once("pollComplete",function(){--n||r()})),this.writable||(n++,this.once("drain",function(){--n||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const r=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};lse(t,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,ose(t,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=m7()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(t,r)}}let p7=!1;try{p7=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const jse=p7;function Nse(){}class _se extends wse{constructor(t){if(super(t),typeof location<"u"){const r=location.protocol==="https:";let n=location.port;n||(n=r?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||n!==t.port}}doWrite(t,r){const n=this.request({method:"POST",data:t});n.on("success",r),n.on("error",(i,s)=>{this.onError("xhr post error",i,s)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(r,n)=>{this.onError("xhr poll error",r,n)}),this.pollXhr=t}}class Hi extends Lr{constructor(t,r,n){super(),this.createRequest=t,Dv(this,n),this._opts=n,this._method=n.method||"GET",this._uri=r,this._data=n.data!==void 0?n.data:null,this._create()}_create(){var t;const r=h7(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(r);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&n.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var i;n.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(n.getResponseHeader("set-cookie"))),n.readyState===4&&(n.status===200||n.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof n.status=="number"?n.status:0)},0))},n.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=Hi.requestsCount++,Hi.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Nse,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Hi.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Hi.requestsCount=0;Hi.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",QM);else if(typeof addEventListener=="function"){const e="onpagehide"in za?"pagehide":"unload";addEventListener(e,QM,!1)}}function QM(){for(let e in Hi.requests)Hi.requests.hasOwnProperty(e)&&Hi.requests[e].abort()}const Sse=(function(){const e=g7({xdomain:!1});return e&&e.responseType!==null})();class Ase extends _se{constructor(t){super(t);const r=t&&t.forceBase64;this.supportsBinary=Sse&&!r}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Hi(g7,this.uri(),t)}}function g7(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||jse))return new XMLHttpRequest}catch{}if(!t)try{return new za[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const y7=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class kse extends oE{get name(){return"websocket"}
vendor: 10,740 bytes, line 740
740doOpen(){const t=this.uri(),r=this.opts.protocols,n=y7?{}:h7(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,r,n)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let r=0;r<t.length;r++){const n=t[r],i=r===t.length-1;iE(n,this.supportsBinary,s=>{try{this.doWrite(n,s)}catch{}i&&Rv(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=m7()),this.supportsBinary||(r.b64=1),this.createUri(t,r)}}const n1=za.WebSocket||za.MozWebSocket;class Ese extends kse{createSocket(t,r,n){return y7?new n1(t,r,n):r?new n1(t,r):new n1(t)}doWrite(t,r){this.ws.send(r)}}class Tse extends oE{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const r=use(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=t.readable.pipeThrough(r).getReader(),i=cse();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const s=()=>{n.read().then(({done:l,value:c})=>{l||(this.onPacket(c),s())}).catch(l=>{})};s();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let r=0;r<t.length;r++){const n=t[r],i=r===t.length-1;this._writer.write(n).then(()=>{i&&Rv(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Pse={websocket:Ese,webtransport:Tse,polling:Ase},Cse=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Ose=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function wA(e){if(e.length>8e3)throw"URI too long";const t=e,r=e.indexOf("["),n=e.indexOf("]");r!=-1&&n!=-1&&(e=e.substring(0,r)+e.substring(r,n).replace(/:/g,";")+e.substring(n,e.length));let i=Cse.exec(e||""),s={},o=14;for(;o--;)s[Ose[o]]=i[o]||"";return r!=-1&&n!=-1&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=Mse(s,s.path),s.queryKey=Rse(s,s.query),s}function Mse(e,t){const r=/\/{2,9}/g,n=t.replace(r,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&n.splice(0,1),t.slice(-1)=="/"&&n.splice(n.length-1,1),n}function Rse(e,t){const r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,i,s){i&&(r[i]=s)}),r}const jA=typeof addEventListener=="function"&&typeof removeEventListener=="function",Ry=[];jA&&addEventListener("offline",()=>{Ry.forEach(e=>e())},!1);class Ho extends Lr{constructor(t,r){if(super(),this.binaryType=fse,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(r=t,t=null),t){const n=wA(t);r.hostname=n.host,r.secure=n.protocol==="https"||n.protocol==="wss",r.port=n.port,n.query&&(r.query=n.query)}else r.host&&(r.hostname=wA(r.host).host);Dv(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(n=>{const i=n.prototype.name;this.transports.push(i),this._transportsByName[i]=n}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=xse(this.opts.query)),jA&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Ry.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const r=Object.assign({},this.opts.query);r.EIO=f7,r.transport=t,this.id&&(r.sid=this.id);const n=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Ho.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const r=this.createTransport(t);r.open(),this.setTransport(r)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",Ho.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const r=new Error("server error");r.code=t.data,this._onError(r);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let n=0;n<this.writeBuffer.length;n++){const i=this.writeBuffer[n].data;if(i&&(r+=gse(i)),n>0&&r>this._maxPayload)return this.writeBuffer.slice(0,n);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Rv(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,r,n){return this._sendPacket("message",t,r,n),this}send(t,r,n){return this._sendPacket("message",t,r,n),this}_sendPacket(t,r,n,i){if(typeof r=="function"&&(i=r,r=void 0),typeof n=="function"&&(i=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const s={type:t,data:r,options:n};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),t()},n=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():t()}):this.upgrading?n():t()),this}_onError(t){if(Ho.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),jA&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const n=Ry.indexOf(this._offlineEventListener);n!==-1&&Ry.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,r),this.writeBuffer=[],this._prevBufferLen=0}}}Ho.protocol=f7;class Dse extends Ho{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let r=this.createTransport(t),n=!1;Ho.priorWebsocketSuccess=!1;const i=()=>{n||(r.send([{type:"ping",data:"probe"}]),r.once("packet",h=>{if(!n)if(h.type==="pong"&&h.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;Ho.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(u(),this.setTransport(r),r.send([{type:"upgrade"}
vendor: 14,453 bytes, line 740
740]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=r.name,this.emitReserved("upgradeError",m)}}))};function s(){n||(n=!0,u(),r.close(),r=null)}const o=h=>{const m=new Error("probe error: "+h);m.transport=r.name,s(),this.emitReserved("upgradeError",m)};function l(){o("transport closed")}function c(){o("socket closed")}function d(h){r&&h.name!==r.name&&s()}const u=()=>{r.removeListener("open",i),r.removeListener("error",o),r.removeListener("close",l),this.off("close",c),this.off("upgrading",d)};r.once("open",i),r.once("error",o),r.once("close",l),this.once("close",c),this.once("upgrading",d),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{n||r.open()},200):r.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const r=[];for(let n=0;n<t.length;n++)~this.transports.indexOf(t[n])&&r.push(t[n]);return r}}let Ise=class extends Dse{constructor(t,r={}){const n=typeof t=="object",i=n?{...t}:{...r};(!i.transports||i.transports&&typeof i.transports[0]=="string")&&(i.transports=(i.transports||["polling","websocket","webtransport"]).map(s=>Pse[s]).filter(s=>!!s)),super(n?i:t,i)}};function Lse(e,t="",r){let n=e;r=r||typeof location<"u"&&location,e==null&&(e=r.protocol+"//"+r.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=r.protocol+e:e=r.host+e),/^(https?|wss?):\/\//.test(e)||(typeof r<"u"?e=r.protocol+"//"+e:e="https://"+e),n=wA(e)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const s=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+s+":"+n.port+t,n.href=n.protocol+"://"+s+(r&&r.port===n.port?"":":"+n.port),n}const $se=typeof ArrayBuffer=="function",Fse=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,v7=Object.prototype.toString,Bse=typeof Blob=="function"||typeof Blob<"u"&&v7.call(Blob)==="[object BlobConstructor]",Use=typeof File=="function"||typeof File<"u"&&v7.call(File)==="[object FileConstructor]";function lE(e){return $se&&(e instanceof ArrayBuffer||Fse(e))||Bse&&e instanceof Blob||Use&&e instanceof File}function Dy(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let r=0,n=e.length;r<n;r++)if(Dy(e[r]))return!0;return!1}if(lE(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Dy(e.toJSON(),!0);for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&Dy(e[r]))return!0;return!1}function qse(e){const t=[],r=e.data,n=e;return n.data=NA(r,t),n.attachments=t.length,{packet:n,buffers:t}}function NA(e,t){if(!e)return e;if(lE(e)){const r={_placeholder:!0,num:t.length};return t.push(e),r}else if(Array.isArray(e)){const r=new Array(e.length);for(let n=0;n<e.length;n++)r[n]=NA(e[n],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){const r={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=NA(e[n],t));return r}return e}function zse(e,t){return e.data=_A(e.data,t),delete e.attachments,e}function _A(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let r=0;r<e.length;r++)e[r]=_A(e[r],t);else if(typeof e=="object")for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(e[r]=_A(e[r],t));return e}const x7=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Vse=5;var St;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(St||(St={}));class Hse{constructor(t){this.replacer=t}encode(t){return(t.type===St.EVENT||t.type===St.ACK)&&Dy(t)?this.encodeAsBinary({type:t.type===St.EVENT?St.BINARY_EVENT:St.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let r=""+t.type;return(t.type===St.BINARY_EVENT||t.type===St.BINARY_ACK)&&(r+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(r+=t.nsp+","),t.id!=null&&(r+=t.id),t.data!=null&&(r+=JSON.stringify(t.data,this.replacer)),r}encodeAsBinary(t){const r=qse(t),n=this.encodeAsString(r.packet),i=r.buffers;return i.unshift(n),i}}class cE extends Lr{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let r;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(t);const n=r.type===St.BINARY_EVENT;n||r.type===St.BINARY_ACK?(r.type=n?St.EVENT:St.ACK,this.reconstructor=new Wse(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(lE(t)||t.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(t),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let r=0;const n={type:Number(t.charAt(0))};if(St[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===St.BINARY_EVENT||n.type===St.BINARY_ACK){const s=r+1;for(;t.charAt(++r)!=="-"&&r!=t.length;);const o=t.substring(s,r);if(o!=Number(o)||t.charAt(r)!=="-")throw new Error("Illegal attachments");const l=Number(o);if(!b7(l)||l<0)throw new Error("Illegal attachments");if(l>this.opts.maxAttachments)throw new Error("too many attachments");n.attachments=l}if(t.charAt(r+1)==="/"){const s=r+1;for(;++r&&!(t.charAt(r)===","||r===t.length););n.nsp=t.substring(s,r)}else n.nsp="/";const i=t.charAt(r+1);if(i!==""&&Number(i)==i){const s=r+1;for(;++r;){const o=t.charAt(r);if(o==null||Number(o)!=o){--r;break}if(r===t.length)break}n.id=Number(t.substring(s,r+1))}if(t.charAt(++r)){const s=this.tryParse(t.substr(r));if(cE.isPayloadValid(n.type,s))n.data=s;else throw new Error("invalid payload")}return n}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch{return!1}}static isPayloadValid(t,r){switch(t){case St.CONNECT:return i0(r);case St.DISCONNECT:return r===void 0;case St.CONNECT_ERROR:return typeof r=="string"||i0(r);case St.EVENT:case St.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&x7.indexOf(r[0])===-1);case St.ACK:case St.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Wse{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const r=zse(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function Gse(e){return typeof e=="string"}const b7=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function Kse(e){return e===void 0||b7(e)}function i0(e){return Object.prototype.toString.call(e)==="[object Object]"}function Yse(e,t){switch(e){case St.CONNECT:return t===void 0||i0(t);case St.DISCONNECT:return t===void 0;case St.EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&x7.indexOf(t[0])===-1);case St.ACK:return Array.isArray(t);case St.CONNECT_ERROR:return typeof t=="string"||i0(t);default:return!1}}function Xse(e){return Gse(e.nsp)&&Kse(e.id)&&Yse(e.type,e.data)}const Qse=Object.freeze(Object.defineProperty({__proto__:null,Decoder:cE,Encoder:Hse,get PacketType(){return St},isPacketValid:Xse,protocol:Vse},Symbol.toStringTag,{value:"Module"}));function vi(e,t,r){return e.on(t,r),function(){e.off(t,r)}}const Zse=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class w7 extends Lr{constructor(t,r,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=r,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[vi(t,"open",this.onopen.bind(this)),vi(t,"packet",this.onpacket.bind(this)),vi(t,"error",this.onerror.bind(this)),vi(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...r){var n,i,s;if(Zse.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(r.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;const o={type:St.EVENT,data:r};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const u=this.ids++,h=r.pop();this._registerAckCallback(u,h),o.id=u}const l=(i=(n=this.io.engine)===null||n===void 0?void 0:n.transport)===null||i===void 0?void 0:i.writable,c=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!l||(c?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,r){var n;const i=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(i===void 0){this.acks[t]=r;return}const s=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let l=0;l<this.sendBuffer.length;l++)this.sendBuffer[l].id===t&&this.sendBuffer.splice(l,1);r.call(this,new Error("operation has timed out"))},i),o=(...l)=>{this.io.clearTimeoutFn(s),r.apply(this,l)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...r){return new Promise((n,i)=>{const s=(o,l)=>o?i(o):n(l);s.withError=!0,r.push(s),this.emit(t,...r)})}_addToQueue(t){let r;typeof t[t.length-1]=="function"&&(r=t.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...s)=>(this._queue[0],i!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(i)):(this._queue.shift(),r&&r(null,...s)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!t||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:St.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(n=>String(n.id)===t)){const n=this.acks[t];delete this.acks[t],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case St.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case St.EVENT:case St.BINARY_EVENT:this.onevent(t);break;case St.ACK:case St.BINARY_ACK:this.onack(t);break;case St.DISCONNECT:this.ondisconnect();break;case St.CONNECT_ERROR:this.destroy();const n=new Error(t.data.message);n.data=t.data.data,this.emitReserved("connect_error",n);break}}onevent(t){const r=t.data||[];t.id!=null&&r.push(this.ack(t.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const n of r)n.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const r=this;let n=!1;return function(...i){n||(n=!0,r.packet({type:St.ACK,id:t,data:i}))}}onack(t){const r=this.acks[t.id];typeof r=="function"&&(delete this.acks[t.id],r.withError&&t.data.unshift(null),r.apply(this,t.data))}onconnect(t,r){this.id=t,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:St.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const r=this._anyListeners;for(let n=0;n<r.length;n++)if(t===r[n])return r.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const r=this._anyOutgoingListeners;for(let n=0;n<r.length;n++)if(t===r[n])return r.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const r=this._anyOutgoingListeners.slice();for(const n of r)n.apply(this,t.data)}}}function Kd(e){e=e||{}
vendor: 4,381 bytes, line 740
740,this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Kd.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),r=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-r:e+r}return Math.min(e,this.max)|0};Kd.prototype.reset=function(){this.attempts=0};Kd.prototype.setMin=function(e){this.ms=e};Kd.prototype.setMax=function(e){this.max=e};Kd.prototype.setJitter=function(e){this.jitter=e};class SA extends Lr{constructor(t,r){var n;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(r=t,t=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,Dv(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((n=r.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new Kd({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=t;const i=r.parser||Qse;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var r;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(r=this.backoff)===null||r===void 0||r.setMin(t),this)}randomizationFactor(t){var r;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(r=this.backoff)===null||r===void 0||r.setJitter(t),this)}reconnectionDelayMax(t){var r;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(r=this.backoff)===null||r===void 0||r.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Ise(this.uri,this.opts);const r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const i=vi(r,"open",function(){n.onopen(),t&&t()}),s=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},o=vi(r,"error",s);if(this._timeout!==!1){const l=this._timeout,c=this.setTimeoutFn(()=>{i(),s(new Error("timeout")),r.close()},l);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(vi(t,"ping",this.onping.bind(this)),vi(t,"data",this.ondata.bind(this)),vi(t,"error",this.onerror.bind(this)),vi(t,"close",this.onclose.bind(this)),vi(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(r){this.onclose("parse error",r)}}ondecoded(t){Rv(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,r){let n=this.nsps[t];return n?this._autoConnect&&!n.active&&n.connect():(n=new w7(this,t,r),this.nsps[t]=n),n}_destroy(t){const r=Object.keys(this.nsps);for(const n of r)if(this.nsps[n].active)return;this._close()}_packet(t){const r=this.encoder.encode(t);for(let n=0;n<r.length;n++)this.engine.write(r[n],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,r){var n;this.cleanup(),(n=this.engine)===null||n===void 0||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>
740{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},r);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const rh={};function Iy(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const r=Lse(e,t.path||"/socket.io"),n=r.source,i=r.id,s=r.path,o=rh[i]&&s in rh[i].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let c;return l?c=new SA(n,t):(rh[i]||(rh[i]=new SA(n,t)),c=rh[i]),r.query&&!t.query&&(t.query=r.queryKey),c.socket(r.path,t)}Object.assign(Iy,{Manager:SA,Socket:w7,io:Iy,connect:Iy});const Jse=250;function ZM(e,t){var r;const n=(r=e.token)!==null&&r!==void 0?r:Ps(),i={app_id:e.appId,token:n};n||(i.anonymous_id=a0());const s=Iy(e.serverUrl,{path:e.mountPath,transports:e.transports,query:i});return s.on("connect",async()=>{var o;return console.log("connect",s.id),(o=t.connect)===null||o===void 0?void 0:o.call(t)}),s.on("update_model",async o=>{var l;return(l=t.update_model)===null||l===void 0?void 0:l.call(t,o)}),s.on("error",async o=>{var l;return(l=t.error)===null||l===void 0?void 0:l.call(t,o)}),s.on("connect_error",async o=>{var l;return console.error("connect_error",o),(l=t.error)===null||l===void 0?void 0:l.call(t,o)}),s}function eoe({config:e}){let t={...e};const r={},n={},i={connect:async()=>{const x=[];Object.keys(r).forEach(w=>{const _=m(w);_.length!==0&&(d(w),_.forEach(({connect:j})=>{const S=async()=>j==null?void 0:j();x.push(S())}))}),await Promise.all(x)},update_model:async x=>{const _=m(x.room).map(j=>{var S;return(S=j.update_model)===null||S===void 0?void 0:S.call(j,x)});await Promise.all(_)},error:async x=>{console.error("error",x);const w=Object.values(r).flat().map(_=>{var j;return(j=_.error)===null||j===void 0?void 0:j.call(_,x)});await Promise.all(w)}};let s=ZM(e,i);function o(){l()}function l(){b(),s&&s.disconnect()}function c(x){o(),t={...t,...x},s=ZM(t,i)}function d(x){s.emit("join",x)}function u(x){s.emit("leave",x)}async function h(x,w){var _;const j=JSON.stringify(w);return(_=i.update_model)===null||_===void 0?void 0:_.call(i,{room:x,data:j})}function m(x){var w;return(w=r[x])!==null&&w!==void 0?w:[]}function g(x){const w=n[x];w&&(clearTimeout(w),delete n[x])}function b(){Object.keys(n).forEach(x=>{var w,_;clearTimeout(n[x]),delete n[x],((_=(w=r[x])===null||w===void 0?void 0:w.length)!==null&&_!==void 0?_:0)===0&&delete r[x]})}function v(x){g(x),n[x]=setTimeout(()=>{var w,_;delete n[x],!(((_=(w=r[x])===null||w===void 0?void 0:w.length)!==null&&_!==void 0?_:0)>0)&&(u(x),delete r[x])},Jse)}return{socket:s,subscribeToRoom:(x,w)=>{r[x]?g(x):(d(x),r[x]=[]),r[x].push(w);let _=!1;return()=>{var j,S;_||(_=!0,r[x]=(S=(j=r[x])===null||j===void 0?void 0:j.filter(k=>k!==w))!==null&&S!==void 0?S:[],r[x].length===0&&v(x))}},updateConfig:c,updateModel:h,disconnect:l}}(!globalThis.EventTarget||!globalThis.Event)&&console.error(` 741 PartySocket requires a global 'EventTarget' class to be available! 742 You can polyfill this global by adding this to your code before any partysocket imports: 743 744 \`\`\` 745 import 'partysocket/event-target-polyfill'; 746 \`\`\` 747 Please file an issue at https://github.com/partykit/partykit if you're still having trouble. 748`);var j7=class extends Event{constructor(t,r){super("error",r);ar(this,"message");ar(this,"error");this.message=t.message,this.error=t}},N7=class extends Event{constructor(t=1e3,r="",n){super("close",n);ar(this,"code");ar(this,"reason");ar(this,"wasClean",!0);this.code=t,this.reason=r}},a1={Event,ErrorEvent:j7,CloseEvent:N7};function toe(e,t){if(!e)throw new Error(t)}function roe(e){return new e.constructor(e.type,e)}function noe(e){return"data"in e?new MessageEvent(e.type,e):"code"in e||"reason"in e?new N7(e.code||1999,e.reason||"unknown reason",e):"error"in e?new j7(e.error,e):new Event(e.type,e)}var kB,aoe=typeof process<"u"&&typeof((kB=process.versions)==null?void 0:kB.node)<"u"&&typeof document>"u",ty=aoe?noe:roe,Tl={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0}
vendor: 4,178 bytes, line 748
748,JM=!1,ioe=class Rl extends EventTarget{constructor(r,n,i={}){super();ar(this,"_ws");ar(this,"_retryCount",-1);ar(this,"_uptimeTimeout");ar(this,"_connectTimeout");ar(this,"_shouldReconnect",!0);ar(this,"_connectLock",!1);ar(this,"_binaryType","blob");ar(this,"_closeCalled",!1);ar(this,"_messageQueue",[]);ar(this,"_url");ar(this,"_protocols");ar(this,"_options");ar(this,"onclose",null);ar(this,"onerror",null);ar(this,"onmessage",null);ar(this,"onopen",null);ar(this,"_handleOpen",r=>{this._debug("open event");const{minUptime:n=Tl.minUptime}=this._options;clearTimeout(this._connectTimeout),this._uptimeTimeout=setTimeout(()=>this._acceptOpen(),n),toe(this._ws,"WebSocket is not defined"),this._ws.binaryType=this._binaryType,this._messageQueue.forEach(i=>{var s;return(s=this._ws)==null?void 0:s.send(i)}),this._messageQueue=[],this.onopen&&this.onopen(r),this.dispatchEvent(ty(r))});ar(this,"_handleMessage",r=>{this._debug("message event"),this.onmessage&&this.onmessage(r),this.dispatchEvent(ty(r))});ar(this,"_handleError",r=>{this._debug("error event",r.message),this._disconnect(void 0,r.message==="TIMEOUT"?"timeout":void 0),this.onerror&&this.onerror(r),this._debug("exec error listeners"),this.dispatchEvent(ty(r)),this._connect()});ar(this,"_handleClose",r=>{this._debug("close event"),this._clearTimeouts(),this._shouldReconnect&&this._connect(),this.onclose&&this.onclose(r),this.dispatchEvent(ty(r))});this._url=r,this._protocols=n,this._options=i,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}static get CONNECTING(){return 0}static get OPEN(){return 1}static get CLOSING(){return 2}static get CLOSED(){return 3}get CONNECTING(){return Rl.CONNECTING}get OPEN(){return Rl.OPEN}get CLOSING(){return Rl.CLOSING}get CLOSED(){return Rl.CLOSED}get binaryType(){return this._ws?this._ws.binaryType:this._binaryType}set binaryType(r){this._binaryType=r,this._ws&&(this._ws.binaryType=r)}get retryCount(){return Math.max(this._retryCount,0)}get bufferedAmount(){return this._messageQueue.reduce((n,i)=>(typeof i=="string"?n+=i.length:i instanceof Blob?n+=i.size:n+=i.byteLength,n),0)+(this._ws?this._ws.bufferedAmount:0)}get extensions(){return this._ws?this._ws.extensions:""}get protocol(){return this._ws?this._ws.protocol:""}get readyState(){return this._ws?this._ws.readyState:this._options.startClosed?Rl.CLOSED:Rl.CONNECTING}get url(){return this._ws?this._ws.url:""}get shouldReconnect(){return this._shouldReconnect}close(r=1e3,n){if(this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(r,n)}reconnect(r,n){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(r,n),this._connect())}send(r){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",r),this._ws.send(r);else{const{maxEnqueuedMessages:n=Tl.maxEnqueuedMessages}=this._options;this._messageQueue.length<n&&(this._debug("enqueue",r),this._messageQueue.push(r))}}_debug(...r){this._options.debug&&console.log.apply(console,["RWS>",...r])}_getNextDelay(){const{reconnectionDelayGrowFactor:r=Tl.reconnectionDelayGrowFactor,minReconnectionDelay:n=Tl.minReconnectionDelay,maxReconnectionDelay:i=Tl.maxReconnectionDelay}=this._options;let s=0;return this._retryCount>0&&(s=n*Math.pow(r,this._retryCount-1),s>i&&(s=i)),this._debug("next delay",s),s}_wait(){return new Promise(r=>{setTimeout(r,this._getNextDelay())})}_getNextProtocols(r){if(!r)return Promise.resolve(null);if(typeof r=="string"||Array.isArray(r))return Promise.resolve(r);if(typeof r=="function"){const n=r();if(!n)return Promise.resolve(null);if(typeof n=="string"||Array.isArray(n))return Promise.resolve(n);if(n.then)return n}throw Error("Invalid protocols")}_getNextUrl(r){if(typeof r=="string")return Promise.resolve(r);if(typeof r=="function"){const n=r();if(typeof n=="string")return Promise.resolve(n);if(n.then)return n}throw Error("Invalid URL")}_connect(){if(this._connectLock||!this._shouldReconnect)return;this._connectLock=!0;
748const{maxRetries:r=Tl.maxRetries,connectionTimeout:n=Tl.connectionTimeout}=this._options;if(this._retryCount>=r){this._debug("max retries reached",this._retryCount,">=",r);return}this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),this._wait().then(()=>Promise.all([this._getNextUrl(this._url),this._getNextProtocols(this._protocols||null)])).then(([i,s])=>{if(this._closeCalled){this._connectLock=!1;return}!this._options.WebSocket&&typeof WebSocket>"u"&&!JM&&(console.error(`â¼ï¸ No WebSocket implementation available. You should define options.WebSocket. 749 750For example, if you're using node.js, run \`npm install ws\`, and then in your code: 751 752import PartySocket from 'partysocket'; 753import WS from 'ws'; 754 755const partysocket = new PartySocket({ 756 host: "127.0.0.1:1999", 757 room: "test-room", 758 WebSocket: WS 759}); 760 761`),JM=!0);const o=this._options.WebSocket||WebSocket;this._debug("connect",{url:i,protocols:s}),this._ws=s?new o(i,s):new o(i),this._ws.binaryType=this._binaryType,this._connectLock=!1,this._addListeners(),this._connectTimeout=setTimeout(()=>this._handleTimeout(),n)}).catch(i=>{this._connectLock=!1,this._handleError(new a1.ErrorEvent(Error(i.message),this))})}_handleTimeout(){this._debug("timeout event"),this._handleError(new a1.ErrorEvent(Error("TIMEOUT"),this))}_disconnect(r=1e3,n){if(this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(r,n),this._handleClose(new a1.CloseEvent(r,n,this))}catch{}}}_acceptOpen(){this._debug("accept open"),this._retryCount=0}_removeListeners(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))}_addListeners(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))}_clearTimeouts(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}};/*! 762 * Reconnecting WebSocket 763 * by Pedro Ladaria <[email protected]> 764 * https://github.com/pladaria/reconnecting-websocket 765 * License MIT 766 */const soe=1e3,ooe=3e3,loe=new Set([405,409,422,503]),coe=new Set([400,403,404]);function uoe(e){const t=e&&typeof e=="object"?e.status:void 0;return typeof t=="number"?t:void 0}function doe(e){return e instanceof Error?e:new Error(String(e))}class foe{constructor(t,r,n,i,s){var o;this.onClose=s,this.listeners=new Set,this.heartbeat=null,this.closed=!1,this.id=(o=i==null?void 0:i.id)!==null&&o!==void 0?o:crypto.randomUUID();let l=n.transport==="proxy";const c=async()=>{var m;if(this.closed)throw new Error("Actor connection is closed");if(!l)try{const{websocket_url:g,token:b}=await n.mintConnectionToken(t,r,this.id),v=g.includes("?")?"&":"?";return`${g}${v}token=${encodeURIComponent(b)}`}catch(g){const b=uoe(g);if(!(n.transport!=="direct"&&b!==void 0&&loe.has(b))){b!==void 0&&coe.has(b)&&this.close();try{(m=n.onMintError)===null||m===void 0||m.call(n,doe(g))}catch{}throw g}l=!0}return moe(n.host,t,r,this.id,n.appId,n.getAuthToken(),n.functionsVersion)},d=new ioe(c);this.ws=d;let u=Date.now();const h=()=>{u=Date.now()};d.addEventListener("open",h),d.addEventListener("message",m=>{h();let g;try{g=JSON.parse(m.data)}catch{return}if((g&&typeof g=="object"?g.type:void 0)!=="__pong")for(const v of this.listeners)v(g)}),this.heartbeat=setInterval(()=>{if(Date.now()-u>ooe){h(),d.readyState===d.OPEN&&d.reconnect();return}try{d.send(JSON.stringify({type:"__ping"}))}catch{}},soe)}subscribe(t){return this.listeners.add(t),{unsubscribe:()=>{this.listeners.delete(t)}}}send(t){this.closed||this.ws.send(JSON.stringify(t))}close(){this.closed||(this.closed=!0,this.heartbeat&&(clearInterval(this.heartbeat),this.heartbeat=null),this.listeners.clear(),this.ws.close(),this.onClose())}}function hoe(e,t,r,n){let i=null;return{connect(s){if(i)return i;const o=new foe(e,t,r,s,()=>{n.delete(o),i===o&&(i=null)});return i=o,n.add(o),o}}}function moe(e,t,r,n,i,s,o){let l=e.replace(/^(http|https|ws|wss):\/\//,"");l.endsWith("/")&&(l=l.slice(0,-1));const c=l.startsWith("localhost:")||l.startsWith("127.0.0.1:")||l.startsWith("192.168.")||l.startsWith("10.")||l.startsWith("172.")&&l.split(".")[1]>="16"&&l.split(".")[1]<="31"||l.startsWith("[::ffff:7f00:1]:"),d=new URLSearchParams([["_pk",n],["app_id",i],["handler",t]]);return s&&d.append("token",s),o&&d.append("fv",o),`${c?"ws":"wss"}://${l}/parties/${t}/${r}?${d}`}function poe(e,t){return e&&!e.startsWith("/")?e:t??e}function goe(e){const t=new Set;return{module:new Proxy({}
766,{get(n,i){if(!(typeof i!="string"||i==="then"))return s=>hoe(i,s,e,t)}}),closeAll:()=>{for(const n of[...t])n.close()}}}function uE(e){var t,r,n,i;const{serverUrl:s="https://base44.app",appId:o,analytics:l,token:c,serviceToken:d,requiresAuth:u=!1,appBaseUrl:h,options:m,functionsVersion:g,headers:b}=e,v=typeof h=="string"?h:"",y={serverUrl:s,mountPath:"/ws-user-apps/socket.io/",transports:["websocket"],appId:o,token:c};let x=null;const w=()=>(x||(x=eoe({config:y})),x),_={...b,"X-App-Id":String(o)},j=g?{..._,"Base44-Functions-Version":g}:_,S=ju({baseURL:`${s}/api`,headers:_,token:c,onError:m==null?void 0:m.onError}),k=ju({baseURL:`${s}/api`,headers:j,token:c,interceptResponses:!1,onError:m==null?void 0:m.onError}),T={..._,...c?{"on-behalf-of":`Bearer ${c}`}:{}},P=ju({baseURL:`${s}/api`,headers:T,token:d,onError:m==null?void 0:m.onError}),M=ju({baseURL:`${s}/api`,headers:j,token:d,interceptResponses:!1}),C=ju({baseURL:`${s}/api`,headers:_}),O=Hie(S,k,o,{appBaseUrl:v,token:c});if(typeof window<"u"){const G=c||Ps();G&&O.setToken(G)}const D=goe({appId:o,host:poe(s,typeof window<"u"?(t=window.location)===null||t===void 0?void 0:t.origin:void 0),functionsVersion:g,getAuthToken:()=>c||Ps(),mintConnectionToken:async(G,W,q)=>{const V=c||Ps();return await C.post(`/apps/${o}/actors/${encodeURIComponent(G)}/connection-token`,{room:W,connection_id:q},{headers:{...V?{Authorization:`Bearer ${V}`}:{},...g?{"Base44-Functions-Version":g}:{}}})},transport:m==null?void 0:m.actorsTransport,onMintError:m==null?void 0:m.onError}),L={entities:qM({axios:S,appId:o,getSocket:w}),integrations:zM(S,o),connectors:Xie(S,o),auth:O,functions:VM(k,o,{getAuthHeaders:()=>{const G={},W=c||Ps();return W&&(G.Authorization=`Bearer ${W}`),G},baseURL:(r=k.defaults)===null||r===void 0?void 0:r.baseURL}),agents:HM({axios:S,getSocket:w,appId:o,serverUrl:s,token:c}),aiGateway:WM({serverUrl:s,token:c,appId:o}),appLogs:GM(S,o),app:tse(S,o),users:rse(S,o),analytics:Oie({axiosClient:S,serverUrl:s,appId:o,userAuthModule:O,enabled:(n=l==null?void 0:l.enabled)!==null&&n!==void 0?n:!0}),actors:D.module,cleanup:()=>{L.analytics.cleanup(),D.closeAll(),x&&x.disconnect()}},F={entities:qM({axios:P,appId:o,getSocket:w}),integrations:zM(P,o),sso:Wie(P,o),connectors:Kie(P,o),functions:VM(M,o,{getAuthHeaders:()=>{const G={};return d&&(G.Authorization=`Bearer ${d}`),G},baseURL:(i=M.defaults)===null||i===void 0?void 0:i.baseURL}),agents:HM({axios:P,getSocket:w,appId:o,serverUrl:s,token:c}),aiGateway:WM({serverUrl:s,token:d,appId:o}),appLogs:GM(P,o),cleanup:()=>{x&&x.disconnect()}};return u&&typeof window<"u"&&setTimeout(async()=>{try{await L.auth.isAuthenticated()||L.auth.redirectToLogin(window.location.href)}catch(G){console.error("Authentication check failed:",G),L.auth.redirectToLogin(window.location.href)}},0),{...L,fetchWithAuth:Jie({axios:S,serviceRoleAxios:P,appId:String(o),serverUrl:s,functionsVersion:g,platformHeaders:b}),setToken(G){L.auth.setToken(G),x&&x.updateConfig({token:G}),y.token=G},getConfig(){return{serverUrl:s,appId:o,requiresAuth:u}},get asServiceRole(){if(!d)throw new Error("Service token is required to use asServiceRole. Please provide a serviceToken when creating the client.");return F}}}function yoe(e){const t=e.headers.get("Authorization"),r=e.headers.get("Base44-Service-Authorization"),n=e.headers.get("Base44-App-Id"),i=e.headers.get("Base44-Api-Url"),s=e.headers.get("Base44-Functions-Version"),o=e.headers.get("Base44-State"),l=e.headers.get("X-Data-Env");if(!n)throw new Error("Base44-App-Id header is required, but is was not found on the request");let c,d;if(r!==null){if(r===""||!r.startsWith("Bearer ")||r.split(" ").length!==2)throw new Error('Invalid authorization header format. Expected "Bearer <token>"');c=r.split(" ")[1]}if(t!==null){if(t===""||!t.startsWith("Bearer ")||t.split(" ").length!==2)throw new Error('Invalid authorization header format. Expected "Bearer <token>"');d=t.split(" ")[1]}const u={};return o&&(u["Base44-State"]=o),(l==="dev"||l==="prod")&&(u["X-Data-Env"]=l),uE({serverUrl:i||"https://base44.app",appId:n,token:d,serviceToken:c,functionsVersion:s??void 0,headers:u})}class voe{constructor(){this.tickIntervalMs=100}handleStart(){}handleWake(t){}schedule(t,r){throw new Error("Actor.schedule() is only available inside a deployed actor")}cancelSchedule(t){throw new Error("Actor.cancelSchedule() is only available inside a deployed actor")}broadcast(t){throw new Error("Actor.broadcast() is only available inside a deployed actor")}getConnections(){throw new Error("Actor.getConnections() is only available inside a deployed actor")}get instanceId(){throw new Error("Actor.instanceId is only available inside a deployed actor")}get storage(){throw new Error("Actor.storage is only available inside a deployed actor")}get client(){throw new Error("Actor.client is only available inside a deployed actor")}}const xoe=Object.freeze(Object.defineProperty({__proto__:null,Actor:voe,Base44Error:a7,createClient:uE,createClientFromRequest:yoe,getAccessToken:Ps,getLoginUrl:Zie,removeAccessToken:Qie,saveAcce
766ssToken:s7},Symbol.toStringTag,{value:"Module"})),_7=typeof window>"u",boe=_7?{localStorage:new Map}:window,Mh=boe.localStorage,woe=e=>e.replace(/([A-Z])/g,"_$1").toLowerCase(),hu=(e,{defaultValue:t=void 0,removeFromUrl:r=!1}={})=>{if(_7)return t;const n=`base44_${woe(e)}`,i=new URLSearchParams(window.location.search),s=i.get(e);if(r){i.delete(e);const l=`${window.location.pathname}${i.toString()?`?${i.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,l)}if(s)return Mh.setItem(n,s),s;if(t)return Mh.setItem(n,t),t;const o=Mh.getItem(n);return o||null},joe=()=>(hu("clear_access_token")==="true"&&(Mh.removeItem("base44_access_token"),Mh.removeItem("token")),{appId:hu("app_id",{defaultValue:"68373e3f1c18c880ebeee7f9"}),token:hu("access_token",{removeFromUrl:!0}),fromUrl:hu("from_url",{defaultValue:window.location.href}),functionsVersion:hu("functions_version",{defaultValue:"prod"}),appBaseUrl:hu("app_base_url",{defaultValue:void 0})}),wh={...joe()},{appId:Noe,token:_oe,functionsVersion:Soe,appBaseUrl:Aoe}=wh,vn=uE({appId:Noe,token:_oe,functionsVersion:Soe,serverUrl:"",requiresAuth:!1,appBaseUrl:Aoe}),S7=A.createContext(),koe=({children:e})=>{const[t,r]=A.useState(null),[n,i]=A.useState(!1),[s,o]=A.useState(!0),[l,c]=A.useState(!0),[d,u]=A.useState(null),[h,m]=A.useState(null);A.useEffect(()=>{g()},[]);const g=async()=>{var x,w;try{c(!0),u(null);const _=ju({baseURL:"/api/apps/public",headers:{"X-App-Id":wh.appId},token:wh.token,interceptResponses:!0});try{const j=await _.get(`/prod/public-settings/by-id/${wh.appId}`);m(j),wh.token?await b():(o(!1),i(!1)),c(!1)}catch(j){if(console.error("App state check failed:",j),j.status===403&&((w=(x=j.data)==null?void 0:x.extra_data)!=null&&w.reason)){const S=j.data.extra_data.reason;u(S==="auth_required"?{type:"auth_required",message:"Authentication required"}:S==="user_not_registered"?{type:"user_not_registered",message:"User not registered for this app"}:{type:S,message:j.message})}else u({type:"unknown",message:j.message||"Failed to load app"});c(!1),o(!1)}}catch(_){console.error("Unexpected error:",_),u({type:"unknown",message:_.message||"An unexpected error occurred"}),c(!1),o(!1)}},b=async()=>{try{o(!0);const x=await vn.auth.me();r(x),i(!0),o(!1)}catch(x){console.error("User auth check failed:",x),o(!1),i(!1),r(null)}},v=(x=!0)=>{r(null),i(!1),x?vn.auth.logout(window.location.href):vn.auth.logout()},y=()=>{vn.auth.redirectToLogin(window.location.href)};return a.jsx(S7.Provider,{value:{user:t,isAuthenticated:n,isLoadingAuth:s,isLoadingPublicSettings:l,authError:d,appPublicSettings:h,logout:v,navigateToLogin:y,checkAppState:g},children:e})},dE=()=>{const e=A.useContext(S7);if(!e)throw new Error("useAuth must be used within an AuthProvider");return e},be=A.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:Ie("rounded-xl border bg-card text-card-foreground shadow",e),...t}));be.displayName="Card";const Be=A.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:Ie("flex flex-col space-y-1.5 p-6",e),...t}));Be.displayName="CardHeader";const qe=A.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:Ie("font-semibold leading-none tracking-tight",e),...t}));qe.displayName="CardTitle";const ic=A.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:Ie("text-sm text-muted-foreground",e),...t}));ic.displayName="CardDescription";const Se=A.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:Ie("p-6 pt-0",e),...t}));Se.displayName="CardContent";const mp=A.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:Ie("flex items-center p-6 pt-0",e),...t}));mp.displayName="CardFooter";function Ge(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 Eoe(e,t){const r=A.createContext(t),n=s=>{const{children:o,...l}=s,c=A.useMemo(()=>l,Object.values(l));return a.jsx(r.Provider,{value:c,children:o})};n.displayName=e+"Provider";function i(s){const o=A.useContext(r);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[n,i]}function xn(e,t=[]){let r=[];function n(s,o){const l=A.createContext(o),c=r.length;r=[...r,o];const d=h=>{var x;const{scope:m,children:g,...b}=h,v=((x=m==null?void 0:m[e])==null?void 0:x[c])||l,y=A.useMemo(()=>b,Object.values(b));return a.jsx(v.Provider,{value:y,children:g})};d.displayName=s+"Provider";function u(h,m){var v;const g=((v=m==null?void 0:m[e])==null?void 0:v[c])||l,b=A.useContext(g);if(b)return b;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${s}\``)}return[d,u]}const i=()=>{const s=r.map(o=>A.createContext(o));return function(l){const c=(l==null?void 0:l[e])||s;return A.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[n,Toe(i,...t)]}function Toe(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));
vendor: 10,595 bytes, line 766
766return function(s){const o=n.reduce((l,{useScope:c,scopeName:d})=>{const h=c(s)[`__scope${d}`];return{...l,...h}},{});return A.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}function eR(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Iv(...e){return t=>{let r=!1;const n=e.map(i=>{const s=eR(i,t);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let i=0;i<n.length;i++){const s=n[i];typeof s=="function"?s():eR(e[i],null)}}}}function wt(...e){return A.useCallback(Iv(...e),e)}function yc(e){const t=Coe(e),r=A.forwardRef((n,i)=>{const{children:s,...o}=n,l=A.Children.toArray(s),c=l.find(Ooe);if(c){const d=c.props.children,u=l.map(h=>h===c?A.Children.count(d)>1?A.Children.only(null):A.isValidElement(d)?d.props.children:null:h);return a.jsx(t,{...o,ref:i,children:A.isValidElement(d)?A.cloneElement(d,void 0,u):null})}return a.jsx(t,{...o,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}var Poe=yc("Slot");function Coe(e){const t=A.forwardRef((r,n)=>{const{children:i,...s}=r;if(A.isValidElement(i)){const o=Roe(i),l=Moe(s,i.props);return i.type!==A.Fragment&&(l.ref=n?Iv(n,o):o),A.cloneElement(i,l)}return A.Children.count(i)>1?A.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var A7=Symbol("radix.slottable");function k7(e){const t=({children:r})=>a.jsx(a.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=A7,t}function Ooe(e){return A.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===A7}function Moe(e,t){const r={...t};for(const n in t){const i=e[n],s=t[n];/^on[A-Z]/.test(n)?i&&s?r[n]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[n]=i):n==="style"?r[n]={...i,...s}:n==="className"&&(r[n]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function Roe(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 Lv(e){const t=e+"CollectionProvider",[r,n]=xn(t),[i,s]=r(t,{collectionRef:{current:null},itemMap:new Map}),o=v=>{const{scope:y,children:x}=v,w=te.useRef(null),_=te.useRef(new Map).current;return a.jsx(i,{scope:y,itemMap:_,collectionRef:w,children:x})};o.displayName=t;const l=e+"CollectionSlot",c=yc(l),d=te.forwardRef((v,y)=>{const{scope:x,children:w}=v,_=s(l,x),j=wt(y,_.collectionRef);return a.jsx(c,{ref:j,children:w})});d.displayName=l;const u=e+"CollectionItemSlot",h="data-radix-collection-item",m=yc(u),g=te.forwardRef((v,y)=>{const{scope:x,children:w,..._}=v,j=te.useRef(null),S=wt(y,j),k=s(u,x);return te.useEffect(()=>(k.itemMap.set(j,{ref:j,..._}),()=>void k.itemMap.delete(j))),a.jsx(m,{[h]:"",ref:S,children:w})});g.displayName=u;function b(v){const y=s(e+"CollectionConsumer",v);return te.useCallback(()=>{const w=y.collectionRef.current;if(!w)return[];const _=Array.from(w.querySelectorAll(`[${h}]`));return Array.from(y.itemMap.values()).sort((k,T)=>_.indexOf(k.ref.current)-_.indexOf(T.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:o,Slot:d,ItemSlot:g},b,n]}var Mr=globalThis!=null&&globalThis.document?A.useLayoutEffect:()=>{},Doe=Ck[" useId ".trim().toString()]||(()=>{}),Ioe=0;function ja(e){const[t,r]=A.useState(Doe());return Mr(()=>{r(n=>n??String(Ioe++))},[e]),t?`radix-${t}`:""}var Loe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],st=Loe.reduce((e,t)=>{const r=yc(`Primitive.${t}`),n=A.forwardRef((i,s)=>{const{asChild:o,...l}=i,c=o?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(c,{...l,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function E7(e,t){e&&lp.flushSync(()=>e.dispatchEvent(t))}function on(e){const t=A.useRef(e);return A.useEffect(()=>{t.current=e}),A.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}var $oe=Ck[" useInsertionEffect ".trim().toString()]||Mr;function Ka({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,s,o]=Foe({defaultProp:t,onChange:r}),l=e!==void 0,c=l?e:i;{const u=A.useRef(e!==void 0);A.useEffect(()=>{const h=u.current;h!==l&&console.warn(`${n} is changing from ${h?"controlled":"uncontrolled"} to ${l?"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.`),u.current=l},[l,n])}const d=A.useCallback(u=>{var h;if(l){const m=Boe(u)?u(e):u;m!==e&&((h=o.current)==null||h.call(o,m))}else s(u)},[l,e,s,o]);return[c,d]}function Foe({defaultProp:e,onChange:t}){const[r,n]=A.useState(e),i=A.useRef(r),s=A.useRef(t);return $oe(()=>{s.current=t},[t]),A.useEffect(()=>{var o;i.current!==r&&((o=s.current)==null||o.call(s,r),i.current=r)},[r,i]),[r,n,s]}function Boe(e){return typeof e=="function"}var Uoe=A.createContext(void 0);function Yd(e){const t=A.useContext(Uoe);return e||t||"ltr"}var i1="rovingFocusGroup.onEntryFocus",qoe={bubbles:!1,cancelable:!0},pp="RovingFocusGroup",[AA,T7,zoe]=Lv(pp),[Voe,$v]=xn(pp,[zoe]),[Hoe,Woe]=Voe(pp),P7=A.forwardRef((e,t)=>a.jsx(AA.Provider,{scope:e.__scopeRovingFocusGroup,children:a.jsx(AA.Slot,{scope:e.__scopeRovingFocusGroup,children:a.jsx(Goe,{...e,ref:t})})}));P7.displayName=pp;var Goe=A.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:s,currentTabStopId:o,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:d,preventScrollOnEntryFocus:u=!1,...h}=e,m=A.useRef(null),g=wt(t,m),b=Yd(s),[v,y]=Ka({prop:o,defaultProp:l??null,onChange:c,caller:pp}),[x,w]=A.useState(!1),_=on(d),j=T7(r),S=A.useRef(!1),[k,T]=A.useState(0);return A.useEffect(()=>{const P=m.current;if(P)return P.addEventListener(i1,_),()=>P.removeEventListener(i1,_)},[_]),a.jsx(Hoe,{scope:r,orientation:n,dir:b,loop:i,currentTabStopId:v,onItemFocus:A.useCallback(P=>y(P),[y]),onItemShiftTab:A.useCallback(()=>w(!0),[]),onFocusableItemAdd:A.useCallback(()=>T(P=>P+1),[]),onFocusableItemRemove:A.useCallback(()=>T(P=>P-1),[]),children:a.jsx(st.div,{tabIndex:x||k===0?-1:0,"data-orientation":n,...h,ref:g,style:{outline:"none",...e.style},onMouseDown:Ge(e.onMouseDown,()=>{S.current=!0}),onFocus:Ge(e.onFocus,P=>{const M=!S.current;if(P.target===P.currentTarget&&M&&!x){const C=new CustomEvent(i1,qoe);if(P.currentTarget.dispatchEvent(C),!C.defaultPrevented){const O=j().filter(G=>G.focusable),D=O.find(G=>G.active),L=O.find(G=>G.id===v),U=[D,L,...O].filter(Boolean).map(G=>G.ref.current);M7(U,u)}}S.current=!1}),onBlur:Ge(e.onBlur,()=>w(!1))})})}),C7="RovingFocusGroupItem",O7=A.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:s,children:o,...l}=e,c=ja(),d=s||c,u=Woe(C7,r),h=u.currentTabStopId===d,m=T7(r),{onFocusableItemAdd:g,onFocusableItemRemove:b,currentTabStopId:v}=u;return A.useEffect(()=>{if(n)return g(),()=>b()},[n,g,b]),a.jsx(AA.ItemSlot,{scope:r,id:d,focusable:n,active:i,children:a.jsx(st.span,{tabIndex:h?0:-1,"data-orientation":u.orientation,...l,ref:t,onMouseDown:Ge(e.onMouseDown,y=>{n?u.onItemFocus(d):y.preventDefault()}),onFocus:Ge(e.onFocus,()=>u.onItemFocus(d)),onKeyDown:Ge(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){u.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const x=Xoe(y,u.orientation,u.dir);if(x!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let _=m().filter(j=>j.focusable).map(j=>j.ref.current);if(x==="last")_.reverse();else if(x==="prev"||x==="next"){x==="prev"&&_.reverse();const j=_.indexOf(y.currentTarget);_=u.loop?Qoe(_,j+1):_.slice(j+1)}setTimeout(()=>M7(_))}}),children:typeof o=="function"?o({isCurrentTabStop:h,hasTabStop:v!=null}):o})})});O7.displayName=C7;var Koe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Yoe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Xoe(e,t,r){const n=Yoe(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Koe[n]}function M7(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function Qoe(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var R7=P7,D7=O7;function Zoe(e,t){return A.useReducer((r,n)=>t[r][n]??r,e)}var bn=e=>{const{present:t,children:r}=e,n=Joe(t),i=typeof r=="function"?r({present:n.isPresent}):A.Children.only(r),s=wt(n.ref,ele(i));return typeof r=="function"||n.isPresent?A.cloneElement(i,{ref:s}):null};bn.displayName="Presence";function Joe(e){const[t,r]=A.useState(),n=A.useRef(null),i=A.useRef(e),s=A.useRef("none"),o=e?"mounted":"unmounted",[l,c]=Zoe(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return A.useEffect(()=>{const d=ry(n.current);s.current=l==="mounted"?d:"none"},[l]),Mr(()=>{const d=n.current,u=i.current;if(u!==e){const m=s.current,g=ry(d);e?c("MOUNT"):g==="none"||(d==null?void 0:d.display)==="none"?c("UNMOUNT"):c(u&&m!==g?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),Mr(()=>{if(t){let d;const u=t.ownerDocument.defaultView??window,h=g=>{const v=ry(n.current).includes(CSS.escape(g.animationName));if(g.target===t&&v&&(c("ANIMATION_END"),!i.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",d=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},m=g=>{g.target===t&&(s.current=ry(n.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{u.clearTimeout(d),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:A.useCallback(d=>{n.current=d?getComputedStyle(d):null,r(d)},[])}}function ry(e){return(e==null?void 0:e.animationName)||"none"}function ele(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 Fv="Tabs",[tle]=xn(Fv,[$v]),I7=$v(),[rle,fE]=tle(Fv),L7=A.forwardRef((e,t)=>
766{const{__scopeTabs:r,value:n,onValueChange:i,defaultValue:s,orientation:o="horizontal",dir:l,activationMode:c="automatic",...d}=e,u=Yd(l),[h,m]=Ka({prop:n,onChange:i,defaultProp:s??"",caller:Fv});return a.jsx(rle,{scope:r,baseId:ja(),value:h,onValueChange:m,orientation:o,dir:u,activationMode:c,children:a.jsx(st.div,{dir:u,"data-orientation":o,...d,ref:t})})});L7.displayName=Fv;var $7="TabsList",F7=A.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...i}=e,s=fE($7,r),o=I7(r);return a.jsx(R7,{asChild:!0,...o,orientation:s.orientation,dir:s.dir,loop:n,children:a.jsx(st.div,{role:"tablist","aria-orientation":s.orientation,...i,ref:t})})});F7.displayName=$7;var B7="TabsTrigger",U7=A.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:i=!1,...s}=e,o=fE(B7,r),l=I7(r),c=V7(o.baseId,n),d=H7(o.baseId,n),u=n===o.value;return a.jsx(D7,{asChild:!0,...l,focusable:!i,active:u,children:a.jsx(st.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":d,"data-state":u?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:c,...s,ref:t,onMouseDown:Ge(e.onMouseDown,h=>{!i&&h.button===0&&h.ctrlKey===!1?o.onValueChange(n):h.preventDefault()}),onKeyDown:Ge(e.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&o.onValueChange(n)}),onFocus:Ge(e.onFocus,()=>{const h=o.activationMode!=="manual";!u&&!i&&h&&o.onValueChange(n)})})})});U7.displayName=B7;var q7="TabsContent",z7=A.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:i,children:s,...o}=e,l=fE(q7,r),c=V7(l.baseId,n),d=H7(l.baseId,n),u=n===l.value,h=A.useRef(u);return A.useEffect(()=>{const m=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(m)},[]),a.jsx(bn,{present:i||u,children:({present:m})=>a.jsx(st.div,{"data-state":u?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!m,id:d,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:h.current?"0s":void 0},children:m&&s})})});z7.displayName=q7;function V7(e,t){return`${e}-trigger-${t}`}function H7(e,t){return`${e}-content-${t}`}var nle=L7,W7=F7,G7=U7,K7=z7;const ei=nle,Ta=A.forwardRef(({className:e,...t},r)=>a.jsx(W7,{ref:r,className:Ie("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Ta.displayName=W7.displayName;const Nt=A.forwardRef(({className:e,...t},r)=>a.jsx(G7,{ref:r,className:Ie("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));Nt.displayName=G7.displayName;const Pt=A.forwardRef(({className:e,...t},r)=>a.jsx(K7,{ref:r,className:Ie("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Pt.displayName=K7.displayName;var s1={};const ale=wQ(xoe);var tR;function Y7(){if(tR)return s1;tR=1;const{createClient:e}=ale;return s1.base44=e({appId:"68373e3f1c18c880ebeee7f9",serverUrl:"https://base44.app"}),s1}var o1,rR;function ile(){if(rR)return o1;rR=1;const{base44:e}=Y7();return o1=new Proxy({},{get:(t,r)=>new Proxy({},{get:(n,i)=>{if(r==="User"){if(i==="me")return e.auth.me;if(i==="loginWithRedirect"||i==="login")return e.auth.loginWithRedirect;if(i==="logout")return e.auth.logout;if(i==="updateMyUserData")return e.auth.updateMe}return e.entities[r][i]}})}),o1}var je=ile(),l1,nR;function sle(){if(nR)return l1;nR=1;const{base44:e}=Y7();return l1=new Proxy({},{get:(t,r)=>(...n)=>e.integrations.Core[r](...n)}),l1}var ka=sle();function ole({src:e,play:t=!1,volume:r=.5}){const n=A.useRef(null);return A.useEffect(()=>{if(e&&t&&n.current)try{n.current.volume=r,n.current.currentTime=0;const i=n.current.play();i!==void 0&&i.catch(s=>{console.log("Audio play prevented:",s)})}catch(i){console.log("Audio error:",i)}},[t,e,r]),e?a.jsx("audio",{ref:n,src:e,preload:"auto"}):null}const Bv=A.createContext(null);function hE(e){const t=A.useRef(null);return t.current===null&&(t.current=e()),t.current}const mE=A.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class lle extends A.Component{getSnapshotBeforeUpdate(t){const r=this.props.childRef.current;if(r&&t.isPresent&&!this.props.isPresent){const n=this.props.sizeRef.current;n.height=r.offsetHeight||0,n.width=r.offsetWidth||0,n.top=r.offsetTop,n.left=r.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function cle({children:e,isPresent:t}){const r=A.useId(),n=A.useRef(null),i=A.useRef({width:0,height:0,top:0,left:0}),{nonce:s}=A.useContext(mE);return A.useInsertionEffect(()=>{const{width:o,height:l,top:c,left:d}=i.current;if(t||!n.current||!o||!l)return;n.current.dataset.motionPopId=r;const u=document.createElement("style");return s&&(u.nonce=s),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` 767 [data-motion-pop-id="${r}"] { 768 position: absolute !important; 769 width: ${o}px !important; 770 height: ${l}px !important; 771 top: ${c}px !important; 772 left: ${d}px !important; 773 } 774 `),()=>{document.head.removeChild(u)}},[t]),a.jsx(lle,{isPresent:t,childRef:n,sizeRef:i,children:A.cloneElement(e,{ref:n})})}const ule=({children:e,initial:t,isPresent:r,onExitComplete:n,custom:i,presenceAffectsLayout:s,mode:o})=>{const l=hE(dle),c=A.useId(),d=A.useCallback(h=>{l.set(h,!0);for(const m of l.values())if(!m)return;n&&n()},[l,n]),u=A.useMemo(()=>({id:c,initial:t,isPresent:r,custom:i,onExitComplete:d,register:h=>(l.set(h,!1),()=>l.delete(h))}),s?[Math.random(),d]:[r,d]);return A.useMemo(()=>{l.forEach((h,m)=>l.set(m,!1))},[r]),A.useEffect(()=>{!r&&!l.size&&n&&n()},[r]),o==="popLayout"&&(e=a.jsx(cle,{isPresent:r,children:e})),a.jsx(Bv.Provider,{value:u,children:e})};function dle(){return new Map}const pE=A.createContext({}),Na=e=>e;let X7=Na;function gE(e){let t;return()=>(t===void 0&&(t=e()),t)}const ed=(e,t,r)=>{const n=t-e;return n===0?1:(r-e)/n},Ls=e=>e*1e3,$s=e=>e/1e3,ny=e=>e.key||"";function aR(e){const t=[];
vendor: 39,481 bytes, line 774
774return A.Children.forEach(e,r=>{A.isValidElement(r)&&t.push(r)}),t}const yE=typeof window<"u",Q7=yE?A.useLayoutEffect:A.useEffect,vc=({children:e,exitBeforeEnter:t,custom:r,initial:n=!0,onExitComplete:i,presenceAffectsLayout:s=!0,mode:o="sync"})=>{const l=A.useMemo(()=>aR(e),[e]),c=l.map(ny),d=A.useRef(!0),u=A.useRef(l),h=hE(()=>new Map),[m,g]=A.useState(l),[b,v]=A.useState(l);Q7(()=>{d.current=!1,u.current=l;for(let w=0;w<b.length;w++){const _=ny(b[w]);c.includes(_)?h.delete(_):h.get(_)!==!0&&h.set(_,!1)}},[b,c.length,c.join("-")]);const y=[];if(l!==m){let w=[...l];for(let _=0;_<b.length;_++){const j=b[_],S=ny(j);c.includes(S)||(w.splice(_,0,j),y.push(j))}o==="wait"&&y.length&&(w=y),v(aR(w)),g(l);return}const{forceRender:x}=A.useContext(pE);return a.jsx(a.Fragment,{children:b.map(w=>{const _=ny(w),j=l===b||c.includes(_),S=()=>{if(h.has(_))h.set(_,!0);else return;let k=!0;h.forEach(T=>{T||(k=!1)}),k&&(x==null||x(),v(u.current),i&&i())};return a.jsx(ule,{isPresent:j,initial:!d.current||n?void 0:!1,custom:j?void 0:r,presenceAffectsLayout:s,mode:o,onExitComplete:j?void 0:S,children:w},_)})})},fle={useManualTiming:!1};function hle(e){let t=new Set,r=new Set,n=!1,i=!1;const s=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function l(d){s.has(d)&&(c.schedule(d),e()),d(o)}const c={schedule:(d,u=!1,h=!1)=>{const g=h&&n?t:r;return u&&s.add(d),g.has(d)||g.add(d),d},cancel:d=>{r.delete(d),s.delete(d)},process:d=>{if(o=d,n){i=!0;return}n=!0,[t,r]=[r,t],t.forEach(l),t.clear(),n=!1,i&&(i=!1,c.process(d))}};return c}const ay=["read","resolveKeyframes","update","preRender","render","postRender"],mle=40;function Z7(e,t){let r=!1,n=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>r=!0,o=ay.reduce((x,w)=>(x[w]=hle(s),x),{}),{read:l,resolveKeyframes:c,update:d,preRender:u,render:h,postRender:m}=o,g=()=>{const x=performance.now();r=!1,i.delta=n?1e3/60:Math.max(Math.min(x-i.timestamp,mle),1),i.timestamp=x,i.isProcessing=!0,l.process(i),c.process(i),d.process(i),u.process(i),h.process(i),m.process(i),i.isProcessing=!1,r&&t&&(n=!1,e(g))},b=()=>{r=!0,n=!0,i.isProcessing||e(g)};return{schedule:ay.reduce((x,w)=>{const _=o[w];return x[w]=(j,S=!1,k=!1)=>(r||b(),_.schedule(j,S,k)),x},{}),cancel:x=>{for(let w=0;w<ay.length;w++)o[ay[w]].cancel(x)},state:i,steps:o}}const{schedule:dr,cancel:Jo,state:gn,steps:c1}=Z7(typeof requestAnimationFrame<"u"?requestAnimationFrame:Na,!0),J7=A.createContext({strict:!1}),iR={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},td={};for(const e in iR)td[e]={isEnabled:t=>iR[e].some(r=>!!t[r])};function ple(e){for(const t in e)td[t]={...td[t],...e[t]}}const gle=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function s0(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||gle.has(e)}let eU=e=>!s0(e);function yle(e){e&&(eU=t=>t.startsWith("on")?!s0(t):e(t))}try{yle(require("@emotion/is-prop-valid").default)}catch{}function vle(e,t,r){const n={};for(const i in e)i==="values"&&typeof e.values=="object"||(eU(i)||r===!0&&s0(i)||!t&&!s0(i)||e.draggable&&i.startsWith("onDrag"))&&(n[i]=e[i]);return n}function xle(e){if(typeof Proxy>"u")return e;const t=new Map,r=(...n)=>e(...n);return new Proxy(r,{get:(n,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}const Uv=A.createContext({});function rm(e){return typeof e=="string"||Array.isArray(e)}function qv(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const vE=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],xE=["initial",...vE];function zv(e){return qv(e.animate)||xE.some(t=>rm(e[t]))}function tU(e){return!!(zv(e)||e.variants)}function ble(e,t){if(zv(e)){const{initial:r,animate:n}=e;return{initial:r===!1||rm(r)?r:void 0,animate:rm(n)?n:void 0}}return e.inherit!==!1?t:{}}function wle(e){const{initial:t,animate:r}=ble(e,A.useContext(Uv));return A.useMemo(()=>({initial:t,animate:r}),[sR(t),sR(r)])}function sR(e){return Array.isArray(e)?e.join(" "):e}const jle=Symbol.for("motionComponentSymbol");function _u(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Nle(e,t,r){return A.useCallback(n=>{n&&e.mount&&e.mount(n),t&&(n?t.mount(n):t.unmount()),r&&(typeof r=="function"?r(n):_u(r)&&(r.current=n))},[t])}const bE=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),_le="framerAppearId",rU="data-"+bE(_le),{schedule:wE}=Z7(queueMicrotask,!1),nU=A.createContext({});function Sle(e,t,r,n,i){var s,o;const{visualElement:l}=A.useContext(Uv),c=A.useContext(J7),d=A.useContext(Bv),u=A.useContext(mE).reducedMotion,h=A.useRef(null);n=n||c.renderer,!h.current&&n&&(h.current=n(e,{visualState:t,parent:l,props:r,presenceContext:d,blockInitialAnimation:d?d.initial===!1:!1,reducedMotionConfig:u}));const m=h.current,g=A.useContext(nU);m&&!m.projection&&i&&(m.type==="html"||m.type==="svg")&&Ale(h.current,r,i,g);const b=A.useRef(!1);A.useInsertionEffect(()=>{m&&b.current&&m.update(r,d)});const v=r[rU],y=A.useRef(!!v&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,v))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,v)));return Q7(()=>{m&&(b.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),wE.render(m.render),y.current&&m.animationState&&m.animationState.animateChanges())}),A.useEffect(()=>{m&&(!y.current&&m.animationState&&m.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)===null||x===void 0||x.call(window,v)}),y.current=!1))}),m}function Ale(e,t,r,n){const{layoutId:i,layout:s,drag:o,dragConstraints:l,layoutScroll:c,layoutRoot:d}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:aU(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||l&&_u(l),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:n,layoutScroll:c,layoutRoot:d})}function aU(e){if(e)return e.options.allowProjection!==!1?e.projection:aU(e.parent)}function kle({preloadedFeatures:e,createVisualElement:t,useRender:r,useVisualState:n,Component:i}){var s,o;e&&ple(e);function l(d,u){let h;const m={...A.useContext(mE),...d,layoutId:Ele(d)},{isStatic:g}=m,b=wle(d),v=n(d,g);if(!g&&yE){Tle();const y=Ple(m);h=y.MeasureLayout,b.visualElement=Sle(i,v,m,t,y.ProjectionNode)}return a.jsxs(Uv.Provider,{value:b,children:[h&&b.visualElement?a.jsx(h,{visualElement:b.visualElement,...m}):null,r(i,d,Nle(v,b.visualElement,u),v,g,b.visualElement)]})}l.displayName=`motion.${typeof i=="string"?i:`create(${(o=(s=i.displayName)!==null&&s!==void 0?s:i.name)!==null&&o!==void 0?o:""})`}`;const c=A.forwardRef(l);return c[jle]=i,c}function Ele({layoutId:e}){const t=A.useContext(pE).id;return t&&e!==void 0?t+"-"+e:e}function Tle(e,t){A.useContext(J7).strict}function Ple(e){const{drag:t,layout:r}=td;if(!t&&!r)return{};const n={...t,...r};return{MeasureLayout:t!=null&&t.isEnabled(e)||r!=null&&r.isEnabled(e)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}const Cle=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function jE(e){return typeof e!="string"||e.includes("-")?!1:!!(Cle.indexOf(e)>-1||/[A-Z]/u.test(e))}function iU(e,{style:t,vars:r},n,i){Object.assign(e.style,t,i&&i.getProjectionStyles(n));for(const s in r)e.style.setProperty(s,r[s])}const sU=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function oU(e,t,r,n){iU(e,t,void 0,n);for(const i in t.attrs)e.setAttribute(sU.has(i)?i:bE(i),t.attrs[i])}const Pn=e=>!!(e&&e.getVelocity),o0={};function Ole(e){Object.assign(o0,e)}const gp=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Mc=new Set(gp);function lU(e,{layout:t,layoutId:r}){return Mc.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!o0[e]||e==="opacity")}function NE(e,t,r){var n;const{style:i}=e,s={};for(const o in i)(Pn(i[o])||t.style&&Pn(t.style[o])||lU(o,e)||((n=r==null?void 0:r.getValue(o))===null||n===void 0?void 0:n.liveStyle)!==void 0)&&(s[o]=i[o]);return s}function cU(e,t,r){const n=NE(e,t,r);for(const i in e)if(Pn(e[i])||Pn(t[i])){const s=gp.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;n[s]=e[i]}return n}function oR(e){const t=[{},{}];return e==null||e.values.forEach((r,n)=>{t[0][n]=r.get(),t[1][n]=r.getVelocity()}),t}function _E(e,t,r,n){if(typeof t=="function"){const[i,s]=oR(n);t=t(r!==void 0?r:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=oR(n);t=t(r!==void 0?r:e.custom,i,s)}return t}const kA=e=>Array.isArray(e),Mle=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),Rle=e=>kA(e)?e[e.length-1]||0:e;function Ly(e){const t=Pn(e)?e.get():e;return Mle(t)?t.toValue():t}function Dle({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:r},n,i,s){const o={latestValues:Ile(n,i,s,e),renderState:t()};return r&&(o.mount=l=>r(n,l,o)),o}const uU=e=>(t,r)=>{const n=A.useContext(Uv),i=A.useContext(Bv),s=()=>Dle(e,t,n,i);return r?s():hE(s)};function Ile(e,t,r,n){const i={},s=n(e,{});for(const m in s)i[m]=Ly(s[m]);let{initial:o,animate:l}=e;const c=zv(e),d=tU(e);t&&d&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),l===void 0&&(l=t.animate));let u=r?r.initial===!1:!1;u=u||o===!1;const h=u?l:o;if(h&&typeof h!="boolean"&&!qv(h)){const m=Array.isArray(h)?h:[h];for(let g=0;g<m.length;g++){const b=_E(e,m[g]);if(b){const{transitionEnd:v,transition:y,...x}=b;for(const w in x){let _=x[w];if(Array.isArray(_)){const j=u?_.length-1:0;_=_[j]}_!==null&&(i[w]=_)}for(const w in v)i[w]=v[w]}}}return i}const SE=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),dU=()=>({...SE(),attrs:{}}),fU=(e,t)=>t&&typeof e=="number"?t.transform(e):e,qs=(e,t,r)=>r>t?t:r<e?e:r,Xd={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},nm={...Xd,transform:e=>qs(0,1,e)},iy={...Xd,default:1},yp=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),_o=yp("deg"),Wi=yp("%"),ht=yp("px"),Lle=yp("vh"),$le=yp("vw"),lR={...Wi,parse:e=>Wi.parse(e)/100,transform:e=>Wi.transform(e*100)},Fle={borderWidth:ht,borderTopWidth:ht,borderRightWidth:ht,borderBottomWidth:ht,borderLeftWidth:ht,borderRadius:ht,radius:ht,borderTopLeftRadius:ht,borderTopRightRadius:ht,borderBottomRightRadius:ht,borderBottomLeftRadius:ht,width:ht,maxWidth:ht,height:ht,maxHeight:ht,top:ht,right:ht,bottom:ht,left:ht,padding:ht,paddingTop:ht,paddingRight:ht,paddingBottom:ht,paddingLeft:ht,margin:ht,marginTop:ht,marginRight:ht,marginBottom:ht,marginLeft:ht,backgroundPositionX:ht,backgroundPositionY:ht},Ble={rotate:_o,rotateX:_o,rotateY:_o,rotateZ:_o,scale:iy,scaleX:iy,scaleY:iy,scaleZ:iy,skew:_o,skewX:_o,skewY:_o,distance:ht,translateX:ht,translateY:ht,translateZ:ht,x:ht,y:ht,z:ht,perspective:ht,transformPerspective:ht,opacity:nm,originX:lR,originY:lR,originZ:ht},cR={...Xd,transform:Math.round},AE={...Fle,...Ble,zIndex:cR,size:ht,fillOpacity:nm,strokeOpacity:nm,numOctaves:cR},Ule={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},qle=gp.length;function zle(e,t,r){let n="",i=!0;for(let s=0;s<qle;s++){const o=gp[s],l=e[o];if(l===void 0)continue;let c=!0;if(typeof l=="number"?c=l===(o.startsWith("scale")?1:0):c=parseFloat(l)===0,!c||r){const d=fU(l,AE[o]);if(!c){i=!1;const u=Ule[o]||o;n+=`${u}(${d}) `}r&&(t[o]=d)}}return n=n.trim(),r?n=r(t,i?"":n):i&&(n="none"),n}const hU=e=>t=>typeof t=="string"&&t.startsWith(e),mU=hU("--"),Vle=hU("var(--"),kE=e=>Vle(e)?Hle.test(e.split("/*")[0].trim()):!1,Hle=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function EE(e,t,r){const{style:n,vars:i,transformOrigin:s}=e;let o=!1,l=!1;for(const c in t){const d=t[c];if(Mc.has(c)){o=!0;continue}else if(mU(c)){i[c]=d;continue}else{const u=fU(d,AE[c]);c.startsWith("origin")?(l=!0,s[c]=u):n[c]=u}}if(t.transform||(o||r?n.transform=zle(t,e.transform,r):n.transform&&(n.transform="none")),l){const{originX:c="50%",originY:d="50%",originZ:u=0}=s;n.transformOrigin=`${c} ${d} ${u}`}}function uR(e,t,r){return typeof e=="string"?e:ht.transform(t+r*e)}function Wle(e,t,r){const n=uR(t,e.x,e.width),i=uR(r,e.y,e.height);return`${n} ${i}`}const Gle={offset:"stroke-dashoffset",array:"stroke-dasharray"},Kle={offset:"strokeDashoffset",array:"strokeDasharray"};function Yle(e,t,r=1,n=0,i=!0){e.pathLength=1;const s=i?Gle:Kle;e[s.offset]=ht.transform(-n);const o=ht.transform(t),l=ht.transform(r);e[s.array]=`${o} ${l}`}function TE(e,{attrX:t,attrY:r,attrScale:n,originX:i,originY:s,pathLength:o,pathSpacing:l=1,pathOffset:c=0,...d},u,h){if(EE(e,d,h),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:m,style:g,dimensions:b}=e;m.transform&&(b&&(g.transform=m.transform),delete m.transform),b&&(i!==void 0||s!==void 0||g.transform)&&(g.transformOrigin=Wle(b,i!==void 0?i:.5,s!==void 0?s:.5)),t!==void 0&&(m.x=t),r!==void 0&&(m.y=r),n!==void 0&&(m.scale=n),o!==void 0&&Yle(m,o,l,c,!1)}const PE=e=>typeof e=="string"&&e.toLowerCase()==="svg",Xle={useVisualState:uU({scrapeMotionValuesFromProps:cU,createRenderState:dU,onMount:(e,t,{renderState:r,latestValues:n})=>{dr.read(()=>{try{r.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}}),dr.render(()=>{TE(r,n,PE(t.tagName),e.transformTemplate),oU(t,r)})}})},Qle={useVisualState:uU({scrapeMotionValuesFromProps:NE,createRenderState:SE})};function pU(e,t,r){for(const n in t)!Pn(t[n])&&!lU(n,r)&&(e[n]=t[n])}function Zle({transformTemplate:e},t){return A.useMemo(()=>{const r=SE();return EE(r,t,e),Object.assign({},r.vars,r.style)},[t])}function Jle(e,t){const r=e.style||{},n={};return pU(n,r,e),Object.assign(n,Zle(e,t)),n}function ece(e,t){const r={},n=Jle(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=n,r}function tce(e,t,r,n){const i=A.useMemo(()=>{const s=dU();return TE(s,t,PE(n),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};pU(s,e.style,e),i.style={...s,...i.style}}return i}function rce(e=!1){return(r,n,i,{latestValues:s},o)=>{const c=(jE(r)?tce:ece)(n,s,o,r),d=vle(n,typeof r=="string",e),u=r!==A.Fragment?{...d,...c,ref:i}:{},{children:h}=n,m=A.useMemo(()=>Pn(h)?h.get():h,[h]);return A.createElement(r,{...u,children:m})}}function nce(e,t){return function(n,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...jE(n)?Xle:Qle,preloadedFeatures:e,useRender:rce(i),createVisualElement:t,Component:n};return kle(o)}}function gU(e,t){if(!Array.isArray(t))return!1;const r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}function Vv(e,t,r){const n=e.getProps();return _E(n,t,r!==void 0?r:n.custom,e)}const ace=gE(()=>window.ScrollTimeline!==void 0);class ice{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,r){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=r}attachTimeline(t,r){const n=this.animations.map(i=>{if(ace()&&i.attachTimeline)return i.attachTimeline(t);if(typeof r=="function")return r(i)});return()=>{n.forEach((i,s)=>{i&&i(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let r=0;r<this.animations.length;r++)t=Math.max(t,this.animations[r].duration);return t}runAll(t){this.animations.forEach(r=>r[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class sce extends ice{then(t,r){return Promise.all(this.animations).then(t).catch(r)}}function CE(e,t){return e?e[t]||e.default||e:void 0}const EA=2e4;function yU(e){let t=0;const r=50;let n=e.next(t);for(;!n.done&&t<EA;)t+=r,n=e.next(t);return t>=EA?1/0:t}function OE(e){return typeof e=="function"}function dR(e,t){e.timeline=t,e.onfinish=null}const ME=e=>Array.isArray(e)&&typeof e[0]=="number",oce={linearEasing:void 0};function lce(e,t){const r=gE(e);return()=>{var n;return(n=oce[t])!==null&&n!==void 0?n:r()}}const l0=lce(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),vU=(e,t,r=10)=>{let n="";const i=Math.max(Math.round(t/r),2);for(let s=0;s<i;s++)n+=e(ed(0,i-1,s))+", ";return`linear(${n.substring(0,n.length-2)})`};function xU(e){return!!(typeof e=="function"&&l0()||!e||typeof e=="string"&&(e in TA||l0())||ME(e)||Array.isArray(e)&&e.every(xU))}const jh=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,TA={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:jh([0,.65,.55,1]),circOut:jh([.55,0,1,.45]),backIn:jh([.31,.01,.66,-.59]),backOut:jh([.33,1.53,.69,.99])};function bU(e,t){if(e)return typeof e=="function"&&l0()?vU(e,t):ME(e)?jh(e):Array.isArray(e)?e.map(r=>bU(r,t)||TA.easeOut):TA[e]}const mi={x:!1,y:!1};function wU(){return mi.x||mi.y}function cce(e,t,r){var n;if(e instanceof Element)return[e];if(typeof e=="string"){let i=document;const s=(n=void 0)!==null&&n!==void 0?n:i.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}function jU(e,t){const r=cce(e),n=new AbortController,i={passive:!0,...t,signal:n.signal};return[r,i,()=>n.abort()]}function fR(e){return t=>{t.pointerType==="touch"||wU()||e(t)}}function uce(e,t,r={}){const[n,i,s]=jU(e,r),o=fR(l=>{const{target:c}=l,d=t(l);if(typeof d!="function"||!c)return;const u=fR(h=>{d(h),c.removeEventListener("pointerleave",u)});c.addEventListener("pointerleave",u,i)});return n.forEach(l=>{l.addEventListener("pointerenter",o,i)}),s}const NU=(e,t)=>t?e===t?!0:NU(e,t.parentElement):!1,RE=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,dce=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function fce(e){return dce.has(e.tagName)||e.tabIndex!==-1}const Nh=new WeakSet;function hR(e){return t=>{t.key==="Enter"&&e(t)}}function u1(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const hce=(e,t)=>{const r=e.currentTarget;if(!r)return;const n=hR(()=>{if(Nh.has(r))return;u1(r,"down");const i=hR(()=>{u1(r,"up")}),s=()=>u1(r,"cancel");r.addEventListener("keyup",i,t),r.addEventListener("blur",s,t)});r.addEventListener("keydown",n,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",n),t)};function mR(e){return RE(e)&&!wU()}function mce(e,t,r={}){const[n,i,s]=jU(e,r),o=l=>{const c=l.currentTarget;if(!mR(l)||Nh.has(c))return;Nh.add(c);const d=t(l),u=(g,b)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",m),!(!mR(g)||!Nh.has(c))&&(Nh.delete(c),typeof d=="function"&&d(g,{success:b}))},h=g=>{u(g,r.useGlobalTarget||NU(c,g.target))},m=g=>{u(g,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",m,i)};return n.forEach(l=>{!fce(l)&&l.getAttribute("tabindex")===null&&(l.tabIndex=0),(r.useGlobalTarget?window:l).addEventListener("pointerdown",o,i),l.addEventListener("focus",d=>hce(d,i),i)}),s}function pce(e){return e==="x"||e==="y"?mi[e]?null:(mi[e]=!0,()=>{mi[e]=!1}):mi.x||mi.y?null:(mi.x=mi.y=!0,()=>{mi.x=mi.y=!1})}let $y;function gce(){$y=void 0}const Gi={now:()=>($y===void 0&&Gi.set(gn.isProcessing||fle.useManualTiming?gn.timestamp:performance.now()),$y),set:e=>{$y=e,queueMicrotask(gce)}};function DE(e,t){e.indexOf(t)===-1&&e.push(t)}function IE(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}class LE{constructor(){this.subscriptions=[]}add(t){return DE(this.subscriptions,t),()=>IE(this.subscriptions,t)}notify(t,r,n){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,r,n);else for(let s=0;s<i;s++){const o=this.subscriptions[s];o&&o(t,r,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function _U(e,t){return t?e*(1e3/t):0}const pR=30,yce=e=>!isNaN(parseFloat(e));class vce{constructor(t,r={}){this.version="11.16.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(n,i=!0)=>{const s=Gi.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=Gi.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=yce(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new LE);const n=this.events[t].add(r);return t==="change"?()=>{n(),dr.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t,r=!0){!r||!this.passiveEffect?this.updateAndNotify(t,r):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,r,n){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Gi.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>pR)return 0;const r=Math.min(this.updatedAt-this.prevUpdatedAt,pR);return _U(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function am(e,t){return new vce(e,t)}function xce(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,am(r))}function bce(e,t){const r=Vv(e,t);let{transitionEnd:n={},transition:i={},...s}=r||{};s={...s,...n};for(const o in s){const l=Rle(s[o]);xce(e,o,l)}}function wce(e){return!!(Pn(e)&&e.add)}function PA(e,t){const r=e.getValue("willChange");if(wce(r))return r.add(t)}function SU(e){return e.props[rU]}const AU=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,jce=1e-7,Nce=12;function _ce(e,t,r,n,i){let s,o,l=0;do o=t+(r-t)/2,s=AU(o,n,i)-e,s>0?r=o:t=o;while(Math.abs(s)>jce&&++l<Nce);return o}function vp(e,t,r,n){if(e===t&&r===n)return Na;const i=s=>_ce(s,0,1,e,r);return s=>s===0||s===1?s:AU(i(s),t,n)}const kU=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,EU=e=>t=>1-e(1-t),TU=vp(.33,1.53,.69,.99),$E=EU(TU),PU=kU($E),CU=e=>(e*=2)<1?.5*$E(e):.5*(2-Math.pow(2,-10*(e-1))),FE=e=>1-Math.sin(Math.acos(e)),OU=EU(FE),MU=kU(FE),RU=e=>/^0[^.\s]+$/u.test(e);function Sce(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||RU(e):!0}const DU=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Ace=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function kce(e){const t=Ace.exec(e);if(!t)return[,];const[,r,n,i]=t;return[`--${r??n}`,i]}function IU(e,t,r=1){const[n,i]=kce(e);if(!n)return;const s=window.getComputedStyle(t).getPropertyValue(n);if(s){const o=s.trim();return DU(o)?parseFloat(o):o}return kE(i)?IU(i,t,r+1):i}const Ece=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),gR=e=>e===Xd||e===ht,yR=(e,t)=>parseFloat(e.split(", ")[t]),vR=(e,t)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const i=n.match(/^matrix3d\((.+)\)$/u);if(i)return yR(i[1],t);{const s=n.match(/^matrix\((.+)\)$/u);return s?yR(s[1],e):0}},Tce=new Set(["x","y","z"]),Pce=gp.filter(e=>!Tce.has(e));function Cce(e){const t=[];return Pce.forEach(r=>{const n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}const rd={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:vR(4,13),y:vR(5,14)};rd.translateX=rd.x;rd.translateY=rd.y;const LU=e=>t=>t.test(e),Oce={test:e=>e==="auto",parse:e=>e},$U=[Xd,ht,Wi,_o,$le,Lle,Oce],xR=e=>$U.find(LU(e)),sc=new Set;let CA=!1,OA=!1;function FU(){if(OA){const e=Array.from(sc).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),r=new Map;t.forEach(n=>{const i=Cce(n);i.length&&(r.set(n,i),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();const i=r.get(n);i&&i.forEach(([s,o])=>{var l;(l=n.getValue(s))===null||l===void 0||l.set(o)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}OA=!1,CA=!1,sc.forEach(e=>e.complete()),sc.clear()}function BU(){sc.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(OA=!0)})}function Mce(){BU(),FU()}class BE{constructor(t,r,n,i,s,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(sc.add(this),CA||(CA=!0,dr.read(BU),dr.resolveKeyframes(FU))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:r,element:n,motionValue:i}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const o=i==null?void 0:i.get(),l=t[t.length-1];if(o!==void 0)t[0]=o;else if(n&&r){const c=n.readValue(r,l);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=l),i&&o===void 0&&i.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),sc.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,sc.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Rh=e=>Math.round(e*1e5)/1e5,UE=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Rce(e){return e==null}const Dce=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,qE=(e,t)=>r=>!!(typeof r=="string"&&Dce.test(r)&&r.startsWith(e)||t&&!Rce(r)&&Object.prototype.hasOwnProperty.call(r,t)),UU=(e,t,r)=>n=>{if(typeof n!="string")return n;const[i,s,o,l]=n.match(UE);return{[e]:parseFloat(i),[t]:parseFloat(s),[r]:parseFloat(o),alpha:l!==void 0?parseFloat(l):1}},Ice=e=>qs(0,255,e),d1={...Xd,transform:e=>Math.round(Ice(e))},zl={test:qE("rgb","red"),parse:UU("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+d1.transform(e)+", "+d1.transform(t)+", "+d1.transform(r)+", "+Rh(nm.transform(n))+")"};function Lce(e){let t="",r="",n="",i="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),i=e.substring(4,5),t+=t,r+=r,n+=n,i+=i),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}const MA={test:qE("#"),parse:Lce,transform:zl.transform},Su={test:qE("hsl","hue"),parse:UU("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+Wi.transform(Rh(t))+", "+Wi.transform(Rh(r))+", "+Rh(nm.transform(n))+")"},An={test:e=>zl.test(e)||MA.test(e)||Su.test(e),parse:e=>zl.test(e)?zl.parse(e):Su.test(e)?Su.parse(e):MA.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?zl.transform(e):Su.transform(e)},$ce=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Fce(e){var t,r;return isNaN(e)&&typeof e=="string"&&(((t=e.match(UE))===null||t===void 0?void 0:t.length)||0)+(((r=e.match($ce))===null||r===void 0?void 0:r.length)||0)>0}const qU="number",zU="color",Bce="var",Uce="var(",bR="${}",qce=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function im(e){const t=e.toString(),r=[],n={color:[],number:[],var:[]},i=[];let s=0;const l=t.replace(qce,c=>(An.test(c)?(n.color.push(s),i.push(zU),r.push(An.parse(c))):c.startsWith(Uce)?(n.var.push(s),i.push(Bce),r.push(c)):(n.number.push(s),i.push(qU),r.push(parseFloat(c))),++s,bR)).split(bR);return{values:r,split:l,indexes:n,types:i}}function VU(e){return im(e).values}function HU(e){const{split:t,types:r}=im(e),n=t.length;return i=>{let s="";for(let o=0;o<n;o++)if(s+=t[o],i[o]!==void 0){const l=r[o];l===qU?s+=Rh(i[o]):l===zU?s+=An.transform(i[o]):s+=i[o]}return s}}const zce=e=>typeof e=="number"?0:e;function Vce(e){const t=VU(e);return HU(e)(t.map(zce))}const el={test:Fce,parse:VU,createTransformer:HU,getAnimatableNone:Vce},Hce=new Set(["brightness","contrast","saturate","opacity"]);function Wce(e){const[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=r.match(UE)||[];if(!n)return e;const i=r.replace(n,"");let s=Hce.has(t)?1:0;return n!==r&&(s*=100),t+"("+s+i+")"}const Gce=/\b([a-z-]*)\(.*?\)/gu,RA={...el,getAnimatableNone:e=>{const t=e.match(Gce);return t?t.map(Wce).join(" "):e}},Kce={...AE,color:An,backgroundColor:An,outlineColor:An,fill:An,stroke:An,borderColor:An,borderTopColor:An,borderRightColor:An,borderBottomColor:An,borderLeftColor:An,filter:RA,WebkitFilter:RA},zE=e=>Kce[e];function WU(e,t){let r=zE(e);return r!==RA&&(r=el),r.getAnimatableNone?r.getAnimatableNone(t):void 0}const Yce=new Set(["auto","none","0"]);function Xce(e,t,r){let n=0,i;for(;n<e.length&&!i;){const s=e[n];typeof s=="string"&&!Yce.has(s)&&im(s).values.length&&(i=e[n]),n++}if(i&&r)for(const s of t)e[s]=WU(r,i)}class GU extends BE{constructor(t,r,n,i,s){super(t,r,n,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:r,name:n}=this;if(!r||!r.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let d=t[c];if(typeof d=="string"&&(d=d.trim(),kE(d))){const u=IU(d,r.current);u!==void 0&&(t[c]=u),c===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!Ece.has(n)||t.length!==2)return;const[i,s]=t,o=xR(i),l=xR(s);if(o!==l)if(gR(o)&&gR(l))for(let c=0;c<t.length;c++){const d=t[c];typeof d=="string"&&(t[c]=parseFloat(d))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:r}=this,n=[];for(let i=0;i<t.length;i++)Sce(t[i])&&n.push(i);n.length&&Xce(t,n,r)}measureInitialState(){const{element:t,unresolvedKeyframes:r,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=rd[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;const i=r[r.length-1];i!==void 0&&t.getValue(n,i).jump(i,!1)}measureEndState(){var t;const{element:r,name:n,unresolvedKeyframes:i}=this;if(!r||!r.current)return;const s=r.getValue(n);s&&s.jump(this.measuredOrigin,!1);const o=i.length-1,l=i[o];i[o]=rd[n](r.measureViewportBox(),window.getComputedStyle(r.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([c,d])=>{r.getValue(c).set(d)}),this.resolveNoneKeyframes()}}const wR=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(el.test(e)||e==="0")&&!e.startsWith("url("));function Qce(e){const t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function Zce(e,t,r,n){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],o=wR(i,t),l=wR(s,t);return!o||!l?!1:Qce(e)||(r==="spring"||OE(r))&&n}const Jce=e=>e!==null;function Hv(e,{repeat:t,repeatType:r="loop"},n){const i=e.filter(Jce),s=t&&r!=="loop"&&t%2===1?0:i.length-1;return!s||n===void 0?i[s]:n}const eue=40;class KU{constructor({autoplay:t=!0,delay:r=0,type:n="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",...l}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Gi.now(),this.options={autoplay:t,delay:r,type:n,repeat:i,repeatDelay:s,repeatType:o,...l},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>eue?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Mce(),this._resolved}onKeyframesResolved(t,r){this.resolvedAt=Gi.now(),this.hasAttemptedResolve=!0;const{name:n,type:i,velocity:s,delay:o,onComplete:l,onUpdate:c,isGenerator:d}=this.options;if(!d&&!Zce(t,n,i,s))if(o)this.options.duration=0;else{c==null||c(Hv(t,this.options,r)),l==null||l(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,r);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:r,...u},this.onPostResolved())}onPostResolved(){}then(t,r){return this.currentFinishedPromise.then(t,r)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const xr=(e,t,r)=>e+(t-e)*r;function f1(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function tue({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let i=0,s=0,o=0;if(!t)i=s=o=r;else{const l=r<.5?r*(1+t):r+t-r*t,c=2*r-l;i=f1(c,l,e+1/3),s=f1(c,l,e),o=f1(c,l,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:n}}function c0(e,t){return r=>r>0?t:e}const h1=(e,t,r)=>{const n=e*e,i=r*(t*t-n)+n;return i<0?0:Math.sqrt(i)},rue=[MA,zl,Su],nue=e=>rue.find(t=>t.test(e));function jR(e){const t=nue(e);if(!t)return!1;let r=t.parse(e);return t===Su&&(r=tue(r)),r}const NR=(e,t)=>{const r=jR(e),n=jR(t);if(!r||!n)return c0(e,t);const i={...r};return s=>(i.red=h1(r.red,n.red,s),i.green=h1(r.green,n.green,s),i.blue=h1(r.blue,n.blue,s),i.alpha=xr(r.alpha,n.alpha,s),zl.transform(i))},aue=(e,t)=>r=>t(e(r)),xp=(...e)=>e.reduce(aue),DA=new Set(["none","hidden"]);function iue(e,t){return DA.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function sue(e,t){return r=>xr(e,t,r)}function VE(e){return typeof e=="number"?sue:typeof e=="string"?kE(e)?c0:An.test(e)?NR:cue:Array.isArray(e)?YU:typeof e=="object"?An.test(e)?NR:oue:c0}function YU(e,t){const r=[...e],n=r.length,i=e.map((s,o)=>VE(s)(s,t[o]));return s=>{for(let o=0;o<n;o++)r[o]=i[o](s);return r}}function oue(e,t){const r={...e,...t},n={};for(const i in r)e[i]!==void 0&&t[i]!==void 0&&(n[i]=VE(e[i])(e[i],t[i]));return i=>{for(const s in n)r[s]=n[s](i);return r}}function lue(e,t){var r;const n=[],i={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const o=t.types[s],l=e.indexes[o][i[o]],c=(r=e.values[l])!==null&&r!==void 0?r:0;n[s]=c,i[o]++}return n}const cue=(e,t)=>{const r=el.createTransformer(t),n=im(e),i=im(t);return n.indexes.var.length===i.indexes.var.length&&n.indexes.color.length===i.indexes.color.length&&n.indexes.number.length>=i.indexes.number.length?DA.has(e)&&!i.values.length||DA.has(t)&&!n.values.length?iue(e,t):xp(YU(lue(n,i),i.values),r):c0(e,t)};function XU(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?xr(e,t,r):VE(e)(e,t)}const uue=5;function QU(e,t,r){const n=Math.max(t-uue,0);return _U(r-e(n),t-n)}const jr={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},m1=.001;function due({duration:e=jr.duration,bounce:t=jr.bounce,velocity:r=jr.velocity,mass:n=jr.mass}){let i,s,o=1-t;o=qs(jr.minDamping,jr.maxDamping,o),e=qs(jr.minDuration,jr.maxDuration,$s(e)),o<1?(i=d=>{const u=d*o,h=u*e,m=u-r,g=IA(d,o),b=Math.exp(-h);return m1-m/g*b},s=d=>{const h=d*o*e,m=h*r+r,g=Math.pow(o,2)*Math.pow(d,2)*e,b=Math.exp(-h),v=IA(Math.pow(d,2),o);return(-i(d)+m1>0?-1:1)*((m-g)*b)/v}):(i=d=>{const u=Math.exp(-d*e),h=(d-r)*e+1;return-m1+u*h},s=d=>{const u=Math.exp(-d*e),h=(r-d)*(e*e);return u*h});const l=5/e,c=hue(i,s,l);if(e=Ls(e),isNaN(c))return{stiffness:jr.stiffness,damping:jr.damping,duration:e};{const d=Math.pow(c,2)*n;return{stiffness:d,damping:o*2*Math.sqrt(n*d),duration:e}}}const fue=12;function hue(e,t,r){let n=r;for(let i=1;i<fue;i++)n=n-e(n)/t(n);return n}function IA(e,t){return e*Math.sqrt(1-t*t)}const mue=["duration","bounce"],pue=["stiffness","damping","mass"];function _R(e,t){return t.some(r=>e[r]!==void 0)}function gue(e){let t={velocity:jr.velocity,stiffness:jr.stiffness,damping:jr.damping,mass:jr.mass,isResolvedFromDuration:!1,...e};if(!_R(e,pue)&&_R(e,mue))if(e.visualDuration){const r=e.visualDuration,n=2*Math.PI/(r*1.2),i=n*n,s=2*qs(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:jr.mass,stiffness:i,damping:s}}else{const r=due(e);t={...t,...r,mass:jr.mass},t.isResolvedFromDuration=!0}return t}function ZU(e=jr.visualDuration,t=jr.bounce){const r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:n,restDelta:i}=r;const s=r.keyframes[0],o=r.keyframes[r.keyframes.length-1],l={done:!1,value:s},{stiffness:c,damping:d,mass:u,duration:h,velocity:m,isResolvedFromDuration:g}=gue({...r,velocity:-$s(r.velocity||0)}),b=m||0,v=d/(2*Math.sqrt(c*u)),y=o-s,x=$s(Math.sqrt(c/u)),w=Math.abs(y)<5;n||(n=w?jr.restSpeed.granular:jr.restSpeed.default),i||(i=w?jr.restDelta.granular:jr.restDelta.default);let _;if(v<1){const S=IA(x,v);_=k=>{const T=Math.exp(-v*x*k);return o-T*((b+v*x*y)/S*Math.sin(S*k)+y*Math.cos(S*k))}}else if(v===1)_=S=>
vendor: 4,470 bytes, line 774
774o-Math.exp(-x*S)*(y+(b+x*y)*S);else{const S=x*Math.sqrt(v*v-1);_=k=>{const T=Math.exp(-v*x*k),P=Math.min(S*k,300);return o-T*((b+v*x*y)*Math.sinh(P)+S*y*Math.cosh(P))/S}}const j={calculatedDuration:g&&h||null,next:S=>{const k=_(S);if(g)l.done=S>=h;else{let T=0;v<1&&(T=S===0?Ls(b):QU(_,S,k));const P=Math.abs(T)<=n,M=Math.abs(o-k)<=i;l.done=P&&M}return l.value=l.done?o:k,l},toString:()=>{const S=Math.min(yU(j),EA),k=vU(T=>j.next(S*T).value,S,30);return S+"ms "+k}};return j}function SR({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:l,max:c,restDelta:d=.5,restSpeed:u}){const h=e[0],m={done:!1,value:h},g=P=>l!==void 0&&P<l||c!==void 0&&P>c,b=P=>l===void 0?c:c===void 0||Math.abs(l-P)<Math.abs(c-P)?l:c;let v=r*t;const y=h+v,x=o===void 0?y:o(y);x!==y&&(v=x-h);const w=P=>-v*Math.exp(-P/n),_=P=>x+w(P),j=P=>{const M=w(P),C=_(P);m.done=Math.abs(M)<=d,m.value=m.done?x:C};let S,k;const T=P=>{g(m.value)&&(S=P,k=ZU({keyframes:[m.value,b(m.value)],velocity:QU(_,P,m.value),damping:i,stiffness:s,restDelta:d,restSpeed:u}))};return T(0),{calculatedDuration:null,next:P=>{let M=!1;return!k&&S===void 0&&(M=!0,j(P),T(P)),S!==void 0&&P>=S?k.next(P-S):(!M&&j(P),m)}}}const yue=vp(.42,0,1,1),vue=vp(0,0,.58,1),JU=vp(.42,0,.58,1),xue=e=>Array.isArray(e)&&typeof e[0]!="number",bue={linear:Na,easeIn:yue,easeInOut:JU,easeOut:vue,circIn:FE,circInOut:MU,circOut:OU,backIn:$E,backInOut:PU,backOut:TU,anticipate:CU},AR=e=>{if(ME(e)){X7(e.length===4);const[t,r,n,i]=e;return vp(t,r,n,i)}else if(typeof e=="string")return bue[e];return e};function wue(e,t,r){const n=[],i=r||XU,s=e.length-1;for(let o=0;o<s;o++){let l=i(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]||Na:t;l=xp(c,l)}n.push(l)}return n}function jue(e,t,{clamp:r=!0,ease:n,mixer:i}={}){const s=e.length;if(X7(s===t.length),s===1)return()=>t[0];if(s===2&&e[0]===e[1])return()=>t[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=wue(t,n,i),l=o.length,c=d=>{let u=0;if(l>1)for(;u<e.length-2&&!(d<e[u+1]);u++);const h=ed(e[u],e[u+1],d);return o[u](h)};return r?d=>c(qs(e[0],e[s-1],d)):c}function Nue(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const i=ed(0,t,n);e.push(xr(r,1,i))}}function _ue(e){const t=[0];return Nue(t,e.length-1),t}function Sue(e,t){return e.map(r=>r*t)}function Aue(e,t){return e.map(()=>t||JU).splice(0,e.length-1)}function u0({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){const i=xue(n)?n.map(AR):AR(n),s={done:!1,value:t[0]},o=Sue(r&&r.length===t.length?r:_ue(t),e),l=jue(o,t,{ease:Array.isArray(i)?i:Aue(t,i)});return{calculatedDuration:e,next:c=>(s.value=l(c),s.done=c>=e,s)}}const kue=e=>{const t=({timestamp:r})=>e(r);return{start:()=>dr.update(t,!0),stop:()=>Jo(t),now:()=>gn.isProcessing?gn.timestamp:Gi.now()}},Eue={decay:SR,inertia:SR,tween:u0,keyframes:u0,spring:ZU},Tue=e=>e/100;class HE extends KU{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:c}=this.options;c&&c()};const{name:r,motionValue:n,element:i,keyframes:s}=this.options,o=(i==null?void 0:i.KeyframeResolver)||BE,l=(c,d)=>this.onKeyframesResolved(c,d);this.resolver=new o(s,l,r,n,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:r="keyframes",repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=this.options,l=OE(r)?r:Eue[r]||u0;let c,d;l!==u0&&typeof t[0]!="number"&&(c=xp(Tue,XU(t[0],t[1])),t=[0,100]);const u=l({...this.options,keyframes:t});s==="mirror"&&(d=l({...this.options,keyframes:[...t].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=yU(u));const{calculatedDuration:h}=u,m=h+i,g=m*(n+1)-i;return{generator:u,mirroredGenerator:d,mapPercentToKeyframes:c,calculatedDuration:h,resolvedDuration:m,totalDuration:g}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,r=!1){const{resolved:n}=this;if(!n){const{keyframes:P}=this.options;return{done:!0,value:P[P.length-1]}}const{finalKeyframe:i,generator:s,mirroredGenerator:o,mapPercentToKeyframes:l,keyframes:c,calculatedDuration:d,totalDuration:u,resolvedDuration:h}=n;
vendor: 68,283 bytes, line 774
774if(this.startTime===null)return s.next(0);const{delay:m,repeat:g,repeatType:b,repeatDelay:v,onUpdate:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),r?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const x=this.currentTime-m*(this.speed>=0?1:-1),w=this.speed>=0?x<0:x>u;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let _=this.currentTime,j=s;if(g){const P=Math.min(this.currentTime,u)/h;let M=Math.floor(P),C=P%1;!C&&P>=1&&(C=1),C===1&&M--,M=Math.min(M,g+1),!!(M%2)&&(b==="reverse"?(C=1-C,v&&(C-=v/h)):b==="mirror"&&(j=o)),_=qs(0,1,C)*h}const S=w?{done:!1,value:c[0]}:j.next(_);l&&(S.value=l(S.value));let{done:k}=S;!w&&d!==null&&(k=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const T=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&k);return T&&i!==void 0&&(S.value=Hv(c,this.options,i)),y&&y(S.value),T&&this.finish(),S}get duration(){const{resolved:t}=this;return t?$s(t.calculatedDuration):0}get time(){return $s(this.currentTime)}set time(t){t=Ls(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=$s(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=kue,onPlay:r,startTime:n}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),r&&r();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=n??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Pue=new Set(["opacity","clipPath","filter","transform"]);function Cue(e,t,r,{delay:n=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:l="easeInOut",times:c}={}){const d={[t]:r};c&&(d.offset=c);const u=bU(l,i);return Array.isArray(u)&&(d.easing=u),e.animate(d,{delay:n,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}const Oue=gE(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),d0=10,Mue=2e4;function Rue(e){return OE(e.type)||e.type==="spring"||!xU(e.ease)}function Due(e,t){const r=new HE({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let n={done:!1,value:e[0]};const i=[];let s=0;for(;!n.done&&s<Mue;)n=r.sample(s),i.push(n.value),s+=d0;return{times:void 0,keyframes:i,duration:s-d0,ease:"linear"}}const eq={anticipate:CU,backInOut:PU,circInOut:MU};function Iue(e){return e in eq}class kR extends KU{constructor(t){super(t);const{name:r,motionValue:n,element:i,keyframes:s}=this.options;this.resolver=new GU(s,(o,l)=>this.onKeyframesResolved(o,l),r,n,i),this.resolver.scheduleResolve()}initPlayback(t,r){var n;let{duration:i=300,times:s,ease:o,type:l,motionValue:c,name:d,startTime:u}=this.options;if(!(!((n=c.owner)===null||n===void 0)&&n.current))return!1;if(typeof o=="string"&&l0()&&Iue(o)&&(o=eq[o]),Rue(this.options)){const{onComplete:m,onUpdate:g,motionValue:b,element:v,...y}=this.options,x=Due(t,y);t=x.keyframes,t.length===1&&(t[1]=t[0]),i=x.duration,s=x.times,o=x.ease,l="keyframes"}const h=Cue(c.owner.current,d,t,{...this.options,duration:i,times:s,ease:o});return h.startTime=u??this.calcStartTime(),this.pendingTimeline?(dR(h,this.pendingTimeline),this.pendingTimeline=void 0):h.onfinish=()=>{const{onComplete:m}=this.options;c.set(Hv(t,this.options,r)),m&&m(),this.cancel(),this.resolveFinishedPromise()},{animation:h,duration:i,times:s,type:l,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:r}=t;return $s(r)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:r}=t;return $s(r.currentTime||0)}set time(t){const{resolved:r}=this;if(!r)return;const{animation:n}=r;n.currentTime=Ls(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:r}=t;return r.playbackRate}set speed(t){const{resolved:r}=this;if(!r)return;const{animation:n}=r;n.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:r}=t;return r.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:r}=t;return r.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:r}=this;if(!r)return Na;const{animation:n}=r;dR(n,t)}return Na}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:r}=t;r.playState==="finished"&&this.updateFinishedPromise(),r.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:r}=t;r.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:r,keyframes:n,duration:i,type:s,ease:o,times:l}=t;if(r.playState==="idle"||r.playState==="finished")return;if(this.time){const{motionValue:d,onUpdate:u,onComplete:h,element:m,...g}=this.options,b=new HE({...g,keyframes:n,duration:i,type:s,ease:o,times:l,isGenerator:!0}),v=Ls(this.time);d.setWithVelocity(b.sample(v-d0).value,b.sample(v).value,d0)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:r,name:n,repeatDelay:i,repeatType:s,damping:o,type:l}=t;return Oue()&&n&&Pue.has(n)&&r&&r.owner&&r.owner.current instanceof HTMLElement&&!r.owner.getProps().onUpdate&&!i&&s!=="mirror"&&o!==0&&l!=="inertia"}}const Lue={type:"spring",stiffness:500,damping:25,restSpeed:10},$ue=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Fue={type:"keyframes",duration:.8},Bue={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Uue=(e,{keyframes:t})=>t.length>2?Fue:Mc.has(e)?e.startsWith("scale")?$ue(t[1]):Lue:Bue;function que({when:e,delay:t,delayChildren:r,staggerChildren:n,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:l,from:c,elapsed:d,...u}){return!!Object.keys(u).length}const WE=(e,t,r,n={},i,s)=>o=>{const l=CE(n,e)||{},c=l.delay||n.delay||0;let{elapsed:d=0}=n;d=d-Ls(c);let u={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-d,onUpdate:m=>{t.set(m),l.onUpdate&&l.onUpdate(m)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:s?void 0:i};que(l)||(u={...u,...Uue(e,u)}),u.duration&&(u.duration=Ls(u.duration)),u.repeatDelay&&(u.repeatDelay=Ls(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(h=!0)),h&&!s&&t.get()!==void 0){const m=Hv(u.keyframes,l);if(m!==void 0)return dr.update(()=>{u.onUpdate(m),u.onComplete()}),new sce([])}return!s&&kR.supports(u)?new kR(u):new HE(u)};function zue({protectedKeys:e,needsAnimating:t},r){const n=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,n}function tq(e,t,{delay:r=0,transitionOverride:n,type:i}={}){var s;let{transition:o=e.getDefaultTransition(),transitionEnd:l,...c}=t;n&&(o=n);const d=[],u=i&&e.animationState&&e.animationState.getState()[i];for(const h in c){const m=e.getValue(h,(s=e.latestValues[h])!==null&&s!==void 0?s:null),g=c[h];if(g===void 0||u&&zue(u,h))continue;const b={delay:r,...CE(o||{},h)};let v=!1;if(window.MotionHandoffAnimation){const x=SU(e);if(x){const w=window.MotionHandoffAnimation(x,h,dr);w!==null&&(b.startTime=w,v=!0)}}PA(e,h),m.start(WE(h,m,g,e.shouldReduceMotion&&Mc.has(h)?{type:!1}:b,e,v));const y=m.animation;y&&d.push(y)}return l&&Promise.all(d).then(()=>{dr.update(()=>{l&&bce(e,l)})}),d}function LA(e,t,r={}){var n;const i=Vv(e,t,r.type==="exit"?(n=e.presenceContext)===null||n===void 0?void 0:n.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=i||{};r.transitionOverride&&(s=r.transitionOverride);const o=i?()=>Promise.all(tq(e,i,r)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:u=0,staggerChildren:h,staggerDirection:m}=s;return Vue(e,t,u+d,h,m,r)}:()=>Promise.resolve(),{when:c}=s;if(c){const[d,u]=c==="beforeChildren"?[o,l]:[l,o];return d().then(()=>u())}else return Promise.all([o(),l(r.delay)])}function Vue(e,t,r=0,n=0,i=1,s){const o=[],l=(e.variantChildren.size-1)*n,c=i===1?(d=0)=>d*n:(d=0)=>l-d*n;return Array.from(e.variantChildren).sort(Hue).forEach((d,u)=>{d.notify("AnimationStart",t),o.push(LA(d,t,{...s,delay:r+c(u)}).then(()=>d.notify("AnimationComplete",t)))}),Promise.all(o)}function Hue(e,t){return e.sortNodePosition(t)}function Wue(e,t,r={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){const i=t.map(s=>LA(e,s,r));n=Promise.all(i)}else if(typeof t=="string")n=LA(e,t,r);else{const i=typeof t=="function"?Vv(e,t,r.custom):t;n=Promise.all(tq(e,i,r))}return n.then(()=>{e.notify("AnimationComplete",t)})}const Gue=xE.length;function rq(e){if(!e)return;if(!e.isControllingVariants){const r=e.parent?rq(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}const t={};for(let r=0;r<Gue;r++){const n=xE[r],i=e.props[n];(rm(i)||i===!1)&&(t[n]=i)}return t}const Kue=[...vE].reverse(),Yue=vE.length;function Xue(e){return t=>Promise.all(t.map(({animation:r,options:n})=>Wue(e,r,n)))}function Que(e){let t=Xue(e),r=ER(),n=!0;const i=c=>(d,u)=>{var h;const m=Vv(e,u,c==="exit"?(h=e.presenceContext)===null||h===void 0?void 0:h.custom:void 0);if(m){const{transition:g,transitionEnd:b,...v}=m;d={...d,...v,...b}}return d};function s(c){t=c(e)}function o(c){const{props:d}=e,u=rq(e.parent)||{},h=[],m=new Set;let g={},b=1/0;for(let y=0;y<Yue;y++){const x=Kue[y],w=r[x],_=d[x]!==void 0?d[x]:u[x],j=rm(_),S=x===c?w.isActive:null;S===!1&&(b=y);let k=_===u[x]&&_!==d[x]&&j;if(k&&n&&e.manuallyAnimateOnMount&&(k=!1),w.protectedKeys={...g},!w.isActive&&S===null||!_&&!w.prevProp||qv(_)||typeof _=="boolean")continue;const T=Zue(w.prevProp,_);let P=T||x===c&&w.isActive&&!k&&j||y>b&&j,M=!1;const C=Array.isArray(_)?_:[_];let O=C.reduce(i(x),{});S===!1&&(O={});const{prevResolvedValues:D={}}=w,L={...D,...O},F=W=>{P=!0,m.has(W)&&(M=!0,m.delete(W)),w.needsAnimating[W]=!0;const q=e.getValue(W);q&&(q.liveStyle=!1)};for(const W in L){const q=O[W],V=D[W];if(g.hasOwnProperty(W))continue;let z=!1;kA(q)&&kA(V)?z=!gU(q,V):z=q!==V,z?q!=null?F(W):m.add(W):q!==void 0&&m.has(W)?F(W):w.protectedKeys[W]=!0}w.prevProp=_,w.prevResolvedValues=O,w.isActive&&(g={...g,...O}),n&&e.blockInitialAnimation&&(P=!1),P&&(!(k&&T)||M)&&h.push(...C.map(W=>({animation:W,options:{type:x}})))}if(m.size){const y={};m.forEach(x=>{const w=e.getBaseTarget(x),_=e.getValue(x);_&&(_.liveStyle=!0),y[x]=w??null}),h.push({animation:y})}let v=!!h.length;return n&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(v=!1),n=!1,v?t(h):Promise.resolve()}function l(c,d){var u;if(r[c].isActive===d)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(m=>{var g;return(g=m.animationState)===null||g===void 0?void 0:g.setActive(c,d)}),r[c].isActive=d;const h=o(c);for(const m in r)r[m].protectedKeys={};return h}return{animateChanges:o,setActive:l,setAnimateFunction:s,getState:()=>r,reset:()=>{r=ER(),n=!0}}}function Zue(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!gU(t,e):!1}function Pl(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ER(){return{animate:Pl(!0),whileInView:Pl(),whileHover:Pl(),whileTap:Pl(),whileDrag:Pl(),whileFocus:Pl(),exit:Pl()}}class il{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Jue extends il{constructor(t){super(t),t.animationState||(t.animationState=Que(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();qv(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let ede=0;class tde extends il{constructor(){super(...arguments),this.id=ede++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const i=this.node.animationState.setActive("exit",!t);r&&!t&&i.then(()=>r(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const rde={animation:{Feature:Jue},exit:{Feature:tde}};function sm(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}function bp(e){return{point:{x:e.pageX,y:e.pageY}}}const nde=e=>t=>RE(t)&&e(t,bp(t));function Dh(e,t,r,n){return sm(e,t,nde(r),n)}const TR=(e,t)=>Math.abs(e-t);function ade(e,t){const r=TR(e.x,t.x),n=TR(e.y,t.y);return Math.sqrt(r**2+n**2)}class nq{constructor(t,r,{transformPagePoint:n,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=g1(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,g=ade(h.offset,{x:0,y:0})>=3;if(!m&&!g)return;const{point:b}=h,{timestamp:v}=gn;this.history.push({...b,timestamp:v});const{onStart:y,onMove:x}=this.handlers;m||(y&&y(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,h)},this.handlePointerMove=(h,m)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=p1(m,this.transformPagePoint),dr.update(this.updatePoint,!0)},this.handlePointerUp=(h,m)=>{this.end();const{onEnd:g,onSessionEnd:b,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=g1(h.type==="pointercancel"?this.lastMoveEventInfo:p1(m,this.transformPagePoint),this.history);this.startEvent&&g&&g(h,y),b&&b(h,y)},!RE(t))return;this.dragSnapToOrigin=s,this.handlers=r,this.transformPagePoint=n,this.contextWindow=i||window;const o=bp(t),l=p1(o,this.transformPagePoint),{point:c}=l,{timestamp:d}=gn;this.history=[{...c,timestamp:d}];const{onSessionStart:u}=r;u&&u(t,g1(l,this.history)),this.removeListeners=xp(Dh(this.contextWindow,"pointermove",this.handlePointerMove),Dh(this.contextWindow,"pointerup",this.handlePointerUp),Dh(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Jo(this.updatePoint)}}function p1(e,t){return t?{point:t(e.point)}:e}function PR(e,t){return{x:e.x-t.x,y:e.y-t.y}}function g1({point:e},t){return{point:e,delta:PR(e,aq(t)),offset:PR(e,ide(t)),velocity:sde(t,.1)}}function ide(e){return e[0]}function aq(e){return e[e.length-1]}function sde(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null;const i=aq(e);for(;r>=0&&(n=e[r],!(i.timestamp-n.timestamp>Ls(t)));)r--;if(!n)return{x:0,y:0};const s=$s(i.timestamp-n.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-n.x)/s,y:(i.y-n.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}const iq=1e-4,ode=1-iq,lde=1+iq,sq=.01,cde=0-sq,ude=0+sq;function Ea(e){return e.max-e.min}function dde(e,t,r){return Math.abs(e-t)<=r}function CR(e,t,r,n=.5){e.origin=n,e.originPoint=xr(t.min,t.max,e.origin),e.scale=Ea(r)/Ea(t),e.translate=xr(r.min,r.max,e.origin)-e.originPoint,(e.scale>=ode&&e.scale<=lde||isNaN(e.scale))&&(e.scale=1),(e.translate>=cde&&e.translate<=ude||isNaN(e.translate))&&(e.translate=0)}function Ih(e,t,r,n){CR(e.x,t.x,r.x,n?n.originX:void 0),CR(e.y,t.y,r.y,n?n.originY:void 0)}function OR(e,t,r){e.min=r.min+t.min,e.max=e.min+Ea(t)}function fde(e,t,r){OR(e.x,t.x,r.x),OR(e.y,t.y,r.y)}function MR(e,t,r){e.min=t.min-r.min,e.max=e.min+Ea(t)}function Lh(e,t,r){MR(e.x,t.x,r.x),MR(e.y,t.y,r.y)}function hde(e,{min:t,max:r},n){return t!==void 0&&e<t?e=n?xr(t,e,n.min):Math.max(e,t):r!==void 0&&e>r&&(e=n?xr(r,e,n.max):Math.min(e,r)),e}function RR(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function mde(e,{top:t,left:r,bottom:n,right:i}){return{x:RR(e.x,r,i),y:RR(e.y,t,n)}}function DR(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}function pde(e,t){return{x:DR(e.x,t.x),y:DR(e.y,t.y)}}function gde(e,t){let r=.5;const n=Ea(e),i=Ea(t);return i>n?r=ed(t.min,t.max-n,e.min):n>i&&(r=ed(e.min,e.max-i,t.min)),qs(0,1,r)}function yde(e,t){const r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}const $A=.35;function vde(e=$A){return e===!1?e=0:e===!0&&(e=$A),{x:IR(e,"left","right"),y:IR(e,"top","bottom")}}function IR(e,t,r){return{min:LR(e,t),max:LR(e,r)}}function LR(e,t){return typeof e=="number"?e:e[t]||0}const $R=()=>({translate:0,scale:1,origin:0,originPoint:0}),Au=()=>({x:$R(),y:$R()}),FR=()=>({min:0,max:0}),Pr=()=>({x:FR(),y:FR()});function Ba(e){return[e("x"),e("y")]}function oq({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function xde({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function bde(e,t){if(!t)return e;const r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function y1(e){return e===void 0||e===1}function FA({scale:e,scaleX:t,scaleY:r}){return!y1(e)||!y1(t)||!y1(r)}function Dl(e){return FA(e)||lq(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function lq(e){return BR(e.x)||BR(e.y)}function BR(e){return e&&e!=="0%"}function f0(e,t,r){const n=e-r,i=t*n;return r+i}function UR(e,t,r,n,i){return i!==void 0&&(e=f0(e,i,n)),f0(e,r,n)+t}function BA(e,t=0,r=1,n,i){e.min=UR(e.min,t,r,n,i),e.max=UR(e.max,t,r,n,i)}function cq(e,{x:t,y:r}){BA(e.x,t.translate,t.scale,t.originPoint),BA(e.y,r.translate,r.scale,r.originPoint)}const qR=.999999999999,zR=1.0000000000001;function wde(e,t,r,n=!1){const i=r.length;if(!i)return;t.x=t.y=1;let s,o;for(let l=0;l<i;l++){s=r[l],o=s.projectionDelta;const{visualElement:c}=s.options;c&&c.props.style&&c.props.style.display==="contents"||(n&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Eu(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,cq(e,o)),n&&Dl(s.latestValues)&&Eu(e,s.latestValues))}t.x<zR&&t.x>qR&&(t.x=1),t.y<zR&&t.y>qR&&(t.y=1)}function ku(e,t){e.min=e.min+t,e.max=e.max+t}function VR(e,t,r,n,i=.5){const s=xr(e.min,e.max,i);BA(e,t,r,s,n)}function Eu(e,t){VR(e.x,t.x,t.scaleX,t.scale,t.originX),VR(e.y,t.y,t.scaleY,t.scale,t.originY)}function uq(e,t){return oq(bde(e.getBoundingClientRect(),t))}function jde(e,t,r){const n=uq(e,r),{scroll:i}=t;return i&&(ku(n.x,i.offset.x),ku(n.y,i.offset.y)),n}const dq=({current:e})=>e?e.ownerDocument.defaultView:null,Nde=new WeakMap;class _de{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Pr(),this.visualElement=t}start(t,{snapToCursor:r=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;const i=u=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(bp(u).point)},s=(u,h)=>{const{drag:m,dragPropagation:g,onDragStart:b}=this.getProps();if(m&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=pce(m),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ba(y=>{let x=this.getAxisMotionValue(y).get()||0;if(Wi.test(x)){const{projection:w}=this.visualElement;if(w&&w.layout){const _=w.layout.layoutBox[y];_&&(x=Ea(_)*(parseFloat(x)/100))}}this.originPoint[y]=x}),b&&dr.postRender(()=>b(u,h)),PA(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},o=(u,h)=>{const{dragPropagation:m,dragDirectionLock:g,onDirectionLock:b,onDrag:v}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:y}=h;if(g&&this.currentDirection===null){this.currentDirection=Sde(y),this.currentDirection!==null&&b&&b(this.currentDirection);return}this.updateAxis("x",h.point,y),this.updateAxis("y",h.point,y),this.visualElement.render(),v&&v(u,h)},l=(u,h)=>this.stop(u,h),c=()=>Ba(u=>{var h;return this.getAnimationState(u)==="paused"&&((h=this.getAxisMotionValue(u).animation)===null||h===void 0?void 0:h.play())}),{dragSnapToOrigin:d}=this.getProps();this.panSession=new nq(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,contextWindow:dq(this.visualElement)})}stop(t,r){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=r;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&dr.postRender(()=>s(t,r))}cancel(){this.isDragging=!1;const{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(t,r,n){const{drag:i}=this.getProps();if(!n||!sy(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=hde(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var t;const{dragConstraints:r,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;r&&_u(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):r&&i?this.constraints=mde(i.layoutBox,r):this.constraints=!1,this.elastic=vde(n),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Ba(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=yde(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!_u(t))return!1;const n=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=jde(n,i.root,this.visualElement.getTransformPagePoint());let o=pde(i.layout.layoutBox,s);if(r){const l=r(xde(o));this.hasMutatedConstraints=!!l,l&&(o=oq(l))}return o}startAnimation(t){const{drag:r,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},d=Ba(u=>{if(!sy(u,r,this.currentDirection))return;let h=c&&c[u]||{};o&&(h={min:0,max:0});const m=i?200:1e6,g=i?40:1e7,b={type:"inertia",velocity:n?t[u]:0,bounceStiffness:m,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...s,...h};return this.startAxisValueAnimation(u,b)});return Promise.all(d).then(l)}startAxisValueAnimation(t,r){const n=this.getAxisMotionValue(t);return PA(this.visualElement,t),n.start(WE(t,n,0,r,this.visualElement,!1))}stopAnimation(){Ba(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ba(t=>{var r;return(r=this.getAxisMotionValue(t).animation)===null||r===void 0?void 0:r.pause()})}getAnimationState(t){var r;return(r=this.getAxisMotionValue(t).animation)===null||r===void 0?void 0:r.state}getAxisMotionValue(t){const r=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),i=n[r];return i||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Ba(r=>{const{drag:n}=this.getProps();if(!sy(r,n,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(r);if(i&&i.layout){const{min:o,max:l}=i.layout.layoutBox[r];s.set(t[r]-xr(o,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!_u(r)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ba(o=>{const l=this.getAxisMotionValue(o);if(l&&this.constraints!==!1){const c=l.get();i[o]=gde({min:c,max:c},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Ba(o=>{if(!sy(o,t,null))return;const l=this.getAxisMotionValue(o),{min:c,max:d}=this.constraints[o];l.set(xr(c,d,i[o]))})}addListeners(){if(!this.visualElement.current)return;Nde.set(this.visualElement,this);const t=this.visualElement.current,r=Dh(t,"pointerdown",c=>{const{drag:d,dragListener:u=!0}=this.getProps();d&&u&&this.start(c)}),n=()=>{const{dragConstraints:c}=this.getProps();_u(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",n);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),dr.read(n);const o=sm(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:d})=>{this.isDragging&&d&&(Ba(u=>{const h=this.getAxisMotionValue(u);h&&(this.originPoint[u]+=c[u].translate,h.set(h.get()+c[u].translate))}),this.visualElement.render())}));return()=>{o(),r(),s(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=$A,dragMomentum:l=!0}=t;return{...t,drag:r,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:l}}}function sy(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function Sde(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}class Ade extends il{constructor(t){super(t),this.removeGroupControls=Na,this.removeListeners=Na,this.controls=new _de(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Na}unmount(){this.removeGroupControls(),this.removeListeners()}}const HR=e=>(t,r)=>{e&&dr.postRender(()=>e(t,r))};class kde extends il{constructor(){super(...arguments),this.removePointerDownListener=Na}onPointerDown(t){this.session=new nq(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:dq(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:r,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:HR(t),onStart:HR(r),onMove:n,onEnd:(s,o)=>{delete this.session,i&&dr.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=Dh(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function Ede(){const e=A.useContext(Bv);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:r,register:n}=e,i=A.useId();A.useEffect(()=>n(i),[]);const s=A.useCallback(()=>r&&r(i),[i,r]);return!t&&r?[!1,s]:[!0]}const Fy={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function WR(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const nh={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ht.test(e))e=parseFloat(e);else return e;const r=WR(e,t.target.x),n=WR(e,t.target.y);return`${r}% ${n}%`}},Tde={correct:(e,{treeScale:t,projectionDelta:r})=>{const n=e,i=el.parse(e);if(i.length>5)return n;const s=el.createTransformer(e),o=typeof i[0]!="number"?1:0,l=r.x.scale*t.x,c=r.y.scale*t.y;i[0+o]/=l,i[1+o]/=c;const d=xr(l,c,.5);return typeof i[2+o]=="number"&&(i[2+o]/=d),typeof i[3+o]=="number"&&(i[3+o]/=d),s(i)}};class Pde extends A.Component{componentDidMount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=t;Ole(Cde),s&&(r.group&&r.group.add(s),n&&n.register&&i&&n.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Fy.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:r,visualElement:n,drag:i,isPresent:s}=this.props,o=n.projection;return o&&(o.isPresent=s,i||t.layoutDependency!==r||r===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||dr.postRender(()=>{const l=o.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),wE.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function fq(e){const[t,r]=Ede(),n=A.useContext(pE);return a.jsx(Pde,{...e,layoutGroup:n,switchLayoutGroup:A.useContext(nU),isPresent:t,safeToRemove:r})}const Cde={borderRadius:{...nh,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:nh,borderTopRightRadius:nh,borderBottomLeftRadius:nh,borderBottomRightRadius:nh,boxShadow:Tde};function Ode(e,t,r){const n=Pn(e)?e:am(e);return n.start(WE("",n,t,r)),n.animation}function Mde(e){return e instanceof SVGElement&&e.tagName!=="svg"}const Rde=(e,t)=>e.depth-t.depth;class Dde{constructor(){this.children=[],this.isDirty=!1}add(t){DE(this.children,t),this.isDirty=!0}remove(t){IE(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Rde),this.isDirty=!1,this.children.forEach(t)}}function Ide(e,t){const r=Gi.now(),n=({timestamp:i})=>{const s=i-r;s>=t&&(Jo(n),e(s-t))};return dr.read(n,!0),()=>Jo(n)}const hq=["TopLeft","TopRight","BottomLeft","BottomRight"],Lde=hq.length,GR=e=>typeof e=="string"?parseFloat(e):e,KR=e=>typeof e=="number"||ht.test(e);function $de(e,t,r,n,i,s){i?(e.opacity=xr(0,r.opacity!==void 0?r.opacity:1,Fde(n)),e.opacityExit=xr(t.opacity!==void 0?t.opacity:1,0,Bde(n))):s&&(e.opacity=xr(t.opacity!==void 0?t.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let o=0;o<Lde;o++){const l=`border${hq[o]}Radius`;let c=YR(t,l),d=YR(r,l);if(c===void 0&&d===void 0)continue;c||(c=0),d||(d=0),c===0||d===0||KR(c)===KR(d)?(e[l]=Math.max(xr(GR(c),GR(d),n),0),(Wi.test(d)||Wi.test(c))&&(e[l]+="%")):e[l]=d}(t.rotate||r.rotate)&&(e.rotate=xr(t.rotate||0,r.rotate||0,n))}function YR(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Fde=mq(0,.5,OU),Bde=mq(.5,.95,Na);function mq(e,t,r){return n=>n<e?0:n>t?1:r(ed(e,t,n))}function XR(e,t){e.min=t.min,e.max=t.max}function Ia(e,t){XR(e.x,t.x),XR(e.y,t.y)}function QR(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function ZR(e,t,r,n,i){return e-=t,e=f0(e,1/r,n),i!==void 0&&(e=f0(e,1/i,n)),e}function Ude(e,t=0,r=1,n=.5,i,s=e,o=e){if(Wi.test(t)&&(t=parseFloat(t),t=xr(o.min,o.max,t/100)-o.min),typeof t!="number")return;let l=xr(s.min,s.max,n);e===s&&(l-=t),e.min=ZR(e.min,t,r,l,i),e.max=ZR(e.max,t,r,l,i)}function JR(e,t,[r,n,i],s,o){Ude(e,t[r],t[n],t[i],t.scale,s,o)}const qde=["x","scaleX","originX"],zde=["y","scaleY","originY"];function e5(e,t,r,n){JR(e.x,t,qde,r?r.x:void 0,n?n.x:void 0),JR(e.y,t,zde,r?r.y:void 0,n?n.y:void 0)}function t5(e){return e.translate===0&&e.scale===1}function pq(e){return t5(e.x)&&t5(e.y)}function r5(e,t){return e.min===t.min&&e.max===t.max}function Vde(e,t){return r5(e.x,t.x)&&r5(e.y,t.y)}function n5(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function gq(e,t){return n5(e.x,t.x)&&n5(e.y,t.y)}function a5(e){return Ea(e.x)/Ea(e.y)}function i5(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Hde{constructor(){this.members=[]}add(t){DE(this.members,t),t.scheduleRender()}remove(t){if(IE(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){const r=this.members.findIndex(i=>t===i);if(r===0)return!1;let n;for(let i=r;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){n=s;break}}return n?(this.promote(n),!0):!1}promote(t,r){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,r&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:r,resumingFrom:n}=t;r.onExitComplete&&r.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Wde(e,t,r){let n="";const i=e.x.translate/t.x,s=e.y.translate/t.y,o=(r==null?void 0:r.z)||0;if((i||s||o)&&(n=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),r){const{transformPerspective:d,rotate:u,rotateX:h,rotateY:m,skewX:g,skewY:b}=r;d&&(n=`perspective(${d}px) ${n}`),u&&(n+=`rotate(${u}deg) `),h&&(n+=`rotateX(${h}deg) `),m&&(n+=`rotateY(${m}deg) `),g&&(n+=`skewX(${g}deg) `),b&&(n+=`skewY(${b}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(n+=`scale(${l}, ${c})`),n||"none"}const Il={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},_h=typeof window<"u"&&window.MotionDebug!==void 0,v1=["","X","Y","Z"],Gde={visibility:"hidden"},s5=1e3;let Kde=0;function x1(e,t,r,n){const{latestValues:i}=t;i[e]&&(r[e]=i[e],t.setStaticValue(e,0),n&&(n[e]=0))}function yq(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const r=SU(t);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",dr,!(i||s))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&yq(n)}function vq({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(o={},l=t==null?void 0:t()){this.id=Kde++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,_h&&(Il.totalNodes=Il.resolvedTargetDeltas=Il.recalculatedProjection=0),this.nodes.forEach(Qde),this.nodes.forEach(rfe),this.nodes.forEach(nfe),this.nodes.forEach(Zde),_h&&window.MotionDebug.record(Il)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new Dde)}addEventListener(o,l){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new LE),this.eventHandlers.get(o).add(l)}notifyListeners(o,...l){const c=this.eventHandlers.get(o);c&&c.notify(...l)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,l=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Mde(o),this.instance=o;const{layoutId:c,layout:d,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),l&&(d||c)&&(this.isLayoutDirty=!0),e){let h;const m=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=Ide(m,250),Fy.hasAnimatedSinceResize&&(Fy.hasAnimatedSinceResize=!1,this.nodes.forEach(l5))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&u&&(c||d)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:m,hasRelativeTargetChanged:g,layout:b})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||u.getDefaultTransition()||lfe,{onLayoutAnimationStart:y,onLayoutAnimationComplete:x}=u.getProps(),w=!this.targetLayout||!gq(this.targetLayout,b)||g,_=!m&&g;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||_||m&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,_);const j={...CE(v,"layout"),onPlay:y,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(j.delay=0,j.type=!1),this.startAnimation(j)}else m||l5(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=b})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Jo(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(afe),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&yq(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(o5);return}this.isUpdating||this.nodes.forEach(efe),this.isUpdating=!1,this.nodes.forEach(tfe),this.nodes.forEach(Yde),this.nodes.forEach(Xde),this.clearAllSnapshots();const l=Gi.now();gn.delta=qs(0,1e3/60,l-gn.timestamp),gn.timestamp=l,gn.isProcessing=!0,c1.update.process(gn),c1.preRender.process(gn),c1.render.process(gn),gn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,wE.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Jde),this.sharedNodes.forEach(ife)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,dr.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){dr.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Pr(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(l=!1),l){const c=n(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!pq(this.projectionDelta),c=this.getTransformTemplate(),d=c?c(this.latestValues,""):void 0,u=d!==this.prevTransformTemplateValue;o&&(l||Dl(this.latestValues)||u)&&(i(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return o&&(c=this.removeTransform(c)),cfe(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:l}=this.options;if(!l)return Pr();const c=l.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(ufe))){const{scroll:u}=this.root;u&&(ku(c.x,u.offset.x),ku(c.y,u.offset.y))}return c}removeElementScroll(o){var l;const c=Pr();if(Ia(c,o),!((l=this.scroll)===null||l===void 0)&&l.wasRoot)return c;for(let d=0;d<this.path.length;d++){const u=this.path[d],{scroll:h,options:m}=u;u!==this.root&&h&&m.layoutScroll&&(h.wasRoot&&Ia(c,o),ku(c.x,h.offset.x),ku(c.y,h.offset.y))}return c}applyTransform(o,l=!1){const c=Pr();Ia(c,o);for(let d=0;d<this.path.length;d++){const u=this.path[d];!l&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Eu(c,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Dl(u.latestValues)&&Eu(c,u.latestValues)}return Dl(this.latestValues)&&Eu(c,this.latestValues),c}removeTransform(o){const l=Pr();Ia(l,o);for(let c=0;c<this.path.length;c++){const d=this.path[c];if(!d.instance||!Dl(d.latestValues))continue;FA(d.latestValues)&&d.updateSnapshot();const u=Pr(),h=d.measurePageBox();Ia(u,h),e5(l,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,u)}return Dl(this.latestValues)&&e5(l,this.latestValues),l}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==gn.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var l;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const d=!!this.resumingFrom||this!==c;if(!(o||d&&this.isSharedProjectionDirty||this.isProjectionDirty||!((l=this.parent)===null||l===void 0)&&l.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:m}=this.options;if(!(!this.layout||!(h||m))){if(this.resolvedRelativeTargetAt=gn.timestamp,!this.targetDelta&&!this.relativeTarget){const g=this.getClosestProjectingParent();g&&g.layout&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Pr(),this.relativeTargetOrigin=Pr(),Lh(this.relativeTargetOrigin,this.layout.layoutBox,g.layout.layoutBox),Ia(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Pr(),this.targetWithTransforms=Pr()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),fde(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Ia(this.target,this.layout.layoutBox),cq(this.target,this.targetDelta)):Ia(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const g=this.getClosestProjectingParent();g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Pr(),this.relativeTargetOrigin=Pr(),Lh(this.relativeTargetOrigin,this.target,g.target),Ia(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}_h&&Il.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||FA(this.parent.latestValues)||lq(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const l=this.getLead(),c=!!this.resumingFrom||this!==l;let d=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(d=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===gn.timestamp&&(d=!1),d)return;const{layout:u,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||h))return;Ia(this.layoutCorrected,this.layout.layoutBox);const m=this.treeScale.x,g=this.treeScale.y;wde(this.layoutCorrected,this.treeScale,this.path,c),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=Pr());const{target:b}=l;if(!b){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(QR(this.prevProjectionDelta.x,this.projectionDelta.x),QR(this.prevProjectionDelta.y,this.projectionDelta.y)),Ih(this.projectionDelta,this.layoutCorrected,b,this.latestValues),(this.treeScale.x!==m||this.treeScale.y!==g||!i5(this.projectionDelta.x,this.prevProjectionDelta.x)||!i5(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",b)),_h&&Il.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var l;if((l=this.options.visualElement)===null||l===void 0||l.scheduleRender(),o){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Au(),this.projectionDelta=Au(),this.projectionDeltaWithTransform=Au()}setAnimationOrigin(o,l=!1){const c=this.snapshot,d=c?c.latestValues:{},u={...this.latestValues},h=Au();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const m=Pr(),g=c?c.source:void 0,b=this.layout?this.layout.source:void 0,v=g!==b,y=this.getStack(),x=!y||y.members.length<=1,w=!!(v&&!x&&this.options.crossfade===!0&&!this.path.some(ofe));this.animationProgress=0;let _;this.mixTargetDelta=j=>{const S=j/1e3;c5(h.x,o.x,S),c5(h.y,o.y,S),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Lh(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),sfe(this.relativeTarget,this.relativeTargetOrigin,m,S),_&&Vde(this.relativeTarget,_)&&(this.isProjectionDirty=!1),_||(_=Pr()),Ia(_,this.relativeTarget)),v&&(this.animationValues=u,$de(u,d,this.latestValues,S,w,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Jo(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=dr.update(()=>{Fy.hasAnimatedSinceResize=!0,this.currentAnimation=Ode(0,s5,{...o,onUpdate:l=>{this.mixTargetDelta(l),o.onUpdate&&o.onUpdate(l)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(s5),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:l,target:c,layout:d,latestValues:u}=o;if(!(!l||!c||!d)){if(this!==o&&this.layout&&d&&xq(this.options.animationType,this.layout.layoutBox,d.layoutBox)){c=this.target||Pr();const h=Ea(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+h;const m=Ea(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+m}Ia(l,c),Eu(l,u),Ih(this.projectionDeltaWithTransform,this.layoutCorrected,l,u)}}registerSharedNode(o,l){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Hde),this.sharedNodes.get(o).add(l);const d=l.options.initialPromotionConfig;l.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(l):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:l}=this.options;return l?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:l}=this.options;return l?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:l,preserveFollowOpacity:c}={}){const d=this.getStack();d&&d.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let l=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const d={};c.z&&x1("z",o,d,this.animationValues);for(let u=0;u<v1.length;u++)x1(`rotate${v1[u]}`,o,d,this.animationValues),x1(`skew${v1[u]}`,o,d,this.animationValues);o.render();for(const u in d)o.setStaticValue(u,d[u]),this.animationValues&&(this.animationValues[u]=d[u]);o.scheduleRender()}getProjectionStyles(o){var l,c;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Gde;const d={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,d.opacity="",d.pointerEvents=Ly(o==null?void 0:o.pointerEvents)||"",d.transform=u?u(this.latestValues,""):"none",d;const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){const v={};return this.options.layoutId&&(v.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,v.pointerEvents=Ly(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!Dl(this.latestValues)&&(v.transform=u?u({},""):"none",this.hasProjected=!1),v}const m=h.animationValues||h.latestValues;this.applyTransformsToTarget(),d.transform=Wde(this.projectionDeltaWithTransform,this.treeScale,m),u&&(d.transform=u(m,d.transform));const{x:g,y:b}=this.projectionDelta;d.transformOrigin=`${g.origin*100}% ${b.origin*100}% 0`,h.animationValues?d.opacity=h===this?(c=(l=m.opacity)!==null&&l!==void 0?l:this.latestValues.opacity)!==null&&c!==void 0?c:1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:d.opacity=h===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const v in o0){if(m[v]===void 0)continue;const{correct:y,applyTo:x}=o0[v],w=d.transform==="none"?m[v]:y(m[v],h);if(x){const _=x.length;for(let j=0;j<_;j++)d[x[j]]=w}else d[v]=w}return this.options.layoutId&&(d.pointerEvents=h===this?Ly(o==null?void 0:o.pointerEvents)||"":"none"),d}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var l;return(l=o.currentAnimation)===null||l===void 0?void 0:l.stop()}),this.root.nodes.forEach(o5),this.root.sharedNodes.clear()}}}function Yde(e){e.updateLayout()}function Xde(e){var t;const r=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&r&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=e.layout,{animationType:s}=e.options,o=r.source!==e.layout.source;s==="size"?Ba(h=>{const m=o?r.measuredBox[h]:r.layoutBox[h],g=Ea(m);m.min=n[h].min,m.max=m.min+g}):xq(s,r.layoutBox,n)&&Ba(h=>{const m=o?r.measuredBox[h]:r.layoutBox[h],g=Ea(n[h]);m.max=m.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+g)});const l=Au();Ih(l,n,r.layoutBox);const c=Au();o?Ih(c,e.applyTransform(i,!0),r.measuredBox):Ih(c,n,r.layoutBox);const d=!pq(l);let u=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:m,layout:g}=h;if(m&&g){const b=Pr();Lh(b,r.layoutBox,m.layoutBox);const v=Pr();Lh(v,n,g.layoutBox),gq(b,v)||(u=!0),h.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=b,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:r,delta:c,layoutDelta:l,hasLayoutChanged:d,hasRelativeTargetChanged:u})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function Qde(e){_h&&Il.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Zde(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Jde(e){e.clearSnapshot()}function o5(e){e.clearMeasurements()}function efe(e){e.isLayoutDirty=!1}function tfe(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function l5(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function rfe(e){e.resolveTargetDelta()}function nfe(e){e.calcProjection()}function afe(e){e.resetSkewAndRotation()}function ife(e){e.removeLeadSnapshot()}function c5(e,t,r){e.translate=xr(t.translate,0,r),e.scale=xr(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function u5(e,t,r,n){e.min=xr(t.min,r.min,n),e.max=xr(t.max,r.max,n)}function sfe(e,t,r,n){u5(e.x,t.x,r.x,n),u5(e.y,t.y,r.y,n)}function ofe(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const lfe={duration:.45,ease:[.4,0,.1,1]},d5=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),f5=d5("applewebkit/")&&!d5("chrome/")?Math.round:Na;function h5(e){e.min=f5(e.min),e.max=f5(e.max)}function cfe(e){h5(e.x),h5(e.y)}function xq(e,t,r){return e==="position"||e==="preserve-aspect"&&!dde(a5(t),a5(r),.2)}function ufe(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const dfe=vq({attachResizeListener:(e,t)=>sm(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),b1={current:void 0},bq=vq({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!b1.current){const e=new dfe({});e.mount(window),e.setOptions({layoutScroll:!0}),b1.current=e}return b1.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),ffe={pan:{Feature:kde},drag:{Feature:Ade,ProjectionNode:bq,MeasureLayout:fq}};function m5(e,t,r){const{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",r==="Start");const i="onHover"+r,s=n[i];s&&dr.postRender(()=>s(t,bp(t)))}class hfe extends il{mount(){const{current:t}=this.node;t&&(this.unmount=uce(t,r=>(m5(this.node,r,"Start"),n=>m5(this.node,n,"End"))))}unmount(){}}class mfe extends il{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=xp(sm(this.node.current,"focus",()=>this.onFocus()),sm(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function p5(e,t,r){const{props:n}=e;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",r==="Start");const i="onTap"+(r==="End"?"":r),s=n[i];s&&dr.postRender(()=>s(t,bp(t)))}class pfe extends il{mount(){const{current:t}=this.node;t&&(this.unmount=mce(t,r=>(p5(this.node,r,"Start"),(n,{success:i})=>p5(this.node,n,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const UA=new WeakMap,w1=new WeakMap,gfe=e=>{const t=UA.get(e.target);t&&t(e)},yfe=e=>{e.forEach(gfe)};function vfe({root:e,...t}){const r=e||document;w1.has(r)||w1.set(r,{});const n=w1.get(r),i=JSON.stringify(t);return n[i]||(n[i]=new IntersectionObserver(yfe,{root:e,...t})),n[i]}function xfe(e,t,r){const n=vfe(t);return UA.set(e,r),n.observe(e),()=>{UA.delete(e),n.unobserve(e)}}const bfe={some:0,all:1};class wfe extends il{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:r,margin:n,amount:i="some",once:s}=t,o={root:r?r.current:void 0,rootMargin:n,threshold:typeof i=="number"?i:bfe[i]},l=c=>{const{isIntersecting:d}=c;if(this.isInView===d||(this.isInView=d,s&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:u,onViewportLeave:h}=this.node.getProps(),m=d?u:h;m&&m(c)};return xfe(this.node.current,o,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:r}=this.node;["amount","margin","root"].some(jfe(t,r))&&this.startObserver()}unmount(){}}function jfe({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}const Nfe={inView:{Feature:wfe},tap:{Feature:pfe},focus:{Feature:mfe},hover:{Feature:hfe}},_fe={layout:{ProjectionNode:bq,MeasureLayout:fq}},qA={current:null},wq={current:!1};function Sfe(){if(wq.current=!0,!!yE)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>qA.current=e.matches;e.addListener(t),t()}else qA.current=!1}function Afe(e,t,r){for(const n in t){const i=t[n],s=r[n];if(Pn(i))e.addValue(n,i);else if(Pn(s))e.addValue(n,am(i,{owner:e}));else if(s!==i)if(e.hasValue(n)){const o=e.getValue(n);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(n);e.addValue(n,am(o!==void 0?o:i,{owner:e}))}}for(const n in r)t[n]===void 0&&e.removeValue(n);return t}const g5=new WeakMap,kfe=[...$U,An,el],Efe=e=>kfe.find(LU(e)),y5=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Tfe{scrapeMotionValuesFromProps(t,r,n){return{}}constructor({parent:t,props:r,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=BE,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=Gi.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,dr.render(this.render,!1,!0))};const{latestValues:c,renderState:d}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=r.initial?{...c}:{},this.renderState=d,this.parent=t,this.props=r,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=l,this.blockInitialAnimation=!!s,this.isControllingVariants=zv(r),this.isVariantNode=tU(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...h}=this.scrapeMotionValuesFromProps(r,{},this);for(const m in h){const g=h[m];c[m]!==void 0&&Pn(g)&&g.set(c[m],!1)}}mount(t){this.current=t,g5.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,n)=>this.bindToMotionValue(n,r)),wq.current||Sfe(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:qA.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){g5.delete(this.current),this.projection&&this.projection.unmount(),Jo(this.notifyUpdate),Jo(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const r=this.features[t];r&&(r.unmount(),r.isMounted=!1)}this.current=null}bindToMotionValue(t,r){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Mc.has(t),i=r.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&dr.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),s=r.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{i(),s(),o&&o(),r.owner&&r.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in td){const r=td[t];if(!r)continue;const{isEnabled:n,Feature:i}=r;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Pr()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let n=0;n<y5.length;n++){const i=y5[n];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,o=t[s];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=Afe(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){const n=this.values.get(t);r!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);const r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&r!==void 0&&(n=am(r===null?void 0:r,{owner:this}),this.addValue(t,n)),n}readValue(t,r){var n;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(DU(i)||RU(i))?i=parseFloat(i):!Efe(i)&&el.test(r)&&(i=WU(t,r)),this.setBaseTarget(t,Pn(i)?i.get():i)),Pn(i)?i.get():i}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){var r;const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const o=_E(this.props,n,(r=this.presenceContext)===null||r===void 0?void 0:r.custom);o&&(i=o[t])}if(n&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!Pn(s)?s:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new LE),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}}class jq extends Tfe{constructor(){super(...arguments),this.KeyframeResolver=GU}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){return t.style?t.style[r]:void 0}removeValueFromRenderState(t,{vars:r,style:n}){delete r[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Pn(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}}function Pfe(e){return window.getComputedStyle(e)}class Cfe extends jq{constructor(){super(...arguments),this.type="html",this.renderInstance=iU}readValueFromInstance(t,r){if(Mc.has(r)){const n=zE(r);return n&&n.default||0}else{const n=Pfe(t),i=(mU(r)?n.getPropertyValue(r):n[r])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:r}){return uq(t,r)}build(t,r,n){EE(t,r,n.transformTemplate)}scrapeMotionValuesFromProps(t,r,n){return NE(t,r,n)}}class Ofe extends jq{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Pr}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(Mc.has(r)){const n=zE(r);return n&&n.default||0}return r=sU.has(r)?r:bE(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,n){return cU(t,r,n)}
vendor: 30,354 bytes, line 774
774build(t,r,n){TE(t,r,this.isSVGTag,n.transformTemplate)}renderInstance(t,r,n,i){oU(t,r,n,i)}mount(t){this.isSVGTag=PE(t.tagName),super.mount(t)}}const Mfe=(e,t)=>jE(e)?new Ofe(t):new Cfe(t,{allowProjection:e!==A.Fragment}),Rfe=nce({...rde,...Nfe,...ffe,..._fe},Mfe),Sr=xle(Rfe);function Dfe(e,t=globalThis==null?void 0:globalThis.document){const r=on(e);A.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 Ife="DismissableLayer",zA="dismissableLayer.update",Lfe="dismissableLayer.pointerDownOutside",$fe="dismissableLayer.focusOutside",v5,Nq=A.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),wp=A.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:o,onDismiss:l,...c}=e,d=A.useContext(Nq),[u,h]=A.useState(null),m=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=A.useState({}),b=wt(t,T=>h(T)),v=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),x=v.indexOf(y),w=u?v.indexOf(u):-1,_=d.layersWithOutsidePointerEventsDisabled.size>0,j=w>=x,S=Ufe(T=>{const P=T.target,M=[...d.branches].some(C=>C.contains(P));!j||M||(i==null||i(T),o==null||o(T),T.defaultPrevented||l==null||l())},m),k=qfe(T=>{const P=T.target;[...d.branches].some(C=>C.contains(P))||(s==null||s(T),o==null||o(T),T.defaultPrevented||l==null||l())},m);return Dfe(T=>{w===d.layers.size-1&&(n==null||n(T),!T.defaultPrevented&&l&&(T.preventDefault(),l()))},m),A.useEffect(()=>{if(u)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(v5=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(u)),d.layers.add(u),x5(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=v5)}},[u,m,r,d]),A.useEffect(()=>()=>{u&&(d.layers.delete(u),d.layersWithOutsidePointerEventsDisabled.delete(u),x5())},[u,d]),A.useEffect(()=>{const T=()=>g({});return document.addEventListener(zA,T),()=>document.removeEventListener(zA,T)},[]),a.jsx(st.div,{...c,ref:b,style:{pointerEvents:_?j?"auto":"none":void 0,...e.style},onFocusCapture:Ge(e.onFocusCapture,k.onFocusCapture),onBlurCapture:Ge(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:Ge(e.onPointerDownCapture,S.onPointerDownCapture)})});wp.displayName=Ife;var Ffe="DismissableLayerBranch",Bfe=A.forwardRef((e,t)=>{const r=A.useContext(Nq),n=A.useRef(null),i=wt(t,n);return A.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),a.jsx(st.div,{...e,ref:i})});Bfe.displayName=Ffe;function Ufe(e,t=globalThis==null?void 0:globalThis.document){const r=on(e),n=A.useRef(!1),i=A.useRef(()=>{});return A.useEffect(()=>{const s=l=>{if(l.target&&!n.current){let c=function(){_q(Lfe,r,d,{discrete:!0})};const d={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=c,t.addEventListener("click",i.current,{once:!0})):c()}else t.removeEventListener("click",i.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",s),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function qfe(e,t=globalThis==null?void 0:globalThis.document){const r=on(e),n=A.useRef(!1);return A.useEffect(()=>{const i=s=>{s.target&&!n.current&&_q($fe,r,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function x5(){const e=new CustomEvent(zA);document.dispatchEvent(e)}function _q(e,t,r,{discrete:n}){const i=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?E7(i,s):i.dispatchEvent(s)}const zfe=["top","right","bottom","left"],tl=Math.min,xa=Math.max,h0=Math.round,oy=Math.floor,Ki=e=>({x:e,y:e}),Vfe={left:"right",right:"left",bottom:"top",top:"bottom"},Hfe={start:"end",end:"start"};function VA(e,t,r){return xa(e,tl(t,r))}function zs(e,t){return typeof e=="function"?e(t):e}function Vs(e){return e.split("-")[0]}function Qd(e){return e.split("-")[1]}function GE(e){return e==="x"?"y":"x"}function KE(e){return e==="y"?"height":"width"}const Wfe=new Set(["top","bottom"]);function qi(e){return Wfe.has(Vs(e))?"y":"x"}function YE(e){return GE(qi(e))}function Gfe(e,t,r){r===void 0&&(r=!1);const n=Qd(e),i=YE(e),s=KE(i);let o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=m0(o)),[o,m0(o)]}function Kfe(e){const t=m0(e);return[HA(e),t,HA(t)]}function HA(e){return e.replace(/start|end/g,t=>Hfe[t])}const b5=["left","right"],w5=["right","left"],Yfe=["top","bottom"],Xfe=["bottom","top"];function Qfe(e,t,r){switch(e){case"top":case"bottom":return r?t?w5:b5:t?b5:w5;case"left":case"right":return t?Yfe:Xfe;default:return[]}}function Zfe(e,t,r,n){const i=Qd(e);let s=Qfe(Vs(e),r==="start",n);return i&&(s=s.map(o=>o+"-"+i),t&&(s=s.concat(s.map(HA)))),s}function m0(e){return e.replace(/left|right|bottom|top/g,t=>Vfe[t])}function Jfe(e){return{top:0,right:0,bottom:0,left:0,...e}}function Sq(e){return typeof e!="number"?Jfe(e):{top:e,right:e,bottom:e,left:e}}function p0(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 j5(e,t,r){let{reference:n,floating:i}=e;const s=qi(t),o=YE(t),l=KE(o),c=Vs(t),d=s==="y",u=n.x+n.width/2-i.width/2,h=n.y+n.height/2-i.height/2,m=n[l]/2-i[l]/2;let g;switch(c){case"top":g={x:u,y:n.y-i.height};break;case"bottom":g={x:u,y:n.y+n.height};break;case"right":g={x:n.x+n.width,y:h};break;case"left":g={x:n.x-i.width,y:h};break;default:g={x:n.x,y:n.y}}switch(Qd(t)){case"start":g[o]-=m*(r&&d?-1:1);break;case"end":g[o]+=m*(r&&d?-1:1);break}return g}const ehe=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:o}=r,l=s.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let d=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=j5(d,n,c),m=n,g={},b=0;for(let v=0;v<l.length;v++){const{name:y,fn:x}=l[v],{x:w,y:_,data:j,reset:S}=await x({x:u,y:h,initialPlacement:n,placement:m,strategy:i,middlewareData:g,rects:d,platform:o,elements:{reference:e,floating:t}});u=w??u,h=_??h,g={...g,[y]:{...g[y],...j}},S&&b<=50&&(b++,typeof S=="object"&&(S.placement&&(m=S.placement),S.rects&&(d=S.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):S.rects),{x:u,y:h}=j5(d,m,c)),v=-1)}return{x:u,y:h,placement:m,strategy:i,middlewareData:g}};async function om(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:s,rects:o,elements:l,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:m=!1,padding:g=0}=zs(t,e),b=Sq(g),y=l[m?h==="floating"?"reference":"floating":h],x=p0(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(y)))==null||r?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:d,rootBoundary:u,strategy:c})),w=h==="floating"?{x:n,y:i,width:o.floating.width,height:o.floating.height}:o.reference,_=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),j=await(s.isElement==null?void 0:s.isElement(_))?await(s.getScale==null?void 0:s.getScale(_))||{x:1,y:1}:{x:1,y:1},S=p0(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:_,strategy:c}):w);return{top:(x.top-S.top+b.top)/j.y,bottom:(S.bottom-x.bottom+b.bottom)/j.y,left:(x.left-S.left+b.left)/j.x,right:(S.right-x.right+b.right)/j.x}}const the=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:i,rects:s,platform:o,elements:l,middlewareData:c}=t,{element:d,padding:u=0}=zs(e,t)||{};if(d==null)return{};const h=Sq(u),m={x:r,y:n},g=YE(i),b=KE(g),v=await o.getDimensions(d),y=g==="y",x=y?"top":"left",w=y?"bottom":"right",_=y?"clientHeight":"clientWidth",j=s.reference[b]+s.reference[g]-m[g]-s.floating[b],S=m[g]-s.reference[g],k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(d));let T=k?k[_]:0;(!T||!await(o.isElement==null?void 0:o.isElement(k)))&&(T=l.floating[_]||s.floating[b]);const P=j/2-S/2,M=T/2-v[b]/2-1,C=tl(h[x],M),O=tl(h[w],M),D=C,L=T-v[b]-O,F=T/2-v[b]/2+P,U=VA(D,F,L),G=!c.arrow&&Qd(i)!=null&&F!==U&&s.reference[b]/2-(F<D?C:O)-v[b]/2<0,W=G?F<D?F-D:F-L:0;return{[g]:m[g]+W,data:{[g]:U,centerOffset:F-U-W,...G&&{alignmentOffset:W}},reset:G}}}),rhe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:i,middlewareData:s,rects:o,initialPlacement:l,platform:c,elements:d}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:v=!0,...y}=zs(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const x=Vs(i),w=qi(l),_=Vs(l)===l,j=await(c.isRTL==null?void 0:c.isRTL(d.floating)),S=m||(_||!v?[m0(l)]:Kfe(l)),k=b!=="none";!m&&k&&S.push(...Zfe(l,v,b,j));const T=[l,...S],P=await om(t,y),M=[];let C=((n=s.flip)==null?void 0:n.overflows)||[];if(u&&M.push(P[x]),h){const F=Gfe(i,o,j);M.push(P[F[0]],P[F[1]])}if(C=[...C,{placement:i,overflows:M}],!M.every(F=>F<=0)){var O,D;const F=(((O=s.flip)==null?void 0:O.index)||0)+1,U=T[F];if(U&&(!(h==="alignment"?w!==qi(U):!1)||C.every(q=>qi(q.placement)===w?q.overflows[0]>0:!0)))return{data:{index:F,overflows:C},reset:{placement:U}};let G=(D=C.filter(W=>W.overflows[0]<=0).sort((W,q)=>W.overflows[1]-q.overflows[1])[0])==null?void 0:D.placement;if(!G)switch(g){case"bestFit":{var L;const W=(L=C.filter(q=>{if(k){const V=qi(q.placement);return V===w||V==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(V=>V>0).reduce((V,z)=>V+z,0)]).sort((q,V)=>q[1]-V[1])[0])==null?void 0:L[0];W&&(G=W);break}case"initialPlacement":G=l;break}if(i!==G)return{reset:{placement:G}}}return{}}}};function N5(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function _5(e){return zfe.some(t=>e[t]>=0)}const nhe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...i}=zs(e,t);switch(n){case"referenceHidden":{const s=await om(t,{...i,elementContext:"reference"}),o=N5(s,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:_5(o)}}}case"escaped":{const s=await om(t,{...i,altBoundary:!0}),o=N5(s,r.floating);return{data:{escapedOffsets:o,escaped:_5(o)}}}default:return{}}}}},Aq=new Set(["left","top"]);async function ahe(e,t){const{placement:r,platform:n,elements:i}=e,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),o=Vs(r),l=Qd(r),c=qi(r)==="y",d=Aq.has(o)?-1:1,u=s&&c?-1:1,h=zs(t,e);let{mainAxis:m,crossAxis:g,alignmentAxis:b}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&typeof b=="number"&&(g=l==="end"?b*-1:b),c?{x:g*u,y:m*d}:{x:m*d,y:g*u}}const ihe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:s,placement:o,middlewareData:l}=t,c=await ahe(t,e);return o===((r=l.offset)==null?void 0:r.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:i+c.x,y:s+c.y,data:{...c,placement:o}}}}},she=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i}=t,{mainAxis:s=!0,crossAxis:o=!1,limiter:l={fn:y=>{let{x,y:w}=y;return{x,y:w}}},...c}=zs(e,t),d={x:r,y:n},u=await om(t,c),h=qi(Vs(i)),m=GE(h);let g=d[m],b=d[h];if(s){const y=m==="y"?"top":"left",x=m==="y"?"bottom":"right",w=g+u[y],_=g-u[x];g=VA(w,g,_)}if(o){const y=h==="y"?"top":"left",x=h==="y"?"bottom":"right",w=b+u[y],_=b-u[x];b=VA(w,b,_)}const v=l.fn({...t,[m]:g,[h]:b});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[m]:s,[h]:o}}}}}},ohe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:i,rects:s,middlewareData:o}=t,{offset:l=0,mainAxis:c=!0,crossAxis:d=!0}=zs(e,t),u={x:r,y:n},h=qi(i),m=GE(h);let g=u[m],b=u[h];const v=zs(l,t),y=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const _=m==="y"?"height":"width",j=s.reference[m]-s.floating[_]+y.mainAxis,S=s.reference[m]+s.reference[_]-y.mainAxis;g<j?g=j:g>S&&(g=S)}if(d){var x,w;const _=m==="y"?"width":"height",j=Aq.has(Vs(i)),S=s.reference[h]-s.floating[_]+(j&&((x=o.offset)==null?void 0:x[h])||0)+(j?0:y.crossAxis),k=s.reference[h]+s.reference[_]+(j?0:((w=o.offset)==null?void 0:w[h])||0)-(j?y.crossAxis:0);b<S?b=S:b>k&&(b=k)}return{[m]:g,[h]:b}}}},lhe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:s,platform:o,elements:l}=t,{apply:c=()=>{},...d}=zs(e,t),u=await om(t,d),h=Vs(i),m=Qd(i),g=qi(i)==="y",{width:b,height:v}=s.floating;let y,x;h==="top"||h==="bottom"?(y=h,x=m===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(x=h,y=m==="end"?"top":"bottom");const w=v-u.top-u.bottom,_=b-u.left-u.right,j=tl(v-u[y],w),S=tl(b-u[x],_),k=!t.middlewareData.shift;let T=j,P=S;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(P=_),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(T=w),k&&!m){const C=xa(u.left,0),O=xa(u.right,0),D=xa(u.top,0),L=xa(u.bottom,0);g?P=b-2*(C!==0||O!==0?C+O:xa(u.left,u.right)):T=v-2*(D!==0||L!==0?D+L:xa(u.top,u.bottom))}await c({...t,availableWidth:P,availableHeight:T});const M=await o.getDimensions(l.floating);return b!==M.width||v!==M.height?{reset:{rects:!0}}:{}}}};function Wv(){return typeof window<"u"}function Zd(e){return kq(e)?(e.nodeName||"").toLowerCase():"#document"}function _a(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ls(e){var t;return(t=(kq(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function kq(e){return Wv()?e instanceof Node||e instanceof _a(e).Node:!1}function Si(e){return Wv()?e instanceof Element||e instanceof _a(e).Element:!1}function ts(e){return Wv()?e instanceof HTMLElement||e instanceof _a(e).HTMLElement:!1}function S5(e){return!Wv()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof _a(e).ShadowRoot}const che=new Set(["inline","contents"]);function jp(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=Ai(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!che.has(i)}const uhe=new Set(["table","td","th"]);function dhe(e){return uhe.has(Zd(e))}const fhe=[":popover-open",":modal"];function Gv(e){return fhe.some(t=>{try{return e.matches(t)}catch{return!1}})}const hhe=["transform","translate","scale","rotate","perspective"],mhe=["transform","translate","scale","rotate","perspective","filter"],phe=["paint","layout","strict","content"];function XE(e){const t=QE(),r=Si(e)?Ai(e):e;return hhe.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)||mhe.some(n=>(r.willChange||"").includes(n))||phe.some(n=>(r.contain||"").includes(n))}function ghe(e){let t=rl(e);for(;ts(t)&&!nd(t);){if(XE(t))return t;if(Gv(t))return null;t=rl(t)}return null}function QE(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const yhe=new Set(["html","body","#document"]);function nd(e){return yhe.has(Zd(e))}function Ai(e){return _a(e).getComputedStyle(e)}function Kv(e){return Si(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function rl(e){if(Zd(e)==="html")return e;const t=e.assignedSlot||e.parentNode||S5(e)&&e.host||ls(e);return S5(t)?t.host:t}function Eq(e){const t=rl(e);return nd(t)?e.ownerDocument?e.ownerDocument.body:e.body:ts(t)&&jp(t)?t:Eq(t)}function lm(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=Eq(e),s=i===((n=e.ownerDocument)==null?void 0:n.body),o=_a(i);if(s){const l=WA(o);return t.concat(o,o.visualViewport||[],jp(i)?i:[],l&&r?lm(l):[])}return t.concat(i,lm(i,[],r))}function WA(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Tq(e){const t=Ai(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=ts(e),s=i?e.offsetWidth:r,o=i?e.offsetHeight:n,l=h0(r)!==s||h0(n)!==o;return l&&(r=s,n=o),{width:r,height:n,$:l}}function ZE(e){return Si(e)?e:e.contextElement}function Ru(e){const t=ZE(e);if(!ts(t))return Ki(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:s}=Tq(t);let o=(s?h0(r.width):r.width)/n,l=(s?h0(r.height):r.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const vhe=Ki(0);function Pq(e){const t=_a(e);return!QE()||!t.visualViewport?vhe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function xhe(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==_a(e)?!1:t}function xc(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),s=ZE(e);let o=Ki(1);t&&(n?Si(n)&&(o=Ru(n)):o=Ru(e));const l=xhe(s,r,n)?Pq(s):Ki(0);let c=(i.left+l.x)/o.x,d=(i.top+l.y)/o.y,u=i.width/o.x,h=i.height/o.y;if(s){const m=_a(s),g=n&&Si(n)?_a(n):n;let b=m,v=WA(b);for(;v&&n&&g!==b;){const y=Ru(v),x=v.getBoundingClientRect(),w=Ai(v),_=x.left+(v.clientLeft+parseFloat(w.paddingLeft))*y.x,j=x.top+(v.clientTop+parseFloat(w.paddingTop))*y.y;c*=y.x,d*=y.y,u*=y.x,h*=y.y,c+=_,d+=j,b=_a(v),v=WA(b)}}return p0({width:u,height:h,x:c,y:d})}function Yv(e,t){const r=Kv(e).scrollLeft;return t?t.left+r:xc(ls(e)).left+r}function Cq(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Yv(e,r),i=r.top+t.scrollTop;return{x:n,y:i}}function bhe(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const s=i==="fixed",o=ls(n),l=t?Gv(t.floating):!1;if(n===o||l&&s)return r;let c={scrollLeft:0,scrollTop:0},d=Ki(1);const u=Ki(0),h=ts(n);if((h||!h&&!s)&&((Zd(n)!=="body"||jp(o))&&(c=Kv(n)),ts(n))){const g=xc(n);d=Ru(n),u.x=g.x+n.clientLeft,u.y=g.y+n.clientTop}const m=o&&!h&&!s?Cq(o,c):Ki(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-c.scrollLeft*d.x+u.x+m.x,y:r.y*d.y-c.scrollTop*d.y+u.y+m.y}}function whe(e){return Array.from(e.getClientRects())}function jhe(e){const t=ls(e),r=Kv(e),n=e.ownerDocument.body,i=xa(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=xa(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+Yv(e);const l=-r.scrollTop;return Ai(n).direction==="rtl"&&(o+=xa(t.clientWidth,n.clientWidth)-i),{width:i,height:s,x:o,y:l}}const A5=25;function Nhe(e,t){const r=_a(e),n=ls(e),i=r.visualViewport;let s=n.clientWidth,o=n.clientHeight,l=0,c=0;if(i){s=i.width,o=i.height;const u=QE();(!u||u&&t==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}const d=Yv(n);if(d<=0){const u=n.ownerDocument,h=u.body,m=getComputedStyle(h),g=u.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,b=Math.abs(n.clientWidth-h.clientWidth-g);b<=A5&&(s-=b)}else d<=A5&&(s+=d);return{width:s,height:o,x:l,y:c}}const _he=new Set(["absolute","fixed"]);function She(e,t){const r=xc(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,s=ts(e)?Ru(e):Ki(1),o=e.clientWidth*s.x,l=e.clientHeight*s.y,c=i*s.x,d=n*s.y;return{width:o,height:l,x:c,y:d}}function k5(e,t,r){let n;if(t==="viewport")n=Nhe(e,r);else if(t==="document")n=jhe(ls(e));else if(Si(t))n=She(t,r);else{const i=Pq(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return p0(n)}function Oq(e,t){const r=rl(e);return r===t||!Si(r)||nd(r)?!1:Ai(r).position==="fixed"||Oq(r,t)}function Ahe(e,t){const r=t.get(e);if(r)return r;let n=lm(e,[],!1).filter(l=>Si(l)&&Zd(l)!=="body"),i=null;const s=Ai(e).position==="fixed";let o=s?rl(e):e;for(;Si(o)&&!nd(o);){const l=Ai(o),c=XE(o);!c&&l.position==="fixed"&&(i=null),(s?!c&&!i:!c&&l.position==="static"&&!!i&&_he.has(i.position)||jp(o)&&!c&&Oq(e,o))?n=n.filter(u=>u!==o):i=l,o=rl(o)}return t.set(e,n),n}function khe(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const o=[...r==="clippingAncestors"?Gv(t)?[]:Ahe(t,this._c):[].concat(r),n],l=o[0],c=o.reduce((d,u)=>{const h=k5(t,u,i);return d.top=xa(h.top,d.top),d.right=tl(h.right,d.right),d.bottom=tl(h.bottom,d.bottom),d.left=xa(h.left,d.left),d},k5(t,l,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Ehe(e){const{width:t,height:r}=Tq(e);return{width:t,height:r}}function The(e,t,r){const n=ts(t),i=ls(t),s=r==="fixed",o=xc(e,!0,s,t);let l={scrollLeft:0,scrollTop:0};const c=Ki(0);function d(){c.x=Yv(i)}if(n||!n&&!s)if((Zd(t)!=="body"||jp(i))&&(l=Kv(t)),n){const g=xc(t,!0,s,t);c.x=g.x+t.clientLeft,c.y=g.y+t.clientTop}else i&&d();s&&!n&&i&&d();const u=i&&!n&&!s?Cq(i,l):Ki(0),h=o.left+l.scrollLeft-c.x-u.x,m=o.top+l.scrollTop-c.y-u.y;return{x:h,y:m,width:o.width,height:o.height}}function j1(e){return Ai(e).position==="static"}function E5(e,t){if(!ts(e)||Ai(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return ls(e)===r&&(r=r.ownerDocument.body),r}function Mq(e,t){const r=_a(e);if(Gv(e))return r;if(!ts(e)){let i=rl(e);for(;i&&!nd(i);){if(Si(i)&&!j1(i))return i;i=rl(i)}return r}let n=E5(e,t);for(;n&&dhe(n)&&j1(n);)n=E5(n,t);return n&&nd(n)&&j1(n)&&!XE(n)?r:n||ghe(e)||r}const Phe=async function(e){const t=this.getOffsetParent||Mq,r=this.getDimensions,n=await r(e.floating);return{reference:The(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Che(e){return Ai(e).direction==="rtl"}const Ohe={convertOffsetParentRelativeRectToViewportRelativeRect:bhe,getDocumentElement:ls,getClippingRect:khe,getOffsetParent:Mq,getElementRects:Phe,getClientRects:whe,getDimensions:Ehe,getScale:Ru,isElement:Si,isRTL:Che};function Rq(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Mhe(e,t){let r=null,n;const i=ls(e);function s(){var l;clearTimeout(n),(l=r)==null||l.disconnect(),r=null}function o(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),s();const d=e.getBoundingClientRect(),{left:u,top:h,width:m,height:g}=d;if(l||t(),!m||!g)return;const b=oy(h),v=oy(i.clientWidth-(u+m)),y=oy(i.clientHeight-(h+g)),x=oy(u),_={rootMargin:-b+"px "+-v+"px "+-y+"px "+-x+"px",threshold:xa(0,tl(1,c))||1};let j=!0;function S(k){const T=k[0].intersectionRatio;if(T!==c){if(!j)return o();T?o(!1,T):n=setTimeout(()=>{o(!1,1e-7)},1e3)}T===1&&!Rq(d,e.getBoundingClientRect())&&o(),j=!1}try{r=new IntersectionObserver(S,{..._,root:i.ownerDocument})}catch{r=new IntersectionObserver(S,_)}r.observe(e)}return o(!0),s}function Rhe(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,d=ZE(e),u=i||s?[...d?lm(d):[],...lm(t)]:[];u.forEach(x=>{i&&x.addEventListener("scroll",r,{passive:!0}),s&&x.addEventListener("resize",r)});const h=d&&l?Mhe(d,r):null;let m=-1,g=null;o&&(g=new ResizeObserver(x=>{let[w]=x;w&&w.target===d&&g&&(g.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var _;(_=g)==null||_.observe(t)})),r()}),d&&!c&&g.observe(d),g.observe(t));let b,v=c?xc(e):null;c&&y();function y(){const x=xc(e);v&&!Rq(v,x)&&r(),v=x,b=requestAnimationFrame(y)}return r(),()=>{var x;u.forEach(w=>{i&&w.removeEventListener("scroll",r),s&&w.removeEventListener("resize",r)}),h==null||h(),(x=g)==null||x.disconnect(),g=null,c&&cancelAnimationFrame(b)}}const Dhe=ihe,Ihe=she,Lhe=rhe,$he=lhe,Fhe=nhe,T5=the,Bhe=ohe,Uhe=(e,t,r)=>{const n=new Map,i={platform:Ohe,...r},s={...i.platform,_c:n};return ehe(e,t,{...i,platform:s})};var qhe=typeof document<"u",zhe=function(){},By=qhe?A.useLayoutEffect:zhe;function g0(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(!g0(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 s=i[n];if(!(s==="_owner"&&e.$$typeof)&&!g0(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Dq(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function P5(e,t){const r=Dq(e);return Math.round(t*r)/r}function N1(e){const t=A.useRef(e);return By(()=>{t.current=e}),t}function Vhe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:s,floating:o}={},transform:l=!0,whileElementsMounted:c,open:d}=e,[u,h]=A.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,g]=A.useState(n);g0(m,n)||g(n);const[b,v]=A.useState(null),[y,x]=A.useState(null),w=A.useCallback(q=>{q!==k.current&&(k.current=q,v(q))},[]),_=A.useCallback(q=>{q!==T.current&&(T.current=q,x(q))},[]),j=s||b,S=o||y,k=A.useRef(null),T=A.useRef(null),P=A.useRef(u),M=c!=null,C=N1(c),O=N1(i),D=N1(d),L=A.useCallback(()=>{if(!k.current||!T.current)return;const q={placement:t,strategy:r,middleware:m};O.current&&(q.platform=O.current),Uhe(k.current,T.current,q).then(V=>{const z={...V,isPositioned:D.current!==!1};F.current&&!g0(P.current,z)&&(P.current=z,lp.flushSync(()=>{h(z)}))})},[m,t,r,O,D]);By(()=>{d===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,h(q=>({...q,isPositioned:!1})))},[d]);const F=A.useRef(!1);By(()=>(F.current=!0,()=>{F.current=!1}),[]),By(()=>{if(j&&(k.current=j),S&&(T.current=S),j&&S){if(C.current)return C.current(j,S,L);L()}},[j,S,L,C,M]);const U=A.useMemo(()=>({reference:k,floating:T,setReference:w,setFloating:_}),[w,_]),G=A.useMemo(()=>({reference:j,floating:S}),[j,S]),W=A.useMemo(()=>{const q={position:r,left:0,top:0};if(!G.floating)return q;const V=P5(G.floating,u.x),z=P5(G.floating,u.y);return l?{...q,transform:"translate("+V+"px, "+z+"px)",...Dq(G.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:V,top:z}},[r,l,G.floating,u.x,u.y]);return A.useMemo(()=>({...u,update:L,refs:U,elements:G,floatingStyles:W}),[u,L,U,G,W])}const Hhe=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?T5({element:n.current,padding:i}).fn(r):{}:n?T5({element:n,padding:i}).fn(r):{}}}},Whe=(e,t)=>({...Dhe(e),options:[e,t]}),Ghe=(e,t)=>({...Ihe(e),options:[e,t]}),Khe=(e,t)=>({...Bhe(e),options:[e,t]}),Yhe=(e,t)=>({...Lhe(e),options:[e,t]}),Xhe=(e,t)=>({...$he(e),options:[e,t]}),Qhe=(e,t)=>({...Fhe(e),options:[e,t]}),Zhe=(e,t)=>({...Hhe(e),options:[e,t]});var Jhe="Arrow",Iq=A.forwardRef((e,t)=>{const{children:r,width:n=10,height:i=5,...s}=e;return a.jsx(st.svg,{...s,ref:t,width:n,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:a.jsx("polygon",{points:"0,0 30,0 15,10"})})});Iq.displayName=Jhe;var eme=Iq;function JE(e){const[t,r]=A.useState(void 0);return Mr(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let o,l;if("borderBoxSize"in s){const c=s.borderBoxSize,d=Array.isArray(c)?c[0]:c;o=d.inlineSize,l=d.blockSize}else o=e.offsetWidth,l=e.offsetHeight;r({width:o,height:l})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var eT="Popper",[Lq,Jd]=xn(eT),[tme,$q]=Lq(eT),Fq=e=>{const{__scopePopper:t,children:r}=e,[n,i]=A.useState(null);return a.jsx(tme,{scope:t,anchor:n,onAnchorChange:i,children:r})};Fq.displayName=eT;var Bq="PopperAnchor",Uq=A.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...i}=e,s=$q(Bq,r),o=A.useRef(null),l=wt(t,o),c=A.useRef(null);return A.useEffect(()=>{const d=c.current;c.current=(n==null?void 0:n.current)||o.current,d!==c.current&&s.onAnchorChange(c.current)}),n?null:a.jsx(st.div,{...i,ref:l})});Uq.displayName=Bq;var tT="PopperContent",[rme,nme]=Lq(tT),qq=A.forwardRef((e,t)=>{var X,ne,Q,ie,me,oe;const{__scopePopper:r,side:n="bottom",sideOffset:i=0,align:s="center",alignOffset:o=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:u=0,sticky:h="partial",hideWhenDetached:m=!1,updatePositionStrategy:g="optimized",onPlaced:b,...v}=e,y=$q(tT,r),[x,w]=A.useState(null),_=wt(t,Ne=>w(Ne)),[j,S]=A.useState(null),k=JE(j),T=(k==null?void 0:k.width)??0,P=(k==null?void 0:k.height)??0,M=n+(s!=="center"?"-"+s:""),C=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},O=Array.isArray(d)?d:[d],D=O.length>0,L={padding:C,boundary:O.filter(ime),altBoundary:D},{refs:F,floatingStyles:U,placement:G,isPositioned:W,middlewareData:q}=Vhe({strategy:"fixed",placement:M,whileElementsMounted:(...Ne)=>Rhe(...Ne,{animationFrame:g==="always"}),elements:{reference:y.anchor},middleware:[Whe({mainAxis:i+P,alignmentAxis:o}),c&&Ghe({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?Khe():void 0,...L}),c&&Yhe({...L}),Xhe({...L,apply:({elements:Ne,rects:_e,availableWidth:xe,availableHeight:Ee})=>{const{width:Pe,height:Z}=_e.reference,ae=Ne.floating.style;ae.setProperty("--radix-popper-available-width",`${xe}px`),ae.setProperty("--radix-popper-available-height",`${Ee}px`),ae.setProperty("--radix-popper-anchor-width",`${Pe}px`),ae.setProperty("--radix-popper-anchor-height",`${Z}px`)}}),j&&Zhe({element:j,padding:l}),sme({arrowWidth:T,arrowHeight:P}),m&&Qhe({strategy:"referenceHidden",...L})]}),[V,z]=Hq(G),I=on(b);Mr(()=>{W&&(I==null||I())},[W,I]);const B=(X=q.arrow)==null?void 0:X.x,H=(ne=q.arrow)==null?void 0:ne.y,J=((Q=q.arrow)==null?void 0:Q.centerOffset)!==0,[ee,Y]=A.useState();return Mr(()=>{x&&Y(window.getComputedStyle(x).zIndex)},[x]),a.jsx("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:W?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ee,"--radix-popper-transform-origin":[(ie=q.transformOrigin)==null?void 0:ie.x,(me=q.transformOrigin)==null?void 0:me.y].join(" "),...((oe=q.hide)==null?void 0:oe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:a.jsx(rme,{scope:r,placedSide:V,onArrowChange:S,arrowX:B,arrowY:H,shouldHideArrow:J,children:a.jsx(st.div,{"data-side":V,"data-align":z,...v,ref:_,style:{...v.style,animation:W?void 0:"none"}})})})});qq.displayName=tT;var zq="PopperArrow",ame={top:"bottom",right:"left",bottom:"top",left:"r
774ight"},Vq=A.forwardRef(function(t,r){const{__scopePopper:n,...i}=t,s=nme(zq,n),o=ame[s.placedSide];return a.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:a.jsx(eme,{...i,ref:r,style:{...i.style,display:"block"}})})});Vq.displayName=zq;function ime(e){return e!==null}var sme=e=>({name:"transformOrigin",options:e,fn(t){var y,x,w;const{placement:r,rects:n,middlewareData:i}=t,o=((y=i.arrow)==null?void 0:y.centerOffset)!==0,l=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[d,u]=Hq(r),h={start:"0%",center:"50%",end:"100%"}[u],m=(((x=i.arrow)==null?void 0:x.x)??0)+l/2,g=(((w=i.arrow)==null?void 0:w.y)??0)+c/2;let b="",v="";return d==="bottom"?(b=o?h:`${m}px`,v=`${-c}px`):d==="top"?(b=o?h:`${m}px`,v=`${n.floating.height+c}px`):d==="right"?(b=`${-c}px`,v=o?h:`${g}px`):d==="left"&&(b=`${n.floating.width+c}px`,v=o?h:`${g}px`),{data:{x:b,y:v}}}});function Hq(e){const[t,r="center"]=e.split("-");return[t,r]}var rT=Fq,nT=Uq,aT=qq,iT=Vq,ome="Portal",Np=A.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[i,s]=A.useState(!1);Mr(()=>s(!0),[]);const o=r||i&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?ore.createPortal(a.jsx(st.div,{...n,ref:t}),o):null});Np.displayName=ome;var Wq=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"}),lme="VisuallyHidden",Gq=A.forwardRef((e,t)=>a.jsx(st.span,{...e,ref:t,style:{...Wq,...e.style}}));Gq.displayName=lme;var cme=Gq,[Xv]=xn("Tooltip",[Jd]),Qv=Jd(),Kq="TooltipProvider",ume=700,GA="tooltip.open",[dme,sT]=Xv(Kq),Yq=e=>{const{__scopeTooltip:t,delayDuration:r=ume,skipDelayDuration:n=300,disableHoverableContent:i=!1,children:s}=e,o=A.useRef(!0),l=A.useRef(!1),c=A.useRef(0);return A.useEffect(()=>{const d=c.current;return()=>window.clearTimeout(d)},[]),a.jsx(dme,{scope:t,isOpenDelayedRef:o,delayDuration:r,onOpen:A.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:A.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:A.useCallback(d=>{l.current=d},[]),disableHoverableContent:i,children:s})};Yq.displayName=Kq;var cm="Tooltip",[fme,_p]=Xv(cm),Xq=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:i,onOpenChange:s,disableHoverableContent:o,delayDuration:l}=e,c=sT(cm,e.__scopeTooltip),d=Qv(t),[u,h]=A.useState(null),m=ja(),g=A.useRef(0),b=o??c.disableHoverableContent,v=l??c.delayDuration,y=A.useRef(!1),[x,w]=Ka({prop:n,defaultProp:i??!1,onChange:T=>{T?(c.onOpen(),document.dispatchEvent(new CustomEvent(GA))):c.onClose(),s==null||s(T)},caller:cm}),_=A.useMemo(()=>x?y.current?"delayed-open":"instant-open":"closed",[x]),j=A.useCallback(()=>{window.clearTimeout(g.current),g.current=0,y.current=!1,w(!0)},[w]),S=A.useCallback(()=>{window.clearTimeout(g.current),g.current=0,w(!1)},[w]),k=A.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{y.current=!0,w(!0),g.current=0},v)},[v,w]);return A.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),a.jsx(rT,{...d,children:a.jsx(fme,{scope:t,contentId:m,open:x,stateAttribute:_,trigger:u,onTriggerChange:h,onTriggerEnter:A.useCallback(()=>{c.isOpenDelayedRef.current?k():j()},[c.isOpenDelayedRef,k,j]),onTriggerLeave:A.useCallback(()=>{b?S():(window.clearTimeout(g.current),g.current=0)},[S,b]),onOpen:j,onClose:S,disableHoverableContent:b,children:r})})};Xq.displayName=cm;var KA="TooltipTrigger",Qq=A.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,i=_p(KA,r),s=sT(KA,r),o=Qv(r),l=A.useRef(null),c=wt(t,l,i.onTriggerChange),d=A.useRef(!1),u=A.useRef(!1),h=A.useCallback(()=>d.current=!1,[]);return A.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),a.jsx(nT,{asChild:!0,...o,children:a.jsx(st.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...n,ref:c,onPointerMove:Ge(e.onPointerMove,m=>{m.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(i.onTriggerEnter(),u.current=!0)}),onPointerLeave:Ge(e.onPointerLeave,()=>{i.onTriggerLeave(),u.current=!1}),onPointerDown:Ge(e.onPointerDown,()=>{i.open&&i.onClose(),d.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:Ge(e.onFocus,()=>{d.current||i.onOpen()}),onBlur:Ge(e.onBlur,i.onClose),onClick:Ge(e.onClick,i.onClose)})})});Qq.displayName=KA;var oT="TooltipPortal",[hme,mme]=Xv(oT,{forceMount:void 0}),Zq=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:i}=e,s=_p(oT,t);return a.jsx(hme,{scope:t,forceMount:r,children:a.jsx(bn,{present:r||s.open,children:a.jsx(Np,{asChild:!0,container:i,children:n})})})};
vendor: 4,385 bytes, line 774
774Zq.displayName=oT;var ad="TooltipContent",Jq=A.forwardRef((e,t)=>{const r=mme(ad,e.__scopeTooltip),{forceMount:n=r.forceMount,side:i="top",...s}=e,o=_p(ad,e.__scopeTooltip);return a.jsx(bn,{present:n||o.open,children:o.disableHoverableContent?a.jsx(e9,{side:i,...s,ref:t}):a.jsx(pme,{side:i,...s,ref:t})})}),pme=A.forwardRef((e,t)=>{const r=_p(ad,e.__scopeTooltip),n=sT(ad,e.__scopeTooltip),i=A.useRef(null),s=wt(t,i),[o,l]=A.useState(null),{trigger:c,onClose:d}=r,u=i.current,{onPointerInTransitChange:h}=n,m=A.useCallback(()=>{l(null),h(!1)},[h]),g=A.useCallback((b,v)=>{const y=b.currentTarget,x={x:b.clientX,y:b.clientY},w=bme(x,y.getBoundingClientRect()),_=wme(x,w),j=jme(v.getBoundingClientRect()),S=_me([..._,...j]);l(S),h(!0)},[h]);return A.useEffect(()=>()=>m(),[m]),A.useEffect(()=>{if(c&&u){const b=y=>g(y,u),v=y=>g(y,c);return c.addEventListener("pointerleave",b),u.addEventListener("pointerleave",v),()=>{c.removeEventListener("pointerleave",b),u.removeEventListener("pointerleave",v)}}},[c,u,g,m]),A.useEffect(()=>{if(o){const b=v=>{const y=v.target,x={x:v.clientX,y:v.clientY},w=(c==null?void 0:c.contains(y))||(u==null?void 0:u.contains(y)),_=!Nme(x,o);w?m():_&&(m(),d())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,u,o,d,m]),a.jsx(e9,{...e,ref:s})}),[gme,yme]=Xv(cm,{isInside:!1}),vme=k7("TooltipContent"),e9=A.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":i,onEscapeKeyDown:s,onPointerDownOutside:o,...l}=e,c=_p(ad,r),d=Qv(r),{onClose:u}=c;return A.useEffect(()=>(document.addEventListener(GA,u),()=>document.removeEventListener(GA,u)),[u]),A.useEffect(()=>{if(c.trigger){const h=m=>{const g=m.target;g!=null&&g.contains(c.trigger)&&u()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,u]),a.jsx(wp,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:h=>h.preventDefault(),onDismiss:u,children:a.jsxs(aT,{"data-state":c.stateAttribute,...d,...l,ref:t,style:{...l.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:[a.jsx(vme,{children:n}),a.jsx(gme,{scope:r,isInside:!0,children:a.jsx(cme,{id:c.contentId,role:"tooltip",children:i||n})})]})})});Jq.displayName=ad;var t9="TooltipArrow",xme=A.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,i=Qv(r);return yme(t9,r).isInside?null:a.jsx(iT,{...i,...n,ref:t})});xme.displayName=t9;function bme(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(r,n,i,s)){case s:return"left";case i:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function wme(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 jme(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 Nme(e,t){const{x:r,y:n}=e;let i=!1;for(let s=0,o=t.length-1;s<t.length;o=s++){const l=t[s],c=t[o],d=l.x,u=l.y,h=c.x,m=c.y;u>n!=m>n&&r<(h-d)*(n-u)/(m-u)+d&&(i=!i)}return i}function _me(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),Sme(t)}function Sme(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 s=t[t.length-1],o=t[t.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.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 s=r[r.length-1],o=r[r.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.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 Ame=Yq,kme=Xq,Eme=Qq,Tme=Zq,r9=Jq;const lT=Ame,pa=kme,ga=Eme,na=A.forwardRef(({className:e,sideOffset:t=4,...r},n)=>
774a.jsx(Tme,{children:a.jsx(r9,{ref:n,sideOffset:t,className:Ie("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground 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})}));na.displayName=r9.displayName;const Rt={POINTS:{REGISTER:100,BROKER_SIGNUP:500,SHARE_EA:20,DOWNLOAD_EA:5,LIKE_EA:5,COMMENT:10,REPLY_TO_COMMENT:5,DAILY_LOGIN:10,LOGIN_STREAK_BONUS:5,COMPLETE_PROFILE:50,FORUM_POST:15,FORUM_REPLY:10,FORUM_THREAD:20,RECEIVE_LIKE:5,ADD_BROKER_ACCOUNT:200,CREATE_STRATEGY:30,RUN_BACKTEST:10,CREATE_ROBOT:40,DEPLOY_ROBOT:50},LEVEL_THRESHOLDS:[0,100,300,600,1e3,1500,2100,2800,3600,4500,5500,6600,7800,9100,10500],POPUP_THROTTLE:{MIN_INTERVAL:6e4,PRIORITIES:{ACHIEVEMENT:10,LEVEL_UP:9,BROKER_SIGNUP:8,DAILY_REWARDS:7,NEW_FEATURE:6,GENERAL:5},lastPopupTime:{},canShowPopup:function(e){const t=Date.now(),r=this.lastPopupTime[e]||0;return t-r<this.MIN_INTERVAL?!1:(this.lastPopupTime[e]=t,!0)}},calculateLevel:e=>{if(!e)return 1;let t=1;for(let r=0;r<Rt.LEVEL_THRESHOLDS.length&&e>=Rt.LEVEL_THRESHOLDS[r];r++)t=r+1;return t},getXpProgressPercentage:(e,t)=>
774{if(!e||!t)return 0;const r=t>1?Rt.LEVEL_THRESHOLDS[t-2]:0,n=Rt.LEVEL_THRESHOLDS[t-1],i=e-r,s=n-r;return Math.min(100,i/s*100)},getXpInCurrentLevel:(e,t)=>{if(!e||!t)return 0;const r=t>1?Rt.LEVEL_THRESHOLDS[t-2]:0;return e-r},getRankName:e=>e<=2?"Novice Trader":e<=4?"Beginner Trader":e<=6?"Intermediate Trader":e<=8?"Advanced Trader":e<=10?"Expert Trader":e<=12?"Master Trader":"Grandmaster Trader",calculateUserActivityScore:(e,t=[],r=[])=>{if(!e)return 0;let n=0;return n+=(e.xp_points||0)*.1,n+=((t==null?void 0:t.length)||0)*50,n+=((r==null?void 0:r.length)||0)*20,n+=(e.eas_liked||0)*5,n+=(e.likes_received||0)*10,n+=(e.forum_posts||0)*15,n+=(e.login_streak||0)*5,Math.min(1e3,Math.round(n))},getLevelBenefits:e=>[{level:1,benefit:"Basic trading features"},{level:2,benefit:"Access to community EAs"},{level:3,benefit:"Create and share EAs"},{level:4,benefit:"Advanced backtesting"},{level:5,benefit:"Priority support"},{level:6,benefit:"Custom EA templates"},{level:7,benefit:"Advanced indicators"},{level:8,benefit:"VIP community access"},{level:9,benefit:"Premium signals"},{level:10,benefit:"Unlimited API calls"}].filter(t=>t.level<=e+3),awardPoints:async(e,t,r={})=>{if(!e||!e.id)return console.error("GamificationSystem.awardPoints: Valid user object with ID is required."),null;try{let n={...e},i=Rt.POINTS[t]||0;if(t==="DAILY_LOGIN"){const g=n.last_login_date?new Date(n.last_login_date):null,b=new Date;let v=!1;if(g){const y=new Date(g.getFullYear(),g.getMonth(),g.getDate());v=(new Date(b.getFullYear(),b.getMonth(),b.getDate())-y)/(1e3*60*60*24)===1}if(v){const y=(n.login_streak||0)+1;i+=Rt.POINTS.LOGIN_STREAK_BONUS*y,n.login_streak=y}else n.login_streak=1;n.last_login_date=b.toISOString()}const s=(n.xp_points||0)+i,o=n.level||Rt.calculateLevelFromXp(n.xp_points||0),l=Rt.calculateLevelFromXp(s),c=l>o;switch(t){case"SHARE_EA":n.eas_shared=(n.eas_shared||0)+1;break;case"LIKE_EA":n.eas_liked=(n.eas_liked||0)+1;break;case"COMMENT":n.comments_posted=(n.comments_posted||0)+1;break;case"FORUM_POST":case"FORUM_REPLY":case"FORUM_THREAD":n.forum_posts=(n.forum_posts||0)+1;break;case"RECEIVE_LIKE":n.likes_received=(n.likes_received||0)+1;break;case"BROKER_SIGNUP":n.broker_registered_count=(n.broker_registered_count||0)+1;break}const d=await Rt.checkForAchievements(n),u=[...n.achievements||[]];d.forEach(g=>{u.find(b=>b.id===g.id)||u.push(g)});const h={xp_points:s,level:l,achievements:u,achievements_earned:(n.achievements_earned||0)+d.length,eas_shared:n.eas_shared,eas_liked:n.eas_liked,comments_posted:n.comments_posted,forum_posts:n.forum_posts,likes_received:n.likes_received,login_streak:n.login_streak,last_login_date:n.last_login_date,broker_registered_count:n.broker_registered_count};Object.keys(h).forEach(g=>h[g]===void 0&&delete h[g]),await je.User.updateMyUserData(h);let m=null;return c&&(m=await Rt.handleLevelUp(e.id,l,o)),{pointsAwarded:i,newLevel:l,leveledUp:c,newAchievements:d,levelUpResult:m}}catch(n){return console.error(`Error in gamification system (awardPoints for user ${e.id}, activity ${t}):`,n),null}},calculateLevelFromXp:e=>{let t=1;for(let r=0;r<Rt.LEVEL_THRESHOLDS.length&&e>=Rt.LEVEL_THRESHOLDS[r];r++)t=r+1;return t},getXpToNextLevel:e=>{if(e>=Rt.LEVEL_THRESHOLDS.length)return 1/0;const t=Rt.LEVEL_THRESHOLDS[e],r=e>0?Rt.LEVEL_THRESHOLDS[e-1]:0;return t-(r||0)},getXpForLevel:e=>e<=1?0:e>Rt.LEVEL_THRESHOLDS.length?Rt.LEVEL_THRESHOLDS[Rt.LEVEL_THRESHOLDS.length-1]:Rt.LEVEL_THRESHOLDS[e-1],checkForAchievements:async e=>{const t=[],r=e.achievements||[],n=[{id:"first_ea",title:"Bot Creator",description:"Share your first EA with the community",level:"bronze",points:50,check:()=>(e.eas_shared||0)>=1,icon:"Bot"},{id:"ea_master",title:"EA Master",description:"Share 5 EAs with the community",level:"silver",points:100,check:()=>(e.eas_shared||0)>=5,icon:"Star"},{id:"popular_creator",title:"Popular Creator",description:"Receive 50 likes on your EAs",level:"gold",points:200,check:()=>(e.likes_received||0)>=50,icon:"Trophy"},{id:"active_commenter",title:"Active Commenter",description:"Post 10 comments on EAs",level:"bronze",points:50,check:()=>(e.comments_posted||0)>=10,icon:"MessageSquare"},{id:"forum_contributor",title:"Forum Contributor",description:"Create 5 threads/posts in the forum",level:"silver",points:100,check:()=>(e.forum_posts||0)>=5,icon:"Users"},{id:"login_streak_week",title:"Dedication",description:"Log in for 7 consecutive days",level:"bronze",points:70,check:()=>(e.login_streak||0)>=7,icon:"Calendar"}
774,{id:"broker_account",title:"Pro Trader Setup",description:"Connect a broker account",level:"gold",points:150,check:()=>e.broker_accounts&&e.broker_accounts.length>0,icon:"LineChart"},{id:"trusted_broker",title:"Switch Markets Partner",description:"Sign up with our trusted broker, Switch Markets",level:"platinum",points:300,check:()=>e.broker_registrations&&e.broker_registrations.includes("switchmarkets"),icon:"Shield"}];for(const i of n)!r.find(s=>s.id===i.id)&&i.check()&&t.push({...i,date_earned:new Date().toISOString()});return t},trackBrokerRegistration:async(e,t)=>{if(!e||!e.id)return console.error("GamificationSystem.trackBrokerRegistration: Valid user object with ID is required."),null;try{let r={...e};const n=r.broker_registrations||[];if(!n.includes(t)){n.push(t);const i=await Rt.awardPoints(r,"BROKER_SIGNUP");if(await je.User.updateMyUserData({broker_registrations:n,broker_registered:!0}),Rt.POPUP_THROTTLE.canShowPopup("BROKER_SIGNUP"))return i}return null}catch(r){return console.error(`Error tracking broker registration for user ${e.id}, broker ${t}:`,r),null}},checkForNotification:async(e,t)=>["SHARE_EA","CREATE_ROBOT","FORUM_POST","FORUM_REPLY","RECEIVE_COMMENT"].includes(e)?{shouldNotify:!0,message:Rt.getNotificationMessage(e,t)}:{shouldNotify:!1},getNotificationMessage:(e,t)=>{switch(e){case"BROKER_SIGNUP":return"Congratulations! You've earned points for signing up with our trusted broker!";case"SHARE_EA":return"Nice! You've shared an EA with the community and earned points!";case"CREATE_ROBOT":return"Awesome! Creating robots earns you points. Keep it up!";case"FORUM_POST":return"Great, your forum post earned you points!";case"FORUM_REPLY":return"You have earned points for your forum reply!";case"RECEIVE_COMMENT":return"You have earned points for receiving comments.";default:return"You have earned points for this activity!"}},handleLevelUp:async(e,t,r)=>{if(t<=r)return null;if(Rt.POPUP_THROTTLE.canShowPopup("LEVEL_UP"))try{return console.log(`User ${e} leveled up from ${r} to ${t}`),{oldLevel:r,newLevel:t,unlockedFeatures:Rt.getUnlockedFeatures(t,r)}}catch(n){console.error("Error handling level up:",n)}return null},getUnlockedFeatures:(e,t)=>[{level:2,feature:"Access to basic trading strategies"},{level:3,feature:"Daily signal limit increased to 5"},{level:5,feature:"Access to advanced backtesting"},{level:7,feature:"Unlock premium EA templates"},{level:10,feature:"VIP status available"},{level:15,feature:"Unlimited API calls"}].filter(n=>n.level>t&&n.level<=e)};function Pme({points:e,level:t,achievements:r,rank:n}){const[i,s]=A.useState(!1),[o,l]=A.useState(!1),c=A.useRef(Date.now()-6e4),d=A.useRef(t),h=(()=>{const y=t||1;return Rt.getXpToNextLevel(y)})(),m=Math.min(100,(e||0)/h*100),g=r&&r.length>0?r[0]:null;A.useEffect(()=>{if(t>d.current){const y=Date.now();y-c.current>=6e4&&(l(!0),c.current=y,setTimeout(()=>{l(!1)},5e3))}d.current=t},[t]);const b=()=>a.jsxs("div",{className:"relative",children:[a.jsx("div",{className:"w-10 h-10 rounded-full bg-gradient-to-br from-indigo-600 to-purple-700 flex items-center justify-center shadow-lg shadow-purple-700/20",children:a.jsx("span",{className:"font-bold text-white",children:t||1})}),a.jsx("div",{className:"absolute -top-1 -right-1 bg-cyan-500 rounded-full w-4 h-4 flex items-center justify-center text-[10px] text-white font-bold",children:n||1})]}),v=h-(e||0);return a.jsxs(Sr.div,{className:"bg-gray-800 border border-gray-700 rounded-lg overflow-hidden shadow-lg relative",layout:!0,children:[o&&a.jsxs(Sr.div,{className:"absolute top-0 left-0 right-0 bg-gradient-to-r from-cyan-500 to-purple-500 py-2 text-center text-white font-bold z-10",initial:{y:-100},animate:{y:0},exit:{y:-100},children:[a.jsx(er,{className:"inline-block mr-2 h-4 w-4"}),"Level Up! You're now Level ",t,"!",a.jsx(er,{className:"inline-block ml-2 h-4 w-4"})]}),a.jsxs("div",{className:"p-3 flex items-center justify-between cursor-pointer",onClick:()=>s(!i),children:[a.jsxs("div",{className:"flex items-center gap-3",children:[b(),a.jsxs("div",{className:"flex-1",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("h3",{className:"font-medium text-white",children:["Trader Level ",t||1]}),a.jsx(er,{className:"h-4 w-4 text-yellow-400"})]}),a.jsx("div",{className:"w-full bg-gray-700 h-2 rounded-full mt-1 overflow-hidden",children:a.jsx(Sr.div,{className:"h-full bg-gradient-to-r from-cyan-500 to-purple-500",initial:{width:0},animate:{width:`${m}%`},transition:{duration:.8,ease:"easeOut"}})}),a.jsxs("div",{className:"flex justify-between text-xs text-gray-400 mt-0.5",children:[a.jsxs("span",{children:[e||0," points"]}),a.jsx("span",{children:v>0?`${v} to level ${(t||1)+1}`:"Max level reached"})]})]})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[g&&a.jsx(lT,{children:a.jsxs(pa,{children:[a.jsx(ga,{children:a.jsx("div",{className:Ie("h-6 w-6 rounded-full flex items-center justify-center",g.level==="bronze"?"bg-amber-800":g.level==="silver"?"bg-gray-500":g.level==="gold"?"bg-yellow-500":"bg-cyan-600"),children:a.jsx(Kr,{className:"h-3 w-3 text-white"})})}),a.jsxs(na,{children:[a.jsx("p",{className:"font-medium",children:g.title}),a.jsx("p",{className:"text-xs",children:g.description})]})]})}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(BB,{className:"h-5 w-5 text-yellow-400"}),a.jsx("span",{className:"font-medium text-white",children:(r==null?void 0:r.length)||0}),i?a.jsx(Hh,{className:"h-4 w-4 text-gray-400"}):a.jsx(Zi,{className:"h-4 w-4 text-gray-400"})]})]})]}),i&&a.jsxs("div",{className:"p-3 pt-0 border-t border-gray-700",children:[a.jsxs("h4",{className:"text-sm font-medium text-gray-300 mb-2 flex items-center gap-2",children:[a.jsx(Es,{className:"h-4 w-4 text-yellow-500"}),"Recent Achievements"]}),r&&r.length>0?a.jsx("div",{className:"space-y-2",children:r.slice(0,3).map((y,x)=>a.jsxs("div",{className:"flex items-center gap-2 p-2 rounded-md bg-gray-700/50 hover:bg-gray-700",children:[a.jsx("div",{className:Ie("w-8 h-8 rounded-full flex items-center justify-center",y.level==="bronze"?"bg-amber-800":y.level==="silver"?"bg-gray-500":y.level==="gold"?"bg-yellow-500":"bg-cyan-600"),children:a.jsx(Kr,{className:"h-4 w-4 text-white"})}),a.jsxs("div",{className:"flex-1 overflow-hidden",children:[a.jsx("p",{className:"font-medium text-white text-sm truncate",children:y.title}),a.jsx("p",{className:"text-xs text-gray-400 truncate",children:y.description})]}),a.jsx("div",{className:"flex-shrink-0 text-right",children:a.jsxs("p",{className:"text-xs font-medium text-yellow-400",children:["+",y.points]})})]},x))}):a.jsx("p",{className:"text-sm text-gray-400 py-2 text-center",children:"Complete actions to earn achievements"}),r&&r.length>3&&a.jsxs("button",{className:"mt-2 text-xs text-cyan-400 hover:text-cyan-300 flex items-center mx-auto",onClick:y=>{y.stopPropagation()},children:["View all achievements ",a.jsx(Zi,{className:"h-3 w-3 ml-1"})]})]})]})}const cT=ap("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring 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 shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),se=A.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...i},s)=>{const o=n?Poe:"button";return a.jsx(o,{className:Ie(cT({variant:t,size:r,className:e})),ref:s,...i})});
774se.displayName="Button";const Cme=ap("inline-flex items-center rounded-md 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 shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Oe({className:e,variant:t,...r}){return a.jsx("div",{className:Ie(Cme({variant:t}),e),...r})}function Ome({signal:e,isExpanded:t,onClick:r,onAction:n}){const i=h=>h==="buy"?"text-green-500 bg-green-500/10 border-green-500/20":"text-red-500 bg-red-500/10 border-red-500/20",s=h=>{switch(h){case"high":return"bg-red-500/20 text-red-400 border-red-400/20";case"medium":return"bg-yellow-500/20 text-yellow-400 border-yellow-400/20";case"low":return"bg-blue-500/20 text-blue-400 border-blue-400/20";default:return"bg-gray-500/20 text-gray-400 border-gray-400/20"}},o=h=>{switch(h){case"positive":return"text-green-400";case"negative":return"text-red-400";case"neutral":return"text-gray-400";default:return"text-gray-400"}},l=h=>h?h>60?"bg-green-500/20 text-green-400 border-green-500/20":h>20?"bg-blue-500/20 text-blue-400 border-blue-500/20":h>-20?"bg-gray-500/20 text-gray-400 border-gray-500/20":h>-60?"bg-yellow-500/20 text-yellow-400 border-yellow-500/20":"bg-red-500/20 text-red-400 border-red-500/20":"bg-gray-500/20 text-gray-400 border-gray-500/20",c=h=>h>=80?"text-green-400":h>=60?"text-blue-400":h>=40?"text-yellow-400":"text-red-400",d=()=>e.expiration?`${Math.floor((new Date(e.expiration)-new Date)/36e5)}h`:"N/A",u=(h,m)=>m.includes("BTC")?h.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:0}):m.includes("ETH")?h.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:0}):h>100?h.toFixed(2):h>1?h.toFixed(4):h.toFixed(6);return a.jsxs(be,{className:"bg-gray-800 border-gray-700 overflow-hidden transition-all hover:shadow-cyan-900/10 hover:shadow-lg",children:[a.jsx("div",{className:"cursor-pointer",onClick:r,children:a.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-gray-700",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"w-10 h-10 rounded-full bg-gray-700 flex items-center justify-center",children:e.symbol.substring(0,2)}),a.jsxs("div",{children:[a.jsx("h3",{className:"font-medium text-white text-lg",children:e.symbol}),a.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-400",children:[a.jsx(Za,{className:"h-3 w-3"}),a.jsx("span",{children:e.timeframe}),a.jsx("span",{children:"â¢"}),a.jsxs("span",{children:["Expires in ",d()]})]})]})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs(Oe,{className:i(e.direction),children:[e.direction==="buy"?a.jsx(XQ,{className:"h-3 w-3 mr-1"}):a.jsx(BQ,{className:"h-3 w-3 mr-1"}),e.direction.toUpperCase()]}),a.jsx(Zi,{className:`h-5 w-5 transition-transform ${t?"rotate-180":""}`})]})]})}),t&&a.jsxs(Se,{className:"p-4 border-t border-gray-700 bg-gray-900/50",children:[a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsxs("h4",{className:"font-medium text-gray-300 mb-3 flex items-center gap-2",children:[a.jsx(ln,{className:"h-4 w-4 text-purple-400"}),"AI Analysis"]}),a.jsx("p",{className:"text-gray-400 text-sm mb-4",children:e.reasoning}),a.jsxs("div",{className:"grid grid-cols-2 gap-3 mb-4",children:[a.jsxs("div",{className:"bg-gray-800 p-3 rounded-lg",children:[a.jsx("span",{className:"text-xs text-gray-500",children:"Entry Price"}),a.jsx("p",{className:"font-medium text-white",children:u(e.entry_price,e.symbol)})]}),a.jsxs("div",{className:"bg-gray-800 p-3 rounded-lg",children:[a.jsx("span",{className:"text-xs text-gray-500",children:"Stop Loss"}),a.jsx("p",{className:"font-medium text-red-400",children:u(e.stop_loss,e.symbol)})]}),a.jsxs("div",{className:"bg-gray-800 p-3 rounded-lg",children:[a.jsx("span",{className:"text-xs text-gray-500",children:"Take Profit"}),a.jsx("p",{className:"font-medium text-green-400",children:u(e.take_profit,e.symbol)})]}),a.jsxs("div",{className:"bg-gray-800 p-3 rounded-lg",children:[a.jsx("span",{className:"text-xs text-gray-500",children:"Confidence"}),a.jsxs("p",{className:`font-medium ${c(e.confidence)}`,children:[e.confidence,"%"]})]})]})]}),e.news_impact&&e.news_impact.length>0&&a.jsxs(a.Fragment,{children:[a.jsxs("h4",{className:"font-medium text-gray-300 mb-3 flex items-center gap-2",children:[a.jsx(Gh,{className:"h-4 w-4 text-blue-400"}),"News Impact"]}),a.jsx("div",{className:"space-y-2 mb-4",children:e.news_impact.map((h,m)=>a.jsxs("div",{className:"flex items-center justify-between p-2 bg-gray-800 rounded-lg",children:[a.jsx("div",{className:"flex-1",children:a.jsx("p",{className:"text-sm text-gray-300 truncate",children:h.title})}),a.jsxs("div",{className:"flex gap-2 ml-2",children:[a.jsx(Oe,{className:s(h.impact),children:h.impact}),a.jsx("span",{className:`text-xs ${o(h.sentiment)}`,children:h.sentiment})]})]},m))})]}),e.social_sentiment&&a.jsxs(a.Fragment,{children:[a.jsxs("h4",{className:"font-medium text-gray-300 mb-3 flex items-center gap-2",children:[a.jsx(Qo,{className:"h-4 w-4 text-cyan-400"}),"Social Sentiment"]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsxs(Oe,{className:l(e.social_sentiment.twitter),children:["Twitter: ",e.social_sentiment.twitter]}),a.jsxs(Oe,{className:l(e.social_sentiment.telegram),children:["Telegram: ",e.social_sentiment.telegram]}),a.jsxs(Oe,{className:l(e.social_sentiment.reddit),children:["Reddit: ",e.social_sentiment.reddit]})]})]})]}),a.jsxs("div",{className:"flex justify-between mt-6",children:[a.jsxs(se,{variant:"outline",className:"border-gray-700 text-gray-300 hover:bg-gray-700",children:[a.jsx(pr,{className:"h-4 w-4 mr-2"}),"Discuss"]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsxs(se,{className:`${e.direction==="sell"?"bg-red-600 hover:bg-red-700":"bg-gray-700 hover:bg-gray-600"}`,onClick:()=>n&&n("sell"),children:[a.jsx(Vk,{className:"h-4 w-4 mr-2"}),"Sell"]}),a.jsxs(se,{className:`${e.direction==="buy"?"bg-green-600 hover:bg-green-700":"bg-gray-700 hover:bg-gray-600"}`,onClick:()=>n&&n("buy"),children:[a.jsx(Qr,{className:"h-4 w-4 mr-2"}),"Buy"]})]})]})]})]})}var Mme="Separator",C5="horizontal",Rme=["horizontal","vertical"],n9=A.forwardRef((e,t)=>
774{const{decorative:r,orientation:n=C5,...i}=e,s=Dme(n)?n:C5,l=r?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return a.jsx(st.div,{"data-orientation":s,...l,...i,ref:t})});n9.displayName=Mme;function Dme(e){return Rme.includes(e)}var a9=n9;const Zv=A.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},i)=>a.jsx(a9,{ref:i,decorative:r,orientation:t,className:Ie("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));Zv.displayName=a9.displayName;function tr(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 nl(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const i9=6048e5,Ime=864e5,ly=43200,O5=1440;let Lme={};function Sp(){return Lme}function um(e,t){var l,c,d,u;const r=Sp(),n=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??r.weekStartsOn??((u=(d=r.locale)==null?void 0:d.options)==null?void 0:u.weekStartsOn)??0,i=tr(e),s=i.getDay(),o=(s<n?7:0)+s-n;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function y0(e){return um(e,{weekStartsOn:1})}function s9(e){const t=tr(e),r=t.getFullYear(),n=nl(e,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);const i=y0(n),s=nl(e,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const o=y0(s);return t.getTime()>=i.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function M5(e){const t=tr(e);return t.setHours(0,0,0,0),t}function v0(e){const t=tr(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 $me(e,t){const r=M5(e),n=M5(t),i=+r-v0(r),s=+n-v0(n);return Math.round((i-s)/Ime)}function Fme(e){const t=s9(e),r=nl(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),y0(r)}function Uy(e,t){const r=tr(e),n=tr(t),i=r.getTime()-n.getTime();return i<0?-1:i>0?1:i}function Bme(e){return nl(e,Date.now())}function Ume(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function qme(e){if(!Ume(e)&&typeof e!="number")return!1;const t=tr(e);return!isNaN(Number(t))}function zme(e,t){const r=tr(e),n=tr(t),i=r.getFullYear()-n.getFullYear(),s=r.getMonth()-n.getMonth();return i*12+s}function Vme(e){return t=>{const n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}function Hme(e,t){return+tr(e)-+tr(t)}function Wme(e){const t=tr(e);return t.setHours(23,59,59,999),t}function Gme(e){const t=tr(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function Kme(e){const t=tr(e);return+Wme(t)==+Gme(t)}function Yme(e,t){const r=tr(e),n=tr(t),i=Uy(r,n),s=Math.abs(zme(r,n));let o;if(s<1)o=0;else{r.getMonth()===1&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-i*s);let l=Uy(r,n)===-i;Kme(tr(e))&&s===1&&Uy(e,n)===1&&(l=!1),o=i*(s-Number(l))}return o===0?0:o}function Xme(e,t,r){const n=Hme(e,t)/1e3;return Vme(r==null?void 0:r.roundingMethod)(n)}function Qme(e){const t=tr(e),r=nl(e,0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}const Zme={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"}},Jme=(e,t,r)=>{let n;const i=Zme[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 _1(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const epe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},tpe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},rpe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},npe={date:_1({formats:epe,defaultWidth:"full"}),time:_1({formats:tpe,defaultWidth:"full"}),dateTime:_1({formats:rpe,defaultWidth:"full"})},ape={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ipe=(e,t,r,n)=>ape[e];function ah(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,l=r!=null&&r.width?String(r.width):o;i=e.formattingValues[l]||e.formattingValues[o]}else{const o=e.defaultWidth,l=r!=null&&r.width?String(r.width):e.defaultWidth;i=e.values[l]||e.values[o]}const s=e.argumentCallback?e.argumentCallback(t):t;return i[s]}}const spe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ope={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},lpe={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"]},cpe={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","Frid
774ay","Saturday"]},upe={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"}},dpe={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"}},fpe=(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"},hpe={ordinalNumber:fpe,era:ah({values:spe,defaultWidth:"wide"}),quarter:ah({values:ope,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ah({values:lpe,defaultWidth:"wide"}),day:ah({values:cpe,defaultWidth:"wide"}),dayPeriod:ah({values:upe,defaultWidth:"wide",formattingValues:dpe,defaultFormattingWidth:"wide"})};function ih(e){return(t,r={})=>{const n=r.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],s=t.match(i);if(!s)return null;const o=s[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?ppe(l,h=>h.test(o)):mpe(l,h=>h.test(o));let d;d=e.valueCallback?e.valueCallback(c):c,d=r.valueCallback?r.valueCallback(d):d;const u=t.slice(o.length);return{value:d,rest:u}}}function mpe(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function ppe(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function gpe(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const i=n[0],s=t.match(e.parsePattern);if(!s)return null;let o=e.valueCallback?e.valueCallback(s[0]):s[0];o=r.valueCallback?r.valueCallback(o):o;const l=t.slice(i.length);return{value:o,rest:l}}}const ype=/^(\d+)(th|st|nd|rd)?/i,vpe=/\d+/i,xpe={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},bpe={any:[/^b/i,/^(a|c)/i]},wpe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},jpe={any:[/1/i,/2/i,/3/i,/4/i]},Npe={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},_pe={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]},Spe={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},Ape={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]},kpe={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},Epe={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}},Tpe={ordinalNumber:gpe({matchPattern:ype,parsePattern:vpe,valueCallback:e=>parseInt(e,10)}),era:ih({matchPatterns:xpe,defaultMatchWidth:"wide",parsePatterns:bpe,defaultParseWidth:"any"}),quarter:ih({matchPatterns:wpe,defaultMatchWidth:"wide",parsePatterns:jpe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ih({matchPatterns:Npe,defaultMatchWidth:"wide",parsePatterns:_pe,defaultParseWidth:"any"}),day:ih({matchPatterns:Spe,defaultMatchWidth:"wide",parsePatterns:Ape,defaultParseWidth:"any"}),dayPeriod:ih({matchPatterns:kpe,defaultMatchWidth:"any",parsePatterns:Epe,defaultParseWidth:"any"})},o9={code:"en-US",formatDistance:Jme,formatLong:npe,formatRelative:ipe,localize:hpe,match:Tpe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Ppe(e){const t=tr(e);return $me(t,Qme(t))+1}function Cpe(e){const t=tr(e),r=+y0(t)-+Fme(t);return Math.round(r/i9)+1}function l9(e,t){var u,h,m,g;const r=tr(e),n=r.getFullYear(),i=Sp(),s=(t==null?void 0:t.firstWeekContainsDate)??((h=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:h.firstWeekContainsDate)??i.firstWeekContainsDate??((g=(m=i.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??1,o=nl(e,0);o.setFullYear(n+1,0,s),o.setHours(0,0,0,0);const l=um(o,t),c=nl(e,0);c.setFullYear(n,0,s),c.setHours(0,0,0,0);const d=um(c,t);return r.getTime()>=l.getTime()?n+1:r.getTime()>=d.getTime()?n:n-1}function Ope(e,t){var l,c,d,u;const r=Sp(),n=(t==null?void 0:t.firstWeekContainsDate)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??r.firstWeekContainsDate??((u=(d=r.locale)==null?void 0:d.options)==null?void 0:u.firstWeekContainsDate)??1,i=l9(e,t),s=nl(e,0);return s.setFullYear(i,0,n),s.setHours(0,0,0,0),um(s,t)}function Mpe(e,t){const r=tr(e),n=+um(r,t)-+Ope(r,t);return Math.round(n/i9)+1}function Zt(e,t){const r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}const jo={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return Zt(t==="yy"?n%100:n,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):Zt(r+1,2)},d(e,t){return Zt(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 Zt(e.getHours()%12||12,t.length)},H(e,t){return Zt(e.getHours(),t.length)},m(e,t){return Zt(e.getMinutes(),t.length)},s(e,t){return Zt(e.getSeconds(),t.length)},S(e,t){const r=t.length,n=e.getMilliseconds(),i=Math.trunc(n*Math.pow(10,r-3));return Zt(i,t.length)}},mu={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},R5={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 jo.y(e,t)},Y:function(e,t,r,n){const i=l9(e,n),s=i>0?i:1-i;if(t==="YY"){const o=s%100;return Zt(o,2)}return t==="Yo"?r.ordinalNumber(s,{unit:"year"}):Zt(s,t.length)},R:function(e,t){const r=s9(e);return Zt(r,t.length)},u:function(e,t){const r=e.getFullYear();return Zt(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 Zt(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 Zt(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 jo.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 Zt(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=Mpe(e,n);return t==="wo"?r.ordinalNumber(i,{unit:"week"}):Zt(i,t.length)},I:function(e,t,r){const n=Cpe(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):Zt(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):jo.d(e,t)},D:function(e,t,r){const n=Ppe(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):Zt(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(),s=(i-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return Zt(s,2);case"eo":return r.ordinalNumber(s,{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(),s=(i-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return Zt(s,t.length);case"co":return r.ordinalNumber(s,{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 Zt(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;switch(n===12?i=mu.noon:n===0?i=mu.midnight:i=n/12>
vendor: 4,426 bytes, line 774
774=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=mu.evening:n>=12?i=mu.afternoon:n>=4?i=mu.morning:i=mu.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 jo.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):jo.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):Zt(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):Zt(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):jo.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):jo.s(e,t)},S:function(e,t){return jo.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return I5(n);case"XXXX":case"XX":return Ll(n);case"XXXXX":case"XXX":default:return Ll(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return I5(n);case"xxxx":case"xx":return Ll(n);case"xxxxx":case"xxx":default:return Ll(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+D5(n,":");case"OOOO":default:return"GMT"+Ll(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+D5(n,":");case"zzzz":default:return"GMT"+Ll(n,":")}},t:function(e,t,r){const n=Math.trunc(e.getTime()/1e3);return Zt(n,t.length)},T:function(e,t,r){const n=e.getTime();return Zt(n,t.length)}};function D5(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),i=Math.trunc(n/60),s=n%60;return s===0?r+String(i):r+String(i)+t+Zt(s,2)}function I5(e,t){return e%60===0?(e>0?"-":"+")+Zt(Math.abs(e)/60,2):Ll(e,t)}function Ll(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),i=Zt(Math.trunc(n/60),2),s=Zt(n%60,2);return r+i+t+s}const L5=(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"})}},c9=(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"})}},Rpe=(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],i=r[2];if(!i)return L5(e,t);let s;switch(n){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",L5(n,t)).replace("{{time}}",c9(i,t))},Dpe={p:c9,P:Rpe},Ipe=/^D+$/,Lpe=/^Y+$/,$pe=["D","DD","YY","YYYY"];function Fpe(e){return Ipe.test(e)}function Bpe(e){return Lpe.test(e)}function Upe(e,t,r){const n=qpe(e,t,r);if(console.warn(n),$pe.includes(e))throw new RangeError(n)}function qpe(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 zpe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Vpe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Hpe=/^'([^]*?)'?$/,Wpe=/''/g,Gpe=/[a-zA-Z]/;function _s(e,t,r){var u,h,m,g;const n=Sp(),i=n.locale??o9,s=n.firstWeekContainsDate??((h=(u=n.locale)==null?void 0:u.options)==null?void 0:h.firstWeekContainsDate)??1,o=n.weekStartsOn??((g=(m=n.locale)==null?void 0:m.options)==null?void 0:g.weekStartsOn)??0,l=tr(e);if(!qme(l))throw new RangeError("Invalid time value");let c=t.match(Vpe).map(b=>{const v=b[0];if(v==="p"||v==="P"){const y=Dpe[v];return y(b,i.formatLong)}return b}).join("").match(zpe).map(b=>{if(b==="''")return{isToken:!1,value:"'"};const v=b[0];if(v==="'")return{isToken:!1,value:Kpe(b)};if(R5[v])return{isToken:!0,value:b};
774if(v.match(Gpe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+v+"`");return{isToken:!1,value:b}});i.localize.preprocessor&&(c=i.localize.preprocessor(l,c));const d={firstWeekContainsDate:s,weekStartsOn:o,locale:i};return c.map(b=>{if(!b.isToken)return b.value;const v=b.value;(Bpe(v)||Fpe(v))&&Upe(v,t,String(e));const y=R5[v[0]];return y(l,v,i.localize,d)}).join("")}function Kpe(e){const t=e.match(Hpe);return t?t[1].replace(Wpe,"'"):e}function Ype(e,t,r){const n=Sp(),i=(r==null?void 0:r.locale)??n.locale??o9,s=2520,o=Uy(e,t);if(isNaN(o))throw new RangeError("Invalid time value");const l=Object.assign({},r,{addSuffix:r==null?void 0:r.addSuffix,comparison:o});let c,d;o>0?(c=tr(t),d=tr(e)):(c=tr(e),d=tr(t));const u=Xme(d,c),h=(v0(d)-v0(c))/1e3,m=Math.round((u-h)/60);let g;if(m<2)return r!=null&&r.includeSeconds?u<5?i.formatDistance("lessThanXSeconds",5,l):u<10?i.formatDistance("lessThanXSeconds",10,l):u<20?i.formatDistance("lessThanXSeconds",20,l):u<40?i.formatDistance("halfAMinute",0,l):u<60?i.formatDistance("lessThanXMinutes",1,l):i.formatDistance("xMinutes",1,l):m===0?i.formatDistance("lessThanXMinutes",1,l):i.formatDistance("xMinutes",m,l);if(m<45)return i.formatDistance("xMinutes",m,l);if(m<90)return i.formatDistance("aboutXHours",1,l);if(m<O5){const b=Math.round(m/60);return i.formatDistance("aboutXHours",b,l)}else{if(m<s)return i.formatDistance("xDays",1,l);if(m<ly){const b=Math.round(m/O5);return i.formatDistance("xDays",b,l)}else if(m<ly*2)return g=Math.round(m/ly),i.formatDistance("aboutXMonths",g,l)}if(g=Yme(d,c),g<12){const b=Math.round(m/ly);return i.formatDistance("xMonths",b,l)}else{const b=g%12,v=Math.trunc(g/12);return b<3?i.formatDistance("aboutXYears",v,l):b<9?i.formatDistance("overXYears",v,l):i.formatDistance("almostXYears",v+1,l)}}function Mn(e,t){return Ype(e,Bme(e),t)}function u9({maxItems:e=5}){const[t,r]=A.useState([]),[n,i]=A.useState(!0);A.useEffect(()=>{s()},[]);const s=async()=>{i(!0),setTimeout(()=>{r(o()),i(!1)},1e3)},o=()=>[{title:"US jobless claims rise to 235,000, slightly above expectations",source:"CNBC",url:"https://www.cnbc.com/",timestamp:new Date(Date.now()-4800*1e3).toISOString(),sentiment:"negative",tickers:["SPY","QQQ"]},{title:"European stocks higher as inflation data shows signs of cooling",source:"Financial Times",url:"https://www.ft.com/",timestamp:new Date(Date.now()-8400*1e3).toISOString(),sentiment:"positive",tickers:["STOXX50","DAX"]},{title:"Bank of Japan maintains ultra-low interest rates, yen weakens",source:"Reuters",url:"https://www.reuters.com/",timestamp:new Date(Date.now()-12600*1e3).toISOString(),sentiment:"neutral",tickers:["JPY","USDJPY"]},{title:"Tech stock rally continues as AI investments accelerate",source:"Bloomberg",url:"https://www.bloomberg.com/",timestamp:new Date(Date.now()-290*60*1e3).toISOString(),sentiment:"positive",tickers:["MSFT","NVDA","GOOG"]},{title:"Gold prices retreat from record high as dollar strengthens",source:"MarketWatch",url:"https://www.marketwatch.com/",timestamp:new Date(Date.now()-340*60*1e3).toISOString(),sentiment:"negative",tickers:["GC","GLD"]},{title:"OPEC+ decision to maintain output levels sends oil prices higher",source:"Wall Street Journal",url:"https://www.wsj.com/",timestamp:new Date(Date.now()-420*60*1e3).toISOString(),sentiment:"positive",tickers:["CL","USO","XOM"]},{title:"Ethereum surges after successful network upgrade",source:"CoinDesk",url:"https://www.coindesk.com/",timestamp:new Date(Date.now()-500*60*1e3).toISOString(),sentiment:"positive",tickers:["ETH"]}],l=c=>{switch(c){case"positive":return a.jsx(Qr,{className:"h-3.5 w-3.5 text-green-400"});case"negative":return a.jsx(Vk,{className:"h-3.5 w-3.5 text-red-400"});default:return null}};return a.jsxs(be,{className:"bg-gray-800 border-gray-700 mb-6",children:[a.jsx(Be,{className:"pb-2",children:a.jsxs(qe,{className:"text-lg flex items-center gap-2 text-white",children:[a.jsx(VS,{className:"h-5 w-5 text-cyan-400"}),"Latest Headlines"]})}),a.jsx(Se,{children:n?a.jsx("div",{className:"space-y-4",children:Array(3).fill(0).map((c,d)=>a.jsxs("div",{className:"animate-pulse",children:[a.jsx("div",{className:"h-4 bg-gray-700 rounded w-3/4 mb-2"}),a.jsx("div",{className:"h-3 bg-gray-700 rounded w-1/4"})]},d))}):a.jsxs("div",{className:"space-y-3",children:[t.slice(0,e).map((c,d)=>a.jsxs("div",{children:[d>0&&a.jsx(Zv,{className:"my-3 bg-gray-700"}),a.jsx("div",{children:a.jsxs("a",{href:c.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-start gap-2 group",children:[a.jsx("div",{className:"mt-1",children:l(c.sentiment)}),a.jsxs("div",{className:"flex-1",children:[a.jsxs("h3",{className:"font-medium text-white group-hover:text-cyan-400 transition-colors",children:[c.title," ",a.jsx(Br,{className:"inline h-3 w-3 opacity-50 group-hover:opacity-100 transition-opacity"})]}),a.jsxs("div",{className:"flex items-center justify-between mt-1",children:[a.jsxs("div",{className:"flex items-center text-xs text-gray-400 space-x-3",children:[a.jsx("span",{children:c.source}),a.jsxs("span",{className:"flex items-center",children:[a.jsx(Za,{className:"h-3 w-3 mr-1"}),Mn(new Date(c.timestamp),{addSuffix:!0})]})]}),c.tickers&&c.tickers.length>0&&a.jsx("div",{className:"flex gap-1",children:c.tickers.map((u,h)=>a.jsx(Oe,{variant:"outline",className:"text-xs py-0 h-5 text-gray-300",children:u},h))})]})]})]})})]},d)),a.jsx("div",{className:"pt-2",children:a.jsxs("a",{href:"https://gpt4trade.com/news",target:"_blank",rel:"noopener noreferrer",className:"text-sm text-cyan-400 hover:text-cyan-300 flex items-center justify-center",children:["See all market news ",a.jsx(Br,{className:"ml-1 h-3 w-3"})]})})]})})]})}function Fn({className:e,...t}){return a.jsx("div",{className:Ie("animate-pulse rounded-md bg-primary/10",e),...t})}function S1({onQuoteUpdate:e}){const[t,r]=A.useState([]),[n,i]=A.useState(!0),[s,o]=A.useState("forex"),[l,c]=A.useState(null),[d,u]=A.useState(null);A.useEffect(()=>{h();const y=setInterval(h,3e4);return()=>clearInterval(y)},[]);const h=async()=>{i(!0),u(null);try{setTimeout(()=>{const y=m();r(y),c(new Date),i(!1),e&&e(y)},1e3)}catch(y){console.error("Error fetching quotes:",y),u("Failed to fetch market data"),i(!1)}},m=()=>
774{const y={forex:[{symbol:"EUR/USD",base:1.09,volatility:.002},{symbol:"GBP/USD",base:1.26,volatility:.003},{symbol:"USD/JPY",base:149,volatility:.15},{symbol:"AUD/USD",base:.66,volatility:.0015},{symbol:"USD/CAD",base:1.36,volatility:.0025},{symbol:"EUR/GBP",base:.85,volatility:.0015}],crypto:[{symbol:"BTC/USD",base:64500,volatility:500},{symbol:"ETH/USD",base:3450,volatility:75},{symbol:"XRP/USD",base:.52,volatility:.01},{symbol:"SOL/USD",base:144,volatility:5},{symbol:"DOGE/USD",base:.126,volatility:.005},{symbol:"ADA/USD",base:.44,volatility:.01}],commodities:[{symbol:"Gold",base:2350,volatility:10},{symbol:"Silver",base:28.5,volatility:.5},{symbol:"Oil (WTI)",base:76.5,volatility:1},{symbol:"Natural Gas",base:1.85,volatility:.05},{symbol:"Copper",base:4.15,volatility:.05},{symbol:"Platinum",base:980,volatility:8}],indices:[{symbol:"S&P 500",base:5210,volatility:15},{symbol:"NASDAQ",base:16420,volatility:60},{symbol:"Dow Jones",base:38850,volatility:100},{symbol:"DAX",base:17950,volatility:50},{symbol:"FTSE 100",base:7940,volatility:30},{symbol:"Nikkei 225",base:38600,volatility:150}]},x=[];return Object.entries(y).forEach(([w,_])=>{_.forEach(j=>{const S=(Math.random()-.5)*2*j.volatility,k=j.base+S,T=S/j.base*100;x.push({symbol:j.symbol,category:w,price:k,change:S,changePercent:T,volume:Math.floor(Math.random()*1e4)+1e3,timestamp:new Date().toISOString(),isFavorite:Math.random()>.7})})}),x},g=(y,x)=>x.includes("JPY")||x.includes("BTC")||x.includes("ETH")||x.includes("S&P")||x.includes("NASDAQ")||x.includes("Dow")||x.includes("DAX")||x.includes("FTSE")||x.includes("Nikkei")||x.includes("Gold")||x.includes("Silver")||x.includes("Oil")||x.includes("Gas")||x.includes("Copper")||x.includes("Platinum")?y.toFixed(2):x.includes("XRP")||x.includes("DOGE")||x.includes("ADA")?y.toFixed(4):y.toFixed(5),b=y=>{const x=y.toFixed(2);return y>0?`+${x}%`:`${x}%`},v=t.filter(y=>y.category===s);return a.jsxs(be,{className:"bg-gray-800 border-gray-700",children:[a.jsx(Be,{className:"pb-2",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs(qe,{className:"text-lg flex items-center gap-2 text-white",children:[a.jsx(OB,{className:"h-5 w-5 text-cyan-400"}),"Market Quotes"]}),a.jsxs("div",{className:"flex items-center gap-3",children:[l&&a.jsxs("div",{className:"text-xs text-gray-400 flex items-center",children:[a.jsx(Za,{className:"h-3 w-3 mr-1"}),"Updated ",l.toLocaleTimeString()]}),a.jsx(se,{variant:"ghost",size:"icon",onClick:h,disabled:n,className:"h-8 w-8 text-gray-400 hover:text-white",children:a.jsx(Xr,{className:`h-4 w-4 ${n?"animate-spin":""}`})})]})]})}),a.jsx(Se,{children:d?a.jsxs("div",{className:"flex items-center justify-center py-6 text-red-400 text-sm",children:[a.jsx(Lt,{className:"h-4 w-4 mr-2"}),d]}):a.jsx(a.Fragment,{children:a.jsxs(ei,{value:s,onValueChange:o,className:"w-full",children:[a.jsxs(Ta,{className:"mb-4 bg-gray-700 w-full justify-start",children:[a.jsx(Nt,{value:"forex",className:"data-[state=active]:bg-cyan-700",children:"Forex"}),a.jsx(Nt,{value:"crypto",className:"data-[state=active]:bg-cyan-700",children:"Crypto"}),a.jsx(Nt,{value:"commodities",className:"data-[state=active]:bg-cyan-700",children:"Commodities"}),a.jsx(Nt,{value:"indices",className:"data-[state=active]:bg-cyan-700",children:"Indices"})]}),Object.keys(t.reduce((y,x)=>(y[x.category]=!0,y),{})).map(y=>a.jsx(Pt,{value:y,className:"m-0",children:a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-gray-700",children:[a.jsx("th",{className:"py-2 text-left text-xs font-medium text-gray-400",children:"Symbol"}),a.jsx("th",{className:"py-2 text-right text-xs font-medium text-gray-400",children:"Price"}),a.jsx("th",{className:"py-2 text-right text-xs font-medium text-gray-400",children:"Change"}),a.jsx("th",{className:"py-2 text-right text-xs font-medium text-gray-400",children:"Volume"})]})}),a.jsx("tbody",{children:n?Array(6).fill(0).map((x,w)=>a.jsxs("tr",{className:"border-b border-gray-700/50 last:border-0",children:[a.jsx("td",{className:"py-3",children:a.jsx(Fn,{className:"h-4 w-16 bg-gray-700"})}),a.jsx("td",{className:"text-right",children:a.jsx(Fn,{className:"h-4 w-20 ml-auto bg-gray-700"})}),a.jsx("td",{className:"text-right",children:a.jsx(Fn,{className:"h-4 w-16 ml-auto bg-gray-700"})}),a.jsx("td",{className:"text-right",children:a.jsx(Fn,{className:"h-4 w-12 ml-auto bg-gray-700"})})]},w)):v.map((x,w)=>a.jsxs("tr",{className:"border-b border-gray-700/50 last:border-0 hover:bg-gray-700/30",children:[a.jsx("td",{className:"py-2.5",children:a.jsxs("div",{className:"flex items-center",children:[a.jsx("button",{className:"mr-2 text-gray-500 hover:text-yellow-400",children:a.jsx(Kr,{className:`h-3.5 w-3.5 ${x.isFavorite?"text-yellow-400 fill-yellow-400":""}`})}),a.jsx("span",{className:"font-medium text-white",children:x.symbol})]})}),a.jsx("td",{className:"text-right font-mono text-white",children:g(x.price,x.symbol)}),a.jsx("td",{className:"text-right",children:a.jsxs("div",{className:"flex items-center justify-end",children:[x.change>0?a.jsx(Yy,{className:"h-3 w-3 text-green-400 mr-1"}):a.jsx(Ky,{className:"h-3 w-3 text-red-400 mr-1"}),a.jsx("span",{className:x.change>0?"text-green-400":"text-red-400",children:b(x.changePercent)})]})}),a.jsx("td",{className:"text-right text-gray-400 text-sm",children:x.volume.toLocaleStr
774ing()})]},w))})]})})},y))]})})})]})}function Xpe({symbol:e,onSentimentUpdate:t}){const[r,n]=A.useState(!0),[i,s]=A.useState(null),[o,l]=A.useState(null),[c,d]=A.useState([]),[u,h]=A.useState(null),[m,g]=A.useState("summary"),b=_=>{const j={"BTC/USD":{sentiment_score:68,tweet_volume:12453,bullish_percentage:72,bearish_percentage:28,neutral_percentage:0,sentiment_change:5.2,tweets:[{text:"Bitcoin looking very strong today. $BTC heading towards new ATH soon! ð",sentiment:"bullish",timestamp:new Date(Date.now()-15e5).toISOString(),username:"crypto_whale"},{text:"Just bought more #Bitcoin on this dip. Long-term HODLer here.",sentiment:"bullish",timestamp:new Date(Date.now()-72e5).toISOString(),username:"btc_maximalist"},{text:"BTC/USD consolidating above 64k. Next resistance at 68k.",sentiment:"neutral",timestamp:new Date(Date.now()-144e5).toISOString(),username:"tradingview_guru"}]},"ETH/USD":{sentiment_score:59,tweet_volume:8765,bullish_percentage:65,bearish_percentage:35,neutral_percentage:0,sentiment_change:2.3,tweets:[{text:"Ethereum fundamentals looking better than ever. ETH2.0 progress is amazing.",sentiment:"bullish",timestamp:new Date(Date.now()-21e5).toISOString(),username:"eth_developer"},{text:"ETH gas fees still too high. Move to L2 solutions necessary for mass adoption.",sentiment:"bearish",timestamp:new Date(Date.now()-108e5).toISOString(),username:"defi_user"},{text:"Ethereum/USD consolidating after recent gains. Range-bound between 3300-3500.",sentiment:"neutral",timestamp:new Date(Date.now()-18e6).toISOString(),username:"crypto_analyst"}]},"EUR/USD":{sentiment_score:42,tweet_volume:5432,bullish_percentage:42,bearish_percentage:58,neutral_percentage:0,sentiment_change:-3.1,tweets:[{text:"EURUSD under pressure after ECB statement. Looking bearish for now.",sentiment:"bearish",timestamp:new Date(Date.now()-27e5).toISOString(),username:"forex_trader"},{text:"EUR/USD finding support at 1.09 level. Watch for bounce.",sentiment:"bullish",timestamp:new Date(Date.now()-9e6).toISOString(),username:"fx_expert"},{text:"Euro struggling against USD as US yields continue to rise.",sentiment:"bearish",timestamp:new Date(Date.now()-216e5).toISOString(),username:"macro_view"}]},Gold:{sentiment_score:55,tweet_volume:4321,bullish_percentage:55,bearish_percentage:45,neutral_percentage:0,sentiment_change:.8,tweets:[{text:"Gold finding bids as inflation concerns persist. Safe haven demand.",sentiment:"bullish",timestamp:new Date(Date.now()-33e5).toISOString(),username:"gold_bug"},{text:"XAU/USD consolidating around $2000/oz. Key technical level.",sentiment:"neutral",timestamp:new Date(Date.now()-126e5).toISOString(),username:"technical_trader"},{text:"Gold facing headwinds from rising real yields. Bearish in near term.",sentiment:"bearish",timestamp:new Date(Date.now()-252e5).toISOString(),username:"macro_investor"}]}},S={sentiment_score:Math.floor(Math.random()*40)+30,tweet_volume:Math.floor(Math.random()*5e3)+2e3,bullish_percentage:Math.floor(Math.random()*30)+40,bearish_percentage:0,neutral_percentage:Math.floor(Math.random()*20),sentiment_change:Math.random()*6-3,tweets:[{text:`${_} showing interesting price action today. Watch key levels.`,sentiment:"neutral",timestamp:new Date(Date.now()-2400*1e3).toISOString(),username:"market_watcher"},{text:`Bullish on ${_} after recent price movement and technical breakout.`,sentiment:"bullish",timestamp:new Date(Date.now()-2.2*60*60*1e3).toISOString(),username:"chart_master"},{text:`${_} might face resistance at current levels. Caution advised.`,sentiment:"bearish",timestamp:new Date(Date.now()-5.5*60*60*1e3).toISOString(),username:"risk_manager"}]},k=j[_]||S;return k.bearish_percentage===0&&(k.bearish_percentage=100-k.bullish_percentage-k.neutral_percentage),k},v=async()=>{if(n(!0),s(null),!e){const _=b("BTC/USD");l(_),d(_.tweets),h(new Date),n(!1);return}try{const _=b(e);l(_),d(_.tweets),h(new Date),t&&t({score:_.sentiment_score,bullish:_.bullish_percentage,bearish:_.bearish_percentage})}catch(_){console.error("Error fetching Twitter data:",_),s("Could not fetch Twitter sentiment data. Using sample data.");const j=b(e||"BTC/USD");l(j),d(j.tweets),t&&t({score:j.sentiment_score,bullish:j.bullish_percentage,bearish:j.bearish_percentage})}finally{n(!1)}};A.useEffect(()=>
774{v();const _=setInterval(v,900*1e3);return()=>clearInterval(_)},[e]);const y=_=>_>=60?"text-green-400":_>=45?"text-yellow-400":"text-red-400",x=_=>_>=70?"Very Bullish":_>=60?"Bullish":_>=45?"Neutral":_>=30?"Bearish":"Very Bearish",w=_=>{switch(_){case"bullish":return"bg-green-500/20 text-green-400 border-green-400/20";case"bearish":return"bg-red-500/20 text-red-400 border-red-400/20";case"neutral":default:return"bg-blue-500/20 text-blue-400 border-blue-400/20"}};return a.jsxs(be,{className:"bg-gray-800 border-gray-700 shadow-lg",children:[a.jsxs(Be,{className:"flex flex-row items-center justify-between px-6",children:[a.jsxs("div",{children:[a.jsxs(qe,{className:"text-white flex items-center",children:[a.jsx(Qo,{className:"mr-2 h-5 w-5 text-cyan-400"}),"Twitter Sentiment ",e&&a.jsxs("span",{className:"ml-2 text-gray-400",children:["| ",e]})]}),u&&a.jsxs("p",{className:"text-xs text-gray-400 mt-1",children:["Updated ",Mn(u,{addSuffix:!0})]})]}),a.jsx(se,{variant:"ghost",size:"icon",onClick:v,disabled:r,className:"text-gray-400 hover:text-white",children:a.jsx(Xr,{className:`h-4 w-4 ${r?"animate-spin":""}`})})]}),a.jsxs(Se,{className:"px-6 pb-6",children:[i&&a.jsxs("div",{className:"mb-4 p-3 bg-yellow-900/20 border border-yellow-700/30 rounded-md flex items-start gap-3 text-sm",children:[a.jsx(Lt,{className:"h-5 w-5 text-yellow-500 flex-shrink-0 mt-0.5"}),a.jsx("p",{className:"text-gray-300",children:i})]}),a.jsxs(ei,{value:m,onValueChange:g,children:[a.jsxs(Ta,{className:"bg-gray-900 w-full",children:[a.jsx(Nt,{value:"summary",children:"Summary"}),a.jsx(Nt,{value:"tweets",children:"Recent Tweets"})]}),a.jsx(Pt,{value:"summary",className:"mt-4",children:r?a.jsxs("div",{className:"space-y-4",children:[a.jsx(Fn,{className:"h-6 w-32 bg-gray-700"}),a.jsx(Fn,{className:"h-16 w-full bg-gray-700"}),a.jsx(Fn,{className:"h-8 w-full bg-gray-700"}),a.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[a.jsx(Fn,{className:"h-12 w-full bg-gray-700"}),a.jsx(Fn,{className:"h-12 w-full bg-gray-700"})]})]}):o?a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"text-center",children:[a.jsx("h3",{className:"text-lg font-medium text-gray-300 mb-2",children:"Sentiment Score"}),a.jsx("div",{className:`text-4xl font-bold ${y(o.sentiment_score)}`,children:o.sentiment_score}),a.jsxs("div",{className:"text-gray-400 mt-1",children:[x(o.sentiment_score),o.sentiment_change!==0&&a.jsxs("span",{className:o.sentiment_change>0?"text-green-400 ml-2":"text-red-400 ml-2",children:[o.sentiment_change>0?"â":"â"," ",Math.abs(o.sentiment_change).toFixed(1)]})]})]}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-sm font-medium text-gray-400 mb-2",children:"Tweet Sentiment Distribution"}),a.jsx("div",{className:"h-6 bg-gray-900 rounded-full overflow-hidden mb-2",children:a.jsxs("div",{className:"flex h-full",children:[a.jsx("div",{className:"bg-green-500 h-full transition-all duration-500",style:{width:`${o.bullish_percentage}%`}}),a.jsx("div",{className:"bg-blue-500 h-full transition-all duration-500",style:{width:`${o.neutral_percentage}%`}}),a.jsx("div",{className:"bg-red-500 h-full transition-all duration-500",style:{width:`${o.bearish_percentage}%`}})]})}),a.jsxs("div",{className:"flex justify-between text-xs text-gray-400",children:[a.jsxs("div",{className:"flex items-center",children:[a.jsx("span",{className:"w-2 h-2 bg-green-500 rounded-full mr-1"}),"Bullish ",o.bullish_percentage,"%"]}),o.neutral_percentage>0&&a.jsxs("div",{className:"flex items-center",children:[a.jsx("span",{className:"w-2 h-2 bg-blue-500 rounded-full mr-1"}),"Neutral ",o.neutral_percentage,"%"]}),a.jsxs("div",{className:"flex items-center",children:[a.jsx("span",{className:"w-2 h-2 bg-red-500 rounded-full mr-1"}),"Bearish ",o.bearish_percentage,"%"]})]})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[a.jsxs("div",{className:"bg-gray-900/50 p-3 rounded-lg",children:[a.jsx("div",{className:"text-xs text-gray-400",children:"Tweet Volume"}),a.jsx("div",{className:"text-xl font-semibold text-white mt-1",children:o.tweet_volume.toLocaleString()})]}),a.jsxs("div",{className:"bg-gray-900/50 p-3 rounded-lg",children:[a.jsx("div",{className:"text-xs text-gray-400",children:"24h Change"}),a.jsxs("div",{className:`text-xl font-semibold mt-1 ${o.sentiment_change>0?"text-green-400":"text-red-400"}`,children:[o.sentiment_change>0?"+":"",o.sentiment_change.toFixed(1)]})]})]})]}):a.jsxs("div",{className:"text-center py-6 text-gray-400",children:["No sentiment data available for ",e||"this symbol"]})}),a.jsx(Pt,{value:"tweets",className:"mt-4",children:r?a.jsx("div",{className:"space-y-4",children:[...Array(3)].map((_,j)=>a.jsxs("div",{className:"border-b border-gray-700 pb-3",children:[a.jsxs("div",{className:"flex gap-2 items-center mb-2",children:[a.jsx(Fn,{className:"h-5 w-5 rounded-full bg-gray-700"}),a.jsx(Fn,{className:"h-4 w-24 bg-gray-700"})]}),a.jsx(Fn,{className:"h-12 w-full bg-gray-700"}),a.jsxs("div",{className:"flex justify-between mt-2",children:[a.jsx(Fn,{className:"h-4 w-16 bg-gray-700"}),a.jsx(Fn,{className:"h-4 w-20 bg-gray-700"})]})]},j))}):c.length>0?a.jsx("div",{className:"space-y-4",children:c.map((_,j)=>a.jsxs("div",{className:"border-b border-gray-700 pb-3 last:border-0",children:[a.jsxs("div",{className:"flex gap-2 items-center mb-2",children:[a.jsx(Qo,{className:"h-4 w-4 text-blue-400"}),a.jsxs("span",{className:"font-medium text-cyan-400",children:["@",_.username]})]}),a.jsx("p",{className:"text-gray-300",children:_.text}),a.jsxs("div",{className:"flex justify-between mt-2 text-xs",children:[a.jsx(Oe,{className:w(_.sentiment),children:_.sentiment}),a.jsx("span",{className:"text-gray-500",children:Mn(new Date(_.timestamp),{addSuffix:!0})})]})]},j))}):a.jsxs("div",{className:"text-center py-6 text-gray-400",children:["No tweets available for ",e||"this symbol"]})})]})]})]})}function Qpe(){const e="robot4trade - AI-Powered Trading Platform",t="www.robot4trade.com";return te.useEffect(()=>{document.title=e;const r=(i,s)=>{let o=document.querySelector(`meta[${i.startsWith("og:")||i.startsWith("twitter:")?"property":"name"}="${i}"]`);o||(o=document.createElement("meta"),i.startsWith("og:")||i.startsWith("twitter:")?o.setAttribute("property",i):o.setAttribute("name",i),document.head.appendChild(o)),o.setAttribute("content",s)};let n=document.querySelector('link[rel="canonical"]');n||(n=document.createElement("link"),n.setAttribute("rel","canonical"),document.head.appendChild(n)),n.setAttribute("href",`https://${t}${window.location.pathname}`),r("description","Advanced AI trading tools with signal generation, strategy building, and automated bot creation."),r("keywords","trading, AI, algorithmic trading, trading signals, trading bots, forex, cryptocurrency, robot4trade"),r("og:title",e),r("og:description","Advanced AI trading tools with signal generation, strategy building, and automated bot creation."),r("og:url",`https://${t}`),r("og:type","website"),r("twitter:card","summary_large_image"),r("twitter:title",e),r("twitter:description","Advanced AI trading tools with signal generation, strategy building, and automated bot creation.")},[]),null}const Je=A.forwardRef(({className:e,type:t,...r},n)=>
774a.jsx("input",{type:t,className:Ie("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors 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-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...r}));Je.displayName="Input";function Ya({className:e}){return a.jsx("div",{className:e,title:"robot4trade.com",children:a.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/cbd7c9_3D-1175.png",alt:"robot4trade Logo",className:"h-full w-auto rounded-full shadow-lg",loading:"lazy"})})}function Zpe(){const[e,t]=A.useState([]),[r,n]=A.useState(!0),[i,s]=A.useState("signals"),[o,l]=A.useState(null),[c,d]=A.useState(!1),[u,h]=A.useState(!1),[m,g]=A.useState(7),[b,v]=A.useState(678),[y,x]=A.useState(3),[w,_]=A.useState([]),[j,S]=A.useState([]),[k,T]=A.useState([]),[P,M]=A.useState(null),[C,O]=A.useState(""),[D,L]=A.useState(null);A.useEffect(()=>{U(),F();const H=setTimeout(()=>{c||(d(!0),h(!0))},15e3);return()=>clearTimeout(H)},[]);const F=async()=>{try{const H=await je.Achievement.list();_(H)}catch(H){console.error("Error fetching achievements:",H)}},U=async()=>{n(!0),L(null);try{const H=await je.Signal.list("-created_date");if(H.length===0){await G();const J=await je.Signal.list("-created_date");t(J)}else t(H)}catch(H){console.error("Error fetching signals:",H),L("Failed to load signals. Please try again.")}n(!1)},G=async()=>{try{const J=(await ka.InvokeLLM({prompt:`Generate 5 realistic trading signals for major forex and crypto pairs like EUR/USD, GBP/USD, BTC/USD, etc. Include current price, entry point, stop loss, take profit, timeframe, confidence level, and reasoning. 775 776 For cryptocurrencies use realistic price ranges: 777 - BTC/USD: around $43,000-$45,000 778 - ETH/USD: around $2,200-$2,400 779 - XRP/USD: around $0.55-$0.65 780 781 Include relevant news items and social sentiment data for each signal. Make sure they're varied: some buys, some sells, different timeframes, different confidence levels. Be creative with the reasoning but keep it realistic. The signals are for the platform robot4trade.com.`,response_json_schema:{type:"object",properties:{signals:{type:"array",items:{type:"object",properties:{symbol:{type:"string"},direction:{type:"string",enum:["buy","sell"]},entry_price:{type:"number"},stop_loss:{type:"number"},take_profit:{type:"number"},confidence:{type:"number"},timeframe:{type:"string"},reasoning:{type:"string"},news_impact:{type:"array",items:{type:"object",properties:{title:{type:"string"},impact:{type:"string",enum:["high","medium","low"]},sentiment:{type:"string",enum:["positive","negative","neutral"]}}}},social_sentiment:{type:"object",properties:{twitter:{type:"number"},telegram:{type:"number"},reddit:{type:"number"}}}}}}}}})).signals.map(ee=>{if(ee.symbol.includes("BTC")&&ee.entry_price<1e3){const Y=ee.entry_price*1e3,X=Math.abs(ee.take_profit-ee.stop_loss);return{...ee,entry_price:Y,take_profit:ee.direction==="buy"?Y+X*1e3:Y-X*1e3,stop_loss:ee.direction==="buy"?Y-X*1e3:Y+X*1e3}}return ee});for(const ee of J){const Y=new Date;Y.setHours(Y.getHours()+24),await je.Signal.create({...ee,created_date:new Date().toISOString(),expiration:Y.toISOString(),status:"active"})}}catch(H){console.error("Error generating signals:",H)}},W=H=>{l(H===o?null:H)},q=async(H,J)=>{try{console.log(`Signal action: ${J} for ${H.symbol}`),await je.Signal.update(H.id,{status:"executed"}),U()}catch(ee){console.error("Error handling signal action:",ee)}},V=H=>{S(H),H&&H.length>0&&H.filter(ee=>ee.sentiment!=="neutral"||ee.topics&&ee.topics.some(Y=>["forex","crypto","central bank","rates"].includes(Y))).length>0&&(d(!0),h(!0))},z=H=>{T(H)},I=H=>{M(H)};return a.jsxs("div",{className:"space-y-6",children:[a.jsx(Qpe,{}),a.jsx(ole,{src:"https://assets.mixkit.co/sfx/preview/mixkit-short-notification-tone-2353.mp3",play:u}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(Ya,{className:"h-12 w-12"}),a.jsxs("div",{children:[a.jsxs("h1",{className:"text-2xl font-bold text-white flex items-center gap-2",children:[a.jsx(Jy,{
781className:"h-6 w-6 text-cyan-400"}),"AI Signal Center"]}),a.jsx("p",{className:"text-gray-400",children:"AI-powered market analysis and trading signals"})]})]}),a.jsx(se,{className:"bg-gradient-to-r from-purple-600 to-indigo-600 hover:from-purple-700 hover:to-indigo-700",onClick:G,disabled:r,children:r?a.jsxs(a.Fragment,{children:[a.jsx(Xr,{className:"mr-2 h-4 w-4 animate-spin"}),"Generating..."]}):a.jsxs(a.Fragment,{children:[a.jsx(er,{className:"mr-2 h-4 w-4"}),"Generate New Signal"]})})]}),a.jsx(Pme,{points:b,level:m,achievements:w,rank:y}),a.jsx(vc,{children:c&&a.jsxs(Sr.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},className:"bg-gradient-to-r from-cyan-900 to-blue-900 border border-cyan-500/30 rounded-lg p-4 flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"p-2 bg-cyan-400/20 rounded-full",children:a.jsx(Lt,{className:"h-6 w-6 text-cyan-400"})}),a.jsxs("div",{children:[a.jsx("h3",{className:"font-medium text-white",children:"New Signal Available"}),a.jsx("p",{className:"text-gray-300 text-sm",children:j&&j.length>0?`Based on: ${j[0].title}`:"USD/JPY sell opportunity detected based on recent Fed announcements"})]})]}),a.jsx(se,{variant:"outline",className:"border-cyan-500/30 text-cyan-400 hover:bg-cyan-500/10",onClick:()=>d(!1),children:"View Details"})]})}),a.jsxs("div",{className:"relative",children:[a.jsx(al,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-500"}),a.jsx(Je,{placeholder:"Search signals, news, or economic events...",value:C,onChange:H=>O(H.target.value),className:"pl-10 bg-gray-800 border-gray-700 text-white"})]}),a.jsxs(ei,{defaultValue:"signals",value:i,onValueChange:s,children:[a.jsxs(Ta,{className:"bg-gray-800 border-b border-gray-700 w-full justify-start",children:[a.jsxs(Nt,{value:"signals",className:"data-[state=active]:bg-gray-700",children:[a.jsx(Jy,{className:"h-4 w-4 mr-2"}),"Trading Signals"]}),a.jsxs(Nt,{value:"news",className:"data-[state=active]:bg-gray-700",children:[a.jsx(Gh,{className:"h-4 w-4 mr-2"}),"News Analysis"]}),a.jsxs(Nt,{value:"social",className:"data-[state=active]:bg-gray-700",children:[a.jsx(Qo,{className:"h-4 w-4 mr-2"}),"Social Sentiment"]}),a.jsxs(Nt,{value:"economic",className:"data-[state=active]:bg-gray-700",children:[a.jsx(Xy,{className:"h-4 w-4 mr-2"}),"Economic Calendar"]})]}),a.jsx(Pt,{value:"signals",className:"mt-6",children:a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[a.jsx("div",{className:"lg:col-span-2 space-y-4",children:D?a.jsx(be,{className:"bg-red-900/20 border-red-800",children:a.jsxs(Se,{className:"p-6 text-center",children:[a.jsx(Lt,{className:"h-8 w-8 text-red-500 mx-auto mb-3"}),a.jsx("p",{className:"text-red-400",children:D}),a.jsxs(se,{onClick:U,variant:"outline",className:"mt-4 border-red-800 text-red-400 hover:bg-red-900/20",children:[a.jsx(Xr,{className:"h-4 w-4 mr-2"}),"Try Again"]})]})}):r?a.jsx(be,{className:"bg-gray-800 border-gray-700",children:a.jsx(Se,{className:"p-6",children:a.jsx("div",{className:"flex justify-center my-12",children:a.jsx("div",{className:"animate-spin h-8 w-8 rounded-full border-4 border-cyan-500 border-t-transparent"})})})}):e.length===0?a.jsx(be,{className:"bg-gray-800 border-gray-700",children:a.jsx(Se,{className:"p-6 text-center",children:a.jsx("p",{className:"text-gray-400",children:"No signals available. Generate new signals to get started."})})}):e.map(H=>a.jsx(Ome,{signal:H,isExpanded:o===H.symbol,onClick:()=>W(H.symbol),onAction:J=>q(H,J)},H.id))}),a.jsx("div",{children:a.jsx(S1,{onQuoteUpdate:z})})]})}),a.jsx(Pt,{value:"news",className:"mt-6",children:a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[a.jsx("div",{className:"lg:col-span-2",children:a.jsx(u9,{onNewsUpdate:V})}),a.jsxs("div",{className:"space-y-6",children:[a.jsxs(be,{className:"bg-gray-800 border-gray-700 sticky top-4",children:[a.jsx(Be,{className:"pb-2",children:a.jsxs(qe,{className:"text-white flex items-center gap-2",children:[a.jsx(ln,{className:"h-5 w-5 text-purple-400"}),"Impact Summary"]})}),a.jsx(Se,{className:"p-4",children:a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-2",children:"Market Mood"}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"flex-1 h-2 bg-gray-700 rounded-full overflow-hidden",children:a.jsx("div",{className:"h-full bg-green-500",style:{width:"65%"}})}),a.jsx("span",{className:"text-sm text-green-400",children:"Bullish"})]})]}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-2",children:"Top Affected Assets"}),a.jsx("div",{className:"space-y-2",children:j&&j.length>0&&j[0].tickers?j[0].tickers.slice(0,4).map((H,J)=>a.jsxs("div",{className:"flex justify-between items-center",children:[a.jsx("span",{className:"text-gray-300",children:H}),a.jsx(Oe,{className:j[0].sentiment==="positive"?"bg-green-500/20 text-green-400":j[0].sentiment==="negative"?"bg-red-500/20 text-red-400":"bg-yellow-500/20 text-yellow-400",children:j[0].sentiment==="positive"?"Positive":j[0].sentiment==="negative"?"Negative":"Neutral"})]},J)):a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex justify-between items-center",children:[a.jsx("span",{className:"text-gray-300",children:"EUR/USD"}),a.jsx(Oe,{className:"bg-red-500/20 text-red-400",children:"High Impact"})]}),a.jsxs("div",{className:"flex justify-between items-center",children:[a.jsx("span",{className:"text-gray-300",children:"BTC/USD"}),a.jsx(Oe,{className:"bg-yellow-500/20 text-yellow-400",children:"Medium Impact"})]})]})})]}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-2",children:"Key Themes"}),a.jsx("div",{className:"flex flex-wrap gap-2",children:j&&j.length>0&&j[0].topics?j[0].topics.map((H,J)=>a.jsx(Oe,{variant:"outline",className:"border-blue-500/50",children:H},J)):a.jsxs(a.Fragment,{children:[a.jsx(Oe,{variant:"outline",className:"border-blue-500/50",children:"Central Banks"}),a.jsx(Oe,{variant:"outline",className:"border-purple-500/50",children:"Inflation"}),a.jsx(Oe,{variant:"outline",className:"border-green-500/50",children:"Employment"})]})})]})]})})]}),a.jsx(S1,{onQuoteUpdate:z})]})]})}),a.jsx(Pt,{value:"social",className:"mt-6",children:a.jsx(Xpe,{onInsightsGenerated:I})}),a.jsx(Pt,{value:"economic",className:"mt-6",children:a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[a.jsx("div",{className:"lg:col-span-2",children:a.jsxs(be,{className:"bg-gray-800 border-gray-700",children:[a.jsxs(Be,{className:"pb-2 flex justify-between items-center",children:[a.jsxs(qe,{className:"text-white flex items-center gap-2",children:[a.jsx(Xy,{className:"h-5 w-5 text-indigo-400"}),"Economic Calendar"]}),a.jsxs(se,{variant:"outline",className:"border-gray-700",children:[a.jsx(Xr,{className:"h-4 w-4 mr-2"}),"Refresh"]})]}),a.jsx(Se,{className:"p-4",children:a.jsx("div",{className:"space-y-4",children:Array(7).fill(0).map((H,J)=>{const ee=new Date;return ee.setDate(ee.getDate()+J),a.jsxs("div",{className:"mb-6",children:[a.jsx("h3",{className:"font-medium text-white mb-3",children:ee.toLocaleDateString("en-US",{weekday:"long",month:"short",day:"numeric"})}),J===0?a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{className:"p-3 bg-gray-850 rounded-lg border border-red-500/30",children:[a.jsxs("div",{className:"flex justify-between mb-1",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Oe,{className:"bg-red-500/20 text-red-400",children:"High"}),a.jsx("span",{className:"font-medium text-white",children:"FOMC Statement"})]}),a.jsx("span",{className:"text-gray-400 text-sm",children:"14:00 EDT"})]}),a.jsx("p",{className:"text-sm text-gray-400 mb-2",children:"Federal Reserve's rate decision and monetary policy statement"}),a.jsxs("div",{className:"flex flex-wrap gap-1",children:[a.jsx(Oe,{variant:"outline",className:"border-gray-700 text-xs",children:"USD"}),a.jsx(Oe,{variant:"outline",className:"border-gray-700 text-xs",children:"EUR/USD"}),a.jsx(Oe,{variant:"outline",className:"border-gray-700 text-xs",children:"Gold"})]})]}),a.jsxs("div",{className:"p-3 bg-gray-850 rounded-lg border border-yellow-500/30",children:[a.jsxs("div",{className:"flex justify-between mb-1",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Oe,{className:"bg-yellow-500/20 text-yellow-400",children:"Medium"}),a.jsx("span",{className:"font-medium text-white",children:"German CPI m/m"})]}),a.jsx("span",{className:"text-gray-400 text-sm",children:"08:00 EDT"})]}),a.jsxs("div",{className:"flex justify-between text-sm",children:[a.jsx("span",{className:"text-gray-400",children:"Previous: 0.2%"}),a.jsx("span",{className:"text-gray-400",children:"Forecast: 0.3%"})]})]})]}):J===1?a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{className:"p-3 bg-gray-850 rounded-lg border border-red-500/30",children:[a.jsxs("div",{className:"flex justify-between mb-1",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Oe,{className:"bg-red-500/20 text-red-400",children:"High"}),a.jsx("span",{className:"font-medium text-white",children:"US Non-Farm Payrolls"})]}),a.jsx("span",{className:"text-gray-400 text-sm",children:"08:30 EDT"})]}),a.jsxs("div",{className:"flex justify-between text-sm",children:[a.jsx("span",{className:"text-gray-400",children:"Previous: 187K"}),a.jsx("span",{className:"text-gray-400",children:"Forecast: 175K"})]})]}),a.jsxs("div",{className:"p-3 bg-gray-850 rounded-lg border border-blue-500/30",children:[a.jsxs("div",{className:"flex justify-between mb-1",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Oe,{className:"bg-blue-500/20 text-blue-400",children:"Low"}),a.jsx("span",{className:"font-medium text-white",children:"Japan GDP q/q"})]}),a.jsx("span",{className:"text-gray-400 text-sm",children:"19:50 EDT"})]}),a.jsxs("div",{className:"flex justify-between text-sm",children:[a.jsx("span",{className:"text-gray-400",children:"Previous: 1.5%"}),a.jsx("span",{className:"text-gray-400",children:"Forecast: 0.8%"})]})]})]}):a.jsx("div",{className:"p-3 bg-gray-850 rounded-lg border border-gray-700",children:a.jsx("p",{className:"text-sm text-gray-400 text-center",children:"No major events scheduled"})})]},J)})})})]})}),a.jsxs("div",{className:"space-y-6",children:[a.jsxs(be,{className:"bg-gray-800 border-gray-700 sticky top-4",children:[a.jsx(Be,{className:"pb-2",children:a.jsxs(qe,{className:"text-white flex items-center gap-2",children:[a.jsx(ln,{className:"h-5 w-5 text-purple-400"}),"Event Analysis"]})}),a.jsx(Se,{className:"p-4",children:a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-2",children:"Impact Overview"}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex justify-between items-center",children:[a.jsx("span",{className:"text-gray-300",children:"High Impact"}),a.jsx(Oe,{className:"bg-red-500/20 text-red-400",children:"2 Events"})]}),a.jsxs("div",{className:"flex justify-between items-center",children:[a.jsx("span",{className:"text-gray-300",children:"Medium Impact"}),a.jsx(Oe,{className:"bg-yellow-500/20 text-yellow-400",children:"1 Event"})]})]})]}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-2",children:"Most Watched"}),a.jsx("div",{className:"space-y-2",children:a.jsxs("div",{className:"p-2 bg-gray-900 rounded-lg",children:[a.jsxs("div",{className:"flex justify-between items-center mb-1",children:[a.jsx("span",{className:"text-sm text-white",children:"FOMC Statement"}),a.jsx(Oe,{className:"bg-red-500/20 text-red-400",children:"High"})]}),a.jsx("p",{className:"text-xs text-gray-400",children:"Major USD pairs volatility expected"})]})})]}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-2",children:"Trading Tips"}),a.jsx("div",{className:"p-3 bg-yellow-500/10 border border-yellow-500/20 rounded-lg",children:a.jsx("p",{className:"text-sm text-yellow-400",children:"Consider reducing position sizes during high-impact news events"})})]})]})})]}),a.jsx(S1,{onQuoteUpdate:z})]})]})})]}),a.jsx(be,{className:"bg-gradient-to-r from-gray-800 to-gray-900 border-gray-700",children:a.jsx(Se,{className:"p-4",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(Ya,{className:"h-10 w-10"}),a.jsxs("div",{children:[a.jsx("h3",{className:"font-medium text-white",children:"robot4trade.com"}),a.jsx("p",{className:"text-sm text-gray-400",children:"Professional AI trading solutions"})]})]}),a.jsxs(se,{variant:"outline",className:"border-gray-700 text-gray-300 hover:bg-gray-700",children:[a.jsx(er,{className:"h-4 w-4 mr-2"}),"Upgrade to Pro"]})]})})})]})}function Ve(e){return"/"+e.replace(/ /g,"-")}const Jpe={enter:e=>({x:e>0?1e3:-1e3,opacity:0,scale:.8}),center:{zIndex:1,x:0,opacity:1,scale:1},exit:e=>({zIndex:0,x:e<0?1e3:-1e3,opacity:0,scale:.8})},$5=1e4,ege=(e,t)=>
781Math.abs(e)*t;function tge({images:e}){var l,c,d;const[[t,r],n]=A.useState([0,0]);if(!Array.isArray(e)||e.length===0)return a.jsx("p",{className:"text-center text-gray-400",children:"No images to display."});const i=(t%e.length+e.length)%e.length,s=u=>{n([t+u,u])},o=u=>{const h=u>(t%e.length+e.length)%e.length?1:-1;n([u,h])};return a.jsxs("div",{className:"relative w-full max-w-2xl mx-auto h-[450px] md:h-[550px] flex items-center justify-center overflow-hidden rounded-lg bg-gray-900/30 py-4",children:[a.jsx(vc,{initial:!1,custom:r,children:a.jsxs(Sr.div,{custom:r,variants:Jpe,initial:"enter",animate:"center",exit:"exit",transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.3},scale:{duration:.3}},drag:"x",dragConstraints:{left:0,right:0},dragElastic:.7,onDragEnd:(u,{offset:h,velocity:m})=>{const g=ege(h.x,m.x);g<-$5?s(1):g>$5&&s(-1)},className:"absolute w-[80%] h-[80%] md:w-[70%] md:h-[85%] cursor-grab active:cursor-grabbing",children:[a.jsx(Sr.img,{src:(l=e[i])==null?void 0:l.image,alt:(c=e[i])==null?void 0:c.alt,className:"w-full h-full object-contain rounded-md shadow-2xl",whileHover:{scale:1.35,zIndex:50,boxShadow:"0px 0px 30px rgba(255,255,255,0.3)",transition:{duration:.2,ease:"circOut"}},loading:"lazy"}),((d=e[i])==null?void 0:d.name)&&a.jsx("div",{className:"absolute bottom-3 left-1/2 transform -translate-x-1/2 bg-black/60 text-white px-3 py-1 rounded-md text-sm shadow-lg",children:e[i].name})]},t)}),e.length>1&&a.jsxs(a.Fragment,{children:[a.jsx(se,{variant:"ghost",size:"icon",className:"absolute top-1/2 left-2 md:left-4 transform -translate-y-1/2 bg-black/40 hover:bg-black/60 text-white rounded-full z-20 p-2 h-10 w-10 md:h-12 md:w-12",onClick:()=>s(-1),"aria-label":"Previous image",children:a.jsx(MB,{className:"h-5 w-5 md:h-6 md:w-6"})}),a.jsx(se,{variant:"ghost",size:"icon",className:"absolute top-1/2 right-2 md:right-4 transform -translate-y-1/2 bg-black/40 hover:bg-black/60 text-white rounded-full z-20 p-2 h-10 w-10 md:h-12 md:w-12",onClick:()=>s(1),"aria-label":"Next image",children:a.jsx(ip,{className:"h-5 w-5 md:h-6 md:w-6"})}),a.jsx("div",{className:"absolute bottom-5 left-1/2 transform -translate-x-1/2 flex space-x-2.5 z-20",children:e.map((u,h)=>a.jsx("button",{onClick:()=>o(h),className:`w-2.5 h-2.5 md:w-3 md:h-3 rounded-full transition-colors duration-300 ${h===i?"bg-cyan-400 scale-125":"bg-gray-500/70 hover:bg-gray-400/70"}`,"aria-label":`Go to image ${h+1}`},h))})]})]})}const rge=[{id:1,name:"Alex Monfort",image:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/74231a764_TP2.jpg",alt:"Testimonial from Alex Monfort about robot4trade"},{id:2,name:"Sayed Mohd Al-alawi",image:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/e5e3ec849_TP3.jpg",alt:"Testimonial from Sayed Mohd Al-alawi about robot4trade"},{id:3,name:"Nicoleta Escov",image:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/53a804a0e_TP4.jpg",alt:"Testimonial from Nicoleta Escov about robot4trade"},{id:4,name:"Andrew Diffey",image:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/4243e28c1_TP5.jpg",alt:"Testimonial from Andrew Diffey about robot4trade"},{id:5,name:"Alexander",image:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/227d00951_TP6.jpg",alt:"Testimonial from Alexander about robot4trade"}],nge="https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/5870ddd4c_UB4.jpg";function age(){return a.jsxs("div",{className:"container mx-auto max-w-6xl p-3 sm:p-4 md:p-6 lg:p-8 space-y-8 sm:space-y-12",children:[" ",a.jsxs("header",{className:"text-center space-y-3 sm:space-y-4",children:[a.jsx(Ya,{className:"h-16 w-16 sm:h-20 sm:w-20 mx-auto"}),a.jsxs("h1",{className:"text-2xl sm:text-3xl lg:text-4xl font-bold text-white",children:["About ",a.jsx("span",{className:"bg-gradient-to-r from-cyan-400 to-blue-500 bg-clip-text text-transparent",children:"robot4trade"})]}),a.jsx("p",{className:"text-sm sm:text-base lg:text-lg text-gray-400 max-w-3xl mx-auto",children:"Empowering traders with cutting-edge AI technology to navigate the complexities of financial markets and unlock new opportunities."})]}),a.jsxs(be,{className:"bg-gray-800 border-gray-700 shadow-xl",children:[a.jsx(Be,{className:"p-4 sm:p-6",children:a.jsxs(qe,{className:"text-lg sm:text-xl lg:text-2xl text-white flex items-center",children:[a.jsx(Xo,{className:"h-5 w-5 sm:h-6 sm:w-6 mr-2 sm:mr-3 text-cyan-400 flex-shrink-0"}),"Our Mission"]})}),a.jsxs(Se,{className:"text-gray-300 space-y-3 sm:space-y-4 p-4 sm:p-6 text-sm sm:text-base",children:[a.jsx("p",{children:"At robot4trade, we are dedicated to democratizing algorithmic trading. Our platform provides intuitive AI-powered tools that enable traders of all levels to design, test, and deploy sophisticated trading robots and strategies without needing to write a single line of code."}),a.jsx("p",{children:"We believe in innovation, transparency, and community. Our goal is to provide a comprehensive ecosystem where traders can learn, share, and succeed together, backed by powerful AI insights and robust technology."})]})]}),a.jsxs(be,{className:"bg-gray-800 border-gray-700 shadow-xl",children:[a.jsx(Be,{className:"p-4 sm:p-6",children:a.jsxs(qe,{className:"text-lg sm:text-xl lg:text-2xl text-white flex items-center",children:[a.jsx(Qr,{className:"h-5 w-5 sm:h-6 sm:w-6 mr-2 sm:mr-3 text-green-400 flex-shrink-0"}),"Proven Performance"]})}),a.jsxs(Se,{className:"p-4 sm:p-6",children:[a.jsx("p",{className:"text-gray-400 mb-4 text-sm sm:text-base",children:"We are committed to transparency and results. Here's a snapshot of what our tools can achieve:"}),a.jsx("div",{className:"rounded-lg overflow-hidden border-2 border-cyan-500/30 shadow-2xl",children:a.jsx("img",{src:nge,alt:"robot4trade Performance Snapshot",className:"w-full h-auto object-contain",loading:"lazy"})})]})]}
781),a.jsxs("section",{className:"space-y-4 sm:space-y-6",children:[a.jsxs("h2",{className:"text-xl sm:text-2xl lg:text-3xl font-bold text-white text-center flex items-center justify-center",children:[a.jsx(la,{className:"h-6 w-6 sm:h-8 sm:w-8 mr-2 sm:mr-3 text-purple-400 flex-shrink-0"}),"What Our Clients Say"]}),a.jsx(be,{className:"bg-gray-800 border-gray-700 shadow-xl",children:a.jsx(Se,{className:"p-4 sm:p-6",children:a.jsx(tge,{images:rge})})})]}),a.jsxs("section",{className:"space-y-4 sm:space-y-6",children:[a.jsxs("h2",{className:"text-xl sm:text-2xl lg:text-3xl font-bold text-white text-center flex items-center justify-center",children:[a.jsx(er,{className:"h-6 w-6 sm:h-8 sm:w-8 mr-2 sm:mr-3 text-cyan-400 flex-shrink-0"}),"Why Choose robot4trade?"]}),a.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 sm:gap-6",children:[{icon:a.jsx(Xo,{className:"h-6 w-6 sm:h-8 sm:w-8 text-blue-400"}),title:"AI-Powered Solutions",description:"Advanced artificial intelligence drives our trading algorithms and strategy recommendations."},{icon:a.jsx(la,{className:"h-6 w-6 sm:h-8 sm:w-8 text-green-400"}),title:"Community Driven",description:"Join thousands of traders sharing strategies, insights, and expert advisors."},{icon:a.jsx(Eo,{className:"h-6 w-6 sm:h-8 sm:w-8 text-purple-400"}),title:"Proven Results",description:"Our platform has generated over 1,200 successful trading bots with high performance rates."},{icon:a.jsx(Qr,{className:"h-6 w-6 sm:h-8 sm:w-8 text-cyan-400"}),title:"No Coding Required",description:"Create sophisticated trading robots without writing a single line of code."},{icon:a.jsx(Kr,{className:"h-6 w-6 sm:h-8 sm:w-8 text-yellow-400"}),title:"Professional Support",description:"Get help from our expert team and active community whenever you need it."},{icon:a.jsx(er,{className:"h-6 w-6 sm:h-8 sm:w-8 text-pink-400"}),title:"Continuous Innovation",description:"We constantly improve our platform with new features and cutting-edge technology."}].map((e,t)=>a.jsx(be,{className:"bg-gray-800 border-gray-700 shadow-lg hover:shadow-xl transition-shadow p-4 sm:p-6",children:a.jsxs("div",{className:"flex flex-col items-center text-center space-y-3 sm:space-y-4",children:[e.icon,a.jsx("h3",{className:"text-base sm:text-lg font-semibold text-white",children:e.title}),a.jsx("p",{className:"text-sm sm:text-base text-gray-400",children:e.description})]})},t))})]}),a.jsx(be,{className:"bg-gradient-to-r from-cyan-900 to-blue-900 border-cyan-500/20 shadow-xl",children:a.jsxs(Se,{className:"text-center p-6 sm:p-8 lg:p-12",children:[a.jsx("h2",{className:"text-xl sm:text-2xl lg:text-3xl font-bold text-white mb-3 sm:mb-4",children:"Ready to Transform Your Trading?"}),a.jsx("p",{className:"text-sm sm:text-base lg:text-lg text-gray-300 mb-6 sm:mb-8 max-w-2xl mx-auto",children:"Join thousands of successful traders who are already using robot4trade to automate their trading strategies and maximize their profits."}),a.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 sm:gap-4 justify-center items-center",children:[a.jsx(se,{asChild:!0,size:"lg",className:"bg-gradient-to-r from-cyan-500 to-blue-600 hover:from-cyan-600 hover:to-blue-700 w-full sm:w-auto",children:a.jsx(pt,{to:Ve("MqlGenerator"),children:"Get Started Now"})}),a.jsx(se,{asChild:!0,variant:"outline",size:"lg",className:"border-cyan-400/30 text-cyan-400 hover:bg-cyan-950/20 w-full sm:w-auto",children:a.jsx(pt,{to:Ve("Community"),children:"Explore Community"})})]})]})})]})}function YA(e,[t,r]){return Math.min(r,Math.max(t,e))}var A1=0;function uT(){A.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??F5()),document.body.insertAdjacentElement("beforeend",e[1]??F5()),A1++,()=>{A1===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),A1--}},[])}function F5(){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 k1="focusScope.autoFocusOnMount",E1="focusScope.autoFocusOnUnmount",B5={bubbles:!1,cancelable:!0},ige="FocusScope",Jv=A.forwardRef((e,t)=>
vendor: 4,842 bytes, line 781
781{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...o}=e,[l,c]=A.useState(null),d=on(i),u=on(s),h=A.useRef(null),m=wt(t,v=>c(v)),g=A.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;A.useEffect(()=>{if(n){let v=function(_){if(g.paused||!l)return;const j=_.target;l.contains(j)?h.current=j:So(h.current,{select:!0})},y=function(_){if(g.paused||!l)return;const j=_.relatedTarget;j!==null&&(l.contains(j)||So(h.current,{select:!0}))},x=function(_){if(document.activeElement===document.body)for(const S of _)S.removedNodes.length>0&&So(l)};document.addEventListener("focusin",v),document.addEventListener("focusout",y);const w=new MutationObserver(x);return l&&w.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",y),w.disconnect()}}},[n,l,g.paused]),A.useEffect(()=>{if(l){q5.add(g);const v=document.activeElement;if(!l.contains(v)){const x=new CustomEvent(k1,B5);l.addEventListener(k1,d),l.dispatchEvent(x),x.defaultPrevented||(sge(dge(d9(l)),{select:!0}),document.activeElement===v&&So(l))}return()=>{l.removeEventListener(k1,d),setTimeout(()=>{const x=new CustomEvent(E1,B5);l.addEventListener(E1,u),l.dispatchEvent(x),x.defaultPrevented||So(v??document.body,{select:!0}),l.removeEventListener(E1,u),q5.remove(g)},0)}}},[l,d,u,g]);const b=A.useCallback(v=>{if(!r&&!n||g.paused)return;const y=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,x=document.activeElement;if(y&&x){const w=v.currentTarget,[_,j]=oge(w);_&&j?!v.shiftKey&&x===j?(v.preventDefault(),r&&So(_,{select:!0})):v.shiftKey&&x===_&&(v.preventDefault(),r&&So(j,{select:!0})):x===w&&v.preventDefault()}},[r,n,g.paused]);return a.jsx(st.div,{tabIndex:-1,...o,ref:m,onKeyDown:b})});Jv.displayName=ige;function sge(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(So(n,{select:t}),document.activeElement!==r)return}function oge(e){const t=d9(e),r=U5(t,e),n=U5(t.reverse(),e);return[r,n]}function d9(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 U5(e,t){for(const r of e)if(!lge(r,{upTo:t}))return r}function lge(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 cge(e){return e instanceof HTMLInputElement&&"select"in e}function So(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&cge(e)&&t&&e.select()}}var q5=uge();function uge(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=z5(e,t),e.unshift(t)},remove(t){var r;e=z5(e,t),(r=e[0])==null||r.resume()}}}function z5(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function dge(e){return e.filter(t=>t.tagName!=="A")}function dT(e){const t=A.useRef({value:e,previous:e});return A.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var fge=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},pu=new WeakMap,cy=new WeakMap,uy={},T1=0,f9=function(e){return e&&(e.host||f9(e.parentNode))},hge=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=f9(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})},mge=function(e,t,r,n){var i=hge(t,Array.isArray(e)?e:[e]);uy[r]||(uy[r]=new WeakMap);var s=uy[r],o=[],l=new Set,c=new Set(i),d=function(h){!h||l.has(h)||(l.add(h),d(h.parentNode))};i.forEach(d);var u=function(h){!h||c.has(h)||Array.prototype.forEach.call(h.children,function(m){if(l.has(m))u(m);else try{var g=m.getAttribute(n),b=g!==null&&g!=="false",v=(pu.get(m)||0)+1,y=(s.get(m)||0)+1;pu.set(m,v),s.set(m,y),o.push(m),v===1&&b&&cy.set(m,!0),y===1&&m.setAttribute(r,"true"),b||m.setAttribute(n,"true")}catch(x){console.error("aria-hidden: cannot operate on ",m,x)}})};return u(t),l.clear(),T1++,function(){o.forEach(function(h){var m=pu.get(h)-1,g=s.get(h)-1;pu.set(h,m),s.set(h,g),m||(cy.has(h)||h.removeAttribute(n),cy.delete(h)),g||h.removeAttribute(r)}),T1--,T1||(pu=new WeakMap,pu=new WeakMap,cy=new WeakMap,uy={})}},fT=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=fge(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live], script"))),mge(n,i,r,"aria-hidden")):function(){return null}},Ui=function(){return Ui=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];
vendor: 5,521 bytes, lines 781-796
781for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},Ui.apply(this,arguments)};function h9(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 pge(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}var qy="right-scroll-bar-position",zy="width-before-scroll-bar",gge="with-scroll-bars-hidden",yge="--removed-body-scroll-bar-size";function P1(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function vge(e,t){var r=A.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 xge=typeof window<"u"?A.useLayoutEffect:A.useEffect,V5=new WeakMap;function bge(e,t){var r=vge(null,function(n){return e.forEach(function(i){return P1(i,n)})});return xge(function(){var n=V5.get(r);if(n){var i=new Set(n),s=new Set(e),o=r.current;i.forEach(function(l){s.has(l)||P1(l,null)}),s.forEach(function(l){i.has(l)||P1(l,o)})}V5.set(r,e)},[e]),r}function wge(e){return e}function jge(e,t){t===void 0&&(t=wge);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(s){var o=t(s,n);return r.push(o),function(){r=r.filter(function(l){return l!==o})}},assignSyncMedium:function(s){for(n=!0;r.length;){var o=r;r=[],o.forEach(s)}r={push:function(l){return s(l)},filter:function(){return r}}},assignMedium:function(s){n=!0;var o=[];if(r.length){var l=r;r=[],l.forEach(s),o=r}var c=function(){var u=o;o=[],u.forEach(s)},d=function(){return Promise.resolve().then(c)};d(),r={push:function(u){o.push(u),d()},filter:function(u){return o=o.filter(u),r}}}};return i}function Nge(e){e===void 0&&(e={});var t=jge(null);return t.options=Ui({async:!0,ssr:!1},e),t}var m9=function(e){var t=e.sideCar,r=h9(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 A.createElement(n,Ui({},r))};m9.isSideCarExport=!0;function _ge(e,t){return e.useMedium(t),m9}var p9=Nge(),C1=function(){},ex=A.forwardRef(function(e,t){var r=A.useRef(null),n=A.useState({onScrollCapture:C1,onWheelCapture:C1,onTouchMoveCapture:C1}),i=n[0],s=n[1],o=e.forwardProps,l=e.children,c=e.className,d=e.removeScrollBar,u=e.enabled,h=e.shards,m=e.sideCar,g=e.noRelative,b=e.noIsolation,v=e.inert,y=e.allowPinchZoom,x=e.as,w=x===void 0?"div":x,_=e.gapMode,j=h9(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=m,k=bge([r,t]),T=Ui(Ui({},j),i);return A.createElement(A.Fragment,null,u&&A.createElement(S,{sideCar:p9,removeScrollBar:d,shards:h,noRelative:g,noIsolation:b,inert:v,setCallbacks:s,allowPinchZoom:!!y,lockRef:r,gapMode:_}),o?A.cloneElement(A.Children.only(l),Ui(Ui({},T),{ref:k})):A.createElement(w,Ui({},T,{className:c,ref:k}),l))});ex.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ex.classNames={fullWidth:zy,zeroRight:qy};var Sge=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Age(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Sge();return t&&e.setAttribute("nonce",t),e}function kge(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ege(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Tge=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Age())&&(kge(t,r),Ege(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Pge=function(){var e=Tge();return function(t,r){A.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},g9=function(){var e=Pge(),t=function(r){var n=r.styles,i=r.dynamic;return e(n,i),null};return t},Cge={left:0,top:0,right:0,gap:0},O1=function(e){return parseInt(e||"",10)||0},Oge=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[O1(r),O1(n),O1(i)]},Mge=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Cge;var t=Oge(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])}},Rge=g9(),Du="data-scroll-locked",Dge=function(e,t,r,n){var i=e.left,s=e.top,o=e.right,l=e.gap;return r===void 0&&(r="margin"),` 782 .`.concat(gge,` { 783 overflow: hidden `).concat(n,`; 784 padding-right: `).concat(l,"px ").concat(n,`; 785 } 786 body[`).concat(Du,`] { 787 overflow: hidden `).concat(n,`; 788 overscroll-behavior: contain; 789 `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` 790 padding-left: `.concat(i,`px; 791 padding-top: `).concat(s,`px; 792 padding-right: `).concat(o,`px; 793 margin-left:0; 794 margin-top:0; 795 margin-right: `).concat(l,"px ").concat(n,`; 796 `),r==="padding"&&"padding-right: ".concat(l,"px ").concat(n,";
796")].filter(Boolean).join(""),` 797 } 798 799 .`).concat(qy,` { 800 right: `).concat(l,"px ").concat(n,`; 801 } 802 803 .`).concat(zy,` { 804 margin-right: `).concat(l,"px ").concat(n,`; 805 } 806 807 .`).concat(qy," .").concat(qy,` { 808 right: 0 `).concat(n,`; 809 } 810 811 .`).concat(zy," .").concat(zy,` { 812 margin-right: 0 `).concat(n,`; 813 } 814 815 body[`).concat(Du,`] { 816 `).concat(yge,": ").concat(l,`px; 817 } 818`)},H5=function(){var e=parseInt(document.body.getAttribute(Du)||"0",10);return isFinite(e)?e:0},Ige=function(){A.useEffect(function(){return document.body.setAttribute(Du,(H5()+1).toString()),function(){var e=H5()-1;e<=0?document.body.removeAttribute(Du):document.body.setAttribute(Du,e.toString())}},[])},Lge=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n;Ige();var s=A.useMemo(function(){return Mge(i)},[i]);return A.createElement(Rge,{styles:Dge(s,!t,i,r?"":"!important")})},XA=!1;if(typeof window<"u")try{var dy=Object.defineProperty({},"passive",{get:function(){return XA=!0,!0}});window.addEventListener("test",dy,dy),window.removeEventListener("test",dy,dy)}catch{XA=!1}var gu=XA?{passive:!1}:!1,$ge=function(e){return e.tagName==="TEXTAREA"},y9=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!$ge(e)&&r[t]==="visible")},Fge=function(e){return y9(e,"overflowY")},Bge=function(e){return y9(e,"overflowX")},W5=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var i=v9(e,n);if(i){var s=x9(e,n),o=s[1],l=s[2];if(o>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Uge=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},qge=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},v9=function(e,t){return e==="v"?Fge(t):Bge(t)},x9=function(e,t){return e==="v"?Uge(t):qge(t)},zge=function(e,t){return e==="h"&&t==="rtl"?-1:1},Vge=function(e,t,r,n,i){var s=zge(e,window.getComputedStyle(t).direction),o=s*n,l=r.target,c=t.contains(l),d=!1,u=o>0,h=0,m=0;do{if(!l)break;var g=x9(e,l),b=g[0],v=g[1],y=g[2],x=v-y-s*b;(b||x)&&v9(e,l)&&(h+=x,m+=b);var w=l.parentNode;l=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(u&&Math.abs(h)<1||!u&&Math.abs(m)<1)&&(d=!0),d},fy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},G5=function(e){return[e.deltaX,e.deltaY]},K5=function(e){return e&&"current"in e?e.current:e},Hge=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Wge=function(e){return` 819 .block-interactivity-`.concat(e,` {pointer-events: none;} 820 .allow-interactivity-`).concat(e,` {pointer-events: all;} 821`)},Gge=0,yu=[];function Kge(e){var t=A.useRef([]),r=A.useRef([0,0]),n=A.useRef(),i=A.useState(Gge++)[0],s=A.useState(g9)[0],o=A.useRef(e);A.useEffect(function(){o.current=e},[e]),A.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var v=pge([e.lockRef.current],(e.shards||[]).map(K5),!0).filter(Boolean);return v.forEach(function(y){return y.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var l=A.useCallback(function(v,y){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!o.current.allowPinchZoom;var x=fy(v),w=r.current,_="deltaX"in v?v.deltaX:w[0]-x[0],j="deltaY"in v?v.deltaY:w[1]-x[1],S,k=v.target,T=Math.abs(_)>Math.abs(j)?"h":"v";if("touches"in v&&T==="h"&&k.type==="range")return!1;var P=W5(T,k);if(!P)return!0;if(P?S=T:(S=T==="v"?"h":"v",P=W5(T,k)),!P)return!1;if(!n.current&&"changedTouches"in v&&(_||j)&&(n.current=S),!S)return!0;var M=n.current||S;return Vge(M,y,v,M==="h"?_:j)},[]),c=A.useCallback(function(v){var y=v;if(!(!yu.length||yu[yu.length-1]!==s)){var x="deltaY"in y?G5(y):fy(y),w=t.current.filter(function(S){return S.name===y.type&&(S.target===y.target||y.target===S.shadowParent)&&Hge(S.delta,x)})[0];if(w&&w.should){y.cancelable&&y.preventDefault();return}
vendor: 4,140 bytes, line 821
821if(!w){var _=(o.current.shards||[]).map(K5).filter(Boolean).filter(function(S){return S.contains(y.target)}),j=_.length>0?l(y,_[0]):!o.current.noIsolation;j&&y.cancelable&&y.preventDefault()}}},[]),d=A.useCallback(function(v,y,x,w){var _={name:v,delta:y,target:x,should:w,shadowParent:Yge(x)};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(j){return j!==_})},1)},[]),u=A.useCallback(function(v){r.current=fy(v),n.current=void 0},[]),h=A.useCallback(function(v){d(v.type,G5(v),v.target,l(v,e.lockRef.current))},[]),m=A.useCallback(function(v){d(v.type,fy(v),v.target,l(v,e.lockRef.current))},[]);A.useEffect(function(){return yu.push(s),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:m}),document.addEventListener("wheel",c,gu),document.addEventListener("touchmove",c,gu),document.addEventListener("touchstart",u,gu),function(){yu=yu.filter(function(v){return v!==s}),document.removeEventListener("wheel",c,gu),document.removeEventListener("touchmove",c,gu),document.removeEventListener("touchstart",u,gu)}},[]);var g=e.removeScrollBar,b=e.inert;return A.createElement(A.Fragment,null,b?A.createElement(s,{styles:Wge(i)}):null,g?A.createElement(Lge,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Yge(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Xge=_ge(p9,Kge);var tx=A.forwardRef(function(e,t){return A.createElement(ex,Ui({},e,{ref:t,sideCar:Xge}))});tx.classNames=ex.classNames;var Qge=[" ","Enter","ArrowUp","ArrowDown"],Zge=[" ","Enter"],bc="Select",[rx,nx,Jge]=Lv(bc),[ef]=xn(bc,[Jge,Jd]),ax=Jd(),[eye,sl]=ef(bc),[tye,rye]=ef(bc),b9=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:i,onOpenChange:s,value:o,defaultValue:l,onValueChange:c,dir:d,name:u,autoComplete:h,disabled:m,required:g,form:b}=e,v=ax(t),[y,x]=A.useState(null),[w,_]=A.useState(null),[j,S]=A.useState(!1),k=Yd(d),[T,P]=Ka({prop:n,defaultProp:i??!1,onChange:s,caller:bc}),[M,C]=Ka({prop:o,defaultProp:l,onChange:c,caller:bc}),O=A.useRef(null),D=y?b||!!y.closest("form"):!0,[L,F]=A.useState(new Set),U=Array.from(L).map(G=>G.props.value).join(";");return a.jsx(rT,{...v,children:a.jsxs(eye,{required:g,scope:t,trigger:y,onTriggerChange:x,valueNode:w,onValueNodeChange:_,valueNodeHasChildren:j,onValueNodeHasChildrenChange:S,contentId:ja(),value:M,onValueChange:C,open:T,onOpenChange:P,dir:k,triggerPointerDownPosRef:O,disabled:m,children:[a.jsx(rx.Provider,{scope:t,children:a.jsx(tye,{scope:e.__scopeSelect,onNativeOptionAdd:A.useCallback(G=>{F(W=>new Set(W).add(G))},[]),onNativeOptionRemove:A.useCallback(G=>{F(W=>{const q=new Set(W);return q.delete(G),q})},[]),children:r})}),D?a.jsxs(V9,{"aria-hidden":!0,required:g,tabIndex:-1,name:u,autoComplete:h,value:M,onChange:G=>C(G.target.value),disabled:m,form:b,children:[M===void 0?a.jsx("option",{value:""}):null,Array.from(L)]},U):null]})})};b9.displayName=bc;var w9="SelectTrigger",j9=A.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...i}=e,s=ax(r),o=sl(w9,r),l=o.disabled||n,c=wt(t,o.onTriggerChange),d=nx(r),u=A.useRef("touch"),[h,m,g]=W9(v=>{const y=d().filter(_=>!_.disabled),x=y.find(_=>_.value===o.value),w=G9(y,v,x);w!==void 0&&o.onValueChange(w.value)}),b=v=>{l||(o.onOpenChange(!0),g()),v&&(o.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return a.jsx(nT,{asChild:!0,...s,children:a.jsx(st.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:l,"data-disabled":l?"":void 0,"data-placeholder":H9(o.value)?"":void 0,...i,ref:c,onClick:Ge(i.onClick,v=>{v.currentTarget.focus(),u.current!=="mouse"&&b(v)}),onPointerDown:Ge(i.onPointerDown,v=>{u.current=v.pointerType;const y=v.target;y.hasPointerCapture(v.pointerId)&&y.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(b(v),v.preventDefault())}),onKeyDown:Ge(i.onKeyDown,v=>{const y=h.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&m(v.key),!(y&&v.key===" ")&&Qge.includes(v.key)&&
vendor: 27,412 bytes, lines 821-825
821(b(),v.preventDefault())})})})});j9.displayName=w9;var N9="SelectValue",_9=A.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:i,children:s,placeholder:o="",...l}=e,c=sl(N9,r),{onValueNodeHasChildrenChange:d}=c,u=s!==void 0,h=wt(t,c.onValueNodeChange);return Mr(()=>{d(u)},[d,u]),a.jsx(st.span,{...l,ref:h,style:{pointerEvents:"none"},children:H9(c.value)?a.jsx(a.Fragment,{children:o}):s})});_9.displayName=N9;var nye="SelectIcon",S9=A.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...i}=e;return a.jsx(st.span,{"aria-hidden":!0,...i,ref:t,children:n||"â¼"})});S9.displayName=nye;var aye="SelectPortal",A9=e=>a.jsx(Np,{asChild:!0,...e});A9.displayName=aye;var wc="SelectContent",k9=A.forwardRef((e,t)=>{const r=sl(wc,e.__scopeSelect),[n,i]=A.useState();if(Mr(()=>{i(new DocumentFragment)},[]),!r.open){const s=n;return s?lp.createPortal(a.jsx(E9,{scope:e.__scopeSelect,children:a.jsx(rx.Slot,{scope:e.__scopeSelect,children:a.jsx("div",{children:e.children})})}),s):null}return a.jsx(T9,{...e,ref:t})});k9.displayName=wc;var pi=10,[E9,ol]=ef(wc),iye="SelectContentImpl",sye=yc("SelectContent.RemoveScroll"),T9=A.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:o,side:l,sideOffset:c,align:d,alignOffset:u,arrowPadding:h,collisionBoundary:m,collisionPadding:g,sticky:b,hideWhenDetached:v,avoidCollisions:y,...x}=e,w=sl(wc,r),[_,j]=A.useState(null),[S,k]=A.useState(null),T=wt(t,X=>j(X)),[P,M]=A.useState(null),[C,O]=A.useState(null),D=nx(r),[L,F]=A.useState(!1),U=A.useRef(!1);A.useEffect(()=>{if(_)return fT(_)},[_]),uT();const G=A.useCallback(X=>{const[ne,...Q]=D().map(oe=>oe.ref.current),[ie]=Q.slice(-1),me=document.activeElement;for(const oe of X)if(oe===me||(oe==null||oe.scrollIntoView({block:"nearest"}),oe===ne&&S&&(S.scrollTop=0),oe===ie&&S&&(S.scrollTop=S.scrollHeight),oe==null||oe.focus(),document.activeElement!==me))return},[D,S]),W=A.useCallback(()=>G([P,_]),[G,P,_]);A.useEffect(()=>{L&&W()},[L,W]);const{onOpenChange:q,triggerPointerDownPosRef:V}=w;A.useEffect(()=>{if(_){let X={x:0,y:0};const ne=ie=>{var me,oe;X={x:Math.abs(Math.round(ie.pageX)-(((me=V.current)==null?void 0:me.x)??0)),y:Math.abs(Math.round(ie.pageY)-(((oe=V.current)==null?void 0:oe.y)??0))}},Q=ie=>{X.x<=10&&X.y<=10?ie.preventDefault():_.contains(ie.target)||q(!1),document.removeEventListener("pointermove",ne),V.current=null};return V.current!==null&&(document.addEventListener("pointermove",ne),document.addEventListener("pointerup",Q,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ne),document.removeEventListener("pointerup",Q,{capture:!0})}}},[_,q,V]),A.useEffect(()=>{const X=()=>q(!1);return window.addEventListener("blur",X),window.addEventListener("resize",X),()=>{window.removeEventListener("blur",X),window.removeEventListener("resize",X)}},[q]);const[z,I]=W9(X=>{const ne=D().filter(me=>!me.disabled),Q=ne.find(me=>me.ref.current===document.activeElement),ie=G9(ne,X,Q);ie&&setTimeout(()=>ie.ref.current.focus())}),B=A.useCallback((X,ne,Q)=>{const ie=!U.current&&!Q;(w.value!==void 0&&w.value===ne||ie)&&(M(X),ie&&(U.current=!0))},[w.value]),H=A.useCallback(()=>_==null?void 0:_.focus(),[_]),J=A.useCallback((X,ne,Q)=>{const ie=!U.current&&!Q;(w.value!==void 0&&w.value===ne||ie)&&O(X)},[w.value]),ee=n==="popper"?QA:P9,Y=ee===QA?{side:l,sideOffset:c,align:d,alignOffset:u,arrowPadding:h,collisionBoundary:m,collisionPadding:g,sticky:b,hideWhenDetached:v,avoidCollisions:y}:{};return a.jsx(E9,{scope:r,content:_,viewport:S,onViewportChange:k,itemRefCallback:B,selectedItem:P,onItemLeave:H,itemTextRefCallback:J,focusSelectedItem:W,selectedItemText:C,position:n,isPositioned:L,searchRef:z,children:a.jsx(tx,{as:sye,allowPinchZoom:!0,children:a.jsx(Jv,{asChild:!0,trapped:w.open,onMountAutoFocus:X=>{X.preventDefault()},onUnmountAutoFocus:Ge(i,X=>{var ne;(ne=w.trigger)==null||ne.focus({preventScroll:!0}),X.preventDefault()}),children:a.jsx(wp,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:X=>X.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:a.jsx(ee,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:X=>X.preventDefault(),...x,...Y,onPlaced:()=>F(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:Ge(x.onKeyDown,X=>{const ne=X.ctrlKey||X.altKey||X.metaKey;if(X.key==="Tab"&&X.preventDefault(),!ne&&X.key.length===1&&I(X.key),["ArrowUp","ArrowDown","Home","End"].includes(X.key)){let ie=D().filter(me=>!me.disabled).map(me=>me.ref.current);if(["ArrowUp","End"].includes(X.key)&&(ie=ie.slice().reverse()),["ArrowUp","ArrowDown"].includes(X.key)){const me=X.target,oe=ie.indexOf(me);ie=ie.slice(oe+1)}setTimeout(()=>G(ie)),X.preventDefault()}})})})})})})});T9.displayName=iye;var oye="SelectItemAlignedPosition",P9=A.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...i}=e,s=sl(wc,r),o=ol(wc,r),[l,c]=A.useState(null),[d,u]=A.useState(null),h=wt(t,T=>u(T)),m=nx(r),g=A.useRef(!1),b=A.useRef(!0),{viewport:v,selectedItem:y,selectedItemText:x,focusSelectedItem:w}=o,_=A.useCallback(()=>{if(s.trigger&&s.valueNode&&l&&d&&v&&y&&x){const T=s.trigger.getBoundingClientRect(),P=d.getBoundingClientRect(),M=s.valueNode.getBoundingClientRect(),C=x.getBoundingClientRect();if(s.dir!=="rtl"){const me=C.left-P.left,oe=M.left-me,Ne=T.left-oe,_e=T.width+Ne,xe=Math.max(_e,P.width),Ee=window.innerWidth-pi,Pe=YA(oe,[pi,Math.max(pi,Ee-xe)]);l.style.minWidth=_e+"px",l.style.left=Pe+"px"}else{const me=P.right-C.right,oe=window.innerWidth-M.right-me,Ne=window.innerWidth-T.right-oe,_e=T.width+Ne,xe=Math.max(_e,P.width),Ee=window.innerWidth-pi,Pe=YA(oe,[pi,Math.max(pi,Ee-xe)]);l.style.minWidth=_e+"px",l.style.right=Pe+"px"}const O=m(),D=window.innerHeight-pi*2,L=v.scrollHeight,F=window.getComputedStyle(d),U=parseInt(F.borderTopWidth,10),G=parseInt(F.paddingTop,10),W=parseInt(F.borderBottomWidth,10),q=parseInt(F.paddingBottom,10),V=U+G+L+q+W,z=Math.min(y.offsetHeight*5,V),I=window.getComputedStyle(v),B=parseInt(I.paddingTop,10),H=parseInt(I.paddingBottom,10),J=T.top+T.height/2-pi,ee=D-J,Y=y.offsetHeight/2,X=y.offsetTop+Y,ne=U+G+X,Q=V-ne;if(ne<=J){const me=O.length>0&&y===O[O.length-1].ref.current;l.style.bottom="0px";const oe=d.clientHeight-v.offsetTop-v.offsetHeight,Ne=Math.max(ee,Y+(me?H:0)+oe+W),_e=ne+Ne;l.style.height=_e+"px"}else{const me=O.length>0&&y===O[0].ref.current;l.style.top="0px";const Ne=Math.max(J,U+v.offsetTop+(me?B:0)+Y)+Q;l.style.height=Ne+"px",v.scrollTop=ne-J+v.offsetTop}l.style.margin=`${pi}px 0`,l.style.minHeight=z+"px",l.style.maxHeight=D+"px",n==null||n(),requestAnimationFrame(()=>g.current=!0)}},[m,s.trigger,s.valueNode,l,d,v,y,x,s.dir,n]);Mr(()=>_(),[_]);const[j,S]=A.useState();Mr(()=>{d&&S(window.getComputedStyle(d).zIndex)},[d]);const k=A.useCallback(T=>{T&&b.current===!0&&(_(),w==null||w(),b.current=!1)},[_,w]);return a.jsx(cye,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:g,onScrollButtonChange:k,children:a.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:j},children:a.jsx(st.div,{...i,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});P9.displayName=oye;var lye="SelectPopperPosition",QA=A.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:i=pi,...s}=e,o=ax(r);return a.jsx(aT,{...o,...s,ref:t,align:n,collisionPadding:i,style:{boxSizing:"border-box",...s.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)"}})});QA.displayName=lye;var[cye,hT]=ef(wc,{}),ZA="SelectViewport",C9=A.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...i}=e,s=ol(ZA,r),o=hT(ZA,r),l=wt(t,s.onViewportChange),c=A.useRef(0);return a.jsxs(a.Fragment,{children:[a.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}),a.jsx(rx.Slot,{scope:r,children:a.jsx(st.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Ge(i.onScroll,d=>{const u=d.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:m}=o;if(m!=null&&m.current&&h){const g=Math.abs(c.current-u.scrollTop);if(g>0){const b=window.innerHeight-pi*2,v=parseFloat(h.style.minHeight),y=parseFloat(h.style.height),x=Math.max(v,y);if(x<b){const w=x+g,_=Math.min(b,w),j=w-_;h.style.height=_+"px",h.style.bottom==="0px"&&(u.scrollTop=j>0?j:0,h.style.justifyContent="flex-end")}}}c.current=u.scrollTop})})})]})});C9.displayName=ZA;var O9="SelectGroup",[uye,dye]=ef(O9),fye=A.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=ja();return a.jsx(uye,{scope:r,id:i,children:a.jsx(st.div,{role:"group","aria-labelledby":i,...n,ref:t})})});fye.displayName=O9;var M9="SelectLabel",R9=A.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=dye(M9,r);return a.jsx(st.div,{id:i.id,...n,ref:t})});R9.displayName=M9;var x0="SelectItem",[hye,D9]=ef(x0),I9=A.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:i=!1,textValue:s,...o}=e,l=sl(x0,r),c=ol(x0,r),d=l.value===n,[u,h]=A.useState(s??""),[m,g]=A.useState(!1),b=wt(t,w=>{var _;return(_=c.itemRefCallback)==null?void 0:_.call(c,w,n,i)}),v=ja(),y=A.useRef("touch"),x=()=>{i||(l.onValueChange(n),l.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 a.jsx(hye,{scope:r,value:n,disabled:i,textId:v,isSelected:d,onItemTextChange:A.useCallback(w=>{h(_=>_||((w==null?void 0:w.textContent)??"").trim())},[]),children:a.jsx(rx.ItemSlot,{scope:r,value:n,disabled:i,textValue:u,children:a.jsx(st.div,{role:"option","aria-labelledby":v,"data-highlighted":m?"":void 0,"aria-selected":d&&m,"data-state":d?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...o,ref:b,onFocus:Ge(o.onFocus,()=>g(!0)),onBlur:Ge(o.onBlur,()=>g(!1)),onClick:Ge(o.onClick,()=>{y.current!=="mouse"&&x()}),onPointerUp:Ge(o.onPointerUp,()=>{y.current==="mouse"&&x()}),onPointerDown:Ge(o.onPointerDown,w=>{y.current=w.pointerType}),onPointerMove:Ge(o.onPointerMove,w=>{var _;y.current=w.pointerType,i?(_=c.onItemLeave)==null||_.call(c):y.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ge(o.onPointerLeave,w=>{var _;w.currentTarget===document.activeElement&&((_=c.onItemLeave)==null||_.call(c))}),onKeyDown:Ge(o.onKeyDown,w=>{var j;((j=c.searchRef)==null?void 0:j.current)!==""&&w.key===" "||(Zge.includes(w.key)&&x(),w.key===" "&&w.preventDefault())})})})})});I9.displayName=x0;var Sh="SelectItemText",L9=A.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:i,...s}=e,o=sl(Sh,r),l=ol(Sh,r),c=D9(Sh,r),d=rye(Sh,r),[u,h]=A.useState(null),m=wt(t,x=>h(x),c.onItemTextChange,x=>{var w;return(w=l.itemTextRefCallback)==null?void 0:w.call(l,x,c.value,c.disabled)}),g=u==null?void 0:u.textContent,b=A.useMemo(()=>a.jsx("option",{value:c.value,disabled:c.disabled,children:g},c.value),[c.disabled,c.value,g]),{onNativeOptionAdd:v,onNativeOptionRemove:y}=d;return Mr(()=>(v(b),()=>y(b)),[v,y,b]),a.jsxs(a.Fragment,{children:[a.jsx(st.span,{id:c.textId,...s,ref:m}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?lp.createPortal(s.children,o.valueNode):null]})});L9.displayName=Sh;var $9="SelectItemIndicator",F9=A.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return D9($9,r).isSelected?a.jsx(st.span,{"aria-hidden":!0,...n,ref:t}):null});F9.displayName=$9;var JA="SelectScrollUpButton",B9=A.forwardRef((e,t)=>{const r=ol(JA,e.__scopeSelect),n=hT(JA,e.__scopeSelect),[i,s]=A.useState(!1),o=wt(t,n.onScrollButtonChange);return Mr(()=>{if(r.viewport&&r.isPositioned){let l=function(){const d=c.scrollTop>0;s(d)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),i?a.jsx(q9,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});B9.displayName=JA;var e2="SelectScrollDownButton",U9=A.forwardRef((e,t)=>{const r=ol(e2,e.__scopeSelect),n=hT(e2,e.__scopeSelect),[i,s]=A.useState(!1),o=wt(t,n.onScrollButtonChange);return Mr(()=>{if(r.viewport&&r.isPositioned){let l=function(){const d=c.scrollHeight-c.clientHeight,u=Math.ceil(c.scrollTop)<d;s(u)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),i?a.jsx(q9,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});U9.displayName=e2;var q9=A.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...i}=e,s=ol("SelectScrollButton",r),o=A.useRef(null),l=nx(r),c=A.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return A.useEffect(()=>()=>c(),[c]),Mr(()=>{var u;const d=l().find(h=>h.ref.current===document.activeElement);(u=d==null?void 0:d.ref.current)==null||u.scrollIntoView({block:"nearest"})},[l]),a.jsx(st.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Ge(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(n,50))}),onPointerMove:Ge(i.onPointerMove,()=>{var d;(d=s.onItemLeave)==null||d.call(s),o.current===null&&(o.current=window.setInterval(n,50))}),onPointerLeave:Ge(i.onPointerLeave,()=>{c()})})}),mye="SelectSeparator",z9=A.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return a.jsx(st.div,{"aria-hidden":!0,...n,ref:t})});z9.displayName=mye;var t2="SelectArrow",pye=A.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=ax(r),s=sl(t2,r),o=ol(t2,r);return s.open&&o.position==="popper"?a.jsx(iT,{...i,...n,ref:t}):null});pye.displayName=t2;var gye="SelectBubbleInput",V9=A.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const i=A.useRef(null),s=wt(n,i),o=dT(t);return A.useEffect(()=>{const l=i.current;if(!l)return;const c=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==t&&u){const h=new Event("change",{bubbles:!0});u.call(l,t),l.dispatchEvent(h)}},[o,t]),a.jsx(st.select,{...r,style:{...Wq,...r.style},ref:s,defaultValue:t})});V9.displayName=gye;function H9(e){return e===""||e===void 0}function W9(e){const t=on(e),r=A.useRef(""),n=A.useRef(0),i=A.useCallback(o=>{const l=r.current+o;t(l),(function c(d){r.current=d,window.clearTimeout(n.current),d!==""&&(n.current=window.setTimeout(()=>c(""),1e3))})(l)},[t]),s=A.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return A.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,i,s]}function G9(e,t,r){const i=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,s=r?e.indexOf(r):-1;let o=yye(e,Math.max(s,0));i.length===1&&(o=o.filter(d=>d!==r));const c=o.find(d=>d.textValue.toLowerCase().startsWith(i.toLowerCase()));return c!==r?c:void 0}function yye(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var vye=b9,K9=j9,xye=_9,bye=S9,wye=A9,Y9=k9,jye=C9,X9=R9,Q9=I9,Nye=L9,_ye=F9,Z9=B9,J9=U9,ez=z9;const qt=vye,zt=xye,$t=A.forwardRef(({className:e,children:t,...r},n)=>a.jsxs(K9,{ref:n,className:Ie("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[t,a.jsx(bye,{asChild:!0,children:a.jsx(Zi,{className:"h-4 w-4 opacity-50"})})]}));$t.displayName=K9.displayName;const tz=A.forwardRef(({className:e,...t},r)=>a.jsx(Z9,{ref:r,className:Ie("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(Hh,{className:"h-4 w-4"})}));tz.displayName=Z9.displayName;const rz=A.forwardRef(({className:e,...t},r)=>a.jsx(J9,{ref:r,className:Ie("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(Zi,{className:"h-4 w-4"})}));rz.displayName=J9.displayName;const Ft=A.forwardRef(({className:e,children:t,position:r="popper",...n},i)=>a.jsx(wye,{children:a.jsxs(Y9,{ref:i,className:Ie("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:[a.jsx(tz,{}),a.jsx(jye,{className:Ie("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),a.jsx(rz,{})]})}));Ft.displayName=Y9.displayName;const Sye=A.forwardRef(({className:e,...t},r)=>a.jsx(X9,{ref:r,className:Ie("px-2 py-1.5 text-sm font-semibold",e),...t}));Sye.displayName=X9.displayName;const Ce=A.forwardRef(({className:e,children:t,...r},n)=>a.jsxs(Q9,{ref:n,className:Ie("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[a.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(_ye,{children:a.jsx(Yo,{className:"h-4 w-4"})})}),a.jsx(Nye,{children:t})]}));Ce.displayName=Q9.displayName;const Aye=A.forwardRef(({className:e,...t},r)=>a.jsx(ez,{ref:r,className:Ie("-mx-1 my-1 h-px bg-muted",e),...t}));Aye.displayName=ez.displayName;var ix="Checkbox",[kye]=xn(ix),[Eye,mT]=kye(ix);function Tye(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:i,disabled:s,form:o,name:l,onCheckedChange:c,required:d,value:u="on",internal_do_not_use_render:h}=e,[m,g]=Ka({prop:r,defaultProp:i??!1,onChange:c,caller:ix}),[b,v]=A.useState(null),[y,x]=A.useState(null),w=A.useRef(!1),_=b?!!o||!!b.closest("form"):!0,j={checked:m,disabled:s,setChecked:g,control:b,setControl:v,name:l,form:o,value:u,hasConsumerStoppedPropagationRef:w,required:d,defaultChecked:Wo(i)?!1:i,isFormControl:_,bubbleInput:y,setBubbleInput:x};return a.jsx(Eye,{scope:t,...j,children:Pye(h)?h(j):n})}var nz="CheckboxTrigger",az=A.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},i)=>{const{control:s,value:o,disabled:l,checked:c,required:d,setControl:u,setChecked:h,hasConsumerStoppedPropagationRef:m,isFormControl:g,bubbleInput:b}=mT(nz,e),v=wt(i,u),y=A.useRef(c);return A.useEffect(()=>{const x=s==null?void 0:s.form;if(x){const w=()=>h(y.current);return x.addEventListener("reset",w),()=>x.removeEventListener("reset",w)}},[s,h]),a.jsx(st.button,{type:"button",role:"checkbox","aria-checked":Wo(c)?"mixed":c,"aria-required":d,"data-state":cz(c),"data-disabled":l?"":void 0,disabled:l,value:o,...n,ref:v,onKeyDown:Ge(t,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:Ge(r,x=>{h(w=>Wo(w)?!0:!w),b&&g&&(m.current=x.isPropagationStopped(),m.current||x.stopPropagation())})})});az.displayName=nz;var pT=A.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:i,defaultChecked:s,required:o,disabled:l,value:c,onCheckedChange:d,form:u,...h}=e;return a.jsx(Tye,{__scopeCheckbox:r,checked:i,defaultChecked:s,disabled:l,required:o,onCheckedChange:d,name:n,form:u,value:c,internal_do_not_use_render:({isFormControl:m})=>a.jsxs(a.Fragment,{children:[a.jsx(az,{...h,ref:t,__scopeCheckbox:r}),m&&a.jsx(lz,{__scopeCheckbox:r})]})})});pT.displayName=ix;var iz="CheckboxIndicator",sz=A.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...i}=e,s=mT(iz,r);return a.jsx(bn,{present:n||Wo(s.checked)||s.checked===!0,children:a.jsx(st.span,{"data-state":cz(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});sz.displayName=iz;var oz="CheckboxBubbleInput",lz=A.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:i,checked:s,defaultChecked:o,required:l,disabled:c,name:d,value:u,form:h,bubbleInput:m,setBubbleInput:g}=mT(oz,e),b=wt(r,g),v=dT(s),y=JE(n);A.useEffect(()=>{const w=m;if(!w)return;const _=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(_,"checked").set,k=!i.current;if(v!==s&&S){const T=new Event("click",{bubbles:k});w.indeterminate=Wo(s),S.call(w,Wo(s)?!1:s),w.dispatchEvent(T)}},[m,v,s,i]);const x=A.useRef(Wo(s)?!1:s);return a.jsx(st.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??x.current,required:l,disabled:c,name:d,value:u,form:h,...t,tabIndex:-1,ref:b,style:{...t.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});lz.displayName=oz;function Pye(e){return typeof e=="function"}function Wo(e){return e==="indeterminate"}function cz(e){return Wo(e)?"indeterminate":e?"checked":"unchecked"}const dm=A.forwardRef(({className:e,...t},r)=>a.jsx(pT,{ref:r,className:Ie("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:a.jsx(sz,{className:Ie("flex items-center justify-center text-current"),children:a.jsx(Yo,{className:"h-4 w-4"})})}));dm.displayName=pT.displayName;var sx="Dialog",[uz,dz]=xn(sx),[Cye,Ei]=uz(sx),fz=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:s,modal:o=!0}=e,l=A.useRef(null),c=A.useRef(null),[d,u]=Ka({prop:n,defaultProp:i??!1,onChange:s,caller:sx});return a.jsx(Cye,{scope:t,triggerRef:l,contentRef:c,contentId:ja(),titleId:ja(),descriptionId:ja(),open:d,onOpenChange:u,onOpenToggle:A.useCallback(()=>u(h=>!h),[u]),modal:o,children:r})};fz.displayName=sx;var hz="DialogTrigger",mz=A.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Ei(hz,r),s=wt(t,i.triggerRef);return a.jsx(st.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":vT(i.open),...n,ref:s,onClick:Ge(e.onClick,i.onOpenToggle)})});mz.displayName=hz;var gT="DialogPortal",[Oye,pz]=uz(gT,{forceMount:void 0}),gz=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:i}=e,s=Ei(gT,t);return a.jsx(Oye,{scope:t,forceMount:r,children:A.Children.map(n,o=>a.jsx(bn,{present:r||s.open,children:a.jsx(Np,{asChild:!0,container:i,children:o})}))})};gz.displayName=gT;var b0="DialogOverlay",yz=A.forwardRef((e,t)=>{const r=pz(b0,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,s=Ei(b0,e.__scopeDialog);return s.modal?a.jsx(bn,{present:n||s.open,children:a.jsx(Rye,{...i,ref:t})}):null});yz.displayName=b0;var Mye=yc("DialogOverlay.RemoveScroll"),Rye=A.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Ei(b0,r);return a.jsx(tx,{as:Mye,allowPinchZoom:!0,shards:[i.contentRef],children:a.jsx(st.div,{"data-state":vT(i.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),jc="DialogContent",vz=A.forwardRef((e,t)=>{const r=pz(jc,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,s=Ei(jc,e.__scopeDialog);return a.jsx(bn,{present:n||s.open,children:s.modal?a.jsx(Dye,{...i,ref:t}):a.jsx(Iye,{...i,ref:t})})});vz.displayName=jc;var Dye=A.forwardRef((e,t)=>{const r=Ei(jc,e.__scopeDialog),n=A.useRef(null),i=wt(t,r.contentRef,n);return A.useEffect(()=>{const s=n.current;if(s)return fT(s)},[]),a.jsx(xz,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ge(e.onCloseAutoFocus,s=>{var o;s.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Ge(e.onPointerDownOutside,s=>{const o=s.detail.originalEvent,l=o.button===0&&o.ctrlKey===!0;(o.button===2||l)&&s.preventDefault()}),onFocusOutside:Ge(e.onFocusOutside,s=>s.preventDefault())})}),Iye=A.forwardRef((e,t)=>{const r=Ei(jc,e.__scopeDialog),n=A.useRef(!1),i=A.useRef(!1);return a.jsx(xz,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var o,l;(o=e.onCloseAutoFocus)==null||o.call(e,s),s.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),s.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:s=>{var c,d;(c=e.onInteractOutside)==null||c.call(e,s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=s.target;((d=r.triggerRef.current)==null?void 0:d.contains(o))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),xz=A.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:s,...o}=e,l=Ei(jc,r),c=A.useRef(null),d=wt(t,c);return uT(),a.jsxs(a.Fragment,{children:[a.jsx(Jv,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:s,children:a.jsx(wp,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":vT(l.open),...o,ref:d,onDismiss:()=>l.onOpenChange(!1)})}),a.jsxs(a.Fragment,{children:[a.jsx($ye,{titleId:l.titleId}),a.jsx(Bye,{contentRef:c,descriptionId:l.descriptionId})]})]})}),yT="DialogTitle",bz=A.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Ei(yT,r);return a.jsx(st.h2,{id:i.titleId,...n,ref:t})});bz.displayName=yT;var wz="DialogDescription",jz=A.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Ei(wz,r);return a.jsx(st.p,{id:i.descriptionId,...n,ref:t})});jz.displayName=wz;var Nz="DialogClose",_z=A.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Ei(Nz,r);return a.jsx(st.button,{type:"button",...n,ref:t,onClick:Ge(e.onClick,()=>i.onOpenChange(!1))})});_z.displayName=Nz;function vT(e){return e?"open":"closed"}var Sz="DialogTitleWarning",[Lye,Az]=Eoe(Sz,{contentName:jc,titleName:yT,docsSlug:"dialog"}),$ye=({titleId:e})=>{const t=Az(Sz),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 822 823If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 824 825For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return A.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},Fye="DialogDescriptionWarning",Bye=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Az(Fye).contentName}}.`;return A.useEffect(()=>{var s;const i=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},kz=fz,Ez=mz,Tz=gz,xT=yz,bT=vz,wT=bz,jT=jz,ox=_z;const oa=kz,NT=Ez,Uye=Tz,r2=ox,Pz=A.forwardRef(({className:e,...t},r)=>a.jsx(xT,{ref:r,className:Ie("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}));Pz.displayName=xT.displayName;const zn=A.forwardRef(({className:e,children:t,...r},n)=>
825a.jsxs(Uye,{children:[a.jsx(Pz,{}),a.jsxs(bT,{ref:n,className:Ie("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,a.jsxs(ox,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[a.jsx(Ks,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));zn.displayName=bT.displayName;const Vn=({className:e,...t})=>a.jsx("div",{className:Ie("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Vn.displayName="DialogHeader";const Wa=({className:e,...t})=>a.jsx("div",{className:Ie("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Wa.displayName="DialogFooter";const Hn=A.forwardRef(({className:e,...t},r)=>a.jsx(wT,{ref:r,className:Ie("text-lg font-semibold leading-none tracking-tight",e),...t}));Hn.displayName=wT.displayName;const Xa=A.forwardRef(({className:e,...t},r)=>a.jsx(jT,{ref:r,className:Ie("text-sm text-muted-foreground",e),...t}));Xa.displayName=jT.displayName;var qye="Label",Cz=A.forwardRef((e,t)=>a.jsx(st.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())}}));Cz.displayName=qye;var Oz=Cz;const zye=ap("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Nr=A.forwardRef(({className:e,...t},r)=>a.jsx(Oz,{ref:r,className:Ie(zye(),e),...t}));Nr.displayName=Oz.displayName;const Wn=A.forwardRef(({className:e,...t},r)=>a.jsx("textarea",{className:Ie("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...t}));Wn.displayName="Textarea";var lx="Switch",[Vye]=xn(lx),[Hye,Wye]=Vye(lx),Mz=A.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:i,defaultChecked:s,required:o,disabled:l,value:c="on",onCheckedChange:d,form:u,...h}=e,[m,g]=A.useState(null),b=wt(t,_=>g(_)),v=A.useRef(!1),y=m?u||!!m.closest("form"):!0,[x,w]=Ka({prop:i,defaultProp:s??!1,onChange:d,caller:lx});return a.jsxs(Hye,{scope:r,checked:x,disabled:l,children:[a.jsx(st.button,{type:"button",role:"switch","aria-checked":x,"aria-required":o,"data-state":Lz(x),"data-disabled":l?"":void 0,disabled:l,value:c,...h,ref:b,onClick:Ge(e.onClick,_=>{w(j=>!j),y&&(v.current=_.isPropagationStopped(),v.current||_.stopPropagation())})}),y&&a.jsx(Iz,{control:m,bubbles:!v.current,name:n,value:c,checked:x,required:o,disabled:l,form:u,style:{transform:"translateX(-100%)"}})]})});Mz.displayName=lx;var Rz="SwitchThumb",Dz=A.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,i=Wye(Rz,r);return a.jsx(st.span,{"data-state":Lz(i.checked),"data-disabled":i.disabled?"":void 0,...n,ref:t})});Dz.displayName=Rz;var Gye="SwitchBubbleInput",Iz=A.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...i},s)=>{const o=A.useRef(null),l=wt(o,s),c=dT(r),d=JE(t);return A.useEffect(()=>{const u=o.current;if(!u)return;const h=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(h,"checked").set;if(c!==r&&g){const b=new Event("click",{bubbles:n});g.call(u,r),u.dispatchEvent(b)}},[c,r,n]),a.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...i,tabIndex:-1,ref:l,style:{...i.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Iz.displayName=Gye;function Lz(e){return e?"checked":"unchecked"}var $z=Mz,Kye=Dz;const _T=A.forwardRef(({className:e,...t},r)=>a.jsx($z,{className:Ie("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:r,children:a.jsx(Kye,{className:Ie("pointer-events-none block h-4 w-4 roun
825ded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));_T.displayName=$z.displayName;const Yye=1,Xye=-1,Qye="https://t.me/slaizvar",w0=e=>!!e&&(e.role==="admin"||e.email==="[email protected]"),Fz=e=>{const t=w0(e),r=(e==null?void 0:e.ai_limit)??Yye,n=(e==null?void 0:e.ai_used)??0,i=t||r===Xye;return{unlimited:i,limit:r,used:n,exhausted:!i&&n>=r}},Vy=async e=>{if(w0(e))return e;try{const t=((e==null?void 0:e.ai_used)??0)+1;return await vn.auth.updateMe({ai_used:t}),{...e,ai_used:t}}catch(t){return console.error("Failed to consume AI credit:",t),e}},Zye="rounded-2xl border border-gray-700/60 bg-gray-800/60 p-4";function Jye({stats:e}){const t=e!=null&&e.totalUsers?Math.round((e.premiumUsers||0)/e.totalUsers*100):0,r=[{icon:la,label:"Total Users",value:(e==null?void 0:e.totalUsers)||0,sub:`${(e==null?void 0:e.activeUsers)||0} active / ${(e==null?void 0:e.totalUsers)||0} total`,color:"text-cyan-400"},{icon:DZ,label:"Premium & VIP",value:`${t}%`,sub:`${(e==null?void 0:e.premiumUsers)||0} Premium`,color:"text-purple-400"},{icon:_i,label:"Generated EAs",value:(e==null?void 0:e.generatedEAs)||0,sub:"all-time",color:"text-blue-400"},{icon:Ts,label:"Shared EAs",value:(e==null?void 0:e.totalEAs)||0,sub:"in community",color:"text-emerald-400"},{icon:Gn,label:"Total Downloads",value:(e==null?void 0:e.totalDownloads)||0,sub:"all-time",color:"text-amber-400"},{icon:Mk,label:"Chart AI Analyses",value:(e==null?void 0:e.chartAnalyses)||0,sub:"all-time",color:"text-pink-400"}];return a.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 xl:grid-cols-6 gap-4",children:r.map(({icon:n,label:i,value:s,sub:o,color:l})=>a.jsxs("div",{className:Zye,children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("span",{className:"text-xs text-gray-400",children:i}),a.jsx(n,{className:`h-4 w-4 ${l}`})]}),a.jsx("div",{className:"text-2xl font-bold text-white mt-2",children:s}),a.jsx("div",{className:"text-xs text-gray-500 mt-1",children:o})]},i))})}var M1,Y5;function ca(){if(Y5)return M1;Y5=1;var e=Array.isArray;return M1=e,M1}var R1,X5;function Bz(){if(X5)return R1;X5=1;var e=typeof Gg=="object"&&Gg&&Gg.Object===Object&⋙return R1=e,R1}var D1,Q5;function cs(){if(Q5)return D1;Q5=1;var e=Bz(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return D1=r,D1}var I1,Z5;function Ap(){if(Z5)return I1;Z5=1;var e=cs(),t=e.Symbol;return I1=t,I1}var L1,J5;function e0e(){if(J5)return L1;J5=1;var e=Ap(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,i=e?e.toStringTag:void 0;function s(o){var l=r.call(o,i),c=o[i];try{o[i]=void 0;var d=!0}catch{}var u=n.call(o);return d&&(l?o[i]=c:delete o[i]),u}return L1=s,L1}var $1,eD;function t0e(){if(eD)return $1;eD=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return $1=r,$1}var F1,tD;function Ys(){if(tD)return F1;tD=1;var e=Ap(),t=e0e(),r=t0e(),n="[object Null]",i="[object Undefined]",s=e?e.toStringTag:void 0;function o(l){return l==null?l===void 0?i:n:s&&s in Object(l)?t(l):r(l)}return F1=o,F1}var B1,rD;function Xs(){if(rD)return B1;rD=1;function e(t){return t!=null&&typeof t=="object"}return B1=e,B1}var U1,nD;function tf(){if(nD)return U1;nD=1;var e=Ys(),t=Xs(),r="[object Symbol]";function n(i){return typeof i=="symbol"||t(i)&&e(i)==r}return U1=n,U1}var q1,aD;function ST(){if(aD)return q1;aD=1;var e=ca(),t=tf(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(s,o){if(e(s))return!1;var l=typeof s;return l=="number"||l=="symbol"||l=="boolean"||s==null||t(s)?!0:n.test(s)||!r.test(s)||o!=null&&s in Object(o)}return q1=i,q1}var z1,iD;function ll(){if(iD)return z1;iD=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return z1=e,z1}var V1,sD;function AT(){if(sD)return V1;sD=1;var e=Ys(),t=ll(),r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",s="[object Proxy]";function o(l){if(!t(l))return!1;var c=e(l);return c==n||c==i||c==r||c==s}return V1=o,V1}var H1,oD;
vendor: 6,847 bytes, line 825
825function r0e(){if(oD)return H1;oD=1;var e=cs(),t=e["__core-js_shared__"];return H1=t,H1}var W1,lD;function n0e(){if(lD)return W1;lD=1;var e=r0e(),t=(function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function r(n){return!!t&&t in n}return W1=r,W1}var G1,cD;function Uz(){if(cD)return G1;cD=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return G1=r,G1}var K1,uD;function a0e(){if(uD)return K1;uD=1;var e=AT(),t=n0e(),r=ll(),n=Uz(),i=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,o=Function.prototype,l=Object.prototype,c=o.toString,d=l.hasOwnProperty,u=RegExp("^"+c.call(d).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(m){if(!r(m)||t(m))return!1;var g=e(m)?u:s;return g.test(n(m))}return K1=h,K1}var Y1,dD;function i0e(){if(dD)return Y1;dD=1;function e(t,r){return t==null?void 0:t[r]}return Y1=e,Y1}var X1,fD;function Rc(){if(fD)return X1;fD=1;var e=a0e(),t=i0e();function r(n,i){var s=t(n,i);return e(s)?s:void 0}return X1=r,X1}var Q1,hD;function cx(){if(hD)return Q1;hD=1;var e=Rc(),t=e(Object,"create");return Q1=t,Q1}var Z1,mD;function s0e(){if(mD)return Z1;mD=1;var e=cx();function t(){this.__data__=e?e(null):{},this.size=0}return Z1=t,Z1}var J1,pD;function o0e(){if(pD)return J1;pD=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return J1=e,J1}var ej,gD;function l0e(){if(gD)return ej;gD=1;var e=cx(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function i(s){var o=this.__data__;if(e){var l=o[s];return l===t?void 0:l}return n.call(o,s)?o[s]:void 0}return ej=i,ej}var tj,yD;function c0e(){if(yD)return tj;yD=1;var e=cx(),t=Object.prototype,r=t.hasOwnProperty;function n(i){var s=this.__data__;return e?s[i]!==void 0:r.call(s,i)}return tj=n,tj}var rj,vD;function u0e(){if(vD)return rj;vD=1;var e=cx(),t="__lodash_hash_undefined__";function r(n,i){var s=this.__data__;return this.size+=this.has(n)?0:1,s[n]=e&&i===void 0?t:i,this}return rj=r,rj}var nj,xD;function d0e(){if(xD)return nj;xD=1;var e=s0e(),t=o0e(),r=l0e(),n=c0e(),i=u0e();function s(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var d=o[l];this.set(d[0],d[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=r,s.prototype.has=n,s.prototype.set=i,nj=s,nj}var aj,bD;function f0e(){if(bD)return aj;bD=1;function e(){this.__data__=[],this.size=0}return aj=e,aj}var ij,wD;function kT(){if(wD)return ij;wD=1;function e(t,r){return t===r||t!==t&&r!==r}return ij=e,ij}var sj,jD;function ux(){if(jD)return sj;jD=1;var e=kT();function t(r,n){for(var i=r.length;i--;)if(e(r[i][0],n))return i;return-1}return sj=t,sj}var oj,ND;function h0e(){if(ND)return oj;ND=1;var e=ux(),t=Array.prototype,r=t.splice;function n(i){var s=this.__data__,o=e(s,i);if(o<0)return!1;var l=s.length-1;return o==l?s.pop():r.call(s,o,1),--this.size,!0}return oj=n,oj}var lj,_D;function m0e(){if(_D)return lj;_D=1;var e=ux();function t(r){var n=this.__data__,i=e(n,r);return i<0?void 0:n[i][1]}return lj=t,lj}var cj,SD;function p0e(){if(SD)return cj;SD=1;var e=ux();function t(r){return e(this.__data__,r)>-1}return cj=t,cj}var uj,AD;function g0e(){if(AD)return uj;AD=1;var e=ux();function t(r,n){var i=this.__data__,s=e(i,r);return s<0?(++this.size,i.push([r,n])):i[s][1]=n,this}return uj=t,uj}var dj,kD;function dx(){if(kD)return dj;kD=1;var e=f0e(),t=h0e(),r=m0e(),n=p0e(),i=g0e();function s(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var d=o[l];this.set(d[0],d[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=r,s.prototype.has=n,s.prototype.set=i,dj=s,dj}var fj,ED;function ET(){if(ED)return fj;ED=1;var e=Rc(),t=cs(),r=e(t,"Map");return fj=r,fj}var hj,TD;function y0e(){if(TD)return hj;TD=1;var e=d0e(),t=dx(),r=ET();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return hj=n,hj}var mj,PD;function v0e(){if(PD)return mj;PD=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return mj=e,mj}var pj,CD;function fx(){if(CD)return pj;CD=1;var e=v0e();function t(r,n){var i=r.__data__;return e(n)?i[typeof n=="string"?"string":"hash"]:i.map}return pj=t,pj}var gj,OD;function x0e(){if(OD)return gj;OD=1;var e=fx();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return gj=t,gj}var yj,MD;function b0e(){if(MD)return yj;MD=1;var e=fx();function t(r){return e(this,r).get(r)}return yj=t,yj}var vj,RD;function w0e(){if(RD)return vj;RD=1;var e=fx();function t(r){return e(this,r).has(r)}return vj=t,vj}var xj,DD;function j0e(){if(DD)return xj;DD=1;var e=fx();function t(r,n){var i=e(this,r),s=i.size;return i.set(r,n),this.size+=i.size==s?0:1,this}return xj=t,xj}var bj,ID;function TT(){if(ID)return bj;ID=1;var e=y0e(),t=x0e(),r=b0e(),n=w0e(),i=j0e();function s(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var d=o[l];this.set(d[0],d[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=r,s.prototype.has=n,s.prototype.set=i,bj=s,bj}var wj,LD;function qz(){if(LD)return wj;LD=1;var e=TT(),t="Expected a function";function r(n,i){if(typeof n!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var s=function(){var o=arguments,l=i?i.apply(this,o):o[0],c=s.cache;if(c.has(l))return c.get(l);var d=n.apply(this,o);return s.cache=c.set(l,d)||c,d};return s.cache=new(r.Cache||e),s}return r.Cache=e,wj=r,wj}var jj,$D;function N0e(){if($D)return jj;$D=1;var e=qz(),t=500;function r(n){var i=e(n,function(o){return s.size===t&&s.clear(),o}),s=i.cache;return i}return jj=r,jj}var Nj,FD;function _0e(){if(FD)return Nj;FD=1;var e=N0e(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=e(function(i){var s=[];return i.charCodeAt(0)===46&&s.push(""),i.replace(t,function(o,l,c,d){s.push(c?d.replace(r,"$1"):l||o)}),s});return Nj=n,Nj}var _j,BD;function PT(){if(BD)return _j;BD=1;function e(t,r){for(var n=-1,i=t==null?0:t.length,s=Array(i);++n<i;)s[n]=r(t[n],n,t);return s}return _j=e,_j}var Sj,UD;function S0e(){if(UD)return Sj;UD=1;var e=Ap(),t=PT(),r=ca(),n=tf(),i=e?e.prototype:void 0,s=i?i.toString:void 0;function o(l){if(typeof l=="string")return l;if(r(l))return t(l,o)+"";if(n(l))return s?s.call(l):"";var c=l+"";return c=="0"&&1/l==-1/0?"-0":c}return Sj=o,Sj}var Aj,qD;function zz(){if(qD)return Aj;qD=1;var e=S0e();function t(r){return r==null?"":e(r)}return Aj=t,Aj}var kj,zD;function Vz(){if(zD)return kj;zD=1;var e=ca(),t=ST(),r=_0e(),n=zz();function i(s,o){return e(s)?s:t(s,o)?[s]:r(n(s))}return kj=i,kj}var Ej,VD;function hx(){if(VD)return Ej;VD=1;var e=tf();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return Ej=t,Ej}
vendor: 4,917 bytes, lines 825-833
825var Tj,HD;function CT(){if(HD)return Tj;HD=1;var e=Vz(),t=hx();function r(n,i){i=e(i,n);for(var s=0,o=i.length;n!=null&&s<o;)n=n[t(i[s++])];return s&&s==o?n:void 0}return Tj=r,Tj}var Pj,WD;function Hz(){if(WD)return Pj;WD=1;var e=CT();function t(r,n,i){var s=r==null?void 0:e(r,n);return s===void 0?i:s}return Pj=t,Pj}var A0e=Hz();const Sa=Ht(A0e);var Cj,GD;function k0e(){if(GD)return Cj;GD=1;function e(t){return t==null}return Cj=e,Cj}var E0e=k0e();const xt=Ht(E0e);var Oj,KD;function T0e(){if(KD)return Oj;KD=1;var e=Ys(),t=ca(),r=Xs(),n="[object String]";function i(s){return typeof s=="string"||!t(s)&&r(s)&&e(s)==n}return Oj=i,Oj}var P0e=T0e();const Nc=Ht(P0e);var C0e=AT();const mt=Ht(C0e);var O0e=ll();const rf=Ht(O0e);var Mj={exports:{}},Gt={};/** 826 * @license React 827 * react-is.production.min.js 828 * 829 * Copyright (c) Facebook, Inc. and its affiliates. 830 * 831 * This source code is licensed under the MIT license found in the 832 * LICENSE file in the root directory of this source tree. 833 */var YD;function M0e(){if(YD)return Gt;YD=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function v(y){if(typeof y=="object"&&y!==null){var x=y.$$typeof;switch(x){case e:switch(y=y.type,y){case r:case i:case n:case d:case u:return y;default:switch(y=y&&y.$$typeof,y){case l:case o:case c:case m:case h:case s:return y;default:return x}}case t:return x}}}return Gt.ContextConsumer=o,Gt.ContextProvider=s,Gt.Element=e,Gt.ForwardRef=c,Gt.Fragment=r,Gt.Lazy=m,Gt.Memo=h,Gt.Portal=t,Gt.Profiler=i,Gt.StrictMode=n,Gt.Suspense=d,Gt.SuspenseList=u,Gt.isAsyncMode=function(){return!1},Gt.isConcurrentMode=function(){return!1},Gt.isContextConsumer=function(y){return v(y)===o},Gt.isContextProvider=function(y){return v(y)===s},Gt.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===e},Gt.isForwardRef=function(y){return v(y)===c},Gt.isFragment=function(y){return v(y)===r},Gt.isLazy=function(y){return v(y)===m},Gt.isMemo=function(y){return v(y)===h},Gt.isPortal=function(y){return v(y)===t},Gt.isProfiler=function(y){return v(y)===i},Gt.isStrictMode=function(y){return v(y)===n},Gt.isSuspense=function(y){return v(y)===d},Gt.isSuspenseList=function(y){return v(y)===u},Gt.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===r||y===i||y===n||y===d||y===u||y===g||typeof y=="object"&&y!==null&&(y.$$typeof===m||y.$$typeof===h||y.$$typeof===s||y.$$typeof===o||y.$$typeof===c||y.$$typeof===b||y.getModuleId!==void 0)},Gt.typeOf=v,Gt}var XD;function R0e(){return XD||(XD=1,Mj.exports=M0e()),Mj.exports}var D0e=R0e(),Rj,QD;function Wz(){if(QD)return Rj;QD=1;var e=Ys(),t=Xs(),r="[object Number]";function n(i){return typeof i=="number"||t(i)&&e(i)==r}return Rj=n,Rj}var Dj,ZD;function I0e(){if(ZD)return Dj;ZD=1;var e=Wz();function t(r){return e(r)&&r!=+r}return Dj=t,Dj}var L0e=I0e();const nf=Ht(L0e);var $0e=Wz();const F0e=Ht($0e);var Bn=function(t){return t===0?0:t>0?1:-1},Vl=function(t){return Nc(t)&&t.indexOf("%")===t.length-1},Fe=function(t){return F0e(t)&&!nf(t)},B0e=function(t){return xt(t)},Yr=function(t){return Fe(t)||Nc(t)},U0e=0,Dc=function(t){var r=++U0e;return"".concat(t||"").concat(r)},Un=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(!Fe(t)&&!Nc(t))return n;var s;if(Vl(t)){var o=t.indexOf("%");s=r*parseFloat(t.slice(0,o))/100}else s=+t;return nf(s)&&(s=n),i&&s>r&&(s=r),s},To=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},q0e=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},Gr=function(t,r){return Fe(t)&&Fe(r)?function(n){return t+n*(r-t)}:function(){return r}};function j0(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):Sa(n,t))===r})}var z0e=function(t,r){return Fe(t)&&Fe(r)?t-r:Nc(t)&&Nc(r)?t.localeCompare(r):t instanceof Date&&r instanceof Date?t.getTime()-r.getTime():String(t).localeCompare(String(r))};function Iu(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 n2(e){"@babel/helpers - typeof";return n2=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}
833,n2(e)}var V0e=["viewBox","children"],H0e=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],JD=["points","pathLength"],Ij={svg:V0e,polygon:JD,polyline:JD},OT=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onF
833ocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],N0=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(A.isValidElement(t)&&(n=t.props),!rf(n))return null;var i={};return Object.keys(n).forEach(function(s){OT.includes(s)&&(i[s]=r||function(o){return n[s](n,o)})}),i},W0e=function(t,r,n){return function(i){return t(r,n,i),null}},_c=function(t,r,n){if(!rf(t)||n2(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(s){var o=t[s];OT.includes(s)&&typeof o=="function"&&(i||(i={}),i[s]=W0e(o,r,n))}),i},G0e=["children"],K0e=["children"];function e3(e,t){if(e==null)return{};var r=Y0e(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Y0e(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 a2(e){"@babel/helpers - typeof";return a2=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},a2(e)}var t3={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"}
vendor: 6,496 bytes, line 833
833,Fs=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},r3=null,Lj=null,MT=function e(t){if(t===r3&&Array.isArray(Lj))return Lj;var r=[];return A.Children.forEach(t,function(n){xt(n)||(D0e.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),Lj=r,r3=t,r};function Aa(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return Fs(i)}):n=[Fs(t)],MT(e).forEach(function(i){var s=Sa(i,"type.displayName")||Sa(i,"type.name");n.indexOf(s)!==-1&&r.push(i)}),r}function va(e,t){var r=Aa(e,t);return r&&r[0]}var n3=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,i=r.height;return!(!Fe(n)||n<=0||!Fe(i)||i<=0)},X0e=["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"],Q0e=function(t){return t&&t.type&&Nc(t.type)&&X0e.indexOf(t.type)>=0},Gz=function(t){return t&&a2(t)==="object"&&"clipDot"in t},Z0e=function(t,r,n,i){var s,o=(s=Ij==null?void 0:Ij[i])!==null&&s!==void 0?s:[];return r.startsWith("data-")||!mt(t)&&(i&&o.includes(r)||H0e.includes(r))||n&&OT.includes(r)},lt=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(A.isValidElement(t)&&(i=t.props),!rf(i))return null;var s={};return Object.keys(i).forEach(function(o){var l;Z0e((l=i)===null||l===void 0?void 0:l[o],o,r,n)&&(s[o]=i[o])}),s},i2=function e(t,r){if(t===r)return!0;var n=A.Children.count(t);if(n!==A.Children.count(r))return!1;if(n===0)return!0;if(n===1)return a3(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var i=0;i<n;i++){var s=t[i],o=r[i];if(Array.isArray(s)||Array.isArray(o)){if(!e(s,o))return!1}else if(!a3(s,o))return!1}return!0},a3=function(t,r){if(xt(t)&&xt(r))return!0;if(!xt(t)&&!xt(r)){var n=t.props||{},i=n.children,s=e3(n,G0e),o=r.props||{},l=o.children,c=e3(o,K0e);return i&&l?Iu(s,c)&&i2(i,l):!i&&!l?Iu(s,c):!1}return!1},i3=function(t,r){var n=[],i={};return MT(t).forEach(function(s,o){if(Q0e(s))n.push(s);else if(s){var l=Fs(s.type),c=r[l]||{},d=c.handler,u=c.once;if(d&&(!u||!i[l])){var h=d(s,l,o);n.push(h),i[l]=!0}}}),n},J0e=function(t){var r=t&&t.type;return r&&t3[r]?t3[r]:null},eve=function(t,r){return MT(r).indexOf(t)},tve=["children","width","height","viewBox","className","style","title","desc"];function s2(){return s2=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},s2.apply(this,arguments)}function rve(e,t){if(e==null)return{};var r=nve(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function nve(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 o2(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,s=e.className,o=e.style,l=e.title,c=e.desc,d=rve(e,tve),u=i||{width:r,height:n,x:0,y:0},h=bt("recharts-surface",s);return te.createElement("svg",s2({},lt(d,!0,"svg"),{className:h,width:r,height:n,style:o,viewBox:"".concat(u.x," ").concat(u.y," ").concat(u.width," ").concat(u.height)}),te.createElement("title",null,l),te.createElement("desc",null,c),t)}var ave=["children","className"];function l2(){return l2=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},l2.apply(this,arguments)}function ive(e,t){if(e==null)return{};var r=sve(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function sve(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 Ct=te.forwardRef(function(e,t){var r=e.children,n=e.className,i=ive(e,ave),s=bt("recharts-layer",n);return te.createElement("g",l2({className:s},lt(i,!0),{ref:t}),r)}),Ni=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=arguments[s]},$j,s3;function ove(){if(s3)return $j;s3=1;function e(t,r,n){var i=-1,s=t.length;r<0&&(r=-r>s?0:s+r),n=n>s?s:n,n<0&&(n+=s),s=r>n?0:n-r>>>0,r>>>=0;for(var o=Array(s);++i<s;)o[i]=t[i+r];return o}return $j=e,$j}var Fj,o3;function lve(){if(o3)return Fj;o3=1;var e=ove();function t(r,n,i){var s=r.length;return i=i===void 0?s:i,!n&&i>=s?r:e(r,n,i)}return Fj=t,Fj}var Bj,l3;function Kz(){if(l3)return Bj;l3=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,s="\\ufe0e\\ufe0f",o="\\u200d",l=RegExp("["+o+e+i+s+"]");function c(d){return l.test(d)}return Bj=c,Bj}var Uj,c3;function cve(){if(c3)return Uj;c3=1;function e(t){return t.split("")}return Uj=e,Uj}var qj,u3;function uve(){if(u3)return qj;u3=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,s="\\ufe0e\\ufe0f",o="["+e+"]",l="["+i+"]",c="\\ud83c[\\udffb-\\udfff]",d="(?:"+l+"|"+c+")",u="[^"+e+"]",h="(?:\\ud83c[\\udde6-\\uddff]){2}",m="[\\ud800-\\udbff][\\udc00-\\udfff]",g="\\u200d",b=d+"?",v="["+s+"]?",y="(?:"+g+"(?:"+[u,h,m].join("|")+")"+v+b+")*",x=v+b+y,w="(?:"+[u+l+"?",l,h,m,o].join("|")+")",_=RegExp(c+"(?="+c+")|"+w+x,"g");function j(S){return S.match(_)||[]}return qj=j,qj}var zj,d3;function dve(){if(d3)return zj;d3=1;var e=cve(),t=Kz(),r=uve();function n(i){return t(i)?r(i):e(i)}return zj=n,zj}var Vj,f3;function fve(){if(f3)return Vj;f3=1;var e=lve(),t=Kz(),r=dve(),n=zz();function i(s){return function(o){o=n(o);
833var l=t(o)?r(o):void 0,c=l?l[0]:o.charAt(0),d=l?e(l,1).join(""):o.slice(1);return c[s]()+d}}return Vj=i,Vj}var Hj,h3;function hve(){if(h3)return Hj;h3=1;var e=fve(),t=e("toUpperCase");return Hj=t,Hj}var mve=hve();const mx=Ht(mve);function sr(e){return function(){return e}}const Yz=Math.cos,_0=Math.sin,Ti=Math.sqrt,S0=Math.PI,px=2*S0,c2=Math.PI,u2=2*c2,$l=1e-6,pve=u2-$l;function Xz(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function gve(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Xz;const r=10**t;return function(n){this._+=n[0];for(let i=1,s=n.length;i<s;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class yve{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Xz:gve(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,s,o){this._append`C${+t},${+r},${+n},${+i},${this._x1=+s},${this._y1=+o}`}arcTo(t,r,n,i,s){if(t=+t,r=+r,n=+n,i=+i,s=+s,s<0)throw new Error(`negative radius: ${s}`);let o=this._x1,l=this._y1,c=n-t,d=i-r,u=o-t,h=l-r,m=u*u+h*h;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(m>$l)if(!(Math.abs(h*c-d*u)>$l)||!s)this._append`L${this._x1=t},${this._y1=r}`;else{let g=n-o,b=i-l,v=c*c+d*d,y=g*g+b*b,x=Math.sqrt(v),w=Math.sqrt(m),_=s*Math.tan((c2-Math.acos((v+m-y)/(2*x*w)))/2),j=_/w,S=_/x;Math.abs(j-1)>$l&&this._append`L${t+j*u},${r+j*h}`,this._append`A${s},${s},0,0,${+(h*g>u*b)},${this._x1=t+S*c},${this._y1=r+S*d}`}}arc(t,r,n,i,s,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(i),c=n*Math.sin(i),d=t+l,u=r+c,h=1^o,m=o?i-s:s-i;this._x1===null?this._append`M${d},${u}`:(Math.abs(this._x1-d)>$l||Math.abs(this._y1-u)>$l)&&this._append`L${d},${u}`,n&&(m<0&&(m=m%u2+u2),m>pve?this._append`A${n},${n},0,1,${h},${t-l},${r-c}A${n},${n},0,1,${h},${this._x1=d},${this._y1=u}`:m>$l&&this._append`A${n},${n},0,${+(m>=c2)},${h},${this._x1=t+n*Math.cos(s)},${this._y1=r+n*Math.sin(s)}`)}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 RT(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 yve(t)}function DT(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Qz(e){this._context=e}Qz.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 gx(e){return new Qz(e)}function Zz(e){return e[0]}function Jz(e){return e[1]}function eV(e,t){var r=sr(!0),n=null,i=gx,s=null,o=RT(l);e=typeof e=="function"?e:e===void 0?Zz:sr(e),t=typeof t=="function"?t:t===void 0?Jz:sr(t);function l(c){var d,u=(c=DT(c)).length,h,m=!1,g;for(n==null&&(s=i(g=o())),d=0;d<=u;++d)!(d<u&&r(h=c[d],d,c))===m&&((m=!m)?s.lineStart():s.lineEnd()),m&&s.point(+e(h,d,c),+t(h,d,c));if(g)return s=null,g+""||null}return l.x=function(c){return arguments.length?(e=typeof c=="function"?c:sr(+c),l):e},l.y=function(c){return arguments.length?(t=typeof c=="function"?c:sr(+c),l):t},l.defined=function(c){return arguments.length?(r=typeof c=="function"?c:sr(!!c),l):r},l.curve=function(c){return arguments.length?(i=c,n!=null&&(s=i(n)),l):i},l.context=function(c){return arguments.length?(c==null?n=s=null:s=i(n=c),l):n},l}function hy(e,t,r){var n=null,i=sr(!0),s=null,o=gx,l=null,c=RT(d);e=typeof e=="function"?e:e===void 0?Zz:sr(+e),t=typeof t=="function"?t:sr(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?Jz:sr(+r);function d(h){var m,g,b,v=(h=DT(h)).length,y,x=!1,w,_=new Array(v),j=new Array(v);for(s==null&&(l=o(w=c())),m=0;m<=v;++m){if(!(m<v&&i(y=h[m],m,h))===x)if(x=!x)g=m,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),b=m-1;b>=g;--b)l.point(_[b],j[b]);l.lineEnd(),l.areaEnd()}x&&(_[m]=+e(y,m,h),j[m]=+t(y,m,h),l.point(n?+n(y,m,h):_[m],r?+r(y,m,h):j[m]))}if(w)return l=null,w+""||null}function u(){return eV().defined(i).curve(o).context(s)}return d.x=function(h){return arguments.length?(e=typeof h=="function"?h:sr(+h),n=null,d):e},d.x0=function(h){return arguments.length?(e=typeof h=="function"?h:sr(+h),d):e},d.x1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:sr(+h),d):n},d.y=function(h){return arguments.length?(t=typeof h=="function"?h:sr(+h),r=null,d):t},d.y0=function(h){return arguments.length?(t=typeof h=="function"?h:sr(+h),d):t},d.y1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:sr(+h),d):r},d.lineX0=d.lineY0=function(){return u().x(e).y(t)},d.lineY1=function(){return u().x(e).y(r)},d.lineX1=function(){return u().x(n).y(t)},d.defined=function(h){return arguments.length?(i=typeof h=="function"?h:sr(!!h),d):i},d.curve=function(h){return arguments.length?(o=h,s!=null&&(l=o(s)),d):o},d.context=function(h){return arguments.length?(h==null?s=l=null:l=o(s=h),d):s},d}class tV{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 vve(e){return new tV(e,!0)}function xve(e){return new tV(e,!1)}const IT={draw(e,t){const r=Ti(t/S0);e.moveTo(r,0),e.arc(0,0,r,0,px)}},bve={draw(e,t){const r=Ti(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()}},rV=Ti(1/3),wve=rV*2,jve={draw(e,t){const r=Ti(t/wve),n=r*rV;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},Nve={draw(e,t){const r=Ti(t),n=-r/2;e.rect(n,n,r,r)}},_ve=.8908130915292852,nV=_0(S0/10)/_0(7*S0/10),Sve=_0(px/10)*nV,Ave=-Yz(px
833/10)*nV,kve={draw(e,t){const r=Ti(t*_ve),n=Sve*r,i=Ave*r;e.moveTo(0,-r),e.lineTo(n,i);for(let s=1;s<5;++s){const o=px*s/5,l=Yz(o),c=_0(o);e.lineTo(c*r,-l*r),e.lineTo(l*n-c*i,c*n+l*i)}e.closePath()}},Wj=Ti(3),Eve={draw(e,t){const r=-Ti(t/(Wj*3));e.moveTo(0,r*2),e.lineTo(-Wj*r,-r),e.lineTo(Wj*r,-r),e.closePath()}},La=-.5,$a=Ti(3)/2,d2=1/Ti(12),Tve=(d2/2+1)*3,Pve={draw(e,t){const r=Ti(t/Tve),n=r/2,i=r*d2,s=n,o=r*d2+r,l=-s,c=o;e.moveTo(n,i),e.lineTo(s,o),e.lineTo(l,c),e.lineTo(La*n-$a*i,$a*n+La*i),e.lineTo(La*s-$a*o,$a*s+La*o),e.lineTo(La*l-$a*c,$a*l+La*c),e.lineTo(La*n+$a*i,La*i-$a*n),e.lineTo(La*s+$a*o,La*o-$a*s),e.lineTo(La*l+$a*c,La*c-$a*l),e.closePath()}};function Cve(e,t){let r=null,n=RT(i);e=typeof e=="function"?e:sr(e||IT),t=typeof t=="function"?t:sr(t===void 0?64:+t);function i(){let s;if(r||(r=s=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),s)return r=null,s+""||null}return i.type=function(s){return arguments.length?(e=typeof s=="function"?s:sr(s),i):e},i.size=function(s){return arguments.length?(t=typeof s=="function"?s:sr(+s),i):t},i.context=function(s){return arguments.length?(r=s??null,i):r},i}function A0(){}function k0(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 aV(e){this._context=e}aV.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:k0(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:k0(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ove(e){return new aV(e)}function iV(e){this._context=e}iV.prototype={areaStart:A0,areaEnd:A0,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:k0(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Mve(e){return new iV(e)}function sV(e){this._context=e}sV.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:k0(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Rve(e){return new sV(e)}function oV(e){this._context=e}oV.prototype={areaStart:A0,areaEnd:A0,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 Dve(e){return new oV(e)}function m3(e){return e<0?-1:1}function p3(e,t,r){var n=e._x1-e._x0,i=t-e._x1,s=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),l=(s*i+o*n)/(n+i);return(m3(s)+m3(o))*Math.min(Math.abs(s),Math.abs(o),.5*Math.abs(l))||0}function g3(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Gj(e,t,r){var n=e._x0,i=e._y0,s=e._x1,o=e._y1,l=(s-n)/3;e._context.bezierCurveTo(n+l,i+l*t,s-l,o-l*r,s,o)}function E0(e){this._context=e}E0.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:Gj(this,this._t0,g3(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;
833case 2:this._point=3,Gj(this,g3(this,r=p3(this,e,t)),r);break;default:Gj(this,this._t0,r=p3(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function lV(e){this._context=new cV(e)}(lV.prototype=Object.create(E0.prototype)).point=function(e,t){E0.prototype.point.call(this,t,e)};function cV(e){this._context=e}cV.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,s){this._context.bezierCurveTo(t,e,n,r,s,i)}};function Ive(e){return new E0(e)}function Lve(e){return new lV(e)}function uV(e){this._context=e}uV.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=y3(e),i=y3(t),s=0,o=1;o<r;++s,++o)this._context.bezierCurveTo(n[0][s],i[0][s],n[1][s],i[1][s],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 y3(e){var t,r=e.length-1,n,i=new Array(r),s=new Array(r),o=new Array(r);for(i[0]=0,s[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,s[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,s[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/s[t-1],s[t]-=n,o[t]-=n*o[t-1];for(i[r-1]=o[r-1]/s[r-1],t=r-2;t>=0;--t)i[t]=(o[t]-i[t+1])/s[t];for(s[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)s[t]=2*e[t+1]-i[t+1];return[i,s]}function $ve(e){return new uV(e)}function yx(e,t){this._context=e,this._t=t}yx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var 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 Fve(e){return new yx(e,.5)}function Bve(e){return new yx(e,0)}function Uve(e){return new yx(e,1)}function id(e,t){if((o=e.length)>1)for(var r=1,n,i,s=e[t[0]],o,l=s.length;r<o;++r)for(i=s,s=e[t[r]],n=0;n<l;++n)s[n][1]+=s[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function f2(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function qve(e,t){return e[t]}function zve(e){const t=[];return t.key=e,t}function Vve(){var e=sr([]),t=f2,r=id,n=qve;function i(s){var o=Array.from(e.apply(this,arguments),zve),l,c=o.length,d=-1,u;for(const h of s)for(l=0,++d;l<c;++l)(o[l][d]=[0,+n(h,o[l].key,d,s)]).data=h;for(l=0,u=DT(t(o));l<c;++l)o[u[l]].index=l;return r(o,u),o}return i.keys=function(s){return arguments.length?(e=typeof s=="function"?s:sr(Array.from(s)),i):e},i.value=function(s){return arguments.length?(n=typeof s=="function"?s:sr(+s),i):n},i.order=function(s){return arguments.length?(t=s==null?f2:typeof s=="function"?s:sr(Array.from(s)),i):t},i.offset=function(s){return arguments.length?(r=s??id,i):r},i}function Hve(e,t){if((n=e.length)>0){for(var r,n,i=0,s=e[0].length,o;i<s;++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}id(e,t)}}function Wve(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,s=n.length;r<s;++r){for(var o=0,l=0;o<i;++o)l+=e[o][r][1]||0;n[r][1]+=n[r][0]=-l/2}id(e,t)}}function Gve(e,t){if(!(!((o=e.length)>0)||!((s=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,s,o;n<s;++n){for(var l=0,c=0,d=0;l<o;++l){for(var u=e[t[l]],h=u[n][1]||0,m=u[n-1][1]||0,g=(h-m)/2,b=0;b<l;++b){var v=e[t[b]],y=v[n][1]||0,x=v[n-1][1]||0;g+=y-x}c+=h,d+=g*h}i[n-1][1]+=i[n-1][0]=r,c&&(r-=d/c)}i[n-1][1]+=i[n-1][0]=r,id(e,t)}}function fm(e){"@babel/helpers - typeof";return fm=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},fm(e)}var Kve=["type","size","sizeType"];function h2(){return h2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
vendor: 15,458 bytes, lines 833-836
833for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},h2.apply(this,arguments)}function v3(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 x3(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?v3(Object(r),!0).forEach(function(n){Yve(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v3(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Yve(e,t,r){return t=Xve(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xve(e){var t=Qve(e,"string");return fm(t)=="symbol"?t:t+""}function Qve(e,t){if(fm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(fm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Zve(e,t){if(e==null)return{};var r=Jve(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Jve(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 dV={symbolCircle:IT,symbolCross:bve,symbolDiamond:jve,symbolSquare:Nve,symbolStar:kve,symbolTriangle:Eve,symbolWye:Pve},exe=Math.PI/180,txe=function(t){var r="symbol".concat(mx(t));return dV[r]||IT},rxe=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*exe;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}},nxe=function(t,r){dV["symbol".concat(mx(t))]=r},LT=function(t){var r=t.type,n=r===void 0?"circle":r,i=t.size,s=i===void 0?64:i,o=t.sizeType,l=o===void 0?"area":o,c=Zve(t,Kve),d=x3(x3({},c),{},{type:n,size:s,sizeType:l}),u=function(){var y=txe(n),x=Cve().type(y).size(rxe(s,l,n));return x()},h=d.className,m=d.cx,g=d.cy,b=lt(d,!0);return m===+m&&g===+g&&s===+s?te.createElement("path",h2({},b,{className:bt("recharts-symbols",h),transform:"translate(".concat(m,", ").concat(g,")"),d:u()})):null};LT.registerSymbol=nxe;function sd(e){"@babel/helpers - typeof";return sd=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},sd(e)}function m2(){return m2=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},m2.apply(this,arguments)}function b3(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 axe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?b3(Object(r),!0).forEach(function(n){hm(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b3(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ixe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sxe(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,hV(n.key),n)}}function oxe(e,t,r){return t&&sxe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function lxe(e,t,r){return t=T0(t),cxe(e,fV()?Reflect.construct(t,r||[],T0(e).constructor):t.apply(e,r))}function cxe(e,t){if(t&&(sd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return uxe(e)}function uxe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fV(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(fV=function(){return!!e})()}function T0(e){return T0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},T0(e)}function dxe(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&&p2(e,t)}function p2(e,t){return p2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},p2(e,t)}function hm(e,t,r){return t=hV(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hV(e){var t=fxe(e,"string");return sd(t)=="symbol"?t:t+""}function fxe(e,t){if(sd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(sd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Fa=32,$T=(function(e){function t(){return ixe(this,t),lxe(this,t,arguments)}return dxe(t,e),oxe(t,[{key:"renderIcon",value:function(n){var i=this.props.inactiveColor,s=Fa/2,o=Fa/6,l=Fa/3,c=n.inactive?i:n.color;if(n.type==="plainline")return te.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:s,x2:Fa,y2:s,className:"recharts-legend-icon"});if(n.type==="line")return te.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(s,"h").concat(l,` 834 A`).concat(o,",").concat(o,",0,1,1,").concat(2*l,",").concat(s,` 835 H`).concat(Fa,"M").concat(2*l,",").concat(s,` 836 A`).concat(o,",").concat(o,",0,1,1,").concat(l,",").concat(s),className:"recharts-legend-icon"});if(n.type==="rect")return te.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(Fa/8,"h").concat(Fa,"v").concat(Fa*3/4,"h").concat(-Fa,"z"),className:"recharts-legend-icon"});if(te.isValidElement(n.legendIcon)){var d=axe({},n);return delete d.legendIcon,te.cloneElement(n.legendIcon,d)}return te.createElement(LT,{fill:c,cx:s,cy:s,size:Fa,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,i=this.props,s=i.payload,o=i.iconSize,l=i.layout,c=i.formatter,d=i.inactiveColor,u={x:0,y:0,width:Fa,height:Fa},h={display:l==="horizontal"?"inline-block":"block",marginRight:10},m={display:"inline-block",verticalAlign:"middle",marginRight:4};return s.map(function(g,b){var v=g.formatter||c,y=bt(hm(hm({"recharts-legend-item":!0},"legend-item-".concat(b),!0),"inactive",g.inactive));if(g.type==="none")return null;var x=mt(g.value)?null:g.value;Ni(!mt(g.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 w=g.inactive?d:g.color;return te.createElement("li",m2({className:y,style:h,key:"legend-item-".concat(b)},_c(n.props,g,b)),te.createElement(o2,{width:o,height:o,viewBox:u,style:m},n.renderIcon(g)),te.createElement("span",{className:"recharts-legend-item-text",style:{color:w}},v?v(x,g,b):x))})}},{key:"render",value:function(){var n=this.props,i=n.payload,s=n.layout,o=n.align;if(!i||!i.length)return null;var l={padding:0,margin:0,textAlign:s==="horizontal"?o:"left"};return te.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])})(A.PureComponent);hm($T,"displayName","Legend");hm($T,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var Kj,w3;function hxe(){if(w3)return Kj;w3=1;var e=dx();function t(){this.__data__=new e,this.size=0}return Kj=t,Kj}var Yj,j3;function mxe(){if(j3)return Yj;j3=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return Yj=e,Yj}var Xj,N3;function pxe(){if(N3)return Xj;N3=1;function e(t){return this.__data__.get(t)}return Xj=e,Xj}var Qj,_3;function gxe(){if(_3)return Qj;_3=1;function e(t){return this.__data__.has(t)}return Qj=e,Qj}var Zj,S3;function yxe(){if(S3)return Zj;S3=1;var e=dx(),t=ET(),r=TT(),n=200;function i(s,o){var l=this.__data__;if(l instanceof e){var c=l.__data__;if(!t||c.length<n-1)return c.push([s,o]),this.size=++l.size,this;l=this.__data__=new r(c)}return l.set(s,o),this.size=l.size,this}return Zj=i,Zj}var Jj,A3;function mV(){if(A3)return Jj;A3=1;var e=dx(),t=hxe(),r=mxe(),n=pxe(),i=gxe(),s=yxe();function o(l){var c=this.__data__=new e(l);this.size=c.size}return o.prototype.clear=t,o.prototype.delete=r,o.prototype.get=n,o.prototype.has=i,o.prototype.set=s,Jj=o,Jj}var eN,k3;function vxe(){if(k3)return eN;k3=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return eN=t,eN}var tN,E3;function xxe(){if(E3)return tN;E3=1;function e(t){return this.__data__.has(t)}return tN=e,tN}var rN,T3;function pV(){if(T3)return rN;T3=1;var e=TT(),t=vxe(),r=xxe();function n(i){var s=-1,o=i==null?0:i.length;for(this.__data__=new e;++s<o;)this.add(i[s])}return n.prototype.add=n.prototype.push=t,n.prototype.has=r,rN=n,rN}var nN,P3;function gV(){if(P3)return nN;P3=1;function e(t,r){for(var n=-1,i=t==null?0:t.length;++n<i;)if(r(t[n],n,t))return!0;return!1}return nN=e,nN}var aN,C3;function yV(){if(C3)return aN;C3=1;function e(t,r){return t.has(r)}return aN=e,aN}var iN,O3;function vV(){if(O3)return iN;O3=1;var e=pV(),t=gV(),r=yV(),n=1,i=2;function s(o,l,c,d,u,h){var m=c&n,g=o.length,b=l.length;if(g!=b&&!(m&&b>g))return!1;var v=h.get(o),y=h.get(l);if(v&&y)return v==l&&y==o;var x=-1,w=!0,_=c&i?new e:void 0;for(h.set(o,l),h.set(l,o);++x<g;){var j=o[x],S=l[x];if(d)var k=m?d(S,j,x,l,o,h):d(j,S,x,o,l,h);if(k!==void 0){if(k)continue;w=!1;break}if(_){if(!t(l,function(T,P){if(!r(_,P)&&(j===T||u(j,T,c,d,h)))return _.push(P)})){w=!1;break}}else if(!(j===S||u(j,S,c,d,h))){w=!1;break}}return h.delete(o),h.delete(l),w}return iN=s,iN}var sN,M3;function bxe(){if(M3)return sN;M3=1;var e=cs(),t=e.Uint8Array;return sN=t,sN}var oN,R3;function wxe(){if(R3)return oN;R3=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i,s){n[++r]=[s,i]}),n}return oN=e,oN}var lN,D3;function FT(){if(D3)return lN;D3=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i){n[++r]=i}),n}return lN=e,lN}var cN,I3;function jxe(){if(I3)return cN;I3=1;var e=Ap(),t=bxe(),r=kT(),n=vV(),i=wxe(),s=FT(),o=1,l=2,c="[object Boolean]",d="[object Date]",u="[object Error]",h="[object Map]",m="[object Number]",g="[object RegExp]",b="[object Set]",v="[object String]",y="[object Symbol]",x="[object ArrayBuffer]",w="[object DataView]",_=e?e.prototype:void 0,j=_?_.valueOf:void 0;function S(k,T,P,M,C,O,D){switch(P){case w:if(k.byteLength!=T.byteLength||k.byteOffset!=T.byteOffset)return!1;k=k.buffer,T=T.buffer;case x:return!(k.byteLength!=T.byteLength||!O(new t(k),new t(T)));case c:case d:case m:return r(+k,+T);case u:return k.name==T.name&&k.message==T.message;case g:case v:return k==T+"";case h:var L=i;case b:var F=M&o;if(L||(L=s),k.size!=T.size&&!F)return!1;var U=D.get(k);if(U)return U==T;M|=l,D.set(k,T);var G=n(L(k),L(T),M,C,O,D);return D.delete(k),G;case y:if(j)return j.call(k)==j.call(T)}return!1}return cN=S,cN}var uN,L3;function xV(){if(L3)return uN;L3=1;function e(t,r){for(var n=-1,i=r.length,s=t.length;++n<i;)t[s+n]=r[n];return t}return uN=e,uN}var dN,$3;function Nxe(){if($3)return dN;$3=1;var e=xV(),t=ca();function r(n,i,s){var o=i(n);return t(n)?o:e(o,s(n))}return dN=r,dN}var fN,F3;function _xe(){if(F3)return fN;F3=1;function e(t,r){for(var n=-1,i=t==null?0:t.length,s=0,o=[];++n<i;){var l=t[n];r(l,n,t)&&(o[s++]=l)}return o}return fN=e,fN}var hN,B3;function Sxe(){if(B3)return hN;B3=1;function e(){return[]}return hN=e,hN}var mN,U3;function Axe(){if(U3)return mN;U3=1;var e=_xe(),t=Sxe(),r=Object.prototype,n=r.propertyIsEnumerable,i=Object.getOwnPropertySymbols,s=i?function(o){return o==null?[]:(o=Object(o),e(i(o),function(l){return n.call(o,l)}))}:t;return mN=s,mN}var pN,q3;function kxe(){if(q3)return pN;q3=1;function e(t,r){for(var n=-1,i=Array(t);++n<t;)i[n]=r(n);return i}return pN=e,pN}var gN,z3;function Exe(){if(z3)return gN;z3=1;var e=Ys(),t=Xs(),r="[object Arguments]";function n(i){return t(i)&&e(i)==r}return gN=n,gN}var yN,V3;function BT(){if(V3)return yN;V3=1;var e=Exe(),t=Xs(),r=Object.prototype,n=r.hasOwnProperty,i=r.propertyIsEnumerable,s=e((function(){return arguments})())?e:function(o){return t(o)&&n.call(o,"callee")&&!i.call(o,"callee")};return yN=s,yN}var Ah={exports:{}},vN,H3;function Txe(){if(H3)return vN;H3=1;function e(){return!1}return vN=e,vN}Ah.exports;var W3;function bV(){return W3||(W3=1,(function(e,t){var r=cs(),n=Txe(),i=t&&!t.nodeType&&t,s=i&&!0&&e&&!e.nodeType&&e,o=s&&s.exports===i,l=o?r.Buffer:void 0,c=l?l.isBuffer:void 0,d=c||n;e.exports=d})(Ah,Ah.exports)),Ah.exports}var xN,G3;function UT(){if(G3)return xN;G3=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function r(n,i){var s=typeof n;return i=i??e,!!i&&(s=="number"||s!="symbol"&&t.test(n))&&n>-1&&n%1==0&&n<i}return xN=r,xN}var bN,K3;function qT(){if(K3)return bN;K3=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return bN=t,bN}var wN,Y3;function Pxe(){if(Y3)return wN;Y3=1;var e=Ys(),t=qT(),r=Xs(),n="[object Arguments]",i="[object Array]",s="[object Boolean]",o="[object Date]",l="[object Error]",c="[object Function]",d="[object Map]",u="[object Number]",h="[object Object]",m="[object RegExp]",g="[object Set]",b="[object String]",v="[object WeakMap]",y="[object ArrayBuffer]",x="[object DataView]",w="[object Float32Array]",_="[object Float64Array]",j="[object Int8Array]",S="[object Int16Array]",k="[object Int32Array]",T="[object Uint8Array]",P="[object Uint8ClampedArray]",M="[object Uint16Array]",C="[object Uint32Array]",O={};O[w]=O[_]=O[j]=O[S]=O[k]=O[T]=O[P]=O[M]=O[C]=!0,O[n]=O[i]=O[y]=O[s]=O[x]=O[o]=O[l]=O[c]=O[d]=O[u]=O[h]=O[m]=O[g]=O[b]=O[v]=!1;function D(L){return r(L)&&t(L.length)&&!!O[e(L)]}return wN=D,wN}var jN,X3;function wV(){if(X3)return jN;X3=1;function e(t){return function(r){return t(r)}}return jN=e,jN}var kh={exports:{}};kh.exports;var Q3;function Cxe(){return Q3||(Q3=1,(function(e,t){var r=Bz(),n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===n,o=s&&r.process,l=(function(){try{var c=i&&i.require&&i.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}})();e.exports=l})(kh,kh.exports)),kh.exports}var NN,Z3;function jV(){if(Z3)return NN;Z3=1;var e=Pxe(),t=wV(),r=Cxe(),n=r&&r.isTypedArray,i=n?t(n):e;return NN=i,NN}var _N,J3;function Oxe(){if(J3)return _N;J3=1;var e=kxe(),t=BT(),r=ca(),n=bV(),i=UT(),s=jV(),o=Object.prototype,l=o.hasOwnProperty;function c(d,u){var h=r(d),m=!h&&t(d),g=!h&&!m&&n(d),b=!h&&!m&&!g&&s(d),v=h||m||g||b,y=v?e(d.length,String):[],x=y.length;for(var w in d)(u||l.call(d,w))&&!(v&&(w=="length"||g&&(w=="offset"||w=="parent")||b&&(w=="buffer"||w=="byteLength"||w=="byteOffset")||i(w,x)))&&y.push(w);return y}return _N=c,_N}var SN,eI;
vendor: 5,468 bytes, line 836
836function Mxe(){if(eI)return SN;eI=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||e;return r===i}return SN=t,SN}var AN,tI;function NV(){if(tI)return AN;tI=1;function e(t,r){return function(n){return t(r(n))}}return AN=e,AN}var kN,rI;function Rxe(){if(rI)return kN;rI=1;var e=NV(),t=e(Object.keys,Object);return kN=t,kN}var EN,nI;function Dxe(){if(nI)return EN;nI=1;var e=Mxe(),t=Rxe(),r=Object.prototype,n=r.hasOwnProperty;function i(s){if(!e(s))return t(s);var o=[];for(var l in Object(s))n.call(s,l)&&l!="constructor"&&o.push(l);return o}return EN=i,EN}var TN,aI;function kp(){if(aI)return TN;aI=1;var e=AT(),t=qT();function r(n){return n!=null&&t(n.length)&&!e(n)}return TN=r,TN}var PN,iI;function vx(){if(iI)return PN;iI=1;var e=Oxe(),t=Dxe(),r=kp();function n(i){return r(i)?e(i):t(i)}return PN=n,PN}var CN,sI;function Ixe(){if(sI)return CN;sI=1;var e=Nxe(),t=Axe(),r=vx();function n(i){return e(i,r,t)}return CN=n,CN}var ON,oI;function Lxe(){if(oI)return ON;oI=1;var e=Ixe(),t=1,r=Object.prototype,n=r.hasOwnProperty;function i(s,o,l,c,d,u){var h=l&t,m=e(s),g=m.length,b=e(o),v=b.length;if(g!=v&&!h)return!1;for(var y=g;y--;){var x=m[y];if(!(h?x in o:n.call(o,x)))return!1}var w=u.get(s),_=u.get(o);if(w&&_)return w==o&&_==s;var j=!0;u.set(s,o),u.set(o,s);for(var S=h;++y<g;){x=m[y];var k=s[x],T=o[x];if(c)var P=h?c(T,k,x,o,s,u):c(k,T,x,s,o,u);if(!(P===void 0?k===T||d(k,T,l,c,u):P)){j=!1;break}S||(S=x=="constructor")}if(j&&!S){var M=s.constructor,C=o.constructor;M!=C&&"constructor"in s&&"constructor"in o&&!(typeof M=="function"&&M instanceof M&&typeof C=="function"&&C instanceof C)&&(j=!1)}return u.delete(s),u.delete(o),j}return ON=i,ON}var MN,lI;function $xe(){if(lI)return MN;lI=1;var e=Rc(),t=cs(),r=e(t,"DataView");return MN=r,MN}var RN,cI;function Fxe(){if(cI)return RN;cI=1;var e=Rc(),t=cs(),r=e(t,"Promise");return RN=r,RN}var DN,uI;function _V(){if(uI)return DN;uI=1;var e=Rc(),t=cs(),r=e(t,"Set");return DN=r,DN}var IN,dI;function Bxe(){if(dI)return IN;dI=1;var e=Rc(),t=cs(),r=e(t,"WeakMap");return IN=r,IN}var LN,fI;function Uxe(){if(fI)return LN;fI=1;var e=$xe(),t=ET(),r=Fxe(),n=_V(),i=Bxe(),s=Ys(),o=Uz(),l="[object Map]",c="[object Object]",d="[object Promise]",u="[object Set]",h="[object WeakMap]",m="[object DataView]",g=o(e),b=o(t),v=o(r),y=o(n),x=o(i),w=s;return(e&&w(new e(new ArrayBuffer(1)))!=m||t&&w(new t)!=l||r&&w(r.resolve())!=d||n&&w(new n)!=u||i&&w(new i)!=h)&&(w=function(_){var j=s(_),S=j==c?_.constructor:void 0,k=S?o(S):"";if(k)switch(k){case g:return m;case b:return l;case v:return d;case y:return u;case x:return h}return j}),LN=w,LN}var $N,hI;function qxe(){if(hI)return $N;hI=1;var e=mV(),t=vV(),r=jxe(),n=Lxe(),i=Uxe(),s=ca(),o=bV(),l=jV(),c=1,d="[object Arguments]",u="[object Array]",h="[object Object]",m=Object.prototype,g=m.hasOwnProperty;function b(v,y,x,w,_,j){var S=s(v),k=s(y),T=S?u:i(v),P=k?u:i(y);T=T==d?h:T,P=P==d?h:P;var M=T==h,C=P==h,O=T==P;if(O&&o(v)){if(!o(y))return!1;S=!0,M=!1}if(O&&!M)return j||(j=new e),S||l(v)?t(v,y,x,w,_,j):r(v,y,T,x,w,_,j);if(!(x&c)){var D=M&&g.call(v,"__wrapped__"),L=C&&g.call(y,"__wrapped__");if(D||L){var F=D?v.value():v,U=L?y.value():y;return j||(j=new e),_(F,U,x,w,j)}}return O?(j||(j=new e),n(v,y,x,w,_,j)):!1}return $N=b,$N}var FN,mI;function zT(){if(mI)return FN;mI=1;var e=qxe(),t=Xs();function r(n,i,s,o,l){return n===i?!0:n==null||i==null||!t(n)&&!t(i)?n!==n&&i!==i:e(n,i,s,o,r,l)}return FN=r,FN}var BN,pI;function zxe(){if(pI)return BN;pI=1;var e=mV(),t=zT(),r=1,n=2;function i(s,o,l,c){var d=l.length,u=d,h=!c;if(s==null)return!u;for(s=Object(s);d--;){var m=l[d];if(h&&m[2]?m[1]!==s[m[0]]:!(m[0]in s))return!1}for(;++d<u;){m=l[d];var g=m[0],b=s[g],v=m[1];if(h&&m[2]){if(b===void 0&&!(g in s))return!1}else{var y=new e;if(c)var x=c(b,v,g,s,o,y);if(!(x===void 0?t(v,b,r|n,c,y):x))return!1}}return!0}return BN=i,BN}var UN,gI;function SV(){if(gI)return UN;gI=1;var e=ll();function t(r){return r===r&&!e(r)}return UN=t,UN}var qN,yI;function Vxe(){if(yI)return qN;yI=1;var e=SV(),t=vx();function r(n){for(var i=t(n),s=i.length;s--;){var o=i[s],l=n[o];i[s]=[o,l,e(l)]}return i}return qN=r,qN}var zN,vI;function AV(){if(vI)return zN;vI=1;function e(t,r){return function(n){return n==null?!1:n[t]===r&&(r!==void 0||t in Object(n))}}return zN=e,zN}var VN,xI;function Hxe(){if(xI)return VN;xI=1;var e=zxe(),t=Vxe(),r=AV();function n(i){var s=t(i);return s.length==1&&s[0][2]?r(s[0][0],s[0][1]):function(o){return o===i||e(o,i,s)}}return VN=n,VN}var HN,bI;function Wxe(){if(bI)return HN;bI=1;function e(t,r){return t!=null&&r in Object(t)}return HN=e,HN}var WN,wI;function Gxe(){if(wI)return WN;wI=1;var e=Vz(),t=BT(),r=ca(),n=UT(),i=qT(),s=hx();function o(l,c,d){c=e(c,l);for(var u=-1,h=c.length,m=!1;++u<h;){var g=s(c[u]);if(!(m=l!=null&&d(l,g)))break;l=l[g]}return m||++u!=h?m:(h=l==null?0:l.length,!!h&&i(h)&&n(g,h)&&(r(l)||t(l)))}return WN=o,WN}var GN,jI;function Kxe(){if(jI)return GN;jI=1;var e=Wxe(),t=Gxe();function r(n,i){return n!=null&&t(n,i,e)}return GN=r,GN}var KN,NI;function Yxe(){if(NI)return KN;NI=1;var e=zT(),t=Hz(),r=Kxe(),n=ST(),i=SV(),s=AV(),o=hx(),l=1,c=2;function d(u,h){return n(u)&&i(h)?s(o(u),h):function(m){var g=t(m,u);return g===void 0&&g===h?r(m,u):e(h,g,l|c)}}return KN=d,KN}var YN,_I;function af(){if(_I)return YN;_I=1;function e(t){return t}return YN=e,YN}var XN,SI;function Xxe(){if(SI)return XN;SI=1;function e(t){return function(r){return r==null?void 0:r[t]}}return XN=e,XN}var QN,AI;
vendor: 45,399 bytes, lines 836-844
836function Qxe(){if(AI)return QN;AI=1;var e=CT();function t(r){return function(n){return e(n,r)}}return QN=t,QN}var ZN,kI;function Zxe(){if(kI)return ZN;kI=1;var e=Xxe(),t=Qxe(),r=ST(),n=hx();function i(s){return r(s)?e(n(s)):t(s)}return ZN=i,ZN}var JN,EI;function us(){if(EI)return JN;EI=1;var e=Hxe(),t=Yxe(),r=af(),n=ca(),i=Zxe();function s(o){return typeof o=="function"?o:o==null?r:typeof o=="object"?n(o)?t(o[0],o[1]):e(o):i(o)}return JN=s,JN}var e_,TI;function kV(){if(TI)return e_;TI=1;function e(t,r,n,i){for(var s=t.length,o=n+(i?1:-1);i?o--:++o<s;)if(r(t[o],o,t))return o;return-1}return e_=e,e_}var t_,PI;function Jxe(){if(PI)return t_;PI=1;function e(t){return t!==t}return t_=e,t_}var r_,CI;function ebe(){if(CI)return r_;CI=1;function e(t,r,n){for(var i=n-1,s=t.length;++i<s;)if(t[i]===r)return i;return-1}return r_=e,r_}var n_,OI;function tbe(){if(OI)return n_;OI=1;var e=kV(),t=Jxe(),r=ebe();function n(i,s,o){return s===s?r(i,s,o):e(i,t,o)}return n_=n,n_}var a_,MI;function rbe(){if(MI)return a_;MI=1;var e=tbe();function t(r,n){var i=r==null?0:r.length;return!!i&&e(r,n,0)>-1}return a_=t,a_}var i_,RI;function nbe(){if(RI)return i_;RI=1;function e(t,r,n){for(var i=-1,s=t==null?0:t.length;++i<s;)if(n(r,t[i]))return!0;return!1}return i_=e,i_}var s_,DI;function abe(){if(DI)return s_;DI=1;function e(){}return s_=e,s_}var o_,II;function ibe(){if(II)return o_;II=1;var e=_V(),t=abe(),r=FT(),n=1/0,i=e&&1/r(new e([,-0]))[1]==n?function(s){return new e(s)}:t;return o_=i,o_}var l_,LI;function sbe(){if(LI)return l_;LI=1;var e=pV(),t=rbe(),r=nbe(),n=yV(),i=ibe(),s=FT(),o=200;function l(c,d,u){var h=-1,m=t,g=c.length,b=!0,v=[],y=v;if(u)b=!1,m=r;else if(g>=o){var x=d?null:i(c);if(x)return s(x);b=!1,m=n,y=new e}else y=d?[]:v;e:for(;++h<g;){var w=c[h],_=d?d(w):w;if(w=u||w!==0?w:0,b&&_===_){for(var j=y.length;j--;)if(y[j]===_)continue e;d&&y.push(_),v.push(w)}else m(y,_,u)||(y!==v&&y.push(_),v.push(w))}return v}return l_=l,l_}var c_,$I;function obe(){if($I)return c_;$I=1;var e=us(),t=sbe();function r(n,i){return n&&n.length?t(n,e(i,2)):[]}return c_=r,c_}var lbe=obe();const FI=Ht(lbe);function EV(e,t,r){return t===!0?FI(e,r):mt(t)?FI(e,t):e}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)}var cbe=["ref"];function BI(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 ws(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?BI(Object(r),!0).forEach(function(n){xx(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):BI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ube(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function UI(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,PV(n.key),n)}}function dbe(e,t,r){return t&&UI(e.prototype,t),r&&UI(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function fbe(e,t,r){return t=P0(t),hbe(e,TV()?Reflect.construct(t,r||[],P0(e).constructor):t.apply(e,r))}function hbe(e,t){if(t&&(od(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mbe(e)}function mbe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function TV(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(TV=function(){return!!e})()}function P0(e){return P0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},P0(e)}function pbe(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&&g2(e,t)}function g2(e,t){return g2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},g2(e,t)}function xx(e,t,r){return t=PV(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PV(e){var t=gbe(e,"string");return od(t)=="symbol"?t:t+""}function gbe(e,t){if(od(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(od(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function ybe(e,t){if(e==null)return{};var r=vbe(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function vbe(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 xbe(e){return e.value}function bbe(e,t){if(te.isValidElement(e))return te.cloneElement(e,t);if(typeof e=="function")return te.createElement(e,t);t.ref;var r=ybe(t,cbe);return te.createElement($T,r)}var qI=1,Bs=(function(e){function t(){var r;ube(this,t);for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];return r=fbe(this,t,[].concat(i)),xx(r,"lastBoundingBox",{width:-1,height:-1}),r}return pbe(t,e),dbe(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)>qI||Math.abs(i.height-this.lastBoundingBox.height)>qI)&&(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?ws({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,s=i.layout,o=i.align,l=i.verticalAlign,c=i.margin,d=i.chartWidth,u=i.chartHeight,h,m;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(o==="center"&&s==="vertical"){var g=this.getBBoxSnapshot();h={left:((d||0)-g.width)/2}}else h=o==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(l==="middle"){var b=this.getBBoxSnapshot();m={top:((u||0)-b.height)/2}}else m=l==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return ws(ws({},h),m)}},{key:"render",value:function(){var n=this,i=this.props,s=i.content,o=i.width,l=i.height,c=i.wrapperStyle,d=i.payloadUniqBy,u=i.payload,h=ws(ws({position:"absolute",width:o||"auto",height:l||"auto"},this.getDefaultPosition(c)),c);return te.createElement("div",{className:"recharts-legend-wrapper",style:h,ref:function(g){n.wrapperNode=g}},bbe(s,ws(ws({},this.props),{},{payload:EV(u,d,xbe)})))}}],[{key:"getWithHeight",value:function(n,i){var s=ws(ws({},this.defaultProps),n.props),o=s.layout;return o==="vertical"&&Fe(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||i}:null}}])})(A.PureComponent);xx(Bs,"displayName","Legend");xx(Bs,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var u_,zI;function wbe(){if(zI)return u_;zI=1;var e=Ap(),t=BT(),r=ca(),n=e?e.isConcatSpreadable:void 0;function i(s){return r(s)||t(s)||!!(n&&s&&s[n])}return u_=i,u_}var d_,VI;function CV(){if(VI)return d_;VI=1;var e=xV(),t=wbe();function r(n,i,s,o,l){var c=-1,d=n.length;for(s||(s=t),l||(l=[]);++c<d;){var u=n[c];i>0&&s(u)?i>1?r(u,i-1,s,o,l):e(l,u):o||(l[l.length]=u)}return l}return d_=r,d_}var f_,HI;function jbe(){if(HI)return f_;HI=1;function e(t){return function(r,n,i){for(var s=-1,o=Object(r),l=i(r),c=l.length;c--;){var d=l[t?c:++s];if(n(o[d],d,o)===!1)break}return r}}return f_=e,f_}var h_,WI;function Nbe(){if(WI)return h_;WI=1;var e=jbe(),t=e();return h_=t,h_}var m_,GI;function OV(){if(GI)return m_;GI=1;var e=Nbe(),t=vx();function r(n,i){return n&&e(n,i,t)}return m_=r,m_}var p_,KI;function _be(){if(KI)return p_;KI=1;var e=kp();function t(r,n){return function(i,s){if(i==null)return i;if(!e(i))return r(i,s);for(var o=i.length,l=n?o:-1,c=Object(i);(n?l--:++l<o)&&s(c[l],l,c)!==!1;);return i}}return p_=t,p_}var g_,YI;function VT(){if(YI)return g_;YI=1;var e=OV(),t=_be(),r=t(e);return g_=r,g_}var y_,XI;function MV(){if(XI)return y_;XI=1;var e=VT(),t=kp();function r(n,i){var s=-1,o=t(n)?Array(n.length):[];return e(n,function(l,c,d){o[++s]=i(l,c,d)}),o}return y_=r,y_}var v_,QI;function Sbe(){if(QI)return v_;QI=1;function e(t,r){var n=t.length;for(t.sort(r);n--;)t[n]=t[n].value;return t}return v_=e,v_}var x_,ZI;function Abe(){if(ZI)return x_;ZI=1;var e=tf();function t(r,n){if(r!==n){var i=r!==void 0,s=r===null,o=r===r,l=e(r),c=n!==void 0,d=n===null,u=n===n,h=e(n);if(!d&&!h&&!l&&r>n||l&&c&&u&&!d&&!h||s&&c&&u||!i&&u||!o)return 1;if(!s&&!l&&!h&&r<n||h&&i&&o&&!s&&!l||d&&i&&o||!c&&o||!u)return-1}return 0}return x_=t,x_}var b_,JI;function kbe(){if(JI)return b_;JI=1;var e=Abe();function t(r,n,i){for(var s=-1,o=r.criteria,l=n.criteria,c=o.length,d=i.length;++s<c;){var u=e(o[s],l[s]);if(u){if(s>=d)return u;var h=i[s];return u*(h=="desc"?-1:1)}}return r.index-n.index}return b_=t,b_}var w_,eL;function Ebe(){if(eL)return w_;eL=1;var e=PT(),t=CT(),r=us(),n=MV(),i=Sbe(),s=wV(),o=kbe(),l=af(),c=ca();function d(u,h,m){h.length?h=e(h,function(v){return c(v)?function(y){return t(y,v.length===1?v[0]:v)}:v}):h=[l];var g=-1;h=e(h,s(r));var b=n(u,function(v,y,x){var w=e(h,function(_){return _(v)});return{criteria:w,index:++g,value:v}});return i(b,function(v,y){return o(v,y,m)})}return w_=d,w_}var j_,tL;function Tbe(){if(tL)return j_;tL=1;function e(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}return j_=e,j_}var N_,rL;function Pbe(){if(rL)return N_;rL=1;var e=Tbe(),t=Math.max;function r(n,i,s){return i=t(i===void 0?n.length-1:i,0),function(){for(var o=arguments,l=-1,c=t(o.length-i,0),d=Array(c);++l<c;)d[l]=o[i+l];l=-1;for(var u=Array(i+1);++l<i;)u[l]=o[l];return u[i]=s(d),e(n,this,u)}}return N_=r,N_}var __,nL;function Cbe(){if(nL)return __;nL=1;function e(t){return function(){return t}}return __=e,__}var S_,aL;function RV(){if(aL)return S_;aL=1;var e=Rc(),t=(function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}})();return S_=t,S_}var A_,iL;function Obe(){if(iL)return A_;iL=1;var e=Cbe(),t=RV(),r=af(),n=t?function(i,s){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(s),writable:!0})}:r;return A_=n,A_}var k_,sL;function Mbe(){if(sL)return k_;sL=1;var e=800,t=16,r=Date.now;function n(i){var s=0,o=0;return function(){var l=r(),c=t-(l-o);if(o=l,c>0){if(++s>=e)return arguments[0]}else s=0;return i.apply(void 0,arguments)}}return k_=n,k_}var E_,oL;function Rbe(){if(oL)return E_;oL=1;var e=Obe(),t=Mbe(),r=t(e);return E_=r,E_}var T_,lL;function Dbe(){if(lL)return T_;lL=1;var e=af(),t=Pbe(),r=Rbe();function n(i,s){return r(t(i,s,e),i+"")}return T_=n,T_}var P_,cL;function bx(){if(cL)return P_;cL=1;var e=kT(),t=kp(),r=UT(),n=ll();function i(s,o,l){if(!n(l))return!1;var c=typeof o;return(c=="number"?t(l)&&r(o,l.length):c=="string"&&o in l)?e(l[o],s):!1}return P_=i,P_}var C_,uL;function Ibe(){if(uL)return C_;uL=1;var e=CV(),t=Ebe(),r=Dbe(),n=bx(),i=r(function(s,o){if(s==null)return[];var l=o.length;return l>1&&n(s,o[0],o[1])?o=[]:l>2&&n(o[0],o[1],o[2])&&(o=[o[0]]),t(s,e(o,1),[])});return C_=i,C_}var Lbe=Ibe();const HT=Ht(Lbe);function mm(e){"@babel/helpers - typeof";return mm=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},mm(e)}function y2(){return y2=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},y2.apply(this,arguments)}function $be(e,t){return qbe(e)||Ube(e,t)||Bbe(e,t)||Fbe()}function Fbe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 837In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bbe(e,t){if(e){if(typeof e=="string")return dL(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 dL(e,t)}}function dL(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 Ube(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,s,o,l=[],c=!0,d=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(c=(n=s.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(u){d=!0,i=u}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw i}}return l}}function qbe(e){if(Array.isArray(e))return e}function fL(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 O_(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fL(Object(r),!0).forEach(function(n){zbe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fL(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zbe(e,t,r){return t=Vbe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vbe(e){var t=Hbe(e,"string");return mm(t)=="symbol"?t:t+""}function Hbe(e,t){if(mm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(mm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Wbe(e){return Array.isArray(e)&&Yr(e[0])&&Yr(e[1])?e.join(" ~ "):e}var Gbe=function(t){var r=t.separator,n=r===void 0?" : ":r,i=t.contentStyle,s=i===void 0?{}:i,o=t.itemStyle,l=o===void 0?{}:o,c=t.labelStyle,d=c===void 0?{}:c,u=t.payload,h=t.formatter,m=t.itemSorter,g=t.wrapperClassName,b=t.labelClassName,v=t.label,y=t.labelFormatter,x=t.accessibilityLayer,w=x===void 0?!1:x,_=function(){if(u&&u.length){var D={padding:0,margin:0},L=(m?HT(u,m):u).map(function(F,U){if(F.type==="none")return null;var G=O_({display:"block",paddingTop:4,paddingBottom:4,color:F.color||"#000"},l),W=F.formatter||h||Wbe,q=F.value,V=F.name,z=q,I=V;if(W&&z!=null&&I!=null){var B=W(q,V,F,U,u);if(Array.isArray(B)){var H=$be(B,2);z=H[0],I=H[1]}else z=B}return te.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(U),style:G},Yr(I)?te.createElement("span",{className:"recharts-tooltip-item-name"},I):null,Yr(I)?te.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,te.createElement("span",{className:"recharts-tooltip-item-value"},z),te.createElement("span",{className:"recharts-tooltip-item-unit"},F.unit||""))});return te.createElement("ul",{className:"recharts-tooltip-item-list",style:D},L)}return null},j=O_({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},s),S=O_({margin:0},d),k=!xt(v),T=k?v:"",P=bt("recharts-default-tooltip",g),M=bt("recharts-tooltip-label",b);k&&y&&u!==void 0&&u!==null&&(T=y(v,u));var C=w?{role:"status","aria-live":"assertive"}:{};return te.createElement("div",y2({className:P,style:j},C),te.createElement("p",{className:M,style:S},te.isValidElement(T)?T:"".concat(T)),_())};function pm(e){"@babel/helpers - typeof";return pm=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},pm(e)}function my(e,t,r){return t=Kbe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Kbe(e){var t=Ybe(e,"string");return pm(t)=="symbol"?t:t+""}function Ybe(e,t){if(pm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(pm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sh="recharts-tooltip-wrapper",Xbe={visibility:"hidden"};function Qbe(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return bt(sh,my(my(my(my({},"".concat(sh,"-right"),Fe(r)&&t&&Fe(t.x)&&r>=t.x),"".concat(sh,"-left"),Fe(r)&&t&&Fe(t.x)&&r<t.x),"".concat(sh,"-bottom"),Fe(n)&&t&&Fe(t.y)&&n>=t.y),"".concat(sh,"-top"),Fe(n)&&t&&Fe(t.y)&&n<t.y))}function hL(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,i=e.offsetTopLeft,s=e.position,o=e.reverseDirection,l=e.tooltipDimension,c=e.viewBox,d=e.viewBoxDimension;if(s&&Fe(s[n]))return s[n];var u=r[n]-l-i,h=r[n]+i;if(t[n])return o[n]?u:h;if(o[n]){var m=u,g=c[n];return m<g?Math.max(h,c[n]):Math.max(u,c[n])}var b=h+l,v=c[n]+d;return b>v?Math.max(u,c[n]):Math.max(h,c[n])}function Zbe(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 Jbe(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,i=e.position,s=e.reverseDirection,o=e.tooltipBox,l=e.useTranslate3d,c=e.viewBox,d,u,h;return o.height>0&&o.width>0&&r?(u=hL({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:s,tooltipDimension:o.width,viewBox:c,viewBoxDimension:c.width}),h=hL({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:s,tooltipDimension:o.height,viewBox:c,viewBoxDimension:c.height}),d=Zbe({translateX:u,translateY:h,useTranslate3d:l})):d=Xbe,{cssProperties:d,cssClasses:Qbe({translateX:u,translateY:h,coordinate:r})}}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)}function mL(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 pL(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mL(Object(r),!0).forEach(function(n){x2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mL(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ewe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function twe(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,IV(n.key),n)}}function rwe(e,t,r){return t&&twe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function nwe(e,t,r){return t=C0(t),awe(e,DV()?Reflect.construct(t,r||[],C0(e).constructor):t.apply(e,r))}function awe(e,t){if(t&&(ld(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return iwe(e)}function iwe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function DV(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(DV=function(){return!!e})()}function C0(e){return C0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},C0(e)}function swe(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&&v2(e,t)}function v2(e,t){return v2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},v2(e,t)}function x2(e,t,r){return t=IV(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function IV(e){var t=owe(e,"string");return ld(t)=="symbol"?t:t+""}function owe(e,t){if(ld(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ld(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var gL=1,lwe=(function(e){function t(){var r;ewe(this,t);for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];return r=nwe(this,t,[].concat(i)),x2(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),x2(r,"handleKeyDown",function(o){if(o.key==="Escape"){var l,c,d,u;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(l=(c=r.props.coordinate)===null||c===void 0?void 0:c.x)!==null&&l!==void 0?l:0,y:(d=(u=r.props.coordinate)===null||u===void 0?void 0:u.y)!==null&&d!==void 0?d:0}})}}),r}return swe(t,e),rwe(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>gL||Math.abs(n.height-this.state.lastBoundingBox.height)>gL)&&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,s=i.active,o=i.allowEscapeViewBox,l=i.animationDuration,c=i.animationEasing,d=i.children,u=i.coordinate,h=i.hasPayload,m=i.isAnimationActive,g=i.offset,b=i.position,v=i.reverseDirection,y=i.useTranslate3d,x=i.viewBox,w=i.wrapperStyle,_=Jbe({allowEscapeViewBox:o,coordinate:u,offsetTopLeft:g,position:b,reverseDirection:v,tooltipBox:this.state.lastBoundingBox,useTranslate3d:y,viewBox:x}),j=_.cssClasses,S=_.cssProperties,k=pL(pL({transition:m&&s?"transform ".concat(l,"ms ").concat(c):void 0},S),{},{pointerEvents:"none",visibility:!this.state.dismissed&&s&&h?"visible":"hidden",position:"absolute",top:0,left:0},w);return te.createElement("div",{tabIndex:-1,className:j,style:k,ref:function(P){n.wrapperNode=P}},d)}}])})(A.PureComponent),cwe=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},cl={isSsr:cwe()};function cd(e){"@babel/helpers - typeof";return cd=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},cd(e)}function yL(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 vL(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yL(Object(r),!0).forEach(function(n){WT(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yL(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uwe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dwe(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,$V(n.key),n)}}function fwe(e,t,r){return t&&dwe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function hwe(e,t,r){return t=O0(t),mwe(e,LV()?Reflect.construct(t,r||[],O0(e).constructor):t.apply(e,r))}function mwe(e,t){if(t&&(cd(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 LV(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(LV=function(){return!!e})()}function O0(e){return O0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},O0(e)}function gwe(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&&b2(e,t)}function b2(e,t){return b2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},b2(e,t)}function WT(e,t,r){return t=$V(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $V(e){var t=ywe(e,"string");return cd(t)=="symbol"?t:t+""}function ywe(e,t){if(cd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(cd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function vwe(e){return e.dataKey}function xwe(e,t){return te.isValidElement(e)?te.cloneElement(e,t):typeof e=="function"?te.createElement(e,t):te.createElement(Gbe,t)}var En=(function(e){function t(){return uwe(this,t),hwe(this,t,arguments)}return gwe(t,e),fwe(t,[{key:"render",value:function(){var n=this,i=this.props,s=i.active,o=i.allowEscapeViewBox,l=i.animationDuration,c=i.animationEasing,d=i.content,u=i.coordinate,h=i.filterNull,m=i.isAnimationActive,g=i.offset,b=i.payload,v=i.payloadUniqBy,y=i.position,x=i.reverseDirection,w=i.useTranslate3d,_=i.viewBox,j=i.wrapperStyle,S=b??[];h&&S.length&&(S=EV(b.filter(function(T){return T.value!=null&&(T.hide!==!0||n.props.includeHidden)}),v,vwe));var k=S.length>0;return te.createElement(lwe,{allowEscapeViewBox:o,animationDuration:l,animationEasing:c,isAnimationActive:m,active:s,coordinate:u,hasPayload:k,offset:g,position:y,reverseDirection:x,useTranslate3d:w,viewBox:_,wrapperStyle:j},xwe(d,vL(vL({},this.props),{},{payload:S})))}}])})(A.PureComponent);WT(En,"displayName","Tooltip");WT(En,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!cl.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 M_,xL;function bwe(){if(xL)return M_;xL=1;var e=cs(),t=function(){return e.Date.now()};return M_=t,M_}var R_,bL;function wwe(){if(bL)return R_;bL=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return R_=t,R_}var D_,wL;function jwe(){if(wL)return D_;wL=1;var e=wwe(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return D_=r,D_}var I_,jL;function FV(){if(jL)return I_;jL=1;var e=jwe(),t=ll(),r=tf(),n=NaN,i=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt;function c(d){if(typeof d=="number")return d;if(r(d))return n;if(t(d)){var u=typeof d.valueOf=="function"?d.valueOf():d;d=t(u)?u+"":u}if(typeof d!="string")return d===0?d:+d;d=e(d);var h=s.test(d);return h||o.test(d)?l(d.slice(2),h?2:8):i.test(d)?n:+d}return I_=c,I_}var L_,NL;function Nwe(){if(NL)return L_;NL=1;var e=ll(),t=bwe(),r=FV(),n="Expected a function",i=Math.max,s=Math.min;function o(l,c,d){var u,h,m,g,b,v,y=0,x=!1,w=!1,_=!0;if(typeof l!="function")throw new TypeError(n);c=r(c)||0,e(d)&&(x=!!d.leading,w="maxWait"in d,m=w?i(r(d.maxWait)||0,c):m,_="trailing"in d?!!d.trailing:_);function j(L){var F=u,U=h;return u=h=void 0,y=L,g=l.apply(U,F),g}function S(L){return y=L,b=setTimeout(P,c),x?j(L):g}function k(L){var F=L-v,U=L-y,G=c-F;return w?s(G,m-U):G}function T(L){var F=L-v,U=L-y;return v===void 0||F>=c||F<0||w&&U>=m}function P(){var L=t();if(T(L))return M(L);b=setTimeout(P,k(L))}function M(L){return b=void 0,_&&u?j(L):(u=h=void 0,g)}function C(){b!==void 0&&clearTimeout(b),y=0,u=v=h=b=void 0}function O(){return b===void 0?g:M(t())}function D(){var L=t(),F=T(L);if(u=arguments,h=this,v=L,F){if(b===void 0)return S(v);if(w)return clearTimeout(b),b=setTimeout(P,c),j(v)}return b===void 0&&(b=setTimeout(P,c)),g}return D.cancel=C,D.flush=O,D}return L_=o,L_}var $_,_L;function _we(){if(_L)return $_;_L=1;var e=Nwe(),t=ll(),r="Expected a function";function n(i,s,o){var l=!0,c=!0;if(typeof i!="function")throw new TypeError(r);return t(o)&&(l="leading"in o?!!o.leading:l,c="trailing"in o?!!o.trailing:c),e(i,s,{leading:l,maxWait:s,trailing:c})}return $_=n,$_}var Swe=_we();const BV=Ht(Swe);function gm(e){"@babel/helpers - typeof";return gm=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},gm(e)}function SL(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 py(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?SL(Object(r),!0).forEach(function(n){Awe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):SL(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Awe(e,t,r){return t=kwe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kwe(e){var t=Ewe(e,"string");return gm(t)=="symbol"?t:t+""}function Ewe(e,t){if(gm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(gm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Twe(e,t){return Mwe(e)||Owe(e,t)||Cwe(e,t)||Pwe()}function Pwe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 838In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cwe(e,t){if(e){if(typeof e=="string")return AL(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 AL(e,t)}}function AL(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 Owe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,s,o,l=[],c=!0,d=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(c=(n=s.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(u){d=!0,i=u}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw i}}return l}}function Mwe(e){if(Array.isArray(e))return e}var oc=A.forwardRef(function(e,t){var r=e.aspect,n=e.initialDimension,i=n===void 0?{width:-1,height:-1}:n,s=e.width,o=s===void 0?"100%":s,l=e.height,c=l===void 0?"100%":l,d=e.minWidth,u=d===void 0?0:d,h=e.minHeight,m=e.maxHeight,g=e.children,b=e.debounce,v=b===void 0?0:b,y=e.id,x=e.className,w=e.onResize,_=e.style,j=_===void 0?{}:_,S=A.useRef(null),k=A.useRef();k.current=w,A.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 T=A.useState({containerWidth:i.width,containerHeight:i.height}),P=Twe(T,2),M=P[0],C=P[1],O=A.useCallback(function(L,F){C(function(U){var G=Math.round(L),W=Math.round(F);return U.containerWidth===G&&U.containerHeight===W?U:{containerWidth:G,containerHeight:W}})},[]);A.useEffect(function(){var L=function(V){var z,I=V[0].contentRect,B=I.width,H=I.height;O(B,H),(z=k.current)===null||z===void 0||z.call(k,B,H)};v>0&&(L=BV(L,v,{trailing:!0,leading:!1}));var F=new ResizeObserver(L),U=S.current.getBoundingClientRect(),G=U.width,W=U.height;return O(G,W),F.observe(S.current),function(){F.disconnect()}},[O,v]);var D=A.useMemo(function(){var L=M.containerWidth,F=M.containerHeight;if(L<0||F<0)return null;Ni(Vl(o)||Vl(c),`The width(%s) and height(%s) are both fixed numbers, 839 maybe you don't need to use a ResponsiveContainer.`,o,c),Ni(!r||r>0,"The aspect(%s) must be greater than zero.",r);var U=Vl(o)?L:o,G=Vl(c)?F:c;r&&r>0&&(U?G=U/r:G&&(U=G*r),m&&G>m&&(G=m)),Ni(U>0||G>0,`The width(%s) and height(%s) of chart should be greater than 0, 840 please check the style of container, or the props width(%s) and height(%s), 841 or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the 842 height and width.`,U,G,o,c,u,h,r);var W=!Array.isArray(g)&&Fs(g.type).endsWith("Chart");return te.Children.map(g,function(q){return te.isValidElement(q)?A.cloneElement(q,py({width:U,height:G},W?{style:py({height:"100%",width:"100%",maxHeight:G,maxWidth:U},q.props.style)}:{})):q})},[r,g,c,m,h,u,M,o]);return te.createElement("div",{id:y?"".concat(y):void 0,className:bt("recharts-responsive-container",x),style:py(py({},j),{},{width:o,height:c,minWidth:u,minHeight:h,maxHeight:m}),ref:S},D)}),Lu=function(t){return null};Lu.displayName="Cell";function ym(e){"@babel/helpers - typeof";return ym=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},ym(e)}function kL(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 w2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kL(Object(r),!0).forEach(function(n){Rwe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kL(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Rwe(e,t,r){return t=Dwe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Dwe(e){var t=Iwe(e,"string");return ym(t)=="symbol"?t:t+""}function Iwe(e,t){if(ym(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ym(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var vu={widthCache:{},cacheCount:0},Lwe=2e3,$we={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},EL="recharts_measurement_span";function Fwe(e){var t=w2({},e);return Object.keys(t).forEach(function(r){t[r]||delete t[r]}),t}var $h=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||cl.isSsr)return{width:0,height:0};var n=Fwe(r),i=JSON.stringify({text:t,copyStyle:n});if(vu.widthCache[i])return vu.widthCache[i];try{var s=document.getElementById(EL);s||(s=document.createElement("span"),s.setAttribute("id",EL),s.setAttribute("aria-hidden","true"),document.body.appendChild(s));var o=w2(w2({},$we),n);Object.assign(s.style,o),s.textContent="".concat(t);var l=s.getBoundingClientRect(),c={width:l.width,height:l.height};return vu.widthCache[i]=c,++vu.cacheCount>Lwe&&(vu.cacheCount=0,vu.widthCache={}),c}catch{return{width:0,height:0}}},Bwe=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function vm(e){"@babel/helpers - typeof";return vm=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},vm(e)}function M0(e,t){return Vwe(e)||zwe(e,t)||qwe(e,t)||Uwe()}function Uwe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 843In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qwe(e,t){if(e){if(typeof e=="string")return TL(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 TL(e,t)}}function TL(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 zwe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,s,o,l=[],c=!0,d=!1;try{if(s=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=s.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(u){d=!0,i=u}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw i}}return l}}function Vwe(e){if(Array.isArray(e))return e}function Hwe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PL(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,Gwe(n.key),n)}}function Wwe(e,t,r){return t&&PL(e.prototype,t),r&&PL(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Gwe(e){var t=Kwe(e,"string");return vm(t)=="symbol"?t:t+""}function Kwe(e,t){if(vm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(vm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var CL=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,OL=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Ywe=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Xwe=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,UV={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Qwe=Object.keys(UV),Tu="NaN";function Zwe(e,t){return e*UV[t]}var gy=(function(){function e(t,r){Hwe(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!Ywe.test(r)&&(this.num=NaN,this.unit=""),Qwe.includes(r)&&(this.num=Zwe(t,r),this.unit="px")}return Wwe(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=Xwe.exec(r))!==null&&n!==void 0?n:[],s=M0(i,3),o=s[1],l=s[2];return new e(parseFloat(o),l??"")}}])})();function qV(e){if(e.includes(Tu))return Tu;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=CL.exec(t))!==null&&r!==void 0?r:[],i=M0(n,4),s=i[1],o=i[2],l=i[3],c=gy.parse(s??""),d=gy.parse(l??""),u=o==="*"?c.multiply(d):c.divide(d);if(u.isNaN())return Tu;t=t.replace(CL,u.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var h,m=(h=OL.exec(t))!==null&&h!==void 0?h:[],g=M0(m,4),b=g[1],v=g[2],y=g[3],x=gy.parse(b??""),w=gy.parse(y??""),_=v==="+"?x.add(w):x.subtract(w);if(_.isNaN())return Tu;t=t.replace(OL,_.toString())}return t}var ML=/\(([^()]*)\)/;function Jwe(e){for(var t=e;t.includes("(");){var r=ML.exec(t),n=M0(r,2),i=n[1];t=t.replace(ML,qV(i))}return t}function e1e(e){var t=e.replace(/\s+/g,"");return t=Jwe(t),t=qV(t),t}function t1e(e){try{return e1e(e)}catch{return Tu}}function F_(e){var t=t1e(e.slice(5,-1));return t===Tu?"":t}var r1e=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],n1e=["dx","dy","angle","className","breakAll"];function j2(){return j2=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},j2.apply(this,arguments)}function RL(e,t){if(e==null)return{};var r=a1e(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function a1e(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 DL(e,t){return l1e(e)||o1e(e,t)||s1e(e,t)||i1e()}function i1e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 844In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s1e(e,t){if(e){if(typeof e=="string")return IL(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 IL(e,t)}}function IL(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 o1e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,s,o,l=[],c=!0,d=!1;try{if(s=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=s.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(u){d=!0,i=u}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw i}}return l}}function l1e(e){if(Array.isArray(e))return e}var zV=/[ \f\n\r\t\v\u2028\u2029]+/,VV=function(t){var r=t.children,n=t.breakAll,i=t.style;try{var s=[];xt(r)||(n?s=r.toString().split(""):s=r.toString().split(zV));var o=s.map(function(c){return{word:c,width:$h(c,i).width}}),l=n?0:$h(" ",i).width;return{wordsWithComputedWidth:o,spaceWidth:l}}catch{return null}},c1e=function(t,r,n,i,s){var o=t.maxLines,l=t.children,c=t.style,d=t.breakAll,u=Fe(o),h=l,m=function(){var U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return U.reduce(function(G,W){var q=W.word,V=W.width,z=G[G.length-1];if(z&&(i==null||s||z.width+V+n<Number(i)))z.words.push(q),z.width+=V+n;else{var I={words:[q],width:V};G.push(I)}return G},[])},g=m(r),b=function(U){return U.reduce(function(G,W){return G.width>W.width?G:W})};if(!u)return g;for(var v="â¦",y=function(U){var G=h.slice(0,U),W=VV({breakAll:d,style:c,children:G+v}).wordsWithComputedWidth,q=m(W),V=q.length>o||b(q).width>Number(i);return[V,q]},x=0,w=h.length-1,_=0,j;x<=w&&_<=h.length-1;){var S=Math.floor((x+w)/2),k=S-1,T=y(k),P=DL(T,2),M=P[0],C=P[1],O=y(S),D=DL(O,1),L=D[0];if(!M&&!L&&(x=S+1),M&&L&&(w=S-1),!M&&L){j=C;break}_++}return j||g},LL=function(t){var r=xt(t)?[]:t.toString().split(zV);return[{words:r}]},u1e=function(t){var r=t.width,n=t.scaleToFit,i=t.children,s=t.style,o=t.breakAll,l=t.maxLines;if((r||n)&&!cl.isSsr){var c,d,u=VV({breakAll:o,children:i,style:s});if(u){var h=u.wordsWithComputedWidth,m=u.spaceWidth;c=h,d=m}else return LL(i);return c1e({breakAll:o,children:i,maxLines:l,style:s},c,d,r,n)}return LL(i)},$L="#808080",Sc=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,s=i===void 0?0:i,o=t.lineHeight,l=o===void 0?"1em":o,c=t.capHeight,d=c===void 0?"0.71em":c,u=t.scaleToFit,h=u===void 0?!1:u,m=t.textAnchor,g=m===void 0?"start":m,b=t.verticalAnchor,v=b===void 0?"end":b,y=t.fill,x=y===void 0?$L:y,w=RL(t,r1e),_=A.useMemo(function(){return u1e({breakAll:w.breakAll,children:w.
844children,maxLines:w.maxLines,scaleToFit:h,style:w.style,width:w.width})},[w.breakAll,w.children,w.maxLines,h,w.style,w.width]),j=w.dx,S=w.dy,k=w.angle,T=w.className,P=w.breakAll,M=RL(w,n1e);if(!Yr(n)||!Yr(s))return null;var C=n+(Fe(j)?j:0),O=s+(Fe(S)?S:0),D;switch(v){case"start":D=F_("calc(".concat(d,")"));break;case"middle":D=F_("calc(".concat((_.length-1)/2," * -").concat(l," + (").concat(d," / 2))"));break;default:D=F_("calc(".concat(_.length-1," * -").concat(l,")"));break}var L=[];if(h){var F=_[0].width,U=w.width;L.push("scale(".concat((Fe(U)?U/F:1)/F,")"))}return k&&L.push("rotate(".concat(k,", ").concat(C,", ").concat(O,")")),L.length&&(M.transform=L.join(" ")),te.createElement("text",j2({},lt(M,!0),{x:C,y:O,className:bt("recharts-text",T),textAnchor:g,fill:x.includes("url")?$L:x}),_.map(function(G,W){var q=G.words.join(P?"":" ");return te.createElement("tspan",{x:C,dy:W===0?D:l,key:"".concat(q,"-").concat(W)},q)}))};function Go(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function d1e(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function GT(e){let t,r,n;e.length!==2?(t=Go,r=(l,c)=>Go(e(l),c),n=(l,c)=>e(l)-c):(t=e===Go||e===d1e?e:f1e,r=e,n=e);function i(l,c,d=0,u=l.length){if(d<u){if(t(c,c)!==0)return u;do{const h=d+u>>>1;r(l[h],c)<0?d=h+1:u=h}while(d<u)}return d}function s(l,c,d=0,u=l.length){if(d<u){if(t(c,c)!==0)return u;do{const h=d+u>>>1;r(l[h],c)<=0?d=h+1:u=h}while(d<u)}return d}function o(l,c,d=0,u=l.length){const h=i(l,c,d,u-1);return h>d&&n(l[h-1],c)>-n(l[h],c)?h-1:h}return{left:i,center:o,right:s}}function f1e(){return 0}function HV(e){return e===null?NaN:+e}function*h1e(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const m1e=GT(Go),Ep=m1e.right;GT(HV).center;class FL extends Map{constructor(t,r=y1e){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(BL(this,t))}has(t){return super.has(BL(this,t))}set(t,r){return super.set(p1e(this,t),r)}delete(t){return super.delete(g1e(this,t))}}function BL({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function p1e({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function g1e({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function y1e(e){return e!==null&&typeof e=="object"?e.valueOf():e}function v1e(e=Go){if(e===Go)return WV;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 WV(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const x1e=Math.sqrt(50),b1e=Math.sqrt(10),w1e=Math.sqrt(2);function R0(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),s=n/Math.pow(10,i),o=s>=x1e?10:s>=b1e?5:s>=w1e?2:1;let l,c,d;return i<0?(d=Math.pow(10,-i)/o,l=Math.round(e*d),c=Math.round(t*d),l/d<e&&++l,c/d>t&&--c,d=-d):(d=Math.pow(10,i)*o,l=Math.round(e/d),c=Math.round(t/d),l*d<e&&++l,c*d>t&&--c),c<l&&.5<=r&&r<2?R0(e,t,r*2):[l,c,d]}function N2(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[i,s,o]=n?R0(t,e,r):R0(e,t,r);if(!(s>=i))return[];const l=s-i+1,c=new Array(l);if(n)if(o<0)for(let d=0;d<l;++d)c[d]=(s-d)/-o;else for(let d=0;d<l;++d)c[d]=(s-d)*o;else if(o<0)for(let d=0;d<l;++d)c[d]=(i+d)/-o;else for(let d=0;d<l;++d)c[d]=(i+d)*o;return c}function _2(e,t,r){return t=+t,e=+e,r=+r,R0(e,t,r)[2]}function S2(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?_2(t,e,r):_2(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function UL(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function qL(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function GV(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?WV:v1e(i);n>r;){if(n-r>600){const c=n-r+1,d=t-r+1,u=Math.log(c),h=.5*Math.exp(2*u/3),m=.5*Math.sqrt(u*h*(c-h)/c)*(d-c/2<0?-1:1),g=Math.max(r,Math.floor(t-d*h/c+m)),b=Math.min(n,Math.floor(t+(c-d)*h/c+m));GV(e,t,g,b,i)}const s=e[t];let o=r,l=n;for(oh(e,r,t),i(e[n],s)>0&&oh(e,r,n);o<l;){for(oh(e,o,l),++o,--l;i(e[o],s)<0;)++o;for(;i(e[l],s)>0;)--l}i(e[r],s)===0?oh(e,r,l):(++l,oh(e,l,n)),l<=t&&(r=l+1),t<=l&&(n=l-1)}return e}function oh(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function j1e(e,t,r){if(e=Float64Array.from(h1e(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return qL(e);if(t>=1)return UL(e);var n,i=(n-1)*t,s=Math.floor(i),o=UL(GV(e,s).subarray(0,s+1)),l=qL(e.subarray(s+1));return o+(l-o)*(i-s)}}function N1e(e,t,r=HV){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,s=Math.floor(i),o=+r(e[s],s,e),l=+r(e[s+1],s+1,e);return o+(l-o)*(i-s)}}function _1e(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,s=new Array(i);++n<i;)s[n]=e+n*r;return s}function ti(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Qs(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: 10,013 bytes, line 844
844const A2=Symbol("implicit");function KT(){var e=new FL,t=[],r=[],n=A2;function i(s){let o=e.get(s);if(o===void 0){if(n!==A2)return n;e.set(s,o=t.push(s)-1)}return r[o%r.length]}return i.domain=function(s){if(!arguments.length)return t.slice();t=[],e=new FL;for(const o of s)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(s){return arguments.length?(r=Array.from(s),i):r.slice()},i.unknown=function(s){return arguments.length?(n=s,i):n},i.copy=function(){return KT(t,r).unknown(n)},ti.apply(i,arguments),i}function xm(){var e=KT().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,s,o,l=!1,c=0,d=0,u=.5;delete e.unknown;function h(){var m=t().length,g=i<n,b=g?i:n,v=g?n:i;s=(v-b)/Math.max(1,m-c+d*2),l&&(s=Math.floor(s)),b+=(v-b-s*(m-c))*u,o=s*(1-c),l&&(b=Math.round(b),o=Math.round(o));var y=_1e(m).map(function(x){return b+s*x});return r(g?y.reverse():y)}return e.domain=function(m){return arguments.length?(t(m),h()):t()},e.range=function(m){return arguments.length?([n,i]=m,n=+n,i=+i,h()):[n,i]},e.rangeRound=function(m){return[n,i]=m,n=+n,i=+i,l=!0,h()},e.bandwidth=function(){return o},e.step=function(){return s},e.round=function(m){return arguments.length?(l=!!m,h()):l},e.padding=function(m){return arguments.length?(c=Math.min(1,d=+m),h()):c},e.paddingInner=function(m){return arguments.length?(c=Math.min(1,m),h()):c},e.paddingOuter=function(m){return arguments.length?(d=+m,h()):d},e.align=function(m){return arguments.length?(u=Math.max(0,Math.min(1,m)),h()):u},e.copy=function(){return xm(t(),[n,i]).round(l).paddingInner(c).paddingOuter(d).align(u)},ti.apply(h(),arguments)}function KV(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return KV(t())},e}function Fh(){return KV(xm.apply(null,arguments).paddingInner(1))}function YT(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function YV(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Tp(){}var bm=.7,D0=1/bm,$u="\\s*([+-]?\\d+)\\s*",wm="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Yi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",S1e=/^#([0-9a-f]{3,8})$/,A1e=new RegExp(`^rgb\\(${$u},${$u},${$u}\\)$`),k1e=new RegExp(`^rgb\\(${Yi},${Yi},${Yi}\\)$`),E1e=new RegExp(`^rgba\\(${$u},${$u},${$u},${wm}\\)$`),T1e=new RegExp(`^rgba\\(${Yi},${Yi},${Yi},${wm}\\)$`),P1e=new RegExp(`^hsl\\(${wm},${Yi},${Yi}\\)$`),C1e=new RegExp(`^hsla\\(${wm},${Yi},${Yi},${wm}\\)$`),zL={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};YT(Tp,jm,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:VL,formatHex:VL,formatHex8:O1e,formatHsl:M1e,formatRgb:HL,toString:HL});function VL(){return this.rgb().formatHex()}function O1e(){return this.rgb().formatHex8()}function M1e(){return XV(this).formatHsl()}function HL(){return this.rgb().formatRgb()}function jm(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=S1e.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?WL(t):r===3?new ia(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?yy(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?yy(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=A1e.exec(e))?new ia(t[1],t[2],t[3],1):(t=k1e.exec(e))?new ia(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=E1e.exec(e))?yy(t[1],t[2],t[3],t[4]):(t=T1e.exec(e))?yy(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=P1e.exec(e))?YL(t[1],t[2]/100,t[3]/100,1):(t=C1e.exec(e))?YL(t[1],t[2]/100,t[3]/100,t[4]):zL.hasOwnProperty(e)?WL(zL[e]):e==="transparent"?new ia(NaN,NaN,NaN,0):null}function WL(e){return new ia(e>>16&255,e>>8&255,e&255,1)}function yy(e,t,r,n){return n<=0&&(e=t=r=NaN),new ia(e,t,r,n)}function R1e(e){return e instanceof Tp||(e=jm(e)),e?(e=e.rgb(),new ia(e.r,e.g,e.b,e.opacity)):new ia}function k2(e,t,r,n){return arguments.length===1?R1e(e):new ia(e,t,r,n??1)}function ia(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}YT(ia,k2,YV(Tp,{brighter(e){return e=e==null?D0:Math.pow(D0,e),new ia(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?bm:Math.pow(bm,e),new ia(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ia(lc(this.r),lc(this.g),lc(this.b),I0(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:GL,formatHex:GL,formatHex8:D1e,formatRgb:KL,toString:KL}));function GL(){return`#${Hl(this.r)}${Hl(this.g)}${Hl(this.b)}`}function D1e(){return`#${Hl(this.r)}${Hl(this.g)}${Hl(this.b)}${Hl((isNaN(this.opacity)?1:this.opacity)*255)}`}function KL(){const e=I0(this.opacity);return`${e===1?"rgb(":"rgba("}${lc(this.r)}, ${lc(this.g)}, ${lc(this.b)}${e===1?")":`, ${e})`}`}function I0(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function lc(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Hl(e){return e=lc(e),(e<16?"0":"")+e.toString(16)}function YL(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new wi(e,t,r,n)}function XV(e){if(e instanceof wi)return new wi(e.h,e.s,e.l,e.opacity);if(e instanceof Tp||(e=jm(e)),!e)return new wi;if(e instanceof wi)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),s=Math.max(t,r,n),o=NaN,l=s-i,c=(s+i)/2;return l?(t===s?o=(r-n)/l+(r<n)*6:r===s?o=(n-t)/l+2:o=(t-r)/l+4,l/=c<.5?s+i:2-s-i,o*=60):l=c>0&&c<1?0:o,new wi(o,l,c,e.opacity)}function I1e(e,t,r,n){return arguments.length===1?XV(e):new wi(e,t,r,n??1)}function wi(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}YT(wi,I1e,YV(Tp,{brighter(e){return e=e==null?D0:Math.pow(D0,e),new wi(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?bm:Math.pow(bm,e),new wi(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 ia(B_(e>=240?e-240:e+120,i,n),B_(e,i,n),B_(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new wi(XL(this.h),vy(this.s),vy(this.l),I0(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=I0(this.opacity);return`${e===1?"hsl(":"hsla("}${XL(this.h)}, ${vy(this.s)*100}%, ${vy(this.l)*100}%${e===1?")":`, ${e})`}`}}));function XL(e){return e=(e||0)%360,e<0?e+360:e}function vy(e){return Math.max(0,Math.min(1,e||0))}function B_(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 XT=e=>()=>e;function L1e(e,t){return function(r){return e+r*t}}function $1e(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 F1e(e){return(e=+e)==1?QV:function(t,r){return r-t?$1e(t,r,e):XT(isNaN(t)?r:t)}}function QV(e,t){var r=t-e;return r?L1e(e,r):XT(isNaN(e)?t:e)}const QL=(function e(t){var r=F1e(t);function n(i,s){var o=r((i=k2(i)).r,(s=k2(s)).r),l=r(i.g,s.g),c=r(i.b,s.b),d=QV(i.opacity,s.opacity);return function(u){return i.r=o(u),i.g=l(u),i.b=c(u),i.opacity=d(u),i+""}}return n.gamma=e,n})(1);function B1e(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(s){for(i=0;i<r;++i)n[i]=e[i]*(1-s)+t[i]*s;return n}}function U1e(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function q1e(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),s=new Array(r),o;for(o=0;o<n;++o)i[o]=sf(e[o],t[o]);for(;o<r;
vendor: 7,672 bytes, line 844
844++o)s[o]=t[o];return function(l){for(o=0;o<n;++o)s[o]=i[o](l);return s}}function z1e(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function L0(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function V1e(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]=sf(e[i],t[i]):n[i]=t[i];return function(s){for(i in r)n[i]=r[i](s);return n}}var E2=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,U_=new RegExp(E2.source,"g");function H1e(e){return function(){return e}}function W1e(e){return function(t){return e(t)+""}}function G1e(e,t){var r=E2.lastIndex=U_.lastIndex=0,n,i,s,o=-1,l=[],c=[];for(e=e+"",t=t+"";(n=E2.exec(e))&&(i=U_.exec(t));)(s=i.index)>r&&(s=t.slice(r,s),l[o]?l[o]+=s:l[++o]=s),(n=n[0])===(i=i[0])?l[o]?l[o]+=i:l[++o]=i:(l[++o]=null,c.push({i:o,x:L0(n,i)})),r=U_.lastIndex;return r<t.length&&(s=t.slice(r),l[o]?l[o]+=s:l[++o]=s),l.length<2?c[0]?W1e(c[0].x):H1e(t):(t=c.length,function(d){for(var u=0,h;u<t;++u)l[(h=c[u]).i]=h.x(d);return l.join("")})}function sf(e,t){var r=typeof t,n;return t==null||r==="boolean"?XT(t):(r==="number"?L0:r==="string"?(n=jm(t))?(t=n,QL):G1e:t instanceof jm?QL:t instanceof Date?z1e:U1e(t)?B1e:Array.isArray(t)?q1e:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?V1e:L0)(e,t)}function QT(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function K1e(e,t){t===void 0&&(t=e,e=sf);for(var r=0,n=t.length-1,i=t[0],s=new Array(n<0?0:n);r<n;)s[r]=e(i,i=t[++r]);return function(o){var l=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return s[l](o-l)}}function Y1e(e){return function(){return e}}function $0(e){return+e}var ZL=[0,1];function qn(e){return e}function T2(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:Y1e(isNaN(t)?NaN:.5)}function X1e(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function Q1e(e,t,r){var n=e[0],i=e[1],s=t[0],o=t[1];return i<n?(n=T2(i,n),s=r(o,s)):(n=T2(n,i),s=r(s,o)),function(l){return s(n(l))}}function Z1e(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),s=new Array(n),o=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<n;)i[o]=T2(e[o],e[o+1]),s[o]=r(t[o],t[o+1]);return function(l){var c=Ep(e,l,1,n)-1;return s[c](i[c](l))}}function Pp(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function wx(){var e=ZL,t=ZL,r=sf,n,i,s,o=qn,l,c,d;function u(){var m=Math.min(e.length,t.length);return o!==qn&&(o=X1e(e[0],e[m-1])),l=m>2?Z1e:Q1e,c=d=null,h}function h(m){return m==null||isNaN(m=+m)?s:(c||(c=l(e.map(n),t,r)))(n(o(m)))}return h.invert=function(m){return o(i((d||(d=l(t,e.map(n),L0)))(m)))},h.domain=function(m){return arguments.length?(e=Array.from(m,$0),u()):e.slice()},h.range=function(m){return arguments.length?(t=Array.from(m),u()):t.slice()},h.rangeRound=function(m){return t=Array.from(m),r=QT,u()},h.clamp=function(m){return arguments.length?(o=m?!0:qn,u()):o!==qn},h.interpolate=function(m){return arguments.length?(r=m,u()):r},h.unknown=function(m){return arguments.length?(s=m,h):s},function(m,g){return n=m,i=g,u()}}function ZT(){return wx()(qn,qn)}function J1e(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function F0(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 ud(e){return e=F0(Math.abs(e)),e?e[1]:NaN}function eje(e,t){return function(r,n){for(var i=r.length,s=[],o=0,l=e[0],c=0;i>0&&l>0&&(c+l+1>n&&(l=Math.max(1,n-c)),s.push(r.substring(i-=l,i+l)),!((c+=l+1)>n));)l=e[o=(o+1)%e.length];return s.reverse().join(t)}}function tje(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var rje=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Nm(e){if(!(t=rje.exec(e)))throw new Error("invalid format: "+e);var t;return new JT({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]})}Nm.prototype=JT.prototype;function JT(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+""}JT.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 nje(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 ZV;function aje(e,t){var r=F0(e,t);if(!r)return e+"";var n=r[0],i=r[1],s=i-(ZV=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=n.length;return s===o?n:s>o?n+new Array(s-o+1).join("0"):s>0?n.slice(0,s)+"."+n.slice(s):"0."+new Array(1-s).join("0")+F0(e,Math.max(0,t+s-1))[0]}function JL(e,t){var r=F0(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 e6={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:J1e,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)=>JL(e*100,t),r:JL,s:aje,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function t6(e){return e}var r6=Array.prototype.map,n6=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ije(e){var t=e.grouping===void 0||e.thousands===void 0?t6:eje(r6.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+"",s=e.numerals===void 0?t6:tje(r6.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"â":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function d(h){h=Nm(h);var m=h.fill,g=h.align,b=h.sign,v=h.symbol,y=h.zero,x=h.width,w=h.comma,_=h.precision,j=h.trim,S=h.type;S==="n"?(w=!0,S="g"):e6[S]||(_===void 0&&(_=12),j=!0,S="g"),(y||m==="0"&&g==="=")&&(y=!0,m="0",g="=");var k=v==="$"?r:v==="#"&&/[boxX]/.test(S)?"0"+S.toLowerCase():"",T=v==="$"?n:/[%p]/.test(S)?o:"",P=e6[S],M=/[defgprs%]/.test(S);_=_===void 0?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function C(O){var D=k,L=T,F,U,G;if(S==="c")L=P(O)+L,O="";else{O=+O;var W=O<0||1/O<0;if(O=isNaN(O)?c:P(Math.abs(O),_),j&&(O=nje(O)),W&&+O==0&&b!=="+"&&(W=!1),D=(W?b==="("?b:l:b==="-"||b==="("?"":b)+D,L=(S==="s"?n6[8+ZV/3]:"")+L+(W&&b==="("?")":""),M){for(F=-1,U=O.length;++F<U;)if(G=O.charCodeAt(F),48>G||G>57){L=(G===46?i+O.slice(F+1):O.slice(F))+L,O=O.slice(0,F);break}}}w&&!y&&(O=t(O,1/0));var q=D.length+O.length+L.length,V=q<x?new Array(x-q+1).join(m):"";switch(w&&y&&(O=t(V+O,V.length?x-L.length:1/0),V=""),g){case"<":O=D+O+L+V;break;case"=":O=D+V+O+L;break;case"^":O=V.slice(0,q=V.length>>1)+D+O+L+V.slice(q);break;default:O=V+D+O+L;break}return s(O)}return C.toString=function(){return h+""},C}function u(h,m){var g=d((h=Nm(h),h.type="f",h)),b=Math.max(-8,Math.min(8,Math.floor(ud(m)/3)))*3,v=Math.pow(10,-b),y=n6[8+b/3];return function(x){return g(v*x)+y}}return{format:d,formatPrefix:u}}var xy,eP,JV;
844sje({thousands:",",grouping:[3],currency:["$",""]});function sje(e){return xy=ije(e),eP=xy.format,JV=xy.formatPrefix,xy}function oje(e){return Math.max(0,-ud(Math.abs(e)))}function lje(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ud(t)/3)))*3-ud(Math.abs(e)))}function cje(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,ud(t)-ud(e))+1}function eH(e,t,r,n){var i=S2(e,t,r),s;switch(n=Nm(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(s=lje(i,o))&&(n.precision=s),JV(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(s=cje(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=s-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(s=oje(i))&&(n.precision=s-(n.type==="%")*2);break}}return eP(n)}function ul(e){var t=e.domain;return e.ticks=function(r){var n=t();return N2(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return eH(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,s=n.length-1,o=n[i],l=n[s],c,d,u=10;for(l<o&&(d=o,o=l,l=d,d=i,i=s,s=d);u-- >0;){if(d=_2(o,l,r),d===c)return n[i]=o,n[s]=l,t(n);if(d>0)o=Math.floor(o/d)*d,l=Math.ceil(l/d)*d;else if(d<0)o=Math.ceil(o*d)/d,l=Math.floor(l*d)/d;else break;c=d}return e},e}function B0(){var e=ZT();return e.copy=function(){return Pp(e,B0())},ti.apply(e,arguments),ul(e)}function tH(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,$0),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return tH(e).unknown(t)},e=arguments.length?Array.from(e,$0):[0,1],ul(r)}function rH(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],s=e[n],o;return s<i&&(o=r,r=n,n=o,o=i,i=s,s=o),e[r]=t.floor(i),e[n]=t.ceil(s),e}function a6(e){return Math.log(e)}function i6(e){return Math.exp(e)}function uje(e){return-Math.log(-e)}function dje(e){return-Math.exp(-e)}function fje(e){return isFinite(e)?+("1e"+e):e<0?0:e}function hje(e){return e===10?fje:e===Math.E?Math.exp:t=>Math.pow(e,t)}function mje(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 s6(e){return(t,r)=>-e(-t,r)}function tP(e){const t=e(a6,i6),r=t.domain;let n=10,i,s;function o(){return i=mje(n),s=hje(n),r()[0]<0?(i=s6(i),s=s6(s),e(uje,dje)):e(a6,i6),t}return t.base=function(l){return arguments.length?(n=+l,o()):n},t.domain=function(l){return arguments.length?(r(l),o()):r()},t.ticks=l=>{const c=r();let d=c[0],u=c[c.length-1];const h=u<d;h&&([d,u]=[u,d]);let m=i(d),g=i(u),b,v;const y=l==null?10:+l;let x=[];if(!(n%1)&&g-m<y){if(m=Math.floor(m),g=Math.ceil(g),d>0){for(;m<=g;++m)for(b=1;b<n;++b)if(v=m<0?b/s(-m):b*s(m),!(v<d)){if(v>u)break;x.push(v)}}else for(;m<=g;++m)for(b=n-1;b>=1;--b)if(v=m>0?b/s(-m):b*s(m),!(v<d)){if(v>u)break;x.push(v)}x.length*2<y&&(x=N2(d,u,y))}else x=N2(m,g,Math.min(g-m,y)).map(s);return h?x.reverse():x},t.tickFormat=(l,c)=>{if(l==null&&(l=10),c==null&&(c=n===10?"s":","),typeof c!="function"&&(!(n%1)&&(c=Nm(c)).precision==null&&(c.trim=!0),c=eP(c)),l===1/0)return c;const d=Math.max(1,n*l/t.ticks().length);return u=>{let h=u/s(Math.round(i(u)));return h*n<n-.5&&(h*=n),h<=d?c(u):""}},t.nice=()=>r(rH(r(),{floor:l=>s(Math.floor(i(l))),ceil:l=>s(Math.ceil(i(l)))})),t}function nH(){const e=tP(wx()).domain([1,10]);return e.copy=()=>Pp(e,nH()).base(e.base()),ti.apply(e,arguments),e}function o6(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function l6(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function rP(e){var t=1,r=e(o6(t),l6(t));return r.constant=function(n){return arguments.length?e(o6(t=+n),l6(t)):t},ul(r)}function aH(){var e=rP(wx());return e.copy=function(){return Pp(e,aH()).constant(e.constant())},ti.apply(e,arguments)}function c6(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function pje(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function gje(e){return e<0?-e*e:e*e}function nP(e){var t=e(qn,qn),r=1;function n(){return r===1?e(qn,qn):r===.5?e(pje,gje):e(c6(r),c6(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},ul(t)}function aP(){var e=nP(wx());return e.copy=function(){return Pp(e,aP()).exponent(e.exponent())},ti.apply(e,arguments),e}function yje(){return aP.apply(null,arguments).exponent(.5)}function u6(e){return Math.sign(e)*e*e}function vje(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function iH(){var e=ZT(),t=[0,1],r=!1,n;function i(s){var o=vje(e(s));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(s){return e.invert(u6(s))},i.domain=function(s){return arguments.length?(e.domain(s),i):e.domain()},i.range=function(s){return arguments.length?(e.range((t=Array.from(s,$0)).map(u6)),i):t.slice()}
844,i.rangeRound=function(s){return i.range(s).round(!0)},i.round=function(s){return arguments.length?(r=!!s,i):r},i.clamp=function(s){return arguments.length?(e.clamp(s),i):e.clamp()},i.unknown=function(s){return arguments.length?(n=s,i):n},i.copy=function(){return iH(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},ti.apply(i,arguments),ul(i)}function sH(){var e=[],t=[],r=[],n;function i(){var o=0,l=Math.max(1,t.length);for(r=new Array(l-1);++o<l;)r[o-1]=N1e(e,o/l);return s}function s(o){return o==null||isNaN(o=+o)?n:t[Ep(r,o)]}return s.invertExtent=function(o){var l=t.indexOf(o);return l<0?[NaN,NaN]:[l>0?r[l-1]:e[0],l<r.length?r[l]:e[e.length-1]]},s.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let l of o)l!=null&&!isNaN(l=+l)&&e.push(l);return e.sort(Go),i()},s.range=function(o){return arguments.length?(t=Array.from(o),i()):t.slice()},s.unknown=function(o){return arguments.length?(n=o,s):n},s.quantiles=function(){return r.slice()},s.copy=function(){return sH().domain(e).range(t).unknown(n)},ti.apply(s,arguments)}function oH(){var e=0,t=1,r=1,n=[.5],i=[0,1],s;function o(c){return c!=null&&c<=c?i[Ep(n,c,0,r)]:s}function l(){var c=-1;for(n=new Array(r);++c<r;)n[c]=((c+1)*t-(c-r)*e)/(r+1);return o}return o.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,l()):[e,t]},o.range=function(c){return arguments.length?(r=(i=Array.from(c)).length-1,l()):i.slice()},o.invertExtent=function(c){var d=i.indexOf(c);return d<0?[NaN,NaN]:d<1?[e,n[0]]:d>=r?[n[r-1],t]:[n[d-1],n[d]]},o.unknown=function(c){return arguments.length&&(s=c),o},o.thresholds=function(){return n.slice()},o.copy=function(){return oH().domain([e,t]).range(i).unknown(s)},ti.apply(ul(o),arguments)}function lH(){var e=[.5],t=[0,1],r,n=1;function i(s){return s!=null&&s<=s?t[Ep(e,s,0,n)]:r}return i.domain=function(s){return arguments.length?(e=Array.from(s),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(s){return arguments.length?(t=Array.from(s),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(s){var o=t.indexOf(s);return[e[o-1],e[o]]},i.unknown=function(s){return arguments.length?(r=s,i):r},i.copy=function(){return lH().domain(e).range(t).unknown(r)},ti.apply(i,arguments)}const q_=new Date,z_=new Date;function Zr(e,t,r,n){function i(s){return e(s=arguments.length===0?new Date:new Date(+s)),s}return i.floor=s=>(e(s=new Date(+s)),s),i.ceil=s=>(e(s=new Date(s-1)),t(s,1),e(s),s),i.round=s=>{const o=i(s),l=i.ceil(s);return s-o<l-s?o:l},i.offset=(s,o)=>(t(s=new Date(+s),o==null?1:Math.floor(o)),s),i.range=(s,o,l)=>{const c=[];if(s=i.ceil(s),l=l==null?1:Math.floor(l),!(s<o)||!(l>0))return c;let d;do c.push(d=new Date(+s)),t(s,l),e(s);while(d<s&&s<o);return c},i.filter=s=>Zr(o=>{if(o>=o)for(;e(o),!s(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;t(o,-1),!s(o););else for(;--l>=0;)for(;t(o,1),!s(o););}),r&&(i.count=(s,o)=>(q_.setTime(+s),z_.setTime(+o),e(q_),e(z_),Math.floor(r(q_,z_))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(n?o=>n(o)%s===0:o=>i.count(0,o)%s===0):i)),i}const U0=Zr(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);U0.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Zr(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):U0);U0.range;const Cs=1e3,Ha=Cs*60,Os=Ha*60,Hs=Os*24,iP=Hs*7,d6=Hs*30,V_=Hs*365,Wl=Zr(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Cs)},(e,t)=>(t-e)/Cs,e=>e.getUTCSeconds());Wl.range;const sP=Zr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Cs)},(e,t)=>{e.setTime(+e+t*Ha)},(e,t)=>(t-e)/Ha,e=>e.getMinutes());sP.range;const oP=Zr(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Ha)},(e,t)=>(t-e)/Ha,e=>e.getUTCMinutes());oP.range;const lP=Zr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Cs-e.getMinutes()*Ha)},(e,t)=>{e.setTime(+e+t*Os)},(e,t)=>(t-e)/Os,e=>e.getHours());lP.range;const cP=Zr(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Os)},(e,t)=>(t-e)/Os,e=>e.getUTCHours());cP.range;const Cp=Zr(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ha)/Hs,e=>e.getDate()-1);Cp.range;const jx=Zr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Hs,e=>e.getUTCDate()-1);jx.range;const cH=Zr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Hs,e=>
vendor: 4,347 bytes, line 844
844Math.floor(e/Hs));cH.range;function Ic(e){return Zr(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())*Ha)/iP)}const Nx=Ic(0),q0=Ic(1),xje=Ic(2),bje=Ic(3),dd=Ic(4),wje=Ic(5),jje=Ic(6);Nx.range;q0.range;xje.range;bje.range;dd.range;wje.range;jje.range;function Lc(e){return Zr(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)/iP)}const _x=Lc(0),z0=Lc(1),Nje=Lc(2),_je=Lc(3),fd=Lc(4),Sje=Lc(5),Aje=Lc(6);_x.range;z0.range;Nje.range;_je.range;fd.range;Sje.range;Aje.range;const uP=Zr(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());uP.range;const dP=Zr(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());dP.range;const Ws=Zr(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());Ws.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Zr(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)});Ws.range;const Gs=Zr(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());Gs.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Zr(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)});Gs.range;function uH(e,t,r,n,i,s){const o=[[Wl,1,Cs],[Wl,5,5*Cs],[Wl,15,15*Cs],[Wl,30,30*Cs],[s,1,Ha],[s,5,5*Ha],[s,15,15*Ha],[s,30,30*Ha],[i,1,Os],[i,3,3*Os],[i,6,6*Os],[i,12,12*Os],[n,1,Hs],[n,2,2*Hs],[r,1,iP],[t,1,d6],[t,3,3*d6],[e,1,V_]];function l(d,u,h){const m=u<d;m&&([d,u]=[u,d]);const g=h&&typeof h.range=="function"?h:c(d,u,h),b=g?g.range(d,+u+1):[];return m?b.reverse():b}function c(d,u,h){const m=Math.abs(u-d)/h,g=GT(([,,y])=>y).right(o,m);if(g===o.length)return e.every(S2(d/V_,u/V_,h));if(g===0)return U0.every(Math.max(S2(d,u,h),1));const[b,v]=o[m/o[g-1][2]<o[g][2]/m?g-1:g];return b.every(v)}return[l,c]}const[kje,Eje]=uH(Gs,dP,_x,cH,cP,oP),[Tje,Pje]=uH(Ws,uP,Nx,Cp,lP,sP);function H_(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 W_(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 lh(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function Cje(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,s=e.days,o=e.shortDays,l=e.months,c=e.shortMonths,d=ch(i),u=uh(i),h=ch(s),m=uh(s),g=ch(o),b=uh(o),v=ch(l),y=uh(l),x=ch(c),w=uh(c),_={a:W,A:q,b:V,B:z,c:null,d:y6,e:y6,f:eNe,g:uNe,G:fNe,H:Qje,I:Zje,j:Jje,L:dH,m:tNe,M:rNe,p:I,q:B,Q:b6,s:w6,S:nNe,u:aNe,U:iNe,V:sNe,w:oNe,W:lNe,x:null,X:null,y:cNe,Y:dNe,Z:hNe,"%":x6},j={a:H,A:J,b:ee,B:Y,c:null,d:v6,e:v6,f:yNe,g:kNe,G:TNe,H:mNe,I:pNe,j:gNe,L:hH,m:vNe,M:xNe,p:X,q:ne,Q:b6,s:w6,S:bNe,u:wNe,U:jNe,V:NNe,w:_Ne,W:SNe,x:null,X:null,y:ANe,Y:ENe,Z:PNe,"%":x6},S={a:C,A:O,b:D,B:L,c:F,d:p6,e:p6,f:Gje,g:m6,G:h6,H:g6,I:g6,j:zje,L:Wje,m:qje,M:Vje,p:M,q:Uje,Q:Yje,s:Xje,S:Hje,u:Ije,U:Lje,V:$je,w:Dje,W:Fje,x:U,X:G,y:m6,Y:h6,Z:Bje,"%":Kje};_.x=k(r,_),_.X=k(n,_),_.c=k(t,_),j.x=k(r,j),j.X=k(n,j),j.c=k(t,j);function k(Q,ie){return function(me){var oe=[],Ne=-1,_e=0,xe=Q.length,Ee,Pe,Z;for(me instanceof Date||(me=new Date(+me));++Ne<xe;)Q.charCodeAt(Ne)===37&&(oe.push(Q.slice(_e,Ne)),(Pe=f6[Ee=Q.charAt(++Ne)])!=null?Ee=Q.charAt(++Ne):Pe=Ee==="e"?" ":"0",(Z=ie[Ee])&&(Ee=Z(me,Pe)),oe.push(Ee),_e=Ne+1);return oe.push(Q.slice(_e,Ne)),oe.join("")}}function T(Q,ie){return function(me){var oe=lh(1900,void 0,1),Ne=P(oe,Q,me+="",0),_e,xe;if(Ne!=me.length)return null;if("Q"in oe)return new Date(oe.Q);if("s"in oe)return new Date(oe.s*1e3+("L"in oe?oe.L:0));if(ie&&!("Z"in oe)&&(oe.Z=0),"p"in oe&&(oe.H=oe.H%12+oe.p*12),oe.m===void 0&&(oe.m="q"in oe?oe.q:0),"V"in oe){if(oe.V<1||oe.V>53)return null;
vendor: 7,105 bytes, line 844
844"w"in oe||(oe.w=1),"Z"in oe?(_e=W_(lh(oe.y,0,1)),xe=_e.getUTCDay(),_e=xe>4||xe===0?z0.ceil(_e):z0(_e),_e=jx.offset(_e,(oe.V-1)*7),oe.y=_e.getUTCFullYear(),oe.m=_e.getUTCMonth(),oe.d=_e.getUTCDate()+(oe.w+6)%7):(_e=H_(lh(oe.y,0,1)),xe=_e.getDay(),_e=xe>4||xe===0?q0.ceil(_e):q0(_e),_e=Cp.offset(_e,(oe.V-1)*7),oe.y=_e.getFullYear(),oe.m=_e.getMonth(),oe.d=_e.getDate()+(oe.w+6)%7)}else("W"in oe||"U"in oe)&&("w"in oe||(oe.w="u"in oe?oe.u%7:"W"in oe?1:0),xe="Z"in oe?W_(lh(oe.y,0,1)).getUTCDay():H_(lh(oe.y,0,1)).getDay(),oe.m=0,oe.d="W"in oe?(oe.w+6)%7+oe.W*7-(xe+5)%7:oe.w+oe.U*7-(xe+6)%7);return"Z"in oe?(oe.H+=oe.Z/100|0,oe.M+=oe.Z%100,W_(oe)):H_(oe)}}function P(Q,ie,me,oe){for(var Ne=0,_e=ie.length,xe=me.length,Ee,Pe;Ne<_e;){if(oe>=xe)return-1;if(Ee=ie.charCodeAt(Ne++),Ee===37){if(Ee=ie.charAt(Ne++),Pe=S[Ee in f6?ie.charAt(Ne++):Ee],!Pe||(oe=Pe(Q,me,oe))<0)return-1}else if(Ee!=me.charCodeAt(oe++))return-1}return oe}function M(Q,ie,me){var oe=d.exec(ie.slice(me));return oe?(Q.p=u.get(oe[0].toLowerCase()),me+oe[0].length):-1}function C(Q,ie,me){var oe=g.exec(ie.slice(me));return oe?(Q.w=b.get(oe[0].toLowerCase()),me+oe[0].length):-1}function O(Q,ie,me){var oe=h.exec(ie.slice(me));return oe?(Q.w=m.get(oe[0].toLowerCase()),me+oe[0].length):-1}function D(Q,ie,me){var oe=x.exec(ie.slice(me));return oe?(Q.m=w.get(oe[0].toLowerCase()),me+oe[0].length):-1}function L(Q,ie,me){var oe=v.exec(ie.slice(me));return oe?(Q.m=y.get(oe[0].toLowerCase()),me+oe[0].length):-1}function F(Q,ie,me){return P(Q,t,ie,me)}function U(Q,ie,me){return P(Q,r,ie,me)}function G(Q,ie,me){return P(Q,n,ie,me)}function W(Q){return o[Q.getDay()]}function q(Q){return s[Q.getDay()]}function V(Q){return c[Q.getMonth()]}function z(Q){return l[Q.getMonth()]}function I(Q){return i[+(Q.getHours()>=12)]}function B(Q){return 1+~~(Q.getMonth()/3)}function H(Q){return o[Q.getUTCDay()]}function J(Q){return s[Q.getUTCDay()]}function ee(Q){return c[Q.getUTCMonth()]}function Y(Q){return l[Q.getUTCMonth()]}function X(Q){return i[+(Q.getUTCHours()>=12)]}function ne(Q){return 1+~~(Q.getUTCMonth()/3)}return{format:function(Q){var ie=k(Q+="",_);return ie.toString=function(){return Q},ie},parse:function(Q){var ie=T(Q+="",!1);return ie.toString=function(){return Q},ie},utcFormat:function(Q){var ie=k(Q+="",j);return ie.toString=function(){return Q},ie},utcParse:function(Q){var ie=T(Q+="",!0);return ie.toString=function(){return Q},ie}}}var f6={"-":"",_:" ",0:"0"},cn=/^\s*\d+/,Oje=/^%/,Mje=/[\\^$*+?|[\]().{}]/g;function Vt(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",s=i.length;return n+(s<r?new Array(r-s+1).join(t)+i:i)}function Rje(e){return e.replace(Mje,"\\$&")}function ch(e){return new RegExp("^(?:"+e.map(Rje).join("|")+")","i")}function uh(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function Dje(e,t,r){var n=cn.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function Ije(e,t,r){var n=cn.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function Lje(e,t,r){var n=cn.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function $je(e,t,r){var n=cn.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function Fje(e,t,r){var n=cn.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function h6(e,t,r){var n=cn.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function m6(e,t,r){var n=cn.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function Bje(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 Uje(e,t,r){var n=cn.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function qje(e,t,r){var n=cn.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function p6(e,t,r){var n=cn.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function zje(e,t,r){var n=cn.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function g6(e,t,r){var n=cn.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function Vje(e,t,r){var n=cn.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function Hje(e,t,r){var n=cn.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function Wje(e,t,r){var n=cn.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function Gje(e,t,r){var n=cn.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function Kje(e,t,r){var n=Oje.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function Yje(e,t,r){var n=cn.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function Xje(e,t,r){var n=cn.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function y6(e,t){return Vt(e.getDate(),t,2)}function Qje(e,t){return Vt(e.getHours(),t,2)}function Zje(e,t){return Vt(e.getHours()%12||12,t,2)}function Jje(e,t){return Vt(1+Cp.count(Ws(e),e),t,3)}function dH(e,t){return Vt(e.getMilliseconds(),t,3)}function eNe(e,t){return dH(e,t)+"000"}function tNe(e,t){return Vt(e.getMonth()+1,t,2)}function rNe(e,t){return Vt(e.getMinutes(),t,2)}function nNe(e,t){return Vt(e.getSeconds(),t,2)}function aNe(e){var t=e.getDay();return t===0?7:t}function iNe(e,t){return Vt(Nx.count(Ws(e)-1,e),t,2)}function fH(e){var t=e.getDay();return t>=4||t===0?dd(e):dd.ceil(e)}function sNe(e,t){return e=fH(e),Vt(dd.count(Ws(e),e)+(Ws(e).getDay()===4),t,2)}function oNe(e){return e.getDay()}function lNe(e,t){return Vt(q0.count(Ws(e)-1,e),t,2)}function cNe(e,t){return Vt(e.getFullYear()%100,t,2)}function uNe(e,t){return e=fH(e),Vt(e.getFullYear()%100,t,2)}function dNe(e,t){return Vt(e.getFullYear()%1e4,t,4)}function fNe(e,t){var r=e.getDay();return e=r>=4||r===0?dd(e):dd.ceil(e),Vt(e.getFullYear()%1e4,t,4)}function hNe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Vt(t/60|0,"0",2)+Vt(t%60,"0",2)}function v6(e,t){return Vt(e.getUTCDate(),t,2)}function mNe(e,t){return Vt(e.getUTCHours(),t,2)}function pNe(e,t){return Vt(e.getUTCHours()%12||12,t,2)}function gNe(e,t){return Vt(1+jx.count(Gs(e),e),t,3)}function hH(e,t){return Vt(e.getUTCMilliseconds(),t,3)}function yNe(e,t){return hH(e,t)+"000"}function vNe(e,t){return Vt(e.getUTCMonth()+1,t,2)}function xNe(e,t){return Vt(e.getUTCMinutes(),t,2)}function bNe(e,t){return Vt(e.getUTCSeconds(),t,2)}function wNe(e){var t=e.getUTCDay();return t===0?7:t}function jNe(e,t){return Vt(_x.count(Gs(e)-1,e),t,2)}function mH(e){var t=e.getUTCDay();return t>=4||t===0?fd(e):fd.ceil(e)}function NNe(e,t){return e=mH(e),Vt(fd.count(Gs(e),e)+(Gs(e).getUTCDay()===4),t,2)}function _Ne(e){return e.getUTCDay()}function SNe(e,t){return Vt(z0.count(Gs(e)-1,e),t,2)}function ANe(e,t){return Vt(e.getUTCFullYear()%100,t,2)}function kNe(e,t){return e=mH(e),Vt(e.getUTCFullYear()%100,t,2)}function ENe(e,t){return Vt(e.getUTCFullYear()%1e4,t,4)}function TNe(e,t){var r=e.getUTCDay();return e=r>=4||r===0?fd(e):fd.ceil(e),Vt(e.getUTCFullYear()%1e4,t,4)}function PNe(){return"+0000"}function x6(){return"%"}function b6(e){return+e}function w6(e){return Math.floor(+e/1e3)}var xu,pH,gH;CNe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
844ay","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 CNe(e){return xu=Cje(e),pH=xu.format,xu.parse,gH=xu.utcFormat,xu.utcParse,xu}function ONe(e){return new Date(e)}function MNe(e){return e instanceof Date?+e:+new Date(+e)}function fP(e,t,r,n,i,s,o,l,c,d){var u=ZT(),h=u.invert,m=u.domain,g=d(".%L"),b=d(":%S"),v=d("%I:%M"),y=d("%I %p"),x=d("%a %d"),w=d("%b %d"),_=d("%B"),j=d("%Y");function S(k){return(c(k)<k?g:l(k)<k?b:o(k)<k?v:s(k)<k?y:n(k)<k?i(k)<k?x:w:r(k)<k?_:j)(k)}return u.invert=function(k){return new Date(h(k))},u.domain=function(k){return arguments.length?m(Array.from(k,MNe)):m().map(ONe)},u.ticks=function(k){var T=m();return e(T[0],T[T.length-1],k??10)},u.tickFormat=function(k,T){return T==null?S:d(T)},u.nice=function(k){var T=m();return(!k||typeof k.range!="function")&&(k=t(T[0],T[T.length-1],k??10)),k?m(rH(T,k)):u},u.copy=function(){return Pp(u,fP(e,t,r,n,i,s,o,l,c,d))},u}function RNe(){return ti.apply(fP(Tje,Pje,Ws,uP,Nx,Cp,lP,sP,Wl,pH).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function DNe(){return ti.apply(fP(kje,Eje,Gs,dP,_x,jx,cP,oP,Wl,gH).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Sx(){var e=0,t=1,r,n,i,s,o=qn,l=!1,c;function d(h){return h==null||isNaN(h=+h)?c:o(i===0?.5:(h=(s(h)-r)*i,l?Math.max(0,Math.min(1,h)):h))}d.domain=function(h){return arguments.length?([e,t]=h,r=s(e=+e),n=s(t=+t),i=r===n?0:1/(n-r),d):[e,t]},d.clamp=function(h){return arguments.length?(l=!!h,d):l},d.interpolator=function(h){return arguments.length?(o=h,d):o};function u(h){return function(m){var g,b;return arguments.length?([g,b]=m,o=h(g,b),d):[o(0),o(1)]}}return d.range=u(sf),d.rangeRound=u(QT),d.unknown=function(h){return arguments.length?(c=h,d):c},function(h){return s=h,r=h(e),n=h(t),i=r===n?0:1/(n-r),d}}function dl(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function yH(){var e=ul(Sx()(qn));return e.copy=function(){return dl(e,yH())},Qs.apply(e,arguments)}function vH(){var e=tP(Sx()).domain([1,10]);return e.copy=function(){return dl(e,vH()).base(e.base())},Qs.apply(e,arguments)}function xH(){var e=rP(Sx());return e.copy=function(){return dl(e,xH()).constant(e.constant())},Qs.apply(e,arguments)}function hP(){var e=nP(Sx());return e.copy=function(){return dl(e,hP()).exponent(e.exponent())},Qs.apply(e,arguments)}function INe(){return hP.apply(null,arguments).exponent(.5)}function bH(){var e=[],t=qn;function r(n){if(n!=null&&!isNaN(n=+n))return t((Ep(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(Go),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,s)=>j1e(e,s/n))},r.copy=function(){return bH(t).domain(e)},Qs.apply(r,arguments)}function Ax(){var e=0,t=.5,r=1,n=1,i,s,o,l,c,d=qn,u,h=!1,m;function g(v){return isNaN(v=+v)?m:(v=.5+((v=+u(v))-s)*(n*v<n*s?l:c),d(h?Math.max(0,Math.min(1,v)):v))}g.domain=function(v){return arguments.length?([e,t,r]=v,i=u(e=+e),s=u(t=+t),o=u(r=+r),l=i===s?0:.5/(s-i),c=s===o?0:.5/(o-s),n=s<i?-1:1,g):[e,t,r]},g.clamp=function(v){return arguments.length?(h=!!v,g):h},g.interpolator=function(v){return arguments.length?(d=v,g):d};function b(v){return function(y){var x,w,_;return arguments.length?([x,w,_]=y,d=K1e(v,[x,w,_]),g):[d(0),d(.5),d(1)]}}return g.range=b(sf),g.rangeRound=b(QT),g.unknown=function(v){return arguments.length?(m=v,g):m},function(v){return u=v,i=v(e),s=v(t),o=v(r),l=i===s?0:.5/(s-i),c=s===o?0:.5/(o-s),n=s<i?-1:1,g}}function wH(){var e=ul(Ax()(qn));return e.copy=function(){return dl(e,wH())},Qs.apply(e,arguments)}function jH(){var e=tP(Ax()).domain([.1,1,10]);return e.copy=function(){return dl(e,jH()).base(e.base())},Qs.apply(e,arguments)}function NH(){var e=rP(Ax());return e.copy=function(){return dl(e,NH()).constant(e.constant())},Qs.apply(e,arguments)}function mP(){var e=nP(Ax());return e.copy=function(){return dl(e,mP()).exponent(e.exponent())},Qs.apply(e,arguments)}function LNe(){return mP.apply(null,arguments).exponent(.5)}const j6=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:xm,scaleDiverging:wH,scaleDivergingLog:jH,scaleDivergingPow:mP,scaleDivergingSqrt:LNe,scaleDivergingSymlog:NH,scaleIdentity:tH,scaleImplicit:A2,scaleLinear:B0,scaleLog:nH,scaleOrdinal:KT,scalePoint:Fh,scalePow:aP,scaleQuantile:sH,scaleQuantize:oH,scaleRadial:iH,scaleSequential:yH,scaleSequentialLog:vH,scaleSequentialPow:hP,scaleSequentialQuantile:bH,scaleSequentialSqrt:INe,scaleSequentialSymlog:xH,scaleSqrt:yje,scaleSymlog:aH,scaleThreshold:lH,scaleTime:RNe,scaleUtc:DNe,tickFormat:eH},Symbol.toStringTag,{value:"Module"}));var G_,N6;function kx(){if(N6)return G_;N6=1;var e=tf();function t(r,n,i){for(var s=-1,o=r.length;++s<o;){var l=r[s],c=n(l);if(c!=null&&(d===void 0?c===c&&!e(c):i(c,d)))var d=c,u=l}return u}return G_=t,G_}var K_,_6;function _H(){if(_6)return K_;_6=1;function e(t,r){return t>r}return K_=e,K_}var Y_,S6;function $Ne(){if(S6)return Y_;S6=1;var e=kx(),t=_H(),r=af();function n(i){return i&&i.length?e(i,r,t):void 0}return Y_=n,Y_}var FNe=$Ne();const Fo=Ht(FNe);var X_,A6;function SH(){if(A6)return X_;A6=1;function e(t,r){return t<r}return X_=e,X_}var Q_,k6;function BNe(){if(k6)return Q_;k6=1;var e=kx(),t=SH(),r=af();function n(i){return i&&i.length?e(i,r,t):void 0}return Q_=n,Q_}var UNe=BNe();const Ex=Ht(UNe);var Z_,E6;
vendor: 69,305 bytes, lines 844-871
844function qNe(){if(E6)return Z_;E6=1;var e=PT(),t=us(),r=MV(),n=ca();function i(s,o){var l=n(s)?e:r;return l(s,t(o,3))}return Z_=i,Z_}var J_,T6;function zNe(){if(T6)return J_;T6=1;var e=CV(),t=qNe();function r(n,i){return e(t(n,i),1)}return J_=r,J_}var VNe=zNe();const HNe=Ht(VNe);var eS,P6;function AH(){if(P6)return eS;P6=1;var e=zT();function t(r,n){return e(r,n)}return eS=t,eS}var WNe=AH();const Ac=Ht(WNe);var of=1e9,GNe={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},gP,gr=!0,Qa="[DecimalError] ",cc=Qa+"Invalid argument: ",pP=Qa+"Exponent out of range: ",lf=Math.floor,Fl=Math.pow,KNe=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ba,nn=1e7,ur=7,kH=9007199254740991,V0=lf(kH/ur),et={};et.absoluteValue=et.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};et.comparedTo=et.cmp=function(e){var t,r,n,i,s=this;if(e=new s.constructor(e),s.s!==e.s)return s.s||-e.s;if(s.e!==e.e)return s.e>e.e^s.s<0?1:-1;for(n=s.d.length,i=e.d.length,t=0,r=n<i?n:i;t<r;++t)if(s.d[t]!==e.d[t])return s.d[t]>e.d[t]^s.s<0?1:-1;return n===i?0:n>i^s.s<0?1:-1};et.decimalPlaces=et.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*ur;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};et.dividedBy=et.div=function(e){return Us(this,new this.constructor(e))};et.dividedToIntegerBy=et.idiv=function(e){var t=this,r=t.constructor;return rr(Us(t,new r(e),0,1),r.precision)};et.equals=et.eq=function(e){return!this.cmp(e)};et.exponent=function(){return Fr(this)};et.greaterThan=et.gt=function(e){return this.cmp(e)>0};et.greaterThanOrEqualTo=et.gte=function(e){return this.cmp(e)>=0};et.isInteger=et.isint=function(){return this.e>this.d.length-2};et.isNegative=et.isneg=function(){return this.s<0};et.isPositive=et.ispos=function(){return this.s>0};et.isZero=function(){return this.s===0};et.lessThan=et.lt=function(e){return this.cmp(e)<0};et.lessThanOrEqualTo=et.lte=function(e){return this.cmp(e)<1};et.logarithm=et.log=function(e){var t,r=this,n=r.constructor,i=n.precision,s=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(ba))throw Error(Qa+"NaN");if(r.s<1)throw Error(Qa+(r.s?"NaN":"-Infinity"));return r.eq(ba)?new n(0):(gr=!1,t=Us(_m(r,s),_m(e,s),s),gr=!0,rr(t,i))};et.minus=et.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?PH(t,e):EH(t,(e.s=-e.s,e))};et.modulo=et.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(Qa+"NaN");return r.s?(gr=!1,t=Us(r,e,0,1).times(e),gr=!0,r.minus(t)):rr(new n(r),i)};et.naturalExponential=et.exp=function(){return TH(this)};et.naturalLogarithm=et.ln=function(){return _m(this)};et.negated=et.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};et.plus=et.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?EH(t,e):PH(t,(e.s=-e.s,e))};et.precision=et.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(cc+e);if(t=Fr(i)+1,n=i.d.length-1,r=n*ur+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};et.squareRoot=et.sqrt=function(){var e,t,r,n,i,s,o,l=this,c=l.constructor;if(l.s<1){if(!l.s)return new c(0);throw Error(Qa+"NaN")}for(e=Fr(l),gr=!1,i=Math.sqrt(+l),i==0||i==1/0?(t=zi(l.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=lf((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 c(t)):n=new c(i.toString()),r=c.precision,i=o=r+3;;)if(s=n,n=s.plus(Us(l,s,o+2)).times(.5),zi(s.d).slice(0,o)===(t=zi(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(rr(s,r+1,0),s.times(s).eq(l)){n=s;break}}else if(t!="9999")break;o+=4}return gr=!0,rr(n,r)};et.times=et.mul=function(e){var t,r,n,i,s,o,l,c,d,u=this,h=u.constructor,m=u.d,g=(e=new h(e)).d;if(!u.s||!e.s)return new h(0);for(e.s*=u.s,r=u.e+e.e,c=m.length,d=g.length,c<d&&(s=m,m=g,g=s,o=c,c=d,d=o),s=[],o=c+d,n=o;n--;)s.push(0);for(n=d;--n>=0;){for(t=0,i=c+n;i>n;)l=s[i]+g[n]*m[i-n-1]+t,s[i--]=l%nn|0,t=l/nn|0;s[i]=(s[i]+t)%nn|0}for(;!s[--o];)s.pop();return t?++r:s.shift(),e.d=s,e.e=r,gr?rr(e,h.precision):e};et.toDecimalPlaces=et.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(rs(e,0,of),t===void 0?t=n.rounding:rs(t,0,8),rr(r,e+Fr(r)+1,t))};et.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=kc(n,!0):(rs(e,0,of),t===void 0?t=i.rounding:rs(t,0,8),n=rr(new i(n),e+1,t),r=kc(n,!0,e+1)),r};et.toFixed=function(e,t){var r,n,i=this,s=i.constructor;return e===void 0?kc(i):(rs(e,0,of),t===void 0?t=s.rounding:rs(t,0,8),n=rr(new s(i),e+Fr(i)+1,t),r=kc(n.abs(),!1,e+Fr(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};et.toInteger=et.toint=function(){var e=this,t=e.constructor;return rr(new t(e),Fr(e)+1,t.rounding)};et.toNumber=function(){return+this};et.toPower=et.pow=function(e){var t,r,n,i,s,o,l=this,c=l.constructor,d=12,u=+(e=new c(e));if(!e.s)return new c(ba);if(l=new c(l),!l.s){if(e.s<1)throw Error(Qa+"Infinity");return l}if(l.eq(ba))return l;if(n=c.precision,e.eq(ba))return rr(l,n);if(t=e.e,r=e.d.length-1,o=t>=r,s=l.s,o){if((r=u<0?-u:u)<=kH){for(i=new c(ba),t=Math.ceil(n/ur+4),gr=!1;r%2&&(i=i.times(l),O6(i.d,t)),r=lf(r/2),r!==0;)l=l.times(l),O6(l.d,t);return gr=!0,e.s<0?new c(ba).div(i):rr(i,n)}}else if(s<0)throw Error(Qa+"NaN");return s=s<0&&e.d[Math.max(t,r)]&1?-1:1,l.s=1,gr=!1,i=e.times(_m(l,n+d)),gr=!0,i=TH(i),i.s=s,i};et.toPrecision=function(e,t){var r,n,i=this,s=i.constructor;return e===void 0?(r=Fr(i),n=kc(i,r<=s.toExpNeg||r>=s.toExpPos)):(rs(e,1,of),t===void 0?t=s.rounding:rs(t,0,8),i=rr(new s(i),e,t),r=Fr(i),n=kc(i,e<=r||r<=s.toExpNeg,e)),n};et.toSignificantDigits=et.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(rs(e,1,of),t===void 0?t=n.rounding:rs(t,0,8)),rr(new n(r),e,t)};et.toString=et.valueOf=et.val=et.toJSON=et[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Fr(e),r=e.constructor;return kc(e,t<=r.toExpNeg||t>=r.toExpPos)};function EH(e,t){var r,n,i,s,o,l,c,d,u=e.constructor,h=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),gr?rr(t,h):t;if(c=e.d,d=t.d,o=e.e,i=t.e,c=c.slice(),s=o-i,s){for(s<0?(n=c,s=-s,l=d.length):(n=d,i=o,l=c.length),o=Math.ceil(h/ur),l=o>l?o+1:l+1,s>l&&(s=l,n.length=1),n.reverse();s--;)n.push(0);n.reverse()}for(l=c.length,s=d.length,l-s<0&&(s=l,n=d,d=c,c=n),r=0;s;)r=(c[--s]=c[s]+d[s]+r)/nn|0,c[s]%=nn;for(r&&(c.unshift(r),++i),l=c.length;c[--l]==0;)c.pop();return t.d=c,t.e=i,gr?rr(t,h):t}function rs(e,t,r){if(e!==~~e||e<t||e>r)throw Error(cc+e)}function zi(e){var t,r,n,i=e.length-1,s="",o=e[0];if(i>0){for(s+=o,t=1;t<i;t++)n=e[t]+"",r=ur-n.length,r&&(s+=ko(r)),s+=n;o=e[t],n=o+"",r=ur-n.length,r&&(s+=ko(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return s+o}var Us=(function(){function e(n,i){var s,o=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+o,n[l]=s%nn|0,o=s/nn|0;return o&&n.unshift(o),n}function t(n,i,s,o){var l,c;if(s!=o)c=s>o?1:-1;else for(l=c=0;l<s;l++)if(n[l]!=i[l]){c=n[l]>i[l]?1:-1;break}return c}function r(n,i,s){for(var o=0;s--;)n[s]-=o,o=n[s]<i[s]?1:0,n[s]=o*nn+n[s]-i[s];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,s,o){var l,c,d,u,h,m,g,b,v,y,x,w,_,j,S,k,T,P,M=n.constructor,C=n.s==i.s?1:-1,O=n.d,D=i.d;if(!n.s)return new M(n);if(!i.s)throw Error(Qa+"Division by zero");for(c=n.e-i.e,T=D.length,S=O.length,g=new M(C),b=g.d=[],d=0;D[d]==(O[d]||0);)++d;if(D[d]>(O[d]||0)&&--c,s==null?w=s=M.precision:o?w=s+(Fr(n)-Fr(i))+1:w=s,w<0)return new M(0);if(w=w/ur+2|0,d=0,T==1)for(u=0,D=D[0],w++;(d<S||u)&&w--;d++)_=u*nn+(O[d]||0),b[d]=_/D|0,u=_%D|0;else{for(u=nn/(D[0]+1)|0,u>1&&(D=e(D,u),O=e(O,u),T=D.length,S=O.length),j=T,v=O.slice(0,T),y=v.length;y<T;)v[y++]=0;P=D.slice(),P.unshift(0),k=D[0],D[1]>=nn/2&&++k;do u=0,l=t(D,v,T,y),l<0?(x=v[0],T!=y&&(x=x*nn+(v[1]||0)),u=x/k|0,u>1?(u>=nn&&(u=nn-1),h=e(D,u),m=h.length,y=v.length,l=t(h,v,m,y),l==1&&(u--,r(h,T<m?P:D,m))):(u==0&&(l=u=1),h=D.slice()),m=h.length,m<y&&h.unshift(0),r(v,h,y),l==-1&&(y=v.length,l=t(D,v,T,y),l<1&&(u++,r(v,T<y?P:D,y))),y=v.length):l===0&&(u++,v=[0]),b[d++]=u,l&&v[0]?v[y++]=O[j]||0:(v=[O[j]],y=1);while((j++<S||v[0]!==void 0)&&w--)}return b[0]||b.shift(),g.e=c,rr(g,o?s+Fr(g)+1:s)}})();function TH(e,t){var r,n,i,s,o,l,c=0,d=0,u=e.constructor,h=u.precision;if(Fr(e)>16)throw Error(pP+Fr(e));if(!e.s)return new u(ba);for(gr=!1,l=h,o=new u(.03125);e.abs().gte(.1);)e=e.times(o),d+=5;for(n=Math.log(Fl(2,d))/Math.LN10*2+5|0,l+=n,r=i=s=new u(ba),u.precision=l;;){if(i=rr(i.times(e),l),r=r.times(++c),o=s.plus(Us(i,r,l)),zi(o.d).slice(0,l)===zi(s.d).slice(0,l)){for(;d--;)s=rr(s.times(s),l);return u.precision=h,t==null?(gr=!0,rr(s,h)):s}s=o}}function Fr(e){for(var t=e.e*ur,r=e.d[0];r>=10;r/=10)t++;return t}function tS(e,t,r){if(t>e.LN10.sd())throw gr=!0,r&&(e.precision=r),Error(Qa+"LN10 precision limit exceeded");return rr(new e(e.LN10),t)}function ko(e){for(var t="";e--;)t+="0";return t}function _m(e,t){var r,n,i,s,o,l,c,d,u,h=1,m=10,g=e,b=g.d,v=g.constructor,y=v.precision;if(g.s<1)throw Error(Qa+(g.s?"NaN":"-Infinity"));if(g.eq(ba))return new v(0);if(t==null?(gr=!1,d=y):d=t,g.eq(10))return t==null&&(gr=!0),tS(v,d);if(d+=m,v.precision=d,r=zi(b),n=r.charAt(0),s=Fr(g),Math.abs(s)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)g=g.times(e),r=zi(g.d),n=r.charAt(0),h++;s=Fr(g),n>1?(g=new v("0."+r),s++):g=new v(n+"."+r.slice(1))}else return c=tS(v,d+2,y).times(s+""),g=_m(new v(n+"."+r.slice(1)),d-m).plus(c),v.precision=y,t==null?(gr=!0,rr(g,y)):g;for(l=o=g=Us(g.minus(ba),g.plus(ba),d),u=rr(g.times(g),d),i=3;;){if(o=rr(o.times(u),d),c=l.plus(Us(o,new v(i),d)),zi(c.d).slice(0,d)===zi(l.d).slice(0,d))return l=l.times(2),s!==0&&(l=l.plus(tS(v,d+2,y).times(s+""))),l=Us(l,new v(h),d),v.precision=y,t==null?(gr=!0,rr(l,y)):l;l=c,i+=2}}function C6(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=lf(r/ur),e.d=[],n=(r+1)%ur,r<0&&(n+=ur),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=ur;n<i;)e.d.push(+t.slice(n,n+=ur));t=t.slice(n),n=ur-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),gr&&(e.e>V0||e.e<-V0))throw Error(pP+r)}else e.s=0,e.e=0,e.d=[0];return e}function rr(e,t,r){var n,i,s,o,l,c,d,u,h=e.d;for(o=1,s=h[0];s>=10;s/=10)o++;if(n=t-o,n<0)n+=ur,i=t,d=h[u=0];else{if(u=Math.ceil((n+1)/ur),s=h.length,u>=s)return e;for(d=s=h[u],o=1;s>=10;s/=10)o++;n%=ur,i=n-ur+o}if(r!==void 0&&(s=Fl(10,o-i-1),l=d/s%10|0,c=t<0||h[u+1]!==void 0||d%s,c=r<4?(l||c)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||c||r==6&&(n>0?i>0?d/Fl(10,o-i):0:h[u-1])%10&1||r==(e.s<0?8:7))),t<1||!h[0])return c?(s=Fr(e),h.length=1,t=t-s-1,h[0]=Fl(10,(ur-t%ur)%ur),e.e=lf(-t/ur)||0):(h.length=1,h[0]=e.e=e.s=0),e;if(n==0?(h.length=u,s=1,u--):(h.length=u+1,s=Fl(10,ur-n),h[u]=i>0?(d/Fl(10,o-i)%Fl(10,i)|0)*s:0),c)for(;;)if(u==0){(h[0]+=s)==nn&&(h[0]=1,++e.e);break}else{if(h[u]+=s,h[u]!=nn)break;h[u--]=0,s=1}for(n=h.length;h[--n]===0;)h.pop();if(gr&&(e.e>V0||e.e<-V0))throw Error(pP+Fr(e));return e}function PH(e,t){var r,n,i,s,o,l,c,d,u,h,m=e.constructor,g=m.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new m(e),gr?rr(t,g):t;if(c=e.d,h=t.d,n=t.e,d=e.e,c=c.slice(),o=d-n,o){for(u=o<0,u?(r=c,o=-o,l=h.length):(r=h,n=d,l=c.length),i=Math.max(Math.ceil(g/ur),l)+2,o>i&&(o=i,r.length=1),r.reverse(),i=o;i--;)r.push(0);r.reverse()}else{for(i=c.length,l=h.length,u=i<l,u&&(l=i),i=0;i<l;i++)if(c[i]!=h[i]){u=c[i]<h[i];break}o=0}for(u&&(r=c,c=h,h=r,t.s=-t.s),l=c.length,i=h.length-l;i>0;--i)c[l++]=0;for(i=h.length;i>o;){if(c[--i]<h[i]){for(s=i;s&&c[--s]===0;)c[s]=nn-1;--c[s],c[i]+=nn}c[i]-=h[i]}for(;c[--l]===0;)c.pop();for(;c[0]===0;c.shift())--n;return c[0]?(t.d=c,t.e=n,gr?rr(t,g):t):new m(0)}function kc(e,t,r){var n,i=Fr(e),s=zi(e.d),o=s.length;return t?(r&&(n=r-o)>0?s=s.charAt(0)+"."+s.slice(1)+ko(n):o>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(i<0?"e":"e+")+i):i<0?(s="0."+ko(-i-1)+s,r&&(n=r-o)>0&&(s+=ko(n))):i>=o?(s+=ko(i+1-o),r&&(n=r-i-1)>0&&(s=s+"."+ko(n))):((n=i+1)<o&&(s=s.slice(0,n)+"."+s.slice(n)),r&&(n=r-o)>0&&(i+1===o&&(s+="."),s+=ko(n))),e.s<0?"-"+s:s}function O6(e,t){if(e.length>t)return e.length=t,!0}function CH(e){var t,r,n;function i(s){var o=this;if(!(o instanceof i))return new i(s);if(o.constructor=i,s instanceof i){o.s=s.s,o.e=s.e,o.d=(s=s.d)?s.slice():s;return}if(typeof s=="number"){if(s*0!==0)throw Error(cc+s);if(s>0)o.s=1;else if(s<0)s=-s,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(s===~~s&&s<1e7){o.e=0,o.d=[s];return}return C6(o,s.toString())}else if(typeof s!="string")throw Error(cc+s);if(s.charCodeAt(0)===45?(s=s.slice(1),o.s=-1):o.s=1,KNe.test(s))C6(o,s);else throw Error(cc+s)}if(i.prototype=et,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=CH,i.config=i.set=YNe,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 YNe(e){if(!e||typeof e!="object")throw Error(Qa+"Object expected");var t,r,n,i=["precision",1,of,"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(lf(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(cc+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(cc+r+": "+n);return this}var gP=CH(GNe);ba=new gP(1);const Jt=gP;function XNe(e){return e_e(e)||JNe(e)||ZNe(e)||QNe()}function QNe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 845In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZNe(e,t){if(e){if(typeof e=="string")return P2(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 P2(e,t)}}function JNe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function e_e(e){if(Array.isArray(e))return P2(e)}function P2(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 t_e=function(t){return t},OH={},MH=function(t){return t===OH},M6=function(t){return function r(){return arguments.length===0||arguments.length===1&&MH(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},r_e=function e(t,r){return t===1?r:M6(function(){for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];var o=i.filter(function(l){return l!==OH}).length;return o>=t?r.apply(void 0,i):e(t-o,M6(function(){for(var l=arguments.length,c=new Array(l),d=0;d<l;d++)c[d]=arguments[d];var u=i.map(function(h){return MH(h)?c.shift():h});return r.apply(void 0,XNe(u).concat(c))}))})},Tx=function(t){return r_e(t.length,t)},C2=function(t,r){for(var n=[],i=t;i<r;++i)n[i-t]=i;return n},n_e=Tx(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),a_e=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return t_e;var i=r.reverse(),s=i[0],o=i.slice(1);return function(){return o.reduce(function(l,c){return c(l)},s.apply(void 0,arguments))}},O2=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},RH=function(t){var r=null,n=null;return function(){for(var i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];return r&&s.every(function(l,c){return l===r[c]})||(r=s,n=t.apply(void 0,s)),n}};function i_e(e){var t;return e===0?t=1:t=Math.floor(new Jt(e).abs().log(10).toNumber())+1,t}function s_e(e,t,r){for(var n=new Jt(e),i=0,s=[];n.lt(t)&&i<1e5;)s.push(n.toNumber()),n=n.add(r),i++;return s}var o_e=Tx(function(e,t,r){var n=+e,i=+t;return n+r*(i-n)}),l_e=Tx(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),c_e=Tx(function(e,t,r){var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});const Px={rangeStep:s_e,getDigitCount:i_e,interpolateNumber:o_e,uninterpolateNumber:l_e,uninterpolateTruncation:c_e};function M2(e){return f_e(e)||d_e(e)||DH(e)||u_e()}function u_e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 846In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d_e(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function f_e(e){if(Array.isArray(e))return R2(e)}function Sm(e,t){return p_e(e)||m_e(e,t)||DH(e,t)||h_e()}function h_e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 847In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DH(e,t){if(e){if(typeof e=="string")return R2(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 R2(e,t)}}function R2(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 m_e(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,s=void 0;try{for(var o=e[Symbol.iterator](),l;!(n=(l=o.next()).done)&&(r.push(l.value),!(t&&r.length===t));n=!0);}catch(c){i=!0,s=c}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw s}}return r}}function p_e(e){if(Array.isArray(e))return e}function IH(e){var t=Sm(e,2),r=t[0],n=t[1],i=r,s=n;return r>n&&(i=n,s=r),[i,s]}function LH(e,t,r){if(e.lte(0))return new Jt(0);var n=Px.getDigitCount(e.toNumber()),i=new Jt(10).pow(n),s=e.div(i),o=n!==1?.05:.1,l=new Jt(Math.ceil(s.div(o).toNumber())).add(r).mul(o),c=l.mul(i);return t?c:new Jt(Math.ceil(c))}function g_e(e,t,r){var n=1,i=new Jt(e);if(!i.isint()&&r){var s=Math.abs(e);s<1?(n=new Jt(10).pow(Px.getDigitCount(e)-1),i=new Jt(Math.floor(i.div(n).toNumber())).mul(n)):s>1&&(i=new Jt(Math.floor(e)))}else e===0?i=new Jt(Math.floor((t-1)/2)):r||(i=new Jt(Math.floor(e)));var o=Math.floor((t-1)/2),l=a_e(n_e(function(c){return i.add(new Jt(c-o).mul(n)).toNumber()}),C2);return l(0,t)}function $H(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 Jt(0),tickMin:new Jt(0),tickMax:new Jt(0)};var s=LH(new Jt(t).sub(e).div(r-1),n,i),o;e<=0&&t>=0?o=new Jt(0):(o=new Jt(e).add(t).div(2),o=o.sub(new Jt(o).mod(s)));var l=Math.ceil(o.sub(e).div(s).toNumber()),c=Math.ceil(new Jt(t).sub(o).div(s).toNumber()),d=l+c+1;return d>r?$H(e,t,r,n,i+1):(d<r&&(c=t>0?c+(r-d):c,l=t>0?l:l+(r-d)),{step:s,tickMin:o.sub(new Jt(l).mul(s)),tickMax:o.add(new Jt(c).mul(s))})}function y_e(e){var t=Sm(e,2),r=t[0],n=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),l=IH([r,n]),c=Sm(l,2),d=c[0],u=c[1];if(d===-1/0||u===1/0){var h=u===1/0?[d].concat(M2(C2(0,i-1).map(function(){return 1/0}))):[].concat(M2(C2(0,i-1).map(function(){return-1/0})),[u]);return r>n?O2(h):h}if(d===u)return g_e(d,i,s);var m=$H(d,u,o,s),g=m.step,b=m.tickMin,v=m.tickMax,y=Px.rangeStep(b,v.add(new Jt(.1).mul(g)),g);return r>n?O2(y):y}function v_e(e,t){var r=Sm(e,2),n=r[0],i=r[1],s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=IH([n,i]),l=Sm(o,2),c=l[0],d=l[1];if(c===-1/0||d===1/0)return[n,i];if(c===d)return[c];var u=Math.max(t,2),h=LH(new Jt(d).sub(c).div(u-1),s,0),m=[].concat(M2(Px.rangeStep(new Jt(c),new Jt(d).sub(new Jt(.99).mul(h)),h)),[d]);return n>i?O2(m):m}var x_e=RH(y_e),b_e=RH(v_e),w_e="Invariant failed";function Ec(e,t){throw new Error(w_e)}var j_e=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];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 H0(){return H0=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},H0.apply(this,arguments)}function N_e(e,t){return k_e(e)||A_e(e,t)||S_e(e,t)||__e()}function __e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 848In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function S_e(e,t){if(e){if(typeof e=="string")return R6(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 R6(e,t)}}function R6(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 A_e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,s,o,l=[],c=!0,d=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(c=(n=s.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(u){d=!0,i=u}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw i}}return l}}function k_e(e){if(Array.isArray(e))return e}function E_e(e,t){if(e==null)return{};var r=T_e(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function T_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 P_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function C_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,UH(n.key),n)}}function O_e(e,t,r){return t&&C_e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function M_e(e,t,r){return t=W0(t),R_e(e,FH()?Reflect.construct(t,r||[],W0(e).constructor):t.apply(e,r))}function R_e(e,t){if(t&&(hd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return D_e(e)}function D_e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function FH(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(FH=function(){return!!e})()}function W0(e){return W0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},W0(e)}function I_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&&D2(e,t)}function D2(e,t){return D2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},D2(e,t)}function BH(e,t,r){return t=UH(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function UH(e){var t=L_e(e,"string");return hd(t)=="symbol"?t:t+""}function L_e(e,t){if(hd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(hd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Op=(function(e){function t(){return P_e(this,t),M_e(this,t,arguments)}return I_e(t,e),O_e(t,[{key:"render",value:function(){var n=this.props,i=n.offset,s=n.layout,o=n.width,l=n.dataKey,c=n.data,d=n.dataPointFormatter,u=n.xAxis,h=n.yAxis,m=E_e(n,j_e),g=lt(m,!1);this.props.direction==="x"&&u.type!=="number"&&Ec();var b=c.map(function(v){var y=d(v,l),x=y.x,w=y.y,_=y.value,j=y.errorVal;if(!j)return null;var S=[],k,T;if(Array.isArray(j)){var P=N_e(j,2);k=P[0],T=P[1]}else k=T=j;if(s==="vertical"){var M=u.scale,C=w+i,O=C+o,D=C-o,L=M(_-k),F=M(_+T);S.push({x1:F,y1:O,x2:F,y2:D}),S.push({x1:L,y1:C,x2:F,y2:C}),S.push({x1:L,y1:O,x2:L,y2:D})}else if(s==="horizontal"){var U=h.scale,G=x+i,W=G-o,q=G+o,V=U(_-k),z=U(_+T);S.push({x1:W,y1:z,x2:q,y2:z}),S.push({x1:G,y1:V,x2:G,y2:z}),S.push({x1:W,y1:V,x2:q,y2:V})}return te.createElement(Ct,H0({className:"recharts-errorBar",key:"bar-".concat(S.map(function(I){return"".concat(I.x1,"-").concat(I.x2,"-").concat(I.y1,"-").concat(I.y2)}))},g),S.map(function(I){return te.createElement("line",H0({},I,{key:"line-".concat(I.x1,"-").concat(I.x2,"-").concat(I.y1,"-").concat(I.y2)}))}))});return te.createElement(Ct,{className:"recharts-errorBars"},b)}}])})(te.Component);BH(Op,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});BH(Op,"displayName","ErrorBar");function Am(e){"@babel/helpers - typeof";return Am=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},Am(e)}function D6(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 Cl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?D6(Object(r),!0).forEach(function(n){$_e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):D6(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $_e(e,t,r){return t=F_e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function F_e(e){var t=B_e(e,"string");return Am(t)=="symbol"?t:t+""}function B_e(e,t){if(Am(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Am(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var qH=function(t){var r=t.children,n=t.formattedGraphicalItems,i=t.legendWidth,s=t.legendContent,o=va(r,Bs);if(!o)return null;var l=Bs.defaultProps,c=l!==void 0?Cl(Cl({},l),o.props):{},d;return o.props&&o.props.payload?d=o.props&&o.props.payload:s==="children"?d=(n||[]).reduce(function(u,h){var m=h.item,g=h.props,b=g.sectors||g.data||[];return u.concat(b.map(function(v){return{type:o.props.iconType||m.props.legendType,value:v.name,color:v.fill,payload:v}}))},[]):d=(n||[]).map(function(u){var h=u.item,m=h.type.defaultProps,g=m!==void 0?Cl(Cl({},m),h.props):{},b=g.dataKey,v=g.name,y=g.legendType,x=g.hide;return{inactive:x,dataKey:b,type:c.iconType||y||"square",color:yP(h),value:v||b,payload:g}}),Cl(Cl(Cl({},c),Bs.getWithHeight(o,i)),{},{payload:d,item:o})};function km(e){"@babel/helpers - typeof";return km=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},km(e)}function I6(e){return V_e(e)||z_e(e)||q_e(e)||U_e()}function U_e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 849In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function q_e(e,t){if(e){if(typeof e=="string")return I2(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 I2(e,t)}}function z_e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function V_e(e){if(Array.isArray(e))return I2(e)}function I2(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 L6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function _r(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?L6(Object(r),!0).forEach(function(n){Fu(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L6(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Fu(e,t,r){return t=H_e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function H_e(e){var t=W_e(e,"string");return km(t)=="symbol"?t:t+""}function W_e(e,t){if(km(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(km(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Cr(e,t,r){return xt(e)||xt(t)?r:Yr(t)?Sa(e,t,r):mt(t)?t(e):r}function Bh(e,t,r,n){var i=HNe(e,function(l){return Cr(l,t)});if(r==="number"){var s=i.filter(function(l){return Fe(l)||parseFloat(l)});return s.length?[Ex(s),Fo(s)]:[1/0,-1/0]}var o=n?i.filter(function(l){return!xt(l)}):i;return o.map(function(l){return Yr(l)||l instanceof Date?l:""})}var G_e=function(t){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0,o=-1,l=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(l<=1)return 0;if(s&&s.axisType==="angleAxis"&&Math.abs(Math.abs(s.range[1]-s.range[0])-360)<=1e-6)for(var c=s.range,d=0;d<l;d++){var u=d>0?i[d-1].coordinate:i[l-1].coordinate,h=i[d].coordinate,m=d>=l-1?i[0].coordinate:i[d+1].coordinate,g=void 0;if(Bn(h-u)!==Bn(m-h)){var b=[];if(Bn(m-h)===Bn(c[1]-c[0])){g=m;var v=h+c[1]-c[0];b[0]=Math.min(v,(v+u)/2),b[1]=Math.max(v,(v+u)/2)}else{g=u;var y=m+c[1]-c[0];b[0]=Math.min(h,(y+h)/2),b[1]=Math.max(h,(y+h)/2)}var x=[Math.min(h,(g+h)/2),Math.max(h,(g+h)/2)];if(t>x[0]&&t<=x[1]||t>=b[0]&&t<=b[1]){o=i[d].index;break}}else{var w=Math.min(u,m),_=Math.max(u,m);if(t>(w+h)/2&&t<=(_+h)/2){o=i[d].index;break}}}else for(var j=0;j<l;j++)if(j===0&&t<=(n[j].coordinate+n[j+1].coordinate)/2||j>0&&j<l-1&&t>(n[j].coordinate+n[j-1].coordinate)/2&&t<=(n[j].coordinate+n[j+1].coordinate)/2||j===l-1&&t>(n[j].coordinate+n[j-1].coordinate)/2){o=n[j].index;break}return o},yP=function(t){var r,n=t,i=n.type.displayName,s=(r=t.type)!==null&&r!==void 0&&r.defaultProps?_r(_r({},t.type.defaultProps),t.props):t.props,o=s.stroke,l=s.fill,c;switch(i){case"Line":c=o;break;case"Area":case"Radar":c=o&&o!=="none"?o:l;break;default:c=l;break}return c},K_e=function(t){var r=t.barSize,n=t.totalSize,i=t.stackGroups,s=i===void 0?{}:i;if(!s)return{};for(var o={},l=Object.keys(s),c=0,d=l.length;c<d;c++)for(var u=s[l[c]].stackGroups,h=Object.keys(u),m=0,g=h.length;m<g;m++){var b=u[h[m]],v=b.items,y=b.cateAxisId,x=v.filter(function(T){return Fs(T.type).indexOf("Bar")>=0});if(x&&x.length){var w=x[0].type.defaultProps,_=w!==void 0?_r(_r({},w),x[0].props):x[0].props,j=_.barSize,S=_[y];o[S]||(o[S]=[]);var k=xt(j)?r:j;o[S].push({item:x[0],stackList:x.slice(1),barSize:xt(k)?void 0:Un(k,n,0)})}}return o},Y_e=function(t){var r=t.barGap,n=t.barCategoryGap,i=t.bandSize,s=t.sizeList,o=s===void 0?[]:s,l=t.maxBarSize,c=o.length;if(c<1)return null;var d=Un(r,i,0,!0),u,h=[];if(o[0].barSize===+o[0].barSize){var m=!1,g=i/c,b=o.reduce(function(j,S){return j+S.barSize||0},0);b+=(c-1)*d,b>=i&&(b-=(c-1)*d,d=0),b>=i&&g>0&&(m=!0,g*=.9,b=c*g);var v=(i-b)/2>>0,y={offset:v-d,size:0};u=o.reduce(function(j,S){var k={item:S.item,position:{offset:y.offset+y.size+d,size:m?g:S.barSize}},T=[].concat(I6(j),[k]);return y=T[T.length-1].position,S.stackList&&S.stackList.length&&S.stackList.forEach(function(P){T.push({item:P,position:y})}),T},h)}else{var x=Un(n,i,0,!0);i-2*x-(c-1)*d<=0&&(d=0);var w=(i-2*x-(c-1)*d)/c;w>1&&(w>>=0);var _=l===+l?Math.min(w,l):w;u=o.reduce(function(j,S,k){var T=[].concat(I6(j),[{item:S.item,position:{offset:x+(w+d)*k+(w-_)/2,size:_}}]);return S.stackList&&S.stackList.length&&S.stackList.forEach(function(P){T.push({item:P,position:T[T.length-1].position})}),T},h)}return u},X_e=function(t,r,n,i){var s=n.children,o=n.width,l=n.margin,c=o-(l.left||0)-(l.right||0),d=qH({children:s,legendWidth:c});if(d){var u=i||{},h=u.width,m=u.height,g=d.align,b=d.verticalAlign,v=d.layout;if((v==="vertical"||v==="horizontal"&&b==="middle")&&g!=="center"&&Fe(t[g]))return _r(_r({},t),{},Fu({},g,t[g]+(h||0)));if((v==="horizontal"||v==="vertical"&&g==="center")&&b!=="middle"&&Fe(t[b]))return _r(_r({},t),{},Fu({},b,t[b]+(m||0)))}return t},Q_e=function(t,r,n){return xt(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},zH=function(t,r,n,i,s){var o=r.props.children,l=Aa(o,Op).filter(function(d){return Q_e(i,s,d.props.direction)});if(l&&l.length){var c=l.map(function(d){return d.props.dataKey});return t.reduce(function(d,u){var h=Cr(u,n);if(xt(h))return d;var m=Array.isArray(h)?[Ex(h),Fo(h)]:[h,h],g=c.reduce(function(b,v){var y=Cr(u,v,0),x=m[0]-Math.abs(Array.isArray(y)?y[0]:y),w=m[1]+Math.abs(Array.isArray(y)?y[1]:y);return[Math.min(x,b[0]),Math.max(w,b[1])]},[1/0,-1/0]);return[Math.min(g[0],d[0]),Math.max(g[1],d[1])]},[1/0,-1/0])}return null},Z_e=function(t,r,n,i,s){var o=r.map(function(l){return zH(t,l,n,s,i)}).filter(function(l){return!xt(l)});return o&&o.length?o.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]):null},VH=function(t,r,n,i,s){var o=r.map(function(c){var d=c.props.dataKey;return n==="number"&&d&&zH(t,c,d,i)||Bh(t,d,n,s)});if(n==="number")return o.reduce(function(c,d){return[Math.min(c[0],d[0]),Math.max(c[1],d[1])]},[1/0,-1/0]);var l={};return o.reduce(function(c,d){for(var u=0,h=d.length;u<h;u++)l[d[u]]||(l[d[u]]=!0,c.push(d[u]));return c},[])},HH=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},WH=function(t,r,n,i){if(i)return t.map(function(c){return c.coordinate});var s,o,l=t.map(function(c){return c.coordinate===r&&(s=!0),c.coordinate===n&&(o=!0),c.coordinate});return s||l.push(r),o||l.push(n),l},Ms=function(t,r,n){if(!t)return null;var i=t.scale,s=t.duplicateDomain,o=t.type,l=t.range,c=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,d=(r||n)&&o==="category"&&i.bandwidth?i.bandwidth()/c:0;if(d=t.axisType==="angleAxis"&&(l==null?void 0:l.length)>=2?Bn(l[0]-l[1])*2*d:d,r&&(t.ticks||t.niceTicks)){var u=(t.ticks||t.niceTicks).map(function(h){var m=s?s.indexOf(h):h;return{coordinate:i(m)+d,value:h,offset:d}});return u.filter(function(h){return!nf(h.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(h,m){return{coordinate:i(h)+d,value:h,index:m,offset:d}}):i.ticks&&!n?i.ticks(t.tickCount).map(function(h){return{coordinate:i(h)+d,value:h,offset:d}}):i.domain().map(function(h,m){return{coordinate:i(h)+d,value:s?s[h]:h,index:m,offset:d}})},rS=new WeakMap,by=function(t,r){if(typeof r!="function")return t;rS.has(t)||rS.set(t,new WeakMap);var n=rS.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},GH=function(t,r,n){var i=t.scale,s=t.type,o=t.layout,l=t.axisType;if(i==="auto")return o==="radial"&&l==="radiusAxis"?{scale:xm(),realScaleType:"band"}:o==="radial"&&l==="angleAxis"?{scale:B0(),realScaleType:"linear"}:s==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:Fh(),realScaleType:"point"}:s==="category"?{scale:xm(),realScaleType:"band"}:{scale:B0(),realScaleType:"linear"};if(Nc(i)){var c="scale".concat(mx(i));return{scale:(j6[c]||Fh)(),realScaleType:j6[c]?c:"point"}}return mt(i)?{scale:i}:{scale:Fh(),realScaleType:"point"}},$6=1e-4,KH=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,i=t.range(),s=Math.min(i[0],i[1])-$6,o=Math.max(i[0],i[1])+$6,l=t(r[0]),c=t(r[n-1]);(l<s||l>o||c<s||c>o)&&t.domain([r[0],r[n-1]])}},J_e=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},eSe=function(t,r){if(!r||r.length!==2||!Fe(r[0])||!Fe(r[1]))return t;var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]),s=[t[0],t[1]];return(!Fe(t[0])||t[0]<n)&&(s[0]=n),(!Fe(t[1])||t[1]>i)&&(s[1]=i),s[0]>i&&(s[0]=i),s[1]<n&&(s[1]=n),s},tSe=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n<i;++n)for(var s=0,o=0,l=0;l<r;++l){var c=nf(t[l][n][1])?t[l][n][0]:t[l][n][1];c>=0?(t[l][n][0]=s,t[l][n][1]=s+c,s=t[l][n][1]):(t[l][n][0]=o,t[l][n][1]=o+c,o=t[l][n][1])}},rSe=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n<i;++n)for(var s=0,o=0;o<r;++o){var l=nf(t[o][n][1])?t[o][n][0]:t[o][n][1];l>=0?(t[o][n][0]=s,t[o][n][1]=s+l,s=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},nSe={sign:tSe,expand:Hve,none:id,silhouette:Wve,wiggle:Gve,positive:rSe},aSe=function(t,r,n){var i=r.map(function(l){return l.props.dataKey}),s=nSe[n],o=Vve().keys(i).value(function(l,c){return+Cr(l,c,0)}).order(f2).offset(s);return o(t)},iSe=function(t,r,n,i,s,o){if(!t)return null;var l=o?r.reverse():r,c={},d=l.reduce(function(h,m){var g,b=(g=m.type)!==null&&g!==void 0&&g.defaultProps?_r(_r({},m.type.defaultProps),m.props):m.props,v=b.stackId,y=b.hide;if(y)return h;var x=b[n],w=h[x]||{hasStack:!1,stackGroups:{}};if(Yr(v)){var _=w.stackGroups[v]||{numericAxisId:n,cateAxisId:i,items:[]};_.items.push(m),w.hasStack=!0,w.stackGroups[v]=_}else w.stackGroups[Dc("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[m]};return _r(_r({},h),{},Fu({},x,w))},c),u={};return Object.keys(d).reduce(function(h,m){var g=d[m];if(g.hasStack){var b={};g.stackGroups=Object.keys(g.stackGroups).reduce(function(v,y){var x=g.stackGroups[y];return _r(_r({},v),{},Fu({},y,{numericAxisId:n,cateAxisId:i,items:x.items,stackedData:aSe(t,x.items,s)}))},b)}return _r(_r({},h),{},Fu({},m,g))},u)},YH=function(t,r){var n=r.realScaleType,i=r.type,s=r.tickCount,o=r.originalDomain,l=r.allowDecimals,c=n||r.scale;if(c!=="auto"&&c!=="linear")return null;if(s&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var d=t.domain();if(!d.length)return null;var u=x_e(d,s,l);return t.domain([Ex(u),Fo(u)]),{niceTicks:u}}if(s&&i==="number"){var h=t.domain(),m=b_e(h,s,l);return{niceTicks:m}}return null};function G0(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,s=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!xt(i[t.dataKey])){var l=j0(r,"value",i[t.dataKey]);if(l)return l.coordinate+n/2}return r[s]?r[s].coordinate+n/2:null}var c=Cr(i,xt(o)?t.dataKey:o);return xt(c)?null:t.scale(c)}var F6=function(t){var r=t.axis,n=t.ticks,i=t.offset,s=t.bandSize,o=t.entry,l=t.index;if(r.type==="category")return n[l]?n[l].coordinate+i:null;var c=Cr(o,r.dataKey,r.domain[l]);return xt(c)?null:r.scale(c)-s/2+i},sSe=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var i=Math.min(n[0],n[1]),s=Math.max(n[0],n[1]);return i<=0&&s>=0?0:s<0?s:i}return n[0]},oSe=function(t,r){var n,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?_r(_r({},t.type.defaultProps),t.props):t.props,s=i.stackId;if(Yr(s)){var o=r[s];if(o){var l=o.items.indexOf(t);return l>=0?o.stackedData[l]:null}}return null},lSe=function(t){return t.reduce(function(r,n){return[Ex(n.concat([r[0]]).filter(Fe)),Fo(n.concat([r[1]]).filter(Fe))]},[1/0,-1/0])},XH=function(t,r,n){return Object.keys(t).reduce(function(i,s){var o=t[s],l=o.stackedData,c=l.reduce(function(d,u){var h=lSe(u.slice(r,n+1));return[Math.min(d[0],h[0]),Math.max(d[1],h[1])]},[1/0,-1/0]);return[Math.min(c[0],i[0]),Math.max(c[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},B6=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,U6=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,L2=function(t,r,n){if(mt(t))return t(r,n);if(!Array.isArray(t))return r;var i=[];if(Fe(t[0]))i[0]=n?t[0]:Math.min(t[0],r[0]);else if(B6.test(t[0])){var s=+B6.exec(t[0])[1];i[0]=r[0]-s}else mt(t[0])?i[0]=t[0](r[0]):i[0]=r[0];if(Fe(t[1]))i[1]=n?t[1]:Math.max(t[1],r[1]);else if(U6.test(t[1])){var o=+U6.exec(t[1])[1];i[1]=r[1]+o}else mt(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},K0=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 s=HT(r,function(h){return h.coordinate}),o=1/0,l=1,c=s.length;l<c;l++){var d=s[l],u=s[l-1];o=Math.min((d.coordinate||0)-(u.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0},q6=function(t,r,n){return!t||!t.length||Ac(t,Sa(n,"type.defaultProps.domain"))?r:t},QH=function(t,r){var n=t.type.defaultProps?_r(_r({},t.type.defaultProps),t.props):t.props,i=n.dataKey,s=n.name,o=n.unit,l=n.formatter,c=n.tooltipType,d=n.chartType,u=n.hide;return _r(_r({},lt(t,!1)),{},{dataKey:i,unit:o,formatter:l,name:s||i,color:yP(t),value:Cr(r,i),type:c,payload:r,chartType:d,hide:u})};function Em(e){"@babel/helpers - typeof";return Em=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},Em(e)}function z6(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 Ns(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?z6(Object(r),!0).forEach(function(n){ZH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):z6(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ZH(e,t,r){return t=cSe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cSe(e){var t=uSe(e,"string");return Em(t)=="symbol"?t:t+""}function uSe(e,t){if(Em(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Em(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function dSe(e,t){return pSe(e)||mSe(e,t)||hSe(e,t)||fSe()}function fSe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 850In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hSe(e,t){if(e){if(typeof e=="string")return V6(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 V6(e,t)}}function V6(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 mSe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,s,o,l=[],c=!0,d=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(c=(n=s.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(u){d=!0,i=u}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw i}}return l}}function pSe(e){if(Array.isArray(e))return e}var Y0=Math.PI/180,gSe=function(t){return t*180/Math.PI},or=function(t,r,n,i){return{x:t+Math.cos(-Y0*i)*n,y:r+Math.sin(-Y0*i)*n}},JH=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},ySe=function(t,r,n,i,s){var o=t.width,l=t.height,c=t.startAngle,d=t.endAngle,u=Un(t.cx,o,o/2),h=Un(t.cy,l,l/2),m=JH(o,l,n),g=Un(t.innerRadius,m,0),b=Un(t.outerRadius,m,m*.8),v=Object.keys(r);return v.reduce(function(y,x){var w=r[x],_=w.domain,j=w.reversed,S;if(xt(w.range))i==="angleAxis"?S=[c,d]:i==="radiusAxis"&&(S=[g,b]),j&&(S=[S[1],S[0]]);else{S=w.range;var k=S,T=dSe(k,2);c=T[0],d=T[1]}var P=GH(w,s),M=P.realScaleType,C=P.scale;C.domain(_).range(S),KH(C);var O=YH(C,Ns(Ns({},w),{},{realScaleType:M})),D=Ns(Ns(Ns({},w),O),{},{range:S,radius:b,realScaleType:M,scale:C,cx:u,cy:h,innerRadius:g,outerRadius:b,startAngle:c,endAngle:d});return Ns(Ns({},y),{},ZH({},x,D))},{})},vSe=function(t,r){var n=t.x,i=t.y,s=r.x,o=r.y;return Math.sqrt(Math.pow(n-s,2)+Math.pow(i-o,2))},xSe=function(t,r){var n=t.x,i=t.y,s=r.cx,o=r.cy,l=vSe({x:n,y:i},{x:s,y:o});if(l<=0)return{radius:l};var c=(n-s)/l,d=Math.acos(c);return i>o&&(d=2*Math.PI-d),{radius:l,angle:gSe(d),angleInRadian:d}},bSe=function(t){var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),s=Math.floor(n/360),o=Math.min(i,s);return{startAngle:r-o*360,endAngle:n-o*360}},wSe=function(t,r){var n=r.startAngle,i=r.endAngle,s=Math.floor(n/360),o=Math.floor(i/360),l=Math.min(s,o);return t+l*360},H6=function(t,r){var n=t.x,i=t.y,s=xSe({x:n,y:i},r),o=s.radius,l=s.angle,c=r.innerRadius,d=r.outerRadius;if(o<c||o>d)return!1;if(o===0)return!0;var u=bSe(r),h=u.startAngle,m=u.endAngle,g=l,b;if(h<=m){for(;g>m;)g-=360;for(;g<h;)g+=360;b=g>=h&&g<=m}else{for(;g>h;)g-=360;for(;g<m;)g+=360;b=g>=m&&g<=h}return b?Ns(Ns({},r),{},{radius:o,angle:wSe(g,r)}):null},eW=function(t){return!A.isValidElement(t)&&!mt(t)&&typeof t!="boolean"?t.className:""};function Tm(e){"@babel/helpers - typeof";return Tm=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},Tm(e)}var jSe=["offset"];function NSe(e){return kSe(e)||ASe(e)||SSe(e)||_Se()}function _Se(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 851In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SSe(e,t){if(e){if(typeof e=="string")return $2(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 $2(e,t)}}function ASe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function kSe(e){if(Array.isArray(e))return $2(e)}function $2(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 ESe(e,t){if(e==null)return{};var r=TSe(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function TSe(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 W6(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 Wr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?W6(Object(r),!0).forEach(function(n){PSe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):W6(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function PSe(e,t,r){return t=CSe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function CSe(e){var t=OSe(e,"string");return Tm(t)=="symbol"?t:t+""}function OSe(e,t){if(Tm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Tm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Pm(){return Pm=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},Pm.apply(this,arguments)}var MSe=function(t){var r=t.value,n=t.formatter,i=xt(t.children)?r:t.children;return mt(n)?n(i):i},RSe=function(t,r){var n=Bn(r-t),i=Math.min(Math.abs(r-t),360);return n*i},DSe=function(t,r,n){var i=t.position,s=t.viewBox,o=t.offset,l=t.className,c=s,d=c.cx,u=c.cy,h=c.innerRadius,m=c.outerRadius,g=c.startAngle,b=c.endAngle,v=c.clockWise,y=(h+m)/2,x=RSe(g,b),w=x>=0?1:-1,_,j;i==="insideStart"?(_=g+w*o,j=v):i==="insideEnd"?(_=b-w*o,j=!v):i==="end"&&(_=b+w*o,j=v),j=x<=0?j:!j;var S=or(d,u,y,_),k=or(d,u,y,_+(j?1:-1)*359),T="M".concat(S.x,",").concat(S.y,` 852 A`).concat(y,",").concat(y,",0,1,").concat(j?0:1,`, 853 `).concat(k.x,",").concat(k.y),P=xt(t.id)?Dc("recharts-radial-line-"):t.id;return te.createElement("text",Pm({},n,{dominantBaseline:"central",className:bt("recharts-radial-bar-label",l)}),te.createElement("defs",null,te.createElement("path",{id:P,d:T})),te.createElement("textPath",{xlinkHref:"#".concat(P)},r))},ISe=function(t){var r=t.viewBox,n=t.offset,i=t.position,s=r,o=s.cx,l=s.cy,c=s.innerRadius,d=s.outerRadius,u=s.startAngle,h=s.endAngle,m=(u+h)/2;if(i==="outside"){var g=or(o,l,d+n,m),b=g.x,v=g.y;return{x:b,y:v,textAnchor:b>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"end"};var y=(c+d)/2,x=or(o,l,y,m),w=x.x,_=x.y;return{x:w,y:_,textAnchor:"middle",verticalAnchor:"middle"}},LSe=function(t){var r=t.viewBox,n=t.parentViewBox,i=t.offset,s=t.position,o=r,l=o.x,c=o.y,d=o.width,u=o.height,h=u>=0?1:-1,m=h*i,g=h>0?"end":"start",b=h>0?"start":"end",v=d>=0?1:-1,y=v*i,x=v>0?"end":"start",w=v>0?"start":"end";if(s==="top"){var _={x:l+d/2,y:c-h*i,textAnchor:"middle",verticalAnchor:g};return Wr(Wr({},_),n?{height:Math.max(c-n.y,0),width:d}:{})}if(s==="bottom"){var j={x:l+d/2,y:c+u+m,textAnchor:"middle",verticalAnchor:b};return Wr(Wr({},j),n?{height:Math.max(n.y+n.height-(c+u),0),width:d}:{})}if(s==="left"){var S={x:l-y,y:c+u/2,textAnchor:x,verticalAnchor:"middle"};return Wr(Wr({},S),n?{width:Math.max(S.x-n.x,0),height:u}:{})}if(s==="right"){var k={x:l+d+y,y:c+u/2,textAnchor:w,verticalAnchor:"middle"};return Wr(Wr({},k),n?{width:Math.max(n.x+n.width-k.x,0),height:u}:{})}var T=n?{width:d,height:u}:{};return s==="insideLeft"?Wr({x:l+y,y:c+u/2,textAnchor:w,verticalAnchor:"middle"},T):s==="insideRight"?Wr({x:l+d-y,y:c+u/2,textAnchor:x,verticalAnchor:"middle"},T):s==="insideTop"?Wr({x:l+d/2,y:c+m,textAnchor:"middle",verticalAnchor:b},T):s==="insideBottom"?Wr({x:l+d/2,y:c+u-m,textAnchor:"middle",verticalAnchor:g},T):s==="insideTopLeft"?Wr({x:l+y,y:c+m,textAnchor:w,verticalAnchor:b},T):s==="insideTopRight"?Wr({x:l+d-y,y:c+m,textAnchor:x,verticalAnchor:b},T):s==="insideBottomLeft"?Wr({x:l+y,y:c+u-m,textAnchor:w,verticalAnchor:g},T):s==="insideBottomRight"?Wr({x:l+d-y,y:c+u-m,textAnchor:x,verticalAnchor:g},T):rf(s)&&(Fe(s.x)||Vl(s.x))&&(Fe(s.y)||Vl(s.y))?Wr({x:l+Un(s.x,d),y:c+Un(s.y,u),textAnchor:"end",verticalAnchor:"end"},T):Wr({x:l+d/2,y:c+u/2,textAnchor:"middle",verticalAnchor:"middle"},T)},$Se=function(t){return"cx"in t&&Fe(t.cx)};function an(e){var t=e.offset,r=t===void 0?5:t,n=ESe(e,jSe),i=Wr({offset:r},n),s=i.viewBox,o=i.position,l=i.value,c=i.children,d=i.content,u=i.className,h=u===void 0?"":u,m=i.textBreakAll;if(!s||xt(l)&&xt(c)&&!A.isValidElement(d)&&!mt(d))return null;if(A.isValidElement(d))return A.cloneElement(d,i);var g;if(mt(d)){if(g=A.createElement(d,i),A.isValidElement(g))return g}else g=MSe(i);var b=$Se(s),v=lt(i,!0);if(b&&(o==="insideStart"||o==="insideEnd"||o==="end"))return DSe(i,g,v);var y=b?ISe(i):LSe(i);return te.createElement(Sc,Pm({className:bt("recharts-label",h)},v,y,{breakAll:m}),g)}an.displayName="Label";var tW=function(t){var r=t.cx,n=t.cy,i=t.angle,s=t.startAngle,o=t.endAngle,l=t.r,c=t.radius,d=t.innerRadius,u=t.outerRadius,h=t.x,m=t.y,g=t.top,b=t.left,v=t.width,y=t.height,x=t.clockWise,w=t.labelViewBox;if(w)return w;if(Fe(v)&&Fe(y)){if(Fe(h)&&Fe(m))return{x:h,y:m,width:v,height:y};if(Fe(g)&&Fe(b))return{x:g,y:b,width:v,height:y}}return Fe(h)&&Fe(m)?{x:h,y:m,width:0,height:0}:Fe(r)&&Fe(n)?{cx:r,cy:n,startAngle:s||i||0,endAngle:o||i||0,innerRadius:d||0,outerRadius:u||c||l||0,clockWise:x}:t.viewBox?t.viewBox:{}},FSe=function(t,r){return t?t===!0?te.createElement(an,{key:"label-implicit",viewBox:r}):Yr(t)?te.createElement(an,{key:"label-implicit",viewBox:r,value:t}):A.isValidElement(t)?t.type===an?A.cloneElement(t,{key:"label-implicit",viewBox:r}):te.createElement(an,{key:"label-implicit",content:t,viewBox:r}):mt(t)?te.createElement(an,{key:"label-implicit",content:t,viewBox:r}):rf(t)?te.createElement(an,Pm({viewBox:r},t,{key:"label-implicit"})):null:null},BSe=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,s=tW(t),o=Aa(i,an).map(function(c,d){return A.cloneElement(c,{viewBox:r||s,key:"label-".concat(d)})});if(!n)return o;var l=FSe(t.label,r||s);return[l].concat(NSe(o))};an.parseViewBox=tW;an.renderCallByParent=BSe;var nS,G6;function USe(){if(G6)return nS;G6=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return nS=e,nS}var qSe=USe();const zSe=Ht(qSe);function Cm(e){"@babel/helpers - typeof";return Cm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cm(e)}var VSe=["valueAccessor"],HSe=["data","dataKey","clockWise","id","textBreakAll"];function WSe(e){return XSe(e)||YSe(e)||KSe(e)||GSe()}function GSe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 854In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KSe(e,t){if(e){if(typeof e=="string")return F2(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 F2(e,t)}}function YSe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function XSe(e){if(Array.isArray(e))return F2(e)}function F2(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 X0(){return X0=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},X0.apply(this,arguments)}function K6(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 Y6(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?K6(Object(r),!0).forEach(function(n){QSe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):K6(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function QSe(e,t,r){return t=ZSe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZSe(e){var t=JSe(e,"string");return Cm(t)=="symbol"?t:t+""}function JSe(e,t){if(Cm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Cm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function X6(e,t){if(e==null)return{};var r=eAe(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function eAe(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 tAe=function(t){return Array.isArray(t.value)?zSe(t.value):t.value};function Xi(e){var t=e.valueAccessor,r=t===void 0?tAe:t,n=X6(e,VSe),i=n.data,s=n.dataKey,o=n.clockWise,l=n.id,c=n.textBreakAll,d=X6(n,HSe);return!i||!i.length?null:te.createElement(Ct,{className:"recharts-label-list"},i.map(function(u,h){var m=xt(s)?r(u,h):Cr(u&&u.payload,s),g=xt(l)?{}:{id:"".concat(l,"-").concat(h)};return te.createElement(an,X0({},lt(u,!0),d,g,{parentViewBox:u.parentViewBox,value:m,textBreakAll:c,viewBox:an.parseViewBox(xt(o)?u:Y6(Y6({},u),{},{clockWise:o})),key:"label-".concat(h),index:h}))}))}Xi.displayName="LabelList";function rAe(e,t){return e?e===!0?te.createElement(Xi,{key:"labelList-implicit",data:t}):te.isValidElement(e)||mt(e)?te.createElement(Xi,{key:"labelList-implicit",data:t,content:e}):rf(e)?te.createElement(Xi,X0({data:t},e,{key:"labelList-implicit"})):null:null}function nAe(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=Aa(n,Xi).map(function(o,l){return A.cloneElement(o,{data:t,key:"labelList-".concat(l)})});if(!r)return i;var s=rAe(e.label,t);return[s].concat(WSe(i))}Xi.renderCallByParent=nAe;function Om(e){"@babel/helpers - typeof";return Om=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},Om(e)}function B2(){return B2=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},B2.apply(this,arguments)}function Q6(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 Z6(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Q6(Object(r),!0).forEach(function(n){aAe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Q6(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function aAe(e,t,r){return t=iAe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iAe(e){var t=sAe(e,"string");return Om(t)=="symbol"?t:t+""}function sAe(e,t){if(Om(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Om(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var oAe=function(t,r){var n=Bn(r-t),i=Math.min(Math.abs(r-t),359.999);return n*i},wy=function(t){var r=t.cx,n=t.cy,i=t.radius,s=t.angle,o=t.sign,l=t.isExternal,c=t.cornerRadius,d=t.cornerIsExternal,u=c*(l?1:-1)+i,h=Math.asin(c/u)/Y0,m=d?s:s+o*h,g=or(r,n,u,m),b=or(r,n,i,m),v=d?s-o*h:s,y=or(r,n,u*Math.cos(h*Y0),v);return{center:g,circleTangency:b,lineTangency:y,theta:h}},rW=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,s=t.outerRadius,o=t.startAngle,l=t.endAngle,c=oAe(o,l),d=o+c,u=or(r,n,s,o),h=or(r,n,s,d),m="M ".concat(u.x,",").concat(u.y,` 855 A `).concat(s,",").concat(s,`,0, 856 `).concat(+(Math.abs(c)>180),",").concat(+(o>d),`, 857 `).concat(h.x,",").concat(h.y,` 858 `);if(i>0){var g=or(r,n,i,o),b=or(r,n,i,d);m+="L ".concat(b.x,",").concat(b.y,` 859 A `).concat(i,",").concat(i,`,0, 860 `).concat(+(Math.abs(c)>180),",").concat(+(o<=d),`, 861 `).concat(g.x,",").concat(g.y," Z")}else m+="L ".concat(r,",").concat(n," Z");return m},lAe=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,s=t.outerRadius,o=t.cornerRadius,l=t.forceCornerRadius,c=t.cornerIsExternal,d=t.startAngle,u=t.endAngle,h=Bn(u-d),m=wy({cx:r,cy:n,radius:s,angle:d,sign:h,cornerRadius:o,cornerIsExternal:c}),g=m.circleTangency,b=m.lineTangency,v=m.theta,y=wy({cx:r,cy:n,radius:s,angle:u,sign:-h,cornerRadius:o,cornerIsExternal:c}),x=y.circleTangency,w=y.lineTangency,_=y.theta,j=c?Math.abs(d-u):Math.abs(d-u)-v-_;if(j<0)return l?"M ".concat(b.x,",").concat(b.y,` 862 a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0 863 a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0 864 `):rW({cx:r,cy:n,innerRadius:i,outerRadius:s,startAngle:d,endAngle:u});var S="M ".concat(b.x,",").concat(b.y,` 865 A`).concat(o,",").concat(o,",0,0,").concat(+(h<0),",").concat(g.x,",").concat(g.y,` 866 A`).concat(s,",").concat(s,",0,").concat(+(j>180),",").concat(+(h<0),",").concat(x.x,",").concat(x.y,` 867 A`).concat(o,",").concat(o,",0,0,").concat(+(h<0),",").concat(w.x,",").concat(w.y,` 868 `);if(i>0){var k=wy({cx:r,cy:n,radius:i,angle:d,sign:h,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),T=k.circleTangency,P=k.lineTangency,M=k.theta,C=wy({cx:r,cy:n,radius:i,angle:u,sign:-h,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),O=C.circleTangency,D=C.lineTangency,L=C.theta,F=c?Math.abs(d-u):Math.abs(d-u)-M-L;if(F<0&&o===0)return"".concat(S,"L").concat(r,",").concat(n,"Z");S+="L".concat(D.x,",").concat(D.y,` 869 A`).concat(o,",").concat(o,",0,0,").concat(+(h<0),",").concat(O.x,",").concat(O.y,` 870 A`).concat(i,",").concat(i,",0,").concat(+(F>180),",").concat(+(h>0),",").concat(T.x,",").concat(T.y,` 871 A`).concat(o,",").concat(o,",0,0,").concat(+(h<0),",").concat(P.x,",").concat(P.y,"Z")}else S+="L".concat(r,",").concat(n,"Z");return S},cAe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},nW=function(t){var r=Z6(Z6({},cAe),t),n=r.cx,i=r.cy,s=r.innerRadius,o=r.outerRadius,l=r.cornerRadius,c=r.forceCornerRadius,d=r.cornerIsExternal,u=r.startAngle,h=r.endAngle,m=r.className;if(o<s||u===h)return null;var g=bt("recharts-sector",m),b=o-s,v=Un(l,b,0,!0),y;return v>0&&Math.abs(u-h)<360?y=lAe({cx:n,cy:i,innerRadius:s,outerRadius:o,cornerRadius:Math.min(v,b/2),forceCornerRadius:c,cornerIsExternal:d,startAngle:u,endAngle:h}):y=rW({cx:n,cy:i,innerRadius:s,outerRadius:o,startAngle:u,endAngle:h}),te.createElement("path",B2({},lt(r,!0),{className:g,d:y,role:"img"}))};function Mm(e){"@babel/helpers - typeof";return Mm=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},Mm(e)}function U2(){return U2=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},U2.apply(this,arguments)}function J6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function e$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?J6(Object(r),!0).forEach(function(n){uAe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):J6(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uAe(e,t,r){return t=dAe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dAe(e){var t=fAe(e,"string");return Mm(t)=="symbol"?t:t+""}function fAe(e,t){if(Mm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Mm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var t$={curveBasisClosed:Mve,curveBasisOpen:Rve,curveBasis:Ove,curveBumpX:vve,curveBumpY:xve,curveLinearClosed:Dve,curveLinear:gx,curveMonotoneX:Ive,curveMonotoneY:Lve,curveNatural:$ve,curveStep:Fve,curveStepAfter:Uve,curveStepBefore:Bve},jy=function(t){return t.x===+t.x&&t.y===+t.y},dh=function(t){return t.x},fh=function(t){return t.y},hAe=function(t,r){if(mt(t))return t;var n="curve".concat(mx(t));return(n==="curveMonotone"||n==="curveBump")&&r?t$["".concat(n).concat(r==="vertical"?"Y":"X")]:t$[n]||gx},mAe=function(t){var r=t.type,n=r===void 0?"linear":r,i=t.points,s=i===void 0?[]:i,o=t.baseLine,l=t.layout,c=t.connectNulls,d=c===void 0?!1:c,u=hAe(n,l),h=d?s.filter(function(v){return jy(v)}):s,m;if(Array.isArray(o)){var g=d?o.filter(function(v){return jy(v)}):o,b=h.map(function(v,y){return e$(e$({},v),{},{base:g[y]})});return l==="vertical"?m=hy().y(fh).x1(dh).x0(function(v){return v.base.x}):m=hy().x(dh).y1(fh).y0(function(v){return v.base.y}),m.defined(jy).curve(u),m(b)}return l==="vertical"&&Fe(o)?m=hy().y(fh).x1(dh).x0(o):Fe(o)?m=hy().x(dh).y1(fh).y0(o):m=eV().x(dh).y(fh),m.defined(jy).curve(u),m(h)},uc=function(t){var r=t.className,n=t.points,i=t.path,s=t.pathRef;if((!n||!n.length)&&!i)return null;var o=n&&n.length?mAe(t):i;return A.createElement("path",U2({},lt(t,!1),N0(t),{className:bt("recharts-curve",r),d:o,ref:s}))},aS={exports:{}},iS,r$;function pAe(){if(r$)return iS;r$=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return iS=e,iS}var sS,n$;function gAe(){if(n$)return sS;n$=1;var e=pAe();function t(){}function r(){}return r.resetWarningCache=t,sS=function(){function n(o,l,c,d,u,h){if(h!==e){var m=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 m.name="Invariant Violation",m}}n.isRequired=n;function i(){return n}var s={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:t};return s.PropTypes=s,s},sS}var a$;function yAe(){return a$||(a$=1,aS.exports=gAe()()),aS.exports}var vAe=yAe();const Kt=Ht(vAe);var xAe=Object.getOwnPropertyNames,bAe=Object.getOwnPropertySymbols,wAe=Object.prototype.hasOwnProperty;function i$(e,t){return function(n,i,s){return e(n,i,s)&&t(n,i,s)}}function Ny(e){return function(r,n,i){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,i);var s=i.cache,o=s.get(r),l=s.get(n);if(o&&l)return o===n&&l===r;s.set(r,n),s.set(n,r);var c=e(r,n,i);return s.delete(r),s.delete(n),c}}function s$(e){return xAe(e).concat(bAe(e))}var jAe=Object.hasOwn||(function(e,t){return wAe.call(e,t)});function $c(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var NAe="__v",_Ae="__o",SAe="_owner",o$=Object.getOwnPropertyDescriptor,l$=Object.keys;function AAe(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 kAe(e,t){return $c(e.getTime(),t.getTime())}function EAe(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function TAe(e,t){return e===t}function c$(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var i=new Array(n),s=e.entries(),o,l,c=0;(o=s.next())&&!o.done;){for(var d=t.entries(),u=!1,h=0;(l=d.next())&&!l.done;){if(i[h]){h++;continue}var m=o.value,g=l.value;if(r.equals(m[0],g[0],c,h,e,t,r)&&r.equals(m[1],g[1],m[0],g[0],e,t,r)){u=i[h]=!0;break}h++}if(!u)return!1;c++}return!0}var PAe=$c;function CAe(e,t,r){var n=l$(e),i=n.length;if(l$(t).length!==i)return!1;for(;i-- >0;)if(!aW(e,t,r,n[i]))return!1;return!0}function hh(e,t,r){var n=s$(e),i=n.length;if(s$(t).length!==i)return!1;for(var s,o,l;i-- >0;)if(s=n[i],!aW(e,t,r,s)||(o=o$(e,s),l=o$(t,s),(o||l)&&(!o||!l||o.configurable!==l.configurable||o.enumerable!==l.enumerable||o.writable!==l.writable)))return!1;return!0}function OAe(e,t){return $c(e.valueOf(),t.valueOf())}function MAe(e,t){return e.source===t.source&&e.flags===t.flags}function u$(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var i=new Array(n),s=e.values(),o,l;(o=s.next())&&!o.done;){for(var c=t.values(),d=!1,u=0;(l=c.next())&&!l.done;){if(!i[u]&&r.equals(o.value,l.value,o.value,l.value,e,t,r)){d=i[u]=!0;break}u++}if(!d)return!1}return!0}function RAe(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 DAe(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 aW(e,t,r,n){return(n===SAe||n===_Ae||n===NAe)&&(e.$$typeof||t.$$typeof)?!0:jAe(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var IAe="[object Arguments]",LAe="[object Boolean]",$Ae="[object Date]",FAe="[object Error]",BAe="[object Map]",UAe="[object Number]",qAe="[object Object]",zAe="[object RegExp]",VAe="[object Set]",HAe="[object String]",WAe="[object URL]",GAe=Array.isArray,d$=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,f$=Object.assign,KAe=Object.prototype.toString.call.bind(Object.prototype.toString);function YAe(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areErrorsEqual,i=e.areFunctionsEqual,s=e.areMapsEqual,o=e.areNumbersEqual,l=e.areObjectsEqual,c=e.arePrimitiveWrappersEqual,d=e.areRegExpsEqual,u=e.areSetsEqual,h=e.areTypedArraysEqual,m=e.areUrlsEqual;return function(b,v,y){if(b===v)return!0;
871if(b==null||v==null)return!1;var x=typeof b;if(x!==typeof v)return!1;if(x!=="object")return x==="number"?o(b,v,y):x==="function"?i(b,v,y):!1;var w=b.constructor;if(w!==v.constructor)return!1;if(w===Object)return l(b,v,y);if(GAe(b))return t(b,v,y);if(d$!=null&&d$(b))return h(b,v,y);if(w===Date)return r(b,v,y);if(w===RegExp)return d(b,v,y);if(w===Map)return s(b,v,y);if(w===Set)return u(b,v,y);var _=KAe(b);return _===$Ae?r(b,v,y):_===zAe?d(b,v,y):_===BAe?s(b,v,y):_===VAe?u(b,v,y):_===qAe?typeof b.then!="function"&&typeof v.then!="function"&&l(b,v,y):_===WAe?m(b,v,y):_===FAe?n(b,v,y):_===IAe?l(b,v,y):_===LAe||_===UAe||_===HAe?c(b,v,y):!1}}function XAe(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,i={areArraysEqual:n?hh:AAe,areDatesEqual:kAe,areErrorsEqual:EAe,areFunctionsEqual:TAe,areMapsEqual:n?i$(c$,hh):c$,areNumbersEqual:PAe,areObjectsEqual:n?hh:CAe,arePrimitiveWrappersEqual:OAe,areRegExpsEqual:MAe,areSetsEqual:n?i$(u$,hh):u$,areTypedArraysEqual:n?hh:RAe,areUrlsEqual:DAe};if(r&&(i=f$({},i,r(i))),t){var s=Ny(i.areArraysEqual),o=Ny(i.areMapsEqual),l=Ny(i.areObjectsEqual),c=Ny(i.areSetsEqual);i=f$({},i,{areArraysEqual:s,areMapsEqual:o,areObjectsEqual:l,areSetsEqual:c})}return i}function QAe(e){return function(t,r,n,i,s,o,l){return e(t,r,l)}}function ZAe(e){var t=e.circular,r=e.comparator,n=e.createState,i=e.equals,s=e.strict;if(n)return function(c,d){var u=n(),h=u.cache,m=h===void 0?t?new WeakMap:void 0:h,g=u.meta;return r(c,d,{cache:m,equals:i,meta:g,strict:s})};if(t)return function(c,d){return r(c,d,{cache:new WeakMap,equals:i,meta:void 0,strict:s})};var o={cache:void 0,equals:i,meta:void 0,strict:s};return function(c,d){return r(c,d,o)}}var JAe=fl();fl({strict:!0});fl({circular:!0});fl({circular:!0,strict:!0});fl({createInternalComparator:function(){return $c}});fl({strict:!0,createInternalComparator:function(){return $c}});fl({circular:!0,createInternalComparator:function(){return $c}});fl({circular:!0,createInternalComparator:function(){return $c},strict:!0});function fl(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,i=e.createState,s=e.strict,o=s===void 0?!1:s,l=XAe(e),c=YAe(l),d=n?n(c):QAe(c);return ZAe({circular:r,comparator:c,createState:i,equals:d,strict:o})}function e2e(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function h$(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function i(s){r<0&&(r=s),s-r>t?(e(s),r=-1):e2e(i)};requestAnimationFrame(n)}function q2(e){"@babel/helpers - typeof";return q2=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},q2(e)}function t2e(e){return i2e(e)||a2e(e)||n2e(e)||r2e()}function r2e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 872In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n2e(e,t){if(e){if(typeof e=="string")return m$(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 m$(e,t)}}function m$(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 a2e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function i2e(e){if(Array.isArray(e))return e}function s2e(){var e={},t=function(){return null},r=!1,n=function i(s){if(!r){if(Array.isArray(s)){if(!s.length)return;var o=s,l=t2e(o),c=l[0],d=l.slice(1);if(typeof c=="number"){h$(i.bind(null,d),c);return}i(c),h$(i.bind(null,d));return}q2(s)==="object"&&(e=s,t(e)),typeof s=="function"&&s()}};return{stop:function(){r=!0},start:function(s){r=!1,n(s)},subscribe:function(s){return t=s,function(){t=function(){return null}}}}}function Rm(e){"@babel/helpers - typeof";return Rm=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},Rm(e)}function p$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function g$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
vendor: 58,886 bytes, lines 872-890
872t%2?p$(Object(r),!0).forEach(function(n){iW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function iW(e,t,r){return t=o2e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o2e(e){var t=l2e(e,"string");return Rm(t)==="symbol"?t:String(t)}function l2e(e,t){if(Rm(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Rm(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var c2e=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,i){return n.filter(function(s){return i.includes(s)})})},u2e=function(t){return t},d2e=function(t){return t.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},Uh=function(t,r){return Object.keys(r).reduce(function(n,i){return g$(g$({},n),{},iW({},i,t(i,r[i])))},{})},y$=function(t,r,n){return t.map(function(i){return"".concat(d2e(i)," ").concat(r,"ms ").concat(n)}).join(",")};function f2e(e,t){return p2e(e)||m2e(e,t)||sW(e,t)||h2e()}function h2e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 873In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m2e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,s,o,l=[],c=!0,d=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(c=(n=s.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(u){d=!0,i=u}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw i}}return l}}function p2e(e){if(Array.isArray(e))return e}function g2e(e){return x2e(e)||v2e(e)||sW(e)||y2e()}function y2e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 874In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sW(e,t){if(e){if(typeof e=="string")return z2(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 z2(e,t)}}function v2e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function x2e(e){if(Array.isArray(e))return z2(e)}function z2(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 Q0=1e-4,oW=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},lW=function(t,r){return t.map(function(n,i){return n*Math.pow(r,i)}).reduce(function(n,i){return n+i})},v$=function(t,r){return function(n){var i=oW(t,r);return lW(i,n)}},b2e=function(t,r){return function(n){var i=oW(t,r),s=[].concat(g2e(i.map(function(o,l){return o*l}).slice(1)),[0]);return lW(s,n)}},x$=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r[0],s=r[1],o=r[2],l=r[3];if(r.length===1)switch(r[0]){case"linear":i=0,s=0,o=1,l=1;break;case"ease":i=.25,s=.1,o=.25,l=1;break;case"ease-in":i=.42,s=0,o=1,l=1;break;case"ease-out":i=.42,s=0,o=.58,l=1;break;case"ease-in-out":i=0,s=0,o=.58,l=1;break;default:{var c=r[0].split("(");if(c[0]==="cubic-bezier"&&c[1].split(")")[0].split(",").length===4){var d=c[1].split(")")[0].split(",").map(function(y){return parseFloat(y)}),u=f2e(d,4);i=u[0],s=u[1],o=u[2],l=u[3]}}}var h=v$(i,o),m=v$(s,l),g=b2e(i,o),b=function(x){return x>1?1:x<0?0:x},v=function(x){for(var w=x>1?1:x,_=w,j=0;j<8;++j){var S=h(_)-w,k=g(_);if(Math.abs(S-w)<Q0||k<Q0)return m(_);_=b(_-S/k)}return m(_)};return v.isStepper=!1,v},w2e=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,s=i===void 0?8:i,o=t.dt,l=o===void 0?17:o,c=function(u,h,m){var g=-(u-h)*n,b=m*s,v=m+(g-b)*l/1e3,y=m*l/1e3+u;return Math.abs(y-h)<Q0&&Math.abs(v)<Q0?[h,0]:[y,v]};return c.isStepper=!0,c.dt=l,c},j2e=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 x$(i);case"spring":return w2e();default:if(i.split("(")[0]==="cubic-bezier")return x$(i)}return typeof i=="function"?i:null};function Dm(e){"@babel/helpers - typeof";return Dm=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},Dm(e)}function b$(e){return S2e(e)||_2e(e)||cW(e)||N2e()}function N2e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 875In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _2e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function S2e(e){if(Array.isArray(e))return H2(e)}function w$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function pn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?w$(Object(r),!0).forEach(function(n){V2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function V2(e,t,r){return t=A2e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function A2e(e){var t=k2e(e,"string");return Dm(t)==="symbol"?t:String(t)}function k2e(e,t){if(Dm(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Dm(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function E2e(e,t){return C2e(e)||P2e(e,t)||cW(e,t)||T2e()}function T2e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 876In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cW(e,t){if(e){if(typeof e=="string")return H2(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 H2(e,t)}}function H2(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 P2e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,s,o,l=[],c=!0,d=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(c=(n=s.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(u){d=!0,i=u}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw i}}return l}}function C2e(e){if(Array.isArray(e))return e}var Z0=function(t,r,n){return t+(r-t)*n},W2=function(t){var r=t.from,n=t.to;return r!==n},O2e=function e(t,r,n){var i=Uh(function(s,o){if(W2(o)){var l=t(o.from,o.to,o.velocity),c=E2e(l,2),d=c[0],u=c[1];return pn(pn({},o),{},{from:d,velocity:u})}return o},r);return n<1?Uh(function(s,o){return W2(o)?pn(pn({},o),{},{velocity:Z0(o.velocity,i[s].velocity,n),from:Z0(o.from,i[s].from,n)}):o},r):e(t,i,n-1)};const M2e=(function(e,t,r,n,i){var s=c2e(e,t),o=s.reduce(function(y,x){return pn(pn({},y),{},V2({},x,[e[x],t[x]]))},{}),l=s.reduce(function(y,x){return pn(pn({},y),{},V2({},x,{from:e[x],velocity:0,to:t[x]}))},{}),c=-1,d,u,h=function(){return null},m=function(){return Uh(function(x,w){return w.from},l)},g=function(){return!Object.values(l).filter(W2).length},b=function(x){d||(d=x);var w=x-d,_=w/r.dt;l=O2e(r,l,_),i(pn(pn(pn({},e),t),m())),d=x,g()||(c=requestAnimationFrame(h))},v=function(x){u||(u=x);var w=(x-u)/n,_=Uh(function(S,k){return Z0.apply(void 0,b$(k).concat([r(w)]))},o);if(i(pn(pn(pn({},e),t),_)),w<1)c=requestAnimationFrame(h);else{var j=Uh(function(S,k){return Z0.apply(void 0,b$(k).concat([r(1)]))},o);i(pn(pn(pn({},e),t),j))}};return h=r.isStepper?b:v,function(){return requestAnimationFrame(h),function(){cancelAnimationFrame(c)}}});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)}var R2e=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function D2e(e,t){if(e==null)return{};var r=I2e(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function I2e(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,s;for(s=0;s<n.length;s++)i=n[s],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function oS(e){return B2e(e)||F2e(e)||$2e(e)||L2e()}function L2e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 877In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $2e(e,t){if(e){if(typeof e=="string")return G2(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 G2(e,t)}}function F2e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function B2e(e){if(Array.isArray(e))return G2(e)}function G2(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 j$(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 fi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?j$(Object(r),!0).forEach(function(n){Eh(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Eh(e,t,r){return t=uW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function U2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function q2e(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,uW(n.key),n)}}function z2e(e,t,r){return t&&q2e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function uW(e){var t=V2e(e,"string");return md(t)==="symbol"?t:String(t)}function V2e(e,t){if(md(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(md(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function H2e(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&&K2(e,t)}function K2(e,t){return K2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},K2(e,t)}function W2e(e){var t=G2e();return function(){var n=J0(e),i;if(t){var s=J0(this).constructor;i=Reflect.construct(n,arguments,s)}else i=n.apply(this,arguments);return Y2(this,i)}}function Y2(e,t){if(t&&(md(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return X2(e)}function X2(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function G2e(){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 J0(e){return J0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},J0(e)}var ki=(function(e){H2e(r,e);var t=W2e(r);function r(n,i){var s;U2e(this,r),s=t.call(this,n,i);var o=s.props,l=o.isActive,c=o.attributeName,d=o.from,u=o.to,h=o.steps,m=o.children,g=o.duration;if(s.handleStyleChange=s.handleStyleChange.bind(X2(s)),s.changeStyle=s.changeStyle.bind(X2(s)),!l||g<=0)return s.state={style:{}},typeof m=="function"&&(s.state={style:u}),Y2(s);if(h&&h.length)s.state={style:h[0].style};else if(d){if(typeof m=="function")return s.state={style:d},Y2(s);s.state={style:c?Eh({},c,d):d}}else s.state={style:{}};return s}return z2e(r,[{key:"componentDidMount",value:function(){var i=this.props,s=i.isActive,o=i.canBegin;this.mounted=!0,!(!s||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var s=this.props,o=s.isActive,l=s.canBegin,c=s.attributeName,d=s.shouldReAnimate,u=s.to,h=s.from,m=this.state.style;if(l){if(!o){var g={style:c?Eh({},c,u):u};this.state&&m&&(c&&m[c]!==u||!c&&m!==u)&&this.setState(g);return}if(!(JAe(i.to,u)&&i.canBegin&&i.isActive)){var b=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var v=b||d?h:i.to;if(this.state&&m){var y={style:c?Eh({},c,v):v};(c&&m[c]!==v||!c&&m!==v)&&this.setState(y)}this.runAnimation(fi(fi({},this.props),{},{from:v,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var s=this,o=i.from,l=i.to,c=i.duration,d=i.easing,u=i.begin,h=i.onAnimationEnd,m=i.onAnimationStart,g=M2e(o,l,j2e(d),c,this.changeStyle),b=function(){s.stopJSAnimation=g()};this.manager.start([m,u,b,c,h])}},{key:"runStepAnimation",value:function(i){var s=this,o=i.steps,l=i.begin,c=i.onAnimationStart,d=o[0],u=d.style,h=d.duration,m=h===void 0?0:h,g=function(v,y,x){if(x===0)return v;var w=y.duration,_=y.easing,j=_===void 0?"ease":_,S=y.style,k=y.properties,T=y.onAnimationEnd,P=x>0?o[x-1]:y,M=k||Object.keys(S);if(typeof j=="function"||j==="spring")return[].concat(oS(v),[s.runJSAnimation.bind(s,{from:P.style,to:S,duration:w,easing:j}),w]);var C=y$(M,w,j),O=fi(fi(fi({},P.style),S),{},{transition:C});return[].concat(oS(v),[O,w,T]).filter(u2e)};return this.manager.start([c].concat(oS(o.reduce(g,[u,Math.max(m,l)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=s2e());var s=i.begin,o=i.duration,l=i.attributeName,c=i.to,d=i.easing,u=i.onAnimationStart,h=i.onAnimationEnd,m=i.steps,g=i.children,b=this.manager;if(this.unSubscribe=b.subscribe(this.handleStyleChange),typeof d=="function"||typeof g=="function"||d==="spring"){this.runJSAnimation(i);return}if(m.length>1){this.runStepAnimation(i);return}var v=l?Eh({},l,c):c,y=y$(Object.keys(v),o,d);b.start([u,s,fi(fi({},v),{},{transition:y}),o,h])}},{key:"render",value:function(){var i=this.props,s=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var l=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var c=D2e(i,R2e),d=A.Children.count(s),u=this.state.style;if(typeof s=="function")return s(u);if(!l||d===0||o<=0)return s;var h=function(g){var b=g.props,v=b.style,y=v===void 0?{}:v,x=b.className,w=A.cloneElement(g,fi(fi({},c),{},{style:fi(fi({},y),u),className:x}));return w};return d===1?h(A.Children.only(s)):te.createElement("div",null,A.Children.map(s,function(m){return h(m)}))}}]),r})(A.PureComponent);ki.displayName="Animate";ki.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};ki.propTypes={from:Kt.oneOfType([Kt.object,Kt.string]),to:Kt.oneOfType([Kt.object,Kt.string]),attributeName:Kt.string,duration:Kt.number,begin:Kt.number,easing:Kt.oneOfType([Kt.string,Kt.func]),steps:Kt.arrayOf(Kt.shape({duration:Kt.number.isRequired,style:Kt.object.isRequired,easing:Kt.oneOfType([Kt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Kt.func]),properties:Kt.arrayOf("string"),onAnimationEnd:Kt.func})),children:Kt.oneOfType([Kt.node,Kt.func]),isActive:Kt.bool,canBegin:Kt.bool,onAnimationEnd:Kt.func,shouldReAnimate:Kt.bool,onAnimationStart:Kt.func,onAnimationReStart:Kt.func};function Im(e){"@babel/helpers - typeof";return Im=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},Im(e)}function ev(){return ev=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},ev.apply(this,arguments)}function K2e(e,t){return Z2e(e)||Q2e(e,t)||X2e(e,t)||Y2e()}function Y2e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 878In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function X2e(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 Q2e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,s,o,l=[],c=!0,d=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(c=(n=s.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(u){d=!0,i=u}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw i}}return l}}function Z2e(e){if(Array.isArray(e))return e}function _$(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 S$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_$(Object(r),!0).forEach(function(n){J2e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function J2e(e,t,r){return t=eke(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eke(e){var t=tke(e,"string");return Im(t)=="symbol"?t:t+""}function tke(e,t){if(Im(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Im(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var A$=function(t,r,n,i,s){var o=Math.min(Math.abs(n)/2,Math.abs(i)/2),l=i>=0?1:-1,c=n>=0?1:-1,d=i>=0&&n>=0||i<0&&n<0?1:0,u;if(o>0&&s instanceof Array){for(var h=[0,0,0,0],m=0,g=4;m<g;m++)h[m]=s[m]>o?o:s[m];u="M".concat(t,",").concat(r+l*h[0]),h[0]>0&&(u+="A ".concat(h[0],",").concat(h[0],",0,0,").concat(d,",").concat(t+c*h[0],",").concat(r)),u+="L ".concat(t+n-c*h[1],",").concat(r),h[1]>0&&(u+="A ".concat(h[1],",").concat(h[1],",0,0,").concat(d,`, 879 `).concat(t+n,",").concat(r+l*h[1])),u+="L ".concat(t+n,",").concat(r+i-l*h[2]),h[2]>0&&(u+="A ".concat(h[2],",").concat(h[2],",0,0,").concat(d,`, 880 `).concat(t+n-c*h[2],",").concat(r+i)),u+="L ".concat(t+c*h[3],",").concat(r+i),h[3]>0&&(u+="A ".concat(h[3],",").concat(h[3],",0,0,").concat(d,`, 881 `).concat(t,",").concat(r+i-l*h[3])),u+="Z"}else if(o>0&&s===+s&&s>0){var b=Math.min(o,s);u="M ".concat(t,",").concat(r+l*b,` 882 A `).concat(b,",").concat(b,",0,0,").concat(d,",").concat(t+c*b,",").concat(r,` 883 L `).concat(t+n-c*b,",").concat(r,` 884 A `).concat(b,",").concat(b,",0,0,").concat(d,",").concat(t+n,",").concat(r+l*b,` 885 L `).concat(t+n,",").concat(r+i-l*b,` 886 A `).concat(b,",").concat(b,",0,0,").concat(d,",").concat(t+n-c*b,",").concat(r+i,` 887 L `).concat(t+c*b,",").concat(r+i,` 888 A `).concat(b,",").concat(b,",0,0,").concat(d,",").concat(t,",").concat(r+i-l*b," Z")}else u="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return u},rke=function(t,r){if(!t||!r)return!1;var n=t.x,i=t.y,s=r.x,o=r.y,l=r.width,c=r.height;if(Math.abs(l)>0&&Math.abs(c)>0){var d=Math.min(s,s+l),u=Math.max(s,s+l),h=Math.min(o,o+c),m=Math.max(o,o+c);return n>=d&&n<=u&&i>=h&&i<=m}return!1},nke={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},vP=function(t){var r=S$(S$({},nke),t),n=A.useRef(),i=A.useState(-1),s=K2e(i,2),o=s[0],l=s[1];A.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var j=n.current.getTotalLength();j&&l(j)}catch{}},[]);var c=r.x,d=r.y,u=r.width,h=r.height,m=r.radius,g=r.className,b=r.animationEasing,v=r.animationDuration,y=r.animationBegin,x=r.isAnimationActive,w=r.isUpdateAnimationActive;if(c!==+c||d!==+d||u!==+u||h!==+h||u===0||h===0)return null;var _=bt("recharts-rectangle",g);return w?te.createElement(ki,{canBegin:o>0,from:{width:u,height:h,x:c,y:d},to:{width:u,height:h,x:c,y:d},duration:v,animationEasing:b,isActive:w},function(j){var S=j.width,k=j.height,T=j.x,P=j.y;return te.createElement(ki,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:v,isActive:x,easing:b},te.createElement("path",ev({},lt(r,!0),{className:_,d:A$(T,P,S,k,m),ref:n})))}):te.createElement("path",ev({},lt(r,!0),{className:_,d:A$(c,d,u,h,m)}))},ake=["points","className","baseLinePoints","connectNulls"];function Pu(){return Pu=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},Pu.apply(this,arguments)}function ike(e,t){if(e==null)return{};var r=ske(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ske(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 k$(e){return uke(e)||cke(e)||lke(e)||oke()}function oke(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 889In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lke(e,t){if(e){if(typeof e=="string")return Q2(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 Q2(e,t)}}function cke(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function uke(e){if(Array.isArray(e))return Q2(e)}function Q2(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 E$=function(t){return t&&t.x===+t.x&&t.y===+t.y},dke=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=[[]];return t.forEach(function(n){E$(n)?r[r.length-1].push(n):r[r.length-1].length>0&&r.push([])}),E$(t[0])&&r[r.length-1].push(t[0]),r[r.length-1].length<=0&&(r=r.slice(0,-1)),r},qh=function(t,r){var n=dke(t);r&&(n=[n.reduce(function(s,o){return[].concat(k$(s),k$(o))},[])]);var i=n.map(function(s){return s.reduce(function(o,l,c){return"".concat(o).concat(c===0?"M":"L").concat(l.x,",").concat(l.y)},"")}).join("");return n.length===1?"".concat(i,"Z"):i},fke=function(t,r,n){var i=qh(t,n);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(qh(r.reverse(),n).slice(1))},hke=function(t){var r=t.points,n=t.className,i=t.baseLinePoints,s=t.connectNulls,o=ike(t,ake);if(!r||!r.length)return null;var l=bt("recharts-polygon",n);if(i&&i.length){var c=o.stroke&&o.stroke!=="none",d=fke(r,i,s);return te.createElement("g",{className:l},te.createElement("path",Pu({},lt(o,!0),{fill:d.slice(-1)==="Z"?o.fill:"none",stroke:"none",d})),c?te.createElement("path",Pu({},lt(o,!0),{fill:"none",d:qh(r,s)})):null,c?te.createElement("path",Pu({},lt(o,!0),{fill:"none",d:qh(i,s)})):null)}var u=qh(r,s);return te.createElement("path",Pu({},lt(o,!0),{fill:u.slice(-1)==="Z"?o.fill:"none",className:l,d:u}))};function Z2(){return Z2=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},Z2.apply(this,arguments)}var Mp=function(t){var r=t.cx,n=t.cy,i=t.r,s=t.className,o=bt("recharts-dot",s);return r===+r&&n===+n&&i===+i?A.createElement("circle",Z2({},lt(t,!1),N0(t),{className:o,cx:r,cy:n,r:i})):null};function Lm(e){"@babel/helpers - typeof";return Lm=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},Lm(e)}var mke=["x","y","top","left","width","height","className"];function J2(){return J2=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},J2.apply(this,arguments)}function T$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function pke(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?T$(Object(r),!0).forEach(function(n){gke(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gke(e,t,r){return t=yke(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yke(e){var t=vke(e,"string");return Lm(t)=="symbol"?t:t+""}function vke(e,t){if(Lm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Lm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xke(e,t){if(e==null)return{};var r=bke(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function bke(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 wke=function(t,r,n,i,s,o){return"M".concat(t,",").concat(s,"v").concat(i,"M").concat(o,",").concat(r,"h").concat(n)},jke=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,s=i===void 0?0:i,o=t.top,l=o===void 0?0:o,c=t.left,d=c===void 0?0:c,u=t.width,h=u===void 0?0:u,m=t.height,g=m===void 0?0:m,b=t.className,v=xke(t,mke),y=pke({x:n,y:s,top:l,left:d,width:h,height:g},v);return!Fe(n)||!Fe(s)||!Fe(h)||!Fe(g)||!Fe(l)||!Fe(d)?null:te.createElement("path",J2({},lt(y,!0),{className:bt("recharts-cross",b),d:wke(n,s,h,g,l,d)}))},lS,P$;function Nke(){if(P$)return lS;P$=1;var e=kx(),t=_H(),r=us();function n(i,s){return i&&i.length?e(i,r(s,2),t):void 0}return lS=n,lS}var _ke=Nke();const Ske=Ht(_ke);var cS,C$;function Ake(){if(C$)return cS;C$=1;var e=kx(),t=us(),r=SH();function n(i,s){return i&&i.length?e(i,t(s,2),r):void 0}return cS=n,cS}var kke=Ake();const Eke=Ht(kke);var Tke=["cx","cy","angle","ticks","axisLine"],Pke=["ticks","tick","angle","tickFormatter","stroke"];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 zh(){return zh=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},zh.apply(this,arguments)}function O$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ol(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?O$(Object(r),!0).forEach(function(n){Cx(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function M$(e,t){if(e==null)return{};var r=Cke(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Cke(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 Oke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function R$(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,fW(n.key),n)}}function Mke(e,t,r){return t&&R$(e.prototype,t),r&&R$(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Rke(e,t,r){return t=tv(t),Dke(e,dW()?Reflect.construct(t,r||[],tv(e).constructor):t.apply(e,r))}function Dke(e,t){if(t&&(pd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ike(e)}function Ike(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(dW=function(){return!!e})()}function tv(e){return tv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},tv(e)}function Lke(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&&ek(e,t)}function ek(e,t){return ek=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},ek(e,t)}function Cx(e,t,r){return t=fW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fW(e){var t=$ke(e,"string");return pd(t)=="symbol"?t:t+""}function $ke(e,t){if(pd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(pd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ox=(function(e){function t(){return Oke(this,t),Rke(this,t,arguments)}return Lke(t,e),Mke(t,[{key:"getTickValueCoord",value:function(n){var i=n.coordinate,s=this.props,o=s.angle,l=s.cx,c=s.cy;return or(l,c,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,s=n.cy,o=n.angle,l=n.ticks,c=Ske(l,function(u){return u.coordinate||0}),d=Eke(l,function(u){return u.coordinate||0});return{cx:i,cy:s,startAngle:o,endAngle:o,innerRadius:d.coordinate||0,outerRadius:c.coordinate||0}}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,s=n.cy,o=n.angle,l=n.ticks,c=n.axisLine,d=M$(n,Tke),u=l.reduce(function(b,v){return[Math.min(b[0],v.coordinate),Math.max(b[1],v.coordinate)]},[1/0,-1/0]),h=or(i,s,u[0],o),m=or(i,s,u[1],o),g=Ol(Ol(Ol({},lt(d,!1)),{},{fill:"none"},lt(c,!1)),{},{x1:h.x,y1:h.y,x2:m.x,y2:m.y});return te.createElement("line",zh({className:"recharts-polar-radius-axis-line"},g))}},{key:"renderTicks",value:function(){var n=this,i=this.props,s=i.ticks,o=i.tick,l=i.angle,c=i.tickFormatter,d=i.stroke,u=M$(i,Pke),h=this.getTickTextAnchor(),m=lt(u,!1),g=lt(o,!1),b=s.map(function(v,y){var x=n.getTickValueCoord(v),w=Ol(Ol(Ol(Ol({textAnchor:h,transform:"rotate(".concat(90-l,", ").concat(x.x,", ").concat(x.y,")")},m),{},{stroke:"none",fill:d},g),{},{index:y},x),{},{payload:v});return te.createElement(Ct,zh({className:bt("recharts-polar-radius-axis-tick",eW(o)),key:"tick-".concat(v.coordinate)},_c(n.props,v,y)),t.renderTickItem(o,w,c?c(v.value,y):v.value))});return te.createElement(Ct,{className:"recharts-polar-radius-axis-ticks"},b)}},{key:"render",value:function(){var n=this.props,i=n.ticks,s=n.axisLine,o=n.tick;return!i||!i.length?null:te.createElement(Ct,{className:bt("recharts-polar-radius-axis",this.props.className)},s&&this.renderAxisLine(),o&&this.renderTicks(),an.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(n,i,s){var o;return te.isValidElement(n)?o=te.cloneElement(n,i):mt(n)?o=n(i):o=te.createElement(Sc,zh({},i,{className:"recharts-polar-radius-axis-tick-value"}),s),o}}])})(A.PureComponent);Cx(Ox,"displayName","PolarRadiusAxis");Cx(Ox,"axisType","radiusAxis");Cx(Ox,"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 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 Bl(){return Bl=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},Bl.apply(this,arguments)}function D$(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 Ml(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?D$(Object(r),!0).forEach(function(n){Mx(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):D$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Fke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function I$(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,mW(n.key),n)}}function Bke(e,t,r){return t&&I$(e.prototype,t),r&&I$(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Uke(e,t,r){return t=rv(t),qke(e,hW()?Reflect.construct(t,r||[],rv(e).constructor):t.apply(e,r))}function qke(e,t){if(t&&(gd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return zke(e)}function zke(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hW=function(){return!!e})()}function rv(e){return rv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},rv(e)}function Vke(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&&tk(e,t)}function tk(e,t){return tk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},tk(e,t)}function Mx(e,t,r){return t=mW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mW(e){var t=Hke(e,"string");return gd(t)=="symbol"?t:t+""}function Hke(e,t){if(gd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(gd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Wke=Math.PI/180,L$=1e-5,Rx=(function(e){function t(){return Fke(this,t),Uke(this,t,arguments)}return Vke(t,e),Bke(t,[{key:"getTickLineCoord",value:function(n){var i=this.props,s=i.cx,o=i.cy,l=i.radius,c=i.orientation,d=i.tickSize,u=d||8,h=or(s,o,l,n.coordinate),m=or(s,o,l+(c==="inner"?-1:1)*u,n.coordinate);return{x1:h.x,y1:h.y,x2:m.x,y2:m.y}}},{key:"getTickTextAnchor",value:function(n){var i=this.props.orientation,s=Math.cos(-n.coordinate*Wke),o;return s>L$?o=i==="outer"?"start":"end":s<-L$?o=i==="outer"?"end":"start":o="middle",o}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,s=n.cy,o=n.radius,l=n.axisLine,c=n.axisLineType,d=Ml(Ml({},lt(this.props,!1)),{},{fill:"none"},lt(l,!1));if(c==="circle")return te.createElement(Mp,Bl({className:"recharts-polar-angle-axis-line"},d,{cx:i,cy:s,r:o}));var u=this.props.ticks,h=u.map(function(m){return or(i,s,o,m.coordinate)});return te.createElement(hke,Bl({className:"recharts-polar-angle-axis-line"},d,{points:h}))}},{key:"renderTicks",value:function(){var n=this,i=this.props,s=i.ticks,o=i.tick,l=i.tickLine,c=i.tickFormatter,d=i.stroke,u=lt(this.props,!1),h=lt(o,!1),m=Ml(Ml({},u),{},{fill:"none"},lt(l,!1)),g=s.map(function(b,v){var y=n.getTickLineCoord(b),x=n.getTickTextAnchor(b),w=Ml(Ml(Ml({textAnchor:x},u),{},{stroke:"none",fill:d},h),{},{index:v,payload:b,x:y.x2,y:y.y2});return te.createElement(Ct,Bl({className:bt("recharts-polar-angle-axis-tick",eW(o)),key:"tick-".concat(b.coordinate)},_c(n.props,b,v)),l&&te.createElement("line",Bl({className:"recharts-polar-angle-axis-tick-line"},m,y)),o&&t.renderTickItem(o,w,c?c(b.value,v):b.value))});return te.createElement(Ct,{className:"recharts-polar-angle-axis-ticks"},g)}},{key:"render",value:function(){var n=this.props,i=n.ticks,s=n.radius,o=n.axisLine;return s<=0||!i||!i.length?null:te.createElement(Ct,{className:bt("recharts-polar-angle-axis",this.props.className)},o&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(n,i,s){var o;return te.isValidElement(n)?o=te.cloneElement(n,i):mt(n)?o=n(i):o=te.createElement(Sc,Bl({},i,{className:"recharts-polar-angle-axis-tick-value"}),s),o}}])})(A.PureComponent);Mx(Rx,"displayName","PolarAngleAxis");Mx(Rx,"axisType","angleAxis");Mx(Rx,"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 uS,$$;function Gke(){if($$)return uS;$$=1;var e=NV(),t=e(Object.getPrototypeOf,Object);return uS=t,uS}var dS,F$;function Kke(){if(F$)return dS;F$=1;var e=Ys(),t=Gke(),r=Xs(),n="[object Object]",i=Function.prototype,s=Object.prototype,o=i.toString,l=s.hasOwnProperty,c=o.call(Object);function d(u){if(!r(u)||e(u)!=n)return!1;var h=t(u);if(h===null)return!0;var m=l.call(h,"constructor")&&h.constructor;return typeof m=="function"&&m instanceof m&&o.call(m)==c}return dS=d,dS}var Yke=Kke();const Xke=Ht(Yke);var fS,B$;function Qke(){if(B$)return fS;B$=1;var e=Ys(),t=Xs(),r="[object Boolean]";function n(i){return i===!0||i===!1||t(i)&&e(i)==r}return fS=n,fS}var Zke=Qke();const Jke=Ht(Zke);function $m(e){"@babel/helpers - typeof";return $m=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$m(e)}function nv(){return nv=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},nv.apply(this,arguments)}function eEe(e,t){return aEe(e)||nEe(e,t)||rEe(e,t)||tEe()}function tEe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 890In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rEe(e,t){if(e){if(typeof e=="string")return U$(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 U$(e,t)}}function U$(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 nEe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,s,o,l=[],c=!0,d=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(c=(n=s.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(u){d=!0,i=u}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw i}}return l}}function aEe(e){if(Array.isArray(e))return e}function q$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function z$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?q$(Object(r),!0).forEach(function(n){iEe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):q$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function iEe(e,t,r){return t=sEe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sEe(e){var t=oEe(e,"string");return $m(t)=="symbol"?t:t+""}function oEe(e,t){if($m(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if($m(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var V$=function(t,r,n,i,s){var o=n-i,l;return l="M ".concat(t,",").concat(r),l+="L ".concat(t+n,",").concat(r),l+="L ".concat(t+n-o/2,",").concat(r+s),l+="L ".concat(t+n-o/2-i,",").concat(r+s),l+="L ".concat(t,",").concat(r," Z"),l},lEe={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},cEe=function(t){var r=z$(z$({},lEe),t),n=A.useRef(),i=A.useState(-1),s=eEe(i,2),o=s[0],l=s[1];A.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var _=n.current.getTotalLength();_&&l(_)}catch{}},[]);var c=r.x,d=r.y,u=r.upperWidth,h=r.lowerWidth,m=r.height,g=r.className,b=r.animationEasing,v=r.animationDuration,y=r.animationBegin,x=r.isUpdateAnimationActive;if(c!==+c||d!==+d||u!==+u||h!==+h||m!==+m||u===0&&h===0||m===0)return null;var w=bt("recharts-trapezoid",g);return x?te.createElement(ki,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:m,x:c,y:d},to:{upperWidth:u,lowerWidth:h,height:m,x:c,y:d},duration:v,animationEasing:b,isActive:x},function(_){var j=_.upperWidth,S=_.lowerWidth,k=_.height,T=_.x,P=_.y;return te.createElement(ki,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:v,easing:b},te.createElement("path",nv({},lt(r,!0),{className:w,d:V$(T,P,j,S,k),ref:n})))}):te.createElement("g",null,te.createElement("path",nv({},lt(r,!0),{className:w,d:V$(c,d,u,h,m)})))},uEe=["option","shapeType","propTransformer","activeClassName","isActive"];function Fm(e){"@babel/helpers - typeof";return Fm=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},Fm(e)}function dEe(e,t){if(e==null)return{};var r=fEe(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function fEe(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 H$(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 av(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?H$(Object(r),!0).forEach(function(n){hEe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function hEe(e,t,r){return t=mEe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mEe(e){var t=pEe(e,"string");return Fm(t)=="symbol"?t:t+""}function pEe(e,t){if(Fm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Fm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gEe(e,t){return av(av({},t),e)}function yEe(e,t){return e==="symbols"}function W$(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return te.createElement(vP,r);case"trapezoid":return te.createElement(cEe,r);case"sector":return te.createElement(nW,r);case"symbols":if(yEe(t))return te.createElement(LT,r);break;default:return null}}function vEe(e){return A.isValidElement(e)?e.props:e}function pW(e){var t=e.option,r=e.shapeType,n=e.propTransformer,i=n===void 0?gEe:n,s=e.activeClassName,o=s===void 0?"recharts-active-shape":s,l=e.isActive,c=dEe(e,uEe),d;if(A.isValidElement(t))d=A.cloneElement(t,av(av({},c),vEe(t)));else if(mt(t))d=t(c);else if(Xke(t)&&!Jke(t)){var u=i(t,c);d=te.createElement(W$,{shapeType:r,elementProps:u})}else{var h=c;d=te.createElement(W$,{shapeType:r,elementProps:h})}return l?te.createElement(Ct,{className:o},d):d}function Dx(e,t){return t!=null&&"trapezoids"in e.props}function Ix(e,t){return t!=null&&"sectors"in e.props}function Bm(e,t){return t!=null&&"points"in e.props}function xEe(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,s=e.y===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.y)||e.y===t.y;return i&&s}function bEe(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function wEe(e,t){var r=e.x===t.x,n=e.y===t.y,i=e.z===t.z;return r&&n&&i}function jEe(e,t){var r;return Dx(e,t)?r=xEe:Ix(e,t)?r=bEe:Bm(e,t)&&(r=wEe),r}function NEe(e,t){var r;return Dx(e,t)?r="trapezoids":Ix(e,t)?r="sectors":Bm(e,t)&&(r="points"),r}function _Ee(e,t){if(Dx(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(Ix(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 Bm(e,t)?t.payload:{}}function SEe(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,i=NEe(r,t),s=_Ee(r,t),o=n.filter(function(c,d){var u=Ac(s,c),h=r.props[i].filter(function(b){var v=jEe(r,t);return v(b,t)}),m=r.props[i].indexOf(h[h.length-1]),g=d===m;return u&&g}),l=n.indexOf(o[o.length-1]);return l}var Hy;function yd(e){"@babel/helpers - typeof";return yd=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},yd(e)}function Cu(){return Cu=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},Cu.apply(this,arguments)}function G$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ir(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?G$(Object(r),!0).forEach(function(n){Va(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):G$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function AEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function K$(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,yW(n.key),n)}}function kEe(e,t,r){return t&&K$(e.prototype,t),r&&K$(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function EEe(e,t,r){return t=iv(t),TEe(e,gW()?Reflect.construct(t,r||[],iv(e).constructor):t.apply(e,r))}function TEe(e,t){if(t&&(yd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return PEe(e)}function PEe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(gW=function(){return!!e})()}function iv(e){return iv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},iv(e)}function CEe(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&&rk(e,t)}function rk(e,t){return rk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},rk(e,t)}function Va(e,t,r){return t=yW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yW(e){var t=OEe(e,"string");return yd(t)=="symbol"?t:t+""}function OEe(e,t){if(yd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(yd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ns=(function(e){function t(r){var n;return AEe(this,t),n=EEe(this,t,[r]),Va(n,"pieRef",null),Va(n,"sectorRefs",[]),Va(n,"id",Dc("recharts-pie-")),Va(n,"handleAnimationEnd",function(){var i=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),mt(i)&&i()}),Va(n,"handleAnimationStart",function(){var i=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),mt(i)&&i()}),n.state={isAnimationFinished:!r.isAnimationActive,prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,sectorToFocus:0},n}return CEe(t,e),kEe(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 s=this.props,o=s.label,l=s.labelLine,c=s.dataKey,d=s.valueKey,u=lt(this.props,!1),h=lt(o,!1),m=lt(l,!1),g=o&&o.offsetRadius||20,b=n.map(function(v,y){var x=(v.startAngle+v.endAngle)/2,w=or(v.cx,v.cy,v.outerRadius+g,x),_=ir(ir(ir(ir({},u),v),{},{stroke:"none"},h),{},{index:y,textAnchor:t.getTextAnchor(w.x,v.cx)},w),j=ir(ir(ir(ir({},u),v),{},{fill:"none",stroke:v.fill},m),{},{index:y,points:[or(v.cx,v.cy,v.outerRadius,x),w]}),S=c;return xt(c)&&xt(d)?S="value":xt(c)&&(S=d),te.createElement(Ct,{key:"label-".concat(v.startAngle,"-").concat(v.endAngle,"-").concat(v.midAngle,"-").concat(y)},l&&t.renderLabelLineItem(l,j,"line"),t.renderLabelItem(o,_,Cr(v,S)))});return te.createElement(Ct,{className:"recharts-pie-labels"},b)}},{key:"renderSectorsStatically",value:function(n){var i=this,s=this.props,o=s.activeShape,l=s.blendStroke,c=s.inactiveShape;return n.map(function(d,u){if((d==null?void 0:d.startAngle)===0&&(d==null?void 0:d.endAngle)===0&&n.length!==1)return null;var h=i.isActiveIndex(u),m=c&&i.hasActiveIndex()?c:null,g=h?o:m,b=ir(ir({},d),{},{stroke:l?d.fill:d.stroke,tabIndex:-1});return te.createElement(Ct,Cu({ref:function(y){y&&!i.sectorRefs.includes(y)&&i.sectorRefs.push(y)},tabIndex:-1,className:"recharts-pie-sector"},_c(i.props,d,u),{key:"sector-".concat(d==null?void 0:d.startAngle,"-").concat(d==null?void 0:d.endAngle,"-").concat(d.midAngle,"-").concat(u)}),te.createElement(pW,Cu({option:g,isActive:h,shapeType:"sector"},b)))})}},{key:"renderSectorsWithAnimation",value:function(){var n=this,i=this.props,s=i.sectors,o=i.isAnimationActive,l=i.animationBegin,c=i.animationDuration,d=i.animationEasing,u=i.animationId,h=this.state,m=h.prevSectors,g=h.prevIsAnimationActive;return te.createElement(ki,{begin:l,duration:c,isActive:o,easing:d,from:{t:0},to:{t:1},key:"pie-".concat(u,"-").concat(g),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(b){var v=b.t,y=[],x=s&&s[0],w=x.startAngle;return s.forEach(function(_,j){var S=m&&m[j],k=j>0?Sa(_,"paddingAngle",0):0;if(S){var T=Gr(S.endAngle-S.startAngle,_.endAngle-_.startAngle),P=ir(ir({},_),{},{startAngle:w+k,endAngle:w+T(v)+k});y.push(P),w=P.endAngle}else{var M=_.endAngle,C=_.startAngle,O=Gr(0,M-C),D=O(v),L=ir(ir({},_),{},{startAngle:w+k,endAngle:w+D+k});y.push(L),w=L.endAngle}}),te.createElement(Ct,null,n.renderSectorsStatically(y))})}},{key:"attachKeyboardHandlers",value:function(n){var i=this;n.onkeydown=function(s){if(!s.altKey)switch(s.key){case"ArrowLeft":{var o=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[o].focus(),i.setState({sectorToFocus:o});break}case"ArrowRight":{var l=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[l].focus(),i.setState({sectorToFocus:l});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,s=n.isAnimationActive,o=this.state.prevSectors;return s&&i&&i.length&&(!o||!Ac(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,s=i.hide,o=i.sectors,l=i.className,c=i.label,d=i.cx,u=i.cy,h=i.innerRadius,m=i.outerRadius,g=i.isAnimationActive,b=this.state.isAnimationFinished;if(s||!o||!o.length||!Fe(d)||!Fe(u)||!Fe(h)||!Fe(m))return null;var v=bt("recharts-pie",l);return te.createElement(Ct,{tabIndex:this.props.rootTabIndex,className:v,ref:function(x){n.pieRef=x}},this.renderSectors(),c&&this.renderLabels(o),an.renderCallByParent(this.props,null,!1),(!g||b)&&Xi.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,s){if(te.isValidElement(n))return te.cloneElement(n,i);if(mt(n))return n(i);var o=bt("recharts-pie-label-line",typeof n!="boolean"?n.className:"");return te.createElement(uc,Cu({},i,{key:s,type:"linear",className:o}))}},{key:"renderLabelItem",value:function(n,i,s){if(te.isValidElement(n))return te.cloneElement(n,i);var o=s;if(mt(n)&&(o=n(i),te.isValidElement(o)))return o;var l=bt("recharts-pie-label-text",typeof n!="boolean"&&!mt(n)?n.className:"");return te.createElement(Sc,Cu({},i,{alignmentBaseline:"middle",className:l}),o)}}])})(A.PureComponent);Hy=ns;Va(ns,"displayName","Pie");Va(ns,"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:!cl.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});Va(ns,"parseDeltaAngle",function(e,t){var r=Bn(t-e),n=Math.min(Math.abs(t-e),360);return r*n});Va(ns,"getRealPieData",function(e){var t=e.data,r=e.children,n=lt(e,!1),i=Aa(r,Lu);return t&&t.length?t.map(function(s,o){return ir(ir(ir({payload:s},n),s),i&&i[o]&&i[o].props)}):i&&i.length?i.map(function(s){return ir(ir({},n),s.props)}):[]});Va(ns,"parseCoordinateOfPie",function(e,t){var r=t.top,n=t.left,i=t.width,s=t.height,o=JH(i,s),l=n+Un(e.cx,i,i/2),c=r+Un(e.cy,s,s/2),d=Un(e.innerRadius,o,0),u=Un(e.outerRadius,o,o*.8),h=e.maxRadius||Math.sqrt(i*i+s*s)/2;return{cx:l,cy:c,innerRadius:d,outerRadius:u,maxRadius:h}});Va(ns,"getComposedData",function(e){var t=e.item,r=e.offset,n=t.type.defaultProps!==void 0?ir(ir({},t.type.defaultProps),t.props):t.props,i=Hy.getRealPieData(n);if(!i||!i.length)return null;var s=n.cornerRadius,o=n.startAngle,l=n.endAngle,c=n.paddingAngle,d=n.dataKey,u=n.nameKey,h=n.valueKey,m=n.tooltipType,g=Math.abs(n.minAngle),b=Hy.parseCoordinateOfPie(n,r),v=Hy.parseDeltaAngle(o,l),y=Math.abs(v),x=d;xt(d)&&xt(h)?(Ni(!1,`Use "dataKey" to specify the value of pie,
891 the props "valueKey" will be deprecated in 1.1.0`),x="value"):xt(d)&&(Ni(!1,`Use "dataKey" to specify the value of pie, 892 the props "valueKey" will be deprecated in 1.1.0`),x=h);var w=i.filter(function(P){return Cr(P,x,0)!==0}).length,_=(y>=360?w:w-1)*c,j=y-w*g-_,S=i.reduce(function(P,M){var C=Cr(M,x,0);return P+(Fe(C)?C:0)},0),k;if(S>0){var T;k=i.map(function(P,M){var C=Cr(P,x,0),O=Cr(P,u,M),D=(Fe(C)?C:0)/S,L;M?L=T.endAngle+Bn(v)*c*(C!==0?1:0):L=o;var F=L+Bn(v)*((C!==0?g:0)+D*j),U=(L+F)/2,G=(b.innerRadius+b.outerRadius)/2,W=[{name:O,value:C,payload:P,dataKey:x,type:m}],q=or(b.cx,b.cy,G,U);return T=ir(ir(ir({percent:D,cornerRadius:s,name:O,tooltipPayload:W,midAngle:U,middleRadius:G,tooltipPosition:q},P),b),{},{value:Cr(P,x),startAngle:L,endAngle:F,payload:P,paddingAngle:Bn(v)*c}),T})}return ir(ir({},b),{},{sectors:k,data:i})});var hS,Y$;function MEe(){if(Y$)return hS;Y$=1;var e=Math.ceil,t=Math.max;function r(n,i,s,o){for(var l=-1,c=t(e((i-n)/(s||1)),0),d=Array(c);c--;)d[o?c:++l]=n,n+=s;return d}return hS=r,hS}var mS,X$;function vW(){if(X$)return mS;X$=1;var e=FV(),t=1/0,r=17976931348623157e292;function n(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var s=i<0?-1:1;return s*r}return i===i?i:0}return mS=n,mS}var pS,Q$;function REe(){if(Q$)return pS;Q$=1;var e=MEe(),t=bx(),r=vW();function n(i){return function(s,o,l){return l&&typeof l!="number"&&t(s,o,l)&&(o=l=void 0),s=r(s),o===void 0?(o=s,s=0):o=r(o),l=l===void 0?s<o?1:-1:r(l),e(s,o,l,i)}}return pS=n,pS}var gS,Z$;function DEe(){if(Z$)return gS;Z$=1;var e=REe(),t=e();return gS=t,gS}var IEe=DEe();const sv=Ht(IEe);function Um(e){"@babel/helpers - typeof";return Um=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},Um(e)}function J$(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 eF(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?J$(Object(r),!0).forEach(function(n){xW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):J$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xW(e,t,r){return t=LEe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function LEe(e){var t=$Ee(e,"string");return Um(t)=="symbol"?t:t+""}function $Ee(e,t){if(Um(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Um(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var FEe=["Webkit","Moz","O","ms"],BEe=function(t,r){var n=t.replace(/(\w)/,function(s){return s.toUpperCase()}),i=FEe.reduce(function(s,o){return eF(eF({},s),{},xW({},o+n,r))},{});return i[t]=r,i};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 ov(){return ov=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},ov.apply(this,arguments)}function tF(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 yS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tF(Object(r),!0).forEach(function(n){ya(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function UEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rF(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,wW(n.key),n)}}function qEe(e,t,r){return t&&rF(e.prototype,t),r&&rF(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function zEe(e,t,r){return t=lv(t),VEe(e,bW()?Reflect.construct(t,r||[],lv(e).constructor):t.apply(e,r))}function VEe(e,t){if(t&&(vd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return HEe(e)}function HEe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(bW=function(){return!!e})()}function lv(e){return lv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},lv(e)}function WEe(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&&nk(e,t)}
vendor: 133,521 bytes, lines 892-897
892function nk(e,t){return nk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},nk(e,t)}function ya(e,t,r){return t=wW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wW(e){var t=GEe(e,"string");return vd(t)=="symbol"?t:t+""}function GEe(e,t){if(vd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(vd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var KEe=function(t){var r=t.data,n=t.startIndex,i=t.endIndex,s=t.x,o=t.width,l=t.travellerWidth;if(!r||!r.length)return{};var c=r.length,d=Fh().domain(sv(0,c)).range([s,s+o-l]),u=d.domain().map(function(h){return d(h)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:d(n),endX:d(i),scale:d,scaleValues:u}},nF=function(t){return t.changedTouches&&!!t.changedTouches.length},xd=(function(e){function t(r){var n;return UEe(this,t),n=zEe(this,t,[r]),ya(n,"handleDrag",function(i){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(i):n.state.isSlideMoving&&n.handleSlideDrag(i)}),ya(n,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&n.handleDrag(i.changedTouches[0])}),ya(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,s=i.endIndex,o=i.onDragEnd,l=i.startIndex;o==null||o({endIndex:s,startIndex:l})}),n.detachDragEndListener()}),ya(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),ya(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),ya(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),ya(n,"handleSlideDragStart",function(i){var s=nF(i)?i.changedTouches[0]:i;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:s.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return WEe(t,e),qEe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var i=n.startX,s=n.endX,o=this.state.scaleValues,l=this.props,c=l.gap,d=l.data,u=d.length-1,h=Math.min(i,s),m=Math.max(i,s),g=t.getIndexInRange(o,h),b=t.getIndexInRange(o,m);return{startIndex:g-g%c,endIndex:b===u?u:b-b%c}}},{key:"getTextOfTick",value:function(n){var i=this.props,s=i.data,o=i.tickFormatter,l=i.dataKey,c=Cr(s[n],l,n);return mt(o)?o(c,n):c}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(n){var i=this.state,s=i.slideMoveStartX,o=i.startX,l=i.endX,c=this.props,d=c.x,u=c.width,h=c.travellerWidth,m=c.startIndex,g=c.endIndex,b=c.onChange,v=n.pageX-s;v>0?v=Math.min(v,d+u-h-l,d+u-h-o):v<0&&(v=Math.max(v,d-o,d-l));var y=this.getIndex({startX:o+v,endX:l+v});(y.startIndex!==m||y.endIndex!==g)&&b&&b(y),this.setState({startX:o+v,endX:l+v,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var s=nF(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:s.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var i=this.state,s=i.brushMoveStartX,o=i.movingTravellerId,l=i.endX,c=i.startX,d=this.state[o],u=this.props,h=u.x,m=u.width,g=u.travellerWidth,b=u.onChange,v=u.gap,y=u.data,x={startX:this.state.startX,endX:this.state.endX},w=n.pageX-s;w>0?w=Math.min(w,h+m-g-d):w<0&&(w=Math.max(w,h-d)),x[o]=d+w;var _=this.getIndex(x),j=_.startIndex,S=_.endIndex,k=function(){var P=y.length-1;return o==="startX"&&(l>c?j%v===0:S%v===0)||l<c&&S===P||o==="endX"&&(l>c?S%v===0:j%v===0)||l>c&&S===P};this.setState(ya(ya({},o,d+w),"brushMoveStartX",n.pageX),function(){b&&k()&&b(_)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var s=this,o=this.state,l=o.scaleValues,c=o.startX,d=o.endX,u=this.state[i],h=l.indexOf(u);if(h!==-1){var m=h+n;if(!(m===-1||m>=l.length)){var g=l[m];i==="startX"&&g>=d||i==="endX"&&g<=c||this.setState(ya({},i,g),function(){s.props.onChange(s.getIndex({startX:s.state.startX,endX:s.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,i=n.x,s=n.y,o=n.width,l=n.height,c=n.fill,d=n.stroke;return te.createElement("rect",{stroke:d,fill:c,x:i,y:s,width:o,height:l})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,s=n.y,o=n.width,l=n.height,c=n.data,d=n.children,u=n.padding,h=A.Children.only(d);return h?te.cloneElement(h,{x:i,y:s,width:o,height:l,margin:u,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(n,i){var s,o,l=this,c=this.props,d=c.y,u=c.travellerWidth,h=c.height,m=c.traveller,g=c.ariaLabel,b=c.data,v=c.startIndex,y=c.endIndex,x=Math.max(n,this.props.x),w=yS(yS({},lt(this.props,!1)),{},{x,y:d,width:u,height:h}),_=g||"Min value: ".concat((s=b[v])===null||s===void 0?void 0:s.name,", Max value: ").concat((o=b[y])===null||o===void 0?void 0:o.name);return te.createElement(Ct,{tabIndex:0,role:"slider","aria-label":_,"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(),l.handleTravellerMoveKeyboard(S.key==="ArrowRight"?1:-1,i))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(m,w))}},{key:"renderSlide",value:function(n,i){var s=this.props,o=s.y,l=s.height,c=s.stroke,d=s.travellerWidth,u=Math.min(n,i)+d,h=Math.max(Math.abs(i-n)-d,0);return te.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c,fillOpacity:.2,x:u,y:o,width:h,height:l})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,s=n.endIndex,o=n.y,l=n.height,c=n.travellerWidth,d=n.stroke,u=this.state,h=u.startX,m=u.endX,g=5,b={pointerEvents:"none",fill:d};return te.createElement(Ct,{className:"recharts-brush-texts"},te.createElement(Sc,ov({textAnchor:"end",verticalAnchor:"middle",x:Math.min(h,m)-g,y:o+l/2},b),this.getTextOfTick(i)),te.createElement(Sc,ov({textAnchor:"start",verticalAnchor:"middle",x:Math.max(h,m)+c+g,y:o+l/2},b),this.getTextOfTick(s)))}},{key:"render",value:function(){var n=this.props,i=n.data,s=n.className,o=n.children,l=n.x,c=n.y,d=n.width,u=n.height,h=n.alwaysShowText,m=this.state,g=m.startX,b=m.endX,v=m.isTextActive,y=m.isSlideMoving,x=m.isTravellerMoving,w=m.isTravellerFocused;if(!i||!i.length||!Fe(l)||!Fe(c)||!Fe(d)||!Fe(u)||d<=0||u<=0)return null;var _=bt("recharts-brush",s),j=te.Children.count(o)===1,S=BEe("userSelect","none");return te.createElement(Ct,{className:_,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:S},this.renderBackground(),j&&this.renderPanorama(),this.renderSlide(g,b),this.renderTravellerLayer(g,"startX"),this.renderTravellerLayer(b,"endX"),(v||y||x||w||h)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,s=n.y,o=n.width,l=n.height,c=n.stroke,d=Math.floor(s+l/2)-1;return te.createElement(te.Fragment,null,te.createElement("rect",{x:i,y:s,width:o,height:l,fill:c,stroke:"none"}),te.createElement("line",{x1:i+1,y1:d,x2:i+o-1,y2:d,fill:"none",stroke:"#fff"}),te.createElement("line",{x1:i+1,y1:d+2,x2:i+o-1,y2:d+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var s;return te.isValidElement(n)?s=te.cloneElement(n,i):mt(n)?s=n(i):s=t.renderDefaultTraveller(i),s}},{key:"getDerivedStateFromProps",value:function(n,i){var s=n.data,o=n.width,l=n.x,c=n.travellerWidth,d=n.updateId,u=n.startIndex,h=n.endIndex;if(s!==i.prevData||d!==i.prevUpdateId)return yS({prevData:s,prevTravellerWidth:c,prevUpdateId:d,prevX:l,prevWidth:o},s&&s.length?KEe({data:s,width:o,x:l,travellerWidth:c,startIndex:u,endIndex:h}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||l!==i.prevX||c!==i.prevTravellerWidth)){i.scale.range([l,l+o-c]);var m=i.scale.domain().map(function(g){return i.scale(g)});return{prevData:s,prevTravellerWidth:c,prevUpdateId:d,prevX:l,prevWidth:o,startX:i.scale(n.startIndex),endX:i.scale(n.endIndex),scaleValues:m}}return null}},{key:"getIndexInRange",value:function(n,i){for(var s=n.length,o=0,l=s-1;l-o>1;){var c=Math.floor((o+l)/2);n[c]>i?l=c:o=c}return i>=n[l]?l:o}}])})(A.PureComponent);ya(xd,"displayName","Brush");ya(xd,"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 vS,aF;function YEe(){if(aF)return vS;aF=1;var e=VT();function t(r,n){var i;return e(r,function(s,o,l){return i=n(s,o,l),!i}),!!i}return vS=t,vS}var xS,iF;function XEe(){if(iF)return xS;iF=1;var e=gV(),t=us(),r=YEe(),n=ca(),i=bx();function s(o,l,c){var d=n(o)?e:r;return c&&i(o,l,c)&&(l=void 0),d(o,t(l,3))}return xS=s,xS}var QEe=XEe();const ZEe=Ht(QEe);var Qi=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},bS,sF;function JEe(){if(sF)return bS;sF=1;var e=RV();function t(r,n,i){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return bS=t,bS}var wS,oF;function eTe(){if(oF)return wS;oF=1;var e=JEe(),t=OV(),r=us();function n(i,s){var o={};return s=r(s,3),t(i,function(l,c,d){e(o,c,s(l,c,d))}),o}return wS=n,wS}var tTe=eTe();const rTe=Ht(tTe);var jS,lF;function nTe(){if(lF)return jS;lF=1;function e(t,r){for(var n=-1,i=t==null?0:t.length;++n<i;)if(!r(t[n],n,t))return!1;return!0}return jS=e,jS}var NS,cF;function aTe(){if(cF)return NS;cF=1;var e=VT();function t(r,n){var i=!0;return e(r,function(s,o,l){return i=!!n(s,o,l),i}),i}return NS=t,NS}var _S,uF;function iTe(){if(uF)return _S;uF=1;var e=nTe(),t=aTe(),r=us(),n=ca(),i=bx();function s(o,l,c){var d=n(o)?e:t;return c&&i(o,l,c)&&(l=void 0),d(o,r(l,3))}return _S=s,_S}var sTe=iTe();const jW=Ht(sTe);var oTe=["x","y"];function qm(e){"@babel/helpers - typeof";return qm=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},qm(e)}function ak(){return ak=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},ak.apply(this,arguments)}function dF(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 mh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dF(Object(r),!0).forEach(function(n){lTe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lTe(e,t,r){return t=cTe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cTe(e){var t=uTe(e,"string");return qm(t)=="symbol"?t:t+""}function uTe(e,t){if(qm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(qm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function dTe(e,t){if(e==null)return{};var r=fTe(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function fTe(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 hTe(e,t){var r=e.x,n=e.y,i=dTe(e,oTe),s="".concat(r),o=parseInt(s,10),l="".concat(n),c=parseInt(l,10),d="".concat(t.height||i.height),u=parseInt(d,10),h="".concat(t.width||i.width),m=parseInt(h,10);return mh(mh(mh(mh(mh({},t),i),o?{x:o}:{}),c?{y:c}:{}),{},{height:u,width:m,name:t.name,radius:t.radius})}function fF(e){return te.createElement(pW,ak({shapeType:"rectangle",propTransformer:hTe,activeClassName:"recharts-active-bar"},e))}var mTe=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 s=Fe(n)||B0e(n);return s?t(n,i):(s||Ec(),r)}},pTe=["value","background"],NW;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)}function gTe(e,t){if(e==null)return{};var r=yTe(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function yTe(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 cv(){return cv=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},cv.apply(this,arguments)}function hF(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 Ir(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hF(Object(r),!0).forEach(function(n){Bo(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vTe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mF(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,SW(n.key),n)}}function xTe(e,t,r){return t&&mF(e.prototype,t),r&&mF(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function bTe(e,t,r){return t=uv(t),wTe(e,_W()?Reflect.construct(t,r||[],uv(e).constructor):t.apply(e,r))}function wTe(e,t){if(t&&(bd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jTe(e)}function jTe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _W(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_W=function(){return!!e})()}function uv(e){return uv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},uv(e)}function NTe(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&&ik(e,t)}function ik(e,t){return ik=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},ik(e,t)}function Bo(e,t,r){return t=SW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function SW(e){var t=_Te(e,"string");return bd(t)=="symbol"?t:t+""}function _Te(e,t){if(bd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(bd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Fc=(function(e){function t(){var r;vTe(this,t);for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];return r=bTe(this,t,[].concat(i)),Bo(r,"state",{isAnimationFinished:!1}),Bo(r,"id",Dc("recharts-bar-")),Bo(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),o&&o()}),Bo(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),o&&o()}),r}return NTe(t,e),xTe(t,[{key:"renderRectanglesStatically",value:function(n){var i=this,s=this.props,o=s.shape,l=s.dataKey,c=s.activeIndex,d=s.activeBar,u=lt(this.props,!1);return n&&n.map(function(h,m){var g=m===c,b=g?d:o,v=Ir(Ir(Ir({},u),h),{},{isActive:g,option:b,index:m,dataKey:l,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return te.createElement(Ct,cv({className:"recharts-bar-rectangle"},_c(i.props,h,m),{key:"rectangle-".concat(h==null?void 0:h.x,"-").concat(h==null?void 0:h.y,"-").concat(h==null?void 0:h.value,"-").concat(m)}),te.createElement(fF,v))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,i=this.props,s=i.data,o=i.layout,l=i.isAnimationActive,c=i.animationBegin,d=i.animationDuration,u=i.animationEasing,h=i.animationId,m=this.state.prevData;return te.createElement(ki,{begin:c,duration:d,isActive:l,easing:u,from:{t:0},to:{t:1},key:"bar-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(g){var b=g.t,v=s.map(function(y,x){var w=m&&m[x];if(w){var _=Gr(w.x,y.x),j=Gr(w.y,y.y),S=Gr(w.width,y.width),k=Gr(w.height,y.height);return Ir(Ir({},y),{},{x:_(b),y:j(b),width:S(b),height:k(b)})}if(o==="horizontal"){var T=Gr(0,y.height),P=T(b);return Ir(Ir({},y),{},{y:y.y+y.height-P,height:P})}var M=Gr(0,y.width),C=M(b);return Ir(Ir({},y),{},{width:C})});return te.createElement(Ct,null,n.renderRectanglesStatically(v))})}},{key:"renderRectangles",value:function(){var n=this.props,i=n.data,s=n.isAnimationActive,o=this.state.prevData;return s&&i&&i.length&&(!o||!Ac(o,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var n=this,i=this.props,s=i.data,o=i.dataKey,l=i.activeIndex,c=lt(this.props.background,!1);return s.map(function(d,u){d.value;var h=d.background,m=gTe(d,pTe);if(!h)return null;var g=Ir(Ir(Ir(Ir(Ir({},m),{},{fill:"#eee"},h),c),_c(n.props,d,u)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:o,index:u,className:"recharts-bar-background-rectangle"});return te.createElement(fF,cv({key:"background-bar-".concat(u),option:n.props.background,isActive:u===l},g))})}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var s=this.props,o=s.data,l=s.xAxis,c=s.yAxis,d=s.layout,u=s.children,h=Aa(u,Op);if(!h)return null;var m=d==="vertical"?o[0].height/2:o[0].width/2,g=function(y,x){var w=Array.isArray(y.value)?y.value[1]:y.value;return{x:y.x,y:y.y,value:w,errorVal:Cr(y,x)}},b={clipPath:n?"url(#clipPath-".concat(i,")"):null};return te.createElement(Ct,b,h.map(function(v){return te.cloneElement(v,{key:"error-bar-".concat(i,"-").concat(v.props.dataKey),data:o,xAxis:l,yAxis:c,layout:d,offset:m,dataPointFormatter:g})}))}},{key:"render",value:function(){var n=this.props,i=n.hide,s=n.data,o=n.className,l=n.xAxis,c=n.yAxis,d=n.left,u=n.top,h=n.width,m=n.height,g=n.isAnimationActive,b=n.background,v=n.id;if(i||!s||!s.length)return null;var y=this.state.isAnimationFinished,x=bt("recharts-bar",o),w=l&&l.allowDataOverflow,_=c&&c.allowDataOverflow,j=w||_,S=xt(v)?this.id:v;return te.createElement(Ct,{className:x},w||_?te.createElement("defs",null,te.createElement("clipPath",{id:"clipPath-".concat(S)},te.createElement("rect",{x:w?d:d-h/2,y:_?u:u-m/2,width:w?h:h*2,height:_?m:m*2}))):null,te.createElement(Ct,{className:"recharts-bar-rectangles",clipPath:j?"url(#clipPath-".concat(S,")"):null},b?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(j,S),(!g||y)&&Xi.renderCallByParent(this.props,s))}}],[{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}}])})(A.PureComponent);NW=Fc;Bo(Fc,"displayName","Bar");Bo(Fc,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!cl.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Bo(Fc,"getComposedData",function(e){var t=e.props,r=e.item,n=e.barPosition,i=e.bandSize,s=e.xAxis,o=e.yAxis,l=e.xAxisTicks,c=e.yAxisTicks,d=e.stackedData,u=e.dataStartIndex,h=e.displayedData,m=e.offset,g=J_e(n,r);if(!g)return null;var b=t.layout,v=r.type.defaultProps,y=v!==void 0?Ir(Ir({},v),r.props):r.props,x=y.dataKey,w=y.children,_=y.minPointSize,j=b==="horizontal"?o:s,S=d?j.scale.domain():null,k=sSe({numericAxis:j}),T=Aa(w,Lu),P=h.map(function(M,C){var O,D,L,F,U,G;d?O=eSe(d[u+C],S):(O=Cr(M,x),Array.isArray(O)||(O=[k,O]));var W=mTe(_,NW.defaultProps.minPointSize)(O[1],C);if(b==="horizontal"){var q,V=[o.scale(O[0]),o.scale(O[1])],z=V[0],I=V[1];D=F6({axis:s,ticks:l,bandSize:i,offset:g.offset,entry:M,index:C}),L=(q=I??z)!==null&&q!==void 0?q:void 0,F=g.size;var B=z-I;if(U=Number.isNaN(B)?0:B,G={x:D,y:o.y,width:F,height:o.height},Math.abs(W)>0&&Math.abs(U)<Math.abs(W)){var H=Bn(U||W)*(Math.abs(W)-Math.abs(U));L-=H,U+=H}}else{var J=[s.scale(O[0]),s.scale(O[1])],ee=J[0],Y=J[1];if(D=ee,L=F6({axis:o,ticks:c,bandSize:i,offset:g.offset,entry:M,index:C}),F=Y-ee,U=g.size,G={x:s.x,y:L,width:s.width,height:U},Math.abs(W)>0&&Math.abs(F)<Math.abs(W)){var X=Bn(F||W)*(Math.abs(W)-Math.abs(F));F+=X}}return Ir(Ir(Ir({},M),{},{x:D,y:L,width:F,height:U,value:d?O:O[1],payload:M,background:G},T&&T[C]&&T[C].props),{},{tooltipPayload:[QH(r,M)],tooltipPosition:{x:D+F/2,y:L+U/2}})});return Ir({data:P,layout:b},m)});function zm(e){"@babel/helpers - typeof";return zm=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},zm(e)}function STe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pF(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,AW(n.key),n)}}function ATe(e,t,r){return t&&pF(e.prototype,t),r&&pF(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function gF(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 xi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gF(Object(r),!0).forEach(function(n){Lx(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Lx(e,t,r){return t=AW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function AW(e){var t=kTe(e,"string");return zm(t)=="symbol"?t:t+""}function kTe(e,t){if(zm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(zm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xP=function(t,r,n,i,s){var o=t.width,l=t.height,c=t.layout,d=t.children,u=Object.keys(r),h={left:n.left,leftMirror:n.left,right:o-n.right,rightMirror:o-n.right,top:n.top,topMirror:n.top,bottom:l-n.bottom,bottomMirror:l-n.bottom},m=!!va(d,Fc);return u.reduce(function(g,b){var v=r[b],y=v.orientation,x=v.domain,w=v.padding,_=w===void 0?{}:w,j=v.mirror,S=v.reversed,k="".concat(y).concat(j?"Mirror":""),T,P,M,C,O;if(v.type==="number"&&(v.padding==="gap"||v.padding==="no-gap")){var D=x[1]-x[0],L=1/0,F=v.categoricalDomain.sort(z0e);if(F.forEach(function(J,ee){ee>0&&(L=Math.min((J||0)-(F[ee-1]||0),L))}),Number.isFinite(L)){var U=L/D,G=v.layout==="vertical"?n.height:n.width;if(v.padding==="gap"&&(T=U*G/2),v.padding==="no-gap"){var W=Un(t.barCategoryGap,U*G),q=U*G/2;T=q-W-(q-W)/G*W}}}i==="xAxis"?P=[n.left+(_.left||0)+(T||0),n.left+n.width-(_.right||0)-(T||0)]:i==="yAxis"?P=c==="horizontal"?[n.top+n.height-(_.bottom||0),n.top+(_.top||0)]:[n.top+(_.top||0)+(T||0),n.top+n.height-(_.bottom||0)-(T||0)]:P=v.range,S&&(P=[P[1],P[0]]);var V=GH(v,s,m),z=V.scale,I=V.realScaleType;z.domain(x).range(P),KH(z);var B=YH(z,xi(xi({},v),{},{realScaleType:I}));i==="xAxis"?(O=y==="top"&&!j||y==="bottom"&&j,M=n.left,C=h[k]-O*v.height):i==="yAxis"&&(O=y==="left"&&!j||y==="right"&&j,M=h[k]-O*v.width,C=n.top);var H=xi(xi(xi({},v),B),{},{realScaleType:I,x:M,y:C,scale:z,width:i==="xAxis"?n.width:v.width,height:i==="yAxis"?n.height:v.height});return H.bandSize=K0(H,B),!v.hide&&i==="xAxis"?h[k]+=(O?-1:1)*H.height:v.hide||(h[k]+=(O?-1:1)*H.width),xi(xi({},g),{},Lx({},b,H))},{})},kW=function(t,r){var n=t.x,i=t.y,s=r.x,o=r.y;return{x:Math.min(n,s),y:Math.min(i,o),width:Math.abs(s-n),height:Math.abs(o-i)}},ETe=function(t){var r=t.x1,n=t.y1,i=t.x2,s=t.y2;return kW({x:r,y:n},{x:i,y:s})},EW=(function(){function e(t){STe(this,e),this.scale=t}return ATe(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,s=n.position;if(r!==void 0){if(s)switch(s){case"start":return this.scale(r);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+o}case"end":{var l=this.bandwidth?this.bandwidth():0;return this.scale(r)+l}default:return this.scale(r)}if(i){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+c}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),i=n[0],s=n[n.length-1];return i<=s?r>=i&&r<=s:r>=s&&r<=i}}],[{key:"create",value:function(r){return new e(r)}}])})();Lx(EW,"EPS",1e-4);var bP=function(t){var r=Object.keys(t).reduce(function(n,i){return xi(xi({},n),{},Lx({},i,EW.create(t[i])))},{});return xi(xi({},r),{},{apply:function(i){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=s.bandAware,l=s.position;return rTe(i,function(c,d){return r[d].apply(c,{bandAware:o,position:l})})},isInRange:function(i){return jW(i,function(s,o){return r[o].isInRange(s)})}})};function TTe(e){return(e%180+180)%180}var PTe=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=TTe(i),o=s*Math.PI/180,l=Math.atan(n/r),c=o>l&&o<Math.PI-l?n/Math.sin(o):r/Math.cos(o);return Math.abs(c)},SS,yF;function CTe(){if(yF)return SS;yF=1;var e=us(),t=kp(),r=vx();function n(i){return function(s,o,l){var c=Object(s);if(!t(s)){var d=e(o,3);s=r(s),o=function(h){return d(c[h],h,c)}}var u=i(s,o,l);return u>-1?c[d?s[u]:u]:void 0}}return SS=n,SS}var AS,vF;function OTe(){if(vF)return AS;vF=1;var e=vW();function t(r){var n=e(r),i=n%1;return n===n?i?n-i:n:0}return AS=t,AS}var kS,xF;function MTe(){if(xF)return kS;xF=1;var e=kV(),t=us(),r=OTe(),n=Math.max;function i(s,o,l){var c=s==null?0:s.length;if(!c)return-1;var d=l==null?0:r(l);return d<0&&(d=n(c+d,0)),e(s,t(o,3),d)}return kS=i,kS}var ES,bF;function RTe(){if(bF)return ES;bF=1;var e=CTe(),t=MTe(),r=e(t);return ES=r,ES}var DTe=RTe();const ITe=Ht(DTe);var LTe=qz();const $Te=Ht(LTe);var FTe=$Te(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("")}),wP=A.createContext(void 0),jP=A.createContext(void 0),TW=A.createContext(void 0),PW=A.createContext({}),CW=A.createContext(void 0),OW=A.createContext(0),MW=A.createContext(0),wF=function(t){var r=t.state,n=r.xAxisMap,i=r.yAxisMap,s=r.offset,o=t.clipPathId,l=t.children,c=t.width,d=t.height,u=FTe(s);return te.createElement(wP.Provider,{value:n},te.createElement(jP.Provider,{value:i},te.createElement(PW.Provider,{value:s},te.createElement(TW.Provider,{value:u},te.createElement(CW.Provider,{value:o},te.createElement(OW.Provider,{value:d},te.createElement(MW.Provider,{value:c},l)))))))},BTe=function(){return A.useContext(CW)},RW=function(t){var r=A.useContext(wP);r==null&&Ec();var n=r[t];return n==null&&Ec(),n},UTe=function(){var t=A.useContext(wP);return To(t)},qTe=function(){var t=A.useContext(jP),r=ITe(t,function(n){return jW(n.domain,Number.isFinite)});return r||To(t)},DW=function(t){var r=A.useContext(jP);r==null&&Ec();var n=r[t];return n==null&&Ec(),n},zTe=function(){var t=A.useContext(TW);return t},VTe=function(){return A.useContext(PW)},NP=function(){return A.useContext(MW)},_P=function(){return A.useContext(OW)};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 HTe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function WTe(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,LW(n.key),n)}}function GTe(e,t,r){return t&&WTe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function KTe(e,t,r){return t=dv(t),YTe(e,IW()?Reflect.construct(t,r||[],dv(e).constructor):t.apply(e,r))}function YTe(e,t){if(t&&(wd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return XTe(e)}function XTe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function IW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(IW=function(){return!!e})()}function dv(e){return dv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},dv(e)}function QTe(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&&sk(e,t)}function sk(e,t){return sk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},sk(e,t)}function jF(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 NF(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jF(Object(r),!0).forEach(function(n){SP(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function SP(e,t,r){return t=LW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function LW(e){var t=ZTe(e,"string");return wd(t)=="symbol"?t:t+""}function ZTe(e,t){if(wd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(wd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function JTe(e,t){return nPe(e)||rPe(e,t)||tPe(e,t)||ePe()}function ePe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 893In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tPe(e,t){if(e){if(typeof e=="string")return _F(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 _F(e,t)}}function _F(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 rPe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,s,o,l=[],c=!0,d=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(c=(n=s.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(u){d=!0,i=u}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw i}}return l}}function nPe(e){if(Array.isArray(e))return e}function ok(){return ok=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},ok.apply(this,arguments)}var aPe=function(t,r){var n;return te.isValidElement(t)?n=te.cloneElement(t,r):mt(t)?n=t(r):n=te.createElement("line",ok({},r,{className:"recharts-reference-line-line"})),n},iPe=function(t,r,n,i,s,o,l,c,d){var u=s.x,h=s.y,m=s.width,g=s.height;if(n){var b=d.y,v=t.y.apply(b,{position:o});if(Qi(d,"discard")&&!t.y.isInRange(v))return null;var y=[{x:u+m,y:v},{x:u,y:v}];return c==="left"?y.reverse():y}if(r){var x=d.x,w=t.x.apply(x,{position:o});if(Qi(d,"discard")&&!t.x.isInRange(w))return null;var _=[{x:w,y:h+g},{x:w,y:h}];return l==="top"?_.reverse():_}if(i){var j=d.segment,S=j.map(function(k){return t.apply(k,{position:o})});return Qi(d,"discard")&&ZEe(S,function(k){return!t.isInRange(k)})?null:S}return null};function sPe(e){var t=e.x,r=e.y,n=e.segment,i=e.xAxisId,s=e.yAxisId,o=e.shape,l=e.className,c=e.alwaysShow,d=BTe(),u=RW(i),h=DW(s),m=zTe();if(!d||!m)return null;Ni(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var g=bP({x:u.scale,y:h.scale}),b=Yr(t),v=Yr(r),y=n&&n.length===2,x=iPe(g,b,v,y,m,e.position,u.orientation,h.orientation,e);if(!x)return null;var w=JTe(x,2),_=w[0],j=_.x,S=_.y,k=w[1],T=k.x,P=k.y,M=Qi(e,"hidden")?"url(#".concat(d,")"):void 0,C=NF(NF({clipPath:M},lt(e,!0)),{},{x1:j,y1:S,x2:T,y2:P});return te.createElement(Ct,{className:bt("recharts-reference-line",l)},aPe(o,C),an.renderCallByParent(e,ETe({x1:j,y1:S,x2:T,y2:P})))}var $x=(function(e){function t(){return HTe(this,t),KTe(this,t,arguments)}return QTe(t,e),GTe(t,[{key:"render",value:function(){return te.createElement(sPe,this.props)}}])})(te.Component);SP($x,"displayName","ReferenceLine");SP($x,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function lk(){return lk=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},lk.apply(this,arguments)}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 SF(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 AF(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?SF(Object(r),!0).forEach(function(n){Fx(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):SF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oPe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lPe(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,FW(n.key),n)}}function cPe(e,t,r){return t&&lPe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function uPe(e,t,r){return t=fv(t),dPe(e,$W()?Reflect.construct(t,r||[],fv(e).constructor):t.apply(e,r))}function dPe(e,t){if(t&&(jd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fPe(e)}function fPe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $W(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($W=function(){return!!e})()}function fv(e){return fv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},fv(e)}function hPe(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&&ck(e,t)}function ck(e,t){return ck=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},ck(e,t)}function Fx(e,t,r){return t=FW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function FW(e){var t=mPe(e,"string");return jd(t)=="symbol"?t:t+""}function mPe(e,t){if(jd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(jd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var pPe=function(t){var r=t.x,n=t.y,i=t.xAxis,s=t.yAxis,o=bP({x:i.scale,y:s.scale}),l=o.apply({x:r,y:n},{bandAware:!0});return Qi(t,"discard")&&!o.isInRange(l)?null:l},Bx=(function(e){function t(){return oPe(this,t),uPe(this,t,arguments)}return hPe(t,e),cPe(t,[{key:"render",value:function(){var n=this.props,i=n.x,s=n.y,o=n.r,l=n.alwaysShow,c=n.clipPathId,d=Yr(i),u=Yr(s);if(Ni(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!d||!u)return null;var h=pPe(this.props);if(!h)return null;var m=h.x,g=h.y,b=this.props,v=b.shape,y=b.className,x=Qi(this.props,"hidden")?"url(#".concat(c,")"):void 0,w=AF(AF({clipPath:x},lt(this.props,!0)),{},{cx:m,cy:g});return te.createElement(Ct,{className:bt("recharts-reference-dot",y)},t.renderDot(v,w),an.renderCallByParent(this.props,{x:m-o,y:g-o,width:2*o,height:2*o}))}}])})(te.Component);Fx(Bx,"displayName","ReferenceDot");Fx(Bx,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});Fx(Bx,"renderDot",function(e,t){var r;return te.isValidElement(e)?r=te.cloneElement(e,t):mt(e)?r=e(t):r=te.createElement(Mp,lk({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),r});function uk(){return uk=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},uk.apply(this,arguments)}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 kF(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 EF(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kF(Object(r),!0).forEach(function(n){Ux(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gPe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yPe(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,UW(n.key),n)}}function vPe(e,t,r){return t&&yPe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function xPe(e,t,r){return t=hv(t),bPe(e,BW()?Reflect.construct(t,r||[],hv(e).constructor):t.apply(e,r))}function bPe(e,t){if(t&&(Nd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return wPe(e)}function wPe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function BW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(BW=function(){return!!e})()}function hv(e){return hv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},hv(e)}function jPe(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&&dk(e,t)}function dk(e,t){return dk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},dk(e,t)}function Ux(e,t,r){return t=UW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function UW(e){var t=NPe(e,"string");return Nd(t)=="symbol"?t:t+""}function NPe(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 _Pe=function(t,r,n,i,s){var o=s.x1,l=s.x2,c=s.y1,d=s.y2,u=s.xAxis,h=s.yAxis;if(!u||!h)return null;var m=bP({x:u.scale,y:h.scale}),g={x:t?m.x.apply(o,{position:"start"}):m.x.rangeMin,y:n?m.y.apply(c,{position:"start"}):m.y.rangeMin},b={x:r?m.x.apply(l,{position:"end"}):m.x.rangeMax,y:i?m.y.apply(d,{position:"end"}):m.y.rangeMax};return Qi(s,"discard")&&(!m.isInRange(g)||!m.isInRange(b))?null:kW(g,b)},qx=(function(e){function t(){return gPe(this,t),xPe(this,t,arguments)}return jPe(t,e),vPe(t,[{key:"render",value:function(){var n=this.props,i=n.x1,s=n.x2,o=n.y1,l=n.y2,c=n.className,d=n.alwaysShow,u=n.clipPathId;Ni(d===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=Yr(i),m=Yr(s),g=Yr(o),b=Yr(l),v=this.props.shape;if(!h&&!m&&!g&&!b&&!v)return null;var y=_Pe(h,m,g,b,this.props);if(!y&&!v)return null;var x=Qi(this.props,"hidden")?"url(#".concat(u,")"):void 0;return te.createElement(Ct,{className:bt("recharts-reference-area",c)},t.renderRect(v,EF(EF({clipPath:x},lt(this.props,!0)),y)),an.renderCallByParent(this.props,y))}}])})(te.Component);Ux(qx,"displayName","ReferenceArea");Ux(qx,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});Ux(qx,"renderRect",function(e,t){var r;return te.isValidElement(e)?r=te.cloneElement(e,t):mt(e)?r=e(t):r=te.createElement(vP,uk({},t,{className:"recharts-reference-area-rect"})),r});function qW(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 SPe(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return PTe(n,r)}function APe(e,t,r){var n=r==="width",i=e.x,s=e.y,o=e.width,l=e.height;return t===1?{start:n?i:s,end:n?i+o:s+l}:{start:n?i+o:s+l,end:n?i:s}}function mv(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var s=r();return e*(t-e*s/2-n)>=0&&e*(t+e*s/2-i)<=0}function kPe(e,t){return qW(e,t+1)}function EPe(e,t,r,n,i){for(var s=(n||[]).slice(),o=t.start,l=t.end,c=0,d=1,u=o,h=function(){var b=n==null?void 0:n[c];if(b===void 0)return{v:qW(n,d)};var v=c,y,x=function(){return y===void 0&&(y=r(b,v)),y},w=b.coordinate,_=c===0||mv(e,w,x,u,l);_||(c=0,u=o,d+=1),_&&(u=w+e*(x()/2+i),c+=d)},m;d<=s.length;)if(m=h(),m)return m.v;return[]}function Vm(e){"@babel/helpers - typeof";return Vm=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},Vm(e)}function TF(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 kn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?TF(Object(r),!0).forEach(function(n){TPe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):TF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function TPe(e,t,r){return t=PPe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PPe(e){var t=CPe(e,"string");return Vm(t)=="symbol"?t:t+""}function CPe(e,t){if(Vm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Vm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function OPe(e,t,r,n,i){for(var s=(n||[]).slice(),o=s.length,l=t.start,c=t.end,d=function(m){var g=s[m],b,v=function(){return b===void 0&&(b=r(g,m)),b};if(m===o-1){var y=e*(g.coordinate+e*v()/2-c);s[m]=g=kn(kn({},g),{},{tickCoord:y>0?g.coordinate-y*e:g.coordinate})}else s[m]=g=kn(kn({},g),{},{tickCoord:g.coordinate});var x=mv(e,g.tickCoord,v,l,c);x&&(c=g.tickCoord-e*(v()/2+i),s[m]=kn(kn({},g),{},{isShow:!0}))},u=o-1;u>=0;u--)d(u);return s}function MPe(e,t,r,n,i,s){var o=(n||[]).slice(),l=o.length,c=t.start,d=t.end;if(s){var u=n[l-1],h=r(u,l-1),m=e*(u.coordinate+e*h/2-d);o[l-1]=u=kn(kn({},u),{},{tickCoord:m>0?u.coordinate-m*e:u.coordinate});var g=mv(e,u.tickCoord,function(){return h},c,d);g&&(d=u.tickCoord-e*(h/2+i),o[l-1]=kn(kn({},u),{},{isShow:!0}))}for(var b=s?l-1:l,v=function(w){var _=o[w],j,S=function(){return j===void 0&&(j=r(_,w)),j};if(w===0){var k=e*(_.coordinate-e*S()/2-c);o[w]=_=kn(kn({},_),{},{tickCoord:k<0?_.coordinate-k*e:_.coordinate})}else o[w]=_=kn(kn({},_),{},{tickCoord:_.coordinate});var T=mv(e,_.tickCoord,S,c,d);T&&(c=_.tickCoord+e*(S()/2+i),o[w]=kn(kn({},_),{},{isShow:!0}))},y=0;y<b;y++)v(y);return o}function AP(e,t,r){var n=e.tick,i=e.ticks,s=e.viewBox,o=e.minTickGap,l=e.orientation,c=e.interval,d=e.tickFormatter,u=e.unit,h=e.angle;if(!i||!i.length||!n)return[];if(Fe(c)||cl.isSsr)return kPe(i,typeof c=="number"&&Fe(c)?c:0);var m=[],g=l==="top"||l==="bottom"?"width":"height",b=u&&g==="width"?$h(u,{fontSize:t,letterSpacing:r}):{width:0,height:0},v=function(_,j){var S=mt(d)?d(_.value,j):_.value;return g==="width"?SPe($h(S,{fontSize:t,letterSpacing:r}),b,h):$h(S,{fontSize:t,letterSpacing:r})[g]},y=i.length>=2?Bn(i[1].coordinate-i[0].coordinate):1,x=APe(s,y,g);return c==="equidistantPreserveStart"?EPe(y,x,v,i,o):(c==="preserveStart"||c==="preserveStartEnd"?m=MPe(y,x,v,i,o,c==="preserveStartEnd"):m=OPe(y,x,v,i,o),m.filter(function(w){return w.isShow}))}var RPe=["viewBox"],DPe=["viewBox"],IPe=["ticks"];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 Ou(){return Ou=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},Ou.apply(this,arguments)}function PF(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 Hr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?PF(Object(r),!0).forEach(function(n){kP(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):PF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function TS(e,t){if(e==null)return{};var r=LPe(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function LPe(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 $Pe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CF(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,VW(n.key),n)}}function FPe(e,t,r){return t&&CF(e.prototype,t),r&&CF(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function BPe(e,t,r){return t=pv(t),UPe(e,zW()?Reflect.construct(t,r||[],pv(e).constructor):t.apply(e,r))}function UPe(e,t){if(t&&(_d(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qPe(e)}function qPe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(zW=function(){return!!e})()}function pv(e){return pv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},pv(e)}function zPe(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&&fk(e,t)}function fk(e,t){return fk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},fk(e,t)}function kP(e,t,r){return t=VW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function VW(e){var t=VPe(e,"string");return _d(t)=="symbol"?t:t+""}function VPe(e,t){if(_d(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(_d(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var cf=(function(e){function t(r){var n;return $Pe(this,t),n=BPe(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return zPe(t,e),FPe(t,[{key:"shouldComponentUpdate",value:function(n,i){var s=n.viewBox,o=TS(n,RPe),l=this.props,c=l.viewBox,d=TS(l,DPe);return!Iu(s,c)||!Iu(o,d)||!Iu(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,s=i.x,o=i.y,l=i.width,c=i.height,d=i.orientation,u=i.tickSize,h=i.mirror,m=i.tickMargin,g,b,v,y,x,w,_=h?-1:1,j=n.tickSize||u,S=Fe(n.tickCoord)?n.tickCoord:n.coordinate;switch(d){case"top":g=b=n.coordinate,y=o+ +!h*c,v=y-_*j,w=v-_*m,x=S;break;case"left":v=y=n.coordinate,b=s+ +!h*l,g=b-_*j,x=g-_*m,w=S;break;case"right":v=y=n.coordinate,b=s+ +h*l,g=b+_*j,x=g+_*m,w=S;break;default:g=b=n.coordinate,y=o+ +h*c,v=y+_*j,w=v+_*m,x=S;break}return{line:{x1:g,y1:v,x2:b,y2:y},tick:{x,y:w}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,i=n.orientation,s=n.mirror,o;switch(i){case"left":o=s?"start":"end";break;case"right":o=s?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,i=n.orientation,s=n.mirror,o="end";switch(i){case"left":case"right":o="middle";break;case"top":o=s?"start":"end";break;default:o=s?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.x,s=n.y,o=n.width,l=n.height,c=n.orientation,d=n.mirror,u=n.axisLine,h=Hr(Hr(Hr({},lt(this.props,!1)),lt(u,!1)),{},{fill:"none"});if(c==="top"||c==="bottom"){var m=+(c==="top"&&!d||c==="bottom"&&d);h=Hr(Hr({},h),{},{x1:i,y1:s+m*l,x2:i+o,y2:s+m*l})}else{var g=+(c==="left"&&!d||c==="right"&&d);h=Hr(Hr({},h),{},{x1:i+g*o,y1:s,x2:i+g*o,y2:s+l})}return te.createElement("line",Ou({},h,{className:bt("recharts-cartesian-axis-line",Sa(u,"className"))}))}},{key:"renderTicks",value:function(n,i,s){var o=this,l=this.props,c=l.tickLine,d=l.stroke,u=l.tick,h=l.tickFormatter,m=l.unit,g=AP(Hr(Hr({},this.props),{},{ticks:n}),i,s),b=this.getTickTextAnchor(),v=this.getTickVerticalAnchor(),y=lt(this.props,!1),x=lt(u,!1),w=Hr(Hr({},y),{},{fill:"none"},lt(c,!1)),_=g.map(function(j,S){var k=o.getTickLineCoord(j),T=k.line,P=k.tick,M=Hr(Hr(Hr(Hr({textAnchor:b,verticalAnchor:v},y),{},{stroke:"none",fill:d},x),P),{},{index:S,payload:j,visibleTicksCount:g.length,tickFormatter:h});return te.createElement(Ct,Ou({className:"recharts-cartesian-axis-tick",key:"tick-".concat(j.value,"-").concat(j.coordinate,"-").concat(j.tickCoord)},_c(o.props,j,S)),c&&te.createElement("line",Ou({},w,T,{className:bt("recharts-cartesian-axis-tick-line",Sa(c,"className"))})),u&&t.renderTickItem(u,M,"".concat(mt(h)?h(j.value,S):j.value).concat(m||"")))});return te.createElement("g",{className:"recharts-cartesian-axis-ticks"},_)}},{key:"render",value:function(){var n=this,i=this.props,s=i.axisLine,o=i.width,l=i.height,c=i.ticksGenerator,d=i.className,u=i.hide;if(u)return null;var h=this.props,m=h.ticks,g=TS(h,IPe),b=m;return mt(c)&&(b=m&&m.length>0?c(this.props):c(g)),o<=0||l<=0||!b||!b.length?null:te.createElement(Ct,{className:bt("recharts-cartesian-axis",d),ref:function(y){n.layerReference=y}},s&&this.renderAxisLine(),this.renderTicks(b,this.state.fontSize,this.state.letterSpacing),an.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,s){var o,l=bt(i.className,"recharts-cartesian-axis-tick-value");return te.isValidElement(n)?o=te.cloneElement(n,Hr(Hr({},i),{},{className:l})):mt(n)?o=n(Hr(Hr({},i),{},{className:l})):o=te.createElement(Sc,Ou({},i,{className:"recharts-cartesian-axis-tick-value"}),s),o}}])})(A.Component);kP(cf,"displayName","CartesianAxis");kP(cf,"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 HPe=["x1","y1","x2","y2","key"],WPe=["offset"];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 OF(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?OF(Object(r),!0).forEach(function(n){GPe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):OF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function GPe(e,t,r){return t=KPe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function KPe(e){var t=YPe(e,"string");return Tc(t)=="symbol"?t:t+""}function YPe(e,t){if(Tc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Tc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Gl(){return Gl=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},Gl.apply(this,arguments)}function MF(e,t){if(e==null)return{};var r=XPe(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function XPe(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 QPe=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,i=t.x,s=t.y,o=t.width,l=t.height,c=t.ry;return te.createElement("rect",{x:i,y:s,ry:c,width:o,height:l,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function HW(e,t){var r;if(te.isValidElement(e))r=te.cloneElement(e,t);else if(mt(e))r=e(t);else{var n=t.x1,i=t.y1,s=t.x2,o=t.y2,l=t.key,c=MF(t,HPe),d=lt(c,!1);d.offset;var u=MF(d,WPe);r=te.createElement("line",Gl({},u,{x1:n,y1:i,x2:s,y2:o,fill:"none",key:l}))}return r}function ZPe(e){var t=e.x,r=e.width,n=e.horizontal,i=n===void 0?!0:n,s=e.horizontalPoints;if(!i||!s||!s.length)return null;var o=s.map(function(l,c){var d=Tn(Tn({},e),{},{x1:t,y1:l,x2:t+r,y2:l,key:"line-".concat(c),index:c});return HW(i,d)});return te.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function JPe(e){var t=e.y,r=e.height,n=e.vertical,i=n===void 0?!0:n,s=e.verticalPoints;if(!i||!s||!s.length)return null;var o=s.map(function(l,c){var d=Tn(Tn({},e),{},{x1:l,y1:t,x2:l,y2:t+r,key:"line-".concat(c),index:c});return HW(i,d)});return te.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function eCe(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,s=e.width,o=e.height,l=e.horizontalPoints,c=e.horizontal,d=c===void 0?!0:c;if(!d||!t||!t.length)return null;var u=l.map(function(m){return Math.round(m+i-i)}).sort(function(m,g){return m-g});i!==u[0]&&u.unshift(0);var h=u.map(function(m,g){var b=!u[g+1],v=b?i+o-m:u[g+1]-m;if(v<=0)return null;var y=g%t.length;return te.createElement("rect",{key:"react-".concat(g),y:m,x:n,height:v,width:s,stroke:"none",fill:t[y],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return te.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},h)}function tCe(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,s=e.x,o=e.y,l=e.width,c=e.height,d=e.verticalPoints;if(!r||!n||!n.length)return null;var u=d.map(function(m){return Math.round(m+s-s)}).sort(function(m,g){return m-g});s!==u[0]&&u.unshift(0);var h=u.map(function(m,g){var b=!u[g+1],v=b?s+l-m:u[g+1]-m;if(v<=0)return null;var y=g%n.length;return te.createElement("rect",{key:"react-".concat(g),x:m,y:o,width:v,height:c,stroke:"none",fill:n[y],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return te.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},h)}var rCe=function(t,r){var n=t.xAxis,i=t.width,s=t.height,o=t.offset;return WH(AP(Tn(Tn(Tn({},cf.defaultProps),n),{},{ticks:Ms(n,!0),viewBox:{x:0,y:0,width:i,height:s}})),o.left,o.left+o.width,r)},nCe=function(t,r){var n=t.yAxis,i=t.width,s=t.height,o=t.offset;return WH(AP(Tn(Tn(Tn({},cf.defaultProps),n),{},{ticks:Ms(n,!0),viewBox:{x:0,y:0,width:i,height:s}})),o.top,o.top+o.height,r)},bu={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Sd(e){var t,r,n,i,s,o,l=NP(),c=_P(),d=VTe(),u=Tn(Tn({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:bu.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:bu.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:bu.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:bu.horizontalFill,vertical:(s=e.vertical)!==null&&s!==void 0?s:bu.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:bu.verticalFill,x:Fe(e.x)?e.x:d.left,y:Fe(e.y)?e.y:d.top,width:Fe(e.width)?e.width:d.width,height:Fe(e.height)?e.height:d.height}),h=u.x,m=u.y,g=u.width,b=u.height,v=u.syncWithTicks,y=u.horizontalValues,x=u.verticalValues,w=UTe(),_=qTe();if(!Fe(g)||g<=0||!Fe(b)||b<=0||!Fe(h)||h!==+h||!Fe(m)||m!==+m)return null;var j=u.verticalCoordinatesGenerator||rCe,S=u.horizontalCoordinatesGenerator||nCe,k=u.horizontalPoints,T=u.verticalPoints;if((!k||!k.length)&&mt(S)){var P=y&&y.length,M=S({yAxis:_?Tn(Tn({},_),{},{ticks:P?y:_.ticks}):void 0,width:l,height:c,offset:d},P?!0:v);Ni(Array.isArray(M),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Tc(M),"]")),Array.isArray(M)&&(k=M)}if((!T||!T.length)&&mt(j)){var C=x&&x.length,O=j({xAxis:w?Tn(Tn({},w),{},{ticks:C?x:w.ticks}):void 0,width:l,height:c,offset:d},C?!0:v);Ni(Array.isArray(O),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Tc(O),"]")),Array.isArray(O)&&(T=O)}return te.createElement("g",{className:"recharts-cartesian-grid"},te.createElement(QPe,{fill:u.fill,fillOpacity:u.fillOpacity,x:u.x,y:u.y,width:u.width,height:u.height,ry:u.ry}),te.createElement(ZPe,Gl({},u,{offset:d,horizontalPoints:k,xAxis:w,yAxis:_})),te.createElement(JPe,Gl({},u,{offset:d,verticalPoints:T,xAxis:w,yAxis:_})),te.createElement(eCe,Gl({},u,{horizontalPoints:k})),te.createElement(tCe,Gl({},u,{verticalPoints:T})))}Sd.displayName="CartesianGrid";var aCe=["type","layout","connectNulls","ref"],iCe=["key"];function Ad(e){"@babel/helpers - typeof";return Ad=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},Ad(e)}function RF(e,t){if(e==null)return{};var r=sCe(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function sCe(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 Vh(){return Vh=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},Vh.apply(this,arguments)}function DF(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 ma(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?DF(Object(r),!0).forEach(function(n){bi(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):DF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function wu(e){return uCe(e)||cCe(e)||lCe(e)||oCe()}function oCe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 894In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lCe(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 cCe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function uCe(e){if(Array.isArray(e))return hk(e)}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 dCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IF(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,GW(n.key),n)}}function fCe(e,t,r){return t&&IF(e.prototype,t),r&&IF(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function hCe(e,t,r){return t=gv(t),mCe(e,WW()?Reflect.construct(t,r||[],gv(e).constructor):t.apply(e,r))}function mCe(e,t){if(t&&(Ad(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 WW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(WW=function(){return!!e})()}function gv(e){return gv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},gv(e)}function gCe(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&&mk(e,t)}function mk(e,t){return mk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},mk(e,t)}function bi(e,t,r){return t=GW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function GW(e){var t=yCe(e,"string");return Ad(t)=="symbol"?t:t+""}function yCe(e,t){if(Ad(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ad(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Bc=(function(e){function t(){var r;dCe(this,t);for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];return r=hCe(this,t,[].concat(i)),bi(r,"state",{isAnimationFinished:!0,totalLength:0}),bi(r,"generateSimpleStrokeDasharray",function(o,l){return"".concat(l,"px ").concat(o-l,"px")}),bi(r,"getStrokeDasharray",function(o,l,c){var d=c.reduce(function(x,w){return x+w});if(!d)return r.generateSimpleStrokeDasharray(l,o);for(var u=Math.floor(o/d),h=o%d,m=l-o,g=[],b=0,v=0;b<c.length;v+=c[b],++b)if(v+c[b]>h){g=[].concat(wu(c.slice(0,b)),[h-v]);break}var y=g.length%2===0?[0,m]:[m];return[].concat(wu(t.repeat(c,u)),wu(g),y).map(function(x){return"".concat(x,"px")}).join(", ")}),bi(r,"id",Dc("recharts-line-")),bi(r,"pathRef",function(o){r.mainCurve=o}),bi(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),bi(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return gCe(t,e),fCe(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 s=this.props,o=s.points,l=s.xAxis,c=s.yAxis,d=s.layout,u=s.children,h=Aa(u,Op);if(!h)return null;var m=function(v,y){return{x:v.x,y:v.y,value:v.value,errorVal:Cr(v.payload,y)}},g={clipPath:n?"url(#clipPath-".concat(i,")"):null};return te.createElement(Ct,g,h.map(function(b){return te.cloneElement(b,{key:"bar-".concat(b.props.dataKey),data:o,xAxis:l,yAxis:c,layout:d,dataPointFormatter:m})}))}},{key:"renderDots",value:function(n,i,s){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var l=this.props,c=l.dot,d=l.points,u=l.dataKey,h=lt(this.props,!1),m=lt(c,!0),g=d.map(function(v,y){var x=ma(ma(ma({key:"dot-".concat(y),r:3},h),m),{},{index:y,cx:v.x,cy:v.y,value:v.value,dataKey:u,payload:v.payload,points:d});return t.renderDotItem(c,x)}),b={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(s,")"):null};return te.createElement(Ct,Vh({className:"recharts-line-dots",key:"dots"},b),g)}},{key:"renderCurveStatically",value:function(n,i,s,o){var l=this.props,c=l.type,d=l.layout,u=l.connectNulls;l.ref;var h=RF(l,aCe),m=ma(ma(ma({},lt(h,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(s,")"):null,points:n},o),{},{type:c,layout:d,connectNulls:u});return te.createElement(uc,Vh({},m,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,i){var s=this,o=this.props,l=o.points,c=o.strokeDasharray,d=o.isAnimationActive,u=o.animationBegin,h=o.animationDuration,m=o.animationEasing,g=o.animationId,b=o.animateNewValues,v=o.width,y=o.height,x=this.state,w=x.prevPoints,_=x.totalLength;return te.createElement(ki,{begin:u,duration:h,isActive:d,easing:m,from:{t:0},to:{t:1},key:"line-".concat(g),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(j){var S=j.t;if(w){var k=w.length/l.length,T=l.map(function(D,L){var F=Math.floor(L*k);if(w[F]){var U=w[F],G=Gr(U.x,D.x),W=Gr(U.y,D.y);return ma(ma({},D),{},{x:G(S),y:W(S)})}if(b){var q=Gr(v*2,D.x),V=Gr(y/2,D.y);return ma(ma({},D),{},{x:q(S),y:V(S)})}return ma(ma({},D),{},{x:D.x,y:D.y})});return s.renderCurveStatically(T,n,i)}var P=Gr(0,_),M=P(S),C;if(c){var O="".concat(c).split(/[,\s]+/gim).map(function(D){return parseFloat(D)});C=s.getStrokeDasharray(M,_,O)}else C=s.generateSimpleStrokeDasharray(_,M);return s.renderCurveStatically(l,n,i,{strokeDasharray:C})})}},{key:"renderCurve",value:function(n,i){var s=this.props,o=s.points,l=s.isAnimationActive,c=this.state,d=c.prevPoints,u=c.totalLength;return l&&o&&o.length&&(!d&&u>0||!Ac(d,o))?this.renderCurveWithAnimation(n,i):this.renderCurveStatically(o,n,i)}},{key:"render",value:function(){var n,i=this.props,s=i.hide,o=i.dot,l=i.points,c=i.className,d=i.xAxis,u=i.yAxis,h=i.top,m=i.left,g=i.width,b=i.height,v=i.isAnimationActive,y=i.id;if(s||!l||!l.length)return null;var x=this.state.isAnimationFinished,w=l.length===1,_=bt("recharts-line",c),j=d&&d.allowDataOverflow,S=u&&u.allowDataOverflow,k=j||S,T=xt(y)?this.id:y,P=(n=lt(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},M=P.r,C=M===void 0?3:M,O=P.strokeWidth,D=O===void 0?2:O,L=Gz(o)?o:{},F=L.clipDot,U=F===void 0?!0:F,G=C*2+D;return te.createElement(Ct,{className:_},j||S?te.createElement("defs",null,te.createElement("clipPath",{id:"clipPath-".concat(T)},te.createElement("rect",{x:j?m:m-g/2,y:S?h:h-b/2,width:j?g:g*2,height:S?b:b*2})),!U&&te.createElement("clipPath",{id:"clipPath-dots-".concat(T)},te.createElement("rect",{x:m-G/2,y:h-G/2,width:g+G,height:b+G}))):null,!w&&this.renderCurve(k,T),this.renderErrorBar(k,T),(w||o)&&this.renderDots(k,U,T),(!v||x)&&Xi.renderCallByParent(this.props,l))}}],[{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 s=n.length%2!==0?[].concat(wu(n),[0]):n,o=[],l=0;l<i;++l)o=[].concat(wu(o),wu(s));return o}},{key:"renderDotItem",value:function(n,i){var s;if(te.isValidElement(n))s=te.cloneElement(n,i);else if(mt(n))s=n(i);else{var o=i.key,l=RF(i,iCe),c=bt("recharts-line-dot",typeof n!="boolean"?n.className:"");s=te.createElement(Mp,Vh({key:o},l,{className:c}))}return s}}])})(A.PureComponent);bi(Bc,"displayName","Line");bi(Bc,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!cl.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});bi(Bc,"getComposedData",function(e){var t=e.props,r=e.xAxis,n=e.yAxis,i=e.xAxisTicks,s=e.yAxisTicks,o=e.dataKey,l=e.bandSize,c=e.displayedData,d=e.offset,u=t.layout,h=c.map(function(m,g){var b=Cr(m,o);return u==="horizontal"?{x:G0({axis:r,ticks:i,bandSize:l,entry:m,index:g}),y:xt(b)?null:n.scale(b),value:b,payload:m}:{x:xt(b)?null:r.scale(b),y:G0({axis:n,ticks:s,bandSize:l,entry:m,index:g}),value:b,payload:m}});return ma({points:h,layout:u},d)});var vCe=["layout","type","stroke","connectNulls","isRange","ref"],xCe=["key"],KW;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 YW(e,t){if(e==null)return{};var r=bCe(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function bCe(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 Kl(){return Kl=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},Kl.apply(this,arguments)}function LF(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 Ao(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?LF(Object(r),!0).forEach(function(n){Vi(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):LF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function wCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $F(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,QW(n.key),n)}}function jCe(e,t,r){return t&&$F(e.prototype,t),r&&$F(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function NCe(e,t,r){return t=yv(t),_Ce(e,XW()?Reflect.construct(t,r||[],yv(e).constructor):t.apply(e,r))}function _Ce(e,t){if(t&&(kd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return SCe(e)}function SCe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function XW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(XW=function(){return!!e})()}function yv(e){return yv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},yv(e)}function ACe(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&&pk(e,t)}function pk(e,t){return pk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},pk(e,t)}function Vi(e,t,r){return t=QW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function QW(e){var t=kCe(e,"string");return kd(t)=="symbol"?t:t+""}function kCe(e,t){if(kd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(kd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var hl=(function(e){function t(){var r;wCe(this,t);for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];return r=NCe(this,t,[].concat(i)),Vi(r,"state",{isAnimationFinished:!0}),Vi(r,"id",Dc("recharts-area-")),Vi(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),mt(o)&&o()}),Vi(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),mt(o)&&o()}),r}return ACe(t,e),jCe(t,[{key:"renderDots",value:function(n,i,s){var o=this.props.isAnimationActive,l=this.state.isAnimationFinished;if(o&&!l)return null;var c=this.props,d=c.dot,u=c.points,h=c.dataKey,m=lt(this.props,!1),g=lt(d,!0),b=u.map(function(y,x){var w=Ao(Ao(Ao({key:"dot-".concat(x),r:3},m),g),{},{index:x,cx:y.x,cy:y.y,dataKey:h,value:y.value,payload:y.payload,points:u});return t.renderDotItem(d,w)}),v={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(s,")"):null};return te.createElement(Ct,Kl({className:"recharts-area-dots"},v),b)}},{key:"renderHorizontalRect",value:function(n){var i=this.props,s=i.baseLine,o=i.points,l=i.strokeWidth,c=o[0].x,d=o[o.length-1].x,u=n*Math.abs(c-d),h=Fo(o.map(function(m){return m.y||0}));return Fe(s)&&typeof s=="number"?h=Math.max(s,h):s&&Array.isArray(s)&&s.length&&(h=Math.max(Fo(s.map(function(m){return m.y||0})),h)),Fe(h)?te.createElement("rect",{x:c<d?c:c-u,y:0,width:u,height:Math.floor(h+(l?parseInt("".concat(l),10):1))}):null}},{key:"renderVerticalRect",value:function(n){var i=this.props,s=i.baseLine,o=i.points,l=i.strokeWidth,c=o[0].y,d=o[o.length-1].y,u=n*Math.abs(c-d),h=Fo(o.map(function(m){return m.x||0}));return Fe(s)&&typeof s=="number"?h=Math.max(s,h):s&&Array.isArray(s)&&s.length&&(h=Math.max(Fo(s.map(function(m){return m.x||0})),h)),Fe(h)?te.createElement("rect",{x:0,y:c<d?c:c-u,width:h+(l?parseInt("".concat(l),10):1),height:Math.floor(u)}):null}},{key:"renderClipRect",value:function(n){var i=this.props.layout;return i==="vertical"?this.renderVerticalRect(n):this.renderHorizontalRect(n)}},{key:"renderAreaStatically",value:function(n,i,s,o){var l=this.props,c=l.layout,d=l.type,u=l.stroke,h=l.connectNulls,m=l.isRange;l.ref;var g=YW(l,vCe);return te.createElement(Ct,{clipPath:s?"url(#clipPath-".concat(o,")"):null},te.createElement(uc,Kl({},lt(g,!0),{points:n,connectNulls:h,type:d,baseLine:i,layout:c,stroke:"none",className:"recharts-area-area"})),u!=="none"&&te.createElement(uc,Kl({},lt(this.props,!1),{className:"recharts-area-curve",layout:c,type:d,connectNulls:h,fill:"none",points:n})),u!=="none"&&m&&te.createElement(uc,Kl({},lt(this.props,!1),{className:"recharts-area-curve",layout:c,type:d,connectNulls:h,fill:"none",points:i})))}},{key:"renderAreaWithAnimation",value:function(n,i){var s=this,o=this.props,l=o.points,c=o.baseLine,d=o.isAnimationActive,u=o.animationBegin,h=o.animationDuration,m=o.animationEasing,g=o.animationId,b=this.state,v=b.prevPoints,y=b.prevBaseLine;return te.createElement(ki,{begin:u,duration:h,isActive:d,easing:m,from:{t:0},to:{t:1},key:"area-".concat(g),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(x){var w=x.t;if(v){var _=v.length/l.length,j=l.map(function(P,M){var C=Math.floor(M*_);if(v[C]){var O=v[C],D=Gr(O.x,P.x),L=Gr(O.y,P.y);return Ao(Ao({},P),{},{x:D(w),y:L(w)})}return P}),S;if(Fe(c)&&typeof c=="number"){var k=Gr(y,c);S=k(w)}else if(xt(c)||nf(c)){var T=Gr(y,0);S=T(w)}else S=c.map(function(P,M){var C=Math.floor(M*_);if(y[C]){var O=y[C],D=Gr(O.x,P.x),L=Gr(O.y,P.y);return Ao(Ao({},P),{},{x:D(w),y:L(w)})}return P});return s.renderAreaStatically(j,S,n,i)}return te.createElement(Ct,null,te.createElement("defs",null,te.createElement("clipPath",{id:"animationClipPath-".concat(i)},s.renderClipRect(w))),te.createElement(Ct,{clipPath:"url(#animationClipPath-".concat(i,")")},s.renderAreaStatically(l,c,n,i)))})}},{key:"renderArea",value:function(n,i){var s=this.props,o=s.points,l=s.baseLine,c=s.isAnimationActive,d=this.state,u=d.prevPoints,h=d.prevBaseLine,m=d.totalLength;return c&&o&&o.length&&(!u&&m>0||!Ac(u,o)||!Ac(h,l))?this.renderAreaWithAnimation(n,i):this.renderAreaStatically(o,l,n,i)}},{key:"render",value:function(){var n,i=this.props,s=i.hide,o=i.dot,l=i.points,c=i.className,d=i.top,u=i.left,h=i.xAxis,m=i.yAxis,g=i.width,b=i.height,v=i.isAnimationActive,y=i.id;if(s||!l||!l.length)return null;var x=this.state.isAnimationFinished,w=l.length===1,_=bt("recharts-area",c),j=h&&h.allowDataOverflow,S=m&&m.allowDataOverflow,k=j||S,T=xt(y)?this.id:y,P=(n=lt(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},M=P.r,C=M===void 0?3:M,O=P.strokeWidth,D=O===void 0?2:O,L=Gz(o)?o:{},F=L.clipDot,U=F===void 0?!0:F,G=C*2+D;return te.createElement(Ct,{className:_},j||S?te.createElement("defs",null,te.createElement("clipPath",{id:"clipPath-".concat(T)},te.createElement("rect",{x:j?u:u-g/2,y:S?d:d-b/2,width:j?g:g*2,height:S?b:b*2})),!U&&te.createElement("clipPath",{id:"clipPath-dots-".concat(T)},te.createElement("rect",{x:u-G/2,y:d-G/2,width:g+G,height:b+G}))):null,w?null:this.renderArea(k,T),(o||w)&&this.renderDots(k,U,T),(!v||x)&&Xi.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,curBaseLine:n.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:n.points!==i.curPoints||n.baseLine!==i.curBaseLine?{curPoints:n.points,curBaseLine:n.baseLine}:null}}])})(A.PureComponent);KW=hl;Vi(hl,"displayName","Area");Vi(hl,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!cl.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Vi(hl,"getBaseValue",function(e,t,r,n){var i=e.layout,s=e.baseValue,o=t.props.baseValue,l=o??s;if(Fe(l)&&typeof l=="number")return l;var c=i==="horizontal"?n:r,d=c.scale.domain();if(c.type==="number"){var u=Math.max(d[0],d[1]),h=Math.min(d[0],d[1]);return l==="dataMin"?h:l==="dataMax"||u<0?u:Math.max(Math.min(d[0],d[1]),0)}return l==="dataMin"?d[0]:l==="dataMax"?d[1]:d[0]});Vi(hl,"getComposedData",function(e){var t=e.props,r=e.item,n=e.xAxis,i=e.yAxis,s=e.xAxisTicks,o=e.yAxisTicks,l=e.bandSize,c=e.dataKey,d=e.stackedData,u=e.dataStartIndex,h=e.displayedData,m=e.offset,g=t.layout,b=d&&d.length,v=KW.getBaseValue(t,r,n,i),y=g==="horizontal",x=!1,w=h.map(function(j,S){var k;b?k=d[u+S]:(k=Cr(j,c),Array.isArray(k)?x=!0:k=[v,k]);var T=k[1]==null||b&&Cr(j,c)==null;return y?{x:G0({axis:n,ticks:s,bandSize:l,entry:j,index:S}),y:T?null:i.scale(k[1]),value:k,payload:j}:{x:T?null:n.scale(k[1]),y:G0({axis:i,ticks:o,bandSize:l,entry:j,index:S}),value:k,payload:j}}),_;return b||x?_=w.map(function(j){var S=Array.isArray(j.value)?j.value[0]:null;return y?{x:j.x,y:S!=null&&j.y!=null?i.scale(S):null}:{x:S!=null?n.scale(S):null,y:j.y}}):_=y?i.scale(v):n.scale(v),Ao({points:w,baseLine:_,layout:g,isRange:x},m)});Vi(hl,"renderDotItem",function(e,t){var r;if(te.isValidElement(e))r=te.cloneElement(e,t);else if(mt(e))r=e(t);else{var n=bt("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,s=YW(t,xCe);r=te.createElement(Mp,Kl({},s,{key:i,className:n}))}return r});function Ed(e){"@babel/helpers - typeof";return Ed=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},Ed(e)}function ECe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TCe(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,eG(n.key),n)}}function PCe(e,t,r){return t&&TCe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function CCe(e,t,r){return t=vv(t),OCe(e,ZW()?Reflect.construct(t,r||[],vv(e).constructor):t.apply(e,r))}function OCe(e,t){if(t&&(Ed(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return MCe(e)}function MCe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ZW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ZW=function(){return!!e})()}function vv(e){return vv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},vv(e)}function RCe(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&&gk(e,t)}function gk(e,t){return gk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},gk(e,t)}function JW(e,t,r){return t=eG(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eG(e){var t=DCe(e,"string");return Ed(t)=="symbol"?t:t+""}function DCe(e,t){if(Ed(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ed(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function yk(){return yk=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},yk.apply(this,arguments)}function ICe(e){var t=e.xAxisId,r=NP(),n=_P(),i=RW(t);return i==null?null:A.createElement(cf,yk({},i,{className:bt("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(o){return Ms(o,!0)}}))}var as=(function(e){function t(){return ECe(this,t),CCe(this,t,arguments)}return RCe(t,e),PCe(t,[{key:"render",value:function(){return A.createElement(ICe,this.props)}}])})(A.Component);JW(as,"displayName","XAxis");JW(as,"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 Td(e){"@babel/helpers - typeof";return Td=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},Td(e)}function LCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $Ce(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,nG(n.key),n)}}function FCe(e,t,r){return t&&$Ce(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function BCe(e,t,r){return t=xv(t),UCe(e,tG()?Reflect.construct(t,r||[],xv(e).constructor):t.apply(e,r))}function UCe(e,t){if(t&&(Td(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qCe(e)}function qCe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(tG=function(){return!!e})()}function xv(e){return xv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},xv(e)}function zCe(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&&vk(e,t)}function vk(e,t){return vk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},vk(e,t)}function rG(e,t,r){return t=nG(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nG(e){var t=VCe(e,"string");return Td(t)=="symbol"?t:t+""}function VCe(e,t){if(Td(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Td(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function xk(){return xk=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},xk.apply(this,arguments)}var HCe=function(t){var r=t.yAxisId,n=NP(),i=_P(),s=DW(r);return s==null?null:A.createElement(cf,xk({},s,{className:bt("recharts-".concat(s.axisType," ").concat(s.axisType),s.className),viewBox:{x:0,y:0,width:n,height:i},ticksGenerator:function(l){return Ms(l,!0)}}))},is=(function(e){function t(){return LCe(this,t),BCe(this,t,arguments)}return zCe(t,e),FCe(t,[{key:"render",value:function(){return A.createElement(HCe,this.props)}}])})(A.Component);rG(is,"displayName","YAxis");rG(is,"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 FF(e){return YCe(e)||KCe(e)||GCe(e)||WCe()}function WCe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 895In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GCe(e,t){if(e){if(typeof e=="string")return bk(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 bk(e,t)}}function KCe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function YCe(e){if(Array.isArray(e))return bk(e)}function bk(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 wk=function(t,r,n,i,s){var o=Aa(t,$x),l=Aa(t,Bx),c=[].concat(FF(o),FF(l)),d=Aa(t,qx),u="".concat(i,"Id"),h=i[0],m=r;if(c.length&&(m=c.reduce(function(v,y){if(y.props[u]===n&&Qi(y.props,"extendDomain")&&Fe(y.props[h])){var x=y.props[h];return[Math.min(v[0],x),Math.max(v[1],x)]}return v},m)),d.length){var g="".concat(h,"1"),b="".concat(h,"2");m=d.reduce(function(v,y){if(y.props[u]===n&&Qi(y.props,"extendDomain")&&Fe(y.props[g])&&Fe(y.props[b])){var x=y.props[g],w=y.props[b];return[Math.min(v[0],x,w),Math.max(v[1],x,w)]}return v},m)}return s&&s.length&&(m=s.reduce(function(v,y){return Fe(y)?[Math.min(v[0],y),Math.max(v[1],y)]:v},m)),m},PS={exports:{}},BF;function XCe(){return BF||(BF=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(c,d,u){this.fn=c,this.context=d,this.once=u||!1}function s(c,d,u,h,m){if(typeof u!="function")throw new TypeError("The listener must be a function");var g=new i(u,h||c,m),b=r?r+d:d;return c._events[b]?c._events[b].fn?c._events[b]=[c._events[b],g]:c._events[b].push(g):(c._events[b]=g,c._eventsCount++),c}function o(c,d){--c._eventsCount===0?c._events=new n:delete c._events[d]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var d=[],u,h;if(this._eventsCount===0)return d;for(h in u=this._events)t.call(u,h)&&d.push(r?h.slice(1):h);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(u)):d},l.prototype.listeners=function(d){var u=r?r+d:d,h=this._events[u];if(!h)return[];if(h.fn)return[h.fn];for(var m=0,g=h.length,b=new Array(g);m<g;m++)b[m]=h[m].fn;return b},l.prototype.listenerCount=function(d){var u=r?r+d:d,h=this._events[u];return h?h.fn?1:h.length:0},l.prototype.emit=function(d,u,h,m,g,b){var v=r?r+d:d;if(!this._events[v])return!1;var y=this._events[v],x=arguments.length,w,_;if(y.fn){switch(y.once&&this.removeListener(d,y.fn,void 0,!0),x){case 1:return y.fn.call(y.context),!0;case 2:return y.fn.call(y.context,u),!0;case 3:return y.fn.call(y.context,u,h),!0;case 4:return y.fn.call(y.context,u,h,m),!0;case 5:return y.fn.call(y.context,u,h,m,g),!0;case 6:return y.fn.call(y.context,u,h,m,g,b),!0}for(_=1,w=new Array(x-1);_<x;_++)w[_-1]=arguments[_];y.fn.apply(y.context,w)}else{var j=y.length,S;for(_=0;_<j;_++)switch(y[_].once&&this.removeListener(d,y[_].fn,void 0,!0),x){case 1:y[_].fn.call(y[_].context);break;case 2:y[_].fn.call(y[_].context,u);break;case 3:y[_].fn.call(y[_].context,u,h);break;case 4:y[_].fn.call(y[_].context,u,h,m);break;default:if(!w)for(S=1,w=new Array(x-1);S<x;S++)w[S-1]=arguments[S];y[_].fn.apply(y[_].context,w)}}return!0},l.prototype.on=function(d,u,h){return s(this,d,u,h,!1)},l.prototype.once=function(d,u,h){return s(this,d,u,h,!0)},l.prototype.removeListener=function(d,u,h,m){var g=r?r+d:d;if(!this._events[g])return this;if(!u)return o(this,g),this;var b=this._events[g];if(b.fn)b.fn===u&&(!m||b.once)&&(!h||b.context===h)&&o(this,g);else{for(var v=0,y=[],x=b.length;v<x;v++)(b[v].fn!==u||m&&!b[v].once||h&&b[v].context!==h)&&y.push(b[v]);y.length?this._events[g]=y.length===1?y[0]:y:o(this,g)}return this},l.prototype.removeAllListeners=function(d){var u;return d?(u=r?r+d:d,this._events[u]&&o(this,u)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=r,l.EventEmitter=l,e.exports=l})(PS)),PS.exports}var QCe=XCe();const ZCe=Ht(QCe);var CS=new ZCe,OS="recharts.syncMouseEvents";function Hm(e){"@babel/helpers - typeof";return Hm=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},Hm(e)}function JCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eOe(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,aG(n.key),n)}}function tOe(e,t,r){return t&&eOe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function MS(e,t,r){return t=aG(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aG(e){var t=rOe(e,"string");return Hm(t)=="symbol"?t:t+""}function rOe(e,t){if(Hm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Hm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var nOe=(function(){function e(){JCe(this,e),MS(this,"activeIndex",0),MS(this,"coordinateList",[]),MS(this,"layout","horizontal")}return tOe(e,[{key:"setDetails",value:function(r){var n,i=r.coordinateList,s=i===void 0?null:i,o=r.container,l=o===void 0?null:o,c=r.layout,d=c===void 0?null:c,u=r.offset,h=u===void 0?null:u,m=r.mouseHandlerCallback,g=m===void 0?null:m;this.coordinateList=(n=s??this.coordinateList)!==null&&n!==void 0?n:[],this.container=l??this.container,this.layout=d??this.layout,this.offset=h??this.offset,this.mouseHandlerCallback=g??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(),s=i.x,o=i.y,l=i.height,c=this.coordinateList[this.activeIndex].coordinate,d=((r=window)===null||r===void 0?void 0:r.scrollX)||0,u=((n=window)===null||n===void 0?void 0:n.scrollY)||0,h=s+c+d,m=o+this.offset.top+l/2+u;this.mouseHandlerCallback({pageX:h,pageY:m})}}}])})();function aOe(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&&Fe(n)&&Fe(i))return!0}return!1}function iOe(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 iG(e){var t=e.cx,r=e.cy,n=e.radius,i=e.startAngle,s=e.endAngle,o=or(t,r,n,i),l=or(t,r,n,s);return{points:[o,l],cx:t,cy:r,radius:n,startAngle:i,endAngle:s}}function sOe(e,t,r){var n,i,s,o;if(e==="horizontal")n=t.x,s=n,i=r.top,o=r.top+r.height;else if(e==="vertical")i=t.y,o=i,n=r.left,s=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var l=t.cx,c=t.cy,d=t.innerRadius,u=t.outerRadius,h=t.angle,m=or(l,c,d,h),g=or(l,c,u,h);n=m.x,i=m.y,s=g.x,o=g.y}else return iG(t);return[{x:n,y:i},{x:s,y:o}]}function Wm(e){"@babel/helpers - typeof";return Wm=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},Wm(e)}function UF(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 _y(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?UF(Object(r),!0).forEach(function(n){oOe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):UF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oOe(e,t,r){return t=lOe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lOe(e){var t=cOe(e,"string");return Wm(t)=="symbol"?t:t+""}function cOe(e,t){if(Wm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Wm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function uOe(e){var t,r,n=e.element,i=e.tooltipEventType,s=e.isActive,o=e.activeCoordinate,l=e.activePayload,c=e.offset,d=e.activeTooltipIndex,u=e.tooltipAxisBandSize,h=e.layout,m=e.chartName,g=(t=n.props.cursor)!==null&&t!==void 0?t:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!g||!s||!o||m!=="ScatterChart"&&i!=="axis")return null;var b,v=uc;if(m==="ScatterChart")b=o,v=jke;else if(m==="BarChart")b=iOe(h,o,c,u),v=vP;else if(h==="radial"){var y=iG(o),x=y.cx,w=y.cy,_=y.radius,j=y.startAngle,S=y.endAngle;b={cx:x,cy:w,startAngle:j,endAngle:S,innerRadius:_,outerRadius:_},v=nW}else b={points:sOe(h,o,c)},v=uc;var k=_y(_y(_y(_y({stroke:"#ccc",pointerEvents:"none"},c),b),lt(g,!1)),{},{payload:l,payloadIndex:d,className:bt("recharts-tooltip-cursor",g.className)});return A.isValidElement(g)?A.cloneElement(g,k):A.createElement(v,k)}var dOe=["item"],fOe=["children","className","width","height","style","compact","title","desc"];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 Mu(){return Mu=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},Mu.apply(this,arguments)}function qF(e,t){return pOe(e)||mOe(e,t)||oG(e,t)||hOe()}function hOe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 896In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mOe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,s,o,l=[],c=!0,d=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(c=(n=s.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(u){d=!0,i=u}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw i}}return l}}function pOe(e){if(Array.isArray(e))return e}function zF(e,t){if(e==null)return{};var r=gOe(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function gOe(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 yOe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vOe(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,lG(n.key),n)}}function xOe(e,t,r){return t&&vOe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function bOe(e,t,r){return t=bv(t),wOe(e,sG()?Reflect.construct(t,r||[],bv(e).constructor):t.apply(e,r))}function wOe(e,t){if(t&&(Pd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jOe(e)}function jOe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(sG=function(){return!!e})()}function bv(e){return bv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},bv(e)}function NOe(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&&jk(e,t)}function jk(e,t){return jk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},jk(e,t)}function Cd(e){return AOe(e)||SOe(e)||oG(e)||_Oe()}function _Oe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 897In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oG(e,t){if(e){if(typeof e=="string")return Nk(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 Nk(e,t)}}function SOe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function AOe(e){if(Array.isArray(e))return Nk(e)}function Nk(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 VF(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?VF(Object(r),!0).forEach(function(n){ft(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):VF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ft(e,t,r){return t=lG(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lG(e){var t=kOe(e,"string");return Pd(t)=="symbol"?t:t+""}function kOe(e,t){if(Pd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Pd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var EOe={xAxis:["bottom","top"],yAxis:["left","right"]},TOe={width:"100%",height:"100%"},cG={x:0,y:0};function Sy(e){return e}var POe=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},COe=function(t,r,n,i){var s=r.find(function(u){return u&&u.index===n});if(s){if(t==="horizontal")return{x:s.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:s.coordinate};if(t==="centric"){var o=s.coordinate,l=i.radius;return ke(ke(ke({},i),or(i.cx,i.cy,l,o)),{},{angle:o,radius:l})}var c=s.coordinate,d=i.angle;return ke(ke(ke({},i),or(i.cx,i.cy,c,d)),{},{angle:d,radius:c})}return cG},zx=function(t,r){var n=r.graphicalItems,i=r.dataStartIndex,s=r.dataEndIndex,o=(n??[]).reduce(function(l,c){var d=c.props.data;return d&&d.length?[].concat(Cd(l),Cd(d)):l},[]);return o.length>0?o:t&&t.length&&Fe(i)&&Fe(s)?t.slice(i,s+1):[]};function uG(e){return e==="number"?[0,"auto"]:void 0}var _k=function(t,r,n,i){var s=t.graphicalItems,o=t.tooltipAxis,l=zx(r,t);return n<0||!s||!s.length||n>=l.length?null:s.reduce(function(c,d){var u,h=(u=d.props.data)!==null&&u!==void 0?u:r;h&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(h=h.slice(t.dataStartIndex,t.dataEndIndex+1));var m;if(o.dataKey&&!o.allowDuplicatedCategory){var g=h===void 0?l:h;m=j0(g,o.dataKey,i)}else m=h&&h[n]||l[n];return m?[].concat(Cd(c),[QH(d,m)]):c},[])},HF=function(t,r,n,i){var s=i||{x:t.chartX,y:t.chartY},o=POe(s,n),l=t.orderedTooltipTicks,c=t.tooltipAxis,d=t.tooltipTicks,u=G_e(o,l,d,c);if(u>=0&&d){var h=d[u]&&d[u].value,m=_k(t,r,u,h),g=COe(n,l,u,s);return{activeTooltipIndex:u,activeLabel:h,activePayload:m,activeCoordinate:g}}return null},OOe=function(t,r){var n=r.axes,i=r.graphicalItems,s=r.axisType,o=r.axisIdKey,l=r.stackGroups,c=r.dataStartIndex,d=r.dataEndIndex,u=t.layout,h=t.children,m=t.stackOffset,g=HH(u,s);return n.reduce(function(b,v){var y,x=v.type.defaultProps!==void 0?ke(ke({},v.type.defaultProps),v.props):v.props,w=x.type,_=x.dataKey,j=x.allowDataOverflow,S=x.allowDuplicatedCategory,k=x.scale,T=x.ticks,P=x.includeHidden,M=x[o];if(b[M])return b;var C=zx(t.data,{graphicalItems:i.filter(function(B){var H,J=o in B.props?B.props[o]:(H=B.type.defaultProps)===null||H===void 0?void 0:H[o];return J===M}),dataStartIndex:c,dataEndIndex:d}),O=C.length,D,L,F;aOe(x.domain,j,w)&&(D=L2(x.domain,null,j),g&&(w==="number"||k!=="auto")&&(F=Bh(C,_,"category")));var U=uG(w);if(!D||D.length===0){var G,W=(G=x.domain)!==null&&G!==void 0?G:U;if(_){if(D=Bh(C,_,w),w==="category"&&g){var q=q0e(D);S&&q?(L=D,D=sv(0,O)):S||(D=q6(W,D,v).reduce(function(B,H){return B.indexOf(H)>=0?B:[].concat(Cd(B),[H])},[]))}else if(w==="category")S?D=D.filter(function(B){return B!==""&&!xt(B)}):D=q6(W,D,v).reduce(function(B,H){return B.indexOf(H)>=0||H===""||xt(H)?B:[].concat(Cd(B),[H])},[]);else if(w==="number"){var V=Z_e(C,i.filter(function(B){var H,J,ee=o in B.props?B.props[o]:(H=B.type.defaultProps)===null||H===void 0?void 0:H[o],Y="hide"in B.props?B.props.hide:(J=B.type.defaultProps)===null||J===void 0?void 0:J.hide;return ee===M&&(P||!Y)}),_,s,u);V&&(D=V)}g&&(w==="number"||k!=="auto")&&(F=Bh(C,_,"category"))}else g?D=sv(0,O):l&&l[M]&&l[M].hasStack&&w==="number"?D=m==="expand"?[0,1]:XH(l[M].stackGroups,c,d):D=VH(C,i.filter(function(B){var H=o in B.props?B.props[o]:B.type.defaultProps[o],J="hide"in B.props?B.props.hide:B.type.defaultProps.hide;return H===M&&(P||!J)}),w,u,!0);if(w==="number")D=wk(h,D,M,s,T),W&&(D=L2(W,D,j));else if(w==="category"&&W){var z=W,I=D.every(function(B){return z.indexOf(B)>=0});I&&(D=z)}}return ke(ke({},b),{},ft({},M,ke(ke({},x),{},{axisType:s,domain:D,categoricalDomain:F,duplicateDomain:L,originalDomain:(y=x.domain)!==null&&y!==void 0?y:U,isCategorical:g,layout:u})))},{})},MOe=function(t,r){var n=r.graphicalItems,i=r.Axis,s=r.axisType,o=r.axisIdKey,l=r.stackGroups,c=r.dataStartIndex,d=r.dataEndIndex,u=t.layout,h=t.children,m=zx(t.data,{graphicalItems:n,dataStartIndex:c,dataEndIndex:d}),g=m.length,b=HH(u,s),v=-1;return n.reduce(function(y,x){var w=x.type.defaultProps!==void 0?ke(ke({},x.type.defaultProps),x.props):x.props,_=w[o],j=uG("number");if(!y[_]){v++;var S;return b?S=sv(0,g):l&&l[_]&&l[_].hasStack?(S=XH(l[_].stackGroups,c,d),S=wk(h,S,_,s)):(S=L2(j,VH(m,n.filter(function(k){var T,P,M=o in k.props?k.props[o]:(T=k.type.defaultProps)===null||T===void 0?void 0:T[o],C="hide"in k.props?k.props.hide:(P=k.type.defaultProps)===null||P===void 0?void 0:P.hide;return M===_&&!C}),"number",u),i.defaultProps.allowDataOverflow),S=wk(h,S,_,s)),ke(ke({},y),{},ft({},_,ke(ke({axisType:s},i.defaultProps),{},{hide:!0,orientation:Sa(EOe,"".concat(s,".").concat(v%2),null),domain:S,originalDomain:j,isCategorical:b,layout:u})))}return y},{})},ROe=function(t,r){var n=r.axisType,i=n===void 0?"xAxis":n,s=r.AxisComp,o=r.graphicalItems,l=r.stackGroups,c=r.dataStartIndex,d=r.dataEndIndex,u=t.children,h="".concat(i,"Id"),m=Aa(u,s),g={};return m&&m.length?g=OOe(t,{axes:m,graphicalItems:o,axisType:i,axisIdKey:h,stackGroups:l,dataStartIndex:c,dataEndIndex:d}):o&&o.length&&(g=MOe(t,{Axis:s,graphicalItems:o,axisType:i,axisIdKey:h,stackGroups:l,dataStartIndex:c,dataEndIndex:d})),g},DOe=function(t){var r=To(t),n=Ms(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:HT(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:K0(r,n)}},WF=function(t){var r=t.children,n=t.defaultShowTooltip,i=va(r,xd),s=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(s=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:s,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},IOe=function(t){return!t||!t.length?!1:t.some(function(r){var n=Fs(r&&r.type);return n&&n.indexOf("Bar")>=0})},GF=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"}},LOe=function(t,r){var n=t.props,i=t.graphicalItems,s=t.xAxisMap,o=s===void 0?{}:s,l=t.yAxisMap,c=l===void 0?{}:l,d=n.width,u=n.height,h=n.children,m=n.margin||{},g=va(h,xd),b=va(h,Bs),v=Object.keys(c).reduce(function(S,k){var T=c[k],P=T.orientation;return!T.mirror&&!T.hide?ke(ke({},S),{},ft({},P,S[P]+T.width)):S},{left:m.left||0,right:m.right||0}),y=Object.keys(o).reduce(function(S,k){var T=o[k],P=T.orientation;return!T.mirror&&!T.hide?ke(ke({},S),{},ft({},P,Sa(S,"".concat(P))+T.height)):S},{top:m.top||0,bottom:m.bottom||0}),x=ke(ke({},y),v),w=x.bottom;g&&(x.bottom+=g.props.height||xd.defaultProps.height),b&&r&&(x=X_e(x,i,n,r));var _=d-x.left-x.right,j=u-x.top-x.bottom;return ke(ke({brushBottom:w},x),{},{width:Math.max(_,0),height:Math.max(j,0)})},$Oe=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},Vx=function(t){var r=t.chartName,n=t.GraphicalChild,i=t.defaultTooltipEventType,s=i===void 0?"axis":i,o=t.validateTooltipEventTypes,l=o===void 0?["axis"]:o,c=t.axisComponents,d=t.legendContent,u=t.formatAxisMap,h=t.defaultProps,m=function(x,w){var _=w.graphicalItems,j=w.stackGroups,S=w.offset,k=w.updateId,T=w.dataStartIndex,P=w.dataEndIndex,M=x.barSize,C=x.layout,O=x.barGap,D=x.barCategoryGap,L=x.maxBarSize,F=GF(C),U=F.numericAxisName,G=F.cateAxisName,W=IOe(_),q=[];return _.forEach(function(V,z){var I=zx(x.data,{graphicalItems:[V],dataStartIndex:T,dataEndIndex:P}),B=V.type.defaultProps!==void 0?ke(ke({},V.type.defaultProps),V.props):V.props,H=B.dataKey,J=B.maxBarSize,ee=B["".concat(U,"Id")],Y=B["".concat(G,"Id")],X={},ne=c.reduce(function(ye,he){var He=w["".concat(he.axisType,"Map")],Te=B["".concat(he.axisType,"Id")];He&&He[Te]||he.axisType==="zAxis"||Ec();var it=He[Te];return ke(ke({},ye),{},ft(ft({},he.axisType,it),"".concat(he.axisType,"Ticks"),Ms(it)))},X),Q=ne[G],ie=ne["".concat(G,"Ticks")],me=j&&j[ee]&&j[ee].hasStack&&oSe(V,j[ee].stackGroups),oe=Fs(V.type).indexOf("Bar")>=0,Ne=K0(Q,ie),_e=[],xe=W&&K_e({barSize:M,stackGroups:j,totalSize:$Oe(ne,G)});if(oe){var Ee,Pe,Z=xt(J)?L:J,ae=(Ee=(Pe=K0(Q,ie,!0))!==null&&Pe!==void 0?Pe:Z)!==null&&Ee!==void 0?Ee:0;_e=Y_e({barGap:O,barCategoryGap:D,bandSize:ae!==Ne?ae:Ne,sizeList:xe[Y],maxBarSize:Z}),ae!==Ne&&(_e=_e.map(function(ye){return ke(ke({},ye),{},{position:ke(ke({},ye.position),{},{offset:ye.position.offset-ae/2})})}))}var pe=V&&V.type&&V.type.getComposedData;pe&&q.push({props:ke(ke({},pe(ke(ke({},ne),{},{displayedData:I,props:x,dataKey:H,item:V,bandSize:Ne,barPosition:_e,offset:S,stackedData:me,layout:C,dataStartIndex:T,dataEndIndex:P}))),{},ft(ft(ft({key:V.key||"item-".concat(z)},U,ne[U]),G,ne[G]),"animationId",k)),childIndex:eve(V,x.children),item:V})}),q},g=function(x,w){var _=x.props,j=x.dataStartIndex,S=x.dataEndIndex,k=x.updateId;if(!n3({props:_}))return null;var T=_.children,P=_.layout,M=_.stackOffset,C=_.data,O=_.reverseStackOrder,D=GF(P),L=D.numericAxisName,F=D.cateAxisName,U=Aa(T,n),G=iSe(C,U,"".concat(L,"Id"),"".concat(F,"Id"),M,O),W=c.reduce(function(B,H){var J="".concat(H.axisType,"Map");return ke(ke({},B),{},ft({},J,ROe(_,ke(ke({},H),{},{graphicalItems:U,stackGroups:H.axisType===L&&G,dataStartIndex:j,dataEndIndex:S}))))},{}),q=LOe(ke(ke({},W),{},{props:_,graphicalItems:U}),w==null?void 0:w.legendBBox);Object.keys(W).forEach(function(B){W[B]=u(_,W[B],q,B.replace("Map",""),r)});var V=W["".concat(F,"Map")],z=DOe(V),I=m(_,ke(ke({},W),{},{dataStartIndex:j,dataEndIndex:S,updateId:k,graphicalItems:U,stackGroups:G,offset:q}));return ke(ke({formattedGraphicalItems:I,graphicalItems:U,offset:q,stackGroups:G},z),W)},b=(function(y){function x(w){var _,j,S;return yOe(this,x),S=bOe(this,x,[w]),ft(S,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ft(S,"accessibilityManager",new nOe),ft(S,"handleLegendBBoxUpdate",function(k){if(k){var T=S.state,P=T.dataStartIndex,M=T.dataEndIndex,C=T.updateId;S.setState(ke({legendBBox:k},g({props:S.props,dataStartIndex:P,dataEndIndex:M,updateId:C},ke(ke({},S.state),{},{legendBBox:k}))))}}),ft(S,"handleReceiveSyncEvent",function(k,T,P){if(S.props.syncId===k){if(P===S.eventEmitterSymbol&&typeof S.props.syncMethod!="function")return;S.applySyncEvent(T)}}),ft(S,"handleBrushChange",function(k){var T=k.startIndex,P=k.endIndex;if(T!==S.state.dataStartIndex||P!==S.state.dataEndIndex){var M=S.state.updateId;S.setState(function(){return ke({dataStartIndex:T,dataEndIndex:P},g({props:S.props,dataStartIndex:T,dataEndIndex:P,updateId:M},S.state))}),S.triggerSyncEvent({dataStartIndex:T,dataEndIndex:P})}}),ft(S,"handleMouseEnter",function(k){var T=S.getMouseInfo(k);if(T){var P=ke(ke({},T),{},{isTooltipActive:!0});S.setState(P),S.triggerSyncEvent(P);var M=S.props.onMouseEnter;mt(M)&&M(P,k)}}),ft(S,"triggeredAfterMouseMove",function(k){var T=S.getMouseInfo(k),P=T?ke(ke({},T),{},{isTooltipActive:!0}):{isTooltipActive:!1};S.setState(P),S.triggerSyncEvent(P);var M=S.props.onMouseMove;mt(M)&&M(P,k)}),ft(S,"handleItemMouseEnter",function(k){S.setState(function(){return{isTooltipActive:!0,activeItem:k,activePayload:k.tooltipPayload,activeCoordinate:k.tooltipPosition||{x:k.cx,y:k.cy}}})}),ft(S,"handleItemMouseLeave",function(){S.setState(function(){return{isTooltipActive:!1}})}),ft(S,"handleMouseMove",function(k){k.persist(),S.throttleTriggeredAfterMouseMove(k)}),ft(S,"handleMouseLeave",function(k){S.throttleTriggeredAfterMouseMove.cancel();var T={isTooltipActive:!1};S.setState(T),S.triggerSyncEvent(T);var P=S.props.onMouseLeave;mt(P)&&P(T,k)}),ft(S,"handleOuterEvent",function(k){var T=J0e(k),P=Sa(S.props,"".concat(T));if(T&&mt(P)){var M,C;/.*touch.*/i.test(T)?C=S.getMouseInfo(k.changedTouches[0]):C=S.getMouseInfo(k),P((M=C)!==null&&M!==void 0?M:{},k)}}),ft(S,"handleClick",function(k){var T=S.getMouseInfo(k);if(T){var P=ke(ke({},T),{},{isTooltipActive:!0});S.setState(P),S.triggerSyncEvent(P);var M=S.props.onClick;mt(M)&&M(P,k)}}),ft(S,"handleMouseDown",function(k){var T=S.props.onMouseDown;if(mt(T)){var P=S.getMouseInfo(k);T(P,k)}}),ft(S,"handleMouseUp",function(k){var T=S.props.onMouseUp;if(mt(T)){var P=S.getMouseInfo(k);T(P,k)}}),ft(S,"handleTouchMove",function(k){k.changedTouches!=null&&k.changedTouches.length>0&&S.throttleTriggeredAfterMouseMove(k.changedTouches[0])}),ft(S,"handleTouchStart",function(k){k.changedTouches!=null&&k.changedTouches.length>0&&S.handleMouseDown(k.changedTouches[0])}),ft(S,"handleTouchEnd",function(k){k.changedTouches!=null&&k.changedTouches.length>0&&S.handleMouseUp(k.changedTouches[0])}),ft(S,"handleDoubleClick",function(k){var T=S.props.onDoubleClick;if(mt(T)){var P=S.getMouseInfo(k);T(P,k)}}),ft(S,"handleContextMenu",function(k){var T=S.props.onContextMenu;if(mt(T)){var P=S.getMouseInfo(k);T(P,k)}}),ft(S,"triggerSyncEvent",function(k){S.props.syncId!==void 0&&CS.emit(OS,S.props.syncId,k,S.eventEmitterSymbol)}),ft(S,"applySyncEvent",function(k){var T=S.props,P=T.layout,M=T.syncMethod,C=S.state.updateId,O=k.dataStartIndex,D=k.dataEndIndex;if(k.dataStartIndex!==void 0||k.dataEndIndex!==void 0)S.setState(ke({dataStartIndex:O,dataEndIndex:D},g({props:S.props,dataStartIndex:O,dataEndIndex:D,updateId:C},S.state)));else if(k.activeTooltipIndex!==void 0){var L=k.chartX,F=k.chartY,U=k.activeTooltipIndex,G=S.state,W=G.offset,q=G.tooltipTicks;if(!W)return;if(typeof M=="function")U=M(q,k);else if(M==="value"){U=-1;for(var V=0;V<q.length;V++)if(q[V].value===k.activeLabel){U=V;break}}var z=ke(ke({},W),{},{x:W.left,y:W.top}),I=Math.min(L,z.x+z.width),B=Math.min(F,z.y+z.height),H=q[U]&&q[U].value,J=_k(S.state,S.props.data,U),ee=q[U]?{x:P==="horizontal"?q[U].coordinate:I,y:P==="horizontal"?B:q[U].coordinate}:cG;S.setState(ke(ke({},k),{},{activeLabel:H,activeCoordinate:ee,activePayload:J,activeTooltipIndex:U}))}else S.setState(k)}),ft(S,"renderCursor",function(k){var T,P=S.state,M=P.isTooltipActive,C=P.activeCoordinate,O=P.activePayload,D=P.offset,L=P.activeTooltipIndex,F=P.tooltipAxisBandSize,U=S.getTooltipEventType(),G=(T=k.props.active)!==null&&T!==void 0?T:M,W=S.props.layout,q=k.key||"_recharts-cursor";return te.createElement(uOe,{key:q,activeCoordinate:C,activePayload:O,activeTooltipIndex:L,chartName:r,element:k,isActive:G,layout:W,offset:D,tooltipAxisBandSize:F,tooltipEventType:U})}),ft(S,"renderPolarAxis",function(k,T,P){var M=Sa(k,"type.axisType"),C=Sa(S.state,"".concat(M,"Map")),O=k.type.defaultProps,D=O!==void 0?ke(ke({},O),k.props):k.props,L=C&&C[D["".concat(M,"Id")]];return A.cloneElement(k,ke(ke({},L),{},{className:bt(M,L.className),key:k.key||"".concat(T,"-").concat(P),ticks:Ms(L,!0)}))}),ft(S,"renderPolarGrid",function(k){var T=k.props,P=T.radialLines,M=T.polarAngles,C=T.polarRadius,O=S.state,D=O.radiusAxisMap,L=O.angleAxisMap,F=To(D),U=To(L),G=U.cx,W=U.cy,q=U.innerRadius,V=U.outerRadius;return A.cloneElement(k,{polarAngles:Array.isArray(M)?M:Ms(U,!0).map(function(z){return z.coordinate}),polarRadius:Array.isArray(C)?C:Ms(F,!0).map(function(z){return z.coordinate}),cx:G,cy:W,innerRadius:q,outerRadius:V,key:k.key||"polar-grid",radialLines:P})}),ft(S,"renderLegend",function(){var k=S.state.formattedGraphicalItems,T=S.props,P=T.children,M=T.width,C=T.height,O=S.props.margin||{},D=M-(O.left||0)-(O.right||0),L=qH({children:P,formattedGraphicalItems:k,legendWidth:D,legendContent:d});if(!L)return null;var F=L.item,U=zF(L,dOe);return A.cloneElement(F,ke(ke({},U),{},{chartWidth:M,chartHeight:C,margin:O,onBBoxUpdate:S.handleLegendBBoxUpdate}))}),ft(S,"renderTooltip",function(){var k,T=S.props,P=T.children,M=T.accessibilityLayer,C=va(P,En);if(!C)return null;var O=S.state,D=O.isTooltipActive,L=O.activeCoordinate,F=O.activePayload,U=O.activeLabel,G=O.offset,W=(k=C.props.active)!==null&&k!==void 0?k:D;return A.cloneElement(C,{viewBox:ke(ke({},G),{},{x:G.left,y:G.top}),active:W,label:U,payload:W?F:[],coordinate:L,accessibilityLayer:M})}),ft(S,"renderBrush",function(k){var T=S.props,P=T.margin,M=T.data,C=S.state,O=C.offset,D=C.dataStartIndex,L=C.dataEndIndex,F=C.updateId;return A.cloneElement(k,{key:k.key||"_recharts-brush",onChange:by(S.handleBrushChange,k.props.onChange),data:M,x:Fe(k.props.x)?k.props.x:O.left,y:Fe(k.props.y)?k.props.y:O.top+O.height+O.brushBottom-(P.bottom||0),width:Fe(k.props.width)?k.props.width:O.width,startIndex:D,endIndex:L,updateId:"brush-".concat(F)})}),ft(S,"renderReferenceElement",function(k,T,P){if(!k)return null;var M=S,C=M.clipPathId,O=S.state,D=O.xAxisMap,L=O.yAxisMap,F=O.offset,U=k.type.defaultProps||{},G=k.props,W=G.xAxisId,q=W===void 0?U.xAxisId:W,V=G.yAxisId,z=V===void 0?U.yAxisId:V;return A.cloneElement(k,{key:k.key||"".concat(T,"-").concat(P),xAxis:D[q],yAxis:L[z],viewBox:{x:F.left,y:F.top,width:F.width,height:F.height},clipPathId:C})}),ft(S,"renderActivePoints",function(k){var T=k.item,P=k.activePoint,M=k.basePoint,C=k.childIndex,O=k.isRange,D=[],L=T.props.key,F=T.item.type.defaultProps!==void 0?ke(ke({},T.item.type.defaultProps),T.item.props):T.item.props,U=F.activeDot,G=F.dataKey,W=ke(ke({index:C,dataKey:G,cx:P.x,cy:P.y,r:4,fill:yP(T.item),strokeWidth:2,stroke:"#fff",payload:P.payload,value:P.value},lt(U,!1)),N0(U));return D.push(x.renderActiveDot(U,W,"".concat(L,"-activePoint-").concat(C))),M?D.push(x.renderActiveDot(U,ke(ke({},W),{},{cx:M.x,cy:M.y}),"".concat(L,"-basePoint-").concat(C))):O&&D.push(null),D}),ft(S,"renderGraphicChild",function(k,T,P){var M=S.filterFormatItem(k,T,P);if(!M)return null;var C=S.getTooltipEventType(),O=S.state,D=O.isTooltipActive,L=O.tooltipAxis,F=O.activeTooltipIndex,U=O.activeLabel,G=S.props.children,W=va(G,En),q=M.props,V=q.points,z=q.isRange,I=q.baseLine,B=M.item.type.defaultProps!==void 0?ke(ke({},M.item.type.defaultProps),M.item.props):M.item.props,H=B.activeDot,J=B.hide,ee=B.activeBar,Y=B.activeShape,X=!!(!J&&D&&W&&(H||ee||Y)),ne={};C!=="axis"&&W&&W.props.trigger==="click"?ne={onClick:by(S.handleItemMouseEnter,k.props.onClick)}:C!=="axis"&&(ne={onMouseLeave:by(S.handleItemMouseLeave,k.props.onMouseLeave),onMouseEnter:by(S.handleItemMouseEnter,k.props.onMouseEnter)});var Q=A.cloneElement(k,ke(ke({},M.props),ne));function ie(he){return typeof L.dataKey=="function"?L.dataKey(he.payload):null}if(X)if(F>=0){var me,oe;if(L.dataKey&&!L.allowDuplicatedCategory){var Ne=typeof L.dataKey=="function"?ie:"payload.".concat(L.dataKey.toString());me=j0(V,Ne,U),oe=z&&I&&j0(I,Ne,U)}else me=V==null?void 0:V[F],oe=z&&I&&I[F];if(Y||ee){var _e=k.props.activeIndex!==void 0?k.props.activeIndex:F;return[A.cloneElement(k,ke(ke(ke({},M.props),ne),{},{activeIndex:_e})),null,null]}if(!xt(me))return[Q].concat(Cd(S.renderActivePoints({item:M,activePoint:me,basePoint:oe,childIndex:F,isRange:z})))}else{var xe,Ee=(xe=S.getItemByXY(S.state.activeCoordinate))!==null&&xe!==void 0?xe:{graphicalItem:Q},Pe=Ee.graphicalItem,Z=Pe.item,ae=Z===void 0?k:Z,pe=Pe.childIndex,ye=ke(ke(ke({},M.props),ne),{},{activeIndex:pe});return[A.cloneElement(ae,ye),null,null]}return z?[Q,null,null]:[Q,null]}),ft(S,"renderCustomized",function(k,T,P){return A.cloneElement(k,ke(ke({key:"recharts-customized-".concat(P)},S.props),S.state))}),ft(S,"renderMap",{CartesianGrid:{handler:Sy,once:!0},ReferenceArea:{handler:S.renderReferenceElement},ReferenceLine:{handler:Sy},ReferenceDot:{handler:S.renderReferenceElement},XAxis:{handler:Sy},YAxis:{handler:Sy},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((_=w.id)!==null&&_!==void 0?_:Dc("recharts"),"-clip"),S.throttleTriggeredAfterMouseMove=BV(S.triggeredAfterMouseMove,(j=w.throttleDelay)!==null&&j!==void 0?j:1e3/60),S.state={},S}return NOe(x,y),xOe(x,[{key:"componentDidMount",value:function(){var _,j;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(_=this.props.margin.left)!==null&&_!==void 0?_:0,top:(j=this.props.margin.top)!==null&&j!==void 0?j:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var _=this.props,j=_.children,S=_.data,k=_.height,T=_.layout,P=va(j,En);if(P){var M=P.props.defaultIndex;if(!(typeof M!="number"||M<0||M>this.state.tooltipTicks.length-1)){var C=this.state.tooltipTicks[M]&&this.state.tooltipTicks[M].value,O=_k(this.state,S,M,C),D=this.state.tooltipTicks[M].coordinate,L=(this.state.offset.top+k)/2,F=T==="horizontal",U=F?{x:D,y:L}:{y:D,x:L},G=this.state.formattedGraphicalItems.find(function(q){var V=q.item;return V.type.name==="Scatter"});G&&(U=ke(ke({},U),G.props.points[M].tooltipPosition),O=G.props.points[M].tooltipPayload);var W={activeTooltipIndex:M,isTooltipActive:!0,activeLabel:C,activePayload:O,activeCoordinate:U};this.setState(W),this.renderCursor(P),this.accessibilityManager.setIndex(M)}}}},{key:"getSnapshotBeforeUpdate",value:function(_,j){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==j.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==_.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==_.margin){var S,k;this.accessibilityManager.setDetails({offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(k=this.props.margin.top)!==null&&k!==void 0?k:0}})}return null}},{key:"componentDidUpdate",value:function(_){i2([va(_.children,En)],[va(this.props.children,En)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var _=va(this.props.children,En);if(_&&typeof _.props.shared=="boolean"){var j=_.props.shared?"axis":"item";return l.indexOf(j)>=0?j:s}return s}},{key:"getMouseInfo",value:function(_){if(!this.container)return null;var j=this.container,S=j.getBoundingClientRect(),k=Bwe(S),T={chartX:Math.round(_.pageX-k.left),chartY:Math.round(_.pageY-k.top)},P=S.width/j.offsetWidth||1,M=this.inRange(T.chartX,T.chartY,P);if(!M)return null;var C=this.state,O=C.xAxisMap,D=C.yAxisMap,L=this.getTooltipEventType(),F=HF(this.state,this.props.data,this.props.layout,M);if(L!=="axis"&&O&&D){var U=To(O).scale,G=To(D).scale,W=U&&U.invert?U.invert(T.chartX):null,q=G&&G.invert?G.invert(T.chartY):null;return ke(ke({},T),{},{xValue:W,yValue:q},F)}return F?ke(ke({},T),F):null}},{key:"inRange",value:function(_,j){var S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,k=this.props.layout,T=_/S,P=j/S;if(k==="horizontal"||k==="vertical"){var M=this.state.offset,C=T>=M.left&&T<=M.left+M.width&&P>=M.top&&P<=M.top+M.height;return C?{x:T,y:P}:null}var O=this.state,D=O.angleAxisMap,L=O.radiusAxisMap;if(D&&L){var F=To(D);return H6({x:T,y:P},F)}return null}},{key:"parseEventsOfWrapper",value:function(){var _=this.props.children,j=this.getTooltipEventType(),S=va(_,En),k={};S&&j==="axis"&&(S.props.trigger==="click"?k={onClick:this.handleClick}:k={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 T=N0(this.props,this.handleOuterEvent);return ke(ke({},T),k)}},{key:"addListener",value:function(){CS.on(OS,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){CS.removeListener(OS,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(_,j,S){for(var k=this.state.formattedGraphicalItems,T=0,P=k.length;T<P;T++){var M=k[T];if(M.item===_||M.props.key===_.key||j===Fs(M.item.type)&&S===M.childIndex)return M}return null}},{key:"renderClipPath",value:function(){var _=this.clipPathId,j=this.state.offset,S=j.left,k=j.top,T=j.height,P=j.width;return te.createElement("defs",null,te.createElement("clipPath",{id:_},te.createElement("rect",{x:S,y:k,height:T,width:P})))}},{key:"getXScales",value:function(){var _=this.state.xAxisMap;return _?Object.entries(_).reduce(function(j,S){var k=qF(S,2),T=k[0],P=k[1];return ke(ke({},j),{},ft({},T,P.scale))},{}):null}},{key:"getYScales",value:function(){var _=this.state.yAxisMap;return _?Object.entries(_).reduce(function(j,S){var k=qF(S,2),T=k[0],P=k[1];return ke(ke({},j),{},ft({},T,P.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(_){var j;return(j=this.state.xAxisMap)===null||j===void 0||(j=j[_])===null||j===void 0?void 0:j.scale}},{key:"getYScaleByAxisId",value:function(_){var j;return(j=this.state.yAxisMap)===null||j===void 0||(j=j[_])===null||j===void 0?void 0:j.scale}},{key:"getItemByXY",value:function(_){var j=this.state,S=j.formattedGraphicalItems,k=j.activeItem;if(S&&S.length)for(var T=0,P=S.length;T<P;T++){var M=S[T],C=M.props,O=M.item,D=O.type.defaultProps!==void 0?ke(ke({},O.type.defaultProps),O.props):O.props,L=Fs(O.type);if(L==="Bar"){var F=(C.data||[]).find(function(q){return rke(_,q)});if(F)return{graphicalItem:M,payload:F}}else if(L==="RadialBar"){var U=(C.data||[]).find(function(q){return H6(_,q)});if(U)return{graphicalItem:M,payload:U}}else if(Dx(M,k)||Ix(M,k)||Bm(M,k)){var G=SEe({graphicalItem:M,activeTooltipItem:k,itemData:D.data}),W=D.activeIndex===void 0?G:D.activeIndex;return{graphicalItem:ke(ke({},M),{},{childIndex:W}),payload:Bm(M,k)?D.data[G]:M.props.data[G]}}}return null}},{key:"render",value:function(){var _=this;if(!n3(this))return null;var j=this.props,S=j.children,k=j.className,T=j.width,P=j.height,M=j.style,C=j.compact,O=j.title,D=j.desc,L=zF(j,fOe),F=lt(L,!1);if(C)return te.createElement(wF,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},te.createElement(o2,Mu({},F,{width:T,height:P,title:O,desc:D}),this.renderClipPath(),i3(S,this.renderMap)));if(this.props.accessibilityLayer){var U,G;F.tabIndex=(U=this.props.tabIndex)!==null&&U!==void 0?U:0,F.role=(G=this.props.role)!==null&&G!==void 0?G:"application",F.onKeyDown=function(q){_.accessibilityManager.keyboardEvent(q)},F.onFocus=function(){_.accessibilityManager.focus()}}var W=this.parseEventsOfWrapper();return te.createElement(wF,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},te.createElement("div",Mu({className:bt("recharts-wrapper",k),style:ke({position:"relative",cursor:"default",width:T,height:P},M)},W,{ref:function(V){_.container=V}}),te.createElement(o2,Mu({},F,{width:T,height:P,title:O,desc:D,style:TOe}),this.renderClipPath(),i3(S,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(A.Component);ft(b,"displayName",r),ft(b,"defaultProps",ke({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},h)),ft(b,"getDerivedStateFromProps",function(y,x){var w=y.dataKey,_=y.data,j=y.children,S=y.width,k=y.height,T=y.layout,P=y.stackOffset,M=y.margin,C=x.dataStartIndex,O=x.dataEndIndex;if(x.updateId===void 0){var D=WF(y);return ke(ke(ke({},D),{},{updateId:0},g(ke(ke({props:y},D),{},{updateId:0}),x)),{},{prevDataKey:w,prevData:_,prevWidth:S,prevHeight:k,prevLayout:T,prevStackOffset:P,prevMargin:M,prevChildren:j})}if(w!==x.prevDataKey||_!==x.prevData||S!==x.prevWidth||k!==x.prevHeight||T!==x.prevLayout||P!==x.prevStackOffset||!Iu(M,x.prevMargin)){var L=WF(y),F={chartX:x.chartX,chartY:x.chartY,isTooltipActive:x.isTooltipActive},U=ke(ke({},HF(x,_,T)),{},{updateId:x.updateId+1}),G=ke(ke(ke({},L),F),U);return ke(ke(ke({},G),g(ke({props:y},G),x)),{},{prevDataKey:w,prevData:_,prevWidth:S,prevHeight:k,prevLayout:T,prevStackOffset:P,prevMargin:M,prevChildren:j})}if(!i2(j,x.prevChildren)){var W,q,V,z,I=va(j,xd),B=I&&(W=(q=I.props)===null||q===void 0?void 0:q.startIndex)!==null&&W!==void 0?W:C,H=I&&(V=(z=I.props)===null||z===void 0?void 0:z.endIndex)!==null&&V!==void 0?V:O,J=B!==C||H!==O,ee=!xt(_),Y=ee&&!J?x.updateId:x.updateId+1;return ke(ke({updateId:Y},g(ke(ke({props:y},x),{},{updateId:Y,dataStartIndex:B,dataEndIndex:H}),x)),{},{prevChildren:j,dataStartIndex:B,dataEndIndex:H})}return null}),ft(b,"renderActiveDot",function(y,x,w){var _;return A.isValidElement(y)?_=A.cloneElement(y,x):mt(y)?_=y(x):_=te.createElement(Mp,x),te.createElement(Ct,{className:"recharts-active-dot",ke
897y:w},_)});var v=A.forwardRef(function(x,w){return te.createElement(b,Mu({},x,{ref:w}))});return v.displayName=b.displayName,v},EP=Vx({chartName:"LineChart",GraphicalChild:Bc,axisComponents:[{axisType:"xAxis",AxisComp:as},{axisType:"yAxis",AxisComp:is}],formatAxisMap:xP}),FOe=Vx({chartName:"BarChart",GraphicalChild:Fc,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:as},{axisType:"yAxis",AxisComp:is}],formatAxisMap:xP}),KF=Vx({chartName:"PieChart",GraphicalChild:ns,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:Rx},{axisType:"radiusAxis",AxisComp:Ox}],formatAxisMap:ySe,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),BOe=Vx({chartName:"AreaChart",GraphicalChild:hl,axisComponents:[{axisType:"xAxis",AxisComp:as},{axisType:"yAxis",AxisComp:is}],formatAxisMap:xP});const UOe=1440*60*1e3,ph=e=>{const t={};for(const r of e||[]){if(!r.created_date)continue;const n=new Date(r.created_date);n.setHours(0,0,0,0);const i=n.getTime();t[i]=(t[i]||0)+1}return t},qOe=(e,t,r,n,i)=>{const s=new Date;s.setHours(0,0,0,0);const o=ph(e),l=ph(t),c=ph(r),d=ph(n),u=ph(i),h=[];for(let m=29;m>=0;m--)h.push(new Date(s.getTime()-m*UOe));return h.map(m=>{const g=m.getTime();return{label:m.toLocaleDateString("en-US",{month:"short",day:"numeric"}),registrations:o[g]||0,generated:l[g]||0,shared:c[g]||0,comments:d[g]||0,chartAI:u[g]||0}})},zOe={backgroundColor:"#1e293b",border:"1px solid #334155",borderRadius:"8px"};function YF({title:e,data:t,lines:r}){return a.jsxs("div",{className:"rounded-2xl border border-gray-700/60 bg-gray-800/60 p-4",children:[a.jsx("h3",{className:"text-sm font-semibold text-white mb-4",children:e}),a.jsx("div",{className:"h-56",children:a.jsx(oc,{width:"100%",height:"100%",children:a.jsxs(EP,{data:t,margin:{top:4,right:8,bottom:0,left:-18},children:[a.jsx(Sd,{stroke:"#334155",strokeDasharray:"3 3",vertical:!1}),a.jsx(as,{dataKey:"label",tick:{fill:"#94a3b8",fontSize:11},tickLine:!1,axisLine:{stroke:"#334155"},interval:4}),a.jsx(is,{allowDecimals:!1,tick:{fill:"#94a3b8",fontSize:11},tickLine:!1,axisLine:!1}),a.jsx(En,{contentStyle:zOe,labelStyle:{color:"#94a3b8"},itemStyle:{color:"#f8fafc"},cursor:{stroke:"#475569",strokeDasharray:"3 3"}}),r.map(n=>a.jsx(Bc,{type:"monotone",dataKey:n.key,name:n.name,stroke:n.color,strokeWidth:2,dot:{r:2.5,fill:n.color,strokeWidth:0},activeDot:{r:4.5,strokeWidth:0}},n.key))]})})})]})}function VOe({users:e,generatedRobots:t,eas:r,comments:n,chartAnalyses:i}){const s=A.useMemo(()=>qOe(e,t,r,n,i),[e,t,r,n,i]);return a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[a.jsx(YF,{title:"Daily User Registrations, EA Generation & Chart AI Analyses (Last 30 Days)",data:s,lines:[{key:"registrations",name:"Registrations",color:"#22d3ee"},{key:"generated",name:"Generated EAs",color:"#f8fafc"},{key:"chartAI",name:"Chart AI Analyses",color:"#a78bfa"}]}),a.jsx(YF,{title:"Daily Shared EAs & Comments (Last 30 Days)",data:s,lines:[{key:"shared",name:"Shared EAs",color:"#22d3ee"},{key:"comments",name:"New Comments",color:"#f8fafc"}]})]})}var Sk=["Enter"," "],HOe=["ArrowDown","PageUp","Home"],dG=["ArrowUp","PageDown","End"],WOe=[...HOe,...dG],GOe={ltr:[...Sk,"ArrowRight"],rtl:[...Sk,"ArrowLeft"]},KOe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Rp="Menu",[Gm,YOe,XOe]=Lv(Rp),[Uc,fG]=xn(Rp,[XOe,Jd,$v]),Hx=Jd(),hG=$v(),[QOe,qc]=Uc(Rp),[ZOe,Dp]=Uc(Rp),mG=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:i,onOpenChange:s,modal:o=!0}=e,l=Hx(t),[c,d]=A.useState(null),u=A.useRef(!1),h=on(s),m=Yd(i);return A.useEffect(()=>{const g=()=>{u.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>u.current=!1;return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),a.jsx(rT,{...l,children:a.jsx(QOe,{scope:t,open:r,onOpenChange:h,content:c,onContentChange:d,children:a.jsx(ZOe,{scope:t,onClose:A.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:u,dir:m,modal:o,children:n})})})};mG.displayName=Rp;var JOe="MenuAnchor",TP=A.forwardRef((e,t)=>
vendor: 12,945 bytes, line 897
897{const{__scopeMenu:r,...n}=e,i=Hx(r);return a.jsx(nT,{...i,...n,ref:t})});TP.displayName=JOe;var PP="MenuPortal",[e4e,pG]=Uc(PP,{forceMount:void 0}),gG=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:i}=e,s=qc(PP,t);return a.jsx(e4e,{scope:t,forceMount:r,children:a.jsx(bn,{present:r||s.open,children:a.jsx(Np,{asChild:!0,container:i,children:n})})})};gG.displayName=PP;var Ga="MenuContent",[t4e,CP]=Uc(Ga),yG=A.forwardRef((e,t)=>{const r=pG(Ga,e.__scopeMenu),{forceMount:n=r.forceMount,...i}=e,s=qc(Ga,e.__scopeMenu),o=Dp(Ga,e.__scopeMenu);return a.jsx(Gm.Provider,{scope:e.__scopeMenu,children:a.jsx(bn,{present:n||s.open,children:a.jsx(Gm.Slot,{scope:e.__scopeMenu,children:o.modal?a.jsx(r4e,{...i,ref:t}):a.jsx(n4e,{...i,ref:t})})})})}),r4e=A.forwardRef((e,t)=>{const r=qc(Ga,e.__scopeMenu),n=A.useRef(null),i=wt(t,n);return A.useEffect(()=>{const s=n.current;if(s)return fT(s)},[]),a.jsx(OP,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:Ge(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),n4e=A.forwardRef((e,t)=>{const r=qc(Ga,e.__scopeMenu);return a.jsx(OP,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),a4e=yc("MenuContent.ScrollLock"),OP=A.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:o,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:d,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:m,onDismiss:g,disableOutsideScroll:b,...v}=e,y=qc(Ga,r),x=Dp(Ga,r),w=Hx(r),_=hG(r),j=YOe(r),[S,k]=A.useState(null),T=A.useRef(null),P=wt(t,T,y.onContentChange),M=A.useRef(0),C=A.useRef(""),O=A.useRef(0),D=A.useRef(null),L=A.useRef("right"),F=A.useRef(0),U=b?tx:A.Fragment,G=b?{as:a4e,allowPinchZoom:!0}:void 0,W=V=>{var X,ne;const z=C.current+V,I=j().filter(Q=>!Q.disabled),B=document.activeElement,H=(X=I.find(Q=>Q.ref.current===B))==null?void 0:X.textValue,J=I.map(Q=>Q.textValue),ee=g4e(J,z,H),Y=(ne=I.find(Q=>Q.textValue===ee))==null?void 0:ne.ref.current;(function Q(ie){C.current=ie,window.clearTimeout(M.current),ie!==""&&(M.current=window.setTimeout(()=>Q(""),1e3))})(z),Y&&setTimeout(()=>Y.focus())};A.useEffect(()=>()=>window.clearTimeout(M.current),[]),uT();const q=A.useCallback(V=>{var I,B;return L.current===((I=D.current)==null?void 0:I.side)&&v4e(V,(B=D.current)==null?void 0:B.area)},[]);return a.jsx(t4e,{scope:r,searchRef:C,onItemEnter:A.useCallback(V=>{q(V)&&V.preventDefault()},[q]),onItemLeave:A.useCallback(V=>{var z;q(V)||((z=T.current)==null||z.focus(),k(null))},[q]),onTriggerLeave:A.useCallback(V=>{q(V)&&V.preventDefault()},[q]),pointerGraceTimerRef:O,onPointerGraceIntentChange:A.useCallback(V=>{D.current=V},[]),children:a.jsx(U,{...G,children:a.jsx(Jv,{asChild:!0,trapped:i,onMountAutoFocus:Ge(s,V=>{var z;V.preventDefault(),(z=T.current)==null||z.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:a.jsx(wp,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:d,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:m,onDismiss:g,children:a.jsx(R7,{asChild:!0,..._,dir:x.dir,orientation:"vertical",loop:n,currentTabStopId:S,onCurrentTabStopIdChange:k,onEntryFocus:Ge(c,V=>{x.isUsingKeyboardRef.current||V.preventDefault()}),preventScrollOnEntryFocus:!0,children:a.jsx(aT,{role:"menu","aria-orientation":"vertical","data-state":MG(y.open),"data-radix-menu-content":"",dir:x.dir,...w,...v,ref:P,style:{outline:"none",...v.style},onKeyDown:Ge(v.onKeyDown,V=>{const I=V.target.closest("[data-radix-menu-content]")===V.currentTarget,B=V.ctrlKey||V.altKey||V.metaKey,H=V.key.length===1;I&&(V.key==="Tab"&&V.preventDefault(),!B&&H&&W(V.key));const J=T.current;if(V.target!==J||!WOe.includes(V.key))return;V.preventDefault();const Y=j().filter(X=>!X.disabled).map(X=>X.ref.current);dG.includes(V.key)&&Y.reverse(),m4e(Y)}),onBlur:Ge(e.onBlur,V=>{V.currentTarget.contains(V.target)||(window.clearTimeout(M.current),C.current="")}),onPointerMove:Ge(e.onPointerMove,Km(V=>{const z=V.target,I=F.current!==V.clientX;if(V.currentTarget.contains(z)&&I){const B=V.clientX>F.current?"right":"left";L.current=B,F.current=V.clientX}}))})})})})})})});yG.displayName=Ga;var i4e="MenuGroup",MP=A.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return a.jsx(st.div,{role:"group",...n,ref:t})});MP.displayName=i4e;var s4e="MenuLabel",vG=A.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return a.jsx(st.div,{...n,ref:t})});vG.displayName=s4e;var wv="MenuItem",XF="menu.itemSelect",Wx=A.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...i}=e,s=A.useRef(null),o=Dp(wv,e.__scopeMenu),l=CP(wv,e.__scopeMenu),c=wt(t,s),d=A.useRef(!1),u=()=>{const h=s.current;if(!r&&h){const m=new CustomEvent(XF,{bubbles:!0,cancelable:!0});h.addEventListener(XF,g=>n==null?void 0:n(g),{once:!0}),E7(h,m),m.defaultPrevented?d.current=!1:o.onClose()}};return a.jsx(xG,{...i,ref:c,disabled:r,onClick:Ge(e.onClick,u),onPointerDown:h=>{var m;(m=e.onPointerDown)==null||m.call(e,h),d.current=!0},onPointerUp:Ge(e.onPointerUp,h=>{var m;d.current||(m=h.currentTarget)==null||m.click()}),onKeyDown:Ge(e.onKeyDown,h=>{const m=l.searchRef.current!=="";r||m&&h.key===" "||Sk.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})});Wx.displayName=wv;var xG=A.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:i,...s}=e,o=CP(wv,r),l=hG(r),c=A.useRef(null),d=wt(t,c),[u,h]=A.useState(!1),[m,g]=A.useState("");return A.useEffect(()=>{const b=c.current;b&&g((b.textContent??"").trim())},[s.children]),a.jsx(Gm.ItemSlot,{scope:r,disabled:n,textValue:i??m,children:a.jsx(D7,{asChild:!0,...l,focusable:!n,children:a.jsx(st.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...s,ref:d,onPointerMove:Ge(e.onPointerMove,Km(b=>{n?o.onItemLeave(b):(o.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ge(e.onPointerLeave,Km(b=>o.onItemLeave(b))),onFocus:Ge(e.onFocus,()=>h(!0)),onBlur:Ge(e.onBlur,()=>h(!1))})})})}),o4e="MenuCheckboxItem",bG=A.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...i}=e;return a.jsx(SG,{scope:e.__scopeMenu,checked:r,children:a.jsx(Wx,{role:"menuitemcheckbox","aria-checked":jv(r)?"mixed":r,...i,ref:t,"data-state":DP(r),onSelect:Ge(i.onSelect,()=>n==null?void 0:n(jv(r)?!0:!r),{checkForDefaultPrevented:!1})})})});bG.displayName=o4e;var wG="MenuRadioGroup",[l4e,c4e]=Uc(wG,{value:void 0,onValueChange:()=>{}}),jG=A.forwardRef((e,t)=>{const{value:r,onValueChange:n,...i}=e,s=on(n);return a.jsx(l4e,{scope:e.__scopeMenu,value:r,onValueChange:s,children:a.jsx(MP,{...i,ref:t})})});jG.displayName=wG;var NG="MenuRadioItem",_G=A.forwardRef((e,t)=>{const{value:r,...n}=e,i=c4e(NG,e.__scopeMenu),s=r===i.value;return a.jsx(SG,{scope:e.__scopeMenu,checked:s,children:a.jsx(Wx,{role:"menuitemradio","aria-checked":s,...n,ref:t,"data-state":DP(s),onSelect:Ge(n.onSelect,()=>{var o;return(o=i.onValueChange)==null?void 0:o.call(i,r)},{checkForDefaultPrevented:!1})})})});_G.displayName=NG;var RP="MenuItemIndicator",[SG,u4e]=Uc(RP,{checked:!1}),AG=A.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...i}=e,s=u4e(RP,r);return a.jsx(bn,{present:n||jv(s.checked)||s.checked===!0,children:a.jsx(st.span,{...i,ref:t,"data-state":DP(s.checked)})})});AG.displayName=RP;var d4e="MenuSeparator",kG=A.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return a.jsx(st.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});kG.displayName=d4e;var f4e="MenuArrow",EG=A.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,i=Hx(r);return a.jsx(iT,{...i,...n,ref:t})});EG.displayName=f4e;var h4e="MenuSub",[UDe,TG]=Uc(h4e),Th="MenuSubTrigger",PG=A.forwardRef((e,t)=>{const r=qc(Th,e.__scopeMenu),n=Dp(Th,e.__scopeMenu),i=TG(Th,e.__scopeMenu),s=CP(Th,e.__scopeMenu),o=A.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=s,d={__scopeMenu:e.__scopeMenu},u=A.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return A.useEffect(()=>u,[u]),A.useEffect(()=>{const h=l.current;return()=>{window.clearTimeout(h),c(null)}},[l,c]),a.jsx(TP,{asChild:!0,...d,children:a.jsx(xG,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":i.contentId,"data-state":MG(r.open),...e,ref:Iv(t,i.onTriggerChange),onClick:h=>{var m;(m=e.onClick)==null||m.call(e,h),!(e.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:Ge(e.onPointerMove,Km(h=>{s.onItemEnter(h),!h.defaultPrevented&&!e.disabled&&!r.open&&!o.current&&(s.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{r.onOpenChange(!0),u()},100))})),onPointerLeave:Ge(e.onPointerLeave,Km(h=>{var g,b;u();const m=(g=r.content)==null?void 0:g.getBoundingClientRect();if(m){const v=(b=r.content)==null?void 0:b.dataset.side,y=v==="right",x=y?-5:5,w=m[y?"left":"right"],_=m[y?"right":"left"];s.onPointerGraceIntentChange({area:[{x:h.clientX+x,y:h.clientY},{x:w,y:m.top},{x:_,y:m.top},{x:_,y:m.bottom},{x:w,y:m.bottom}],side:v}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(h),h.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:Ge(e.onKeyDown,h=>{var g;const m=s.searchRef.current!=="";e.disabled||m&&h.key===" "||GOe[n.dir].includes(h.key)&&(r.onOpenChange(!0),(g=r.content)==null||g.focus(),h.preventDefault())})})})});PG.displayName=Th;var CG="MenuSubContent",OG=A.forwardRef((e,t)=>{const r=pG(Ga,e.__scopeMenu),{forceMount:n=r.forceMount,...i}=e,s=qc(Ga,e.__scopeMenu),o=Dp(Ga,e.__scopeMenu),l=TG(CG,e.__scopeMenu),c=A.useRef(null),d=wt(t,c);return a.jsx(Gm.Provider,{scope:e.__scopeMenu,children:a.jsx(bn,{present:n||s.open,children:a.jsx(Gm.Slot,{scope:e.__scopeMenu,children:a.jsx(OP,{id:l.contentId,"aria-labelledby":l.triggerId,...i,ref:d,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{var h;o.isUsingKeyboardRef.current&&((h=c.current)==null||h.focus()),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:Ge(e.onFocusOutside,u=>{u.target!==l.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:Ge(e.onEscapeKeyDown,u=>{o.onClose(),u.preventDefault()}),onKeyDown:Ge(e.onKeyDown,u=>{var g;const h=u.currentTarget.contains(u.target),m=KOe[o.dir].includes(u.key);h&&m&&(s.onOpenChange(!1),(g=l.trigger)==null||g.focus(),u.preventDefault())})})})})})});OG.displayName=CG;function MG(e){return e?"open":"closed"}function jv(e){return e==="indeterminate"}function DP(e){return jv(e)?"indeterminate":e?"checked":"unchecked"}function m4e(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function p4e(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function g4e(e,t,r){const i=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,s=r?e.indexOf(r):-1;let o=p4e(e,Math.max(s,0));i.length===1&&(o=o.filter(d=>d!==r));const c=o.find(d=>d.toLowerCase().startsWith(i.toLowerCase()));return c!==r?c:void 0}function y4e(e,t){const{x:r,y:n}=e;let i=!1;for(let s=0,o=t.length-1;s<t.length;o=s++){const l=t[s],c=t[o],d=l.x,u=l.y,h=c.x,m=c.y;u>n!=m>n&&r<(h-d)*(n-u)/(m-u)+d&&(i=!i)}return i}function v4e(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return y4e(r,t)}function Km(e){return t=>t.pointerType==="mouse"?e(t):void 0}var x4e=mG,b4e=TP,w4e=gG,j4e=yG,N4e=MP,_4e=vG,S4e=Wx,A4e=bG,k4e=jG,E4e=_G,T4e=AG,P4e=kG,C4e=EG,O4e=PG,M4e=OG,Gx="DropdownMenu",[R4e]=xn(Gx,[fG]),Kn=fG(),[D4e,RG]=R4e(Gx),DG=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:i,defaultOpen:s,onOpenChange:o,modal:l=!0}=e,c=Kn(t),d=A.useRef(null),[u,h]=Ka({prop:i,defaultProp:s??!1,onChange:o,caller:Gx});return a.jsx(D4e,{scope:t,triggerId:ja(),triggerRef:d,contentId:ja(),open:u,onOpenChange:h,onOpenToggle:A.useCallback(()=>h(m=>!m),[h]),modal:l,children:a.jsx(x4e,{...c,open:u,onOpenChange:h,dir:n,modal:l,children:r})})};DG.displayName=Gx;var IG="DropdownMenuTrigger",LG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...i}=e,s=RG(IG,r),o=Kn(r);return a.jsx(b4e,{asChild:!0,...o,children:a.jsx(st.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...i,ref:Iv(t,s.triggerRef),onPointerDown:Ge(e.onPointerDown,l=>{!n&&l.button===0&&l.ctrlKey===!1&&(s.onOpenToggle(),s.open||l.preventDefault())}),onKeyDown:Ge(e.onKeyDown,l=>{n||(["Enter"," "].includes(l.key)&&s.onOpenToggle(),l.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});LG.displayName=IG;var I4e="DropdownMenuPortal",$G=e=>{const{__scopeDropdownMenu:t,...r}=e,n=Kn(t);return a.jsx(w4e,{...n,...r})};$G.displayName=I4e;var FG="DropdownMenuContent",BG=A.forwardRef((e,t)=>
897{const{__scopeDropdownMenu:r,...n}=e,i=RG(FG,r),s=Kn(r),o=A.useRef(!1);return a.jsx(j4e,{id:i.contentId,"aria-labelledby":i.triggerId,...s,...n,ref:t,onCloseAutoFocus:Ge(e.onCloseAutoFocus,l=>{var c;o.current||(c=i.triggerRef.current)==null||c.focus(),o.current=!1,l.preventDefault()}),onInteractOutside:Ge(e.onInteractOutside,l=>{const c=l.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0,u=c.button===2||d;(!i.modal||u)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});BG.displayName=FG;var L4e="DropdownMenuGroup",$4e=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Kn(r);return a.jsx(N4e,{...i,...n,ref:t})});$4e.displayName=L4e;var F4e="DropdownMenuLabel",UG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Kn(r);return a.jsx(_4e,{...i,...n,ref:t})});UG.displayName=F4e;var B4e="DropdownMenuItem",qG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Kn(r);return a.jsx(S4e,{...i,...n,ref:t})});qG.displayName=B4e;var U4e="DropdownMenuCheckboxItem",zG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Kn(r);return a.jsx(A4e,{...i,...n,ref:t})});zG.displayName=U4e;var q4e="DropdownMenuRadioGroup",z4e=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Kn(r);return a.jsx(k4e,{...i,...n,ref:t})});z4e.displayName=q4e;var V4e="DropdownMenuRadioItem",VG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Kn(r);return a.jsx(E4e,{...i,...n,ref:t})});VG.displayName=V4e;var H4e="DropdownMenuItemIndicator",HG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Kn(r);return a.jsx(T4e,{...i,...n,ref:t})});HG.displayName=H4e;var W4e="DropdownMenuSeparator",WG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Kn(r);return a.jsx(P4e,{...i,...n,ref:t})});WG.displayName=W4e;var G4e="DropdownMenuArrow",K4e=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Kn(r);return a.jsx(C4e,{...i,...n,ref:t})});K4e.displayName=G4e;var Y4e="DropdownMenuSubTrigger",GG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Kn(r);return a.jsx(O4e,{...i,...n,ref:t})});GG.displayName=Y4e;var X4e="DropdownMenuSubContent",KG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Kn(r);return a.jsx(M4e,{...i,...n,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});KG.displayName=X4e;var Q4e=DG,Z4e=LG,J4e=$G,YG=BG,XG=UG,QG=qG,ZG=zG,JG=VG,eK=HG,tK=WG,rK=GG,nK=KG;const IP=Q4e,LP=Z4e,eMe=A.forwardRef(({className:e,inset:t,children:r,...n},i)=>a.jsxs(rK,{ref:i,className:Ie("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...n,children:[r,a.jsx(ip,{className:"ml-auto"})]}));eMe.displayName=rK.displayName;const tMe=A.forwardRef(({className:e,...t},r)=>a.jsx(nK,{ref:r,className:Ie("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));tMe.displayName=nK.displayName;const Kx=A.forwardRef(({className:e,sideOffset:t=4,...r},n)=>
897a.jsx(J4e,{children:a.jsx(YG,{ref:n,sideOffset:t,className:Ie("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));Kx.displayName=YG.displayName;const wa=A.forwardRef(({className:e,inset:t,...r},n)=>a.jsx(QG,{ref:n,className:Ie("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...r}));wa.displayName=QG.displayName;const rMe=A.forwardRef(({className:e,children:t,checked:r,...n},i)=>a.jsxs(ZG,{ref:i,className:Ie("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...n,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(eK,{children:a.jsx(Yo,{className:"h-4 w-4"})})}),t]}));rMe.displayName=ZG.displayName;const nMe=A.forwardRef(({className:e,children:t,...r},n)=>a.jsxs(JG,{ref:n,className:Ie("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(eK,{children:a.jsx(Rk,{className:"h-2 w-2 fill-current"})})}),t]}));nMe.displayName=JG.displayName;const aK=A.forwardRef(({className:e,inset:t,...r},n)=>a.jsx(XG,{ref:n,className:Ie("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));aK.displayName=XG.displayName;const $P=A.forwardRef(({className:e,...t},r)=>a.jsx(tK,{ref:r,className:Ie("-mx-1 my-1 h-px bg-muted",e),...t}));$P.displayName=tK.displayName;class aMe{constructor(){this.cache=new Map,this.cacheTimestamp=null,this.CACHE_DURATION=300*1e3}async getConfig(t,r=null){try{return await this.refreshCacheIfNeeded(),this.cache.get(t)||r}catch(n){return console.error(`Error getting config for key ${t}:`,n),r}}async refreshCacheIfNeeded(){const t=Date.now();(!this.cacheTimestamp||t-this.cacheTimestamp>this.CACHE_DURATION)&&await this.refreshCache()}async refreshCache(){try{const t=await je.AppConfig.list();this.cache.clear(),t.forEach(r=>{if(r.is_active){let n=r.config_value;switch(r.config_type){case"number":n=parseFloat(n);break;case"boolean":n=n==="true"||n===!0;break;case"json":try{n=JSON.parse(n)}catch{console.warn(`Invalid JSON for config ${r.config_key}:`,n)}break}this.cache.set(r.config_key,n)}}),this.cacheTimestamp=Date.now()}catch(t){console.error("Error refreshing app config cache:",t)}}async updateConfig(t,r,n="system"){try{const i=await je.AppConfig.filter({config_key:t});i.length>0?await je.AppConfig.update(i[0].id,{config_value:String(r),updated_by:n,last_updated:new Date().toISOString()}):await je.AppConfig.create({config_key:t,config_value:String(r),config_type:"string",display_name:t,description:`Auto-created config for ${t}`,category:"general",updated_by:n,last_updated:new Date().toISOString()}),await this.refreshCache()}catch(i){throw console.error(`Error updating config ${t}:`,i),i}}clearCache(){this.cache.clear(),this.cacheTimestamp=null}}const On=new aMe;function iMe(){const[e,t]=A.useState([]),[r,n]=A.useState(!0),[i,s]=A.useState(!1),[o,l]=A.useState(null),[c,d]=A.useState({}),{toast:u}=np();A.useEffect(()=>{h()},[]);const h=async()=>{n(!0);try{const[y,x]=await Promise.all([je.AppConfig.list(null,0),je.User.me()]);console.log("Loaded configs:",y),t(y.sort((w,_)=>
897w.display_name.localeCompare(_.display_name))),l(x)}catch(y){console.error("Error loading config data:",y),u({title:"Error",description:"Failed to load configuration data",variant:"destructive"})}n(!1)},m=(y,x)=>{d(w=>({...w,[y]:x}))},g=async y=>{if(c[y.id]){s(!0);try{await je.AppConfig.update(y.id,{config_value:c[y.id],updated_by:(o==null?void 0:o.email)||"admin",last_updated:new Date().toISOString()}),await On.clearCache(),await On.refreshCache(),t(x=>x.map(w=>w.id===y.id?{...w,config_value:c[y.id],updated_by:o==null?void 0:o.email,last_updated:new Date().toISOString()}:w)),d(x=>{const w={...x};return delete w[y.id],w}),u({title:"Success",description:`${y.display_name} updated successfully`,variant:"default"})}catch(x){console.error("Error saving config:",x),u({title:"Error",description:`Failed to update ${y.display_name}`,variant:"destructive"})}s(!1)}},b=y=>{const x=e.filter(w=>w.category===y);return console.log(`Configs for category '${y}':`,x),x},v=y=>{const x=c[y.id]!==void 0?c[y.id]:y.config_value,w=c[y.id]!==void 0;return a.jsxs(be,{className:"bg-gray-900 border-gray-700",children:[a.jsx(Be,{className:"pb-2",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx(qe,{className:"text-white text-base",children:y.display_name}),a.jsx("p",{className:"text-sm text-gray-400 mt-1",children:y.description})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Oe,{variant:"outline",className:"text-xs",children:y.config_type}),w&&a.jsx(Oe,{className:"bg-orange-600 text-xs",children:"Modified"})]})]})}),a.jsxs(Se,{className:"space-y-3",children:[y.config_type==="url"?a.jsxs("div",{className:"space-y-2",children:[a.jsx(Je,{value:x,onChange:_=>m(y.id,_.target.value),className:"bg-gray-800 border-gray-700 text-white font-mono text-sm",placeholder:"https://..."}),x&&a.jsxs("a",{href:x,target:"_blank",rel:"noopener noreferrer",className:"text-cyan-400 hover:underline text-xs flex items-center",children:[a.jsx(Br,{className:"h-3 w-3 mr-1"}),"Test Link"]})]}):y.config_type==="json"?a.jsx(Wn,{value:x,onChange:_=>m(y.id,_.target.value),className:"bg-gray-800 border-gray-700 text-white font-mono text-sm h-24",placeholder:'{"key": "value"}'}):a.jsx(Je,{value:x,onChange:_=>m(y.id,_.target.value),className:"bg-gray-800 border-gray-700 text-white",type:y.config_type==="number"?"number":"text"}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"text-xs text-gray-500",children:["Last updated: ",y.last_updated?new Date(y.last_updated).toLocaleString():"Never",y.updated_by&&` by ${y.updated_by}`]}),a.jsx(se,{size:"sm",onClick:()=>g(y),disabled:!w||i,className:"bg-cyan-600 hover:bg-cyan-700",children:i?a.jsx(kt,{className:"h-3 w-3 animate-spin"}):a.jsxs(a.Fragment,{children:[a.jsx(Tv,{className:"h-3 w-3 mr-1"}),"Save"]})})]})]})]},y.id)};return r?a.jsxs("div",{className:"flex items-center justify-center py-8",children:[a.jsx(kt,{className:"h-8 w-8 animate-spin text-cyan-500"}),a.jsx("span",{className:"ml-2 text-gray-400",children:"Loading configuration..."})]}):a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"text-xl font-semibold text-white",children:"Application Configuration"}),a.jsx("p",{className:"text-gray-400",children:"Manage global settings for the application"})]}),a.jsxs(se,{variant:"outline",onClick:h,className:"text-gray-300 border-gray-600",children:[a.jsx(Xr,{className:"h-4 w-4 mr-2"}),"Refresh"]})]}),a.jsxs(ei,{defaultValue:"broker",className:"space-y-4",children:[a.jsxs(Ta,{className:"bg-gray-900",children:[a.jsxs(Nt,{value:"broker",className:"data-[state=active]:bg-gray-700",children:[a.jsx(Ev,{className:"h-4 w-4 mr-2"}),"Broker Settings"]}),a.jsxs(Nt,{value:"ui",className:"data-[state=active]:bg-gray-700",children:[a.jsx(SJ,{className:"h-4 w-4 mr-2"}),"UI Settings"]}),a.jsxs(Nt,{value:"general",className:"data-[state=active]:bg-gray-700",children:[a.jsx(ji,{className:"h-4 w-4 mr-2"}),"General"]})]}),a.jsx(Pt,{value:"broker",className:"space-y-4",children:a.jsx("div",{className:"grid gap-4",children:b("broker").length>0?b("broker").map(y=>v(y)):a.jsxs(be,{className:"bg-gray-900 border-gray-700 p-6 text-center",children:[a.jsx(Lt,{className:"h-8 w-8 text-yellow-500 mx-auto mb-2"}),a.jsx("p",{className:"text-gray-400 mb-2",children:"No broker
897configuration found"}),a.jsx("p",{className:"text-sm text-gray-500",children:'Click "Refresh" above or check if broker configs exist in the database.'}),a.jsxs(se,{onClick:h,className:"mt-3 bg-cyan-600 hover:bg-cyan-700",children:[a.jsx(Xr,{className:"h-4 w-4 mr-2"}),"Reload Configuration"]})]})})}),a.jsx(Pt,{value:"ui",className:"space-y-4",children:a.jsx("div",{className:"grid gap-4",children:b("ui").length>0?b("ui").map(y=>v(y)):a.jsxs(be,{className:"bg-gray-900 border-gray-700 p-6 text-center",children:[a.jsx(Lt,{className:"h-8 w-8 text-yellow-500 mx-auto mb-2"}),a.jsx("p",{className:"text-gray-400 mb-2",children:"No UI configuration found"}),a.jsx("p",{className:"text-sm text-gray-500",children:'Click "Refresh" above or check if UI configs exist in the database.'}),a.jsxs(se,{onClick:h,className:"mt-3 bg-cyan-600 hover:bg-cyan-700",children:[a.jsx(Xr,{className:"h-4 w-4 mr-2"}),"Reload Configuration"]})]})})}),a.jsx(Pt,{value:"general",className:"space-y-4",children:a.jsx("div",{className:"grid gap-4",children:b("general").length>0?b("general").map(y=>v(y)):a.jsxs(be,{className:"bg-gray-900 border-gray-700 p-6 text-center",children:[a.jsx(Lt,{className:"h-8 w-8 text-yellow-500 mx-auto mb-2"}),a.jsx("p",{className:"text-gray-400 mb-2",children:"No general configuration found"}),a.jsx("p",{className:"text-sm text-gray-500",children:"General configs can be added as needed."})]})})})]}),Object.keys(c).length>0&&a.jsx(be,{className:"bg-orange-900/20 border-orange-700/30",children:a.jsx(Se,{className:"p-4",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center text-orange-400",children:[a.jsx(Lt,{className:"h-4 w-4 mr-2"}),a.jsx("span",{className:"text-sm",children:"You have unsaved changes"})]}),a.jsxs("div",{className:"text-xs text-gray-400",children:[Object.keys(c).length," configuration(s) modified"]})]})})})]})}function sMe(){var eo;const[e,t]=A.useState([]),[r,n]=A.useState([]),[i,s]=A.useState(null),[o,l]=A.useState(!0),[c,d]=A.useState(!1),[u,h]=A.useState(null),[m,g]=A.useState(""),[b,v]=A.useState("all"),[y,x]=A.useState(!1),[w,_]=A.useState(!1),[j,S]=A.useState(null),[k,T]=A.useState(!1),[P,M]=A.useState(null),[C,O]=A.useState({key:"created_date",direction:"desc"}),[D,L]=A.useState(""),[F,U]=A.useState(""),[G,W]=A.useState("info"),[q,V]=A.useState(""),[z,I]=A.useState(""),[B,H]=A.useState(!0),[J,ee]=A.useState(!1),[Y,X]=A.useState([]),[ne,Q]=A.useState([]),[ie,me]=A.useState([]),[oe,Ne]=A.useState([]),[_e,xe]=A.useState(null),[Ee,Pe]=A.useState(1),[Z,ae]=A.useState(!1),[pe,ye]=A.useState(!1),[he,He]=A.useState(!1),[Te,it]=A.useState(null),[_t,Bt]=A.useState({full_name:"",nickname:"",bio:"",profile_image:"",admin_notes:""}),[Et,Yn]=A.useState(!1);A.useEffect(()=>{Dt()},[]);const Dt=async()=>{try{const fe=await je.User.me();h(fe),fe.email==="[email protected]"||fe.role==="admin"?(d(!0),Me()):(d(!1),x(!0),l(!1))}catch(fe){console.error("Authentication error:",fe),x(!0),l(!1)}},kr=async()=>{try{const fe=await je.GlobalPopup.list();X(fe.filter(Ye=>Ye.status==="active"))}catch(fe){console.error("Error loading global popups:",fe)}},Me=async()=>{l(!0);try{const[fe,Ye,gt,hr,Ur]=await Promise.all([je.User.list(),je.SharedEA.list(),je.GeneratedRobot.list(),je.SharedEAComment.list(),je.ChartAnalysis.list()]),Rr=fe.sort((We,ai)=>We.email==="[email protected]"?-1:ai.email==="[email protected]"?1:new Date(We.created_date)-new Date(ai.created_date)).map((We,ai)=>({...We,member_number:ai+1,activity_score:We.activity_score||(We.last_activity?100:0)+(We.eas_shared||0)*10+(We.comments_posted||0)*2,level:We.level||1,eas_shared:We.eas_shared||0,comments_posted:We.comments_posted||0,xp_points:We.xp_points||0}));t(Rr),n(Ye),Q(gt||[]),me(hr||[]),Ne(Ur||[]),s({totalUsers:fe.length,activeUsers:fe.filter(We=>We.status==="active").length,premiumUsers:fe.filter(We=>We.status==="premium"||We.status==="vip").length,vipUsers:fe.filter(We=>We.status==="vip").length,totalEAs:Ye.length,generatedEAs:(gt||[]).length,chartAnalyses:(Ur||[]).length,totalDownloads:Ye.reduce((We,ai)=>We+(ai.downloads||0),0)}),await kr()}catch(fe){console.error("Error loading admin data:",fe),Le({title:"Error loading data",description:"Failed to load administrative data",variant:"destructive"})}l(!1)},ze=async()=>
897{if(!D||!F){Le({title:"Missing Information",description:"Please provide both a title and message for the popup",variant:"destructive"});return}ee(!0);try{const fe={title:D,message:F,type:G,status:"active",action_url:q||void 0,action_text:z||void 0,dismissible:B,created_by:u==null?void 0:u.email,created_date:new Date().toISOString(),seen_by:{}};await je.GlobalPopup.create(fe),L(""),U(""),W("info"),V(""),I(""),H(!0),await kr(),Le({title:"Global Popup Created",description:"Your global popup has been created successfully",variant:"default"})}catch(fe){console.error("Error creating global popup:",fe),Le({title:"Error",description:"Failed to create global popup",variant:"destructive"})}ee(!1)},jt=async fe=>{try{await je.GlobalPopup.update(fe,{status:"inactive"}),X(Ye=>Ye.filter(gt=>gt.id!==fe)),Le({title:"Success",description:"The global popup has been deactivated",variant:"default"})}catch(Ye){console.error("Error deactivating global popup:",Ye),Le({title:"Error",description:"Failed to deactivate global popup",variant:"destructive"})}},vt=fe=>{O(Ye=>Ye.key===fe?{key:fe,direction:Ye.direction==="asc"?"desc":"asc"}:{key:fe,direction:["full_name","email"].includes(fe)?"asc":"desc"})},fr=te.useMemo(()=>{if(!e||e.length===0)return[];const fe=[...e];return fe.sort((Ye,gt)=>{if(Ye.email==="[email protected]")return-1;if(gt.email==="[email protected]"||Ye[C.key]==null)return 1;if(gt[C.key]==null)return-1;let hr=0;return typeof Ye[C.key]=="string"?hr=Ye[C.key].localeCompare(gt[C.key]):C.key==="created_date"||C.key==="last_activity"?hr=new Date(Ye[C.key])-new Date(gt[C.key]):hr=Ye[C.key]-gt[C.key],C.direction==="asc"?hr:-hr}),fe},[e,C]),un=te.useMemo(()=>fr.filter(fe=>{var Ur,pl,Rr;const Ye=m.toLowerCase(),gt=((Ur=fe.full_name)==null?void 0:Ur.toLowerCase().includes(Ye))||((pl=fe.email)==null?void 0:pl.toLowerCase().includes(Ye))||((Rr=fe.nickname)==null?void 0:Rr.toLowerCase().includes(Ye)),hr=b==="all"||b==="admin"&&fe.role==="admin"||b==="user"&&fe.role==="user"||b==="premium"&&fe.status==="premium"||b==="vip"&&fe.status==="vip"||b==="inactive"&&fe.status==="inactive"||b==="banned"&&fe.status==="banned";return gt&&hr}),[fr,m,b]),dn=fe=>C.key===fe?C.direction==="asc"?a.jsx(KQ,{className:"inline w-3 h-3 ml-1"}):a.jsx(qQ,{className:"inline w-3 h-3 ml-1"}):null,Ci=fe=>{if(fe.email==="[email protected]"){Le({title:"Action Restricted",description:"The primary admin account cannot be deleted.",variant:"destructive"});return}if(fe.email===(u==null?void 0:u.email)){Le({title:"Action Restricted",description:"You cannot delete your own account from the admin panel.",variant:"destructive"});return}S(fe),_(!0)},Oi=async()=>{if(j){if(j.email==="[email protected]"||j.email===(u==null?void 0:u.email)){Le({title:"Deletion Prevented",description:"This user cannot be deleted.",variant:"destructive"}),_(!1),S(null);return}try{await je.User.delete(j.id),Le({title:"User Deleted",description:`${j.full_name||j.email} has been deleted.`,variant:"default"}),t(fe=>fe.filter(Ye=>Ye.id!==j.id)),(Te==null?void 0:Te.id)===j.id&&(it(null),Bt({full_name:"",nickname:"",bio:"",profile_image:"",admin_notes:""}))}catch(fe){console.error("Error deleting user:",fe),Le({title:"Error",description:"Failed to delete user.",variant:"destructive"})}_(!1),S(null)}},Rn=fe=>{M(fe),T(!0)},ni=async(fe,Ye)=>{try{const gt=!Ye;await je.SharedEA.update(fe,{is_trusted:gt}),n(hr=>hr.map(Ur=>Ur.id===fe?{...Ur,is_trusted:gt}:Ur)),P&&P.id===fe&&M(hr=>({...hr,is_trusted:gt}))}catch(gt){console.error("Error updating EA trusted status:",gt),Le({title:"Error",description:"Failed to update EA trusted status.",variant:"destructive"})}},Ip=fe=>{it(fe),Bt({full_name:fe.full_name||"",nickname:fe.nickname||"",bio:fe.bio||"",profile_image:fe.profile_image||"",admin_notes:fe.admin_notes||""})},Js=(fe,Ye)=>{Bt(gt=>({...gt,[fe]:Ye}))},Lp=async()=>{if(Te){Yn(!0);try{const fe={full_name:_t.full_name,nickname:_t.nickname,bio:_t.bio,profile_image:_t.profile_image,admin_notes:_t.admin_notes};await je.User.update(Te.id,fe);const Ye={...Te,...fe};it(Ye),t(gt=>gt.map(hr=>hr.id===Te.id?Ye:hr)),Le({title:"User Data Saved",description:"User information has been updated.",variant:"default"})}catch(fe){console.error("Error saving user data:",fe),Le({title:"Error",description:"Failed to save user data.",variant:"destructive"})}Yn(!1)}},uf=async(fe,Ye)=>{if(!(!Te||Te.id!==fe)){if((Te.email==="[email protected]"||Te.email===(u==null?void 0:u.email))&&(Ye==="banned"||Ye==="inactive")){Le({title:"Action Restricted",description:`Status of ${Te.email} cannot be changed to ${Ye}.`,variant:"destructive"});return}try{await je.User.update(fe,{status:Ye});const gt={...Te,status:Ye};it(gt),t(hr=>hr.map(Ur=>
897Ur.id===fe?gt:Ur)),Le({title:"User Status Updated",description:`User status set to ${Ye}.`,variant:"default"})}catch(gt){console.error("Error updating user status:",gt),Le({title:"Error",description:"Failed to update user status.",variant:"destructive"})}}},$p=async(fe,Ye)=>{if(!(!Te||Te.id!==fe))try{await je.User.update(fe,{rank:Ye});const gt={...Te,rank:Ye};it(gt),t(hr=>hr.map(Ur=>Ur.id===fe?gt:Ur)),Le({title:"User Rank Updated",description:`User rank set to ${Ye}.`,variant:"default"})}catch(gt){console.error("Error updating user rank:",gt),Le({title:"Error",description:"Failed to update user rank.",variant:"destructive"})}},df=fe=>{xe(fe);const Ye=w0(fe)||fe.ai_limit===-1;ae(Ye),Pe(Ye?5:fe.ai_limit??1)},Fp=async()=>{if(_e){ye(!0);try{const fe=Z?-1:Math.max(1,parseInt(Ee)||1);await je.User.update(_e.id,{ai_limit:fe}),t(Ye=>Ye.map(gt=>gt.id===_e.id?{...gt,ai_limit:fe}:gt)),Le({title:"AI Limit Updated",description:`${_e.email}: ${Z?"Unlimited":fe+" AI credits"}`}),xe(null)}catch(fe){console.error("Error updating AI limit:",fe),Le({title:"Error",description:"Failed to update AI limit.",variant:"destructive"})}ye(!1)}},ml=async()=>{if(_e)try{await je.User.update(_e.id,{ai_used:0}),t(fe=>fe.map(Ye=>Ye.id===_e.id?{...Ye,ai_used:0}:Ye)),Le({title:"Usage Reset",description:`${_e.email} can use AI again.`}),xe(null)}catch(fe){console.error("Error resetting AI usage:",fe),Le({title:"Error",description:"Failed to reset usage.",variant:"destructive"})}},ff=async()=>{if(!he){He(!0);try{await vn.entities.User.updateMany({ai_used:{$gt:0}},{$set:{ai_used:0}}),t(fe=>fe.map(Ye=>({...Ye,ai_used:0}))),Le({title:"AI Credits Reset",description:"Usage counters were reset for all users."})}catch(fe){console.error("Error resetting AI credits:",fe),Le({title:"Error",description:"Failed to reset AI credits.",variant:"destructive"})}He(!1)}},Wt=fe=>{if(fe==null)return"";const Ye=String(fe);return Ye.search(/("|,|\n)/g)>=0?`"${Ye.replace(/"/g,'""')}"`:Ye},tb=async()=>{Le({title:"Preparing Download",description:"Fetching all user data, this may take a moment..."});try{const Ye=(await je.User.list(null,0)).map((We,ai)=>{var Bp,hf,mf,pf,gf;return{...We,member_number:ai+1,activity_score:We.activity_score||(We.last_activity?100:0)+(We.eas_shared||0)*10+(We.comments_posted||0)*2,nickname:We.nickname||"",bio:We.bio||"",website:((Bp=We.social_links)==null?void 0:Bp.website)||"",twitter:((hf=We.social_links)==null?void 0:hf.twitter)||"",linkedin:((mf=We.social_links)==null?void 0:mf.linkedin)||"",github:((pf=We.social_links)==null?void 0:pf.github)||"",broker_accounts_count:((gf=We.broker_accounts)==null?void 0:gf.length)||0,xp_points:We.xp_points||0,level:We.level||1,achievements_earned:We.achievements_earned||0,eas_liked:We.eas_liked||0,likes_received:We.likes_received||0,forum_posts:We.forum_posts||0,login_streak:We.login_streak||0,created_date_formatted:We.created_date?_s(new Date(We.created_date),"yyyy-MM-dd HH:mm:ss"):"",last_activity_formatted:We.last_activity?_s(new Date(We.last_activity),"yyyy-MM-dd HH:mm:ss"):"",admin_notes:We.admin_notes||""}}),gt=["ID","Member #","Full Name","Nickname","Email","Role","Status","Rank","XP Points","Level","Achievements Earned","EAs Shared","Comments Posted","Activity Score","Bio","Website","Twitter","LinkedIn","GitHub","Broker Accounts Count","Broker Registered","Registration Date","Last Activity","Admin Notes"],hr=Ye.map(We=>[Wt(We.id),Wt(We.member_number),Wt(We.full_name),Wt(We.nickname),Wt(We.email),Wt(We.role),Wt(We.status),Wt(We.rank),Wt(We.xp_points),Wt(We.level),Wt(We.achievements_earned),Wt(We.eas_shared),Wt(We.comments_posted),Wt(We.activity_score),Wt(We.bio),Wt(We.website),Wt(We.twitter),Wt(We.linkedin),Wt(We.github),Wt(We.broker_accounts_count),Wt(We.broker_registered?"Yes":"No"),Wt(We.created_date_formatted),Wt(We.last_activity_formatted),Wt(We.admin_notes)]),Ur=[gt.join(","),...hr.map(We=>We.join(","))].join(` 898`),pl=new Blob([Ur],{type:"text/csv;charset=utf-8;"}),Rr=document.createElement("a");if(Rr.download!==void 0){const We=URL.createObjectURL(pl);Rr.setAttribute("href",We),Rr.setAttribute("download",`robot4trade_users_${new Date().toISOString().split("T")[0]}.csv`),Rr.style.visibility="hidden",document.body.appendChild(Rr),Rr.click(),document.body.removeChild(Rr),URL.revokeObjectURL(We),Le({title:"Download Started",description:"User data CSV file is being downloaded.",variant:"default"})}else Le({title:"Download Failed",description:"Your browser does not support this download method.",variant:"destructive"})}catch(fe){console.error("Error downloading user data:",fe),Le({title:"Download Error",description:"Failed to generate or download user data. "+fe.message,variant:"destructive"})}};return y?a.jsxs("div",{className:"flex flex-col items-center justify-center h-[70vh] text-center",children:[a.jsx(Ar,{className:"h-16 w-16 text-red-500 mb-4"}),a.jsx("h1",{className:"text-2xl font-bold text-white mb-2",children:"Access Denied"}),a.jsx("p",{className:"text-gray-400 mb-6",children:"Only administrators have access to this panel."}
898),a.jsx(se,{asChild:!0,children:a.jsx(pt,{to:Ve("Dashboard"),children:"Return to Dashboard"})})]}):o?a.jsx("div",{className:"flex items-center justify-center h-[70vh]",children:a.jsxs("div",{className:"flex flex-col items-center gap-2",children:[a.jsx(kt,{className:"h-8 w-8 animate-spin text-cyan-500"}),a.jsx("p",{className:"text-gray-400",children:"Loading admin panel..."})]})}):a.jsxs("div",{className:"space-y-8 p-4 md:p-6",children:[a.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-start md:items-center gap-4",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(Ya,{className:"h-10 w-10"}),a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-bold text-white",children:"Admin Panel"}),a.jsx("p",{className:"text-gray-400 text-sm",children:"Manage users and system information"})]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs(Oe,{className:"bg-red-900 text-red-200",children:[a.jsx(Ar,{className:"h-3 w-3 mr-1"}),"Admin Access"]}),u&&a.jsxs("span",{className:"text-sm text-gray-400",children:["Welcome, ",u.full_name||u.email]})]})]}),a.jsx(Jye,{stats:i}),a.jsx(VOe,{users:e,generatedRobots:ne,eas:r,comments:ie,chartAnalyses:oe}),a.jsxs(ei,{defaultValue:"users",className:"space-y-4",children:[a.jsxs(Ta,{className:"bg-gray-800",children:[a.jsxs(Nt,{value:"users",className:"data-[state=active]:bg-gray-700",children:[a.jsx(la,{className:"h-4 w-4 mr-2"}),"Users"]}),a.jsxs(Nt,{value:"eas",className:"data-[state=active]:bg-gray-700",children:[a.jsx(Ts,{className:"h-4 w-4 mr-2"}),"Shared EAs"]}),a.jsxs(Nt,{value:"generated",className:"data-[state=active]:bg-gray-700",children:[a.jsx(_i,{className:"h-4 w-4 mr-2"}),"Generated EAs"]}),a.jsxs(Nt,{value:"notifications",className:"data-[state=active]:bg-gray-700",children:[a.jsx(Ko,{className:"h-4 w-4 mr-2"}),"Notifications"]}),a.jsxs(Nt,{value:"config",className:"data-[state=active]:bg-gray-700",children:[a.jsx(ji,{className:"h-4 w-4 mr-2"}),"App Configuration"]})]}),a.jsx(Pt,{value:"users",className:"space-y-4",children:a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[a.jsxs("div",{className:"md:col-span-2 space-y-4",children:[a.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 items-center",children:[a.jsx("div",{className:"flex-1",children:a.jsxs("div",{className:"relative",children:[a.jsx(al,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-500"}),a.jsx(Je,{placeholder:"Search users by name or email...",value:m,onChange:fe=>g(fe.target.value),className:"pl-10 bg-gray-800 border-gray-700 text-white"})]})}),a.jsxs(qt,{value:b,onValueChange:v,children:[a.jsx($t,{className:"w-full sm:w-[180px] bg-gray-800 border-gray-700 text-white",children:a.jsx(zt,{placeholder:"Filter users"})}),a.jsxs(Ft,{children:[a.jsx(Ce,{value:"all",children:"All Users"}),a.jsx(Ce,{value:"admin",children:"Admins"}),a.jsx(Ce,{value:"user",children:"Regular Users"}),a.jsx(Ce,{value:"premium",children:"Premium Users"}),a.jsx(Ce,{value:"vip",children:"VIP Users"}),a.jsx(Ce,{value:"inactive",children:"Inactive Users"}),a.jsx(Ce,{value:"banned",children:"Banned Users"})]})]}),a.jsxs(se,{onClick:tb,variant:"outline",className:"w-full sm:w-auto text-gray-300 border-gray-600 hover:bg-gray-700/50",children:[a.jsx(VZ,{className:"h-4 w-4 mr-2"}),"Download CSV"]}),a.jsxs(se,{onClick:ff,disabled:he,variant:"outline",className:"w-full sm:w-auto text-cyan-300 border-cyan-700 hover:bg-cyan-900/30",children:[a.jsx(Xr,{className:`h-4 w-4 mr-2 ${he?"animate-spin":""}`}),"Reset AI Credits"]})]}),a.jsxs(be,{className:"bg-gray-800 border-gray-700",children:[a.jsx(Be,{children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs(qe,{className:"text-white flex items-center",children:[a.jsx(la,{className:"h-5 w-5 mr-2 text-cyan-400"}),"User List"]}),a.jsxs(IP,{children:[a.jsx(LP,{asChild:!0,children:a.jsxs(se,{variant:"ghost",size:"sm",className:"text-gray-400",children:[a.jsx(PB,{className:"h-4 w-4 mr-1"}),"Sort"]})}),a.jsxs(Kx,{align:"end",className:"bg-gray-800 border-gray-700",children:[a.jsxs(wa,{onClick:()=>vt("member_number"),className:"cursor-pointer",children:["Member # ",dn("member_number")]}),a.jsxs(wa,{onClick:()=>vt("created_date"),className:"cursor-pointer",children:["Registration Date ",dn("created_date")]}),a.jsxs(wa,{onClick:()=>vt("full_name"),className:"cursor-pointer",children:["Name ",dn("full_name")]}),a.jsxs(wa,{onClick:()=>vt("level"),className:"cursor-pointer",children:["Level ",dn("level")]}),a.jsxs(wa,{onClick:()=>vt("activity_score"),className:"cursor-pointer",children:["Activity ",dn("activity_score")]})]})]})]})}),a.jsx(Se,{children:a.jsx("div",{className:"overflow-x-auto max-h-[60vh]",children:a.jsxs("table",{className:"w-full",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"text-left text-gray-400 border-b border-gray-700 text-xs uppercase tracking-wide",children:[a.jsx("th",{className:"pb-2 sticky top-0 bg-gray-800 z-10",children:"Client No."}),a.jsx("th",{className:"pb-2 sticky top-0 bg-gray-800 z-10",children:"User"}),a.jsx("th",{className:"pb-2 sticky top-0 bg-gray-800 z-10",children:"Status"}),a.jsx("th",{className:"pb-2 sticky top-0 bg-gray-800 z-10",children:"AI Usage"}),a.jsx("th",{className:"pb-2 sticky top-0 bg-gray-800 z-10",children:"Registration Date"}),a.jsx("th",{className:"pb-2 sticky top-0 bg-gray-800 z-10",children:"Actions"})]})}),a.jsx("tbody",{children:un.map(fe=>a.jsxs("tr",{className:`border-b border-gray-700/50 hover:bg-gray-700/30 cursor-pointer ${(Te==null?void 0:Te.id)===fe.id?"bg-cyan-900/20":""}`,onClick:()=>Ip(fe),children:[a.jsx("td",{className:"py-3 text-gray-400",children:fe.member_number}),a.jsxs("td",{className:"py-3",children:[a.jsx("div",{className:"font-medium text-white",children:fe.full_name||fe.nickname||fe.email.split("@")[0]}),a.jsx("div",{className:"text-xs text-gray-400",children:fe.email})]}),a.jsx("td",{className:"py-3",children:a.jsx(Oe,{className:fe.status==="active"?"bg-green-900/20 text-green-400":fe.status==="premium"?"bg-purple-900/20 text-purple-400":fe.status==="vip"?"bg-amber-900/20 text-amber-400":fe.status==="banned"?"bg-red-900/20 text-red-400":"bg-gray-900/20 text-gray-400",children:fe.status||"active"})}),a.jsx("td",{className:"py-3",children:(()=>{const Ye=Fz(fe);return a.jsx("button",{onClick:gt=>{gt.stopPropagation(),df(fe)},className:`inline-flex items-center rounded-full px-2.5 py-1 text-xs font-semibold whitespace-nowrap ${Ye.unlimited?"bg-purple-900/40 text-purple-300":Ye.exhausted?"bg-red-900/40 text-red-300":"bg-emerald-900/30 text-emerald-300"}`,title:"Click to edit AI credits",children:Ye.unlimited?"â Unlimited":`${Ye.used}/${Ye.limit}`})})()}),a.jsx("td",{className:"py-3 text-gray-400 text-sm",children:fe.created_date?_s(new Date(fe.created_date),"MMM d, yyyy"):"Unknown"}),a.jsx("td",{className:"py-3",children:a.jsx("div",{className:"flex gap-1",children:a.jsx(se,{variant:"ghost",size:"icon",className:"h-7 w-7 text-red-400 hover:text-red-300",onClick:Ye=>{Ye.stopPropagation(),Ci(fe)},disabled:fe.email===(u==null?void 0:u.email)||fe.email==="[email protected]",title:fe.email===(u==null?void 0:u.email)||fe.email==="[email protected]"?"Cannot delete this user":"Delete User",children:a.jsx(Ud,{className:"h-3.5 w-3.5"})})})})]},fe.id))})]})})})]})]}),a.jsx("div",{className:"md:col-span-1 space-y-4",children:a.jsxs(be,{className:"bg-gray-800 border-gray-700 sticky top-4",children:[a.jsx(Be,{children:a.jsxs(qe,{className:"text-white flex items-center",children:[a.jsx(Pee,{className:"h-5 w-5 mr-2 text-purple-400"}),"Manage User"]})}),a.jsx(Se,{className:"max-h-[calc(100vh-8rem)] overflow-y-auto",children:Te?a.jsxs("div",{className:"space-y-5",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"h-16 w-16 rounded-full bg-gray-700 flex items-center justify-center text-xl font-bold text-white flex-shrink-0 overflow-hidden",children:_t.profile_image?a.jsx("img",{src:_t.profile_image,alt:"avatar",className:"h-full w-full object-cover",loading:"lazy"}):(eo=Te.nickname||Te.full_name||Te.email)==null?void 0:eo.charAt(0).toUpperCase()}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-semibold text-white",children:_t.full_name||_t.nickname||Te.email.split("@")[0]}),a.jsx("p",{className:"text-sm text-gray-400",children:Te.email}),a.jsxs("p",{className:"text-xs text-gray-500 mt-0.5",children:["Joined: ",_s(new Date(Te.created_date),"PP")]})]})]}),a.jsxs("div",{className:"space-y-1",children:[a.jsx(Nr,{htmlFor:"user-full-name",className:"text-gray-300",children:"Full Name"}),a.jsx(Je,{id:"user-full-name",value:_t.full_name,onChange:fe=>Js("full_name",fe.target.value),className:"bg-gray-900 border-gray-700"})]}),a.jsxs("div",{className:"space-y-1",children:[a.jsx(Nr,{htmlFor:"user-nickname",className:"text-gray-300",children:"Nickname"}),a.jsx(Je,{id:"user-nickname",value:_t.nickname,onChange:fe=>Js("nickname",fe.target.value),className:"bg-gray-900 border-gray-700"})]}),a.jsxs("div",{className:"space-y-1",children:[a.jsx(Nr,{htmlFor:"user-bio",className:"text-gray-300",children:"Bio"}),a.jsx(Wn,{id:"user-bio",value:_t.bio,onChange:fe=>Js("bio",fe.target.value),className:"bg-gray-900 border-gray-700 h-20",placeholder:"User bio..."})]}),a.jsxs("div",{className:"space-y-1",children:[a.jsx(Nr,{htmlFor:"user-profile-image",className:"text-gray-300",children:"Profile Image URL"}),a.jsx(Je,{id:"user-profile-image",type:"url",value:_t.profile_image,onChange:fe=>Js("profile_image",fe.target.value),className:"bg-gray-900 border-gray-700",placeholder:"https://..."})]}),a.jsxs("div",{className:"space-y-1",children:[a.jsx(Nr,{htmlFor:"user-status",className:"text-gray-300",children:"Status"}),a.jsxs(qt,{value:Te.status||"active",onValueChange:fe=>uf(Te.id,fe),children:[a.jsx($t,{id:"user-status",className:"bg-gray-900 border-gray-700",children:a.jsx(zt,{})}),a.jsxs(Ft,{children:[a.jsx(Ce,{value:"active",children:"Active"}),a.jsx(Ce,{value:"premium",children:"Premium"}),a.jsx(Ce,{value:"vip",children:"VIP"}),a.jsx(Ce,{value:"inactive",children:"Inactive"}),a.jsx(Ce,{value:"banned",children:"Banned"})]})]})]}),a.jsxs("div",{className:"space-y-1",children:[a.jsx(Nr,{htmlFor:"user-rank",className:"text-gray-300",children:"Rank"}),a.jsxs(qt,{value:Te.rank||"novice",onValueChange:fe=>$p(Te.id,fe),children:[a.jsx($t,{id:"user-rank",className:"bg-gray-900 border-gray-700",children:a.jsx(zt,{})}),a.jsxs(Ft,{children:[a.jsx(Ce,{value:"novice",children:"Novice"}),a.jsx(Ce,{value:"beginner",children:"Beginner"}),a.jsx(Ce,{value:"intermediate",children:"Intermediate"}),a.jsx(Ce,{value:"advanced",children:"Advanced"}),a.jsx(Ce,{value:"expert",children:"Expert"}),a.jsx(Ce,{value:"master",children:"Master"}),a.jsx(Ce,{value:"grandmaster",children:"Grandmaster"})]})]})]}),a.jsxs("div",{className:"space-y-1",children:[a.jsx(Nr,{htmlFor:"admin-notes",className:"text-gray-300",children:"Admin Notes (Private)"}),a.jsx(Wn,{id:"admin-notes",value:_t.admin_notes,onChange:fe=>Js("admin_notes",fe.target.value),placeholder:"Add private notes about this user...",className:"bg-gray-900 border-gray-700 h-20"})]}),a.jsxs(se,{onClick:Lp,disabled:Et,className:"w-full bg-cyan-600 hover:bg-cyan-700",children:[Et?a.jsx(kt,{className:"h-4 w-4 animate-spin mr-2"}):a.jsx(Tv,{className:"h-4 w-4 mr-2"}),"Save All Changes"]}),a.jsxs("div",{className:"grid grid-cols-2 gap-3 pt-2",children:[a.jsxs("div",{className:"bg-gray-700/50 p-2 rounded",children:[a.jsx("p",{className:"text-xs text-gray-400",children:"XP Points"}),a.jsx("p",{className:"font-semibold text-white",children:Te.xp_points||0})]}),a.jsxs("div",{className:"bg-gray-700/50 p-2 rounded",children:[a.jsx("p",{className:"text-xs text-gray-400",children:"EAs Shared"}),a.jsx("p",{className:"font-semibold text-white",children:Te.eas_shared||0})]}),a.jsxs("div",{className:"bg-gray-700/50 p-2 rounded",children:[a.jsx("p",{className:"text-xs text-gray-400",children:"Comments"}),a.jsx("p",{className:"font-semibold text-white",children:Te.comments_posted||0})]}),a.jsxs("div",{className:"bg-gray-700/50 p-2 rounded",children:[a.jsx("p",{className:"text-xs text-gray-400",children:"Activity Score"}),a.jsx("p",{className:"font-semibold text-white",children:Te.activity_score||0})]})]}),a.jsxs("div",{className:"flex flex-col space-y-2 pt-3 border-t border-gray-700/50",children:[a.jsxs(se,{variant:"outline",className:"text-gray-300 border-gray-600 hover:bg-gray-700/50",onClick:()=>window.open(`mailto:${Te.email}`,"_blank"),children:[a.jsx(sp,{className:"h-4 w-4 mr-2"})," Email User"]}),a.jsxs(se,{variant:"destructive",onClick:()=>uf(Te.id,"banned"),disabled:Te.email===(u==null?void 0:u.email)||Te.status==="banned"||Te.email==="[email protected]",children:[a.jsx(CB,{className:"h-4 w-4 mr-2"})," ",Te.status==="banned"?"User is Banned":"Ban User"]}
898)]})]}):a.jsxs("div",{className:"text-center py-10",children:[a.jsx(Oee,{className:"h-12 w-12 text-gray-600 mx-auto mb-2"}),a.jsx("p",{className:"text-gray-400",children:"Select a user from the list to manage."})]})})]})})]})}),a.jsx(Pt,{value:"eas",className:"space-y-4",children:a.jsxs(be,{className:"bg-gray-800 border-gray-700",children:[a.jsx(Be,{children:a.jsx(qe,{className:"text-white",children:"Shared EAs Management"})}),a.jsx(Se,{children:a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"text-left text-gray-400 border-b border-gray-700",children:[a.jsx("th",{className:"pb-2",children:"Name"}),a.jsx("th",{className:"pb-2",children:"Platform"}),a.jsx("th",{className:"pb-2",children:"Author"}),a.jsx("th",{className:"pb-2",children:"Downloads"}),a.jsx("th",{className:"pb-2",children:"Trusted"}),a.jsx("th",{className:"pb-2",children:"Actions"})]})}),a.jsx("tbody",{children:r.map(fe=>{var Ye;return a.jsxs("tr",{className:"border-b border-gray-700/50 hover:bg-gray-700/30 cursor-pointer",onClick:()=>Rn(fe),children:[a.jsx("td",{className:"py-3 font-medium text-white",children:fe.name}),a.jsx("td",{className:"py-3",children:a.jsx(Oe,{children:(Ye=fe.platform)==null?void 0:Ye.toUpperCase()})}),a.jsx("td",{className:"py-3 text-gray-300",children:fe.author_name||fe.author}),a.jsx("td",{className:"py-3",children:fe.downloads||0}),a.jsx("td",{className:"py-3",children:fe.is_trusted?a.jsxs(Oe,{className:"bg-green-500/20 text-green-400",children:[a.jsx(Es,{className:"h-3 w-3 mr-1"})," Trusted"]}):a.jsx(Oe,{variant:"outline",children:"Not Trusted"})}),a.jsx("td",{className:"py-3",children:a.jsxs("div",{className:"flex gap-1",children:[a.jsx(se,{variant:"ghost",size:"icon",className:"h-8 w-8 text-gray-400 hover:text-white",onClick:gt=>{gt.stopPropagation(),Rn(fe)},children:a.jsx(Fd,{className:"h-4 w-4"})}),a.jsx(se,{variant:"ghost",size:"icon",className:`h-8 w-8 ${fe.is_trusted?"text-green-400":"text-gray-400"}`,onClick:gt=>{gt.stopPropagation(),ni(fe.id,fe.is_trusted)},children:a.jsx(Es,{className:"h-4 w-4"})})]})})]},fe.id)})})]})})})]})}),a.jsx(Pt,{value:"generated",className:"space-y-4",children:a.jsxs(be,{className:"bg-gray-800 border-gray-700",children:[a.jsxs(Be,{children:[a.jsxs(qe,{className:"text-white flex items-center",children:[a.jsx(_i,{className:"h-5 w-5 mr-2 text-cyan-400"}),"Generated EAs"]}),a.jsx(ic,{className:"text-gray-400",children:"All Expert Advisors generated with the AI Bot Maker"})]}),a.jsx(Se,{children:a.jsx("div",{className:"overflow-x-auto max-h-[60vh]",children:a.jsxs("table",{className:"w-full",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"text-left text-gray-400 border-b border-gray-700",children:[a.jsx("th",{className:"pb-2 sticky top-0 bg-gray-800 z-10",children:"Name"}),a.jsx("th",{className:"pb-2 sticky top-0 bg-gray-800 z-10",children:"Platform"}),a.jsx("th",{className:"pb-2 sticky top-0 bg-gray-800 z-10",children:"Status"}),a.jsx("th",{className:"pb-2 sticky top-0 bg-gray-800 z-10",children:"Created"})]})}),a.jsxs("tbody",{children:[ne.map(fe=>a.jsxs("tr",{className:"border-b border-gray-700/50 hover:bg-gray-700/30",children:[a.jsx("td",{className:"py-3 font-medium text-white",children:fe.name}),a.jsx("td",{className:"py-3",children:a.jsx(Oe,{children:(fe.platform||"").toUpperCase()})}),a.jsx("td",{className:"py-3",children:a.jsx(Oe,{className:"bg-gray-700 text-gray-200",children:fe.status||"generated"})}),a.jsx("td",{className:"py-3 text-gray-400 text-sm",children:fe.created_date?_s(new Date(fe.created_date),"MMM d, yyyy"):"Unknown"})]},fe.id)),ne.length===0&&a.jsx("tr",{children:a.jsx("td",{colSpan:4,className:"py-6 text-center text-gray-500",children:"No generated EAs yet"})})]})]})})})]})}),a.jsx(Pt,{value:"notifications",className:"space-y-4",children:a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[a.jsxs(be,{className:"bg-gray-800 border-gray-700",children:[a.jsxs(Be,{children:[a.jsxs(qe,{className:"text-white flex items-center",children:[a.jsx(Lt,{className:"h-5 w-5 mr-2 text-red-400"}),"Global Pop-up"]}),a.jsx(ic,{className:"text-gray-400",children:"Create a popup that all users will see immediately"})]}),a.jsxs(Se,{className:"space-y-4",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx("label",{className:"text-sm text-gray-300",children:"Popup Title"}),a.jsx(Je,{value:D,onChange:fe=>L(fe.target.value),className:"bg-gray-900 border-gray-700 text-white",placeholder:"Enter popup title"})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx("label",{className:"text-sm text-gray-300",children:"Message"}),a.jsx(Wn,{value:F,onChange:fe=>U(fe.target.value),className:"bg-gray-900 border-gray-700 text-white h-24",placeholder:"Enter popup message"})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx("label",{className:"text-sm text-gray-300",children:"Type"}),a.jsxs(qt,{value:G,onValueChange:W,children:[a.jsx($t,{className:"bg-gray-900 border-gray-700 text-white",children:a.jsx(zt,{placeholder:"Select type"})}),a.jsxs(Ft,{children:[a.jsx(Ce,{value:"info",children:"Information"}),a.jsx(Ce,{value:"success",children:"Success"}),a.jsx(Ce,{value:"warning",children:"Warning"}),a.jsx(Ce,{value:"error",children:"Error"}),a.jsx(Ce,{value:"update",children:"Update"}),a.jsx(Ce,{value:"promo",children:"Promotion"})]})]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx("label",{className:"text-sm text-gray-300",children:"Action URL (Optional)"}),a.jsx(Je,{value:q,onChange:fe=>V(fe.target.value),className:"bg-gray-900 border-gray-700 text-white",placeholder:"https://..."})]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx("label",{className:"text-sm text-gray-300",children:"Action Button Text"}),a.jsx(Je,{value:z,onChange:fe=>I(fe.target.value),className:"bg-gray-900 border-gray-700 text-white",placeholder:"Learn More"})]}),a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx(dm,{id:"dismissible",checked:B,onCheckedChange:H}),a.jsx("label",{htmlFor:"dismissible",className:"text-sm text-gray-300",children:"Allow users to dismiss this popup"})]}),a.jsx(se,{className:"w-full bg-red-600 hover:bg-red-700",onClick:ze,disabled:J,children:J?a.jsxs(a.Fragment,{children:[a.jsx(kt,{className:"h-4 w-4 mr-2 animate-spin"}),"Creating Popup..."]}):a.jsxs(a.Fragment,{children:[a.jsx(Lt,{className:"h-4 w-4 mr-2"}),"Create Global Popup"]})})]})]}),a.jsxs(be,{className:"bg-gray-800 border-gray-700",children:[a.jsx(Be,{children:a.jsxs(qe,{className:"text-white flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center",children:[a.jsx(Lt,{className:"h-5 w-5 mr-2 text-red-400"}),"Active Global Popups"]}),a.jsx(Oe,{variant:"outline",className:"border-gray-600",children:Y.length})]})}),a.jsx(Se,{children:a.jsxs("div",{className:"space-y-4",children:[Y.map(fe=>a.jsxs(be,{className:"bg-gray-900 border-gray-700",children:[a.jsx(Be,{className:"p-4",children:a.jsxs("div",{className:"flex justify-between items-start",children:[a.jsxs("div",{children:[a.jsx(qe,{className:"text-white text-base",children:fe.title}),a.jsxs("p",{className:"text-sm text-gray-400 mt-1",children:["Created ",_s(new Date(fe.created_date),"PP")]})]}),a.jsx(se,{variant:"destructive",size:"sm",onClick:()=>jt(fe.id),children:"Deactivate"})]})}),a.jsxs(Se,{className:"p-4 pt-0",children:[a.jsx("p",{className:"text-gray-300",children:fe.message}),fe.action_url&&a.jsxs("div",{className:"mt-2 flex items-center text-sm text-cyan-400",children:[a.jsx(Br,{className:"h-4 w-4 mr-1"}),fe.action_url]})]})]},fe.id)),Y.length===0&&a.jsxs("div",{className:"text-center py-8",children:[a.jsx(Lt,{className:"h-12 w-12 text-gray-600 mx-auto mb-3"}),a.jsx("p",{className:"text-gray-400",children:"No active global popups"})]})]})})]})]})}),a.jsx(Pt,{value:"config",className:"space-y-4",children:a.jsxs(be,{className:"bg-gray-800 border-gray-700",children:[a.jsxs(Be,{children:[a.jsxs(qe,{className:"text-white flex items-center",children:[a.jsx(ji,{className:"h-5 w-5 mr-2 text-cyan-400"}),"Application Configuration"]}),a.jsx(ic,{className:"text-gray-400",children:"Manage global application settings and configurations"})]}),a.jsx(Se,{children:a.jsx(iMe,{})})]})})]}),a.jsx(oa,{open:w,onOpenChange:_,children:a.jsxs(zn,{className:"sm:max-w-[425px] bg-gray-800 border-gray-700",children:[a.jsxs(Vn,{children:[a.jsx(Hn,{className:"text-white",children:"Confirm User Deleti
898on"}),a.jsxs(Xa,{className:"text-gray-400",children:["Are you sure you want to delete user: ",a.jsx("strong",{children:(j==null?void 0:j.full_name)||(j==null?void 0:j.email)}),"? This action cannot be undone."]})]}),a.jsxs(Wa,{children:[a.jsx(se,{variant:"outline",onClick:()=>_(!1),children:"Cancel"}),a.jsx(se,{variant:"destructive",onClick:Oi,children:"Delete User"})]})]})}),a.jsx(oa,{open:!!_e,onOpenChange:fe=>!fe&&xe(null),children:a.jsxs(zn,{className:"sm:max-w-[400px] bg-gray-800 border-gray-700",children:[a.jsxs(Vn,{children:[a.jsxs(Hn,{className:"text-white flex items-center gap-2",children:[a.jsx(ss,{className:"h-4 w-4 text-cyan-400"})," AI Credits"]}),a.jsx(Xa,{className:"text-gray-400",children:_e==null?void 0:_e.email})]}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"flex items-center justify-between rounded-lg bg-gray-900/60 border border-gray-700 p-3",children:[a.jsx("span",{className:"text-sm text-gray-300",children:"Unlimited access"}),a.jsx(_T,{checked:Z,onCheckedChange:ae,disabled:w0(_e)})]}),!Z&&a.jsxs("div",{className:"space-y-1",children:[a.jsx(Nr,{className:"text-gray-300",children:"AI credits limit"}),a.jsx(Je,{type:"number",min:1,value:Ee,onChange:fe=>Pe(fe.target.value),className:"bg-gray-900 border-gray-700"})]}),a.jsxs("p",{className:"text-xs text-gray-500",children:["Used so far: ",(_e==null?void 0:_e.ai_used)||0," AI requests"]})]}),a.jsxs(Wa,{className:"flex-col sm:flex-row gap-2",children:[a.jsxs(se,{variant:"outline",onClick:ml,className:"border-gray-600 text-gray-300",children:[a.jsx(Xr,{className:"h-4 w-4 mr-2"})," Reset Usage"]}),a.jsxs(se,{onClick:Fp,disabled:pe,className:"bg-cyan-600 hover:bg-cyan-700",children:[pe&&a.jsx(kt,{className:"h-4 w-4 animate-spin mr-2"}),"Save Limit"]})]})]})}),a.jsx(oa,{open:k,onOpenChange:T,children:a.jsxs(zn,{className:"sm:max-w-[425px] bg-gray-800 border-gray-700",children:[a.jsx(Vn,{children:a.jsx(Hn,{className:"text-white",children:"EA Details"})}),P&&a.jsxs("div",{children:[a.jsx("h2",{className:"text-lg font-semibold text-white",children:P.name}),a.jsx("p",{className:"text-gray-400",children:P.description})]}),a.jsx(Wa,{children:a.jsx(se,{variant:"outline",onClick:()=>T(!1),children:"Close"})})]})})]})}const QF=[{id:"vantage",name:"Vantage Markets",logo:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/1cbbeb396_vantage_logo.png",url:"https://www.vantagemarkets.com/open-live-account/?affid=MTEwODk3",rating:4.8,regulators:["ASIC","FCA","CIMA","VFSC"],minDeposit:200,spreads:"From 0.0 pips",leverage:"1:500",platforms:["MT4","MT5","WebTrader"],accountTypes:["Standard","Raw ECN","Pro ECN"],features:["Copy Trading","VPS Hosting","Islamic Accounts"],pros:["Tight spreads from 0.0 pips","Multiple regulatory licenses","Excellent customer support","Advanced trading platforms"],cons:["Higher minimum deposit for some accounts","Limited educational resources"],specialty:"Raw ECN Trading",forTraders:["Scalpers","Professional Traders","EA Users"],description:"Multi-regulated broker with competitive spreads and advanced trading technology."},{id:"fortrade",name:"Fortrade",logo:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/bb9fb2136_Fortrade_LOGO.png",url:"https://www.fortrade.com/",rating:4.6,regulators:["FCA","CySEC","ASIC","IIROC"],minDeposit:100,spreads:"From 0.6 pips",leverage:"1:400",platforms:["MT4","WebTrader","Mobile Apps"],accountTypes:["Standard","Premium","VIP"],features:["Social Trading","Market Analysis","Risk Management Tools"],pros:["User-friendly platform","Comprehensive educational resources","Multiple regulation including IIROC","Good customer service"],cons:["Higher spreads on some pairs","Limited cryptocurrency options"],specialty:"Beginner-Friendly Trading",forTraders:["Beginners","Casual Traders","Long-term Investors"],description:"Established broker focusing on user experience and comprehensive trading education."},{id:"pepperstone",name:"Pepperstone",logo:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/5352729dd_pepperstone_logo.png",url:"https://pepperstone.com/en/",rating:4.9,regulators:["ASIC","FCA","CySEC","SCB","DFSA"],minDeposit:200,spreads:"From 0.0 pips",leverage:"1:500",platforms:["MT4","MT5","cTrader","TradingView"],accountTypes:["Standard","Razor"],features:["Social Trading","VPS","Advanced Analytics"],pros:["Ultra-fast execution","Multiple platform options","Institutional-grade infrastru
898cture","Excellent for scalping"],cons:["Commission-based pricing on Razor accounts","Limited educational content"],specialty:"High-Frequency Trading",forTraders:["Scalpers","High-Frequency Traders","Professional Traders"],description:"Award-winning broker known for lightning-fast execution and cutting-edge technology."},{id:"ig",name:"IG Group",logo:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/0c57bb207_IG_LOGO.jpg",url:"https://www.ig.com/en",rating:4.7,regulators:["FCA","ASIC","MiFID II","IIROC"],minDeposit:250,spreads:"From 0.6 pips",leverage:"1:200",platforms:["MT4","ProRealTime","IG Platform"],accountTypes:["Standard","Professional"],features:["DMA Trading","Options","17,000+ Markets"],pros:["Huge market selection","Excellent research and analysis","Strong regulation including IIROC","Professional trading tools"],cons:["Higher minimum deposit","Complex fee structure","Lower leverage compared to others"],specialty:"Multi-Asset Trading",forTraders:["Professional Traders","Multi-Asset Traders","Research-Focused Traders"],description:"Established UK broker offering access to 17,000+ markets with professional tools."},{id:"xm",name:"XM.com",logo:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/55032a58d_XM_logo.png",url:"https://www.xm.com/",rating:4.7,regulators:["CySEC","ASIC","FSC"],minDeposit:5,spreads:"As low as 0.6 pips",leverage:"1:1000",platforms:["MT4","MT5"],accountTypes:["Micro","Standard","XM Ultra Low"],features:["Low minimum deposit","High leverage","Frequent bonuses"],pros:["Extremely low $5 minimum deposit","High leverage up to 1:1000","Wide range of account types","Excellent educational resources"],cons:["Spreads can be higher on standard accounts","Not available in some major regions"],specialty:"High Leverage & Bonuses",forTraders:["Beginners","High-Leverage Seekers","Small Account Traders"],description:"A global broker famous for its accessible trading conditions, including a very low minimum deposit and high leverage options."},{id:"ftmo",name:"FTMO",logo:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/06b93be22_ftmo_logo.png",url:"https://ftmo.com/?affiliates=741",rating:4.5,regulators:["Proprietary Trading"],minDeposit:155,spreads:"From 0.0 pips",leverage:"1:100",platforms:["MT4","MT5","cTrader","DXTrade"],accountTypes:["Challenge","Verification","FTMO Account"],features:["Prop Trading","Performance Coach","Scaling Plan"],pros:["Trade with firm capital up to $400K","Keep 70-90% of profits","Professional trading environment","Comprehensive performance tracking"],cons:["Must pass evaluation process","Strict trading rules","Monthly performance fee"],specialty:"Proprietary Trading",forTraders:["Skilled Traders","Prop Traders","Consistent Performers"],description:"Leading prop trading firm offering funded trading accounts up to $400,000."}];function oMe(){const[e,t]=A.useState(""),[r,n]=A.useState("rating"),[i,s]=A.useState("all"),[o,l]=A.useState(QF);A.useEffect(()=>{let d=QF.filter(u=>u.name.toLowerCase().includes(e.toLowerCase())||u.specialty.toLowerCase().includes(e.toLowerCase())||u.forTraders.some(h=>h.toLowerCase().includes(e.toLowerCase())));i!=="all"&&(d=d.filter(u=>{switch(i){case"beginners":return u.forTraders.includes("Beginners")||u.minDeposit<=200;case"professional":return u.forTraders.includes("Professional Traders")||u.rating>=4.7;case"scalping":return u.forTraders.includes("Scalpers")||u.spreads.includes("0.0");case"prop":return u.specialty.includes("Proprietary");default:return!0}})),d.sort((u,h)=>{switch(r){case"rating":return h.rating-u.rating;case"minDeposit":return u.minDeposit-h.minDeposit;case"name":return u.name.localeCompare(h.name);default:return 0}}),l(d)},[e,r,i]);const c=({broker:d})=>a.jsxs(be,{className:"bg-gray-800/50 border-gray-700 hover:border-cyan-500/50 transition-all duration-300 h-full",children:[a.jsx(Be,{className:"pb-3",children:a.jsxs("div",{className:"flex items-start justify-between",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs("div",{className:"w-12 h-12 bg-white rounded-lg flex items-center justify-center p-2",children:[a.jsx("img",{src:d.logo,alt:`${d.name} logo`,className:"max-w-full max-h-full object-contain",onError:u=>{u.target.style.display="none",u.target.nextSibling.style.display="block"}}),a.jsx("div",{className:"text-gray-800 font-bold text-xs text-center leading-tight",style:{display:"none"},children:d.name.split(" ")[0]})]}),a.jsxs("div",{children:[a.jsx(qe,{className:"text-white text-lg",children:d.name}),a.jsxs("div",{className:"flex items-center gap-1 mt-1",children:[[...Array(5)].map((u,h)=>a.jsx(Kr,{className:`h-4 w-4 ${h<Math.floor(d.rating)?"text-yellow-400 fill-yellow-400":"text-gray-400"}`},h)),a.jsx("span",{className:"text-yellow-400 text-sm ml-1",children:d.rating})]})]})]}),a.jsx(Oe,{className:"bg-cyan-900/50 text-cyan-300 border-cyan-700",children:d.specialty})]})}),a.jsxs(Se,{className:"space-y-4",children:[a.jsx("p",{className:"text-gray-300 text-sm",children:d.description}),a.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-gray-400",children:"Min Deposit"}),a.jsxs("p",{className:"text-white font-semibold",children:["$",d.minDeposit]})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-gray-400",children:"Spreads"}),a.jsx("p",{className:"text-white font-semibold",children:d.spreads})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-gray-400",children:"Leverage"}),a.jsx("p",{className:"text-white font-semibold",children:d.leverage})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-gray-400",children:"Platforms"}),a.jsxs("p",{className:"text-white font-semibold",children:[d.platforms.length,"+ Platforms"]})]})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-gray-400 text-sm mb-2",children:"Regulation"}),a.jsx("div",{className:"flex flex-wrap gap-1",children:d.regulators.map(u=>a.jsx(Oe,{variant:"outline",className:`text-xs ${u==="IIROC"?"border-purple-600/50 text-purple-400":"border-green-600/50 text-green-400"}`,children:u},u))})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-gray-400 text-sm mb-2",children:"Best For"}),a.jsx("div",{className:"flex flex-wrap gap-1",children:d.forTraders.map(u=>a.jsx(Oe,{className:"text-xs bg-indigo-900/50 text-indigo-300 border-indigo-700",children:u},u))})]}),a.jsx("div",{className:"grid grid-cols-1 gap-2",children:a.jsxs("div",{children:[a.jsx("p",{className:"text-green-400 text-sm font-medium mb-1",children:"â Pros"}),a.jsx("ul",{className:"text-xs text-gray-300 space-y-1",children:d.pros.slice(0,2).map((u,h)=>a.jsxs("li",{children:["⢠",u]},h))})]})}),a.jsx(se,{asChild:!0,className:"w-full bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-700 hover:to-blue-700",children:a.jsxs("a",{href:d.url,target:"_blank",rel:"noopener noreferrer",children:["Visit ",d.name,a.jsx(Br,{className:"h-4 w-4 ml-2"})]})})]})]});return a.jsxs("div",{className:"space-y-8 max-w-7xl mx-auto p-4",children:[a.jsxs("div",{className:"text-center space-y-4",children:[a.jsx("h1",{className:"text-3xl font-bold text-white",children:"Best Forex Brokers 2025"}),a.jsx("p",{className:"text-gray-400 max-w-2xl mx-auto",children:"Compare and choose from our handpicked selection of regulated, trusted forex brokers. Find the perfect broker for your trading style and experience level."})]}),a.jsxs(be,{className:"bg-gradient-to-r from-indigo-900/50 to-purple-900/50 border-indigo-700",children:[a.jsx(Be,{children:a.jsxs(qe,{className:"text-white flex items-center",children:[a.jsx(Pc,{className:"h-6 w-6 mr-2 text-cyan-400"}),"How to Choose the Best Forex Broker for You"]})}),a.jsx(Se,{className:"prose prose-invert max-w-none",children:a.jsxs("div",{className:"grid md:grid-cols-2 gap-6 text-gray-300",children:[a.jsxs("div",{children:[a.jsxs("h3",{className:"text-cyan-400 font-semibold mb-3 flex items-center",children:[a.jsx(Ar,{className:"h-5 w-5 mr-2"}),"1. Regulation & Safety"]}),a.jsx("p",{className:"text-sm mb-4",children:"Always choose a broker regulated by reputable authorities like FCA
898(UK), ASIC (Australia), CySEC (Cyprus), or IIROC (Canada). Regulation ensures your funds are protected and the broker follows strict guidelines."}),a.jsxs("h3",{className:"text-green-400 font-semibold mb-3 flex items-center",children:[a.jsx(Ev,{className:"h-5 w-5 mr-2"}),"2. Trading Costs"]}),a.jsx("p",{className:"text-sm mb-4",children:"Compare spreads, commissions, and overnight fees. For scalpers, look for brokers with spreads from 0.0 pips. For swing traders, slightly wider spreads with no commission might be better."}),a.jsxs("h3",{className:"text-blue-400 font-semibold mb-3 flex items-center",children:[a.jsx(ss,{className:"h-5 w-5 mr-2"}),"3. Execution Speed"]}),a.jsx("p",{className:"text-sm",children:"Fast execution is crucial for profitable trading. Look for brokers with execution speeds under 30ms and minimal slippage, especially if you're using automated trading strategies."})]}),a.jsxs("div",{children:[a.jsxs("h3",{className:"text-purple-400 font-semibold mb-3 flex items-center",children:[a.jsx(Xo,{className:"h-5 w-5 mr-2"}),"4. Trading Platform"]}),a.jsx("p",{className:"text-sm mb-4",children:"Choose a broker supporting your preferred platform (MT4, MT5, cTrader). For EA users, ensure the broker allows automated trading and provides VPS services."}),a.jsxs("h3",{className:"text-orange-400 font-semibold mb-3 flex items-center",children:[a.jsx(la,{className:"h-5 w-5 mr-2"}),"5. Customer Support"]}),a.jsx("p",{className:"text-sm mb-4",children:"Quality customer support is essential. Look for brokers offering 24/5 support in your language, with multiple contact methods (live chat, phone, email)."}),a.jsxs("h3",{className:"text-red-400 font-semibold mb-3 flex items-center",children:[a.jsx(Ji,{className:"h-5 w-5 mr-2"}),"6. Your Trading Style"]}),a.jsx("p",{className:"text-sm",children:"Match the broker to your needs: Beginners need education and support, scalpers need tight spreads, and prop traders need funded account opportunities."})]})]})})]}),a.jsx(be,{className:"bg-gray-800 border-gray-700",children:a.jsx(Se,{className:"p-4",children:a.jsxs("div",{className:"flex flex-col md:flex-row gap-4",children:[a.jsxs("div",{className:"relative flex-1",children:[a.jsx(al,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400"}),a.jsx(Je,{placeholder:"Search brokers by name, specialty, or trader type...",className:"pl-10 bg-gray-900 border-gray-700 text-white",value:e,onChange:d=>t(d.target.value)})]}),a.jsxs(qt,{value:r,onValueChange:n,children:[a.jsx($t,{className:"w-full md:w-48 bg-gray-900 border-gray-700 text-white",children:a.jsx(zt,{placeholder:"Sort by"})}),a.jsxs(Ft,{children:[a.jsx(Ce,{value:"rating",children:"Highest Rated"}),a.jsx(Ce,{value:"minDeposit",children:"Lowest Deposit"}),a.jsx(Ce,{value:"name",children:"Name A-Z"})]})]}),a.jsxs(qt,{value:i,onValueChange:s,children:[a.jsx($t,{className:"w-full md:w-48 bg-gray-900 border-gray-700 text-white",children:a.jsx(zt,{placeholder:"Filter by"})}),a.jsxs(Ft,{children:[a.jsx(Ce,{value:"all",children:"All Brokers"}),a.jsx(Ce,{value:"beginners",children:"For Beginners"}),a.jsx(Ce,{value:"professional",children:"Professional"}),a.jsx(Ce,{value:"scalping",children:"Scalping"}),a.jsx(Ce,{value:"prop",children:"Prop Trading"})]})]})]})})}),a.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:o.map(d=>a.jsx(c,{broker:d},d.id))}),o.length===0&&a.jsx(be,{className:"bg-gray-800 border-gray-700",children:a.jsxs(Se,{className:"text-center py-12",children:[a.jsx(Lk,{className:"h-12 w-12 mx-auto text-gray-600 mb-4"}),a.jsx("h3",{className:"text-xl font-semibold text-white mb-2",children:"No Brokers Found"}),a.jsx("p",{className:"text-gray-400",children:"Try adjusting your search or filter criteria."})]})}),a.jsx(be,{className:"bg-amber-900/20 border-amber-700/50",children:a.jsx(Se,{className:"p-4",children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx(Ji,{className:"h-5 w-5 text-amber-400 mt-0.5 flex-shrink-0"}),a.jsxs("div",{className:"text-sm text-amber-200",children:[a.jsx("p",{className:"font-semibold mb-2",children:"Risk Warning"}),a.jsx("p",{children:"Trading foreign exchange and contracts for difference involves substantial risk and may result in loss of capital. You should consider whether you understand how these products work and whether you can afford to take the high risk of losing your money. Only trade with regulated brokers and never invest more than you can afford to lose."})]})]})})})]})}function Yx({title:e="robot4trade - AI-Powered Trading Platform",description:t="Create FTMO-ready trading bots with AI. Advanced MQL4/MQL5 code generation, algo trading strategies, and ChatGPT-powered trading assistance for prop firms like FTMO and The5ers.",keywords:r="how to pass FTMO, FTMO bot, prop trading, the5ers EA, ChatGPT trading, AI MQL, algo trading, expert advisor, trading robot, MQL4, MQL5, automated trading",canonicalUrl:n="https://robot4trade.com",ogImage:i="https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/cbd7c9_3D-1175.png",structuredData:s=null,twitterCard:o="summary_large_image",twitterSite:l="@robot4trade"}){return te.useEffect(()=>{document.title=e;const c=(u,h,m="content")=>{let g=document.querySelector(u);if(!g){g=document.createElement("meta");const b=u.split("="),v=b[0].replace("meta[","").replace("]",""),y=b[1].replace(/['"]/g,"");g.setAttribute(v,y),document.head.appendChild(g)}g.setAttribute(m,h)};c('meta[name="description"]',t),c('meta[name="keywords"]',r),c('meta[name="robots"]',"index, follow"),c('meta[name="author"]',"robot4trade"),c('meta[name="viewport"]',"width=device-width, initial-scale=1.0"),c('meta[property="og:title"]',e),c('meta[property="og:description"]',t),c('meta[property="og:type"]',"website"),c('meta[property="og:url"]',n),c('meta[property="og:image"]',i),c('meta[property="og:site_name"]',"robot4trade"),c('meta[property="og:locale"]',"en_US"),c('meta[name="twitter:card"]',o),c('meta[name="twitter:site"]',l),c('meta[name="twitter:title"]',e),c('meta[name="twitter:description"]',t),c('meta[name="twitter:image"]',i),c('meta[name="theme-color"]',"#0891b2"),c('meta[name="msapplication-TileColor"]',"#0891b2"),c('meta[name="impact-site-verification"]',"f46d2010-4018-4d21-ae3e-7b067d736bc0","value");let d=document.querySelector('link[rel="canonical"]');if(d||(d=document.createElement("link"),d.setAttribute("rel","canonical"),document.head.appendChild(d)),d.setAttribute("href",n),s){let u=document.querySelector('script[type="application/ld+json"]');u||(u=document.createElement("script"),u.setAttribute("type","application/ld+json"),document.head.appendChild(u)),u.textContent=JSON.stringify(s)}},[e,t,r,n,i,s,o,l]),null}function lMe(){const[e,t]=A.useState([]),[r,n]=A.useState(!0),[i,s]=A.useState(""),[o,l]=A.useState("all"),c=["AI Trading","FTMO","Prop Trading","MQL Programming","Strategy","Market Analysis","Technology"];A.useEffect(()=>{(async()=>{try{const h=await je.BlogPost.filter({is_published:!0},"-published_date");t(h)}catch(h){console.error("Error loading blog posts:",h)}n(!1)})()},[]);const d=e.filter(u=>{var g,b;const h=u.title.toLowerCase().includes(i.toLowerCase())||((g=u.excerpt)==null?void 0:g.toLowerCase().includes(i.toLowerCase()))||((b=u.tags)==null?void 0:b.some(v=>v.toLowerCase().includes(i.toLowerCase()))),m=o==="all"||u.category===o;return h&&m});return a.jsxs(a.Fragment,{children:[a.jsx(Yx,{title:"AI Trading Blog | FTMO Strategies & MQL Programming | robot4trade",description:"Expert insights on FTMO bot creation, prop trading strategies, MQL programming, and AI trading. Learn from professionals and boost your trading success.",keywords:"AI trading blog, FTMO strategies, prop trading tips, MQL programming tutorials, trading bot development, forex automation",canonicalUrl:"https://robot4trade.com/blog"}),a.jsxs("div",{className:"space-y-8 max-w-6xl mx-auto",children:[a.jsxs("header",{className:"text-center py-8 bg-gray-800/50 rounded-lg border border-gray-700",children:[a.jsx(er,{className:"h-10 w-10 text-cyan-400 mx-auto mb-3"}),a.jsx("h1",{className:"text-4xl font-bold text-white mb-2",children:"The robot4trade Blog"}),a.jsx("p",{className:"text-lg text-indigo-300",children:"AI-Powered Insights for Modern Traders"})]}),a.jsxs("div",{className:"flex flex-col md:flex-row gap-4",children:[a.jsxs("div",{className:"relative flex-grow",children:[a.jsx(al,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400"}),a.jsx(Je,{type:"search",placeholder:"Search articles...",className:"pl-10 bg-gray-900 border-gray-700",value:i,onChange:u=>s(u.target.value)})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Lk,{className:"h-4 w-4 text-gray-400"}),a.jsxs(qt,{onValueChange:l,defaultValue:"all",children:[a.jsx($t,{className:"w-full md:w-[200px] bg-gray-900 border-gray-700",children:a.jsx(zt,{placeholder:"All Categories"})}),a.jsxs(Ft,{className:"bg-gray-800 border-gray-700 text-white",children:[a.jsx(Ce,{value:"all",children:"All Categories"}),c.map(u=>a.jsx(Ce,{value:u,children:u},u))]})]})]})]}),r?a.jsx("div",{className:"flex justify-center items-center h-64",children:a.jsx(kt,{className:"h-8 w-8 animate-spin text-cyan-400"})}):d.length>0?a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:d.map(u=>a.jsx(pt,{to:Ve(`BlogPost?slug=${u.slug}`),className:"group",children:a.jsxs(be,{className:"h-full bg-gray-800 border-gray-700 hover:border-cyan-500 transition-all duration-300 flex flex-col",children:[u.featured_image&&a.jsx("img",{src:u.featured_image,alt:u.title,className:"w-full h-40 object-cover rounded-t-lg",loading:"lazy"}),a.jsxs(Be,{className:"pt-4 pb-2",children:[a.jsxs("div",{className:"flex justify-between items-start",children:[u.category&&a.jsx(Oe,{className:"bg-cyan-600/20 text-cyan-300 text-xs mb-2",children:u.category}),a.jsxs("div",{className:"flex items-center gap-3 text-xs text-gray-500",children:[u.read_time&&a.jsxs("span",{className:"flex items-center",children:[a.jsx(Za,{className:"h-3 w-3 mr-1"}),u.read_time," min"]}),u.view_count>0&&a.jsxs("span",{className:"flex items-center",children:[a.jsx(Fd,{className:"h-3 w-3 mr-1"}),u.view_count]})]})]}),a.jsx(qe,{className:"text-lg text-white group-hover:text-cyan-400 transition-colors",children:u.title})]}),a.jsx(Se,{className:"flex-grow",children:a.jsx("p",{className:"text-sm text-gray-400 line-clamp-3",children:u.excerpt})}),a.jsxs("div",{className:"p-4 pt-0 text-xs text-gray-500 flex items-center",children:[a.jsx(Xy,{className:"h-3 w-3 mr-1.5"}),"Published ",u.published_date?Mn(new Date(u.published_date),{addSuffix:!0}):"recently"]})]})},u.id))}):a.jsxs("div",{className:"text-center py-16 bg-gray-800/50 rounded-lg",children:[a.jsx(Pc,{className:"h-12 w-12 text-gray-600 mx-auto mb-4"}),a.jsx("p",{className:"text-lg text-gray-300",children:"No articles found."}),a.jsx("p",{className:"text-gray-500",children:"Try adjusting your search or filter."})]})]})]})}function cMe({faqs:e}){const[t,r]=A.useState(null),n=i=>{r(t===i?null:i)};return!e||e.length===0?null:a.jsxs(be,{className:"bg-gray-800 border-gray-700 mt-8",children:[a.jsx(Be,{children:a.jsxs(qe,{className:"text-xl font-bold text-white flex items-center",children:[a.jsx(BS,{className:"h-5 w-5 mr-3 text-cyan-400"}),"Frequently Asked Questions"]})}),a.jsx(Se,{className:"space-y-3",children:e.map((i,s)=>a.jsxs("div",{className:"border-b border-gray-700 last:border-b-0",children:[a.jsxs("button",{onClick:()=>n(s),className:"flex justify-between items-center w-full py-4 text-left",children:[a.jsx("h4",{className:"font-medium text-gray-200",children:i.question}),t===s?a.jsx(Hh,{className:"h-5 w-5 text-cyan-400 flex-shrink-0"}):a.jsx(Zi,{className:"h-5 w-5 text-gray-400 flex-shrink-0"})]}),t===s&&a.jsx("div",{className:"pb-4 text-gray-400",dangerouslySetInnerHTML:{__html:i.answer}})]},s))})]})}function uMe({currentPostId:e,relatedPostIds:t}){const[r,n]=A.useState([]),[i,s]=A.useState(!0),o=A.useCallback(async()=>
898{if(!t||t.length===0){s(!1);return}try{const c=(await Promise.all(t.map(async d=>{if(d===e)return null;try{return await je.BlogPost.get(d)}catch(u){return console.warn(`Failed to load related post ${d}:`,u),null}}))).filter(d=>d&&d.is_published).slice(0,2);n(c)}catch(l){console.error("Error loading related posts:",l)}s(!1)},[t,e]);return A.useEffect(()=>{o()},[o]),i?a.jsx("div",{className:"flex justify-center py-4",children:a.jsx(kt,{className:"h-6 w-6 animate-spin text-cyan-500"})}):r.length===0?null:a.jsxs(be,{className:"bg-gray-800 border-gray-700 mt-8",children:[a.jsx(Be,{children:a.jsxs(qe,{className:"text-xl font-bold text-white flex items-center",children:[a.jsx(Pc,{className:"h-5 w-5 mr-3 text-cyan-400"}),"Related Articles"]})}),a.jsx(Se,{children:a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:r.map(l=>a.jsxs(pt,{to:Ve(`BlogPost?slug=${l.slug}`),className:"group block p-4 bg-gray-900/50 rounded-lg hover:bg-gray-700/50 transition-colors",children:[l.featured_image&&a.jsx("img",{src:l.featured_image,alt:l.title,className:"w-full h-24 object-cover rounded mb-3",loading:"lazy"}),a.jsx("h3",{className:"text-white font-medium group-hover:text-cyan-400 transition-colors line-clamp-2 mb-1",children:l.title}),a.jsx("p",{className:"text-gray-400 text-sm line-clamp-2",children:l.excerpt})]},l.id))})})]})}function dMe({url:e,title:t,description:r}){const n=[{name:"Copy Link",icon:zk,action:()=>{navigator.clipboard.writeText(e),Le({title:"Link Copied!",description:"URL copied to your clipboard."})}},{name:"Twitter",icon:Qo,action:()=>{window.open(`https://twitter.com/intent/tweet?url=${encodeURIComponent(e)}&text=${encodeURIComponent(t)}`,"_blank")}},{name:"LinkedIn",icon:qS,action:()=>{window.open(`https://www.linkedin.com/shareArticle?mini=true&url=${encodeURIComponent(e)}&title=${encodeURIComponent(t)}&summary=${encodeURIComponent(r)}`,"_blank")}},{name:"Facebook",icon:qZ,action:()=>{window.open(`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(e)}`,"_blank")}}];return a.jsxs("div",{className:"flex items-center gap-2 border-y border-gray-700 py-3",children:[a.jsx("span",{className:"text-sm font-medium text-gray-300 mr-2",children:"Share this article:"}),n.map(i=>a.jsx(se,{variant:"ghost",size:"icon",onClick:i.action,title:`Share on ${i.name}`,children:a.jsx(i.icon,{className:"h-4 w-4 text-gray-400 hover:text-cyan-400"})},i.name))]})}function fMe(){var u;const[e,t]=A.useState(null),[r,n]=A.useState(!0),[i,s]=A.useState(null),o=os(),l=A.useCallback(async()=>{n(!0),s(null);const m=new URLSearchParams(o.search).get("slug");if(!m){s("Blog post slug is missing."),n(!1);return}try{const g=await je.BlogPost.filter({slug:m,is_published:!0});if(g.length===0)s("Blog post not found."),t(null);else{const b=g[0];t(b),je.BlogPost.update(b.id,{view_count:(b.view_count||0)+1}).catch(console.error)}}catch(g){console.error("Error loading blog post:",g),s("Failed to load the blog post. Please try again.")}n(!1)},[o.search]);A.useEffect(()=>{l()},[l]);const c=()=>e?{"@context":"https://schema.org","@type":"BlogPosting",headline:e.title,description:e.meta_description||e.excerpt,image:e.featured_image||"https://robot4trade.com/default-blog-image.jpg",author:{"@type":"Person",name:e.author_name||"robot4trade Team"},publisher:{"@type":"Organization",name:"robot4trade",logo:{"@type":"ImageObject",url:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/cbd7c9_3D-1175.png"}},datePublished:e.published_date,dateModified:e.updated_date||e.published_date,mainEntityOfPage:{"@type":"WebPage","@id":`https://robot4trade.com/BlogPost?slug=${e.slug}`},...e.faq_section&&e.faq_section.length>0&&{mainEntity:{"@type":"FAQPage",mainEntity:e.faq_section.map(h=>({"@type":"Question",name:h.question,acceptedAnswer:{"@type":"Answer",text:h.answer}}))}}}:null;if(r)return a.jsx("div",{className:"flex justify-center items-center h-96",children:a.jsx(kt,{className:"h-10 w-10 animate-spin text-cyan-400"})});if(i||!e)return a.jsxs("div",{className:"max-w-4xl mx-auto text-center py-16",children:[a.jsx(Pc,{className:"h-16 w-16 text-gray-600 mx-auto mb-4"}),a.jsx("h1",{className:"text-2xl font-bold text-white mb-2",children:"Blog Post Not Found"}),a.jsx("p",{className:"text-gray-400 mb-6",children:i||"The requested blog post could not be found."}),a.jsx(se,{asChild:!0,variant:"outline",className:"border-cyan-600 text-cyan-400",children:a.jsxs(pt,{to:Ve("Blog"),children:[a.jsx(Uo,{className:"h-4 w-4 mr-2"}),"Back to Blog"]})})]});const d=`https://robot4trade.com${Ve(`BlogPost?slug=${e.slug}`)}`;return a.jsxs(a.Fragment,{children:[a.jsx(Yx,{title:`${e.title}
898 | robot4trade Blog`,description:e.meta_description||e.excerpt,keywords:(u=e.keywords)==null?void 0:u.join(", "),canonicalUrl:d,ogImage:e.featured_image,structuredData:c()}),a.jsxs("div",{className:"max-w-4xl mx-auto",children:[a.jsxs("div",{className:"flex items-center text-sm text-gray-400 mb-6",children:[a.jsx(pt,{to:Ve("Blog"),className:"hover:text-cyan-400",children:"Blog"}),a.jsx(ip,{className:"h-3 w-3 mx-2"}),a.jsx("span",{className:"text-gray-300 line-clamp-1",children:e.title})]}),a.jsxs("article",{className:"space-y-8",children:[a.jsxs("header",{className:"space-y-4",children:[e.category&&a.jsx(Oe,{className:"bg-cyan-600 text-white",children:e.category}),a.jsx("h1",{className:"text-3xl md:text-4xl font-bold text-white leading-tight",children:e.title}),a.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2 text-gray-400 text-sm",children:[a.jsxs("div",{className:"flex items-center",children:[a.jsx(Xy,{className:"h-4 w-4 mr-2"}),"Published on ",e.published_date?_s(new Date(e.published_date),"PPP"):"N/A"]}),e.read_time&&a.jsxs("div",{className:"flex items-center",children:[a.jsx(Za,{className:"h-4 w-4 mr-2"}),e.read_time," min read"]}),e.view_count>0&&a.jsxs("div",{className:"flex items-center",children:[a.jsx(Fd,{className:"h-4 w-4 mr-2"}),e.view_count," views"]})]}),e.author_name&&a.jsxs("p",{className:"text-gray-300",children:["By ",a.jsx("span",{className:"font-medium text-cyan-400",children:e.author_name})]})]}),e.featured_image&&a.jsx("img",{src:e.featured_image,alt:e.title,className:"w-full h-auto max-h-96 object-cover rounded-lg shadow-lg",loading:"lazy"}),a.jsx(dMe,{url:d,title:e.title,description:e.excerpt}),a.jsx("div",{className:"prose prose-lg prose-invert max-w-none text-gray-300",dangerouslySetInnerHTML:{__html:e.content}}),e.tags&&e.tags.length>0&&a.jsx("div",{className:"flex flex-wrap gap-2 pt-6 border-t border-gray-700",children:e.tags.map(h=>a.jsx(Oe,{variant:"outline",className:"border-gray-600 text-gray-400",children:h},h))}),e.faq_section&&e.faq_section.length>0&&a.jsx(cMe,{faqs:e.faq_section}),e.id&&a.jsx(uMe,{currentPostId:e.id,relatedPostIds:e.related_posts}),a.jsx(be,{className:"bg-gradient-to-r from-cyan-900/30 to-blue-900/30 border-cyan-700/50 mt-12",children:a.jsxs(Se,{className:"p-6 text-center",children:[a.jsx("h3",{className:"text-xl font-bold text-white mb-2",children:"Ready to Build Your FTMO Bot?"}),a.jsx("p",{className:"text-gray-300 mb-4",children:"Use our AI Bot Maker to generate professional trading robots."}),a.jsx(se,{asChild:!0,className:"bg-gradient-to-r from-cyan-500 to-blue-600 hover:from-cyan-600 hover:to-blue-700",children:a.jsx(pt,{to:Ve("MqlGenerator"),children:"Start Building Now"})})]})}),a.jsxs("div",{className:"flex justify-between items-center pt-8 border-t border-gray-700",children:[a.jsx(se,{asChild:!0,variant:"outline",className:"border-gray-600 text-gray-300",children:a.jsxs(pt,{to:Ve("Blog"),children:[a.jsx(Uo,{className:"h-4 w-4 mr-2"}),"Back to Blog"]})}),a.jsx(se,{asChild:!0,variant:"outline",className:"border-gray-600 text-gray-300",children:a.jsxs(pt,{to:Ve("Forum"),children:[a.jsx(pr,{className:"h-4 w-4 mr-2"}),"Discuss in Forum"]})})]})]})]})]})}function hMe(){return A.useEffect(()=>{window.open("https://ftmo.com/en/?affiliates=741","_blank"),window.history.back()},[]),a.jsx("div",{className:"flex items-center justify-center min-h-screen bg-gray-900",children:a.jsxs("div",{className:"text-center",children:[a.jsx("h1",{className:"text-2xl font-bold text-white mb-4",children:"Redirecting to FTMO Challenge..."}),a.jsxs("p",{className:"text-gray-400",children:["If the page doesn't open automatically,",a.jsx("a",{href:"https://ftmo.com/en/?affiliates=741",target:"_blank",rel:"noopener noreferrer",className:"text-cyan-400 hover:underline ml-1",children:"click here"})]})]})})}const mMe=te.forwardRef(function({onFileChange:t,onAnalyze:r,isLoading:n,previewUrl:i,isAuthed:s=!0,onAuthRequired:o},l){const[c,d]=A.useState(!1),u=te.useRef(null),h=x=>{if(!s){o==null||o();return}x==null||x()};te.useImperativeHandle(l,()=>({openPicker:()=>h(()=>{var x;return(x=u.current)==null?void 0:x.click()})}));const m=x=>{x.preventDefault(),d(!0)},g=x=>{x.preventDefault(),d(!1)},b=x=>{if(x.preventDefault(),d(!1),!s){o==null||o();return}const w=x.dataTransfer.files;if(w&&w.length>0){const _=w[0];_.type.startsWith("image/")&&t(_)}},v=x=>{const w=x.target.files;w&&w.length>0&&t(w[0])},y=()=>{t(null),u.current&&(u.current.value="")};return a.jsx("div",{className:"bg-gray-800 border-2 border-dashed border-gray-600 rounded-xl p-3 sm:p-6 text-center transition-all duration-300 ease-in-out hover:border-cyan-500 hover:bg-gray-800/50",children:i?a.jsxs("div",{className:"space-y-4 sm:sp
898ace-y-6",children:[a.jsxs("div",{className:"relative flex justify-center items-center bg-black/30 rounded-lg p-2",children:[a.jsx("img",{src:i,alt:"Chart Preview",className:"max-h-60 sm:max-h-80 rounded-md object-contain w-full"}),a.jsx(se,{variant:"ghost",size:"icon",onClick:y,disabled:n,className:"absolute top-2 right-2 bg-black/50 hover:bg-black/70 text-white rounded-full h-8 w-8",children:a.jsx(Ks,{className:"h-4 w-4"})})]}),a.jsx("div",{className:"flex flex-col gap-3 sm:gap-4",children:a.jsx(se,{onClick:r,disabled:n,className:"w-full bg-gradient-to-r from-cyan-500 to-blue-600 hover:from-cyan-600 hover:to-blue-700 text-white text-base sm:text-lg px-6 py-4 sm:py-6",children:n?a.jsxs(a.Fragment,{children:[a.jsx(kt,{className:"mr-2 h-5 w-5 animate-spin"}),"AI is Analyzing..."]}):a.jsxs(a.Fragment,{children:[a.jsx(_i,{className:"mr-2 h-5 w-5"}),"Analyze Chart with AI"]})})})]}):a.jsxs("div",{onDragOver:m,onDragLeave:g,onDrop:b,className:`cursor-pointer p-4 sm:p-8 rounded-lg transition-colors ${c?"border-cyan-500 bg-cyan-900/20":""}`,onClick:()=>h(()=>{var x;return(x=u.current)==null?void 0:x.click()}),children:[a.jsx("input",{type:"file",ref:u,accept:"image/*",capture:"environment",onChange:v,className:"hidden",id:"chart-upload-input"}),a.jsxs("div",{className:"flex flex-col items-center justify-center space-y-3 sm:space-y-4 text-gray-400",children:[a.jsx(CZ,{className:"h-12 w-12 sm:h-16 sm:w-16 text-gray-500"}),a.jsx("p",{className:"text-lg sm:text-xl font-semibold",children:"Drop chart image here"}),a.jsx("p",{className:"text-sm sm:text-base",children:"or"}),a.jsxs(se,{type:"button",variant:"outline",onClick:x=>{x.stopPropagation(),h(()=>{var w;return(w=u.current)==null?void 0:w.click()})},className:"w-full sm:w-auto border-cyan-500 text-cyan-400 hover:bg-cyan-900/50 hover:text-cyan-300 py-3",children:[a.jsx(uZ,{className:"mr-2 h-4 w-4"}),"Upload or Take Photo"]}),a.jsx("p",{className:"text-xs text-gray-500 mt-2",children:"On mobile, this will open your camera."})]})]})})});function pMe({analysisText:e,annotatedImage:t}){const[r,n]=A.useState(!1),i="https://robot4trade.com/",s=`Check out this AI chart analysis from robot4trade.com! 899 900${e}`,o=encodeURIComponent(i),l=encodeURIComponent(s),c={twitter:`https://twitter.com/intent/tweet?text=${l}&url=${o}`,whatsapp:`https://api.whatsapp.com/send?text=${l}%20${o}`,telegram:`https://t.me/share/url?url=${o}&text=${l}`},d=()=>{navigator.clipboard.writeText(`${s} 901 902View more at: ${i}`),n(!0),Le({title:"Copied to clipboard!"}),setTimeout(()=>n(!1),2e3)};
902return a.jsxs(oa,{children:[a.jsx(NT,{asChild:!0,children:a.jsxs(se,{variant:"outline",className:"w-full sm:w-auto border-cyan-400 text-cyan-300 hover:bg-cyan-900 hover:text-cyan-200 text-sm",children:[a.jsx(zk,{className:"mr-2 h-4 w-4"}),"Share Analysis"]})}),a.jsxs(zn,{className:"sm:max-w-md bg-gray-800 border-gray-700 text-white",children:[a.jsxs(Vn,{children:[a.jsx(Hn,{children:"Share AI Analysis"}),a.jsx(Xa,{children:"Share this analysis with your network."})]}),a.jsxs("div",{className:"space-y-4 py-4",children:[t&&a.jsx("div",{className:"bg-black/30 p-2 rounded-lg",children:a.jsx("img",{src:t,alt:"Annotated Chart",className:"w-full h-auto rounded-md"})}),a.jsxs("div",{className:"flex justify-center gap-4",children:[a.jsx(se,{asChild:!0,variant:"ghost",size:"icon",className:"h-12 w-12 rounded-full bg-blue-500/20 hover:bg-blue-500/40 text-white",children:a.jsx("a",{href:c.twitter,target:"_blank",rel:"noopener noreferrer","aria-label":"Share on Twitter",children:a.jsx(Qo,{className:"h-6 w-6"})})}),a.jsx(se,{asChild:!0,variant:"ghost",size:"icon",className:"h-12 w-12 rounded-full bg-green-500/20 hover:bg-green-500/40 text-white",children:a.jsx("a",{href:c.whatsapp,target:"_blank",rel:"noopener noreferrer","aria-label":"Share on WhatsApp",children:a.jsx(pr,{className:"h-6 w-6"})})}),a.jsx(se,{asChild:!0,variant:"ghost",size:"icon",className:"h-12 w-12 rounded-full bg-sky-500/20 hover:bg-sky-500/40 text-white",children:a.jsx("a",{href:c.telegram,target:"_blank",rel:"noopener noreferrer","aria-label":"Share on Telegram",children:a.jsx(Bd,{className:"h-6 w-6"})})})]}),a.jsxs(se,{variant:"outline",className:"w-full",onClick:d,children:[a.jsx(Wh,{className:"mr-2 h-4 w-4"})," ",r?"Copied!":"Copy Text & Link"]})]})]})]})}function Wy({value:e,className:t,foregroundClass:r="bg-primary"}){return a.jsx("div",{className:Ie("w-full bg-gray-700 rounded-full overflow-hidden",t),children:a.jsx("div",{className:Ie("h-full transition-all duration-500 ease-out rounded-full",r),style:{width:`${Math.max(0,Math.min(100,e))}%`}})})}const RS=({title:e,icon:t,children:r})=>a.jsxs(be,{className:"bg-gray-800/50 border-gray-700",children:[a.jsx(Be,{children:a.jsxs(qe,{className:"flex items-center text-lg text-cyan-400",children:[t,a.jsx("span",{className:"ml-2",children:e})]})}),a.jsx(Se,{className:"text-gray-300",children:r})]});function gMe({result:e,image:t}){var u,h,m,g,b,v,y,x,w,_,j,S,k,T,P,M,C,O,D,L,F,U,G,W;const r=A.useRef(null),[n,i]=A.useState(null);A.useEffect(()=>{e&&t&&s()},[e,t]);const s=()=>{const q=r.current;if(!q)return;const V=q.getContext("2d"),z=new Image;z.onload=()=>{q.width=z.width,q.height=z.height,V.drawImage(z,0,0),o(V,q.width,q.height),l(V,q.width,q.height),q.toBlob(I=>{I&&i(URL.createObjectURL(I))})},z.onerror=()=>{console.error("Failed to load image for canvas drawing.")},z.src=t},o=(q,V,z)=>{q.lineWidth=3,q.setLineDash([10,5]),Array.isArray(e.support_levels)&&(q.strokeStyle="#22c55e",q.fillStyle="#22c55e",q.font="14px Arial",e.support_levels.forEach((I,B)=>{const H=z*(.7+B*.1);q.beginPath(),q.moveTo(0,H),q.lineTo(V,H),q.stroke(),q.fillText(`Support: ${I}
902`,10,H-10)})),Array.isArray(e.resistance_levels)&&(q.strokeStyle="#ef4444",q.fillStyle="#ef4444",q.font="14px Arial",e.resistance_levels.forEach((I,B)=>{const H=z*(.3-B*.1);q.beginPath(),q.moveTo(0,H),q.lineTo(V,H),q.stroke(),q.fillText(`Resistance: ${I}`,10,H+20)}))},l=(q,V,z)=>{const I=e.trend||"";q.fillStyle=I.toLowerCase().includes("bullish")?"#22c55e":I.toLowerCase().includes("bearish")?"#ef4444":"#3b82f6",q.font="bold 16px Arial",q.fillText(I,V-200,30);const B=e.pattern||"No significant patterns identified";B!=="No significant patterns identified"&&(q.fillStyle="#8b5cf6",q.font="14px Arial",q.fillText(`Pattern: ${B}`,10,z-20)),q.fillStyle="#06b6d4",q.font="bold 18px Arial",q.fillText(`AI Confidence: ${e.confidence_score||0}%`,V-250,z-20)},c=()=>{if(!r.current)return;const q=document.createElement("a");q.download=`chart-analysis-${Date.now()}.png`,q.href=r.current.toDataURL(),q.click()},d=` 903*AI Chart Analysis for ${(e==null?void 0:e.instrument)||"N/A"}* 904ð *Trend:* ${(e==null?void 0:e.trend)||"N/A"} 905ð *Pattern:* ${(e==null?void 0:e.pattern)||"N/A"} 906ð¯ *Summary:* ${(e==null?void 0:e.summary)||"N/A"} 907ð¤ *AI Confidence:* ${(e==null?void 0:e.confidence_score)||0}/100 908 909ð¡ *Key Levels:* 910ð¢ Support: ${((u=e==null?void 0:e.support_levels)==null?void 0:u.join(", "))||"N/A"} 911ð´ Resistance: ${((h=e==null?void 0:e.resistance_levels)==null?void 0:h.join(", "))||"N/A"} 912 913ð *Indicators:* ${(e==null?void 0:e.indicator_analysis)||"N/A"} 914 915ð *Bullish Scenario:* ${((m=e==null?void 0:e.bullish_scenario)==null?void 0:m.entry)||"N/A"} (SL: ${((g=e==null?void 0:e.bullish_scenario)==null?void 0:g.stop_loss)||"N/A"}, TP: ${((b=e==null?void 0:e.bullish_scenario)==null?void 0:b.take_profit)||"N/A"}) 916ð» *Bearish Scenario:* ${((v=e==null?void 0:e.bearish_scenario)==null?void 0:v.entry)||"N/A"} (SL: ${((y=e==null?void 0:e.bearish_scenario)==null?void 0:y.stop_loss)||"N/A"}, TP: ${((x=e==null?void 0:e.bearish_scenario)==null?void 0:x.take_profit)||"N/A"}) 917 918_Powered by robot4trade.com Chart AI_ 919 `;return e?a.jsxs("div",{className:"mt-4 sm:mt-8 animate-fade-in-up space-y-4 sm:space-y-8",children:[a.jsxs(be,{className:"bg-gradient-to-br from-gray-800 to-gray-900 border-gray-700 overflow-hidden",children:[a.jsxs(Be,{className:"flex flex-col sm:flex-row items-start justify-between gap-4 p-4 sm:p-6",children:[a.jsxs("div",{className:"w-full sm:w-auto",children:[a.jsx(qe,{className:"text-xl sm:text-2xl font-bold text-white",children:"AI Analysis Complete"}),a.jsxs("div",{className:"flex flex-wrap items-center gap-2 sm:gap-4 mt-2",children:[a.jsx(Oe,{className:"bg-indigo-600 text-white text-xs sm:text-sm",children:e.instrument||"N/A"}),a.jsx(Oe,{variant:"outline",className:"border-indigo-400 text-indigo-300 text-xs sm:text-sm",children:e.timeframe||"N/A"})]})]}),a.jsxs("div",{className:"flex flex-col sm:flex-row gap-2 w-full sm:w-auto",children:[a.jsx(pMe,{analysisText:d,annotatedImage:n}),a.jsxs(se,{onClick:c,variant:"outline",className:"w-full sm:w-auto border-green-400 text-green-300 hover:bg-green-900 hover:text-green-200 text-sm",children:[a.jsx(Gn,{className:"mr-2 h-4 w-4"}),"Download Chart"]})]})]}),a.jsxs(Se,{className:"grid grid-cols-1 lg:grid-cols-3 gap-4 sm:gap-6 p-4 sm:p-6",children:[a.jsxs("div",{className:"lg:col-span-1 flex flex-col gap-4 sm:gap-6",children:[a.jsxs("div",{className:"bg-black/30 rounded-lg p-2",children:[a.jsxs("div",{className:"relative",children:[a.jsx("img",{src:t,alt:"Original chart",className:"rounded-md w-full h-auto"}),a.jsx("canvas",{ref:r,className:"absolute top-0 left-0 w-full h-full rounded-md opacity-90",style:{mixBlendMode:"overlay"}})]}),a.jsx("p",{className:"text-xs text-gray-400 mt-2 text-center",children:"Chart with AI-drawn support/resistance lines"})]}),a.jsxs(be,{className:"bg-gray-800/50 border-gray-700",children:[a.jsx(Be,{className:"p-3 sm:p-4",children:a.jsxs(qe,{className:"flex items-center text-base sm:text-lg text-white",children:[a.jsx(ln,{className:"h-4 w-4 sm:h-5 sm:w-5 mr-2 text-purple-400"}),"AI Confidence & Quality"]})}),a.jsxs(Se,{className:"p-3 sm:p-4",children:[a.jsxs("div",{className:"flex items-center gap-3 sm:gap-4 mb-3",children:[a.jsx(Wy,{value:e.confidence_score||0,className:"h-2 sm:h-3",foregroundClass:"bg-purple-500"}),a.jsxs("span",{className:"text-base sm:text-lg font-bold text-purple-400",children:[e.confidence_score||0,"%"]})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-2 sm:gap-3 text-xs",children:[a.jsxs("div",{children:[a.jsx("span",{className:"text-gray-400",children:"Chart Quality:"}),a.jsx("div",{className:`font-medium ${(e.confidence_score||0)>80?"text-green-400":(e.confidence_score||0)>60?"text-yellow-400":"text-red-400"}`,children:(e.confidence_score||0)>80?"Excellent":(e.confidence_score||0)>60?"Good":"Fair"})]}),a.jsxs("div",{children:[a.jsx("span",{className:"text-gray-400",children:"Analysis Depth:"}),a.jsx("div",{className:"font-medium text-cyan-400",children:"Professional"})]})]})]})]})]}
919),a.jsxs("div",{className:"lg:col-span-2 space-y-4 sm:space-y-6",children:[a.jsxs(be,{className:"bg-gray-800/60 border-gray-700",children:[a.jsx(Be,{className:"p-3 sm:p-4",children:a.jsxs(qe,{className:"flex items-center text-lg text-cyan-400",children:[a.jsx(ln,{className:"h-5 w-5 mr-2"}),"Smart Insights & Patterns"]})}),a.jsx(Se,{className:"p-3 sm:p-4",children:a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[a.jsxs("div",{children:[a.jsx("h4",{className:"text-sm font-semibold text-gray-300 mb-3",children:"Key Takeaways"}),a.jsx("div",{className:"space-y-2",children:Array.isArray(e.key_takeaways)&&e.key_takeaways.length>0?e.key_takeaways.map((q,V)=>a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx(Eo,{className:"h-4 w-4 text-cyan-400 mt-0.5 flex-shrink-0"}),a.jsx("span",{className:"text-sm text-gray-300",children:q})]},V)):a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx(Eo,{className:"h-4 w-4 text-cyan-400 mt-0.5 flex-shrink-0"}),a.jsx("span",{className:"text-sm text-gray-300",children:(e.trend||"N/A")+" trend indicated by price action."})]}),a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx(Eo,{className:"h-4 w-4 text-cyan-400 mt-0.5 flex-shrink-0"}),a.jsx("span",{className:"text-sm text-gray-300",children:`Support at ${((w=e.support_levels)==null?void 0:w[0])||"key level"} is crucial.`})]}),a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx(Eo,{className:"h-4 w-4 text-cyan-400 mt-0.5 flex-shrink-0"}),a.jsx("span",{className:"text-sm text-gray-300",children:`Resistance at ${((_=e.resistance_levels)==null?void 0:_[0])||"upper level"} is a key barrier.`})]})]})})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"text-sm font-semibold text-gray-300 mb-3",children:"Identified Patterns"}),a.jsx("div",{className:"space-y-2",children:Array.isArray(e.identified_patterns)&&e.identified_patterns.length>0?e.identified_patterns.map((q,V)=>a.jsx(Oe,{className:"bg-purple-900/30 text-purple-400 text-xs mr-2 mb-2",children:q},V)):a.jsx(Oe,{className:"bg-gray-900/30 text-gray-400 text-xs",children:e.pattern||"No significant patterns"})})]})]})})]}),a.jsxs(be,{className:"bg-gray-800/60 border-gray-700",children:[a.jsx(Be,{className:"p-3 sm:p-4",children:a.jsxs(qe,{className:"flex items-center text-lg text-cyan-400",children:[a.jsx(OB,{className:"h-5 w-5 mr-2"}),"Professional Indicators"]})}),a.jsxs(Se,{className:"p-3 sm:p-4",children:[a.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4 mb-6",children:[a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"text-2xl font-bold text-yellow-400",children:((j=e.rsi_value)==null?void 0:j.toFixed(1))||"N/A"}),a.jsx("div",{className:"text-xs text-gray-400",children:"RSI"}),a.jsx(Oe,{className:`mt-1 text-xs ${(e.rsi_value||50)>70?"bg-red-900/30 text-red-400":(e.rsi_value||50)<30?"bg-green-900/30 text-green-400":"bg-gray-900/30 text-gray-400"}`,children:(e.rsi_value||50)>70?"Overbought":(e.rsi_value||50)<30?"Oversold":"Neutral"})]}),a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:`text-lg font-bold ${((S=e.macd_signal)==null?void 0:S.toLowerCase())==="sell"?"text-red-400":"text-green-400"}`,children:e.macd_signal||"NEUTRAL"}),a.jsx("div",{className:"text-xs text-gray-400",children:"MACD"}),a.jsx(Oe,{className:`mt-1 text-xs ${((k=e.macd_signal)==null?void 0:k.toLowerCase())==="sell"?"bg-red-900/30 text-red-400":"bg-green-900/30 text-green-400"}`,children:e.macd_signal||"NEUTRAL"})]}),a.jsxs("div",{className:"text-center",children:[a.jsxs("div",{className:"text-sm font-bold text-yellow-400",children:["K: ",((T=e.stochastic_k)==null?void 0:T.toFixed(1))||"N/A"]}),a.jsxs("div",{className:"text-sm font-bold text-yellow-400",children:["D: ",((P=e.stochastic_d)==null?void 0:P.toFixed(1))||"N/A"]}),a.jsx("div",{className:"text-xs text-gray-400",children:"Stochastic"})]}),a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"text-lg font-bold text-gray-400",children:((M=e.cci_value)==null?void 0:M.toFixed(0))||"N/A"}),a.jsx("div",{className:"text-xs text-gray-400",children:"CCI"}),a.jsx(Oe,{className:"mt-1 text-xs bg-blue-900/30 text-blue-400",children:(e.cci_value||0)>100?"Overbought":(e.cci_value||0)<-100?"Oversold":"Neutral"})]})]}),a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{children:[a.jsx("h4",{className:"text-sm font-semibold text-gray-300 mb-2",children:"Moving Averages"}),a.jsxs("div",{className:"grid grid-cols-3 gap-4 text-sm",children:[a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"text-cyan-400 font-medium",children:e.ma20||"N/A"}),a.jsx("div",{className:"text-xs text-gray-400",children:"MA20"})]}),a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"text-purple-400 font-medium",children:e.ma50||"N/A"}),a.jsx("div",{className:"text-xs text-gray-400",children:"MA50"})]}),a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"text-orange-400 font-medium",children:e.ma200||"N/A"}),a.jsx("div",{className:"text-xs text-gray-400",children:"MA200"})]})]})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"text-sm font-semibold text-gray-300 mb-2",children:"Ichimoku Cloud"}),a.jsxs("div",{className:"flex justify-between text-sm",children:[a.jsxs("span",{className:"text-gray-400",children:["Position: ",a.jsx("span",{className:"text-red-400",children:e.ichimoku_position||"N/A"})]}),a.jsxs("span",{className:"text-gray-400",children:["Future: ",a.jsx("span",{className:"text-red-400",children:"bearish"})]})]})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"text-sm font-semibold text-gray-300 mb-2",children:"Volume Profile"}),a.jsxs("div",{className:"grid grid-cols-3 gap-4 text-sm",children:[a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"text-gray-400",children:e.volume_low||"N/A"}),a.jsx("div",{className:"text-xs text-gray-500",children:"VA Low"})]}),a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"text-cyan-400 font-bold",children:e.poc||"N
919/A"}),a.jsx("div",{className:"text-xs text-gray-400",children:"PoC"})]}),a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"text-gray-400",children:e.volume_high||"N/A"}),a.jsx("div",{className:"text-xs text-gray-500",children:"VA High"})]})]})]})]})]})]}),a.jsxs(be,{className:"bg-gray-800/60 border-gray-700",children:[a.jsx(Be,{className:"p-3 sm:p-4",children:a.jsxs(qe,{className:"flex items-center text-lg text-cyan-400",children:[a.jsx(Xo,{className:"h-5 w-5 mr-2"}),"Trading Signals"]})}),a.jsx(Se,{className:"p-3 sm:p-4",children:a.jsxs("div",{className:"mb-4",children:[a.jsxs("div",{className:"flex items-center gap-4 mb-2",children:[a.jsx(Oe,{className:`text-sm px-3 py-1 ${e.primary_signal==="SELL"?"bg-red-900/30 text-red-400":e.primary_signal==="BUY"?"bg-green-900/30 text-green-400":"bg-gray-900/30 text-gray-400"}`,children:e.primary_signal==="SELL"?"ð SELL":e.primary_signal==="BUY"?"ð BUY":"NEUTRAL"}),a.jsx(Oe,{className:"bg-purple-900/30 text-purple-400 text-sm px-3 py-1",children:e.signal_strength||"N/A"})]}),a.jsxs("div",{className:"grid grid-cols-3 gap-4 mt-4",children:[a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"text-xs text-gray-400",children:"ð² Entry"}),a.jsx("div",{className:"text-lg font-bold text-cyan-400",children:e.signal_entry||"N/A"})]}),a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"text-xs text-gray-400",children:"ð Stop Loss"}),a.jsx("div",{className:"text-lg font-bold text-red-400",children:e.signal_stop_loss||"N/A"})]}),a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"text-xs text-gray-400",children:"ð¯ Take Profit"}),a.jsx("div",{className:"text-lg font-bold text-green-400",children:e.signal_take_profit||"N/A"})]})]}),a.jsxs("div",{className:"mt-4 p-3 bg-gray-900/50 rounded-lg",children:[a.jsxs("div",{className:"text-center mb-2",children:[a.jsx("span",{className:"text-xs text-gray-400",children:"Risk/Reward Ratio"}),a.jsx("div",{className:"text-lg font-bold text-cyan-400",children:e.risk_reward_ratio||"N/A"})]}),a.jsx("p",{className:"text-sm text-gray-300 text-center",children:e.signal_reasoning||"No specific signal reasoning provided."})]})]})})]}),a.jsx(RS,{title:"Executive Summary",icon:a.jsx(Eo,{className:"h-4 w-4 sm:h-5 sm:w-5"}),children:a.jsx("p",{className:"leading-relaxed text-sm sm:text-base",children:e.summary||"No summary available."})}),a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 sm:gap-6",children:[a.jsx(RS,{title:"Support Levels ð¢",icon:a.jsx(Ky,{className:"h-4 w-4 sm:h-5 sm:w-5 text-green-400"}),children:a.jsx("ul",{className:"space-y-2",children:Array.isArray(e.support_levels)&&e.support_levels.map((q,V)=>a.jsxs("li",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"w-2 h-2 bg-green-400 rounded-full flex-shrink-0"}),a.jsx("span",{className:"font-mono text-green-300 text-sm sm:text-base",children:q})]},V))})}),a.jsx(RS,{title:"Resistance Levels ð´",icon:a.jsx(Yy,{className:"h-4 w-4 sm:h-5 sm:w-5 text-red-400"}),children:a.jsx("ul",{className:"space-y-2",children:Array.isArray(e.resistance_levels)&&e.resistance_levels.map((q,V)=>a.jsxs("li",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"w-2 h-2 bg-red-400 rounded-full flex-shrink-0"}),a.jsx("span",{className:"font-mono text-red-300 text-sm sm:text-base",children:q})]},V))})})]})]})]})]}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 sm:gap-8",children:[a.jsxs(be,{className:"bg-green-900/30 border-green-700",children:[a.jsx(Be,{className:"p-3 sm:p-4",children:a.jsxs(qe,{className:"flex items-center text-green-400 text-base sm:text-lg",children:[a.jsx(Yy,{className:"h-4 w-4 sm:h-5 sm:w-5 mr-2"}),"ð Bullish Scenario"]})}),a.jsxs(Se,{className:"space-y-3 text-green-200 p-3 sm:p-4",children:[a.jsx("div",{className:"bg-green-900/30 p-3 rounded-lg",children:a.jsxs("p",{className:"text-sm sm:text-base",children:[a.jsx("strong",{className:"text-green-300",children:"ð¡ Reasoning:"})," ",((C=e.bullish_scenario)==null?void 0:C.reasoning)||"No reasoning provided."]})}),a.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[a.jsxs("div",{className:"bg-gray-900/50 p-3 rounded-lg text-center",children:[a.jsx("p",{className:"text-xs text-gray-400",children:"Entry Point"}),a.jsx("p",{className:"font-mono font-bold text-green-300 text-sm sm:text-base",children:((O=e.bullish_scenario)==null?void 0:O.entry)||"N/A"})]}),a.jsxs("div",{className:"bg-gray-900/50 p-3 rounded-lg text-center",children:[a.jsx("p",{className:"text-xs text-gray-400",children:"Stop Loss"}),a.jsx("p",{className:"font-mono font-bold text-red-300 text-sm sm:text-base",children:((D=e.bullish_scenario)==null?void 0:D.stop_loss)||"N/A"})]}),a.jsxs("div",{className:"bg-gray-900/50 p-3 rounded-lg text-center",children:[a.jsx("p",{className:"text-xs text-gray-400",children:"Take Profit"}),a.jsx("p",{className:"font-mono font-bold text-cyan-300 text-sm sm:text-base",children:((L=e.bullish_scenario)==null?void 0:L.take_profit)||"N/A"})]})]})]})]}),a.jsxs(be,{className:"bg-red-900/30 border-red-700",children:[a.jsx(Be,{className:"p-3 sm:p-4",children:a.jsxs(qe,{className:"flex items-center text-red-400 text-base sm:text-lg",children:[a.jsx(Ky,{className:"h-4 w-4 sm:h-5 sm:w-5 mr-2"}),"ð» Bearish Scenario"]})}),a.jsxs(Se,{className:"space-y-3 text-red-200 p-3 sm:p-4",children:[a.jsx("div",{className:"bg-red-900/30 p-3 rounded-lg",children:a.jsxs("p",{className:"text-sm sm:text-base",children:[a.jsx("strong",{className:"text-red-300",children:"ð¡ Reasoning:"})," ",((F=e.bearish_scenario)==null?void 0:F.reasoning)||"No reasoning provided."]})}),a.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[a.jsxs("div",{className:"bg-gray-900/50 p-3 rounded-lg text-center",children:[a.jsx("p",{className:"text-xs text-gray-400",children:"Entry Point"}),a.jsx("p",{className:"font-mono font-bold text-red-300 text-sm sm:text-base",children:((U=e.bearish_scenario)==null?void 0:U.entry)||"N/A"})]}),a.jsxs("div",{className:"bg-gray-900/50 p-3 rounded-lg text-center",children:[a.jsx("p",{className:"text-xs text-gray-400",children:"Stop Loss"}),a.jsx("p",{className:"font-mono font-bold text-green-300 text-sm sm:text-base",children:((G=e.bearish_scenario)==null?void 0:G.stop_loss)||"N/A"})]}),a.jsxs("div",{className:"bg-gray-900/50 p-3 rounded-lg text-center",children:[a.jsx("p",{className:"text-xs text-gray-400",children:"Take Profit"}),a.jsx("p",{className:"font-mono font-bold text-cyan-300 text-sm sm:text-base",children:((W=e.bearish_scenario)==null?void 0:W.take_profit)||"N/A"})]})]})]})]})]})]}):a.jsx("div",{className:"text-center py-10 text-red-400",children:a.jsx("p",{children:"Could not display analysis results. The data might be incomplete."})})}const yMe=[{icon:XJ,title:"AI Pattern Recognition",desc:"Detect 20+ chart patterns instantly â head & shoulders, triangles, flags, channels and more.",color:"from-cyan-500/20 to-blue-500/10",iconColor:"text-cyan-400"},{icon:ss,title:"Real-time Analysis",desc:"Get professional insights in seconds. No waiting, no queues â just instant AI results.",color:"from-purple-500/20 to-pink-500/10",iconColor:"text-purple-400"},{icon:Xo,title:"Actionable Signals",desc:"Entry, stop-loss, take-profit and risk/reward â a complete trade plan from one screenshot.",color:"from-emerald-500/20 to-teal-500/10",iconColor:"text-emerald-400"}],vMe=[{value:"100k+",label:"Active Traders"},{value:"2M+",label:"Charts Analyzed"},{value:"95%",label:"Accuracy Rate"},{value:"<5s",label:"Analysis Time"}],xMe=[{icon:Ts,title:"Upload Chart",desc:"Drop any trading chart screenshot â forex, crypto, stocks, indices."},{icon:ln,title:"AI Analyzes",desc:"Advanced vision AI processes patterns, indicators and levels in seconds."},{icon:Zy,title:"Get Results",desc:"Full technical breakdown: trend, patterns, S/R levels, indicators and signal."},{icon:pr,title:"Trade Smarter",desc:"Use the AI-generated trade plan with entry, SL, TP and risk/reward."}];function bMe({onCtaClick:e}){return a.jsxs("div",{className:"relative overflow-hidden",children:[a.jsxs("div",{className:"pointer-events-none absolute inset-0 -z-10",children:[a.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 h-72 w-72 rounded-full bg-cyan-500/20 blur-3xl"}),a.jsx("div",{className:"absolute top-32 right-10 h-64 w-64 roun
919ded-full bg-purple-500/20 blur-3xl"}),a.jsx("div",{className:"absolute top-20 left-10 h-56 w-56 rounded-full bg-blue-500/20 blur-3xl"})]}),a.jsxs("section",{className:"text-center pt-6 sm:pt-10 pb-8 sm:pb-12 px-2",children:[a.jsxs(Sr.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.4},className:"inline-flex items-center gap-2 rounded-full border border-cyan-500/30 bg-cyan-500/10 px-3 py-1.5 text-xs sm:text-sm text-cyan-300 mb-4 sm:mb-6",children:[a.jsx(er,{className:"h-3.5 w-3.5"}),"Free AI Chart Analyzer"]}),a.jsxs(Sr.h1,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.5,delay:.05},className:"text-3xl sm:text-5xl lg:text-6xl font-extrabold tracking-tight leading-[1.1]",children:[a.jsx("span",{className:"bg-gradient-to-r from-cyan-400 via-blue-400 to-purple-400 bg-clip-text text-transparent",children:"Analyze Any Trading Chart"}),a.jsx("br",{}),a.jsx("span",{className:"text-white",children:"with AI in Seconds"})]}),a.jsx(Sr.p,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.5,delay:.1},className:"mt-4 sm:mt-6 text-base sm:text-lg text-gray-300 max-w-2xl mx-auto px-2",children:"Upload a chart screenshot. Get instant, professional-grade technical analysis â patterns, indicators, support/resistance levels and a complete trade signal. 100% free."}),a.jsxs(Sr.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.5,delay:.15},className:"mt-6 sm:mt-8 flex flex-col sm:flex-row items-center justify-center gap-3",children:[a.jsxs("button",{onClick:e,className:"group inline-flex items-center justify-center gap-2 rounded-xl bg-gradient-to-r from-cyan-500 to-blue-500 px-6 py-3.5 text-base font-semibold text-white shadow-lg shadow-cyan-500/25 transition-all hover:shadow-cyan-500/40 hover:scale-[1.02] active:scale-95 w-full sm:w-auto",children:["Start Free Analysis",a.jsx(qo,{className:"h-4 w-4 transition-transform group-hover:translate-x-1"})]}),a.jsxs("div",{className:"flex items-center gap-1.5 text-xs sm:text-sm text-gray-400",children:[a.jsx(Yh,{className:"h-4 w-4 text-emerald-400"}),"No credit card needed"]})]})]}),a.jsx("section",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3 sm:gap-4 px-2 mb-10 sm:mb-14",children:vMe.map((t,r)=>a.jsxs(Sr.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.4,delay:.2+r*.05},className:"rounded-2xl border border-gray-700/60 bg-gray-800/40 backdrop-blur-sm p-3 sm:p-4 text-center",children:[a.jsx("div",{className:"text-xl sm:text-3xl font-extrabold bg-gradient-to-r from-cyan-400 to-blue-400 bg-clip-text text-transparent",children:t.value}),a.jsx("div",{className:"mt-1 text-[11px] sm:text-sm text-gray-400",children:t.label})]},t.label))}),a.jsx("section",{className:"px-2 mb-10 sm:mb-14",children:a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3 sm:gap-5",children:yMe.map((t,r)=>a.jsxs(Sr.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.4,delay:.1+r*.08},className:`relative rounded-2xl border border-gray-700/60 bg-gradient-to-br ${t.color} p-5 sm:p-6 backdrop-blur-sm overflow-hidden`,children:[a.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[a.jsx("div",{className:"flex h-11 w-11 items-center justify-center rounded-xl bg-gray-900/60 border border-gray-700/50",children:a.jsx(t.icon,{className:`h-5 w-5 ${t.iconColor}`})}),a.jsx("h3",{className:"text-base sm:text-lg font-semibold text-white",children:t.title})]}),a.jsx("p",{className:"text-sm text-gray-300 leading-relaxed",children:t.desc})]},t.title))})}),a.jsxs("section",{className:"px-2 mb-10 sm:mb-14",children:[a.jsxs("div",{className:"text-center mb-6 sm:mb-8",children:[a.jsxs("div",{className:"inline-flex items-center gap-2 text-xs sm:text-sm text-cyan-300 mb-2",children:[a.jsx(JZ,{className:"h-4 w-4"}),"Simple & Fast"]}),a.jsx("h2",{className:"text-2xl sm:text-3xl font-bold text-white",children:"How Chart AI Works"}),a.jsx("p",{className:"mt-2 text-sm text-gray-400",children:"Professional chart analysis in 4 simple steps"})]}),a.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3 sm:gap-4",children:xMe.map((t,r)=>a.jsxs(Sr.div,{initial:{opacity:0,y:16}
919,animate:{opacity:1,y:0},transition:{duration:.4,delay:.1+r*.08},className:"relative rounded-2xl border border-gray-700/60 bg-gray-800/40 p-4 sm:p-5",children:[a.jsx("div",{className:"absolute top-4 right-4 text-3xl font-extrabold text-gray-700/40 select-none",children:r+1}),a.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-xl bg-gradient-to-br from-cyan-500/20 to-blue-500/10 border border-cyan-500/20 mb-3",children:a.jsx(t.icon,{className:"h-5 w-5 text-cyan-400"})}),a.jsx("h3",{className:"text-sm sm:text-base font-semibold text-white mb-1",children:t.title}),a.jsx("p",{className:"text-xs sm:text-sm text-gray-400 leading-relaxed",children:t.desc})]},t.title))})]})]})}function wMe({open:e,onOpenChange:t}){return a.jsx(oa,{open:e,onOpenChange:t,children:a.jsxs(zn,{className:"sm:max-w-[420px] bg-gray-800 border-gray-700",children:[a.jsxs(Vn,{children:[a.jsxs(Hn,{className:"text-white flex items-center gap-3",children:[a.jsx("span",{className:"h-9 w-9 rounded-full bg-amber-500/15 flex items-center justify-center shrink-0",children:a.jsx(ss,{className:"h-5 w-5 text-amber-400"})}),"AI Credits Used Up"]}),a.jsx(Xa,{className:"text-gray-400 pt-1",children:"You have used all of your available AI credits. To continue analyzing charts and generating Expert Advisors, buy additional tokens from our manager."})]}),a.jsx("div",{className:"rounded-xl border border-cyan-500/30 bg-cyan-500/10 p-4 text-sm text-cyan-100",children:"Fast replies and flexible token packages for chart analyses and EA generations."}),a.jsxs(Wa,{className:"sm:justify-between gap-2",children:[a.jsx(se,{variant:"outline",onClick:()=>t(!1),className:"border-gray-600 text-gray-300",children:"Later"}),a.jsx(se,{asChild:!0,className:"bg-gradient-to-r from-cyan-500 to-blue-500 hover:from-cyan-600 hover:to-blue-600",children:a.jsxs("a",{href:Qye,target:"_blank",rel:"noopener noreferrer",children:[a.jsx(Bd,{className:"h-4 w-4 mr-2"}),"Buy Tokens on Telegram"]})})]})]})})}function iK(){const[e,t]=A.useState(!1);return{checkAiAllowed:async i=>{let s=i;try{s=await vn.auth.me()}catch{}return Fz(s).exhausted?(t(!0),null):s},aiLimitPopup:a.jsx(wMe,{open:e,onOpenChange:t})}}function jMe(){const[e,t]=A.useState(null),[r,n]=A.useState(null),[i,s]=A.useState(!1),[o,l]=A.useState(null),[c,d]=A.useState(null),u=A.useRef(null),h=A.useRef(null),m=A.useRef(null),{isAuthenticated:g,navigateToLogin:b}=dE(),{checkAiAllowed:v,aiLimitPopup:y}=iK(),x=()=>g?!0:(b(),!1),w=()=>{var k;(k=h.current)==null||k.scrollIntoView({behavior:"smooth"})},_=k=>{x()&&k&&(t(k),n(URL.createObjectURL(k)),l(null),d(null))},j=async()=>{if(!e){d("Please upload a chart image first.");return}const k=await v();if(k){s(!0),d(null),l(null);try{const{file_url:T}=await ka.UploadFile({file:e}),P=` 920 You are 'ChartInsight AI', a world-class trading analyst with deep expertise in technical analysis. The user has uploaded an image of a financial chart. Your task is to perform a comprehensive, professional-grade analysis of this chart. 921 922 Analyze the provided image and provide detailed analysis including: 923 924 1. **Instrument & Timeframe**: Make an educated guess for the financial instrument (e.g., EUR/USD, BTC/USD, AAPL, ES1!) and the chart's timeframe (e.g., 5-min, 1H, 4H, 1D). 925 926 2. **Key Trend Analysis**: Determine the primary trend (e.g., Strong Bullish, Weak Bullish, Bearish, Sidew
926ays/Ranging) and short-term vs long-term trend analysis. 927 928 3. **Advanced Chart Patterns**: Identify major chart patterns visible (e.g., Head and Shoulders, Double Top/Bottom, Triangles, Flags, Channels, Wedges). If none, state "No significant patterns identified". 929 930 4. **Professional Indicators Analysis**: 931 - RSI level and interpretation (overbought/oversold/neutral) 932 - MACD signal (bullish/bearish crossover, histogram) 933 - Stochastic values (K and D values) 934 - CCI reading and interpretation 935 - Moving Averages (MA20, MA50, MA200) and price relationship 936 - Ichimoku Cloud analysis (position relative to cloud) 937 - Volume Profile (Point of Control, Value Area High/Low) 938 939 5. **Key Support and Resistance Levels**: Identify at least 2-3 major support and 2-3 major resistance levels with precise price points. 940 941 6. **Smart Insights**: Provide 4-6 key takeaways about the current market condition, trend strength, and critical levels. 942 943 7. **Professional Trading Signal**: Generate a primary trading signal (BUY/SELL/NEUTRAL) with: 944 - Signal strength (WEAK/MODERATE/STRONG) 945 - Entry price 946 - Stop loss 947 - Take profit 948 - Risk/reward ratio 949 - Signal reasoning 950 951 8. **Actionable Trade Scenarios**: Generate detailed bullish and bearish scenarios with reasoning, entry, stop loss, and take profit for each. 952 953 9. **Confidence Score**: Provide a confidence score (out of 100) for the overall analysis. 954 955 Return your analysis ONLY in the following JSON format. Do not include any other text or markdown formatting. 956 `,M={type:"object",properties:{instrument:{type:"string"},timeframe:{type:"string"},trend:{type:"string"},short_term_trend:{type:"string"},long_term_trend:{type:"string"},pattern:{type:"string"},identified_patterns:{type:"array",items:{type:"string"}},support_levels:{type:"array",items:{type:"string"}},resistance_levels:{type:"array",items:{type:"string"}},rsi_value:{type:"number"},rsi_interpretation:{type:"string"},macd_signal:{type:"string"},stochastic_k:{type:"number"},stochastic_d:{type:"number"},cci_value:{type:"number"},ma20:{type:"string"},ma50:{type:"string"},ma200:{type:"string"},ichimoku_position:{type:"string"},volume_low:{type:"string"},poc:{type:"string"},volume_high:{type:"string"},indicator_analysis:{type:"string"},key_takeaways:{type:"array",items:{type:"string"}},primary_signal:{type:"string",enum:["BUY","SELL","NEUTRAL"]},signal_strength:{type:"string",enum:["WEAK","MODERATE","STRONG"]},signal_entry:{type:"string"},signal_stop_loss:{type:"string"},signal_take_profit:{type:"string"},risk_reward_ratio:{type:"string"},signal_reasoning:{type:"string"},summary:{type:"string"},bullish_scenario:{type:"object",properties:{reasoning:{type:"string"},entry:{type:"string"},stop_loss:{type:"string"},take_profit:{type:"string"}}},bearish_scenario:{type:"object",properties:{reasoning:{type:"string"},entry:{type:"string"},stop_loss:{type:"string"},take_profit:{type:"string"}}},confidence_score:{type:"number"}},required:["instrument","timeframe","trend","pattern","support_levels","resistance_levels","indicator_analysis","summary","bullish_scenario","bearish_scenario","confidence_score"]},C=await ka.InvokeLLM({prompt:P,file_urls:[T],response_json_schema:M,model:"gpt_5_4"});await Vy(k),je.ChartAnalysis.create({author_email:k.email,instrument:C.instrument,timeframe:C.timeframe,primary_signal:C.primary_signal,confidence_score:C.confidence_score}).catch(()=>{}),l(C),setTimeout(()=>{var O;(O=u.current)==null||O.scrollIntoView({behavior:"smooth"})},100)}catch(T){console.error("Analysis failed:",T),d("Analysis failed. The AI could not process the chart. Please try a clearer image or a different chart.")}finally{s(!1)}}},S=()=>{t(null),n(null),l(null),d(null),s(!1)};return a.jsx("div",{className:"min-h-screen bg-gray-900 p-2 sm:p-4 lg:p-8 text-white",children:a.jsxs("div",{className:"max-w-5xl mx-auto",children:[!o&&a.jsx(bMe,{onCtaClick:w}),a.jsx("div",{ref:h,children:!o&&a.jsx("div",{className:"mb-6 scroll-mt-20",children:a.jsx(mMe,{ref:m,onFileChange:_,onAnalyze:j,isLoading:i,previewUrl:r,isAuthed:g,onAuthRequired:b})})}),c&&a.jsxs("div",{className:"mt-4 sm:mt-6 bg-red-900/50 border border-red-700 text-red-300 px-3 sm:px-4 py-3 rounded-lg flex items-start gap-3 text-sm sm:text-base",children:[a.jsx(Ji,{className:"h-5 w-5 mt-0.5 flex-shrink-0"}),a.jsx("span",{children:c})]}),a.jsx("div",{ref:u,children:o&&a.jsx(gMe,{result:o,image:r})}),y,o&&a.jsx("div",{className:"mt-6 sm:mt-8 text-center",children:a.jsx(se,{onClick:S,variant:"outline",className:"w-full sm:w-auto border-indigo-400 text-indigo-300 hover:bg-indigo-900 hover:text-indigo-200 py-3 px-6",children:"Analyze Another Chart"})})]})})}
956function sK({value:e,onChange:t,size:r=5,readOnly:n=!1}){const[i,s]=A.useState(0),o=Array(r).fill(0),l=u=>{n||t(u)},c=u=>{n||s(u)},d=()=>{n||s(0)};return a.jsx("div",{className:Ie("flex items-center",n?"":"cursor-pointer"),children:o.map((u,h)=>{const m=h+1;return a.jsx(Kr,{className:Ie("h-5 w-5 transition-colors",(i||e)>=m?"text-yellow-400 fill-yellow-400":"text-gray-500",n?"":"hover:text-yellow-300"),onClick:()=>l(m),onMouseOver:()=>c(m),onMouseLeave:d},h)})})}var DS={exports:{}},IS={};/** 957 * @license React 958 * use-sync-external-store-shim.production.js 959 * 960 * Copyright (c) Meta Platforms, Inc. and affiliates. 961 * 962 * This source code is licensed under the MIT license found in the 963 * LICENSE file in the root directory of this source tree. 964 */var ZF;function NMe(){if(ZF)return IS;ZF=1;var e=rp();function t(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,s=e.useLayoutEffect,o=e.useDebugValue;function l(h,m){var g=m(),b=n({inst:{value:g,getSnapshot:m}}),v=b[0].inst,y=b[1];return s(function(){v.value=g,v.getSnapshot=m,c(v)&&y({inst:v})},[h,g,m]),i(function(){return c(v)&&y({inst:v}),h(function(){c(v)&&y({inst:v})})},[h]),o(g),g}function c(h){var m=h.getSnapshot;h=h.value;try{var g=m();return!r(h,g)}catch{return!0}}function d(h,m){return m()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:l;return IS.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,IS}var JF;function _Me(){return JF||(JF=1,DS.exports=NMe()),DS.exports}var SMe=_Me();function AMe(){return SMe.useSyncExternalStore(kMe,()=>!0,()=>!1)}function kMe(){return()=>{}}var FP="Avatar",[EMe]=xn(FP),[TMe,oK]=EMe(FP),lK=A.forwardRef((e,t)=>{const{__scopeAvatar:r,...n}=e,[i,s]=A.useState("idle");return a.jsx(TMe,{scope:r,imageLoadingStatus:i,onImageLoadingStatusChange:s,children:a.jsx(st.span,{...n,ref:t})})});lK.displayName=FP;var cK="AvatarImage",uK=A.forwardRef((e,t)=>{const{__scopeAvatar:r,src:n,onLoadingStatusChange:i=()=>{},...s}=e,o=oK(cK,r),l=PMe(n,s),c=on(d=>{i(d),o.onImageLoadingStatusChange(d)});return Mr(()=>{l!=="idle"&&c(l)},[l,c]),l==="loaded"?a.jsx(st.img,{...s,ref:t,src:n}):null});uK.displayName=cK;var dK="AvatarFallback",fK=A.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:n,...i}=e,s=oK(dK,r),[o,l]=A.useState(n===void 0);return A.useEffect(()=>{if(n!==void 0){const c=window.setTimeout(()=>l(!0),n);return()=>window.clearTimeout(c)}},[n]),o&&s.imageLoadingStatus!=="loaded"?a.jsx(st.span,{...i,ref:t}):null});fK.displayName=dK;function eB(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function PMe(e,{referrerPolicy:t,crossOrigin:r}){const n=AMe(),i=A.useRef(null),s=n?(i.current||(i.current=new window.Image),i.current):null,[o,l]=A.useState(()=>eB(s,e));return Mr(()=>{l(eB(s,e))},[s,e]),Mr(()=>{const c=h=>()=>{l(h)};if(!s)return;const d=c("loaded"),u=c("error");return s.addEventListener("load",d),s.addEventListener("error",u),t&&(s.referrerPolicy=t),typeof r=="string"&&(s.crossOrigin=r),()=>{s.removeEventListener("load",d),s.removeEventListener("error",u)}},[s,r,t]),o}var hK=lK,mK=uK,pK=fK;const Rs=A.forwardRef(({className:e,...t},r)=>a.jsx(hK,{ref:r,className:Ie("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Rs.displayName=hK.displayName;const Ds=A.forwardRef(({className:e,...t},r)=>a.jsx(mK,{ref:r,className:Ie("aspect-square h-full w-full",e),...t}));Ds.displayName=mK.displayName;const Is=A.forwardRef(({className:e,...t},r)=>a.jsx(pK,{ref:r,className:Ie("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Is.displayName=pK.displayName;const CMe=e=>{var t;return e?e.nickname&&e.nickname.trim()!==""?e.nickname.trim():(t=e.privacy_settings)!=null&&t.show_real_name&&e.full_name&&e.full_name.trim()!==""?e.full_name.trim():e.email?e.email.split("@")[0]:"User":"User"},OMe=te.memo(({comment:e})=>{const t=l=>{if(!l)return"U";const c=l.split(" ");return c.length===1?c[0].charAt(0).toUpperCase():c[0].charAt(0).toUpperCase()+c[c.length-1].charAt(0).toUpperCase()},r=e.author_role==="vip",n=e.author_role==="admin"||e.author_role==="moderator",i=n?"admin-post":r?"vip-post":"",s=e.author?CMe(e.author):e.author_name||"User",o=n?"admin-name":r?"vip-name":"text-white";return a.jsxs("div",{className:`flex gap-3 p-4 border-b border-gray-700 last:border-b-0 ${i}`,children:[a.jsxs(Rs,{className:"h-10 w-10",children:[a.jsx(Ds,{src:e.author_avatar_url,alt:s,loading:"lazy"}),a.jsx(Is,{children:t(s)})]}),a.jsxs("div",{className:"flex-1",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:`font-medium ${o}`,children:s}),r&&a.jsx(Oe,{className:"vip-badge text-xs py-0.5 px-1.5 h-5",children:"VIP"}),n&&a.jsx(Oe,{className:"admin-badge text-xs py-0.5 px-1.5 h-5",children:"Admin"})]}),a.jsx("span",{className:"text-xs text-gray-400",children:Mn(new Date(e.comment_date),{addSuffix:!0})})]}),a.jsx(sK,{value:e.rating,readOnly:!0}),a.jsx("p",{className:`mt-1 text-sm ${n||r?"text-gray-100":"text-gray-300"}`,children:e.content})]})]})});function Ak(e){if(!e)return null;if(e.includes("youtube.com")||e.includes("youtu.be")){const t=/(?:youtube\.com\/(?:[^\/]+\/.+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?\/\s]{11})/,r=e.match(t);if(r&&r[1])return`https://www.youtube.com/embed/${r[1]}`}if(e.includes("vimeo.com")){const t=/vimeo\.com\/(?:channels\/(?:\w+\/)?|groups\/(?:[^\/]*)\/videos\/|)(\d+)(?:|\/\?)/,r=e.match(t);if(r&&r[1])return`https://player.vimeo.com/video/${r[1]}`}if(e.includes("wistia.com")||e.includes("wistia.net")){const t=/(?:wistia\.com|wistia\.net|wi\.st)\/(?:medias|embed)\/(.+)
964/,r=e.match(t);if(r&&r[1])return`https://fast.wistia.net/embed/iframe/${r[1]}`}if(e.includes("loom.com")){const t=/loom\.com\/(?:share|embed)\/(.+)/,r=e.match(t);if(r&&r[1])return`https://www.loom.com/embed/${r[1]}`}return e}function MMe(e){return e?/^(https?:\/\/)?(www\.)?(youtube\.com|youtu\.be|vimeo\.com|wistia\.com|loom\.com)\/.*$/.test(e):!1}function RMe({isOpen:e,onOpenChange:t,existingEA:r,onSaveSuccess:n,currentUser:i}){const[s,o]=A.useState(_()),[l,c]=A.useState(!1),[d,u]=A.useState({}),[h,m]=A.useState([]),[g,b]=A.useState(!1),[v,y]=A.useState(""),[x,w]=A.useState(!1);function _(){return{name:"",description:"",platform:"mt4",tags:"",code:"",compiled_file_url:"",compiled_file_name:"",thumbnail_url:"",video_url:"",myfxbook_url:"",author_name:""}}A.useEffect(()=>{e?(r?(o({name:r.name||"",description:r.description||"",platform:r.platform||"mt4",tags:(r.tags||[]).join(", "),code:r.code||"",compiled_file_url:r.compiled_file_url||"",compiled_file_name:r.compiled_file_name||"",thumbnail_url:r.thumbnail_url||(i==null?void 0:i.profile_image)||"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/cbd7c9_3D-1175.png",video_url:r.video_url||"",myfxbook_url:r.myfxbook_url||"",author_name:r.author_name||(i?i.full_name||i.email.split("@")[0]:r.author?r.author.split("@")[0]:"")}),m(r.tags||[])):(o({..._(),author_name:i?i.full_name||i.email.split("@")[0]:"",thumbnail_url:(i==null?void 0:i.profile_image)||"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/cbd7c9_3D-1175.png"}),m([])),y("")):(o(_()),m([]),u({}),y(""))},[r,e,i]);const j=(M,C)=>{o(O=>({...O,[M]:C})),d[M]&&u(O=>({...O,[M]:null}))},S=async()=>{if(!s.name&&!s.code){u(M=>({...M,description:"Please provide an EA name or some code to generate a description."}));return}u(M=>({...M,description:null})),b(!0);try{const M=`Generate a concise and appealing description for a trading EA. 965 EA Name: ${s.name||"Unnamed EA"} 966 ${s.code?` 967EA Code Snippet (first 200 chars for context): 968\`\`\`mql 969${s.code.substring(0,200)} 970\`\`\``:""} 971 Focus on its potential benefits and key characteristics if inferable. Keep it under 150 words.`,C=await ka.InvokeLLM({prompt:M,response_json_schema:{type:"object",properties:{description:{type:"string"}}}});j("description",C.description)}catch(M){console.error("Error generating AI description:",M),u(C=>({...C,description:"Failed to generate description. Please try again."}))}b(!1)},k=async M=>{const C=M.target.files[0];if(y(""),!C)return;u(F=>({...F,file:null})),w(!0);const O=[".ex4",".ex5",".mq4",".mq5"],D=C.name.substring(C.name.lastIndexOf(".")).toLowerCase();if(!O.includes(D)){u(F=>({...F,file:`Invalid file type. Please upload ${O.join(", ")} files.`})),M.target.value="",w(!1);return}let L="mt4";(D===".ex5"||D===".mq5")&&(L="mt5"),o(F=>({...F,platform:L}));try{if(D===".mq4"||D===".mq5"){const F=new FileReader;F.onload=U=>{o(G=>({...G,code:U.target.result})),y("")},F.readAsText(C)}else if(D===".ex4"||D===".ex5"){const F=await ka.UploadFile({file:C});o(U=>({...U,compiled_file_url:F.file_url,compiled_file_name:C.name})),y("Compiled file uploaded successfully. Users will be able to download the .ex4/.ex5 file.")}}catch(F){console.error("Error handling file upload:",F),u(U=>({...U,file:"Failed to process the uploaded file. Please try again."}))}w(!1)},T=async M=>{M.preventDefault();let C={...d};if(!i){u(D=>({...D,submit:"Please log in to share or edit EAs."}));return}u(D=>({...D,submit:null})),s.name.trim()||(C.name="EA Name is required."),s.description.trim()||(C.description="EA Description is required."),!r&&(!s.code||s.code.trim()==="")&&(!s.compiled_file_url||s.compiled_file_url.trim()==="")&&(C.file="Please upload either source code (.mq4/.mq5) or compiled file (.ex4/.ex5) to share your EA.");const O=P();if(C={...C,...O},Object.keys(C).some(D=>C[D])){u(C);return}c(!0);try{const D={name:s.name,description:s.description,platform:s.platform,code:s.code,compiled_file_url:s.compiled_file_url,compiled_file_name:s.compiled_file_name,video_url:s.video_url,myfxbook_url:s.myfxbook_url,tags:h,author:i.email,author_name:s.author_name||i.full_name||i.email.split("@")[0],thumbnail_url:s.thumbnail_url||i.profile_image||"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/cbd7c9_3D-1175.png",is_trusted:r&&r.is_trusted!==void 0?r.is_trusted:!1};let L;if(r&&r.id){if(r.author!==i.email&&i.email!=="[email protected]"){u(G=>({...G,submit:"You are not authorized to edit this EA."})),c(!1);return}const U={...D};i.email!=="[email protected]"?delete U.author:(U.author=D.author,U.author_name=D.author_name),L=await je.SharedEA.update(r.id,U),L.author=U.author||r.author,L.author_name=U.author_name||r.author_name||D.author_name}else D.share_date=new Date().toISOString(),D.likes=0,D.downloads=0,D.status="active",L=await je.SharedEA.create(D);const F={...L,community_url:"https://gpt4trade.com/community"};n(F),t(!1)}catch(D){console.error("Error saving EA:",D),u(L=>({...L,submit:`Failed to save EA: ${D.message||"Please try again."}`}))}c(!1)},P=()=>{const M={};return s.video_url&&!MMe(s.video_url)&&(M.video_url="Please enter a valid YouTube, Vimeo or similar video URL"),s.myfxbook_url&&!s.myfxbook_url.toLowerCase().startsWith("https://www.myfxbook.com/")&&(M.myfxbook_url="Please enter a valid MyFXBook.com URL."),M};return a.jsx(oa,{open:e,onOpenChange:t,children:a.jsxs(zn,{className:"sm:max-w-[600px] bg-gray-800 border-gray-700 text-white",children:[a.jsxs(Vn,{children:[a.jsxs(Hn,{className:"flex items-center gap-2",children:[r?a.jsx(Oh,{className:"h-5 w-5 text-cyan-400"}):a.jsx(Ts,{className:"h-5 w-5 text-cyan-400"}),r?"Edit Your EA":"Share Your EA"]}),a.jsx(Xa,{className:"text-gray-400",children:r?"Update the details of your shared EA.":"Upload source code (.mq4/.mq5) or compiled files (.ex4/.ex5) to
971share with the community."})]}),a.jsxs("form",{onSubmit:T,className:"space-y-4 py-4",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex justify-between",children:[a.jsxs("label",{className:"text-sm font-medium text-gray-300",children:["EA Name ",a.jsx("span",{className:"text-red-500",children:"*"})]}),a.jsxs("span",{className:"text-xs text-gray-400",children:[s.name.length,"/50 characters"]})]}),a.jsx(Je,{placeholder:"Give your EA a professional name...",value:s.name,onChange:M=>{const C=M.target.value.slice(0,50);j("name",C)},className:Ie("bg-gray-900 border-gray-700 font-medium","focus:ring-2 focus:ring-cyan-500/20 transition-all","placeholder:text-gray-500",s.name.length>=50&&"border-yellow-500",d.name&&"border-red-500"),maxLength:50}),d.name&&a.jsx("p",{className:"text-xs text-red-400 mt-1",children:d.name})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex justify-between items-center",children:[a.jsxs("label",{className:"text-sm font-medium text-gray-300",children:["Description ",a.jsx("span",{className:"text-red-500",children:"*"})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("span",{className:"text-xs text-gray-400",children:[s.description.length,"/5000 characters"]}),a.jsx(se,{type:"button",variant:"ghost",size:"sm",onClick:S,disabled:g,className:"text-cyan-400 hover:text-cyan-300 h-7 px-2",children:g?a.jsxs(a.Fragment,{children:[a.jsx(er,{className:"h-4 w-4 animate-spin mr-1"}),"Generating..."]}):a.jsxs(a.Fragment,{children:[a.jsx(ln,{className:"h-4 w-4 mr-1"}),"AI Generate"]})})]})]}),a.jsx(Wn,{placeholder:"Describe your EA's strategy, features, and trading approach in detail...",value:s.description,onChange:M=>{const C=M.target.value.slice(0,5e3);j("description",C)},className:Ie("bg-gray-900 border-gray-700 h-32","focus:ring-2 focus:ring-cyan-500/20 transition-all","placeholder:text-gray-500","resize-none",s.description.length>=5e3&&"border-yellow-500",d.description&&"border-red-500"),required:!0,maxLength:5e3}),d.description&&a.jsx("p",{className:"text-xs text-red-400 mt-1",children:d.description})]}),a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[a.jsxs(qt,{value:s.platform,onValueChange:M=>j("platform",M),children:[a.jsx($t,{className:"bg-gray-900 border-gray-700",children:a.jsx(zt,{placeholder:"Platform"})}),a.jsxs(Ft,{children:[a.jsx(Ce,{value:"mt4",children:"MetaTrader 4"}),a.jsx(Ce,{value:"mt5",children:"MetaTrader 5"})]})]}),a.jsx(Je,{placeholder:"Myfxbook URL (optional)",value:s.myfxbook_url,onChange:M=>j("myfxbook_url",M.target.value),className:Ie("bg-gray-900 border-gray-700",d.myfxbook_url&&"border-red-500")}),d.myfxbook_url&&a.jsx("p",{className:"text-xs text-red-400 md:col-span-2",children:d.myfxbook_url})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("label",{className:"flex items-center gap-2 text-sm text-gray-400",children:[a.jsx(DB,{className:"h-4 w-4 text-cyan-400"}),"Upload EA File (.mq4, .mq5, .ex4, .ex5)",!r&&a.jsx("span",{className:"text-red-500",children:"*"})]}),a.jsx(Je,{type:"file",accept:".ex4,.ex5,.mq4,.mq5",onChange:k,className:"bg-gray-900 border-gray-700",disabled:x}),x&&a.jsxs("div",{className:"flex items-center text-xs text-cyan-400 mt-1",children:[a.jsx(er,{className:"h-3 w-3 mr-1 animate-spin"}),"Uploading file..."]}),d.file&&a.jsxs("div",{className:"flex items-center text-xs text-red-400 mt-1",children:[a.jsx(Lt,{className:"h-3 w-3 mr-1"}),d.file]}),v&&!d.file&&a.jsxs("div",{className:"flex items-center text-xs text-yellow-400 mt-1",children:[a.jsx(Lt,{className:"h-3 w-3 mr-1"}),v]}),(s.code||s.compiled_file_url)&&a.jsxs("div",{className:"flex gap-2 mt-2",children:[s.code&&a.jsxs("div",{className:"flex items-center text-xs text-green-400",children:[a.jsx(Dk,{className:"h-3 w-3 mr-1"}),"Source code available"]}),s.compiled_file_url&&a.jsxs("div",{className:"flex items-center text-xs text-blue-400",children:[a.jsx(Ik,{className:"h-3 w-3 mr-1"}),"Compiled file: ",s.compiled_file_name]})]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("label",{className:"text-sm text-gray-400 flex items-center gap-2",children:[a.jsx(YS,{className:"h-4 w-4 text-cyan-400"}),"Video Demo URL (YouTube, Vimeo, etc.)"]}),a.jsx(Je,{placeholder:"https://youtube.com/watch?v=...",value:s.video_url,onChange:M=>j("video_url",M.target.value),className:Ie("bg-gray-900 border-gray-700",d.video_url&&"border-red-500")}),d.video_url&&a.jsx("p",{className:"text-xs text-red-400",children:d.video_url})]}
971),a.jsx(Je,{placeholder:"Thumbnail Image URL (optional, uses profile pic if empty)",value:s.thumbnail_url,onChange:M=>j("thumbnail_url",M.target.value),className:"bg-gray-900 border-gray-700"}),a.jsx(se,{type:"submit",disabled:l||!i||x,className:"w-full bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-700 hover:to-blue-700",children:l?"Submitting...":r?"Save Changes":"Share EA"}),d.submit&&a.jsx("p",{className:"text-xs text-red-400 text-center mt-2",children:d.submit}),!i&&a.jsx("p",{className:"text-xs text-red-400 text-center mt-2",children:"Please log in to share or edit EAs."})]})]})})}const DMe=te.memo(({ea:e,currentUser:t,onEAClick:r,onEADownload:n,onLike:i,onBookmark:s,onOpenShareDialog:o,onOpenDeleteEADialog:l})=>{var u,h;const c=e.code&&e.code.trim()!==""||e.compiled_file_url&&e.compiled_file_url.trim()!=="",d=m=>{let g="bg-gray-800 border-gray-700 hover:border-cyan-500/50 transition-colors flex flex-col cursor-pointer group";return m.code&&m.code.trim()!==""||m.compiled_file_url&&m.compiled_file_url.trim()!==""||(g+=" opacity-90"),m.is_bookmarked&&(g+=" border-l-4 border-l-yellow-500"),m.is_trusted&&(g+=" border-t-4 border-t-green-500"),m.author_status==="vip"&&(g+=" border-r-4 border-r-amber-500"),m.author_is_admin&&(g+=" border-b-4 border-b-red-500"),g};return a.jsx(lT,{children:a.jsxs(be,{className:d(e),onClick:()=>r(e),children:[a.jsx(Be,{className:"p-4",children:a.jsxs("div",{className:"flex items-start justify-between",children:[a.jsxs("div",{className:"flex-1",children:[a.jsxs(qe,{className:"text-white group-hover:text-cyan-400 flex items-center gap-2 text-lg",children:[e.name,e.is_bookmarked&&a.jsx(Kr,{className:"h-4 w-4 text-yellow-400 fill-yellow-400 flex-shrink-0"}),e.is_trusted&&a.jsxs(Oe,{variant:"outline",className:"bg-green-500/10 border-green-500/30 text-green-400 text-xs ml-1 py-0.5 px-1.5 whitespace-nowrap flex-shrink-0",children:[a.jsx(Es,{className:"h-3 w-3 mr-1"})," Trusted"]}),!c&&a.jsxs(pa,{children:[a.jsx(ga,{asChild:!0,children:a.jsx(US,{className:"h-4 w-4 text-orange-400 flex-shrink-0"})}),a.jsx(na,{className:"bg-gray-900 text-white border-gray-700",children:a.jsx("p",{children:"No downloadable files available."})})]})]}),a.jsxs("div",{className:"flex items-center gap-2 mt-2 flex-wrap",children:[a.jsx(Oe,{className:"bg-cyan-600/80 text-cyan-50 text-xs py-0.5 px-1.5",children:(u=e.platform)==null?void 0:u.toUpperCase()}),e.code&&e.code.trim()!==""&&a.jsxs(Oe,{variant:"outline",className:"border-green-600/50 text-green-400 text-xs py-0.5 px-1.5",children:[a.jsx(Dk,{className:"h-3 w-3 mr-1"}),"Source"]}),e.compiled_file_url&&e.compiled_file_url.trim()!==""&&a.jsxs(Oe,{variant:"outline",className:"border-blue-600/50 text-blue-400 text-xs py-0.5 px-1.5",children:[a.jsx(Ik,{className:"h-3 w-3 mr-1"}),"Compiled"]}),(h=e.tags)==null?void 0:h.slice(0,2).map(m=>a.jsx(Oe,{variant:"outline",className:"border-gray-600/70 text-gray-300 text-xs py-0.5 px-1.5",children:m},m))]})]}),a.jsx("img",{src:e.thumbnail_url||"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/cbd7c9_3D-1175.png",alt:`${e.name} thumbnail`,className:"h-12 w-12 rounded-lg border border-gray-700 object-cover flex-shrink-0 ml-2",loading:"lazy"})]})}),a.jsxs(Se,{className:"p-4 pt-0 flex-grow",children:[a.jsx("p",{className:"text-gray-300 text-sm mb-4 line-clamp-3",children:e.description}),a.jsxs("div",{className:"flex items-center justify-between text-xs text-gray-400 mb-4 flex-wrap gap-x-3 gap-y-1",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs(pa,{children:[a.jsx(ga,{asChild:!0,children:a.jsxs("span",{className:"flex items-center",children:[a.jsx(Kr,{className:"h-3.5 w-3.5 text-yellow-400 mr-0.5"}),(e.average_rating||0).toFixed(1)," (",e.comment_count||0,")"]})}),a.jsx(na,{className:"bg-gray-900 text-white border-gray-700 text-xs",children:a.jsxs("p",{children:["Average Rating (",e.comment_count||0," reviews)"]})})]}),a.jsxs(pa,{children:[a.jsx(ga,{asChild:!0,children:a.jsxs("span",{className:"flex items-center",children:[a.jsx(Gn,{className:"h-3.5 w-3.5 mr-0.5"}),e.downloads||0]})}),a.jsx(na,{className:"bg-gray-900 text-white border-gray-700 text-xs",children:a.jsx("p",{children:"Downloads"})})]}),a.jsxs(pa,{children:[a.jsx(ga,{asChild:!0,children:a.jsxs("span",{className:"flex items-center",children:[a.jsx(Ju,{className:"h-3.5 w-3.5 mr-0.5"}),e.likes||0]})}),a.jsx(na,{className:"bg-gray-900 text-white border-gray-700 text-xs",children:a.jsx("p",{children:"Likes"})})]})]}),a.jsxs(pa,{children:[a.jsx(ga,{asChild:!0,children:a.jsxs("span",{className:"flex items-center whitespace-nowrap",children:[a.jsx(Za,{className:"h-3.5 w-3.5 mr-0.5"}),Mn(new Date(e.share_date),{addSuffix:!0})]})}),a.jsx(na,{className:"bg-gray-900 text-white border-gray-700 text-xs",children:a.jsxs("p",{children:["Shared on ",new Date(e.share_date).toLocaleDateString()]})})]})]})]}),a.jsx("div",{className:"p-4 pt-0 mt-auto",children:a.jsxs("div",{className:"flex justify-between items-center",children:[a.jsxs(pa,{children:[a.jsx(ga,{asChild:!0,children:a.jsxs(se,{variant:"outline",size:"sm",className:Ie("text-xs py-1 px-2 h-auto",c?"text-cyan-400 border-cyan-400/30 hover:bg-cyan-400/10":"text-gray-500 border-gray-600/50 cursor-not-allowed opacity-70"),onClick:m=>c&&n(e,m),disabled:!c,children:[a.jsx(Gn,{className:"h-3.5 w-3.5 mr-1.5"}),"Download"]})}),!c&&a.jsx(na,{className:"bg-gray-900 text-white border-gray-700 text-xs",children:a.jsx("p",{children:"No downloadable files available for this EA."})})]}),a.jsxs("div",{className:"flex items-center gap-0.5",children:[a.jsxs(pa,{children:[a.jsx(ga,{asChild:!0,children:a.jsx(se,{variant:"ghost",size:"icon",className:"text-gray-400 hover:text-cyan-400 h-7 w-7",onClick:m=>{m.stopPropagation(),i(e.id)},children:a.jsx(Ju,{className:"h-4 w-4"})})}),a.jsx(na,{className:"bg-gray-900 text-white border-gray-700 text-xs",children:a.jsx("p",{children:"Like EA"})})]}),a.jsxs(pa,{children:[a.jsx(ga,{asChild:!0,children:a.jsx(se,{variant:"ghost",size:"icon",className:Ie("h-7 w-7",e.is_bookmarked?"text-yellow-400 hover:text-yellow-300":"text-gray-400 hover:text-yellow-400"),onClick:m=>{m.stopPropagation(),s(e.id)},children:a.jsx(Kr,{className:`h-4 w-4 ${e.is_bookmarked?"fill-yellow-400":""}`})})}),a.jsx(na,{className:"bg-gray-900 text-white border-gray-700 text-xs",children:a.jsx("p",{children:e.is_bookmarked?"Remove Bookmark":"Bookmark EA"})})]}),t&&t.email===e.author&&a.jsxs(a.Fragment,{children:[a.jsxs(pa,{children:[a.jsx(ga,{asChild:!0,children:a.jsx(se,{variant:"ghost",size:"icon",className:"text-gray-400 hover:text-yellow-400 h-7 w-7",onClick:m=>{m.stopPropagation(),o(e)},children:a.jsx(Oh,{className:"h-4 w-4"})})}),a.jsx(na,{className:"bg-gray-900 text-white border-gray-700 text-xs",children:a.jsx("p",{children:"Edit EA"})})]}),a.jsxs(pa,{children:[a.jsx(ga,{asChild:!0,children:a.jsx(se,{variant:"ghost",size:"icon",className:"text-red-400 hover:text-red-500 hover:bg-red-500/10 h-7 w-7",onClick:m=>l(e,m),children:a.jsx(Ud,{className:"h-4 w-4"})})}),a.jsx(na,{className:"bg-gray-900 text-white border-gray-700 text-xs",children:a.jsx("p",{children:"Delete EA"})})]})]})]})]})})]})})});function IMe(e,t){return A.useReducer((r,n)=>t[r][n]??r,e)}var BP="ScrollArea",[gK]=xn(BP),[LMe,ri]=gK(BP),yK=A.forwardRef((e,t)=>
vendor: 9,474 bytes, line 971
971{const{__scopeScrollArea:r,type:n="hover",dir:i,scrollHideDelay:s=600,...o}=e,[l,c]=A.useState(null),[d,u]=A.useState(null),[h,m]=A.useState(null),[g,b]=A.useState(null),[v,y]=A.useState(null),[x,w]=A.useState(0),[_,j]=A.useState(0),[S,k]=A.useState(!1),[T,P]=A.useState(!1),M=wt(t,O=>c(O)),C=Yd(i);return a.jsx(LMe,{scope:r,type:n,dir:C,scrollHideDelay:s,scrollArea:l,viewport:d,onViewportChange:u,content:h,onContentChange:m,scrollbarX:g,onScrollbarXChange:b,scrollbarXEnabled:S,onScrollbarXEnabledChange:k,scrollbarY:v,onScrollbarYChange:y,scrollbarYEnabled:T,onScrollbarYEnabledChange:P,onCornerWidthChange:w,onCornerHeightChange:j,children:a.jsx(st.div,{dir:C,...o,ref:M,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":_+"px",...e.style}})})});yK.displayName=BP;var vK="ScrollAreaViewport",xK=A.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:i,...s}=e,o=ri(vK,r),l=A.useRef(null),c=wt(t,l,o.onViewportChange);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),a.jsx(st.div,{"data-radix-scroll-area-viewport":"",...s,ref:c,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e.style},children:a.jsx("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});xK.displayName=vK;var ds="ScrollAreaScrollbar",UP=A.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=ri(ds,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:o}=i,l=e.orientation==="horizontal";return A.useEffect(()=>(l?s(!0):o(!0),()=>{l?s(!1):o(!1)}),[l,s,o]),i.type==="hover"?a.jsx($Me,{...n,ref:t,forceMount:r}):i.type==="scroll"?a.jsx(FMe,{...n,ref:t,forceMount:r}):i.type==="auto"?a.jsx(bK,{...n,ref:t,forceMount:r}):i.type==="always"?a.jsx(qP,{...n,ref:t}):null});UP.displayName=ds;var $Me=A.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=ri(ds,e.__scopeScrollArea),[s,o]=A.useState(!1);return A.useEffect(()=>{const l=i.scrollArea;let c=0;if(l){const d=()=>{window.clearTimeout(c),o(!0)},u=()=>{c=window.setTimeout(()=>o(!1),i.scrollHideDelay)};return l.addEventListener("pointerenter",d),l.addEventListener("pointerleave",u),()=>{window.clearTimeout(c),l.removeEventListener("pointerenter",d),l.removeEventListener("pointerleave",u)}}},[i.scrollArea,i.scrollHideDelay]),a.jsx(bn,{present:r||s,children:a.jsx(bK,{"data-state":s?"visible":"hidden",...n,ref:t})})}),FMe=A.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=ri(ds,e.__scopeScrollArea),s=e.orientation==="horizontal",o=Qx(()=>c("SCROLL_END"),100),[l,c]=IMe("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return A.useEffect(()=>{if(l==="idle"){const d=window.setTimeout(()=>c("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(d)}},[l,i.scrollHideDelay,c]),A.useEffect(()=>{const d=i.viewport,u=s?"scrollLeft":"scrollTop";if(d){let h=d[u];const m=()=>{const g=d[u];h!==g&&(c("SCROLL"),o()),h=g};return d.addEventListener("scroll",m),()=>d.removeEventListener("scroll",m)}},[i.viewport,s,c,o]),a.jsx(bn,{present:r||l!=="hidden",children:a.jsx(qP,{"data-state":l==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:Ge(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:Ge(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),bK=A.forwardRef((e,t)=>{const r=ri(ds,e.__scopeScrollArea),{forceMount:n,...i}=e,[s,o]=A.useState(!1),l=e.orientation==="horizontal",c=Qx(()=>{if(r.viewport){const d=r.viewport.offsetWidth<r.viewport.scrollWidth,u=r.viewport.offsetHeight<r.viewport.scrollHeight;o(l?d:u)}},10);return Od(r.viewport,c),Od(r.content,c),a.jsx(bn,{present:n||s,children:a.jsx(qP,{"data-state":s?"visible":"hidden",...i,ref:t})})}),qP=A.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,i=ri(ds,e.__scopeScrollArea),s=A.useRef(null),o=A.useRef(0),[l,c]=A.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=SK(l.viewport,l.content),u={...n,sizes:l,onSizesChange:c,hasThumb:d>0&&d<1,onThumbChange:m=>s.current=m,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:m=>o.current=m};function h(m,g){return HMe(m,o.current,l,g)}return r==="horizontal"?a.jsx(BMe,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&s.current){const m=i.viewport.scrollLeft,g=tB(m,l,i.dir);s.current.style.transform=`translate3d(${g}px, 0, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollLeft=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollLeft=h(m,i.dir))}}):r==="vertical"?a.jsx(UMe,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&s.current){const m=i.viewport.scrollTop,g=tB(m,l);s.current.style.transform=`translate3d(0, ${g}px, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollTop=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollTop=h(m))}}):null}),BMe=A.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...i}=e,s=ri(ds,e.__scopeScrollArea),[o,l]=A.useState(),c=A.useRef(null),d=wt(t,c,s.onScrollbarXChange);return A.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),a.jsx(jK,{"data-orientation":"horizontal",...i,ref:d,sizes:r,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Xx(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.x),onDragScroll:u=>e.onDragScroll(u.x),onWheelScroll:(u,h)=>{if(s.viewport){const m=s.viewport.scrollLeft+u.deltaX;e.onWheelScroll(m),kK(m,h)&&u.preventDefault()}},onResize:()=>{c.current&&s.viewport&&o&&n({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:_v(o.paddingLeft),paddingEnd:_v(o.paddingRight)}})}})}),UMe=A.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...i}=e,s=ri(ds,e.__scopeScrollArea),[o,l]=A.useState(),c=A.useRef(null),d=wt(t,c,s.onScrollbarYChange);return A.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),a.jsx(jK,{"data-orientation":"vertical",...i,ref:d,sizes:r,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Xx(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.y),onDragScroll:u=>e.onDragScroll(u.y),onWheelScroll:(u,h)=>{if(s.viewport){const m=s.viewport.scrollTop+u.deltaY;e.onWheelScroll(m),kK(m,h)&&u.preventDefault()}},onResize:()=>{c.current&&s.viewport&&o&&n({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:_v(o.paddingTop),paddingEnd:_v(o.paddingBottom)}})}})}),[qMe,wK]=gK(ds),jK=A.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:i,onThumbChange:s,onThumbPointerUp:o,onThumbPointerDown:l,onThumbPositionChange:c,onDragScroll:d,onWheelScroll:u,onResize:h,...m}=e,g=ri(ds,r),[b,v]=A.useState(null),y=wt(t,M=>v(M)),x=A.useRef(null),w=A.useRef(""),_=g.viewport,j=n.content-n.viewport,S=on(u),k=on(c),T=Qx(h,10);function P(M){if(x.current){const C=M.clientX-x.current.left,O=M.clientY-x.current.top;d({x:C,y:O})}}return A.useEffect(()=>{const M=C=>{const O=C.target;(b==null?void 0:b.contains(O))&&S(C,j)};return document.addEventListener("wheel",M,{passive:!1}),()=>document.removeEventListener("wheel",M,{passive:!1})},[_,b,j,S]),A.useEffect(k,[n,k]),Od(b,T),Od(g.content,T),a.jsx(qMe,{scope:r,scrollbar:b,hasThumb:i,onThumbChange:on(s),onThumbPointerUp:on(o),onThumbPositionChange:k,onThumbPointerDown:on(l),children:a.jsx(st.div,{...m,ref:y,style:{position:"absolute",...m.style},onPointerDown:Ge(e.onPointerDown,M=>{M.button===0&&(M.target.setPointerCapture(M.pointerId),x.current=b.getBoundingClientRect(),w.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",g.viewport&&(g.viewport.style.scrollBehavior="auto"),P(M))}),onPointerMove:Ge(e.onPointerMove,P),onPointerUp:Ge(e.onPointerUp,M=>{const C=M.target;C.hasPointerCapture(M.pointerId)&&C.releasePointerCapture(M.pointerId),document.body.style.webkitUserSelect=w.current,g.viewport&&(g.viewport.style.scrollBehavior=""),x.current=null})})})}),Nv="ScrollAreaThumb",NK=A.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=wK(Nv,e.__scopeScrollArea);return a.jsx(bn,{present:r||i.hasThumb,children:a.jsx(zMe,{ref:t,...n})})}),zMe=A.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...i}=e,s=ri(Nv,r),o=wK(Nv,r),{onThumbPositionChange:l}=o,c=wt(t,h=>o.onThumbChange(h)),d=A.useRef(void 0),u=Qx(()=>{d.current&&(d.current(),d.current=void 0)},100);return A.useEffect(()=>{const h=s.viewport;if(h){const m=()=>{if(u(),!d.current){const g=WMe(h,l);d.current=g,l()}};return l(),h.addEventListener("scroll",m),()=>h.removeEventListener("scroll",m)}},[s.viewport,u,l]),a.jsx(st.div,{"data-state":o.hasThumb?"visible":"hidden",...i,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:Ge(e.onPointerDownCapture,h=>{const g=h.target.getBoundingClientRect(),b=h.clientX-g.left,v=h.clientY-g.top;o.onThumbPointerDown({x:b,y:v})}),onPointerUp:Ge(e.onPointerUp,o.onThumbPointerUp)})});NK.displayName=Nv;var zP="ScrollAreaCorner",_K=A.forwardRef((e,t)=>
971{const r=ri(zP,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?a.jsx(VMe,{...e,ref:t}):null});_K.displayName=zP;var VMe=A.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,i=ri(zP,r),[s,o]=A.useState(0),[l,c]=A.useState(0),d=!!(s&&l);return Od(i.scrollbarX,()=>{var h;const u=((h=i.scrollbarX)==null?void 0:h.offsetHeight)||0;i.onCornerHeightChange(u),c(u)}),Od(i.scrollbarY,()=>{var h;const u=((h=i.scrollbarY)==null?void 0:h.offsetWidth)||0;i.onCornerWidthChange(u),o(u)}),d?a.jsx(st.div,{...n,ref:t,style:{width:s,height:l,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function _v(e){return e?parseInt(e,10):0}function SK(e,t){const r=e/t;return isNaN(r)?0:r}function Xx(e){const t=SK(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function HMe(e,t,r,n="ltr"){const i=Xx(r),s=i/2,o=t||s,l=i-o,c=r.scrollbar.paddingStart+o,d=r.scrollbar.size-r.scrollbar.paddingEnd-l,u=r.content-r.viewport,h=n==="ltr"?[0,u]:[u*-1,0];return AK([c,d],h)(e)}function tB(e,t,r="ltr"){const n=Xx(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-i,o=t.content-t.viewport,l=s-n,c=r==="ltr"?[0,o]:[o*-1,0],d=YA(e,c);return AK([0,o],[0,l])(d)}function AK(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 kK(e,t){return e>0&&e<t}var WMe=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return(function i(){const s={left:e.scrollLeft,top:e.scrollTop},o=r.left!==s.left,l=r.top!==s.top;(o||l)&&t(),r=s,n=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(n)};function Qx(e,t){const r=on(e),n=A.useRef(0);return A.useEffect(()=>()=>window.clearTimeout(n.current),[]),A.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function Od(e,t){const r=on(t);Mr(()=>{let n=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return i.observe(e),()=>{window.cancelAnimationFrame(n),i.unobserve(e)}}},[e,r])}var EK=yK,GMe=xK,KMe=_K;const VP=A.forwardRef(({className:e,children:t,...r},n)=>a.jsxs(EK,{ref:n,className:Ie("relative overflow-hidden",e),...r,children:[a.jsx(GMe,{className:"h-full w-full rounded-[inherit]",children:t}),a.jsx(TK,{}),a.jsx(KMe,{})]}));VP.displayName=EK.displayName;const TK=A.forwardRef(({className:e,orientation:t="vertical",...r},n)=>a.jsx(UP,{ref:n,orientation:t,className:Ie("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:a.jsx(NK,{className:"relative flex-1 rounded-full bg-border"})}));TK.displayName=UP.displayName;function PK({isOpen:e,onClose:t,onAccept:r}){const[n,i]=A.useState(!1);A.useEffect(()=>{e&&i(!1)},[e]);const s=()=>{n&&r()};return a.jsx(oa,{open:e,onOpenChange:o=>!o&&t(),children:a.jsxs(zn,{className:"sm:max-w-[550px] bg-gray-800 border-gray-700 text-white",children:[a.jsxs(Vn,{children:[a.jsxs(Hn,{className:"flex items-center gap-2",children:[a.jsx(Ar,{className:"h-5 w-5 text-cyan-400"}),"Download Disclaimer"]}),a.jsx(Xa,{className:"text-gray-400",children:"Please read and accept before downloading"})]}),a.jsx(VP,{className:"h-[300px] rounded-md border border-gray-700 bg-gray-900 p-4",children:a.jsxs("div",{className:"space-y-4 text-gray-300 text-sm",children:[a.jsxs("section",{children:[a.jsx("h4",{className:"font-medium text-white mb-1",children:"Usage Terms"}),a.jsx("p",{children:"This Expert Advisor (EA) is provided for educational and testing purposes. Always test thoroughly on a demo account before using with real funds."})]}),a.jsxs("section",{children:[a.jsx("h4",{className:"font-medium text-white mb-1",children:"No Guarantees"}),a.jsx("p",{children:"Past performance does not guarantee future results. Trading carries risk and you should only trade with funds you can afford to lose."})]}),a.jsxs("section",{children:[a.jsx("h4",{className:"font-medium text-white mb-1",children:"Best Practices"}),a.jsx("p",{children:"We recommend: ⢠Testing on a demo account first ⢠Starting with small positions ⢠Understanding all parameters before use ⢠Regular monitoring of EA performance"})]}),a.jsxs("section",{children:[a.jsx("h4",{className:"font-medium text-white mb-1",children:"Support"}),a.jsx("p",{children:"While we strive to provide high-quality EAs, we cannot guarantee specific results or provide individual trading advice."})]})]})}),a.jsxs("div",{className:"flex items-center space-x-2 mt-4",children:[a.jsx(dm,{id:"terms",checked:n,onCheckedChange:i}),a.jsx(Nr,{htmlFor:"terms",className:"text-sm text-gray-300",children:"I understand and accept these terms"})]}),a.jsxs(Wa,{className:"mt-4",children:[a.jsx(se,{variant:"outline",onClick:t,className:"mr-2",children:"Cancel"}),a.jsxs(se,{onClick:s,disabled:!n,className:"bg-cyan-600 hover:bg-cyan-700",children:[a.jsx(Yo,{className:"h-4 w-4 mr-2"}),"Download EA"]})]})]})})}function YMe(e){const[t,r]=A.useState(!1),[n,i]=A.useState(null),s=async u=>{try{localStorage.setItem("disclaimer_accepted",Date.now().toString());try{const h=await je.User.me();console.log(`User ${h.email} accepted/confirmed disclaimer at ${new Date().toISOString()} for item:`,(u==null?void 0:u.name)||(u==null?void 0:u.id))}catch{}u&&e&&e(u)}catch(h){console.error("Download failed:",h)}finally{r(!1),i(null)}},o=u=>{i(u);const h=localStorage.getItem("disclaimer_accepted");h&&Date.now()-parseInt(h)<10080*60*1e3?s(u):r(!0)},l=()=>{n?s(n):(console.warn("Disclaimer accepted, but no item was queued for download."),r(!1),i(null))},c=()=>{r(!1),i(null)},d=te.useCallback(()=>a.jsx(PK,{isOpen:t,onClose:c,onAccept:l}),[t]);return{handleDownloadRequest:o,DownloadDisclaimerDialog:d}}var CK="AlertDialog",[XMe]=xn(CK,[dz]),Zs=dz(),OK=e=>{const{__scopeAlertDialog:t,...r}=e,n=Zs(t);return a.jsx(kz,{...n,...r,modal:!0})};OK.displayName=CK;var QMe="AlertDialogTrigger",ZMe=A.forwardRef((e,t)=>
971{const{__scopeAlertDialog:r,...n}=e,i=Zs(r);return a.jsx(Ez,{...i,...n,ref:t})});ZMe.displayName=QMe;var JMe="AlertDialogPortal",MK=e=>{const{__scopeAlertDialog:t,...r}=e,n=Zs(t);return a.jsx(Tz,{...n,...r})};MK.displayName=JMe;var eRe="AlertDialogOverlay",RK=A.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,i=Zs(r);return a.jsx(xT,{...i,...n,ref:t})});RK.displayName=eRe;var Bu="AlertDialogContent",[tRe,rRe]=XMe(Bu),nRe=k7("AlertDialogContent"),DK=A.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...i}=e,s=Zs(r),o=A.useRef(null),l=wt(t,o),c=A.useRef(null);return a.jsx(Lye,{contentName:Bu,titleName:IK,docsSlug:"alert-dialog",children:a.jsx(tRe,{scope:r,cancelRef:c,children:a.jsxs(bT,{role:"alertdialog",...s,...i,ref:l,onOpenAutoFocus:Ge(i.onOpenAutoFocus,d=>{var u;d.preventDefault(),(u=c.current)==null||u.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:[a.jsx(nRe,{children:n}),a.jsx(iRe,{contentRef:o})]})})})});DK.displayName=Bu;var IK="AlertDialogTitle",LK=A.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,i=Zs(r);return a.jsx(wT,{...i,...n,ref:t})});LK.displayName=IK;var $K="AlertDialogDescription",FK=A.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,i=Zs(r);return a.jsx(jT,{...i,...n,ref:t})});FK.displayName=$K;var aRe="AlertDialogAction",BK=A.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,i=Zs(r);return a.jsx(ox,{...i,...n,ref:t})});BK.displayName=aRe;var UK="AlertDialogCancel",qK=A.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:i}=rRe(UK,r),s=Zs(r),o=wt(t,i);return a.jsx(ox,{...s,...n,ref:o})});qK.displayName=UK;var iRe=({contentRef:e})=>{const t=`\`${Bu}\` requires a description for the component to be accessible for screen reader users. 972 973You can add a description to the \`${Bu}\` by passing a \`${$K}\` component as a child, which also benefits sighted users by adding visible context to the dialog. 974 975Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Bu}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. 976 977For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return A.useEffect(()=>{var n;document.getElementById((n=e.current)==null?void 0:n.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},sRe=OK,oRe=MK,zK=RK,VK=DK,HK=BK,WK=qK,GK=LK,KK=FK;const Ym=sRe,lRe=oRe,YK=A.forwardRef(({className:e,...t},r)=>a.jsx(zK,{className:Ie("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}));YK.displayName=zK.displayName;const Md=A.forwardRef(({className:e,...t},r)=>a.jsxs(lRe,{children:[a.jsx(YK,{}),a.jsx(VK,{ref:r,className:Ie("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));Md.displayName=VK.displayName;const Rd=({className:e,...t})=>a.jsx("div",{className:Ie("flex flex-col space-y-2 text-center sm:text-left",e),...t});Rd.displayName="AlertDialogHeader";const Dd=({className:e,...t})=>a.jsx("div",{className:Ie("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Dd.displayName="AlertDialogFooter";const Id=A.forwardRef(({className:e,...t},r)=>a.jsx(GK,{ref:r,className:Ie("text-lg font-semibold",e),...t}));Id.displayName=GK.displayName;const Ld=A.forwardRef(({className:e,...t},r)=>a.jsx(KK,{ref:r,className:Ie("text-sm text-muted-foreground",e),...t}));Ld.displayName=KK.displayName;const $d=A.forwardRef(({className:e,...t},r)=>a.jsx(HK,{ref:r,className:Ie(cT(),e),...t}));$d.displayName=HK.displayName;const Xm=A.forwardRef(({className:e,...t},r)=>a.jsx(WK,{ref:r,className:Ie(cT({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Xm.displayName=WK.displayName;const Ay=70;function XK({onRefresh:e,children:t}){const[r,n]=A.useState(0),[i,s]=A.useState(!1),o=A.useRef(0),l=A.useRef(!1),c=()=>{const v=document.querySelector("main");return v?v.scrollTop:window.scrollY},d=v=>{c()===0&&(o.current=v.touches[0].clientY,l.current=!0)},u=v=>{if(!l.current||i)return;const y=v.touches[0].clientY-o.current;y>0?n(Math.min(y*.5,Ay*1.2)):(l.current=!1,n(0))},h=async()=>
977{if(l.current)if(l.current=!1,r>=Ay&&!i){s(!0),n(0);try{await e()}finally{s(!1)}}else n(0)},m=i?48:Math.round(Math.min(r,48)),g=r/Ay*180,b=r>=Ay;return a.jsxs("div",{onTouchStart:d,onTouchMove:u,onTouchEnd:h,className:"relative",children:[a.jsx("div",{className:"flex items-center justify-center overflow-hidden transition-all duration-200",style:{height:`${m}px`},children:i?a.jsx(kt,{className:"h-5 w-5 animate-spin text-cyan-400"}):r>5?a.jsx(Xr,{className:`h-5 w-5 transition-colors ${b?"text-cyan-400":"text-gray-500"}`,style:{transform:`rotate(${g}deg)`}}):null}),t]})}function cRe(){var xe,Ee,Pe;const[e,t]=A.useState([]),[r,n]=A.useState(!0),[i,s]=A.useState(""),[o,l]=A.useState("all"),[c,d]=A.useState("-share_date"),[u,h]=A.useState(null),[m,g]=A.useState([]),[b,v]=A.useState(!1),[y,x]=A.useState(0),[w,_]=A.useState(!1),[j,S]=A.useState(null),[k,T]=A.useState(null),[P,M]=A.useState(""),[C,O]=A.useState(0),[D,L]=A.useState(!1),[F,U]=A.useState(null),[G,W]=A.useState(!1),{toast:q}=np(),V=A.useCallback(Z=>{if((!Z.code||Z.code.trim()==="")&&(!Z.compiled_file_url||Z.compiled_file_url.trim()==="")){console.error("No downloadable files available for:",Z==null?void 0:Z.name),q({title:"Download Error",description:`No downloadable files are available for "${(Z==null?void 0:Z.name)||"this EA"}".`,variant:"destructive"});return}if(Z.code&&Z.code.trim()!==""){const ye=Z.code,he=new Blob([ye],{type:"text/plain"}),He=URL.createObjectURL(he),Te=document.createElement("a");Te.href=He,Te.download=`${Z.name}.${Z.platform==="mt4"?"mq4":"mq5"}`,document.body.appendChild(Te),Te.click(),setTimeout(()=>{document.body.removeChild(Te),URL.revokeObjectURL(He)},0)}else if(Z.compiled_file_url&&Z.compiled_file_url.trim()!==""){const ye=document.createElement("a");ye.href=Z.compiled_file_url,ye.download=Z.compiled_file_name||`${Z.name}.${Z.platform==="mt4"?"ex4":"ex5"}`,ye.target="_blank",document.body.appendChild(ye),ye.click(),document.body.removeChild(ye)}const ae=Z.downloads||0,pe=ae+1;t(ye=>ye.map(he=>he.id===Z.id?{...he,downloads:pe}:he)),u&&u.id===Z.id&&h(ye=>({...ye,downloads:pe})),je.SharedEA.update(Z.id,{downloads:pe}).catch(ye=>{console.error("Error updating download count:",ye),q({title:"Sync Error",description:"Could not update download count on the server.",variant:"destructive"}),t(he=>he.map(He=>He.id===Z.id?{...He,downloads:ae}:He)),u&&u.id===Z.id&&h(he=>({...he,downloads:ae}))})},[u,q]),{handleDownloadRequest:z,DownloadDisclaimerDialog:I}=YMe(V),B=(Z,ae)=>{ae&&ae.stopPropagation();const pe=Z.code&&Z.code.trim()!=="",ye=Z.compiled_file_url&&Z.compiled_file_url.trim()!=="";if(!pe&&!ye){q({title:"Not Downloadable",description:"No downloadable files are available for this EA.",variant:"default"});return}z(Z)},H=A.useCallback(async()=>{n(!0);try{const Z=await je.SharedEA.list(c,50),ae=await je.User.me().catch(()=>null),pe=Z.map(He=>He.id);let ye=[];pe.length>0;let he=[];for(const He of Z){const Te=await je.SharedEAComment.filter({ea_id:He.id}),it=Te.length>0?Te.reduce((Et,Yn)=>Et+Yn.rating,0)/Te.length:0,_t=ae&&He.bookmarked_by&&He.bookmarked_by.includes(ae.email),Bt={...He,comment_count:Te.length,average_rating:it,is_bookmarked:_t};he.push(Bt)}t(he)}catch(Z){console.error("Error loading EAs:",Z),q({title:"Error Loading EAs",description:Z.message,variant:"destructive"})}n(!1)},[c,q]);A.useEffect(()=>{je.User.me().then(T).catch(()=>T(null)),H()},[H]);const J=async Z=>{if(Z){v(!0);try{const ae=await je.SharedEAComment.filter({ea_id:Z},"-comment_date");g(ae);const pe=ae.length>0?ae.reduce((ye,he)=>ye+he.rating,0)/ae.length:0;x(pe)}catch(ae){console.error("Error loading comments:",ae),g([]),x(0),q({title:"Error Loading Comments",description:ae.message,variant:"destructive"})}v(!1)}},ee=Z=>{h(Z),J(Z.id)},Y=(Z=null)=>{S(Z),_(!0)},X=Z=>{_(!1),S(null),H(),u&&u.id===Z.id&&(h(ae=>({...ae,...Z})),J(Z.id)),q({title:"Success",description:`${Z.name} has been ${j?"updated":"shared"}.`})},ne=async Z=>{if(!k){q({title:"Login Required",description:"Please log in to like EAs.",variant:"destructive"});return}try{const ae=e.find(pe=>pe.id===Z);if(ae){const pe=(ae.likes||0)+1;await je.SharedEA.update(Z,{likes:pe}),t(ye=>ye.map(he=>he.id===Z?{...he,likes:pe}:he)),u&&u.id===Z&&h(ye=>({...ye,likes:pe}))}}catch(ae){console.error("Error liking EA:",ae),q({title:"Error",description:"Failed to like EA.",variant:"destructive"})}},Q=async Z=>{if(!k){q({title:"Login Required",description:"Please log in to bookmark EAs.",variant:"destructive"});return}try{const ae=e.find(Te=>Te.id===Z);if(!ae)return;const pe=ae.bookmarked_by||[],ye=k.email;let he;pe.includes(ye)?he=pe.filter(Te=>Te!==ye):he=[...pe,ye],await je.SharedEA.update(Z,{bookmarked_by:he});const He=e.map(Te=>{if(Te.id===Z){const it=he.includes(ye);return{...Te,bookmarked_by:he,is_bookmarked:it}}return Te});t(He),u&&u.id===Z&&h(Te=>({...Te,bookmarked_by:he,is_bookmarked:he.includes(ye)})),q({title:he.includes(ye)?"Bookmarked":"Bookmark Removed"})}catch(ae){console.error("Error bookmarking EA:",ae),q({title:"Error",description:"Failed to update bookmark.",variant:"destructive"})}},ie=async()=>
977{if(!P.trim()||C===0||!u||!k){q({title:"Missing Info",description:"Please write a comment and select a rating.",variant:"destructive"});return}L(!0);const Z={id:`optimistic-${Date.now()}`,ea_id:u.id,author_email:k.email,author_name:k.full_name||k.email.split("@")[0],content:P,rating:C,comment_date:new Date().toISOString()};g(ye=>[Z,...ye]);const ae=P,pe=C;M(""),O(0);try{await je.SharedEAComment.create({ea_id:u.id,author_email:k.email,author_name:k.full_name||k.email.split("@")[0],content:ae,rating:pe,comment_date:new Date().toISOString()}),J(u.id),H(),q({title:"Review Posted",description:"Thank you for your feedback!"})}catch(ye){console.error("Error posting comment:",ye),g(he=>he.filter(He=>He.id!==Z.id)),M(ae),O(pe),q({title:"Error",description:"Failed to post comment.",variant:"destructive"})}L(!1)},me=(Z,ae)=>{ae&&ae.stopPropagation(),U(Z),W(!0)},oe=async()=>{if(!F||!k||F.author!==k.email){q({title:"Error",description:"Cannot delete this EA.",variant:"destructive"}),W(!1),U(null);return}try{await je.SharedEA.delete(F.id),t(Z=>Z.filter(ae=>ae.id!==F.id)),q({title:"Success",description:`${F.name} has been deleted.`}),u&&u.id===F.id&&h(null)}catch(Z){console.error("Error deleting EA:",Z),q({title:"Error",description:`Failed to delete ${F.name}.`,variant:"destructive"})}W(!1),U(null)},Ne=A.useMemo(()=>e.filter(Z=>{var Te,it,_t;const ae=i.toLowerCase(),pe=(Te=Z.name)==null?void 0:Te.toLowerCase().includes(ae),ye=(it=Z.description)==null?void 0:it.toLowerCase().includes(ae),he=(_t=Z.tags)==null?void 0:_t.some(Bt=>Bt.toLowerCase().includes(ae)),He=o==="all"||Z.platform===o;return(pe||ye||he)&&He}),[e,i,o]),_e=A.useMemo(()=>[...Ne].sort((Z,ae)=>Z.is_bookmarked&&!ae.is_bookmarked?-1:!Z.is_bookmarked&&ae.is_bookmarked?1:c==="-share_date"?new Date(ae.share_date)-new Date(Z.share_date):c==="-likes"?(ae.likes||0)-(Z.likes||0):c==="-downloads"?(ae.downloads||0)-(Z.downloads||0):c==="-average_rating"?(ae.average_rating||0)-(Z.average_rating||0):0),[Ne,c]);return a.jsx(lT,{children:a.jsx(XK,{onRefresh:H,children:a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(Ya,{className:"h-12 w-12"}),a.jsxs("div",{children:[a.jsxs("h1",{className:"text-2xl font-bold text-white flex items-center gap-2",children:[a.jsx(la,{className:"h-6 w-6 text-cyan-400"}),"Free EAs Community"]}),a.jsx("p",{className:"text-gray-400",children:"Share and discover free trading robots"})]})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx(se,{asChild:!0,variant:"outline",className:"text-cyan-400 border-cyan-400/30 hover:bg-cyan-400/10",children:a.jsxs(pt,{to:Ve("MqlGenerator"),children:[a.jsx(_i,{className:"h-4 w-4 mr-2"}),"Create EA with AI"]})}),a.jsxs(se,{onClick:()=>Y(),className:"bg-gradient-to-r from-purple-600 to-indigo-600 hover:from-purple-700 hover:to-indigo-700",children:[a.jsx(Ts,{className:"h-4 w-4 mr-2"}),"Share Your EA"]})]})]}),a.jsxs("div",{className:"flex flex-col md:flex-row gap-4",children:[a.jsx("div",{className:"flex-1",children:a.jsxs("div",{className:"relative",children:[a.jsx(al,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-500"}),a.jsx(Je,{placeholder:"Search EAs by name, description, or tags...",value:i,onChange:Z=>s(Z.target.value),className:"pl-10 bg-gray-800 border-gray-700 text-white"})]})}),a.jsxs(qt,{value:o,onValueChange:l,children:[a.jsx($t,{className:"w-full md:w-[180px] bg-gray-800 border-gray-700 text-white",children:a.jsx(zt,{placeholder:"Platform"})}),a.jsxs(Ft,{children:[a.jsx(Ce,{value:"all",children:"All Platforms"}),a.jsx(Ce,{value:"mt4",children:"MetaTrader 4"}),a.jsx(Ce,{value:"mt5",children:"MetaTrader 5"})]})]}),a.jsxs(qt,{value:c,onValueChange:d,children:[a.jsx($t,{className:"w-full md:w-[180px] bg-gray-800 border-gray-700 text-white",children:a.jsx(zt,{placeholder:"Sort by"})}),a.jsxs(Ft,{children:[a.jsx(Ce,{value:"-share_date",children:"Most Recent"}),a.jsx(Ce,{value:"-likes",children:"Most Liked"}),a.jsx(Ce,{value:"-downloads",children:"Most Downloaded"}
977),a.jsx(Ce,{value:"-average_rating",children:"Highest Rated"})]})]})]}),a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:r?a.jsx("div",{className:"col-span-full flex justify-center py-12",children:a.jsx(kt,{className:"animate-spin h-8 w-8 text-cyan-500"})}):_e.length===0?a.jsxs("div",{className:"col-span-full text-center py-12",children:[a.jsx(_i,{className:"h-16 w-16 mx-auto text-gray-600 mb-4"}),a.jsx("h3",{className:"text-xl font-medium text-gray-300",children:"No EAs Found"}),a.jsx("p",{className:"text-gray-400 mt-2",children:"Try adjusting your search filters or share your own EA!"})]}):_e.map(Z=>a.jsx(DMe,{ea:Z,currentUser:k,onEAClick:ee,onEADownload:B,onLike:ne,onBookmark:Q,onOpenShareDialog:Y,onOpenDeleteEADialog:me},Z.id))}),a.jsx(RMe,{isOpen:w,onOpenChange:_,existingEA:j,onSaveSuccess:X,currentUser:k}),a.jsx(oa,{open:!!u,onOpenChange:()=>h(null),children:a.jsx(zn,{className:"sm:max-w-[700px] max-h-[90vh] flex flex-col bg-gray-800 border-gray-700 text-white",children:u&&a.jsxs(a.Fragment,{children:[a.jsxs(Vn,{className:"p-6 border-b border-gray-700",children:[a.jsxs("div",{className:"flex items-start justify-between",children:[a.jsxs("div",{children:[a.jsxs(Hn,{className:"text-2xl flex items-center gap-2",children:[u.name,u.is_bookmarked&&a.jsx(Kr,{className:"h-5 w-5 text-yellow-400 fill-yellow-400"}),u.is_trusted&&a.jsxs(Oe,{variant:"outline",className:"bg-green-500/10 border-green-500/30 text-green-400 text-sm ml-2",children:[a.jsx(Es,{className:"h-4 w-4 mr-1"})," Trusted"]}),(!u.code||u.code.trim()==="")&&(!u.compiled_file_url||u.compiled_file_url.trim()==="")&&a.jsxs(pa,{children:[a.jsx(ga,{asChild:!0,children:a.jsx(US,{className:"h-5 w-5 text-orange-400 ml-2"})}),a.jsx(na,{className:"bg-gray-900 text-white border-gray-700",children:a.jsx("p",{children:"No downloadable files available."})})]})]}),a.jsxs("div",{className:"flex items-center gap-2 mt-2 text-sm text-gray-400",children:[a.jsxs("span",{children:["By: ",u.author_name||((xe=u.author)==null?void 0:xe.split("@")[0])]}),a.jsx("span",{children:a.jsx(Oe,{className:"bg-cyan-600",children:(Ee=u.platform)==null?void 0:Ee.toUpperCase()})})]})]}),a.jsx("img",{src:u.thumbnail_url||"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/cbd7c9_3D-1175.png",alt:u.name,className:"h-16 w-16 rounded-lg border border-gray-700 object-cover",loading:"lazy"})]}),a.jsxs("div",{className:"flex items-center gap-x-4 gap-y-2 mt-3 flex-wrap",children:[a.jsxs("span",{className:"flex items-center text-sm text-yellow-400",children:[a.jsx(Kr,{className:"h-4 w-4 mr-1"})," ",y.toFixed(1)," (",m.length," reviews)"]}),a.jsxs("span",{className:"flex items-center text-sm text-gray-400",children:[a.jsx(Gn,{className:"h-4 w-4 mr-1"})," ",u.downloads||0," downloads"]}),a.jsxs("span",{className:"flex items-center text-sm text-gray-400",children:[a.jsx(Ju,{className:"h-4 w-4 mr-1"})," ",u.likes||0," likes"]}),a.jsxs("span",{className:"flex items-center text-sm text-gray-400",children:[a.jsx(Za,{className:"h-4 w-4 mr-1"})," ",Mn(new Date(u.share_date),{addSuffix:!0})]})]}),a.jsxs("div",{className:"mt-2 flex flex-wrap gap-2",children:[u.code&&u.code.trim()!==""&&a.jsxs(Oe,{variant:"outline",className:"border-green-600 text-green-400",children:[a.jsx(Dk,{className:"h-3 w-3 mr-1"}),"Source Code Available"]}),u.compiled_file_url&&u.compiled_file_url.trim()!==""&&a.jsxs(Oe,{variant:"outline",className:"border-blue-600 text-blue-400",children:[a.jsx(Ik,{className:"h-3 w-3 mr-1"}),"Compiled File Available"]}),(Pe=u.tags)==null?void 0:Pe.map(Z=>a.jsx(Oe,{variant:"outline",className:"border-gray-600 text-gray-300",children:Z},Z))]})]}),a.jsxs("div",{className:"p-6 space-y-4 overflow-y-auto flex-grow",children:[(!u.code||u.code.trim()==="")&&(!u.compiled_file_url||u.compiled_file_url.trim()==="")&&a.jsxs("div",{className:"p-3 bg-orange-900/20 border border-orange-700/30 rounded-md flex items-center gap-2 text-orange-300 text-sm",children:[a.jsx(US,{className:"h-5 w-5"}),"Note: No downloadable files are available for this EA."]}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-medium mb-1",children:"Description"}),a.jsx("p",{className:"text-gray-300 whitespace-pre-wrap",children:u.description})]}),u.myfxbook_url&&a.jsxs("div",{className:"mt-4",children:[a.jsx("h3",{className:"text-lg font-medium mb-2",children:"Trading Statistics"}),a.jsxs("a",{href:u.myfxbook_url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 p-3 bg-gray-700/50 border border-gray-600 rounded-md text-cyan-400 hover:bg-gray-700 transition-colors",onClick:Z=>Z.stopPropagation(),children:[a.jsx(Qy,{className:"h-5 w-5"}),a.jsx("span",{children:"View Performance on MyFXBook"}),a.jsx(Br,{className:"h-4 w-4 ml-auto"})]})]}),u.video_url&&a.jsxs("div",{className:"mt-4",children:[a.jsx("h3",{className:"text-lg font-medium mb-2",children:"Video Demo"}),a.jsx("div",{className:"aspect-video rounded-md overflow-hidden bg-black",children:a.jsx("iframe",{src:Ak(u.video_url),className:"w-full h-full",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,title:`${u.name} Video Demo`,loading:"lazy"})})]}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-medium mb-2",children:"Comments & Ratings"}),b?a.jsx("div",{className:"flex justify-center py-4",children:a.jsx(kt,{className:"animate-spin h-6 w-6 text-cyan-500"})}):m.length>0?a.jsx("div",{className:"max-h-[300px] overflow-y-auto space-y-0 bg-gray-850 rounded-md border border-gray-700",children:m.map(Z=>a.jsx(OMe,{comment:Z}
977,Z.id))}):a.jsx("p",{className:"text-gray-400 text-sm",children:"No comments yet. Be the first to review!"})]}),k&&a.jsxs("div",{className:"pt-4 border-t border-gray-700",children:[a.jsx("h3",{className:"text-lg font-medium mb-2",children:"Leave a Review"}),a.jsxs("div",{className:"space-y-3",children:[a.jsx(sK,{value:C,onChange:O}),a.jsx(Wn,{placeholder:"Write your comment...",value:P,onChange:Z=>M(Z.target.value),className:"bg-gray-900 border-gray-700 text-white h-24"}),a.jsxs(se,{onClick:ie,disabled:D||!P.trim()||C===0,className:"w-full",children:[D?a.jsx(kt,{className:"h-4 w-4 animate-spin mr-2"}):null,"Post Review"]})]})]}),!k&&a.jsxs("p",{className:"text-sm text-gray-400 text-center py-4 border-t border-gray-700",children:["Please ",a.jsx(se,{variant:"link",className:"p-0 h-auto text-cyan-400",onClick:()=>je.User.login(),children:"log in"})," to post a review."]})]}),a.jsx(Wa,{className:"p-6 border-t border-gray-700",children:a.jsxs("div",{className:"flex w-full justify-between items-center",children:[a.jsxs("div",{className:"flex gap-2",children:[a.jsxs(pa,{children:[a.jsx(ga,{asChild:!0,children:a.jsxs(se,{variant:"outline",onClick:Z=>{(u.code&&u.code.trim()!==""||u.compiled_file_url&&u.compiled_file_url.trim()!=="")&&B(u,Z)},className:` ${u.code&&u.code.trim()!==""||u.compiled_file_url&&u.compiled_file_url.trim()!==""?"text-cyan-400 border-cyan-400/30 hover:bg-cyan-400/10":"text-gray-500 border-gray-600/50 cursor-not-allowed"}`,disabled:(!u.code||u.code.trim()==="")&&(!u.compiled_file_url||u.compiled_file_url.trim()===""),children:[a.jsx(Gn,{className:"h-4 w-4 mr-2"})," Download EA"]})}),(!u.code||u.code.trim()==="")&&(!u.compiled_file_url||u.compiled_file_url.trim()==="")&&a.jsx(na,{className:"bg-gray-900 text-white border-gray-700",children:a.jsx("p",{children:"No downloadable files available."})})]}),a.jsxs(se,{variant:"outline",onClick:()=>window.open(Ve("Community"),"_blank"),className:"text-gray-300 border-gray-600 hover:bg-gray-700",children:[a.jsx(IB,{className:"h-4 w-4 mr-2"})," View on Community"]})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsxs(se,{variant:"outline",onClick:()=>Q(u.id),className:` ${u.is_bookmarked?"text-yellow-400 border-yellow-400/30":"text-gray-400"}`,children:[a.jsx(Kr,{className:`h-4 w-4 mr-2 ${u.is_bookmarked?"fill-yellow-400":""}`}),u.is_bookmarked?"Bookmarked":"Bookmark"]}),a.jsx(r2,{asChild:!0,children:a.jsx(se,{variant:"ghost",children:"Close"})})]})]})})]})})}),a.jsx(Ym,{open:G,onOpenChange:W,children:a.jsxs(Md,{className:"bg-gray-800 border-gray-700 text-white",children:[a.jsxs(Rd,{children:[a.jsx(Id,{children:"Are you absolutely sure?"}),a.jsxs(Ld,{className:"text-gray-400",children:["This action cannot be undone. This will permanently delete your shared EA",a.jsxs("span",{className:"font-semibold text-cyan-400",children:[" ",F==null?void 0:F.name," "]}),"and remove it from the community."]})]}),a.jsxs(Dd,{children:[a.jsx(Xm,{onClick:()=>U(null),className:"text-gray-300 border-gray-600 hover:bg-gray-700",children:"Cancel"}),a.jsx($d,{onClick:oe,className:"bg-red-600 hover:bg-red-700",children:"Yes, delete EA"})]})]})}),a.jsx(I,{})]})})})}const uRe=[{id:"martingale",name:"Martingale",description:"Double position size after losses"},{id:"grid",name:"Grid",description:"Place orders at regular intervals"},{id:"punch_entry",name:"Punch Entry (Momentum Burst)",description:"Quick momentum-based entries"},{id:"trend_following",name:"Trend-Following",description:"Follow market trends"},{id:"scalping",name:"Scalping",description:"Quick small profits"},{id:"mean_reversion",name:"Mean Reversion",description:"Trade back to average price"},{id:"breakout",name:"Breakout",description:"Trade price breakouts"}],dRe=[{id:"ma",name:"Moving Average",description:"Trend direction indicator"},{id:"macd",name:"MACD",description:"Momentum oscillator"},{id:"rsi",name:"RSI",description:"Overbought/oversold indicator"},{id:"stochastic",name:"Stochastic Oscillator",description:"Momentum indicator"},{id:"adx",name:"ADX",description:"Trend strength indicator"}
977,{id:"parabolic_sar",name:"Parabolic SAR",description:"Trend reversal indicator"},{id:"bollinger_bands",name:"Bollinger Bands",description:"Volatility indicator"},{id:"ichimoku",name:"Ichimoku Kinko Hyo",description:"Comprehensive trend system"},{id:"cci",name:"CCI",description:"Commodity Channel Index"},{id:"fractals",name:"Fractals",description:"Support/resistance levels"},{id:"supertrend",name:"SuperTrend",description:"Trend following indicator"},{id:"atr",name:"ATR",description:"Volatility measure"}];function fRe(){const[e,t]=A.useState("welcome"),[r,n]=A.useState(null),[i,s]=A.useState([]),[o,l]=A.useState(""),[c,d]=A.useState(""),[u,h]=A.useState(!1),[m,g]=A.useState(""),[b,v]=A.useState("https://www.vantagemarkets.com/open-live-account/?affid=MTEwODk3"),[y,x]=A.useState("Vantage Markets");A.useEffect(()=>{(async()=>{try{const O=await On.getConfig("broker_signup_url","https://www.vantagemarkets.com/open-live-account/?affid=MTEwODk3"),D=await On.getConfig("broker_name","Vantage Markets");v(O),x(D)}catch(O){console.warn("Error loading broker configuration, using defaults:",O)}})()},[]);const w=C=>{n(C)},_=C=>{s(O=>O.find(L=>L.id===C.id)?O.filter(L=>L.id!==C.id):[...O,C])},j=async()=>{h(!0),g("");const C=(r==null?void 0:r.name)||o,O=i.map(L=>L.name).join(", "),D=` 978 You are an expert MQL trading bot developer. Create a detailed, technical description for an Expert Advisor (EA) that will be used as input for an AI code generator. 979 980 Strategy: ${C} 981 Indicators Used: ${O} 982 983 Write a comprehensive description that includes ALL of these elements in a clear, technical format suitable for AI code generation: 984 985 1. **Strategy Overview**: Brief explanation of the core trading logic 986 2. **Entry Conditions**: Exactly when to open BUY and SELL positions using the specified indicators 987 3. **Exit Conditions**: When to close positions (take profit, stop loss, trailing stop) 988 4. **Risk Management**: Position sizing, maximum drawdown limits, daily loss limits 989 5. **Indicator Settings**: Specific periods and parameters for each indicator 990 6. **Timeframe**: Recommended chart timeframe for the strategy 991 7. **Currency Pairs**: Which pairs work best with this strategy 992 8. **Additional Features**: Any special features like news filter, time filter, etc. 993 994 Make it technical and specific enough that an AI can generate working MQL code from this description. 995 Focus on EXACT trading rules, not marketing language. 996 Include specific numeric parameters where possible. 997 Structure it as a clear, step-by-step trading algorithm. 998 999 Example format: 1000 "Create a [Strategy Name] EA that: 1001 - Opens BUY when [specific condition] 1002 - Opens SELL when [specific condition] 1003 - Uses [indicator] with period [X] 1004 - Sets Stop Loss at [X] pips 1005 - Sets Take Profit at [X] pips 1006 - Maximum risk per trade: [X]% 1007 - Works on [timeframe] timeframe 1008 - Best for [currency pairs]" 1009 1010 Keep it between 200-400 words and make it copy-paste ready for the MQL Generator. 1011 `;try{const L=await ka.InvokeLLM({prompt:D}),F=typeof L=="string"?L:L.description||"Description generated successfully";d(F),t("final")}catch(L){console.error("Error generating description:",L),g("Failed to generate description. Please try again.")}h(!1)},S=()=>{t("welcome"),n(null),s([]),l(""),d(""),g("")},k=()=>a.jsxs("div",{className:"text-center space-y-6",children:[a.jsxs("div",{className:"mb-6",children:[a.jsx("h3",{className:"text-xl font-bold text-white mb-3",children:"I can help you build your professional trading bot the easy way."}),a.jsx("p",{className:"text-indigo-200 text-sm",children:"Let's create your perfect EA step by step"})]}),a.jsxs(se,{onClick:()=>t("strategy"),className:"w-full bg-gradient-to-r from-cyan-500 to-blue-600 hover:from-cyan-600 hover:to-blue-700 text-white font-semibold py-4",children:[a.jsx(qo,{className:"h-5 w-5 mr-2"}),"Start Building My EA"]})]}),T=()=>a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"text-center mb-6",children:[a.jsx("h3",{className:"text-lg font-bold text-white mb-2",children:"Choose or write your Trading Strategy"}),a.jsx("p",{className:"text-indigo-200 text-sm",children:"Select a strategy or describe your custom approach"})]}),a.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:uRe.map(C=>a.jsxs("button",{onClick:()=>w(C),className:`p-3 rounded-lg border-2 text-left transition-all ${(r==null?void 0:r.id)===C.id?"border-cyan-400 bg-cyan-900/30 text-cyan-300":"border-indigo-700/50 bg-indigo-900/20 text-indigo-200 hover:border-indigo-500 hover:bg-indigo-900/40"}`,children:[a.jsx("div",{className:"font-semibold text-sm",children:C.name}),a.jsx("div",{className:"text-xs opacity-80 mt-1",children:C.description})]},C.id))}),a.jsxs("div",{className:"mt-6",children:[a.jsx("label",{className:"block text-sm font-medium text-indigo-200 mb-2",children:"Or describe your custom strategy:"}),a.jsx(Wn,{value:o,onChange:C=>l(C.target.value),placeholder:"Describe your custom trading strategy...",className:"bg-indigo-950/70 border-indigo-700 text-white",rows:3})]}),a.jsxs("div",{className:"flex flex-col sm:flex-row sm:justify-between gap-3 pt-4",children:[a.jsxs(se,{variant:"outline",onClick:S,className:"text-indigo-300 w-full sm:w-auto",children:[a.jsx(HS,{className:"h-4 w-4 mr-2"}),"Start Over"]}),a.jsxs(se,{onClick:()=>t("indicators"),disabled:!r&&!o.trim(),className:"bg-gradient-to-r from-cyan-500 to-blue-600 hover:from-cyan-600 hover:to-blue-700 w-full sm:w-auto",children:["Next: Choose Indicators",a.jsx(qo,{className:"h-4 w-4 ml-2"})]})]})]}),P=()=>a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"text-center mb-6",children:[a.jsx("h3",{className:"text-lg font-bold text-white mb-2",children:"Select Technical Indicators"}),a.jsx("p",{className:"text-indigo-200 text-sm",children:"Choose indicators that complement your strategy"}),i.length>0&&a.jsxs("p",{className:"text-cyan-400 text-xs mt-2",children:[i.length," selected"]})]}),a.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 max-h-64 overflow-y-auto",children:dRe.map(C=>{const O=i.find(D=>D.id===C.id);return a.jsxs("button",{onClick:()=>_(C),className:`p-3 rounded-lg border-2 text-left transition-all relative ${O?"border-cyan-400 bg-cyan-900/30 text-cyan-300":"border-indigo-700/50 bg-indigo-900/20 text-indigo-200 hover:border-indigo-500 hover:bg-indigo-900/40"}`,children:[O&&a.jsx(Eo,{className:"absolute top-2 right-2 h-4 w-4 text-cyan-400"}),a.jsx("div",{className:"font-semibold text-sm pr-6",children:C.name}),a.jsx("div",{className:"text-xs opacity-80 mt-1",children:C.description})]},C.id)})}),a.jsxs("div",{className:"flex flex-col sm:flex-row sm:justify-between gap-3 pt-4",children:[a.jsx(se,{variant:"outline",onClick:()=>t("strategy"),className:"text-indigo-300 w-full sm:w-auto",children:"Back to Strategy"}),a.jsx(se,{onClick:j,disabled:i.length===0||u,className:"bg-gradient-to-r from-cyan-500 to-blue-600 hover:from-cyan-600 hover:to-blue-700 w-full sm:w-auto",children:u?a.jsxs(a.Fragment,{children:[a.jsx(kt,{className:"h-4 w-4 mr-2 animate-spin"}),"Generating..."]}):a.jsxs(a.Fragment,{children:["Generate EA Description",a.jsx(qo,{className:"h-4 w-4 ml-2"})]})})]})]}),M=()=>a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"text-center",children:[a.jsx("h3",{className:"text-lg font-bold text-white mb-2",children:"Your EA Description for AI Bot Maker"}),a.jsx("p",{className:"text-indigo-200 text-sm",children:"Copy this description and paste it into the AI Bot Maker"})]}),a.jsxs("div",{className:"bg-black/30 rounded-lg p-4 border border-indigo-700 relative",children:[a.jsx("div",{className:"text-gray-200 text-sm whitespace-pre-line font-mono leading-relaxed",children:c}),a.jsx(se,{variant:"ghost",size:"sm",onClick:()=>{navigator.clipboard.writeText(c)},className:"absolute top-2 right-2 text-cyan-400 hover:text-cyan-300",children:"Copy Text"})]}),a.jsxs("div",{className:"bg-cyan-900/20 border border-cyan-700/50 rounded-lg p-4",children:[a.jsxs("h4",{className:"text-cyan-400 font-semibold mb-2 flex items-center",children:[a.jsx(Uk,{className:"h-4 w-4 mr-2"}),"How to Use This Description"]}),a.jsxs("ol",{className:"text-gray-300 text-sm space-y-1 list-decimal list-inside",children:[a.jsx("li",{children:"Copy the description above"}),a.jsx("li",{children:'Click "Create Your EA with AI Bot Maker" below'}),a.jsx("li",{children:"Paste the description in the strategy idea field"}),a.jsx("li",{children:"Select your platform (MT4/MT5)"}),a.jsx("li",{children:"Generate your professional trading bot"})]})]}),a.jsxs("div",{className:"space-y-3",children:[a.jsx("h4",{className:"text-white font-semibold",children:"Selected Configuration:"}),a.jsxs("div",{className:"flex flex-wrap gap-2",children:[r&&a.jsx("span",{className:"px-3 py-1 bg-cyan-900/50 text-cyan-300 rounded-full text-xs",children:r.name}),i.map(C=>a.jsx("span",{className:"px-3 py-1 bg-indigo-900/50 text-indigo-300 rounded-full text-xs",children:C.name},C.id))]})]}),a.jsxs("div",{className:"flex flex-col gap-3",children:[a.jsx(se,{asChild:!0,className:"w-full bg-gradient-to-r from-green-500 to-emerald-600 hover:from-green-600 hover:to-emerald-700 py-4",children:a.jsxs("a",{href:"https://robot4trade.com/MqlGenerator",target:"_blank",rel:"noopener noreferrer",children:[a.jsx(ss,{className:"h-5 w-5 mr-2"}),"Create Your EA with AI Bot Maker",a.jsx(Br,{className:"h-4 w-4 ml-2"})]})}),a.jsx(se,{asChild:!0,variant:"outline",className:"w-full border-amber-500 text-amber-400 hover:bg-amber-900/20 py-4",children:a.jsxs("a",{href:b,target:"_blank",rel:"noopener noreferrer",children:[a.jsx(Br,{className:"h-4 w-4 mr-2"}),"Open Trading Account with ",y]})}),a.jsxs(se,{variant:"ghost",onClick:S,className:"text-indigo-300 hover:text-white",children:[a.jsx(HS,{className:"h-4 w-4 mr-2"}),"Build Another EA"]})]})]});return a.jsxs(be,{className:"bg-gradient-to-br from-indigo-900 via-purple-900 to-blue-900 border-indigo-700 shadow-xl w-full",children:[a.jsxs(Be,{className:"p-4 md:p-6",children:[a.jsxs(qe,{className:"text-lg md:text-xl font-bold text-white flex items-center",children:[a.jsx(ln,{className:"h-5 w-5 md:h-6 md:w-6 mr-2 md:mr-3 text-cyan-400"}),"ProTrader AI Coach"]}),a.jsx("p",{className:"text-xs md:text-sm text-indigo-200",children:"Your personal EA building assistant"})]}),a.jsxs(Se,{className:"space-y-4 p-4 md:p-6",children:[e==="welcome"&&k(),e==="strategy"&&T(),e==="indicators"&&P(),e==="final"&&M(),m&&a.jsxs("p",{className:"text-xs md:text-sm text-red-400 flex items-center",children:[a.jsx(Ji,{className:"h-4 w-4 mr-2 flex-shrink-0"}),m]})]})]})}const rB=[{category:"FTMO & Prop Trading",questions:[{question:"How do I create a trading bot for FTMO challenges?",answer:"To create an FTMO-ready trading bot, navigate to the 'AI Bot Maker' section from the dashboard. Describe your FTMO-compliant strategy (following drawdown and daily loss limits), and our AI will generate optimized MQL code. The bot will include proper risk management and position sizing suitable for prop trading challenges."},{question:"Are the bots compatible with The5ers and other prop firms?",answer:"Yes! Our AI generates trading bots that can be customized for various prop trading firms including The5ers, FTMO, MyForexFunds, and others. The risk management parameters can be adju
1011sted to match each firm's specific rules and requirements."},{question:"What's the success rate for FTMO challenges using these bots?",answer:"Our AI-generated trading bots have helped over 800 traders pass their FTMO challenges with a 94% success rate when combined with proper risk management. However, past performance doesn't guarantee future results, and proper testing is always recommended."}]},{category:"AI & MQL Code Generation",questions:[{question:"How does the ChatGPT MQL generator work?",answer:"Our ChatGPT-powered system analyzes your trading strategy description and generates professional MQL4/MQL5 code. It includes proper error handling, risk management, and optimization parameters. The AI understands trading concepts and creates code that follows best practices for algorithmic trading."},{question:"Can I customize the generated MQL code?",answer:"Absolutely! After the AI generates your MQL code, you have full access to edit and customize it using our built-in code editor. You can modify parameters, add conditions, or enhance the strategy before downloading the final expert advisor."},{question:"Do I need programming knowledge to use the MQL generator?",answer:"No programming knowledge is required! Simply describe your trading strategy in plain English, and our AI will handle all the technical MQL coding. However, basic understanding of trading concepts will help you create better strategies."}]},{category:"Getting Started",questions:[{question:"What broker do you recommend for prop trading?",answer_template:"We recommend <a href='{broker_url}' target='_blank' rel='noopener noreferrer' class='text-cyan-400 hover:underline'>{broker_name}</a> as our preferred regulated broker for prop trading. They provide excellent conditions for FTMO and other prop firm challenges, with competitive spreads and reliable execution."},{question:"How long does it take to create a trading bot?",answer:"With our AI system, you can generate a complete trading bot in under 5 minutes! Describe your strategy, choose your platform (MT4/MT5), and our ChatGPT-powered generator will create professional MQL code instantly."},{question:"Can I share my successful FTMO bots with the community?",answer:"Yes! After creating a successful trading bot, you can share it with our community through the 'Free EAs' section. Many traders share their profitable strategies to help others succeed in prop trading challenges."}]},{category:"Technical & Platform",questions:[{question:"Which trading platforms are supported?",answer:"robot4trade supports MetaTrader 4 (MT4) and MetaTrader 5 (MT5) platforms, which are the standard platforms used by FTMO, The5ers, and most prop trading firms. Our AI generates optimized code for both platforms."},{question:"How do I install the bot on my MetaTrader?",answer:"After downloading your bot from robot4trade, open MetaTrader, go to 'File' > 'Open Data Folder', navigate to 'MQL4/Experts' (for MT4) or 'MQL5/Experts' (for MT5), copy your file there, and restart MetaTrader. Your bot will appear in the Navigator under 'Expert Advisors'."},{question:"Can I backtest the bots before using them live?",answer:"Yes! All our AI-generated bots are fully compatible with MetaTrader's Strategy Tester. We strongly recommend backtesting your strategies with historical data before using them in FTMO challenges or live prop trading accounts."}]}];function hRe(){const[e,t]=A.useState(""),[r,n]=A.useState({"Getting Started":!0}),[i,s]=A.useState({}),[o,l]=A.useState(rB);A.useEffect(()=>{(async()=>{const m=await On.getConfig("broker_signup_url","https://www.switchmarkets.com/signup?lid=6603&pid=107341"),g=await On.getConfig("broker_name","Switch Markets"),b=rB.map(v=>({...v,questions:v.questions.map(y=>y.answer_template?{...y,answer:y.answer_template.replace("{broker_url}",m).replace(new RegExp("{broker_name}","g"),g)}:y)}));l(b)})()},[]);const c=h=>{n(m=>({...m,[h]:!m[h]}))},d=h=>{s(m=>({...m,[h]:!m[h]}))},u=e.trim()===""?o:o.map(h=>({...h,questions:h.questions.filter(m=>m.question.toLowerCase().includes(e.toLowerCase())||m.answer&&m.answer.toLowerCase().includes(e.toLowerCase()))})).filter(h=>h.questions.length>0);return te.useEffect(()=>{if(e.trim()!==""){const h={},m={};u.forEach(g=>{h[g.category]=!0,g.questions.forEach((b,v)=>{const y=`${g.category}-${v}`;m[y]=!0})}),n(h),s(m)}else n({"Getting Started":!0}),s({})},[e,u]),a.jsxs(be,{className:"bg-gradient-to-br from-gray-800 to-gray-850 border-gray-700 shadow-lg",children:[a.jsx(Be,{className:"pb-2 border-b border-gray-700",children:a.jsxs(qe,{className:"text-xl font-bold text-white flex items-center",children:[a.jsx(BS,{className:"h-5 w-5 mr-2 text-cyan-400"}),"Frequently Asked Questions"]})}),a.jsxs(Se,{className:"pt-4",children:[a.jsxs("div",{className:"relative mb-6",children:[a.jsx(al,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400"}),a.jsx(Je,{type:"search",placeholder:"Search FAQ...",className:"pl-10 bg-gray-900 border-gray-700 text-white",value:e,onCh
1011ange:h=>t(h.target.value)})]}),a.jsx("div",{className:"space-y-4 max-h-[600px] overflow-y-auto pr-2",children:u.length>0?u.map((h,m)=>h.questions.length>0&&a.jsxs("div",{className:"border border-gray-700 rounded-lg overflow-hidden",children:[a.jsxs("div",{className:"bg-gray-900/50 px-4 py-3 flex justify-between items-center cursor-pointer",onClick:()=>c(h.category),children:[a.jsx("h3",{className:"font-semibold text-white",children:h.category}),r[h.category]?a.jsx(Hh,{className:"h-5 w-5 text-gray-400"}):a.jsx(Zi,{className:"h-5 w-5 text-gray-400"})]}),r[h.category]&&a.jsx("div",{className:"px-4 py-2 bg-gray-900/20",children:h.questions.map((g,b)=>{const v=`${h.category}-${b}`;return a.jsxs("div",{className:"py-3 border-b border-gray-700/50 last:border-b-0",children:[a.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>d(v),children:[a.jsx("h4",{className:"font-medium text-gray-300",children:g.question}),i[v]?a.jsx(Hh,{className:"h-4 w-4 flex-shrink-0 text-gray-400"}):a.jsx(Zi,{className:"h-4 w-4 flex-shrink-0 text-gray-400"})]}),i[v]&&a.jsx("div",{className:"mt-2 text-gray-400 text-sm prose prose-sm prose-invert max-w-none",dangerouslySetInnerHTML:{__html:g.answer}})]},b)})})]},m)):a.jsxs("div",{className:"text-center py-8",children:[a.jsx(BS,{className:"h-12 w-12 mx-auto text-gray-600 mb-3"}),a.jsx("p",{className:"text-gray-400",children:"No FAQ items match your search. Try different keywords."})]})})]})]})}function mRe({title:e,description:t,keywords:r,canonical:n,ogImage:i,ogType:s="website",author:o="robot4trade",publishedTime:l,modifiedTime:c,section:d,tags:u=[],structuredData:h,noindex:m=!1,nofollow:g=!1}){const b="https://gpt4trade.com",v="robot4trade - AI Trading Bot Creator",y="https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/cbd7c9_3D-1175.png",x=e?`${e} | robot4trade`:"robot4trade - AI MQL Trading Bot Generator with ChatGPT",w=n?`${b}${n}`:b,_=i||y;return A.useEffect(()=>{document.title=x;const j=(O,D,L=!1)=>{if(!D)return;const F=L?"property":"name";let U=document.querySelector(`meta[${F}="${O}"]`);U||(U=document.createElement("meta"),U.setAttribute(F,O),document.head.appendChild(U)),U.setAttribute("content",D)},S=(O,D)=>{let L=document.querySelector(`link[rel="${O}"]`);L||(L=document.createElement("link"),L.setAttribute("rel",O),document.head.appendChild(L)),L.setAttribute("href",D)};j("title",x),j("description",t),r&&j("keywords",r),j("author",o);const k=m||g?`${m?"noindex":"index"},${g?"nofollow":"follow"}`:"index,follow,max-snippet:-1,max-image-preview:large,max-video-preview:-1";j("robots",k),j("googlebot",k),S("canonical",w),j("og:type",s,!0),j("og:url",w,!0),j("og:title",x,!0),j("og:description",t,!0),j("og:image",_,!0),j("og:image:width","1200",!0),j("og:image:height","630",!0),j("og:site_name",v,!0),j("og:locale","en_US",!0),s==="article"&&l&&j("article:published_time",l,!0),s==="article"&&c&&j("article:modified_time",c,!0),s==="article"&&d&&j("article:section",d,!0),j("twitter:card","summary_large_image"),j("twitter:url",w),j("twitter:title",x),j("twitter:description",t),j("twitter:image",_),j("twitter:creator","@robot4trade"),j("language","English"),j("revisit-after","7 days"),j("distribution","global"),j("rating","general"),j("viewport","width=device-width, initial-scale=1, maximum-scale=5"),j("mobile-web-app-capable","yes"),j("apple-mobile-web-app-capable","yes");const T={"@context":"https://schema.org","@type":"SoftwareApplication",name:"robot4trade AI Trading Bot Generator",applicationCategory:"FinanceApplication",operatingSystem:"Web",offers:{"@type":"Offer",price:"0",priceCurrency:"USD"},aggregateRating:{"@type":"AggregateRating",ratingValue:"4.8",ratingCount:"1247"},description:t||"Create professional MQL4/MQL5 trading bots with AI.",url:w,image:_,author:{"@type":"Organization",name:"robot4trade",url:b}},P={"@context":"https://schema.org","@type":"Organization",name:"robot4trade",url:b,logo:y,sameAs:["https://t.me/robot4trade","https://www.robot4trade.com"]},M=n?{"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:b},{"@type":"ListItem",position:2,name:e,item:w}]}:null,C=(O,D)=>{let L=document.getElementById(O);L||(L=document.createElement("script"),L.id=O,L.type="application/ld+json",document.head.appendChild(L)),L.textContent=JSON.stringify(D)};return C("structured-data-base",h||T),C("structured-data-org",P),M&&C("structured-data-breadcrumb",M),()=>{}},[e,t,r,n,i,s,o,l,c,d,u,h,m,g,x,w,_,b,y]),null}const pRe={home:{title:"AI MQL Trading Bot Generator - Create FTMO Bots with ChatGPT",description:"Create professional MQL4/MQL5 trading bots with AI. Generate FTMO-compliant expert advisors for prop trading success. Free AI-
1011powered bot maker with strategy analysis.",keywords:"FTMO bot, AI trading bot, MQL generator, ChatGPT trading, prop trading EA, expert advisor, trading robot, FTMO challenge, The5ers bot, AI for MQL, automated trading",canonical:"/",structuredData:{"@type":"WebSite",potentialAction:{"@type":"SearchAction",target:"https://gpt4trade.com/search?q={search_term_string}","query-input":"required name=search_term_string"}}}};function gRe({faqs:e}){return A.useEffect(()=>{const t={"@context":"https://schema.org","@type":"FAQPage",mainEntity:e.map(n=>({"@type":"Question",name:n.question,acceptedAnswer:{"@type":"Answer",text:n.answer}}))};let r=document.getElementById("faq-schema");return r||(r=document.createElement("script"),r.id="faq-schema",r.type="application/ld+json",document.head.appendChild(r)),r.textContent=JSON.stringify(t),()=>{}},[e]),null}function yRe({name:e,description:t,image:r,price:n=0,rating:i=4.8,reviewCount:s=1247,features:o=[]}){return A.useEffect(()=>{const l={"@context":"https://schema.org","@type":"SoftwareApplication",name:e,description:t,image:r,applicationCategory:"FinanceApplication",operatingSystem:"Web Browser",offers:{"@type":"Offer",price:n,priceCurrency:"USD",availability:"https://schema.org/InStock"},aggregateRating:{"@type":"AggregateRating",ratingValue:i,ratingCount:s,bestRating:"5",worstRating:"1"},featureList:o};let c=document.getElementById("product-schema");return c||(c=document.createElement("script"),c.id="product-schema",c.type="application/ld+json",document.head.appendChild(c)),c.textContent=JSON.stringify(l),()=>{}},[e,t,r,n,i,s,o]),null}function vRe(){const[e,t]=A.useState(!1),[r,n]=A.useState(null),[i,s]=A.useState("https://www.youtube.com/watch?v=GXbt5zvpHGs"),[o,l]=A.useState(!1);A.useEffect(()=>{d(),c()},[]);const c=async()=>{try{const h=await On.getConfig("dashboard_tutorial_video_url","https://www.youtube.com/watch?v=GXbt5zvpHGs");s(h)}catch(h){console.error("Error loading dashboard video configuration:",h)}},d=async()=>{try{const h=await je.User.me();t(!0),n(h)}catch{t(!1),n(null)}},u=[{question:"How do I create an FTMO trading bot with AI?",answer:"Click 'Create FTMO Bot with AI', describe your strategy (e.g., trend-following with EMA crossovers), and our ChatGPT-powered generator creates a complete MQL4/MQL5 expert advisor in seconds with proper risk management and FTMO compliance."},{question:"Are the AI-generated bots compliant with FTMO rules?",answer:"Yes! Our AI generator creates expert advisors with built-in risk management, maximum drawdown protection, and trading rules that comply with FTMO, The5ers, and other prop trading firms' requirements."},{question:"Can I customize the generated trading robots?",answer:"Absolutely! After generation, you can edit the MQL code directly in our editor, adjust parameters, add indicators, and modify the strategy to match your exact requirements."},{question:"Do I need programming knowledge to use this?",answer:"No! Simply describe your trading strategy in plain English, and our AI handles all the complex MQL programming. However, basic trading knowledge is recommended for optimal results."},{question:"What platforms are supported?",answer:"We support MetaTrader 4 (MT4), MetaTrader 5 (MT5), and cTrader platforms. Choose your platform and get properly formatted code ready to compile and use immediately."}];return a.jsxs(a.Fragment,{children:[a.jsx(mRe,{...pRe.home}),a.jsx(yRe,{name:"robot4trade AI Trading Bot Generator",description:"Create professional FTMO-compliant trading bots with AI. Generate MQL4/MQL5 expert advisors using ChatGPT technology.",image:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/cbd7c9_3D-1175.png",price:0,rating:4.8,reviewCount:1247,features:["AI-Powered Code Generation","FTMO Compliance Built-in","500+ Line Complete EAs","Strategy Analysis & Scoring","MT4/MT5/cTrader Support","Free Community EAs"]}),a.jsx(gRe,{faqs:u}),a.jsxs("div",{className:"p-4 sm:p-6 lg:p-8 max-w-7xl mx-auto",children:[a.jsxs("header",{className:"mb-8 text-center",children:[a.jsx("h1",{className:"text-2xl sm:text-3xl md:text-4xl font-bold text-white mb-3",children:"Create FTMO-Ready Trading Bots with AI"}),a.jsx("p",{className:"text-base sm:text-lg text-indigo-300 max-w-3xl mx-auto",children:"Build professional Expert Advisors for prop trading success with The5ers, FTMO, and other firms using our AI-powered platform."})]}),a.jsxs("div",{className:"hidden","aria-hidden":"true",children:[a.jsx("h2",{children:"FTMO Bot Creator - How to Pass FTMO & Prop Trading Challenges"}),a.jsx("p",{children:"Our AI trading platform helps traders create profitable expert advisors for FTMO challenges and prop trading firms like The5ers. Learn how to pass FTMO, generate MQL code with ChatGPT assistance, build algorithmic trading strategies, and join thousands of successful prop traders."}),a.jsx("h3",{children:"Key Features for FTMO Bots & The5ers EAs:"}),a.jsxs("ul",{children:[a.jsx("li",{children:"AI-powered FTMO Bot generation with ChatGPT"}),a.jsx("li",{children:"Strategies for how to pass FTMO challenges"}),a.jsx("li",{children:"Custom The5ers EA creation with proper risk management"}),a.jsx("li",{children:"Prop trading algorithms for top firms"}),a.jsx("li",{children:"Automated expert advisor creation in minutes"}),a.jsx("li",{children:"Risk management compliant with prop trading rules"}
1011),a.jsx("li",{children:"500+ line professional code generation"}),a.jsx("li",{children:"Strategy analysis and quality scoring"})]}),a.jsx("h3",{children:"Why Choose robot4trade for FTMO Bots?"}),a.jsx("p",{children:"Unlike other MQL generators, robot4trade uses advanced ChatGPT AI to analyze your strategy, provide optimization suggestions, and generate complete, production-ready expert advisors. Our platform includes strategy templates specifically designed for FTMO challenges, ensuring compliance with all prop trading rules while maximizing profit potential."}),a.jsx("h3",{children:"Supported Trading Platforms:"}),a.jsxs("ul",{children:[a.jsx("li",{children:"MetaTrader 4 (MT4) - Full MQL4 support"}),a.jsx("li",{children:"MetaTrader 5 (MT5) - Complete MQL5 implementation"}),a.jsx("li",{children:"cTrader - cBot generation"})]})]}),a.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-3 gap-6 mb-8",children:[a.jsx("div",{className:"xl:col-span-2",children:a.jsx(fRe,{})}),a.jsxs("div",{className:"space-y-6",children:[a.jsxs(be,{className:"bg-gray-800 border-gray-700 shadow-lg",children:[a.jsx(Be,{className:"pb-3",children:a.jsx(qe,{className:"text-lg font-bold text-white",children:"Get Started"})}),a.jsxs(Se,{className:"space-y-3",children:[a.jsx(se,{asChild:!0,className:"w-full bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-700 hover:to-blue-700 py-3",children:a.jsxs(pt,{to:Ve("MqlGenerator"),className:"flex items-center justify-center",children:[a.jsx(_i,{className:"h-5 w-5 mr-2"}),"Create FTMO Bot with AI"]})}),a.jsx(se,{asChild:!0,variant:"outline",className:"w-full border-indigo-500/50 text-indigo-300 hover:text-indigo-200 hover:bg-indigo-900/30 py-3",children:a.jsxs(pt,{to:Ve("Community"),className:"flex items-center justify-center",children:[a.jsx(pr,{className:"h-5 w-5 mr-2"}),"Free Prop Trading EAs"]})}),a.jsx(se,{asChild:!0,className:"w-full bg-blue-500 hover:bg-blue-600 text-white py-3",children:a.jsxs("a",{href:"https://t.me/robot4trade",target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center",children:[a.jsx(Bd,{className:"h-5 w-5 mr-2"}),"Join FTMO Traders Group"]})})]})]}),a.jsxs(be,{className:"bg-gray-800 border-gray-700 shadow-lg",children:[a.jsx(Be,{className:"pb-3",children:a.jsxs(qe,{className:"text-base font-bold text-white flex items-center",children:[a.jsx(er,{className:"h-4 w-4 mr-2 text-yellow-400"}),"Quick Tutorial"]})}),a.jsx(Se,{className:"p-0",children:a.jsx("div",{className:"aspect-video w-full overflow-hidden rounded-b-lg",children:Ak(i)?a.jsx("iframe",{src:Ak(i),className:"w-full h-full",title:"How to Create FTMO Trading Bots with AI - robot4trade Tutorial",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,loading:"lazy"}):a.jsx("div",{className:"w-full h-full flex items-center justify-center bg-black/30 text-gray-400 p-4 text-center text-sm",children:"Invalid video URL. Check Admin Panel â App Configuration â UI Settings."})})})]})]})]}),a.jsx("section",{"aria-label":"Platform Statistics",children:a.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4 mb-8",children:[{title:"FTMO Bots Created",value:"1,200+",icon:_i,color:"text-cyan-400",description:"AI-generated expert advisors"},{title:"Prop Trading EAs",value:"500+",icon:pr,color:"text-purple-400",description:"Community shared robots"},{title:"AI Success Rate",value:"94%",icon:er,color:"text-yellow-400",description:"Code generation quality"},{title:"FTMO Passes",value:"800+",icon:Qr,color:"text-green-400",description:"Successful prop traders"}].map((h,m)=>a.jsxs(be,{className:"bg-gray-800 border-gray-700 shadow-lg text-center p-3 sm:p-4",children:[a.jsx(h.icon,{className:`h-6 w-6 sm:h-8 sm:w-8 mx-auto mb-2 ${h.color}`,"aria-hidden":"true"}),a.jsx("h3",{className:"font-bold text-white text-lg sm:text-xl",children:h.value}),a.jsx("p",{className:"text-xs sm:text-sm text-gray-400",children:h.title}),a.jsx("span",{className:"sr-only",children:h.description})]},m))})}),a.jsx("section",{"aria-label":"Frequently Asked Questions",children:a.jsx(hRe,{})}),!e&&a.jsxs(be,{className:"bg-gradient-to-r from-gray-800 to-indigo-900 border-indigo-500/20 text-center p-6 sm:p-8",children:[a.jsx("h2",{className:"text-xl sm:text-2xl font-bold text-white mb-3",children:"Ready to Pass Your FTMO Challenge?"}),a.jsx("p",{className:"text-gray-300 mb-6 max-w-2xl mx-auto",children:"Join 1,200+ traders using AI-
1011powered bots for prop trading success"}),a.jsxs(se,{size:"lg",onClick:()=>je.User.login(),className:"bg-gradient-to-r from-cyan-500 to-blue-600 hover:from-cyan-600 hover:to-blue-700 px-6 text-base sm:px-8 sm:text-lg",children:["Start Creating FTMO Bots",a.jsx(qo,{className:"h-5 w-5 ml-2"})]})]})]})]})}function xRe(){return a.jsxs("div",{className:"container mx-auto p-4 md:p-6 lg:p-8 max-w-5xl space-y-8",children:[a.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[a.jsx(Ya,{className:"h-12 w-12"}),a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-bold text-white",children:"Legal Disclaimer"}),a.jsx("p",{className:"text-gray-400",children:"Important information about using robot4trade services and products"})]})]}),a.jsxs(be,{className:"bg-gray-800 border-gray-700",children:[a.jsx(Be,{children:a.jsxs(qe,{className:"text-white flex items-center gap-2",children:[a.jsx(Ar,{className:"h-5 w-5 text-red-400"}),"Risk Disclaimer & Terms of Use"]})}),a.jsxs(Se,{className:"space-y-6 text-gray-300",children:[a.jsxs("div",{className:"p-4 bg-red-900/20 border border-red-900 rounded-lg mb-6",children:[a.jsxs("p",{className:"text-red-400 font-medium flex items-center gap-2",children:[a.jsx(Ji,{className:"h-5 w-5"}),"High Risk Warning"]}),a.jsx("p",{className:"mt-2 text-sm",children:"Trading foreign exchange, cryptocurrencies, and other financial instruments carries a high level of risk and may not be suitable for all investors. Before deciding to trade, you should carefully consider your investment objectives, level of experience, and risk appetite."})]}),a.jsxs("section",{className:"space-y-3",children:[a.jsx("h3",{className:"text-lg font-medium text-white",children:"Trading Risks"}),a.jsx("p",{children:"The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading, and seek advice from an independent financial advisor if you have any doubts."})]}),a.jsxs("section",{className:"space-y-3",children:[a.jsx("h3",{className:"text-lg font-medium text-white",children:"Expert Advisor Disclaimer"}),a.jsx("p",{children:"All Expert Advisors (EAs), trading robots, signals, and other trading tools provided through robot4trade.com:"}),a.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[a.jsx("li",{children:'Are provided "as is" without any guarantees or warranties'}),a.jsx("li",{children:"May not produce the same results on your trading account as shown in backtests or demonstrations"}),a.jsx("li",{children:"Should be thoroughly tested on a demo account before real money trading"}),a.jsx("li",{children:"Past performance is not indicative of future results"}),a.jsx("li",{children:"May require adjustments to parameters based on your broker and trading conditions"})]})]}),a.jsxs("section",{className:"space-y-3",children:[a.jsx("h3",{className:"text-lg font-medium text-white",children:"No Financial Advice"}),a.jsx("p",{children:"The information provided on robot4trade.com is for general information purposes only. It is not intended as financial advice and should not be construed as such. We do not recommend specific trading strategies, instruments, or time frames."})]}),a.jsxs("section",{className:"space-y-3",children:[a.jsx("h3",{className:"text-lg font-medium text-white",children:"Limitation of Liability"}),a.jsx("p",{children:"robot4trade.com, its owners, employees, partners, or affiliates shall not be held liable for any losses, damages, or costs arising from the use of our services, including but not limited to:"}),a.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[a.jsx("li",{children:"Trading losses resulting from using our EAs or following our signals"}),a.jsx("li",{children:"Technical issues or failures of our platform or trading robots"}),a.jsx("li",{children:"Delays in data transmission or execution"}),a.jsx("li",{children:"Loss of data or trading opportunities"}),a.jsx("li",{children:"Any indirect, special, incidental, or consequential damages"})]})]}),a.jsxs("section",{className:"space-y-3",children:[a.jsx("h3",{className:"text-lg font-medium text-white",children:"Intellectual Property Rights"}),a.jsx("p",{children:"All EAs, content, and materials provided through our platform are protected by copyright and other intellectual property laws. Users are granted a limited, non-exclusive license to use these materials for personal trading purposes only and may not:"}),a.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[a.jsx("li",{children:"Redistribute, sell, or share the EAs or content with third parties"}),a.jsx("li",{children:"Modify, decompile, or reverse engineer the code"}),a.jsx("li",{children:"Remove any copyright notices or attributions"})]})]}),a.jsxs("section",{className:"space-y-3",children:[a.jsx("h3",{className:"text-lg font-medium text-white",children:"Community Guidelines"}),a.jsx("p",{children:"When participating in our forums and community areas, users agree to:"}),a.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[a.jsx("li",{children:"Maintain respectful communication with other users and staff"}),a.jsx("li",{children:"Refrain from posting offensive, discriminatory, or inappropriate content"}),a.jsx("li",{children:"Avoid spam, excessive self-promotion, and irrelevant content"}),a.jsx("li",{children:"Not share login credentials or account information"}),a.jsx("li",{children:"Report any violations or concerns to the moderation team"})]})]}),a.jsxs("section",{className:"space-y-3",children:[a.jsx("h3",{className:"text-lg font-medium text-white",children:"Governing Law"}),a.jsx("p",{children:"These terms and your use of robot4trade.com shall be governed by and construed in accordance with applicable international laws, without regard to conflicts of law principles."})]}),a.jsxs("section",{className:"space-y-3",children:[a.jsx("h3",{className:"text-lg font-medium text-white",children:"Changes to Terms"}),a.jsx("p",{children:"We reserve the right to modify these terms at any time. Users are encouraged to review this disclaimer peri
1011odically for any changes. Your continued use of the platform constitutes acceptance of the updated terms."})]}),a.jsxs("div",{className:"pt-4 border-t border-gray-700 flex justify-between items-center",children:[a.jsxs("p",{className:"text-sm text-gray-400",children:["Last Updated: ",new Date().toLocaleDateString()]}),a.jsx(se,{asChild:!0,className:"bg-cyan-600 hover:bg-cyan-700",children:a.jsx(pt,{to:Ve("Dashboard"),children:"Return to Dashboard"})})]})]})]})]})}function bRe(){const[e,t]=A.useState(!0),[r,n]=A.useState(null),[i,s]=A.useState(!1),[o,l]=A.useState(null),c="682989edff3a8269eeeefa50";A.useEffect(()=>{d()},[]);const d=async()=>{t(!0),n(null),s(!1);try{try{const u=await je.ForumTopic.get(c);l(u),console.log("Successfully fetched topic data:",u)}catch(u){console.error("Error fetching the topic:",u),n("Could not fetch the topic. It may have been deleted."),t(!1);return}try{await je.ForumTopic.update(c,{category_id:null}),console.log("Successfully updated topic with null category_id");const u=await je.ForumTopic.get(c);l(u),s(!0)}catch(u){console.error("Error updating the topic:",u),n("Failed to update the topic's category_id. "+u.message)}}catch(u){console.error("Unexpected error in fixTopic:",u),n("An unexpected error occurred: "+u.message)}t(!1)};return e?a.jsxs("div",{className:"flex flex-col items-center justify-center h-[50vh]",children:[a.jsx(kt,{className:"h-12 w-12 animate-spin text-cyan-500 mb-4"}),a.jsx("p",{className:"text-white",children:"Fixing problematic topic data..."})]}):a.jsxs(be,{className:"max-w-lg mx-auto mt-8 bg-gray-800 border-gray-700",children:[a.jsx(Be,{children:a.jsxs(qe,{className:"text-white flex items-center gap-2",children:[i?a.jsx(Eo,{className:"h-5 w-5 text-green-500"}):a.jsx(Lt,{className:"h-5 w-5 text-red-500"}),"Topic Data Fix Utility"]})}),a.jsxs(Se,{className:"space-y-4",children:[r?a.jsx("div",{className:"bg-red-900/20 text-red-400 p-4 rounded-md",children:r}):i?a.jsx("div",{className:"bg-green-900/20 text-green-400 p-4 rounded-md",children:"Successfully fixed the problematic topic. The category_id field has been set to null."}):null,a.jsxs("div",{className:"space-y-2",children:[a.jsx("h3",{className:"text-white font-medium",children:"Topic Details:"}),o?a.jsxs("div",{className:"bg-gray-900 p-3 rounded-md",children:[a.jsxs("p",{children:[a.jsx("span",{className:"text-gray-400",children:"ID:"})," ",a.jsx("span",{className:"text-white",children:o.id})]}),a.jsxs("p",{children:[a.jsx("span",{className:"text-gray-400",children:"Title:"})," ",a.jsx("span",{className:"text-white",children:o.title})]}),a.jsxs("p",{children:[a.jsx("span",{className:"text-gray-400",children:"Category ID:"})," ",a.jsx("span",{className:"text-white",children:o.category_id||"null"})]})]}):a.jsx("p",{className:"text-gray-400",children:"No topic details available."})]}),a.jsx("div",{className:"flex justify-end",children:a.jsx(se,{onClick:()=>window.history.back(),className:"bg-cyan-600 hover:bg-cyan-700",children:"Return to Previous Page"})})]})]})}const wRe=({category:e})=>a.jsx(be,{className:"bg-gray-800 border-gray-700 hover:border-cyan-500/50 transition-all duration-300",children:a.jsxs(Se,{className:"p-4",children:[a.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start gap-4",children:[a.jsxs("div",{className:"flex-1",children:[a.jsx(pt,{to:Ve("ForumCategoryView?id="+e.id+"&slug="+e.slug),className:"block",children:a.jsx("h3",{className:"text-lg font-semibold text-cyan-400 hover:text-cyan-300 mb-1",children:e.name})}),a.jsx("p",{className:"text-sm text-gray-400 line-clamp-2",children:e.description})]}),a.jsxs("div",{className:"flex sm:flex-col items-end sm:items-center gap-4 sm:gap-1 text-sm text-gray-400 w-full sm:w-auto mt-2 sm:mt-0",children:[a.jsxs("div",{className:"flex items-center gap-1",title:"Topics",children:[a.jsx(pr,{className:"h-4 w-4"}),a.jsx("span",{children:e.topic_count||0})]}),a.jsxs("div",{className:"flex items-center gap-1",title:"Posts",children:[a.jsx(la,{className:"h-4 w-4"}),a.jsx("span",{children:e.post_count||0})]})]})]}),e.last_post_info&&e.last_post_info.topic_title&&a.jsxs("div",{className:"mt-3 pt-3 border-t border-gray-700/50 text-xs text-gray-500",children:[a.jsxs("p",{className:"truncate",children:["Last post in: ",a.jsx(pt,{to:Ve("ForumTopicView?id="+e.last_post_info.topic_id),className:"text-cyan-500 hover:underline",children:e.last_post_info.topic_title})]}),a.jsxs("p",{children:["by ",e.last_post_info.user_name," ⢠",Mn(new Date(e.last_post_info.timestamp),{addSuffix:!0})]})]})]})});function jRe(){const[e,t]=A.useState([]),[r,n]=A.useState(!0),[i,s]=A.useState(""),[o,l]=A.useState(null);A.useEffect(()=>{c(),je.User.me().then(l).catch(()=>l(null))},[]);const c=async()=>{n(!0);try{const u=await je.ForumCategory.list("-order");t(u)}catch(u){console.error("Error fetching forum categories:",u),t([{id:"cat1",name:"EA Development & MQL",description:"Discuss MQL4/MQL5 coding, EA building, and debugging",slug:"ea-development-mql",topic_count:1,post_count:1},{id:"cat2",name:"Strategy Exchange",description:"Share and discuss trading strategies",slug:"strategy-exchange",topic_count:0,post_count:0},{id:"cat3",name:"General Discussion",description:"Talk about general trading topics",slug:"general-discussion",topic_count:0,post_count:0}])}n(!1)},d=e.filter(u=>u.name.toLowerCase().includes(i.toLowerCase())||u.description.toLowerCase().includes(i.toLowerCase()));return a.jsx(XK,{onRefresh:c,children:a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-start md:items-center gap-4",children:[a.jsxs("h1",{className:"text-3xl font-bold text-white flex items-center",children:[a.jsx(pr,{className:"h-8 w-8 mr-3 text-cyan-400"}),"Community Forum"]}),a.jsx("div",{className:"flex gap-2",children:o&&a.jsx(pt,{to:Ve("ForumNewTopic"),children:a.jsxs(se,{className:"bg-gradient-to-r from-cyan-500 to-blue-500 hover:from-cyan-600 hover:to-blue-600",children:[a.jsx(Ch,{className:"h-5 w-5 mr-2"}),"New Topic"]})})})]}),a.jsxs("div",{className:"relative",children:[a.jsx(al,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-5 w-5 text-gray-500"}),a.jsx(Je,{type:"text",placeholder:"Search categories...",value:i,onChange:u=>s(u.target.value),className:"pl-10 pr-4 py-2 w-full bg-gray-800 border-gray-700 rounded-md text-white"})]}),r?a.jsx("div",{className:"flex justify-center items-center py-10",children:a.jsx(kt,{className:"h-8 w-8 animate-spin text-cyan-500"})}):d.length===0?a.jsxs("div",{className:"text-center py-10 bg-gray-800 rounded-lg",children:[a.jsx(pr,{className:"h-16 w-16 mx-auto text-gray-600 mb-4"}),a.jsx("h3",{className:"text-xl font-medium text-gray-300",children:"No Categories Found"}),a.jsx("p",{className:"text-gray-400 mt-2",children:"It seems there are no forum categories matching your search, or no categories have been created yet."})]}):a.jsx("div",{className:"space-y-4",children:d.map(u=>a.jsx(wRe,{category:u},u.id||u.slug))}),!o&&a.jsx("div",{className:"bg-gray-800 border border-gray-700 rounded-lg p-4 text-center",children:a.jsxs("p",{className:"text-gray-400",children:["Want to participate in discussions?"," ",a.jsx(se,{variant:"link",className:"p-0 h-auto text-cyan-400",onClick:()=>je.User.login(),children:"Sign In"})," ","to start posting."]})})]})})}const NRe="682989edff3a8269eeeefa50",nB=e=>{var t;return e?e.nickname&&e.nickname.trim()!==""?e.nickname.trim():(t=e.privacy_settings)!=null&&t.show_real_name&&e.full_name&&e.full_name.trim()!==""?e.full_name.trim():e.email?e.email.split("@")[0]:"User":"User"},_Re=te.memo(({topic:e,authorDisplayName:t,lastReplyUserDisplayName:r})=>{const n=e.is_pinned,i=`flex flex-col sm:flex-row items-start sm:items-center justify-between p-4 gap-3 hover:bg-gray-700/30 transition-colors duration-150 ${n?"bg-cyan-900/10 border-l-4 border-cyan-600":"border-b border-gray-700"}`;return a.jsxs("div",{className:i,children:[a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[n&&a.jsx($B,{className:"h-4 w-4 text-cyan-400 flex-shrink-0"}),a.jsx(pt,{to:Ve(`ForumTopicView?id=${e.id}&slug=${e.slug}`),className:"text-base sm:text-lg font-medium text-cyan-400 hover:text-cyan-300 truncate block",title:e.title,children:e.title})]}),a.jsxs("div",{className:"text-xs text-gray-400 flex items-center gap-2 flex-wrap",children:[a.jsxs("span",{children:["Started by "," ",a.jsx("span",{className:"font-medium text-gray-300",children:t||"User"})]}),a.jsxs("span",{children:["⢠",Mn(new Date(e.created_date),{addSuffix:!0})]}),e.tags&&e.tags.length>0&&a.jsx("div",{className:"flex gap-1 mt-1 sm:mt-0",children:e.tags.slice(0,3).map(s=>a.jsx(Oe,{variant:"outline",className:"text-xs py-0 px-1.5 border-gray-600 text-gray-400",children:s},s))})]})]}),a.jsxs("div",{className:"flex items-center gap-4 text-sm text-gray-400 w-full sm:w-auto justify-between sm:justify-end mt-2 sm:mt-0",children:[a.jsxs("div",{className:"flex items-center gap-4",children:[a.jsxs("div",{className:"flex flex-col items-center",title:"Replies",children:[a.jsx("span",{className:"font-semibold text-white",children:e.reply_count||0}),a.jsx("span",{className:"text-xs",children:"Replies"})]}),a.jsxs("div",{className:"flex flex-col items-center",title:"Views",children:[a.jsx("span",{className:"font-semibold text-white",children:e.view_count||0}),a.jsx("span",{className:"text-xs",children:"Views"})]})]}),e.last_reply_info&&e.last_reply_info.timestamp?a.jsxs("div",{className:"text-right sm:text-left min-w-[150px] sm:min-w-[200px] pl-4 border-l border-gray-700/50",children:[a.jsxs("p",{className:"text-xs text-gray-300 truncate",title:`Last reply by ${r||"User"}`,children:["by ",a.jsx("span",{className:"font-medium",children:r||"User"})]}),a.jsx("p",{className:"text-xs text-gray-500",children:Mn(new Date(e.last_reply_info.timestamp),{addSuffix:!0})})]}):a.jsx("div",{className:"text-right sm:text-left min-w-[150px] sm:min-w-[200px] pl-4 border-l border-gray-700/50",children:a.jsx("p",{className:"text-xs text-gray-500",children:"No replies yet"})})]})]})});function SRe(){const[e,t]=A.useState(null),[r,n]=A.useState([]),[i,s]=A.useState(!0),[o,l]=A.useState(null),c=os(),d=Hd(),[u,h]=A.useState(null),m=A.useMemo(()=>new URLSearchParams(c.search).get("id"),[c.search]),g=A.useCallback(async b=>{var v;if(s(!0),l(null),!b||typeof b!="string"||b.length<10){l("Invalid or missing category ID."),s(!1);return}try{let y;if(b===NRe){l("This category ID is known to cause issues and cannot be loaded."),s(!1);return}try{y=await je.ForumCategory.get(b),t(y)}catch(M){console.error("Error fetching category details:",M);const C=(v=M.response)==null?void 0:v.status;l(C===404?"The category you're looking for was not found. It may have been deleted.":"An error occurred while loading the category. Please try again later."),t(null),n([]),s(!1);return}const w=(await je.ForumTopic.filter({category_id:b},"-created_date")).sort((M,C)=>M.is_pinned&&!C.is_pinned?-1:!M.is_pinned&&C.is_pinned?1:new Date(C.created_date)-new Date(M.created_date)),_=[...new Set(w.map(M=>
1011M.author_email).filter(Boolean))],j=[...new Set(w.map(M=>{var C;return(C=M.last_reply_info)==null?void 0:C.user_email}).filter(Boolean))],S=[...new Set([..._,...j])];let k=[];if(S.length>0){const M=S.map(C=>je.User.filter({email:C}).then(O=>O[0]).catch(()=>null));k=(await Promise.all(M)).filter(Boolean)}const T=k.reduce((M,C)=>(M[C.email]=C,M),{}),P=w.map(M=>{var D,L;const C=T[M.author_email],O=(D=M.last_reply_info)!=null&&D.user_email?T[M.last_reply_info.user_email]:null;return{...M,authorDisplayName:C?nB(C):M.author_name||"User",lastReplyUserDisplayName:O?nB(O):((L=M.last_reply_info)==null?void 0:L.user_name)||"User"}});n(P)}catch(y){console.error("Error fetching topics:",y),l("Failed to load topics for this category. Please try again later."),n([])}s(!1)},[]);return A.useEffect(()=>{document.title="Create Forum Rules Topic",je.User.me().then(h).catch(()=>h(null)),m?g(m):(l("No category ID provided."),s(!1))},[m,g]),i?a.jsxs("div",{className:"flex flex-col items-center justify-center h-[60vh]",children:[a.jsx(kt,{className:"h-12 w-12 animate-spin text-cyan-500 mb-4"}),a.jsx("p",{className:"text-white text-lg",children:"Loading topics..."})]}):o?a.jsxs("div",{className:"flex flex-col items-center justify-center h-[60vh] text-center px-4",children:[a.jsx(Lt,{className:"h-16 w-16 text-red-500 mb-6"}),a.jsx("h2",{className:"text-2xl font-semibold text-white mb-3",children:"Error Loading Category"}),a.jsx("p",{className:"text-gray-400 mb-8 max-w-md",children:o}),a.jsxs("div",{className:"flex gap-4",children:[a.jsxs(se,{onClick:()=>d(Ve("Forum")),variant:"outline",className:"border-cyan-600 text-cyan-400 hover:bg-cyan-700/20",children:[a.jsx(Uo,{className:"h-4 w-4 mr-2"})," Back to Forum"]}),m&&a.jsx(se,{onClick:()=>g(m),className:"bg-cyan-600 hover:bg-cyan-700",children:"Try Again"})]})]}):!e&&!i?a.jsxs("div",{className:"flex flex-col items-center justify-center h-[60vh] text-center px-4",children:[a.jsx(Lt,{className:"h-16 w-16 text-gray-500 mb-6"}),a.jsx("h2",{className:"text-2xl font-semibold text-white mb-3",children:"Category Not Found"}),a.jsx("p",{className:"text-gray-400 mb-8 max-w-md",children:"The category you are looking for does not exist or could not be loaded."}),a.jsxs(se,{onClick:()=>d(Ve("Forum")),className:"bg-cyan-600 hover:bg-cyan-700",children:[a.jsx(Uo,{className:"h-4 w-4 mr-2"})," Back to Forum"]})]}):a.jsxs("div",{className:"space-y-6",children:[a.jsxs(be,{className:"bg-gray-800 border-gray-700 shadow-lg",children:[a.jsx(Be,{className:"border-b border-gray-700/50 p-4",children:a.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-3",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(se,{onClick:()=>d(Ve("Forum")),variant:"ghost",size:"icon",className:"text-gray-400 hover:text-cyan-400 -ml-2 hidden sm:inline-flex",children:a.jsx(Uo,{className:"h-5 w-5"})}),a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center text-xs text-gray-400 mb-1",children:[a.jsx(pt,{to:Ve("Forum"),className:"hover:underline hover:text-cyan-400",children:"Forum"}),a.jsx(ip,{className:"h-3 w-3 mx-1"}),a.jsx("span",{className:"text-gray-300",children:e.name})]}),a.jsx(qe,{className:"text-xl sm:text-2xl font-semibold text-white",children:e.name}),a.jsx(Se,{className:"p-0 mt-1 text-sm text-gray-400",children:e.description})]})]}),u&&a.jsx(pt,{to:Ve(`ForumNewTopic?categoryId=${m}`),children:a.jsxs(se,{className:"w-full sm:w-auto bg-gradient-to-r from-cyan-500 to-blue-500 hover:from-cyan-600 hover:to-blue-600",children:[a.jsx(Ch,{className:"h-5 w-5 mr-2"}),"New Topic"]})})]})}),a.jsx(Se,{className:"p-0",children:r.length===0?a.jsxs("div",{className:"text-center py-12 px-4",children:[a.jsx(pr,{className:"h-12 w-12 text-gray-600 mx-auto mb-4"}),a.jsx("h3",{className:"text-xl font-medium text-gray-300",children:"No Topics Yet"}),a.jsxs("p",{className:"text-gray-400 mt-2 mb-6",children:['Be the first to start a discussion in the "',e.name,'" category.']}),u&&a.jsx(pt,{to:Ve(`ForumNewTopic?categoryId=${m}`),children:a.jsxs(se,{className:"bg-gradient-to-r from-cyan-500 to-blue-500 hover:from-cyan-600 hover:to-blue-600",children:[a.jsx(Ch,{className:"h-5 w-5 mr-2"}),"Create New Topic"]})}),!u&&a.jsx(se,{onClick:()=>je.User.login(),className:"bg-gradient-to-r from-cyan-500 to-blue-500 hover:from-cyan-600 hover:to-blue-600",children:"Sign In to Post"})]}):a.jsx("div",{className:"divide-y divide-gray-700",children:r.map(b=>a.jsx(_Re,{topic:b,authorDisplayName:b.authorDisplayName,lastReplyUserDisplayName:b.lastReplyUserDisplayName},b.id))})})]}),a.jsx("div",{className:"mt-4 flex justify-start sm:justify-end",children:u&&a.jsx(pt,{to:Ve(`ForumNewTopic?categoryId=${m}`),children:a.jsxs(se,{className:"bg-gradient-to-r from-cyan-500 to-blue-500 hover:from-cyan-600 hover:to-blue-600",children:[a.jsx(Ch,{className:"h-5 w-5 mr-2"}),"New Topic"]})})})]})}var Gy={exports:{}};/*! 1012 * Quill Editor v1.3.7 1013 * https://quilljs.com/ 1014 * Copyright (c) 2014, Jason Chen 1015 * Copyright (c) 2013, salesforce.com 1016 */var ARe=Gy.exports,aB;function kRe(){return aB||(aB=1,(function(e,t){(function(n,i){e.exports=i()})(typeof self<"u"?self:ARe,function(){return(function(r){var n={};
vendor: 198,238 bytes, lines 1016-1051
1016function i(s){if(n[s])return n[s].exports;var o=n[s]={i:s,l:!1,exports:{}};return r[s].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=r,i.c=n,i.d=function(s,o,l){i.o(s,o)||Object.defineProperty(s,o,{configurable:!1,enumerable:!0,get:l})},i.n=function(s){var o=s&&s.__esModule?function(){return s.default}:function(){return s};return i.d(o,"a",o),o},i.o=function(s,o){return Object.prototype.hasOwnProperty.call(s,o)},i.p="",i(i.s=109)})([(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=i(17),o=i(18),l=i(19),c=i(45),d=i(46),u=i(47),h=i(48),m=i(49),g=i(12),b=i(32),v=i(33),y=i(31),x=i(1),w={Scope:x.Scope,create:x.create,find:x.find,query:x.query,register:x.register,Container:s.default,Format:o.default,Leaf:l.default,Embed:h.default,Scroll:c.default,Block:u.default,Inline:d.default,Text:m.default,Attributor:{Attribute:g.default,Class:b.default,Style:v.default,Store:y.default}};n.default=w}),(function(r,n,i){var s=this&&this.__extends||(function(){var y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,w){x.__proto__=w}||function(x,w){for(var _ in w)w.hasOwnProperty(_)&&(x[_]=w[_])};return function(x,w){y(x,w);function _(){this.constructor=x}x.prototype=w===null?Object.create(w):(_.prototype=w.prototype,new _)}})();Object.defineProperty(n,"__esModule",{value:!0});var o=(function(y){s(x,y);function x(w){var _=this;return w="[Parchment] "+w,_=y.call(this,w)||this,_.message=w,_.name=_.constructor.name,_}return x})(Error);n.ParchmentError=o;var l={},c={},d={},u={};n.DATA_KEY="__blot";var h;(function(y){y[y.TYPE=3]="TYPE",y[y.LEVEL=12]="LEVEL",y[y.ATTRIBUTE=13]="ATTRIBUTE",y[y.BLOT=14]="BLOT",y[y.INLINE=7]="INLINE",y[y.BLOCK=11]="BLOCK",y[y.BLOCK_BLOT=10]="BLOCK_BLOT",y[y.INLINE_BLOT=6]="INLINE_BLOT",y[y.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",y[y.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",y[y.ANY=15]="ANY"})(h=n.Scope||(n.Scope={}));function m(y,x){var w=b(y);if(w==null)throw new o("Unable to create "+y+" blot");var _=w,j=y instanceof Node||y.nodeType===Node.TEXT_NODE?y:_.create(x);return new _(j,x)}n.create=m;function g(y,x){return x===void 0&&(x=!1),y==null?null:y[n.DATA_KEY]!=null?y[n.DATA_KEY].blot:x?g(y.parentNode,x):null}n.find=g;function b(y,x){x===void 0&&(x=h.ANY);var w;if(typeof y=="string")w=u[y]||l[y];else if(y instanceof Text||y.nodeType===Node.TEXT_NODE)w=u.text;else if(typeof y=="number")y&h.LEVEL&h.BLOCK?w=u.block:y&h.LEVEL&h.INLINE&&(w=u.inline);else if(y instanceof HTMLElement){var _=(y.getAttribute("class")||"").split(/\s+/);for(var j in _)if(w=c[_[j]],w)break;w=w||d[y.tagName]}return w==null?null:x&h.LEVEL&w.scope&&x&h.TYPE&w.scope?w:null}n.query=b;function v(){for(var y=[],x=0;x<arguments.length;x++)y[x]=arguments[x];if(y.length>1)return y.map(function(j){return v(j)});var w=y[0];if(typeof w.blotName!="string"&&typeof w.attrName!="string")throw new o("Invalid definition");if(w.blotName==="abstract")throw new o("Cannot register abstract class");if(u[w.blotName||w.attrName]=w,typeof w.keyName=="string")l[w.keyName]=w;else if(w.className!=null&&(c[w.className]=w),w.tagName!=null){Array.isArray(w.tagName)?w.tagName=w.tagName.map(function(j){return j.toUpperCase()}):w.tagName=w.tagName.toUpperCase();var _=Array.isArray(w.tagName)?w.tagName:[w.tagName];_.forEach(function(j){(d[j]==null||w.className==null)&&(d[j]=w)})}return w}n.register=v}),(function(r,n,i){var s=i(51),o=i(11),l=i(3),c=i(20),d="\0",u=function(h){Array.isArray(h)?this.ops=h:h!=null&&Array.isArray(h.ops)?this.ops=h.ops:this.ops=[]};u.prototype.insert=function(h,m){var g={};return h.length===0?this:(g.insert=h,m!=null&&typeof m=="object"&&Object.keys(m).length>0&&(g.attributes=m),this.push(g))},u.prototype.delete=function(h){return h<=0?this:this.push({delete:h})},u.prototype.retain=function(h,m){if(h<=0)return this;var g={retain:h};return m!=null&&typeof m=="object"&&Object.keys(m).length>0&&(g.attributes=m),this.push(g)},u.prototype.push=function(h){var m=this.ops.length,g=this.ops[m-1];if(h=l(!0,{},h),typeof g=="object"){if(typeof h.delete=="number"&&typeof g.delete=="number")return this.ops[m-1]={delete:g.delete+h.delete},this;if(typeof g.delete=="number"&&h.insert!=null&&(m-=1,g=this.ops[m-1],typeof g!="object"))return this.ops.unshift(h),this;if(o(h.attributes,g.attributes)){if(typeof h.insert=="string"&&typeof g.insert=="string")return this.ops[m-1]={insert:g.insert+h.insert},typeof h.attributes=="object"&&(this.ops[m-1].attributes=h.attributes),this;if(typeof h.retain=="number"&&typeof g.retain=="number")return this.ops[m-1]={retain:g.retain+h.retain},typeof h.attributes=="object"&&(this.ops[m-1].attributes=h.attributes),this}}return m===this.ops.length?this.ops.push(h):this.ops.splice(m,0,h),this},u.prototype.chop=function(){var h=this.ops[this.ops.length-1];return h&&h.retain&&!h.attributes&&this.ops.pop(),this},u.prototype.filter=function(h){return this.ops.filter(h)},u.prototype.forEach=function(h){this.ops.forEach(h)},u.prototype.map=function(h){return this.ops.map(h)},u.prototype.partition=function(h){var m=[],g=[];return this.forEach(function(b){var v=h(b)?m:g;v.push(b)}),[m,g]},u.prototype.reduce=function(h,m){return this.ops.reduce(h,m)},u.prototype.changeLength=function(){return this.reduce(function(h,m){return m.insert?h+c.length(m):m.delete?h-m.delete:h},0)},u.prototype.length=function(){return this.reduce(function(h,m){return h+c.length(m)},0)},u.prototype.slice=function(h,m){h=h||0,typeof m!="number"&&(m=1/0);for(var g=[],b=c.iterator(this.ops),v=0;v<m&&b.hasNext();){var y;v<h?y=b.next(h-v):(y=b.next(m-v),g.push(y)),v+=c.length(y)}return new u(g)},u.prototype.compose=function(h){var m=c.iterator(this.ops),g=c.iterator(h.ops),b=[],v=g.peek();if(v!=null&&typeof v.retain=="number"&&v.attributes==null){for(var y=v.retain;m.peekType()==="insert"&&m.peekLength()<=y;)y-=m.peekLength(),b.push(m.next());v.retain-y>0&&g.next(v.retain-y)}for(var x=new u(b);m.hasNext()||g.hasNext();)if(g.peekType()==="insert")x.push(g.next());else if(m.peekType()==="delete")x.push(m.next());else{var w=Math.min(m.peekLength(),g.peekLength()),_=m.next(w),j=g.next(w);if(typeof j.retain=="number"){var S={};typeof _.retain=="number"?S.retain=w:S.insert=_.insert;var k=c.attributes.compose(_.attributes,j.attributes,typeof _.retain=="number");if(k&&(S.attributes=k),x.push(S),!g.hasNext()&&o(x.ops[x.ops.length-1],S)){var T=new u(m.rest());return x.concat(T).chop()}}else typeof j.delete=="number"&&typeof _.retain=="number"&&x.push(j)}return x.chop()},u.prototype.concat=function(h){var m=new u(this.ops.slice());return h.ops.length>0&&(m.push(h.ops[0]),m.ops=m.ops.concat(h.ops.slice(1))),m},u.prototype.diff=function(h,m){if(this.ops===h.ops)return new u;var g=[this,h].map(function(w){return w.map(function(_){if(_.insert!=null)return typeof _.insert=="string"?_.insert:d;var j=w===h?"on":"with";throw new Error("diff() called "+j+" non-document")}).join("")}),b=new u,v=s(g[0],g[1],m),y=c.iterator(this.ops),x=c.iterator(h.ops);return v.forEach(function(w){for(var _=w[1].length;_>0;){var j=0;switch(w[0]){case s.INSERT:j=Math.min(x.peekLength(),_),b.push(x.next(j));break;case s.DELETE:j=Math.min(_,y.peekLength()),y.next(j),b.delete(j);break;case s.EQUAL:j=Math.min(y.peekLength(),x.peekLength(),_);var S=y.next(j),k=x.next(j);o(S.insert,k.insert)?b.retain(j,c.attributes.diff(S.attributes,k.attributes)):b.push(k).delete(j);break}_-=j}}),b.chop()},u.prototype.eachLine=function(h,m){m=m||` 1017`;for(var g=c.iterator(this.ops),b=new u,v=0;g.hasNext();){if(g.peekType()!=="insert")return;var y=g.peek(),x=c.length(y)-g.peekLength(),w=typeof y.insert=="string"?y.insert.indexOf(m,x)-x:-1;if(w<0)b.push(g.next());else if(w>0)b.push(g.next(w));else{if(h(b,g.next(1).attributes||{},v)===!1)return;v+=1,b=new u}}b.length()>0&&h(b,{},v)},u.prototype.transform=function(h,m){if(m=!!m,typeof h=="number")return this.transformPosition(h,m);for(var g=c.iterator(this.ops),b=c.iterator(h.ops),v=new u;g.hasNext()||b.hasNext();)if(g.peekType()==="insert"&&(m||b.peekType()!=="insert"))v.retain(c.length(g.next()));else if(b.peekType()==="insert")v.push(b.next());else{var y=Math.min(g.peekLength(),b.peekLength()),x=g.next(y),w=b.next(y);if(x.delete)continue;w.delete?v.push(w):v.retain(y,c.attributes.transform(x.attributes,w.attributes,m))}return v.chop()},u.prototype.transformPosition=function(h,m){m=!!m;for(var g=c.iterator(this.ops),b=0;g.hasNext()&&b<=h;){var v=g.peekLength(),y=g.peekType();if(g.next(),y==="delete"){h-=Math.min(v,h-b);continue}else y==="insert"&&(b<h||!m)&&(h+=v);b+=v}return h},r.exports=u}),(function(r,n){var i=Object.prototype.hasOwnProperty,s=Object.prototype.toString,o=Object.defineProperty,l=Object.getOwnPropertyDescriptor,c=function(g){return typeof Array.isArray=="function"?Array.isArray(g):s.call(g)==="[object Array]"},d=function(g){if(!g||s.call(g)!=="[object Object]")return!1;var b=i.call(g,"constructor"),v=g.constructor&&g.constructor.prototype&&i.call(g.constructor.prototype,"isPrototypeOf");if(g.constructor&&!b&&!v)return!1;var y;for(y in g);return typeof y>"u"||i.call(g,y)},u=function(g,b){o&&b.name==="__proto__"?o(g,b.name,{enumerable:!0,configurable:!0,value:b.newValue,writable:!0}):g[b.name]=b.newValue},h=function(g,b){if(b==="__proto__")if(i.call(g,b)){if(l)return l(g,b).value}else return;return g[b]};r.exports=function m(){var g,b,v,y,x,w,_=arguments[0],j=1,S=arguments.length,k=!1;for(typeof _=="boolean"&&(k=_,_=arguments[1]||{},j=2),(_==null||typeof _!="object"&&typeof _!="function")&&(_={});j<S;++j)if(g=arguments[j],g!=null)for(b in g)v=h(_,b),y=h(g,b),_!==y&&(k&&y&&(d(y)||(x=c(y)))?(x?(x=!1,w=v&&c(v)?v:[]):w=v&&d(v)?v:{},u(_,{name:b,newValue:m(k,w,y)})):typeof y<"u"&&u(_,{name:b,newValue:y}));return _}}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BlockEmbed=n.bubbleFormats=void 0;var s=(function(){function O(D,L){for(var F=0;F<L.length;F++){var U=L[F];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(D,U.key,U)}}return function(D,L,F){return L&&O(D.prototype,L),F&&O(D,F),D}})(),o=function O(D,L,F){D===null&&(D=Function.prototype);var U=Object.getOwnPropertyDescriptor(D,L);if(U===void 0){var G=Object.getPrototypeOf(D);return G===null?void 0:O(G,L,F)}else{if("value"in U)return U.value;var W=U.get;return W===void 0?void 0:W.call(F)}},l=i(3),c=_(l),d=i(2),u=_(d),h=i(0),m=_(h),g=i(16),b=_(g),v=i(6),y=_(v),x=i(7),w=_(x);function _(O){return O&&O.__esModule?O:{default:O}}function j(O,D){if(!(O instanceof D))throw new TypeError("Cannot call a class as a function")}function S(O,D){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return D&&(typeof D=="object"||typeof D=="function")?D:O}function k(O,D){if(typeof D!="function"&&D!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof D);O.prototype=Object.create(D&&D.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),D&&(Object.setPrototypeOf?Object.setPrototypeOf(O,D):O.__proto__=D)}var T=1,P=(function(O){k(D,O);function D(){return j(this,D),S(this,(D.__proto__||Object.getPrototypeOf(D)).apply(this,arguments))}return s(D,[{key:"attach",value:function(){o(D.prototype.__proto__||Object.getPrototypeOf(D.prototype),"attach",this).call(this),this.attributes=new m.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return new u.default().insert(this.value(),(0,c.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(F,U){var G=m.default.query(F,m.default.Scope.BLOCK_ATTRIBUTE);G!=null&&this.attributes.attribute(G,U)}},{key:"formatAt",value:function(F,U,G,W){this.format(G,W)}},{key:"insertAt",value:function(F,U,G){if(typeof U=="string"&&U.endsWith(` 1018`)){var W=m.default.create(M.blotName);this.parent.insertBefore(W,F===0?this:this.next),W.insertAt(0,U.slice(0,-1))}else o(D.prototype.__proto__||Object.getPrototypeOf(D.prototype),"insertAt",this).call(this,F,U,G)}}]),D})(m.default.Embed);P.scope=m.default.Scope.BLOCK_BLOT;var M=(function(O){k(D,O);function D(L){j(this,D);var F=S(this,(D.__proto__||Object.getPrototypeOf(D)).call(this,L));return F.cache={},F}return s(D,[{key:"delta",value:function(){return this.cache.delta==null&&(this.cache.delta=this.descendants(m.default.Leaf).reduce(function(F,U){return U.length()===0?F:F.insert(U.value(),C(U))},new u.default).insert(` 1019`,C(this))),this.cache.delta}},{key:"deleteAt",value:function(F,U){o(D.prototype.__proto__||Object.getPrototypeOf(D.prototype),"deleteAt",this).call(this,F,U),this.cache={}}},{key:"formatAt",value:function(F,U,G,W){U<=0||(m.default.query(G,m.default.Scope.BLOCK)?F+U===this.length()&&this.format(G,W):o(D.prototype.__proto__||Object.getPrototypeOf(D.prototype),"formatAt",this).call(this,F,Math.min(U,this.length()-F-1),G,W),this.cache={})}},{key:"insertAt",value:function(F,U,G){if(G!=null)return o(D.prototype.__proto__||Object.getPrototypeOf(D.prototype),"insertAt",this).call(this,F,U,G);if(U.length!==0){var W=U.split(` 1020`),q=W.shift();q.length>0&&(F<this.length()-1||this.children.tail==null?o(D.prototype.__proto__||Object.getPrototypeOf(D.prototype),"insertAt",this).call(this,Math.min(F,this.length()-1),q):this.children.tail.insertAt(this.children.tail.length(),q),this.cache={});var V=this;W.reduce(function(z,I){return V=V.split(z,!0),V.insertAt(0,I),I.length},F+q.length)}}},{key:"insertBefore",value:function(F,U){var G=this.children.head;o(D.prototype.__proto__||Object.getPrototypeOf(D.prototype),"insertBefore",this).call(this,F,U),G instanceof b.default&&G.remove(),this.cache={}}},{key:"length",value:function(){return this.cache.length==null&&(this.cache.length=o(D.prototype.__proto__||Object.getPrototypeOf(D.prototype),"length",this).call(this)+T),this.cache.length}},{key:"moveChildren",value:function(F,U){o(D.prototype.__proto__||Object.getPrototypeOf(D.prototype),"moveChildren",this).call(this,F,U),this.cache={}}},{key:"optimize",value:function(F){o(D.prototype.__proto__||Object.getPrototypeOf(D.prototype),"optimize",this).call(this,F),this.cache={}}},{key:"path",value:function(F){return o(D.prototype.__proto__||Object.getPrototypeOf(D.prototype),"path",this).call(this,F,!0)}},{key:"removeChild",value:function(F){o(D.prototype.__proto__||Object.getPrototypeOf(D.prototype),"removeChild",this).call(this,F),this.cache={}}},{key:"split",value:function(F){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(U&&(F===0||F>=this.length()-T)){var G=this.clone();return F===0?(this.parent.insertBefore(G,this),this):(this.parent.insertBefore(G,this.next),G)}else{var W=o(D.prototype.__proto__||Object.getPrototypeOf(D.prototype),"split",this).call(this,F,U);return this.cache={},W}}}]),D})(m.default.Block);M.blotName="block",M.tagName="P",M.defaultChild="break",M.allowedChildren=[y.default,m.default.Embed,w.default];function C(O){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return O==null||(typeof O.formats=="function"&&(D=(0,c.default)(D,O.formats())),O.parent==null||O.parent.blotName=="scroll"||O.parent.statics.scope!==O.statics.scope)?D:C(O.parent,D)}n.bubbleFormats=C,n.BlockEmbed=P,n.default=M}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.overload=n.expandConfig=void 0;var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(V){return typeof V}:function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V},o=(function(){function V(z,I){var B=[],H=!0,J=!1,ee=void 0;try{for(var Y=z[Symbol.iterator](),X;!(H=(X=Y.next()).done)&&(B.push(X.value),!(I&&B.length===I));H=!0);}catch(ne){J=!0,ee=ne}finally{try{!H&&Y.return&&Y.return()}finally{if(J)throw ee}}return B}return function(z,I){if(Array.isArray(z))return z;if(Symbol.iterator in Object(z))return V(z,I);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),l=(function(){function V(z,I){for(var B=0;B<I.length;B++){var H=I[B];H.enumerable=H.enumerable||!1,H.configurable=!0,"value"in H&&(H.writable=!0),Object.defineProperty(z,H.key,H)}}return function(z,I,B){return I&&V(z.prototype,I),B&&V(z,B),z}})();i(50);var c=i(2),d=C(c),u=i(14),h=C(u),m=i(8),g=C(m),b=i(9),v=C(b),y=i(0),x=C(y),w=i(15),_=C(w),j=i(3),S=C(j),k=i(10),T=C(k),P=i(34),M=C(P);function C(V){return V&&V.__esModule?V:{default:V}}function O(V,z,I){return z in V?Object.defineProperty(V,z,{value:I,enumerable:!0,configurable:!0,writable:!0}):V[z]=I,V}function D(V,z){if(!(V instanceof z))throw new TypeError("Cannot call a class as a function")}var L=(0,T.default)("quill"),F=(function(){l(V,null,[{key:"debug",value:function(I){I===!0&&(I="log"),T.default.level(I)}},{key:"find",value:function(I){return I.__quill||x.default.find(I)}},{key:"import",value:function(I){return this.imports[I]==null&&L.error("Cannot import "+I+". Are you sure it was registered?"),this.imports[I]}},{key:"register",value:function(I,B){var H=this,J=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof I!="string"){var ee=I.attrName||I.blotName;typeof ee=="string"?this.register("formats/"+ee,I,B):Object.keys(I).forEach(function(Y){H.register(Y,I[Y],B)})}else this.imports[I]!=null&&!J&&L.warn("Overwriting "+I+" with",B),this.imports[I]=B,(I.startsWith("blots/")||I.startsWith("formats/"))&&B.blotName!=="abstract"?x.default.register(B):I.startsWith("modules")&&typeof B.register=="function"&&B.register()}}]);function V(z){var I=this,B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(D(this,V),this.options=U(z,B),this.container=this.options.container,this.container==null)return L.error("Invalid Quill container",z);this.options.debug&&V.debug(this.options.debug);var H=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new g.default,this.scroll=x.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new h.default(this.scroll),this.selection=new _.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(g.default.events.EDITOR_CHANGE,function(ee){ee===g.default.events.TEXT_CHANGE&&I.root.classList.toggle("ql-blank",I.editor.isBlank())}),this.emitter.on(g.default.events.SCROLL_UPDATE,function(ee,Y){var X=I.selection.lastRange,ne=X&&X.length===0?X.index:void 0;G.call(I,function(){return I.editor.update(null,Y,ne)},ee)});var J=this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">`+H+"<p><br></p></div>");this.setContents(J),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return l(V,[{key:"addContainer",value:function(I){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof I=="string"){var H=I;I=document.createElement("div"),I.classList.add(H)}return this.container.insertBefore(I,B),I}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(I,B,H){var J=this,ee=W(I,B,H),Y=o(ee,4);return I=Y[0],B=Y[1],H=Y[3],G.call(this,function(){return J.editor.deleteText(I,B)},H,I,-1*B)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(I),this.container.classList.toggle("ql-disabled",!I)}},{key:"focus",value:function(){var I=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=I,this.scrollIntoView()}},{key:"format",value:function(I,B){var H=this,J=arguments.length>2&&arguments[2]!==void 0?arguments[2]:g.default.sources.API;return G.call(this,function(){var ee=H.getSelection(!0),Y=new d.default;if(ee==null)return Y;if(x.default.query(I,x.default.Scope.BLOCK))Y=H.editor.formatLine(ee.index,ee.length,O({},I,B));else{if(ee.length===0)return H.selection.format(I,B),Y;Y=H.editor.formatText(ee.index,ee.length,O({},I,B))}return H.setSelection(ee,g.default.sources.SILENT),Y},J)}},{key:"formatLine",value:function(I,B,H,J,ee){var Y=this,X=void 0,ne=W(I,B,H,J,ee),Q=o(ne,4);return I=Q[0],B=Q[1],X=Q[2],ee=Q[3],G.call(this,function(){return Y.editor.formatLine(I,B,X)},ee,I,0)}},{key:"formatText",value:function(I,B,H,J,ee){var Y=this,X=void 0,ne=W(I,B,H,J,ee),Q=o(ne,4);return I=Q[0],B=Q[1],X=Q[2],ee=Q[3],G.call(this,function(){return Y.editor.formatText(I,B,X)},ee,I,0)}},{key:"getBounds",value:function(I){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,H=void 0;typeof I=="number"?H=this.selection.getBounds(I,B):H=this.selection.getBounds(I.index,I.length);var J=this.container.getBoundingClientRect();return{bottom:H.bottom-J.top,height:H.height,left:H.left-J.left,right:H.right-J.left,top:H.top-J.top,width:H.width}}},{key:"getContents",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-I,H=W(I,B),J=o(H,2);return I=J[0],B=J[1],this.editor.getContents(I,B)}},{key:"getFormat",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof I=="number"?this.editor.getFormat(I,B):this.editor.getFormat(I.index,I.length)}},{key:"getIndex",value:function(I){return I.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(I){return this.scroll.leaf(I)}},{key:"getLine",value:function(I){return this.scroll.line(I)}},{key:"getLines",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof I!="number"?this.scroll.lines(I.index,I.length):this.scroll.lines(I,B)}},{key:"getModule",value:function(I){return this.theme.modules[I]}},{key:"getSelection",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return I&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-I,H=W(I,B),J=o(H,2);return I=J[0],B=J[1],this.editor.getText(I,B)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(I,B,H){var J=this,ee=arguments.length>3&&arguments[3]!==void 0?arguments[3]:V.sources.API;return G.call(this,function(){return J.editor.insertEmbed(I,B,H)},ee,I)}},{key:"insertText",value:function(I,B,H,J,ee){var Y=this,X=void 0,ne=W(I,0,H,J,ee),Q=o(ne,4);return I=Q[0],X=Q[2],ee=Q[3],G.call(this,function(){return Y.editor.insertText(I,B,X)},ee,I,B.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(I,B,H){this.clipboard.dangerouslyPasteHTML(I,B,H)}},{key:"removeFormat",value:function(I,B,H){var J=this,ee=W(I,B,H),Y=o(ee,4);return I=Y[0],B=Y[1],H=Y[3],G.call(this,function(){return J.editor.removeFormat(I,B)},H,I)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(I){var B=this,H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:g.default.sources.API;return G.call(this,function(){I=new d.default(I);var J=B.getLength(),ee=B.editor.deleteText(0,J),Y=B.editor.applyDelta(I),X=Y.ops[Y.ops.length-1];X!=null&&typeof X.insert=="string"&&X.insert[X.insert.length-1]===` 1021`&&(B.editor.deleteText(B.getLength()-1,1),Y.delete(1));var ne=ee.compose(Y);return ne},H)}},{key:"setSelection",value:function(I,B,H){if(I==null)this.selection.setRange(null,B||V.sources.API);else{var J=W(I,B,H),ee=o(J,4);I=ee[0],B=ee[1],H=ee[3],this.selection.setRange(new w.Range(I,B),H),H!==g.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(I){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:g.default.sources.API,H=new d.default().insert(I);return this.setContents(H,B)}},{key:"update",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:g.default.sources.USER,B=this.scroll.update(I);return this.selection.update(I),B}},{key:"updateContents",value:function(I){var B=this,H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:g.default.sources.API;return G.call(this,function(){return I=new d.default(I),B.editor.applyDelta(I,H)},H,!0)}}]),V})();F.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},F.events=g.default.events,F.sources=g.default.sources,F.version="1.3.7",F.imports={delta:d.default,parchment:x.default,"core/module":v.default,"core/theme":M.default};function U(V,z){if(z=(0,S.default)(!0,{container:V,modules:{clipboard:!0,keyboard:!0,history:!0}},z),!z.theme||z.theme===F.DEFAULTS.theme)z.theme=M.default;else if(z.theme=F.import("themes/"+z.theme),z.theme==null)throw new Error("Invalid theme "+z.theme+". Did you register it?");var I=(0,S.default)(!0,{},z.theme.DEFAULTS);[I,z].forEach(function(J){J.modules=J.modules||{},Object.keys(J.modules).forEach(function(ee){J.modules[ee]===!0&&(J.modules[ee]={})})});var B=Object.keys(I.modules).concat(Object.keys(z.modules)),H=B.reduce(function(J,ee){var Y=F.import("modules/"+ee);return Y==null?L.error("Cannot load "+ee+" module. Are you sure you registered it?"):J[ee]=Y.DEFAULTS||{},J},{});return z.modules!=null&&z.modules.toolbar&&z.modules.toolbar.constructor!==Object&&(z.modules.toolbar={container:z.modules.toolbar}),z=(0,S.default)(!0,{},F.DEFAULTS,{modules:H},I,z),["bounds","container","scrollingContainer"].forEach(function(J){typeof z[J]=="string"&&(z[J]=document.querySelector(z[J]))}),z.modules=Object.keys(z.modules).reduce(function(J,ee){return z.modules[ee]&&(J[ee]=z.modules[ee]),J},{}),z}function G(V,z,I,B){if(this.options.strict&&!this.isEnabled()&&z===g.default.sources.USER)return new d.default;var H=I==null?null:this.getSelection(),J=this.editor.delta,ee=V();if(H!=null&&(I===!0&&(I=H.index),B==null?H=q(H,ee,z):B!==0&&(H=q(H,I,B,z)),this.setSelection(H,g.default.sources.SILENT)),ee.length()>0){var Y,X=[g.default.events.TEXT_CHANGE,ee,J,z];if((Y=this.emitter).emit.apply(Y,[g.default.events.EDITOR_CHANGE].concat(X)),z!==g.default.sources.SILENT){var ne;(ne=this.emitter).emit.apply(ne,X)}}return ee}function W(V,z,I,B,H){var J={};return typeof V.index=="number"&&typeof V.length=="number"?typeof z!="number"?(H=B,B=I,I=z,z=V.length,V=V.index):(z=V.length,V=V.index):typeof z!="number"&&(H=B,B=I,I=z,z=0),(typeof I>"u"?"undefined":s(I))==="object"?(J=I,H=B):typeof I=="string"&&(B!=null?J[I]=B:H=I),H=H||g.default.sources.API,[V,z,J,H]}function q(V,z,I,B){if(V==null)return null;var H=void 0,J=void 0;if(z instanceof d.default){var ee=[V.index,V.index+V.length].map(function(Q){return z.transformPosition(Q,B!==g.default.sources.USER)}),Y=o(ee,2);H=Y[0],J=Y[1]}else{var X=[V.index,V.index+V.length].map(function(Q){return Q<z||Q===z&&B===g.default.sources.USER?Q:I>=0?Q+I:Math.max(z,Q+I)}),ne=o(X,2);H=ne[0],J=ne[1]}return new w.Range(H,J-H)}n.expandConfig=U,n.overload=W,n.default=F}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=(function(){function y(x,w){for(var _=0;_<w.length;_++){var j=w[_];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(x,j.key,j)}}return function(x,w,_){return w&&y(x.prototype,w),_&&y(x,_),x}})(),o=function y(x,w,_){x===null&&(x=Function.prototype);var j=Object.getOwnPropertyDescriptor(x,w);if(j===void 0){var S=Object.getPrototypeOf(x);return S===null?void 0:y(S,w,_)}else{if("value"in j)return j.value;var k=j.get;return k===void 0?void 0:k.call(_)}},l=i(7),c=h(l),d=i(0),u=h(d);function h(y){return y&&y.__esModule?y:{default:y}}function m(y,x){if(!(y instanceof x))throw new TypeError("Cannot call a class as a function")}function g(y,x){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:y}function b(y,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);y.prototype=Object.create(x&&x.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(y,x):y.__proto__=x)}var v=(function(y){b(x,y);function x(){return m(this,x),g(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return s(x,[{key:"formatAt",value:function(_,j,S,k){if(x.compare(this.statics.blotName,S)<0&&u.default.query(S,u.default.Scope.BLOT)){var T=this.isolate(_,j);k&&T.wrap(S,k)}else o(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"formatAt",this).call(this,_,j,S,k)}},{key:"optimize",value:function(_){if(o(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"optimize",this).call(this,_),this.parent instanceof x&&x.compare(this.statics.blotName,this.parent.statics.blotName)>0){var j=this.parent.isolate(this.offset(),this.length());this.moveChildren(j),j.wrap(this)}}}],[{key:"compare",value:function(_,j){var S=x.order.indexOf(_),k=x.order.indexOf(j);return S>=0||k>=0?S-k:_===j?0:_<j?-1:1}}]),x})(u.default.Inline);v.allowedChildren=[v,u.default.Embed,c.default],v.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],n.default=v}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=i(0),o=l(s);function l(m){return m&&m.__esModule?m:{default:m}}function c(m,g){if(!(m instanceof g))throw new TypeError("Cannot call a class as a function")}function d(m,g){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:m}function u(m,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);m.prototype=Object.create(g&&g.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(m,g):m.__proto__=g)}var h=(function(m){u(g,m);function g(){return c(this,g),d(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return g})(o.default.Text);n.default=h}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=(function(){function w(_,j){for(var S=0;S<j.length;S++){var k=j[S];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(_,k.key,k)}}return function(_,j,S){return j&&w(_.prototype,j),S&&w(_,S),_}})(),o=function w(_,j,S){_===null&&(_=Function.prototype);var k=Object.getOwnPropertyDescriptor(_,j);if(k===void 0){var T=Object.getPrototypeOf(_);return T===null?void 0:w(T,j,S)}else{if("value"in k)return k.value;var P=k.get;return P===void 0?void 0:P.call(S)}},l=i(54),c=h(l),d=i(10),u=h(d);function h(w){return w&&w.__esModule?w:{default:w}}function m(w,_){if(!(w instanceof _))throw new TypeError("Cannot call a class as a function")}function g(w,_){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:w}function b(w,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);w.prototype=Object.create(_&&_.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(w,_):w.__proto__=_)}var v=(0,u.default)("quill:events"),y=["selectionchange","mousedown","mouseup","click"];y.forEach(function(w){document.addEventListener(w,function(){for(var _=arguments.length,j=Array(_),S=0;S<_;S++)j[S]=arguments[S];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(k){if(k.__quill&&k.__quill.emitter){var T;(T=k.__quill.emitter).handleDOM.apply(T,j)}})})});var x=(function(w){b(_,w);function _(){m(this,_);var j=g(this,(_.__proto__||Object.getPrototypeOf(_)).call(this));return j.listeners={},j.on("error",v.error),j}return s(_,[{key:"emit",value:function(){v.log.apply(v,arguments),o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(S){for(var k=arguments.length,T=Array(k>1?k-1:0),P=1;P<k;P++)T[P-1]=arguments[P];(this.listeners[S.type]||[]).forEach(function(M){var C=M.node,O=M.handler;(S.target===C||C.contains(S.target))&&O.apply(void 0,[S].concat(T))})}},{key:"listenDOM",value:function(S,k,T){this.listeners[S]||(this.listeners[S]=[]),this.listeners[S].push({node:k,handler:T})}}]),_})(c.default);x.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},x.sources={API:"api",SILENT:"silent",USER:"user"},n.default=x}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});function s(l,c){if(!(l instanceof c))throw new TypeError("Cannot call a class as a function")}var o=function l(c){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};s(this,l),this.quill=c,this.options=d};o.DEFAULTS={},n.default=o}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=["error","warn","log","info"],o="warn";function l(d){if(s.indexOf(d)<=s.indexOf(o)){for(var u,h=arguments.length,m=Array(h>1?h-1:0),g=1;g<h;g++)m[g-1]=arguments[g];(u=console)[d].apply(u,m)}}function c(d){return s.reduce(function(u,h){return u[h]=l.bind(console,h,d),u},{})}l.level=c.level=function(d){o=d},n.default=c}),(function(r,n,i){var s=Array.prototype.slice,o=i(52),l=i(53),c=r.exports=function(m,g,b){return b||(b={}),m===g?!0:m instanceof Date&&g instanceof Date?m.getTime()===g.getTime():!m||!g||typeof m!="object"&&typeof g!="object"?b.strict?m===g:m==g:h(m,g,b)};function d(m){return m==null}function u(m){return!(!m||typeof m!="object"||typeof m.length!="number"||typeof m.copy!="function"||typeof m.slice!="function"||m.length>0&&typeof m[0]!="number")}function h(m,g,b){var v,y;if(d(m)||d(g)||m.prototype!==g.prototype)return!1;if(l(m))return l(g)?(m=s.call(m),g=s.call(g),c(m,g,b)):!1;if(u(m)){if(!u(g)||m.length!==g.length)return!1;for(v=0;v<m.length;v++)if(m[v]!==g[v])return!1;return!0}try{var x=o(m),w=o(g)}catch{return!1}if(x.length!=w.length)return!1;for(x.sort(),w.sort(),v=x.length-1;v>=0;v--)if(x[v]!=w[v])return!1;for(v=x.length-1;v>=0;v--)if(y=x[v],!c(m[y],g[y],b))return!1;return typeof m==typeof g}}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=i(1),o=(function(){function l(c,d,u){u===void 0&&(u={}),this.attrName=c,this.keyName=d;var h=s.Scope.TYPE&s.Scope.ATTRIBUTE;u.scope!=null?this.scope=u.scope&s.Scope.LEVEL|h:this.scope=s.Scope.ATTRIBUTE,u.whitelist!=null&&(this.whitelist=u.whitelist)}return l.keys=function(c){return[].map.call(c.attributes,function(d){return d.name})},l.prototype.add=function(c,d){return this.canAdd(c,d)?(c.setAttribute(this.keyName,d),!0):!1},l.prototype.canAdd=function(c,d){var u=s.query(c,s.Scope.BLOT&(this.scope|s.Scope.TYPE));return u==null?!1:this.whitelist==null?!0:typeof d=="string"?this.whitelist.indexOf(d.replace(/["']/g,""))>-1:this.whitelist.indexOf(d)>-1},l.prototype.remove=function(c){c.removeAttribute(this.keyName)},l.prototype.value=function(c){var d=c.getAttribute(this.keyName);return this.canAdd(c,d)&&d?d:""},l})();n.default=o}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.Code=void 0;var s=(function(){function P(M,C){var O=[],D=!0,L=!1,F=void 0;try{for(var U=M[Symbol.iterator](),G;!(D=(G=U.next()).done)&&(O.push(G.value),!(C&&O.length===C));D=!0);}catch(W){L=!0,F=W}finally{try{!D&&U.return&&U.return()}finally{if(L)throw F}}return O}return function(M,C){if(Array.isArray(M))return M;if(Symbol.iterator in Object(M))return P(M,C);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=(function(){function P(M,C){for(var O=0;O<C.length;O++){var D=C[O];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(M,D.key,D)}}return function(M,C,O){return C&&P(M.prototype,C),O&&P(M,O),M}})(),l=function P(M,C,O){M===null&&(M=Function.prototype);var D=Object.getOwnPropertyDescriptor(M,C);if(D===void 0){var L=Object.getPrototypeOf(M);return L===null?void 0:P(L,C,O)}else{if("value"in D)return D.value;var F=D.get;return F===void 0?void 0:F.call(O)}},c=i(2),d=w(c),u=i(0),h=w(u),m=i(4),g=w(m),b=i(6),v=w(b),y=i(7),x=w(y);function w(P){return P&&P.__esModule?P:{default:P}}function _(P,M){if(!(P instanceof M))throw new TypeError("Cannot call a class as a function")}function j(P,M){if(!P)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M&&(typeof M=="object"||typeof M=="function")?M:P}function S(P,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof M);P.prototype=Object.create(M&&M.prototype,{constructor:{value:P,enumerable:!1,writable:!0,configurable:!0}}),M&&(Object.setPrototypeOf?Object.setPrototypeOf(P,M):P.__proto__=M)}var k=(function(P){S(M,P);function M(){return _(this,M),j(this,(M.__proto__||Object.getPrototypeOf(M)).apply(this,arguments))}return M})(v.default);k.blotName="code",k.tagName="CODE";var T=(function(P){S(M,P);function M(){return _(this,M),j(this,(M.__proto__||Object.getPrototypeOf(M)).apply(this,arguments))}return o(M,[{key:"delta",value:function(){var O=this,D=this.domNode.textContent;return D.endsWith(` 1022`)&&(D=D.slice(0,-1)),D.split(` 1023`).reduce(function(L,F){return L.insert(F).insert(` 1024`,O.formats())},new d.default)}},{key:"format",value:function(O,D){if(!(O===this.statics.blotName&&D)){var L=this.descendant(x.default,this.length()-1),F=s(L,1),U=F[0];U!=null&&U.deleteAt(U.length()-1,1),l(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"format",this).call(this,O,D)}}},{key:"formatAt",value:function(O,D,L,F){if(D!==0&&!(h.default.query(L,h.default.Scope.BLOCK)==null||L===this.statics.blotName&&F===this.statics.formats(this.domNode))){var U=this.newlineIndex(O);if(!(U<0||U>=O+D)){var G=this.newlineIndex(O,!0)+1,W=U-G+1,q=this.isolate(G,W),V=q.next;q.format(L,F),V instanceof M&&V.formatAt(0,O-G+D-W,L,F)}}}},{key:"insertAt",value:function(O,D,L){if(L==null){var F=this.descendant(x.default,O),U=s(F,2),G=U[0],W=U[1];G.insertAt(W,D)}}},{key:"length",value:function(){var O=this.domNode.textContent.length;return this.domNode.textContent.endsWith(` 1025`)?O:O+1}},{key:"newlineIndex",value:function(O){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(D)return this.domNode.textContent.slice(0,O).lastIndexOf(` 1026`);var L=this.domNode.textContent.slice(O).indexOf(` 1027`);return L>-1?O+L:-1}},{key:"optimize",value:function(O){this.domNode.textContent.endsWith(` 1028`)||this.appendChild(h.default.create("text",` 1029`)),l(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"optimize",this).call(this,O);var D=this.next;D!=null&&D.prev===this&&D.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===D.statics.formats(D.domNode)&&(D.optimize(O),D.moveChildren(this),D.remove())}},{key:"replace",value:function(O){l(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"replace",this).call(this,O),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(D){var L=h.default.find(D);L==null?D.parentNode.removeChild(D):L instanceof h.default.Embed?L.remove():L.unwrap()})}}],[{key:"create",value:function(O){var D=l(M.__proto__||Object.getPrototypeOf(M),"create",this).call(this,O);return D.setAttribute("spellcheck",!1),D}},{key:"formats",value:function(){return!0}}]),M})(g.default);T.blotName="code-block",T.tagName="PRE",T.TAB=" ",n.Code=k,n.default=T}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(V){return typeof V}:function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V},o=(function(){function V(z,I){var B=[],H=!0,J=!1,ee=void 0;try{for(var Y=z[Symbol.iterator](),X;!(H=(X=Y.next()).done)&&(B.push(X.value),!(I&&B.length===I));H=!0);}catch(ne){J=!0,ee=ne}finally{try{!H&&Y.return&&Y.return()}finally{if(J)throw ee}}return B}return function(z,I){if(Array.isArray(z))return z;if(Symbol.iterator in Object(z))return V(z,I);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),l=(function(){function V(z,I){for(var B=0;B<I.length;B++){var H=I[B];H.enumerable=H.enumerable||!1,H.configurable=!0,"value"in H&&(H.writable=!0),Object.defineProperty(z,H.key,H)}}return function(z,I,B){return I&&V(z.prototype,I),B&&V(z,B),z}})(),c=i(2),d=D(c),u=i(20),h=D(u),m=i(0),g=D(m),b=i(13),v=D(b),y=i(24),x=D(y),w=i(4),_=D(w),j=i(16),S=D(j),k=i(21),T=D(k),P=i(11),M=D(P),C=i(3),O=D(C);function D(V){return V&&V.__esModule?V:{default:V}}function L(V,z,I){return z in V?Object.defineProperty(V,z,{value:I,enumerable:!0,configurable:!0,writable:!0}):V[z]=I,V}function F(V,z){if(!(V instanceof z))throw new TypeError("Cannot call a class as a function")}var U=/^[ -~]*$/,G=(function(){function V(z){F(this,V),this.scroll=z,this.delta=this.getDelta()}return l(V,[{key:"applyDelta",value:function(I){var B=this,H=!1;this.scroll.update();var J=this.scroll.length();return this.scroll.batchStart(),I=q(I),I.reduce(function(ee,Y){var X=Y.retain||Y.delete||Y.insert.length||1,ne=Y.attributes||{};if(Y.insert!=null){if(typeof Y.insert=="string"){var Q=Y.insert;Q.endsWith(` 1030`)&&H&&(H=!1,Q=Q.slice(0,-1)),ee>=J&&!Q.endsWith(` 1031`)&&(H=!0),B.scroll.insertAt(ee,Q);var ie=B.scroll.line(ee),me=o(ie,2),oe=me[0],Ne=me[1],_e=(0,O.default)({},(0,w.bubbleFormats)(oe));if(oe instanceof _.default){var xe=oe.descendant(g.default.Leaf,Ne),Ee=o(xe,1),Pe=Ee[0];_e=(0,O.default)(_e,(0,w.bubbleFormats)(Pe))}ne=h.default.attributes.diff(_e,ne)||{}}else if(s(Y.insert)==="object"){var Z=Object.keys(Y.insert)[0];if(Z==null)return ee;B.scroll.insertAt(ee,Z,Y.insert[Z])}J+=X}return Object.keys(ne).forEach(function(ae){B.scroll.formatAt(ee,X,ae,ne[ae])}),ee+X},0),I.reduce(function(ee,Y){return typeof Y.delete=="number"?(B.scroll.deleteAt(ee,Y.delete),ee):ee+(Y.retain||Y.insert.length||1)},0),this.scroll.batchEnd(),this.update(I)}},{key:"deleteText",value:function(I,B){return this.scroll.deleteAt(I,B),this.update(new d.default().retain(I).delete(B))}},{key:"formatLine",value:function(I,B){var H=this,J=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(J).forEach(function(ee){if(!(H.scroll.whitelist!=null&&!H.scroll.whitelist[ee])){var Y=H.scroll.lines(I,Math.max(B,1)),X=B;Y.forEach(function(ne){var Q=ne.length();if(!(ne instanceof v.default))ne.format(ee,J[ee]);else{var ie=I-ne.offset(H.scroll),me=ne.newlineIndex(ie+X)-ie+1;ne.formatAt(ie,me,ee,J[ee])}X-=Q})}}),this.scroll.optimize(),this.update(new d.default().retain(I).retain(B,(0,T.default)(J)))}},{key:"formatText",value:function(I,B){var H=this,J=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(J).forEach(function(ee){H.scroll.formatAt(I,B,ee,J[ee])}),this.update(new d.default().retain(I).retain(B,(0,T.default)(J)))}},{key:"getContents",value:function(I,B){return this.delta.slice(I,I+B)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(I,B){return I.concat(B.delta())},new d.default)}},{key:"getFormat",value:function(I){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,H=[],J=[];B===0?this.scroll.path(I).forEach(function(Y){var X=o(Y,1),ne=X[0];ne instanceof _.default?H.push(ne):ne instanceof g.default.Leaf&&J.push(ne)}):(H=this.scroll.lines(I,B),J=this.scroll.descendants(g.default.Leaf,I,B));var ee=[H,J].map(function(Y){if(Y.length===0)return{};for(var X=(0,w.bubbleFormats)(Y.shift());Object.keys(X).length>0;){var ne=Y.shift();if(ne==null)return X;X=W((0,w.bubbleFormats)(ne),X)}return X});return O.default.apply(O.default,ee)}},{key:"getText",value:function(I,B){return this.getContents(I,B).filter(function(H){return typeof H.insert=="string"}).map(function(H){return H.insert}).join("")}},{key:"insertEmbed",value:function(I,B,H){return this.scroll.insertAt(I,B,H),this.update(new d.default().retain(I).insert(L({},B,H)))}},{key:"insertText",value:function(I,B){var H=this,J=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return B=B.replace(/\r\n/g,` 1032`).replace(/\r/g,` 1033`),this.scroll.insertAt(I,B),Object.keys(J).forEach(function(ee){H.scroll.formatAt(I,B.length,ee,J[ee])}),this.update(new d.default().retain(I).insert(B,(0,T.default)(J)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var I=this.scroll.children.head;return I.statics.blotName!==_.default.blotName||I.children.length>1?!1:I.children.head instanceof S.default}},{key:"removeFormat",value:function(I,B){var H=this.getText(I,B),J=this.scroll.line(I+B),ee=o(J,2),Y=ee[0],X=ee[1],ne=0,Q=new d.default;Y!=null&&(Y instanceof v.default?ne=Y.newlineIndex(X)-X+1:ne=Y.length()-X,Q=Y.delta().slice(X,X+ne-1).insert(` 1034`));var ie=this.getContents(I,B+ne),me=ie.diff(new d.default().insert(H).concat(Q)),oe=new d.default().retain(I).concat(me);return this.applyDelta(oe)}},{key:"update",value:function(I){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,J=this.delta;if(B.length===1&&B[0].type==="characterData"&&B[0].target.data.match(U)&&g.default.find(B[0].target)){var ee=g.default.find(B[0].target),Y=(0,w.bubbleFormats)(ee),X=ee.offset(this.scroll),ne=B[0].oldValue.replace(x.default.CONTENTS,""),Q=new d.default().insert(ne),ie=new d.default().insert(ee.value()),me=new d.default().retain(X).concat(Q.diff(ie,H));I=me.reduce(function(oe,Ne){return Ne.insert?oe.insert(Ne.insert,Y):oe.push(Ne)},new d.default),this.delta=J.compose(I)}else this.delta=this.getDelta(),(!I||!(0,M.default)(J.compose(I),this.delta))&&(I=J.diff(this.delta,H));return I}}]),V})();function W(V,z){return Object.keys(z).reduce(function(I,B){return V[B]==null||(z[B]===V[B]?I[B]=z[B]:Array.isArray(z[B])?z[B].indexOf(V[B])<0&&(I[B]=z[B].concat([V[B]])):I[B]=[z[B],V[B]]),I},{})}function q(V){return V.reduce(function(z,I){if(I.insert===1){var B=(0,T.default)(I.attributes);return delete B.image,z.insert({image:I.attributes.image},B)}if(I.attributes!=null&&(I.attributes.list===!0||I.attributes.bullet===!0)&&(I=(0,T.default)(I),I.attributes.list?I.attributes.list="ordered":(I.attributes.list="bullet",delete I.attributes.bullet)),typeof I.insert=="string"){var H=I.insert.replace(/\r\n/g,` 1035`).replace(/\r/g,` 1036`);return z.insert(H,I.attributes)}return z.push(I)},new d.default)}n.default=G}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.Range=void 0;var s=(function(){function P(M,C){var O=[],D=!0,L=!1,F=void 0;try{for(var U=M[Symbol.iterator](),G;!(D=(G=U.next()).done)&&(O.push(G.value),!(C&&O.length===C));D=!0);}catch(W){L=!0,F=W}finally{try{!D&&U.return&&U.return()}finally{if(L)throw F}}return O}return function(M,C){if(Array.isArray(M))return M;if(Symbol.iterator in Object(M))return P(M,C);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=(function(){function P(M,C){for(var O=0;O<C.length;O++){var D=C[O];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(M,D.key,D)}}return function(M,C,O){return C&&P(M.prototype,C),O&&P(M,O),M}})(),l=i(0),c=x(l),d=i(21),u=x(d),h=i(11),m=x(h),g=i(8),b=x(g),v=i(10),y=x(v);function x(P){return P&&P.__esModule?P:{default:P}}function w(P){if(Array.isArray(P)){for(var M=0,C=Array(P.length);M<P.length;M++)C[M]=P[M];return C}else return Array.from(P)}function _(P,M){if(!(P instanceof M))throw new TypeError("Cannot call a class as a function")}var j=(0,y.default)("quill:selection"),S=function P(M){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;_(this,P),this.index=M,this.length=C},k=(function(){function P(M,C){var O=this;_(this,P),this.emitter=C,this.scroll=M,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=c.default.create("cursor",this),this.lastRange=this.savedRange=new S(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){O.mouseDown||setTimeout(O.update.bind(O,b.default.sources.USER),1)}),this.emitter.on(b.default.events.EDITOR_CHANGE,function(D,L){D===b.default.events.TEXT_CHANGE&&L.length()>0&&O.update(b.default.sources.SILENT)}),this.emitter.on(b.default.events.SCROLL_BEFORE_UPDATE,function(){if(O.hasFocus()){var D=O.getNativeRange();D!=null&&D.start.node!==O.cursor.textNode&&O.emitter.once(b.default.events.SCROLL_UPDATE,function(){try{O.setNativeRange(D.start.node,D.start.offset,D.end.node,D.end.offset)}catch{}})}}),this.emitter.on(b.default.events.SCROLL_OPTIMIZE,function(D,L){if(L.range){var F=L.range,U=F.startNode,G=F.startOffset,W=F.endNode,q=F.endOffset;O.setNativeRange(U,G,W,q)}}),this.update(b.default.sources.SILENT)}return o(P,[{key:"handleComposition",value:function(){var C=this;this.root.addEventListener("compositionstart",function(){C.composing=!0}),this.root.addEventListener("compositionend",function(){if(C.composing=!1,C.cursor.parent){var O=C.cursor.restore();if(!O)return;setTimeout(function(){C.setNativeRange(O.startNode,O.startOffset,O.endNode,O.endOffset)},1)}})}},{key:"handleDragging",value:function(){var C=this;this.emitter.listenDOM("mousedown",document.body,function(){C.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){C.mouseDown=!1,C.update(b.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(C,O){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[C])){this.scroll.update();var D=this.getNativeRange();if(!(D==null||!D.native.collapsed||c.default.query(C,c.default.Scope.BLOCK))){if(D.start.node!==this.cursor.textNode){var L=c.default.find(D.start.node,!1);if(L==null)return;if(L instanceof c.default.Leaf){var F=L.split(D.start.offset);L.parent.insertBefore(this.cursor,F)}else L.insertBefore(this.cursor,D.start.node);this.cursor.attach()}this.cursor.format(C,O),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(C){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,D=this.scroll.length();C=Math.min(C,D-1),O=Math.min(C+O,D-1)-C;var L=void 0,F=this.scroll.leaf(C),U=s(F,2),G=U[0],W=U[1];if(G==null)return null;var q=G.position(W,!0),V=s(q,2);L=V[0],W=V[1];var z=document.createRange();if(O>0){z.setStart(L,W);var I=this.scroll.leaf(C+O),B=s(I,2);if(G=B[0],W=B[1],G==null)return null;var H=G.position(W,!0),J=s(H,2);return L=J[0],W=J[1],z.setEnd(L,W),z.getBoundingClientRect()}else{var ee="left",Y=void 0;return L instanceof Text?(W<L.data.length?(z.setStart(L,W),z.setEnd(L,W+1)):(z.setStart(L,W-1),z.setEnd(L,W),ee="right"),Y=z.getBoundingClientRect()):(Y=G.domNode.getBoundingClientRect(),W>0&&(ee="right")),{bottom:Y.top+Y.height,height:Y.height,left:Y[ee],right:Y[ee],top:Y.top,width:0}}}},{key:"getNativeRange",value:function(){var C=document.getSelection();if(C==null||C.rangeCount<=0)return null;var O=C.getRangeAt(0);if(O==null)return null;var D=this.normalizeNative(O);return j.info("getNativeRange",D),D}},{key:"getRange",value:function(){var C=this.getNativeRange();if(C==null)return[null,null];var O=this.normalizedToRange(C);return[O,C]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(C){var O=this,D=[[C.start.node,C.start.offset]];C.native.collapsed||D.push([C.end.node,C.end.offset]);var L=D.map(function(G){var W=s(G,2),q=W[0],V=W[1],z=c.default.find(q,!0),I=z.offset(O.scroll);return V===0?I:z instanceof c.default.Container?I+z.length():I+z.index(q,V)}),F=Math.min(Math.max.apply(Math,w(L)),this.scroll.length()-1),U=Math.min.apply(Math,[F].concat(w(L)));return new S(U,F-U)}},{key:"normalizeNative",value:function(C){if(!T(this.root,C.startContainer)||!C.collapsed&&!T(this.root,C.endContainer))return null;var O={start:{node:C.startContainer,offset:C.startOffset},end:{node:C.endContainer,offset:C.endOffset},native:C};return[O.start,O.end].forEach(function(D){for(var L=D.node,F=D.offset;!(L instanceof Text)&&L.childNodes.length>0;)if(L.childNodes.length>F)L=L.childNodes[F],F=0;else if(L.childNodes.length===F)L=L.lastChild,F=L instanceof Text?L.data.length:L.childNodes.length+1;else break;D.node=L,D.offset=F}),O}},{key:"rangeToNative",value:function(C){var O=this,D=C.collapsed?[C.index]:[C.index,C.index+C.length],L=[],F=this.scroll.length();return D.forEach(function(U,G){U=Math.min(F-1,U);var W=void 0,q=O.scroll.leaf(U),V=s(q,2),z=V[0],I=V[1],B=z.position(I,G!==0),H=s(B,2);W=H[0],I=H[1],L.push(W,I)}),L.length<2&&(L=L.concat(L)),L}},{key:"scrollIntoView",value:function(C){var O=this.lastRange;if(O!=null){var D=this.getBounds(O.index,O.length);if(D!=null){var L=this.scroll.length()-1,F=this.scroll.line(Math.min(O.index,L)),U=s(F,1),G=U[0],W=G;if(O.length>0){var q=this.scroll.line(Math.min(O.index+O.length,L)),V=s(q,1);W=V[0]}if(!(G==null||W==null)){var z=C.getBoundingClientRect();D.top<z.top?C.scrollTop-=z.top-D.top:D.bottom>z.bottom&&(C.scrollTop+=D.bottom-z.bottom)}}}}},{key:"setNativeRange",value:function(C,O){var D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:C,L=arguments.length>3&&arguments[3]!==void 0?arguments[3]:O,F=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(j.info("setNativeRange",C,O,D,L),!(C!=null&&(this.root.parentNode==null||C.parentNode==null||D.parentNode==null))){var U=document.getSelection();if(U!=null)if(C!=null){this.hasFocus()||this.root.focus();var G=(this.getNativeRange()||{}).native;if(G==null||F||C!==G.startContainer||O!==G.startOffset||D!==G.endContainer||L!==G.endOffset){C.tagName=="BR"&&(O=[].indexOf.call(C.parentNode.childNodes,C),C=C.parentNode),D.tagName=="BR"&&(L=[].indexOf.call(D.parentNode.childNodes,D),D=D.parentNode);var W=document.createRange();W.setStart(C,O),W.setEnd(D,L),U.removeAllRanges(),U.addRange(W)}}else U.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(C){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:b.default.sources.API;if(typeof O=="string"&&(D=O,O=!1),j.info("setRange",C),C!=null){var L=this.rangeToNative(C);this.setNativeRange.apply(this,w(L).concat([O]))}else this.setNativeRange(null);this.update(D)}},{key:"update",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:b.default.sources.USER,O=this.lastRange,D=this.getRange(),L=s(D,2),F=L[0],U=L[1];if(this.lastRange=F,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,m.default)(O,this.lastRange)){var G;!this.composing&&U!=null&&U.native.collapsed&&U.start.node!==this.cursor.textNode&&this.cursor.restore();var W=[b.default.events.SELECTION_CHANGE,(0,u.default)(this.lastRange),(0,u.default)(O),C];if((G=this.emitter).emit.apply(G,[b.default.events.EDITOR_CHANGE].concat(W)),C!==b.default.sources.SILENT){var q;(q=this.emitter).emit.apply(q,W)}}}}]),P})();function T(P,M){try{M.parentNode}catch{return!1}return M instanceof Text&&(M=M.parentNode),P.contains(M)}n.Range=S,n.default=k}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=(function(){function b(v,y){for(var x=0;x<y.length;x++){var w=y[x];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(v,w.key,w)}}return function(v,y,x){return y&&b(v.prototype,y),x&&b(v,x),v}})(),o=function b(v,y,x){v===null&&(v=Function.prototype);var w=Object.getOwnPropertyDescriptor(v,y);if(w===void 0){var _=Object.getPrototypeOf(v);return _===null?void 0:b(_,y,x)}else{if("value"in w)return w.value;var j=w.get;return j===void 0?void 0:j.call(x)}},l=i(0),c=d(l);function d(b){return b&&b.__esModule?b:{default:b}}function u(b,v){if(!(b instanceof v))throw new TypeError("Cannot call a class as a function")}function h(b,v){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:b}function m(b,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);b.prototype=Object.create(v&&v.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(b,v):b.__proto__=v)}var g=(function(b){m(v,b);function v(){return u(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return s(v,[{key:"insertInto",value:function(x,w){x.children.length===0?o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"insertInto",this).call(this,x,w):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),v})(c.default.Embed);g.blotName="break",g.tagName="BR",n.default=g}),(function(r,n,i){var s=this&&this.__extends||(function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,g){m.__proto__=g}||function(m,g){for(var b in g)g.hasOwnProperty(b)&&(m[b]=g[b])};return function(m,g){h(m,g);function b(){this.constructor=m}m.prototype=g===null?Object.create(g):(b.prototype=g.prototype,new b)}})();Object.defineProperty(n,"__esModule",{value:!0});var o=i(44),l=i(30),c=i(1),d=(function(h){s(m,h);function m(g){var b=h.call(this,g)||this;return b.build(),b}return m.prototype.appendChild=function(g){this.insertBefore(g)},m.prototype.attach=function(){h.prototype.attach.call(this),this.children.forEach(function(g){g.attach()})},m.prototype.build=function(){var g=this;this.children=new o.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(b){try{var v=u(b);g.insertBefore(v,g.children.head||void 0)}catch(y){if(y instanceof c.ParchmentError)return;throw y}})},m.prototype.deleteAt=function(g,b){if(g===0&&b===this.length())return this.remove();this.children.forEachAt(g,b,function(v,y,x){v.deleteAt(y,x)})},m.prototype.descendant=function(g,b){var v=this.children.find(b),y=v[0],x=v[1];return g.blotName==null&&g(y)||g.blotName!=null&&y instanceof g?[y,x]:y instanceof m?y.descendant(g,x):[null,-1]},m.prototype.descendants=function(g,b,v){b===void 0&&(b=0),v===void 0&&(v=Number.MAX_VALUE);var y=[],x=v;return this.children.forEachAt(b,v,function(w,_,j){(g.blotName==null&&g(w)||g.blotName!=null&&w instanceof g)&&y.push(w),w instanceof m&&(y=y.concat(w.descendants(g,_,x))),x-=j}),y},m.prototype.detach=function(){this.children.forEach(function(g){g.detach()}),h.prototype.detach.call(this)},m.prototype.formatAt=function(g,b,v,y){this.children.forEachAt(g,b,function(x,w,_){x.formatAt(w,_,v,y)})},m.prototype.insertAt=function(g,b,v){var y=this.children.find(g),x=y[0],w=y[1];if(x)x.insertAt(w,b,v);else{var _=v==null?c.create("text",b):c.create(b,v);this.appendChild(_)}},m.prototype.insertBefore=function(g,b){if(this.statics.allowedChildren!=null&&!this.statics.allowedChildren.some(function(v){return g instanceof v}))throw new c.ParchmentError("Cannot insert "+g.statics.blotName+" into "+this.statics.blotName);g.insertInto(this,b)},m.prototype.length=function(){return this.children.reduce(function(g,b){return g+b.length()},0)},m.prototype.moveChildren=function(g,b){this.children.forEach(function(v){g.insertBefore(v,b)})},m.prototype.optimize=function(g){if(h.prototype.optimize.call(this,g),this.children.length===0)if(this.statics.defaultChild!=null){var b=c.create(this.statics.defaultChild);this.appendChild(b),b.optimize(g)}else this.remove()},m.prototype.path=function(g,b){b===void 0&&(b=!1);var v=this.children.find(g,b),y=v[0],x=v[1],w=[[this,g]];return y instanceof m?w.concat(y.path(x,b)):(y!=null&&w.push([y,x]),w)},m.prototype.removeChild=function(g){this.children.remove(g)},m.prototype.replace=function(g){g instanceof m&&g.moveChildren(this),h.prototype.replace.call(this,g)},m.prototype.split=function(g,b){if(b===void 0&&(b=!1),!b){if(g===0)return this;if(g===this.length())return this.next}var v=this.clone();return this.parent.insertBefore(v,this.next),this.children.forEachAt(g,this.length(),function(y,x,w){y=y.split(x,b),v.appendChild(y)}),v},m.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},m.prototype.update=function(g,b){var v=this,y=[],x=[];g.forEach(function(w){w.target===v.domNode&&w.type==="childList"&&(y.push.apply(y,w.addedNodes),x.push.apply(x,w.removedNodes))}),x.forEach(function(w){if(!(w.parentNode!=null&&w.tagName!=="IFRAME"&&document.body.compareDocumentPosition(w)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var _=c.find(w);_!=null&&(_.domNode.parentNode==null||_.domNode.parentNode===v.domNode)&&_.detach()}}),y.filter(function(w){return w.parentNode==v.domNode}).sort(function(w,_){return w===_?0:w.compareDocumentPosition(_)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(w){var _=null;w.nextSibling!=null&&(_=c.find(w.nextSibling));var j=u(w);(j.next!=_||j.next==null)&&(j.parent!=null&&j.parent.removeChild(v),v.insertBefore(j,_||void 0))})},m})(l.default);function u(h){var m=c.find(h);if(m==null)try{m=c.create(h)}catch{m=c.create(c.Scope.INLINE),[].slice.call(h.childNodes).forEach(function(b){m.domNode.appendChild(b)}),h.parentNode&&h.parentNode.replaceChild(m.domNode,h),m.attach()}return m}n.default=d}),(function(r,n,i){var s=this&&this.__extends||(function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,g){m.__proto__=g}||function(m,g){for(var b in g)g.hasOwnProperty(b)&&(m[b]=g[b])};return function(m,g){h(m,g);function b(){this.constructor=m}m.prototype=g===null?Object.create(g):(b.prototype=g.prototype,new b)}})();Object.defineProperty(n,"__esModule",{value:!0});var o=i(12),l=i(31),c=i(17),d=i(1),u=(function(h){s(m,h);function m(g){var b=h.call(this,g)||this;return b.attributes=new l.default(b.domNode),b}return m.formats=function(g){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return g.tagName.toLowerCase()},m.prototype.format=function(g,b){var v=d.query(g);v instanceof o.default?this.attributes.attribute(v,b):b&&v!=null&&(g!==this.statics.blotName||this.formats()[g]!==b)&&this.replaceWith(g,b)},m.prototype.formats=function(){var g=this.attributes.values(),b=this.statics.formats(this.domNode);return b!=null&&(g[this.statics.blotName]=b),g},m.prototype.replaceWith=function(g,b){var v=h.prototype.replaceWith.call(this,g,b);return this.attributes.copy(v),v},m.prototype.update=function(g,b){var v=this;h.prototype.update.call(this,g,b),g.some(function(y){return y.target===v.domNode&&y.type==="attributes"})&&this.attributes.build()},m.prototype.wrap=function(g,b){var v=h.prototype.wrap.call(this,g,b);return v instanceof m&&v.statics.scope===this.statics.scope&&this.attributes.move(v),v},m})(c.default);n.default=u}),(function(r,n,i){var s=this&&this.__extends||(function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var m in h)h.hasOwnProperty(m)&&(u[m]=h[m])};return function(u,h){d(u,h);function m(){this.constructor=u}u.prototype=h===null?Object.create(h):(m.prototype=h.prototype,new m)}})();Object.defineProperty(n,"__esModule",{value:!0});var o=i(30),l=i(1),c=(function(d){s(u,d);function u(){return d!==null&&d.apply(this,arguments)||this}return u.value=function(h){return!0},u.prototype.index=function(h,m){return this.domNode===h||this.domNode.compareDocumentPosition(h)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(m,1):-1},u.prototype.position=function(h,m){var g=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return h>0&&(g+=1),[this.parent.domNode,g]},u.prototype.value=function(){var h;return h={},h[this.statics.blotName]=this.statics.value(this.domNode)||!0,h},u.scope=l.Scope.INLINE_BLOT,u})(o.default);n.default=c}),(function(r,n,i){var s=i(11),o=i(3),l={attributes:{compose:function(d,u,h){typeof d!="object"&&(d={}),typeof u!="object"&&(u={});var m=o(!0,{},u);h||(m=Object.keys(m).reduce(function(b,v){return m[v]!=null&&(b[v]=m[v]),b},{}));for(var g in d)d[g]!==void 0&&u[g]===void 0&&(m[g]=d[g]);return Object.keys(m).length>0?m:void 0},diff:function(d,u){typeof d!="object"&&(d={}),typeof u!="object"&&(u={});var h=Object.keys(d).concat(Object.keys(u)).reduce(function(m,g){return s(d[g],u[g])||(m[g]=u[g]===void 0?null:u[g]),m},{});return Object.keys(h).length>0?h:void 0},transform:function(d,u,h){if(typeof d!="object")return u;if(typeof u=="object"){if(!h)return u;var m=Object.keys(u).reduce(function(g,b){return d[b]===void 0&&(g[b]=u[b]),g},{});return Object.keys(m).length>0?m:void 0}}},iterator:function(d){return new c(d)},length:function(d){return typeof d.delete=="number"?d.delete:typeof d.retain=="number"?d.retain:typeof d.insert=="string"?d.insert.length:1}};function c(d){this.ops=d,this.index=0,this.offset=0}c.prototype.hasNext=function(){return this.peekLength()<1/0},c.prototype.next=function(d){d||(d=1/0);var u=this.ops[this.index];if(u){var h=this.offset,m=l.length(u);if(d>=m-h?(d=m-h,this.index+=1,this.offset=0):this.offset+=d,typeof u.delete=="number")return{delete:d};var g={};return u.attributes&&(g.attributes=u.attributes),typeof u.retain=="number"?g.retain=d:typeof u.insert=="string"?g.insert=u.insert.substr(h,d):g.insert=u.insert,g}else return{retain:1/0}},c.prototype.peek=function(){return this.ops[this.index]},c.prototype.peekLength=function(){return this.ops[this.index]?l.length(this.ops[this.index])-this.offset:1/0},c.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},c.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var d=this.offset,u=this.index,h=this.next(),m=this.ops.slice(this.index);return this.offset=d,this.index=u,[h].concat(m)}else return[]},r.exports=l}),(function(r,n){var i=(function(){function s(v,y){return y!=null&&v instanceof y}var o;try{o=Map}catch{o=function(){}}var l;try{l=Set}catch{l=function(){}}var c;try{c=Promise}catch{c=function(){}}function d(v,y,x,w,_){typeof y=="object"&&(x=y.depth,w=y.prototype,_=y.includeNonEnumerable,y=y.circular);var j=[],S=[],k=typeof Buffer<"u";typeof y>"u"&&(y=!0),typeof x>"u"&&(x=1/0);function T(P,M){if(P===null)return null;if(M===0)return P;var C,O;if(typeof P!="object")return P;if(s(P,o))C=new o;else if(s(P,l))C=new l;else if(s(P,c))C=new c(function(z,I){P.then(function(B){z(T(B,M-1))},function(B){I(T(B,M-1))})});else if(d.__isArray(P))C=[];else if(d.__isRegExp(P))C=new RegExp(P.source,b(P)),P.lastIndex&&(C.lastIndex=P.lastIndex);else if(d.__isDate(P))C=new Date(P.getTime());else{if(k&&Buffer.isBuffer(P))return Buffer.allocUnsafe?C=Buffer.allocUnsafe(P.length):C=new Buffer(P.length),P.copy(C),C;s(P,Error)?C=Object.create(P):typeof w>"u"?(O=Object.getPrototypeOf(P),C=Object.create(O)):(C=Object.create(w),O=w)}if(y){var D=j.indexOf(P);if(D!=-1)return S[D];j.push(P),S.push(C)}s(P,o)&&P.forEach(function(z,I){var B=T(I,M-1),H=T(z,M-1);C.set(B,H)}),s(P,l)&&P.forEach(function(z){var I=T(z,M-1);C.add(I)});for(var L in P){var F;O&&(F=Object.getOwnPropertyDescriptor(O,L)),!(F&&F.set==null)&&(C[L]=T(P[L],M-1))}if(Object.getOwnPropertySymbols)for(var U=Object.getOwnPropertySymbols(P),L=0;L<U.length;L++){var G=U[L],W=Object.getOwnPropertyDescriptor(P,G);W&&!W.enumerable&&!_||(C[G]=T(P[G],M-1),W.enumerable||Object.defineProperty(C,G,{enumerable:!1}))}if(_)for(var q=Object.getOwnPropertyNames(P),L=0;L<q.length;L++){var V=q[L],W=Object.getOwnPropertyDescriptor(P,V);W&&W.enumerable||(C[V]=T(P[V],M-1),Object.defineProperty(C,V,{enumerable:!1}))}return C}return T(v,x)}d.clonePrototype=function(y){if(y===null)return null;var x=function(){};return x.prototype=y,new x};function u(v){return Object.prototype.toString.call(v)}d.__objToStr=u;function h(v){return typeof v=="object"&&u(v)==="[object Date]"}d.__isDate=h;function m(v){return typeof v=="object"&&u(v)==="[object Array]"}d.__isArray=m;function g(v){return typeof v=="object"&&u(v)==="[object RegExp]"}d.__isRegExp=g;function b(v){var y="";return v.global&&(y+="g"),v.ignoreCase&&(y+="i"),v.multiline&&(y+="m"),y}return d.__getRegExpFlags=b,d})();typeof r=="object"&&r.exports&&(r.exports=i)}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=(function(){function C(O,D){var L=[],F=!0,U=!1,G=void 0;try{for(var W=O[Symbol.iterator](),q;!(F=(q=W.next()).done)&&(L.push(q.value),!(D&&L.length===D));F=!0);}catch(V){U=!0,G=V}finally{try{!F&&W.return&&W.return()}finally{if(U)throw G}}return L}return function(O,D){if(Array.isArray(O))return O;if(Symbol.iterator in Object(O))return C(O,D);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=(function(){function C(O,D){for(var L=0;L<D.length;L++){var F=D[L];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(O,F.key,F)}}return function(O,D,L){return D&&C(O.prototype,D),L&&C(O,L),O}})(),l=function C(O,D,L){O===null&&(O=Function.prototype);var F=Object.getOwnPropertyDescriptor(O,D);if(F===void 0){var U=Object.getPrototypeOf(O);return U===null?void 0:C(U,D,L)}else{if("value"in F)return F.value;var G=F.get;return G===void 0?void 0:G.call(L)}},c=i(0),d=j(c),u=i(8),h=j(u),m=i(4),g=j(m),b=i(16),v=j(b),y=i(13),x=j(y),w=i(25),_=j(w);function j(C){return C&&C.__esModule?C:{default:C}}function S(C,O){if(!(C instanceof O))throw new TypeError("Cannot call a class as a function")}function k(C,O){if(!C)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:C}function T(C,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);C.prototype=Object.create(O&&O.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(C,O):C.__proto__=O)}function P(C){return C instanceof g.default||C instanceof m.BlockEmbed}var M=(function(C){T(O,C);function O(D,L){S(this,O);var F=k(this,(O.__proto__||Object.getPrototypeOf(O)).call(this,D));return F.emitter=L.emitter,Array.isArray(L.whitelist)&&(F.whitelist=L.whitelist.reduce(function(U,G){return U[G]=!0,U},{})),F.domNode.addEventListener("DOMNodeInserted",function(){}),F.optimize(),F.enable(),F}return o(O,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(L,F){var U=this.line(L),G=s(U,2),W=G[0],q=G[1],V=this.line(L+F),z=s(V,1),I=z[0];if(l(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"deleteAt",this).call(this,L,F),I!=null&&W!==I&&q>0){if(W instanceof m.BlockEmbed||I instanceof m.BlockEmbed){this.optimize();return}if(W instanceof x.default){var B=W.newlineIndex(W.length(),!0);if(B>-1&&(W=W.split(B+1),W===I)){this.optimize();return}}else if(I instanceof x.default){var H=I.newlineIndex(0);H>-1&&I.split(H+1)}var J=I.children.head instanceof v.default?null:I.children.head;W.moveChildren(I,J),W.remove()}this.optimize()}},{key:"enable",value:function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",L)}},{key:"formatAt",value:function(L,F,U,G){this.whitelist!=null&&!this.whitelist[U]||(l(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"formatAt",this).call(this,L,F,U,G),this.optimize())}},{key:"insertAt",value:function(L,F,U){if(!(U!=null&&this.whitelist!=null&&!this.whitelist[F])){if(L>=this.length())if(U==null||d.default.query(F,d.default.Scope.BLOCK)==null){var G=d.default.create(this.statics.defaultChild);this.appendChild(G),U==null&&F.endsWith(` 1037`)&&(F=F.slice(0,-1)),G.insertAt(0,F,U)}else{var W=d.default.create(F,U);this.appendChild(W)}else l(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"insertAt",this).call(this,L,F,U);this.optimize()}}},{key:"insertBefore",value:function(L,F){if(L.statics.scope===d.default.Scope.INLINE_BLOT){var U=d.default.create(this.statics.defaultChild);U.appendChild(L),L=U}l(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"insertBefore",this).call(this,L,F)}},{key:"leaf",value:function(L){return this.path(L).pop()||[null,-1]}},{key:"line",value:function(L){return L===this.length()?this.line(L-1):this.descendant(P,L)}},{key:"lines",value:function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,U=function G(W,q,V){var z=[],I=V;return W.children.forEachAt(q,V,function(B,H,J){P(B)?z.push(B):B instanceof d.default.Container&&(z=z.concat(G(B,H,I))),I-=J}),z};return U(this,L,F)}},{key:"optimize",value:function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(l(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"optimize",this).call(this,L,F),L.length>0&&this.emitter.emit(h.default.events.SCROLL_OPTIMIZE,L,F))}},{key:"path",value:function(L){return l(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"path",this).call(this,L).slice(1)}},{key:"update",value:function(L){if(this.batch!==!0){var F=h.default.sources.USER;typeof L=="string"&&(F=L),Array.isArray(L)||(L=this.observer.takeRecords()),L.length>0&&this.emitter.emit(h.default.events.SCROLL_BEFORE_UPDATE,F,L),l(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"update",this).call(this,L.concat([])),L.length>0&&this.emitter.emit(h.default.events.SCROLL_UPDATE,F,L)}}}]),O})(d.default.Scroll);M.blotName="scroll",M.className="ql-editor",M.tagName="DIV",M.defaultChild="block",M.allowedChildren=[g.default,m.BlockEmbed,_.default],n.default=M}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.SHORTKEY=n.default=void 0;var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Y){return typeof Y}:function(Y){return Y&&typeof Symbol=="function"&&Y.constructor===Symbol&&Y!==Symbol.prototype?"symbol":typeof Y},o=(function(){function Y(X,ne){var Q=[],ie=!0,me=!1,oe=void 0;try{for(var Ne=X[Symbol.iterator](),_e;!(ie=(_e=Ne.next()).done)&&(Q.push(_e.value),!(ne&&Q.length===ne));ie=!0);}catch(xe){me=!0,oe=xe}finally{try{!ie&&Ne.return&&Ne.return()}finally{if(me)throw oe}}return Q}return function(X,ne){if(Array.isArray(X))return X;if(Symbol.iterator in Object(X))return Y(X,ne);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),l=(function(){function Y(X,ne){for(var Q=0;Q<ne.length;Q++){var ie=ne[Q];ie.enumerable=ie.enumerable||!1,ie.configurable=!0,"value"in ie&&(ie.writable=!0),Object.defineProperty(X,ie.key,ie)}}return function(X,ne,Q){return ne&&Y(X.prototype,ne),Q&&Y(X,Q),X}})(),c=i(21),d=C(c),u=i(11),h=C(u),m=i(3),g=C(m),b=i(2),v=C(b),y=i(20),x=C(y),w=i(0),_=C(w),j=i(5),S=C(j),k=i(10),T=C(k),P=i(9),M=C(P);function C(Y){return Y&&Y.__esModule?Y:{default:Y}}function O(Y,X,ne){return X in Y?Object.defineProperty(Y,X,{value:ne,enumerable:!0,configurable:!0,writable:!0}):Y[X]=ne,Y}function D(Y,X){if(!(Y instanceof X))throw new TypeError("Cannot call a class as a function")}function L(Y,X){if(!Y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return X&&(typeof X=="object"||typeof X=="function")?X:Y}function F(Y,X){if(typeof X!="function"&&X!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof X);Y.prototype=Object.create(X&&X.prototype,{constructor:{value:Y,enumerable:!1,writable:!0,configurable:!0}}),X&&(Object.setPrototypeOf?Object.setPrototypeOf(Y,X):Y.__proto__=X)}var U=(0,T.default)("quill:keyboard"),G=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",W=(function(Y){F(X,Y),l(X,null,[{key:"match",value:function(Q,ie){return ie=ee(ie),["altKey","ctrlKey","metaKey","shiftKey"].some(function(me){return!!ie[me]!==Q[me]&&ie[me]!==null})?!1:ie.key===(Q.which||Q.keyCode)}}]);function X(ne,Q){D(this,X);var ie=L(this,(X.__proto__||Object.getPrototypeOf(X)).call(this,ne,Q));return ie.bindings={},Object.keys(ie.options.bindings).forEach(function(me){me==="list autofill"&&ne.scroll.whitelist!=null&&!ne.scroll.whitelist.list||ie.options.bindings[me]&&ie.addBinding(ie.options.bindings[me])}),ie.addBinding({key:X.keys.ENTER,shiftKey:null},B),ie.addBinding({key:X.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(ie.addBinding({key:X.keys.BACKSPACE},{collapsed:!0},V),ie.addBinding({key:X.keys.DELETE},{collapsed:!0},z)):(ie.addBinding({key:X.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},V),ie.addBinding({key:X.keys.DELETE},{collapsed:!0,suffix:/^.?$/},z)),ie.addBinding({key:X.keys.BACKSPACE},{collapsed:!1},I),ie.addBinding({key:X.keys.DELETE},{collapsed:!1},I),ie.addBinding({key:X.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},V),ie.listen(),ie}return l(X,[{key:"addBinding",value:function(Q){var ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},me=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},oe=ee(Q);if(oe==null||oe.key==null)return U.warn("Attempted to add invalid keyboard binding",oe);typeof ie=="function"&&(ie={handler:ie}),typeof me=="function"&&(me={handler:me}),oe=(0,g.default)(oe,ie,me),this.bindings[oe.key]=this.bindings[oe.key]||[],this.bindings[oe.key].push(oe)}},{key:"listen",value:function(){var Q=this;this.quill.root.addEventListener("keydown",function(ie){if(!ie.defaultPrevented){var me=ie.which||ie.keyCode,oe=(Q.bindings[me]||[]).filter(function(Dt){return X.match(ie,Dt)});if(oe.length!==0){var Ne=Q.quill.getSelection();if(!(Ne==null||!Q.quill.hasFocus())){var _e=Q.quill.getLine(Ne.index),xe=o(_e,2),Ee=xe[0],Pe=xe[1],Z=Q.quill.getLeaf(Ne.index),ae=o(Z,2),pe=ae[0],ye=ae[1],he=Ne.length===0?[pe,ye]:Q.quill.getLeaf(Ne.index+Ne.length),He=o(he,2),Te=He[0],it=He[1],_t=pe instanceof _.default.Text?pe.value().slice(0,ye):"",Bt=Te instanceof _.default.Text?Te.value().slice(it):"",Et={collapsed:Ne.length===0,empty:Ne.length===0&&Ee.length()<=1,format:Q.quill.getFormat(Ne),offset:Pe,prefix:_t,suffix:Bt},Yn=oe.some(function(Dt){if(Dt.collapsed!=null&&Dt.collapsed!==Et.collapsed||Dt.empty!=null&&Dt.empty!==Et.empty||Dt.offset!=null&&Dt.offset!==Et.offset)return!1;if(Array.isArray(Dt.format)){if(Dt.format.every(function(kr){return Et.format[kr]==null}))return!1}else if(s(Dt.format)==="object"&&!Object.keys(Dt.format).every(function(kr){return Dt.format[kr]===!0?Et.format[kr]!=null:Dt.format[kr]===!1?Et.format[kr]==null:(0,h.default)(Dt.format[kr],Et.format[kr])}))return!1;return Dt.prefix!=null&&!Dt.prefix.test(Et.prefix)||Dt.suffix!=null&&!Dt.suffix.test(Et.suffix)?!1:Dt.handler.call(Q,Ne,Et)!==!0});Yn&&ie.preventDefault()}}}})}}]),X})(M.default);W.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},W.DEFAULTS={bindings:{bold:J("bold"),italic:J("italic"),underline:J("underline"),indent:{key:W.keys.TAB,format:["blockquote","indent","list"],handler:function(X,ne){if(ne.collapsed&&ne.offset!==0)return!0;this.quill.format("indent","+1",S.default.sources.USER)}},outdent:{key:W.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(X,ne){if(ne.collapsed&&ne.offset!==0)return!0;this.quill.format("indent","-1",S.default.sources.USER)}},"outdent backspace":{key:W.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(X,ne){ne.format.indent!=null?this.quill.format("indent","-1",S.default.sources.USER):ne.format.list!=null&&this.quill.format("list",!1,S.default.sources.USER)}},"indent code-block":H(!0),"outdent code-block":H(!1),"remove tab":{key:W.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(X){this.quill.deleteText(X.index-1,1,S.default.sources.USER)}},tab:{key:W.keys.TAB,handler:function(X){this.quill.history.cutoff();var ne=new v.default().retain(X.index).delete(X.length).insert(" ");this.quill.updateContents(ne,S.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(X.index+1,S.default.sources.SILENT)}},"list empty enter":{key:W.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(X,ne){this.quill.format("list",!1,S.default.sources.USER),ne.format.indent&&this.quill.format("indent",!1,S.default.sources.USER)}},"checklist enter":{key:W.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(X){var ne=this.quill.getLine(X.index),Q=o(ne,2),ie=Q[0],me=Q[1],oe=(0,g.default)({},ie.formats(),{list:"checked"}),Ne=new v.default().retain(X.index).insert(` 1038`,oe).retain(ie.length()-me-1).retain(1,{list:"unchecked"});this.quill.updateContents(Ne,S.default.sources.USER),this.quill.setSelection(X.index+1,S.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:W.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(X,ne){var Q=this.quill.getLine(X.index),ie=o(Q,2),me=ie[0],oe=ie[1],Ne=new v.default().retain(X.index).insert(` 1039`,ne.format).retain(me.length()-oe-1).retain(1,{header:null});this.quill.updateContents(Ne,S.default.sources.USER),this.quill.setSelection(X.index+1,S.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(X,ne){var Q=ne.prefix.length,ie=this.quill.getLine(X.index),me=o(ie,2),oe=me[0],Ne=me[1];if(Ne>Q)return!0;var _e=void 0;switch(ne.prefix.trim()){case"[]":case"[ ]":_e="unchecked";break;case"[x]":_e="checked";break;case"-":case"*":_e="bullet";break;default:_e="ordered"}this.quill.insertText(X.index," ",S.default.sources.USER),this.quill.history.cutoff();var xe=new v.default().retain(X.index-Ne).delete(Q+1).retain(oe.length()-2-Ne).retain(1,{list:_e});this.quill.updateContents(xe,S.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(X.index-Q,S.default.sources.SILENT)}},"code exit":{key:W.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(X){var ne=this.quill.getLine(X.index),Q=o(ne,2),ie=Q[0],me=Q[1],oe=new v.default().retain(X.index+ie.length()-me-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(oe,S.default.sources.USER)}},"embed left":q(W.keys.LEFT,!1),"embed left shift":q(W.keys.LEFT,!0),"embed right":q(W.keys.RIGHT,!1),"embed right shift":q(W.keys.RIGHT,!0)}};function q(Y,X){var ne,Q=Y===W.keys.LEFT?"prefix":"suffix";return ne={key:Y,shiftKey:X,altKey:null},O(ne,Q,/^$/),O(ne,"handler",function(me){var oe=me.index;Y===W.keys.RIGHT&&(oe+=me.length+1);var Ne=this.quill.getLeaf(oe),_e=o(Ne,1),xe=_e[0];return xe instanceof _.default.Embed?(Y===W.keys.LEFT?X?this.quill.setSelection(me.index-1,me.length+1,S.default.sources.USER):this.quill.setSelection(me.index-1,S.default.sources.USER):X?this.quill.setSelection(me.index,me.length+1,S.default.sources.USER):this.quill.setSelection(me.index+me.length+1,S.default.sources.USER),!1):!0}),ne}function V(Y,X){if(!(Y.index===0||this.quill.getLength()<=1)){var ne=this.quill.getLine(Y.index),Q=o(ne,1),ie=Q[0],me={};if(X.offset===0){var oe=this.quill.getLine(Y.index-1),Ne=o(oe,1),_e=Ne[0];if(_e!=null&&_e.length()>1){var xe=ie.formats(),Ee=this.quill.getFormat(Y.index-1,1);me=x.default.attributes.diff(xe,Ee)||{}}}var Pe=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(X.prefix)?2:1;this.quill.deleteText(Y.index-Pe,Pe,S.default.sources.USER),Object.keys(me).length>0&&this.quill.formatLine(Y.index-Pe,Pe,me,S.default.sources.USER),this.quill.focus()}}function z(Y,X){var ne=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(X.suffix)?2:1;if(!(Y.index>=this.quill.getLength()-ne)){var Q={},ie=0,me=this.quill.getLine(Y.index),oe=o(me,1),Ne=oe[0];if(X.offset>=Ne.length()-1){var _e=this.quill.getLine(Y.index+1),xe=o(_e,1),Ee=xe[0];if(Ee){var Pe=Ne.formats(),Z=this.quill.getFormat(Y.index,1);Q=x.default.attributes.diff(Pe,Z)||{},ie=Ee.length()}}this.quill.deleteText(Y.index,ne,S.default.sources.USER),Object.keys(Q).length>0&&this.quill.formatLine(Y.index+ie-1,ne,Q,S.default.sources.USER)}}function I(Y){var X=this.quill.getLines(Y),ne={};if(X.length>1){var Q=X[0].formats(),ie=X[X.length-1].formats();ne=x.default.attributes.diff(ie,Q)||{}}this.quill.deleteText(Y,S.default.sources.USER),Object.keys(ne).length>0&&this.quill.formatLine(Y.index,1,ne,S.default.sources.USER),this.quill.setSelection(Y.index,S.default.sources.SILENT),this.quill.focus()}function B(Y,X){var ne=this;Y.length>0&&this.quill.scroll.deleteAt(Y.index,Y.length);var Q=Object.keys(X.format).reduce(function(ie,me){return _.default.query(me,_.default.Scope.BLOCK)&&!Array.isArray(X.format[me])&&(ie[me]=X.format[me]),ie},{});this.quill.insertText(Y.index,` 1040`,Q,S.default.sources.USER),this.quill.setSelection(Y.index+1,S.default.sources.SILENT),this.quill.focus(),Object.keys(X.format).forEach(function(ie){Q[ie]==null&&(Array.isArray(X.format[ie])||ie!=="link"&&ne.quill.format(ie,X.format[ie],S.default.sources.USER))})}function H(Y){return{key:W.keys.TAB,shiftKey:!Y,format:{"code-block":!0},handler:function(ne){var Q=_.default.query("code-block"),ie=ne.index,me=ne.length,oe=this.quill.scroll.descendant(Q,ie),Ne=o(oe,2),_e=Ne[0],xe=Ne[1];if(_e!=null){var Ee=this.quill.getIndex(_e),Pe=_e.newlineIndex(xe,!0)+1,Z=_e.newlineIndex(Ee+xe+me),ae=_e.domNode.textContent.slice(Pe,Z).split(` 1041`);xe=0,ae.forEach(function(pe,ye){Y?(_e.insertAt(Pe+xe,Q.TAB),xe+=Q.TAB.length,ye===0?ie+=Q.TAB.length:me+=Q.TAB.length):pe.startsWith(Q.TAB)&&(_e.deleteAt(Pe+xe,Q.TAB.length),xe-=Q.TAB.length,ye===0?ie-=Q.TAB.length:me-=Q.TAB.length),xe+=pe.length+1}),this.quill.update(S.default.sources.USER),this.quill.setSelection(ie,me,S.default.sources.SILENT)}}}}function J(Y){return{key:Y[0].toUpperCase(),shortKey:!0,handler:function(ne,Q){this.quill.format(Y,!Q.format[Y],S.default.sources.USER)}}}function ee(Y){if(typeof Y=="string"||typeof Y=="number")return ee({key:Y});if((typeof Y>"u"?"undefined":s(Y))==="object"&&(Y=(0,d.default)(Y,!1)),typeof Y.key=="string")if(W.keys[Y.key.toUpperCase()]!=null)Y.key=W.keys[Y.key.toUpperCase()];else if(Y.key.length===1)Y.key=Y.key.toUpperCase().charCodeAt(0);else return null;return Y.shortKey&&(Y[G]=Y.shortKey,delete Y.shortKey),Y}n.default=W,n.SHORTKEY=G}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=(function(){function x(w,_){var j=[],S=!0,k=!1,T=void 0;try{for(var P=w[Symbol.iterator](),M;!(S=(M=P.next()).done)&&(j.push(M.value),!(_&&j.length===_));S=!0);}catch(C){k=!0,T=C}finally{try{!S&&P.return&&P.return()}finally{if(k)throw T}}return j}return function(w,_){if(Array.isArray(w))return w;if(Symbol.iterator in Object(w))return x(w,_);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=function x(w,_,j){w===null&&(w=Function.prototype);var S=Object.getOwnPropertyDescriptor(w,_);if(S===void 0){var k=Object.getPrototypeOf(w);return k===null?void 0:x(k,_,j)}else{if("value"in S)return S.value;var T=S.get;return T===void 0?void 0:T.call(j)}},l=(function(){function x(w,_){for(var j=0;j<_.length;j++){var S=_[j];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(w,S.key,S)}}return function(w,_,j){return _&&x(w.prototype,_),j&&x(w,j),w}})(),c=i(0),d=m(c),u=i(7),h=m(u);function m(x){return x&&x.__esModule?x:{default:x}}function g(x,w){if(!(x instanceof w))throw new TypeError("Cannot call a class as a function")}function b(x,w){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:x}function v(x,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);x.prototype=Object.create(w&&w.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(x,w):x.__proto__=w)}var y=(function(x){v(w,x),l(w,null,[{key:"value",value:function(){}}]);function w(_,j){g(this,w);var S=b(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,_));return S.selection=j,S.textNode=document.createTextNode(w.CONTENTS),S.domNode.appendChild(S.textNode),S._length=0,S}return l(w,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(j,S){if(this._length!==0)return o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"format",this).call(this,j,S);for(var k=this,T=0;k!=null&&k.statics.scope!==d.default.Scope.BLOCK_BLOT;)T+=k.offset(k.parent),k=k.parent;k!=null&&(this._length=w.CONTENTS.length,k.optimize(),k.formatAt(T,w.CONTENTS.length,j,S),this._length=0)}},{key:"index",value:function(j,S){return j===this.textNode?0:o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"index",this).call(this,j,S)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var j=this.textNode,S=this.selection.getNativeRange(),k=void 0,T=void 0,P=void 0;if(S!=null&&S.start.node===j&&S.end.node===j){var M=[j,S.start.offset,S.end.offset];k=M[0],T=M[1],P=M[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==w.CONTENTS){var C=this.textNode.data.split(w.CONTENTS).join("");this.next instanceof h.default?(k=this.next.domNode,this.next.insertAt(0,C),this.textNode.data=w.CONTENTS):(this.textNode.data=C,this.parent.insertBefore(d.default.create(this.textNode),this),this.textNode=document.createTextNode(w.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),T!=null){var O=[T,P].map(function(L){return Math.max(0,Math.min(k.data.length,L-1))}),D=s(O,2);return T=D[0],P=D[1],{startNode:k,startOffset:T,endNode:k,endOffset:P}}}}},{key:"update",value:function(j,S){var k=this;if(j.some(function(P){return P.type==="characterData"&&P.target===k.textNode})){var T=this.restore();T&&(S.range=T)}}},{key:"value",value:function(){return""}}]),w})(d.default.Embed);y.blotName="cursor",y.className="ql-cursor",y.tagName="span",y.CONTENTS="\uFEFF",n.default=y}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=i(0),o=d(s),l=i(4),c=d(l);function d(b){return b&&b.__esModule?b:{default:b}}function u(b,v){if(!(b instanceof v))throw new TypeError("Cannot call a class as a function")}function h(b,v){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:b}function m(b,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);b.prototype=Object.create(v&&v.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(b,v):b.__proto__=v)}var g=(function(b){m(v,b);function v(){return u(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v})(o.default.Container);g.allowedChildren=[c.default,l.BlockEmbed,g],n.default=g}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.ColorStyle=n.ColorClass=n.ColorAttributor=void 0;var s=(function(){function y(x,w){for(var _=0;_<w.length;_++){var j=w[_];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(x,j.key,j)}}return function(x,w,_){return w&&y(x.prototype,w),_&&y(x,_),x}})(),o=function y(x,w,_){x===null&&(x=Function.prototype);var j=Object.getOwnPropertyDescriptor(x,w);if(j===void 0){var S=Object.getPrototypeOf(x);return S===null?void 0:y(S,w,_)}else{if("value"in j)return j.value;var k=j.get;return k===void 0?void 0:k.call(_)}},l=i(0),c=d(l);function d(y){return y&&y.__esModule?y:{default:y}}function u(y,x){if(!(y instanceof x))throw new TypeError("Cannot call a class as a function")}function h(y,x){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:y}function m(y,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);y.prototype=Object.create(x&&x.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(y,x):y.__proto__=x)}var g=(function(y){m(x,y);function x(){return u(this,x),h(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return s(x,[{key:"value",value:function(_){var j=o(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"value",this).call(this,_);return j.startsWith("rgb(")?(j=j.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+j.split(",").map(function(S){return("00"+parseInt(S).toString(16)).slice(-2)}).join("")):j}}]),x})(c.default.Attributor.Style),b=new c.default.Attributor.Class("color","ql-color",{scope:c.default.Scope.INLINE}),v=new g("color","color",{scope:c.default.Scope.INLINE});n.ColorAttributor=g,n.ColorClass=b,n.ColorStyle=v}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.sanitize=n.default=void 0;var s=(function(){function v(y,x){for(var w=0;w<x.length;w++){var _=x[w];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(y,_.key,_)}}return function(y,x,w){return x&&v(y.prototype,x),w&&v(y,w),y}})(),o=function v(y,x,w){y===null&&(y=Function.prototype);var _=Object.getOwnPropertyDescriptor(y,x);if(_===void 0){var j=Object.getPrototypeOf(y);return j===null?void 0:v(j,x,w)}else{if("value"in _)return _.value;var S=_.get;return S===void 0?void 0:S.call(w)}},l=i(6),c=d(l);function d(v){return v&&v.__esModule?v:{default:v}}function u(v,y){if(!(v instanceof y))throw new TypeError("Cannot call a class as a function")}function h(v,y){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:v}function m(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);v.prototype=Object.create(y&&y.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(v,y):v.__proto__=y)}var g=(function(v){m(y,v);function y(){return u(this,y),h(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return s(y,[{key:"format",value:function(w,_){if(w!==this.statics.blotName||!_)return o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"format",this).call(this,w,_);_=this.constructor.sanitize(_),this.domNode.setAttribute("href",_)}}],[{key:"create",value:function(w){var _=o(y.__proto__||Object.getPrototypeOf(y),"create",this).call(this,w);return w=this.sanitize(w),_.setAttribute("href",w),_.setAttribute("rel","noopener noreferrer"),_.setAttribute("target","_blank"),_}},{key:"formats",value:function(w){return w.getAttribute("href")}},{key:"sanitize",value:function(w){return b(w,this.PROTOCOL_WHITELIST)?w:this.SANITIZED_URL}}]),y})(c.default);g.blotName="link",g.tagName="A",g.SANITIZED_URL="about:blank",g.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function b(v,y){var x=document.createElement("a");x.href=v;var w=x.href.slice(0,x.href.indexOf(":"));return y.indexOf(w)>-1}n.default=g,n.sanitize=b}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},o=(function(){function y(x,w){for(var _=0;_<w.length;_++){var j=w[_];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(x,j.key,j)}}return function(x,w,_){return w&&y(x.prototype,w),_&&y(x,_),x}})(),l=i(23),c=h(l),d=i(107),u=h(d);function h(y){return y&&y.__esModule?y:{default:y}}function m(y,x){if(!(y instanceof x))throw new TypeError("Cannot call a class as a function")}var g=0;function b(y,x){y.setAttribute(x,y.getAttribute(x)!=="true")}var v=(function(){function y(x){var w=this;m(this,y),this.select=x,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){w.togglePicker()}),this.label.addEventListener("keydown",function(_){switch(_.keyCode){case c.default.keys.ENTER:w.togglePicker();break;case c.default.keys.ESCAPE:w.escape(),_.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return o(y,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),b(this.label,"aria-expanded"),b(this.options,"aria-hidden")}},{key:"buildItem",value:function(w){var _=this,j=document.createElement("span");return j.tabIndex="0",j.setAttribute("role","button"),j.classList.add("ql-picker-item"),w.hasAttribute("value")&&j.setAttribute("data-value",w.getAttribute("value")),w.textContent&&j.setAttribute("data-label",w.textContent),j.addEventListener("click",function(){_.selectItem(j,!0)}),j.addEventListener("keydown",function(S){switch(S.keyCode){case c.default.keys.ENTER:_.selectItem(j,!0),S.preventDefault();break;case c.default.keys.ESCAPE:_.escape(),S.preventDefault();break}}),j}},{key:"buildLabel",value:function(){var w=document.createElement("span");return w.classList.add("ql-picker-label"),w.innerHTML=u.default,w.tabIndex="0",w.setAttribute("role","button"),w.setAttribute("aria-expanded","false"),this.container.appendChild(w),w}},{key:"buildOptions",value:function(){var w=this,_=document.createElement("span");_.classList.add("ql-picker-options"),_.setAttribute("aria-hidden","true"),_.tabIndex="-1",_.id="ql-picker-options-"+g,g+=1,this.label.setAttribute("aria-controls",_.id),this.options=_,[].slice.call(this.select.options).forEach(function(j){var S=w.buildItem(j);_.appendChild(S),j.selected===!0&&w.selectItem(S)}),this.container.appendChild(_)}},{key:"buildPicker",value:function(){var w=this;[].slice.call(this.select.attributes).forEach(function(_){w.container.setAttribute(_.name,_.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var w=this;this.close(),setTimeout(function(){return w.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(w){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,j=this.container.querySelector(".ql-selected");if(w!==j&&(j!=null&&j.classList.remove("ql-selected"),w!=null&&(w.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(w.parentNode.children,w),w.hasAttribute("data-value")?this.label.setAttribute("data-value",w.getAttribute("data-value")):this.label.removeAttribute("data-value"),w.hasAttribute("data-label")?this.label.setAttribute("data-label",w.getAttribute("data-label")):this.label.removeAttribute("data-label"),_))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":s(Event))==="object"){var S=document.createEvent("Event");S.initEvent("change",!0,!0),this.select.dispatchEvent(S)}this.close()}}},{key:"update",value:function(){var w=void 0;if(this.select.selectedIndex>-1){var _=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];w=this.select.options[this.select.selectedIndex],this.selectItem(_)}else this.selectItem(null);var j=w!=null&&w!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",j)}}]),y})();n.default=v}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=i(0),o=U(s),l=i(5),c=U(l),d=i(4),u=U(d),h=i(16),m=U(h),g=i(25),b=U(g),v=i(24),y=U(v),x=i(35),w=U(x),_=i(6),j=U(_),S=i(22),k=U(S),T=i(7),P=U(T),M=i(55),C=U(M),O=i(42),D=U(O),L=i(23),F=U(L);function U(G){return G&&G.__esModule?G:{default:G}}c.default.register({"blots/block":u.default,"blots/block/embed":d.BlockEmbed,"blots/break":m.default,"blots/container":b.default,"blots/cursor":y.default,"blots/embed":w.default,"blots/inline":j.default,"blots/scroll":k.default,"blots/text":P.default,"modules/clipboard":C.default,"modules/history":D.default,"modules/keyboard":F.default}),o.default.register(u.default,m.default,y.default,j.default,k.default,P.default),n.default=c.default}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=i(1),o=(function(){function l(c){this.domNode=c,this.domNode[s.DATA_KEY]={blot:this}}return Object.defineProperty(l.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),l.create=function(c){if(this.tagName==null)throw new s.ParchmentError("Blot definition missing tagName");var d;return Array.isArray(this.tagName)?(typeof c=="string"&&(c=c.toUpperCase(),parseInt(c).toString()===c&&(c=parseInt(c))),typeof c=="number"?d=document.createElement(this.tagName[c-1]):this.tagName.indexOf(c)>-1?d=document.createElement(c):d=document.createElement(this.tagName[0])):d=document.createElement(this.tagName),this.className&&d.classList.add(this.className),d},l.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},l.prototype.clone=function(){var c=this.domNode.cloneNode(!1);return s.create(c)},l.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[s.DATA_KEY]},l.prototype.deleteAt=function(c,d){var u=this.isolate(c,d);u.remove()},l.prototype.formatAt=function(c,d,u,h){var m=this.isolate(c,d);if(s.query(u,s.Scope.BLOT)!=null&&h)m.wrap(u,h);else if(s.query(u,s.Scope.ATTRIBUTE)!=null){var g=s.create(this.statics.scope);m.wrap(g),g.format(u,h)}},l.prototype.insertAt=function(c,d,u){var h=u==null?s.create("text",d):s.create(d,u),m=this.split(c);this.parent.insertBefore(h,m)},l.prototype.insertInto=function(c,d){d===void 0&&(d=null),this.parent!=null&&this.parent.children.remove(this);var u=null;c.children.insertBefore(this,d),d!=null&&(u=d.domNode),(this.domNode.parentNode!=c.domNode||this.domNode.nextSibling!=u)&&c.domNode.insertBefore(this.domNode,u),this.parent=c,this.attach()},l.prototype.isolate=function(c,d){var u=this.split(c);return u.split(d),u},l.prototype.length=function(){return 1},l.prototype.offset=function(c){return c===void 0&&(c=this.parent),this.parent==null||this==c?0:this.parent.children.offset(this)+this.parent.offset(c)},l.prototype.optimize=function(c){this.domNode[s.DATA_KEY]!=null&&delete this.domNode[s.DATA_KEY].mutations},l.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},l.prototype.replace=function(c){c.parent!=null&&(c.parent.insertBefore(this,c.next),c.remove())},l.prototype.replaceWith=function(c,d){var u=typeof c=="string"?s.create(c,d):c;return u.replace(this),u},l.prototype.split=function(c,d){return c===0?this:this.next},l.prototype.update=function(c,d){},l.prototype.wrap=function(c,d){var u=typeof c=="string"?s.create(c,d):c;return this.parent!=null&&this.parent.insertBefore(u,this.next),u.appendChild(this),u},l.blotName="abstract",l})();n.default=o}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=i(12),o=i(32),l=i(33),c=i(1),d=(function(){function u(h){this.attributes={},this.domNode=h,this.build()}return u.prototype.attribute=function(h,m){m?h.add(this.domNode,m)&&(h.value(this.domNode)!=null?this.attributes[h.attrName]=h:delete this.attributes[h.attrName]):(h.remove(this.domNode),delete this.attributes[h.attrName])},u.prototype.build=function(){var h=this;this.attributes={};var m=s.default.keys(this.domNode),g=o.default.keys(this.domNode),b=l.default.keys(this.domNode);m.concat(g).concat(b).forEach(function(v){var y=c.query(v,c.Scope.ATTRIBUTE);y instanceof s.default&&(h.attributes[y.attrName]=y)})},u.prototype.copy=function(h){var m=this;Object.keys(this.attributes).forEach(function(g){var b=m.attributes[g].value(m.domNode);h.format(g,b)})},u.prototype.move=function(h){var m=this;this.copy(h),Object.keys(this.attributes).forEach(function(g){m.attributes[g].remove(m.domNode)}),this.attributes={}},u.prototype.values=function(){var h=this;return Object.keys(this.attributes).reduce(function(m,g){return m[g]=h.attributes[g].value(h.domNode),m},{})},u})();n.default=d}),(function(r,n,i){var s=this&&this.__extends||(function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var m in h)h.hasOwnProperty(m)&&(u[m]=h[m])};return function(u,h){d(u,h);function m(){this.constructor=u}u.prototype=h===null?Object.create(h):(m.prototype=h.prototype,new m)}})();Object.defineProperty(n,"__esModule",{value:!0});var o=i(12);function l(d,u){var h=d.getAttribute("class")||"";return h.split(/\s+/).filter(function(m){return m.indexOf(u+"-")===0})}var c=(function(d){s(u,d);function u(){return d!==null&&d.apply(this,arguments)||this}return u.keys=function(h){return(h.getAttribute("class")||"").split(/\s+/).map(function(m){return m.split("-").slice(0,-1).join("-")})},u.prototype.add=function(h,m){return this.canAdd(h,m)?(this.remove(h),h.classList.add(this.keyName+"-"+m),!0):!1},u.prototype.remove=function(h){var m=l(h,this.keyName);m.forEach(function(g){h.classList.remove(g)}),h.classList.length===0&&h.removeAttribute("class")},u.prototype.value=function(h){var m=l(h,this.keyName)[0]||"",g=m.slice(this.keyName.length+1);return this.canAdd(h,g)?g:""},u})(o.default);n.default=c}),(function(r,n,i){var s=this&&this.__extends||(function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var m in h)h.hasOwnProperty(m)&&(u[m]=h[m])};return function(u,h){d(u,h);function m(){this.constructor=u}u.prototype=h===null?Object.create(h):(m.prototype=h.prototype,new m)}})();Object.defineProperty(n,"__esModule",{value:!0});var o=i(12);function l(d){var u=d.split("-"),h=u.slice(1).map(function(m){return m[0].toUpperCase()+m.slice(1)}).join("");return u[0]+h}var c=(function(d){s(u,d);function u(){return d!==null&&d.apply(this,arguments)||this}return u.keys=function(h){return(h.getAttribute("style")||"").split(";").map(function(m){var g=m.split(":");return g[0].trim()})},u.prototype.add=function(h,m){return this.canAdd(h,m)?(h.style[l(this.keyName)]=m,!0):!1},u.prototype.remove=function(h){h.style[l(this.keyName)]="",h.getAttribute("style")||h.removeAttribute("style")},u.prototype.value=function(h){var m=h.style[l(this.keyName)];return this.canAdd(h,m)?m:""},u})(o.default);n.default=c}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=(function(){function c(d,u){for(var h=0;h<u.length;h++){var m=u[h];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(d,m.key,m)}}return function(d,u,h){return u&&c(d.prototype,u),h&&c(d,h),d}})();function o(c,d){if(!(c instanceof d))throw new TypeError("Cannot call a class as a function")}var l=(function(){function c(d,u){o(this,c),this.quill=d,this.options=u,this.modules={}}return s(c,[{key:"init",value:function(){var u=this;Object.keys(this.options.modules).forEach(function(h){u.modules[h]==null&&u.addModule(h)})}},{key:"addModule",value:function(u){var h=this.quill.constructor.import("modules/"+u);return this.modules[u]=new h(this.quill,this.options.modules[u]||{}),this.modules[u]}}]),c})();l.DEFAULTS={modules:{}},l.themes={default:l},n.default=l}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=(function(){function x(w,_){for(var j=0;j<_.length;j++){var S=_[j];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(w,S.key,S)}}return function(w,_,j){return _&&x(w.prototype,_),j&&x(w,j),w}})(),o=function x(w,_,j){w===null&&(w=Function.prototype);var S=Object.getOwnPropertyDescriptor(w,_);if(S===void 0){var k=Object.getPrototypeOf(w);return k===null?void 0:x(k,_,j)}else{if("value"in S)return S.value;var T=S.get;return T===void 0?void 0:T.call(j)}},l=i(0),c=h(l),d=i(7),u=h(d);function h(x){return x&&x.__esModule?x:{default:x}}function m(x,w){if(!(x instanceof w))throw new TypeError("Cannot call a class as a function")}function g(x,w){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:x}function b(x,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);x.prototype=Object.create(w&&w.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(x,w):x.__proto__=w)}var v="\uFEFF",y=(function(x){b(w,x);function w(_){m(this,w);var j=g(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,_));return j.contentNode=document.createElement("span"),j.contentNode.setAttribute("contenteditable",!1),[].slice.call(j.domNode.childNodes).forEach(function(S){j.contentNode.appendChild(S)}),j.leftGuard=document.createTextNode(v),j.rightGuard=document.createTextNode(v),j.domNode.appendChild(j.leftGuard),j.domNode.appendChild(j.contentNode),j.domNode.appendChild(j.rightGuard),j}return s(w,[{key:"index",value:function(j,S){return j===this.leftGuard?0:j===this.rightGuard?1:o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"index",this).call(this,j,S)}},{key:"restore",value:function(j){var S=void 0,k=void 0,T=j.data.split(v).join("");if(j===this.leftGuard)if(this.prev instanceof u.default){var P=this.prev.length();this.prev.insertAt(P,T),S={startNode:this.prev.domNode,startOffset:P+T.length}}else k=document.createTextNode(T),this.parent.insertBefore(c.default.create(k),this),S={startNode:k,startOffset:T.length};else j===this.rightGuard&&(this.next instanceof u.default?(this.next.insertAt(0,T),S={startNode:this.next.domNode,startOffset:T.length}):(k=document.createTextNode(T),this.parent.insertBefore(c.default.create(k),this.next),S={startNode:k,startOffset:T.length}));return j.data=v,S}},{key:"update",value:function(j,S){var k=this;j.forEach(function(T){if(T.type==="characterData"&&(T.target===k.leftGuard||T.target===k.rightGuard)){var P=k.restore(T.target);P&&(S.range=P)}})}}]),w})(c.default.Embed);n.default=y}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.AlignStyle=n.AlignClass=n.AlignAttribute=void 0;var s=i(0),o=l(s);function l(m){return m&&m.__esModule?m:{default:m}}var c={scope:o.default.Scope.BLOCK,whitelist:["right","center","justify"]},d=new o.default.Attributor.Attribute("align","align",c),u=new o.default.Attributor.Class("align","ql-align",c),h=new o.default.Attributor.Style("align","text-align",c);n.AlignAttribute=d,n.AlignClass=u,n.AlignStyle=h}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.BackgroundStyle=n.BackgroundClass=void 0;var s=i(0),o=c(s),l=i(26);function c(h){return h&&h.__esModule?h:{default:h}}var d=new o.default.Attributor.Class("background","ql-bg",{scope:o.default.Scope.INLINE}),u=new l.ColorAttributor("background","background-color",{scope:o.default.Scope.INLINE});n.BackgroundClass=d,n.BackgroundStyle=u}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.DirectionStyle=n.DirectionClass=n.DirectionAttribute=void 0;var s=i(0),o=l(s);function l(m){return m&&m.__esModule?m:{default:m}}var c={scope:o.default.Scope.BLOCK,whitelist:["rtl"]},d=new o.default.Attributor.Attribute("direction","dir",c),u=new o.default.Attributor.Class("direction","ql-direction",c),h=new o.default.Attributor.Style("direction","direction",c);n.DirectionAttribute=d,n.DirectionClass=u,n.DirectionStyle=h}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.FontClass=n.FontStyle=void 0;var s=(function(){function x(w,_){for(var j=0;j<_.length;j++){var S=_[j];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(w,S.key,S)}}return function(w,_,j){return _&&x(w.prototype,_),j&&x(w,j),w}})(),o=function x(w,_,j){w===null&&(w=Function.prototype);var S=Object.getOwnPropertyDescriptor(w,_);if(S===void 0){var k=Object.getPrototypeOf(w);return k===null?void 0:x(k,_,j)}else{if("value"in S)return S.value;var T=S.get;return T===void 0?void 0:T.call(j)}},l=i(0),c=d(l);function d(x){return x&&x.__esModule?x:{default:x}}function u(x,w){if(!(x instanceof w))throw new TypeError("Cannot call a class as a function")}function h(x,w){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:x}function m(x,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);x.prototype=Object.create(w&&w.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(x,w):x.__proto__=w)}var g={scope:c.default.Scope.INLINE,whitelist:["serif","monospace"]},b=new c.default.Attributor.Class("font","ql-font",g),v=(function(x){m(w,x);function w(){return u(this,w),h(this,(w.__proto__||Object.getPrototypeOf(w)).apply(this,arguments))}return s(w,[{key:"value",value:function(j){return o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"value",this).call(this,j).replace(/["']/g,"")}}]),w})(c.default.Attributor.Style),y=new v("font","font-family",g);n.FontStyle=y,n.FontClass=b}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.SizeStyle=n.SizeClass=void 0;var s=i(0),o=l(s);function l(u){return u&&u.__esModule?u:{default:u}}var c=new o.default.Attributor.Class("size","ql-size",{scope:o.default.Scope.INLINE,whitelist:["small","large","huge"]}),d=new o.default.Attributor.Style("size","font-size",{scope:o.default.Scope.INLINE,whitelist:["10px","18px","32px"]});n.SizeClass=c,n.SizeStyle=d}),(function(r,n,i){r.exports={align:{"":i(76),center:i(77),right:i(78),justify:i(79)},background:i(80),blockquote:i(81),bold:i(82),clean:i(83),code:i(58),"code-block":i(58),color:i(84),direction:{"":i(85),rtl:i(86)},float:{center:i(87),full:i(88),left:i(89),right:i(90)},formula:i(91),header:{1:i(92),2:i(93)},italic:i(94),image:i(95),indent:{"+1":i(96),"-1":i(97)},link:i(98),list:{ordered:i(99),bullet:i(100),check:i(101)},script:{sub:i(102),super:i(103)},strike:i(104),underline:i(105),video:i(106)}}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.getLastChangeIndex=n.default=void 0;var s=(function(){function _(j,S){for(var k=0;k<S.length;k++){var T=S[k];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(j,T.key,T)}}return function(j,S,k){return S&&_(j.prototype,S),k&&_(j,k),j}})(),o=i(0),l=m(o),c=i(5),d=m(c),u=i(9),h=m(u);function m(_){return _&&_.__esModule?_:{default:_}}function g(_,j){if(!(_ instanceof j))throw new TypeError("Cannot call a class as a function")}function b(_,j){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j&&(typeof j=="object"||typeof j=="function")?j:_}function v(_,j){if(typeof j!="function"&&j!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof j);_.prototype=Object.create(j&&j.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),j&&(Object.setPrototypeOf?Object.setPrototypeOf(_,j):_.__proto__=j)}var y=(function(_){v(j,_);function j(S,k){g(this,j);var T=b(this,(j.__proto__||Object.getPrototypeOf(j)).call(this,S,k));return T.lastRecorded=0,T.ignoreChange=!1,T.clear(),T.quill.on(d.default.events.EDITOR_CHANGE,function(P,M,C,O){P!==d.default.events.TEXT_CHANGE||T.ignoreChange||(!T.options.userOnly||O===d.default.sources.USER?T.record(M,C):T.transform(M))}),T.quill.keyboard.addBinding({key:"Z",shortKey:!0},T.undo.bind(T)),T.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},T.redo.bind(T)),/Win/i.test(navigator.platform)&&T.quill.keyboard.addBinding({key:"Y",shortKey:!0},T.redo.bind(T)),T}return s(j,[{key:"change",value:function(k,T){if(this.stack[k].length!==0){var P=this.stack[k].pop();this.stack[T].push(P),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(P[k],d.default.sources.USER),this.ignoreChange=!1;var M=w(P[k]);this.quill.setSelection(M)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(k,T){if(k.ops.length!==0){this.stack.redo=[];var P=this.quill.getContents().diff(T),M=Date.now();if(this.lastRecorded+this.options.delay>M&&this.stack.undo.length>0){var C=this.stack.undo.pop();P=P.compose(C.undo),k=C.redo.compose(k)}else this.lastRecorded=M;this.stack.undo.push({redo:k,undo:P}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(k){this.stack.undo.forEach(function(T){T.undo=k.transform(T.undo,!0),T.redo=k.transform(T.redo,!0)}),this.stack.redo.forEach(function(T){T.undo=k.transform(T.undo,!0),T.redo=k.transform(T.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),j})(h.default);y.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function x(_){var j=_.ops[_.ops.length-1];return j==null?!1:j.insert!=null?typeof j.insert=="string"&&j.insert.endsWith(` 1042`):j.attributes!=null?Object.keys(j.attributes).some(function(S){return l.default.query(S,l.default.Scope.BLOCK)!=null}):!1}function w(_){var j=_.reduce(function(k,T){return k+=T.delete||0,k},0),S=_.length()-j;return x(_)&&(S-=1),S}n.default=y,n.getLastChangeIndex=w}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BaseTooltip=void 0;var s=(function(){function B(H,J){for(var ee=0;ee<J.length;ee++){var Y=J[ee];Y.enumerable=Y.enumerable||!1,Y.configurable=!0,"value"in Y&&(Y.writable=!0),Object.defineProperty(H,Y.key,Y)}}return function(H,J,ee){return J&&B(H.prototype,J),ee&&B(H,ee),H}})(),o=function B(H,J,ee){H===null&&(H=Function.prototype);var Y=Object.getOwnPropertyDescriptor(H,J);if(Y===void 0){var X=Object.getPrototypeOf(H);return X===null?void 0:B(X,J,ee)}else{if("value"in Y)return Y.value;var ne=Y.get;return ne===void 0?void 0:ne.call(ee)}},l=i(3),c=M(l),d=i(2),u=M(d),h=i(8),m=M(h),g=i(23),b=M(g),v=i(34),y=M(v),x=i(59),w=M(x),_=i(60),j=M(_),S=i(28),k=M(S),T=i(61),P=M(T);function M(B){return B&&B.__esModule?B:{default:B}}function C(B,H){if(!(B instanceof H))throw new TypeError("Cannot call a class as a function")}function O(B,H){if(!B)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return H&&(typeof H=="object"||typeof H=="function")?H:B}function D(B,H){if(typeof H!="function"&&H!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof H);B.prototype=Object.create(H&&H.prototype,{constructor:{value:B,enumerable:!1,writable:!0,configurable:!0}}),H&&(Object.setPrototypeOf?Object.setPrototypeOf(B,H):B.__proto__=H)}var L=[!1,"center","right","justify"],F=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],U=[!1,"serif","monospace"],G=["1","2","3",!1],W=["small",!1,"large","huge"],q=(function(B){D(H,B);function H(J,ee){C(this,H);var Y=O(this,(H.__proto__||Object.getPrototypeOf(H)).call(this,J,ee)),X=function ne(Q){if(!document.body.contains(J.root))return document.body.removeEventListener("click",ne);Y.tooltip!=null&&!Y.tooltip.root.contains(Q.target)&&document.activeElement!==Y.tooltip.textbox&&!Y.quill.hasFocus()&&Y.tooltip.hide(),Y.pickers!=null&&Y.pickers.forEach(function(ie){ie.container.contains(Q.target)||ie.close()})};return J.emitter.listenDOM("click",document.body,X),Y}return s(H,[{key:"addModule",value:function(ee){var Y=o(H.prototype.__proto__||Object.getPrototypeOf(H.prototype),"addModule",this).call(this,ee);return ee==="toolbar"&&this.extendToolbar(Y),Y}},{key:"buildButtons",value:function(ee,Y){ee.forEach(function(X){var ne=X.getAttribute("class")||"";ne.split(/\s+/).forEach(function(Q){if(Q.startsWith("ql-")&&(Q=Q.slice(3),Y[Q]!=null))if(Q==="direction")X.innerHTML=Y[Q][""]+Y[Q].rtl;else if(typeof Y[Q]=="string")X.innerHTML=Y[Q];else{var ie=X.value||"";ie!=null&&Y[Q][ie]&&(X.innerHTML=Y[Q][ie])}})})}},{key:"buildPickers",value:function(ee,Y){var X=this;this.pickers=ee.map(function(Q){if(Q.classList.contains("ql-align"))return Q.querySelector("option")==null&&I(Q,L),new j.default(Q,Y.align);if(Q.classList.contains("ql-background")||Q.classList.contains("ql-color")){var ie=Q.classList.contains("ql-background")?"background":"color";return Q.querySelector("option")==null&&I(Q,F,ie==="background"?"#ffffff":"#000000"),new w.default(Q,Y[ie])}else return Q.querySelector("option")==null&&(Q.classList.contains("ql-font")?I(Q,U):Q.classList.contains("ql-header")?I(Q,G):Q.classList.contains("ql-size")&&I(Q,W)),new k.default(Q)});var ne=function(){X.pickers.forEach(function(ie){ie.update()})};this.quill.on(m.default.events.EDITOR_CHANGE,ne)}}]),H})(y.default);q.DEFAULTS=(0,c.default)(!0,{},y.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var H=this,J=this.container.querySelector("input.ql-image[type=file]");J==null&&(J=document.createElement("input"),J.setAttribute("type","file"),J.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),J.classList.add("ql-image"),J.addEventListener("change",function(){if(J.files!=null&&J.files[0]!=null){var ee=new FileReader;ee.onload=function(Y){var X=H.quill.getSelection(!0);H.quill.updateContents(new u.default().retain(X.index).delete(X.length).insert({image:Y.target.result}),m.default.sources.USER),H.quill.setSelection(X.index+1,m.default.sources.SILENT),J.value=""},ee.readAsDataURL(J.files[0])}}),this.container.appendChild(J)),J.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var V=(function(B){D(H,B);function H(J,ee){C(this,H);var Y=O(this,(H.__proto__||Object.getPrototypeOf(H)).call(this,J,ee));return Y.textbox=Y.root.querySelector('input[type="text"]'),Y.listen(),Y}return s(H,[{key:"listen",value:function(){var ee=this;this.textbox.addEventListener("keydown",function(Y){b.default.match(Y,"enter")?(ee.save(),Y.preventDefault()):b.default.match(Y,"escape")&&(ee.cancel(),Y.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),Y!=null?this.textbox.value=Y:ee!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+ee)||""),this.root.setAttribute("data-mode",ee)}},{key:"restoreFocus",value:function(){var ee=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=ee}},{key:"save",value:function(){var ee=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var Y=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",ee,m.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",ee,m.default.sources.USER)),this.quill.root.scrollTop=Y;break}case"video":ee=z(ee);case"formula":{if(!ee)break;var X=this.quill.getSelection(!0);if(X!=null){var ne=X.index+X.length;this.quill.insertEmbed(ne,this.root.getAttribute("data-mode"),ee,m.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(ne+1," ",m.default.sources.USER),this.quill.setSelection(ne+2,m.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),H})(P.default);function z(B){var H=B.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||B.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return H?(H[1]||"https")+"://www.youtube.com/embed/"+H[2]+"?showinfo=0":(H=B.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(H[1]||"https")+"://player.vimeo.com/video/"+H[2]+"/":B}function I(B,H){var J=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;H.forEach(function(ee){var Y=document.createElement("option");ee===J?Y.setAttribute("selected","selected"):Y.setAttribute("value",ee),B.appendChild(Y)})}n.BaseTooltip=V,n.default=q}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=(function(){function o(){this.head=this.tail=null,this.length=0}return o.prototype.append=function(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];this.insertBefore(l[0],null),l.length>1&&this.append.apply(this,l.slice(1))},o.prototype.contains=function(l){for(var c,d=this.iterator();c=d();)if(c===l)return!0;return!1},o.prototype.insertBefore=function(l,c){l&&(l.next=c,c!=null?(l.prev=c.prev,c.prev!=null&&(c.prev.next=l),c.prev=l,c===this.head&&(this.head=l)):this.tail!=null?(this.tail.next=l,l.prev=this.tail,this.tail=l):(l.prev=null,this.head=this.tail=l),this.length+=1)},o.prototype.offset=function(l){for(var c=0,d=this.head;d!=null;){if(d===l)return c;c+=d.length(),d=d.next}return-1},o.prototype.remove=function(l){this.contains(l)&&(l.prev!=null&&(l.prev.next=l.next),l.next!=null&&(l.next.prev=l.prev),l===this.head&&(this.head=l.next),l===this.tail&&(this.tail=l.prev),this.length-=1)},o.prototype.iterator=function(l){return l===void 0&&(l=this.head),function(){var c=l;return l!=null&&(l=l.next),c}},o.prototype.find=function(l,c){c===void 0&&(c=!1);for(var d,u=this.iterator();d=u();){var h=d.length();if(l<h||c&&l===h&&(d.next==null||d.next.length()!==0))return[d,l];l-=h}return[null,0]},o.prototype.forEach=function(l){for(var c,d=this.iterator();c=d();)l(c)},o.prototype.forEachAt=function(l,c,d){if(!(c<=0))for(var u=this.find(l),h=u[0],m=u[1],g,b=l-m,v=this.iterator(h);(g=v())&&b<l+c;){var y=g.length();l>b?d(g,l-b,Math.min(c,b+y-l)):d(g,0,Math.min(y,l+c-b)),b+=y}},o.prototype.map=function(l){return this.reduce(function(c,d){return c.push(l(d)),c},[])},o.prototype.reduce=function(l,c){for(var d,u=this.iterator();d=u();)c=l(c,d);return c},o})();n.default=s}),(function(r,n,i){var s=this&&this.__extends||(function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,g){m.__proto__=g}||function(m,g){for(var b in g)g.hasOwnProperty(b)&&(m[b]=g[b])};return function(m,g){h(m,g);function b(){this.constructor=m}m.prototype=g===null?Object.create(g):(b.prototype=g.prototype,new b)}})();Object.defineProperty(n,"__esModule",{value:!0});var o=i(17),l=i(1),c={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},d=100,u=(function(h){s(m,h);function m(g){var b=h.call(this,g)||this;return b.scroll=b,b.observer=new MutationObserver(function(v){b.update(v)}),b.observer.observe(b.domNode,c),b.attach(),b}return m.prototype.detach=function(){h.prototype.detach.call(this),this.observer.disconnect()},m.prototype.deleteAt=function(g,b){this.update(),g===0&&b===this.length()?this.children.forEach(function(v){v.remove()}):h.prototype.deleteAt.call(this,g,b)},m.prototype.formatAt=function(g,b,v,y){this.update(),h.prototype.formatAt.call(this,g,b,v,y)},m.prototype.insertAt=function(g,b,v){this.update(),h.prototype.insertAt.call(this,g,b,v)},m.prototype.optimize=function(g,b){var v=this;g===void 0&&(g=[]),b===void 0&&(b={}),h.prototype.optimize.call(this,b);for(var y=[].slice.call(this.observer.takeRecords());y.length>0;)g.push(y.pop());for(var x=function(S,k){k===void 0&&(k=!0),!(S==null||S===v)&&S.domNode.parentNode!=null&&(S.domNode[l.DATA_KEY].mutations==null&&(S.domNode[l.DATA_KEY].mutations=[]),k&&x(S.parent))},w=function(S){S.domNode[l.DATA_KEY]==null||S.domNode[l.DATA_KEY].mutations==null||(S instanceof o.default&&S.children.forEach(w),S.optimize(b))},_=g,j=0;_.length>0;j+=1){if(j>=d)throw new Error("[Parchment] Maximum optimize iterations reached");for(_.forEach(function(S){var k=l.find(S.target,!0);k!=null&&(k.domNode===S.target&&(S.type==="childList"?(x(l.find(S.previousSibling,!1)),[].forEach.call(S.addedNodes,function(T){var P=l.find(T,!1);x(P,!1),P instanceof o.default&&P.children.forEach(function(M){x(M,!1)})})):S.type==="attributes"&&x(k.prev)),x(k))}),this.children.forEach(w),_=[].slice.call(this.observer.takeRecords()),y=_.slice();y.length>0;)g.push(y.pop())}},m.prototype.update=function(g,b){var v=this;b===void 0&&(b={}),g=g||this.observer.takeRecords(),g.map(function(y){var x=l.find(y.target,!0);return x==null?null:x.domNode[l.DATA_KEY].mutations==null?(x.domNode[l.DATA_KEY].mutations=[y],x):(x.domNode[l.DATA_KEY].mutations.push(y),null)}).forEach(function(y){y==null||y===v||y.domNode[l.DATA_KEY]==null||y.update(y.domNode[l.DATA_KEY].mutations||[],b)}),this.domNode[l.DATA_KEY].mutations!=null&&h.prototype.update.call(this,this.domNode[l.DATA_KEY].mutations,b),this.optimize(g,b)},m.blotName="scroll",m.defaultChild="block",m.scope=l.Scope.BLOCK_BLOT,m.tagName="DIV",m})(o.default);n.default=u}),(function(r,n,i){var s=this&&this.__extends||(function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,m){h.__proto__=m}||function(h,m){for(var g in m)m.hasOwnProperty(g)&&(h[g]=m[g])};return function(h,m){u(h,m);function g(){this.constructor=h}h.prototype=m===null?Object.create(m):(g.prototype=m.prototype,new g)}})();Object.defineProperty(n,"__esModule",{value:!0});var o=i(18),l=i(1);function c(u,h){if(Object.keys(u).length!==Object.keys(h).length)return!1;for(var m in u)if(u[m]!==h[m])return!1;return!0}var d=(function(u){s(h,u);function h(){return u!==null&&u.apply(this,arguments)||this}return h.formats=function(m){if(m.tagName!==h.tagName)return u.formats.call(this,m)},h.prototype.format=function(m,g){var b=this;m===this.statics.blotName&&!g?(this.children.forEach(function(v){v instanceof o.default||(v=v.wrap(h.blotName,!0)),b.attributes.copy(v)}),this.unwrap()):u.prototype.format.call(this,m,g)},h.prototype.formatAt=function(m,g,b,v){if(this.formats()[b]!=null||l.query(b,l.Scope.ATTRIBUTE)){var y=this.isolate(m,g);y.format(b,v)}else u.prototype.formatAt.call(this,m,g,b,v)},h.prototype.optimize=function(m){u.prototype.optimize.call(this,m);var g=this.formats();if(Object.keys(g).length===0)return this.unwrap();var b=this.next;b instanceof h&&b.prev===this&&c(g,b.formats())&&(b.moveChildren(this),b.remove())},h.blotName="inline",h.scope=l.Scope.INLINE_BLOT,h.tagName="SPAN",h})(o.default);n.default=d}),(function(r,n,i){var s=this&&this.__extends||(function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var m in h)h.hasOwnProperty(m)&&(u[m]=h[m])};return function(u,h){d(u,h);function m(){this.constructor=u}u.prototype=h===null?Object.create(h):(m.prototype=h.prototype,new m)}})();Object.defineProperty(n,"__esModule",{value:!0});var o=i(18),l=i(1),c=(function(d){s(u,d);function u(){return d!==null&&d.apply(this,arguments)||this}return u.formats=function(h){var m=l.query(u.blotName).tagName;if(h.tagName!==m)return d.formats.call(this,h)},u.prototype.format=function(h,m){l.query(h,l.Scope.BLOCK)!=null&&(h===this.statics.blotName&&!m?this.replaceWith(u.blotName):d.prototype.format.call(this,h,m))},u.prototype.formatAt=function(h,m,g,b){l.query(g,l.Scope.BLOCK)!=null?this.format(g,b):d.prototype.formatAt.call(this,h,m,g,b)},u.prototype.insertAt=function(h,m,g){if(g==null||l.query(m,l.Scope.INLINE)!=null)d.prototype.insertAt.call(this,h,m,g);else{var b=this.split(h),v=l.create(m,g);b.parent.insertBefore(v,b)}},u.prototype.update=function(h,m){navigator.userAgent.match(/Trident/)?this.build():d.prototype.update.call(this,h,m)},u.blotName="block",u.scope=l.Scope.BLOCK_BLOT,u.tagName="P",u})(o.default);n.default=c}),(function(r,n,i){var s=this&&this.__extends||(function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,u){d.__proto__=u}||function(d,u){for(var h in u)u.hasOwnProperty(h)&&(d[h]=u[h])};return function(d,u){c(d,u);function h(){this.constructor=d}d.prototype=u===null?Object.create(u):(h.prototype=u.prototype,new h)}})();Object.defineProperty(n,"__esModule",{value:!0});var o=i(19),l=(function(c){s(d,c);function d(){return c!==null&&c.apply(this,arguments)||this}return d.formats=function(u){},d.prototype.format=function(u,h){c.prototype.formatAt.call(this,0,this.length(),u,h)},d.prototype.formatAt=function(u,h,m,g){u===0&&h===this.length()?this.format(m,g):c.prototype.formatAt.call(this,u,h,m,g)},d.prototype.formats=function(){return this.statics.formats(this.domNode)},d})(o.default);n.default=l}),(function(r,n,i){var s=this&&this.__extends||(function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var m in h)h.hasOwnProperty(m)&&(u[m]=h[m])};return function(u,h){d(u,h);function m(){this.constructor=u}u.prototype=h===null?Object.create(h):(m.prototype=h.prototype,new m)}})();Object.defineProperty(n,"__esModule",{value:!0});var o=i(19),l=i(1),c=(function(d){s(u,d);function u(h){var m=d.call(this,h)||this;return m.text=m.statics.value(m.domNode),m}return u.create=function(h){return document.createTextNode(h)},u.value=function(h){var m=h.data;return m.normalize&&(m=m.normalize()),m},u.prototype.deleteAt=function(h,m){this.domNode.data=this.text=this.text.slice(0,h)+this.text.slice(h+m)},u.prototype.index=function(h,m){return this.domNode===h?m:-1},u.prototype.insertAt=function(h,m,g){g==null?(this.text=this.text.slice(0,h)+m+this.text.slice(h),this.domNode.data=this.text):d.prototype.insertAt.call(this,h,m,g)},u.prototype.length=function(){return this.text.length},u.prototype.optimize=function(h){d.prototype.optimize.call(this,h),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof u&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},u.prototype.position=function(h,m){return[this.domNode,h]},u.prototype.split=function(h,m){if(m===void 0&&(m=!1),!m){if(h===0)return this;if(h===this.length())return this.next}var g=l.create(this.domNode.splitText(h));return this.parent.insertBefore(g,this.next),this.text=this.statics.value(this.domNode),g},u.prototype.update=function(h,m){var g=this;h.some(function(b){return b.type==="characterData"&&b.target===g.domNode})&&(this.text=this.statics.value(this.domNode))},u.prototype.value=function(){return this.text},u.blotName="text",u.scope=l.Scope.INLINE_BLOT,u})(o.default);n.default=c}),(function(r,n,i){var s=document.createElement("div");if(s.classList.toggle("test-class",!1),s.classList.contains("test-class")){var o=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(l,c){return arguments.length>1&&!this.contains(l)==!c?c:o.call(this,l)}}String.prototype.startsWith||(String.prototype.startsWith=function(l,c){return c=c||0,this.substr(c,l.length)===l}),String.prototype.endsWith||(String.prototype.endsWith=function(l,c){var d=this.toString();(typeof c!="number"||!isFinite(c)||Math.floor(c)!==c||c>d.length)&&(c=d.length),c-=l.length;var u=d.indexOf(l,c);return u!==-1&&u===c}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(c){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof c!="function")throw new TypeError("predicate must be a function");for(var d=Object(this),u=d.length>>>0,h=arguments[1],m,g=0;g<u;g++)if(m=d[g],c.call(h,m,g,d))return m}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})}),(function(r,n){var i=-1,s=1,o=0;function l(j,S,k){if(j==S)return j?[[o,j]]:[];(k<0||j.length<k)&&(k=null);var T=h(j,S),P=j.substring(0,T);j=j.substring(T),S=S.substring(T),T=m(j,S);var M=j.substring(j.length-T);j=j.substring(0,j.length-T),S=S.substring(0,S.length-T);var C=c(j,S);return P&&C.unshift([o,P]),M&&C.push([o,M]),b(C),k!=null&&(C=x(C,k)),C=w(C),C}function c(j,S){var k;if(!j)return[[s,S]];if(!S)return[[i,j]];var T=j.length>S.length?j:S,P=j.length>S.length?S:j,M=T.indexOf(P);if(M!=-1)return k=[[s,T.substring(0,M)],[o,P],[s,T.substring(M+P.length)]],j.length>S.length&&(k[0][0]=k[2][0]=i),k;if(P.length==1)return[[i,j],[s,S]];var C=g(j,S);if(C){var O=C[0],D=C[1],L=C[2],F=C[3],U=C[4],G=l(O,L),W=l(D,F);return G.concat([[o,U]],W)}return d(j,S)}function d(j,S){for(var k=j.length,T=S.length,P=Math.ceil((k+T)/2),M=P,C=2*P,O=new Array(C),D=new Array(C),L=0;L<C;L++)O[L]=-1,D[L]=-1;O[M+1]=0,D[M+1]=0;for(var F=k-T,U=F%2!=0,G=0,W=0,q=0,V=0,z=0;z<P;z++){for(var I=-z+G;I<=z-W;I+=2){var B=M+I,H;I==-z||I!=z&&O[B-1]<O[B+1]?H=O[B+1]:H=O[B-1]+1;for(var J=H-I;H<k&&J<T&&j.charAt(H)==S.charAt(J);)H++,J++;if(O[B]=H,H>k)W+=2;else if(J>T)G+=2;else if(U){var ee=M+F-I;if(ee>=0&&ee<C&&D[ee]!=-1){var Y=k-D[ee];if(H>=Y)return u(j,S,H,J)}}}for(var X=-z+q;X<=z-V;X+=2){var ee=M+X,Y;X==-z||X!=z&&D[ee-1]<D[ee+1]?Y=D[ee+1]:Y=D[ee-1]+1;for(var ne=Y-X;Y<k&&ne<T&&j.charAt(k-Y-1)==S.charAt(T-ne-1);)Y++,ne++;if(D[ee]=Y,Y>k)V+=2;else if(ne>T)q+=2;else if(!U){var B=M+F-X;if(B>=0&&B<C&&O[B]!=-1){var H=O[B],J=M+H-B;if(Y=k-Y,H>=Y)return u(j,S,H,J)}}}}return[[i,j],[s,S]]}function u(j,S,k,T){var P=j.substring(0,k),M=S.substring(0,T),C=j.substring(k),O=S.substring(T),D=l(P,M),L=l(C,O);return D.concat(L)}function h(j,S){if(!j||!S||j.charAt(0)!=S.charAt(0))return 0;for(var k=0,T=Math.min(j.length,S.length),P=T,M=0;k<P;)j.substring(M,P)==S.substring(M,P)?(k=P,M=k):T=P,P=Math.floor((T-k)/2+k);return P}function m(j,S){if(!j||!S||j.charAt(j.length-1)!=S.charAt(S.length-1))return 0;for(var k=0,T=Math.min(j.length,S.length),P=T,M=0;k<P;)j.substring(j.length-P,j.length-M)==S.substring(S.length-P,S.length-M)?(k=P,M=k):T=P,P=Math.floor((T-k)/2+k);return P}function g(j,S){var k=j.length>S.length?j:S,T=j.length>S.length?S:j;if(k.length<4||T.length*2<k.length)return null;function P(W,q,V){for(var z=W.substring(V,V+Math.floor(W.length/4)),I=-1,B="",H,J,ee,Y;(I=q.indexOf(z,I+1))!=-1;){var X=h(W.substring(V),q.substring(I)),ne=m(W.substring(0,V),q.substring(0,I));B.length<ne+X&&(B=q.substring(I-ne,I)+q.substring(I,I+X),H=W.substring(0,V-ne),J=W.substring(V+X),ee=q.substring(0,I-ne),Y=q.substring(I+X))}return B.length*2>=W.length?[H,J,ee,Y,B]:null}var M=P(k,T,Math.ceil(k.length/4)),C=P(k,T,Math.ceil(k.length/2)),O;if(!M&&!C)return null;C?M?O=M[4].length>C[4].length?M:C:O=C:O=M;var D,L,F,U;j.length>S.length?(D=O[0],L=O[1],F=O[2],U=O[3]):(F=O[0],U=O[1],D=O[2],L=O[3]);var G=O[4];return[D,L,F,U,G]}function b(j){j.push([o,""]);for(var S=0,k=0,T=0,P="",M="",C;S<j.length;)switch(j[S][0]){case s:T++,M+=j[S][1],S++;break;case i:k++,P+=j[S][1],S++;break;case o:k+T>1?(k!==0&&T!==0&&(C=h(M,P),C!==0&&(S-k-T>0&&j[S-k-T-1][0]==o?j[S-k-T-1][1]+=M.substring(0,C):(j.splice(0,0,[o,M.substring(0,C)]),S++),M=M.substring(C),P=P.substring(C)),C=m(M,P),C!==0&&(j[S][1]=M.substring(M.length-C)+j[S][1],M=M.substring(0,M.length-C),P=P.substring(0,P.length-C))),k===0?j.splice(S-T,k+T,[s,M]):T===0?j.splice(S-k,k+T,[i,P]):j.splice(S-k-T,k+T,[i,P],[s,M]),S=S-k-T+(k?1:0)+(T?1:0)+1):S!==0&&j[S-1][0]==o?(j[S-1][1]+=j[S][1],j.splice(S,1)):S++,T=0,k=0,P="",M="";break}j[j.length-1][1]===""&&j.pop();var O=!1;for(S=1;S<j.length-1;)j[S-1][0]==o&&j[S+1][0]==o&&(j[S][1].substring(j[S][1].length-j[S-1][1].length)==j[S-1][1]?(j[S][1]=j[S-1][1]+j[S][1].substring(0,j[S][1].length-j[S-1][1].length),j[S+1][1]=j[S-1][1]+j[S+1][1],j.splice(S-1,1),O=!0):j[S][1].substring(0,j[S+1][1].length)==j[S+1][1]&&(j[S-1][1]+=j[S+1][1],j[S][1]=j[S][1].substring(j[S+1][1].length)+j[S+1][1],j.splice(S+1,1),O=!0)),S++;O&&b(j)}var v=l;v.INSERT=s,v.DELETE=i,v.EQUAL=o,r.exports=v;function y(j,S){if(S===0)return[o,j];for(var k=0,T=0;T<j.length;T++){var P=j[T];if(P[0]===i||P[0]===o){var M=k+P[1].length;if(S===M)return[T+1,j];if(S<M){j=j.slice();var C=S-k,O=[P[0],P[1].slice(0,C)],D=[P[0],P[1].slice(C)];return j.splice(T,1,O,D),[T+1,j]}else k=M}}throw new Error("cursor_pos is out of bounds!")}function x(j,S){var k=y(j,S),T=k[1],P=k[0],M=T[P],C=T[P+1];if(M==null)return j;if(M[0]!==o)return j;if(C!=null&&M[1]+C[1]===C[1]+M[1])return T.splice(P,2,C,M),_(T,P,2);if(C!=null&&C[1].indexOf(M[1])===0){T.splice(P,2,[C[0],M[1]],[0,M[1]]);var O=C[1].slice(M[1].length);return O.length>0&&T.splice(P+2,0,[C[0],O]),_(T,P,3)}else return j}function w(j){for(var S=!1,k=function(C){return C.charCodeAt(0)>=56320&&C.charCodeAt(0)<=57343},T=function(C){return C.charCodeAt(C.length-1)>=55296&&C.charCodeAt(C.length-1)<=56319},P=2;P<j.length;P+=1)j[P-2][0]===o&&T(j[P-2][1])&&j[P-1][0]===i&&k(j[P-1][1])&&j[P][0]===s&&k(j[P][1])&&(S=!0,j[P-1][1]=j[P-2][1].slice(-1)+j[P-1][1],j[P][1]=j[P-2][1].slice(-1)+j[P][1],j[P-2][1]=j[P-2][1].slice(0,-1));if(!S)return j;for(var M=[],P=0;P<j.length;P+=1)j[P][1].length>0&&M.push(j[P]);return M}function _(j,S,k){for(var T=S+k-1;T>=0&&T>=S-1;T--)if(T+1<j.length){var P=j[T],M=j[T+1];P[0]===M[1]&&j.splice(T,2,[P[0],P[1]+M[1]])}return j}}),(function(r,n){n=r.exports=typeof Object.keys=="function"?Object.keys:i,n.shim=i;function i(s){var o=[];for(var l in s)o.push(l);return o}}),(function(r,n){var i=(function(){return Object.prototype.toString.call(arguments)})()=="[object Arguments]";n=r.exports=i?s:o,n.supported=s;function s(l){return Object.prototype.toString.call(l)=="[object Arguments]"}n.unsupported=o;function o(l){return l&&typeof l=="object"&&typeof l.length=="number"&&Object.prototype.hasOwnProperty.call(l,"callee")&&!Object.prototype.propertyIsEnumerable.call(l,"callee")||!1}}),(function(r,n){var i=Object.prototype.hasOwnProperty,s="~";function o(){}Object.create&&(o.prototype=Object.create(null),new o().__proto__||(s=!1));function l(d,u,h){this.fn=d,this.context=u,this.once=h||!1}function c(){this._events=new o,this._eventsCount=0}c.prototype.eventNames=function(){var u=[],h,m;if(this._eventsCount===0)return u;for(m in h=this._events)i.call(h,m)&&u.push(s?m.slice(1):m);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(h)):u},c.prototype.listeners=function(u,h){var m=s?s+u:u,g=this._events[m];if(h)return!!g;if(!g)return[];if(g.fn)return[g.fn];for(var b=0,v=g.length,y=new Array(v);b<v;b++)y[b]=g[b].fn;return y},c.prototype.emit=function(u,h,m,g,b,v){var y=s?s+u:u;if(!this._events[y])return!1;var x=this._events[y],w=arguments.length,_,j;if(x.fn){switch(x.once&&this.removeListener(u,x.fn,void 0,!0),w){case 1:return x.fn.call(x.context),!0;case 2:return x.fn.call(x.context,h),!0;case 3:return x.fn.call(x.context,h,m),!0;case 4:return x.fn.call(x.context,h,m,g),!0;case 5:return x.fn.call(x.context,h,m,g,b),!0;case 6:return x.fn.call(x.context,h,m,g,b,v),!0}for(j=1,_=new Array(w-1);j<w;j++)_[j-1]=arguments[j];x.fn.apply(x.context,_)}else{var S=x.length,k;for(j=0;j<S;j++)switch(x[j].once&&this.removeListener(u,x[j].fn,void 0,!0),w){case 1:x[j].fn.call(x[j].context);break;case 2:x[j].fn.call(x[j].context,h);break;case 3:x[j].fn.call(x[j].context,h,m);break;case 4:x[j].fn.call(x[j].context,h,m,g);break;default:if(!_)for(k=1,_=new Array(w-1);k<w;k++)_[k-1]=arguments[k];x[j].fn.apply(x[j].context,_)}}return!0},c.prototype.on=function(u,h,m){var g=new l(h,m||this),b=s?s+u:u;return this._events[b]?this._events[b].fn?this._events[b]=[this._events[b],g]:this._events[b].push(g):(this._events[b]=g,this._eventsCount++),this},c.prototype.once=function(u,h,m){var g=new l(h,m||this,!0),b=s?s+u:u;return this._events[b]?this._events[b].fn?this._events[b]=[this._events[b],g]:this._events[b].push(g):(this._events[b]=g,this._eventsCount++),this},c.prototype.removeListener=function(u,h,m,g){var b=s?s+u:u;if(!this._events[b])return this;if(!h)return--this._eventsCount===0?this._events=new o:delete this._events[b],this;var v=this._events[b];if(v.fn)v.fn===h&&(!g||v.once)&&(!m||v.context===m)&&(--this._eventsCount===0?this._events=new o:delete this._events[b]);else{for(var y=0,x=[],w=v.length;y<w;y++)(v[y].fn!==h||g&&!v[y].once||m&&v[y].context!==m)&&x.push(v[y]);x.length?this._events[b]=x.length===1?x[0]:x:--this._eventsCount===0?this._events=new o:delete this._events[b]}return this},c.prototype.removeAllListeners=function(u){var h;return u?(h=s?s+u:u,this._events[h]&&(--this._eventsCount===0?this._events=new o:delete this._events[h])):(this._events=new o,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prototype.setMaxListeners=function(){return this},c.prefixed=s,c.EventEmitter=c,typeof r<"u"&&(r.exports=c)}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.matchText=n.matchSpacing=n.matchNewline=n.matchBlot=n.matchAttributor=n.default=void 0;var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Z){return typeof Z}:function(Z){return Z&&typeof Symbol=="function"&&Z.constructor===Symbol&&Z!==Symbol.prototype?"symbol":typeof Z},o=(function(){function Z(ae,pe){var ye=[],he=!0,He=!1,Te=void 0;try{for(var it=ae[Symbol.iterator](),_t;!(he=(_t=it.next()).done)&&(ye.push(_t.value),!(pe&&ye.length===pe));he=!0);}catch(Bt){He=!0,Te=Bt}finally{try{!he&&it.return&&it.return()}finally{if(He)throw Te}}return ye}return function(ae,pe){if(Array.isArray(ae))return ae;if(Symbol.iterator in Object(ae))return Z(ae,pe);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),l=(function(){function Z(ae,pe){for(var ye=0;ye<pe.length;ye++){var he=pe[ye];he.enumerable=he.enumerable||!1,he.configurable=!0,"value"in he&&(he.writable=!0),Object.defineProperty(ae,he.key,he)}}return function(ae,pe,ye){return pe&&Z(ae.prototype,pe),ye&&Z(ae,ye),ae}})(),c=i(3),d=D(c),u=i(2),h=D(u),m=i(0),g=D(m),b=i(5),v=D(b),y=i(10),x=D(y),w=i(9),_=D(w),j=i(36),S=i(37),k=i(13),T=D(k),P=i(26),M=i(38),C=i(39),O=i(40);function D(Z){return Z&&Z.__esModule?Z:{default:Z}}function L(Z,ae,pe){return ae in Z?Object.defineProperty(Z,ae,{value:pe,enumerable:!0,configurable:!0,writable:!0}):Z[ae]=pe,Z}function F(Z,ae){if(!(Z instanceof ae))throw new TypeError("Cannot call a class as a function")}function U(Z,ae){if(!Z)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ae&&(typeof ae=="object"||typeof ae=="function")?ae:Z}function G(Z,ae){if(typeof ae!="function"&&ae!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ae);Z.prototype=Object.create(ae&&ae.prototype,{constructor:{value:Z,enumerable:!1,writable:!0,configurable:!0}}),ae&&(Object.setPrototypeOf?Object.setPrototypeOf(Z,ae):Z.__proto__=ae)}var W=(0,x.default)("quill:clipboard"),q="__ql-matcher",V=[[Node.TEXT_NODE,Pe],[Node.TEXT_NODE,_e],["br",me],[Node.ELEMENT_NODE,_e],[Node.ELEMENT_NODE,ie],[Node.ELEMENT_NODE,xe],[Node.ELEMENT_NODE,Q],[Node.ELEMENT_NODE,Ee],["li",Ne],["b",ne.bind(ne,"bold")],["i",ne.bind(ne,"italic")],["style",oe]],z=[j.AlignAttribute,M.DirectionAttribute].reduce(function(Z,ae){return Z[ae.keyName]=ae,Z},{}),I=[j.AlignStyle,S.BackgroundStyle,P.ColorStyle,M.DirectionStyle,C.FontStyle,O.SizeStyle].reduce(function(Z,ae){return Z[ae.keyName]=ae,Z},{}),B=(function(Z){G(ae,Z);function ae(pe,ye){F(this,ae);var he=U(this,(ae.__proto__||Object.getPrototypeOf(ae)).call(this,pe,ye));return he.quill.root.addEventListener("paste",he.onPaste.bind(he)),he.container=he.quill.addContainer("ql-clipboard"),he.container.setAttribute("contenteditable",!0),he.container.setAttribute("tabindex",-1),he.matchers=[],V.concat(he.options.matchers).forEach(function(He){var Te=o(He,2),it=Te[0],_t=Te[1];!ye.matchVisual&&_t===xe||he.addMatcher(it,_t)}),he}return l(ae,[{key:"addMatcher",value:function(ye,he){this.matchers.push([ye,he])}},{key:"convert",value:function(ye){if(typeof ye=="string")return this.container.innerHTML=ye.replace(/\>\r?\n +\</g,"><"),this.convert();var he=this.quill.getFormat(this.quill.selection.savedRange.index);if(he[T.default.blotName]){var He=this.container.innerText;return this.container.innerHTML="",new h.default().insert(He,L({},T.default.blotName,he[T.default.blotName]))}var Te=this.prepareMatching(),it=o(Te,2),_t=it[0],Bt=it[1],Et=X(this.container,_t,Bt);return ee(Et,` 1043`)&&Et.ops[Et.ops.length-1].attributes==null&&(Et=Et.compose(new h.default().retain(Et.length()-1).delete(1))),W.log("convert",this.container.innerHTML,Et),this.container.innerHTML="",Et}},{key:"dangerouslyPasteHTML",value:function(ye,he){var He=arguments.length>2&&arguments[2]!==void 0?arguments[2]:v.default.sources.API;if(typeof ye=="string")this.quill.setContents(this.convert(ye),he),this.quill.setSelection(0,v.default.sources.SILENT);else{var Te=this.convert(he);this.quill.updateContents(new h.default().retain(ye).concat(Te),He),this.quill.setSelection(ye+Te.length(),v.default.sources.SILENT)}}},{key:"onPaste",value:function(ye){var he=this;if(!(ye.defaultPrevented||!this.quill.isEnabled())){var He=this.quill.getSelection(),Te=new h.default().retain(He.index),it=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(v.default.sources.SILENT),setTimeout(function(){Te=Te.concat(he.convert()).delete(He.length),he.quill.updateContents(Te,v.default.sources.USER),he.quill.setSelection(Te.length()-He.length,v.default.sources.SILENT),he.quill.scrollingContainer.scrollTop=it,he.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var ye=this,he=[],He=[];return this.matchers.forEach(function(Te){var it=o(Te,2),_t=it[0],Bt=it[1];switch(_t){case Node.TEXT_NODE:He.push(Bt);break;case Node.ELEMENT_NODE:he.push(Bt);break;default:[].forEach.call(ye.container.querySelectorAll(_t),function(Et){Et[q]=Et[q]||[],Et[q].push(Bt)});break}}),[he,He]}}]),ae})(_.default);B.DEFAULTS={matchers:[],matchVisual:!0};function H(Z,ae,pe){return(typeof ae>"u"?"undefined":s(ae))==="object"?Object.keys(ae).reduce(function(ye,he){return H(ye,he,ae[he])},Z):Z.reduce(function(ye,he){return he.attributes&&he.attributes[ae]?ye.push(he):ye.insert(he.insert,(0,d.default)({},L({},ae,pe),he.attributes))},new h.default)}function J(Z){if(Z.nodeType!==Node.ELEMENT_NODE)return{};var ae="__ql-computed-style";return Z[ae]||(Z[ae]=window.getComputedStyle(Z))}function ee(Z,ae){for(var pe="",ye=Z.ops.length-1;ye>=0&&pe.length<ae.length;--ye){var he=Z.ops[ye];if(typeof he.insert!="string")break;pe=he.insert+pe}return pe.slice(-1*ae.length)===ae}function Y(Z){if(Z.childNodes.length===0)return!1;var ae=J(Z);return["block","list-item"].indexOf(ae.display)>-1}function X(Z,ae,pe){return Z.nodeType===Z.TEXT_NODE?pe.reduce(function(ye,he){return he(Z,ye)},new h.default):Z.nodeType===Z.ELEMENT_NODE?[].reduce.call(Z.childNodes||[],function(ye,he){var He=X(he,ae,pe);return he.nodeType===Z.ELEMENT_NODE&&(He=ae.reduce(function(Te,it){return it(he,Te)},He),He=(he[q]||[]).reduce(function(Te,it){return it(he,Te)},He)),ye.concat(He)},new h.default):new h.default}function ne(Z,ae,pe){return H(pe,Z,!0)}function Q(Z,ae){var pe=g.default.Attributor.Attribute.keys(Z),ye=g.default.Attributor.Class.keys(Z),he=g.default.Attributor.Style.keys(Z),He={};return pe.concat(ye).concat(he).forEach(function(Te){var it=g.default.query(Te,g.default.Scope.ATTRIBUTE);it!=null&&(He[it.attrName]=it.value(Z),He[it.attrName])||(it=z[Te],it!=null&&(it.attrName===Te||it.keyName===Te)&&(He[it.attrName]=it.value(Z)||void 0),it=I[Te],it!=null&&(it.attrName===Te||it.keyName===Te)&&(it=I[Te],He[it.attrName]=it.value(Z)||void 0))}),Object.keys(He).length>0&&(ae=H(ae,He)),ae}function ie(Z,ae){var pe=g.default.query(Z);if(pe==null)return ae;if(pe.prototype instanceof g.default.Embed){var ye={},he=pe.value(Z);he!=null&&(ye[pe.blotName]=he,ae=new h.default().insert(ye,pe.formats(Z)))}else typeof pe.formats=="function"&&(ae=H(ae,pe.blotName,pe.formats(Z)));return ae}function me(Z,ae){return ee(ae,` 1044`)||ae.insert(` 1045`),ae}function oe(){return new h.default}function Ne(Z,ae){var pe=g.default.query(Z);if(pe==null||pe.blotName!=="list-item"||!ee(ae,` 1046`))return ae;for(var ye=-1,he=Z.parentNode;!he.classList.contains("ql-clipboard");)(g.default.query(he)||{}).blotName==="list"&&(ye+=1),he=he.parentNode;return ye<=0?ae:ae.compose(new h.default().retain(ae.length()-1).retain(1,{indent:ye}))}function _e(Z,ae){return ee(ae,` 1047`)||(Y(Z)||ae.length()>0&&Z.nextSibling&&Y(Z.nextSibling))&&ae.insert(` 1048`),ae}function xe(Z,ae){if(Y(Z)&&Z.nextElementSibling!=null&&!ee(ae,` 1049 1050`)){var pe=Z.offsetHeight+parseFloat(J(Z).marginTop)+parseFloat(J(Z).marginBottom);Z.nextElementSibling.offsetTop>Z.offsetTop+pe*1.5&&ae.insert(` 1051`)}return ae}function Ee(Z,ae){var pe={},ye=Z.style||{};return ye.fontStyle&&J(Z).fontStyle==="italic"&&(pe.italic=!0),ye.fontWeight&&(J(Z).fontWeight.startsWith("bold")||parseInt(J(Z).fontWeight)>=700)&&(pe.bold=!0),Object.keys(pe).length>0&&(ae=H(ae,pe)),parseFloat(ye.textIndent||0)>0&&(ae=new h.default().insert(" ").concat(ae)),ae}function Pe(Z,ae){var pe=Z.data;if(Z.parentNode.tagName==="O:P")return ae.insert(pe.trim());if(pe.trim().length===0&&Z.parentNode.classList.contains("ql-clipboard"))return ae;if(!J(Z.parentNode).whiteSpace.startsWith("pre")){var ye=function(He,Te){return Te=Te.replace(/[^\u00a0]/g,""),Te.length<1&&He?" ":Te};pe=pe.replace(/\r\n/g," ").replace(/\n/g," "),pe=pe.replace(/\s\s+/g,ye.bind(ye,!0)),(Z.previousSibling==null&&Y(Z.parentNode)||Z.previousSibling!=null&&Y(Z.previousSibling))&&(pe=pe.replace(/^\s+/,ye.bind(ye,!1))),(Z.nextSibling==null&&Y(Z.parentNode)||Z.nextSibling!=null&&Y(Z.nextSibling))&&(pe=pe.replace(/\s+$/,ye.bind(ye,!1)))}return ae.insert(pe)}n.default=B,n.matchAttributor=Q,n.matchBlot=ie,n.matchNewline=_e,n.matchSpacing=xe,n.matchText=Pe}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=(function(){function b(v,y){for(var x=0;x<y.length;x++){var w=y[x];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(v,w.key,w)}}return function(v,y,x){return y&&b(v.prototype,y),x&&b(v,x),v}})(),o=function b(v,y,x){v===null&&(v=Function.prototype);var w=Object.getOwnPropertyDescriptor(v,y);if(w===void 0){var _=Object.getPrototypeOf(v);return _===null?void 0:b(_,y,x)}else{if("value"in w)return w.value;var j=w.get;return j===void 0?void 0:j.call(x)}},l=i(6),c=d(l);function d(b){return b&&b.__esModule?b:{default:b}}function u(b,v){if(!(b instanceof v))throw new TypeError("Cannot call a class as a function")}function h(b,v){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:b}function m(b,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);b.prototype=Object.create(v&&v.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(b,v):b.__proto__=v)}var g=(function(b){m(v,b);function v(){return u(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return s(v,[{key:"optimize",value:function(x){o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"optimize",this).call(this,x),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return o(v.__proto__||Object.getPrototypeOf(v),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),v})(c.default);g.blotName="bold",g.tagName=["STRONG","B"],n.default=g}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.addControls=n.default=void 0;var s=(function(){function O(D,L){var F=[],U=!0,G=!1,W=void 0;try{for(var q=D[Symbol.iterator](),V;!(U=(V=q.next()).done)&&(F.push(V.value),!(L&&F.length===L));U=!0);}catch(z){G=!0,W=z}finally{try{!U&&q.return&&q.return()}finally{if(G)throw W}}return F}return function(D,L){if(Array.isArray(D))return D;if(Symbol.iterator in Object(D))return O(D,L);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=(function(){function O(D,L){for(var F=0;F<L.length;F++){var U=L[F];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(D,U.key,U)}}return function(D,L,F){return L&&O(D.prototype,L),F&&O(D,F),D}})(),l=i(2),c=x(l),d=i(0),u=x(d),h=i(5),m=x(h),g=i(10),b=x(g),v=i(9),y=x(v);function x(O){return O&&O.__esModule?O:{default:O}}function w(O,D,L){return D in O?Object.defineProperty(O,D,{value:L,enumerable:!0,configurable:!0,writable:!0}):O[D]=L,O}function _(O,D){if(!(O instanceof D))throw new TypeError("Cannot call a class as a function")}function j(O,D){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return D&&(typeof D=="object"||typeof D=="function")?D:O}function S(O,D){if(typeof D!="function"&&D!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof D);O.prototype=Object.create(D&&D.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),D&&(Object.setPrototypeOf?Object.setPrototypeOf(O,D):O.__proto__=D)}var k=(0,b.default)("quill:toolbar"),T=(function(O){S(D,O);function D(L,F){_(this,D);var U=j(this,(D.__proto__||Object.getPrototypeOf(D)).call(this,L,F));if(Array.isArray(U.options.container)){var G=document.createElement("div");M(G,U.options.container),L.container.parentNode.insertBefore(G,L.container),U.container=G}else typeof U.options.container=="string"?U.container=document.querySelector(U.options.container):U.container=U.options.container;if(!(U.container instanceof HTMLElement)){var W;return W=k.error("Container required for toolbar",U.options),j(U,W)}return U.container.classList.add("ql-toolbar"),U.controls=[],U.handlers={},Object.keys(U.options.handlers).forEach(function(q){U.addHandler(q,U.options.handlers[q])}),[].forEach.call(U.container.querySelectorAll("button, select"),function(q){U.attach(q)}),U.quill.on(m.default.events.EDITOR_CHANGE,function(q,V){q===m.default.events.SELECTION_CHANGE&&U.update(V)}),U.quill.on(m.default.events.SCROLL_OPTIMIZE,function(){var q=U.quill.selection.getRange(),V=s(q,1),z=V[0];U.update(z)}),U}return o(D,[{key:"addHandler",value:function(F,U){this.handlers[F]=U}},{key:"attach",value:function(F){var U=this,G=[].find.call(F.classList,function(q){return q.indexOf("ql-")===0});if(G){if(G=G.slice(3),F.tagName==="BUTTON"&&F.setAttribute("type","button"),this.handlers[G]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[G]==null){k.warn("ignoring attaching to disabled format",G,F);return}if(u.default.query(G)==null){k.warn("ignoring attaching to nonexistent format",G,F);return}}var W=F.tagName==="SELECT"?"change":"click";F.addEventListener(W,function(q){var V=void 0;if(F.tagName==="SELECT"){if(F.selectedIndex<0)return;var z=F.options[F.selectedIndex];z.hasAttribute("selected")?V=!1:V=z.value||!1}else F.classList.contains("ql-active")?V=!1:V=F.value||!F.hasAttribute("value"),q.preventDefault();U.quill.focus();var I=U.quill.selection.getRange(),B=s(I,1),H=B[0];if(U.handlers[G]!=null)U.handlers[G].call(U,V);else if(u.default.query(G).prototype instanceof u.default.Embed){if(V=prompt("Enter "+G),!V)return;U.quill.updateContents(new c.default().retain(H.index).delete(H.length).insert(w({},G,V)),m.default.sources.USER)}else U.quill.format(G,V,m.default.sources.USER);U.update(H)}),this.controls.push([G,F])}}},{key:"update",value:function(F){var U=F==null?{}:this.quill.getFormat(F);this.controls.forEach(function(G){var W=s(G,2),q=W[0],V=W[1];if(V.tagName==="SELECT"){var z=void 0;if(F==null)z=null;else if(U[q]==null)z=V.querySelector("option[selected]");else if(!Array.isArray(U[q])){var I=U[q];typeof I=="string"&&(I=I.replace(/\"/g,'\\"')),z=V.querySelector('option[value="'+I+'"]')}z==null?(V.value="",V.selectedIndex=-1):z.selected=!0}else if(F==null)V.classList.remove("ql-active");else if(V.hasAttribute("value")){var B=U[q]===V.getAttribute("value")||U[q]!=null&&U[q].toString()===V.getAttribute("value")||U[q]==null&&!V.getAttribute("value");V.classList.toggle("ql-active",B)}else V.classList.toggle("ql-active",U[q]!=null)})}}]),D})(y.default);T.DEFAULTS={};function P(O,D,L){var F=document.createElement("button");F.setAttribute("type","button"),F.classList.add("ql-"+D),L!=null&&(F.value=L),O.appendChild(F)}function M(O,D){Array.isArray(D[0])||(D=[D]),D.forEach(function(L){var F=document.createElement("span");F.classList.add("ql-formats"),L.forEach(function(U){if(typeof U=="string")P(F,U);else{var G=Object.keys(U)[0],W=U[G];Array.isArray(W)?C(F,G,W):P(F,G,W)}}),O.appendChild(F)})}function C(O,D,L){var F=document.createElement("select");F.classList.add("ql-"+D),L.forEach(function(U){var G=document.createElement("option");U!==!1?G.setAttribute("value",U):G.setAttribute("selected","selected"),F.appendChild(G)}),O.appendChild(F)}T.DEFAULTS={container:null,handlers:{clean:function(){var D=this,L=this.quill.getSelection();if(L!=null)if(L.length==0){var F=this.quill.getFormat();Object.keys(F).forEach(function(U){u.default.query(U,u.default.Scope.INLINE)!=null&&D.quill.format(U,!1)})}else this.quill.removeFormat(L,m.default.sources.USER)},direction:function(D){var L=this.quill.getFormat().align;D==="rtl"&&L==null?this.quill.format("align","right",m.default.sources.USER):!D&&L==="right"&&this.quill.format("align",!1,m.default.sources.USER),this.quill.format("direction",D,m.default.sources.USER)},indent:function(D){var L=this.quill.getSelection(),F=this.quill.getFormat(L),U=parseInt(F.indent||0);if(D==="+1"||D==="-1"){var G=D==="+1"?1:-1;F.direction==="rtl"&&(G*=-1),this.quill.format("indent",U+G,m.default.sources.USER)}},link:function(D){D===!0&&(D=prompt("Enter link URL:")),this.quill.format("link",D,m.default.sources.USER)},list:function(D){var L=this.quill.getSelection(),F=this.quill.getFormat(L);D==="check"?F.list==="checked"||F.list==="unchecked"?this.quill.format("list",!1,m.default.sources.USER):this.quill.format("list","unchecked",m.default.sources.USER):this.quill.format("list",D,m.default.sources.USER)}}},n.default=T,n.addControls=M}),(function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=(function(){function b(v,y){for(var x=0;x<y.length;x++){var w=y[x];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(v,w.key,w)}}return function(v,y,x){return y&&b(v.prototype,y),x&&b(v,x),v}})(),o=function b(v,y,x){v===null&&(v=Function.prototype);var w=Object.getOwnPropertyDescriptor(v,y);if(w===void 0){var _=Object.getPrototypeOf(v);return _===null?void 0:b(_,y,x)}else{if("value"in w)return w.value;var j=w.get;return j===void 0?void 0:j.call(x)}},l=i(28),c=d(l);function d(b){return b&&b.__esModule?b:{default:b}}function u(b,v){if(!(b instanceof v))throw new TypeError("Cannot call a class as a function")}function h(b,v){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:b}function m(b,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);b.prototype=Object.create(v&&v.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(b,v):b.__proto__=v)}var g=(function(b){m(v,b);function v(y,x){u(this,v);var w=h(this,(v.__proto__||Object.getPrototypeOf(v)).call(this,y));return w.label.innerHTML=x,w.container.classList.add("ql-color-picker"),[].slice.call(w.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(_){_.classList.add("ql-primary")}),w}return s(v,[{key:"buildItem",value:function(x){var w=o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"buildItem",this).call(this,x);return w.style.backgroundColor=x.getAttribute("value")||"",w}},{key:"selectItem",value:function(x,w){o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"selectItem",this).call(this,x,w);var _=this.label.querySelector(".ql-color-label"),j=x&&x.getAttribute("data-value")||"";_&&(_.tagName==="line"?_.style.stroke=j:_.style.fill=j)}}]),v})(c.default);n.default=g}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=(function(){function b(v,y){for(var x=0;x<y.length;x++){var w=y[x];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(v,w.key,w)}}return function(v,y,x){return y&&b(v.prototype,y),x&&b(v,x),v}})(),o=function b(v,y,x){v===null&&(v=Function.prototype);var w=Object.getOwnPropertyDescriptor(v,y);if(w===void 0){var _=Object.getPrototypeOf(v);return _===null?void 0:b(_,y,x)}else{if("value"in w)return w.value;var j=w.get;return j===void 0?void 0:j.call(x)}},l=i(28),c=d(l);function d(b){return b&&b.__esModule?b:{default:b}}function u(b,v){if(!(b instanceof v))throw new TypeError("Cannot call a class as a function")}function h(b,v){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:b}function m(b,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);b.prototype=Object.create(v&&v.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(b,v):b.__proto__=v)}var g=(function(b){m(v,b);function v(y,x){u(this,v);var w=h(this,(v.__proto__||Object.getPrototypeOf(v)).call(this,y));return w.container.classList.add("ql-icon-picker"),[].forEach.call(w.container.querySelectorAll(".ql-picker-item"),function(_){_.innerHTML=x[_.getAttribute("data-value")||""]}),w.defaultItem=w.container.querySelector(".ql-selected"),w.selectItem(w.defaultItem),w}return s(v,[{key:"selectItem",value:function(x,w){o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"selectItem",this).call(this,x,w),x=x||this.defaultItem,this.label.innerHTML=x.innerHTML}}]),v})(c.default);n.default=g}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=(function(){function c(d,u){for(var h=0;h<u.length;h++){var m=u[h];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(d,m.key,m)}}return function(d,u,h){return u&&c(d.prototype,u),h&&c(d,h),d}})();function o(c,d){if(!(c instanceof d))throw new TypeError("Cannot call a class as a function")}var l=(function(){function c(d,u){var h=this;o(this,c),this.quill=d,this.boundsContainer=u||document.body,this.root=d.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){h.root.style.marginTop=-1*h.quill.root.scrollTop+"px"}),this.hide()}return s(c,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(u){var h=u.left+u.width/2-this.root.offsetWidth/2,m=u.bottom+this.quill.root.scrollTop;this.root.style.left=h+"px",this.root.style.top=m+"px",this.root.classList.remove("ql-flip");var g=this.boundsContainer.getBoundingClientRect(),b=this.root.getBoundingClientRect(),v=0;if(b.right>g.right&&(v=g.right-b.right,this.root.style.left=h+v+"px"),b.left<g.left&&(v=g.left-b.left,this.root.style.left=h+v+"px"),b.bottom>g.bottom){var y=b.bottom-b.top,x=u.bottom-u.top+y;this.root.style.top=m-x+"px",this.root.classList.add("ql-flip")}return v}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),c})();n.default=l}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=(function(){function C(O,D){var L=[],F=!0,U=!1,G=void 0;try{for(var W=O[Symbol.iterator](),q;!(F=(q=W.next()).done)&&(L.push(q.value),!(D&&L.length===D));F=!0);}catch(V){U=!0,G=V}finally{try{!F&&W.return&&W.return()}finally{if(U)throw G}}return L}return function(O,D){if(Array.isArray(O))return O;if(Symbol.iterator in Object(O))return C(O,D);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=function C(O,D,L){O===null&&(O=Function.prototype);var F=Object.getOwnPropertyDescriptor(O,D);if(F===void 0){var U=Object.getPrototypeOf(O);return U===null?void 0:C(U,D,L)}else{if("value"in F)return F.value;var G=F.get;return G===void 0?void 0:G.call(L)}},l=(function(){function C(O,D){for(var L=0;L<D.length;L++){var F=D[L];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(O,F.key,F)}}return function(O,D,L){return D&&C(O.prototype,D),L&&C(O,L),O}})(),c=i(3),d=_(c),u=i(8),h=_(u),m=i(43),g=_(m),b=i(27),v=_(b),y=i(15),x=i(41),w=_(x);function _(C){return C&&C.__esModule?C:{default:C}}function j(C,O){if(!(C instanceof O))throw new TypeError("Cannot call a class as a function")}function S(C,O){if(!C)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:C}function k(C,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);C.prototype=Object.create(O&&O.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(C,O):C.__proto__=O)}var T=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],P=(function(C){k(O,C);function O(D,L){j(this,O),L.modules.toolbar!=null&&L.modules.toolbar.container==null&&(L.modules.toolbar.container=T);var F=S(this,(O.__proto__||Object.getPrototypeOf(O)).call(this,D,L));return F.quill.container.classList.add("ql-snow"),F}return l(O,[{key:"extendToolbar",value:function(L){L.container.classList.add("ql-snow"),this.buildButtons([].slice.call(L.container.querySelectorAll("button")),w.default),this.buildPickers([].slice.call(L.container.querySelectorAll("select")),w.default),this.tooltip=new M(this.quill,this.options.bounds),L.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(F,U){L.handlers.link.call(L,!U.format.link)})}}]),O})(g.default);P.DEFAULTS=(0,d.default)(!0,{},g.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(O){if(O){var D=this.quill.getSelection();if(D==null||D.length==0)return;var L=this.quill.getText(D);/^\S+@\S+\.\S+$/.test(L)&&L.indexOf("mailto:")!==0&&(L="mailto:"+L);var F=this.quill.theme.tooltip;F.edit("link",L)}else this.quill.format("link",!1)}}}}});var M=(function(C){k(O,C);function O(D,L){j(this,O);var F=S(this,(O.__proto__||Object.getPrototypeOf(O)).call(this,D,L));return F.preview=F.root.querySelector("a.ql-preview"),F}return l(O,[{key:"listen",value:function(){var L=this;o(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(F){L.root.classList.contains("ql-editing")?L.save():L.edit("link",L.preview.textContent),F.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(F){if(L.linkRange!=null){var U=L.linkRange;L.restoreFocus(),L.quill.formatText(U,"link",!1,h.default.sources.USER),delete L.linkRange}F.preventDefault(),L.hide()}),this.quill.on(h.default.events.SELECTION_CHANGE,function(F,U,G){if(F!=null){if(F.length===0&&G===h.default.sources.USER){var W=L.quill.scroll.descendant(v.default,F.index),q=s(W,2),V=q[0],z=q[1];if(V!=null){L.linkRange=new y.Range(F.index-z,V.length());var I=v.default.formats(V.domNode);L.preview.textContent=I,L.preview.setAttribute("href",I),L.show(),L.position(L.quill.getBounds(L.linkRange));return}}else delete L.linkRange;L.hide()}})}},{key:"show",value:function(){o(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),O})(m.BaseTooltip);M.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),n.default=P}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=i(29),o=he(s),l=i(36),c=i(38),d=i(64),u=i(65),h=he(u),m=i(66),g=he(m),b=i(67),v=he(b),y=i(37),x=i(26),w=i(39),_=i(40),j=i(56),S=he(j),k=i(68),T=he(k),P=i(27),M=he(P),C=i(69),O=he(C),D=i(70),L=he(D),F=i(71),U=he(F),G=i(72),W=he(G),q=i(73),V=he(q),z=i(13),I=he(z),B=i(74),H=he(B),J=i(75),ee=he(J),Y=i(57),X=he(Y),ne=i(41),Q=he(ne),ie=i(28),me=he(ie),oe=i(59),Ne=he(oe),_e=i(60),xe=he(_e),Ee=i(61),Pe=he(Ee),Z=i(108),ae=he(Z),pe=i(62),ye=he(pe);function he(He){return He&&He.__esModule?He:{default:He}}o.default.register({"attributors/attribute/direction":c.DirectionAttribute,"attributors/class/align":l.AlignClass,"attributors/class/background":y.BackgroundClass,"attributors/class/color":x.ColorClass,"attributors/class/direction":c.DirectionClass,"attributors/class/font":w.FontClass,"attributors/class/size":_.SizeClass,"attributors/style/align":l.AlignStyle,"attributors/style/background":y.BackgroundStyle,"attributors/style/color":x.ColorStyle,"attributors/style/direction":c.DirectionStyle,"attributors/style/font":w.FontStyle,"attributors/style/size":_.SizeStyle},!0),o.default.register({"formats/align":l.AlignClass,"formats/direction":c.DirectionClass,"formats/indent":d.IndentClass,"formats/background":y.BackgroundStyle,"formats/color":x.ColorStyle,"formats/font":w.FontClass,"formats/size":_.SizeClass,"formats/blockquote":h.default,"formats/code-block":I.default,"formats/header":g.default,"formats/list":v.default,"formats/bold":S.default,"formats/code":z.Code,"formats/italic":T.default,"formats/link":M.default,"formats/script":O.default,"formats/strike":L.default,"formats/underline":U.default,"formats/image":W.default,"formats/video":V.default,"formats/list/item":b.ListItem,"modules/formula":H.default,"modules/syntax":ee.default,"modules/toolbar":X.default,"themes/bubble":ae.default,"themes/snow":ye.default,"ui/icons":Q.default,"ui/picker":me.default,"ui/icon-picker":xe.default,"ui/color-picker":Ne.default,"ui/tooltip":Pe.default},!0),n.default=o.default}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.IndentClass=void 0;var s=(function(){function v(y,x){for(var w=0;w<x.length;w++){var _=x[w];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(y,_.key,_)}}return function(y,x,w){return x&&v(y.prototype,x),w&&v(y,w),y}})(),o=function v(y,x,w){y===null&&(y=Function.prototype);var _=Object.getOwnPropertyDescriptor(y,x);if(_===void 0){var j=Object.getPrototypeOf(y);return j===null?void 0:v(j,x,w)}else{if("value"in _)return _.value;var S=_.get;return S===void 0?void 0:S.call(w)}},l=i(0),c=d(l);function d(v){return v&&v.__esModule?v:{default:v}}function u(v,y){if(!(v instanceof y))throw new TypeError("Cannot call a class as a function")}function h(v,y){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:v}function m(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);v.prototype=Object.create(y&&y.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(v,y):v.__proto__=y)}var g=(function(v){m(y,v);function y(){return u(this,y),h(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return s(y,[{key:"add",value:function(w,_){if(_==="+1"||_==="-1"){var j=this.value(w)||0;_=_==="+1"?j+1:j-1}return _===0?(this.remove(w),!0):o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"add",this).call(this,w,_)}},{key:"canAdd",value:function(w,_){return o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"canAdd",this).call(this,w,_)||o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"canAdd",this).call(this,w,parseInt(_))}},{key:"value",value:function(w){return parseInt(o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"value",this).call(this,w))||void 0}}]),y})(c.default.Attributor.Class),b=new g("indent","ql-indent",{scope:c.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});n.IndentClass=b}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=i(4),o=l(s);function l(m){return m&&m.__esModule?m:{default:m}}function c(m,g){if(!(m instanceof g))throw new TypeError("Cannot call a class as a function")}function d(m,g){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:m}function u(m,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);m.prototype=Object.create(g&&g.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(m,g):m.__proto__=g)}var h=(function(m){u(g,m);function g(){return c(this,g),d(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return g})(o.default);h.blotName="blockquote",h.tagName="blockquote",n.default=h}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=(function(){function g(b,v){for(var y=0;y<v.length;y++){var x=v[y];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(b,x.key,x)}}return function(b,v,y){return v&&g(b.prototype,v),y&&g(b,y),b}})(),o=i(4),l=c(o);function c(g){return g&&g.__esModule?g:{default:g}}function d(g,b){if(!(g instanceof b))throw new TypeError("Cannot call a class as a function")}function u(g,b){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:g}function h(g,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);g.prototype=Object.create(b&&b.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(g,b):g.__proto__=b)}var m=(function(g){h(b,g);function b(){return d(this,b),u(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return s(b,null,[{key:"formats",value:function(y){return this.tagName.indexOf(y.tagName)+1}}]),b})(l.default);m.blotName="header",m.tagName=["H1","H2","H3","H4","H5","H6"],n.default=m}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.ListItem=void 0;var s=(function(){function j(S,k){for(var T=0;T<k.length;T++){var P=k[T];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(S,P.key,P)}}return function(S,k,T){return k&&j(S.prototype,k),T&&j(S,T),S}})(),o=function j(S,k,T){S===null&&(S=Function.prototype);var P=Object.getOwnPropertyDescriptor(S,k);if(P===void 0){var M=Object.getPrototypeOf(S);return M===null?void 0:j(M,k,T)}else{if("value"in P)return P.value;var C=P.get;return C===void 0?void 0:C.call(T)}},l=i(0),c=g(l),d=i(4),u=g(d),h=i(25),m=g(h);function g(j){return j&&j.__esModule?j:{default:j}}function b(j,S,k){return S in j?Object.defineProperty(j,S,{value:k,enumerable:!0,configurable:!0,writable:!0}):j[S]=k,j}function v(j,S){if(!(j instanceof S))throw new TypeError("Cannot call a class as a function")}function y(j,S){if(!j)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:j}function x(j,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);j.prototype=Object.create(S&&S.prototype,{constructor:{value:j,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(j,S):j.__proto__=S)}var w=(function(j){x(S,j);function S(){return v(this,S),y(this,(S.__proto__||Object.getPrototypeOf(S)).apply(this,arguments))}return s(S,[{key:"format",value:function(T,P){T===_.blotName&&!P?this.replaceWith(c.default.create(this.statics.scope)):o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"format",this).call(this,T,P)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(T,P){return this.parent.isolate(this.offset(this.parent),this.length()),T===this.parent.statics.blotName?(this.parent.replaceWith(T,P),this):(this.parent.unwrap(),o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"replaceWith",this).call(this,T,P))}}],[{key:"formats",value:function(T){return T.tagName===this.tagName?void 0:o(S.__proto__||Object.getPrototypeOf(S),"formats",this).call(this,T)}}]),S})(u.default);w.blotName="list-item",w.tagName="LI";var _=(function(j){x(S,j),s(S,null,[{key:"create",value:function(T){var P=T==="ordered"?"OL":"UL",M=o(S.__proto__||Object.getPrototypeOf(S),"create",this).call(this,P);return(T==="checked"||T==="unchecked")&&M.setAttribute("data-checked",T==="checked"),M}},{key:"formats",value:function(T){if(T.tagName==="OL")return"ordered";if(T.tagName==="UL")return T.hasAttribute("data-checked")?T.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function S(k){v(this,S);var T=y(this,(S.__proto__||Object.getPrototypeOf(S)).call(this,k)),P=function(C){if(C.target.parentNode===k){var O=T.statics.formats(k),D=c.default.find(C.target);O==="checked"?D.format("list","unchecked"):O==="unchecked"&&D.format("list","checked")}};return k.addEventListener("touchstart",P),k.addEventListener("mousedown",P),T}return s(S,[{key:"format",value:function(T,P){this.children.length>0&&this.children.tail.format(T,P)}},{key:"formats",value:function(){return b({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(T,P){if(T instanceof w)o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"insertBefore",this).call(this,T,P);else{var M=P==null?this.length():P.offset(this),C=this.split(M);C.parent.insertBefore(T,C)}}},{key:"optimize",value:function(T){o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"optimize",this).call(this,T);var P=this.next;P!=null&&P.prev===this&&P.statics.blotName===this.statics.blotName&&P.domNode.tagName===this.domNode.tagName&&P.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(P.moveChildren(this),P.remove())}},{key:"replace",value:function(T){if(T.statics.blotName!==this.statics.blotName){var P=c.default.create(this.statics.defaultChild);T.moveChildren(P),this.appendChild(P)}o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"replace",this).call(this,T)}}]),S})(m.default);_.blotName="list",_.scope=c.default.Scope.BLOCK_BLOT,_.tagName=["OL","UL"],_.defaultChild="list-item",_.allowedChildren=[w],n.ListItem=w,n.default=_}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=i(56),o=l(s);function l(m){return m&&m.__esModule?m:{default:m}}function c(m,g){if(!(m instanceof g))throw new TypeError("Cannot call a class as a function")}function d(m,g){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:m}function u(m,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);m.prototype=Object.create(g&&g.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(m,g):m.__proto__=g)}var h=(function(m){u(g,m);function g(){return c(this,g),d(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return g})(o.default);h.blotName="italic",h.tagName=["EM","I"],n.default=h}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=(function(){function b(v,y){for(var x=0;x<y.length;x++){var w=y[x];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(v,w.key,w)}}return function(v,y,x){return y&&b(v.prototype,y),x&&b(v,x),v}})(),o=function b(v,y,x){v===null&&(v=Function.prototype);var w=Object.getOwnPropertyDescriptor(v,y);if(w===void 0){var _=Object.getPrototypeOf(v);return _===null?void 0:b(_,y,x)}else{if("value"in w)return w.value;var j=w.get;return j===void 0?void 0:j.call(x)}},l=i(6),c=d(l);function d(b){return b&&b.__esModule?b:{default:b}}function u(b,v){if(!(b instanceof v))throw new TypeError("Cannot call a class as a function")}function h(b,v){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:b}function m(b,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);b.prototype=Object.create(v&&v.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(b,v):b.__proto__=v)}var g=(function(b){m(v,b);function v(){return u(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return s(v,null,[{key:"create",value:function(x){return x==="super"?document.createElement("sup"):x==="sub"?document.createElement("sub"):o(v.__proto__||Object.getPrototypeOf(v),"create",this).call(this,x)}},{key:"formats",value:function(x){if(x.tagName==="SUB")return"sub";if(x.tagName==="SUP")return"super"}}]),v})(c.default);g.blotName="script",g.tagName=["SUB","SUP"],n.default=g}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=i(6),o=l(s);function l(m){return m&&m.__esModule?m:{default:m}}function c(m,g){if(!(m instanceof g))throw new TypeError("Cannot call a class as a function")}function d(m,g){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:m}function u(m,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);m.prototype=Object.create(g&&g.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(m,g):m.__proto__=g)}var h=(function(m){u(g,m);function g(){return c(this,g),d(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return g})(o.default);h.blotName="strike",h.tagName="S",n.default=h}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=i(6),o=l(s);function l(m){return m&&m.__esModule?m:{default:m}}function c(m,g){if(!(m instanceof g))throw new TypeError("Cannot call a class as a function")}function d(m,g){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:m}function u(m,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);m.prototype=Object.create(g&&g.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(m,g):m.__proto__=g)}var h=(function(m){u(g,m);function g(){return c(this,g),d(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return g})(o.default);h.blotName="underline",h.tagName="U",n.default=h}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=(function(){function y(x,w){for(var _=0;_<w.length;_++){var j=w[_];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(x,j.key,j)}}return function(x,w,_){return w&&y(x.prototype,w),_&&y(x,_),x}})(),o=function y(x,w,_){x===null&&(x=Function.prototype);var j=Object.getOwnPropertyDescriptor(x,w);if(j===void 0){var S=Object.getPrototypeOf(x);return S===null?void 0:y(S,w,_)}else{if("value"in j)return j.value;var k=j.get;return k===void 0?void 0:k.call(_)}},l=i(0),c=u(l),d=i(27);function u(y){return y&&y.__esModule?y:{default:y}}function h(y,x){if(!(y instanceof x))throw new TypeError("Cannot call a class as a function")}function m(y,x){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:y}function g(y,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);y.prototype=Object.create(x&&x.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(y,x):y.__proto__=x)}var b=["alt","height","width"],v=(function(y){g(x,y);function x(){return h(this,x),m(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return s(x,[{key:"format",value:function(_,j){b.indexOf(_)>-1?j?this.domNode.setAttribute(_,j):this.domNode.removeAttribute(_):o(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"format",this).call(this,_,j)}}],[{key:"create",value:function(_){var j=o(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this,_);return typeof _=="string"&&j.setAttribute("src",this.sanitize(_)),j}},{key:"formats",value:function(_){return b.reduce(function(j,S){return _.hasAttribute(S)&&(j[S]=_.getAttribute(S)),j},{})}},{key:"match",value:function(_){return/\.(jpe?g|gif|png)$/.test(_)||/^data:image\/.+;base64/.test(_)}},{key:"sanitize",value:function(_){return(0,d.sanitize)(_,["http","https","data"])?_:"//:0"}},{key:"value",value:function(_){return _.getAttribute("src")}}]),x})(c.default.Embed);v.blotName="image",v.tagName="IMG",n.default=v}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=(function(){function y(x,w){for(var _=0;_<w.length;_++){var j=w[_];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(x,j.key,j)}}return function(x,w,_){return w&&y(x.prototype,w),_&&y(x,_),x}})(),o=function y(x,w,_){x===null&&(x=Function.prototype);var j=Object.getOwnPropertyDescriptor(x,w);if(j===void 0){var S=Object.getPrototypeOf(x);return S===null?void 0:y(S,w,_)}else{if("value"in j)return j.value;var k=j.get;return k===void 0?void 0:k.call(_)}},l=i(4),c=i(27),d=u(c);function u(y){return y&&y.__esModule?y:{default:y}}function h(y,x){if(!(y instanceof x))throw new TypeError("Cannot call a class as a function")}function m(y,x){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:y}function g(y,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);y.prototype=Object.create(x&&x.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(y,x):y.__proto__=x)}var b=["height","width"],v=(function(y){g(x,y);function x(){return h(this,x),m(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return s(x,[{key:"format",value:function(_,j){b.indexOf(_)>-1?j?this.domNode.setAttribute(_,j):this.domNode.removeAttribute(_):o(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"format",this).call(this,_,j)}}],[{key:"create",value:function(_){var j=o(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this,_);return j.setAttribute("frameborder","0"),j.setAttribute("allowfullscreen",!0),j.setAttribute("src",this.sanitize(_)),j}},{key:"formats",value:function(_){return b.reduce(function(j,S){return _.hasAttribute(S)&&(j[S]=_.getAttribute(S)),j},{})}},{key:"sanitize",value:function(_){return d.default.sanitize(_)}},{key:"value",value:function(_){return _.getAttribute("src")}}]),x})(l.BlockEmbed);v.blotName="video",v.className="ql-video",v.tagName="IFRAME",n.default=v}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.FormulaBlot=void 0;var s=(function(){function _(j,S){for(var k=0;k<S.length;k++){var T=S[k];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(j,T.key,T)}}return function(j,S,k){return S&&_(j.prototype,S),k&&_(j,k),j}})(),o=function _(j,S,k){j===null&&(j=Function.prototype);var T=Object.getOwnPropertyDescriptor(j,S);if(T===void 0){var P=Object.getPrototypeOf(j);return P===null?void 0:_(P,S,k)}else{if("value"in T)return T.value;var M=T.get;return M===void 0?void 0:M.call(k)}},l=i(35),c=g(l),d=i(5),u=g(d),h=i(9),m=g(h);function g(_){return _&&_.__esModule?_:{default:_}}function b(_,j){if(!(_ instanceof j))throw new TypeError("Cannot call a class as a function")}function v(_,j){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j&&(typeof j=="object"||typeof j=="function")?j:_}function y(_,j){if(typeof j!="function"&&j!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof j);_.prototype=Object.create(j&&j.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),j&&(Object.setPrototypeOf?Object.setPrototypeOf(_,j):_.__proto__=j)}var x=(function(_){y(j,_);function j(){return b(this,j),v(this,(j.__proto__||Object.getPrototypeOf(j)).apply(this,arguments))}return s(j,null,[{key:"create",value:function(k){var T=o(j.__proto__||Object.getPrototypeOf(j),"create",this).call(this,k);return typeof k=="string"&&(window.katex.render(k,T,{throwOnError:!1,errorColor:"#f00"}),T.setAttribute("data-value",k)),T}},{key:"value",value:function(k){return k.getAttribute("data-value")}}]),j})(c.default);x.blotName="formula",x.className="ql-formula",x.tagName="SPAN";var w=(function(_){y(j,_),s(j,null,[{key:"register",value:function(){u.default.register(x,!0)}}]);function j(){b(this,j);var S=v(this,(j.__proto__||Object.getPrototypeOf(j)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return S}return j})(m.default);n.FormulaBlot=x,n.default=w}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.CodeToken=n.CodeBlock=void 0;var s=(function(){function k(T,P){for(var M=0;M<P.length;M++){var C=P[M];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(T,C.key,C)}}return function(T,P,M){return P&&k(T.prototype,P),M&&k(T,M),T}})(),o=function k(T,P,M){T===null&&(T=Function.prototype);var C=Object.getOwnPropertyDescriptor(T,P);if(C===void 0){var O=Object.getPrototypeOf(T);return O===null?void 0:k(O,P,M)}else{if("value"in C)return C.value;var D=C.get;return D===void 0?void 0:D.call(M)}},l=i(0),c=v(l),d=i(5),u=v(d),h=i(9),m=v(h),g=i(13),b=v(g);function v(k){return k&&k.__esModule?k:{default:k}}function y(k,T){if(!(k instanceof T))throw new TypeError("Cannot call a class as a function")}function x(k,T){if(!k)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T&&(typeof T=="object"||typeof T=="function")?T:k}function w(k,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof T);k.prototype=Object.create(T&&T.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}}),T&&(Object.setPrototypeOf?Object.setPrototypeOf(k,T):k.__proto__=T)}var _=(function(k){w(T,k);function T(){return y(this,T),x(this,(T.__proto__||Object.getPrototypeOf(T)).apply(this,arguments))}return s(T,[{key:"replaceWith",value:function(M){this.domNode.textContent=this.domNode.textContent,this.attach(),o(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"replaceWith",this).call(this,M)}},{key:"highlight",value:function(M){var C=this.domNode.textContent;this.cachedText!==C&&((C.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=M(C),this.domNode.normalize(),this.attach()),this.cachedText=C)}}]),T})(b.default);_.className="ql-syntax";var j=new c.default.Attributor.Class("token","hljs",{scope:c.default.Scope.INLINE}),S=(function(k){w(T,k),s(T,null,[{key:"register",value:function(){u.default.register(j,!0),u.default.register(_,!0)}}]);function T(P,M){y(this,T);var C=x(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,P,M));if(typeof C.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var O=null;return C.quill.on(u.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(O),O=setTimeout(function(){C.highlight(),O=null},C.options.interval)}),C.highlight(),C}return s(T,[{key:"highlight",value:function(){var M=this;if(!this.quill.selection.composing){this.quill.update(u.default.sources.USER);var C=this.quill.getSelection();this.quill.scroll.descendants(_).forEach(function(O){O.highlight(M.options.highlight)}),this.quill.update(u.default.sources.SILENT),C!=null&&this.quill.setSelection(C,u.default.sources.SILENT)}}}]),T})(m.default);S.DEFAULTS={highlight:(function(){return window.hljs==null?null:function(k){var T=window.hljs.highlightAuto(k);return T.value}})(),interval:1e3}
1051,n.CodeBlock=_,n.CodeToken=j,n.default=S}),(function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'}),(function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'}),(function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'}),(function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'}),(function(r,n){r.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'}),(function(r,n){r.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'}),(function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'}),(function(r,n){r.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line>
1051 <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'}),(function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'}),(function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'}),(function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'}),(function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'}),(function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'}),(function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'}),(function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'}),(function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'}),(function(r,n){r.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'}),(function(r,n){r.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'}),(function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'}),(function(r,n){r.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'}),(function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'}),(function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'}),(function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'}),(function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'}),(function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'}),(function(r,n){r.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'}),(function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'}),(function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'}),(function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'}),(function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'}),(function(r,n){r.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'}),(function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'}),(function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BubbleTooltip=void 0;var s=function T(P,M,C){P===null&&(P=Function.prototype);var O=Object.getOwnPropertyDescriptor(P,M);if(O===void 0){var D=Object.getPrototypeOf(P);return D===null?void 0:T(D,M,C)}else{if("value"in O)return O.value;var L=O.get;return L===void 0?void 0:L.call(C)}},o=(function(){function T(P,M){for(var C=0;C<M.length;C++){var O=M[C];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(P,O.key,O)}}return function(P,M,C){return M&&T(P.prototype,M),C&&T(P,C),P}})(),l=i(3),c=y(l),d=i(8),u=y(d),h=i(43),m=y(h),g=i(15),b=i(41),v=y(b);
vendor: 8,455 bytes, line 1051
1051function y(T){return T&&T.__esModule?T:{default:T}}function x(T,P){if(!(T instanceof P))throw new TypeError("Cannot call a class as a function")}function w(T,P){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return P&&(typeof P=="object"||typeof P=="function")?P:T}function _(T,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof P);T.prototype=Object.create(P&&P.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),P&&(Object.setPrototypeOf?Object.setPrototypeOf(T,P):T.__proto__=P)}var j=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],S=(function(T){_(P,T);function P(M,C){x(this,P),C.modules.toolbar!=null&&C.modules.toolbar.container==null&&(C.modules.toolbar.container=j);var O=w(this,(P.__proto__||Object.getPrototypeOf(P)).call(this,M,C));return O.quill.container.classList.add("ql-bubble"),O}return o(P,[{key:"extendToolbar",value:function(C){this.tooltip=new k(this.quill,this.options.bounds),this.tooltip.root.appendChild(C.container),this.buildButtons([].slice.call(C.container.querySelectorAll("button")),v.default),this.buildPickers([].slice.call(C.container.querySelectorAll("select")),v.default)}}]),P})(m.default);S.DEFAULTS=(0,c.default)(!0,{},m.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(P){P?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var k=(function(T){_(P,T);function P(M,C){x(this,P);var O=w(this,(P.__proto__||Object.getPrototypeOf(P)).call(this,M,C));return O.quill.on(u.default.events.EDITOR_CHANGE,function(D,L,F,U){if(D===u.default.events.SELECTION_CHANGE)if(L!=null&&L.length>0&&U===u.default.sources.USER){O.show(),O.root.style.left="0px",O.root.style.width="",O.root.style.width=O.root.offsetWidth+"px";var G=O.quill.getLines(L.index,L.length);if(G.length===1)O.position(O.quill.getBounds(L));else{var W=G[G.length-1],q=O.quill.getIndex(W),V=Math.min(W.length()-1,L.index+L.length-q),z=O.quill.getBounds(new g.Range(q,V));O.position(z)}}else document.activeElement!==O.textbox&&O.quill.hasFocus()&&O.hide()}),O}return o(P,[{key:"listen",value:function(){var C=this;s(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){C.root.classList.remove("ql-editing")}),this.quill.on(u.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!C.root.classList.contains("ql-hidden")){var O=C.quill.getSelection();O!=null&&C.position(C.quill.getBounds(O))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(C){var O=s(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"position",this).call(this,C),D=this.root.querySelector(".ql-tooltip-arrow");if(D.style.marginLeft="",O===0)return O;D.style.marginLeft=-1*O-D.offsetWidth/2+"px"}}]),P})(h.BaseTooltip);k.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),n.BubbleTooltip=k,n.default=S}),(function(r,n,i){r.exports=i(63)})]).default})})(Gy)),Gy.exports}var hi,iB;function ERe(){if(iB)return hi;iB=1;var e=hi&&hi.__extends||(function(){var u=function(h,m){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,b){g.__proto__=b}||function(g,b){for(var v in b)b.hasOwnProperty(v)&&(g[v]=b[v])},u(h,m)};return function(h,m){u(h,m);function g(){this.constructor=h}h.prototype=m===null?Object.create(m):(g.prototype=m.prototype,new g)}})(),t=hi&&hi.__assign||function(){return t=Object.assign||function(u){for(var h,m=1,g=arguments.length;m<g;m++){h=arguments[m];for(var b in h)Object.prototype.hasOwnProperty.call(h,b)&&(u[b]=h[b])}return u},t.apply(this,arguments)},r=hi&&hi.__spreadArrays||function(){for(var u=0,h=0,m=arguments.length;h<m;h++)u+=arguments[h].length;for(var g=Array(u),b=0,h=0;h<m;h++)for(var v=arguments[h],y=0,x=v.length;y<x;y++,b++)g[b]=v[y];return g},n=hi&&hi.__importDefault||function(u){return u&&u.__esModule?u:{default:u}},i=n(rp()),s=n(Ok()),o=n(AH()),l=n(kRe()),c=(function(u){e(h,u);function h(m){var g=u.call(this,m)||this;g.dirtyProps=["modules","formats","bounds","theme","children"],g.cleanProps=["id","className","style","placeholder","tabIndex","onChange","onChangeSelection","onFocus","onBlur","onKeyPress","onKeyDown","onKeyUp"],g.state={generation:0},g.selection=null,g.onEditorChange=function(v,y,x,w){var _,j,S,k;v==="text-change"?(j=(_=g).onEditorChangeText)===null||j===void 0||j.call(_,g.editor.root.innerHTML,y,w,g.unprivilegedEditor):v==="selection-change"&&((k=(S=g).onEditorChangeSelection)===null||k===void 0||k.call(S,y,w,g.unprivilegedEditor))};var b=g.isControlled()?m.value:m.defaultValue;return g.value=b??"",g}return h.prototype.validateProps=function(m){var g;if(i.default.Children.count(m.children)>1)throw new Error("The Quill editing area can only be composed of a single React element.");if(i.default.Children.count(m.children)){var b=i.default.Children.only(m.children);if(((g=b)===null||g===void 0?void 0:g.type)==="textarea")throw new Error("Quill does not support editing on a <textarea>. Use a <div> instead.")}if(this.lastDeltaChangeSet&&m.value===this.lastDeltaChangeSet)throw new Error("You are passing the `delta` object from the `onChange` event back as `value`. You most probably want `editor.getContents()` instead. See: https://github.com/zenoamaro/react-quill#using-deltas")},h.prototype.shouldComponentUpdate=function(m,g){var b=this,v;if(this.validateProps(m),!this.editor||this.state.generation!==g.generation)return!0;if("value"in m){var y=this.getEditorContents(),x=(v=m.value,v??"");this.isEqualValue(x,y)||this.setEditorContents(this.editor,x)}return m.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,m.readOnly),r(this.cleanProps,this.dirtyProps).some(function(w){return!o.default(m[w],b.props[w])})},h.prototype.shouldComponentRegenerate=function(m){var g=this;return this.dirtyProps.some(function(b){return!o.default(m[b],g.props[b])})},h.prototype.componentDidMount=function(){this.instantiateEditor(),this.setEditorContents(this.editor,this.getEditorContents())},h.prototype.componentWillUnmount=function(){this.destroyEditor()},h.prototype.componentDidUpdate=function(m,g){var b=this;if(this.editor&&this.shouldComponentRegenerate(m)){var v=this.editor.getContents(),y=this.editor.getSelection();this.regenerationSnapshot={delta:v,selection:y},this.setState({generation:this.state.generation+1}),this.destroyEditor()}if(this.state.generation!==g.generation){var x=this.regenerationSnapshot,v=x.delta,w=x.selection;delete this.regenerationSnapshot,this.instantiateEditor();var _=this.editor;_.setContents(v),d(function(){return b.setEditorSelection(_,w)})}},h.prototype.instantiateEditor=function(){this.editor?this.hookEditor(this.editor):this.editor=this.createEditor(this.getEditingArea(),this.getEditorConfig())},h.prototype.destroyEditor=function(){this.editor&&this.unhookEditor(this.editor)},h.prototype.isControlled=function(){return"value"in this.props},h.prototype.getEditorConfig=function(){return{bounds:this.props.bounds,formats:this.props.formats,modules:this.props.modules,placeholder:this.props.placeholder,readOnly:this.props.readOnly,scrollingContainer:this.props.scrollingContainer,tabIndex:this.props.tabIndex,theme:this.props.theme}},h.prototype.getEditor=function(){if(!this.editor)throw new Error("Accessing non-instantiated editor");return this.editor},h.prototype.createEditor=function(m,g){var b=new l.default(m,g);return g.tabIndex!=null&&this.setEditorTabIndex(b,g.tabIndex),this.hookEditor(b),b},h.prototype.hookEditor=function(m){this.unprivilegedEditor=this.makeUnprivilegedEditor(m),m.on("editor-change",this.onEditorChange)},h.prototype.unhookEditor=function(m){m.off("editor-change",this.onEditorChange)},h.prototype.getEditorContents=function(){return this.value},h.prototype.getEditorSelection=function(){return this.selection},h.prototype.isDelta=function(m){return m&&m.ops},h.prototype.isEqualValue=function(m,g){return this.isDelta(m)&&this.isDelta(g)?o.default(m.ops,g.ops):o.default(m,g)},h.prototype.setEditorContents=function(m,g){var b=this;this.value=g;var v=this.getEditorSelection();typeof g=="string"?m.setContents(m.clipboard.convert(g)):m.setContents(g),d(function(){return b.setE
1051ditorSelection(m,v)})},h.prototype.setEditorSelection=function(m,g){if(this.selection=g,g){var b=m.getLength();g.index=Math.max(0,Math.min(g.index,b-1)),g.length=Math.max(0,Math.min(g.length,b-1-g.index)),m.setSelection(g)}},h.prototype.setEditorTabIndex=function(m,g){var b,v;!((v=(b=m)===null||b===void 0?void 0:b.scroll)===null||v===void 0)&&v.domNode&&(m.scroll.domNode.tabIndex=g)},h.prototype.setEditorReadOnly=function(m,g){g?m.disable():m.enable()},h.prototype.makeUnprivilegedEditor=function(m){var g=m;return{getHTML:function(){return g.root.innerHTML},getLength:g.getLength.bind(g),getText:g.getText.bind(g),getContents:g.getContents.bind(g),getSelection:g.getSelection.bind(g),getBounds:g.getBounds.bind(g)}},h.prototype.getEditingArea=function(){if(!this.editingArea)throw new Error("Instantiating on missing editing area");var m=s.default.findDOMNode(this.editingArea);if(!m)throw new Error("Cannot find element for editing area");if(m.nodeType===3)throw new Error("Editing area cannot be a text node");return m},h.prototype.renderEditingArea=function(){var m=this,g=this.props,b=g.children,v=g.preserveWhitespace,y=this.state.generation,x={key:y,ref:function(w){m.editingArea=w}};return i.default.Children.count(b)?i.default.cloneElement(i.default.Children.only(b),x):v?i.default.createElement("pre",t({},x)):i.default.createElement("div",t({},x))},h.prototype.render=function(){var m;return i.default.createElement("div",{id:this.props.id,style:this.props.style,key:this.state.generation,className:"quill "+(m=this.props.className,m??""),onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())},h.prototype.onEditorChangeText=function(m,g,b,v){var y,x;if(this.editor){var w=this.isDelta(this.value)?v.getContents():v.getHTML();w!==this.getEditorContents()&&(this.lastDeltaChangeSet=g,this.value=w,(x=(y=this.props).onChange)===null||x===void 0||x.call(y,m,g,b,v))}},h.prototype.onEditorChangeSelection=function(m,g,b){var v,y,x,w,_,j;if(this.editor){var S=this.getEditorSelection(),k=!S&&m,T=S&&!m;o.default(m,S)||(this.selection=m,(y=(v=this.props).onChangeSelection)===null||y===void 0||y.call(v,m,g,b),k?(w=(x=this.props).onFocus)===null||w===void 0||w.call(x,m,g,b):T&&((j=(_=this.props).onBlur)===null||j===void 0||j.call(_,S,g,b)))}},h.prototype.focus=function(){this.editor&&this.editor.focus()},h.prototype.blur=function(){this.editor&&(this.selection=null,this.editor.blur())},h.displayName="React Quill",h.Quill=l.default,h.defaultProps={theme:"snow",modules:{},readOnly:!1},h})(i.default.Component);function d(u){Promise.resolve().then(u)}return hi=c,hi}var TRe=ERe();const kk=Ht(TRe),PRe=e=>{var t;return e?e.nickname&&e.nickname.trim()!==""?e.nickname.trim():(t=e.privacy_settings)!=null&&t.show_real_name&&e.full_name&&e.full_name.trim()!==""?e.full_name.trim():e.email?e.email.split("@")[0]:"User":"User"};function CRe(){const[e,t]=A.useState(""),[r,n]=A.useState(""),[i,s]=A.useState(""),[o,l]=A.useState(""),[c,d]=A.useState([]),[u,h]=A.useState(null),[m,g]=A.useState(!0),[b,v]=A.useState(!1),[y,x]=A.useState(null),w=Hd(),_=os(),j=A.useRef(null);A.useEffect(()=>{(async()=>{try{const P=await je.User.me();h(P)}catch{Le({title:"Authentication Error",description:"You must be logged in to create a topic.",variant:"destructive"}),w(Ve("Forum"));return}try{const M=(await je.ForumCategory.list()).filter(D=>D&&D.id&&typeof D.id=="string"&&D.id.length===24);d(M);const O=new URLSearchParams(_.search).get("categoryId");O&&M.some(D=>D.id===O)&&s(O)}catch(P){console.error("Error fetching categories:",P),x("Could not load categories. Please try again later.")}finally{g(!1)}})()},[w,_.search]);const S=async T=>{if(T.preventDefault(),!e.trim()||!r.trim()||!i){x("Title, content, and category are required."),Le({title:"Missing Information",description:"Title, content, and category are required.",variant:"destructive"});return}if(!u){x("User not loaded. Cannot create topic."),Le({title:"User Error",description:"User data not loaded. Please try logging in again.",variant:"destructive"});return}v(!0),x(null);try{const P=e.toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]+/g,""),M=PRe(u),C={category_id:i,title:e,slug:P,author_email:u.email,author_name:M,author_avatar_url:u.profile_image||"",initial_post_content:r,tags:o.split(",").map(L=>L.trim()).filter(L=>L.length>0),created_date:new Date().toISOString(),last_reply_info:{user_name:M,timestamp:new Date().toISOString()},reply_count:0,view_count:0,author_role:u.role||"user",author_rank:u.rank||"novice"},O=await je.ForumTopic.create(C),D=c.find(L=>L.id===i);D&&await je.ForumCategory.update(i,{topic_count:(D.topic_count||0)+1,post_count:(D.post_count||0)+1,last_post_info:{topic_id:O.id,topic_title:O.title,topic_slug:O.slug,user_name:M,user_email:u.email,timestamp:new Date().toISOString()}}),await je.User.updateMyUserData({forum_posts:(u.forum_posts||0)+1}),Le({title:"Topic Created!",description:"Your new topic has been posted successfully.",variant:"default"}),w(Ve(`ForumTopicView?id=${O.id}&slug=${O.slug}`))}catch(P){console.error("Error creating topic:",P),x("Failed to create topic. Please try again. "+(P.message||"")),Le({title:"Creation Failed",description:`Failed to create topic: ${P.message}`,variant:"destructive"}),v(!1)}},k={toolbar:[[{header:[1,2,3,!1]}],["bold","italic","underline","strike","blockquote","code-block"],[{list:"ordered"},{list:"bullet"}],["link","image"],["clean"]]};return!u&&!m?a.jsxs("div",{className:"max-w-2xl mx-auto py-10 px-4 text-center",children:[a.jsx(Lt,{className:"h-12 w-12 mx-auto text-red-500 mb-4"}),a.jsx("h2",{className:"text-2xl font-semibold text-white mb-3",children:"Access Denied"}),a.jsx("p",{className:"text-gray-400 mb-6",children:"You need to be logged in to create a new forum topic."}),a.jsx(se,{onClick:()=>je.User.login(),className:"bg-cyan-600 hover:bg-cyan-700",children:"Log In"})]}):a.jsxs("div",{className:"max-w-3xl mx-auto py-6 px-2 sm:px-4",children:[a.jsxs(be,{className:"bg-gray-800 border-gray-700 shadow-lg",children:[a.jsx(Be,{className:"border-b border-gray-700",children:a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(se,{onClick:()=>w(Ve("Forum")),variant:"ghost",size:"icon",className:"text-gray-400 hover:text-cyan-400 -ml-2",children:a.jsx(Uo,{className:"h-5 w-5"})}),a.jsxs(qe,{className:"text-xl sm:text-2xl font-bold text-white flex items-center",children:[a.jsx(pr,{className:"h-6 w-6 mr-3 text-cyan-400"}),"Create New Forum Topic"]})]})}),a.jsx(Se,{className:"pt-6",children:a.jsxs("form",{onSubmit:S,className:"space-y-6",children:[a.jsxs("div",{children:[a.jsx("label",{htmlFor:"title",className:"block text-sm font-medium text-gray-300 mb-1",children:"Topic Title"}
1051),a.jsx(Je,{id:"title",type:"text",value:e,onChange:T=>t(T.target.value),placeholder:"Enter a clear and descriptive title",className:"bg-gray-900 border-gray-600 text-white focus:ring-cyan-500 focus:border-cyan-500",required:!0,maxLength:150})]}),a.jsxs("div",{children:[a.jsx("label",{htmlFor:"category",className:"block text-sm font-medium text-gray-300 mb-1",children:"Category"}),m?a.jsxs("div",{className:"flex items-center p-3 bg-gray-900 border border-gray-600 rounded-md",children:[a.jsx(kt,{className:"h-4 w-4 animate-spin text-gray-400 mr-2"}),a.jsx("span",{className:"text-gray-400",children:"Loading categories..."})]}):a.jsxs(qt,{value:i,onValueChange:s,required:!0,children:[a.jsx($t,{className:"w-full bg-gray-900 border-gray-600 text-white focus:ring-cyan-500 focus:border-cyan-500",children:a.jsx(zt,{placeholder:"Select a category"})}),a.jsx(Ft,{className:"bg-gray-900 border-gray-700 text-white",children:c.map(T=>a.jsx(Ce,{value:T.id,className:"hover:bg-gray-700 focus:bg-gray-700",children:T.name},T.id))})]})]}),a.jsxs("div",{children:[a.jsx("label",{htmlFor:"content",className:"block text-sm font-medium text-gray-300 mb-1",children:"Your Post"}),a.jsx(kk,{ref:j,theme:"snow",value:r,onChange:n,modules:k,placeholder:"Write your main post content here... Be detailed and clear.",className:"bg-gray-900 text-white rounded-md quill-min-h-200"})]}),a.jsxs("div",{children:[a.jsx("label",{htmlFor:"tags",className:"block text-sm font-medium text-gray-300 mb-1",children:"Tags (Optional, comma-separated)"}),a.jsx(Je,{id:"tags",type:"text",value:o,onChange:T=>l(T.target.value),placeholder:"e.g., strategy, mql5, indicator, rsi",className:"bg-gray-900 border-gray-600 text-white focus:ring-cyan-500 focus:border-cyan-500"})]}),y&&a.jsxs("div",{className:"bg-red-900/20 text-red-400 p-3 rounded-md text-sm flex items-center gap-2",children:[a.jsx(Lt,{className:"h-4 w-4 flex-shrink-0"}),a.jsx("span",{children:y})]}),a.jsx("div",{className:"flex justify-end pt-2",children:a.jsxs(se,{type:"submit",disabled:b||m,className:"bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-700 hover:to-blue-700 text-white px-6 py-2.5",children:[b?a.jsx(kt,{className:"h-5 w-5 animate-spin mr-2"}):a.jsx(WS,{className:"h-5 w-5 mr-2"}),b?"Posting Topic...":"Post Topic"]})})]})})]}),a.jsx("style",{children:` 1052 .ql-toolbar.ql-snow { 1053 border-top-left-radius: 0.375rem; 1054 border-top-right-radius: 0.375rem; 1055 border-color: #4A5568; 1056 } 1057 .ql-container.ql-snow { 1058 border-bottom-left-radius: 0.375rem; 1059 border-bottom-right-radius: 0.375rem; 1060 border-color: #4A5568; 1061 color: #E2E8F0; 1062 min-height: 200px; 1063 } 1064 .ql-editor { 1065 min-height: 200px; 1066 } 1067 .ql-snow .ql-stroke { 1068 stroke: #A0AEC0; 1069 } 1070 .ql-snow .ql-fill { 1071 fill: #A0AEC0; 1072 } 1073 .ql-snow .ql-picker-label { 1074 color: #A0AEC0; 1075 } 1076 `})]})}const ORe=e=>{var t;return e?e.nickname&&e.nickname.trim()!==""?e.nickname.trim():(t=e.privacy_settings)!=null&&t.show_real_name&&e.full_name&&e.full_name.trim()!==""?e.full_name.trim():e.email?e.email.split("@")[0]:"User":"User"},QK=te.memo(({category:e})=>{var r;const t=((r=e.last_post_info)==null?void 0:r.user_name)||"User";return a.jsx(be,{className:"bg-gray-800 border-gray-700 hover:border-cyan-500/50 transition-all duration-300 group",children:a.jsxs(Se,{className:"p-4",children:[a.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start gap-4",children:[a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx(pt,{to:Ve(`ForumCategoryView?id=${e.id}&slug=${e.slug}`),className:"block",children:a.jsx("h3",{className:"text-lg font-semibold text-white group-hover:text-cyan-400 transition-colors mb-1 truncate",title:e.name,children:e.name})}),a.jsx("p",{className:"text-sm text-gray-400 line-clamp-2",children:e.description})]}),a.jsxs("div",{className:"flex sm:flex-col items-end sm:items-center gap-x-4 gap-y-1 text-sm text-gray-400 w-full sm:w-auto mt-2 sm:mt-0",children:[a.jsxs("div",{className:"flex items-center gap-1",title:"Topics",children:[a.jsx(pr,{className:"h-4 w-4"}),a.jsx("span",{children:e.topic_count||0})]}),a.jsxs("div",{className:"flex items-center gap-1",title:"Posts",children:[a.jsx(la,{className:"h-4 w-4"}),a.jsx("span",{children:e.post_count||0})]})]})]}),e.last_post_info&&e.last_post_info.topic_title&&a.jsxs("div",{className:"mt-3 pt-3 border-t border-gray-700/50 text-xs text-gray-500",children:[a.jsxs("p",{className:"truncate",children:["Last post in: ",a.jsx(pt,{to:Ve(`ForumTopicView?id=${e.last_post_info.topic_id}&slug=${e.last_post_info.topic_slug}`),className:"text-cyan-500 hover:underline",children:e.last_post_info.topic_title})]}),a.jsxs("p",{children:["by ",a.jsx("span",{className:"font-medium text-gray-400",children:t}),a.jsx("span",{className:"mx-1",children:"â¢"}),Mn(new Date(e.last_post_info.timestamp),{addSuffix:!0})]})]})]})})});
1076QK.displayName="CategoryListItem";function MRe(){const[e,t]=A.useState([]),[r,n]=A.useState(!0),[i,s]=A.useState(""),[o,l]=A.useState(null),[c,d]=A.useState(null),u=Hd(),h=A.useCallback(async()=>{n(!0),d(null);try{let g=await je.ForumCategory.list("-order");g=await Promise.all(g.map(async b=>{if(b.last_post_info&&b.last_post_info.user_email&&(!b.last_post_info.user_name||b.last_post_info.user_name.includes("@")))try{const v=await je.User.filter({email:b.last_post_info.user_email});if(v&&v.length>0)return{...b,last_post_info:{...b.last_post_info,user_name:ORe(v[0])}}}catch(v){console.warn(`Failed to fetch user for last post in category ${b.name}:`,v)}return b})),t(g)}catch(g){console.error("Error fetching forum categories:",g),d("Could not load forum categories. Please try refreshing the page.")}n(!1)},[]);A.useEffect(()=>{je.User.me().then(l).catch(()=>l(null)),h()},[h]);const m=e.filter(g=>g.name.toLowerCase().includes(i.toLowerCase())||g.description.toLowerCase().includes(i.toLowerCase()));return r?a.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[calc(100vh-200px)]",children:[a.jsx(kt,{className:"h-12 w-12 animate-spin text-cyan-500 mb-4"}),a.jsx("p",{className:"text-white",children:"Loading forum categories..."})]}):c?a.jsxs("div",{className:"text-center py-10 max-w-lg mx-auto",children:[a.jsx(Lt,{className:"h-16 w-16 mx-auto text-red-500 mb-4"}),a.jsx("h3",{className:"text-xl font-medium text-red-400",children:c}),a.jsx(se,{onClick:h,variant:"outline",className:"mt-6 border-gray-600 text-gray-300 hover:bg-gray-700",children:"Try Again"})]}):a.jsxs("div",{className:"max-w-5xl mx-auto py-6 px-2 sm:px-4 space-y-6",children:[a.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-start md:items-center gap-4",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsxs("h1",{className:"text-2xl sm:text-3xl font-bold text-white flex items-center",children:[a.jsx(pr,{className:"h-7 w-7 sm:h-8 sm:w-8 mr-3 text-cyan-400"}),"Community Forum"]}),a.jsx("p",{className:"text-gray-400 text-sm sm:text-base",children:"Discuss trading, strategies, and share your expert advisors."})]}),o&&a.jsxs(se,{onClick:()=>u(Ve("ForumNewTopic")),className:"w-full md:w-auto bg-gradient-to-r from-cyan-500 to-blue-500 hover:from-cyan-600 hover:to-blue-600 text-white transition-all",children:[a.jsx(Ch,{className:"h-5 w-5 mr-2"}),"Start New Topic"]})]}),a.jsxs("div",{className:"relative",children:[a.jsx(al,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-5 w-5 text-gray-500"}),a.jsx(Je,{type:"text",placeholder:"Search categories by name or description...",value:i,onChange:g=>s(g.target.value),className:"pl-10 pr-4 py-2 w-full bg-gray-800 border-gray-700 rounded-md text-white focus:border-cyan-500"})]}),m.length===0?a.jsxs("div",{className:"text-center py-10 bg-gray-800/50 rounded-lg border border-gray-700",children:[a.jsx(pr,{className:"h-16 w-16 mx-auto text-gray-600 mb-4"}),a.jsx("h3",{className:"text-xl font-medium text-gray-300",children:"No Categories Found"}),a.jsx("p",{className:"text-gray-400 mt-2",children:i?"No categories match your search criteria.":"It seems no forum categories have been created yet."})]}):a.jsx("div",{className:"space-y-4",children:m.map(g=>a.jsx(QK,{category:g},g.id||g.slug))}),!o&&a.jsx("div",{className:"bg-gray-800/50 border border-gray-700 rounded-lg p-6 text-center",children:a.jsxs("p",{className:"text-gray-300",children:["Want to participate in discussions or start a new topic?"," ",a.jsx(se,{variant:"link",className:"p-0 h-auto text-cyan-400 hover:text-cyan-300 text-base",onClick:g=>{g.preventDefault(),je.User.login()},children:"Sign In / Register"}),"."]})})]})}const RRe="682989edff3a8269eeeefa50",DRe=["68cfc815d945df51aa988d11"],LS=e=>{var t;return e?e.nickname&&e.nickname.trim()!==""?e.nickname.trim():(t=e.privacy_settings)!=null&&t.show_real_name&&e.full_name&&e.full_name.trim()!==""?e.full_name.trim():e.email?e.email.split("@")[0]:"User":"User"},ZK=te.memo(({post:e,isInitialPost:t=!1,currentUser:r,onVote:n,onQuote:i,onReport:s,onShare:o,onEdit:l,onDelete:c,index:d,topicAuthorEmail:u})=>{const h=_=>{const j=_.split(" ");return j.length===1?j[0].charAt(0).toUpperCase():j[0].charAt(0).toUpperCase()+j[j.length-1].charAt(0).toUpperCase()},m=r&&r.email===e.author_email,g=r&&r.role==="admin",b=m||g,v=m||g;let y=a.jsx(Oe,{variant:"secondary",className:"text-xs py-0.5 px-1.5 h-5",children:"Member"});e.author_role==="admin"||e.author_role==="moderator"?y=a.jsx(Oe,{className:"admin-badge text-xs py-0.5 px-1.5 h-5",children:"Admin"}):e.author_role==="vip"&&(y=a.jsx(Oe,{className:"vip-badge text-xs py-0.5 px-1.5 h-5",children:"VIP"}));const x=e.author_email===u,w=e.author_name||"User";return a.jsxs(be,{id:`post-${e.id}`,className:`mb-6 bg-gray-800 border border-gray-700 shadow-sm hover:shadow-lg transition-shadow duration-300 ${t?"border-l-4 border-l-cyan-500":""}`,children:[a.jsxs(Be,{className:"p-3 bg-gray-850/70 flex flex-row items-center justify-between border-b border-gray-700",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs(pt,{to:`#post-${e.id}`,className:"text-sm font-semibold text-cyan-400 hover:underline",children:["#",d+1]}),a.jsx("span",{className:"text-xs text-gray-400",children:_s(new Date(e.post_date||e.created_date),"MMM d, yyyy h:mm a")}),t&&a.jsx(Oe,{variant:"outline",className:"text-xs border-cyan-600 text-cyan-400 py-0.5 px-1.5 h-5",children:"Original Post"})]}),a.jsx("div",{className:"flex items-center",children:a.jsxs(IP,{children:[a.jsx(LP,{asChild:!0,children:a.jsx(se,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 text-gray-400 hover:text-white",children:a.jsx(RB,{className:"h-4 w-4"})})}),a.jsxs(Kx,{align:"end",className:"w-48 bg-gray-900 border-gray-700 text-gray-200",children:[a.jsxs(wa,{onClick:()=>o(e),className:"cursor-pointer hover:bg-gray-700",children:[a.jsx(zk,{className:"mr-2 h-4 w-4 text-cyan-400"})," Share Post Link"]}),r&&a.jsxs(wa,{onClick:()=>s(e),className:"cursor-pointer hover:bg-gray-700",children:[a.jsx(XZ,{className:"mr-2 h-4 w-4 text-yellow-400"})," Report Post"]}),(b||v)&&a.jsx($P,{className:"bg-gray-700"}),b&&a.jsxs(wa,{onClick:()=>l(e),className:"cursor-pointer hover:bg-gray-700",children:[a.jsx(LB,{className:"mr-2 h-4 w-4 text-blue-400"})," Edit Post"]}),v&&a.jsxs(wa,{onClick:()=>c(e),className:"cursor-pointer hover:bg-gray-700 text-red-400 hover:text-red-300",children:[a.jsx(Ud,{className:"mr-2 h-4 w-4"})," Delete Post"]})]})]})})]}),a.jsxs(Se,{className:"p-0 flex flex-col md:flex-row",children:[a.jsxs("div",{className:"w-full md:w-48 p-4 bg-gray-850/40 md:border-r border-gray-700 flex flex-col items-center text-center space-y-2",children:[a.jsxs(Rs,{className:`h-16 w-16 ${e.author_role==="admin"?"border-2 border-red-500":e.author_role==="vip"?"border-2 border-yellow-400":"border-2 border-gray-600"}`,children:[a.jsx(Ds,{src:e.author_avatar_url,alt:w}),a.jsx(Is,{className:"bg-gray-700 text-xl",children:h(w)})]}),a.jsx("p",{className:`font-semibold text-md ${e.author_role==="admin"?"admin-name":e.author_role==="vip"?"vip-name":"text-white"}`,children:w}),a.jsxs("div",{className:"flex flex-wrap justify-center items-center gap-1",children:[y,x&&!t&&a.jsx(Oe,{variant:"outline",className:"text-xs border-purple-600 text-purple-400 py-0.5 px-1.5 h-5",children:"OP"})]}),a.jsxs("p",{className:"text-xs text-gray-400",children:["Posts: ",e.author_post_count||0]}),e.author_join_date&&a.jsxs("p",{className:"text-xs text-gray-400",children:["Joined: ",_s(new Date(e.author_join_date),"MMM yyyy")]}),e.author_rank&&a.jsx(Oe,{variant:"secondary",className:`text-xs py-0.5 px-1.5 h-5 mt-1 ${e.author_rank==="grandmaster"?"bg-gradient-to-r from-yellow-400 to-amber-600 text-black":"bg-gray-700"}`,children:e.author_rank.charAt(0).toUpperCase()+e.author_rank.slice(1)})]}),a.jsxs("div",{className:"flex-1 p-4 md:p-6",children:[e.quoted_post_content&&a.jsxs("blockquote",{className:"mb-4 p-3 border-l-4 border-gray-600 bg-gray-750/30 rounded-md",children:[a.jsxs("div",{className:"text-xs text-gray-400 mb-1",children:[a.jsx("span",{className:"font-semibold",children:e.quoted_author_name||"User"})," wrote:"]}),a.jsx("div",{className:"text-sm text-gray-300 italic line-clamp-3",dangerouslySetInnerHTML:{__html:e.quoted_post_content}})]}),a.jsx("div",{className:"prose prose-sm sm:prose-base prose-invert max-w-none break-words",dangerouslySetInnerHTML:{__html:e.content||e.initial_post_content}}),e.last_edited_date&&a.jsxs("p",{className:"text-xs text-gray-500 mt-4 italic",children:["Last edited: ",Mn(new Date(e.last_edited_date),{addSuffix:!0})]})]})]}),a.jsxs(mp,{className:"p-3 bg-gray-850/70 border-t border-gray-700 flex items-center justify-end gap-1",children:[!t&&r&&a.jsxs(a.Fragment,{children:[a.jsxs(se,{variant:"ghost",size:"sm",className:"text-gray-400 hover:text-green-400 hover:bg-gray-700/50 px-2 py-1 h-auto",disabled:!r,onClick:()=>n(e.id,"up"),title:"Upvote",children:[a.jsx(Ju,{className:"h-4 w-4 mr-1"}),a.jsx("span",{className:"text-xs",children:e.upvotes||0})]}),a.jsxs(se,{variant:"ghost",size:"sm",className:"text-gray-400 hover:text-red-400 hover:bg-gray-700/50 px-2 py-1 h-auto",disabled:!r,onClick:()=>n(e.id,"down"),title:"Downvote",children:[a.jsx(yee,{className:"h-4 w-4 mr-1"}),a.jsx("span",{className:"text-xs",children:e.downvotes||0})]}),a.jsx(Zv,{orientation:"vertical",className:"h-5 bg-gray-600 mx-1"})]}),r&&a.jsxs(se,{variant:"ghost",size:"sm",className:"text-gray-400 hover:text-cyan-400 hover:bg-gray-700/50 px-2 py-1 h-auto",onClick:()=>i(e),title:"Quote this post in your reply",children:[a.jsx(LJ,{className:"h-4 w-4 mr-1"})," Reply with Quote"]})]})]})});ZK.displayName="PostItem";function IRe(){const[e,t]=A.useState(null),[r,n]=A.useState(null),[i,s]=A.useState([]),[o,l]=A.useState(!0),[c,d]=A.useState(""),[u,h]=A.useState(null),[m,g]=A.useState(!1),[b,v]=A.useState(null),[y,x]=A.useState(null),[w,_]=A.useState(""),[j,S]=A.useState(!1),[k,T]=A.useState(null),P=Hd(),M=os(),C=A.useRef(null),O=A.useRef(null),D=10,[L,F]=A.useState(0),[U,G]=A.useState(0),W=A.useCallback(async(Q=1,ie=!1)=>{ie||(l(!0),s([])),v(null);const oe=new URLSearchParams(M.search).get("id");if(!oe){v("Topic ID is missing from URL."),l(!1);return}try{const Ne=await je.ForumTopic.get(oe);if(t(Ne),Ne&&Ne.id&&je.ForumTopic.update(Ne.id,{view_count:(Ne.view_count||0)+1}
1076).catch(ae=>console.warn("Failed to update view count",ae)),Ne&&Ne.category_id){const ae=Ne.category_id===RRe||DRe.includes(Ne.category_id)||Ne.category_id===oe,pe=Ne.category_id&&typeof Ne.category_id=="string"&&Ne.category_id.length>=20;if(ae||!pe)console.warn(`Skipping category fetch for problematic/invalid category_id: ${Ne.category_id}`),n({name:"General Discussion",id:null,slug:"general-discussion"});else try{const ye=await je.ForumCategory.get(Ne.category_id);n(ye)}catch(ye){console.warn("Category fetch failed, using fallback:",ye.message),n({name:"General Discussion",id:null,slug:"general-discussion"})}}else n({name:"General Discussion",id:null,slug:"general-discussion"});const _e=await je.ForumPost.filter({topic_id:oe},"post_date",D,(Q-1)*D);G((Ne.reply_count||0)+1);const xe=async ae=>Promise.all(ae.map(async pe=>{try{const ye=await je.User.filter({email:pe.author_email});if(ye&&ye.length>0){const he=ye[0];return{...pe,author_name:LS(he),author_avatar_url:he.profile_image||pe.author_avatar_url,author_role:he.role||"user",author_rank:he.rank||"novice",author_post_count:he.forum_posts||0,author_join_date:he.created_date}}}catch(ye){console.warn("Error fetching user details for post author:",pe.author_email,ye)}return{...pe,author_name:pe.author_name||LS({email:pe.author_email})}})),Ee=await xe(_e),Pe={id:Ne.id,topic_id:Ne.id,author_email:Ne.author_email,content:Ne.initial_post_content,created_date:Ne.created_date,post_date:Ne.created_date,upvotes:Ne.upvotes||0,downvotes:Ne.downvotes||0,isInitialPost:!0},[Z]=await xe([Pe]);s(Q===1?[Z,...Ee]:ie?ae=>[...ae,...Ee]:[Z,...Ee]),F(Q)}catch(Ne){console.error("Error loading topic data:",Ne),v("Failed to load topic. It may have been deleted or the link is incorrect."),t(null),s([])}finally{l(!1)}},[M.search]);A.useEffect(()=>{je.User.me().then(h).catch(()=>h(null)),W(1,!1)},[W]);const q=async(Q,ie)=>{if(!u){Le({title:"Login Required",description:"Please log in to vote.",variant:"destructive"});return}try{const me=i.find(_e=>_e.id===Q);if(!me||me.isInitialPost)return;const oe=ie==="up"?me.upvotes||0:me.downvotes||0,Ne=ie==="up"?{upvotes:oe+1}:{downvotes:oe+1};await je.ForumPost.update(Q,Ne),s(_e=>_e.map(xe=>xe.id===Q?{...xe,...Ne}:xe)),Le({title:"Vote Submitted!",variant:"default"})}catch(me){console.error("Error submitting vote:",me),Le({title:"Vote Error",description:"Could not submit your vote.",variant:"destructive"})}},V=async()=>{if(!c.trim()){Le({title:"Empty Reply",description:"Cannot submit an empty reply.",variant:"destructive"});return}if(!u){Le({title:"Login Required",description:"Please log in to reply.",variant:"destructive"});return}g(!0);try{const Q=LS(u),ie={topic_id:e.id,author_email:u.email,author_name:Q,author_avatar_url:u.profile_image||"",content:c,post_date:new Date().toISOString(),author_role:u.role||"user",author_rank:u.rank||"novice"},oe={...await je.ForumPost.create(ie),author_name:Q,author_avatar_url:u.profile_image||"",author_role:u.role||"user",author_rank:u.rank||"novice",author_post_count:(u.forum_posts||0)+1,author_join_date:u.created_date};s(xe=>[...xe,oe]),d(""),C.current&&C.current.getEditor().setText("");const Ne=(e.reply_count||0)+1;t(xe=>({...xe,reply_count:Ne,last_reply_info:{user_name:Q,timestamp:new Date().toISOString()}})),await je.ForumTopic.update(e.id,{reply_count:Ne,last_reply_info:{user_name:Q,timestamp:new Date().toISOString()}});const _e=(u.forum_posts||0)+1;await je.User.updateMyUserData({forum_posts:_e}),h(xe=>({...xe,forum_posts:_e})),G(xe=>xe+1),Le({title:"Reply Posted!",variant:"default"})}catch(Q){console.error("Error submitting reply:",Q),Le({title:"Reply Error",description:"Could not submit your reply.",variant:"destructive"})}finally{g(!1)}},z=Q=>{var me;if(!u){Le({title:"Login Required",description:"Please log in to quote.",variant:"destructive"});return}const ie=(me=C.current)==null?void 0:me.getEditor();if(ie){const oe=document.createElement("div");oe.innerHTML=Q.content||Q.initial_post_content||"";const Ne=oe.textContent||oe.innerText||"",_e=`<blockquote><strong>${Q.author_name||"User"} said:</strong><br/>${Ne.substring(0,200)}${Ne.length>200?"...":""}</blockquote><br/>`,xe=ie.getContents();ie.clipboard.dangerouslyPasteHTML(xe.ops.length>
10760?xe.ops.length-1:0,_e),ie.focus();const Ee=document.getElementById("reply-box");Ee&&Ee.scrollIntoView({behavior:"smooth",block:"center"})}},I=Q=>{x(Q),_(Q.content||Q.initial_post_content||"")},B=async()=>{if(!y||!w.trim()){Le({title:"Error",description:"Cannot save empty content.",variant:"destructive"});return}g(!0);try{const Q={content:w,last_edited_date:new Date().toISOString()};let ie;y.isInitialPost?(await je.ForumTopic.update(y.id,{initial_post_content:w,last_edited_date:new Date().toISOString()}),ie={...e,initial_post_content:w,last_edited_date:new Date().toISOString()},t(ie)):(await je.ForumPost.update(y.id,Q),ie={...y,...Q}),s(me=>me.map(oe=>oe.id===y.id?{...oe,...Q,content:w}:oe)),x(null),_(""),Le({title:"Post Updated!",variant:"default"})}catch(Q){console.error("Error saving edit:",Q),Le({title:"Error",description:"Could not save changes.",variant:"destructive"})}finally{g(!1)}},H=Q=>{T(Q),S(!0)},J=async()=>{if(k){g(!0);try{if(k.isInitialPost){const Q=await je.ForumPost.filter({topic_id:k.id});for(const ie of Q)await je.ForumPost.delete(ie.id);await je.ForumTopic.delete(k.id),Le({title:"Topic Deleted!",description:"The topic and all its replies have been removed.",variant:"default"}),P(Ve("Forum"))}else{if(await je.ForumPost.delete(k.id),s(Q=>Q.filter(ie=>ie.id!==k.id)),e&&(e.reply_count||0)>0){const Q=e.reply_count-1;await je.ForumTopic.update(e.id,{reply_count:Q}),t(ie=>({...ie,reply_count:Q}))}G(Q=>Q-1),Le({title:"Reply Deleted!",variant:"default"})}S(!1),T(null)}catch(Q){console.error("Error deleting post:",Q),Le({title:"Error",description:"Could not delete the post/topic.",variant:"destructive"})}finally{g(!1)}}},ee=Q=>{const ie=`${window.location.origin}${Ve(`ForumTopicView?id=${e.id}&slug=${e.slug}`)}#post-${Q.id}`;navigator.clipboard.writeText(ie).then(()=>Le({title:"Link Copied!",description:"Post link copied to clipboard.",variant:"default"})).catch(()=>Le({title:"Copy Failed",description:"Could not copy link.",variant:"destructive"}))},Y=Q=>{Le({title:"Report Submitted",description:`Post by ${Q.author_name||"User"} has been reported for review.`,variant:"default"}),console.log("Reported post:",Q.id,"by user:",u==null?void 0:u.email)},X={toolbar:[[{header:[1,2,3,!1]}],["bold","italic","underline","strike"],["blockquote","code-block"],[{list:"ordered"},{list:"bullet"}],[{color:[]},{background:[]}],["link","image"],["clean"]]},ne=()=>{!o&&i.length<U&&W(L+1,!0)};return o&&i.length===0&&!b?a.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[calc(100vh-200px)]",children:[a.jsx(kt,{className:"h-12 w-12 animate-spin text-cyan-500 mb-4"}),a.jsx("p",{className:"text-white",children:"Loading topic..."})]}):b?a.jsxs("div",{className:"text-center py-10 max-w-lg mx-auto",children:[a.jsx(Lt,{className:"h-16 w-16 mx-auto text-red-500 mb-4"}),a.jsx("h3",{className:"text-xl font-medium text-red-400",children:b}),a.jsx("p",{className:"text-gray-400 mt-2",children:"Please check the URL or try again later."}),a.jsxs(se,{onClick:()=>P(Ve("Forum")),variant:"outline",className:"mt-6 border-gray-600 text-gray-300 hover:bg-gray-700",children:[a.jsx(Uo,{className:"h-4 w-4 mr-2"})," Back to Forum"]})]}):e?a.jsxs("div",{className:"max-w-5xl mx-auto px-2 sm:px-4 py-6 space-y-6",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-center text-sm text-gray-400 gap-1.5 flex-wrap",children:[a.jsx(pt,{to:Ve("Forum"),className:"hover:text-cyan-400 transition-colors",children:"Forum"}),a.jsx(ip,{className:"h-3.5 w-3.5 flex-shrink-0"}),r&&r.id?a.jsx(pt,{to:Ve(`ForumCategoryView?id=${r.id}&slug=${r.slug}`),className:"hover:text-cyan-400 transition-colors truncate max-w-[150px] sm:max-w-xs",children:r.name}):a.jsx("span",{className:"text-gray-500",children:(r==null?void 0:r.name)||"General Discussion"})]}),a.jsx("h1",{className:"text-2xl sm:text-3xl font-bold text-white break-words leading-tight",children:e.title}),a.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2 text-xs text-gray-400",children:[a.jsxs("span",{className:"flex items-center gap-1",title:"Views",children:[a.jsx(Fd,{className:"h-3.5 w-3.5"})," ",e.view_count||0]}),a.jsxs("span",{className:"flex items-center gap-1",title:"Replies",children:[a.jsx(pr,{className:"h-3.5 w-3.5"})," ",e.reply_count||0]}),e.is_pinned&&a.jsxs("span",{className:"flex items-center gap-1 text-yellow-400 font-medium",children:[a.jsx($B,{className:"h-3.5 w-3.5"})," Pinned"]}),e.is_locked&&a.jsxs("span",{className:"flex items-center gap-1 text-red-400 font-medium",children:[a.jsx(zS,{className:"h-3.5 w-3.5"})," Locked"]})]}),e.tags&&e.tags.length>0&&a.jsx("div",{className:"flex flex-wrap gap-1.5 mt-2",children:e.tags.map(Q=>a.jsx(Oe,{variant:"secondary",className:"text-xs bg-gray-700 text-gray-300 hover:bg-gray-600 cursor-pointer",children:Q},Q))})]}),a.jsx(Zv,{className:"bg-gray-700"}),a.jsx("div",{className:"space-y-0",children:i.map((Q,ie)=>a.jsx(ZK,{post:Q,isInitialPost:Q.isInitialPost||!1,currentUser:u,onVote:q,onQuote:z,onReport:Y,onShare:ee,onEdit:I,onDelete:H,index:ie,topicAuthorEmail:e.author_email},Q.id||`post-${ie}`))}),o&&i.length>0&&L>1&&a.jsx("div",{className:"flex justify-center py-4",children:a.jsx(kt,{className:"h-6 w-6 animate-spin text-cyan-500"})}),!o&&i.length<U&&a.jsx("div",{className:"text-center py-4",children:a.jsxs(se,{onClick:ne,variant:"outline",className:"border-gray-600 text-gray-300 hover:bg-gray-700 transition-colors",children:["Load More Replies (",U-i.length," remaining)"]})}),y&&a.jsxs(be,{id:"edit-post-box",className:"mt-8 bg-gray-800 border-gray-700 shadow-lg",children:[a.jsx(Be,{children:a.jsxs(qe,{className:"text-white text-xl flex items-center gap-2",children:[a.jsx(LB,{className:"h-5 w-5 text-blue-400"})," Edit Your Post"]})}),a.jsxs(Se,{children:[a.jsx(kk,{ref:O,theme:"snow",value:w,onChange:_,modules:X,className:"bg-gray-900 text-white rounded-md quill-min-h-150",placeholder:"Edit your post content..."}),a.jsxs("div",{className:"flex justify-end gap-2 mt-4",children:[a.jsx(se,{variant:"outline",onClick:()=>{x(null),_("")},disabled:m,className:"border-gray-600 text-gray-300 hover:bg-gray-700",children:"Cancel"}),a.jsxs(se,{onClick:B,disabled:m||!w.trim(),className:"bg-blue-600 hover:bg-blue-700",children:[m?a.jsx(kt,{className:"h-4 w-4 animate-spin mr-2"}):a.jsx(WS,{className:"h-4 w-4 mr-2"}),"Save Changes"]})]})]})]}),!y&&u&&!e.is_locked&&a.jsxs(be,{id:"reply-box",className:"mt-8 bg-gray-800 border-gray-700 shadow-lg",children:[a.jsx(Be,{className:"pb-3",children:a.jsxs(qe,{className:"text-white text-xl flex items-center gap-2",children:[a.jsx(zJ,{className:"h-5 w-5 text-cyan-400"})," Post a Reply"]})}),a.jsxs(Se,{children:[a.jsx(kk,{ref:C,theme:"snow",value:c,onChange:d,modules:X,className:"bg-gray-900 text-white rounded-md quill-min-h-150",placeholder:`Replying to "${e.title}"...`}),a.jsx("div",{className:"flex justify-end mt-4",children:a.jsxs(se,{onClick:V,disabled:m||!c.trim(),className:"bg-cyan-600 hover:bg-cyan-700",children:[m?a.jsx(kt,{className:"h-4 w-4 animate-spin mr-2"}):a.jsx(WS,{className:"h-4 w-4 mr-2"}),"Submit Reply"]})})]})]}),!y&&e.is_locked&&a.jsxs("div",{className:"text-center py-6 bg-gray-800/50 border border-gray-700 rounded-lg mt-8",children:[a.jsx(zS,{className:"h-8 w-8 mx-auto text-red-500 mb-2"}),a.jsx("p",{className:"text-gray-300 font-medium",children:"This topic is locked."}),a.jsx("p",{className:"text-sm text-gray-400",children:"No new replies can be posted."})]}),!y&&!u&&!e.is_locked&&a.jsx(be,{className:"mt-8 bg-gray-800 border-gray-700 p-6 text-center shadow-lg",children:a.jsxs("p",{className:"text-gray-300",children:[a.jsx("button",{onClick:()=>je.User.login(),className:"text-cyan-400 hover:underline font-semibold",children:"Log in"})," or ",a.jsx("button",{onClick:()=>je.User.login(),className:"text-cyan-400 hover:underline font-semibold",children:"register"})," to post a reply."]})}),a.jsx(Ym,{open:j,onOpenChange:S,children:a.jsxs(Md,{className:"bg-gray-800 border-gray-700 text-white",children:[a.jsxs(Rd,{children:[a.jsxs(Id,{className:"flex items-center gap-2",children:[a.jsx(Lt,{className:"h-6 w-6 text-red-500"})," Are you absolutely sure?"]}),a.jsxs(Ld,{className:"text-gray-400 pt-2",children:["This action cannot be undone. This will permanently delete the ",k!=null&&k.isInitialPost?"topic and all its replies":"post",".",(k==null?void 0:k.isInitialPost)&&a.jsx("strong",{className:"block mt-2 text-red-400",children:"WARNING: Deleting the main topic will remove ALL replies associated with it."})]})]}),a.jsxs(Dd,{className:"mt-4",children:[a.jsx(Xm,{onClick:()=>T(null),className:"text-gray-300 border-gray-600 hover:bg-gray-700",children:"Cancel"}),a.jsxs($d,{onClick:J,className:"bg-red-600 hover:bg-red-700 text-white",disabled:m,children:[m?a.jsx(kt,{className:"h-4 w-4 animate-spin mr-2"}):null,"Yes, delete"]})]})]})}),a.jsx("style",{children:` 1077 .ql-toolbar.ql-snow { 1078 border-top-left-radius: 0.375rem; 1079 border-top-right-radius: 0.375rem; 1080 border-color: #374151; 1081 background-color: #1f2937; 1082 } 1083 .ql-container.ql-snow { 1084 border-bottom-left-radius: 0.375rem; 1085 border-bottom-right-radius: 0.375rem; 1086 border-color: #374151; 1087 color: #d1d5db; 1088 background-color: #111827; 1089 } 1090 .ql-editor { 1091 min-height: 150px; 1092 padding: 12px; 1093 } 1094 .ql-editor.ql-blank::before { 1095 color: #6b7280; 1096 font-style: normal; 1097 } 1098 .ql-snow .ql-stroke, .ql-snow .ql-picker-label { 1099 stroke: #9ca3af; 1100 color: #9ca3af; 1101 } 1102 .ql-snow .ql-fill { 1103 fill: #9ca3af; 1104 } 1105 .ql-snow .ql-picker-options { 1106 background-color: #1f2937; 1107 border-color: #374151; 1108 } 1109 .ql-snow .ql-picker-item:hover, .ql-snow .ql-picker-item.ql-selected { 1110 color: #38bdf8; 1111 } 1112 .prose-invert code::before, .prose-invert code::after { content: none !important; } 1113 .prose-invert blockquote { 1114 border-left-color: #4b5563; 1115 color: #9ca3af; 1116 } 1117 `})]}):a.jsxs("div",{className:"text-center py-10 max-w-lg mx-auto",children:[a.jsx(pr,{className:"h-16 w-16 mx-auto text-gray-600 mb-4"}),a.jsx("h3",{className:"text-xl font-medium text-gray-300",children:"Topic Not Found"}),a.jsx("p",{className:"text-gray-400 mt-2",children:"This topic may have been moved or deleted."}),a.jsxs(se,{onClick:()=>P(Ve("Forum")),variant:"outline",className:"mt-6 border-gray-600 text-gray-300 hover:bg-gray-700",children:[a.jsx(Uo,{className:"h-4 w-4 mr-2"})," Back to Forum"]})]})}function LRe(){return a.jsxs("div",{className:"container mx-auto p-4 md:p-6 lg:p-8 max-w-5xl space-y-8",children:[a.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[a.jsx(Ya,{className:"h-12 w-12"}),a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-bold text-white",children:"Legal Terms & Disclaimer"}),a.jsx("p",{className:"text-gray-400",children:"Terms of Use, Disclaimer, and Community Guidelines"})]})]}),a.jsxs(ei,{defaultValue:"disclaimer",className:"space-y-6",children:[a.jsxs(Ta,{children:[a.jsxs(Nt,{value:"disclaimer",children:[a.jsx(Ji,{className:"h-4 w-4 mr-2"}),"Disclaimer"]}),a.jsxs(Nt,{value:"terms",children:[a.jsx(FB,{className:"h-4 w-4 mr-2"}),"Terms of Use"]}),a.jsxs(Nt,{value:"guidelines",children:[a.jsx(pr,{className:"h-4 w-4 mr-2"}),"Community Guidelines"]})]}),a.jsx(Pt,{value:"disclaimer",children:a.jsxs(be,{className:"bg-gray-800 border-gray-700",children:[a.jsx(Be,{children:a.jsxs(qe,{className:"text-white flex items-center gap-2",children:[a.jsx(Ar,{className:"h-5 w-5 text-red-400"}),"Risk Disclaimer"]})}),a.jsxs(Se,{className:"space-y-4 text-gray-300",children:[a.jsxs("div",{className:"p-4 bg-red-900/20 border border-red-900 rounded-lg mb-6",children:[a.jsxs("p",{className:"text-red-400 font-medium flex items-center gap-2",children:[a.jsx(Ji,{className:"h-5 w-5"}),"High Risk Warning"]}),a.jsx("p",{className:"mt-2 text-sm",children:"Trading foreign exchange, cryptocurrencies, and other financial instruments carries a high level of risk and may not be suitable for all investors. Before deciding to trade, you should carefully consider your investment objectives, level of experience, and risk appetite."})]}),a.jsx("h3",{className:"text-lg font-medium text-white",children:"Trading Risks"}),a.jsx("p",{children:"The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading, and seek advice from an independent financial advisor if you have any doubts."}),a.jsx("h3",{className:"text-lg font-medium text-white",children:"Expert Advisor Disclaimer"}),a.jsx("p",{children:"All Expert Advisors (EAs), trading robots, signals, and other trading tools provided through GPT4Trade.com:"}),a.jsxs("ul",{className:"list-disc pl-6 space-y-2 mt-2",children:[a.jsx("li",{children:'Are provided "as is" without any guarantees or warranties'}),a.jsx("li",{children:"May not produce the same results on your trading account as shown in backtests or demonstrations"}),a.jsx("li",{children:"Should be thoroughly tested on a demo account before real money trading"}),a.jsx("li",{children:"Past performance is not indicative of future results"})]}),a.jsx("h3",{className:"text-lg font-medium text-white",children:"No Financial Advice"}),a.jsx("p",{children:"The information provided on GPT4Trade.com is for general information purposes only. It is not intended as financial advice and should not be construed as such. We do not recommend specific trading strategies, instruments, or time frames."}),a.jsx("h3",{className:"text-lg font-medium text-white",children:"Limitation of Liability"}),a.jsx("p",{children:"GPT4Trade.com, its owners, employees, partners, or affiliates shall not be held liable for any losses, damages, or costs arising from the use of our services, including but not limited to:"}),a.jsxs("ul",{className:"list-disc pl-6 space-y-2 mt-2",children:[a.jsx("li",{children:"Trading losses resulting from using our EAs or following our signals"}),a.jsx("li",{children:"Technical issues or failures of our platform or trading robots"}),a.jsx("li",{children:"Delays in data transmission or execution"}),a.jsx("li",{children:"Loss of data or trading opportunities"})]})]})]})}),a.jsx(Pt,{value:"terms",children:a.jsxs(be,{className:"bg-gray-800 border-gray-700",children:[a.jsx(Be,{children:a.jsxs(qe,{className:"text-white flex items-center gap-2",children:[a.jsx(DB,{className:"h-5 w-5 text-cyan-400"}),"Terms of Use"]})}),a.jsxs(Se,{className:"space-y-4 text-gray-300",children:[a.jsx("h3",{className:"text-lg font-medium text-white",children:"1. License Agreement"}),a.jsx("p",{children:"By downloading or using any Expert Advisor (EA) or tool from GPT4Trade.com, you are granted a personal, non-exclusive, non-transferable license to use the softw
1117are for your own trading purposes only."}),a.jsx("h3",{className:"text-lg font-medium text-white",children:"2. Intellectual Property"}),a.jsx("p",{children:"All EAs, content, and materials on GPT4Trade.com are protected by intellectual property rights. You may not:"}),a.jsxs("ul",{className:"list-disc pl-6 space-y-2 mt-2",children:[a.jsx("li",{children:"Modify, decompile, or reverse engineer any software"}),a.jsx("li",{children:"Redistribute or resell any EA or content"}),a.jsx("li",{children:"Copy or duplicate materials without explicit permission"}),a.jsx("li",{children:"Use our brand or trademarks without authorization"})]}),a.jsx("h3",{className:"text-lg font-medium text-white",children:"3. User Obligations"}),a.jsx("p",{children:"As a user of GPT4Trade.com, you agree to:"}),a.jsxs("ul",{className:"list-disc pl-6 space-y-2 mt-2",children:[a.jsx("li",{children:"Provide accurate and current information"}),a.jsx("li",{children:"Maintain the security of your account"}),a.jsx("li",{children:"Not share your login credentials"}),a.jsx("li",{children:"Use the platform in compliance with all applicable laws"})]}),a.jsx("h3",{className:"text-lg font-medium text-white",children:"4. Termination"}),a.jsx("p",{children:"We reserve the right to terminate or suspend access to our services for violations of these terms or any inappropriate behavior."})]})]})}),a.jsx(Pt,{value:"guidelines",children:a.jsxs(be,{className:"bg-gray-800 border-gray-700",children:[a.jsx(Be,{children:a.jsxs(qe,{className:"text-white flex items-center gap-2",children:[a.jsx(pr,{className:"h-5 w-5 text-purple-400"}),"Community Guidelines"]})}),a.jsxs(Se,{className:"space-y-4 text-gray-300",children:[a.jsx("h3",{className:"text-lg font-medium text-white",children:"Forum Rules"}),a.jsx("p",{children:"Our community is built on mutual respect and professionalism. The following are prohibited:"}),a.jsxs("ul",{className:"list-disc pl-6 space-y-2 mt-2",children:[a.jsx("li",{children:"Hate speech, harassment, or discriminatory content"}),a.jsx("li",{children:"Spam, excessive self-promotion, or unauthorized advertising"}),a.jsx("li",{children:"Profanity or inappropriate language"}),a.jsx("li",{children:"Sharing of personal trading account credentials"}),a.jsx("li",{children:"Unauthorized sharing of copyrighted material"})]}),a.jsx("h3",{className:"text-lg font-medium text-white",children:"Communication Standards"}),a.jsx("p",{children:"When participating in discussions or sharing content:"}),a.jsxs("ul",{className:"list-disc pl-6 space-y-2 mt-2",children:[a.jsx("li",{children:"Be respectful and constructive in your comments"}),a.jsx("li",{children:"Stay on topic and contribute meaningfully to discussions"}),a.jsx("li",{children:"Verify information before sharing and cite sources when appropriate"}),a.jsx("li",{children:"Report inappropriate content to moderators"})]}),a.jsx("h3",{className:"text-lg font-medium text-white",children:"Content Sharing"}),a.jsx("p",{children:"When sharing Expert Advisors or trading strategies:"}),a.jsxs("ul",{className:"list-disc pl-6 space-y-2 mt-2",children:[a.jsx("li",{children:"Provide accurate descriptions and performance data"}),a.jsx("li",{children:"Disclose any risks or limitations"}),a.jsx("li",{children:"Respect intellectual property rights"}),a.jsx("li",{children:"Do not make unrealistic promises or guarantees"})]})]})]})})]})]})}function $Re(){var P,M;const[e,t]=A.useState(null),[r,n]=A.useState(!0),[i,s]=A.useState([]),[o,l]=A.useState(""),[c,d]=A.useState(null),[u,h]=A.useState([]),[m,g]=A.useState(!1),[b,v]=A.useState([]);A.useEffect(()=>{y()},[]);const y=async()=>{n(!0);try{const C=await je.User.me();t(C),v(j(C.email)),s(S());const D=(await je.User.list()).filter(L=>L.email!==C.email).map(L=>({...L,displayName:x(L)}));h(D)}catch(C){console.error("Error loading user data:",C)}n(!1)},x=C=>{if(C.display_name)return C.display_name;if(C.member_number)return`Member #${C.member_number}`;const O=C.email.split("@")[0];return O.substring(0,3)+"***"+O.slice(-2)},w=C=>{const O=[/\b(f+u+c+k+|s+h+i+t+|b+i+t+c+h+|a+s+s+h+o+l+e+|c+u+n+t+)\b/gi,/\b(scam|fraud|scheme|steal|hack|crack)\b/gi,/\b(nigeria|prince|lottery|winner|inherit|million|billion)\b/gi];let D=C;return O.forEach(L=>{D=D.replace(L,"***")}),{filteredContent:D,wasFiltered:D!==C}},_=async()=>
1117{if(!o.trim()||!c||!e)return;const{filteredContent:C,wasFiltered:O}=w(o);O&&(g(!0),setTimeout(()=>g(!1),3e3));const D={id:Date.now(),content:C,date:new Date,type:"sent",peer:{email:c.email,name:c.displayName}};v(L=>[D,...L]),l("")},j=C=>[{id:1,content:"Hey, have you seen the latest market analysis for EUR/USD?",date:new Date(Date.now()-10800*1e3),type:"received",peer:{email:"[email protected]",name:"Trading Expert"},unread:!0},{id:2,content:"Yes, I saw it. Looks interesting. I'm thinking of a short position.",date:new Date(Date.now()-2.5*60*60*1e3),type:"sent",peer:{email:"[email protected]",name:"Trading Expert"}},{id:3,content:"Can you share your thoughts on the new AI bot templates?",date:new Date(Date.now()-1440*60*1e3),type:"received",peer:{email:"[email protected]",name:"Support Desk"},unread:!1}],S=()=>[{id:1,type:"achievement",title:"New Achievement Unlocked",content:"You've earned the 'Strategy Master' badge!",date:new Date(Date.now()-1440*60*1e3)}],k=()=>{v(C=>C.map(O=>O.type==="received"&&O.unread?{...O,unread:!1}:O))};if(r)return a.jsx("div",{className:"flex justify-center items-center h-64",children:a.jsx(kt,{className:"h-8 w-8 animate-spin text-cyan-500"})});const T=c?b.filter(C=>C.peer.email===c.email):b;return a.jsxs("div",{className:"space-y-6",children:[a.jsxs("h1",{className:"text-2xl font-bold text-white flex items-center gap-2",children:[a.jsx(Nu,{className:"h-6 w-6 text-cyan-400"}),"Member Room"]}),a.jsxs(be,{className:"bg-gray-800 border-gray-700",children:[a.jsx(Be,{children:a.jsx(qe,{className:"text-white",children:"Profile Summary"})}),a.jsx(Se,{children:a.jsxs("div",{className:"flex flex-col items-center text-center",children:[a.jsxs(Rs,{className:"h-20 w-20 mb-4",children:[a.jsx(Ds,{src:e==null?void 0:e.profile_image}),a.jsx(Is,{className:"bg-cyan-800 text-lg",children:((P=e==null?void 0:e.full_name)==null?void 0:P.charAt(0))||((M=e==null?void 0:e.email)==null?void 0:M.charAt(0))})]}),a.jsx("h2",{className:"text-xl font-bold text-white",children:e==null?void 0:e.full_name}),a.jsx("p",{className:"text-gray-400",children:e==null?void 0:e.email}),a.jsxs("div",{className:"flex gap-2 mt-2",children:[a.jsx(Oe,{className:"bg-cyan-600",children:(e==null?void 0:e.rank)||"Member"}),a.jsx(Oe,{className:"bg-purple-600",children:(e==null?void 0:e.status)||"Active"})]})]})})]}),a.jsx("div",{className:"lg:col-span-2",children:a.jsxs(ei,{defaultValue:"messages",children:[a.jsxs(Ta,{className:"bg-gray-800",children:[a.jsxs(Nt,{value:"messages",className:"data-[state=active]:bg-gray-700",children:[a.jsx(sp,{className:"h-4 w-4 mr-2"}),"Messages"]}),a.jsxs(Nt,{value:"notifications",className:"data-[state=active]:bg-gray-700",children:[a.jsx(Ko,{className:"h-4 w-4 mr-2"}),"Notifications"]}),a.jsxs(Nt,{value:"settings",className:"data-[state=active]:bg-gray-700",children:[a.jsx(ji,{className:"h-4 w-4 mr-2"}),"Settings"]})]}),a.jsx(Pt,{value:"messages",children:a.jsxs(be,{className:"bg-gray-800 border-gray-700",children:[a.jsx(Be,{children:a.jsxs("div",{className:"flex justify-between items-center",children:[a.jsx(qe,{className:"text-white",children:c?`Messages with ${c.displayName}`:"Messages"}),a.jsx(se,{variant:"outline",className:"text-cyan-400 border-cyan-400/30",onClick:k,children:"Mark All Read"})]})}),a.jsx(Se,{children:a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsxs("select",{className:"w-full p-2 rounded bg-gray-900 border border-gray-700 text-white",value:(c==null?void 0:c.email)||"",onChange:C=>{const O=C.target.value;d(u.find(D=>D.email===O))},children:[a.jsx("option",{value:"",children:"Select User to Message"}),u.map(C=>a.jsx("option",{value:C.email,children:C.displayName},C.email))]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx(Je,{value:o,onChange:C=>l(C.target.value),placeholder:c?`Message ${c.displayName}...`:"Select a user to message...",className:"bg-gray-900 border-gray-700",disabled:!c}),a.jsx(se,{onClick:_,disabled:!o.trim()||!c,className:"bg-cyan-600 hover:bg-cyan-700",children:a.jsx(Bd,{className:"h-4 w-4"})})]}),m&&a.jsxs("div",{className:"text-xs text-amber-400",children:[a.jsx(Lt,{className:"h-3 w-3 inline mr-1"}),"Your message contained inappropriate content and has been filtered."]})]}),a.jsxs("div",{className:"space-y-2 h-96 overflow-y-auto pr-2",children:[" ",T.map(C=>a.jsx(be,{className:`border-gray-700 ${C.type==="sent"?"bg-cyan-900/30 ml-auto":"bg-gray-900"} ${C.unread&&C.type==="received"?"border-l-4 border-l-cyan-500":""} max-w-[80%] w-fit`,children:a.jsxs(Se,{className:"p-3",children:[a.jsxs("div",{className:"flex justify-between items-start mb-1",children:[a.jsxs("h3",{className:"font-medium text-sm text-white",children:[C.type==="sent"?"You":C.peer.name,C.type==="sent"&&a.jsxs("span",{className:"text-xs text-gray-400",children:[" to ",C.peer.name]})]}),a.jsx("span",{className:"text-xs text-gray-500",children:new Date(C.date).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]}),a.jsx("p",{className:"text-gray-300 text-sm",children:C.content})]})}
1117,C.id)),T.length===0&&c&&a.jsxs("div",{className:"text-center py-6 text-gray-400",children:["No messages with ",c.displayName," yet. Start the conversation!"]}),T.length===0&&!c&&a.jsx("div",{className:"text-center py-6 text-gray-400",children:"Select a user to view messages."})]})]})})]})}),a.jsx(Pt,{value:"notifications",children:a.jsxs(be,{className:"bg-gray-800 border-gray-700",children:[a.jsx(Be,{children:a.jsx(qe,{className:"text-white",children:"Notifications"})}),a.jsx(Se,{children:a.jsxs("div",{className:"space-y-4",children:[i.map(C=>a.jsxs("div",{className:"flex items-start gap-4 p-4 bg-gray-900 rounded-lg border border-gray-700",children:[a.jsx("div",{className:"p-2 rounded-full bg-cyan-900/30",children:C.type==="achievement"?a.jsx(Ar,{className:"h-5 w-5 text-cyan-400"}):a.jsx(Ko,{className:"h-5 w-5 text-cyan-400"})}),a.jsxs("div",{children:[a.jsx("h3",{className:"font-medium text-white",children:C.title}),a.jsx("p",{className:"text-sm text-gray-400",children:C.content}),a.jsx("span",{className:"text-xs text-gray-500",children:new Date(C.date).toLocaleDateString()})]})]},C.id)),i.length===0&&a.jsx("div",{className:"text-center py-6 text-gray-400",children:"No notifications"})]})})]})}),a.jsx(Pt,{value:"settings",children:a.jsxs(be,{className:"bg-gray-800 border-gray-700",children:[a.jsx(Be,{children:a.jsx(qe,{className:"text-white",children:"Account Settings"})}),a.jsx(Se,{children:a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium text-gray-400 mb-1",children:"Display Name"}),a.jsx(Je,{value:(e==null?void 0:e.full_name)||"",className:"bg-gray-900 border-gray-700"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium text-gray-400 mb-1",children:"Email Notifications"}),a.jsx("div",{className:"space-y-2"})]}),a.jsx(se,{className:"w-full bg-cyan-600 hover:bg-cyan-700",children:"Save Changes"})]})})]})})]})})]})}function FRe({title:e="Monte Carlo Simulator",defaultPrice:t=25,defaultIterations:r=1e4,compact:n=!1,className:i=""}){const s=`https://card-break-simulator-d431b4a3.base44.app/?price=${t}&iterations=${r}&compact=${n}`;return a.jsxs(be,{className:`bg-gray-800 border-gray-700 ${i}`,children:[e&&a.jsx(Be,{children:a.jsx(qe,{className:"text-white",children:e})}),a.jsx(Se,{className:"p-0",children:a.jsx("iframe",{src:s,className:"w-full h-[800px] border-0 rounded-b-lg",title:e,loading:"lazy"})})]})}function BRe(){return a.jsxs("div",{className:"space-y-6",children:[a.jsx("div",{className:"flex items-center justify-between",children:a.jsxs("div",{children:[a.jsxs("h1",{className:"text-3xl font-bold text-white flex items-center gap-2",children:[a.jsx(Zy,{className:"h-8 w-8 text-purple-400"}),"Monte Carlo Simulator"]}),a.jsx("p",{className:"text-gray-400 mt-1",children:"Analyze trading strategy performance with probability distributions"})]})}),a.jsx(FRe,{title:"Monte Carlo Simulation",defaultPrice:25,defaultIterations:1e4,compact:!1,className:"mx-auto max-w-7xl"}),a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[a.jsx(be,{className:"bg-gradient-to-br from-purple-900/20 to-blue-900/20 border-purple-500/20",children:a.jsxs(Se,{className:"p-4",children:[a.jsx(Qr,{className:"h-8 w-8 text-purple-400 mb-2"}),a.jsx("h3",{className:"font-semibold text-white mb-1",children:"Risk Analysis"}),a.jsx("p",{className:"text-sm text-gray-400",children:"Simulate thousands of scenarios to understand potential outcomes"})]})}),a.jsx(be,{className:"bg-gradient-to-br from-cyan-900/20 to-blue-900/20 border-cyan-500/20",children:a.jsxs(Se,{className:"p-4",children:[a.jsx(Xo,{className:"h-8 w-8 text-cyan-400 mb-2"}),a.jsx("h3",{className:"font-semibold text-white mb-1",children:"Probability Distribution"}),a.jsx("p",{className:"text-sm text-gray-400",children:"Visualize the range of possible results with statistical accuracy"})]})}),a.jsx(be,{className:"bg-gradient-to-br from-green-900/20 to-emerald-900/20 border-green-500/20",children:a.jsxs(Se,{className:"p-4",children:[a.jsx(Zy,{className:"h-8 w-8 text-green-400 mb-2"}),a.jsx("h3",{className:"font-semibold text-white mb-1",children:"Strategy Validation"}),a.jsx("p",{className:"text-sm text-gray-400",children:"Test your trading strategies under various market conditions"})]})})]}),a.jsxs(be,{className:"bg-gray-800 border-gray-700",children:[a.jsx(Be,{children:a.jsx(qe,{className:"text-white text-xl",children:"How It Works"})}),a.jsxs(Se,{className:"text-gray-300 space-y-3",children:[a.jsx("p",{children:"Monte Carlo simulation uses random sampling to model the probability of different outcomes in trading strategies that have inherent uncertainty."}),a.jsxs("div",{className:"space-y-2",children:[a.jsx("h4",{className:"text-white font-semibold",children:"Key Benefits:"}),a.jsxs("ul",{className:"text-sm space-y-1 list-disc list-inside text-gray-400",children:[a.jsx("li",{children:"Understand the full range of possible outcomes for your trades"}),a.jsx("li",{children:"Quantify risk with confidence intervals and probability distributions"}),a.jsx("li",{children:"Make data-driven decisions based on thousands of simulated scenarios"}),a.jsx("li",{children:"Identify optimal entry points and position sizes"}),a.jsx("li",{children:"Test strategy robustness under different market conditions"})]})]})]})]})]})}function URe({code:e,onChange:t,onSave:r,onCompile:n,isCompiling:i}){const[s,o]=A.useState(!1),[l,c]=A.useState(""),[d,u]=A.useState(""),[h,m]=A.useState(null),[g,b]=A.useState(!1),v=()=>{navigator.clipboard.writeText(e),o(!0),setTimeout(()=>
1117o(!1),2e3)},y=async()=>{if(l.trim()){b(!0),u(""),m(null);try{const _=`You are an expert MQL4/MQL5 programming consultant with deep knowledge of: 1118- MetaTrader platform architecture and APIs 1119- Algorithmic trading strategies 1120- Risk management and position sizing 1121- Order management and broker compatibility 1122- Technical indicators and market analysis 1123- Code optimization and debugging 1124 1125CONTEXT - Current Code in Editor: 1126\`\`\`mql 1127${e||"// No code currently in editor"} 1128\`\`\` 1129 1130USER REQUEST: "${l}" 1131 1132INSTRUCTIONS: 1133Analyze the user's request carefully and respond appropriately: 1134 11351. **If generating NEW code** (keywords: "create", "generate", "build", "make", "new EA"): 1136 - Provide complete, production-ready MQL code 1137 - Include proper error handling and validation 1138 - Add comprehensive comments 1139 - Follow MQL best practices 1140 - Ensure broker compatibility 1141 11422. **If modifying EXISTING code** (keywords: "change", "modify", "fix", "add", "update", "improve"): 1143 - Explain the changes you're making 1144 - Provide the complete modified code 1145 - Highlight what was changed and why 1146 - Ensure no existing functionality is broken 1147 11483. **If answering a QUESTION** (keywords: "what", "why", "how", "explain", "?"): 1149 - Provide clear, detailed explanation 1150 - Give practical examples if relevant 1151 - Suggest improvements if applicable 1152 - Only include code if specifically requested 1153 1154RESPONSE REQUIREMENTS: 1155- Be specific and actionable 1156- Focus on practical trading applications 1157- Consider risk management implications 1158- Validate all logic for safety 1159- Prioritize code quality and reliability 1160 1161FORMAT: 11621. First, provide your explanation/guidance (aiResponseText) 11632. Then, if applicable, provide the code (resultingCode) 1164 1165If providing code: 1166- Make it complete and ready to compile 1167- Add inline comments for clarity 1168- Follow MQL naming conventions 1169- Include error handling`,j=await ka.InvokeLLM({prompt:_,response_json_schema:{type:"object",properties:{aiResponseText:{type:"string",description:"Your detailed explanation, guidance, or answer to the user's question"}
1169,resultingCode:{type:"string",nullable:!0,description:"Complete MQL code (if applicable) - null if just answering a question"}}}});if(u(j.aiResponseText),j.resultingCode&&j.resultingCode.trim()!==""){let S=j.resultingCode.replace(/```mql[45]?\n?/g,"").replace(/```\n?/g,"").trim();m(S)}}catch(_){console.error("Error interacting with AI:",_),u("Sorry, I encountered an error. Please try again with a clearer request. Error details: "+_.message),m(null)}b(!1)}},x=()=>{h&&t&&(t(h),u(_=>_+` 1170 1171â AI-provided code has been applied to the editor.`),m(null))},w=()=>{c(""),u(""),m(null)};return a.jsxs(be,{className:"bg-gray-800 border-gray-700 shadow-lg",children:[a.jsxs(ei,{defaultValue:"code",children:[a.jsxs("div",{className:"flex justify-between items-center p-3 border-b border-gray-700",children:[a.jsxs(Ta,{className:"bg-gray-900",children:[a.jsx(Nt,{value:"code",children:"Code"}),a.jsx(Nt,{value:"chat",children:"AI Assistant"}),a.jsx(Nt,{value:"preview",children:"Preview"})]}),a.jsx("div",{className:"flex items-center gap-2",children:a.jsx(se,{variant:"ghost",size:"sm",onClick:v,className:"text-gray-300",children:s?a.jsx(Yo,{className:"h-4 w-4 text-green-400"}):a.jsx(Wh,{className:"h-4 w-4"})})})]}),a.jsx(Pt,{value:"code",className:"m-0",children:a.jsx(Se,{className:"p-0",children:a.jsx(Wn,{value:e,onChange:_=>t(_.target.value),className:"p-4 font-mono text-sm bg-gray-900 text-gray-200 overflow-auto h-[500px] rounded-none border-0 focus-visible:ring-0 whitespace-pre resize-none",placeholder:"Write or paste your MQL code here..."})})}),a.jsx(Pt,{value:"chat",className:"m-0",children:a.jsxs(Se,{className:"p-4 h-[500px] flex flex-col",children:[a.jsx("div",{className:"mb-4 flex-1 overflow-auto bg-gray-900 rounded-md p-4",children:d?a.jsx("div",{className:"prose prose-invert max-w-none text-sm",children:a.jsx("div",{className:"whitespace-pre-line",children:d})}):a.jsxs("div",{className:"text-gray-400 text-center py-12",children:[a.jsx(XS,{className:"h-12 w-12 mx-auto mb-4 opacity-30"}),a.jsx("p",{children:"Ask the AI to generate, modify, or explain MQL code."}),a.jsx("p",{className:"text-xs mt-2",children:'e.g., "Create a simple EMA crossover EA", "Add a trailing stop to this code", "Fix the error on line 42".'})]})}),a.jsxs("div",{className:"mt-auto space-y-2",children:[a.jsx(Wn,{value:l,onChange:_=>c(_.target.value),placeholder:"Describe what you want the AI to do...",className:"bg-gray-900 border-gray-700 text-gray-200 resize-none h-24",disabled:g}),a.jsxs("div",{className:"flex flex-wrap gap-2 justify-between items-center",children:[a.jsxs(se,{variant:"outline",onClick:w,className:"text-gray-300 border-gray-600",disabled:g||!l&&!d,children:[a.jsx(BJ,{className:"h-4 w-4 mr-2"})," Clear Chat"]}),a.jsxs("div",{className:"flex gap-2",children:[h&&a.jsx(se,{onClick:x,className:"bg-purple-600 hover:bg-purple-700",disabled:g,children:"Apply AI Code to Editor"}),a.jsx(se,{onClick:y,className:"bg-cyan-600 hover:bg-cyan-700",disabled:g||!l.trim(),children:g?a.jsxs("span",{className:"flex items-center",children:[a.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Processing..."]}):a.jsxs(a.Fragment,{children:[a.jsx(XS,{className:"h-4 w-4 mr-2"}),"Ask AI"]})})]})]})]})]})}),a.jsx(Pt,{value:"preview",className:"m-0",children:a.jsx(Se,{className:"p-4 h-[500px] overflow-auto",children:a.jsx("div",{className:"prose prose-invert max-w-none",children:a.jsx("p",{className:"text-gray-400",children:'Code preview not available. View and edit your code in the "Code" tab. Use the "AI Assistant" tab for AI-powered help.'})})})})]}),a.jsxs(mp,{className:"flex justify-between p-3 border-t border-gray-700 bg-gray-900",children:[a.jsxs(se,{variant:"outline",onClick:r,className:"text-gray-300 border-gray-600",children:[a.jsx(Gn,{className:"h-4 w-4 mr-2"}),"Download EA"]}),a.jsx(se,{onClick:n,disabled:i,className:"bg-cyan-600 hover:bg-cyan-700",children:i?a.jsxs("span",{className:"flex items-center",children:[a.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Compiling..."]}):a.jsxs(a.Fragment,{children:[a.jsx(qk,{className:"h-4 w-4 mr-2"}),"Compile & Test"]})})]})]})}function qRe({parameters:e,onChange:t}){const r=e||{},n=(l,c)=>{t({...r,[l]:c})},i={string:(l,c)=>a.jsx(Je,{value:c,onChange:d=>n(l,d.target.value),className:"bg-gray-900 border-gray-700 text-gray-300"}),number:(l,c)=>a.jsx(Je,{type:"number",value:c,onChange:d=>n(l,parseFloat(d.target.value)),className:"bg-gray-900 border-gray-700 text-gray-300"}),boolean:(l,c)=>
1171a.jsx(_T,{checked:c,onCheckedChange:d=>n(l,d)}),enum:(l,c,d)=>a.jsxs(qt,{value:c,onValueChange:u=>n(l,u),children:[a.jsx($t,{className:"bg-gray-900 border-gray-700 text-gray-300",children:a.jsx(zt,{})}),a.jsx(Ft,{children:d.map(u=>a.jsx(Ce,{value:u,children:u},u))})]})},s=(l,c)=>typeof c=="string"?l.toLowerCase().includes("type")||l.toLowerCase().includes("mode")||l.toLowerCase().includes("method")?"enum":"string":typeof c=="number"?"number":typeof c=="boolean"?"boolean":"string",o=l=>{const c={maMode:["SMA","EMA","SMMA","LWMA"],timeframe:["M1","M5","M15","M30","H1","H4","D1","W1","MN1"],tradeDirection:["Buy","Sell","Both"],signalMode:["All","Open","Close"],lotType:["Fixed","Risk-based","Balance-based"]};for(const[d,u]of Object.entries(c))if(l.toLowerCase().includes(d.toLowerCase()))return u;return["Option1","Option2","Option3"]};return a.jsxs(be,{className:"bg-gray-800 border-gray-700 shadow-lg",children:[a.jsxs(Be,{className:"flex flex-row items-center justify-between",children:[a.jsx(qe,{className:"text-white",children:"EA Parameters"}),a.jsx(Ya,{className:"h-6 w-6"})]}),a.jsxs(Se,{className:"space-y-4",children:[Object.entries(r).map(([l,c])=>{const d=s(l,c),u=l.replace(/([A-Z])/g," $1").replace(/^./,h=>h.toUpperCase());return a.jsxs("div",{className:"grid grid-cols-2 items-center gap-4",children:[a.jsx(Nr,{className:"text-gray-300",children:u}),d==="enum"?i[d](l,c,o(l)):i[d](l,c)]},l)}),Object.keys(r).length===0&&a.jsx("p",{className:"text-gray-400 text-sm text-center py-4",children:"No parameters defined for this robot."})]})]})}function Sv({className:e=""}){const[t,r]=A.useState("https://www.switchmarkets.com/signup?lid=6603&pid=107341"),[n,i]=A.useState("Switch Markets"),[s,o]=A.useState("Regulated Professional Broker");A.useEffect(()=>{(async()=>{try{const d=await On.getConfig("broker_signup_url","https://www.switchmarkets.com/signup?lid=6603&pid=107341"),u=await On.getConfig("broker_name","Switch Markets"),h=await On.getConfig("broker_description","Regulated Professional Broker");r(d),i(u),o(h)}catch(d){console.warn("Error loading broker configuration for button, using defaults:",d)}})()},[]);const l=()=>{t&&window.open(t,"_blank","noopener,noreferrer")};return a.jsxs(se,{variant:"outline",className:`bg-gradient-to-r from-gray-700 to-gray-800 hover:from-gray-600 hover:to-gray-700 text-white border-cyan-500/30 hover:border-cyan-500/70 group transition-all shadow-md hover:shadow-lg ${e}`,onClick:l,title:`${n} - ${s}`,children:[a.jsx(oZ,{className:"h-4 w-4 mr-2 text-cyan-400 group-hover:text-cyan-300 transition-colors"}),a.jsx("span",{className:"truncate max-w-[100px] md:max-w-[150px] group-hover:text-cyan-300 transition-colors",children:n}),a.jsx(Br,{className:"h-3 w-3 ml-1.5 text-gray-400 group-hover:text-cyan-300 transition-colors"})]})}function sB({robot:e,code:t,children:r}){var z;const[n,i]=A.useState(!1),[s,o]=A.useState(!1),[l,c]=A.useState(!1),[d,u]=A.useState(""),[h,m]=A.useState(""),[g,b]=A.useState(!1),[v,y]=A.useState([]),[x,w]=A.useState([]),[_,j]=A.useState("description"),[S,k]=A.useState({}),[T,P]=A.useState({name:"",description:"",platform:"mt4",code:"",video_url:"",myfxbook_url:"",tags:"",thumbnail_url:""}),[M,C]=A.useState(null);A.useEffect(()=>{je.User.me().then(C).catch(()=>C(null))},[]),A.useEffect(()=>{if(n){const I=(M==null?void 0:M.profile_image)||"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/cbd7c9_3D-1175.png";P({name:(e==null?void 0:e.name)||"",description:"",platform:(e==null?void 0:e.platform)||"mt4",code:t||"",video_url:"",myfxbook_url:"",tags:"",thumbnail_url:I}),j("description"),k({}),u(Ve("Community")),c(!1),m(""),y([]),w([])}},[n,e,t,M]);const O=async()=>{b(!0);try{const I=await ka.InvokeLLM({prompt:`Create a clear, professional description for this trading robot that explains its strategy and features: 1172 1173 Robot Name: ${T.name} 1174 Code: 1175 ${T.code} 1176 1177 Provide a comprehensive analysis including: 1178 1. Main trading strategy and approach 1179 2. Key features and indicators used 1180 3. Target market conditions 1181 4. Risk management features 1182 5. Recommended timeframes 1183 6. Suggested tags for categorization 1184 1185 Make it engaging but professional, around 2-3 paragraphs.`,response_json_schema:{type:"object",properties:{description:{type:"string"},features:{type:"array",items:{type:"string"}},recommendedTimeframes:{type:"array",items:{type:"string"}},suggestedTags:{type:"array",items:{type:"string"}}}}}),B=`${I.description} 1186 1187Key Features: 1188${I.features.map(H=>`⢠${H}`).join(` 1189`)} 1190 1191Recommended Timeframes: ${I.recommendedTimeframes.join(", ")}`;m(B),P(H=>({...H,description:B,tags:I.suggestedTags.slice(0,3).join(", ")})),y(I.suggestedTags),w(I.suggestedTags.slice(0,3))}catch(I){console.error("Error generating description:",I),k(B=>({...B,description:"Failed to generate AI description."}))}b(!1)},D=async I=>{u(Ve("Community")),j("success")},L=()=>{let I={};return T.video_url&&!U(T.video_url)&&(I.video_url="Please enter a valid YouTube video URL"),T.myfxbook_url&&!F(T.myfxbook_url)&&(I.myfxbook_url="Please enter a valid MyFXBook statistics URL"),k(I),Object.keys(I).length===0},F=I=>I.startsWith("https://www.myfxbook.com/"),U=I=>{try{const B=new URL(I);return B.hostname.includes("youtube.com")||B.hostname.includes("youtu.be")}catch{return!1}},G=async I=>{I.preventDefault();let B={...S};if(T.name.trim()||(B.name="EA Name is required."),L()||(B={...B,...S}),Object.keys(B).some(H=>B[H])){k(B);return}if(!M){k(H=>({...H,submit:"Please log in to share EAs."}));return}k(H=>({...H,submit:null})),o(!0);try{const H={name:T.name,description:T.description,platform:T.platform,code:T.code,video_url:T.video_url,myfxbook_url:T.myfxbook_url,tags:x,author:M.email,author_name:M.full_name||M.email.split("@")[0],share_date:new Date().toISOString(),likes:0,downloads:0,status:"active",thumbnail_url:T.thumbnail_url||M.profile_image||"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/cbd7c9_3D-1175.png",is_trusted:!1},J=await je.SharedEA.create(H);D(J)}catch(H){console.error("Error sharing EA:",H),k(J=>({...J,submit:"Failed to share EA."}))}o(!1)},W=()=>{navigator.clipboard.writeText(d),c(!0),setTimeout(()=>c(!1),2e3)},q=I=>{const B=x.includes(I)?x.filter(H=>H!==I):[...x,I];w(B),P(H=>({...H,tags:B.join(", ")}))},V=(I,B)=>{P(H=>({...H,[I]:B})),S[I]&&k(H=>({...H,[I]:void 0}))};return a.jsxs(oa,{open:n,onOpenChange:i,children:[a.jsx(NT,{asChild:!0,children:r}),a.jsxs(zn,{className:"sm:max-w-[600px] bg-gray-800 border-gray-700 text-white",children:[a.jsxs(Vn,{children:[a.jsxs(Hn,{className:"text-white flex items-center gap-2",children:[a.jsx(GS,{className:"h-5 w-5 text-cyan-400"}),"Share Trading Robot"]}),a.jsx(Xa,{className:"text-gray-400",children:"Share your EA with the robot4trade community"})]}),_!=="success"?a.jsxs("form",{onSubmit:G,className:"space-y-4 py-4 max-h-[70vh] overflow-y-auto pr-2",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[a.jsx(Oe,{className:"bg-cyan-600",children:(z=T.platform)==null?void 0:z.toUpperCase()}),a.jsx(Oe,{className:"bg-purple-600",children:"Free"}),a.jsx(Oe,{className:"bg-green-600",children:"Community"})]}),a.jsxs("div",{children:[a.jsxs("label",{className:"text-sm font-medium text-gray-300 mb-1 block",children:["Robot Name ",a.jsx("span",{className:"text-red-500",children:"*"})]}),a.jsx(Je,{value:T.name,onChange:I=>V("name",I.target.value.slice(0,50)),className:Ie("bg-gray-900 border-gray-700 text-gray-300",S.name&&"border-red-500"),placeholder:"Enter a name for your EA",maxLength:50}),S.name&&a.jsx("p",{className:"text-xs text-red-400 mt-1",children:S.name})]}),a.jsxs("div",{children:[a.jsxs("div",{className:"flex justify-between items-center mb-1",children:[a.jsx("label",{className:"text-sm font-medium text-gray-300",children:"Description"}),a.jsx(se,{type:"button",variant:"ghost",size:"sm",onClick:O,disabled:g,className:"text-cyan-400 hover:text-cyan-300",children:g?a.jsxs("span",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"animate-spin",children:"â"})," Generating..."]}):a.jsxs("span",{className:"flex items-center gap-2",children:[a.jsx(ln,{className:"h-4 w-4"})," Generate with AI"]})})]}),a.jsx(Wn,{value:T.description,onChange:I=>V("description",I.target.value),placeholder:"Describe your trading robot...",className:"h-40 bg-gray-900 border-gray-700 text-gray-300",required:!0}),S.description&&a.jsx("p",{className:"text-xs text-red-400 mt-1",children:S.description})]}),a.jsxs("div",{children:[a.jsx("label",{className:"text-sm font-medium text-gray-300 mb-2 block",children:"Tags (up to 5)"}),a.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:v.map(I=>a.jsx(Oe,{variant:x.includes(I)?"default":"secondary",className:`curs
1191or-pointer ${x.includes(I)?"bg-cyan-600 hover:bg-cyan-700":"bg-gray-700 hover:bg-gray-600"}`,onClick:()=>q(I),children:I},I))}),a.jsx(Je,{placeholder:"Or add custom tags, comma-separated",value:T.tags,onChange:I=>{V("tags",I.target.value),w(I.target.value.split(",").map(B=>B.trim()).filter(B=>B))},className:"bg-gray-900 border-gray-700 text-gray-300"})]}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsxs("label",{className:"text-sm font-medium text-gray-300 flex items-center gap-2",children:[a.jsx(YS,{className:"h-4 w-4 text-cyan-400"})," YouTube Demo Video URL"]}),a.jsx(Je,{placeholder:"https://youtube.com/watch?v=...",value:T.video_url,onChange:I=>V("video_url",I.target.value),className:"bg-gray-900 border-gray-700"}),S.video_url&&a.jsxs("p",{className:"text-xs text-red-400 flex items-center gap-1 mt-1",children:[a.jsx(Lt,{className:"h-3 w-3"}),S.video_url]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("label",{className:"text-sm font-medium text-gray-300 flex items-center gap-2",children:[a.jsx(Qy,{className:"h-4 w-4 text-cyan-400"})," MyFXBook Statistics URL"]}),a.jsx(Je,{placeholder:"https://www.myfxbook.com/members/...",value:T.myfxbook_url,onChange:I=>V("myfxbook_url",I.target.value),className:"bg-gray-900 border-gray-700"}),S.myfxbook_url&&a.jsxs("p",{className:"text-xs text-red-400 flex items-center gap-1 mt-1",children:[a.jsx(Lt,{className:"h-3 w-3"}),S.myfxbook_url]}),a.jsx("p",{className:"text-xs text-gray-400",children:"Add your MyFXBook statistics to showcase your EA's performance."})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("label",{className:"text-sm font-medium text-gray-300 flex items-center gap-2",children:[a.jsx(er,{className:"h-4 w-4 text-cyan-400"})," Thumbnail Image URL"]}),a.jsx(Je,{placeholder:"Thumbnail Image URL (optional, uses profile pic if empty)",value:T.thumbnail_url,onChange:I=>V("thumbnail_url",I.target.value),className:"bg-gray-900 border-gray-700"})]})]}),S.submit&&a.jsx("p",{className:"text-sm text-red-400 text-center mt-2",children:S.submit}),a.jsxs(Wa,{className:"pt-4",children:[a.jsx(r2,{asChild:!0,children:a.jsx(se,{type:"button",variant:"outline",className:"text-gray-300 border-gray-600 hover:bg-gray-700",children:"Cancel"})}),a.jsx(se,{type:"submit",disabled:s,className:"bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-700 hover:to-blue-700",children:s?a.jsxs("span",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"animate-spin",children:"â"})," Sharing..."]}):a.jsxs("span",{className:"flex items-center gap-2",children:[a.jsx(la,{className:"h-4 w-4"})," Share with Community"]})})]})]}):a.jsxs("div",{className:"space-y-4 py-4",children:[a.jsxs("div",{className:"text-center p-4",children:[a.jsx("div",{className:"inline-flex h-16 w-16 items-center justify-center rounded-full bg-green-700 mb-4 ring-4 ring-green-600/30",children:a.jsx(Yo,{className:"h-8 w-8 text-white"})}),a.jsx("h3",{className:"text-lg font-medium text-white mb-2",children:"Successfully Shared!"}),a.jsxs("p",{className:"text-gray-400",children:['Your EA "',T.name,'" is now available in the community.']})]}),a.jsxs("div",{className:"space-y-4 bg-gray-900 rounded-lg p-4",children:[a.jsxs("div",{children:[a.jsx("label",{className:"text-sm text-gray-400 mb-1 block",children:"Shareable Link"}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx(Je,{value:d,readOnly:!0,className:"bg-gray-800 border-gray-700 text-gray-300"}),a.jsx(se,{onClick:W,variant:"outline",className:"text-gray-300 border-gray-600 hover:bg-gray-700",children:l?a.jsx(Yo,{className:"h-4 w-4 text-green-400"}):a.jsx(Wh,{className:"h-4 w-4"})})]})]}),a.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[a.jsxs(se,{onClick:()=>window.open(d,"_blank"),className:"w-full bg-gradient-to-r from-cyan-600 to-blue-600",children:[a.jsx(IB,{className:"h-4 w-4 mr-2"})," View on robot4trade"]}),T.video_url&&a.jsxs(se,{variant:"outline",onClick:()=>window.open(T.video_url,"_blank"),className:"w-full text-gray-300 border-gray-600 hover:bg-gray-700",children:[a.jsx(YS,{className:"h-4 w-4 mr-2"})," Watch Demo Video"]}),T.myfxbook_url&&a.jsxs(se,{variant:"outline",onClick:()=>window.open(T.myfxbook_url,"_blank"),className:"w-full text-gray-300 border-gray-600 hover:bg-gray-700",children:[a.jsx(Qy,{className:"h-4 w-4 mr-2"})," View Statistics"]})]})]}),a.jsx(Wa,{className:"pt-4",children:a.jsx(r2,{asChild:!0,children:a.jsx(se,{type:"button",variant:"outline",onClick:()=>i(!1),className:"text-gray-300 border-gray-600 hover:bg-gray-700",children:"Close"})})})]})]})]})}function zRe(e){const[t,r]=A.useState(!1),[n,i]=A.useState(null),s=A.useCallback(async u=>
1191{if(!u||!e){console.error("Item or download function is missing."),r(!1),i(null);return}try{localStorage.setItem("disclaimer_accepted",Date.now().toString());try{const h=await je.User.me();console.log(`User ${h.email} accepted/confirmed disclaimer for item:`,(u==null?void 0:u.name)||(u==null?void 0:u.id))}catch{}e(u)}catch(h){console.error("Download failed:",h)}finally{r(!1),i(null)}},[e]),o=A.useCallback(u=>{const h=localStorage.getItem("disclaimer_accepted");h&&Date.now()-parseInt(h)<10080*60*1e3?s(u):(i(u),r(!0))},[s]),l=A.useCallback(()=>{n?s(n):(r(!1),i(null))},[n,s]),c=A.useCallback(()=>{r(!1),i(null)},[]),d=A.useCallback(()=>a.jsx(PK,{isOpen:t,onClose:c,onAccept:l}),[t,c,l]);return{handleDownloadRequest:o,DownloadDisclaimerDialog:d}}function VRe({robot:e,className:t=""}){const r=s=>{const o=s.code,l=new Blob([o],{type:"text/plain"}),c=URL.createObjectURL(l),d=document.createElement("a");d.href=c;const u=s.platform==="ctrader"?".cs":s.platform==="mt5"?".mq5":".mq4";d.download=`${s.name}${u}`,document.body.appendChild(d),d.click(),setTimeout(()=>{document.body.removeChild(d),URL.revokeObjectURL(c)},0)},{handleDownloadRequest:n,DownloadDisclaimerDialog:i}=zRe(r);return a.jsxs(a.Fragment,{children:[a.jsxs(se,{onClick:()=>n(e),className:t||"bg-gradient-to-r from-purple-600 to-indigo-600 hover:from-purple-700 hover:to-indigo-700",children:[a.jsx(Gn,{className:"h-4 w-4 mr-2"}),"Download EA"]}),a.jsx(i,{})]})}const HRe=ap("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),HP=A.forwardRef(({className:e,variant:t,...r},n)=>a.jsx("div",{ref:n,role:"alert",className:Ie(HRe({variant:t}),e),...r}));HP.displayName="Alert";const JK=A.forwardRef(({className:e,...t},r)=>a.jsx("h5",{ref:r,className:Ie("mb-1 font-medium leading-none tracking-tight",e),...t}));JK.displayName="AlertTitle";const WP=A.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:Ie("text-sm [&_p]:leading-relaxed",e),...t}));WP.displayName="AlertDescription";var GP="Progress",KP=100,[WRe]=xn(GP),[GRe,KRe]=WRe(GP),eY=A.forwardRef((e,t)=>{const{__scopeProgress:r,value:n=null,max:i,getValueLabel:s=YRe,...o}=e;(i||i===0)&&!oB(i)&&console.error(XRe(`${i}`,"Progress"));const l=oB(i)?i:KP;n!==null&&!lB(n,l)&&console.error(QRe(`${n}`,"Progress"));const c=lB(n,l)?n:null,d=Av(c)?s(c,l):void 0;return a.jsx(GRe,{scope:r,value:c,max:l,children:a.jsx(st.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":Av(c)?c:void 0,"aria-valuetext":d,role:"progressbar","data-state":nY(c,l),"data-value":c??void 0,"data-max":l,...o,ref:t})})});eY.displayName=GP;var tY="ProgressIndicator",rY=A.forwardRef((e,t)=>{const{__scopeProgress:r,...n}=e,i=KRe(tY,r);return a.jsx(st.div,{"data-state":nY(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...n,ref:t})});rY.displayName=tY;function YRe(e,t){return`${Math.round(e/t*100)}%`}function nY(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Av(e){return typeof e=="number"}function oB(e){return Av(e)&&!isNaN(e)&&e>0}function lB(e,t){return Av(e)&&!isNaN(e)&&e<=t&&e>=0}function XRe(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${KP}\`.`}function QRe(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be: 1192 - a positive number 1193 - less than the value passed to \`max\` (or ${KP} if no \`max\` prop is set) 1194 - \`null\` or \`undefined\` if the progress is indeterminate. 1195 1196Defaulting to \`null\`.`}var aY=eY,ZRe=rY;const Ek=A.forwardRef(({className:e,value:t,...r},n)=>a.jsx(aY,{ref:n,className:Ie("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...r,children:a.jsx(ZRe,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Ek.displayName=aY.displayName;const JRe=async(e,t)=>{console.log(`User ${e} achieved: ${t}`)},cB=[{id:"trend_following",name:"ð¯ Trend Following EA",description:"Use EMA crossovers with trend confirmation filters for London/NY sessions",idea:"A professional trend-following strategy using 20/50/200 EMA crossovers. Entry when fast E
1196MA crosses slow EMA in the direction of 200 EMA trend. Include ATR-based stop loss (2x ATR), take profit at 3:1 risk-reward ratio. Only trade during London (08:00-16:00 GMT) and New York (13:00-21:00 GMT) sessions. Add spread filter (max 2 pips for major pairs), ADX trend strength filter (ADX > 25), and RSI confirmation (RSI > 50 for buy, < 50 for sell). Implement trailing stop at 1.5x ATR once profit reaches 1:1. Maximum 3 concurrent positions, 2% risk per trade.",complexity:"intermediate"},{id:"scalping",name:"â¡ Scalping Master",description:"High-frequency scalping with tight stops for quick profits",idea:"Advanced scalping strategy using 1-minute and 5-minute charts. Entry on Bollinger Band bounce combined with Stochastic oversold/overbought signals. Use 10-pip stop loss, 15-pip take profit. Trade only during high liquidity hours: London open (07:00-10:00 GMT) and NY open (13:00-16:00 GMT). Include spread filter (max 1 pip), fast moving average filter (price must be above/below 20 EMA on 5-min chart), and volume spike detection. Maximum 5 concurrent positions, fixed 0.01 lot size. Implement break-even at +5 pips profit. Add maximum daily loss limit of 2% account balance.",complexity:"advanced"},{id:"breakout",name:"ð¥ Breakout Trader",description:"Capture explosive moves when price breaks key levels",idea:"Professional breakout strategy identifying support/resistance levels from H4 timeframe and trading breakouts on H1. Wait for price to break level with strong momentum (volume > 1.5x average). Enter on pullback after initial breakout with confirmation candle. Stop loss 20 pips below/above breakout level, take profit at 2:1 risk-reward. Include false breakout filter: wait for 2 candles to close beyond level. Add time-of-day filter: avoid Asian session (00:00-07:00 GMT). Use trailing stop: move to break-even at +20 pips, then trail by 15 pips. Maximum 2 positions per currency pair, 1.5% risk per trade. Include news filter: pause trading 30 minutes before/after major news.",complexity:"advanced"},{id:"mean_reversion",name:"ð Mean Reversion Pro",description:"Buy oversold, sell overbought with statistical edge",idea:"Mean reversion strategy using Bollinger Bands (20, 2) and RSI (14). Enter buy when price touches lower Bollinger Band and RSI < 30, enter sell when price touches upper band and RSI > 70. Stop loss at 2.5 standard deviations from mean. Take profit when price returns to middle Bollinger Band. Include trend filter: only take counter-trend trades when price is within 10% of 200-period moving average on H4 timeframe. Add volume confirmation: entry volume must be below average to avoid trend starts. Maximum 4 concurrent positions, 1% risk per trade. Implement partial profit taking: close 50% at 1:1, let rest run to target. Trade only during European and US sessions.",complexity:"intermediate"},{id:"grid_martingale",name:"ð Smart Grid Trading",description:"Controlled grid system with intelligent position sizing",idea:"Intelligent grid trading strategy starting with base lot size 0.01. Place buy/sell orders every 25 pips from initial price. Use smart position sizing: do NOT double lots (no martingale), instead use fixed multiplier of 1.2x for each grid level. Maximum 5 grid levels, maximum total exposure 0.10 lots. Take profit for entire grid at +50 pips average profit. Include protective stop: close all positions if drawdown exceeds 5%. Only activate grid in ranging markets: ADX < 25 and Bollinger Bands width < 50% of average. Use time-based exit: close all positions after 24 hours. Maximum 1 active grid per currency pair. Implement dynamic grid spacing based on ATR: use 2x ATR as grid distance. Add account balance protection: disable new grids if account is down 10%.",complexity:"advanced"},{id:"ftmo_challenge",name:"ð FTMO Challenge Special",description:"Specifically designed to pass FTMO evaluation safely",idea:"FTMO-compliant conservative strategy using multi-timeframe analysis. Daily timeframe for trend direction (200 SMA), H4 for entry setups (EMA 20/50 cross), H1 for precise entry (candlestick confirmation). Maximum daily loss: 4% (well below FTMO's 5% limit). Maximum total loss: 8% (below FTMO's 10%). Daily profit target: 0.5-1% (sustainable pace to reach 10% in 20-30 days). Risk per trade: 0.5% maximum. Trading hours: 08:00-18:00 GMT only (avoid overnight risk). Strict money management: maximum 3 concurrent trades across all pairs, maximum 2 trades per single pair. Use correlation filter: avoid trading correlated pairs simultaneously (EUR/USD, GBP/USD, EUR/GBP). Include news calendar integration: no trading 1 hour before/after high-impact news. Profit protection: once up 5%, reduce risk to 0.3% per trade. Use trailing stop: activate at +1.5% daily profit, trail by 0.5%.",complexity:"intermediate"}];function e5e(){var _e;const[e,t]=A.useState("generate"),[r,n]=A.useState(""),[i,s]=A.useState("mt4"),[o,l]=A.useState(!1),[c,d]=A.useState(!1),[u,h]=A.useState(null),[m,g]=A.useState([]),[b,v]=A.useState([]),[y,x]=A.useState(""),[w,_]=A.useState({}),[j,S]=A.useState(""),[k,T]=A.useState(null),[P,M]=A.useState(!0),[C,O]=A.useState(null),[D,L]=A.useState(!1),[F,U]=A.useState(null),[G,W]=A.useState([]),[q,V]=A.useState(0),{checkAiAllowed:z,aiLimitPopup:I}=iK();A.useEffect(()=>{B()},[]);const B=async()=>{var Ee,Pe;M(!0);let xe=null;try{xe=await je.User.me(),T(xe)}catch(Z){((Ee=Z.response)==null?void 0:Ee.status)!==401&&console.error("Authentication check failed:",Z),T(null)}
1196try{if(xe){const ae=await je.GeneratedRobot.filter({created_by:xe.email});await new Promise(ye=>setTimeout(ye,200));const pe=ae.map(ye=>({...ye,is_liked:ye.liked_by&&ye.liked_by.includes(xe.email)}));g(pe||[])}else g([]);const Z=await je.RobotTemplate.list();v(Z||[])}catch(Z){console.error("Error loading page data:",Z),((Pe=Z.response)==null?void 0:Pe.status)===429?(S("The server is busy. Please wait a moment and try refreshing."),Le({title:"Server Busy",description:"Could not load data due to rate limits. Please try again later.",variant:"destructive"})):(S("Failed to load page data. Please refresh the page."),Le({title:"Data Load Error",description:"An error occurred while loading data. Please refresh.",variant:"destructive"})),g([]),v([])}finally{M(!1)}},H=async()=>{if(!r.trim()){Le({title:"No Strategy",description:"Please describe your strategy first",variant:"destructive"});return}const xe=await z(k);if(xe){L(!0),O(null);try{const Ee=await vn.integrations.Core.InvokeLLM({prompt:`As a professional trading strategy analyst with 20+ years of experience, analyze this trading strategy idea: 1197 1198"${r}" 1199 1200Provide a comprehensive analysis with: 12011. Strategy Type Classification (trend-following, mean-reversion, breakout, scalping, grid, etc.) 12022. Complexity Level (beginner, intermediate, advanced, expert) 12033. Pros: Key strengths and advantages (3-5 points) 12044. Cons: Potential weaknesses and risks (3-5 points) 12055. Risk Assessment: Overall risk level (low, medium, high, very high) 12066. FTMO Compliance: Is this suitable for prop trading challenges? (yes/no/with modifications) 12077. Optimization Suggestions: 3-5 specific actionable improvements 12088. Expected Performance: Realistic expectations for win rate, profit factor, drawdown 12099. Missing Elements: Critical components that should be added 121010. Overall Score: Rate the strategy from 1-10 1211 1212Return a detailed, professional analysis.`,response_json_schema:{type:"object",properties:{strategy_type:{type:"string"},complexity:{type:"string"},pros:{type:"array",items:{type:"string"}},cons:{type:"array",items:{type:"string"}},risk_level:{type:"string"},ftmo_compliant:{type:"string"},suggestions:{type:"array",items:{type:"string"}},expected_performance:{type:"object",properties:{win_rate:{type:"string"},profit_factor:{type:"string"},max_drawdown:{type:"string"}}},missing_elements:{type:"array",items:{type:"string"}},overall_score:{type:"number"},summary:{type:"string"}}}});await Vy(xe),O(Ee),W(Ee.suggestions||[]),Le({title:"Analysis Complete!",description:`Strategy score: ${Ee.overall_score}/10`})}catch(Ee){console.error("Error analyzing strategy:",Ee),Le({title:"Analysis Failed",description:"Could not analyze strategy. Please try again.",variant:"destructive"})}L(!1)}},J=async xe=>{const Ee=await z(k);if(Ee)try{const Pe=await vn.integrations.Core.InvokeLLM({prompt:`Take this trading strategy: 1213 1214"${r}" 1215 1216And enhance it by applying this improvement: 1217 1218"${xe}" 1219 1220Return the enhanced strategy description. Make it detailed and professional. Keep the original strategy core but add the suggested improvement seamlessly.`,response_json_schema:{type:"object",properties:{enhanced_strategy:{type:"string"}}}});await Vy(Ee),n(Pe.enhanced_strategy),O(null),W([]),x(""),Le({title:"Strategy Enhanced!",description:"Applied AI suggestion successfully"})}catch(Pe){console.error("Error applying suggestion:",Pe),Le({title:"Enhancement Failed",description:"Could not apply suggestion. Please try again.",variant:"destructive"})}},ee=async(xe,Ee)=>{var Pe;if(Ee.stopPropagation(),!k){Le({title:"Login Required",description:"Please log in to like robots.",variant:"default"});return}try{const Z=m.find(he=>he.id===xe);if(!Z)return;const ae=Z.liked_by||[],pe=k.email;let ye;ae.includes(pe)?ye=ae.filter(he=>he!==pe):ye=[...ae,pe],await je.GeneratedRobot.update(xe,{liked_by:ye}),await new Promise(he=>setTimeout(he,200)),g(he=>he.map(He=>He.id===xe?{...He,liked_by:ye,is_liked:ye.includes(pe)}:He))}catch(Z){console.error("Error liking robot:",Z),((Pe=Z.response)==null?void 0:Pe.status)===429?Le({title:"Action Limit Reached",description:"Too many requests. Please wait a moment before trying again.",variant:"destructive"}):Le({title:"Error",description:"Could not update like status. Please try again.",variant:"destructive"})}},Y=async()=>{var Ee,Pe;if(!r.trim()){S("Please describe your trading strategy idea");return}if(!k){S("Please log in to generate robots."),Le({title:"Login Required",description:"You need to be logged in to generate trading robots."});return}const xe=await z(k);if(xe){S(""),l(!0),V(0);try{V(10);const Z=`You are a MASTER MQL${i==="mt4"?"4":"5"} Expert Advisor developer with 20+ years of institutional trading experience. 1221 1222CRITICAL REQUIREMENT: Generate a COMPLETE, PRODUCTION-READY EA with MINIMUM 500 LINES OF CODE. NO placeholders, NO shortcuts! 1223 1224EA SPECIFICATIONS: 1225- Strategy: ${r} 1226- Platform: MetaTrader ${i==="mt4"?"4 (MQL4)":"5 (MQL5)"} 1227- Target: FTMO/The5ers prop trading compliance 1228
1229MANDATORY STRUCTURE (500+ LINES): 12301. INPUT PARAMETERS (30-50 lines): Trading settings, indicators, risk management, money management, trading sessions, filters, notifications 12312. GLOBAL VARIABLES (20-30 lines): Position tracking, indicator handles, statistics, state management 12323. OnInit() FUNCTION (40-60 lines): Full validation, initialization, error checks 12334. OnDeinit() FUNCTION (20-30 lines): Cleanup, save stats, release resources 12345. OnTick() MAIN LOGIC (100-150 lines): Bar detection, filters, position management, signals, error handling 12356. ENTRY SIGNALS (60-80 lines): CheckBuySignal(), CheckSellSignal() with multiple confirmations 12367. ORDER MANAGEMENT (80-120 lines): OpenBuyOrder(), OpenSellOrder(), ModifyOrder(), CloseOrder() with retry logic 12378. RISK MANAGEMENT (50-70 lines): CalculateLotSize(), CalculateStopLoss(), CalculateTakeProfit(), CheckMaxDrawdown() 12389. HELPER FUNCTIONS (60-80 lines): IsNewBar(), IsTradingTime(), GetCurrentSpread(), IsValidStop(), Normalize functions 123910. INDICATORS (40-60 lines): Implement ALL indicators mentioned in strategy 124011. DISPLAY (30-50 lines): ShowTradingPanel(), UpdateStatistics(), DrawTradeLevels() 124112. LOGGING (30-40 lines): LogTrade(), LogError(), SendAlert() 1242 1243CODE QUALITY: MINIMUM 500 LINES, every function FULLY implemented, comprehensive error handling, detailed comments, professional formatting, all constants defined, input validation everywhere, complete logging. 1244 1245ABSOLUTELY FORBIDDEN: TODO comments, placeholder functions, incomplete implementations, code under 500 lines. 1246 1247OUTPUT JSON: {"code": "COMPLETE 500+ LINE MQL CODE", "parameters": {"LotSize": 0.01, "StopLossPips": 50, ...}} 1248 1249IMPORTANT: Do NOT include headers/copyright in code field. Remove markdown fences. Code MUST compile immediately. 1250 1251GENERATE THE COMPLETE 500+ LINE INSTITUTIONAL-GRADE EXPERT ADVISOR NOW!`;V(30);const ae=await vn.integrations.Core.InvokeLLM({prompt:Z,response_json_schema:{type:"object",properties:{code:{type:"string"},parameters:{type:"object",additionalProperties:!0}},required:["code"]},add_context_from_internet:!1});V(60);let pe=ae.code||"// AI failed to generate code.",ye=ae.parameters||{};pe=pe.replace(/```mql[45]?\n?/g,"").replace(/```\n?/g,"").trim(),await new Promise(jt=>setTimeout(jt,200)),V(70);const he=await vn.integrations.Core.InvokeLLM({prompt:`Generate a professional, catchy name for a trading robot with this strategy: "${r}". Return only the name, no explanation, quotes or other text. The name should be short (1-3 words) and marketable.`,response_json_schema:{type:"object",properties:{name:{type:"string"}},required:["name"]}});V(80);const He=pe.split(` 1252`).filter(jt=>jt.trim()!=="").length,Te=pe.includes("GetLastError")||pe.includes("try")||pe.includes("catch")||pe.includes("ReturnErrorCode"),it=pe.includes("CalculateLotSize")||pe.includes("risk")||pe.includes("StopLoss")||pe.includes("TakeProfit"),_t=pe.includes("Print")||pe.includes("LogMessage")||pe.includes("Comment");let Bt=0;He>=500?Bt+=40:Bt+=Math.min(40,He/500*40),Te&&(Bt+=20),it&&(Bt+=20),_t&&(Bt+=20),U(Math.round(Bt));const Et=i==="ctrader"?`//+------------------------------------------------------------------+ 1253//| Good luck, dear Traders :-) | 1254//| Copyright 2025, GPT4trade | 1255//| https://www.robot4trade.com | 1256//+------------------------------------------------------------------+ 1257// Copyright 2016-2025 robot4trade.com 1258// Website: https://www.robot4trade.com/ 1259 1260`:`//+------------------------------------------------------------------+ 1261//| Good luck, dear Traders :-) | 1262//| Copyright 2025, GPT4trade | 1263//| https://www.robot4trade.com | 1264//+------------------------------------------------------------------+ 1265#property copyright "Copyright 2016-2025 robot4trade.com" 1266#property link "https://www.robot4trade.com/" 1267 1268`;V(90);const Yn=Et+pe,Dt=he.name||`TradingBot-${Date.now()}`,Me={name:Dt,description:r,platform:i,status:"generated",code:Yn,parameters:ye,created_date:new Date().toISOString(),thumbnail_url:k.profile_image||"https://www.robot4trade.com/wp-content/uploads/2020/09/home-logo-sm.png",created_by:k.email,liked_by:[]},ze=await je.GeneratedRobot.create(Me);
1268await Vy(xe),V(100),h(ze),_(ye),t("edit"),await B(),Le({title:"ð Robot Generated!",description:`"${Dt}" created with ${He} lines | Quality Score: ${Math.round(Bt)}%`}),window.dispatchEvent(new Event("showBetaNotice")),k&&await JRe(k.id,"bot_creator")}catch(Z){console.error("Error generating robot:",Z);let ae="Failed to generate robot. Please try again with a more detailed description or simplify your request.";((Ee=Z.response)==null?void 0:Ee.status)===429?ae="Server is very busy generating robots. Please wait a few minutes and try again.":(Pe=Z.message)!=null&&Pe.includes("response_json_schema")&&(ae="The AI returned an unexpected format. Please try simplifying your request or rephrasing."),S(ae),Le({title:"Generation Failed",description:ae,variant:"destructive"})}l(!1),V(0)}},X=xe=>{const Ee=cB.find(Pe=>Pe.id===xe);Ee&&(n(Ee.idea),x(xe),O(null),W([]),Le({title:"Template Loaded",description:Ee.name}))},ne=async()=>{var xe;if(u){d(!0);try{await new Promise(Z=>setTimeout(Z,3e3));const Ee={profit_factor:Math.random()*2+.5,max_drawdown:Math.random()*20+5,sharpe_ratio:Math.random()*1.5+.2,win_rate:Math.random()*40+40},Pe=await je.GeneratedRobot.update(u.id,{status:"tested",test_results:Ee});h(Pe),t("results"),Le({title:"Compilation Successful",description:"Robot compiled and tested (mock results shown)."})}catch(Ee){console.error("Error compiling robot:",Ee),((xe=Ee.response)==null?void 0:xe.status)===429?Le({title:"Action Limit Reached",description:"Too many requests. Please wait a moment before trying again.",variant:"destructive"}):Le({title:"Compilation Error",description:"Could not compile or test the robot. Please check the code or try again.",variant:"destructive"})}d(!1)}},Q=async xe=>{var Ee;if(u)try{const Pe=await je.GeneratedRobot.update(u.id,{code:xe});h(Pe),Le({title:"Code Saved",description:"Your robot's code has been updated."})}catch(Pe){console.error("Error updating code:",Pe),((Ee=Pe.response)==null?void 0:Ee.status)===429?Le({title:"Action Limit Reached",description:"Too many requests. Please wait a moment before trying again.",variant:"destructive"}):Le({title:"Error Saving Code",description:"Could not save changes to the code. Please try again.",variant:"destructive"})}},ie=async xe=>{var Ee;if(u)try{const Pe=await je.GeneratedRobot.update(u.id,{parameters:xe});h(Pe),_(xe),Le({title:"Parameters Saved",description:"Robot parameters have been updated."})}catch(Pe){console.error("Error updating parameters:",Pe),((Ee=Pe.response)==null?void 0:Ee.status)===429?Le({title:"Action Limit Reached",description:"Too many requests. Please wait a moment before trying again.",variant:"destructive"}):Le({title:"Error Saving Parameters",description:"Could not save parameter changes. Please try again.",variant:"destructive"})}},me=async xe=>{var Ee;try{const Pe=await je.GeneratedRobot.get(xe);if(h(Pe),_(Pe.parameters||{}),t("edit"),S(""),O(null),W([]),x(""),Pe.code){const Z=Pe.code.split(` 1269`).filter(He=>He.trim()!=="").length,ae=Pe.code.includes("GetLastError")||Pe.code.includes("try")||Pe.code.includes("catch")||Pe.code.includes("ReturnErrorCode"),pe=Pe.code.includes("CalculateLotSize")||Pe.code.includes("risk")||Pe.code.includes("StopLoss")||Pe.code.includes("TakeProfit"),ye=Pe.code.includes("Print")||Pe.code.includes("LogMessage")||Pe.code.includes("Comment");let he=0;Z>=500?he+=40:he+=Math.min(40,Z/500*40),ae&&(he+=20),pe&&(he+=20),ye&&(he+=20),U(Math.round(he))}else U(null)}catch(Pe){console.error("Error loading robot:",Pe),((Ee=Pe.response)==null?void 0:Ee.status)===429?S("The server is busy, please wait a moment and try selecting the robot again."):S("Failed to load the selected robot. It might have been removed or an error occurred."),h(null),_({}),U(null)}},oe=A.useMemo(()=>!m||!k?[]:[...m].sort((xe,Ee)=>{var ae,pe;const Pe=((ae=xe.liked_by)==null?void 0:ae.includes(k.email))||!1,Z=((pe=Ee.liked_by)==null?void 0:pe.includes(k.email))||!1;return Pe&&!Z?-1:!Pe&&Z?1:new Date(Ee.created_date)-new Date(xe.created_date)}),[m,k]),Ne=async()=>{if(u)try{const xe=u.code,Ee=new Blob([xe],{type:"text/plain"}),Pe=URL.createObjectURL(Ee),Z=document.createElement("a");Z.href=Pe;let ae=".mq4";if(u.platform==="mt5"?ae=".mq5":u.platform==="ctrader"&&(ae=".cs"),Z.download=`${u.name||"TradingRobot"}${ae}`,document.body.appendChild(Z),setTimeout(()=>{Z.click(),document.body.removeChild(Z),URL.revokeObjectURL(Pe)},0),u.downloads!==void 0){const pe=(u.downloads||0)+1;await je.GeneratedRobot.update(u.id,{downloads:pe}
1269),h(ye=>({...ye,downloads:pe}))}Le({title:"Download Started",description:`Downloading ${u.name}${ae}`})}catch(xe){console.error("Error downloading robot:",xe),Le({title:"Download Failed",description:"Could not download the robot file. Please try again.",variant:"destructive"})}};return P&&m.length===0?a.jsxs("div",{className:"flex justify-center items-center h-[calc(100vh-200px)]",children:[a.jsx(kt,{className:"h-12 w-12 animate-spin text-cyan-400"}),a.jsx("p",{className:"ml-4 text-lg text-gray-300",children:"Loading your robots..."})]}):a.jsxs("div",{className:"space-y-6 overflow-x-hidden",children:[a.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-start md:items-center gap-4",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(Ya,{className:"h-12 w-12"}),a.jsxs("div",{children:[a.jsxs("h1",{className:"text-2xl font-bold text-white flex items-center gap-2",children:["AI MQL Code Generator",a.jsx(Oe,{className:"bg-gradient-to-r from-purple-500 to-pink-500",children:"PRO"})]}),a.jsx("p",{className:"text-gray-400 text-sm",children:"Professional AI-powered trading bot creator with smart analysis"})]})]}),a.jsx(Sv,{})]}),a.jsxs("div",{className:"hidden",children:[a.jsx("h2",{children:"Professional MQL4/MQL5 Expert Advisor Generator with AI Analysis"}),a.jsx("p",{children:"Generate sophisticated trading robots for FTMO challenges and prop trading firms using advanced ChatGPT AI technology. Our intelligent MQL generator creates expert advisors with strategy analysis, quality scoring, and optimization suggestions."})]}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 min-w-0",children:[a.jsx("div",{className:"lg:col-span-1 min-w-0 order-2 lg:order-none",children:a.jsxs(be,{className:"bg-gray-800 border-gray-700 shadow-lg",children:[a.jsx(Be,{children:a.jsxs(qe,{className:"text-white flex items-center",children:[a.jsx(_i,{className:"h-5 w-5 mr-2 text-cyan-400"}),"My Trading Bots",P&&a.jsx(kt,{className:"h-4 w-4 animate-spin text-gray-400 ml-2"})]})}),a.jsx(Se,{children:a.jsxs("div",{className:"space-y-4",children:[a.jsxs(se,{onClick:()=>{h(null),n(""),t("generate"),S(""),_({}),O(null),U(null),W([]),x("")},className:"w-full justify-start bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-700 hover:to-blue-700",children:[a.jsx(er,{className:"h-4 w-4 mr-2"}),"Create New Bot"]}),!P&&oe.length===0?a.jsx("p",{className:"text-gray-400 text-sm py-4 text-center",children:"No robots created yet. Start by creating your first trading robot!"}):a.jsx("div",{className:"space-y-2 max-h-[60vh] overflow-y-auto pr-1",children:oe.map(xe=>a.jsxs("div",{className:"flex items-center w-full min-w-0 overflow-hidden rounded-md hover:bg-gray-700/50 pr-1",children:[a.jsx(se,{variant:"ghost",className:"flex-grow min-w-0 justify-start text-gray-300 hover:text-white hover:bg-transparent py-2 px-3 text-left",onClick:()=>me(xe.id),children:a.jsxs("div",{className:"flex items-center w-full min-w-0",children:[a.jsxs("span",{className:"truncate flex-1 min-w-0",title:xe.name,children:[xe.name,xe.is_private&&a.jsx("span",{className:"ml-2 text-xs text-cyan-400",children:"(Private)"})]}),a.jsx("span",{className:`ml-auto text-xs px-2 py-0.5 rounded-full ${xe.status==="tested"?"bg-green-900 text-green-400":xe.status==="compiled"?"bg-blue-900 text-blue-400":"bg-gray-900 text-gray-400"}`,children:xe.status})]})}),a.jsx(se,{variant:"ghost",size:"icon",className:`h-7 w-7 text-gray-400 hover:text-red-400 ${xe.is_liked?"text-red-500 fill-red-500":""}`,onClick:Ee=>ee(xe.id,Ee),title:xe.is_liked?"Unlike":"Like",children:a.jsx(aJ,{className:"h-4 w-4"})})]},xe.id))})]})})]})}),a.jsx("div",{className:"lg:col-span-3 min-w-0 order-1 lg:order-none",children:a.jsxs(ei,{value:e,onValueChange:xe=>{t(xe),xe==="generate"&&(S(""),_({}),O(null),U(null),W([]),x(""))},children:[a.jsxs(Ta,{className:"bg-gray-800 border-b border-gray-700 w-full justify-start",children:[a.jsxs(Nt,{value:"generate",disabled:o,children:[a.jsx(er,{className:"h-4 w-4 mr-2"}),"Generate"]}),a.jsxs(Nt,{value:"edit",disabled:!u||o,children:[a.jsx(ji,{className:"h-4 w-4 mr-2"}),"Edit"]}),a.jsxs(Nt,{value:"results",disabled:!u||!u.test_results||o,children:[a.jsx(KS,{className:"h-4 w-4 mr-2"}),"Results"]})]}),a.jsxs(Pt,{value:"generate",className:"mt-6 space-y-6",children:[a.jsxs(be,{className:"bg-gray-800 border-gray-700 shadow-lg",children:[a.jsx(Be,{children:a.jsxs(qe,{className:"text-white flex items-center",children:[a.jsx(ln,{className:"h-5 w-5 mr-2 text-purple-400"}),"Generate Your Trading Bot",a.jsx(Oe,{className:"ml-2 bg-gradient-to-r from-cyan-500 to-blue-500",children:"MT4 ⢠MT5 ⢠cTrader"})]})}),a.jsx(Se,{className:"space-y-4",children:a.jsxs("div",{className:"space-y-4",children:[a.jsx("div",{children:a.jsxs(qt,{value:i,onValueChange:s,disabled:o,children:[a.jsx($t,{className:"bg-gray-900 border-gray-700 text-gray-300",children:a.jsx(zt,{placeholder:"Select Platform"})}),a.jsxs(Ft,{children:[a.jsx(Ce,{value:"mt4",children:"MetaTrader 4"}),a.jsx(Ce,{value:"mt5",children:"MetaTrader 5"}),a.jsx(Ce,{value:"ctrader",children:"cTrader"})]})]})}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("label",{className:"text-sm text-gray-300 flex items-center justify-between",children:["Describe your trading strategy idea",a.jsx(se,{variant:"ghost",size:"sm",onClick:H,disabled:D||!r.trim(),className:"text-cyan-400 hover:text-cyan-300",children:D?a.jsxs(a.Fragment,{children:[a.jsx(kt,{className:"h-3 w-3 mr-1 animate-spin"}),"Analyzing..."]}):a.jsxs(a.Fragment,{children:[a.jsx(ln,{className:"h-3 w-3 mr-1"}),"AI Analyze"]})})]}),a.jsx(Wn,{placeholder:"e.g., A trend-following strategy that uses EMA crossovers for entry signals and ATR for stop loss calculation. It should only trade during London and New York sessions...",className:"h-32 bg-gray-900 border-gray-700 text-gray-300",value:r,onChange:xe=>{n(xe.target.value),x(""),O(null),W([])},disabled:o}),j&&a.jsx("p",{className:"text-red-400 text-sm mt-2 p-2 bg-red-900/20 border border-red-700/30 rounded-md",children:j})]}),C&&a.jsxs(HP,{className:"bg-gradient-to-r from-purple-900/30 to-blue-900/30 border-purple-500/30",children:[a.jsx(ln,{className:"h-4 w-4 text-purple-400"}),a.jsx(JK,{className:"text-white",children:"AI Strategy Analysis"}),a.jsxs(WP,{className:"text-gray-300 space-y-3 mt-2",children:[a.jsxs("div",{className:"grid grid-cols-2 gap-2 text-sm",children:[a.jsxs("div",{children:[a.jsx("span",{className:"text-gray-400",children:"Type:"})," ",a.jsx(Oe,{variant:"outline",children:C.strategy_type})]}),a.jsxs("div",{children:[a.jsx("span",{className:"text-gray-400",children:"Complexity:"})," ",a.jsx(Oe,{variant:"outline",children:C.complexity})]}),a.jsxs("div",{children:[a.jsx("span",{className:"text-gray-400",children:"Risk:"})," ",a.jsx(Oe,{variant:"outline",className:C.risk_level==="low"?"border-green-500 text-green-400":C.risk_level==="medium"?"border-yellow-500 text-yellow-400":"border-red-500 text-red-400",children:C.risk_level})]}),a.jsxs("div",{children:[a.jsx("span",{className:"text-gray-400",children:"Score:"})," ",a.jsxs(Oe,{className:"bg-cyan-600",children:[C.overall_score,"/10"]})]})]}),C.ftmo_compliant&&a.jsx("div",{className:"flex items-center gap-2 text-sm",children:C.ftmo_compliant.toLowerCase().includes("yes")?a.jsxs(a.Fragment,{children:[a.jsx(dc,{className:"h-4 w-4 text-green-400"})," ",a.jsx("span",{children:"FTMO Compliant"})]}):a.jsxs(a.Fragment,{children:[a.jsx(Lt,{className:"h-4 w-4 text-yellow-400"})," ",a.jsxs("span",{children:["FTMO: ",C.ftmo_compliant]})]})}),G.length>0&&a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"text-sm font-medium text-cyan-400 flex items-center",children:[a.jsx(Uk,{className:"h-4 w-4 mr-1"}),"AI Suggestions:"]}),a.jsx("div",{className:"space-y-1",children:G.slice(0,3).map((xe,Ee)=>a.jsx("div",{className:"flex items-start gap-2 text-xs",children:a.jsxs(se,{variant:"ghost",size:"sm",className:"h-auto py-1 px-2 text-left hover:bg-purple-900/30",onClick:()=>J(xe),children:[a.jsx(ss,{className:"h-3 w-3 mr-1 flex-shrink-0 text-yellow-400"}),a.jsx("span",{className:"text-gray-300",children:xe})]})},Ee))})]})]})]}),o&&q>0&&a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex justify-between text-sm text-gray-400",children:[a.jsx("span",{children:"Generating your robot..."}),a.jsxs("span",{children:[q,"%"]})]}),a.jsx(Ek,{value:q,className:"h-2 bg-gray-700",indicatorClassName:"bg-cyan-500"})]}),a.jsx("div",{children:a.jsx(se,{className:"w-full bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-700 hover:to-blue-700 h-12",onClick:Y,disabled:o||!r.trim(),children:o?a.jsxs("span",{className:"flex items-center",children:[a.jsx(kt,{className:"animate-spin -ml-1 mr-2 h-5 w-5 text-white"}),"Generating Robot..."]}):a.jsxs("span",{className:"flex items-center text-lg",children:[a.jsx(_i,{className:"h-5 w-5 mr-2"}),"Generate Robot"]})})})]})})]}),a.jsxs(be,{className:"bg-gradient-to-br from-gray-800 to-gray-900 border-cyan-500/20 shadow-lg",children:[a.jsx(Be,{children:a.jsxs(qe,{className:"text-white flex items-center",children:[a.jsx(XS,{className:"h-5 w-5 mr-2 text-cyan-400"}),"Strategy Templates",a.jsx(Oe,{className:"ml-2 bg-cyan-600",children:"NEW"})]})}),a.jsx(Se,{children:a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:cB.map(xe=>a.jsxs(se,{variant:"outline",className:`h-auto py-3 px-4 flex flex-col items-start text-left whitespace-normal break-words border-gray-600 hover:border-cyan-500 hover:bg-cyan-950/30 ${y===xe.id?"border-cyan-500 bg-cyan-950/30":""}`,onClick:()=>X(xe.id),children:[a.jsx("div",{className:"font-medium text-white mb-1",children:xe.name}),a.jsx("div",{className:"text-xs text-gray-400 mb-2 break-words text-left leading-snug",children:xe.description}),a.jsx(Oe,{variant:"outline",className:"text-xs",children:xe.complexity})]},xe.id))})})]}),a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[a.jsx(be,{className:"bg-gradient-to-br from-cyan-900/20 to-blue-900/20 border-cyan-500/20",children:a.jsxs(Se,{className:"p-4",children:[a.jsx(ln,{className:"h-8 w-8 text-cyan-400 mb-2"}),a.jsx("h3",{className:"font-semibold text-white mb-1",children:"AI Strategy Analysis"}),a.jsx("p",{className:"text-sm text-gray-400",children:"Get instant feedback and optimization suggestions"})]})}),a.jsx(be,{className:"bg-gradient-to-br from-purple-900/20 to-pink-900/20 border-purple-500/20",children:a.jsxs(Se,{className:"p-4",children:[a.jsx(Xo,{className:"h-8 w-8 text-purple-400 mb-2"}),a.jsx("h3",{className:"font-semibold text-white mb-1",children:"Quality Scoring"}),a.jsx("p",{className:"text-sm text-gray-400",children:"Every robot gets a professional qual
1269ity score"})]})}),a.jsx(be,{className:"bg-gradient-to-br from-green-900/20 to-emerald-900/20 border-green-500/20",children:a.jsxs(Se,{className:"p-4",children:[a.jsx(Ar,{className:"h-8 w-8 text-green-400 mb-2"}),a.jsx("h3",{className:"font-semibold text-white mb-1",children:"FTMO Ready"}),a.jsx("p",{className:"text-sm text-gray-400",children:"Compliant with prop trading firm rules"})]})})]})]}),a.jsx(Pt,{value:"edit",className:"mt-6",children:u?a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[a.jsx("div",{className:"md:col-span-2",children:a.jsx(URe,{code:u.code,onChange:Q,onSave:Ne,onCompile:ne,isCompiling:c,platform:u.platform||"mt4"})}),a.jsxs("div",{children:[a.jsx(qRe,{parameters:w,onChange:ie}),F!==null&&a.jsx(be,{className:"mt-4 bg-gradient-to-br from-purple-900/30 to-blue-900/30 border-purple-500/30",children:a.jsxs(Se,{className:"p-4",children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsx("span",{className:"text-sm text-gray-300",children:"Code Quality Score"}),a.jsxs(Oe,{className:"bg-cyan-600",children:[F,"%"]})]}),a.jsx(Ek,{value:F,className:"h-2 bg-gray-700",indicatorClassName:"bg-cyan-500"}),a.jsx("p",{className:"text-xs text-gray-400 mt-2",children:F>=80?"Excellent quality!":F>=60?"Good quality":"Consider improvements"})]})}),a.jsxs(be,{className:"mt-6 bg-gray-800 border-gray-700 shadow-lg",children:[a.jsx(Be,{children:a.jsx(qe,{className:"text-white",children:u.name})}),a.jsxs(Se,{children:[a.jsx("p",{className:"text-gray-300 mb-4 text-sm",children:u.description}),a.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[a.jsx(Oe,{className:"bg-gray-700 text-gray-300",children:(_e=u.platform)==null?void 0:_e.toUpperCase()}),a.jsx(Oe,{className:u.status==="tested"?"bg-green-800 text-green-300":u.status==="compiled"?"bg-blue-800 text-blue-300":"bg-gray-700 text-gray-300",children:u.status})]}),a.jsx(sB,{robot:u,code:u.code,children:a.jsxs(se,{className:"w-full bg-gradient-to-r from-purple-600 to-indigo-600 hover:from-purple-700 hover:to-indigo-700",children:[a.jsx(GS,{className:"h-4 w-4 mr-2"}),"Share Trading Robot"]})})]})]})]})]}):a.jsxs("div",{className:"text-center py-12 text-gray-400",children:[a.jsx(ji,{className:"h-12 w-12 mx-auto mb-4 opacity-30"}),a.jsx("p",{children:"Select a robot from the list or generate a new one to start editing."})]})}),a.jsx(Pt,{value:"results",className:"mt-6",children:u&&u.test_results?a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[a.jsx(be,{className:"bg-gray-800 border-gray-700 shadow-lg",children:a.jsxs(Se,{className:"p-4 md:p-6",children:[a.jsx("p",{className:"text-gray-400 text-sm",children:"Profit Factor"}),a.jsx("p",{className:`text-xl md:text-2xl font-bold ${u.test_results.profit_factor>1.5?"text-green-400":u.test_results.profit_factor>1?"text-yellow-400":"text-red-400"}`,children:u.test_results.profit_factor.toFixed(2)})]})}),a.jsx(be,{className:"bg-gray-800 border-gray-700 shadow-lg",children:a.jsxs(Se,{className:"p-4 md:p-6",children:[a.jsx("p",{className:"text-gray-400 text-sm",children:"Win Rate"}),a.jsxs("p",{className:"text-xl md:text-2xl font-bold text-cyan-400",children:[u.test_results.win_rate.toFixed(1),"%"]})]})}),a.jsx(be,{className:"bg-gray-800 border-gray-700 shadow-lg",children:a.jsxs(Se,{className:"p-4 md:p-6",children:[a.jsx("p",{className:"text-gray-400 text-sm",children:"Max Drawdown"}),a.jsxs("p",{className:"text-xl md:text-2xl font-bold text-red-400",children:[u.test_results.max_drawdown.toFixed(2),"%"]})]})}),a.jsx(be,{className:"bg-gray-800 border-gray-700 shadow-lg",children:a.jsxs(Se,{className:"p-4 md:p-6",children:[a.jsx("p",{className:"text-gray-400 text-sm",children:"Sharpe Ratio"}),a.jsx("p",{className:`text-xl md:text-2xl font-bold ${u.test_results.sharpe_ratio>1?"text-green-400":"text-yellow-400"}`,children:u.test_results.sharpe_ratio.toFixed(2)})]})})]}),a.jsxs(be,{className:"bg-gray-800 border-gray-700 shadow-lg",children:[a.jsx(Be,{children:a.jsx(qe,{className:"text-white",children:"Next Steps"})}),a.jsxs(Se,{className:"space-y-4",children:[a.jsxs("p",{className:"text-gray-300",children:['Your EA "',u.name,`" has been successfully tested and is ready to use. Here's what you can do next:`]}),a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[a.jsx(VRe,{robot:{...u,extension:u.platform==="ctrader"?".cs":u.platform==="mt5"?".mq5":".mq4"},children:a.jsxs(se,{className:"w-full bg-cyan-600 hover:bg-cyan-700",children:[a.jsx(Gn,{className:"h-4 w-4 mr-2"}),"Download Robot"]})}),a.jsx(sB,{robot:u,code:u.code,children:a.jsxs(se,{className:"w-full bg-gradient-to-r from-purple-600 to-indigo-600 hover:from-purple-700 hover:to-indigo-700",children:[a.jsx(GS,{className:"h-4 w-4 mr-2"}),"Share Trading Robot"]})}),a.jsxs(se,{variant:"outline",className:"w-full text-gray-300 border-gray-600 hover:bg-gray-700",onClick:()=>t("edit"),children:[a.jsx(ji,{className:"h-4 w-4 mr-2"}),"Continue Editing"]})]}),a.jsxs("div",{className:"p-4 border border-cyan-800 bg-cyan-900/30 rounded-lg mt-6",children:[a.jsx("h3",{className:"font-medium text-cyan-400 mb-2",children:"Ready to Trade Live?"}),a.jsx("p",{className:"text-gray-300 mb-4",children:"Use this EA with a regulated broker for the best trading experience."}),a.jsx(Sv,{})]})]})]})]}):a.jsxs("div",{className:"text-center py-12 text-gray-400",children:[a.jsx(KS,{className:"h-12 w-12 mx-auto mb-4 opacity-30"}),a.jsx("p",{children:"No test results available. Compile and test your robot first."})]})})]})})]}),I]})}function t5e(){const[e,t]=A.useState([]),[r,n]=A.useState(!0),[i,s]=A.useState("all"),[o,l]=A.useState("all");A.useEffect(()=>{c()},[]);const c=async()=>{try{const b=await(async(v,y=3)=>{var x;for(let w=0;w<y;w++)try{return await v()}catch(_){if(((x=_.response)==null?void 0:x.status)===429&&w<y-1){await new Promise(j=>setTimeout(j,Math.pow(2,w)*1e3));continue}throw _}})(()=>ka.InvokeLLM({prompt:"Give me the latest financial news and market updates. Focus on major market movements, company earnings, and economic indicators. Include cryptocurrency news, forex market developments, and stock market highlights.",add_context_from_internet:!0,response_json_schema:{type:"object",properties:{news:{type:"array",items:{type:"object",properties:{title:{type:"string"},summary:{type:"string"},category:{type:"string",enum:["stocks","forex","crypto","economy","commodities"]},sentiment:{type:"string",enum:["positive","negative","neutral"]},source:{type:"string"},timestamp:{type:"string",format:"date-time"}}}}}}}));t(b.news||[])}catch(g){console.error("Error loading news:",g),t(d())}n(!1)},d=()=>[{title:"Federal Reserve holds interest rates steady, signals possible cut
1269s later this year",summary:"The Federal Reserve maintained its benchmark interest rate at the current range of 5.25% to 5.5%, citing ongoing inflation concerns. However, Fed Chair Powell indicated that rate cuts could begin later this year if inflation continues to moderate toward the 2% target.",category:"economy",sentiment:"neutral",source:"Financial Times",timestamp:new Date(Date.now()-10800*1e3).toISOString()},{title:"Bitcoin surges past $64,000 as institutional adoption continues to grow",summary:"Bitcoin reached a two-month high above $64,000 as data shows increasing institutional investment in the cryptocurrency. Recent filings indicate several major asset managers have increased their Bitcoin ETF holdings.",category:"crypto",sentiment:"positive",source:"CoinDesk",timestamp:new Date(Date.now()-300*60*1e3).toISOString()},{title:"Oil prices drop amid concerns over global demand outlook",summary:"Crude oil prices fell by nearly 2% today after an industry report showed an unexpected build in U.S. crude inventories, raising concerns about weakening demand. OPEC+ members are set to meet next week to discuss production quotas.",category:"commodities",sentiment:"negative",source:"Reuters",timestamp:new Date(Date.now()-480*60*1e3).toISOString()},{title:"Apple reports record quarterly revenue, beating analyst expectations",summary:"Apple Inc. announced quarterly results that exceeded Wall Street expectations, with iPhone sales showing surprising strength in the Chinese market. The company also raised its dividend and announced a $90 billion stock buyback program.",category:"stocks",sentiment:"positive",source:"Bloomberg",timestamp:new Date(Date.now()-720*60*1e3).toISOString()},{title:"EUR/USD climbs as ECB signals potential rate hike",summary:"The Euro strengthened against the US dollar after European Central Bank officials suggested interest rates might need to rise further to combat persistent inflation in the Eurozone. Market participants now anticipate a possible 25 basis point increase at the next meeting.",category:"forex",sentiment:"positive",source:"CNBC",timestamp:new Date(Date.now()-1080*60*1e3).toISOString()},{title:"Global semiconductor shortage easing, industry report suggests",summary:"A new industry report indicates that the global semiconductor shortage that has plagued automakers and electronics manufacturers is beginning to ease. Lead times for chip deliveries have decreased for the third consecutive quarter.",category:"stocks",sentiment:"positive",source:"Wall Street Journal",timestamp:new Date(Date.now()-1440*60*1e3).toISOString()},{title:"UK inflation falls to 3.2%, lowest level in two years",summary:"The UK's annual inflation rate dropped to 3.2% in April, reaching its lowest level in two years. Despite the decline, inflation remains above the Bank of England's 2% target, suggesting interest rates may stay elevated in the near term.",category:"economy",sentiment:"neutral",source:"BBC",timestamp:new Date(Date.now()-2160*60*1e3).toISOString()}],u=g=>{switch(g){case"positive":return"bg-green-500/20 text-green-400 border-green-400/20";case"negative":return"bg-red-500/20 text-red-400 border-red-400/20";case"neutral":default:return"bg-blue-500/20 text-blue-400 border-blue-400/20"}},h=g=>{switch(g){case"forex":return"bg-indigo-500/20 text-indigo-400 border-indigo-400/20";case"crypto":return"bg-purple-500/20 text-purple-400 border-purple-400/20";case"economy":return"bg-amber-500/20 text-amber-400 border-amber-400/20";case"stocks":return"bg-blue-500/20 text-blue-400 border-blue-400/20";case"commodities":return"bg-green-500/20 text-green-400 border-green-400/20";default:return"bg-gray-500/20 text-gray-400 border-gray-400/20"}},m=e.filter(g=>{const b=i==="all"||g.category===i,v=o==="all"||g.sentiment===o;return b&&v});return a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-start md:items-center gap-4",children:[a.jsxs("h1",{className:"text-2xl font-bold text-white flex items-center",children:[a.jsx(VS,{className:"mr-2 h-6 w-6 text-cyan-400"}),"Market News"]}),a.jsx("div",{className:"flex flex-wrap gap-2",children:["all","stocks","forex","crypto","economy","commodities"].map(g=>a.jsx(se,{variant:i===g?"default":"outline",size:"sm",onClick:()=>s(g),className:i===g?"bg-cyan-600 hover:bg-cyan-700":"text-gray-300",children:g.charAt(0).toUpperCase()+g.slice(1)},g))})]}),a.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[a.jsx(Lk,{className:"h-4 w-4 text-gray-400"}),a.jsx("span",{className:"text-sm text-gray-400",children:"Sentiment Filter:"}),a.jsx("div",{className:"flex gap-2",children:["all","positive","neutral","negative"].map(g=>
1269a.jsx(Oe,{variant:"outline",className:`cursor-pointer ${o===g?"bg-gray-700 text-white":"text-gray-400"}`,onClick:()=>l(g),children:g.charAt(0).toUpperCase()+g.slice(1)},g))})]}),r?a.jsx("div",{className:"flex items-center justify-center h-64",children:a.jsx(kt,{className:"h-8 w-8 animate-spin text-cyan-500"})}):a.jsx("div",{className:"grid grid-cols-1 gap-4",children:m.length>0?m.map((g,b)=>a.jsx(be,{className:"p-6 bg-gray-800 border-gray-700 hover:bg-gray-750 transition-colors",children:a.jsxs("div",{className:"flex flex-col",children:[a.jsxs("div",{className:"flex justify-between items-start gap-4",children:[a.jsx("h3",{className:"font-semibold text-lg text-white",children:g.title}),a.jsxs("div",{className:"flex flex-wrap gap-2",children:[a.jsx(Oe,{className:h(g.category),children:g.category}),a.jsx(Oe,{className:u(g.sentiment),children:g.sentiment})]})]}),a.jsx("p",{className:"mt-3 text-gray-300",children:g.summary}),a.jsxs("div",{className:"flex justify-between items-center mt-4 text-sm text-gray-400",children:[a.jsxs("div",{className:"flex items-center",children:[a.jsx(Za,{className:"h-3 w-3 mr-1"}),g.timestamp?Mn(new Date(g.timestamp),{addSuffix:!0}):"Recently"]}),a.jsxs("div",{children:["Source: ",g.source]})]})]})},b)):a.jsxs("div",{className:"text-center p-8 bg-gray-800 border border-gray-700 rounded-lg",children:[a.jsx(VS,{className:"mx-auto h-12 w-12 text-gray-600 mb-3"}),a.jsx("h3",{className:"text-xl font-medium text-gray-300",children:"No news found"}),a.jsx("p",{className:"text-gray-400 mt-2",children:"No news matching your current filters. Try changing your filters or check back later."})]})}),a.jsx("div",{className:"mt-8",children:a.jsx(u9,{maxItems:5})})]})}function r5e(){return a.jsxs("div",{className:"max-w-4xl mx-auto space-y-10 py-6",children:[a.jsxs("div",{className:"text-center space-y-4",children:[a.jsxs("h1",{className:"text-4xl font-bold text-white",children:["About ",a.jsx("span",{className:"bg-gradient-to-r from-cyan-400 to-blue-500 bg-clip-text text-transparent",children:"robot4trade"})]}),a.jsx("p",{className:"text-xl text-gray-400 max-w-2xl mx-auto",children:"The AI-powered platform built for serious traders who want an edge in prop trading and algorithmic forex."})]}),a.jsxs("section",{className:"space-y-4",children:[a.jsx("h2",{className:"text-2xl font-semibold text-cyan-400",children:"What is robot4trade?"}),a.jsx("p",{className:"text-gray-300 leading-relaxed",children:"robot4trade is an advanced AI trading platform designed to help retail and professional traders build, test, and deploy automated Expert Advisors (EAs) for MetaTrader 4, MetaTrader 5, and cTrader. Using cutting-edge artificial intelligence, our platform generates production-ready MQL4 and MQL5 code based on your plain-language strategy descriptions â no programming experience required."}),a.jsx("p",{className:"text-gray-300 leading-relaxed",children:"Beyond code generation, robot4trade provides AI-powered trading signals, real-time market news, a Monte Carlo risk simulator, a stock screener, a community marketplace for sharing and discovering Expert Advisors, and a full-featured discussion forum. Every tool is built with one goal in mind: giving traders the technological advantages previously reserved for institutional desks."})]}),a.jsxs("section",{className:"space-y-4",children:[a.jsx("h2",{className:"text-2xl font-semibold text-cyan-400",children:"Who is it for?"}),a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[{icon:Qr,title:"Prop Traders",desc:"Traders pursuing FTMO, The5ers, or other prop firm challenges who need compliant, disciplined automated strategies."},{icon:ln,title:"Algo Developers",desc:"Developers who want AI assistance to accelerate MQL coding, backtesting, and strategy optimisation."},{icon:la,title:"Retail Traders",desc:"Independent traders at any experience level who want professional-grade tools without institutional costs."}].map(({icon:e,title:t,desc:r})=>a.jsx(be,{className:"bg-gray-800 border-gray-700",children:a.jsxs(Se,{className:"p-5 space-y-2",children:[a.jsx(e,{className:"h-8 w-8 text-cyan-400"}),a.jsx("h3",{className:"font-semibold text-white",children:t}),a.jsx("p",{className:"text-gray-400 text-sm",children:r})]})},t))})]}),a.jsxs("section",{className:"space-y-4",children:[a.jsx("h2",{className:"text-2xl font-semibold text-cyan-400",children:"Who builds robot4trade?"}),a.jsx("p",{className:"text-gray-300 leading-relaxed",children:"robot4trade is built by a team of algorithmic traders, software engineers, and AI researchers passionate about democratising access to professional trading technology. The team has a combined background spanning quantitative finance, full-stack development, and live prop trading experience across major forex and futures markets. Our developers actively trade the strategies we build â so every feature is tested in the real world before it reaches you."}),a.jsx("p",{className:"text-gray-300 leading-relaxed",children:"We are committed to transparency, continuous improvement, and community-driven development. User feedback directly shapes our roadmap, and we release platform updates regularly to stay ahead of market demands."})]}),a.jsxs("section",{className:"space-y-4",children:[a.jsx("h2",{className:"text-2xl font-semibold text-cyan-400",children:"Our C
1269ore Features"}),a.jsx("ul",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:["AI MQL4 / MQL5 Bot Generator","AI Chart Analysis Tool","Real-Time Trading Signals","Monte Carlo Risk Simulator","Stock & Forex Screener","Free EA Community Marketplace","Prop Trading Challenge Guide","Algo Trading Discussion Forum"].map(e=>a.jsxs("li",{className:"flex items-center gap-2 text-gray-300",children:[a.jsx(er,{className:"h-4 w-4 text-cyan-400 flex-shrink-0"}),e]},e))})]}),a.jsxs("div",{className:"flex flex-wrap gap-4 pt-2",children:[a.jsx(pt,{to:Ve("MqlGenerator"),className:"bg-gradient-to-r from-cyan-500 to-blue-500 hover:from-cyan-600 hover:to-blue-600 text-white font-medium px-6 py-2 rounded-md transition-all",children:"Try the AI Bot Maker"}),a.jsx(pt,{to:Ve("Community"),className:"border border-gray-600 text-gray-300 hover:bg-gray-700 px-6 py-2 rounded-md transition-all",children:"Browse Free EAs"})]})]})}function n5e(){return a.jsxs("div",{className:"max-w-3xl mx-auto space-y-10 py-6",children:[a.jsxs("div",{className:"text-center space-y-3",children:[a.jsxs("h1",{className:"text-4xl font-bold text-white",children:["Contact ",a.jsx("span",{className:"bg-gradient-to-r from-cyan-400 to-blue-500 bg-clip-text text-transparent",children:"robot4trade"})]}),a.jsx("p",{className:"text-gray-400 text-lg",children:"Have a question, a partnership enquiry, or need technical support? We'd love to hear from you."})]}),a.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-6",children:[a.jsx(be,{className:"bg-gray-800 border-gray-700",children:a.jsxs(Se,{className:"p-6 space-y-3",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(sp,{className:"h-6 w-6 text-cyan-400"}),a.jsx("h2",{className:"text-lg font-semibold text-white",children:"Email Us"})]}),a.jsx("p",{className:"text-gray-400 text-sm",children:"For general enquiries, feedback, or business partnerships:"}),a.jsx("a",{href:"mailto:[email protected]",className:"text-cyan-400 hover:text-cyan-300 font-medium break-all",children:"[email protected]"})]})}),a.jsx(be,{className:"bg-gray-800 border-gray-700",children:a.jsxs(Se,{className:"p-6 space-y-3",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(Bd,{className:"h-6 w-6 text-cyan-400"}),a.jsx("h2",{className:"text-lg font-semibold text-white",children:"Telegram Support"})]}),a.jsx("p",{className:"text-gray-400 text-sm",children:"Get fast support directly from our team on Telegram:"}),a.jsx("a",{href:"https://t.me/slaizvar",target:"_blank",rel:"noopener noreferrer",className:"text-cyan-400 hover:text-cyan-300 font-medium",children:"@slaizvar"})]})}),a.jsx(be,{className:"bg-gray-800 border-gray-700",children:a.jsxs(Se,{className:"p-6 space-y-3",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(pr,{className:"h-6 w-6 text-cyan-400"}),a.jsx("h2",{className:"text-lg font-semibold text-white",children:"Community Chat"})]}),a.jsx("p",{className:"text-gray-400 text-sm",children:"Join our Telegram community to connect with other traders:"}),a.jsx("a",{href:"https://t.me/robot4trade",target:"_blank",rel:"noopener noreferrer",className:"text-cyan-400 hover:text-cyan-300 font-medium",children:"t.me/robot4trade"})]})}),a.jsx(be,{className:"bg-gray-800 border-gray-700",children:a.jsxs(Se,{className:"p-6 space-y-3",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(Gh,{className:"h-6 w-6 text-cyan-400"}),a.jsx("h2",{className:"text-lg font-semibold text-white",children:"Website"})]}),a.jsx("p",{className:"text-gray-400 text-sm",children:"Visit our main website for the latest updates and resources:"}),a.jsx("a",{href:"https://www.robot4trade.com",target:"_blank",rel:"noopener noreferrer",className:"text-cyan-400 hover:text-cyan-300 font-medium",children:"www.robot4trade.com"})]})})]}),a.jsx(be,{className:"bg-gradient-to-br from-gray-800 to-gray-900 border-cyan-500/20",children:a.jsxs(Se,{className:"p-6 space-y-2",children:[a.jsx("h2",{className:"text-lg font-semibold text-white",children:"Response Times"}),a.jsxs("ul",{className:"text-gray-400 text-sm space-y-1",children:[a.jsxs("li",{children:["ð§ ",a.jsx("strong",{className:"text-gray-300",children:"Email:"})," Within 24â48 business hours"]}),a.jsxs("li",{children:["ð¬ ",a.jsx("strong",{className:"text-gray-300",children:"Telegram Support:"})," Usually within a few hours"]}),a.jsxs("li",{children:["ð ",a.jsx("strong",{className:"text-gray-300",children:"Community:"})," Real-time responses from the community"]})]})]})})]})}var Zx="Collapsible",[a5e,iY]=xn(Zx),[i5e,YP]=a5e(Zx),sY=A.forwardRef((e,t)=>
vendor: 4,188 bytes, line 1269
1269{const{__scopeCollapsible:r,open:n,defaultOpen:i,disabled:s,onOpenChange:o,...l}=e,[c,d]=Ka({prop:n,defaultProp:i??!1,onChange:o,caller:Zx});return a.jsx(i5e,{scope:r,disabled:s,contentId:ja(),open:c,onOpenToggle:A.useCallback(()=>d(u=>!u),[d]),children:a.jsx(st.div,{"data-state":QP(c),"data-disabled":s?"":void 0,...l,ref:t})})});sY.displayName=Zx;var oY="CollapsibleTrigger",lY=A.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,i=YP(oY,r);return a.jsx(st.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":QP(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...n,ref:t,onClick:Ge(e.onClick,i.onOpenToggle)})});lY.displayName=oY;var XP="CollapsibleContent",cY=A.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=YP(XP,e.__scopeCollapsible);return a.jsx(bn,{present:r||i.open,children:({present:s})=>a.jsx(s5e,{...n,ref:t,present:s})})});cY.displayName=XP;var s5e=A.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:i,...s}=e,o=YP(XP,r),[l,c]=A.useState(n),d=A.useRef(null),u=wt(t,d),h=A.useRef(0),m=h.current,g=A.useRef(0),b=g.current,v=o.open||l,y=A.useRef(v),x=A.useRef(void 0);return A.useEffect(()=>{const w=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(w)},[]),Mr(()=>{const w=d.current;if(w){x.current=x.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const _=w.getBoundingClientRect();h.current=_.height,g.current=_.width,y.current||(w.style.transitionDuration=x.current.transitionDuration,w.style.animationName=x.current.animationName),c(n)}},[o.open,n]),a.jsx(st.div,{"data-state":QP(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!v,...s,ref:u,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:v&&i})});function QP(e){return e?"open":"closed"}var o5e=sY,l5e=lY,c5e=cY,Pi="Accordion",u5e=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[ZP,d5e,f5e]=Lv(Pi),[Jx]=xn(Pi,[f5e,iY]),JP=iY(),uY=te.forwardRef((e,t)=>{const{type:r,...n}=e,i=n,s=n;return a.jsx(ZP.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?a.jsx(g5e,{...s,ref:t}):a.jsx(p5e,{...i,ref:t})})});uY.displayName=Pi;var[dY,h5e]=Jx(Pi),[fY,m5e]=Jx(Pi,{collapsible:!1}),p5e=te.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:i=()=>{},collapsible:s=!1,...o}=e,[l,c]=Ka({prop:r,defaultProp:n??"",onChange:i,caller:Pi});return a.jsx(dY,{scope:e.__scopeAccordion,value:te.useMemo(()=>l?[l]:[],[l]),onItemOpen:c,onItemClose:te.useCallback(()=>s&&c(""),[s,c]),children:a.jsx(fY,{scope:e.__scopeAccordion,collapsible:s,children:a.jsx(hY,{...o,ref:t})})})}),g5e=te.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:i=()=>{},...s}=e,[o,l]=Ka({prop:r,defaultProp:n??[],onChange:i,caller:Pi}),c=te.useCallback(u=>l((h=[])=>[...h,u]),[l]),d=te.useCallback(u=>l((h=[])=>h.filter(m=>m!==u)),[l]);return a.jsx(dY,{scope:e.__scopeAccordion,value:o,onItemOpen:c,onItemClose:d,children:a.jsx(fY,{scope:e.__scopeAccordion,collapsible:!0,children:a.jsx(hY,{...s,ref:t})})})}),[y5e,eb]=Jx(Pi),hY=te.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:i,orientation:s="vertical",...o}=e,l=te.useRef(null),c=wt(l,t),d=d5e(r),h=Yd(i)==="ltr",m=Ge(e.onKeyDown,g=>{var P;if(!u5e.includes(g.key))return;const b=g.target,v=d().filter(M=>{var C;return!((C=M.ref.current)!=null&&C.disabled)}),y=v.findIndex(M=>M.ref.current===b),x=v.length;if(y===-1)return;g.preventDefault();let w=y;const _=0,j=x-1,S=()=>{w=y+1,w>j&&(w=_)},k=()=>{w=y-1,w<_&&(w=j)};switch(g.key){case"Home":w=_;break;case"End":w=j;break;case"ArrowRight":s==="horizontal"&&(h?S():k());break;case"ArrowDown":s==="vertical"&&S();break;case"ArrowLeft":s==="horizontal"&&(h?k():S());break;case"ArrowUp":s==="vertical"&&k();break}const T=w%x;(P=v[T].ref.current)==null||P.focus()});return a.jsx(y5e,{scope:r,disabled:n,direction:i,orientation:s,children:a.jsx(ZP.Slot,{scope:r,children:a.jsx(st.div,{...o,"data-orientation":s,ref:c,onKeyDown:n?void 0:m})})})}),kv="AccordionItem",[v5e,eC]=Jx(kv),mY=te.forwardRef((e,t)=>
1269{const{__scopeAccordion:r,value:n,...i}=e,s=eb(kv,r),o=h5e(kv,r),l=JP(r),c=ja(),d=n&&o.value.includes(n)||!1,u=s.disabled||e.disabled;return a.jsx(v5e,{scope:r,open:d,disabled:u,triggerId:c,children:a.jsx(o5e,{"data-orientation":s.orientation,"data-state":bY(d),...l,...i,ref:t,disabled:u,open:d,onOpenChange:h=>{h?o.onItemOpen(n):o.onItemClose(n)}})})});mY.displayName=kv;var pY="AccordionHeader",gY=te.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,i=eb(Pi,r),s=eC(pY,r);return a.jsx(st.h3,{"data-orientation":i.orientation,"data-state":bY(s.open),"data-disabled":s.disabled?"":void 0,...n,ref:t})});gY.displayName=pY;var Tk="AccordionTrigger",yY=te.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,i=eb(Pi,r),s=eC(Tk,r),o=m5e(Tk,r),l=JP(r);return a.jsx(ZP.ItemSlot,{scope:r,children:a.jsx(l5e,{"aria-disabled":s.open&&!o.collapsible||void 0,"data-orientation":i.orientation,id:s.triggerId,...l,...n,ref:t})})});yY.displayName=Tk;var vY="AccordionContent",xY=te.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,i=eb(Pi,r),s=eC(vY,r),o=JP(r);return a.jsx(c5e,{role:"region","aria-labelledby":s.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}})});xY.displayName=vY;function bY(e){return e?"open":"closed"}var x5e=uY,b5e=mY,w5e=gY,wY=yY,jY=xY;const j5e=x5e,NY=A.forwardRef(({className:e,...t},r)=>a.jsx(b5e,{ref:r,className:Ie("border-b",e),...t}));NY.displayName="AccordionItem";const _Y=A.forwardRef(({className:e,children:t,...r},n)=>a.jsx(w5e,{className:"flex",children:a.jsxs(wY,{ref:n,className:Ie("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline text-left [&[data-state=open]>svg]:rotate-180",e),...r,children:[t,a.jsx(Zi,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})}));_Y.displayName=wY.displayName;const SY=A.forwardRef(({className:e,children:t,...r},n)=>a.jsx(jY,{ref:n,className:"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:a.jsx("div",{className:Ie("pb-4 pt-0",e),children:t})}));SY.displayName=jY.displayName;function N5e(){const e="https://www.vantagemarkets.com/open-live-account/?affid=MTEwODk3",t=[{icon:ln,title:"AI-Driven Strategy",description:"Our account is powered by a sophisticated, constantly learning AI developed for market adaptability and long-term growth."},{icon:Qr,title:"Proven Performance",description:"We provide full transparency with real-time access to our verified track record of consistent performance."},{icon:Za,title:"Hands-Free Investing",description:"Let our AI do the heavy lifting. Invest, track, and withdraw without needing any trading experience of your own."},{icon:Ar,title:"Secure & Regulated",description:"Your funds are held securely with our trusted, regulated partner broker, Vantage Markets, ensuring top-tier safety."}],r=[{step:"01",title:"Open an Account",description:"Click the 'Join Now' button to register with our partner broker, Vantage Markets. The process is quick and secure."},{step:"02",title:"Fund Your Account",description:"Deposit funds into your new brokerage account. A minimum investment of $500 is recommended to start."},{step:"03",title:"Connect to the PAMM",description:"Follow the simple instructions in your client portal to allocate your funds to the robot4trade PAMM account."},{step:"04",title:"Monitor Your Growth",description:"Sit back and watch your investment work for you. You can monitor the performance and your account balance 24/7."}],n=[{q:"What exactly is a PAMM account?",a:"A PAMM (Percentage Allocation Management Module) account is an investment solution that allows you to allocate your funds to be traded by a professional manager (in our case, our AI). Profits and losses are distributed proportionally among all investors."},{q:"What is the minimum investment?",a:"We recommend a minimum investment of $500 to ensure proper risk management and optimal performance allocation. However, you can start with less depending on the broker's terms."},{q:"What are the fees involved?",a:"We operate on a performance-based fee structure. We only earn a 'High-Water Mark' performance fee of 25% on new profits. This means we only get paid when your account grows, aligning our success with yours."},{q:"How do I withdraw my funds?",a:"You have full control over your funds. You can request a withdrawal from your investment at any time through your broker's client portal, subject to the standard processing times of the broker."},{q:"Is my capital safe?",a:"Your funds are held in a segregated account under your name with our regulated partner broker, Vantage Markets. We only have permission to trade on your behalf; we never have direct access to your capital."}];return a.jsx("div",{className:"bg-gray-900 text-white",children:a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 sm:py-12",children:[a.jsxs("div",{className:"text-center py-8 sm:py-16",children:[a.jsx(Oe,{className:"mb-4 bg-gradient-to-r from-cyan-500 to-blue-500 text-white border-none",children:"Exclusive Investment Opportunity"}),a.jsx("h1",{className:"text-4xl md:text-5xl font-extrabold bg-gradient-to-r from-cyan-400 to-blue-500 bg-clip-text text-transparent mb-4",children:"Automate Your Trading Success"}),a.jsx("p",{className:"max-w-3xl mx-auto text-base sm:text-lg text-gray-300 mb-8",children:"Join the robot4trade AI-Powered PAMM account and let our advanced trading technology work for you. Achieve hands-free, consistent growth managed by market experts."}),a.jsx(se,{asChild:!0,size:"lg",className:"bg-cyan-600 hover:bg-cyan-700 text-white px-6 py-3 text-base sm:px-8 sm:text-lg shadow-lg hover:shadow-cyan-500/30 transition-shadow",children:a.jsxs("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:["Join Our PAMM Now ",a.jsx(Br,{className:"h-5 w-5 ml-2"})]})})]}),a.jsxs("div",{className:"py-12 sm:py-16",children:[a.jsx("h2",{className:"text-3xl font-bold text-center mb-12",children:"Why Invest in Our PAMM?"}),a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8",children:t.map((i,s)=>a.jsxs(be,{className:"bg-gray-800 border-gray-700 text-center p-6 hover:border-cyan-500/50 hover:shadow-xl transition-all",children:[a.jsx("div",{className:"mb-4 inline-block p-3 bg-gray-700 rounded-full",children:a.jsx(i.icon,{className:"h-8 w-8 text-cyan-400"})}),a.jsx("h3",{className:"text-xl font-semibold mb-2",children:i.title}),a.jsx("p",{className:"text-gray-400 text-sm",children:i.description})]},s))})]}),a.jsxs("div",{className:"py-12 sm:py-16",children:[a.jsx("h2",{className:"text-3xl font-bold text-center mb-12",children:"Verified Performance & Transparency"}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8",children:[a.jsxs(be,{className:"bg-gray-800 border-gray-700 overflow-hidden",children:[a.jsx(Be,{children:a.jsxs(qe,{className:"flex items-center gap-2 text-lg sm:text-xl",children:[a.jsx(FS,{className:"text-purple-400"})," Monthly Analytics"]})}),a.jsx(Se,{className:"p-2",children:a.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/2e9d430e5_pamm2.jpg",alt:"PAMM Monthly Gain",className:"w-full h-auto rounded-md"})})]}),a.jsxs(be,{className:"bg-gray-800 border-gray-700 overflow-hidden",children:[a.jsx(Be,{children:a.jsxs(qe,{className:"flex items-center gap-2 text-lg sm:text-xl",children:[a.jsx(Qr,{className:"text-green-400"})," Growth & Statistics"]})}),a.jsx(Se,{className:"p-2",children:a.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/ea3d57f26_pamm1.jpg",alt:"PAMM Growth Chart",className:"w-full h-auto rounded-md"})})]})]}),a.jsx("p",{className:"text-center text-gray-500 mt-4 text-sm",children:"Live results from our managed account. Past performance is not an indicator of future results."})]}),a.jsxs("div",{className:"py-12 sm:py-16",children:[a.jsx("h2",{className:"text-3xl font-bold text-center mb-12",children:"Get Started in 4 Simple Steps"}),a.jsxs("div",{className:"relative",children:[a.jsx("div",{className:"hidden lg:block absolute top-1/2 left-0 w-full h-0.5 bg-gray-700 border-t-2 border-dashed border-gray-600 -translate-y-1/2"}),a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8 relative",children:r.map((i,s)=>a.jsxs("div",{className:"text-center p-4",children:[a.jsx("div",{className:"relative mb-4 inline-block",children:a.jsx("div",{className:"w-16 h-16 bg-gray-800 border-2 border-dashed border-cyan-500 rounded-full flex items-center justify-center",children:a.jsx("span",{className:"text-2xl font-bold text-cyan-400",children:i.step})})}),a.jsx("h3",{className:"text-xl font-semibold mb-2",children:i.title}),a.jsx("p",{className:"text-gray-400 text-sm",children:i.description})]},s))})]})]}),a.jsxs("div",{className:"py-12 sm:py-16 max-w-4xl mx-auto",children:[a.jsx("h2",{className:"text-3xl font-bold text-center mb-12",children:"Frequently Asked Questions"}),a.jsx(j5e,{type:"single",collapsible:!0,className:"w-full",children:n.map((i,s)=>a.jsxs(NY,{value:`item-${s}`,className:"bg-gray-800/50 border-gray-700/80 rounded-lg mb-3 px-4",children:[a.jsx(_Y,{className:"text-left font-semibold hover:no-underline text-white text-base",children:i.q}),a.jsx(SY,{className:"text-gray-300 text-sm",children:i.a})]},s))})]}),a.jsxs("div",{className:"bg-gradient-to-r from-cyan-900/50 to-blue-900/50 rounded-lg p-8 sm:p-10 my-12 sm:my-16 text-center",children:[a.jsx("h2",{className:"text-2xl sm:text-3xl font-bold mb-3",children:"Ready to Elevate Your Investment Portfolio?"}),a.jsx("p",{className:"text-gray-300 mb-6 max-w-2xl mx-auto",children:"Don't miss the opportunity to benefit from professional, AI-driven trading. Secure your spot in our PAMM account today."}),a.jsx(se,{asChild:!0,size:"lg",className:"bg-green-600 hover:bg-green-700 text-white px-8 py-3 text-lg sm:text-xl shadow-lg hover:shadow-green-500/30 transition-shadow",children:a.jsxs("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:["Start Investing Today ",a.jsx(ss,{className:"h-5 w-5 ml-2"})]})}),a.jsxs("p",{className:"text-sm text-gray-400 mt-6",children:["For personal assistance, contact our support manager on Telegram: ",a.jsx("a",{href:"https://t.me/slaizvar",target:"_blank",rel:"noopener noreferrer",className:"text-cyan-400 hover:underline font-semibold",children:"@robot4trade_manager"})]})]}),a.jsxs("div",{className:"text-center p-6 border-t border-gray-800",children:[a.jsxs("div",{className:"flex items-center justify-center text-amber-500 mb-2 gap-2",children:[a.jsx(Ji,{className:"h-5 w-5"}),a.jsx("h3",{className:"font-semibold",children:"Risk Disclaimer"})]}),a.jsx("p",{className:"text-xs text-gray-500 max-w-4xl mx-auto",children:"Trading foreign exchange on margin carries a high level of risk and may not be suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. Past performance is not indicative of future results."})]})]})})}function _5e(){const[e,t]=A.useState([]),[r,n]=A.useState([]),[i,s]=A.useState({name:"",strategy:"momentum",settings:{risk_level:"medium",max_trade_size:1e3,symbols:[]}});te.useEffect(()=>{o()},[]);const o=async()=>{const[u,h]=await Promise.all([je.Robot.list(),je.Strategy.list()]);t(u),n(h)},l=async u=>{u.preventDefault(),await je.Robot.create({...i,status:"stopped",performance:0}),s({name:"",strategy:"momentum",settings:{risk_level:"medium",max_trade_size:1e3,symbols:[]}}),o()},c=async(u,h)=>{await je.Robot.update(u.id,{...u,status:h}),o()},d=[{id:"premium1",name:"MA Pro Trader",description:"Fully automated trading system based on a custom Moving Average algorithm with smart money management.",price:360,url:"https://www.mql5.com/en/market/product/113326",image:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/3ae9e4_adam-ftmo-mt5-logo-200x200-7889.png",stars:4.8,reviews:42,features:["Custom Moving Average","Smart Money Management","Automated System","MT5 Compatible"]},{id:"premium2",name:"Rosaline EA",description:"Advanced trading algorithm employing multiple independent entry signals for identifying trading opportunities and risk management.",price:249,url:"https://www.mql5.com/en/market/product/102261",image:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/a176ad_gold-robot4trade-logo-200x200-9457.png",stars:4.7,reviews:37,features:["Multi-Signal Entry","Professional Risk Management","Independent Signals","MT5 Compatible"]},{id:"premium3",name:"Grid EA Pro MT5",description:"Professional grid trading expert advisor using a grid of orders to trade, with trend detection and adaptive positioning.",price:399,url:"https://www.mql5.com/en/market/product/94887",image:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/793939_ftmo-protector-7-logo-200x200-7004.png",stars:4.9,reviews:56,features:["Grid Trading System","Trend Detection","Adaptive Positioning","MT5 Expert Advisor"]},{id:"premium4",name:"Poutine Grid EA",description:"Specialized grid trading expert advisor for Metatrader 5 with unique entry conditions and sophisticated management.",price:499,url:"https://www.mql5.com/en/market/product/135493",image:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/63e2ff_ftmo-sniper-7-logo-200x200-3241.png",stars:4.6,reviews:28,features:["Specialized Grid System","Unique Entry Conditions","Sophisticated Management","For Metatrader 5"]}];return a.jsxs("div",{className:"space-y-6 sm:space-y-8 p-2 sm:p-0",children:[a.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4",children:[a.jsx("h1",{className:"text-xl sm:text-2xl font-bold",children:"Trading Robots"}),a.jsx(se,{asChild:!0,className:"w-full sm:w-auto",children:a.jsxs(pt,{to:Ve("StrategyBuilder"),children:[a.jsx(Kh,{className:"h-4 w-4 mr-2"})," Create Strategy"]}
1269)})]}),a.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 sm:gap-6",children:d.map(u=>a.jsx(be,{className:"bg-gradient-to-r from-gray-800 to-indigo-900 border border-indigo-500/20 shadow-lg overflow-hidden hover:shadow-indigo-900/20 hover:border-indigo-400/40 transition-all",children:a.jsxs("div",{className:"flex flex-col",children:[a.jsxs("div",{className:"relative h-32 sm:h-40",children:[a.jsx("img",{src:u.image,alt:u.name,className:"w-full h-full object-contain p-2"}),a.jsxs(Oe,{className:"absolute top-2 right-2 bg-amber-600 text-xs sm:text-sm",children:["$",u.price]})]}),a.jsxs("div",{className:"p-3 sm:p-4 flex flex-col flex-1",children:[a.jsxs("h2",{className:"text-lg sm:text-xl font-bold text-white flex items-center gap-2 mb-2",children:[a.jsx("span",{className:"truncate",children:u.name}),a.jsx(Yh,{className:"h-4 w-4 sm:h-5 sm:w-5 text-cyan-400 flex-shrink-0"})]}),a.jsxs("div",{className:"flex items-center mb-3",children:[[1,2,3,4,5].map(h=>a.jsx(Kr,{className:`h-3 w-3 sm:h-4 sm:w-4 ${h<=Math.floor(u.stars)?"text-yellow-400 fill-yellow-400":"text-gray-500"}`},h)),a.jsxs("span",{className:"text-xs sm:text-sm text-gray-300 ml-2",children:["(",u.reviews," reviews)"]})]}),a.jsx("p",{className:"text-gray-300 text-xs sm:text-sm mb-4 line-clamp-2",children:u.description}),a.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-1 sm:gap-2 mb-4",children:u.features.map((h,m)=>a.jsxs("div",{className:"flex items-center text-xs text-gray-300",children:[a.jsx(ss,{className:"h-3 w-3 text-cyan-400 mr-1 flex-shrink-0"}),a.jsx("span",{className:"truncate",children:h})]},m))}),a.jsxs(se,{className:"mt-auto w-full bg-gradient-to-r from-amber-600 to-amber-700 hover:from-amber-500 hover:to-amber-600 text-sm",onClick:()=>window.open(u.url,"_blank"),children:[a.jsx(Yh,{className:"h-4 w-4 mr-2"}),a.jsx("span",{children:"Buy Now"}),a.jsx(Br,{className:"h-3 w-3 ml-2"})]})]})]})},u.id))}),a.jsxs("h2",{className:"text-lg sm:text-xl font-medium flex items-center gap-2 border-b border-gray-700 pb-2",children:[a.jsx(er,{className:"h-4 w-4 sm:h-5 sm:w-5 text-amber-400"}),"Your Custom Robots"]}),a.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-3 gap-4 sm:gap-6",children:[a.jsxs(be,{className:"p-4 sm:p-6 xl:col-span-2",children:[a.jsx("h2",{className:"text-base sm:text-lg font-semibold mb-4",children:"Active Robots"}),a.jsx("div",{className:"space-y-4",children:e.length>0?e.map(u=>a.jsxs(be,{className:"p-3 sm:p-4",children:[a.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[a.jsxs("div",{className:"flex-1",children:[a.jsx("div",{className:"font-medium text-base sm:text-lg",children:u.name}),a.jsxs("div",{className:"text-sm text-gray-500",children:[u.strategy," strategy"]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[u.status==="active"?a.jsx(se,{variant:"outline",size:"icon",onClick:()=>c(u,"paused"),className:"h-8 w-8 sm:h-10 sm:w-10",children:a.jsx(TJ,{className:"h-3 w-3 sm:h-4 sm:w-4"})}):a.jsx(se,{variant:"outline",size:"icon",onClick:()=>c(u,"active"),className:"h-8 w-8 sm:h-10 sm:w-10",children:a.jsx(qk,{className:"h-3 w-3 sm:h-4 sm:w-4"})}),a.jsx(se,{variant:"outline",size:"icon",onClick:()=>c(u,"stopped"),className:"h-8 w-8 sm:h-10 sm:w-10",children:a.jsx(DJ,{className:"h-3 w-3 sm:h-4 sm:w-4"})}),a.jsx(se,{variant:"outline",size:"icon",className:"h-8 w-8 sm:h-10 sm:w-10",children:a.jsx(ji,{className:"h-3 w-3 sm:h-4 sm:w-4"})})]})]}),a.jsxs("div",{className:"mt-4 grid grid-cols-1 sm:grid-cols-3 gap-4",children:[a.jsxs("div",{children:[a.jsx("div",{className:"text-sm text-gray-500",children:"Status"}),a.jsx("div",{className:Ie("font-medium text-sm sm:text-base",u.status==="active"?"text-green-600":u.status==="paused"?"text-yellow-600":"text-red-600"),children:u.status})]}),a.jsxs("div",{children:[a.jsx("div",{className:"text-sm text-gray-500",children:"Performance"}),a.jsxs("div",{className:Ie("font-medium text-sm sm:text-base",u.performance>=0?"text-green-600":"text-red-600"),children:[u.performance,"%"]})]}),a.jsxs("div",{children:[a.jsx("div",{className:"text-sm text-gray-500",children:"Risk Level"}),a.jsx("div",{className:"font-medium text-sm sm:text-base",children:u.settings.risk_level})]})]})]},u.id)):a.jsxs("div",{className:"text-center py-6 sm:py-8 border border-dashed border-gray-700 rounded-lg",children:[a.jsx(Qr,{className:"h-10 w-10 sm:h-12 sm:w-12 text-gray-500 mx-auto mb-3"}),a.jsx("h3",{className:"text-base sm:text-lg font-medium text-gray-400 mb-1",children:"No Active Robots Yet"}),a.jsx("p",{className:"text-sm text-gray-500 mb-4",children:"Create your first robot or try one of our premium EAs"}),a.jsx(se,{asChild:!0,className:"w-full sm:w-auto",children:a.jsxs(pt,{to:Ve("MqlGenerator"),children:[a.jsx(er,{className:"h-4 w-4 mr-2"})," Create With AI"]})})]})})]}),a.jsxs(be,{className:"p-4 sm:p-6",children:[a.jsx("h2",{className:"text-base sm:text-lg font-semibold mb-4",children:"New Robot"}),a.jsxs("form",{onSubmit:l,className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium mb-1",children:"Name"}),a.jsx(Je,{value:i.name,onChange:u=>s({...i,name:u.target.value}),placeholder:"Robot name",required:!0,className:"text-sm"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium mb-1",children:"Strategy"}),r.length>0?a.jsxs(qt,{value:i.strategy,onValueChange:u=>s({...i,strategy:u}),children:[a.jsx($t,{className:"text-sm",children:a.jsx(zt,{})}),a.jsxs(Ft,{children:[a.jsx(Ce,{value:"momentum",children:"Momentum (Built-in)"}
1269),a.jsx(Ce,{value:"reversal",children:"Reversal (Built-in)"}),a.jsx(Ce,{value:"breakout",children:"Breakout (Built-in)"}),a.jsx(Ce,{value:"mean_reversion",children:"Mean Reversion (Built-in)"}),r.map(u=>a.jsxs(Ce,{value:u.id,children:[u.name," (Custom)"]},u.id))]})]}):a.jsxs("div",{className:"space-y-2",children:[a.jsxs(qt,{value:i.strategy,onValueChange:u=>s({...i,strategy:u}),children:[a.jsx($t,{className:"text-sm",children:a.jsx(zt,{})}),a.jsxs(Ft,{children:[a.jsx(Ce,{value:"momentum",children:"Momentum"}),a.jsx(Ce,{value:"reversal",children:"Reversal"}),a.jsx(Ce,{value:"breakout",children:"Breakout"}),a.jsx(Ce,{value:"mean_reversion",children:"Mean Reversion"})]})]}),a.jsx(se,{variant:"outline",size:"sm",asChild:!0,className:"w-full text-xs",children:a.jsx(pt,{to:Ve("StrategyBuilder"),children:"Create Custom Strategy"})})]})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium mb-1",children:"Risk Level"}),a.jsxs(qt,{value:i.settings.risk_level,onValueChange:u=>s({...i,settings:{...i.settings,risk_level:u}}),children:[a.jsx($t,{className:"text-sm",children:a.jsx(zt,{})}),a.jsxs(Ft,{children:[a.jsx(Ce,{value:"low",children:"Low"}),a.jsx(Ce,{value:"medium",children:"Medium"}),a.jsx(Ce,{value:"high",children:"High"})]})]})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium mb-1",children:"Max Trade Size"}),a.jsx(Je,{type:"number",value:i.settings.max_trade_size,onChange:u=>s({...i,settings:{...i.settings,max_trade_size:parseFloat(u.target.value)}}),placeholder:"Maximum trade size",required:!0,className:"text-sm"})]}),a.jsx(se,{type:"submit",className:"w-full text-sm",children:"Create Robot"})]})]})]}),a.jsx(be,{className:"p-4 sm:p-6 bg-gradient-to-r from-gray-800 to-indigo-900 border border-indigo-500/20 shadow-lg",children:a.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 items-center",children:[a.jsxs("div",{className:"flex-1 text-center sm:text-left",children:[a.jsx("h2",{className:"text-base sm:text-lg font-bold mb-2 text-white",children:"Advanced Trading with robot4trade"}),a.jsx("p",{className:"text-sm sm:text-base text-gray-300 mb-4",children:"Take your automated trading to the next level with professional tools and algorithms."}),a.jsx("a",{href:"https://www.robot4trade.com/",target:"_blank",rel:"noopener noreferrer",children:a.jsxs(se,{variant:"outline",className:"gap-2 text-cyan-400 border-cyan-400/30 hover:bg-cyan-950/20 hover:text-cyan-300 w-full sm:w-auto text-sm",children:["Visit robot4trade ",a.jsx(Br,{className:"h-4 w-4"})]})})]}),a.jsx("div",{className:"flex-shrink-0",children:a.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/cbd7c9_3D-1175.png",alt:"robot4trade Logo",className:"h-16 w-16 sm:h-20 sm:w-20 rounded-md border border-cyan-500/20 p-2 bg-gray-900/50"})})]})})]})}const uB=e=>{if(e==="N/A")return 0;const t=parseFloat(e.replace(/[^0-9.]/g,""));return e.includes("T")?t*1e6:e.includes("B")?t*1e3:(e.includes("M"),t)};function S5e({data:e}){const[t,r]=A.useState("ticker"),[n,i]=A.useState("asc"),s=u=>{t===u?i(n==="asc"?"desc":"asc"):(r(u),i("desc"))},o=A.useMemo(()=>[...e].sort((u,h)=>{let m=u[t],g=h[t];return m==="N/A"&&(m=n==="asc"?1/0:-1/0),g==="N/A"&&(g=n==="asc"?1/0:-1/0),typeof m=="string"&&m.includes("%")&&(m=parseFloat(m.replace("%","")),g=parseFloat(g.replace("%",""))),typeof m=="string"&&(m.includes("B")||m.includes("M"))&&(m=uB(m),g=uB(g)),n==="asc"?m>g?1:-1:m<g?1:-1}),[e,t,n]),l=({column:u})=>t!==u?a.jsx(PB,{className:"h-3 w-3 text-gray-500"}):n==="asc"?a.jsx(Yy,{className:"h-3 w-3 text-cyan-400"}):a.jsx(Ky,{className:"h-3 w-3 text-cyan-400"}),c=(u,h)=>{if(u==="N/A")return"text-gray-500";const m=parseFloat(u.toString().replace(/[^0-9.-]/g,""));switch(h){case"revenueGrowth":case"ruleOf40":return m>40?"text-green-400":m>20?"text-yellow-400":"text-gray-300";case"fcfYield":return m>5?"text-green-400":m>2?"text-yellow-400":"text-gray-300";case"distanceFrom200DMA":return m>10?"text-green-400":m<-10?"text-red-400":"text-gray-300";case"grossMargin":case"netMargin":return m>50?"text-green-400":m>30?"text-yellow-400":"text-gray-300";default:return"text-gray-300"}},d=({stock:u})=>a.jsxs("div",{className:"bg-gray-900/60 rounded-lg p-3 border border-gray-700 space-y-2",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("span",{className:"font-bold text-white text-base",children:u.ticker}),a.jsxs("span",{className:"text-gray-300 font-medium",children:["$",u.price]})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-1 text-xs",children:[a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-gray-500",children:"Market Cap"}),a.jsx("span",{className:"text-gray-300",children:u.marketCap})]}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-gray-500",children:"Rev Growth"}),a.jsx("span",{className:c(u.revenueGrowth,"revenueGrowth"),children:u.revenueGrowth})]}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-gray-500",children:"Rule of 40"}),a.jsx("span",{className:c(u.ruleOf40,"ruleOf40"),children:u.ruleOf40})]}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-gray-500",children:"FCF Yield"}),a.jsx("span",{className:c(u.fcfYield,"fcfYield"),children:u.fcfYield})]}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-gray-500",children:"200 DMA"}),a.jsx("span",{className:c(u.distanceFrom200DMA,"distanceFrom200DMA"),children:u.distanceFrom200DMA})]}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-gray-500",children:"P/E"}),a.jsx("span",{className:"text-gray-300",children:u.peRatio})]}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-gray-500",children:"Gross Margin"}),a.jsx("span",{className:c(u.grossMargin,"grossMargin"),children:u.grossMargin})]}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-gray-500",children:"Net Margin"}),a.jsx("span",{className:c(u.netMargin,"netMargin"),children:u.netMargin})]})]})]});return a.jsxs(be,{className:"bg-gray-800 border-gray-700",children:[a.jsx(Be,{children:a.jsxs(qe,{className:"text-white flex items-center justify-between",children:[a.jsxs("span",{children:["Screening Results (",e.length," stocks)"]}),a.jsx(Oe,{className:"bg-cyan-600",children:"Live Data"})]})}),a.jsxs(Se,{className:"p-0",children:[a.jsx("div",{className:"sm:hidden p-3 space-y-3",children:o.map(u=>a.jsx(d,{stock:u},u.ticker))}),a.jsx("div",{className:"hidden sm:block overflow-x-auto",children:a.jsxs("table",{className:"w-full text-sm",children:[a.jsx("thead",{className:"bg-gray-900 border-b border-gray-700",children:a.jsx("tr",{children:[{key:"ticker",label:"Ticker"},{key:"price",label:"Price"},{key:"marketCap",label:"Market Cap"},{key:"revenueGrowth",label:"Rev Growth"},{key:"ruleOf40",label:"Rule of 40"},{key:"evGrossProfit",label:"EV/GP"},{key:"pegRatio",label:"PEG"},{key:"fcfYield",label:"FCF Yield"},{key:"distanceFrom200DMA",label:"200 DMA"},{key:"peRatio",label:"P/E"},{key:"grossMargin",label:"Gross Margin"},{key:"netMargin",label:"Net Margin"}].map(u=>a.jsx("th",{onClick:()=>s(u.key),className:"px-4 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wider cursor-pointer hover:text-cyan-400 transition-colors",children:a.jsxs("div",{className:"flex items-center gap-1",children:[u.label,a.jsx(l,{column:u.key})]})},u.key))})}),a.jsx("tbody",{className:"divide-y divide-gray-700",children:o.map((u,h)=>a.jsxs("tr",{className:"hover:bg-gray-700/50 transition-colors",children:[a.jsx("td",{className:"px-4 py-3 font-bold text-white",children:u.ticker}),a.jsxs("td",{className:"px-4 py-3 text-gray-300",children:["$",u.price]}),a.jsx("td",{className:"px-4 py-3 text-gray-300",children:u.marketCap}),a.jsxs("td",{className:`px-4 py-3 font-medium ${c(u.revenueGrowth,"revenueGrowth")}`,children:[u.revenueGrowth,u.revenueGrowth!=="N/A"&&parseFloat(u.revenueGrowth)>0&&a.jsx(Qr,{className:"inline h-3 w-3 ml-1"})]}),a.jsx("td",{className:`px-4 py-3 font-medium ${c(u.ruleOf40,"ruleOf40")}`,children:u.ruleOf40}),a.jsx("td",{className:"px-4 py-3 text-gray-300",children:u.evGrossProfit}),a.jsx("td",{className:"px-4 py-3 text-gray-300",children:u.pegRatio}),a.jsx("td",{className:`px-4 py-3 font-medium ${c(u.fcfYield,"fcfYield")}`,children:u.fcfYield}),a.jsx("td",{className:`px-4 py-3 font-medium ${c(u.distanceFrom200DMA,"distanceFrom200DMA")}`,children:u.distanceFrom200DMA}),a.jsx("td",{className:"px-4 py-3 text-gray-300",children:u.peRatio}),a.jsx("td",{className:`px-4 py-3 ${c(u.grossMargin,"grossMargin")}`,children:u.grossMargin}),a.jsx("td",{className:`px-4 py-3 ${c(u.netMargin,"netMargin")}`,children:u.netMargin})]},u.ticker))})]})})]})]})}function A5e(e){const{ticker:t,quote:r,metrics:n,ratios:i,growth:s,income:o,cashflow:l}=e,c=V=>V==null||isNaN(V)?null:parseFloat(V),d=(V,z=2)=>V===null?"N/A":V.toFixed(z),u=(V,z=1)=>V===null?"N/A":`${V.toFixed(z)}%`,h=V=>V===null?"N/A":V>
1269=1e12?`$${(V/1e12).toFixed(2)}T`:V>=1e9?`$${(V/1e9).toFixed(2)}B`:V>=1e6?`$${(V/1e6).toFixed(2)}M`:`$${V.toFixed(2)}`,m=c(r.price),g=c(r.marketCap);c(r.sharesOutstanding);const b=c(s.revenueGrowth)?c(s.revenueGrowth)*100:null,v=c(n.freeCashFlowPerShare)&&c(r.eps)?c(n.freeCashFlowPerShare)/m*100:null,y=b!==null&&v!==null?b+v:null,x=c(n.enterpriseValue),w=c(o.grossProfit),_=x&&w?x/w:null,j=c(i.priceEarningsRatio),S=j&&b&&b>0?j/b:null,k=c(l.freeCashFlow),T=k&&g?k/g*100:null,P=c(r.yearHigh),M=c(r.yearLow),C=P&&M?(P+M)/2:null,O=C&&m?(m-C)/C*100:null,D=c(o.revenue),L=w&&D?w/D*100:null,F=c(o.netIncome),U=F&&D?F/D*100:null,G=c(i.priceToSalesRatio),W=c(i.priceToBookRatio),q=c(i.debtEquityRatio);return{ticker:t,price:d(m),marketCap:h(g),revenueGrowth:u(b),ruleOf40:u(y),evGrossProfit:d(_),pegRatio:d(S),fcfYield:u(T),distanceFrom200DMA:u(O),peRatio:d(j),grossMargin:u(L),netMargin:u(U),priceToSales:d(G),priceToBook:d(W),debtToEquity:d(q),_revenueGrowth:b,_ruleOf40:y,_fcfYield:T,_distanceFrom200DMA:O}}const k5e="SQ,PYPL,V,MA,ADYEN,SHOP,AFRM,SOFI,UPST,COIN,NU";function E5e(){const[e,t]=A.useState(k5e),[r,n]=A.useState(!1),[i,s]=A.useState([]),[o,l]=A.useState(""),c=async()=>{n(!0),l(""),s([]);const u=e.split(",").map(h=>h.trim().toUpperCase()).filter(h=>h);try{const m=(await vn.integrations.Core.InvokeLLM({prompt:`Get comprehensive financial data for these stocks: ${u.join(", ")} 1270 1271For each stock, provide: 1272- Current price 1273- Market cap 1274- Revenue growth (YoY %) 1275- Free cash flow margin 1276- Gross profit 1277- Enterprise value 1278- P/E ratio 1279- Gross margin % 1280- Net margin % 1281- Free cash flow 1282- Year high and low prices 1283- Revenue and net income 1284 1285Return data in this exact JSON format: 1286{ 1287 "stocks": [ 1288 { 1289 "ticker": "SQ", 1290 "price": 75.50, 1291 "marketCap": 45000000000, 1292 "revenueGrowth": 15.5, 1293 "fcfMargin": 8.2, 1294 "grossProfit": 5000000000, 1295 "enterpriseValue": 50000000000, 1296 "peRatio": 45.5, 1297 "grossMargin": 35.5, 1298 "netMargin": 5.2, 1299 "freeCashFlow": 1500000000, 1300 "yearHigh": 95.50, 1301 "yearLow": 55.20, 1302 "revenue": 15000000000, 1303 "netIncome": 780000000 1304 } 1305 ] 1306}`,add_context_from_internet:!0,response_json_schema:{type:"object",properties:{stocks:{type:"array",items:{type:"object",properties:{ticker:{type:"string"},price:{type:"number"},marketCap:{type:"number"},revenueGrowth:{type:"number"},fcfMargin:{type:"number"},grossProfit:{type:"number"},enterpriseValue:{type:"number"},peRatio:{type:"number"},grossMargin:{type:"number"},netMargin:{type:"number"},freeCashFlow:{type:"number"},yearHigh:{type:"number"},yearLow:{type:"number"},revenue:{type:"number"},netIncome:{type:"number"}}}}}}})).stocks.map(g=>A5e({ticker:g.ticker,quote:{price:g.price,marketCap:g.marketCap,yearHigh:g.yearHigh,yearLow:g.yearLow},metrics:{enterpriseValue:g.enterpriseValue,freeCashFlowPerShare:g.freeCashFlow/(g.marketCap/g.price)},ratios:{priceEarningsRatio:g.peRatio},growth:{revenueGrowth:g.revenueGrowth/100},income:{grossProfit:g.grossProfit,revenue:g.revenue,netIncome:g.netIncome},cashflow:{freeCashFlow:g.freeCashFlow}}));s(m),m.length===0&&l("No data retrieved. Please try again.")}catch(h){l(`Error: ${h.message}`)}n(!1)},d=()=>{if(i.length===0)return;const u=["Ticker","Price","Market Cap","Revenue Growth","Rule of 40","EV/Gross Profit","PEG Ratio","FCF Yield","Distance from 200 DMA","P/E Ratio","Gross Margin","Net Margin"],h=i.map(y=>[y.ticker,y.price,y.marketCap,y.revenueGrowth,y.ruleOf40,y.evGrossProfit,y.pegRatio,y.fcfYield,y.distanceFrom200DMA,y.peRatio,y.grossMargin,y.netMargin]),m=[u.join(","),...h.map(y=>y.map(x=>`"${x}"`).join(","))].join(` 1307`),g=new Blob([m],{type:"text/csv"}),b=URL.createObjectURL(g),v=document.createElement("a");v.href=b,v.download=`fintech-screener-${new Date().toISOString().split("T")[0]}.csv`,v.click()};return a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsxs("h1",{className:"text-3xl font-bold text-white flex items-center gap-2",children:[a.jsx(Ev,{className:"h-8 w-8 text-green-400"}),"Fintech Stock Screener"]}),a.jsx("p",{className:"text-gray-400 mt-1",children:"Analyze payments & fintech stocks with custom metrics"})]}),a.jsx(Oe,{className:"bg-gradient-to-r from-green-600 to-emerald-600",children:"PRO TOOL"})]}),a.jsxs(be,{className:"bg-gray-800 border-gray-700",children:[a.jsx(Be,{children:a.jsx(qe,{className:"text-white text-lg",children:"Stock Selection"})}),a.jsxs(Se,{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx("label",{className:"text-sm text-gray-300 mb-2 block",children:"Ticker Symbols (comma-separated)"}),a.jsx(Je,{placeholder:"SQ,PYPL,V,MA,SHOP,AFRM,SOFI,COIN...",value:e,onCh
1307ange:u=>t(u.target.value),className:"bg-gray-900 border-gray-700 text-gray-300"}),a.jsx("p",{className:"text-xs text-gray-500 mt-2",children:"Default: Top fintech/payments stocks (Square, PayPal, Visa, Mastercard, etc.)"})]}),a.jsxs("div",{className:"flex gap-3",children:[a.jsx(se,{onClick:c,disabled:r,className:"bg-gradient-to-r from-green-600 to-emerald-600 hover:from-green-700 hover:to-emerald-700",children:r?a.jsxs(a.Fragment,{children:[a.jsx(kt,{className:"h-4 w-4 mr-2 animate-spin"}),"Fetching Data..."]}):a.jsxs(a.Fragment,{children:[a.jsx(Qr,{className:"h-4 w-4 mr-2"}),"Run Screener"]})}),i.length>0&&a.jsxs(a.Fragment,{children:[a.jsxs(se,{onClick:d,variant:"outline",className:"border-gray-600",children:[a.jsx(Gn,{className:"h-4 w-4 mr-2"}),"Export CSV"]}),a.jsxs(se,{onClick:c,variant:"outline",className:"border-gray-600",children:[a.jsx(Xr,{className:"h-4 w-4 mr-2"}),"Refresh"]})]})]}),o&&a.jsxs(HP,{className:"bg-red-900/20 border-red-700",children:[a.jsx(Lt,{className:"h-4 w-4"}),a.jsx(WP,{className:"text-red-400",children:o})]})]})]}),i.length>0&&a.jsx(S5e,{data:i}),a.jsxs(be,{className:"bg-gradient-to-br from-gray-800 to-gray-900 border-cyan-500/20",children:[a.jsx(Be,{children:a.jsx(qe,{className:"text-white text-xl",children:"How It Works: AI-Powered Stock Analysis"})}),a.jsxs(Se,{className:"text-gray-300 space-y-4",children:[a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"bg-cyan-600 text-white rounded-full w-8 h-8 flex items-center justify-center font-bold",children:"1"}),a.jsx("h3",{className:"font-semibold text-white",children:"Enter Stock Tickers"})]}),a.jsx("p",{className:"text-sm text-gray-400",children:"Input fintech and payment stocks you want to analyze (e.g., SQ, PYPL, V, MA). Supports all major payment processors and financial technology companies."})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"bg-green-600 text-white rounded-full w-8 h-8 flex items-center justify-center font-bold",children:"2"}),a.jsx("h3",{className:"font-semibold text-white",children:"AI Fetches Real-Time Data"})]}),a.jsx("p",{className:"text-sm text-gray-400",children:"Our AI searches the web for current financial metrics including market cap, revenue growth, margins, cash flow, and valuation ratios from reliable sources."})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"bg-purple-600 text-white rounded-full w-8 h-8 flex items-center justify-center font-bold",children:"3"}),a.jsx("h3",{className:"font-semibold text-white",children:"Get Analyzed Results"})]}),a.jsx("p",{className:"text-sm text-gray-400",children:"View comprehensive analysis with custom metrics like Rule of 40, EV/Gross Profit, PEG ratio, and more. Sort and compare stocks instantly."})]})]}),a.jsxs("div",{className:"bg-gray-900/50 rounded-lg p-4 border border-cyan-500/20",children:[a.jsx("h4",{className:"text-white font-semibold mb-2",children:"Why Use This Screener?"}),a.jsxs("ul",{className:"text-sm text-gray-400 space-y-1",children:[a.jsxs("li",{children:["â ",a.jsx("strong",{children:"No API Key Required"})," - Instant access to real-time financial data"]}),a.jsxs("li",{children:["â ",a.jsx("strong",{children:"Custom Fintech Metrics"})," - Rule of 40, FCF Yield, EV/Gross Profit designed for growth stocks"]}),a.jsxs("li",{children:["â ",a.jsx("strong",{children:"AI-Powered Analysis"})," - Leverages web search for the most current data"]}),a.jsxs("li",{children:["â ",a.jsx("strong",{children:"Export to CSV"})," - Download your analysis for deeper research"]})]})]})]})]}),a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[a.jsxs(be,{className:"bg-gray-800 border-gray-700",children:[a.jsx(Be,{children:a.jsx(qe,{className:"text-white text-sm",children:"Metrics Calculated"})}),a.jsxs(Se,{className:"text-gray-300 text-sm space-y-1",children:[a.jsx("p",{children:"â Revenue Growth (YoY)"}),a.jsx("p",{children:"â Rule of 40 (Growth + FCF Margin)"}),a.jsx("p",{children:"â EV/Gross Profit"}),a.jsx("p",{children:"â PEG Ratio"}),a.jsx("p",{children:"â FCF Yield"}),a.jsx("p",{children:"â Distance from 200 DMA"}),a.jsx("p",{children:"â Gross & Net Margins"}),a.jsx("p",{children:"â P/E, P/S, P/B Ratios"})]})]}),a.jsxs(be,{className:"bg-gray-800 border-gray-700",children:[a.jsx(Be,{children:a.jsx(qe,{className:"text-white text-sm",children:"Data Provider"})}),a.jsxs(Se,{className:"text-gray-300 text-sm space-y-2",children:[a.jsx("p",{children:a.jsx("strong",{children:"AI-Powered Search"})}),a.jsx("p",{children:"Fetches real-time financial data using AI with internet search capabilities."}),a.jsx("p",{className:"text-gray-400",children:"No API key required - data pulled directly from the web."})]})]})]}),a.jsxs(be,{className:"bg-gray-800 border-gray-700",children:[a.jsx(Be,{children:a.jsx(qe,{className:"text-white text-xl",children:"Frequently Asked Questions"})}),a.jsx(Se,{className:"space-y-4",children:a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"text-white font-semibold mb-1",children:"What is the Rule of 40?"}),a.jsx("p",{className:"text-gray-400 text-sm",children:"The Rule of 40 is a key metric for SaaS and fintech companies. It states that a company's revenue growth rate plus free cash flow margin should exceed 40%. This helps identify companies balancing growth with profitability."})]}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-white font-semibold mb-1",children:"How does the AI fetch stock data?"}),a.jsx("p",{className:"text-gray-400 text-sm",children:"Our AI uses advanced web search capabilities to gather real-time financial data from multiple reliable sources including financial news sites, stock market databases, and company filings. No API key needed."})]}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-white font-semibold mb-1",children:"Which fintech stocks should I screen?"}),a.jsx("p",{className:"text-gray-400 text-sm",children:"Popular fintech stocks include payment processors (SQ, PYPL, V, MA), buy-now-pay-later
1307(AFRM, SOFI), crypto exchanges (COIN), e-commerce platforms (SHOP), and emerging fintechs (NU, UPST). The screener works with any ticker."})]}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-white font-semibold mb-1",children:"What is EV/Gross Profit ratio?"}),a.jsx("p",{className:"text-gray-400 text-sm",children:"Enterprise Value to Gross Profit ratio measures company valuation relative to gross profit. Lower ratios may indicate undervaluation. It's particularly useful for evaluating fintech companies with different business models."})]}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-white font-semibold mb-1",children:"Can I export the screening results?"}),a.jsx("p",{className:"text-gray-400 text-sm",children:'Yes! Click the "Export CSV" button after running a screen to download all data including prices, metrics, ratios, and margins. Perfect for further analysis in Excel or your preferred tools.'})]}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-white font-semibold mb-1",children:"How often is the data updated?"}),a.jsx("p",{className:"text-gray-400 text-sm",children:'Data is fetched in real-time when you run a screen. Click "Refresh" to get the latest prices and metrics. For best results, we recommend screening during market hours for the most current information.'})]})]})})]})]})}const T5e=[{value:"moving_average",label:"Moving Average"},{value:"rsi",label:"RSI"},{value:"macd",label:"MACD"},{value:"bollinger_bands",label:"Bollinger Bands"},{value:"volume",label:"Volume"},{value:"price",label:"Price"},{value:"stochastic",label:"Stochastic"},{value:"atr",label:"ATR"}],P5e=[{value:"crosses_above",label:"Crosses Above"},{value:"crosses_below",label:"Crosses Below"},{value:"greater_than",label:"Greater Than"},{value:"less_than",label:"Less Than"},{value:"equals",label:"Equals"},{value:"between",label:"Between"}],C5e=[{value:"buy",label:"Buy"},{value:"sell",label:"Sell"},{value:"exit",label:"Exit Position"}];function O5e({condition:e,onChange:t,onDelete:r,index:n}){const i=(s,o)=>{t(n,{...e,[s]:o})};return a.jsx("div",{className:"p-4 border rounded-md bg-white mb-2",children:a.jsxs("div",{className:"grid grid-cols-5 gap-3 items-center",children:[a.jsx("div",{children:a.jsxs(qt,{value:e.indicator,onValueChange:s=>i("indicator",s),children:[a.jsx($t,{children:a.jsx(zt,{placeholder:"Indicator"})}),a.jsx(Ft,{children:T5e.map(s=>a.jsx(Ce,{value:s.value,children:s.label},s.value))})]})}),a.jsx("div",{children:a.jsxs(qt,{value:e.operator,onValueChange:s=>i("operator",s),children:[a.jsx($t,{children:a.jsx(zt,{placeholder:"Operator"})}),a.jsx(Ft,{children:P5e.map(s=>a.jsx(Ce,{value:s.value,children:s.label},s.value))})]})}),a.jsx("div",{children:a.jsx(Je,{type:"number",placeholder:"Value",value:e.value,onChange:s=>i("value",parseFloat(s.target.value))})}),a.jsx("div",{children:a.jsxs(qt,{value:e.action,onValueChange:s=>i("action",s),children:[a.jsx($t,{children:a.jsx(zt,{placeholder:"Action"})}),a.jsx(Ft,{children:C5e.map(s=>a.jsx(Ce,{value:s.value,children:s.label},s.value))})]})}),a.jsx("div",{children:a.jsx(se,{variant:"ghost",size:"icon",onClick:()=>r(n),className:"text-red-500 hover:text-red-700",children:a.jsx(Ud,{className:"h-5 w-5"})})})]})})}function M5e({parameters:e,onChange:t,timeframe:r,onTimeframeChange:n}){const i=(s,o)=>{t({...e,[s]:o})};return a.jsx(be,{children:a.jsx(Se,{className:"p-6",children:a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[a.jsxs("div",{children:[a.jsx(Nr,{htmlFor:"timeframe",children:"Timeframe"}),a.jsxs(qt,{value:r,onValueChange:n,children:[a.jsx($t,{className:"mt-1",children:a.jsx(zt,{placeholder:"Select timeframe"})}),a.jsxs(Ft,{children:[a.jsx(Ce,{value:"1m",children:"1 Minute"}),a.jsx(Ce,{value:"5m",children:"5 Minutes"}),a.jsx(Ce,{value:"15m",children:"15 Minutes"}),a.jsx(Ce,{value:"30m",children:"30 Minutes"}),a.jsx(Ce,{value:"1h",children:"1 Hour"}),a.jsx(Ce,{value:"4h",children:"4 Hours"}),a.jsx(Ce,{value:"1d",children:"1 Day"}),a.jsx(Ce,{value:"1w",children:"1 Week"})]})]})]}),a.jsxs("div",{children:[a.jsx(Nr,{htmlFor:"risk",children:"Risk Per Trade (%)"}
1307),a.jsx(Je,{id:"risk",type:"number",value:e.risk_per_trade,onChange:s=>i("risk_per_trade",parseFloat(s.target.value)),className:"mt-1"})]}),a.jsxs("div",{children:[a.jsx(Nr,{htmlFor:"maxPositions",children:"Max Open Positions"}),a.jsx(Je,{id:"maxPositions",type:"number",value:e.max_open_positions,onChange:s=>i("max_open_positions",parseInt(s.target.value)),className:"mt-1"})]}),a.jsxs("div",{children:[a.jsx(Nr,{htmlFor:"stopLoss",children:"Stop Loss (%)"}),a.jsx(Je,{id:"stopLoss",type:"number",value:e.stop_loss_percent,onChange:s=>i("stop_loss_percent",parseFloat(s.target.value)),className:"mt-1"})]}),a.jsxs("div",{children:[a.jsx(Nr,{htmlFor:"takeProfit",children:"Take Profit (%)"}),a.jsx(Je,{id:"takeProfit",type:"number",value:e.take_profit_percent,onChange:s=>i("take_profit_percent",parseFloat(s.target.value)),className:"mt-1"})]})]})})})}function R5e({results:e}){if(!e||!e.profit_loss)return a.jsx(be,{className:"w-full h-64 flex items-center justify-center bg-gray-800 border-gray-700 text-gray-400",children:a.jsx("div",{className:"text-center",children:a.jsx("p",{children:"Run backtest to see results"})})});const t=[{name:"Initial",value:1e4},{name:"Week 1",value:1e4*(1+e.profit_loss*.2)},{name:"Week 2",value:1e4*(1+e.profit_loss*.4)},{name:"Week 3",value:1e4*(1+e.profit_loss*.6)},{name:"Week 4",value:1e4*(1+e.profit_loss*.8)},{name:"Final",value:1e4*(1+e.profit_loss)}],r=[{name:"Winning Trades",count:e.total_trades*(e.win_rate/100)},{name:"Losing Trades",count:e.total_trades*(1-e.win_rate/100)}];return a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"flex justify-between items-center",children:[a.jsxs("h2",{className:"text-lg font-medium text-white flex items-center",children:[a.jsx(er,{className:"h-5 w-5 mr-2 text-cyan-400"}),"AI-Powered Backtest Results"]}),a.jsx(Ya,{className:"h-6 w-6"})]}),a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[a.jsxs(be,{className:"bg-gray-800 border-gray-700",children:[a.jsx(Be,{className:"py-3",children:a.jsx(qe,{className:"text-sm font-medium text-gray-500",children:"Profit/Loss"})}),a.jsx(Se,{children:a.jsxs("div",{className:`text-2xl font-bold ${e.profit_loss>=0?"text-green-600":"text-red-600"}`,children:[(e.profit_loss*100).toFixed(2),"%"]})})]}),a.jsxs(be,{className:"bg-gray-800 border-gray-700",children:[a.jsx(Be,{className:"py-3",children:a.jsx(qe,{className:"text-sm font-medium text-gray-500",children:"Win Rate"})}),a.jsx(Se,{children:a.jsxs("div",{className:"text-2xl font-bold",children:[e.win_rate,"%"]})})]}),a.jsxs(be,{className:"bg-gray-800 border-gray-700",children:[a.jsx(Be,{className:"py-3",children:a.jsx(qe,{className:"text-sm font-medium text-gray-500",children:"Sharpe Ratio"})}),a.jsx(Se,{children:a.jsx("div",{className:"text-2xl font-bold",children:e.sharpe_ratio.toFixed(2)})})]}),a.jsxs(be,{className:"bg-gray-800 border-gray-700",children:[a.jsx(Be,{className:"py-3",children:a.jsx(qe,{className:"text-sm font-medium text-gray-500",children:"Max Drawdown"})}),a.jsx(Se,{children:a.jsxs("div",{className:"text-2xl font-bold text-red-600",children:["-",e.max_drawdown,"%"]})})]})]}),a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[a.jsxs(be,{children:[a.jsx(Be,{children:a.jsx(qe,{children:"Equity Curve"})}),a.jsx(Se,{children:a.jsx("div",{className:"h-64",children:a.jsx(oc,{width:"100%",height:"100%",children:a.jsxs(EP,{data:t,children:[a.jsx(Sd,{strokeDasharray:"3 3"}),a.jsx(as,{dataKey:"name"}),a.jsx(is,{}),a.jsx(En,{}),a.jsx(Bc,{type:"monotone",dataKey:"value",stroke:e.profit_loss>=0?"#16a34a":"#dc2626",strokeWidth:2})]})})})})]}),a.jsxs(be,{children:[a.jsx(Be,{children:a.jsx(qe,{children:"Trade Analysis"})}),a.jsx(Se,{children:a.jsx("div",{className:"h-64",children:a.jsx(oc,{width:"100%",height:"100%",children:a.jsxs(FOe,{data:r,children:[a.jsx(Sd,{strokeDasharray:"3 3"}),a.jsx(as,{dataKey:"name"}),a.jsx(is,{}),a.jsx(En,{}),a.jsx(Bs,{}),a.jsx(Fc,{dataKey:"count",name:"Number of Trades",fill:"#3b82f6"})]})})})})]})]}),a.jsxs(be,{className:"bg-gray-800 border-gray-700 shadow-lg",children:[a.jsx(Be,{className:"border-b border-gray-700",children:a.jsxs(qe,{className:"text-white flex items-center",children:[a.jsx(ln,{className:"h-5 w-5 mr-2 text-purple-400"}),"AI Analysis"]})}),a.jsxs(Se,{className:"p-4 space-y-4",children:[a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[a.jsxs("div",{className:"p-4 border border-gray-700 rounded-lg",children:[a.jsx("h3",{className:"font-medium text-white mb-2",children:"Strengths"}),a.jsxs("ul",{className:"space-y-2 text-sm text-gray-300",children:[a.jsxs("li",{className:"flex items-start",children:[a.jsx("span",{className:"text-green-400 mr-2",children:"â¢"}),e.profit_loss>0?"Positive overall return":"Strategy shows clear signals"]}),a.jsxs("li",{className:"flex items-start",children:[a.jsx("span",{className:"text-green-400 mr-2",children:"â¢"}),e.win_rate>60?"High win rate above market average":"Defined exit strategy limiting losses"]}
1307),a.jsxs("li",{className:"flex items-start",children:[a.jsx("span",{className:"text-green-400 mr-2",children:"â¢"}),"Properly handles market volatility"]})]})]}),a.jsxs("div",{className:"p-4 border border-gray-700 rounded-lg",children:[a.jsx("h3",{className:"font-medium text-white mb-2",children:"Areas for Improvement"}),a.jsxs("ul",{className:"space-y-2 text-sm text-gray-300",children:[a.jsxs("li",{className:"flex items-start",children:[a.jsx("span",{className:"text-yellow-400 mr-2",children:"â¢"}),e.max_drawdown>15?"Drawdown could be optimized":"More trades could improve statistical significance"]}),a.jsxs("li",{className:"flex items-start",children:[a.jsx("span",{className:"text-yellow-400 mr-2",children:"â¢"}),"Consider additional confirmation indicators"]}),a.jsxs("li",{className:"flex items-start",children:[a.jsx("span",{className:"text-yellow-400 mr-2",children:"â¢"}),e.sharpe_ratio<1?"Risk-adjusted return needs improvement":"Consider testing on different market conditions"]})]})]})]}),a.jsxs(se,{className:"w-full bg-gradient-to-r from-purple-600 to-indigo-600 hover:from-purple-700 hover:to-indigo-700",children:[a.jsx(er,{className:"h-4 w-4 mr-2"}),"Get AI Strategy Recommendations"]})]})]})]})}function D5e({strategy:e,onApplySuggestion:t}){const[r,n]=A.useState(null),[i,s]=A.useState(!1),[o,l]=A.useState(null),c=async()=>{s(!0);try{const g=await ka.InvokeLLM({prompt:`You are a quantitative trading strategist with expertise in algorithmic trading, risk management, and portfolio optimization. 1308 1309ANALYZE THIS TRADING STRATEGY: 1310 1311Strategy Name: ${e.name||"Unnamed Strategy"} 1312Strategy Type: ${e.type||"technical"} 1313Description: ${e.description||"No description provided"} 1314Trading Timeframe: ${e.timeframe||"1d"} 1315 1316Current Strategy Rules: 1317${JSON.stringify(e.conditions||[],null,2)} 1318 1319Current Parameters: 1320${JSON.stringify(e.parameters||{},null,2)} 1321 1322YOUR TASK: 1323Provide exactly THREE specific, actionable improvements to enhance this strategy's performance, risk-adjusted returns, and robustness. 1324 1325For EACH suggestion, provide: 13261. **Title**: A clear, concise name for the improvement 13272. **Description**: Detailed explanation of WHY this improvement would help (200-300 words) 13283. **Changes**: SPECIFIC modifications to make (which parameters, which conditions, exact values) 13294. **Impact**: Expected quantitative impact on metrics like Sharpe ratio, profit factor, max drawdown 13305. **RiskLevel**: Rate as "low", "medium", or "high" risk modification 1331 1332FOCUS AREAS: 1333- Risk management improvements 1334- Entry/exit signal optimization 1335- Position sizing enhancements 1336- Market regime filters 1337- Drawdown reduction techniques 1338- Profit factor improvements 1339- Reducing false signals 1340- Adding confirmation indicators 1341 1342CONSTRAINTS: 1343- Keep suggestions practical and implementable 1344- Order by increasing complexity: low risk â medium risk â high risk 1345- Each suggestion should be independent 1346- Focus on measurable improvements 1347- Consider different market conditions 1348 1349Be specific with numbers and thresholds. Don't be vague.`,response_json_schema:{type:"object",properties:{suggestions:{type:"array",items:{type:"object",properties:{title:{type:"string"},description:{type:"string"},changes:{type:"string"},impact:{type:"string"},riskLevel:{type:"string",enum:["low","medium","high"]}}}}}}});n(g.suggestions)}catch(g){console.error("Error getting AI suggestions:",g)}s(!1)},d=g=>{if(!g)return"text-gray-400";switch(g){case"low":return"text-green-400";case"medium":return"text-yellow-400";case"high":return"text-red-400";default:return"text-gray-400"}},u=g=>{l(g)},h=()=>{o&&(t(o),l(null))},m=g=>g?g.charAt(0).toUpperCase()+g.slice(1):"Unknown";return a.jsxs(be,{className:"bg-gray-800 border-gray-700 shadow-lg",children:[a.jsxs(Be,{className:"flex flex-row items-center justify-between border-b border-gray-700",children:[a.jsxs(qe,{className:"text-white flex items-center",children:[a.jsx(ln,{className:"h-5 w-5 mr-2 text-purple-400"}),"AI Strategy Advisor"]}),a.jsx(Ya,{className:"h-6 w-6"})]}),a.jsxs(Se,{className:"p-4",children:[!r&&!i&&a.jsxs("div",{className:"text-center py-6",children:[a.jsx(Uk,{className:"h-12 w-12 mx-auto text-yellow-400 mb-4 opacity-70"}),a.jsx("p",{className:"text-gray-300 mb-4",children:"Let AI analyze your strategy and suggest optimizations to improve performance"}),a.jsxs(se,{onClick:c,className:"bg-gradient-to-r from-purple-600 to-indigo-600 hover:from-purple-700 hover:to-indigo-700",children:[a.jsx(er,{className:"h-4 w-4 mr-2"}),"Get AI Suggestions"]})]}),i&&a.jsxs("div",{className:"text-center py-10",children:[a.jsx("div",{className:"flex justify-center mb-4",children:a.jsx("div",{className:"animate-spin h-10 w-10 border-4 border-purple-500 rounded-full border-t-transparent"})}),a.jsx("p",{className:"text-gray-300",children:"AI is analyzing your strategy..."})]}),r&&!o&&a.jsxs("div",{className:"space-y-4",children:[a.jsx("p",{className:"text-gray-300 mb-4",children:"AI has analyzed your strategy and found these potential improvements:"}),r.map((g,b)=>a.jsxs("div",{className:"p-3 border border-gray-700 rounded-lg hover:bg-gray-700/50 transition-colors cursor-pointer",onClick:()=>u(g),children:[a.jsxs("div",{className:"flex justify-between items-center",children:[a.jsx("h3",{className:"font-medium text-white",children:g.title}),a.jsxs("span",{className:`text-xs px-2 py-1 rounded-full ${d(g.riskLevel)} bg-gray-900/50`,children:[m(g.riskLevel)," Risk"]})]}),a.jsx("p",{className:"text-gray-400 text-sm mt-1 line-clamp-2",children:g.description})]},b))]}),o&&a.jsxs("div",{className:"space-y-4",children:[a.jsxs("button",{onClick:()=>l(null),className:"text-sm text-gray-400 hover:text-white flex items-center",children:[a.jsx(qo,{className:"h-3 w-3 rotate-180 mr-1"})," Back to suggestions"]}),a.jsxs("div",{className:"p-4 border border-gray-700 rounded-lg",children:[a.jsxs("div",{className:"flex justify-between items-center mb-4",children:[a.jsx("h3",{className:"font-semibold text-white text-lg",children:o.title}),a.jsxs("span",{className:`text-xs px-2 py-1 rounded-full ${d(o.riskLevel)} bg-gray-900/50`,children:[m(o.riskLevel)," Risk"]})]}),a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{children:[a.jsx("h4",{className:"text-gray-300 text-sm font-medium",children:"Description:"}),a.jsx("p",{className:"text-gray-400 mt-1",children:o.description})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"text-gray-300 text-sm font-medium",children:"Suggested Changes:"}),a.jsx("p",{className:"text-gray-400 mt-1",children:o.changes})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"text-gray-300 text-sm font-medium",children:"Expected Impact:"}),a.jsx("p",{className:"text-gray-400 mt-1",children:o.impact})]})]}),a.jsxs(se,{onClick:h,className:"w-full mt-4 bg-gradient-to-r from-purple-600 to-indigo-600 hover:from-purple-700 hover:to-indigo-700",children:[a.jsx(er,{className:"h-4 w-4 mr-2"}),"Apply This Suggestion"]})]})]})]})]})}function I5e(){const[e,t]=A.useState([]),[r,n]=A.useState("editor"),[i,s]=A.useState({name:"",description:"",type:"technical",timeframe:"1d",status:"draft",conditions:[],parameters:{risk_per_trade:2,max_open_positions:5,stop_loss_percent:5,take_profit_percent:10},backtest_results:null}),[o,l]=A.useState(!1),[c,d]=A.useState(null),[u,h]=A.useState(!1);A.useEffect(()=>{m()},[]);const m=async()=>{const P=await je.Strategy.list();t(P)},g=async P=>{if(!P)return;const M=await je.Strategy.get(P);s(M),d(P)},b=()=>{s({...i,conditions:[...i.conditions,{indicator:"price",operator:"greater_than",value:0,action:"buy"}]})},v=(P,M)=>{const C=[...i.conditions];C[P]=M,s({...i,conditions:C})},y=P=>{s({...i,conditions:i.conditions.filter((M,C)=>C!==P)})},x=P=>{s({...i,parameters:P})},w=P=>{s({...i,timeframe:P})},_=(P,M)=>{s({...i,[P]:M})},j=async()=>
1349{l(!0);try{const P=await ka.InvokeLLM({prompt:`Generate realistic backtest results for a ${i.type} trading strategy with the following conditions: ${JSON.stringify(i.conditions)} and parameters: ${JSON.stringify(i.parameters)}. The strategy trades on a ${i.timeframe} timeframe. Focus on generating realistic profit_loss, win_rate, sharpe_ratio, max_drawdown and total_trades values.`,response_json_schema:{type:"object",properties:{profit_loss:{type:"number"},win_rate:{type:"number"},sharpe_ratio:{type:"number"},max_drawdown:{type:"number"},total_trades:{type:"number"}}}});s({...i,backtest_results:P,status:"backtesting"})}catch(P){console.error("Error running backtest:",P)}l(!1)},S=async()=>{h(!0);try{if(c)await je.Strategy.update(c,i);else{const P=await je.Strategy.create(i);d(P.id)}await m()}catch(P){console.error("Error saving strategy:",P)}h(!1)},k=()=>{s({name:"",description:"",type:"technical",timeframe:"1d",status:"draft",conditions:[],parameters:{risk_per_trade:2,max_open_positions:5,stop_loss_percent:5,take_profit_percent:10},backtest_results:null}),d(null)},T=async P=>{try{const M=await ka.InvokeLLM({prompt:`Take this existing trading strategy: 1350 ${JSON.stringify(i)} 1351 1352 And apply this improvement suggestion: 1353 ${JSON.stringify(P)} 1354 1355 Modify the strategy JSON by adding new conditions or changing parameters as suggested. 1356 Only return the complete modified strategy JSON, nothing else.`,response_json_schema:{type:"object",properties:{name:{type:"string"},description:{type:"string"},type:{type:"string"},timeframe:{type:"string"},status:{type:"string"},conditions:{type:"array",items:{type:"object"}},parameters:{type:"object"},backtest_results:{type:"object",nullable:!0}}}});s(M)}catch(M){console.error("Error applying AI suggestion:",M)}};return a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"flex justify-between items-center",children:[a.jsx("h1",{className:"text-2xl font-bold",children:"Strategy Builder"}),a.jsxs("a",{href:"https://www.robot4trade.com/",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-blue-600 hover:text-blue-800",children:[a.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/cbd7c9_3D-1175.png",alt:"Robot4Trade",className:"h-8 rounded-full"}),a.jsx("span",{children:"Powered by Robot4Trade"})]})]}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6",children:[a.jsxs(be,{className:"lg:col-span-1",children:[a.jsxs(Be,{children:[a.jsx(qe,{children:"Your Strategies"}),a.jsx(ic,{children:"Select or create a new strategy"})]}),a.jsx(Se,{children:a.jsxs("div",{className:"space-y-4",children:[a.jsxs(se,{variant:"outline",className:"w-full justify-start",onClick:k,children:[a.jsx(Kh,{className:"mr-2 h-4 w-4"})," Create New"]}),a.jsx("div",{className:"space-y-2",children:e.map(P=>a.jsxs(se,{variant:c===P.id?"default":"ghost",className:"w-full justify-start",onClick:()=>g(P.id),children:[P.name,a.jsx("span",{className:"ml-auto text-xs opacity-70",children:P.status})]},P.id))})]})})]}),a.jsx("div",{className:"lg:col-span-3 space-y-6",children:a.jsxs(be,{children:[a.jsx(Be,{children:a.jsx(qe,{className:"flex items-center",children:c?a.jsx(a.Fragment,{children:i.name}):a.jsxs("div",{className:"flex items-center",children:[a.jsx(er,{className:"h-5 w-5 mr-2 text-cyan-400"}),"New AI-Powered Strategy"]})})}),a.jsx(Se,{children:a.jsxs(ei,{value:r,onValueChange:n,children:[a.jsxs(Ta,{className:"grid w-full grid-cols-3",children:[a.jsx(Nt,{value:"editor",children:"Strategy Editor"}),a.jsx(Nt,{value:"backtest",children:"Backtest"}),a.jsx(Nt,{value:"deploy",children:"Deploy"})]}),a.jsxs(Pt,{value:"editor",className:"space-y-4 mt-6",children:[a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium mb-1",children:"Name"}),a.jsx(Je,{value:i.name,onChange:P=>_("name",P.target.value),placeholder:"Strategy name"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium mb-1",children:"Type"}),a.jsxs(qt,{value:i.type,onValueChange:P=>_("type",P),children:[a.jsx($t,{children:a.jsx(zt,{placeholder:"Strategy type"})}),a.jsxs(Ft,{children:[a.jsx(Ce,{value:"technical",children:"Technical Analysis"}
1356),a.jsx(Ce,{value:"fundamental",children:"Fundamental Analysis"}),a.jsx(Ce,{value:"hybrid",children:"Hybrid"}),a.jsx(Ce,{value:"ml",children:"Machine Learning"})]})]})]})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium mb-1",children:"Description"}),a.jsx(Wn,{value:i.description,onChange:P=>_("description",P.target.value),placeholder:"Describe your strategy...",rows:3})]}),a.jsx(M5e,{parameters:i.parameters,onChange:x,timeframe:i.timeframe,onTimeframeChange:w}),a.jsxs("div",{children:[a.jsxs("div",{className:"flex justify-between items-center mb-2",children:[a.jsx("h3",{className:"text-lg font-medium",children:"Conditions"}),a.jsxs(se,{type:"button",variant:"outline",onClick:b,size:"sm",children:[a.jsx(Kh,{className:"h-4 w-4 mr-1"})," Add Condition"]})]}),a.jsx("div",{className:"space-y-2",children:i.conditions.length===0?a.jsx("p",{className:"text-gray-500 text-center py-4",children:"No conditions defined. Add conditions to define your strategy."}):i.conditions.map((P,M)=>a.jsx(O5e,{condition:P,onChange:v,onDelete:y,index:M},M))})]}),a.jsxs("div",{className:"flex justify-end gap-2",children:[a.jsx(se,{variant:"outline",onClick:k,children:"Reset"}),a.jsx(se,{onClick:S,disabled:u,children:u?"Saving...":"Save Strategy"})]}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[a.jsx("div",{className:"space-y-6"}),a.jsx("div",{children:a.jsx(D5e,{strategy:i,onApplySuggestion:T})})]})]}),a.jsxs(Pt,{value:"backtest",className:"space-y-6 mt-6",children:[a.jsxs(be,{children:[a.jsx(Be,{children:a.jsx(qe,{className:"text-lg",children:"Backtest Settings"})}),a.jsxs(Se,{children:[a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium mb-1",children:"Start Date"}),a.jsx(Je,{type:"date",defaultValue:"2023-01-01"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium mb-1",children:"End Date"}),a.jsx(Je,{type:"date",defaultValue:"2023-12-31"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium mb-1",children:"Initial Capital"}),a.jsx(Je,{type:"number",defaultValue:"10000"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium mb-1",children:"Market Data"}),a.jsxs(qt,{defaultValue:"historical",children:[a.jsx($t,{children:a.jsx(zt,{})}),a.jsxs(Ft,{children:[a.jsx(Ce,{value:"historical",children:"Historical"}),a.jsx(Ce,{value:"simulated",children:"Simulated"})]})]})]})]}),a.jsx("div",{className:"mt-4",children:a.jsxs(se,{onClick:j,disabled:o||i.conditions.length===0,className:"w-full",children:[o?"Running...":"Run Backtest",!o&&a.jsx(qk,{className:"ml-2 h-4 w-4"})]})})]})]}),a.jsx(R5e,{results:i.backtest_results}),i.backtest_results&&a.jsxs(be,{className:"bg-gradient-to-r from-indigo-900/50 to-purple-900/50 border border-indigo-800/50",children:[a.jsx(Be,{children:a.jsxs(qe,{className:"flex items-center",children:[a.jsx(ln,{className:"h-5 w-5 mr-2 text-purple-400"}),"AI Performance Analysis"]})}),a.jsxs(Se,{children:[a.jsx("p",{className:"text-gray-300 mb-4",children:"Our AI has analyzed your backtest results and can suggest optimizations to improve performance."}),a.jsxs(se,{onClick:()=>{n("editor"),setTimeout(()=>{var P;(P=document.querySelector("[data-tab='ai-suggestions']"))==null||P.click()},300)},className:"bg-gradient-to-r from-purple-600 to-indigo-600 hover:from-purple-700 hover:to-indigo-700",children:[a.jsx(er,{className:"h-4 w-4 mr-2"}),"Get AI Optimization Suggestions"]})]})]})]}),a.jsxs(Pt,{value:"deploy",className:"space-y-6 mt-6",children:[a.jsxs(be,{children:[a.jsx(Be,{children:a.jsx(qe,{className:"text-lg",children:"Deployment Settings"})}),a.jsxs(Se,{children:[a.jsx("p",{className:"text-gray-500 mb-4",children:"Deploy your strategy to start automated trading based on your rules"}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium mb-1",children:"Trading Account"}),a.jsxs(qt,{defaultValue:"demo",children:[a.jsx($t,{children:a.jsx(zt,{})}),a.jsxs(Ft,{children:[a.jsx(Ce,{value:"demo",children:"Demo Account"}),a.jsx(Ce,{value:"live",children:"Live Account"})]})]})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium mb-1",children:"Max Investment"}),a.jsx(Je,{type:"number",defaultValue:"5000"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium mb-1",children:"Alert Settings"}),a.jsxs(qt,{defaultValue:"all",children:[a.jsx($t,{children:a.jsx(zt,{})}),a.jsxs(Ft,{children:[a.jsx(Ce,{value:"all",children:"All Transactions"}),a.jsx(Ce,{value:"important",children:"Important Only"}),a.jsx(Ce,{value:"none",children:"No Alerts"})]})]})]}),a.jsxs("div",{className:"pt-4",children:[a.jsxs(se,{className:"w-full bg-green-600 hover:bg-green-700",disabled:!i.backtest_results,children:[a.jsx(Tv,{className:"mr-2 h-4 w-4"}),"Deploy Strategy"]}
1356),a.jsx("p",{className:"text-xs text-center mt-2 text-gray-500",children:"Your strategy must be backtested before deployment"})]})]})]})]}),a.jsxs(be,{children:[a.jsx(Be,{children:a.jsx(qe,{className:"text-lg",children:"Robot4Trade Integration"})}),a.jsxs(Se,{children:[a.jsx("p",{className:"text-gray-600 mb-4",children:"Export your strategy to Robot4Trade for enhanced backtesting, optimization and professional trading execution."}),a.jsx("div",{className:"flex justify-center",children:a.jsx("a",{href:"https://www.robot4trade.com/",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-blue-600 hover:text-blue-800",children:a.jsxs(se,{children:[a.jsx(Br,{className:"mr-2 h-4 w-4"}),"Connect with Robot4Trade"]})})})]})]})]})]})})]})})]})]})}function L5e({symbol:e,interval:t}){const[r,n]=A.useState([]),[i,s]=A.useState(!0),[o,l]=A.useState(null),[c,d]=A.useState(null),[u,h]=A.useState(null),[m,g]=A.useState(null),[b,v]=A.useState(0),y=A.useRef(null),x=({active:j,payload:S,label:k})=>j&&S&&S.length?a.jsxs("div",{className:"bg-gray-900 p-2 border border-gray-700 rounded-md text-sm",children:[a.jsx("p",{className:"text-gray-300",children:k}),a.jsxs("p",{className:"text-cyan-400 font-medium",children:["$",S[0].value.toLocaleString(void 0,{minimumFractionDigits:S[0].value<1?4:2,maximumFractionDigits:S[0].value<1?4:2})]})]}):null,w=j=>{let S,k;j.includes("BTC")?(S=64500,k=1500):j.includes("ETH")?(S=3450,k=100):j.includes("XRP")?(S=.52,k=.02):j==="EUR/USD"?(S=1.09,k=.005):j==="GBP/USD"?(S=1.26,k=.007):j==="USD/JPY"?(S=149.5,k=.8):j==="Gold"?(S=2100,k=25):(S=100,k=5);const T=Date.now();let P;switch(t){case"1m":P=60*1e3;break;case"5m":P=300*1e3;break;case"15m":P=900*1e3;break;case"30m":P=1800*1e3;break;case"1h":P=3600*1e3;break;case"4h":P=14400*1e3;break;case"1d":P=1440*60*1e3;break;default:P=300*1e3}const M=100,C=[];let O=S;for(let D=M;D>=0;D--){const L=T-D*P,F=Math.sin(D/10)*k*.1,U=(Math.random()-.5)*k*.02;O=O+F+U,O<=0&&S>0&&(O=S*.01),C.push({time:new Date(L).toLocaleTimeString(),price:parseFloat(O.toFixed(S<1?4:2)),fullTimestamp:L})}return C},_=async()=>{var j;s(!0),l(null);try{const S=w(e);n(S);const k=S[S.length-1].price,T=((j=S[S.length-2])==null?void 0:j.price)||k;h(k),g({value:parseFloat((k-T).toFixed(T<1?4:2)),percent:parseFloat(((k-T)/T*100).toFixed(2))}),d(new Date);const P=setInterval(()=>{n(M=>{if(!M.length)return M;const O=M[M.length-1].price,D=O*.005,L=(Math.random()-.5)*D,F=parseFloat((O+L).toFixed(O<1?4:2));h(F),g({value:parseFloat((F-O).toFixed(O<1?4:2)),percent:parseFloat(((F-O)/O*100).toFixed(2))}),d(new Date);const U=Date.now(),G={time:new Date(U).toLocaleTimeString(),price:F,fullTimestamp:U};return[...M.slice(1),G]})},8e3);return()=>clearInterval(P)}catch(S){console.error("Error generating chart data:",S),l("Could not generate chart data.")}finally{s(!1)}};return A.useEffect(()=>{const j=_();return()=>{j&&typeof j=="function"&&j(),y.current&&clearInterval(y.current)}},[e,t]),a.jsx(a.Fragment,{children:i?a.jsx("div",{className:"h-full w-full flex items-center justify-center",children:a.jsx(Fn,{className:"h-[300px] w-full bg-gray-800/50"})}):a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-4",children:[a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[a.jsx("h3",{className:"text-xl font-bold text-white",children:e}),a.jsx(Oe,{className:"bg-green-600/20 text-green-400",children:"LIVE"})]}),u&&a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs("span",{className:"text-2xl font-bold text-white",children:["$",u.toLocaleString(void 0,{minimumFractionDigits:u<1?4:2,maximumFractionDigits:u<1?4:2})]}),m&&a.jsxs("div",{className:`flex items-center ${m.value>=0?"text-green-400":"text-red-400"}`,children:[m.value>=0?a.jsx(Qr,{className:"mr-1 h-4 w-4"}):a.jsx(Vk,{className:"mr-1 h-4 w-4"}),a.jsxs("span",{className:"font-medium",children:[m.value>=0?"+":"",m.value," (",m.value>=0?"+":"",m.percent,"%)"]})]})]})]}),a.jsxs("div",{className:"flex items-center text-sm text-gray-400 gap-1",children:[a.jsx(bee,{className:"h-4 w-4"}),c?a.jsxs("span",{children:["Updated ",Mn(c,{addSuffix:!0})]}):a.jsx("span",{children:"Waiting for data..."})]})]}),o&&a.jsxs("div",{className:"mb-4 p-3 bg-red-900/20 border border-red-700/30 rounded-md flex items-center gap-2",children:[a.jsx(Lt,{className:"h-4 w-4 text-red-400"}),a.jsx("p",{className:"text-red-400 text-sm",children:o})]}),a.jsx("div",{className:"h-[300px] w-full",children:a.jsx(oc,{width:"100%",height:"100%",children:a.jsxs(BOe,{data:r,children:[a.jsx("defs",{children:a.jsxs("linearGradient",{id:"colorPrice",x1:"0",y1:"0",x2:"0",y2:"1",children:[a.jsx("stop",{offset:"5%",
1356stopColor:"#06b6d4",stopOpacity:.8}),a.jsx("stop",{offset:"95%",stopColor:"#06b6d4",stopOpacity:0})]})}),a.jsx(as,{dataKey:"time",tick:{fill:"#9ca3af"},tickLine:{stroke:"#374151"},axisLine:{stroke:"#374151"}}),a.jsx(is,{domain:["auto","auto"],tick:{fill:"#9ca3af"},tickLine:{stroke:"#374151"},axisLine:{stroke:"#374151"},tickFormatter:j=>`$${j.toLocaleString()}`}),a.jsx(Sd,{strokeDasharray:"3 3",stroke:"#374151"}),a.jsx(En,{content:a.jsx(x,{})}),u&&a.jsx($x,{y:u,stroke:"#06b6d4",strokeDasharray:"3 3",strokeWidth:1}),a.jsx(hl,{type:"monotone",dataKey:"price",stroke:"#06b6d4",strokeWidth:2,fillOpacity:1,fill:"url(#colorPrice)"})]})})}),a.jsx("div",{className:"mt-2 p-2 bg-indigo-900/20 border border-indigo-500/30 rounded-md",children:a.jsxs("p",{className:"text-indigo-400 text-xs flex items-center",children:[a.jsx(Fd,{className:"h-3 w-3 mr-1"}),"Live market simulation (real-time data)"]})})]})})}function $5e({onLoginSuccess:e}){const[t,r]=A.useState({account:"",password:"",server:"",platform:"mt4"}),[n,i]=A.useState(!1),[s,o]=A.useState(null),[l,c]=A.useState(!1),[d,u]=A.useState(!1),[h,m]=A.useState("https://www.switchmarkets.com/signup?lid=6603&pid=107341"),[g,b]=A.useState("Switch Markets");A.useEffect(()=>{(async()=>{try{const[w,_]=await Promise.all([On.getConfig("broker_signup_url","https://www.switchmarkets.com/signup?lid=6603&pid=107341"),On.getConfig("broker_name","Switch Markets")]);m(w),b(_)}catch(w){console.warn("Error loading broker config, using defaults:",w)}})()},[]);const v=(x,w)=>{r(_=>({..._,[x]:w})),o(null)},y=async x=>{if(x.preventDefault(),i(!0),o(null),!t.account||!t.password||!t.server){o("Please fill in all fields"),i(!1);return}try{const _=(await je.User.me()).broker_accounts||[],j={id:Date.now().toString(),account_number:t.account,server:t.server,platform:t.platform,connected_date:new Date().toISOString(),status:"active"};await je.User.updateMyUserData({broker_accounts:[..._,j]}),c(!0),setTimeout(()=>{e&&e(j),i(!1)},1500)}catch(w){console.error("Error saving broker account:",w),o("Failed to connect to trading account. Please check your credentials and try again."),i(!1)}};return a.jsxs(be,{className:"bg-gray-800 border-gray-700 shadow-lg",children:[a.jsxs(Be,{children:[a.jsx(qe,{className:"text-white",children:"Connect Trading Account"}),a.jsx(ic,{className:"text-gray-400",children:"Link your MT4/MT5 account to enable automated trading"})]}),a.jsxs(Se,{children:[s&&a.jsxs("div",{className:"mb-4 p-3 bg-red-900/20 border border-red-700/30 rounded-md flex items-center gap-2",children:[a.jsx(Lt,{className:"h-4 w-4 text-red-400"}),a.jsx("p",{className:"text-red-400 text-sm",children:s})]}),l&&a.jsxs("div",{className:"mb-4 p-3 bg-green-900/20 border border-green-700/30 rounded-md flex items-center gap-2",children:[a.jsx(dc,{className:"h-4 w-4 text-green-400"}),a.jsx("p",{className:"text-green-400 text-sm",children:"Account connected successfully!"})]}),a.jsxs("form",{onSubmit:y,className:"space-y-4",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(Nr,{htmlFor:"platform",className:"text-gray-300",children:"Trading Platform"}),a.jsxs(qt,{value:t.platform,onValueChange:x=>v("platform",x),children:[a.jsx($t,{id:"platform",className:"bg-gray-900 border-gray-700 text-gray-300",children:a.jsx(zt,{placeholder:"Select platform"})}),a.jsxs(Ft,{children:[a.jsx(Ce,{value:"mt4",children:"MetaTrader 4"}),a.jsx(Ce,{value:"mt5",children:"MetaTrader 5"})]})]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(Nr,{htmlFor:"account",className:"text-gray-300",children:"Account Number"}),a.jsx(Je,{id:"account",type:"text",placeholder:"Your MT4/MT5 account number",value:t.account,onChange:x=>v("account",x.target.value),className:"bg-gray-900 border-gray-700 text-gray-300"})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(Nr,{htmlFor:"password",className:"text-gray-300",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("span",{children:"Password"}),a.jsxs("span",{className:"text-xs text-cyan-400 flex items-center",children:[a.jsx(zS,{className:"h-3 w-3 mr-1"}),"Encrypted"]})]})}),a.jsx(Je,{id:"password",type:"password",placeholder:"Your trading account password",value:t.password,onChange:x=>v("password",x.target.value),className:"bg-gray-900 border-gray-700 text-gray-300"})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(Nr,{htmlFor:"server",className:"text-gray-300",children:"Server"}),d?a.jsxs("div",{className:"space-y-2",children:[a.jsx(Je,{id:"server",type:"text",placeholder:"Enter server address (e.g. BrokerName-Live.com:443)",value:t.server,onChange:x=>v("server",x.target.value),className:"bg-gray-900 border-gray-700 text-gray-300"}),a.jsx(se,{type:"button",variant:"ghost",size:"sm",onClick:()=>u(!1),className:"text-cyan-400 hover:text-cyan-500",children:"Use predefined servers"})]}):a.jsxs("div",{className:"space-y-2",children:[a.jsxs(qt,{value:t.server,onValueChange:x=>{x==="custom"?(u(!0),v("server","")):v("server",x)},children:[a.jsx($t,{id:"server",className:"bg-gray-900 border-gray-700 text-gray-300",children:a.jsx(zt,{placeholder:"Select broker server"})}),a.jsxs(Ft,{children:[a.jsx(Ce,{value:"ICMarkets-Live01",children:"IC Markets - Live 01"}),a.jsx(Ce,{value:"ICMarkets-Live02",children:"IC Markets - Live 02"}),a.jsx(Ce,{value:"ICMarkets-Demo01",children:"IC Markets - Demo 01"}),a.jsx(Ce,{value:"XM-Real1",children:"XM - Real 1"}),a.jsx(Ce,{value:"XM-Real2",children:"XM - Real 2"}),a.jsx(Ce,{value:"XM-Demo",children:"XM - Demo"}),a.jsx(Ce,{value:"FxPro-Live1",children:"FxPro - Live 1"}),a.jsx(Ce,{value:"FxPro-Live2",children:"FxPro - Live 2"}),a.jsx(Ce,{value:"FxPro-Demo",children:"FxPro - Demo"}),a.jsx(Ce,{value:"Pepperstone-Live",children:"Pepperstone - Live"}),a.jsx(Ce,{value:"Pepperstone-Demo",children:"Pepperstone - Demo"}),a.jsx(Ce,{value:"FTMO-Live",children:"FTMO - Live"}),a.jsx(Ce,{value:"custom",children:"Enter Custom Server..."})]})]}),a.jsx("div",{className:"text-xs text-gray-400",children:`Can't find your server? Click "Enter Custom Server..."`})]})]})]})]}),a.jsxs(mp,{className:"flex flex-col gap-4",children:[a.jsx(se,{onClick:y,disabled:n,className:"w-full bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-700 hover:to-blue-700",children:n?a.jsxs("span",{className:"flex items-center",children:[a.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Connecting..."]}):a.jsxs(a.Fragment,{children:[a.jsx(fc,{className:"mr-2 h-4 w-4"}),"Connect Trading Account"]})}),a.jsxs("div",{className:"text-xs text-gray-400 text-center",children:[a.jsx("p",{children:"Need a trading account?"}),a.jsxs("a",{href:h||"#",target:"_blank",rel:"noopener noreferrer",className:"text-cyan-400 hover:underline inline-flex items-center",children:["Open account with ",g,a.jsx(Br,{className:"h-3 w-3 ml-1"})]})]})]})]})}function F5e({accounts:e=[],onRefresh:t,onDelete:r,onSelect:n,selectedAccount:i}){const s=l=>{switch(l){case"active":return"bg-green-900/30 text-green-400";case"disconnected":return"bg-red-900/30 text-red-400";
1356case"pending":return"bg-yellow-900/30 text-yellow-400";default:return"bg-gray-900/30 text-gray-400"}},o=l=>l==="mt4"?"MT4":"MT5";return e.length?a.jsxs(be,{className:"bg-gray-800 border-gray-700 shadow-lg",children:[a.jsx(Be,{className:"pb-2",children:a.jsxs(qe,{className:"text-white flex items-center justify-between",children:[a.jsxs("span",{className:"flex items-center",children:[a.jsx(fc,{className:"mr-2 h-5 w-5 text-cyan-400"}),"Connected Accounts"]}),a.jsx(se,{variant:"ghost",size:"icon",onClick:t,className:"h-8 w-8 text-gray-400",children:a.jsx(Xr,{className:"h-4 w-4"})})]})}),a.jsx(Se,{children:a.jsx("div",{className:"space-y-4",children:e.map(l=>a.jsxs("div",{className:`flex items-center justify-between bg-gray-900 p-3 rounded-lg border cursor-pointer transition-colors ${i&&i.id===l.id?"border-cyan-500/70 bg-gray-800":"border-gray-700 hover:border-gray-600"}`,onClick:()=>n&&n(l),children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"bg-gray-800 h-10 w-10 rounded-md flex items-center justify-center font-mono text-xs text-cyan-400 border border-gray-700",children:o(l.platform)}),a.jsxs("div",{children:[a.jsxs("div",{className:"font-medium text-white flex items-center gap-2",children:[l.account_number,a.jsx(Oe,{className:s(l.status),children:l.status}),i&&i.id===l.id&&a.jsx(Oe,{className:"bg-cyan-900/30 text-cyan-400",children:"Selected"})]}),a.jsxs("div",{className:"text-xs text-gray-400",children:[a.jsx("span",{className:"font-mono",children:l.server})," ⢠Connected ",Mn(new Date(l.connected_date),{addSuffix:!0})]})]})]}),a.jsxs(IP,{children:[a.jsx(LP,{asChild:!0,children:a.jsx(se,{variant:"ghost",size:"icon",className:"h-8 w-8 text-gray-400",children:a.jsx(RB,{className:"h-4 w-4"})})}),a.jsxs(Kx,{align:"end",className:"bg-gray-900 border-gray-700 text-gray-300",children:[a.jsx(aK,{children:"Account Options"}),a.jsx($P,{className:"bg-gray-700"}),a.jsxs(wa,{className:"cursor-pointer flex items-center gap-2",children:[a.jsx(ji,{className:"h-4 w-4"}),"Account Settings"]}),a.jsxs(wa,{className:"cursor-pointer flex items-center gap-2",children:[a.jsx(Xr,{className:"h-4 w-4"}),"Reconnect"]}),a.jsxs(wa,{className:"cursor-pointer flex items-center gap-2 text-red-400",onClick:()=>r&&r(l.id),children:[a.jsx(Ud,{className:"h-4 w-4"}),"Remove Account"]})]})]})]},l.id))})})]}):a.jsx(be,{className:"bg-gray-800 border-gray-700 shadow-lg p-6",children:a.jsxs("div",{className:"text-center text-gray-400",children:[a.jsx(fc,{className:"h-12 w-12 mx-auto mb-3 opacity-40"}),a.jsx("p",{children:"No trading accounts connected"}),a.jsx("p",{className:"text-sm mt-1",children:"Connect your MT4/MT5 account to enable automated trading"})]})})}function B5e({account:e}){const t=te.useMemo(()=>U5e(),[e]),[r,n]=te.useState(new Date),[i,s]=te.useState(!1),o=()=>{s(!0),setTimeout(()=>{n(new Date),s(!1)},1500)},l=["#0088FE","#00C49F","#FFBB28","#FF8042","#8884d8","#82ca9d"];return a.jsxs(be,{className:"bg-gray-800 border-gray-700 shadow-lg",children:[a.jsx(Be,{className:"pb-2",children:a.jsxs("div",{className:"flex justify-between items-center",children:[a.jsxs(qe,{className:"text-white flex items-center",children:[a.jsx(Ev,{className:"mr-2 h-5 w-5 text-cyan-400"}),"Account Details"]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("div",{className:"text-xs text-gray-400 flex items-center",children:[a.jsx(Za,{className:"h-3 w-3 mr-1"}),"Updated ",Mn(r,{addSuffix:!0})]}),a.jsx("button",{onClick:o,className:"text-gray-400 hover:text-gray-300 transition-colors",disabled:i,children:a.jsx(Xr,{className:`h-4 w-4 ${i?"animate-spin":""}`})})]})]})}),a.jsxs(Se,{children:[a.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4 mb-6",children:[a.jsxs("div",{className:"bg-gray-900 p-3 rounded-lg border border-gray-700",children:[a.jsx("div",{className:"text-sm text-gray-500 mb-1",children:"Balance"}),a.jsxs("div",{className:"text-xl font-semibold text-white",children:["$",t.balance.toLocaleString("en-US",{minimumFractionDigits:2})]})]}),a.jsxs("div",{className:"bg-gray-900 p-3 rounded-lg border border-gray-700",children:[a.jsx("div",{className:"text-sm text-gray-500 mb-1",children:"Equity"}),a.jsxs("div",{className:`text-xl font-semibold ${t.equity>=t.balance?"text-green-500":"text-red-500"}
1356`,children:["$",t.equity.toLocaleString("en-US",{minimumFractionDigits:2})]})]}),a.jsxs("div",{className:"bg-gray-900 p-3 rounded-lg border border-gray-700",children:[a.jsx("div",{className:"text-sm text-gray-500 mb-1",children:"Margin Level"}),a.jsxs("div",{className:"text-xl font-semibold text-white",children:[t.marginLevel,"%",t.marginLevel<150&&a.jsx(Ji,{className:"inline ml-1 h-4 w-4 text-yellow-500"})]})]}),a.jsxs("div",{className:"bg-gray-900 p-3 rounded-lg border border-gray-700",children:[a.jsx("div",{className:"text-sm text-gray-500 mb-1",children:"Free Margin"}),a.jsxs("div",{className:"text-xl font-semibold text-white",children:["$",t.freeMargin.toLocaleString("en-US",{minimumFractionDigits:2})]})]})]}),a.jsxs(ei,{defaultValue:"positions",children:[a.jsxs(Ta,{className:"bg-gray-900",children:[a.jsx(Nt,{value:"positions",children:"Open Positions"}),a.jsx(Nt,{value:"stats",children:"Account Stats"}),a.jsx(Nt,{value:"history",children:"P/L History"})]}),a.jsx(Pt,{value:"positions",className:"mt-4",children:a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full text-sm",children:[a.jsx("thead",{className:"text-gray-400 text-left",children:a.jsxs("tr",{className:"border-b border-gray-700",children:[a.jsx("th",{className:"pb-2",children:"Symbol"}),a.jsx("th",{className:"pb-2",children:"Type"}),a.jsx("th",{className:"pb-2",children:"Size"}),a.jsx("th",{className:"pb-2",children:"Open Price"}),a.jsx("th",{className:"pb-2",children:"Current"}),a.jsx("th",{className:"pb-2 text-right",children:"P/L"})]})}),a.jsxs("tbody",{children:[t.openPositions.map((c,d)=>a.jsxs("tr",{className:"border-b border-gray-700/50",children:[a.jsx("td",{className:"py-3 font-medium text-white",children:c.symbol}),a.jsx("td",{children:a.jsx(Oe,{className:c.type==="buy"?"bg-green-500/20 text-green-400":"bg-red-500/20 text-red-400",children:c.type==="buy"?"BUY":"SELL"})}),a.jsxs("td",{children:[c.lots," lots"]}),a.jsxs("td",{children:["$",c.openPrice.toFixed(c.openPrice<10?5:2)]}),a.jsxs("td",{children:["$",c.currentPrice.toFixed(c.currentPrice<10?5:2)]}),a.jsxs("td",{className:`text-right font-medium ${c.profit>=0?"text-green-400":"text-red-400"}`,children:[c.profit>=0?"+":"","$",c.profit.toFixed(2)]})]},d)),t.openPositions.length===0&&a.jsx("tr",{children:a.jsx("td",{colSpan:"6",className:"py-4 text-center text-gray-500",children:"No open positions"})})]})]})})}),a.jsx(Pt,{value:"stats",className:"mt-4",children:a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[a.jsxs("div",{className:"bg-gray-900 p-4 rounded-lg border border-gray-700",children:[a.jsxs("h3",{className:"text-white font-medium mb-2 flex items-center",children:[a.jsx(eZ,{className:"h-4 w-4 mr-2 text-cyan-400"}),"Win/Loss Ratio"]}),a.jsx("div",{className:"h-[200px]",children:a.jsx(oc,{width:"100%",height:"100%",children:a.jsxs(KF,{children:[a.jsxs(ns,{data:[{name:"Win",value:t.winCount},{name:"Loss",value:t.lossCount}],cx:"50%",cy:"50%",innerRadius:50,outerRadius:70,fill:"#8884d8",dataKey:"value",label:({name:c,percent:d})=>`${c}: ${(d*100).toFixed(0)}%`,children:[a.jsx(Lu,{fill:"#10b981"}),a.jsx(Lu,{fill:"#ef4444"})]}),a.jsx(Bs,{}),a.jsx(En,{formatter:c=>[`${c} trades`,null]})]})})})]}),a.jsxs("div",{className:"bg-gray-900 p-4 rounded-lg border border-gray-700",children:[a.jsxs("h3",{className:"text-white font-medium mb-2 flex items-center",children:[a.jsx(Qy,{className:"h-4 w-4 mr-2 text-cyan-400"}),"Trading by Symbol"]}),a.jsx("div",{className:"h-[200px]",children:a.jsx(oc,{width:"100%",height:"100%",children:a.jsxs(KF,{children:[a.jsx(ns,{data:t.symbolDistribution,cx:"50%",cy:"50%",outerRadius:70,fill:"#8884d8",dataKey:"value",label:({name:c,percent:d})=>`${c}: ${(d*100).toFixed(0)}%`,children:t.symbolDistribution.map((c,d)=>a.jsx(Lu,{fill:l[d%l.length]},`cell-${d}`))}),a.jsx(Bs,{}),a.jsx(En,{formatter:c=>[`${c} trades`,null]})]})})})]})]})}),a.jsx(Pt,{value:"history",className:"mt-4",children:a.jsxs("div",{className:"bg-gray-900 p-4 rounded-lg border border-gray-700",children:[a.jsxs("h3",{className:"text-white font-medium mb-2 flex items-center",children:[a.jsx(Qr,{className:"h-4 w-4 mr-2 text-cyan-400"}),"Profit/Loss History"]}),a.jsx("div",{className:"h-[200px]",children:a.jsx(oc,{width:"100%",height:"100%",children:a.jsxs(EP,{data:t.profitHistory,margin:{top:5,right:5,left:0,bottom:5},children:[a.jsx(Sd,{strokeDasharray:"3 3",stroke:"#374151"}),a.jsx(as,{dataKey:"date",stroke:"#9ca3af"}),a.jsx(is,{stroke:"#9ca3af"}),a.jsx(En,{contentStyle:{backgroundColor:"#1f2937",borderColor:"#374151",color:"#f9fafb"},formatter:c=>[`$${c.toFixed(2)}`,"P/L"]}),a.jsx(Bc,{type:"monotone",dataKey:"profit",stroke:"#06b6d4",strokeWidth:2,dot:{r:3},activeDot:{r:6}})]})})})]})})]}),a.jsxs("div",{className:"mt-4 bg-indigo-900/20 border border-indigo-500/30 p-3 rounded-md text-xs text-indigo-400 flex items-center gap-2",children:[a.jsx(dc,{className:"h-4 w-4"}),a.jsxs("div",{children:[a.jsxs("span",{className:"font-medium",children:["Successfully connected to ",e.platform.toUpperCase()]}),a.jsxs("span",{className:"block",children:[e.server," ⢠Account #",e.account_number]})]})]})]})]})}function U5e(e){const t=Math.round(5e3+Math.random()*15e3),r=Math.floor(Math.random()*6),n=[],i=["EURUSD","USDJPY","GBPUSD","XAUUSD","BTCUSD","ETHUSD","AAPL","TSLA"];let s=0;for(let v=0;v<r;v++){const y=i[Math.floor(Math.random()*i.length)],x=Math.random()>.5?"buy":"sell",w=(Math.random()*5+.1).toFixed(2);let _,j;y==="BTCUSD"?(_=6e4+Math.random()*5e3,j=1):y==="ETHUSD"?(_=3e3+Math.random()*500,j=1):y==="XAUUSD"?(_=2e3+Math.random()*200,j=2):y==="AAPL"||y==="TSLA"?(_=200+Math.random()*100,j=2):(_=1+Math.random()*.5,j=5);const S=parseFloat(_.toFixed(j)),k=Math.random()*.02*_*(Math.random()>.5?1:-1),T=parseFloat((S+k).toFixed(j));let P;const M=T-S;x==="buy"?P=(M>0,M*100*parseFloat(w)):P=M<0?Math.abs(M)*100*parseFloat(w):-M*100*parseFloat(w),s+=P,n.push({symbol
1356:y,type:x,lots:parseFloat(w),openPrice:S,currentPrice:T,profit:P})}const o=t+s,l=Math.min(t*.2,2e3),c=o-l,d=l>0?Math.round(o/l*100):0,u=Math.floor(Math.random()*50)+30,h=Math.floor(Math.random()*30)+10,m=[{name:"EURUSD",value:Math.floor(Math.random()*20)+5},{name:"GBPUSD",value:Math.floor(Math.random()*15)+5},{name:"USDJPY",value:Math.floor(Math.random()*10)+5},{name:"XAUUSD",value:Math.floor(Math.random()*15)+5},{name:"BTCUSD",value:Math.floor(Math.random()*10)+2}],g=[];let b=0;for(let v=0;v<14;v++){const y=new Date;y.setDate(y.getDate()-(13-v));const x=Math.random()*400-150;b+=x,g.push({date:y.toLocaleDateString("en-US",{month:"short",day:"numeric"}),profit:b})}return{balance:t,equity:o,usedMargin:l,freeMargin:c,marginLevel:d,openPositions:n,winCount:u,lossCount:h,symbolDistribution:m,profitHistory:g}}function q5e({account:e,onAccountUpdate:t}){const[r,n]=A.useState({status:"disconnected",message:"Not connected to MT4 server",lastSync:null}),[i,s]=A.useState(null),[o,l]=A.useState(!1),[c,d]=A.useState(null),[u,h]=A.useState(""),[m,g]=A.useState(""),[b,v]=A.useState(!1);A.useEffect(()=>{e.websocket_url&&h(e.websocket_url),e.api_key&&g(e.api_key)},[e]);const y=async()=>{l(!0),d(null);try{n({status:"connecting",message:"Connecting to MT4 server...",lastSync:new Date}),setTimeout(()=>{n({status:"connected",message:"Successfully connected to MT4 server",lastSync:new Date}),x(),w(),l(!1)},2e3)}catch{d("Failed to connect to MT4 server. Please check your connection details."),n({status:"error",message:"Connection failed",lastSync:new Date}),l(!1)}},x=async()=>{try{const k=((await je.User.me()).broker_accounts||[]).map(T=>T.id===e.id?{...T,websocket_url:u,api_key:m,last_connection:new Date().toISOString(),status:"active"}:T);await je.User.updateMyUserData({broker_accounts:k}),t&&t({...e,websocket_url:u,api_key:m,last_connection:new Date().toISOString(),status:"active"})}catch(j){console.error("Error updating account connection details:",j)}},w=async()=>{l(!0);try{setTimeout(()=>{const j={account_number:e.account_number,account_name:"Demo Trading Account",broker:"IC Markets",server:e.server,balance:10542.87,equity:10798.35,margin:1243.56,free_margin:9554.79,margin_level:868.31,leverage:"1:100",currency:"USD",profit:255.48,positions:[{ticket:12345678,symbol:"EURUSD",type:"buy",lots:.1,openPrice:1.0912,currentPrice:1.0935,sl:1.087,tp:1.1,profit:23,commission:-1,swap:-.37,open_time:new Date(Date.now()-864e5).toISOString()},{ticket:12345679,symbol:"GBPUSD",type:"sell",lots:.15,openPrice:1.275,currentPrice:1.272,sl:1.28,tp:1.265,profit:45,commission:-1.5,swap:-.75,open_time:new Date(Date.now()-1728e5).toISOString()},{ticket:12345680,symbol:"XAUUSD",type:"buy",lots:.05,openPrice:2123.45,currentPrice:2168.9,sl:2100,tp:2200,profit:227.25,commission:-2.5,swap:-3.15,open_time:new Date(Date.now()-2592e5).toISOString()}],orders:[{ticket:12345681,symbol:"USDJPY",type:"buy_limit",lots:.2,price:149,sl:148.5,tp:150,open_time:new Date(Date.now()-432e5).toISOString()}],history:[{ticket:12345670,symbol:"USDCAD",type:"sell",lots:.1,open_price:1.362,close_price:1.358,profit:40,close_time:new Date(Date.now()-3456e5).toISOString()},{ticket:12345671,symbol:"EURUSD",type:"buy",lots:.2,open_price:1.088,close_price:1.086,profit:-40,close_time:new Date(Date.now()-432e6).toISOString()}],last_update:new Date().toISOString()};s(j),l(!1)},1500)}catch{d("Failed to fetch account data"),l(!1)}},_=()=>{w()};return a.jsxs(be,{className:"bg-gray-800 border-gray-700 shadow-lg",children:[a.jsx(Be,{className:"pb-2",children:a.jsxs(qe,{className:"text-white flex items-center",children:[a.jsx(fc,{className:"mr-2 h-5 w-5 text-cyan-400"}),"MT4 Bridge Connection"]})}),a.jsxs(Se,{children:[c&&a.jsxs("div",{className:"mb-4 p-3 bg-red-900/20 border border-red-700/30 rounded-md flex items-center gap-2",children:[a.jsx(Lt,{className:"h-4 w-4 text-red-400 flex-shrink-0"}),a.jsx("p",{className:"text-red-400 text-sm",children:c})]}),r.status==="connected"&&a.jsxs("div",{className:"mb-4 p-3 bg-green-900/20 border border-green-700/30 rounded-md flex items-center gap-2",children:[a.jsx(dc,{className:"h-4 w-4 text-green-400 flex-shrink-0"}),a.jsxs("div",{children:[a.jsx("p",{className:"text-green-400 text-sm",children:r.message}),r.lastSync&&a.jsxs("p",{className:"text-xs text-green-500/70",children:["Last sync: ",new Date(r.lastSync).toLocaleTimeString()]})]})]}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"bg-gray-900 p-4 rounded-lg border border-gray-700",children:[a.jsxs("div",{className:"flex items-center justify-between mb-3",children:[a.jsx("h3",{className:"text-white font-medium",children:"MT4 Connection Setup"}),a.jsx(Oe,{className:r.status==="connected"?"bg-green-900/30 text-green-400":r.status==="connecting"?"bg-yellow-900/30 text-yellow-400":r.status==="error"?"bg-red-900/30 text-red-400":"bg-gray-900/30 text-gray-400",children:r.status==="connected"?"Connected":r.status==="connecting"?"Connecting...":r.status==="error"?"Connection
1356Error":"Disconnected"})]}),a.jsxs("div",{className:"space-y-3",children:[!r.status==="connected"&&a.jsxs(a.Fragment,{children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-gray-400 mb-2",children:"To connect your MT4 account, you need to install our MT4 Bridge EA on your MT4 platform."}),a.jsx(se,{variant:"outline",className:"text-xs bg-gray-800 border-gray-600",children:"Download MT4 Bridge EA"})]}),a.jsxs("div",{className:"pt-2",children:[a.jsx("p",{className:"text-sm text-gray-400 mb-3",children:"Connection Settings"}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(Je,{placeholder:"WebSocket URL (e.g., ws://localhost:8080)",value:u,onChange:j=>h(j.target.value),className:"bg-gray-900 border-gray-700 text-gray-300"}),a.jsx(Je,{placeholder:"API Key (from MT4 Bridge EA)",value:m,onChange:j=>g(j.target.value),className:"bg-gray-900 border-gray-700 text-gray-300"})]})]})]}),a.jsxs("div",{className:"pt-2 flex flex-wrap gap-2",children:[a.jsxs(se,{onClick:r.status==="connected"?_:y,disabled:o,className:r.status==="connected"?"bg-cyan-600 hover:bg-cyan-700":"bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-700 hover:to-blue-700",children:[o?a.jsx(Xr,{className:"h-4 w-4 mr-2 animate-spin"}):r.status==="connected"?a.jsx(Xr,{className:"h-4 w-4 mr-2"}):a.jsx(fc,{className:"h-4 w-4 mr-2"}),r.status==="connected"?"Refresh Data":"Connect to MT4"]}),r.status==="connected"&&a.jsx(se,{variant:"outline",onClick:()=>{n({status:"disconnected",message:"Disconnected from MT4 server",lastSync:new Date}),s(null)},className:"border-gray-600",children:"Disconnect"})]}),r.status!=="connected"&&a.jsxs("div",{className:"text-xs text-gray-500 pt-2 flex items-center gap-1",children:[a.jsx(Ar,{className:"h-3 w-3"}),"Your connection is encrypted and secure"]})]})]}),b&&a.jsxs("div",{className:"bg-gray-900 p-4 rounded-lg border border-gray-700",children:[a.jsx("h3",{className:"text-white font-medium mb-3",children:"Advanced Settings"}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-gray-400 mb-1",children:"Polling Interval (seconds)"}),a.jsx(Je,{type:"number",min:"1",max:"60",defaultValue:"5",className:"bg-gray-900 border-gray-700 text-gray-300"})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-gray-400 mb-1",children:"Connection Timeout (seconds)"}),a.jsx(Je,{type:"number",min:"5",max:"300",defaultValue:"30",className:"bg-gray-900 border-gray-700 text-gray-300"})]})]})]}),a.jsx(se,{variant:"ghost",className:"text-gray-400 text-sm",onClick:()=>v(!b),children:b?"Hide Advanced Settings":"Show Advanced Settings"})]}),i&&a.jsxs("div",{className:"mt-6 space-y-4",children:[a.jsxs("div",{className:"bg-gray-900 p-4 rounded-lg border border-gray-700",children:[a.jsx("h3",{className:"text-white font-medium mb-3",children:"Account Summary"}),a.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-gray-500",children:"Balance"}),a.jsxs("p",{className:"text-lg font-semibold text-white",children:["$",i.balance.toFixed(2)]})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-gray-500",children:"Equity"}),a.jsxs("p",{className:`text-lg font-semibold ${i.equity>=i.balance?"text-green-500":"text-red-500"}`,children:["$",i.equity.toFixed(2)]})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-gray-500",children:"Used Margin"}),a.jsxs("p",{className:"text-white",children:["$",i.margin.toFixed(2)]})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-gray-500",children:"Free Margin"}),a.jsxs("p",{className:"text-white",children:["$",i.free_margin.toFixed(2)]})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-gray-500",children:"Margin Level"}),a.jsxs("p",{className:"text-white",children:[i.margin_level,"%"]})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-gray-500",children:"Profit"}),a.jsxs("p",{className:i.profit>=0?"text-green-500 font-semibold":"text-red-500 font-semibold",children:[i.profit>=0?"+":"",i.profit.toFixed(2)," ",i.currency]})]})]})]}),a.jsxs("div",{className:"bg-gray-900 p-4 rounded-lg border border-gray-700",children:[a.jsxs("h3",{className:"text-white font-medium mb-3",children:["Open Positions (",i.positions.length,")"]}),i.positions.length>0?a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full text-sm",children:[a.jsx("thead",{className:"text-gray-400 text-left",children:a.jsxs("tr",{className:"border-b border-gray-700",children:[a.jsx("th",{className:"pb-2",children:"Symbol"}),a.jsx("th",{className:"pb-2",children:"Type"}),a.jsx("th",{className:"pb-2",children:"Size"}),a.jsx("th",{className:"pb-2",children:"Entry"}),a.jsx("th",{className:"pb-2",children:"Current"}),a.jsx("th",{className:"pb-2",children:"S/L"}),a.jsx("th",{className:"pb-2",children:"T/P"}),a.jsx("th",{className:"pb-2 text-right",children:"Profit"})]})}),a.jsx("tbody",{children:i.positions.map(j=>a.jsxs("tr",{className:"border-b border-gray-700/50",children:[a.jsx("td",{className:"py-2 font-medium text-white",children:j.symbol}),a.jsx("td",{children:a.jsx(Oe,{className:j.type==="buy"?"bg-green-500/20 text-green-400":"bg-red-500/20 text-red-400",children:j.type.toUpperCase()})}),a.jsxs("td",{children:[j.lots," lots"]}),a.jsx("td",{children:j.openPrice.toFixed(j.openPrice<10?5:2)}),a.jsx("td",{children:j.currentPrice.toFixed(j.currentPrice<10?5:2)}),a.jsx("td",{className:"text-yellow-500",children:j.sl.toFixed(j.sl<10?5:2)}),a.jsx("td",{className:"text-cyan-500",children:j.tp.toFixed(j.tp<10?5:2)}),a.jsxs("td",{className:`text-right font-medium ${j.profit>=0?"text-green-400":"text-red-400"}`,children:[j.profit>=0?"+":"",j.profit.toFixed(2)]})]},j.ticket))})]})}):a.jsx("p",{className:"text-gray-400 text-center py-4",children:"No open positions"})]}),a.jsxs("div",{className:"bg-gray-900 p-4 rounded-lg border border-gray-700",children:[a.jsxs("h3",{className:"text-white font-medium mb-3",children:["Pending Orders (",i.orders.length,")"]}),i.orders.length>0?a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full text-sm",children:[a.jsx("thead",{className:"text-gray-400 text-left",children:a.jsxs("tr",{className:"border-b border-gray-700",children:[a.jsx("th",{className:"pb-2",children:"Ticket"}),a.jsx("th",{className:"pb-2",children:"Symbol"}),a.jsx("th",{className:"pb-2",children:"Type"}),a.jsx("th",{className:"pb-2",children:"Size"}),a.jsx("th",{className:"pb-2",children:"Price"}),a.jsx("th",{className:"pb-2",children:"S/L"}),a.jsx("th",{className:"pb-2",children:"T/P"})]})}),a.jsx("tbody",{children:i.orders.map(j=>a.jsxs("tr",{className:"border-b border-gray-700/50",children:[a.jsxs("td",{className:"py-2 text-gray-400",children:["#",j.ticket]}),a.jsx("td",{className:"font-medium text-white",children:j.symbol}),a.jsx("td",{children:a.jsx(Oe,{className:"bg-purple-500/20 text-purple-400",children:j.type.replace("_"," ").toUpperCase()})}),a.jsxs("td",{children:[j.lots," lots"]}),a.jsx("td",{className:"text-white",children:j.price.toFixed(j.price<10?5:2)}),a.jsx("td",{className:"text-yellow-500",children:j.sl.toFixed(j.sl<10?5:2)}),a.jsx("td",{className:"text-cyan-500",children:j.tp.toFixed(j.tp<10?5:2)})]},j.ticket))})]})}):a.jsx("p",{className:"text-gray-400 text-center py-4",children:"No pending orders"})]})]})]})]})}function z5e(){const[e,t]=A.useState([]),[r,n]=A.useState({symbol:"BTC/USD",type:"buy",amount:"",price:""}),[i,s]=A.useState("BTC/USD"),[o,l]=A.useState("1h"),[c,d]=A.useState([]),[u,h]=A.useState(null),[m,g]=A.useState(!1),[b,v]=A.useState(!1),[y,x]=A.useState(!1),[w,_]=A.useState(!0);A.useEffect(()=>{j()},[]);const j=async()=>{try{await je.User.me(),x(!0),P()}catch{console.log("User not authenticated, showing public view"),x(!1),S()}finally{k(),_(!1)}},S=()=>{d([{id:"demo1",name:"Demo Account",broker:"Switch Markets",account_number:"12345678",server:"SwitchMarkets-Demo",balance:1e4,equity:10120,margin:240,free_margin:9880,leverage:100,currency:"USD",status:"active",connected_date:new Date().toISOString(),last_connection:new Date().toISOString()}])},k=async()=>{try{let W;y?W=await je.Trade.list("-created_date"):W=T(),t(W)}catch(W){console.error("Error loading trades:",W),t(T())}},T=()=>[{id:"t1",symbol:"EUR/USD",type:"buy",amount:.5,price:1.0862,total:543.1,status:"completed"}
1356,{id:"t2",symbol:"GOLD",type:"sell",amount:.1,price:2372.5,total:237.25,status:"completed"},{id:"t3",symbol:"BTC/USD",type:"buy",amount:.02,price:64325.5,total:1286.51,status:"pending"}],P=async()=>{try{const W=await je.User.me();W.broker_accounts?d(W.broker_accounts):S()}catch(W){console.error("Error fetching broker accounts:",W),S()}},M=async W=>{W.preventDefault();const q=parseFloat(r.amount)*parseFloat(r.price);try{y&&await je.Trade.create({...r,amount:parseFloat(r.amount),price:parseFloat(r.price),total:q,status:"completed"}),t(V=>[{id:`t${Date.now()}`,...r,amount:parseFloat(r.amount),price:parseFloat(r.price),total:q,status:"completed"},...V]),n({symbol:i,type:"buy",amount:"",price:""})}catch(V){console.error("Error placing trade:",V)}},C=W=>{d([...c,W]),h(W),g(!1),v(!0)},O=W=>{const q=c.map(V=>V.id===W.id?W:V);d(q),h(W)},D=W=>{h(W),v(!0)},L=async W=>{try{if(y){const V=((await je.User.me()).broker_accounts||[]).filter(z=>z.id!==W);await je.User.updateMyUserData({broker_accounts:V})}d(q=>q.filter(V=>V.id!==W)),u&&u.id===W&&(h(null),v(!1))}catch(q){console.error("Error removing broker account:",q)}},F=["BTC/USD","ETH/USD","EUR/USD","USD/JPY","GBP/USD","XRP/USD","Gold"],U=[{value:"1m",label:"1 minute"},{value:"5m",label:"5 minutes"},{value:"15m",label:"15 minutes"},{value:"30m",label:"30 minutes"},{value:"1h",label:"1 hour"},{value:"4h",label:"4 hours"},{value:"1d",label:"1 day"}],G=async()=>{try{await je.User.login()}catch(W){console.error("Login failed:",W)}};return w?a.jsx("div",{className:"flex h-full items-center justify-center",children:a.jsxs("div",{className:"flex flex-col items-center gap-2",children:[a.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-cyan-400 border-t-transparent"}),a.jsx("p",{className:"text-cyan-400",children:"Loading trading data..."})]})}):a.jsxs("div",{className:"space-y-4 sm:space-y-6 p-2 sm:p-0",children:[" ",a.jsxs("h1",{className:"text-xl sm:text-2xl font-bold text-white flex items-center",children:[a.jsx(Qr,{className:"mr-2 h-5 w-5 sm:h-6 sm:w-6 text-cyan-400"}),"Trading"]}),a.jsxs("div",{className:"flex flex-col xl:flex-row gap-4 sm:gap-6",children:[a.jsx("div",{className:"xl:w-2/3",children:a.jsx(F5e,{accounts:c,onRefresh:P,onDelete:L,onSelect:D,selectedAccount:u})}),a.jsx("div",{className:"xl:w-1/3",children:a.jsx(be,{className:"bg-gray-800 border-gray-700 shadow-lg p-4 sm:p-6",children:a.jsxs("div",{className:"flex flex-col items-center text-center",children:[a.jsx(fc,{className:"h-10 w-10 sm:h-12 sm:w-12 mb-3 text-cyan-400"}),a.jsx("h2",{className:"text-lg sm:text-xl font-semibold text-white mb-2",children:"MT4/MT5 Integration"}),a.jsx("p",{className:"text-sm sm:text-base text-gray-400 mb-4",children:"Connect your MetaTrader account to enable advanced trading features"}),y?a.jsxs(oa,{open:m,onOpenChange:g,children:[a.jsx(NT,{asChild:!0,children:a.jsxs(se,{className:"w-full bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-700 hover:to-blue-700 text-sm sm:text-base",children:[a.jsx(Kh,{className:"mr-2 h-4 w-4"}),a.jsx("span",{className:"truncate",children:"Connect MT4/MT5 Account"})]})}),a.jsxs(zn,{className:"bg-gray-800 border-gray-700 sm:max-w-[425px] mx-4",children:[a.jsxs(Vn,{children:[a.jsx(Hn,{className:"text-white",children:"Connect Trading Account"}),a.jsx(Xa,{className:"text-gray-400",children:"Enter your MT4/MT5 account details below."})]}),a.jsx($5e,{onLoginSuccess:C})]})]}):a.jsx(se,{className:"w-full bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-700 hover:to-blue-700 text-sm sm:text-base",onClick:G,children:a.jsx("span",{className:"truncate",children:"Sign In to Connect MT4/MT5"})}),a.jsxs("p",{className:"text-xs text-gray-500 mt-4 flex items-center justify-center",children:[a.jsx(Ar,{className:"h-3 w-3 mr-1 flex-shrink-0"}),a.jsx("span",{children:"Your credentials are encrypted and secure"})]})]})})})]}),u&&b&&a.jsx("div",{className:"mb-4 sm:mb-6",children:a.jsx(q5e,{account:u,onAccountUpdate:O})}),u&&u.status==="active"&&a.jsx("div",{className:"mb-4 sm:mb-6",children:a.jsx(B5e,{account:u})}),a.jsxs(be,{className:"p-4 sm:p-6 bg-gray-800 border-gray-700 shadow-lg",children:[a.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center mb-4 gap-4",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("h2",{className:"text-base sm:text-lg font-semibold text-white",children:"Market Chart"}),a.jsx(Oe,{className:"bg-gradient-to-r from-cyan-600 to-cyan-500 text-xs py-0",children:"LIVE"})]}),a.jsxs("div",{className:"flex flex-col sm:flex-row gap-2 w-full sm:w-auto",children:[a.jsxs(qt,{value:i,onValueChange:s,children:[a.jsx($t,{className:"w-full sm:w-32 bg-gray-900 border-gray-700 text-gray-300",children:a.jsx(zt,{})}),a.jsx(Ft,{children:F.map(W=>a.jsx(Ce,{value:W,children:W},W))})]}),a.jsxs(qt,{value:o,onValueChange:l,children:[a.jsx($t,{className:"w-full sm:w-32 bg-gray-900 border-gray-700 text-gray-300",children:a.jsx(zt,{})}),a.jsx(Ft,{children:U.map(W=>a.jsx(Ce,{value:W.value,children:W.label},W.value))})]})]})]}),a.jsx("div",{className:"h-[300px] sm:h-[400px] w-full",children:a.jsx(L5e,{symbol:i,interval:o})})]}),a.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-3 gap-4 sm:gap-6",children:[a.jsxs(be,{className:"p-4 sm:p-6 xl:col-span-2 bg-gray-800 border-gray-700 shadow-lg",children:[a.jsx("h2",{className:"text-base sm:text-lg font-semibold mb-4 text-white",children:"Trade History"}),a.jsxs("div",{className:"sm:hidden space-y-2",children:[e.length===0&&a.jsx("p",{className:"py-4 text-center text-gray-500 text-sm",children:"No trading history available"}),e.map(W=>{var q;return a.jsxs("div",{className:"bg-gray-900/60 rounded-lg p-3 border border-gray-700",children:[a.jsxs("div",{className:"flex items-center justify-between mb-1",children:[a.jsx("span",{className:"font-bold text-white",children:W.symbol}),a.jsx("span",{className:Ie("px-2 py-0.5 rounded-full text-xs",W.status==="completed"?"bg-green-900/30 text-green-400":W.status==="pending"?"bg-yellow-900/30 text-yellow-400":"bg-red-900/30 text-red-400"),children:W.status})]}),a.jsxs("div",{className:"grid grid-cols-3 text-xs text-gray-400 gap-1",children:[a.jsx("span",{className:W.type==="buy"?"text-green-400 font-medium":"text-red-400 font-medium",children:(q=W.type)==null?void 0:q.toUpperCase()}),a.jsxs("span",{children:["Amt: ",a.jsx("span",{className:"text-gray-300",children:W.amount})]}),a.jsxs("span",{children:["Total: ",a.jsxs("span",{className:"text-gray-300",children:["$",W.total]})]})]})]},W.id)})]}),a.jsx("div",{className:"hidden sm:block overflow-x-auto",children:a.jsxs("table",{className:"w-full text-sm",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-gray-700",children:[a.jsx("th",{className:"text-left py-2 text-gray-400 text-xs sm:text-sm",children:"Symbol"}),a.jsx("th",{className:"text-left py-2 text-gray-400 text-xs sm:text-sm",children:"Type"}),a.jsx("th",{className:"text-right py-2 text-gray-400 text-xs sm:text-sm",children:"Amount"}),a.jsx("th",{className:"text-right py-2 text-gray-400 text-xs sm:text-sm",children:"Price"}),a.jsx("th",{className:"text-right py-2 text-gray-400 text-xs sm:text-sm",children:"Total"}),a.jsx("th",{className:"text-left py-2 text-gray-400 text-xs sm:text-sm",children:"Status"})]})}),a.jsxs("tbody",{children:[e.map(W=>a.jsxs("tr",{className:"border-b border-gray-700",children:[a.jsx("td",{className:"py-2 font-medium text-white text-xs sm:text-sm",children:W.symbol}),a.jsx("td",{className:Ie("py-2 text-xs sm:text-sm",W.type==="buy"?"text-green-400":"text-red-400"),children:W.type}),a.jsx("td",{className:"py-2 text-right text-gray-300 text-xs sm:text-sm",children:W.amount}),a.jsxs("td",{className:"py-2 text-right text-gray-300 text-xs sm:text-sm",children:["$",W.price]}),a.jsxs("td",{className:"py-2 text-right text-gray-300 text-xs sm:text-sm",children:["$",W.total]}),a.jsx("td",{className:"py-2",children:a.jsx("span",{className:Ie("px-2 py-1 rounded-full text-xs",W.status==="completed"?"bg-green-900/30 text-green-400":W.status==="pending"?"bg-yellow-900/30 text-yellow-400":"bg-red-900/30 text-red-400"),children:W.status})})]},W.id)),e.length===0&&a.jsx("tr",{children:a.jsx("td",{colSpan:"6",className:"py-4 text-center text-gray-500 text-sm",children:"No trading history available"})})]})]})})]}),a.jsxs(be,{className:"p-4 sm:p-6 bg-gray-800 border-gray-700 shadow-lg",children:[a.jsxs("h2",{className:"text-base sm:text-lg font-semibold mb-4 text-white flex items-center",children:[a.jsx(Kh,{className:"mr-2 h-4 w-4 text-cyan-400"}),"New Trade"]}),a.jsxs("form",{onSubmit:M,className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium mb-1 text-gray-300",children:"Symbol"}),a.jsxs(qt,{value:r.symbol,onValueChange:W=>
1356n({...r,symbol:W}),children:[a.jsx($t,{className:"bg-gray-900 border-gray-700 text-gray-300",children:a.jsx(zt,{placeholder:"Select symbol"})}),a.jsx(Ft,{children:F.map(W=>a.jsx(Ce,{value:W,children:W},W))})]})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium mb-1 text-gray-300",children:"Type"}),a.jsxs(qt,{value:r.type,onValueChange:W=>n({...r,type:W}),children:[a.jsx($t,{className:"bg-gray-900 border-gray-700 text-gray-300",children:a.jsx(zt,{})}),a.jsxs(Ft,{children:[a.jsx(Ce,{value:"buy",children:"Buy"}),a.jsx(Ce,{value:"sell",children:"Sell"})]})]})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium mb-1 text-gray-300",children:"Amount"}),a.jsx(Je,{type:"number",value:r.amount,onChange:W=>n({...r,amount:W.target.value}),placeholder:"Number of shares",required:!0,className:"bg-gray-900 border-gray-700 text-gray-300"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium mb-1 text-gray-300",children:"Price"}),a.jsx(Je,{type:"number",value:r.price,onChange:W=>n({...r,price:W.target.value}),placeholder:"Price per share",required:!0,className:"bg-gray-900 border-gray-700 text-gray-300"})]}),a.jsx(se,{type:"submit",className:"w-full bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-700 hover:to-blue-700",children:"Place Trade"}),!y&&a.jsxs("p",{className:"text-xs text-gray-400 text-center mt-2",children:["Demo mode: You can place trades but they won't be saved until you ",a.jsx("button",{onClick:G,className:"text-cyan-400 hover:underline",children:"sign in"})]})]})]})]})]})}const gh=(e,t)=>e?e.nickname&&e.nickname.trim()!==""?e.nickname.trim():t!=null&&t.show_real_name&&e.full_name&&e.full_name.trim()!==""?e.full_name.trim():e.email?e.email.split("@")[0]:"User":"User";function V5e(){var Te,it,_t,Bt,Et,Yn,Dt,kr;const[e,t]=A.useState(null),[r,n]=A.useState(!0),[i,s]=A.useState(!1),[o,l]=A.useState(null),[c,d]=A.useState([]),[u,h]=A.useState([]),[m,g]=A.useState(!1),[b,v]=A.useState(!1),[y,x]=A.useState(null),[w,_]=A.useState([]),[j,S]=A.useState({show_real_name:!0,show_email:!1}),[k,T]=A.useState(!1),[P,M]=A.useState(null),[C,O]=A.useState(null),[D,L]=A.useState(!1),[F,U]=A.useState(!1),[G,W]=A.useState(!1),[q,V]=A.useState(null),z=A.useCallback(Me=>{t(Me),l({full_name:Me.full_name||"",nickname:Me.nickname||"",bio:Me.bio||"",profile_image:Me.profile_image||"",social_links:Me.social_links||{website:"",twitter:"",linkedin:"",github:""}}),S(Me.privacy_settings||{show_real_name:!0,show_email:!1})},[]),I=A.useCallback(async()=>{var Me,ze,jt;n(!0),V(null);try{const vt=await je.User.me();if(!vt)throw new Error("No user data received");z(vt),await new Promise(Ci=>setTimeout(Ci,200));const[fr,un,dn]=await Promise.all([je.SharedEA.filter({author:vt.email}).catch(()=>[]),je.SharedEAComment.filter({author_email:vt.email}).catch(()=>[]),je.User.list().catch(()=>[])]);if(d(Array.isArray(fr)?fr:[]),h(Array.isArray(un)?un:[]),_(Array.isArray(dn)?dn:[]),vt.email==="[email protected]"||vt.role==="admin"?g(!0):g(!1),Array.isArray(dn)&&dn.length>0){const Oi=[...dn].sort((Rn,ni)=>Rn.email==="[email protected]"?-1:ni.email==="[email protected]"?1:new Date(Rn.created_date)-new Date(ni.created_date)).findIndex(Rn=>Rn.id===vt.id);Oi!==-1&&M(Oi+1)}}catch(vt){console.error("Authentication or data loading error:",vt),((Me=vt.response)==null?void 0:Me.status)===401||(ze=vt.message)!=null&&ze.includes("Unauthorized")||(jt=vt.message)!=null&&jt.includes("not authenticated")?(V("authentication"),t(null),l(null),S({show_real_name:!0,show_email:!1}),d([]),h([]),_([]),g(!1)):(V("general"),console.error("Error details:",vt),Le({title:"Error Loading Profile",description:"Could not load your profile data. Please try refreshing the page.",variant:"destructive"}))}finally{n(!1)}},[z]);A.useEffect(()=>{I()},[I]),A.useEffect(()=>{e&&!i?z(e):!e&&!r&&(l(null),S({show_real_name:!0,show_email:!1}))},[e,i,r,z]);const B=async()=>{try{n(!0),await je.User.login()}catch(Me){console.error("Login failed:",Me),n(!1),Le({title:"Login Error",description:"Could not initiate login. Please try again.",variant:"destructive"})}},H=A.useMemo(()=>!e||!j?"User":gh(e,j),[e,j]),J=Me=>{switch(Me){case"novice":return"bg-gray-600 text-white";case"beginner":return"bg-blue-600 text-white";case"intermediate":return"bg-green-600 text-white";case"advanced":return"bg-yellow-600 text-black";case"expert":return"bg-purple-600 text-white";case"master":return"bg-red-600 text-white";case"grandmaster":return"bg-gradient-to-r from-yellow-400 to-amber-600 text-black";default:return"bg-gray-600 text-white"}},ee=Me=>{switch(Me){case"active":return"bg-green-600 text-white";case"inactive":return"bg-gray-600 text-white";case"banned":return"bg-red-600 text-white";case"premium":return"bg-purple-600 text-white";default:return"bg-gray-600 text-white"}},Y=()=>e?Rt.getXpProgressPercentage(e.xp_points||0,e.level||1):0,X=()=>e?Rt.calculateUserActivityScore(e,c,u):0,ne=(Me,ze)=>{if(!Me)return"N/A";const jt=new Date,vt=new Date(Me),fr=Math.abs(jt-vt),un=Math.floor(fr/(1e3*60*60*24)),dn=Math.floor(un/365.25),Ci=Math.floor(un%365.25/30.44),Oi=Math.floor(un%30.44);return`${ze?`Member #${ze}`:`Joined ${un} days ago`} (${dn}y ${Ci}m ${Oi}d)`},Q=async Me=>{const ze=Me.target.files[0];if(!ze)return;
1356if(!["image/jpeg","image/png","image/gif","image/webp"].includes(ze.type)){Le({title:"Invalid file type",description:"Please upload a valid image file (JPEG, PNG, GIF, or WebP)",variant:"destructive"});return}const vt=5*1024*1024;if(ze.size>vt){Le({title:"File too large",description:"Please upload an image smaller than 5MB",variant:"destructive"});return}T(!0);try{const fr=await ka.UploadFile({file:ze});if(fr&&fr.file_url)l(un=>({...un,profile_image:fr.file_url})),Le({title:"Success",description:"Profile image uploaded. Click 'Save Changes' to apply.",variant:"default"});else throw new Error("No URL returned from upload")}catch(fr){console.error("Error uploading profile image:",fr),Le({title:"Upload failed",description:"Failed to upload image. Please try again. "+(fr.message||""),variant:"destructive"})}finally{T(!1),Me.target&&(Me.target.value="")}},ie=async()=>{var Me,ze,jt,vt;if(!e||!o||!j){Le({title:"Error",description:"User data not fully loaded or missing.",variant:"destructive"});return}try{const fr={full_name:o.full_name||"",nickname:o.nickname||"",bio:o.bio||"",profile_image:o.profile_image||"",social_links:{website:((Me=o.social_links)==null?void 0:Me.website)||"",twitter:((ze=o.social_links)==null?void 0:ze.twitter)||"",linkedin:((jt=o.social_links)==null?void 0:jt.linkedin)||"",github:((vt=o.social_links)==null?void 0:vt.github)||""},privacy_settings:{show_real_name:j.show_real_name===void 0?!0:j.show_real_name,show_email:j.show_email===void 0?!1:j.show_email}};await je.User.updateMyUserData(fr),t(un=>({...un,...fr})),s(!1),Le({title:"Profile Updated",description:"Your profile has been successfully updated.",variant:"default"})}catch(fr){console.error("Error updating profile:",fr),Le({title:"Error",description:"Could not update profile. "+(fr.message||""),variant:"destructive"})}},me=async(Me,ze)=>{try{await je.User.update(Me,{status:ze}),_(jt=>jt.map(vt=>vt.id===Me?{...vt,status:ze}:vt)),(y==null?void 0:y.id)===Me&&x(jt=>({...jt,status:ze})),Le({title:"User Status Updated",description:`User status set to ${ze}.`})}catch(jt){console.error("Error updating user status:",jt),Le({title:"Error",description:`Failed to update status for user ${Me}.`,variant:"destructive"})}},oe=async(Me,ze)=>{try{await je.User.update(Me,{rank:ze}),_(jt=>jt.map(vt=>vt.id===Me?{...vt,rank:ze}:vt)),(y==null?void 0:y.id)===Me&&x(jt=>({...jt,rank:ze})),Le({title:"User Rank Updated",description:`User rank set to ${ze}.`})}catch(jt){console.error("Error updating user rank:",jt),Le({title:"Error",description:`Failed to update rank for user ${Me}.`,variant:"destructive"})}},Ne=Me=>{O(Me),L(!0)},_e=async()=>{if(e){W(!0);try{for(const Me of c)await je.SharedEA.delete(Me.id).catch(()=>{});for(const Me of u)await je.SharedEAComment.delete(Me.id).catch(()=>{});Le({title:"Account Deleted",description:"Your account data has been removed. You will be signed out."}),setTimeout(()=>{window.location.href="/"},2e3)}catch(Me){console.error("Error deleting account:",Me),Le({title:"Error",description:"Failed to delete account. Please contact support.",variant:"destructive"})}finally{W(!1),U(!1)}}},xe=async()=>{if(!C||!e||C.author!==e.email){Le({title:"Error",description:"Cannot delete this EA.",variant:"destructive"}),L(!1),O(null);return}try{await je.SharedEA.delete(C.id),d(Me=>Me.filter(ze=>ze.id!==C.id)),Le({title:"Success",description:`${C.name} has been deleted.`})}catch(Me){console.error("Error deleting EA:",Me),Le({title:"Error",description:`Failed to delete ${C.name}.`,variant:"destructive"})}L(!1),O(null)};if(r)return a.jsx("div",{className:"flex justify-center items-center h-screen",children:a.jsx(kt,{className:"h-12 w-12 animate-spin text-cyan-500"})});if(q==="authentication")return a.jsxs("div",{className:"text-center py-20",children:[a.jsx(Ar,{className:"h-16 w-16 text-gray-500 mx-auto mb-4"}),a.jsx("h2",{className:"text-2xl font-bold text-white mb-2",children:"Not Logged In"}),a.jsx("p",{className:"text-gray-400 mb-6",children:"Please log in to view your profile and contribute to the community."}),a.jsx(se,{onClick:B,className:"bg-gradient-to-r from-cyan-600 to-blue-600 text-lg px-8 py-3",children:"Sign In / Register"})]});if(q==="general")return a.jsxs("div",{className:"text-center py-20",children:[a.jsx(Ar,{className:"h-16 w-16 text-red-500 mx-auto mb-4"}),a.jsx("h2",{className:"text-2xl font-bold text-white mb-2",children:"Error Loading Profile"}),a.jsx("p",{className:"text-gray-400 mb-6",children:"There was an error loading your profile data. Please try refreshing the page."}),a.jsxs("div",{className:"flex gap-4 justify-center",children:[a.jsx(se,{onClick:()=>window.location.reload(),variant:"outline",className:"text-gray-300 border-gray-600",children:"Refresh Page"}),a.jsx(se,{onClick:B,className:"bg-gradient-to-r from-cyan-600 to-blue-600",children:"Try Login Again"})]})]});if(i&&(!o||!j))return a.jsxs("div",{className:"flex justify-center items-center h-screen",children:[a.jsx(kt,{className:"h-12 w-12 animate-spin text-cyan-500"}),a.jsx("p",{className:"ml-3 text-white",children:"Loading editor..."})]});const Ee=(e==null?void 0:e.level)||Rt.calculateLevel((e==null?void 0:e.xp_points)||0),Pe=Rt.getXpInCurrentLevel((e==null?void 0:e.xp_points)||0,Ee),Z=Rt.getXpToNextLevel(Ee),ae=Me=>Rt.getLevelBenefits(Me),pe=()=>a.jsx(Pt,{value:"eas",className:"mt-6",children:a.jsxs(be,{className:"bg-gray-800 border-gray-700",children:[a.jsx(Be,{children:a.jsxs(qe,{className:"text-white flex items-center justify-between",children:[a.jsx("span",{children:"Shared Trading EAs"}),a.jsx(se,{className:"bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-700 hover:to-blue-700",size:"sm",asChild:!0,children:a.jsxs(pt,{to:Ve("Community"),children:[a.jsx(Ts,{className:"h-4 w-4 mr-2"}),"Share New EA"]})})]})}),a.jsx(Se,{children:c.length>0?a.jsx("div",{className:"space-y-4",children:c.map(Me=>{var ze,jt;return a.jsxs(be,{className:"bg-gray-700/50 border-gray-600 hover:border-cyan-600/50 transition-colors",children:[a.jsx(Se,{className:"p-4",children:a.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[a.jsx("div",{className:"w-full sm:w-20 h-20 sm:h-auto rounded-lg overflow-hidden bg-gray-800 flex-shrink-0",children:a.jsx("img",{src:Me.thumbnail_url||(e==null?void 0:e.profile_image)||"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/cbd7c9_3D-1175.png",alt:Me.name,className:"w-full h-full object-cover"})}),a.jsxs("div",{className:"flex-1",children:[a.jsx("h3",{className:"text-lg font-medium text-white",children:Me.name}),a.jsxs("div",{className:"flex items-center gap-2 mt-1 flex-wrap",children:[a.jsx(Oe,{className:"bg-cyan-900/30 text-cyan-400",children:(ze=Me.platform)==null?void 0:ze.toUpperCase()}),a.jsxs("div",{className:"flex items-center gap-1 text-sm text-gray-400",children:[a.jsx(Gn,{className:"h-3.5 w-3.5"}),a.jsx("span",{children:Me.downloads||0})]}),a.jsxs("div",{className:"flex items-center gap-1 text-sm text-gray-400",children:[a.jsx(Ju,{className:"h-3.5 w-3.5"}),a.jsx("span",{children:Me.likes||0})]}),a.jsxs("div",{className:"flex items-center gap-1 text-sm text-gray-400",children:[a.jsx(Kr,{className:"h-3.5 w-3.5 text-yellow-400"}),a.jsxs("span",{children:[((jt=Me.average_rating)==null?void 0:jt.toFixed(1))||"N/A"," (",Me.comment_count||0,")"]})]})]}),a.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:["Shared on: ",new Date(Me.share_date).toLocaleDateString()]}),a.jsxs("div",{className:"flex items-center gap-2 mt-3",children:[a.jsx(se,{variant:"outline",size:"sm",className:"h-8 text-xs border-cyan-600/30 text-cyan-400 hover:bg-cyan-900/20",asChild:!0,children:a.jsxs(pt,{to:`${Ve("Community")}?tab=details&ea_id=${Me.id}`,children:[a.jsx(Fd,{className:"h-3.5 w-3.5 mr-1.5"})," View Details"]}
1356)}),a.jsx(se,{variant:"outline",size:"sm",className:"h-8 text-xs border-gray-600 text-gray-300 hover:bg-gray-700/50",asChild:!0,children:a.jsxs(pt,{to:`${Ve("MqlGenerator")}?action=edit&robotId=${Me.robot_id}`,children:[a.jsx(Oh,{className:"h-3.5 w-3.5 mr-1.5"})," Edit Original"]})})]})]})]})}),a.jsx(mp,{className:"flex justify-end p-3 border-t border-gray-700/50",children:e&&Me.author===e.email&&a.jsxs(se,{variant:"destructive",size:"sm",onClick:()=>Ne(Me),children:[a.jsx(Ud,{className:"h-4 w-4 mr-1"})," Delete"]})})]},Me.id)})}):a.jsxs("div",{className:"text-center py-10",children:[a.jsx(Ts,{className:"h-10 w-10 text-gray-500 mx-auto mb-2"}),a.jsx("p",{className:"text-gray-400",children:"You haven't shared any EAs yet"}),a.jsx(se,{className:"mt-4 bg-gradient-to-r from-cyan-600 to-blue-600",asChild:!0,children:a.jsx(pt,{to:Ve("MqlGenerator"),children:"Create Your First EA"})})]})})]})}),ye=()=>a.jsx(Pt,{value:"comments",className:"mt-6",children:a.jsxs(be,{className:"bg-gray-800 border-gray-700",children:[a.jsx(Be,{children:a.jsx(qe,{className:"text-white",children:"My Comments & Reviews"})}),a.jsx(Se,{children:u.length>0?a.jsx("div",{className:"space-y-4",children:u.map(Me=>a.jsx(be,{className:"bg-gray-700/50 border-gray-600",children:a.jsx(Se,{className:"p-4",children:a.jsxs("div",{className:"flex items-start justify-between",children:[a.jsxs("div",{className:"flex-1",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[[1,2,3,4,5].map(ze=>a.jsx(Kr,{className:`h-4 w-4 ${ze<=Me.rating?"text-yellow-400 fill-yellow-400":"text-gray-600"}`},ze)),a.jsxs("span",{className:"text-xs text-gray-400 ml-1",children:["on EA: ",a.jsx(pt,{to:`${Ve("Community")}?tab=details&ea_id=${Me.ea_id}`,className:"text-cyan-400 hover:underline",children:Me.ea_name||"View EA"})]})]}),a.jsx("p",{className:"text-sm text-gray-300 whitespace-pre-wrap",children:Me.content})]}),a.jsx("div",{className:"text-xs text-gray-500 ml-4 flex-shrink-0",children:new Date(Me.comment_date).toLocaleDateString()})]})})},Me.id))}):a.jsxs("div",{className:"text-center py-10",children:[a.jsx(pr,{className:"h-10 w-10 text-gray-500 mx-auto mb-2"}),a.jsx("p",{className:"text-gray-400",children:"You haven't posted any comments or reviews yet"}),a.jsx(se,{className:"mt-4 bg-gradient-to-r from-cyan-600 to-blue-600",asChild:!0,children:a.jsx(pt,{to:Ve("Community"),children:"Browse Community EAs"})})]})})]})}),he=()=>{var Me;return a.jsx(Pt,{value:"activity",className:"mt-6",children:a.jsxs(be,{className:"bg-gray-800 border-gray-700",children:[a.jsxs(Be,{children:[a.jsx(qe,{className:"text-white",children:"Activity & Achievements"}),a.jsx(ic,{className:"text-gray-400",children:"Earn points and level up by participating in the community"})]}),a.jsx(Se,{children:a.jsxs("div",{className:"space-y-8",children:[a.jsxs("div",{children:[a.jsxs("h3",{className:"text-lg font-medium text-white mb-3 flex items-center gap-2",children:[a.jsx(FS,{className:"h-5 w-5 text-cyan-400"}),"Progress to Next Level"]}),a.jsxs(be,{className:"bg-gray-700/50 border-gray-600 p-4",children:[a.jsxs("div",{className:"flex justify-between items-center mb-2",children:[a.jsxs("div",{children:[a.jsxs("span",{className:"text-sm font-medium text-gray-300",children:["Level ",Ee]}),a.jsx("div",{className:"text-xs text-gray-500 mt-1",children:Rt.getRankName(Ee)})]}),a.jsxs("div",{className:"text-right",children:[a.jsxs("span",{className:"text-sm font-medium text-gray-300",children:["Level ",Ee+1]}),a.jsx("div",{className:"text-xs text-cyan-400 mt-1",children:((Me=ae(Ee+1).find(ze=>ze.level===Ee+1))==null?void 0:Me.benefit)||"More benefits unlock"})]})]}),a.jsx(Wy,{value:Y(),max:100,className:"h-4 bg-gray-800 rounded-full",foregroundClass:"bg-gradient-to-r from-cyan-500 to-blue-500 rounded-full"}),a.jsxs("div",{className:"flex justify-between mt-2 text-xs text-gray-400",children:[a.jsxs("span",{children:[(e==null?void 0:e.xp_points)||0," XP earned"]}),a.jsxs("span",{children:[Z-Pe," XP to next level"]})]})]})]}),a.jsxs("div",{children:[a.jsxs("h3",{className:"text-lg font-medium text-white mb-3 flex items-center gap-2",children:[a.jsx(F4,{className:"h-5 w-5 text-cyan-400"}),"Activity Breakdown"]}),a.jsxs("div",{className:"space-y-3 p-4 bg-gray-700/50 rounded-lg border border-gray-600",children:[Object.entries(Rt.POINTS).map(([ze,jt])=>{let vt=0;return ze==="SHARE_EA"?vt=c.length:ze==="COMMENT"?vt=u.length:ze==="LIKE_EA"?vt=e.eas_liked||0:ze==="RECEIVE_LIKE"?vt=e.likes_received||0:ze==="FORUM_POST"?vt=e.forum_posts||0:ze==="DAILY_LOGIN"&&(vt=e.login_streak||0),vt>0||ze==="DAILY_LOGIN"?a.jsxs("div",{className:"flex justify-between items-center",children:[a.jsx("span",{className:"text-sm text-gray-300 capitalize",children:ze.replace(/_/g," ").toLowerCase()}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-cyan-400 font-medium",children:vt}),a.jsxs("span",{className:"text-xs text-gray-500",children:["+",vt*jt," pts"]})]})]},ze):null}),a.jsxs("div",{className:"flex justify-between items-center",children:[a.jsx("span",{className:"text-sm text-gray-300",children:"Achievements Earned"}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-cyan-400 font-medium",children:(e==null?void 0:e.achievements_earned)||0}),a.jsxs("span",{className:"text-xs text-gray-500",children:["+",(e==null?void 0:e.achievements_earned)||0," pts"]})]})]}),a.jsx("div",{className:"h-px bg-gray-600 my-2"}),a.jsxs("div",{className:"flex justify-between items-center font-medium",children:[a.jsx("span",{className:"text-white",children:"Total Activity Score"}),a.jsx("span",{className:"text-lg text-cyan-400",children:X()})]})]})]}),a.jsxs("div",{children:[a.jsxs("h3",{className:"text-lg font-medium text-white mb-3 flex items-center gap-2",children:[a.jsx(Es,{className:"h-5 w-5 text-cyan-400"}),"Level Benefits"]}),a.jsx("div",{className:"space-y-2",children:ae(Ee).map((ze,jt)=>a.jsxs("div",{className:`p-3 rounded-lg flex items-center justify-between ${ze.level<=Ee?"bg-cyan-900/20 border border-cyan-800/30":"bg-gray-700/50 border border-gray-600/30 opacity-70"}`,children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center text-white font-bold text-sm ${ze.level<=Ee?"bg-cyan-600":"bg-gray-600"}`,children:ze.level}),a.jsx("span",{className:ze.level<=Ee?"text-white":"text-gray-400",children:ze.benefit})]}),ze.level<=Ee&&a.jsx(Oe,{className:"bg-cyan-500 text-white",children:"Unlocked"}),ze.level>Ee&&a.jsxs("span",{className:"text-xs text-gray-500",children:[ze.level-Ee," levels away"]})]},jt))}),a.jsxs("div",{className:"mt-6 p-4 bg-gradient-to-r from-purple-900/30 to-indigo-900/30 rounded-lg border border-indigo-800/30",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(Ar,{className:"h-8 w-8 text-indigo-400 flex-shrink-0"}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-medium text-white",children:"Earn 500 bonus points!"}),a.jsx("p",{className:"text-sm text-gray-300",children:"Register with our trusted broker partner, Switch Markets, and boost your level progress."})]})]}),a.jsxs(se,{className:"w-full mt-3 bg-gradient-to-r from-indigo-600 to-purple-600 hover:from-indigo-700 hover:to-purple-700",onClick:()=>window.open("https://www.switchmarkets.com/signup?lid=6603&pid=107341","_blank"),children:["Sign Up with Switch Markets ",a.jsx(Br,{className:"h-4 w-4 ml-2"})]})]})]}),e!=null&&e.badges&&Array.isArray(e.badges)&&e.badges.length>0?a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:e.badges.map((ze,jt)=>a.jsxs(be,{className:"bg-gray-700/50 border-gray-600 p-4 flex items-center gap-3",children:[a.jsx("div",{className:"h-10 w-10 rounded-full bg-gradient-to-br from-yellow-500 to-amber-600 flex items-center justify-center flex-shrink-0",children:a.jsx(Es,{className:"h-5 w-5 text-white"})}),a.jsx("div",{children:a.jsx("p",{className:"font-medium text-white",children:ze})})]},jt))}):a.jsxs(be,{className:"bg-gray-700/50 border-gray-600 p-6 text-center",children:[a.jsx(Es,{className:"h-10 w-10 text-gray-500 mx-auto mb-2"}),a.jsx("p",{className:"text-gray-400 mb-3",children:"Complete actions to earn badges!"}),a.jsxs("ul",{className:"text-sm text-gray-400 space-y-2 text-left mx-auto max-w-xs",children:[a.jsxs("li",{className:"flex items-center gap-2",children:[a.jsx(Ts,{className:"h-4 w-4 text-cyan-400"}),' Share your first EA for "Creator"']}),a.jsxs("li",{className:"flex items-center gap-2",children:[a.jsx(pr,{className:"h-4 w-4 text-cyan-400"}),' Leave 5 reviews for "Contributor"']}),a.jsxs("li",{className:"flex items-center gap-2",children:[a.jsx(Kr,{className:"h-4 w-4 text-cyan-400"}),' Get 10 likes for "Popular"']})]})]})]})})]})})},He=()=>{var Me;return a.jsx(Pt,{value:"admin",className:"mt-6",children:a.jsx(oa,{open:b,onOpenChange:v,children:a.jsxs(zn,{className:"max-w-4xl min-h-[70vh] flex flex-col bg-gray-800 border-gray-700 text-white",children:[a.jsx(Vn,{className:"p-4 border-b border-gray-700",children:a.jsxs(Hn,{className:"text-xl flex items-center gap-2",children:[a.jsx(Ar,{className:"h-6 w-6 text-red-500"}),"Admin Panel - User Management"]})}
1356),a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-5 gap-4 p-4 flex-grow overflow-hidden",children:[a.jsxs("div",{className:"md:col-span-2 h-full flex flex-col overflow-hidden",children:[a.jsx(Je,{type:"text",placeholder:"Search users by name or email...",className:"mb-3 bg-gray-900 border-gray-700 placeholder-gray-500"}),a.jsx(VP,{className:"flex-grow border border-gray-700 rounded-md",children:a.jsx("div",{className:"p-2 space-y-1",children:Array.isArray(w)&&w.map(ze=>{var jt;return a.jsxs("div",{className:`p-2 rounded-md flex items-center gap-3 cursor-pointer transition-colors ${(y==null?void 0:y.id)===ze.id?"bg-cyan-700/30 border border-cyan-600":"hover:bg-gray-700/50"}`,onClick:()=>x(ze),children:[a.jsxs(Rs,{className:"h-10 w-10 flex-shrink-0",children:[a.jsx(Ds,{src:ze.profile_image,alt:gh(ze,ze.privacy_settings)}),a.jsx(Is,{className:"bg-gray-600 text-sm",children:(jt=ze.nickname||ze.full_name||ze.email)==null?void 0:jt.charAt(0).toUpperCase()})]}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"text-sm font-medium text-white truncate",children:gh(ze,ze.privacy_settings)}),a.jsx("p",{className:"text-xs text-gray-400 truncate",children:ze.email})]}),a.jsx(Oe,{variant:"outline",className:`${ee(ze.status)} text-xs px-1.5 py-0.5 border-opacity-50`,children:ze.status||"active"})]},ze.id)})})})]}),a.jsx("div",{className:"md:col-span-3 h-full overflow-y-auto bg-gray-850 p-4 rounded-md border border-gray-700",children:y?a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"flex items-start gap-4",children:[a.jsxs(Rs,{className:"h-20 w-20 border-2 border-cyan-500",children:[a.jsx(Ds,{src:y.profile_image,alt:gh(y,y.privacy_settings)}),a.jsx(Is,{className:"bg-gray-600 text-2xl",children:(Me=y.nickname||y.full_name||y.email)==null?void 0:Me.charAt(0).toUpperCase()})]}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-2xl font-semibold text-white",children:gh(y,y.privacy_settings)}),a.jsx("p",{className:"text-md text-cyan-400",children:y.email}),a.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[a.jsxs(Oe,{className:`${J(y.rank)} shadow-sm`,children:["Rank: ",y.rank||"novice"]}),a.jsxs(Oe,{className:`${ee(y.status)} shadow-sm`,children:["Status: ",y.status||"active"]})]})]})]}),a.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[a.jsxs(be,{className:"bg-gray-700/50 border-gray-600 p-4",children:[a.jsx("h4",{className:"font-medium text-gray-300 mb-2",children:"User Status"}),a.jsxs(qt,{value:y.status||"active",onValueChange:ze=>me(y.id,ze),children:[a.jsx($t,{className:"bg-gray-900 border-gray-700 text-white",children:a.jsx(zt,{})}),a.jsxs(Ft,{children:[a.jsx(Ce,{value:"active",children:"Active"}),a.jsx(Ce,{value:"inactive",children:"Inactive"}),a.jsx(Ce,{value:"banned",children:"Banned"}),a.jsx(Ce,{value:"premium",children:"Premium"})]})]})]}),a.jsxs(be,{className:"bg-gray-700/50 border-gray-600 p-4",children:[a.jsx("h4",{className:"font-medium text-gray-300 mb-2",children:"User Rank"}),a.jsxs(qt,{value:y.rank||"novice",onValueChange:ze=>oe(y.id,ze),children:[a.jsx($t,{className:"bg-gray-900 border-gray-700 text-white",children:a.jsx(zt,{})}),a.jsxs(Ft,{children:[a.jsx(Ce,{value:"novice",children:"Novice"}),a.jsx(Ce,{value:"beginner",children:"Beginner"}),a.jsx(Ce,{value:"intermediate",children:"Intermediate"}),a.jsx(Ce,{value:"advanced",children:"Advanced"}),a.jsx(Ce,{value:"expert",children:"Expert"}),a.jsx(Ce,{value:"master",children:"Master"}),a.jsx(Ce,{value:"grandmaster",children:"Grandmaster"})]})]})]})]}),a.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-3 text-center",children:[{label:"XP Points",value:y.xp_points||0},{label:"EAs Shared",value:y.eas_shared_count||0},{label:"Comments",value:y.comments_posted_count||0},{label:"Likes Given",value:y.eas_liked||0},{label:"Likes Received",value:y.likes_received||0},{label:"Forum Posts",value:y.forum_posts||0}].map(ze=>a.jsxs(be,{className:"bg-gray-700/50 border-gray-600 p-3",children:[a.jsx("p",{className:"text-xs text-gray-400 mb-0.5",children:ze.label}),a.jsx("p",{className:"text-xl font-bold text-white",children:ze.value})]},ze.label))}),a.jsxs(be,{className:"bg-gray-700/50 border-gray-600 p-4",children:[a.jsx("h4",{className:"font-medium text-gray-300 mb-2",children:"Admin Notes (Private)"}),a.jsx(Wn,{placeholder:"Add private admin notes about this user... These notes are only visible to admins.",className:"bg-gray-900 border-gray-700 text-white h-24"}),a.jsx(se,{size:"sm",variant:"outline",className:"mt-2 border-cyan-600/30 text-cyan-400 hover:bg-cyan-900/20",children:"Save Notes"})]}),a.jsxs("div",{className:"flex flex-wrap gap-3 justify-between items-center pt-3 border-t border-gray-700",children:[a.jsxs(se,{variant:"outline",className:"text-cyan-400 border-cyan-600/30 hover:bg-cyan-900/20",onClick:()=>window.open(`mailto:${y.email}`,"_blank"),children:[a.jsx(sp,{className:"h-4 w-4 mr-2"}),"Email User"]}),a.jsxs(se,{variant:"destructive",disabled:y.email===(e==null?void 0:e.email),children:[a.jsx(CB,{className:"h-4 w-4 mr-2"}),"Ban User"]}
1356)]})]}):a.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center py-12",children:[a.jsx(Nu,{className:"h-16 w-16 text-gray-600 mb-4"}),a.jsx("p",{className:"text-gray-400",children:"Select a user from the list to view and manage their details."})]})})]})]})})})};return a.jsxs("div",{className:"space-y-6 pb-12",children:[a.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4",children:[a.jsxs("h1",{className:"text-3xl font-bold text-white flex items-center gap-3",children:[a.jsx(Nu,{className:"h-8 w-8 text-cyan-400"}),"My Profile"]}),m&&a.jsxs(se,{variant:"destructive",onClick:()=>v(!0),children:[a.jsx(Ar,{className:"h-4 w-4 mr-2"})," Admin Panel"]})]}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[a.jsxs(be,{className:"lg:col-span-1 bg-gray-800 border-gray-700",children:[a.jsx(Be,{children:a.jsxs(qe,{className:"text-white flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Nu,{className:"h-5 w-5 text-cyan-400"}),"Profile Summary"]}),i?a.jsxs("div",{className:"flex gap-2 w-full sm:w-auto",children:[a.jsx(se,{variant:"outline",size:"sm",className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 flex-1 sm:flex-grow-0",onClick:()=>{s(!1),e&&z(e)},children:"Cancel"}),a.jsxs(se,{variant:"default",size:"sm",className:"bg-green-600 hover:bg-green-700 text-white flex-1 sm:flex-grow-0",onClick:ie,children:[a.jsx(Tv,{className:"h-4 w-4 mr-1"})," Save Changes"]})]}):a.jsxs(se,{variant:"outline",size:"sm",className:"border-cyan-600/30 text-cyan-500 hover:bg-cyan-900/20 w-full sm:w-auto",onClick:()=>s(!0),children:[a.jsx(Oh,{className:"h-4 w-4 mr-1"})," Edit"]})]})}),a.jsx(Se,{children:a.jsxs("div",{className:"flex flex-col items-center text-center",children:[i&&o&&j?a.jsxs("div",{className:"space-y-3 w-full",children:[a.jsxs("div",{className:"space-y-4 mb-4",children:[a.jsxs("div",{className:"relative group",children:[a.jsxs(Rs,{className:"h-20 w-20 sm:h-24 sm:w-24 mx-auto border-4 border-cyan-600/50",children:[a.jsx(Ds,{src:o.profile_image||(e==null?void 0:e.profile_image),alt:H}),a.jsx(Is,{className:"bg-gray-700 text-xl",children:(H==null?void 0:H.charAt(0).toUpperCase())||"U"}),a.jsx("label",{htmlFor:"profile-image-upload-input",className:"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity bg-black/50 rounded-full cursor-pointer",children:a.jsx(oJ,{className:"h-8 w-8 text-cyan-400"})}),k&&a.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/70 rounded-full",children:a.jsx(kt,{className:"h-8 w-8 animate-spin text-cyan-400"})})]}),a.jsx(Je,{type:"file",id:"profile-image-upload-input",accept:"image/jpeg,image/png,image/gif,image/webp",onChange:Q,className:"hidden",disabled:k})]}),a.jsx(Je,{type:"text",placeholder:"Image URL (or upload above)",value:o.profile_image||"",onChange:Me=>l({...o,profile_image:Me.target.value}),className:"bg-gray-900 border-gray-700"}),a.jsx("p",{className:"text-xs text-gray-500",children:"Or paste URL. Supported: JPEG, PNG, GIF, WebP (max 5MB)"})]}),a.jsxs("div",{children:[a.jsx(Nr,{htmlFor:"edit-nickname",className:"text-sm text-gray-400 mb-1 block text-left",children:"Nickname (Public)"}),a.jsx(Je,{id:"edit-nickname",value:o.nickname||"",onChange:Me=>l({...o,nickname:Me.target.value}),className:"bg-gray-900 border-gray-700",placeholder:"Your Public Nickname"}),a.jsx("p",{className:"text-xs text-gray-500 mt-1 text-left",children:"This name will be displayed publicly. If empty, your full name (if public) or email part will be used."})]}),a.jsxs("div",{children:[a.jsx(Nr,{htmlFor:"edit-fullname",className:"text-sm text-gray-400 mb-1 block text-left",children:"Full Name"}),a.jsx(Je,{id:"edit-fullname",value:o.full_name||"",onChange:Me=>l({...o,full_name:Me.target.value}),className:"bg-gray-900 border-gray-700",placeholder:"Your Full Name"}),a.jsx("p",{className:"text-xs text-gray-500 mt-1 text-left",children:"Your full name. Visibility depends on privacy settings below."})]}),a.jsxs("div",{className:"space-y-2 text-left mt-3",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(dm,{checked:j.show_real_name,onCheckedChange:Me=>S({...j,show_real_name:!!Me}),id:"show-real-name"}),a.jsx("label",{htmlFor:"show-real-name",className:"text-sm text-gray-400 cursor-pointer",children:"Show Full Name Publicly (if no nickname)"})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(dm,{checked:j.show_email,onCheckedChange:Me=>S({...j,show_email:!!Me}),id:"show-email"}),a.jsx("label",{htmlFor:"show-email",className:"text-sm text-gray-400 cursor-pointer",children:"Show Email Publicly"})]})]}),a.jsx(Wn,{value:o.bio||"",onChange:Me=>l({...o,bio:Me.target.value}),placeholder:"Tell the community about yourself...",className:"mt-4 bg-gray-900 border-gray-700",rows:3}),a.jsxs("div",{className:"space-y-2 pt-2",children:[a.jsx("p",{className:"text-sm text-gray-400 text-left",children:"Social Links (Optional)"}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Gh,{className:"h-4 w-4 text-gray-500"}),a.jsx(Je,{value:((Te=o.social_links)==null?void 0:Te.website)||"",onChange:Me=>l({...o,social_links:{...o.social_links||{},website:Me.target.value}}),placeholder:"Website URL",className:"bg-gray-900 border-gray-700 text-sm"})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Qo,{className:"h-4 w-4 text-gray-500"}),a.jsx(Je,{value:((it=o.social_links)==null?void 0:it.twitter)||"",onChange:Me=>l({...o,social_links:{...o.social_links||{},twitter:Me.target.value}}),placeholder:"Twitter URL",className:"bg-gray-900 border-gray-700 text-sm"})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(qS,{className:"h-4 w-4 text-gray-500"}),a.jsx(Je,{value:((_t=o.social_links)==null?void 0:_t.linkedin)||"",onChange:Me=>l({...o,social_links:{...o.social_links||{},linkedin:Me.target.value}}),placeholder:"LinkedIn URL",className:"bg-gray-900 border-gray-700 text-sm"})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(U4,{className:"h-4 w-4 text-gray-500"}),a.jsx(Je,{value:((Bt=o.social_links)==null?void 0:Bt.github)||"",onChange:Me=>l({...o,social_links:{...o.social_links||{},github:Me.target.value}}),placeholder:"GitHub URL",className:"bg-gray-900 border-gray-700 text-sm"})]})]})]}):e?a.jsxs(a.Fragment,{children:[a.jsxs(Rs,{className:"h-20 w-20 sm:h-24 sm:w-24 mx-auto border-4 border-cyan-600/50 group mb-3",children:[a.jsx(Ds,{src:e.profile_image,alt:H}),a.jsx(Is,{className:"bg-gray-700 text-xl",children:(H==null?void 0:H.charAt(0).toUpperCase())||"U"})]}),a.jsx("h2",{className:"text-lg sm:text-xl font-bold text-white mb-1",children:H}),e.nickname&&e.nickname.trim()!==""&&(j==null?void 0:j.show_real_name)&&e.full_name&&e.full_name.trim()!==""&&e.nickname.trim()!==e.full_name.trim()&&a.jsxs("p",{className:"text-sm text-gray-500",children:["(",e.full_name,")"]}),(j==null?void 0:j.show_email)&&e.email&&a.jsx("p",{className:"text-gray-400",children:e.email}),a.jsx("p",{className:"text-gray-300 mt-4 text-sm px-2 leading-relaxed whitespace-pre-line break-words",children:e.bio||"No bio provided yet."}),a.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-2 justify-center mt-4",children:[((Et=e==null?void 0:e.social_links)==null?void 0:Et.website)&&a.jsxs("a",{href:e.social_links.website,target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-cyan-400 flex items-center gap-1",children:[a.jsx(Gh,{className:"h-4 w-4"})," Website"]}),((Yn=e==null?void 0:e.social_links)==null?void 0:Yn.twitter)&&a.jsxs("a",{href:e.social_links.twitter,target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-cyan-400 flex items-center gap-1",children:[a.jsx(Qo,{className:"h-4 w-4"})," Twitter"]}),((Dt=e==null?void 0:e.social_links)==null?void 0:Dt.linkedin)&&a.jsxs("a",{href:e.social_links.linkedin,target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-cyan-400 flex items-center gap-1",children:[a.jsx(qS,{className:"h-4 w-4"})," LinkedIn"]}),((kr=e==null?void 0:e.social_links)==null?void 0:kr.github)&&a.jsxs("a",{href:e.social_links.github,target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-cyan-400 flex items-center gap-1",children:[a.jsx(U4,{className:"h-4 w-4"})," GitHub"]})]})]}):null,e&&a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex items-center gap-2 mt-4 justify-center",children:[a.jsx(Oe,{className:`${J(e.rank)} shadow-md`,children:e.rank?e.rank.charAt(0).toUpperCase()+e.rank.slice(1):"Novice"}),a.jsx(Oe,{className:`${ee(e.status)} shadow-md`,children:e.status?e.status.charAt(0).toUpperCase()+e.status.slice(1):"Active"})]}),a.jsxs("div",{className:"w-full mt-6 mb-2",children:[a.jsxs("div",{className:"flex justify-between text-xs mb-1",children:[a.jsxs("span",{className:"text-gray-400",children:["Level ",Ee]}),a.jsxs("span",{className:"text-gray-400",children:[Pe," / ",Z," XP"]})]}),a.jsx(Wy,{value:Y(),max:100,className:"h-2.5 bg-gray-700",foregroundClass:"bg-gradient-to-r from-cyan-500 to-blue-500 rounded-full"})]}),a.jsxs("div",{className:"w-full mt-6",children:[a.jsxs("div",{className:"flex justify-between items-center mb-2",children:[a.jsx("span",{className:"text-sm text-gray-400",children:"Activity Score"}),a.jsx("span",{className:"text-lg font-bold text-cyan-400",children:X()})]}),a.jsx(Wy,{value:X(),max:1e3,className:"h-2.5 bg-gray-700",foregroundClass:"bg-gradient-to-r from-purple-500 to-pink-500 rounded-full"})]}),a.jsxs("div",{className:"w-full grid grid-cols-2 gap-3 mt-6",children:[a.jsxs("div",{className:"text-center p-3 rounded-lg bg-gray-700/50",children:[a.jsx("span",{className:"block text-xl font-bold text-cyan-400",children:c.length}),a.jsx("span",{className:"text-xs text-gray-400",children:"EAs Shared"})]}),a.jsxs("div",{className:"text-center p-3 rounded-lg bg-gray-700/50",children:[a.jsx("span",{className:"block text-xl font-bold text-cyan-400",children:u.length}),a.jsx("span",{className:"text-xs text-gray-400",children:"Comments"})]})]})]})]})})]}),a.jsxs(be,{className:"lg:col-span-1 bg-gray-800 border-gray-700",children:[a.jsx(Be,{children:a.jsxs(qe,{className:"text-white flex items-center gap-2",children:[a.jsx(BB,{className:"h-5 w-5 text-yellow-400"}),"Achievements & Stats"]})}),a.jsxs(Se,{className:"space-y-4",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-2 text-gray-300",children:[a.jsx(Es,{className:"h-5 w-5 text-yellow-400"}),a.jsx("span",{children:"Points Earned"})]}),a.jsxs(Oe,{className:"bg-yellow-600/20 text-yellow-400 border border-yellow-700/30",children:[(e==null?void 0:e.xp_points)||0," XP"]})]}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-2 text-gray-300",children:[a.jsx(Kr,{className:"h-5 w-5 text-yellow-400"}),a.jsx("span",{children:"EAs Liked"})]}),a.jsx(Oe,{className:"bg-purple-900/30 text-purple-400",children:(e==null?void 0:e.eas_liked)||0})]}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-2 text-gray-300",children:[a.jsx(Ju,{className:"h-5 w-5 text-green-400"}),a.jsx("span",{children:"Likes Received"})]}),a.jsx(Oe,{className:"bg-green-900/30 text-green-400",children:(e==null?void 0:e.likes_received)||0})]}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-2 text-gray-300",children:[a.jsx(pr,{className:"h-5 w-5 text-blue-400"}),a.jsx("span",{children:"Forum Posts"})]}),a.jsx(Oe,{className:"bg-blue-900/30 text-blue-400",children:(e==null?void 0:e.forum_posts)||0})]}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-2 text-gray-300",children:[a.jsx(F4,{className:"h-5 w-5 text-red-400"}),a.jsx("span",{children:"Login Streak"})]}),a.jsxs(Oe,{className:"bg-red-900/30 text-red-400",children:[(e==null?void 0:e.login_streak)||0," days"]})]}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-2 text-gray-300",children:[a.jsx(Nu,{className:"h-5 w-5 text-cyan-400"}),a.jsx("span",{children:"Membership"})]}),a.jsx("span",{className:"text-sm font-medium text-cyan-400",children:ne(e==null?void 0:e.created_date,P)})]}),(e==null?void 0:e.last_activity)&&a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-2 text-gray-300",children:[a.jsx(Za,{className:"h-5 w-5 text-gray-500"}),a.jsx("span",{children:"Last Activity"})]}),a.jsx("span",{className:"text-sm text-gray-400",children:new Date(e.last_activity).toLocaleDateString()})]})]})]}),a.jsxs(be,{className:"lg:col-span-1 bg-gray-800 border-gray-700",children:[a.jsx(Be,{children:a.jsxs(qe,{className:"text-white flex items-center gap-2",children:[a.jsx(ji,{className:"h-5 w-5 text-gray-400"}),"Account Settings"]})}),a.jsxs(Se,{className:"space-y-3",children:[a.jsxs(se,{variant:"outline",className:"w-full text-gray-300 border-gray-600 hover:bg-gray-700/50",onClick:()=>s(!0),children:[a.jsx(Oh,{className:"mr-2 h-4 w-4"})," Edit Profile & Privacy"]}),a.jsx(se,{variant:"outline",className:"w-full text-gray-300 border-gray-600 hover:bg-gray-700/50",disabled:!0,children:"Change Password (Coming Soon)"}),a.jsx(se,{variant:"destructive",className:"w-full",onClick:()=>
1356U(!0),children:"Delete My Account"})]})]})]}),a.jsx("div",{className:"lg:col-span-3 mt-6",children:a.jsxs(ei,{defaultValue:"eas",className:"w-full",children:[a.jsxs(Ta,{className:"bg-gray-800 border-gray-700 rounded-lg",children:[a.jsxs(Nt,{value:"eas",className:"data-[state=active]:bg-gray-700 data-[state=active]:text-white",children:[a.jsx(Ts,{className:"h-4 w-4 mr-2"})," My Shared EAs"]}),a.jsxs(Nt,{value:"comments",className:"data-[state=active]:bg-gray-700 data-[state=active]:text-white",children:[a.jsx(pr,{className:"h-4 w-4 mr-2"})," My Comments"]}),a.jsxs(Nt,{value:"activity",className:"data-[state=active]:bg-gray-700 data-[state=active]:text-white",children:[a.jsx(FS,{className:"h-4 w-4 mr-2"})," Activity & Progress"]}),m&&a.jsxs(Nt,{value:"admin",className:"data-[state=active]:bg-red-700 data-[state=active]:text-white text-red-300 data-[state=active]:text-white",onClick:()=>v(!0),children:[a.jsx(Ar,{className:"h-4 w-4 mr-2"})," Admin"]})]}),a.jsx(pe,{}),a.jsx(ye,{}),a.jsx(he,{}),m&&a.jsx(He,{})]})}),a.jsx(Ym,{open:F,onOpenChange:U,children:a.jsxs(Md,{className:"bg-gray-800 border-gray-700 text-white",children:[a.jsxs(Rd,{children:[a.jsx(Id,{className:"text-red-400",children:"Delete Your Account?"}),a.jsxs(Ld,{className:"text-gray-400",children:["This action ",a.jsx("strong",{className:"text-red-400",children:"cannot be undone"}),". All your shared EAs, comments, and profile data will be permanently deleted."]})]}),a.jsxs(Dd,{children:[a.jsx(Xm,{className:"text-gray-300 border-gray-600 hover:bg-gray-700",children:"Cancel"}),a.jsxs($d,{onClick:_e,className:"bg-red-600 hover:bg-red-700",disabled:G,children:[G?a.jsx(kt,{className:"h-4 w-4 animate-spin mr-2"}):null,"Yes, delete my account"]})]})]})}),a.jsx(Ym,{open:D,onOpenChange:L,children:a.jsxs(Md,{className:"bg-gray-800 border-gray-700 text-white",children:[a.jsxs(Rd,{children:[a.jsx(Id,{children:"Are you absolutely sure?"}),a.jsxs(Ld,{className:"text-gray-400",children:["This action cannot be undone. This will permanently delete your shared EA",a.jsxs("span",{className:"font-semibold text-cyan-400",children:[" ",C==null?void 0:C.name," "]}),"and remove it from the community."]})]}),a.jsxs(Dd,{children:[a.jsx(Xm,{onClick:()=>O(null),className:"text-gray-300 border-gray-600 hover:bg-gray-700",children:"Cancel"}),a.jsx($d,{onClick:xe,className:"bg-red-600 hover:bg-red-700",children:"Yes, delete EA"})]})]})})]})}function H5e(){const[e,t]=A.useState(!0),[r,n]=A.useState(null),{toast:i}=np(),[s,o]=A.useState("https://www.switchmarkets.com/signup?lid=6603&pid=107341"),[l,c]=A.useState("Switch Markets");A.useEffect(()=>{je.User.me().then(n).catch(()=>{}),(async()=>{try{const m=await On.getConfig("broker_signup_url","https://www.switchmarkets.com/signup?lid=6603&pid=107341"),g=await On.getConfig("broker_name","Switch Markets");o(m),c(g)}catch(m){console.warn("Error loading broker configuration for popup, using defaults:",m)}})()},[]);const d=async()=>{if(s&&window.open(s,"_blank"),r)try{await Rt.trackBrokerRegistration(r),i({title:"Thank You!",description:`Points awarded for checking out ${l}. We'll verify your registration soon.`,variant:"success"}),n(h=>({...h,broker_registered:!0,broker_pending_verification:!0}))}catch(h){console.error("Error tracking broker registration:",h),i({title:"Action Tracked",description:`We noted you visited ${l}. Manual verification might be needed.`,variant:"default"})}localStorage.setItem("broker_popup_interacted","true"),t(!1)},u=()=>{localStorage.setItem("broker_popup_dismissed",Date.now().toString()),t(!1)};return e?a.jsx(oa,{open:e,onOpenChange:t,children:a.jsxs(zn,{className:"sm:max-w-[480px] bg-gray-800 border-gray-700 text-white shadow-xl rounded-lg",children:[a.jsxs(Vn,{className:"p-6 pb-4",children:[a.jsxs(Hn,{className:"text-xl font-semibold flex items-center",children:["ð Boost Your Trading with ",l,"!"]}),a.jsxs(Xa,{className:"text-gray-300 mt-2",children:["Open an account with our trusted partner, ",l,", to unlock exclusive benefits on robot4trade and enhance your trading experience. Get started with a reliable, regulated broker."]})]}),a.jsx("div",{className:"p-6 pt-2 space-y-4",children:a.jsxs("ul",{className:"list-disc list-inside space-y-1 text-gray-400 text-sm",children:[a.jsx("li",{children:"Access to competitive trading conditions."}),a.jsx("li",{children:"Seamless integration with robot4trade EAs."}),a.jsx("li",{children:"Earn bonus XP and unlock achievements on robot4trade."}),a.jsx("li",{children:"Reliable platform for serious traders."})]})}),a.jsxs(Wa,{className:"p-6 pt-4 bg-gray-800/50 rounded-b-lg flex flex-col sm:flex-row sm:justify-between gap-3",children:[a.jsxs(se,{variant:"outline",onClick:u,className:"border-gray-600 text-gray-300 hover:bg-gray-700 w-full sm:w-auto",children:[a.jsx(Ks,{className:"h-4 w-4 mr-2"}),"Maybe Later"]}),a.jsxs(se,{onClick:d,className:"bg-gradient-to-r from-cyan-500 to-blue-600 hover:from-cyan-600 hover:to-blue-700 w-full sm:w-auto",children:["Visit ",l," ",a.jsx(Br,{className:"h-4 w-4 ml-2"})]})]})]})}):null}function W5e(){const[e,t]=A.useState([]),[r,n]=A.useState(null),[i,s]=A.useState(null),[o,l]=A.useState(!1);A.useEffect(()=>{(async()=>{try{const g=await je.User.me();n(g)}catch(g){console.error("Error loading user:",g)}})()},[]),A.useEffect(()=>{if(!r)return;const m=async()=>{try{const b=await je.Notification.list(),v=new Date,y=b.filter(x=>{if(x.expiry_date&&new Date(x.expiry_date)<v||x.is_dismissed&&x.is_dismissed[r.email])return!1;if(!x.recipient_groups||x.recipient_groups.includes("all"))return!0;const w=r.status||"free",_=r.role==="admin";return x.recipient_groups.includes("vip")&&w==="vip"||x.recipient_groups.includes("premium")&&(w==="premium"||w==="vip")||x.recipient_groups.includes("free")&&w==="free"||x.recipient_groups.includes("admin")&&_});if(t(y),y.length>0){const x=y.find(w=>!w.is_read||!w.is_read[r.email]);
1356x&&!o&&(s(x),l(!0))}}catch(b){console.error("Error loading notifications:",b)}};m();const g=setInterval(m,6e4);return()=>clearInterval(g)},[r,o]);const c=async m=>{if(!(!i||!r))try{const g=i.id;if(m==="read"||m==="both"){const b={...i.is_read||{}};b[r.email]=!0,await je.Notification.update(g,{is_read:b})}if(m==="dismiss"||m==="both"){const b={...i.is_dismissed||{}};b[r.email]=!0,await je.Notification.update(g,{is_dismissed:b}),t(v=>v.filter(y=>y.id!==g))}i.show_once&&c("both"),l(!1),s(null)}catch(g){console.error("Error updating notification:",g)}},d=()=>{i!=null&&i.show_once?c("both"):c("read"),l(!1),s(null)},u=m=>{switch(m){case"Bell":return a.jsx(Ko,{className:"h-6 w-6 text-cyan-400"});case"Info":return a.jsx(Bk,{className:"h-6 w-6 text-blue-400"});case"AlertCircle":return a.jsx(Lt,{className:"h-6 w-6 text-red-400"});case"Star":return a.jsx(Kr,{className:"h-6 w-6 text-yellow-400"});case"Gift":return a.jsx($k,{className:"h-6 w-6 text-purple-400"});case"Download":return a.jsx(Gn,{className:"h-6 w-6 text-green-400"});case"MessageCircle":return a.jsx(jJ,{className:"h-6 w-6 text-pink-400"});default:return a.jsx(Ko,{className:"h-6 w-6 text-gray-400"})}},h=m=>{switch(m){case"success":return"border-l-4 border-l-green-500";case"warning":return"border-l-4 border-l-amber-500";case"error":return"border-l-4 border-l-red-500";case"info":return"border-l-4 border-l-blue-500";case"update":return"border-l-4 border-l-purple-500";case"promo":return"border-l-4 border-l-pink-500";default:return"border-l-4 border-l-gray-500"}};return a.jsx(a.Fragment,{children:a.jsx(Ym,{open:o,onOpenChange:l,children:a.jsxs(Md,{className:`bg-gray-800 border-gray-700 ${i?h(i.type):""} max-w-md`,children:[a.jsxs(Rd,{className:"flex gap-4 items-start",children:[i&&u(i.icon),a.jsxs("div",{className:"flex-1",children:[a.jsx(Id,{className:"text-lg text-white",children:i==null?void 0:i.title}),a.jsx(Ld,{className:"text-gray-300",children:i==null?void 0:i.message})]}),a.jsx(se,{variant:"ghost",size:"icon",className:"h-6 w-6 absolute top-4 right-4",onClick:d,children:a.jsx(Ks,{className:"h-4 w-4"})})]}),a.jsxs(Dd,{className:"flex justify-end",children:[(i==null?void 0:i.link)&&a.jsx(se,{onClick:()=>{window.open(i.link,"_blank"),c("read")},className:"bg-cyan-600 hover:bg-cyan-700",children:"View Details"}),a.jsx($d,{onClick:()=>c("dismiss"),className:"bg-gray-700 hover:bg-gray-600 text-gray-300",children:"Dismiss"})]})]})})})}function G5e(){const[e,t]=A.useState(null),[r,n]=A.useState(!1),[i,s]=A.useState(null),[o,l]=A.useState(!0),[c,d]=A.useState(!1);A.useEffect(()=>{(async()=>{l(!0);try{const b=await je.User.me();s(b)}catch(b){console.warn("User not logged in or error fetching user:",b.message),s(null)}finally{l(!1)}})()},[]),A.useEffect(()=>{if(o||!i||c)return;let g=!0;const b=async()=>{try{const v=await je.GlobalPopup.list().catch(w=>(console.warn("GlobalPopup entity may not exist:",w),[]));if(!g)return;const x=v.filter(w=>w.status==="active").find(w=>!w.seen_by||!w.seen_by[i.email]);x&&!r&&(t(x),n(!0))}catch(v){console.warn("Error checking for popups:",v.message),d(!0)}};if(b(),!c){const v=setInterval(b,3e4);return()=>{g=!1,clearInterval(v)}}return()=>{g=!1}},[i,o,r,c]);const u=async()=>{if(!(!e||!i))try{const g={...e.seen_by||{}};g[i.email]=!0,await je.GlobalPopup.update(e.id,{seen_by:g}),n(!1),t(null)}catch(g){console.error("Error updating popup seen status:",g),n(!1),t(null)}},h=g=>{switch(g){case"info":return a.jsx(Bk,{className:"h-6 w-6 text-blue-400"});case"success":return a.jsx(Kr,{className:"h-6 w-6 text-green-400"});case"warning":return a.jsx(Lt,{className:"h-6 w-6 text-amber-400"});case"error":return a.jsx(Lt,{className:"h-6 w-6 text-red-400"});case"update":return a.jsx(Gn,{className:"h-6 w-6 text-purple-400"});case"promo":return a.jsx($k,{className:"h-6 w-6 text-pink-400"});case"announcement":return a.jsx(Ko,{className:"h-6 w-6 text-cyan-400"});default:return a.jsx(Ko,{className:"h-6 w-6 text-gray-400"})}},m=g=>{switch(g){case"info":return"border-l-4 border-l-blue-500";case"success":return"border-l-4 border-l-green-500";case"warning":return"border-l-4 border-l-amber-500";case"error":return"border-l-4 border-l-red-500";case"update":return"border-l-4 border-l-purple-500";case"promo":return"border-l-4 border-l-pink-500";case"announcement":return"border-l-4 border-l-cyan-500";default:return"border-l-4 border-l-gray-500"}};return!e||!r||o||c?null:a.jsx(oa,{open:r,onOpenChange:g=>{g||u()},children:a.jsxs(zn,{className:Ie("bg-gray-800 border-gray-700 sm:max-w-md",m(e.type)),onEscapeKeyDown:u,onPointerDownOutside:g=>{e.dismissible?u():g.preventDefault()},children:[a.jsx(Vn,{children:a.jsxs("div",{className:"flex items-start",children:[a.jsx("div",{className:"mr-2 mt
1356-1",children:h(e.type)}),a.jsxs("div",{className:"flex-1",children:[a.jsx(Hn,{className:"text-white text-xl",children:e.title}),e.created_by&&a.jsx(Xa,{className:"text-gray-400",children:"Admin message"})]}),e.dismissible&&a.jsx("button",{onClick:u,className:"absolute top-3 right-3 p-1 rounded-md text-gray-400 hover:text-white hover:bg-gray-700 transition-colors",children:a.jsx(Ks,{className:"h-5 w-5"})})]})}),a.jsx("div",{className:"text-gray-200 py-2",children:e.message}),a.jsxs(Wa,{className:"flex flex-col sm:flex-row items-center justify-end gap-2 sm:justify-end pt-4",children:[e.action_url&&a.jsxs(se,{variant:"default",onClick:()=>{window.open(e.action_url,"_blank"),e.dismissible&&u()},className:"bg-cyan-600 hover:bg-cyan-700 w-full sm:w-auto",children:[a.jsx(Br,{className:"w-4 h-4 mr-2"}),e.action_text||"Learn More"]}),e.dismissible&&a.jsx(se,{variant:"outline",onClick:u,className:"border-gray-600 text-gray-300 hover:bg-gray-700 w-full sm:w-auto",children:"Dismiss"})]})]})})}const dB="betaNoticeShown";function K5e(){const[e,t]=A.useState(!1),r=()=>{sessionStorage.getItem(dB)||(t(!0),sessionStorage.setItem(dB,"true"))};return A.useEffect(()=>{const n=setTimeout(()=>{r()},2e4);return()=>clearTimeout(n)},[]),A.useEffect(()=>{const n=()=>{t(!0)};return window.addEventListener("showBetaNotice",n),()=>{window.removeEventListener("showBetaNotice",n)}},[]),e?a.jsx(oa,{open:e,onOpenChange:t,children:a.jsxs(zn,{className:"sm:max-w-md bg-gray-800 border-yellow-600/50 text-white shadow-xl rounded-lg",children:[a.jsxs(Vn,{className:"flex flex-row items-center space-x-4",children:[a.jsx(Ji,{className:"h-10 w-10 text-yellow-400 flex-shrink-0"}),a.jsxs("div",{children:[a.jsx(Hn,{className:"text-xl font-bold text-yellow-400",children:"BETA NOTICE"}),a.jsx(Xa,{className:"text-gray-300 mt-1",children:"Robot4Trade is currently in a public BETA phase."})]})]}),a.jsxs("div",{className:"py-4 space-y-4 text-gray-200",children:[a.jsx("p",{children:"AI-generated code may be inaccurate or incomplete. Please use it as a powerful starting point, not a final product."}),a.jsxs("div",{className:"space-y-3",children:[a.jsxs("a",{href:"https://gpt4trade.com/MQL5",target:"_blank",rel:"noopener noreferrer",className:"flex items-center text-sm p-3 rounded-md bg-gray-700/50 hover:bg-gray-700 transition-colors",children:[a.jsx("span",{className:"text-xl mr-3",children:"ð§"}),a.jsxs("div",{children:[a.jsx("span",{className:"font-semibold text-white",children:"For best results, test carefully and consult a pro."}),a.jsxs("div",{className:"flex items-center text-cyan-400",children:[a.jsx("span",{children:"Visit gpt4trade.com/MQL5"}),a.jsx(Br,{className:"h-3 w-3 ml-1.5"})]})]})]}),a.jsxs("a",{href:"https://t.me/slaizvar",target:"_blank",rel:"noopener noreferrer",className:"flex items-center text-sm p-3 rounded-md bg-gray-700/50 hover:bg-gray-700 transition-colors",children:[a.jsx("span",{className:"text-xl mr-3",children:"ð¬"}),a.jsxs("div",{children:[a.jsx("span",{className:"font-semibold text-white",children:"Have feedback or need help? Message us."}),a.jsxs("div",{className:"flex items-center text-cyan-400",children:[a.jsx("span",{children:"Contact @slaizvar"}),a.jsx(Br,{className:"h-3 w-3 ml-1.5"})]})]})]})]})]}),a.jsx(Wa,{children:a.jsx(se,{onClick:()=>t(!1),className:"w-full bg-yellow-500 hover:bg-yellow-600 text-black font-bold",children:"I Understand"})})]})}):null}function Y5e(){const[e,t]=A.useState(!1),[r,n]=A.useState(0);A.useEffect(()=>{const o=localStorage.getItem("vps_banner_dismissed"),l=localStorage.getItem("vps_banner_dismissed_time");if(o&&l){const d=Date.now()-parseInt(l),u=1440*60*1e3;if(d<u)return}const c=setInterval(()=>{n(d=>{const u=d+1;return u>=180&&!e&&!o&&t(!0),u})},1e3);return()=>clearInterval(c)},[e]);const i=()=>{t(!1),localStorage.setItem("vps_banner_dismissed","true"),localStorage.setItem("vps_banner_dismissed_time",Date.now().toString())},s=()=>{window.open("https://cabinet.switchmarkets.com/links/go/6634","_blank"),i()};return e?a.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50 backdrop-blur-sm",children:a.jsxs("div",{className:"relative max-w-2xl mx-4 bg-white rounded-2xl shadow-2xl overflow-hidden",children:[a.jsx("button",{onClick:i,className:"absolute top-4 right-4 z-10 bg-black bg-opacity-20 hover:bg-opacity-40 rounded-full p-2 text-white transition-all",children:a.jsx(Ks,{className:"h-5 w-5"})}),a.jsx("div",{className:"cursor-pointer",onClick:s,children:a.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/68373e3f1c18c880ebeee7f9/526b555bc_FREEVPS.jpg",alt:"Free Forex VPS Worth $497 - Switch Markets",className:"w-full h-auto"})}),a.jsxs("div",{className:"p-6 bg-gradient-to-r from-blue-900 to-green-700",children:[a.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-center items-center",children:[a.jsx(se,{onClick:s,className:"bg-green-500 hover:bg-green-600 text-white font-bold px-8 py-3 text-lg w-full sm:w-auto",children:"Get FREE VPS Now!"}),a.jsx(se,{onClick:i,variant:"outline",className:"border-white text-white hover:bg-white hover:text-blue-900 w-full sm:w-auto",children:"Maybe Later"})]}),a.jsx("p",{className:"text-white text-xs text-center mt-3 opacity-80",children:"Limited time offer ⢠No deposit required ⢠Professional trading environment"})]})]})}):null}function X5e(){const[e,t]=A.useState(!1),[r,n]=A.useState("https://www.switchmarkets.com/signup?lid=6603&pid=107341"),[i,s]=A.useState("Switch Markets");A.useEffect(()=>{(async()=>{try{const h=await On.getConfig("broker_signup_url","https://www.switchmarkets.com/signup?lid=6603&pid=107341"),m=await On.getConfig("broker_name","Switch Markets");h&&n(h),m&&s(m)}catch{}})();const d=localStorage.getItem("broker_banner_dismissed_time");if(d&&Date.now()-parseInt(d)<1440*60*1e3)return;const u=setTimeout(()=>t(!0),60*1e3);return()=>clearTimeout(u)},[]);const o=()=>{t(!1),localStorage.setItem("broker_banner_dismissed_time",Date.now().toString())},l=()=>{window.open(r,"_blank","noopener,noreferrer"),o()};return a.jsx(vc,{children:e&&a.jsx(Sr.div,{initial:{opacity:0}
1356,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-60 backdrop-blur-sm p-4",onClick:o,children:a.jsxs(Sr.div,{initial:{scale:.9,y:24},animate:{scale:1,y:0},exit:{scale:.95,opacity:0},transition:{type:"spring",damping:22,stiffness:260},className:"relative w-full max-w-lg rounded-2xl overflow-hidden shadow-2xl border border-cyan-500/30",style:{background:"linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #0c4a6e 100%)"},onClick:c=>c.stopPropagation(),children:[a.jsx("button",{onClick:o,className:"absolute top-3 right-3 z-10 p-2 rounded-full bg-black/40 hover:bg-black/70 text-gray-300 hover:text-white transition-all","aria-label":"Close",children:a.jsx(Ks,{className:"h-4 w-4"})}),a.jsx("div",{className:"pointer-events-none absolute -top-16 -left-16 w-48 h-48 rounded-full bg-cyan-500/20 blur-3xl"}),a.jsx("div",{className:"pointer-events-none absolute -bottom-16 -right-16 w-48 h-48 rounded-full bg-blue-600/20 blur-3xl"}),a.jsxs("div",{className:"relative p-6 sm:p-8 text-center",children:[a.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-gradient-to-br from-cyan-500 to-blue-600 shadow-lg shadow-cyan-500/30 mb-4",children:a.jsx(Ar,{className:"h-8 w-8 text-white"})}),a.jsxs("h3",{className:"text-xl sm:text-2xl font-bold text-white mb-2",children:["Ready to trade with a"," ",a.jsx("span",{className:"bg-gradient-to-r from-cyan-400 to-blue-400 bg-clip-text text-transparent",children:"professional broker?"})]}),a.jsxs("p",{className:"text-gray-300 text-sm sm:text-base mb-6",children:["Open an account with ",a.jsx("span",{className:"font-semibold text-white",children:i})," â the regulated, prop-trading-friendly broker recommended by robot4trade. Perfect for FTMO bots, EAs and automated strategies."]}),a.jsxs("div",{className:"grid grid-cols-3 gap-3 mb-6 text-center",children:[a.jsxs("div",{className:"rounded-lg bg-white/5 border border-white/10 p-3",children:[a.jsx(Ar,{className:"h-5 w-5 mx-auto text-cyan-400 mb-1"}),a.jsx("p",{className:"text-[11px] sm:text-xs text-gray-300 font-medium",children:"Regulated & Trusted"})]}),a.jsxs("div",{className:"rounded-lg bg-white/5 border border-white/10 p-3",children:[a.jsx(ss,{className:"h-5 w-5 mx-auto text-cyan-400 mb-1"}),a.jsx("p",{className:"text-[11px] sm:text-xs text-gray-300 font-medium",children:"EA-Friendly Spreads"})]}),a.jsxs("div",{className:"rounded-lg bg-white/5 border border-white/10 p-3",children:[a.jsx($k,{className:"h-5 w-5 mx-auto text-cyan-400 mb-1"}),a.jsx("p",{className:"text-[11px] sm:text-xs text-gray-300 font-medium",children:"Fast Withdrawals"})]})]}),a.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-center",children:[a.jsxs(se,{onClick:l,className:"w-full sm:w-auto bg-gradient-to-r from-cyan-500 to-blue-600 hover:from-cyan-600 hover:to-blue-700 text-white font-bold px-8 py-3 text-base shadow-lg shadow-cyan-500/30",children:["Open Free Account",a.jsx(Br,{className:"h-4 w-4 ml-2"})]}),a.jsx(se,{onClick:o,variant:"outline",className:"w-full sm:w-auto border-gray-600 text-gray-300 hover:bg-white/5 hover:text-white",children:"Maybe Later"})]}),a.jsx("p",{className:"text-[11px] text-gray-500 mt-4",children:"Sponsor message ⢠robot4trade may receive a commission at no extra cost to you"})]})]})})})}const Q5e=[{name:"Dashboard",label:"Home",icon:Fk,href:Ve("Dashboard")},{name:"AISignals",label:"Signals",icon:Jy,href:Ve("AISignals")},{name:"MqlGenerator",label:"Bot Maker",icon:er,href:Ve("MqlGenerator")},{name:"Community",label:"Community",icon:la,href:Ve("Community")}];function Z5e({currentPageName:e}){return a.jsx("nav",{className:"lg:hidden fixed bottom-0 left-0 right-0 z-50 bg-[#171E26]/95 backdrop-blur-md border-t border-gray-700/60",style:{paddingBottom:"max(0.4rem, env(safe-area-inset-bottom, 0px))",paddingLeft:"env(safe-area-inset-left, 0px)",paddingRight:"env(safe-area-inset-right, 0px)"},children:a.jsx("div",{className:"flex items-stretch h-16 px-1.5",children:Q5e.map(t=>{const r=e===t.name;return a.jsxs(pt,{to:t.href,"aria-current":r?"page":void 0,className:Ie("flex-1 flex flex-col items-center justify-center gap-1 rounded-xl transition-all active:scale-95 select-none",r?"text-cyan-400":"text-[#8E9AA9] hover:text-gray-200"),children:[a.jsx("span",{className:Ie("flex items-center justify-center h-9 w-9 rounded-full transition-colors",r?"bg-cyan-500/15":"bg-transparent"),children:a.jsx(t.icon,{className:Ie("h-[22px] w-[22px]",r&&"drop-shadow-[0_0_6px_rgba(34,211,238,0.7)]")})}),a.jsx("span",{className:Ie("text-[11px] font-semibold leading-none",r&&"text-cyan-400"),children:t.label})]},t.name)}
1356)})})}const fB=[{name:"Dashboard",icon:Fk,href:Ve("Dashboard"),roles:["all"]},{name:"Chart AI",icon:Zy,href:Ve("ChartAI"),roles:["all"]},{name:"AI Bot Maker",icon:er,href:Ve("MqlGenerator"),roles:["all"]},{name:"Screener",icon:Mk,href:Ve("Screener"),roles:["all"]},{name:"Monte Carlo",icon:Qr,href:Ve("MonteCarlo"),roles:["all"]},{name:"Best Brokers",icon:Ar,href:Ve("BestBrokers"),roles:["all"]},{name:"PAMM",icon:la,href:Ve("PAMM"),roles:["all"]},{name:"Challenge",icon:Qr,href:Ve("Challenge"),roles:["all"]},{name:"Free EAs",icon:la,href:Ve("Community"),roles:["all"]},{name:"Robots",icon:_i,href:Ve("Robots"),roles:["all"]},{name:"Forum",icon:pr,href:Ve("Forum"),roles:["all"]},{name:"Blog",icon:Pc,href:Ve("Blog"),roles:["all"]},{name:"AI Signals",icon:Jy,href:Ve("AISignals"),roles:["all"]},{name:"Trading",icon:Qr,href:Ve("Trading"),roles:["user","admin"]},{name:"About Us",icon:Bk,href:Ve("AboutUs"),roles:["all"]}],hB=[{name:"Strategy Builder",icon:Mk,href:Ve("StrategyBuilder"),roles:["admin"]},{name:"Admin Panel",icon:Ar,href:Ve("AdminPanel"),roles:["admin"]}],J5e=e=>{var t;return e?e.nickname&&e.nickname.trim()!==""?e.nickname.trim():(t=e.privacy_settings)!=null&&t.show_real_name&&e.full_name&&e.full_name.trim()!==""?e.full_name.trim():e.email?e.email.split("@")[0]:"User":"User"},eDe=new Set(["Dashboard","AISignals","MqlGenerator","Community","Forum"]);function tDe({children:e,currentPageName:t}){var V;const r=Hd(),n=!eDe.has(t),[i,s]=A.useState(!1),[o,l]=A.useState(0),[c,d]=A.useState(!1),[u,h]=A.useState(0),[m,g]=A.useState(0),[b,v]=A.useState(!1),[y,x]=A.useState(null),{toast:w}=np(),[_,j]=A.useState([]),[S,k]=A.useState(!1),[T,P]=A.useState("Member"),M=A.useCallback((z,I)=>{let B=[...fB.filter(H=>!!(H.roles.includes("all")||z&&H.roles.includes("user")))];I&&B.push(...hB),j(B)},[]),C=A.useCallback(async()=>{var z;try{const I=await vn.auth.me();return x(I),d(!0),P(J5e(I)),I.email==="[email protected]"||I.role==="admin"?(v(!0),M(!0,!0)):(v(!1),M(!0,!1)),!0}catch(I){return x(null),d(!1),v(!1),P("Member"),M(!1,!1),(z=I.response)==null||z.status,!1}},[M]);A.useEffect(()=>{(async()=>{h(I=>I+1),await C(),k(!0),h(I=>Math.max(0,I-1))})()},[C]),A.useEffect(()=>{if(!S)return;const z=setInterval(async()=>{c&&!await C()&&c&&w({title:"Session Expired",description:"Please log in again to continue.",variant:"destructive"})},900*1e3);return()=>clearInterval(z)},[S,c,C,w]);const O=async()=>{if(!(u>0)){h(z=>z+1);try{vn.auth.redirectToLogin()}catch(z){console.error("Login initiation failed:",z),w({title:"Login Error",description:"Could not start login process. Please try again.",variant:"destructive"}),h(I=>Math.max(0,I-1))}}},D=async()=>{try{vn.auth.logout(),x(null),d(!1),v(!1),P("Member"),M(!1,!1),w({title:"Goodbye!",description:"Successfully logged out.",variant:"default"})}catch(z){console.error("Logout failed:",z),w({title:"Logout Error",description:"Failed to log out. Please try again.",variant:"destructive"})}},L=async z=>[];A.useEffect(()=>{const z=async()=>{if(!(!c||!y))try{const B=(await L(y.id)).filter(H=>!H.read).length;l(B)}catch{}};if(c&&y){const I=setInterval(z,3e5);return z(),()=>clearInterval(I)}},[c,y]);const F=()=>({Dashboard:"How to Pass FTMO with an AI FTMO Bot | robot4trade",ChartAI:"AI Chart Analysis Tool for Traders | robot4trade",MqlGenerator:"FTMO Bot Generator (AI) for Prop Trading & the5ers EA | robot4trade",PAMM:"PAMM Account Service for Prop Trading & Copy Trading | robot4trade",Challenge:"Pass FTMO Challenge with AI Bots | robot4trade",Community:"Free FTMO Bots & The5ers EAs | Prop Trading Community | robot4trade",Robots:"Prop Trading Robots for FTMO & The5ers | robot4trade",Forum:"FTMO & Prop Trading Forum | robot4trade",AISignals:"AI Trading Signals for FTMO & The5ers | robot4trade",BestBrokers:"Best Brokers for FTMO & Prop Trading | robot4trade Reviews",Trading:"Live Prop Trading Platform & Broker Integration | robot4trade",AboutUs:"About robot4trade - AI for MQL Trading Technology",UserProfile:"My Trading Profile & FTMO Bot Statistics | robot4trade",ForumTopicView:"Trading Discussion | robot4trade Forum",ForumCategoryView:"Trading Category | robot4trade Forum"})[t]||`${t} | robot4trade - AI Trading Platform`,U=()=>({Dashboard:"Learn how to pass FTMO challenges with a custom FTMO bot. Our AI platform helps you build winning prop trading strategies for firms like The5ers. Start now!",ChartAI:"Get instant AI-powered technical analysis by uploading a trading chart. Identify trends, patterns, and key levels to improve your trading strategy.",MqlGenerator:"Use our AI FTMO bot generator to create MQL4/MQL5 code for prop trading. Build a custom the5ers EA and learn how to pass FTMO with automated strategies.",PAMM:"Invest in profitable trading strategies with our PAMM accounts. Copy professional traders and grow your capital with automated prop trading solutions.",Challenge:"Discover how robot4trade's AI bots and strategies can help you successfully pass your FTMO challenge and secure funding.",Community:"Download a free FTMO bot or the5ers EA from our prop trading community. Share strategies and find out how to pass FTMO with community-vetted expert advisors.",Robots:"Manage your automated prop trading robots and expert advisors. Professional algo trading tools for FTMO, The5ers, and other prop trading firms.",Forum:"Join discu
1356ssions on how to pass FTMO, prop trading strategies, MQL programming, and building the best FTMO bot. Connect with professional traders.",AISignals:"AI-powered trading signals optimized for FTMO and prop trading. Get real-time analysis for your FTMO bot or the5ers EA.",BestBrokers:"Find the best forex brokers and prop trading friendly brokers. Read reviews, compare features, and choose the right broker for your FTMO bots and trading strategies.",Trading:"Live prop trading platform with broker integration. Execute your FTMO bot strategies and manage prop trading accounts seamlessly.",Blog:"Read the robot4trade blog for articles on FTMO challenges, prop trading strategies, AI in forex, MQL programming, and expert advisor tips.",StrategyBuilder:"Build custom prop trading strategies and the5ers EAs with AI assistance. Create powerful algorithms and learn how to pass FTMO challenges.",AboutUs:"Learn about robot4trade's mission to democratize algorithmic trading through AI technology for FTMO and prop trading success."})[t]||"Advanced AI trading tools for FTMO bots, prop trading strategies, and MQL code generation with ChatGPT assistance.",G=()=>{const z="FTMO bot, how to pass FTMO, prop trading, the5ers EA, AI for MQL, ChatGPT for trading, algo trading, expert advisor";return{Dashboard:`${z}, FTMO bot creator, prop trading dashboard`,ChartAI:`${z}, AI chart analysis, technical analysis tool, chart patterns`,MqlGenerator:`${z}, MQL generator, AI MQL code, expert advisor generator`,PAMM:`${z}, PAMM accounts, copy trading, forex investment, managed accounts, prop trading investment`,Challenge:`${z}, FTMO challenge, pass FTMO, FTMO funding, prop firm challenge, FTMO strategies`,Community:`${z}, free expert advisors, MQL4 MQL5 community, trading robots download`,Robots:`${z}, automated trading, trading algorithms, expert advisors management`,Forum:`${z}, FTMO forum, prop trading discussion, MQL programming`,AISignals:`${z}, trading signals, automated trading alerts`,BestBrokers:`${z}, best forex brokers, prop firm friendly brokers, broker reviews, FTMO brokers, The5ers brokers, trading platforms`,Trading:`${z}, live trading, broker integration, trading platform`,Blog:`${z}, trading blog, forex trading articles, AI trading insights, FTMO tips, MQL tutorials`,StrategyBuilder:`${z}, strategy builder, strategy creator, AI strategy generator`}[t]||z},W=()=>{if(!c||!y||y.broker_registered===void 0)return!1;const z=localStorage.getItem("broker_popup_dismissed"),I=10080*60*1e3,B=z?Date.now()-parseInt(z)>I:!0;return!y.broker_registered&&B},q=(z,I,B)=>{const H=B,J=z.filter(ee=>_.some(Y=>Y.name===ee.name));return J.length===0?null:a.jsxs(a.Fragment,{children:[I&&I!=="Main Menu"&&a.jsxs("h3",{className:"px-4 pt-4 pb-2 text-xs font-semibold text-gray-400 uppercase flex items-center",children:[H&&a.jsx(H,{className:"h-4 w-4 mr-2"})," ",I]}),J.map(ee=>a.jsxs(pt,{to:ee.href,className:Ie("flex items-center px-4 py-3 text-sm font-medium rounded-lg",t===ee.name?"bg-gray-700 text-cyan-400":"text-gray-300 hover:bg-gray-700 hover:text-white"),onClick:()=>s(!1),children:[a.jsx(ee.icon,{className:"h-5 w-5 mr-3"}),ee.name]},ee.name))]})};return a.jsxs(a.Fragment,{children:[a.jsx(Yx,{title:F(),description:U(),keywords:G(),canonicalUrl:`https://robot4trade.com${window.location.pathname}`}),a.jsxs("div",{className:"flex h-screen bg-gray-900 text-gray-100",children:[a.jsx("aside",{className:Ie("fixed top-0 left-0 z-40 w-64 h-screen transition-transform lg:translate-x-0 print:hidden",!i&&"-translate-x-full"),children:a.jsxs("div",{className:"h-full px-3 py-4 overflow-y-auto bg-gray-800 border-r border-gray-700",children:[a.jsxs("div",{className:"flex items-center mb-4 pl-2",children:[a.jsx(Ya,{className:"h-8 w-8 mr-2"}),a.jsx("span",{className:"ml-1 text-xl font-bold bg-gradient-to-r from-cyan-400 to-blue-500 bg-clip-text text-transparent",children:"robot4trade"})]}),a.jsxs("nav",{className:"space-y-1",children:[q(fB,"Main Menu",Fk),b&&q(hB,"Administration",Ar),c&&a.jsxs(pt,{to:Ve("UserProfile"),className:Ie("flex items-center px-4 py-3 text-sm font-medium rounded-lg mt-4 border-t border-gray-700/50",t==="UserProfile"?"bg-gray-700 text-cyan-400":"text-gray-300 hover:bg-gray-700 hover:text-white"),onClick:()=>s(!1),children:[a.jsx(Nu,{className:"h-5 w-5 mr-3"}),"My Profile"]})]}),a.jsxs("div",{className:"mt-auto pt-6 pb-4",children:[c?a.jsxs("div",{className:"space-y-4",children:[a.jsxs(pt,{to:Ve("UserProfile"),className:"w-full mb-4 flex items-center justify-between p-3 rounded-lg bg-gradient-to-r from-gray-700 to-gray-800 hover:from-gray-600 hover:to-gray-700 transition-all group",children:[a.jsxs("div",{className:"flex items-center",children:[a.jsxs(Rs,{className:"h-8 w-8 mr-3",children:[a.jsx(Ds,{src:y==null?void 0:y.profile_image,loading:"lazy"}),a.jsx(Is,{className:"bg-cyan-800",children:((V=T==null?void 0:T.charAt(0))==null?void 0:V.toUpperCase())||"U"})]}),a.jsxs("div",{className:"text-sm",children:[a.jsx("p",{className:"font-medium text-white truncate max-w-[120px]",title:T,children:T}),a.jsx("p",{className:"text-xs text-gray-400",children:"View Profile"})]})]}),m>0&&a.jsx(Oe,{className:"bg-red-500 text-xs",children:m})]}),a.jsx(se,{variant:"outline",className:"w-full text-gray-400 border-gray-600 hover:border-gray-500 hover:text-white",onClick:D,children:"Sign Out"})]}):a.jsx(se,{className:"w-full bg-gradient-to-r from-cyan-500 to-blue-500 hover:from-cyan-600 hover:to-blue-600",onClick:O,disabled:u>0,children:u>0?a.jsxs(a.Fragment,{children:[a.jsx(kt,{className:"mr-2 h-4 w-4 animate-spin"}),"Signing In..."]}):"Sign In / Register"}),a.jsx(Sv,{className:"mt-4"})]})]})}),a.jsxs("div",{className:"flex-1 flex flex-col lg:pl-64 print:pl-0",children:[a.jsx("div",{className:"sticky top-0 z-30 bg-gray-800 border-b border-gray-700 print:hidden",style:{paddingTop:"env(safe-area-inset-top, 0px)",paddingLeft:"env(safe-area-inset-left, 0px)",paddingRight:"env(safe-area-inset-right, 0px)"},children:a.jsxs("div",{className:"flex h-16 items-center justify-between px-4",children:[a.jsx("div",{className:"lg:hidden flex items-center",children:n?a.jsx(se,{variant:"ghost",size:"icon",className:"text-white",onClick:()=>r(-1),"aria-label":"Go back",children:a.jsx(MB,{className:"h-6 w-6"})}):a.jsx(se,{variant:"ghost",size:"icon",className:"text-white",onClick:()=>s(!i),children:i?a.jsx(Ks,{className:"h-6 w-6"}):a.jsx(bJ,{className:"h-6 w-6"})})}),a.jsx("div",{className:"hidden lg:block w-9"}),a.jsx("div",{className:"flex items-center gap-2 px-3 py-1 rounded-full bg-gradient-to-r from-indigo-600/50 to-purple-600/50 border border-indigo-500/30 lg:ml-0 ml-auto",children:a.jsx("span",{className:"text-white font-medium text-sm",children:"robot4trade.com"})}),a.jsxs("div",{className:"flex items-center gap-2 sm:gap-3",children:[a.jsx(se,{asChild:!0,variant:"ghost",size:"icon",className:"text-gray-300 hover:text-white hover:bg-blue-600/20 transition-colors",title:"Join our Telegram community",children:a.jsx("a",{href:"https://t.me/robot4trade",target:"_blank",rel:"noopener noreferrer","aria-label":"Join us on Telegram",children:a.jsx(Bd,{className:"h-5 w-5"})})}),a.jsx(Sv,{className:"hidden md:flex text-xs px-3 py-1.5 h-auto"}),c&&y?a.jsxs(a.Fragment,{children:[a.jsx(pt,{to:Ve("MemberRoom"),className:"relative",title:"Messages",children:a.jsxs(se,{variant:"ghost",size:"icon",className:"text-gray-300 hover:text-white",children:[a.jsx(sp,{className:"h-5 w-5"}),m>0&&a.jsx("span",{className:"absolute -top-1 -right-1 bg-red-500 text-white text-[9px] font-bold w-3.5 h-3.5 rounded-full flex items-center justify-center",children:m})]})}),a.jsx(pt,{to:Ve("UserProfile"),title:"Settings",children:a.jsx(se,{variant:"ghost",size:"icon",className:"text-gray-300 hover:text-white",children:a.jsx(ji,{className:"h-5 w-5"})})}),a.jsx("div",{className:"relative",title:"Notifications",children:a.jsxs(se,{variant:"ghost",size:"icon",className:"text-gray-300 hover:text-white",onClick:()=>{},children:[a.jsx(Ko,{className:"h-5 w-5"}),o>0&&a.jsx("span",{className:"absolute -top-1 -right-1 bg-red-500 text-white text-[9px] font-bold w-3.5 h-3.5 rounded-full flex items-center justify-center",children:o})]})})]}):u===0&&a.jsx(se,{className:"bg-gradient-to-r from-cyan-500 to-blue-500 hover:from-cyan-600 to-blue-600 text-xs px-3 py-1.5 h-auto",onClick:O,disabled:u>0,children:"Sign In"}),u>0&&a.jsx(kt,{className:"h-5 w-5 animate-spin text-cyan-400"})]})]})}),a.jsx("main",{className:"flex-1 overflow-y-auto p-4 sm:p-6 pb-20 lg:pb-6 bg-gray-900 print:bg-white print:text-black",children:a.jsx(vc,{mode:"wait",initial:!1,children:a.jsx(Sr.div,{initial:{opacity:0,x:n?24:-8}
1356,animate:{opacity:1,x:0},exit:{opacity:0,x:n?-24:8},transition:{duration:.18,ease:"easeOut"},style:{minHeight:"100%"},children:e},t)})}),a.jsx("footer",{className:"bg-gray-800 border-t border-gray-700 p-3 text-center print:hidden",children:a.jsxs("p",{className:"text-xs sm:text-sm text-gray-400",children:["© ",new Date().getFullYear()," robot4trade.com | AI-Powered Trading Solutions.",a.jsx(pt,{to:Ve("Disclaimer"),className:"hover:underline text-cyan-500 mx-2",children:"Disclaimer"}),"|",a.jsx(pt,{to:Ve("AboutUs"),className:"hover:underline text-cyan-500 mx-2",children:"About Us"}),"|",a.jsx(pt,{to:Ve("AboutPlatform"),className:"hover:underline text-cyan-500 mx-2",children:"About Platform"}),"|",a.jsx(pt,{to:Ve("ContactUs"),className:"hover:underline text-cyan-500 mx-2",children:"Contact"}),"|",a.jsx("a",{href:"https://t.me/slaizvar",target:"_blank",rel:"noopener noreferrer",className:"hover:underline text-cyan-500 mx-2",children:"Need Help?"})]})})]}),i&&a.jsx("div",{className:"fixed inset-0 z-30 bg-gray-900 bg-opacity-50 backdrop-blur-sm lg:hidden print:hidden",onClick:()=>s(!1)}),c&&y&&y.broker_registered!==void 0&&!y.broker_registered&&W()&&a.jsx(H5e,{}),c&&a.jsx(G5e,{}),c&&a.jsx(W5e,{}),a.jsx(K5e,{}),a.jsx(Y5e,{}),a.jsx(X5e,{}),a.jsx(Z5e,{currentPageName:t}),a.jsx("style",{children:` 1357 :root { 1358 --background: 222.2 84% 4.9%; 1359 --foreground: 210 40% 98%; 1360 1361 --card: 222.2 84% 6.9%; 1362 --card-foreground: 210 40% 98%; 1363 1364 --popover: 224 71% 4%; 1365 --popover-foreground: 210 40% 98%; 1366 1367 --primary: 199 90% 48%; 1368 --primary-foreground: 210 40% 98%; 1369 1370 --secondary: 217.2 32.6% 17.5%; 1371 --secondary-foreground: 210 40% 98%; 1372 1373 --muted: 220 15% 25%; 1374 --muted-foreground: 215 20.2% 65.1%; 1375 1376 --accent: 190 80% 55%; 1377 --accent-foreground: 222.2 47.4% 11.2%; 1378 1379 --destructive: 0 62.8% 45%; 1380 --destructive-foreground: 210 40% 98%; 1381 1382 --border: 217.2 32.6% 27.5%; 1383 --input: 217.2 32.6% 22.5%; 1384 --ring: 199 90% 52%; 1385 1386 --vip-color: 45 93% 47%; 1387 --admin-color: 0 70% 50%; 1388 --premium-color: 260 70% 60%; 1389 } 1390 1391 @media print { 1392 body { 1393 background-color: white !important; 1394 color: black !important; 1395 font-size: 10pt; 1396 } 1397 main { 1398 padding: 0.5in !important; 1399 overflow: visible !important; 1400 } 1401 .prose { 1402 color: black !important; 1403 } 1404 .prose-invert { 1405 --tw-prose-body: #374151; 1406 --tw-prose-headings: #1f2937; 1407 --tw-prose-lead: #4b5563; 1408 --tw-prose-links: #1d4ed8; 1409 --tw-prose-bold: #111827; 1410 --tw-prose-counters: #6b7280; 1411 --tw-prose-bullets: #d1d5db; 1412 --tw-prose-hr: #e5e7eb; 1413 --tw-prose-quotes: #111827; 1414 --tw-prose-quote-borders: #e5e7eb; 1415 --tw-prose-captions: #6b7280; 1416 --tw-prose-code: #111827; 1417 --tw-prose-pre-code: #e5e7eb; 1418 --tw-prose-pre-bg: #1f2937; 1419 --tw-prose-th-borders: #d1d5db; 1420 --tw-prose-td-borders: #374151; 1421 1422 --tw-prose-invert-body: #d1d5db; 1423 --tw-prose-invert-headings: #fff; 1424 --tw-prose-invert-lead: #9ca3af; 1425 --tw-prose-invert-links: #fff; 1426 --tw-prose-invert-bold: #fff; 1427 --tw-prose-invert-counters: #9ca3af; 1428 --tw-prose-invert-bullets: #4b5563; 1429 --tw-prose-invert-hr: #374151; 1430 --tw-prose-invert-quotes: #f3f4f6; 1431 --tw-prose-invert-quote-borders: #374151; 1432 --tw-prose-invert-captions: #9ca3af; 1433 --tw-prose-invert-code: #fff; 1434 --tw-prose-invert-pre-code: #d1d5db; 1435 --tw-prose-invert-pre-bg: rgb(0 0 0 / 50%); 1436 --tw-prose-invert-th-borders: #4b5563; 1437 --tw-prose-invert-td-borders: #374151; 1438 } 1439 } 1440 1441 .vip-badge { 1442 background: linear-gradient(45deg, hsl(var(--vip-color)), hsl(var(--vip-color) / 0.8)); 1443 color: black; 1444 font-weight: bold; 1445 box-shadow: 0 0 8px hsl(var(--vip-color) / 0.5); 1446 } 1447 .vip-name { 1448 background: linear-gradient(to right, hsl(var(--vip-color)), hsl(var(--vip-color) / 0.7)); 1449 -webkit-background-clip: text; 1450 background-clip: text; 1451 color: transparent; 1452 font-weight: bold; 1453 } 1454 .admin-badge { 1455 background: linear-gradient(45deg, hsl(var(--admin-color)), hsl(var(--admin-color) / 0.8)); 1456 color: white; 1457 font-weight: bold; 1458 box-shadow: 0 0 8px hsl(var(--admin-color) / 0.5); 1459 } 1460 .admin-name { 1461 background: linear-gradient(to right, hsl(var(--admin-color)), hsl(var(--admin-color) / 0.7)); 1462 -webkit-background-clip: text; 1463 background-clip: text; 1464 color: transparent; 1465 font-weight: bold; 1466 } 1467 `})]})]})}
1467const rDe={AISignals:Zpe,AboutUs:age,AdminPanel:sMe,BestBrokers:oMe,Blog:lMe,BlogPost:fMe,Challenge:hMe,ChartAI:jMe,Community:cRe,Dashboard:vRe,Disclaimer:xRe,FixSpecificTopic:bRe,Forum:jRe,ForumCategoryView:SRe,ForumNewTopic:CRe,ForumPage:MRe,ForumTopicView:IRe,Legal:LRe,MemberRoom:$Re,MonteCarlo:BRe,MqlGenerator:e5e,MarketNewsPage:t5e,AboutPlatform:r5e,ContactUs:n5e,PAMM:N5e,Robots:_5e,Screener:E5e,StrategyBuilder:I5e,Trading:z5e,UserProfile:V5e},AY={mainPage:"ChartAI",Pages:rDe,Layout:tDe};function nDe(){const e=os(),{isAuthenticated:t}=dE(),{Pages:r,mainPage:n}=AY,i=n;return A.useEffect(()=>{const s=e.pathname;let o;if(s==="/"||s==="")o=i;else{const l=s.replace(/^\//,"").split("/")[0];o=Object.keys(r).find(u=>u.toLowerCase()===l.toLowerCase())||null}t&&o&&vn.appLogs.logUserInApp(o).catch(()=>{})},[e,t,r,i]),null}function aDe({}){var i;const t=os().pathname.substring(1),{data:r,isFetched:n}=ire({queryKey:["user"],queryFn:async()=>{try{return{user:await vn.auth.me(),isAuthenticated:!0}}catch{return{user:null,isAuthenticated:!1}}}});return a.jsx("div",{className:"min-h-screen flex items-center justify-center p-6 bg-slate-50",children:a.jsx("div",{className:"max-w-md w-full",children:a.jsxs("div",{className:"text-center space-y-6",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx("h1",{className:"text-7xl font-light text-slate-300",children:"404"}),a.jsx("div",{className:"h-0.5 w-16 bg-slate-200 mx-auto"})]}),a.jsxs("div",{className:"space-y-3",children:[a.jsx("h2",{className:"text-2xl font-medium text-slate-800",children:"Page Not Found"}),a.jsxs("p",{className:"text-slate-600 leading-relaxed",children:["The page ",a.jsxs("span",{className:"font-medium text-slate-700",children:['"',t,'"']})," could not be found in this application."]})]}),n&&r.isAuthenticated&&((i=r.user)==null?void 0:i.role)==="admin"&&a.jsx("div",{className:"mt-8 p-4 bg-slate-100 rounded-lg border border-slate-200",children:a.jsxs("div",{className:"flex items-start space-x-3",children:[a.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-orange-100 flex items-center justify-center mt-0.5",children:a.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-400"})}),a.jsxs("div",{className:"text-left space-y-1",children:[a.jsx("p",{className:"text-sm font-medium text-slate-700",children:"Admin Note"}),a.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:"This could mean that the AI hasn't implemented this page yet. Ask it to implement it in the chat."})]})]})}),a.jsx("div",{className:"pt-6",children:a.jsxs("button",{onClick:()=>window.location.href="/",className:"inline-flex items-center px-4 py-2 text-sm font-medium text-slate-700 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 hover:border-slate-300 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500",children:[a.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Go Home"]})})]})})})}const iDe=()=>a.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-white to-slate-50",children:a.jsx("div",{className:"max-w-md w-full p-8 bg-white rounded-lg shadow-lg border border-slate-100",children:a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 rounded-full bg-orange-100",children:a.jsx("svg",{className:"w-8 h-8 text-orange-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),a.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-4",children:"Access Restricted"}),a.jsx("p",{className:"text-slate-600 mb-8",children:"You are not registered to use this application. Please contact the app administrator to request access."}),a.jsxs("div",{className:"p-4 bg-slate-50 rounded-md text-sm text-slate-600",children:[a.jsx("p",{children:"If you believe this is an error, you can:"}),a.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[a.jsx("li",{children:"Verify you are logged in with the correct account"}),a.jsx("li",{children:"Contact the app administrator for access"}),a.jsx("li",{children:"Try logging out and back in again"})]})]})]})})}),mB="vmhvs59yYt8";function sDe(){return a.jsxs("section",{className:"pt-2 pb-4",children:[a.jsxs("div",{className:"text-center max-w-2xl mx-auto",children:[a.jsxs("div",{className:"inline-flex items-center gap-1.5 rounded-full border border-cyan-500/30 bg-cyan-500/10 px-3 py-1.5 text-xs font-medium text-cyan-300 mb-4",children:[a.jsx(AZ,{className:"h-3.5 w-3.5"})," Video Tutorials"]}),a.jsxs("h1",{className:"text-2xl sm:text-4xl font-extrabold tracking-tight text-white",children:["Learn the platform,",a.jsx("br",{}),a.jsx("span",{className:"bg-gradient-to-r from-cyan-400 via-blue-400 to-purple-400 bg-clip-text text-transparent",children:"one short video at a time"})]}),a.jsx("p",{className:"mt-3 text-sm sm:text-base text-gray-400 leading-relaxed",children:"Practical, no-fluff walkthroughs on installing and running trading robots. Built for beginners â no coding, no prior experience."})]}),a.jsx("div",{className:"mt-8 rounded-3xl border border-gray-700/60 bg-gray-900/60 overflow-hidden shadow-2xl shadow-cyan-500/5",children:a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2",children:[a.jsx("div",{className:"relative aspect-video bg-black",children:a.jsx("iframe",{className:"absolute inset-0 w-full h-full",src:`https://www.youtube.com/embed/${mB}?rel=0&modestbranding=1`,title:"MT5 EA in 2 minutes: Fast and Simple Installation",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowFullScreen:!0})}),a.jsxs("div",{className:"p-5 sm:p-7 flex flex-col",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-4",children:[a.jsx("span",{className:"inline-flex items-center rounded-full bg-emerald-500/15 px-2.5 py-1 text-xs font-semibold text-emerald-400",children:"Beginner"}),a.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-gray-700/60 px-2.5 py-1 text-xs font-medium text-gray-300",children:[a.jsx(Za,{className:"h-3 w-3"})," â 2 min"]})]}),a.jsx("h2",{className:"text-lg sm:text-2xl font-bold text-white leading-snug",children:"MT5 EA in 2 minutes: Fast and Simple Installation"}),a.jsx("p",{className:"mt-3 text-sm text-gray-400 leading-relaxed",children:"Go from a downloaded Expert Advisor file to a robot running live on your MetaTrader 5 chart â in about the time it takes to pour a coffee."}),a.jsx("ul",{className:"mt-4 space-y-2",children:["Where to place the EA file so MT5 can see it","Attaching the robot to a chart and setting it up","Enabling Algo Trading and checking the robot is live"].map(e=>a.jsxs("li",{className:"flex items-start gap-2 text-sm text-gray-300",children:[a.jsx(Yo,{className:"h-4 w-4 mt-0.5 text-emerald-400 shrink-0"}),a.jsx("span",{children:e})]},e))}),a.jsxs("div",{className:"mt-5 flex flex-wrap gap-3",children:[a.jsxs("a",{href:`https://www.youtube.com/watch?v=${mB}`,target:"_blank",rel:"noopener noreferrer",className:"group inline-flex items-center gap-2 rounded-xl bg-blue-500 px-4 py-2.5 text-sm font-semibold text-white shadow-lg shadow-blue-500/30 transition-transform hover:scale-[1.02] active:scale-95",children:["Watch on YouTube",a.jsx(qo,{className:"h-4 w-4 transition-transform group-hover:translate-x-1"})]}),a.jsxs(pt,{to:Ve("Community"),className:"inline-flex items-center gap-2 rounded-xl border border-gray-600 px-4 py-2.5 text-sm font-semibold text-gray-200 transition-colors hover:border-gray-500 hover:bg-gray-700/40",children:[a.jsx(er,{className:"h-4 w-4 text-cyan-400"}),"Browse Free EAs"]})]})]})]})})]})}const oDe={mt4:[{icon:Gn,title:"Download the EA",detail:"Download the EA file â usually with a .ex4 or .mq4 extension â from a reliable source."},{icon:B4,title:"Open the Data Folder",detail:"In MT4 click File â Open Data Folder, then open MQL4 â Experts."},{icon:Wh,title:"Copy the EA file",detail:"Paste the downloaded .ex4 / .mq4 file directly into the Experts folder."},{icon:Xr,title:"Restart MetaTrader 4",detail:"Close and reopen MT4 so the platform detects the new EA."},{icon:V4,title:"Enable Automated Trading",detail:"Tools â Options â Expert Advisors â tick âAllow automated tradingâ."},{icon:q4,title:"Attach the EA to a chart",detail:"Drag the EA from the Navigator panel onto a chart and set its parameters."}
1467,{icon:z4,title:"Check for the smiley",detail:"A smiley face in the top-right corner of the chart confirms the EA is active."}],mt5:[{icon:Gn,title:"Download the EA",detail:"Download the EA file â usually with a .ex5 or .mq5 extension â from a reliable source."},{icon:B4,title:"Open the Data Folder",detail:"In MT5 click File â Open Data Folder, then open MQL5 â Experts."},{icon:Wh,title:"Copy the EA file",detail:"Paste the downloaded .ex5 / .mq5 file directly into the Experts folder."},{icon:Xr,title:"Restart MetaTrader 5",detail:"Close and reopen MT5 so the platform detects the new EA."},{icon:V4,title:"Enable Automated Trading",detail:"Tools â Options â Expert Advisors â tick âAllow automated tradingâ."},{icon:q4,title:"Attach the EA to a chart",detail:"Drag the EA from the Navigator panel onto a chart and set its parameters."},{icon:z4,title:"Check for the smiley",detail:"A smiley face in the top-right corner of the chart confirms the EA is active."}]};function lDe(){const[e,t]=A.useState("mt5"),[r,n]=A.useState({mt4:{},mt5:{}}),[i,s]=A.useState(0),o=oDe[e],l=Object.values(r[e]).filter(Boolean).length,c=Math.round(l/o.length*100),d=h=>{n(m=>({...m,[e]:{...m[e],[h]:!m[e][h]}}))},u=()=>{n(h=>({...h,[e]:{}})),s(0)};return a.jsxs("div",{className:"rounded-3xl border border-gray-700/60 bg-gray-800/40 backdrop-blur-sm p-4 sm:p-6",children:[a.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4 mb-5",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(KS,{className:"h-5 w-5 text-cyan-400"}),a.jsx("h2",{className:"text-xl sm:text-2xl font-bold text-white",children:"Step-by-step installation"})]}),a.jsx("div",{className:"inline-flex rounded-xl bg-gray-900/60 border border-gray-700/60 p-1",children:["mt4","mt5"].map(h=>a.jsx("button",{onClick:()=>{t(h),s(0)},className:Ie("px-5 py-2 rounded-lg text-sm font-semibold transition-all uppercase",e===h?"bg-gradient-to-r from-cyan-500 to-blue-500 text-white shadow-lg shadow-cyan-500/25":"text-gray-400 hover:text-white"),children:h==="mt4"?"MetaTrader 4":"MetaTrader 5"},h))})]}),a.jsxs("div",{className:"mb-5",children:[a.jsxs("div",{className:"flex items-center justify-between text-xs text-gray-400 mb-2",children:[a.jsxs("span",{children:[l," of ",o.length," steps completed"]}),a.jsxs("button",{onClick:u,className:"inline-flex items-center gap-1 hover:text-white transition-colors",children:[a.jsx(HS,{className:"h-3.5 w-3.5"})," Reset"]})]}),a.jsx("div",{className:"h-2 w-full rounded-full bg-gray-700/60 overflow-hidden",children:a.jsx(Sr.div,{className:"h-full rounded-full bg-gradient-to-r from-cyan-500 to-blue-500",animate:{width:`${c}%`},transition:{duration:.4}})})]}),a.jsx(vc,{mode:"wait",children:a.jsx(Sr.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.25},className:"space-y-2",children:o.map((h,m)=>{const g=r[e][m],b=m===i,v=h.icon;return a.jsx("div",{onClick:()=>s(m),className:Ie("group cursor-pointer rounded-2xl border p-4 transition-all",b?"border-cyan-500/50 bg-cyan-500/5":"border-gray-700/50 bg-gray-900/30 hover:border-gray-600"),children:a.jsxs("div",{className:"flex items-start gap-4",children:[a.jsx("button",{onClick:y=>{y.stopPropagation(),d(m)},className:"mt-0.5 shrink-0","aria-label":"Toggle step complete",children:g?a.jsx(dc,{className:"h-6 w-6 text-emerald-400"}):a.jsx(Rk,{className:"h-6 w-6 text-gray-600 group-hover:text-gray-400"})}),a.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-gradient-to-br from-cyan-500/20 to-blue-500/10 border border-cyan-500/20",children:a.jsx(v,{className:"h-5 w-5 text-cyan-400"})}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("span",{className:"text-xs font-bold text-cyan-400",children:["STEP ",m+1]}),g&&a.jsx("span",{className:"text-xs font-semibold text-emerald-400",children:"DONE"})]}),a.jsx("h3",{className:Ie("font-semibold text-white",g&&"line-through opacity-60"),children:h.title}),a.jsx(vc,{children:b&&a.jsx(Sr.p,{initial:{opacity:0,height:0}
1467,animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"mt-2 text-sm text-gray-300 leading-relaxed overflow-hidden",children:h.detail})})]})]})},m)})},e)})]})}const pB=[{title:"Turn on Auto-Trading",desc:"Make sure the Auto-Trading button in the toolbar is enabled â otherwise the EA will never place a trade."},{title:"Match the EA's timeframe",desc:"Check that your chart is on the exact timeframe directed by the EA. A wrong timeframe changes the whole strategy."},{title:"Test on Demo first",desc:"Always test the EA on a Demo account and understand every function before risking any real money."}];function cDe(){const[e,t]=A.useState({}),r=i=>t(s=>({...s,[i]:!s[i]})),n=pB.every((i,s)=>e[s]);return a.jsxs("div",{className:"rounded-3xl border border-emerald-500/30 bg-gradient-to-br from-emerald-500/5 to-teal-500/5 p-4 sm:p-6",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[a.jsx(ss,{className:"h-5 w-5 text-emerald-400"}),a.jsx("h2",{className:"text-xl sm:text-2xl font-bold text-white",children:"Best tips for beginners"})]}),a.jsx("div",{className:"space-y-2",children:pB.map((i,s)=>{const o=e[s];return a.jsxs("button",{onClick:()=>
1467r(s),className:Ie("w-full flex items-start gap-4 rounded-2xl border p-4 text-left transition-all",o?"border-emerald-500/50 bg-emerald-500/10":"border-gray-700/50 bg-gray-900/30 hover:border-gray-600"),children:[o?a.jsx(dc,{className:"h-6 w-6 text-emerald-400 shrink-0"}):a.jsx(Rk,{className:"h-6 w-6 text-gray-600 shrink-0"}),a.jsxs("div",{className:"min-w-0",children:[a.jsx("h3",{className:Ie("font-semibold text-white",o&&"line-through opacity-70"),children:i.title}),a.jsx("p",{className:"mt-1 text-sm text-gray-400 leading-relaxed",children:i.desc})]})]},s)})}),a.jsxs(Sr.div,{animate:{opacity:n?1:.4},className:"mt-4 flex items-center gap-2 text-sm font-medium text-emerald-400",children:[a.jsx(dc,{className:"h-4 w-4"}),n?"You're ready to go live â safely!":"Tick all three to confirm you're ready."]})]})}const uDe=[{icon:FB,title:"Position Sizing",desc:"Size each trade as a percentage of your total capital. A common rule is to risk no more than 1â2% per trade, so a losing streak can't wipe you out."},{icon:Xo,title:"Set Stop-Loss Orders",desc:"Always use a stop-loss to cap losses automatically. It defines your risk in advance and removes emotional decision-making in the heat of the moment."},{icon:uJ,title:"Diversify Your Trades",desc:"Don't put everything into one pair or correlated trades. Spread risk across different pairs and strategies to soften losing streaks."},{icon:Qr,title:"Use Leverage Wisely",desc:"Leverage amplifies losses as much as profits. Keep it modest, especially as a beginner, so each trade's potential loss stays small."},{icon:Yh,title:"Risk-Reward Ratio",desc:"Aim for at least 1:2 â risk one to make two. That way you can stay profitable even if only half your trades win."}];function dDe(){const[e,t]=A.useState(0);return a.jsxs("div",{className:"rounded-3xl border border-gray-700/60 bg-gray-800/40 backdrop-blur-sm p-4 sm:p-6",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[a.jsx(Yh,{className:"h-5 w-5 text-cyan-400"}),a.jsx("h2",{className:"text-xl sm:text-2xl font-bold text-white",children:"Risk management essentials"})]}),a.jsx("div",{className:"space-y-2",children:uDe.map((r,n)=>{const i=r.icon,s=e===n;return a.jsxs("div",{className:"rounded-2xl border border-gray-700/50 bg-gray-900/30 overflow-hidden",children:[a.jsxs("button",{onClick:()=>t(s?-1:n),className:"w-full flex items-center gap-4 p-4 text-left hover:bg-gray-800/40 transition-colors",children:[a.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-gradient-to-br from-cyan-500/20 to-blue-500/10 border border-cyan-500/20",children:a.jsx(i,{className:"h-5 w-5 text-cyan-400"})}),a.jsx("h3",{className:"flex-1 font-semibold text-white",children:r.title}),a.jsx(Zi,{className:Ie("h-5 w-5 text-gray-400 transition-transform",s&&"rotate-180")})]}),a.jsx(vc,{initial:!1,children:s&&a.jsx(Sr.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.25},className:"overflow-hidden",children:a.jsx("p",{className:"px-4 pb-4 pl-[4.5rem] text-sm text-gray-300 leading-relaxed",children:r.desc})})})]},n)})})]})}function fDe(){return a.jsxs(Sr.section,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.4},className:"rounded-3xl border border-gray-700/60 bg-gray-800/40 backdrop-blur-sm p-4 sm:p-8",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-5",children:[a.jsx(Pc,{className:"h-5 w-5 text-cyan-400"}),a.jsx("h2",{className:"text-xl sm:text-2xl font-bold text-white",children:"The complete manual"})]}),a.jsxs("div",{className:"prose prose-invert prose-sm sm:prose-base max-w-none space-y-6 text-gray-300",children:[a.jsx("p",{children:"Installing an Expert Advisor (EA) on MetaTrader 4 or MetaTrader 5 is the fastest way to automate your trading. This manual walks you through the entire process from download to a running, smiling EA on your chart â plus the best tips and risk-management rules every beginner should know before going live."}),a.jsxs("h3",{className:"flex items-center gap-2 text-white",children:[a.jsx(tee,{className:"h-5 w-5 text-cyan-400"})," Installing an EA on MetaTrader 4 (MT4)"]}),a.jsxs("ol",{className:"list-decimal pl-6 space-y-2",children:[a.jsxs("li",{children:[a.jsx("strong",{className:"text-white",children:"Download the EA."})," Download the EA file (usually with a ",a.jsx("code",{className:"text-cyan-300",children:".ex4"})," or ",a.jsx("code",{className:"text-cyan-300",children:".mq4"})," extension) from a reliable source."]}),a.jsxs("li",{children:[a.jsx("strong",{className:"text-white",children:"Locate the âExpertsâ folder."})," Open MetaTrader 4, click ",a.jsx("em",{children:"File"})," in the top menu, then select ",a.jsx("em",{children:"Open Data Folder"}),". Inside, open the ",a.jsx("code",{className:"text-cyan-300",children:"MQL4"})," folder and then the ",a.jsx("code",{className:"text-cyan-300",children:"Experts"})," folder."]}
1467),a.jsxs("li",{children:[a.jsx("strong",{className:"text-white",children:"Copy the EA file."})," Copy the downloaded EA file into the ",a.jsx("em",{children:"Experts"})," folder."]}),a.jsxs("li",{children:[a.jsx("strong",{className:"text-white",children:"Restart MetaTrader 4."})," Close and reopen the platform so it detects the new EA."]}),a.jsxs("li",{children:[a.jsx("strong",{className:"text-white",children:"Enable automated trading."})," Make sure automated trading is enabled â find it under ",a.jsx("em",{children:"Options â Expert Advisors"})," in the platform settings."]}),a.jsxs("li",{children:[a.jsx("strong",{className:"text-white",children:"Attach the EA to a chart."})," Drag the EA from the ",a.jsx("em",{children:"Navigator"})," panel onto a chart. You may need to set some parameters depending on the EA."]}),a.jsxs("li",{children:[a.jsx("strong",{className:"text-white",children:"Check for the smiley."})," A smiley face in the top-right corner of the chart indicates the EA is active and running."]})]}),a.jsxs("h3",{className:"flex items-center gap-2 text-white",children:[a.jsx(fc,{className:"h-5 w-5 text-cyan-400"})," Installing an EA on MetaTrader 5 (MT5)"]}),a.jsxs("ol",{className:"list-decimal pl-6 space-y-2",children:[a.jsxs("li",{children:[a.jsx("strong",{className:"text-white",children:"Download the EA."})," Download the EA file (usually with a ",a.jsx("code",{className:"text-cyan-300",children:".ex5"})," or ",a.jsx("code",{className:"text-cyan-300",children:".mq5"})," extension) from a reliable source."]}),a.jsxs("li",{children:[a.jsx("strong",{className:"text-white",children:"Locate the âExpertsâ folder."})," Open MetaTrader 5, click ",a.jsx("em",{children:"File"})," in the top menu, then select ",a.jsx("em",{children:"Open Data Folder"}),". Inside, open the ",a.jsx("code",{className:"text-cyan-300",children:"MQL5"})," folder and then the ",a.jsx("code",{className:"text-cyan-300",children:"Experts"})," folder."]}),a.jsxs("li",{children:[a.jsx("strong",{className:"text-white",children:"Copy the EA file."})," Copy the downloaded EA file into the ",a.jsx("em",{children:"Experts"})," folder."]}),a.jsxs("li",{children:[a.jsx("strong",{className:"text-white",children:"Restart MetaTrader 5."})," Close and reopen the platform so it detects the new EA."]}),a.jsxs("li",{children:[a.jsx("strong",{className:"text-white",children:"Enable automated trading."})," Make sure automated trading is enabled â find it under ",a.jsx("em",{children:"Tools â Options â Expert Advisors"})," in the platform settings."]}),a.jsxs("li",{children:[a.jsx("strong",{className:"text-white",children:"Attach the EA to a chart."})," Drag the EA from the ",a.jsx("em",{children:"Navigator"})," panel onto a chart. You may need to set some parameters depending on the EA."]}),a.jsxs("li",{children:[a.jsx("strong",{className:"text-white",children:"Check for the smiley."})," A smiley face in the top-right corner of the chart indicates the EA is active and running."]})]}),a.jsx("p",{className:"text-gray-400",children:"Always review the instructions provided by the EA's developer for any specific installation or configuration steps. Be cautious when using EAs and make sure you understand how they work before deploying them in live trading."}),a.jsxs("h3",{className:"flex items-center gap-2 text-white",children:[a.jsx(pJ,{className:"h-5 w-5 text-emerald-400"})," Best tips for beginners"]}),a.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[a.jsxs("li",{children:["Check that your ",a.jsx("strong",{className:"text-white",children:"Auto-Trader"})," is turned on."]}),a.jsxs("li",{children:["Check that the chart is on the ",a.jsx("strong",{className:"text-white",children:"timeframe directed by the EA"}),"."]}),a.jsxs("li",{children:["Always ",a.jsx("strong",{className:"text-white",children:"test the EA on a Demo account"})," and understand all its functions before risking real money."]})]}),a.jsxs("h3",{className:"flex items-center gap-2 text-white",children:[a.jsx(oee,{className:"h-5 w-5 text-amber-400"})," Risk management essentials (in full)"]}),a.jsx("p",{children:"Effective risk management is crucial in forex trading to protect your capital and enhance long-term success. Here are five essential rules:"}),a.jsxs("ol",{className:"list-decimal pl-6 space-y-3",children:[a.jsxs("li",{children:[a.jsx("strong",{className:"text-white",children:"Position sizing."})," Determine the size of your trading positions based on a percentage of your overall capital. A commonly recommended rule is to risk no more than 1â2% of your trading capital on any single trade, so even a series of losing trades won't excessively deplete your account."]}),a.jsxs("li",{children:[a.jsx("strong",{className:"text-white",children:"Set stop-loss orders."})," Always use stop-loss orders to limit potential losses. A stop-loss is a predetermined exit level that automatically closes your trade at a specified price, defining your risk in advance and preventing emotional decision-making. Adjust it based on market conditions, but keep it aligned with your risk tolerance and strategy."]}),a.jsxs("li",{children:[a.jsx("strong",{className:"text-white",children:"Diversify your trades."})," Avoid putting all your capital into a single trade or a correlated group of trades. Diversification across different currency pairs or strategies can mitigate the impact of a losing streak. Understand the correlations between pairs and assets to achieve true diversification."]}),a.jsxs("li",{children:[a.jsx("strong",{className:"text-white",children:"Use leverage wisely."})," Leverage amplifies profits but also increases potential losses. Limit your use of leverage, especially as a beginner. Keep it at a level where each trade's potential loss represents only a small percentage of your capital."]}),a.jsxs("li",{children:[a.jsx("strong",{className:"text-white",children:"Risk-reward ratio."})," Assess the risk-reward ratio before entering the market. A common guideline is to aim for at least 1:2 â for every dollar you risk, you should have the potential to make at least two. This lets you stay profitable even when not all trades win."]})]}),a.jsx("p",{className:"text-gray-400",children:"Risk management is an ongoing process. Regularly evaluate and adjust your strategy based on changing market conditions and your own performance. Consistency and discipline in applying these principles significantly contribute to long-term success."})]})]})}function hDe(){return a.jsxs(a.Fragment,{children:[a.jsx(Yx,{title:"How to Install an EA on MT4 & MT5 â The Simplest Way (2026 Guide) | robot4trade",description:"A modern, interactive guide to installing any Expert Advisor on MetaTrader 4 and MetaTrader 5 in minutes. Step-by-step walkthrough, beginner tips and risk management essentials.",keywords:"install EA MT4, install EA MT5, MetaTrader expert advisor installation, how to install EA, MT4 MT5 tutorial, beginner EA guide, robot4trade",canonicalUrl:`https://robot4trade.com${window.location.pathname}`}),a.jsxs("div",{className:"min-h-screen text-gray-100 overflow-x-hidden",children:[a.jsx(sDe,{}),a.jsx("section",{className:"mt-10",children:a.jsx(lDe,{})}),a.jsxs("section",{className:"mt-6 grid grid-cols-1 lg:grid-cols-2 gap-6",children:[a.jsx(cDe,{}),a.jsx(dDe,{})]}),a.jsx("section",{className:"mt-6",children:a.jsx(fDe,{})}),a.jsx("section",{className:"mt-10 mb-4",children:a.jsxs("div",{className:"relative overflow-hidden rounded-3xl border border-cyan-500/30 bg-gradient-to-br from-cyan-500/10 via-blue-500/10 to-purple-500/10 p-6 sm:p-10 text-center",children:[a.jsx("div",{className:"pointer-events-none absolute -top-10 -right-10 h-40 w-40 rounded-full bg-cyan-500/20 blur-3xl"}),a.jsx(HJ,{className:"h-8 w-8 text-cyan-400 mx-auto mb-3"}),a.jsx("h2",{className:"text-xl sm:text-2xl font-bold text-white",children:"Ready to build your own EA?"}),a.jsx("p",{className:"mt-2 text-sm text-gray-300 max-w-md mx-auto",children:"Generate a MetaTrader Expert Advisor from a plain-text description â no coding required."}),a.jsxs(pt,{to:Ve("MqlGenerator"),className:"group mt-5 inline-flex items-center justify-center gap-2 rounded-xl bg-gradient-to-r from-cyan-500 to-blue-500 px-6 py-3 text-base font-semibold text-white shadow-lg shadow-cyan-500/25 transition-all hover:scale-[1.02] active:scale-95",children:[a.jsx(Pc,{className:"h-4 w-4"}),"Open AI Bot Maker",a.jsx(qo,{className:"h-4 w-4 transition-transform group-hover:translate-x-1"})]})]})})]})]})}const{Pages:kY,Layout:gB,mainPage:mDe}=AY,EY=mDe,pDe=kY[EY],$S=({children:e,currentPageName:t})=>gB?a.jsx(gB,{currentPageName:t,children:e}):a.jsx(a.Fragment,{children:e}),gDe=()=>{const{isLoadingAuth:e,isLoadingPublicSettings:t,authError:r,navigateToLogin:n}=dE();if(t||e)return a.jsx("div",{className:"fixed inset-0 flex items-center justify-center",children:a.jsx("div",{className:"w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin"})});if(r){if(r.type==="user_not_registered")return a.jsx(iDe,{});if(r.type==="auth_required")return n(),null}return a.jsxs(Zre,{children:[a.jsx(vh,{path:"/",element:a.jsx($S,{currentPageName:EY,children:a.jsx(pDe,{})})}),Object.entries(kY).map(([i,s])=>a.jsx(vh,{path:`/${i}`,element:a.jsx($S,{currentPageName:i,children:a.jsx(s,{})})},i)),a.jsx(vh,{path:"/EaInstallGuide",element:a.jsx($S,{currentPageName:"EaInstallGuide",children:a.jsx(hDe,{})})}),a.jsx(vh,{path:"*",element:a.jsx(aDe,{})})]})};function yDe(){return a.jsx(koe,{children:a.jsxs(Gte,{client:sre,children:[a.jsxs(ine,{children:[a.jsx(nDe,{}),a.jsx(gDe,{})]}),a.jsx(wte,{})]})})}PQ.createRoot(document.getElementById("root")).render(a.jsx(yDe,{}));
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.